Curl_altsvc_init:
  319|  15.3k|{
  320|  15.3k|  struct altsvcinfo *asi = curlx_calloc(1, sizeof(struct altsvcinfo));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  321|  15.3k|  if(!asi)
  ------------------
  |  Branch (321:6): [True: 0, False: 15.3k]
  ------------------
  322|      0|    return NULL;
  323|  15.3k|  Curl_llist_init(&asi->list, NULL);
  324|       |
  325|       |  /* set default behavior */
  326|  15.3k|  asi->flags = CURLALTSVC_H1
  ------------------
  |  | 1035|  15.3k|#define CURLALTSVC_H1           (1L << 3)
  ------------------
  327|  15.3k|#ifdef USE_HTTP2
  328|  15.3k|    | CURLALTSVC_H2
  ------------------
  |  | 1036|  15.3k|#define CURLALTSVC_H2           (1L << 4)
  ------------------
  329|  15.3k|#endif
  330|       |#ifdef USE_HTTP3
  331|       |    | CURLALTSVC_H3
  332|       |#endif
  333|  15.3k|    ;
  334|  15.3k|  return asi;
  335|  15.3k|}
Curl_altsvc_load:
  341|  15.3k|{
  342|  15.3k|  DEBUGASSERT(asi);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (342:3): [True: 0, False: 15.3k]
  |  Branch (342:3): [True: 15.3k, False: 0]
  ------------------
  343|  15.3k|  return altsvc_load(asi, file);
  344|  15.3k|}
Curl_altsvc_ctrl:
  350|     38|{
  351|     38|  DEBUGASSERT(data);
  ------------------
  |  | 1081|     38|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (351:3): [True: 0, False: 38]
  |  Branch (351:3): [True: 38, False: 0]
  ------------------
  352|     38|  if(!ctrl)
  ------------------
  |  Branch (352:6): [True: 1, False: 37]
  ------------------
  353|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  354|       |
  355|     37|  if(!data->asi) {
  ------------------
  |  Branch (355:6): [True: 37, False: 0]
  ------------------
  356|     37|    data->asi = Curl_altsvc_init();
  357|     37|    if(!data->asi)
  ------------------
  |  Branch (357:8): [True: 0, False: 37]
  ------------------
  358|      0|      return CURLE_OUT_OF_MEMORY;
  359|     37|  }
  360|     37|  data->asi->flags = ctrl;
  361|     37|  return CURLE_OK;
  362|     37|}
Curl_altsvc_cleanup:
  369|  33.2k|{
  370|  33.2k|  if(*asi) {
  ------------------
  |  Branch (370:6): [True: 15.3k, False: 17.8k]
  ------------------
  371|  15.3k|    struct Curl_llist_node *e;
  372|  15.3k|    struct Curl_llist_node *n;
  373|  15.3k|    struct altsvcinfo *altsvc = *asi;
  374|  15.3k|    for(e = Curl_llist_head(&altsvc->list); e; e = n) {
  ------------------
  |  Branch (374:45): [True: 0, False: 15.3k]
  ------------------
  375|      0|      struct altsvc *as = Curl_node_elem(e);
  376|      0|      n = Curl_node_next(e);
  377|      0|      altsvc_free(as);
  ------------------
  |  |   81|      0|#define altsvc_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  378|      0|    }
  379|  15.3k|    curlx_free(altsvc->filename);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  380|  15.3k|    curlx_free(altsvc);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  381|       |    *asi = NULL; /* clear the pointer */
  382|  15.3k|  }
  383|  33.2k|}
Curl_altsvc_save:
  390|  33.2k|{
  391|  33.2k|  CURLcode result = CURLE_OK;
  392|  33.2k|  FILE *out;
  393|  33.2k|  char *tempstore = NULL;
  394|       |
  395|  33.2k|  if(!asi)
  ------------------
  |  Branch (395:6): [True: 17.8k, False: 15.3k]
  ------------------
  396|       |    /* no cache activated */
  397|  17.8k|    return CURLE_OK;
  398|       |
  399|       |  /* if not new name is given, use the one we stored from the load */
  400|  15.3k|  if(!file && asi->filename)
  ------------------
  |  Branch (400:6): [True: 5, False: 15.3k]
  |  Branch (400:15): [True: 0, False: 5]
  ------------------
  401|      0|    file = asi->filename;
  402|       |
  403|  15.3k|  if((asi->flags & CURLALTSVC_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1034|  15.3k|#define CURLALTSVC_READONLYFILE (1L << 2)
  ------------------
  |  Branch (403:6): [True: 18, False: 15.3k]
  |  Branch (403:48): [True: 3, False: 15.3k]
  |  Branch (403:57): [True: 0, False: 15.3k]
  ------------------
  404|       |    /* marked as read-only, no file or zero length filename */
  405|     21|    return CURLE_OK;
  406|       |
  407|  15.3k|  result = Curl_fopen(data, file, &out, &tempstore);
  408|  15.3k|  if(!result) {
  ------------------
  |  Branch (408:6): [True: 15.3k, False: 0]
  ------------------
  409|  15.3k|    struct Curl_llist_node *e;
  410|  15.3k|    struct Curl_llist_node *n;
  411|  15.3k|    fputs("# Your alt-svc cache. https://curl.se/docs/alt-svc.html\n"
  412|  15.3k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  413|  15.3k|          out);
  414|  15.3k|    for(e = Curl_llist_head(&asi->list); e; e = n) {
  ------------------
  |  Branch (414:42): [True: 0, False: 15.3k]
  ------------------
  415|      0|      struct altsvc *as = Curl_node_elem(e);
  416|      0|      n = Curl_node_next(e);
  417|      0|      result = altsvc_out(as, out);
  418|      0|      if(result)
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  ------------------
  419|      0|        break;
  420|      0|    }
  421|  15.3k|    curlx_fclose(out);
  ------------------
  |  |   79|  15.3k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  422|  15.3k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (422:8): [True: 15.3k, False: 0]
  |  Branch (422:19): [True: 0, False: 15.3k]
  |  Branch (422:32): [True: 0, False: 0]
  ------------------
  423|      0|      result = CURLE_WRITE_ERROR;
  424|       |
  425|  15.3k|    if(result && tempstore)
  ------------------
  |  Branch (425:8): [True: 0, False: 15.3k]
  |  Branch (425:18): [True: 0, False: 0]
  ------------------
  426|      0|      unlink(tempstore);
  427|  15.3k|  }
  428|  15.3k|  curlx_free(tempstore);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  429|  15.3k|  return result;
  430|  15.3k|}
altsvc.c:altsvc_load:
  232|  15.3k|{
  233|  15.3k|  CURLcode result = CURLE_OK;
  234|  15.3k|  FILE *fp;
  235|       |
  236|       |  /* we need a private copy of the filename so that the altsvc cache file
  237|       |     name survives an easy handle reset */
  238|  15.3k|  curlx_free(asi->filename);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  239|  15.3k|  asi->filename = curlx_strdup(file);
  ------------------
  |  | 1477|  15.3k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  240|  15.3k|  if(!asi->filename)
  ------------------
  |  Branch (240:6): [True: 0, False: 15.3k]
  ------------------
  241|      0|    return CURLE_OUT_OF_MEMORY;
  242|       |
  243|  15.3k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  15.3k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  244|  15.3k|  if(fp) {
  ------------------
  |  Branch (244:6): [True: 15.3k, False: 0]
  ------------------
  245|  15.3k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  15.3k|#define curlx_struct_stat       struct stat
  ------------------
  246|  15.3k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  15.3k|#define curlx_fstat             fstat
  ------------------
  |  Branch (246:8): [True: 0, False: 15.3k]
  |  Branch (246:50): [True: 15.3k, False: 0]
  ------------------
  247|  15.3k|      bool eof = FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
  248|  15.3k|      struct dynbuf buf;
  249|  15.3k|      curlx_dyn_init(&buf, MAX_ALTSVC_LINE);
  ------------------
  |  |   41|  15.3k|#define MAX_ALTSVC_LINE    4095
  ------------------
  250|  15.3k|      do {
  251|  15.3k|        result = Curl_get_line(&buf, fp, &eof);
  252|  15.3k|        if(!result) {
  ------------------
  |  Branch (252:12): [True: 15.3k, False: 0]
  ------------------
  253|  15.3k|          const char *lineptr = curlx_dyn_ptr(&buf);
  254|  15.3k|          curlx_str_passblanks(&lineptr);
  255|  15.3k|          if(curlx_str_single(&lineptr, '#'))
  ------------------
  |  Branch (255:14): [True: 15.3k, False: 0]
  ------------------
  256|  15.3k|            altsvc_add(asi, lineptr);
  257|  15.3k|        }
  258|  15.3k|      } while(!result && !eof);
  ------------------
  |  Branch (258:15): [True: 15.3k, False: 0]
  |  Branch (258:26): [True: 0, False: 15.3k]
  ------------------
  259|  15.3k|      curlx_dyn_free(&buf); /* free the line buffer */
  260|  15.3k|    }
  261|  15.3k|    curlx_fclose(fp);
  ------------------
  |  |   79|  15.3k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  262|  15.3k|  }
  263|  15.3k|  return result;
  264|  15.3k|}
altsvc.c:altsvc_add:
  163|  15.3k|{
  164|       |  /* Example line:
  165|       |     h2 example.com 443 h3 shiny.example.com 8443 "20191231 10:00:00" 1
  166|       |   */
  167|  15.3k|  struct Curl_str srchost;
  168|  15.3k|  struct Curl_str dsthost;
  169|  15.3k|  struct Curl_str srcalpn;
  170|  15.3k|  struct Curl_str dstalpn;
  171|  15.3k|  struct Curl_str date;
  172|  15.3k|  curl_off_t srcport;
  173|  15.3k|  curl_off_t dstport;
  174|  15.3k|  curl_off_t persist;
  175|  15.3k|  curl_off_t prio;
  176|       |
  177|  15.3k|  if(curlx_str_word(&line, &srcalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|  15.3k|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (177:6): [True: 0, False: 15.3k]
  ------------------
  178|  15.3k|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (178:6): [True: 15.3k, False: 0]
  ------------------
  179|      0|     curlx_str_word(&line, &srchost, MAX_ALTSVC_HOSTLEN) ||
  ------------------
  |  |   43|      0|#define MAX_ALTSVC_HOSTLEN 2048
  ------------------
  |  Branch (179:6): [True: 0, False: 0]
  ------------------
  180|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (180:6): [True: 0, False: 0]
  ------------------
  181|      0|     curlx_str_number(&line, &srcport, 65535) ||
  ------------------
  |  Branch (181:6): [True: 0, False: 0]
  ------------------
  182|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (182:6): [True: 0, False: 0]
  ------------------
  183|      0|     curlx_str_word(&line, &dstalpn, MAX_ALTSVC_ALPNLEN) ||
  ------------------
  |  |   44|      0|#define MAX_ALTSVC_ALPNLEN 10
  ------------------
  |  Branch (183:6): [True: 0, False: 0]
  ------------------
  184|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (184:6): [True: 0, False: 0]
  ------------------
  185|      0|     curlx_str_word(&line, &dsthost, MAX_ALTSVC_HOSTLEN) ||
  ------------------
  |  |   43|      0|#define MAX_ALTSVC_HOSTLEN 2048
  ------------------
  |  Branch (185:6): [True: 0, False: 0]
  ------------------
  186|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (186:6): [True: 0, False: 0]
  ------------------
  187|      0|     curlx_str_number(&line, &dstport, 65535) ||
  ------------------
  |  Branch (187:6): [True: 0, False: 0]
  ------------------
  188|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (188:6): [True: 0, False: 0]
  ------------------
  189|      0|     curlx_str_quotedword(&line, &date, MAX_ALTSVC_DATELEN) ||
  ------------------
  |  |   42|      0|#define MAX_ALTSVC_DATELEN 17
  ------------------
  |  Branch (189:6): [True: 0, False: 0]
  ------------------
  190|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (190:6): [True: 0, False: 0]
  ------------------
  191|      0|     curlx_str_number(&line, &persist, 1) ||
  ------------------
  |  Branch (191:6): [True: 0, False: 0]
  ------------------
  192|      0|     curlx_str_singlespace(&line) ||
  ------------------
  |  Branch (192:6): [True: 0, False: 0]
  ------------------
  193|      0|     curlx_str_number(&line, &prio, 0) ||
  ------------------
  |  Branch (193:6): [True: 0, False: 0]
  ------------------
  194|      0|     curlx_str_newline(&line))
  ------------------
  |  Branch (194:6): [True: 0, False: 0]
  ------------------
  195|  15.3k|    ;
  196|      0|  else {
  197|      0|    char dbuf[MAX_ALTSVC_DATELEN + 1];
  198|      0|    time_t expires = 0;
  199|      0|    time_t now = time(NULL);
  ------------------
  |  |   63|      0|#define time(x) altsvc_debugtime(x)
  ------------------
  200|       |
  201|       |    /* The date parser works on a null-terminated string. The maximum length
  202|       |       is upheld by curlx_str_quotedword(). */
  203|      0|    memcpy(dbuf, curlx_str(&date), curlx_strlen(&date));
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
                  memcpy(dbuf, curlx_str(&date), curlx_strlen(&date));
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  204|      0|    dbuf[curlx_strlen(&date)] = 0;
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  205|      0|    Curl_getdate_capped(dbuf, &expires);
  206|       |
  207|      0|    if(now < expires) {
  ------------------
  |  Branch (207:8): [True: 0, False: 0]
  ------------------
  208|      0|      struct altsvc *as = altsvc_create(&srchost, &dsthost, &srcalpn, &dstalpn,
  209|      0|                                        (size_t)srcport, (size_t)dstport);
  210|      0|      if(as) {
  ------------------
  |  Branch (210:10): [True: 0, False: 0]
  ------------------
  211|      0|        as->expires = expires;
  212|      0|        as->persist = persist ? 1 : 0;
  ------------------
  |  Branch (212:23): [True: 0, False: 0]
  ------------------
  213|      0|        altsvc_append(asi, as);
  214|      0|      }
  215|      0|      else
  216|      0|        return CURLE_OUT_OF_MEMORY;
  217|      0|    }
  218|      0|  }
  219|       |
  220|  15.3k|  return CURLE_OK;
  221|  15.3k|}

Curl_async_timeleft_ms:
   60|   363k|{
   61|   363k|  if(async->timeout_ms) {
  ------------------
  |  Branch (61:6): [True: 363k, False: 0]
  ------------------
   62|   363k|    timediff_t elapsed_ms =
   63|   363k|      curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
   64|   363k|    return async->timeout_ms - elapsed_ms;
   65|   363k|  }
   66|      0|  return Curl_timeleft_ms(data);
   67|   363k|}
Curl_async_shutdown:
  210|    775|{
  211|    775|  if(async) {
  ------------------
  |  Branch (211:6): [True: 775, False: 0]
  ------------------
  212|    775|    CURL_TRC_DNS(data, "[%u] shutdown async", async->id);
  ------------------
  |  |  168|    775|  do {                                 \
  |  |  169|    775|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    775|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    775|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 775, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 775]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    775|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    775|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    775|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 775]
  |  |  ------------------
  ------------------
  213|    775|    async->shutdown = TRUE;
  ------------------
  |  | 1055|    775|#define TRUE true
  ------------------
  214|       |#ifdef USE_RESOLV_ARES
  215|       |    Curl_async_ares_shutdown(data, async);
  216|       |#endif
  217|    775|#ifdef USE_RESOLV_THREADED
  218|    775|    Curl_async_thrdd_shutdown(data, async);
  219|    775|#endif
  220|    775|#ifndef CURL_DISABLE_DOH
  221|    775|    Curl_doh_cleanup(data, async);
  222|    775|#endif
  223|    775|  }
  224|    775|}
Curl_async_destroy:
  228|    859|{
  229|    859|  if(async) {
  ------------------
  |  Branch (229:6): [True: 859, False: 0]
  ------------------
  230|    859|    CURL_TRC_DNS(data, "[%u] destroy async", async->id);
  ------------------
  |  |  168|    859|  do {                                 \
  |  |  169|    859|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    859|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    859|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.71k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 859, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 859]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.71k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    859|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    859|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    859|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 859]
  |  |  ------------------
  ------------------
  231|    859|    async->shutdown = TRUE;
  ------------------
  |  | 1055|    859|#define TRUE true
  ------------------
  232|       |#ifdef USE_RESOLV_ARES
  233|       |    Curl_async_ares_destroy(data, async);
  234|       |#endif
  235|    859|#ifdef USE_RESOLV_THREADED
  236|    859|    Curl_async_thrdd_destroy(data, async);
  237|    859|#endif
  238|    859|#ifndef CURL_DISABLE_DOH
  239|    859|    Curl_doh_cleanup(data, async);
  240|    859|#endif
  241|       |    curlx_safefree(async);
  ------------------
  |  | 1327|    859|  do {                      \
  |  | 1328|    859|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    859|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    859|    (ptr) = NULL;           \
  |  | 1330|    859|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 859]
  |  |  ------------------
  ------------------
  242|    859|  }
  243|    859|}
Curl_async_failed:
  248|    741|{
  249|    741|  const char *host_or_proxy = "host";
  250|    741|  CURLcode result = CURLE_COULDNT_RESOLVE_HOST;
  251|       |
  252|    741|#ifndef CURL_DISABLE_PROXY
  253|    741|  if(async->for_proxy) {
  ------------------
  |  Branch (253:6): [True: 311, False: 430]
  ------------------
  254|    311|    host_or_proxy = "proxy";
  255|    311|    result = CURLE_COULDNT_RESOLVE_PROXY;
  256|    311|  }
  257|    741|#endif
  258|       |
  259|    741|  failf(data, "Could not resolve %s: %s%s%s%s",
  ------------------
  |  |   62|    741|#define failf Curl_failf
  ------------------
  260|    741|        host_or_proxy, async->hostname,
  261|    741|        detail ? " (" : "", detail ? detail : "", detail ? ")" : "");
  ------------------
  |  Branch (261:9): [True: 0, False: 741]
  |  Branch (261:29): [True: 0, False: 741]
  |  Branch (261:51): [True: 0, False: 741]
  ------------------
  262|    741|  return result;
  263|    741|}

Curl_async_global_init:
   81|      1|{
   82|       |#if defined(USE_ARES) && defined(CARES_HAVE_ARES_LIBRARY_INIT)
   83|       |  if(ares_library_init(ARES_LIB_INIT_ALL)) {
   84|       |    return CURLE_FAILED_INIT;
   85|       |  }
   86|       |#endif
   87|      1|  return CURLE_OK;
   88|      1|}
Curl_async_thrdd_shutdown:
  256|  1.12k|{
  257|  1.12k|  Curl_async_thrdd_destroy(data, async);
  258|  1.12k|}
Curl_async_thrdd_destroy:
  274|  1.98k|{
  275|  1.98k|  (void)data;
  276|  1.98k|  if(async->queries_ongoing && !async->done &&
  ------------------
  |  Branch (276:6): [True: 204, False: 1.78k]
  |  Branch (276:32): [True: 204, False: 0]
  ------------------
  277|    204|     data->multi && data->multi->resolv_thrdq) {
  ------------------
  |  Branch (277:6): [True: 102, False: 102]
  |  Branch (277:21): [True: 102, False: 0]
  ------------------
  278|       |    /* Remove any resolve items still queued */
  279|    102|    struct async_thrdd_match_ctx mctx;
  280|    102|    mctx.mid = data->mid;
  281|    102|    mctx.resolv_id = async->id;
  282|    102|    Curl_thrdq_clear(data->multi->resolv_thrdq,
  283|    102|                     async_thrdd_match_item, &mctx);
  284|    102|  }
  285|       |#ifdef USE_HTTPSRR_ARES
  286|       |  if(async->thrdd.rr.channel) {
  287|       |    ares_destroy(async->thrdd.rr.channel);
  288|       |    async->thrdd.rr.channel = NULL;
  289|       |  }
  290|       |  Curl_httpsrr_cleanup(&async->thrdd.rr.hinfo);
  291|       |#endif
  292|  1.98k|  async_thrdd_item_destroy(async->thrdd.res_A);
  293|  1.98k|  async->thrdd.res_A = NULL;
  294|  1.98k|  async_thrdd_item_destroy(async->thrdd.res_AAAA);
  295|       |  async->thrdd.res_AAAA = NULL;
  296|  1.98k|}
Curl_async_await:
  304|     97|{
  305|     97|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  306|     97|  struct async_thrdd_ctx *thrdd = async ? &async->thrdd : NULL;
  ------------------
  |  Branch (306:35): [True: 97, False: 0]
  ------------------
  307|     97|  timediff_t milli, ms;
  308|       |
  309|     97|  if(!thrdd)
  ------------------
  |  Branch (309:6): [True: 0, False: 97]
  ------------------
  310|      0|    return CURLE_FAILED_INIT;
  311|       |
  312|   925k|  while(async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (312:9): [True: 925k, False: 0]
  |  Branch (312:35): [True: 925k, False: 0]
  ------------------
  313|   925k|    Curl_async_thrdd_multi_process(data->multi);
  314|   925k|    if(async->done)
  ------------------
  |  Branch (314:8): [True: 97, False: 925k]
  ------------------
  315|     97|      break;
  316|       |
  317|   925k|    ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  318|   925k|    if(ms < 3)
  ------------------
  |  Branch (318:8): [True: 924k, False: 180]
  ------------------
  319|   924k|      milli = 0;
  320|    180|    else if(ms <= 50)
  ------------------
  |  Branch (320:13): [True: 175, False: 5]
  ------------------
  321|    175|      milli = ms / 3;
  322|      5|    else if(ms <= 250)
  ------------------
  |  Branch (322:13): [True: 5, False: 0]
  ------------------
  323|      5|      milli = 50;
  324|      0|    else
  325|      0|      milli = 200;
  326|   925k|    CURL_TRC_DNS(data, "await, waiting %" FMT_TIMEDIFF_T "ms", milli);
  ------------------
  |  |  168|   925k|  do {                                 \
  |  |  169|   925k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|   925k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   925k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.85M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 925k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 925k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.85M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   925k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|   925k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|   925k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 925k]
  |  |  ------------------
  ------------------
  327|   925k|    curlx_wait_ms(milli);
  328|   925k|  }
  329|     97|  return Curl_async_take_result(data, async, pdns);
  330|     97|}
Curl_async_thrdd_multi_init:
  439|  15.3k|{
  440|  15.3k|  CURLcode result;
  441|  15.3k|  DEBUGASSERT(!multi->resolv_thrdq);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (441:3): [True: 0, False: 15.3k]
  |  Branch (441:3): [True: 15.3k, False: 0]
  ------------------
  442|  15.3k|  result = Curl_thrdq_create(&multi->resolv_thrdq, "DNS", 0,
  443|  15.3k|                             min_threads, max_threads, idle_time_ms,
  444|  15.3k|                             async_thrdd_item_free,
  445|  15.3k|                             async_thrdd_item_process,
  446|  15.3k|                             async_thrdd_event,
  447|  15.3k|                             multi);
  448|  15.3k|#ifdef DEBUGBUILD
  449|  15.3k|  if(!result) {
  ------------------
  |  Branch (449:6): [True: 15.3k, False: 0]
  ------------------
  450|  15.3k|    const char *p = getenv("CURL_DBG_RESOLV_MAX_THREADS");
  451|  15.3k|    if(p) {
  ------------------
  |  Branch (451:8): [True: 0, False: 15.3k]
  ------------------
  452|      0|      curl_off_t l;
  453|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (453:10): [True: 0, False: 0]
  ------------------
  454|      0|        result = Curl_async_thrdd_multi_set_props(
  455|      0|          multi, min_threads, (uint32_t)l, idle_time_ms);
  456|      0|      }
  457|      0|    }
  458|  15.3k|  }
  459|  15.3k|#endif
  460|  15.3k|  return result;
  461|  15.3k|}
Curl_async_thrdd_multi_destroy:
  465|  15.3k|{
  466|  15.3k|  if(multi->resolv_thrdq) {
  ------------------
  |  Branch (466:6): [True: 15.3k, False: 0]
  ------------------
  467|  15.3k|#ifdef CURLVERBOSE
  468|  15.3k|    CURL_TRC_DNS(multi->admin, "destroy thread queue+pool, join=%d", join);
  ------------------
  |  |  168|  15.3k|  do {                                 \
  |  |  169|  15.3k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  15.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  15.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  30.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  30.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  15.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  15.3k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  469|  15.3k|    Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  470|  15.3k|#endif
  471|  15.3k|    Curl_thrdq_destroy(multi->resolv_thrdq, join);
  472|       |    multi->resolv_thrdq = NULL;
  473|  15.3k|  }
  474|  15.3k|}
Curl_async_thrdd_multi_process:
  516|  1.62M|{
  517|  1.62M|  struct Curl_easy *data;
  518|  1.62M|  void *qitem;
  519|       |
  520|  1.62M|  while(!Curl_thrdq_recv(multi->resolv_thrdq, &qitem)) {
  ------------------
  |  Branch (520:9): [True: 621, False: 1.62M]
  ------------------
  521|       |    /* dispatch resolve result */
  522|    621|    struct async_thrdd_item *item = qitem;
  523|    621|    struct Curl_resolv_async *async = NULL;
  524|       |
  525|    621|    data = Curl_multi_get_easy(multi, item->mid);
  526|    621|    if(data)
  ------------------
  |  Branch (526:8): [True: 621, False: 0]
  ------------------
  527|    621|      async = Curl_async_get(data, item->resolv_id);
  528|    621|    if(async) {
  ------------------
  |  Branch (528:8): [True: 621, False: 0]
  ------------------
  529|    621|      struct async_thrdd_item **pdest = &async->thrdd.res_A;
  530|       |
  531|    621|      async->dns_responses |= item->dns_queries;
  532|    621|      --async->queries_ongoing;
  533|    621|      async->done = !async->queries_ongoing;
  534|       |
  535|    621|#ifdef CURLRES_IPV6
  536|    621|      if(item->dns_queries & CURL_DNSQ_AAAA)
  ------------------
  |  |   52|    621|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (536:10): [True: 257, False: 364]
  ------------------
  537|    257|        pdest = &async->thrdd.res_AAAA;
  538|    621|#endif
  539|    621|      if(!*pdest) {
  ------------------
  |  Branch (539:10): [True: 621, False: 0]
  ------------------
  540|    621|        VERBOSE(async_thrdd_report_item(data, item));
  ------------------
  |  | 1618|    621|#define VERBOSE(x) x
  ------------------
  541|    621|        *pdest = item;
  542|    621|        item = NULL;
  543|    621|      }
  544|      0|      else
  545|    621|        DEBUGASSERT(0); /* should not receive duplicates here */
  ------------------
  |  | 1081|    621|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (545:9): [Folded, False: 0]
  |  Branch (545:9): [Folded, False: 0]
  ------------------
  546|    621|      Curl_multi_mark_dirty(data);
  547|    621|    }
  548|    621|    async_thrdd_item_free(item);
  549|    621|  }
  550|  1.62M|#ifdef CURLVERBOSE
  551|  1.62M|  Curl_thrdq_trace(multi->resolv_thrdq, multi->admin);
  552|  1.62M|#endif
  553|  1.62M|}
Curl_async_getaddrinfo:
  594|    456|{
  595|    456|  CURLcode result = CURLE_FAILED_INIT;
  596|    456|  void *resolver = NULL;
  597|       |
  598|    456|  if(async->queries_ongoing || async->done)
  ------------------
  |  Branch (598:6): [True: 0, False: 456]
  |  Branch (598:32): [True: 0, False: 456]
  ------------------
  599|      0|    return CURLE_FAILED_INIT;
  600|       |
  601|       |#ifdef USE_HTTPSRR_ARES
  602|       |  DEBUGASSERT(!async->thrdd.rr.channel);
  603|       |  if((async->dns_queries & CURL_DNSQ_HTTPS) && !async->is_ipaddr) {
  604|       |    result = async_rr_start(data, async);
  605|       |    if(result)
  606|       |      goto out;
  607|       |    resolver = async->thrdd.rr.channel;
  608|       |  }
  609|       |#endif
  610|       |
  611|    456|  result = Curl_resolv_announce_start(data, resolver);
  612|    456|  if(result)
  ------------------
  |  Branch (612:6): [True: 0, False: 456]
  ------------------
  613|      0|    return result;
  614|       |
  615|    456|#ifdef CURLRES_IPV6
  616|       |  /* Do not start an AAAA query for an ipv4 address when
  617|       |   * we will start an A query for it. */
  618|    456|  if((async->dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|    456|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (618:6): [True: 348, False: 108]
  ------------------
  619|    348|     !(async->is_ipv4addr && (async->dns_queries & CURL_DNSQ_A))) {
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (619:8): [True: 0, False: 348]
  |  Branch (619:30): [True: 0, False: 0]
  ------------------
  620|    348|    result = async_thrdd_query(data, async, CURL_DNSQ_AAAA);
  ------------------
  |  |   52|    348|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  621|    348|    if(result)
  ------------------
  |  Branch (621:8): [True: 0, False: 348]
  ------------------
  622|      0|      goto out;
  623|    348|  }
  624|    456|#endif
  625|    456|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    456|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (625:6): [True: 442, False: 14]
  ------------------
  626|    442|    result = async_thrdd_query(data, async, CURL_DNSQ_A);
  ------------------
  |  |   51|    442|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  627|    442|    if(result)
  ------------------
  |  Branch (627:8): [True: 0, False: 442]
  ------------------
  628|      0|      goto out;
  629|    442|  }
  630|       |
  631|    456|#ifdef CURLVERBOSE
  632|    456|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  633|    456|#endif
  634|       |
  635|    456|out:
  636|    456|  if(result)
  ------------------
  |  Branch (636:6): [True: 0, False: 456]
  ------------------
  637|      0|    CURL_TRC_DNS(data, "error queueing query %s:%d -> %d",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  638|    456|                 async->hostname, async->port, result);
  639|    456|  return result;
  640|    456|}
Curl_async_pollset:
  645|   363k|{
  646|   363k|  timediff_t timeout_ms;
  647|       |
  648|   363k|  timeout_ms = Curl_async_timeleft_ms(data, async);
  649|       |#ifdef USE_HTTPSRR_ARES
  650|       |  if(async->thrdd.rr.channel) {
  651|       |    CURLcode result = Curl_ares_pollset(data, async->thrdd.rr.channel, ps);
  652|       |    if(result)
  653|       |      return result;
  654|       |    timeout_ms = Curl_ares_timeout_ms(data, async, async->thrdd.rr.channel);
  655|       |  }
  656|       |#else
  657|   363k|  (void)ps;
  658|   363k|#endif
  659|       |
  660|   363k|  if(!async->done) {
  ------------------
  |  Branch (660:6): [True: 357k, False: 5.65k]
  ------------------
  661|       |#ifndef ENABLE_WAKEUP
  662|       |    timediff_t stutter_ms, elapsed_ms;
  663|       |    elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  664|       |    if(elapsed_ms < 3)
  665|       |      stutter_ms = 1;
  666|       |    else if(elapsed_ms <= 50)
  667|       |      stutter_ms = elapsed_ms / 3;
  668|       |    else if(elapsed_ms <= 250)
  669|       |      stutter_ms = 50;
  670|       |    else
  671|       |      stutter_ms = 200;
  672|       |    timeout_ms = CURLMIN(stutter_ms, timeout_ms);
  673|       |#endif
  674|   357k|    Curl_expire(data, timeout_ms, EXPIRE_ASYNC_NAME);
  675|   357k|  }
  676|   363k|  return CURLE_OK;
  677|   363k|}
Curl_async_take_result:
  687|   357k|{
  688|   357k|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  689|   357k|  struct Curl_dns_entry *dns = NULL;
  690|   357k|  CURLcode result = CURLE_OK;
  691|       |
  692|   357k|  DEBUGASSERT(pdns);
  ------------------
  |  | 1081|   357k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (692:3): [True: 0, False: 357k]
  |  Branch (692:3): [True: 357k, False: 0]
  ------------------
  693|   357k|  *pdns = NULL;
  694|   357k|  if(!async->queries_ongoing && !async->done) {
  ------------------
  |  Branch (694:6): [True: 354, False: 357k]
  |  Branch (694:33): [True: 0, False: 354]
  ------------------
  695|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (695:5): [Folded, False: 0]
  |  Branch (695:5): [Folded, False: 0]
  ------------------
  696|      0|    return CURLE_FAILED_INIT;
  697|      0|  }
  698|       |
  699|       |#ifdef USE_HTTPSRR_ARES
  700|       |  /* best effort, ignore errors */
  701|       |  if(thrdd->rr.channel)
  702|       |    (void)Curl_ares_perform(thrdd->rr.channel, 0);
  703|       |#endif
  704|       |#ifndef ENABLE_WAKEUP
  705|       |  Curl_async_thrdd_multi_process(data->multi);
  706|       |#endif
  707|       |
  708|   357k|  if(!async->done)
  ------------------
  |  Branch (708:6): [True: 357k, False: 354]
  ------------------
  709|   357k|    return CURLE_AGAIN;
  710|       |
  711|    354|  Curl_expire_done(data, EXPIRE_ASYNC_NAME);
  712|    354|  if(async->result) {
  ------------------
  |  Branch (712:6): [True: 0, False: 354]
  ------------------
  713|      0|    result = async->result;
  714|      0|    goto out;
  715|      0|  }
  716|       |
  717|    354|  if((thrdd->res_A && thrdd->res_A->res) ||
  ------------------
  |  Branch (717:7): [True: 340, False: 14]
  |  Branch (717:23): [True: 72, False: 268]
  ------------------
  718|    282|     (thrdd->res_AAAA && thrdd->res_AAAA->res)) {
  ------------------
  |  Branch (718:7): [True: 187, False: 95]
  |  Branch (718:26): [True: 1, False: 186]
  ------------------
  719|     73|    dns = Curl_dnscache_mk_entry2(
  720|     73|      data, async->dns_queries,
  721|     73|      thrdd->res_A ? &thrdd->res_A->res : NULL,
  ------------------
  |  Branch (721:7): [True: 72, False: 1]
  ------------------
  722|     73|      thrdd->res_AAAA ? &thrdd->res_AAAA->res : NULL,
  ------------------
  |  Branch (722:7): [True: 62, False: 11]
  ------------------
  723|     73|      async->hostname, async->port);
  724|     73|    if(!dns) {
  ------------------
  |  Branch (724:8): [True: 0, False: 73]
  ------------------
  725|      0|      result = CURLE_OUT_OF_MEMORY;
  726|      0|      goto out;
  727|      0|    }
  728|       |
  729|       |#ifdef USE_HTTPSRR_ARES
  730|       |    if(thrdd->rr.channel) {
  731|       |      struct Curl_https_rrinfo *lhrr = NULL;
  732|       |      if(thrdd->rr.hinfo.complete) {
  733|       |        lhrr = Curl_httpsrr_dup_move(&thrdd->rr.hinfo);
  734|       |        if(!lhrr) {
  735|       |          result = CURLE_OUT_OF_MEMORY;
  736|       |          goto out;
  737|       |        }
  738|       |      }
  739|       |      Curl_httpsrr_trace(data, lhrr);
  740|       |      Curl_dns_entry_set_https_rr(dns, lhrr);
  741|       |    }
  742|       |#endif
  743|     73|  }
  744|       |
  745|    354|  if(dns) {
  ------------------
  |  Branch (745:6): [True: 73, False: 281]
  ------------------
  746|     73|    *pdns = dns;
  747|     73|    dns = NULL;
  748|     73|  }
  749|    354|#ifdef CURLVERBOSE
  750|    354|  Curl_thrdq_trace(data->multi->resolv_thrdq, data);
  751|    354|#endif
  752|       |
  753|    354|out:
  754|    354|  Curl_dns_entry_unlink(data, &dns);
  755|    354|  Curl_async_thrdd_shutdown(data, async);
  756|    354|  if(!result && !*pdns)
  ------------------
  |  Branch (756:6): [True: 354, False: 0]
  |  Branch (756:17): [True: 281, False: 73]
  ------------------
  757|    281|    result = Curl_async_failed(data, async, NULL);
  758|    354|  if(result &&
  ------------------
  |  Branch (758:6): [True: 281, False: 73]
  ------------------
  759|    281|     (result != CURLE_COULDNT_RESOLVE_HOST) &&
  ------------------
  |  Branch (759:6): [True: 30, False: 251]
  ------------------
  760|     30|     (result != CURLE_COULDNT_RESOLVE_PROXY)) {
  ------------------
  |  Branch (760:6): [True: 0, False: 30]
  ------------------
  761|      0|    CURL_TRC_DNS(data, "Error %d resolving %s:%d",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|      0|                 result, async->hostname, async->port);
  763|      0|  }
  764|    354|  return result;
  765|    354|}
Curl_async_get_ai:
  786|   555k|{
  787|   555k|  struct async_thrdd_ctx *thrdd = &async->thrdd;
  788|       |
  789|   555k|  (void)data;
  790|   555k|  switch(ai_family) {
  791|   277k|  case AF_INET:
  ------------------
  |  Branch (791:3): [True: 277k, False: 277k]
  ------------------
  792|   277k|    if(thrdd->res_A)
  ------------------
  |  Branch (792:8): [True: 41.8k, False: 236k]
  ------------------
  793|  41.8k|      return async_thrdd_get_ai(thrdd->res_A->res, ai_family, index);
  794|   236k|    break;
  795|   277k|  case AF_INET6:
  ------------------
  |  Branch (795:3): [True: 277k, False: 277k]
  ------------------
  796|   277k|    if(thrdd->res_AAAA)
  ------------------
  |  Branch (796:8): [True: 235k, False: 42.6k]
  ------------------
  797|   235k|      return async_thrdd_get_ai(thrdd->res_AAAA->res, ai_family, index);
  798|  42.6k|    break;
  799|  42.6k|  default:
  ------------------
  |  Branch (799:3): [True: 0, False: 555k]
  ------------------
  800|      0|    break;
  801|   555k|  }
  802|   278k|  return NULL;
  803|   555k|}
asyn-thrdd.c:async_thrdd_item_destroy:
  129|  4.76k|{
  130|  4.76k|  if(item) {
  ------------------
  |  Branch (130:6): [True: 790, False: 3.97k]
  ------------------
  131|    790|    if(item->res)
  ------------------
  |  Branch (131:8): [True: 0, False: 790]
  ------------------
  132|      0|      Curl_freeaddrinfo(item->res);
  133|    790|    curlx_free(item);
  ------------------
  |  | 1483|    790|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  134|    790|  }
  135|  4.76k|}
asyn-thrdd.c:async_thrdd_item_free:
  430|    790|{
  431|    790|  async_thrdd_item_destroy(item);
  432|    790|}
asyn-thrdd.c:async_thrdd_item_process:
  336|    790|{
  337|    790|  struct async_thrdd_item *item = arg;
  338|    790|  struct addrinfo hints;
  339|    790|  char service[12];
  340|    790|  int pf = PF_INET;
  341|    790|  int rc;
  342|       |
  343|    790|#ifdef DEBUGBUILD
  344|    790|  if(item->delay_ms) {
  ------------------
  |  Branch (344:6): [True: 0, False: 790]
  ------------------
  345|      0|    curlx_wait_ms(item->delay_ms);
  346|      0|  }
  347|    790|  if(item->delay_fail_ms) {
  ------------------
  |  Branch (347:6): [True: 0, False: 790]
  ------------------
  348|      0|    curlx_wait_ms(item->delay_fail_ms);
  349|      0|    return;
  350|      0|  }
  351|    790|#endif
  352|       |
  353|    790|  memset(&hints, 0, sizeof(hints));
  354|    790|#ifdef CURLRES_IPV6
  355|    790|  if(item->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    790|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (355:6): [True: 348, False: 442]
  ------------------
  356|    348|    pf = (item->dns_queries & CURL_DNSQ_A) ? PF_UNSPEC : PF_INET6;
  ------------------
  |  |   51|    348|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (356:10): [True: 0, False: 348]
  ------------------
  357|    348|  }
  358|    790|#endif
  359|    790|  hints.ai_family = pf;
  360|    790|  hints.ai_socktype = Curl_socktype_for_transport(item->transport);
  361|    790|  hints.ai_protocol = Curl_protocol_for_transport(item->transport);
  362|       |#ifdef __APPLE__
  363|       |  /* If we leave `ai_flags == 0` then macOS is looking for IPV4MAPPED
  364|       |   * when doing AAAA queries. We do not want this "help". */
  365|       |  hints.ai_flags = AI_ADDRCONFIG;
  366|       |#endif
  367|       |
  368|    790|  curl_msnprintf(service, sizeof(service), "%u", item->port);
  369|    790|#ifdef AI_NUMERICSERV
  370|    790|  hints.ai_flags |= AI_NUMERICSERV;
  371|    790|#endif
  372|       |
  373|    790|  rc = Curl_getaddrinfo_ex(item->hostname, service, &hints, &item->res);
  374|    790|  if(rc) {
  ------------------
  |  Branch (374:6): [True: 717, False: 73]
  ------------------
  375|    717|    item->sock_error = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1095|    717|#define SOCKERRNO         errno
  ------------------
                  item->sock_error = SOCKERRNO ? SOCKERRNO : rc;
  ------------------
  |  | 1095|    717|#define SOCKERRNO         errno
  ------------------
  |  Branch (375:24): [True: 12, False: 705]
  ------------------
  376|    717|    if(item->sock_error == 0)
  ------------------
  |  Branch (376:8): [True: 0, False: 717]
  ------------------
  377|      0|      item->sock_error = RESOLVER_ENOMEM;
  ------------------
  |  |   46|      0|#define RESOLVER_ENOMEM  EAI_MEMORY  /* = WSA_NOT_ENOUGH_MEMORY on Windows */
  ------------------
  378|    717|  }
  379|     73|  else {
  380|     73|    Curl_addrinfo_set_port(item->res, item->port);
  381|     73|  }
  382|    790|}
asyn-thrdd.c:async_thrdd_event:
  414|    621|{
  415|    621|  struct Curl_multi *multi = user_data;
  416|    621|  (void)tqueue;
  417|    621|  switch(ev) {
  418|    621|  case CURL_THRDQ_EV_ITEM_DONE:
  ------------------
  |  Branch (418:3): [True: 621, False: 0]
  ------------------
  419|    621|    (void)curl_multi_wakeup(multi);
  420|    621|    break;
  421|      0|  default:
  ------------------
  |  Branch (421:3): [True: 0, False: 621]
  ------------------
  422|      0|    break;
  423|    621|  }
  424|    621|}
asyn-thrdd.c:async_thrdd_report_item:
  479|    621|{
  480|    621|  char buf[MAX_IPADR_LEN];
  481|    621|  struct dynbuf tmp;
  482|    621|  const char *sep = "";
  483|    621|  const struct Curl_addrinfo *ai = item->res;
  484|    621|  int ai_family = (item->dns_queries & CURL_DNSQ_AAAA) ? AF_INET6 : AF_INET;
  ------------------
  |  |   52|    621|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (484:19): [True: 257, False: 364]
  ------------------
  485|    621|  CURLcode result;
  486|       |
  487|    621|  if(!CURL_TRC_DNS_is_verbose(data))
  ------------------
  |  |  137|    621|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  ------------------
  |  |  |  |  326|    621|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.24k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 621, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 621]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.24k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    621|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  488|    621|    return;
  489|       |
  490|      0|  curlx_dyn_init(&tmp, 1024);
  491|      0|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  ------------------
  492|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (492:8): [True: 0, False: 0]
  ------------------
  493|      0|      Curl_printable_address(ai, buf, sizeof(buf));
  494|      0|      result = curlx_dyn_addf(&tmp, "%s%s", sep, buf);
  495|      0|      if(result) {
  ------------------
  |  Branch (495:10): [True: 0, False: 0]
  ------------------
  496|      0|        CURL_TRC_DNS(data, "too many IP, cannot show");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  497|      0|        goto out;
  498|      0|      }
  499|      0|      sep = ", ";
  500|      0|    }
  501|      0|  }
  502|       |
  503|      0|  CURL_TRC_DNS(data, "Host %s:%u resolved IPv%c: %s",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (170:26): [True: 0, False: 0]
  |  |  |  Branch (170:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  504|      0|               item->hostname, item->port,
  505|      0|               (item->dns_queries & CURL_DNSQ_AAAA) ? '6' : '4',
  506|      0|               (curlx_dyn_len(&tmp) ? curlx_dyn_ptr(&tmp) : "(none)"));
  507|      0|out:
  508|      0|  curlx_dyn_free(&tmp);
  509|      0|}
asyn-thrdd.c:async_thrdd_query:
  567|    790|{
  568|    790|  struct async_thrdd_item *item;
  569|    790|  CURLcode result;
  570|       |
  571|    790|  item = async_thrdd_item_create(data, async->id, dns_queries,
  572|    790|                                 async->hostname, async->port,
  573|    790|                                 async->transport);
  574|    790|  if(!item) {
  ------------------
  |  Branch (574:6): [True: 0, False: 790]
  ------------------
  575|      0|    result = CURLE_OUT_OF_MEMORY;
  576|      0|    goto out;
  577|      0|  }
  578|    790|  CURL_TRC_DNS(data, "queueing query %s", item->description);
  ------------------
  |  |  168|    790|  do {                                 \
  |  |  169|    790|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    790|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    790|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.58k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 790, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 790]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.58k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    790|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    790|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    790|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 790]
  |  |  ------------------
  ------------------
  579|    790|  result = Curl_thrdq_send(data->multi->resolv_thrdq, item,
  580|    790|                           async_item_description(item), async->timeout_ms);
  ------------------
  |  |  104|    790|#define async_item_description(x)   (x)->description
  ------------------
  581|    790|  if(result)
  ------------------
  |  Branch (581:6): [True: 0, False: 790]
  ------------------
  582|      0|    goto out;
  583|    790|  item = NULL;
  584|    790|  async->queries_ongoing++;
  585|       |
  586|    790|out:
  587|    790|  if(item)
  ------------------
  |  Branch (587:6): [True: 0, False: 790]
  ------------------
  588|      0|    async_thrdd_item_free(item);
  589|    790|  return result;
  590|    790|}
asyn-thrdd.c:async_thrdd_item_create:
  143|    790|{
  144|    790|  size_t hostlen = strlen(hostname);
  145|    790|  struct async_thrdd_item *item;
  146|       |
  147|    790|  item = curlx_calloc(1, sizeof(*item) + hostlen);
  ------------------
  |  | 1480|    790|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  148|    790|  if(!item)
  ------------------
  |  Branch (148:6): [True: 0, False: 790]
  ------------------
  149|      0|    return NULL;
  150|       |
  151|    790|  if(hostlen) /* NUL byte of name already in struct size */
  ------------------
  |  Branch (151:6): [True: 790, False: 0]
  ------------------
  152|    790|    memcpy(item->hostname, hostname, hostlen);
  153|    790|  item->mid = data->mid;
  154|    790|  item->resolv_id = resolv_id;
  155|    790|  item->dns_queries = dns_queries;
  156|    790|  item->port = port;
  157|    790|  item->transport = transport;
  158|       |
  159|    790|#ifdef CURLVERBOSE
  160|    790|  curl_msnprintf(item->description, sizeof(item->description),
  161|    790|                 "[%" FMT_OFF_T "/%u] %s %s:%u",
  162|    790|                 data->id, item->resolv_id,
  163|    790|                 Curl_resolv_query_str(dns_queries),
  164|    790|                 item->hostname, item->port);
  165|    790|#endif
  166|       |
  167|    790|#ifdef DEBUGBUILD
  168|    790|  {
  169|    790|    const char *p = getenv("CURL_DBG_RESOLV_DELAY");
  170|    790|    if(p) {
  ------------------
  |  Branch (170:8): [True: 0, False: 790]
  ------------------
  171|      0|      curl_off_t l;
  172|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (172:10): [True: 0, False: 0]
  ------------------
  173|      0|        item->delay_ms = (uint32_t)l;
  174|      0|      }
  175|      0|    }
  176|    790|    p = getenv("CURL_DBG_RESOLV_FAIL_DELAY");
  177|    790|    if(p) {
  ------------------
  |  Branch (177:8): [True: 0, False: 790]
  ------------------
  178|      0|      curl_off_t l;
  179|      0|      if(!curlx_str_number(&p, &l, UINT32_MAX)) {
  ------------------
  |  Branch (179:10): [True: 0, False: 0]
  ------------------
  180|      0|        unsigned char c = 0;
  181|      0|        Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  182|      0|        item->delay_fail_ms = (uint32_t)l + c;
  183|      0|      }
  184|      0|    }
  185|    790|  }
  186|    790|#endif
  187|       |
  188|    790|  return item;
  189|    790|}
asyn-thrdd.c:async_thrdd_get_ai:
  770|   277k|{
  771|   277k|  unsigned int i = 0;
  772|   277k|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (772:14): [True: 0, False: 277k]
  ------------------
  773|      0|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (773:8): [True: 0, False: 0]
  ------------------
  774|      0|      if(i == index)
  ------------------
  |  Branch (774:10): [True: 0, False: 0]
  ------------------
  775|      0|        return ai;
  776|      0|      ++i;
  777|      0|    }
  778|      0|  }
  779|   277k|  return NULL;
  780|   277k|}

Curl_bufq_init2:
  220|  13.3k|{
  221|       |  bufq_init(q, NULL, chunk_size, max_chunks, opts);
  222|  13.3k|}
Curl_bufq_free:
  236|  13.3k|{
  237|  13.3k|  chunk_list_free(&q->head);
  238|  13.3k|  chunk_list_free(&q->spare);
  239|       |  q->tail = NULL;
  240|  13.3k|  q->chunk_count = 0;
  241|  13.3k|}
Curl_bufq_reset:
  244|  32.1k|{
  245|  32.1k|  struct buf_chunk *chunk;
  246|  32.2k|  while(q->head) {
  ------------------
  |  Branch (246:9): [True: 89, False: 32.1k]
  ------------------
  247|     89|    chunk = q->head;
  248|     89|    q->head = chunk->next;
  249|     89|    chunk->next = q->spare;
  250|     89|    q->spare = chunk;
  251|     89|  }
  252|       |  q->tail = NULL;
  253|  32.1k|}
Curl_bufq_len:
  256|  1.61k|{
  257|  1.61k|  const struct buf_chunk *chunk = q->head;
  258|  1.61k|  size_t len = 0;
  259|  2.98k|  while(chunk) {
  ------------------
  |  Branch (259:9): [True: 1.36k, False: 1.61k]
  ------------------
  260|  1.36k|    len += chunk_len(chunk);
  261|  1.36k|    chunk = chunk->next;
  262|  1.36k|  }
  263|  1.61k|  return len;
  264|  1.61k|}
Curl_bufq_is_empty:
  267|   457k|{
  268|   457k|  return !q->head || chunk_is_empty(q->head);
  ------------------
  |  Branch (268:10): [True: 453k, False: 3.18k]
  |  Branch (268:22): [True: 380, False: 2.80k]
  ------------------
  269|   457k|}
Curl_bufq_is_full:
  272|  1.37k|{
  273|  1.37k|  if(!q->tail || q->spare)
  ------------------
  |  Branch (273:6): [True: 176, False: 1.19k]
  |  Branch (273:18): [True: 0, False: 1.19k]
  ------------------
  274|    176|    return FALSE;
  ------------------
  |  | 1058|    176|#define FALSE false
  ------------------
  275|  1.19k|  if(q->chunk_count < q->max_chunks)
  ------------------
  |  Branch (275:6): [True: 0, False: 1.19k]
  ------------------
  276|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  277|  1.19k|  if(q->chunk_count > q->max_chunks)
  ------------------
  |  Branch (277:6): [True: 165, False: 1.03k]
  ------------------
  278|    165|    return TRUE;
  ------------------
  |  | 1055|    165|#define TRUE true
  ------------------
  279|       |  /* we have no spares and cannot make more, is the tail full? */
  280|  1.03k|  return chunk_is_full(q->tail);
  281|  1.19k|}
Curl_bufq_write:
  370|  1.29M|{
  371|  1.29M|  struct buf_chunk *tail;
  372|  1.29M|  size_t n;
  373|       |
  374|  1.29M|  DEBUGASSERT(q->max_chunks > 0);
  ------------------
  |  | 1081|  1.29M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (374:3): [True: 0, False: 1.29M]
  |  Branch (374:3): [True: 1.29M, False: 0]
  ------------------
  375|  1.29M|  *pnwritten = 0;
  376|  1.95M|  while(len) {
  ------------------
  |  Branch (376:9): [True: 658k, False: 1.29M]
  ------------------
  377|   658k|    tail = get_non_full_tail(q);
  378|   658k|    if(!tail) {
  ------------------
  |  Branch (378:8): [True: 0, False: 658k]
  ------------------
  379|      0|      if((q->chunk_count < q->max_chunks) || (q->opts & BUFQ_OPT_SOFT_LIMIT))
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  |  Branch (379:10): [True: 0, False: 0]
  |  Branch (379:46): [True: 0, False: 0]
  ------------------
  380|       |        /* should have gotten a tail, but did not */
  381|      0|        return CURLE_OUT_OF_MEMORY;
  382|      0|      break;
  383|      0|    }
  384|   658k|    n = chunk_append(tail, buf, len);
  385|   658k|    if(!n)
  ------------------
  |  Branch (385:8): [True: 0, False: 658k]
  ------------------
  386|      0|      break;
  387|   658k|    *pnwritten += n;
  388|   658k|    buf += n;
  389|   658k|    len -= n;
  390|   658k|  }
  391|  1.29M|  return (!*pnwritten && len) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (391:11): [True: 641k, False: 658k]
  |  Branch (391:26): [True: 0, False: 641k]
  ------------------
  392|  1.29M|}
Curl_bufq_cwrite:
  397|  1.29M|{
  398|  1.29M|  return Curl_bufq_write(q, (const uint8_t *)buf, len, pnwritten);
  399|  1.29M|}
Curl_bufq_read:
  403|    216|{
  404|    216|  *pnread = 0;
  405|    501|  while(len && q->head) {
  ------------------
  |  Branch (405:9): [True: 479, False: 22]
  |  Branch (405:16): [True: 285, False: 194]
  ------------------
  406|    285|    size_t n = chunk_read(q->head, buf, len);
  407|    285|    if(n) {
  ------------------
  |  Branch (407:8): [True: 285, False: 0]
  ------------------
  408|    285|      *pnread += n;
  409|    285|      buf += n;
  410|    285|      len -= n;
  411|    285|    }
  412|    285|    prune_head(q);
  413|    285|  }
  414|    216|  return (!*pnread) ? CURLE_AGAIN : CURLE_OK;
  ------------------
  |  Branch (414:10): [True: 0, False: 216]
  ------------------
  415|    216|}
Curl_bufq_cread:
  419|    216|{
  420|    216|  return Curl_bufq_read(q, (uint8_t *)buf, len, pnread);
  421|    216|}
Curl_bufq_peek:
  425|  3.06k|{
  426|  3.06k|  if(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (426:6): [True: 1.67k, False: 1.38k]
  |  Branch (426:17): [True: 0, False: 1.67k]
  ------------------
  427|      0|    prune_head(q);
  428|      0|  }
  429|  3.06k|  if(q->head && !chunk_is_empty(q->head)) {
  ------------------
  |  Branch (429:6): [True: 1.67k, False: 1.38k]
  |  Branch (429:17): [True: 1.67k, False: 0]
  ------------------
  430|  1.67k|    chunk_peek(q->head, pbuf, plen);
  431|  1.67k|    return TRUE;
  ------------------
  |  | 1055|  1.67k|#define TRUE true
  ------------------
  432|  1.67k|  }
  433|  1.38k|  *pbuf = NULL;
  434|  1.38k|  *plen = 0;
  435|       |  return FALSE;
  ------------------
  |  | 1058|  1.38k|#define FALSE false
  ------------------
  436|  3.06k|}
Curl_bufq_skip:
  462|  1.65k|{
  463|  1.65k|  size_t n;
  464|       |
  465|  3.26k|  while(amount && q->head) {
  ------------------
  |  Branch (465:9): [True: 1.60k, False: 1.65k]
  |  Branch (465:19): [True: 1.60k, False: 0]
  ------------------
  466|  1.60k|    n = chunk_skip(q->head, amount);
  467|  1.60k|    amount -= n;
  468|  1.60k|    prune_head(q);
  469|  1.60k|  }
  470|  1.65k|}
Curl_bufq_pass:
  474|    126|{
  475|    126|  const uint8_t *buf;
  476|    126|  size_t blen;
  477|    126|  CURLcode result = CURLE_OK;
  478|       |
  479|    126|  *pwritten = 0;
  480|    252|  while(Curl_bufq_peek(q, &buf, &blen)) {
  ------------------
  |  Branch (480:9): [True: 126, False: 126]
  ------------------
  481|    126|    size_t chunk_written;
  482|       |
  483|    126|    result = writer(writer_ctx, buf, blen, &chunk_written);
  484|    126|    if(result) {
  ------------------
  |  Branch (484:8): [True: 0, False: 126]
  ------------------
  485|      0|      if((result == CURLE_AGAIN) && *pwritten) {
  ------------------
  |  Branch (485:10): [True: 0, False: 0]
  |  Branch (485:37): [True: 0, False: 0]
  ------------------
  486|       |        /* blocked on subsequent write, report success */
  487|      0|        result = CURLE_OK;
  488|      0|      }
  489|      0|      break;
  490|      0|    }
  491|    126|    if(!chunk_written) {
  ------------------
  |  Branch (491:8): [True: 0, False: 126]
  ------------------
  492|      0|      if(!*pwritten) {
  ------------------
  |  Branch (492:10): [True: 0, False: 0]
  ------------------
  493|       |        /* treat as blocked */
  494|      0|        result = CURLE_AGAIN;
  495|      0|      }
  496|      0|      break;
  497|      0|    }
  498|    126|    *pwritten += chunk_written;
  499|    126|    Curl_bufq_skip(q, chunk_written);
  500|    126|  }
  501|    126|  return result;
  502|    126|}
Curl_bufq_sipn:
  556|  1.41k|{
  557|  1.41k|  struct buf_chunk *tail = NULL;
  558|       |
  559|  1.41k|  *pnread = 0;
  560|  1.41k|  tail = get_non_full_tail(q);
  561|  1.41k|  if(!tail) {
  ------------------
  |  Branch (561:6): [True: 0, False: 1.41k]
  ------------------
  562|      0|    if(q->chunk_count < q->max_chunks)
  ------------------
  |  Branch (562:8): [True: 0, False: 0]
  ------------------
  563|      0|      return CURLE_OUT_OF_MEMORY;
  564|       |    /* full, blocked */
  565|      0|    return CURLE_AGAIN;
  566|      0|  }
  567|       |
  568|  1.41k|  return chunk_slurpn(tail, max_len, reader, reader_ctx, pnread);
  569|  1.41k|}
bufq.c:chunk_list_free:
  137|  26.7k|{
  138|  26.7k|  struct buf_chunk *chunk;
  139|  27.4k|  while(*anchor) {
  ------------------
  |  Branch (139:9): [True: 712, False: 26.7k]
  ------------------
  140|    712|    chunk = *anchor;
  141|    712|    *anchor = chunk->next;
  142|    712|    curlx_free(chunk);
  ------------------
  |  | 1483|    712|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  143|    712|  }
  144|  26.7k|}
bufq.c:bufq_init:
  208|  13.3k|{
  209|  13.3k|  DEBUGASSERT(chunk_size > 0);
  ------------------
  |  | 1081|  13.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (209:3): [True: 0, False: 13.3k]
  |  Branch (209:3): [True: 13.3k, False: 0]
  ------------------
  210|  13.3k|  DEBUGASSERT(max_chunks > 0);
  ------------------
  |  | 1081|  13.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (210:3): [True: 0, False: 13.3k]
  |  Branch (210:3): [True: 13.3k, False: 0]
  ------------------
  211|  13.3k|  memset(q, 0, sizeof(*q));
  212|  13.3k|  q->chunk_size = chunk_size;
  213|  13.3k|  q->max_chunks = max_chunks;
  214|  13.3k|  q->pool = pool;
  215|  13.3k|  q->opts = opts;
  216|  13.3k|}
bufq.c:chunk_len:
   39|  1.36k|{
   40|  1.36k|  return chunk->w_offset - chunk->r_offset;
   41|  1.36k|}
bufq.c:chunk_is_empty:
   29|  8.67k|{
   30|  8.67k|  return chunk->r_offset >= chunk->w_offset;
   31|  8.67k|}
bufq.c:chunk_is_full:
   34|   659k|{
   35|   659k|  return chunk->w_offset >= chunk->dlen;
   36|   659k|}
bufq.c:get_non_full_tail:
  347|   660k|{
  348|   660k|  struct buf_chunk *chunk;
  349|       |
  350|   660k|  if(q->tail && !chunk_is_full(q->tail))
  ------------------
  |  Branch (350:6): [True: 658k, False: 1.87k]
  |  Branch (350:17): [True: 657k, False: 245]
  ------------------
  351|   657k|    return q->tail;
  352|  2.12k|  chunk = get_spare(q);
  353|  2.12k|  if(chunk) {
  ------------------
  |  Branch (353:6): [True: 2.12k, False: 0]
  ------------------
  354|       |    /* new tail, and possibly new head */
  355|  2.12k|    if(q->tail) {
  ------------------
  |  Branch (355:8): [True: 245, False: 1.87k]
  ------------------
  356|    245|      q->tail->next = chunk;
  357|    245|      q->tail = chunk;
  358|    245|    }
  359|  1.87k|    else {
  360|  1.87k|      DEBUGASSERT(!q->head);
  ------------------
  |  | 1081|  1.87k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:7): [True: 0, False: 1.87k]
  |  Branch (360:7): [True: 1.87k, False: 0]
  ------------------
  361|  1.87k|      q->head = q->tail = chunk;
  362|  1.87k|    }
  363|  2.12k|  }
  364|  2.12k|  return chunk;
  365|  2.12k|}
bufq.c:get_spare:
  284|  2.12k|{
  285|  2.12k|  struct buf_chunk *chunk = NULL;
  286|       |
  287|  2.12k|  if(q->spare) {
  ------------------
  |  Branch (287:6): [True: 1.16k, False: 954]
  ------------------
  288|  1.16k|    chunk = q->spare;
  289|  1.16k|    q->spare = chunk->next;
  290|  1.16k|    chunk_reset(chunk);
  291|  1.16k|    return chunk;
  292|  1.16k|  }
  293|       |
  294|    954|  if(q->chunk_count >= q->max_chunks && (!(q->opts & BUFQ_OPT_SOFT_LIMIT)))
  ------------------
  |  |  111|    245|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  |  Branch (294:6): [True: 245, False: 709]
  |  Branch (294:41): [True: 0, False: 245]
  ------------------
  295|      0|    return NULL;
  296|       |
  297|    954|  if(q->pool) {
  ------------------
  |  Branch (297:6): [True: 0, False: 954]
  ------------------
  298|      0|    if(bufcp_take(q->pool, &chunk))
  ------------------
  |  Branch (298:8): [True: 0, False: 0]
  ------------------
  299|      0|      return NULL;
  300|      0|    ++q->chunk_count;
  301|      0|    return chunk;
  302|      0|  }
  303|    954|  else {
  304|       |    /* Check for integer overflow before allocation */
  305|    954|    if(q->chunk_size > SIZE_MAX - sizeof(*chunk)) {
  ------------------
  |  Branch (305:8): [True: 0, False: 954]
  ------------------
  306|      0|      return NULL;
  307|      0|    }
  308|       |
  309|    954|    chunk = curlx_calloc(1, sizeof(*chunk) + q->chunk_size);
  ------------------
  |  | 1480|    954|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  310|    954|    if(!chunk)
  ------------------
  |  Branch (310:8): [True: 0, False: 954]
  ------------------
  311|      0|      return NULL;
  312|    954|    chunk->dlen = q->chunk_size;
  313|    954|    ++q->chunk_count;
  314|    954|    return chunk;
  315|    954|  }
  316|    954|}
bufq.c:chunk_reset:
   44|  1.16k|{
   45|       |  chunk->next = NULL;
   46|  1.16k|  chunk->r_offset = chunk->w_offset = 0;
   47|  1.16k|}
bufq.c:chunk_append:
   51|   658k|{
   52|   658k|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   53|   658k|  size_t n = chunk->dlen - chunk->w_offset;
   54|   658k|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1081|   658k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 658k]
  |  Branch (54:3): [True: 658k, False: 0]
  ------------------
   55|   658k|  if(n) {
  ------------------
  |  Branch (55:6): [True: 658k, False: 0]
  ------------------
   56|   658k|    n = CURLMIN(n, len);
  ------------------
  |  | 1287|   658k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 213, False: 658k]
  |  |  ------------------
  ------------------
   57|   658k|    memcpy(p, buf, n);
   58|   658k|    chunk->w_offset += n;
   59|   658k|  }
   60|   658k|  return n;
   61|   658k|}
bufq.c:chunk_read:
   65|    285|{
   66|    285|  uint8_t *p = &chunk->x.data[chunk->r_offset];
   67|    285|  size_t n = chunk->w_offset - chunk->r_offset;
   68|    285|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1081|    285|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (68:3): [True: 0, False: 285]
  |  Branch (68:3): [True: 285, False: 0]
  ------------------
   69|    285|  if(!n) {
  ------------------
  |  Branch (69:6): [True: 0, False: 285]
  ------------------
   70|      0|    return 0;
   71|      0|  }
   72|    285|  else if(n <= len) {
  ------------------
  |  Branch (72:11): [True: 265, False: 20]
  ------------------
   73|    265|    memcpy(buf, p, n);
   74|    265|    chunk->r_offset = chunk->w_offset = 0;
   75|    265|    return n;
   76|    265|  }
   77|     20|  else {
   78|     20|    memcpy(buf, p, len);
   79|     20|    chunk->r_offset += len;
   80|     20|    return len;
   81|     20|  }
   82|    285|}
bufq.c:prune_head:
  319|  1.89k|{
  320|  1.89k|  struct buf_chunk *chunk;
  321|       |
  322|  3.76k|  while(q->head && chunk_is_empty(q->head)) {
  ------------------
  |  Branch (322:9): [True: 2.13k, False: 1.63k]
  |  Branch (322:20): [True: 1.87k, False: 262]
  ------------------
  323|  1.87k|    chunk = q->head;
  324|  1.87k|    q->head = chunk->next;
  325|  1.87k|    if(q->tail == chunk)
  ------------------
  |  Branch (325:8): [True: 1.63k, False: 242]
  ------------------
  326|  1.63k|      q->tail = q->head;
  327|  1.87k|    if(q->pool) {
  ------------------
  |  Branch (327:8): [True: 0, False: 1.87k]
  ------------------
  328|      0|      bufcp_put(q->pool, chunk);
  329|      0|      --q->chunk_count;
  330|      0|    }
  331|  1.87k|    else if((q->chunk_count > q->max_chunks) ||
  ------------------
  |  Branch (331:13): [True: 242, False: 1.63k]
  ------------------
  332|  1.63k|            (q->opts & BUFQ_OPT_NO_SPARES)) {
  ------------------
  |  |  115|  1.63k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  |  Branch (332:13): [True: 0, False: 1.63k]
  ------------------
  333|       |      /* SOFT_LIMIT allowed us more than max. free spares until
  334|       |       * we are at max again. Or free them if we are configured
  335|       |       * to not use spares. */
  336|    242|      curlx_free(chunk);
  ------------------
  |  | 1483|    242|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  337|    242|      --q->chunk_count;
  338|    242|    }
  339|  1.63k|    else {
  340|  1.63k|      chunk->next = q->spare;
  341|  1.63k|      q->spare = chunk;
  342|  1.63k|    }
  343|  1.87k|  }
  344|  1.89k|}
bufq.c:chunk_peek:
  108|  1.67k|{
  109|  1.67k|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1081|  1.67k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (109:3): [True: 0, False: 1.67k]
  |  Branch (109:3): [True: 1.67k, False: 0]
  ------------------
  110|  1.67k|  *pbuf = &chunk->x.data[chunk->r_offset];
  111|  1.67k|  *plen = chunk->w_offset - chunk->r_offset;
  112|  1.67k|}
bufq.c:chunk_skip:
  124|  1.60k|{
  125|  1.60k|  size_t n = chunk->w_offset - chunk->r_offset;
  126|  1.60k|  DEBUGASSERT(chunk->w_offset >= chunk->r_offset);
  ------------------
  |  | 1081|  1.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 0, False: 1.60k]
  |  Branch (126:3): [True: 1.60k, False: 0]
  ------------------
  127|  1.60k|  if(n) {
  ------------------
  |  Branch (127:6): [True: 1.60k, False: 0]
  ------------------
  128|  1.60k|    n = CURLMIN(n, amount);
  ------------------
  |  | 1287|  1.60k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 1.60k]
  |  |  ------------------
  ------------------
  129|  1.60k|    chunk->r_offset += n;
  130|  1.60k|    if(chunk->r_offset == chunk->w_offset)
  ------------------
  |  Branch (130:8): [True: 1.60k, False: 0]
  ------------------
  131|  1.60k|      chunk->r_offset = chunk->w_offset = 0;
  132|  1.60k|  }
  133|  1.60k|  return n;
  134|  1.60k|}
bufq.c:chunk_slurpn:
   87|  1.41k|{
   88|  1.41k|  uint8_t *p = &chunk->x.data[chunk->w_offset];
   89|  1.41k|  size_t n = chunk->dlen - chunk->w_offset; /* free amount */
   90|  1.41k|  CURLcode result;
   91|       |
   92|  1.41k|  *pnread = 0;
   93|  1.41k|  DEBUGASSERT(chunk->dlen >= chunk->w_offset);
  ------------------
  |  | 1081|  1.41k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 1.41k]
  |  Branch (93:3): [True: 1.41k, False: 0]
  ------------------
   94|  1.41k|  if(!n)
  ------------------
  |  Branch (94:6): [True: 0, False: 1.41k]
  ------------------
   95|      0|    return CURLE_AGAIN;
   96|  1.41k|  if(max_len && n > max_len)
  ------------------
  |  Branch (96:6): [True: 205, False: 1.20k]
  |  Branch (96:17): [True: 205, False: 0]
  ------------------
   97|    205|    n = max_len;
   98|  1.41k|  result = reader(reader_ctx, p, n, pnread);
   99|  1.41k|  if(!result) {
  ------------------
  |  Branch (99:6): [True: 1.34k, False: 69]
  ------------------
  100|  1.34k|    DEBUGASSERT(*pnread <= n);
  ------------------
  |  | 1081|  1.34k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (100:5): [True: 0, False: 1.34k]
  |  Branch (100:5): [True: 1.34k, False: 0]
  ------------------
  101|  1.34k|    chunk->w_offset += *pnread;
  102|  1.34k|  }
  103|  1.41k|  return result;
  104|  1.41k|}

Curl_bufref_init:
   38|  66.9k|{
   39|  66.9k|  DEBUGASSERT(br);
  ------------------
  |  | 1081|  66.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 66.9k]
  |  Branch (39:3): [True: 66.9k, False: 0]
  ------------------
   40|  66.9k|  br->dtor = NULL;
   41|  66.9k|  br->ptr = NULL;
   42|  66.9k|  br->len = 0;
   43|       |
   44|  66.9k|#ifdef DEBUGBUILD
   45|  66.9k|  br->signature = SIGNATURE;
  ------------------
  |  |   31|  66.9k|#define SIGNATURE 0x5c48e9b2    /* Random pattern. */
  ------------------
   46|  66.9k|#endif
   47|  66.9k|}
Curl_bufref_free:
   55|   181k|{
   56|   181k|  DEBUGASSERT(br);
  ------------------
  |  | 1081|   181k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 181k]
  |  Branch (56:3): [True: 181k, False: 0]
  ------------------
   57|   181k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|   181k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 181k]
  |  Branch (57:3): [True: 181k, False: 0]
  ------------------
   58|   181k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|   181k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 181k, False: 0]
  |  Branch (58:3): [True: 0, False: 0]
  |  Branch (58:3): [True: 63.7k, False: 117k]
  |  Branch (58:3): [True: 117k, False: 0]
  ------------------
   59|       |
   60|   181k|  if(br->ptr && br->dtor)
  ------------------
  |  Branch (60:6): [True: 63.7k, False: 117k]
  |  Branch (60:17): [True: 38.6k, False: 25.1k]
  ------------------
   61|  38.6k|    br->dtor(CURL_UNCONST(br->ptr));
  ------------------
  |  |  866|  38.6k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   62|       |
   63|   181k|  br->dtor = NULL;
   64|       |  br->ptr = NULL;
   65|   181k|  br->len = 0;
   66|   181k|}
Curl_bufref_set:
   74|  63.9k|{
   75|  63.9k|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1081|  63.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 63.9k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  |  Branch (75:3): [True: 63.9k, False: 0]
  |  Branch (75:3): [True: 0, False: 0]
  ------------------
   76|  63.9k|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1081|  63.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 63.9k]
  |  Branch (76:3): [True: 63.9k, False: 0]
  ------------------
   77|       |
   78|  63.9k|  Curl_bufref_free(br);
   79|  63.9k|  br->ptr = (const unsigned char *)ptr;
   80|  63.9k|  br->len = len;
   81|  63.9k|  br->dtor = dtor;
   82|  63.9k|}
Curl_bufref_ptr:
  100|  94.3k|{
  101|  94.3k|  DEBUGASSERT(br);
  ------------------
  |  | 1081|  94.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 94.3k]
  |  Branch (101:3): [True: 94.3k, False: 0]
  ------------------
  102|  94.3k|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|  94.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (102:3): [True: 0, False: 94.3k]
  |  Branch (102:3): [True: 94.3k, False: 0]
  ------------------
  103|  94.3k|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|  94.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 94.3k, False: 0]
  |  Branch (103:3): [True: 0, False: 0]
  |  Branch (103:3): [True: 81.1k, False: 13.1k]
  |  Branch (103:3): [True: 13.1k, False: 0]
  ------------------
  104|       |
  105|  94.3k|  return (const char *)br->ptr;
  106|  94.3k|}
Curl_bufref_memdup0:
  121|    123|{
  122|    123|  unsigned char *cpy = NULL;
  123|       |
  124|    123|  DEBUGASSERT(br);
  ------------------
  |  | 1081|    123|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (124:3): [True: 0, False: 123]
  |  Branch (124:3): [True: 123, False: 0]
  ------------------
  125|    123|  DEBUGASSERT(br->signature == SIGNATURE);
  ------------------
  |  | 1081|    123|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (125:3): [True: 0, False: 123]
  |  Branch (125:3): [True: 123, False: 0]
  ------------------
  126|    123|  DEBUGASSERT(br->ptr || !br->len);
  ------------------
  |  | 1081|    123|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (126:3): [True: 123, False: 0]
  |  Branch (126:3): [True: 0, False: 0]
  |  Branch (126:3): [True: 123, False: 0]
  |  Branch (126:3): [True: 0, False: 0]
  ------------------
  127|    123|  DEBUGASSERT(ptr || !len);
  ------------------
  |  | 1081|    123|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 123, False: 0]
  |  Branch (127:3): [True: 0, False: 0]
  |  Branch (127:3): [True: 123, False: 0]
  |  Branch (127:3): [True: 0, False: 0]
  ------------------
  128|    123|  DEBUGASSERT(len <= CURL_MAX_INPUT_LENGTH);
  ------------------
  |  | 1081|    123|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 123]
  |  Branch (128:3): [True: 123, False: 0]
  ------------------
  129|       |
  130|    123|  if(ptr) {
  ------------------
  |  Branch (130:6): [True: 123, False: 0]
  ------------------
  131|    123|    cpy = curlx_memdup0(ptr, len);
  132|    123|    if(!cpy)
  ------------------
  |  Branch (132:8): [True: 0, False: 123]
  ------------------
  133|      0|      return CURLE_OUT_OF_MEMORY;
  134|    123|  }
  135|       |
  136|    123|  Curl_bufref_set(br, cpy, len, curl_free);
  137|    123|  return CURLE_OK;
  138|    123|}

Curl_cf_dns_add:
  414|  11.0k|{
  415|  11.0k|  struct Curl_cfilter *cf = NULL;
  416|  11.0k|  bool for_proxy = FALSE;
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  417|  11.0k|  CURLcode result;
  418|       |
  419|  11.0k|  if(!peer)
  ------------------
  |  Branch (419:6): [True: 0, False: 11.0k]
  ------------------
  420|      0|    return CURLE_FAILED_INIT;
  421|  11.0k|#ifndef CURL_DISABLE_PROXY
  422|  11.0k|  for_proxy = (peer == conn->socks_proxy.peer) ||
  ------------------
  |  Branch (422:15): [True: 452, False: 10.5k]
  ------------------
  423|  10.5k|              (peer == conn->http_proxy.peer);
  ------------------
  |  Branch (423:15): [True: 3.01k, False: 7.55k]
  ------------------
  424|  11.0k|#endif
  425|       |
  426|  11.0k|  result = cf_dns_create(&cf, data, peer, dns_queries, transport,
  427|  11.0k|                         for_proxy, FALSE);
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  428|  11.0k|  if(result)
  ------------------
  |  Branch (428:6): [True: 0, False: 11.0k]
  ------------------
  429|      0|    goto out;
  430|  11.0k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  431|  11.0k|out:
  432|  11.0k|  return result;
  433|  11.0k|}
Curl_cf_dns_insert_after:
  447|    123|{
  448|    123|  struct Curl_cfilter *cf;
  449|    123|  CURLcode result;
  450|       |
  451|    123|  result = cf_dns_create(&cf, data, peer, dns_queries, transport,
  452|    123|                         FALSE, complete_resolve);
  ------------------
  |  | 1058|    123|#define FALSE false
  ------------------
  453|    123|  if(result)
  ------------------
  |  Branch (453:6): [True: 0, False: 123]
  ------------------
  454|      0|    return result;
  455|       |
  456|    123|  Curl_conn_cf_insert_after(cf_at, cf);
  457|    123|  return CURLE_OK;
  458|    123|}
Curl_conn_dns_result:
  484|   149k|{
  485|   149k|  return cf_dns_result(conn->cfilter[sockindex]);
  486|   149k|}
Curl_cf_dns_get_ai:
  520|  1.11M|{
  521|  1.11M|  (void)data;
  522|  1.11M|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (522:9): [True: 1.11M, False: 0]
  ------------------
  523|  1.11M|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (523:8): [True: 1.11M, False: 0]
  ------------------
  524|  1.11M|      struct cf_dns_ctx *ctx = cf->ctx;
  525|  1.11M|      if(ctx->resolv_result)
  ------------------
  |  Branch (525:10): [True: 0, False: 1.11M]
  ------------------
  526|      0|        return NULL;
  527|  1.11M|      else if(ctx->dns)
  ------------------
  |  Branch (527:15): [True: 556k, False: 555k]
  ------------------
  528|   556k|        return cf_dns_get_nth_ai(cf, ctx->dns->addr, ai_family, index);
  529|   555k|      else
  530|   555k|        return Curl_resolv_get_ai(data, ctx->resolv_id, ai_family, index);
  531|  1.11M|    }
  532|  1.11M|  }
  533|      0|  return NULL;
  534|  1.11M|}
Curl_conn_dns_get_ai:
  543|  1.11M|{
  544|  1.11M|  struct connectdata *conn = data->conn;
  545|  1.11M|  return Curl_cf_dns_get_ai(conn->cfilter[sockindex], data, ai_family, index);
  546|  1.11M|}
cf-dns.c:cf_dns_destroy:
  306|  11.1k|{
  307|  11.1k|  struct cf_dns_ctx *ctx = cf->ctx;
  308|       |
  309|  11.1k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  11.1k|  do {                                          \
  |  |  154|  11.1k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  11.1k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  22.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 11.1k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  22.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  11.1k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  11.1k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  310|  11.1k|  cf_dns_ctx_destroy(data, ctx);
  311|  11.1k|}
cf-dns.c:cf_dns_ctx_destroy:
   77|  11.1k|{
   78|  11.1k|  if(ctx) {
  ------------------
  |  Branch (78:6): [True: 11.1k, False: 0]
  ------------------
   79|  11.1k|    Curl_peer_unlink(&ctx->peer);
   80|  11.1k|    Curl_dns_entry_unlink(data, &ctx->dns);
   81|  11.1k|    curlx_free(ctx);
  ------------------
  |  | 1483|  11.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   82|  11.1k|  }
   83|  11.1k|}
cf-dns.c:cf_dns_connect:
  247|  1.34M|{
  248|  1.34M|  struct cf_dns_ctx *ctx = cf->ctx;
  249|       |
  250|  1.34M|  if(cf->connected) {
  ------------------
  |  Branch (250:6): [True: 39, False: 1.34M]
  ------------------
  251|     39|    *done = TRUE;
  ------------------
  |  | 1055|     39|#define TRUE true
  ------------------
  252|     39|    return CURLE_OK;
  253|     39|  }
  254|       |
  255|  1.34M|  *done = FALSE;
  ------------------
  |  | 1058|  1.34M|#define FALSE false
  ------------------
  256|  1.34M|  if(!ctx->started) {
  ------------------
  |  Branch (256:6): [True: 11.1k, False: 1.33M]
  ------------------
  257|  11.1k|    ctx->started = TRUE;
  ------------------
  |  | 1055|  11.1k|#define TRUE true
  ------------------
  258|  11.1k|    ctx->resolv_result = cf_dns_start(cf, data, &ctx->dns);
  259|  11.1k|  }
  260|       |
  261|  1.34M|  if(!ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (261:6): [True: 713k, False: 635k]
  |  Branch (261:19): [True: 713k, False: 125]
  ------------------
  262|   713k|    ctx->resolv_result =
  263|   713k|      Curl_resolv_take_result(data, ctx->resolv_id, &ctx->dns);
  264|   713k|  }
  265|       |
  266|  1.34M|  if(ctx->resolv_result) {
  ------------------
  |  Branch (266:6): [True: 585, False: 1.34M]
  ------------------
  267|    585|    CURL_TRC_CF(data, cf, "error resolving: %d", ctx->resolv_result);
  ------------------
  |  |  153|    585|  do {                                          \
  |  |  154|    585|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    585|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.17k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 585, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 585]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.17k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    585|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    585|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    585|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 585]
  |  |  ------------------
  ------------------
  268|    585|    return ctx->resolv_result;
  269|    585|  }
  270|       |
  271|  1.34M|  if(ctx->dns && !ctx->announced) {
  ------------------
  |  Branch (271:6): [True: 636k, False: 712k]
  |  Branch (271:18): [True: 10.3k, False: 625k]
  ------------------
  272|  10.3k|    ctx->announced = TRUE;
  ------------------
  |  | 1055|  10.3k|#define TRUE true
  ------------------
  273|  10.3k|    if(cf->sockindex == FIRSTSOCKET) {
  ------------------
  |  |  303|  10.3k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (273:8): [True: 10.3k, False: 0]
  ------------------
  274|  10.3k|      cf->conn->bits.dns_resolved = TRUE;
  ------------------
  |  | 1055|  10.3k|#define TRUE true
  ------------------
  275|  10.3k|      Curl_pgrsTime(data, TIMER_NAMELOOKUP);
  276|  10.3k|    }
  277|  10.3k|    cf_dns_report(cf, data, ctx->dns);
  278|  10.3k|  }
  279|       |
  280|  1.34M|  if(!cf_dns_ready_to_connect(cf, data)) {
  ------------------
  |  Branch (280:6): [True: 82.9k, False: 1.26M]
  ------------------
  281|  82.9k|    return CURLE_OK;
  282|  82.9k|  }
  283|       |
  284|  1.26M|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (284:6): [True: 1.26M, False: 0]
  |  Branch (284:18): [True: 774k, False: 491k]
  ------------------
  285|   774k|    bool sub_done;
  286|   774k|    CURLcode result = Curl_conn_cf_connect(cf->next, data, &sub_done);
  287|   774k|    if(result || !sub_done)
  ------------------
  |  Branch (287:8): [True: 3.09k, False: 771k]
  |  Branch (287:18): [True: 764k, False: 7.10k]
  ------------------
  288|   767k|      return result;
  289|  7.10k|    DEBUGASSERT(sub_done);
  ------------------
  |  | 1081|  7.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:5): [True: 0, False: 7.10k]
  |  Branch (289:5): [True: 7.10k, False: 0]
  ------------------
  290|  7.10k|  }
  291|       |
  292|       |  /* sub filter chain is connected */
  293|   498k|  CURL_TRC_CF(data, cf, "connected filter chain below");
  ------------------
  |  |  153|   498k|  do {                                          \
  |  |  154|   498k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   498k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   996k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 498k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 498k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   996k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   498k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   498k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   498k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 498k]
  |  |  ------------------
  ------------------
  294|   498k|  if(ctx->complete_resolve && !ctx->dns && !ctx->resolv_result) {
  ------------------
  |  Branch (294:6): [True: 491k, False: 7.10k]
  |  Branch (294:31): [True: 490k, False: 78]
  |  Branch (294:44): [True: 490k, False: 0]
  ------------------
  295|       |    /* This filter only connects when it has resolved everything. */
  296|   490k|    CURL_TRC_CF(data, cf, "delay connect until resolve complete");
  ------------------
  |  |  153|   490k|  do {                                          \
  |  |  154|   490k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   490k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   981k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 490k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 490k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   981k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   490k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   490k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   490k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 490k]
  |  |  ------------------
  ------------------
  297|   490k|    return CURLE_OK;
  298|   490k|  }
  299|  7.18k|  *done = TRUE;
  ------------------
  |  | 1055|  7.18k|#define TRUE true
  ------------------
  300|       |  cf->connected = TRUE;
  ------------------
  |  | 1055|  7.18k|#define TRUE true
  ------------------
  301|  7.18k|  Curl_resolv_destroy(data, ctx->resolv_id);
  302|  7.18k|  return CURLE_OK;
  303|   498k|}
cf-dns.c:cf_dns_start:
  165|  11.1k|{
  166|  11.1k|  struct cf_dns_ctx *ctx = cf->ctx;
  167|  11.1k|  timediff_t timeout_ms = Curl_timeleft_ms(data);
  168|  11.1k|  CURLcode result;
  169|       |
  170|  11.1k|  *pdns = NULL;
  171|       |
  172|  11.1k|  CURL_TRC_CF(data, cf, "cf_dns_start %s %s:%u",
  ------------------
  |  |  153|  11.1k|  do {                                          \
  |  |  154|  11.1k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  11.1k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  22.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 11.1k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  22.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  11.1k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  11.1k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  173|  11.1k|              ctx->peer->unix_socket ? "unix-domain-socket" : "host",
  174|  11.1k|              ctx->peer->hostname, ctx->peer->port);
  175|  11.1k|  if(ctx->peer->unix_socket)
  ------------------
  |  Branch (175:6): [True: 400, False: 10.7k]
  ------------------
  176|    400|    ctx->dns_queries = 0;
  177|  10.7k|  else if(Curl_is_ipv4addr(ctx->peer->hostname))
  ------------------
  |  Branch (177:11): [True: 9.79k, False: 952]
  ------------------
  178|  9.79k|    ctx->dns_queries |= CURL_DNSQ_A;
  ------------------
  |  |   51|  9.79k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  179|    952|#ifdef USE_IPV6
  180|    952|  else if(ctx->peer->ipv6)
  ------------------
  |  Branch (180:11): [True: 41, False: 911]
  ------------------
  181|     41|    ctx->dns_queries |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     41|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  182|  11.1k|#endif
  183|       |
  184|  11.1k|  result = Curl_resolv(data, ctx->peer, ctx->dns_queries, ctx->transport,
  185|  11.1k|                       (bool)ctx->for_proxy, timeout_ms,
  186|  11.1k|                       &ctx->resolv_id, pdns);
  187|  11.1k|  DEBUGASSERT(!result || !*pdns);
  ------------------
  |  | 1081|  11.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 11.1k, False: 0]
  |  Branch (187:3): [True: 0, False: 0]
  |  Branch (187:3): [True: 10.2k, False: 878]
  |  Branch (187:3): [True: 878, False: 0]
  ------------------
  188|  11.1k|  if(!result) { /* resolved right away, either sync or from dnscache */
  ------------------
  |  Branch (188:6): [True: 10.2k, False: 878]
  ------------------
  189|  10.2k|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (189:5): [True: 0, False: 10.2k]
  |  Branch (189:5): [True: 10.2k, False: 0]
  ------------------
  190|  10.2k|    return CURLE_OK;
  191|  10.2k|  }
  192|    878|  else if(result == CURLE_AGAIN) { /* async resolv in progress */
  ------------------
  |  Branch (192:11): [True: 753, False: 125]
  ------------------
  193|    753|    return CURLE_OK;
  194|    753|  }
  195|    125|  else if(result == CURLE_OPERATION_TIMEDOUT) { /* took too long */
  ------------------
  |  Branch (195:11): [True: 0, False: 125]
  ------------------
  196|      0|    failf(data, "Failed to resolve '%s' with timeout after %"
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  197|      0|          FMT_TIMEDIFF_T " ms", ctx->peer->hostname,
  198|      0|          curlx_ptimediff_ms(Curl_pgrs_now(data),
  199|      0|                             &data->progress.t_startsingle));
  200|      0|    return CURLE_OPERATION_TIMEDOUT;
  201|      0|  }
  202|    125|  else {
  203|    125|    DEBUGASSERT(result);
  ------------------
  |  | 1081|    125|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (203:5): [True: 0, False: 125]
  |  Branch (203:5): [True: 125, False: 0]
  ------------------
  204|    125|    failf(data, "Could not resolve: %s", ctx->peer->hostname);
  ------------------
  |  |   62|    125|#define failf Curl_failf
  ------------------
  205|    125|    return result;
  206|    125|  }
  207|  11.1k|}
cf-dns.c:cf_dns_report:
  116|  10.3k|{
  117|  10.3k|  struct cf_dns_ctx *ctx = cf->ctx;
  118|  10.3k|  struct dynbuf tmp;
  119|       |
  120|  10.3k|  if(!Curl_trc_is_verbose(data) ||
  ------------------
  |  |  319|  20.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 10.3k, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 10.3k]
  |  |  ------------------
  |  |  320|  20.6k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  121|       |     /* ignore no name or numerical IP addresses */
  122|      0|     !dns->hostname[0] || Curl_host_is_ipnum(dns->hostname))
  ------------------
  |  Branch (122:6): [True: 0, False: 0]
  |  Branch (122:27): [True: 0, False: 0]
  ------------------
  123|  10.3k|    return;
  124|       |
  125|      0|  if(ctx->peer->unix_socket) {
  ------------------
  |  Branch (125:6): [True: 0, False: 0]
  ------------------
  126|      0|#ifdef USE_UNIX_SOCKETS
  127|      0|    CURL_TRC_CF(data, cf, "resolved unix://%s", ctx->peer->hostname);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  128|       |#else
  129|       |    DEBUGASSERT(0);
  130|       |#endif
  131|      0|  }
  132|      0|  else {
  133|      0|    curlx_dyn_init(&tmp, 1024);
  134|      0|    infof(data, "Host %s:%u was resolved.", dns->hostname, dns->port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  135|      0|#ifdef CURLRES_IPV6
  136|      0|    cf_dns_report_addr(data, &tmp, "IPv6: ", AF_INET6, dns->addr);
  137|      0|#endif
  138|      0|    cf_dns_report_addr(data, &tmp, "IPv4: ", AF_INET, dns->addr);
  139|       |#ifdef USE_HTTPSRR
  140|       |    if(!dns->hinfo)
  141|       |      infof(data, "HTTPS-RR: -");
  142|       |    else if(!Curl_httpsrr_applicable(data, dns->hinfo))
  143|       |      infof(data, "HTTPS-RR: not applicable");
  144|       |    else {
  145|       |      CURLcode result = Curl_httpsrr_print(&tmp, dns->hinfo);
  146|       |      if(!result)
  147|       |        infof(data, "HTTPS-RR: %s", curlx_dyn_ptr(&tmp));
  148|       |      else
  149|       |        infof(data, "Error printing HTTPS-RR information");
  150|       |    }
  151|       |#endif
  152|      0|    curlx_dyn_free(&tmp);
  153|      0|  }
  154|      0|}
cf-dns.c:cf_dns_ready_to_connect:
  213|  1.34M|{
  214|  1.34M|  struct cf_dns_ctx *ctx = cf->ctx;
  215|       |
  216|  1.34M|  if(ctx->resolv_result)
  ------------------
  |  Branch (216:6): [True: 0, False: 1.34M]
  ------------------
  217|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  218|  1.34M|  else if(ctx->dns)
  ------------------
  |  Branch (218:11): [True: 636k, False: 712k]
  ------------------
  219|   636k|    return TRUE;
  ------------------
  |  | 1055|   636k|#define TRUE true
  ------------------
  220|   712k|#ifdef USE_CURL_ASYNC
  221|   712k|  else {
  222|       |    /* We want AAAA answer as we prefer ipv6. If a sub-filter desires
  223|       |    * HTTPS-RR, we check for that query as well. */
  224|   712k|    uint8_t wanted_answers = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|   712k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  225|   712k|    if(Curl_conn_cf_wants_httpsrr(cf, data))
  ------------------
  |  Branch (225:8): [True: 220k, False: 491k]
  ------------------
  226|   220k|      wanted_answers |= CURL_DNSQ_HTTPS;
  ------------------
  |  |   53|   220k|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  227|       |
  228|       |    /* Note: if a query was never started, it is considered to have
  229|       |     * an answer (e.g. a negative one). */
  230|   712k|    if(Curl_resolv_has_answers(data, ctx->resolv_id, wanted_answers))
  ------------------
  |  Branch (230:8): [True: 608k, False: 104k]
  ------------------
  231|   608k|      return TRUE;
  ------------------
  |  | 1055|   608k|#define TRUE true
  ------------------
  232|       |    /* If the wanted answers are not available after a delay,
  233|       |     * we let the connect attempts start anyway. */
  234|   104k|    return Curl_resolv_elapsed_ms(data, ctx->resolv_id) >=
  235|   104k|           CURL_HEV3_RESOLVE_DELAY_MS;
  ------------------
  |  |  209|   104k|#define CURL_HEV3_RESOLVE_DELAY_MS    50
  ------------------
  236|   712k|  }
  237|       |#else
  238|       |  (void)data;
  239|       |  DEBUGASSERT(0); /* We should not come here */
  240|       |  return FALSE;
  241|       |#endif /* USE_CURL_ASYNC */
  242|  1.34M|}
cf-dns.c:cf_dns_close:
  314|  4.02k|{
  315|  4.02k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  4.02k|#define FALSE false
  ------------------
  316|  4.02k|  if(cf->next)
  ------------------
  |  Branch (316:6): [True: 4.02k, False: 0]
  ------------------
  317|  4.02k|    cf->next->cft->do_close(cf->next, data);
  318|  4.02k|}
cf-dns.c:cf_dns_adjust_pollset:
  323|   490k|{
  324|   490k|#ifdef USE_CURL_ASYNC
  325|   490k|  if(!cf->connected)
  ------------------
  |  Branch (325:6): [True: 490k, False: 41]
  ------------------
  326|   490k|    return Curl_resolv_pollset(data, ps);
  327|       |#else
  328|       |  (void)cf;
  329|       |  (void)data;
  330|       |  (void)ps;
  331|       |#endif
  332|     41|  return CURLE_OK;
  333|   490k|}
cf-dns.c:cf_dns_cntrl:
  338|  11.1k|{
  339|  11.1k|  struct cf_dns_ctx *ctx = cf->ctx;
  340|  11.1k|  CURLcode result = CURLE_OK;
  341|       |
  342|  11.1k|  (void)arg1;
  343|  11.1k|  (void)arg2;
  344|  11.1k|  switch(event) {
  345|  4.02k|  case CF_CTRL_DATA_DONE:
  ------------------
  |  |  122|  4.02k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
  |  Branch (345:3): [True: 4.02k, False: 7.12k]
  ------------------
  346|  4.02k|    if(ctx->dns) {
  ------------------
  |  Branch (346:8): [True: 3.21k, False: 813]
  ------------------
  347|       |      /* Should only come here when the connect attempt failed and
  348|       |       * `data` is giving up on it. On a successful connect, we already
  349|       |       * unlinked the DNS entry. */
  350|  3.21k|      Curl_dns_entry_unlink(data, &ctx->dns);
  351|  3.21k|    }
  352|  4.02k|    break;
  353|  7.12k|  default:
  ------------------
  |  Branch (353:3): [True: 7.12k, False: 4.02k]
  ------------------
  354|  7.12k|    break;
  355|  11.1k|  }
  356|  11.1k|  return result;
  357|  11.1k|}
cf-dns.c:cf_dns_create:
  384|  11.1k|{
  385|  11.1k|  struct Curl_cfilter *cf = NULL;
  386|  11.1k|  struct cf_dns_ctx *ctx;
  387|  11.1k|  CURLcode result = CURLE_OK;
  388|       |
  389|  11.1k|  (void)data;
  390|  11.1k|  ctx = cf_dns_ctx_create(data, peer, dns_queries, transport,
  391|  11.1k|                          for_proxy, complete_resolve);
  392|  11.1k|  if(!ctx) {
  ------------------
  |  Branch (392:6): [True: 0, False: 11.1k]
  ------------------
  393|      0|    result = CURLE_OUT_OF_MEMORY;
  394|      0|    goto out;
  395|      0|  }
  396|       |
  397|  11.1k|  result = Curl_cf_create(&cf, &Curl_cft_dns, ctx);
  398|       |
  399|  11.1k|out:
  400|  11.1k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (400:10): [True: 0, False: 11.1k]
  ------------------
  401|  11.1k|  if(result)
  ------------------
  |  Branch (401:6): [True: 0, False: 11.1k]
  ------------------
  402|      0|    cf_dns_ctx_destroy(data, ctx);
  403|  11.1k|  return result;
  404|  11.1k|}
cf-dns.c:cf_dns_ctx_create:
   57|  11.1k|{
   58|  11.1k|  struct cf_dns_ctx *ctx;
   59|       |
   60|  11.1k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  11.1k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   61|  11.1k|  if(!ctx)
  ------------------
  |  Branch (61:6): [True: 0, False: 11.1k]
  ------------------
   62|      0|    return NULL;
   63|       |
   64|  11.1k|  Curl_peer_link(&ctx->peer, peer);
   65|  11.1k|  ctx->dns_queries = dns_queries;
   66|  11.1k|  ctx->transport = transport;
   67|  11.1k|  ctx->for_proxy = for_proxy;
   68|  11.1k|  ctx->complete_resolve = complete_resolve;
   69|       |
   70|  11.1k|  CURL_TRC_DNS(data, "created DNS filter for %s:%u, transport=%x, queries=%x",
  ------------------
  |  |  168|  11.1k|  do {                                 \
  |  |  169|  11.1k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  11.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  11.1k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  11.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
   71|  11.1k|               peer->hostname, peer->port, ctx->transport, ctx->dns_queries);
   72|  11.1k|  return ctx;
   73|  11.1k|}
cf-dns.c:cf_dns_result:
  464|   149k|{
  465|   149k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (465:9): [True: 149k, False: 0]
  ------------------
  466|   149k|    if(cf->cft == &Curl_cft_dns) {
  ------------------
  |  Branch (466:8): [True: 149k, False: 0]
  ------------------
  467|   149k|      struct cf_dns_ctx *ctx = cf->ctx;
  468|   149k|      if(ctx->dns || ctx->resolv_result)
  ------------------
  |  Branch (468:10): [True: 10.2k, False: 138k]
  |  Branch (468:22): [True: 0, False: 138k]
  ------------------
  469|  10.2k|        return ctx->resolv_result;
  470|   138k|      return CURLE_AGAIN;
  471|   149k|    }
  472|   149k|  }
  473|      0|  return CURLE_FAILED_INIT;
  474|   149k|}
cf-dns.c:cf_dns_get_nth_ai:
  492|   556k|{
  493|   556k|  struct cf_dns_ctx *ctx = cf->ctx;
  494|   556k|  unsigned int i = 0;
  495|       |
  496|   556k|  if((ai_family == AF_INET) && !(ctx->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|   277k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (496:6): [True: 277k, False: 278k]
  |  Branch (496:32): [True: 0, False: 277k]
  ------------------
  497|      0|    return NULL;
  498|   556k|#ifdef USE_IPV6
  499|   556k|  if((ai_family == AF_INET6) && !(ctx->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|   277k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (499:6): [True: 277k, False: 278k]
  |  Branch (499:33): [True: 13, False: 277k]
  ------------------
  500|     13|    return NULL;
  501|   556k|#endif
  502|  1.10M|  for(i = 0; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (502:14): [True: 556k, False: 545k]
  ------------------
  503|   556k|    if(ai->ai_family == ai_family) {
  ------------------
  |  Branch (503:8): [True: 278k, False: 277k]
  ------------------
  504|   278k|      if(i == index)
  ------------------
  |  Branch (504:10): [True: 10.3k, False: 268k]
  ------------------
  505|  10.3k|        return ai;
  506|   268k|      ++i;
  507|   268k|    }
  508|   556k|  }
  509|   545k|  return NULL;
  510|   556k|}

Curl_cf_h1_proxy_insert_after:
  970|    772|{
  971|    772|  struct Curl_cfilter *cf;
  972|    772|  struct cf_h1_proxy_ctx *pctx;
  973|    772|  struct h1_tunnel_state *ts;
  974|    772|  CURLcode result;
  975|       |
  976|    772|  (void)data;
  977|    772|  if(!dest)
  ------------------
  |  Branch (977:6): [True: 0, False: 772]
  ------------------
  978|      0|    return CURLE_FAILED_INIT;
  979|    772|  if((httpversion < 10) || (httpversion >= 20))
  ------------------
  |  Branch (979:6): [True: 0, False: 772]
  |  Branch (979:28): [True: 0, False: 772]
  ------------------
  980|      0|    return CURLE_FAILED_INIT;
  981|       |
  982|    772|  ts = curlx_calloc(1, sizeof(*ts));
  ------------------
  |  | 1480|    772|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  983|    772|  if(!ts) {
  ------------------
  |  Branch (983:6): [True: 0, False: 772]
  ------------------
  984|      0|    result = CURLE_OUT_OF_MEMORY;
  985|      0|    goto out;
  986|      0|  }
  987|    772|  Curl_peer_link(&ts->dest, dest);
  988|    772|  ts->httpversion = httpversion;
  989|    772|  curlx_dyn_init(&ts->rcvbuf, DYN_PROXY_CONNECT_HEADERS);
  ------------------
  |  |   73|    772|#define DYN_PROXY_CONNECT_HEADERS 16384
  ------------------
  990|    772|  curlx_dyn_init(&ts->request_data, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|    772|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
  991|    772|  Curl_httpchunk_init(data, &ts->ch, TRUE);
  ------------------
  |  | 1055|    772|#define TRUE true
  ------------------
  992|       |
  993|    772|  pctx = curlx_calloc(1, sizeof(*pctx));
  ------------------
  |  | 1480|    772|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  994|    772|  if(!pctx) {
  ------------------
  |  Branch (994:6): [True: 0, False: 772]
  ------------------
  995|      0|    result = CURLE_OUT_OF_MEMORY;
  996|      0|    goto out;
  997|      0|  }
  998|    772|  pctx->udp_tunnel = udp_tunnel;
  999|    772|  pctx->ts = ts;
 1000|    772|  result = Curl_cf_create(&cf, &Curl_cft_h1_proxy, pctx);
 1001|    772|  if(result) {
  ------------------
  |  Branch (1001:6): [True: 0, False: 772]
  ------------------
 1002|      0|    curlx_free(pctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1003|      0|    goto out;
 1004|      0|  }
 1005|    772|  ts = NULL;
 1006|    772|  Curl_conn_cf_insert_after(cf_at, cf);
 1007|       |
 1008|    772|out:
 1009|    772|  tunnel_free(ts, data);
 1010|    772|  return result;
 1011|    772|}
cf-h1-proxy.c:cf_h1_proxy_destroy:
  902|    772|{
  903|    772|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|    772|  do {                                          \
  |  |  154|    772|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    772|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.54k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 772, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 772]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.54k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    772|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    772|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    772|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 772]
  |  |  ------------------
  ------------------
  904|    772|  cf_tunnel_free(cf, data);
  905|       |  curlx_safefree(cf->ctx);
  ------------------
  |  | 1327|    772|  do {                      \
  |  | 1328|    772|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    772|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    772|    (ptr) = NULL;           \
  |  | 1330|    772|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 772]
  |  |  ------------------
  ------------------
  906|    772|}
cf-h1-proxy.c:cf_tunnel_free:
  214|    833|{
  215|    833|  if(cf) {
  ------------------
  |  Branch (215:6): [True: 833, False: 0]
  ------------------
  216|    833|    struct cf_h1_proxy_ctx *pctx = cf->ctx;
  217|    833|    struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (217:34): [True: 833, False: 0]
  ------------------
  218|    833|    if(ts) {
  ------------------
  |  Branch (218:8): [True: 772, False: 61]
  ------------------
  219|    772|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  220|    772|      tunnel_free(ts, data);
  221|       |      pctx->ts = NULL;
  222|    772|    }
  223|    833|  }
  224|    833|}
cf-h1-proxy.c:h1_tunnel_go_state:
  148|  4.15k|{
  149|  4.15k|  if(ts->tunnel_state == new_state)
  ------------------
  |  Branch (149:6): [True: 0, False: 4.15k]
  ------------------
  150|      0|    return;
  151|       |  /* entering this one */
  152|  4.15k|  switch(new_state) {
  ------------------
  |  Branch (152:10): [True: 4.15k, False: 0]
  ------------------
  153|    763|  case H1_TUNNEL_INIT:
  ------------------
  |  Branch (153:3): [True: 763, False: 3.39k]
  ------------------
  154|    763|    CURL_TRC_CF(data, cf, "new tunnel state 'init'");
  ------------------
  |  |  153|    763|  do {                                          \
  |  |  154|    763|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    763|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.52k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 763, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 763]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.52k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    763|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    763|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    763|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 763]
  |  |  ------------------
  ------------------
  155|    763|    tunnel_reinit(cf, data, ts);
  156|    763|    break;
  157|       |
  158|    823|  case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (158:3): [True: 823, False: 3.33k]
  ------------------
  159|    823|    CURL_TRC_CF(data, cf, "new tunnel state 'connect'");
  ------------------
  |  |  153|    823|  do {                                          \
  |  |  154|    823|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    823|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 823, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 823]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    823|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    823|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    823|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 823]
  |  |  ------------------
  ------------------
  160|    823|    ts->tunnel_state = H1_TUNNEL_CONNECT;
  161|    823|    ts->keepon = KEEPON_CONNECT;
  162|    823|    curlx_dyn_reset(&ts->rcvbuf);
  163|    823|    break;
  164|       |
  165|    823|  case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (165:3): [True: 823, False: 3.33k]
  ------------------
  166|    823|    CURL_TRC_CF(data, cf, "new tunnel state 'receive'");
  ------------------
  |  |  153|    823|  do {                                          \
  |  |  154|    823|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    823|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 823, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 823]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    823|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    823|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    823|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 823]
  |  |  ------------------
  ------------------
  167|    823|    ts->tunnel_state = H1_TUNNEL_RECEIVE;
  168|    823|    break;
  169|       |
  170|    220|  case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (170:3): [True: 220, False: 3.93k]
  ------------------
  171|    220|    CURL_TRC_CF(data, cf, "new tunnel state 'response'");
  ------------------
  |  |  153|    220|  do {                                          \
  |  |  154|    220|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    220|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    440|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 220, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 220]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    440|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    220|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    220|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    220|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 220]
  |  |  ------------------
  ------------------
  172|    220|    ts->tunnel_state = H1_TUNNEL_RESPONSE;
  173|    220|    break;
  174|       |
  175|     61|  case H1_TUNNEL_ESTABLISHED:
  ------------------
  |  Branch (175:3): [True: 61, False: 4.09k]
  ------------------
  176|     61|    CURL_TRC_CF(data, cf, "new tunnel state 'established'");
  ------------------
  |  |  153|     61|  do {                                          \
  |  |  154|     61|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     61|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    122|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 61, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 61]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    122|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     61|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     61|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     61|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 61]
  |  |  ------------------
  ------------------
  177|     61|    infof(data, "CONNECT%s phase completed for HTTP proxy",
  ------------------
  |  |  143|     61|  do {                               \
  |  |  144|     61|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     61|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 61, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 61]
  |  |  |  |  ------------------
  |  |  |  |  320|     61|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     61|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|     61|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 61]
  |  |  ------------------
  ------------------
  178|     61|          h1_proxy_is_udp(cf) ? "-UDP" : "");
  179|       |
  180|     61|    data->state.authproxy.done = TRUE;
  ------------------
  |  | 1055|     61|#define TRUE true
  ------------------
  181|     61|    data->state.authproxy.multipass = FALSE;
  ------------------
  |  | 1058|     61|#define FALSE false
  ------------------
  182|     61|    FALLTHROUGH();
  ------------------
  |  |  821|     61|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  183|  1.52k|  case H1_TUNNEL_FAILED:
  ------------------
  |  Branch (183:3): [True: 1.46k, False: 2.69k]
  ------------------
  184|  1.52k|    if(new_state == H1_TUNNEL_FAILED)
  ------------------
  |  Branch (184:8): [True: 1.46k, False: 61]
  ------------------
  185|  1.46k|      CURL_TRC_CF(data, cf, "new tunnel state 'failed'");
  ------------------
  |  |  153|  1.46k|  do {                                          \
  |  |  154|  1.46k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.46k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.93k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.46k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.93k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.46k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.46k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.46k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.46k]
  |  |  ------------------
  ------------------
  186|  1.52k|    ts->tunnel_state = new_state;
  187|  1.52k|    curlx_dyn_reset(&ts->rcvbuf);
  188|  1.52k|    curlx_dyn_reset(&ts->request_data);
  189|       |    /* restore the protocol pointer */
  190|  1.52k|    data->info.httpcode = 0; /* clear it as it might have been used for the
  191|       |                                proxy */
  192|       |    /* If a proxy-authorization header was used for the proxy, then we should
  193|       |       make sure that it is not accidentally used for the document request
  194|       |       after we have connected. Let's thus free and clear it here. */
  195|       |    curlx_safefree(data->req.hd_proxy_auth);
  ------------------
  |  | 1327|  1.52k|  do {                      \
  |  | 1328|  1.52k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.52k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.52k|    (ptr) = NULL;           \
  |  | 1330|  1.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.52k]
  |  |  ------------------
  ------------------
  196|  1.52k|    break;
  197|  4.15k|  }
  198|  4.15k|}
cf-h1-proxy.c:tunnel_reinit:
  102|    763|{
  103|    763|  (void)data;
  104|    763|  (void)cf;
  105|    763|  DEBUGASSERT(ts);
  ------------------
  |  | 1081|    763|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (105:3): [True: 0, False: 763]
  |  Branch (105:3): [True: 763, False: 0]
  ------------------
  106|    763|  curlx_dyn_reset(&ts->rcvbuf);
  107|    763|  curlx_dyn_reset(&ts->request_data);
  108|    763|  ts->tunnel_state = H1_TUNNEL_INIT;
  109|    763|  ts->keepon = KEEPON_CONNECT;
  110|    763|  ts->cl = 0;
  111|    763|  ts->close_connection = FALSE;
  ------------------
  |  | 1058|    763|#define FALSE false
  ------------------
  112|    763|  ts->maybe_folded = FALSE;
  ------------------
  |  | 1058|    763|#define FALSE false
  ------------------
  113|       |  ts->leading_unfold = FALSE;
  ------------------
  |  | 1058|    763|#define FALSE false
  ------------------
  114|    763|  ts->nsent = 0;
  115|    763|  ts->headerlines = 0;
  116|    763|  return CURLE_OK;
  117|    763|}
cf-h1-proxy.c:h1_proxy_is_udp:
   94|  32.6k|{
   95|  32.6k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
   96|  32.6k|  return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1055|  32.6k|#define TRUE true
  ------------------
                return (pctx->udp_tunnel ? TRUE : FALSE);
  ------------------
  |  | 1058|  32.6k|#define FALSE false
  ------------------
  |  Branch (96:11): [True: 0, False: 32.6k]
  ------------------
   97|  32.6k|}
cf-h1-proxy.c:cf_h1_proxy_connect:
  819|  1.33k|{
  820|  1.33k|  CURLcode result;
  821|  1.33k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  822|  1.33k|  struct h1_tunnel_state *ts = pctx->ts;
  823|       |
  824|  1.33k|  if(cf->connected) {
  ------------------
  |  Branch (824:6): [True: 0, False: 1.33k]
  ------------------
  825|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  826|      0|    return CURLE_OK;
  827|      0|  }
  828|       |
  829|  1.33k|  CURL_TRC_CF(data, cf, "connect");
  ------------------
  |  |  153|  1.33k|  do {                                          \
  |  |  154|  1.33k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.33k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.67k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.33k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.67k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.33k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.33k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.33k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.33k]
  |  |  ------------------
  ------------------
  830|  1.33k|  result = cf->next->cft->do_connect(cf->next, data, done);
  831|  1.33k|  if(result || !*done)
  ------------------
  |  Branch (831:6): [True: 0, False: 1.33k]
  |  Branch (831:16): [True: 0, False: 1.33k]
  ------------------
  832|      0|    return result;
  833|       |
  834|  1.33k|  *done = FALSE;
  ------------------
  |  | 1058|  1.33k|#define FALSE false
  ------------------
  835|  1.33k|  if(!ts) {
  ------------------
  |  Branch (835:6): [True: 0, False: 1.33k]
  ------------------
  836|      0|    result = tunnel_init(cf, data, &ts);
  837|      0|    if(result)
  ------------------
  |  Branch (837:8): [True: 0, False: 0]
  ------------------
  838|      0|      return result;
  839|      0|    pctx->ts = ts;
  840|      0|  }
  841|       |
  842|       |  /* We want "seamless" operations through HTTP proxy tunnel */
  843|       |
  844|  1.33k|  result = H1_CONNECT(cf, data, ts);
  845|  1.33k|  if(result)
  ------------------
  |  Branch (845:6): [True: 694, False: 643]
  ------------------
  846|    694|    goto out;
  847|    643|  curlx_safefree(data->req.hd_proxy_auth);
  ------------------
  |  | 1327|    643|  do {                      \
  |  | 1328|    643|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    643|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    643|    (ptr) = NULL;           \
  |  | 1330|    643|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 643]
  |  |  ------------------
  ------------------
  848|       |
  849|  1.33k|out:
  850|  1.33k|  *done = (result == CURLE_OK) && tunnel_is_established(pctx->ts);
  ------------------
  |  Branch (850:11): [True: 643, False: 694]
  |  Branch (850:35): [True: 61, False: 582]
  ------------------
  851|  1.33k|  if(*done) {
  ------------------
  |  Branch (851:6): [True: 61, False: 1.27k]
  ------------------
  852|     61|    cf->connected = TRUE;
  ------------------
  |  | 1055|     61|#define TRUE true
  ------------------
  853|       |    /* The real request will follow the CONNECT, reset request partially */
  854|     61|    Curl_req_soft_reset(&data->req, data);
  855|     61|    Curl_client_reset(data);
  856|     61|    Curl_pgrsReset(data);
  857|     61|    cf_tunnel_free(cf, data);
  858|     61|  }
  859|  1.33k|  return result;
  860|    643|}
cf-h1-proxy.c:H1_CONNECT:
  692|  1.33k|{
  693|  1.33k|  struct connectdata *conn = cf->conn;
  694|  1.33k|  CURLcode result;
  695|  1.33k|  bool done;
  696|       |
  697|  1.33k|  if(tunnel_is_established(ts))
  ------------------
  |  Branch (697:6): [True: 0, False: 1.33k]
  ------------------
  698|      0|    return CURLE_OK;
  699|  1.33k|  if(tunnel_is_failed(ts))
  ------------------
  |  Branch (699:6): [True: 0, False: 1.33k]
  ------------------
  700|      0|    return CURLE_RECV_ERROR; /* Need a cfilter close and new bootstrap */
  701|       |
  702|  1.38k|  do {
  703|       |
  704|  1.38k|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (704:8): [True: 0, False: 1.38k]
  ------------------
  705|      0|      failf(data, "Proxy CONNECT aborted due to timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  706|      0|      result = CURLE_OPERATION_TIMEDOUT;
  707|      0|      goto out;
  708|      0|    }
  709|       |
  710|  1.38k|    switch(ts->tunnel_state) {
  711|    824|    case H1_TUNNEL_INIT:
  ------------------
  |  Branch (711:5): [True: 824, False: 558]
  ------------------
  712|       |      /* Prepare the CONNECT request and make a first attempt to send. */
  713|    824|      CURL_TRC_CF(data, cf, "CONNECT start");
  ------------------
  |  |  153|    824|  do {                                          \
  |  |  154|    824|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    824|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 824, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 824]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    824|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    824|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    824|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 824]
  |  |  ------------------
  ------------------
  714|    824|      result = start_CONNECT(cf, data, ts);
  715|    824|      if(result)
  ------------------
  |  Branch (715:10): [True: 1, False: 823]
  ------------------
  716|      1|        goto out;
  717|    823|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_CONNECT, data);
  718|    823|      FALLTHROUGH();
  ------------------
  |  |  821|    823|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  719|       |
  720|    823|    case H1_TUNNEL_CONNECT:
  ------------------
  |  Branch (720:5): [True: 0, False: 1.38k]
  ------------------
  721|       |      /* see that the request is completely sent */
  722|    823|      CURL_TRC_CF(data, cf, "CONNECT send");
  ------------------
  |  |  153|    823|  do {                                          \
  |  |  154|    823|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    823|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.64k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 823, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 823]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.64k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    823|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    823|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    823|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 823]
  |  |  ------------------
  ------------------
  723|    823|      result = send_CONNECT(cf, data, ts, &done);
  724|    823|      if(result || !done)
  ------------------
  |  Branch (724:10): [True: 0, False: 823]
  |  Branch (724:20): [True: 0, False: 823]
  ------------------
  725|      0|        goto out;
  726|    823|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RECEIVE, data);
  727|    823|      FALLTHROUGH();
  ------------------
  |  |  821|    823|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  728|       |
  729|  1.38k|    case H1_TUNNEL_RECEIVE:
  ------------------
  |  Branch (729:5): [True: 558, False: 824]
  ------------------
  730|       |      /* read what is there */
  731|  1.38k|      CURL_TRC_CF(data, cf, "CONNECT receive");
  ------------------
  |  |  153|  1.38k|  do {                                          \
  |  |  154|  1.38k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.38k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.76k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.38k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.76k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.38k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.38k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.38k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
  732|  1.38k|      result = recv_CONNECT_resp(cf, data, ts, &done);
  733|  1.38k|      if(result)
  ------------------
  |  Branch (733:10): [True: 586, False: 795]
  ------------------
  734|    586|        CURL_TRC_CF(data, cf, "error receiving CONNECT response: %d", result);
  ------------------
  |  |  153|    586|  do {                                          \
  |  |  154|    586|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    586|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.17k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 586, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 586]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.17k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    586|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    586|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    586|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 586]
  |  |  ------------------
  ------------------
  735|  1.38k|      if(!result)
  ------------------
  |  Branch (735:10): [True: 795, False: 586]
  ------------------
  736|    795|        result = Curl_pgrsUpdate(data);
  737|       |      /* error or not complete yet. return for more multi-multi */
  738|  1.38k|      if(result || !done)
  ------------------
  |  Branch (738:10): [True: 586, False: 795]
  |  Branch (738:20): [True: 575, False: 220]
  ------------------
  739|  1.16k|        goto out;
  740|       |      /* got it */
  741|    220|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_RESPONSE, data);
  742|    220|      FALLTHROUGH();
  ------------------
  |  |  821|    220|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  743|       |
  744|    220|    case H1_TUNNEL_RESPONSE:
  ------------------
  |  Branch (744:5): [True: 0, False: 1.38k]
  ------------------
  745|    220|      CURL_TRC_CF(data, cf, "CONNECT response");
  ------------------
  |  |  153|    220|  do {                                          \
  |  |  154|    220|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    220|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    440|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 220, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 220]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    440|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    220|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    220|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    220|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 220]
  |  |  ------------------
  ------------------
  746|    220|      if(data->req.newurl) {
  ------------------
  |  Branch (746:10): [True: 52, False: 168]
  ------------------
  747|       |        /* not the "final" response, we need to do a follow up request.
  748|       |         * If the other side indicated a connection close, or if someone
  749|       |         * else told us to close this connection, do so now.
  750|       |         */
  751|     52|        Curl_req_soft_reset(&data->req, data);
  752|     52|        if(ts->close_connection || conn->bits.close) {
  ------------------
  |  Branch (752:12): [True: 7, False: 45]
  |  Branch (752:36): [True: 0, False: 45]
  ------------------
  753|       |          /* Close this filter and the sub-chain, re-connect the
  754|       |           * sub-chain and continue. Closing this filter will
  755|       |           * reset our tunnel state. To avoid recursion, we return
  756|       |           * and expect to be called again.
  757|       |           */
  758|      7|          CURL_TRC_CF(data, cf, "CONNECT need to close+open");
  ------------------
  |  |  153|      7|  do {                                          \
  |  |  154|      7|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      7|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     14|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 7, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     14|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      7|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      7|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  759|      7|          infof(data, "Connect me again please");
  ------------------
  |  |  143|      7|  do {                               \
  |  |  144|      7|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      7|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 7, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  320|      7|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      7|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  760|      7|          Curl_conn_cf_close(cf, data);
  761|      7|          result = Curl_conn_cf_connect(cf->next, data, &done);
  762|      7|          return result;
  763|      7|        }
  764|     45|        else {
  765|       |          /* staying on this connection, reset state */
  766|     45|          h1_tunnel_go_state(cf, ts, H1_TUNNEL_INIT, data);
  767|     45|        }
  768|     52|      }
  769|    213|      break;
  770|       |
  771|    213|    default:
  ------------------
  |  Branch (771:5): [True: 0, False: 1.38k]
  ------------------
  772|      0|      break;
  773|  1.38k|    }
  774|       |
  775|  1.38k|  } while(data->req.newurl);
  ------------------
  |  Branch (775:11): [True: 45, False: 168]
  ------------------
  776|       |
  777|    168|  DEBUGASSERT(ts->tunnel_state == H1_TUNNEL_RESPONSE);
  ------------------
  |  | 1081|    168|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (777:3): [True: 0, False: 168]
  |  Branch (777:3): [True: 168, False: 0]
  ------------------
  778|    168|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (778:6): [True: 0, False: 168]
  ------------------
  779|       |    /* RFC 9298: Accept 101 Upgrade for HTTP/1.1 and
  780|       |     * 2xx responses for HTTP/2 and HTTP/3 proxies. */
  781|      0|    if(data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (781:8): [True: 0, False: 0]
  ------------------
  782|      0|       data->info.httpproxycode != 101) {
  ------------------
  |  Branch (782:8): [True: 0, False: 0]
  ------------------
  783|      0|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  784|      0|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  785|      0|      failf(data, "CONNECT-UDP tunnel failed, response %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  786|      0|            data->req.httpcode);
  787|      0|      return CURLE_COULDNT_CONNECT;
  788|      0|    }
  789|      0|  }
  790|    168|  else {
  791|    168|    if(data->info.httpproxycode / 100 != 2) {
  ------------------
  |  Branch (791:8): [True: 107, False: 61]
  ------------------
  792|       |      /* a non-2xx response and we have no next URL to try. */
  793|    107|      curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|    107|  do {                      \
  |  | 1328|    107|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    107|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    107|    (ptr) = NULL;           \
  |  | 1330|    107|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 107]
  |  |  ------------------
  ------------------
  794|    107|      h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  795|    107|      failf(data, "CONNECT tunnel failed, response %d", data->req.httpcode);
  ------------------
  |  |   62|    107|#define failf Curl_failf
  ------------------
  796|    107|      return CURLE_COULDNT_CONNECT;
  797|    107|    }
  798|    168|  }
  799|       |  /* 2xx response, SUCCESS! */
  800|       |  /* 101 Switching Protocol for CONNECT-UDP */
  801|     61|  h1_tunnel_go_state(cf, ts, H1_TUNNEL_ESTABLISHED, data);
  802|     61|  if(h1_proxy_is_udp(cf))
  ------------------
  |  Branch (802:6): [True: 0, False: 61]
  ------------------
  803|      0|    infof(data, "CONNECT-UDP tunnel established, response %d",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  804|     61|                                    data->info.httpproxycode);
  805|     61|  else
  806|     61|    infof(data, "CONNECT tunnel established, response %d",
  ------------------
  |  |  143|     61|  do {                               \
  |  |  144|     61|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     61|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 61, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 61]
  |  |  |  |  ------------------
  |  |  |  |  320|     61|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     61|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     61|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 61]
  |  |  ------------------
  ------------------
  807|     61|                                    data->info.httpproxycode);
  808|     61|  result = CURLE_OK;
  809|       |
  810|  1.22k|out:
  811|  1.22k|  if(result)
  ------------------
  |  Branch (811:6): [True: 587, False: 636]
  ------------------
  812|    587|    h1_tunnel_go_state(cf, ts, H1_TUNNEL_FAILED, data);
  813|  1.22k|  return result;
  814|     61|}
cf-h1-proxy.c:tunnel_is_failed:
   89|  1.33k|{
   90|  1.33k|  return ts && (ts->tunnel_state == H1_TUNNEL_FAILED);
  ------------------
  |  Branch (90:10): [True: 1.33k, False: 0]
  |  Branch (90:16): [True: 0, False: 1.33k]
  ------------------
   91|  1.33k|}
cf-h1-proxy.c:start_CONNECT:
  234|    824|{
  235|    824|  struct httpreq *req = NULL;
  236|    824|  int http_minor;
  237|    824|  CURLcode result;
  238|       |
  239|    824|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    824|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 824]
  |  Branch (239:3): [True: 824, False: 0]
  ------------------
  240|       |  /* This only happens if we have looped here due to authentication reasons,
  241|       |     and we do not really use the newly cloned URL here then. Free it. */
  242|    824|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|    824|  do {                      \
  |  | 1328|    824|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    824|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    824|    (ptr) = NULL;           \
  |  | 1330|    824|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 824]
  |  |  ------------------
  ------------------
  243|       |
  244|    824|  result = Curl_http_proxy_create_tunnel_request(&req, cf, data, ts->dest,
  245|    824|                                                  PROXY_HTTP_V1,
  246|    824|                                                  h1_proxy_is_udp(cf));
  247|    824|  if(result)
  ------------------
  |  Branch (247:6): [True: 1, False: 823]
  ------------------
  248|      1|    goto out;
  249|       |
  250|    823|  curlx_dyn_reset(&ts->request_data);
  251|    823|  ts->nsent = 0;
  252|    823|  ts->headerlines = 0;
  253|    823|  http_minor = ts->httpversion % 10;
  254|       |
  255|    823|  result = Curl_h1_req_write_head(req, http_minor, &ts->request_data);
  256|    823|  if(!result)
  ------------------
  |  Branch (256:6): [True: 823, False: 0]
  ------------------
  257|    823|    result = Curl_creader_set_null(data);
  258|       |
  259|    824|out:
  260|    824|  if(result)
  ------------------
  |  Branch (260:6): [True: 1, False: 823]
  ------------------
  261|      1|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  262|    824|  if(req)
  ------------------
  |  Branch (262:6): [True: 823, False: 1]
  ------------------
  263|    823|    Curl_http_req_free(req);
  264|    824|  return result;
  265|    823|}
cf-h1-proxy.c:send_CONNECT:
  271|    823|{
  272|    823|  const uint8_t *buf = curlx_dyn_uptr(&ts->request_data);
  273|    823|  size_t request_len = curlx_dyn_len(&ts->request_data);
  274|    823|  size_t blen = request_len;
  275|    823|  CURLcode result = CURLE_OK;
  276|    823|  size_t nwritten;
  277|       |
  278|    823|  if(blen <= ts->nsent)
  ------------------
  |  Branch (278:6): [True: 0, False: 823]
  ------------------
  279|      0|    goto out;  /* we are done */
  280|       |
  281|    823|  blen -= ts->nsent;
  282|    823|  buf += ts->nsent;
  283|       |
  284|    823|  result = cf->next->cft->do_send(cf->next, data, buf, blen, FALSE, &nwritten);
  ------------------
  |  | 1058|    823|#define FALSE false
  ------------------
  285|    823|  if(result) {
  ------------------
  |  Branch (285:6): [True: 0, False: 823]
  ------------------
  286|      0|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (286:8): [True: 0, False: 0]
  ------------------
  287|      0|      result = CURLE_OK;
  288|      0|    goto out;
  289|      0|  }
  290|       |
  291|    823|  DEBUGASSERT(blen >= nwritten);
  ------------------
  |  | 1081|    823|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (291:3): [True: 0, False: 823]
  |  Branch (291:3): [True: 823, False: 0]
  ------------------
  292|    823|  ts->nsent += nwritten;
  293|    823|  Curl_debug(data, CURLINFO_HEADER_OUT, (const char *)buf, nwritten);
  294|       |
  295|    823|out:
  296|    823|  if(result)
  ------------------
  |  Branch (296:6): [True: 0, False: 823]
  ------------------
  297|      0|    failf(data, "Failed sending CONNECT to proxy");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  298|    823|  *done = (!result && (ts->nsent >= request_len));
  ------------------
  |  Branch (298:12): [True: 823, False: 0]
  |  Branch (298:23): [True: 823, False: 0]
  ------------------
  299|    823|  return result;
  300|    823|}
cf-h1-proxy.c:recv_CONNECT_resp:
  544|  1.38k|{
  545|  1.38k|  CURLcode result = CURLE_OK;
  546|  1.38k|  int error;
  547|       |
  548|  1.38k|#define SELECT_OK      0
  549|  1.38k|#define SELECT_ERROR   1
  550|       |
  551|  1.38k|  error = SELECT_OK;
  ------------------
  |  |  548|  1.38k|#define SELECT_OK      0
  ------------------
  552|  1.38k|  *done = FALSE;
  ------------------
  |  | 1058|  1.38k|#define FALSE false
  ------------------
  553|       |
  554|  1.73M|  while(ts->keepon) {
  ------------------
  |  Branch (554:9): [True: 1.73M, False: 215]
  ------------------
  555|  1.73M|    size_t nread;
  556|  1.73M|    char byte;
  557|       |
  558|       |    /* Read one byte at a time to avoid a race condition. Wait at most one
  559|       |       second before looping to ensure continuous pgrsUpdates. */
  560|  1.73M|    result = Curl_conn_recv(data, cf->sockindex, &byte, 1, &nread);
  561|  1.73M|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (561:8): [True: 575, False: 1.73M]
  ------------------
  562|       |      /* socket buffer drained, return */
  563|    575|      return CURLE_OK;
  564|       |
  565|  1.73M|    if(!result)
  ------------------
  |  Branch (565:8): [True: 1.73M, False: 0]
  ------------------
  566|  1.73M|      result = Curl_pgrsUpdate(data);
  567|       |
  568|  1.73M|    if(result) {
  ------------------
  |  Branch (568:8): [True: 0, False: 1.73M]
  ------------------
  569|      0|      ts->keepon = KEEPON_DONE;
  570|      0|      break;
  571|      0|    }
  572|       |
  573|  1.73M|    if(!nread) {
  ------------------
  |  Branch (573:8): [True: 555, False: 1.73M]
  ------------------
  574|    555|      if(ts->maybe_folded) {
  ------------------
  |  Branch (574:10): [True: 5, False: 550]
  ------------------
  575|       |        /* EOF right after LF: finalize the pending header line. */
  576|      5|        result = single_header(cf, data, ts);
  577|      5|        if(result)
  ------------------
  |  Branch (577:12): [True: 0, False: 5]
  ------------------
  578|      0|          return result;
  579|      5|        ts->maybe_folded = FALSE;
  ------------------
  |  | 1058|      5|#define FALSE false
  ------------------
  580|      5|      }
  581|    555|      if(data->set.proxyauth && data->state.authproxy.avail &&
  ------------------
  |  Branch (581:10): [True: 554, False: 1]
  |  Branch (581:33): [True: 8, False: 546]
  ------------------
  582|      8|         data->req.hd_proxy_auth) {
  ------------------
  |  Branch (582:10): [True: 5, False: 3]
  ------------------
  583|       |        /* proxy auth was requested and there was proxy auth available,
  584|       |           then deem this as "mere" proxy disconnect */
  585|      5|        ts->close_connection = TRUE;
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
  586|      5|        infof(data, "Proxy CONNECT connection closed");
  ------------------
  |  |  143|      5|  do {                               \
  |  |  144|      5|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      5|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 5, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  320|      5|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      5|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      5|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 5]
  |  |  ------------------
  ------------------
  587|      5|      }
  588|    550|      else {
  589|    550|        error = SELECT_ERROR;
  ------------------
  |  |  549|    550|#define SELECT_ERROR   1
  ------------------
  590|    550|        failf(data, "Proxy CONNECT aborted");
  ------------------
  |  |   62|    550|#define failf Curl_failf
  ------------------
  591|    550|      }
  592|    555|      ts->keepon = KEEPON_DONE;
  593|    555|      break;
  594|    555|    }
  595|       |
  596|  1.73M|    if(ts->keepon == KEEPON_IGNORE) {
  ------------------
  |  Branch (596:8): [True: 70.6k, False: 1.66M]
  ------------------
  597|       |      /* This means we are currently ignoring a response-body */
  598|  70.6k|      if(ts->chunked_encoding) {
  ------------------
  |  Branch (598:10): [True: 64.7k, False: 5.91k]
  ------------------
  599|       |        /* chunked-encoded body, so we need to do the chunked dance
  600|       |           properly to know when the end of the body is reached */
  601|  64.7k|        size_t consumed = 0;
  602|       |
  603|       |        /* now parse the chunked piece of data so that we can
  604|       |           properly tell when the stream ends */
  605|  64.7k|        result = Curl_httpchunk_read(data, &ts->ch, &byte, 1, &consumed);
  606|  64.7k|        if(result)
  ------------------
  |  Branch (606:12): [True: 22, False: 64.7k]
  ------------------
  607|     22|          return result;
  608|  64.7k|        if(Curl_httpchunk_is_done(data, &ts->ch)) {
  ------------------
  |  Branch (608:12): [True: 16, False: 64.7k]
  ------------------
  609|       |          /* we are done reading chunks! */
  610|     16|          infof(data, "chunk reading DONE");
  ------------------
  |  |  143|     16|  do {                               \
  |  |  144|     16|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     16|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 16, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  320|     16|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     16|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     16|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 16]
  |  |  ------------------
  ------------------
  611|     16|          ts->keepon = KEEPON_DONE;
  612|     16|        }
  613|  64.7k|      }
  614|  5.91k|      else if(ts->cl) {
  ------------------
  |  Branch (614:15): [True: 5.91k, False: 0]
  ------------------
  615|       |        /* A Content-Length based body: count down the counter
  616|       |           and make sure to break out of the loop when we are done! */
  617|  5.91k|        ts->cl--;
  618|  5.91k|        if(ts->cl <= 0) {
  ------------------
  |  Branch (618:12): [True: 8, False: 5.90k]
  ------------------
  619|      8|          ts->keepon = KEEPON_DONE;
  620|      8|          break;
  621|      8|        }
  622|  5.91k|      }
  623|  70.6k|      continue;
  624|  70.6k|    }
  625|       |
  626|  1.66M|    if(ts->maybe_folded) {
  ------------------
  |  Branch (626:8): [True: 34.8k, False: 1.63M]
  ------------------
  627|  34.8k|      if(ISBLANK(byte)) {
  ------------------
  |  |   45|  34.8k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1.04k, False: 33.7k]
  |  |  |  Branch (45:38): [True: 2.38k, False: 31.4k]
  |  |  ------------------
  ------------------
  628|  3.43k|        Curl_http_to_fold(&ts->rcvbuf);
  629|  3.43k|        ts->leading_unfold = TRUE;
  ------------------
  |  | 1055|  3.43k|#define TRUE true
  ------------------
  630|  3.43k|      }
  631|  31.4k|      else {
  632|  31.4k|        result = single_header(cf, data, ts);
  633|  31.4k|        if(result)
  ------------------
  |  Branch (633:12): [True: 4, False: 31.4k]
  ------------------
  634|      4|          return result;
  635|       |        /* now handle the new byte */
  636|  31.4k|      }
  637|  34.8k|      ts->maybe_folded = FALSE;
  ------------------
  |  | 1058|  34.8k|#define FALSE false
  ------------------
  638|  34.8k|    }
  639|       |
  640|  1.66M|    if(ts->leading_unfold) {
  ------------------
  |  Branch (640:8): [True: 8.15k, False: 1.65M]
  ------------------
  641|  8.15k|      if(ISBLANK(byte))
  ------------------
  |  |   45|  8.15k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1.63k, False: 6.51k]
  |  |  |  Branch (45:38): [True: 3.08k, False: 3.43k]
  |  |  ------------------
  ------------------
  642|       |        /* skip a bit brother */
  643|  4.71k|        continue;
  644|       |      /* non-blank, insert a space then continue the unfolding */
  645|  3.43k|      if(curlx_dyn_addn(&ts->rcvbuf, " ", 1)) {
  ------------------
  |  Branch (645:10): [True: 0, False: 3.43k]
  ------------------
  646|      0|        failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  647|      0|        return CURLE_RECV_ERROR;
  648|      0|      }
  649|  3.43k|      ts->leading_unfold = FALSE;
  ------------------
  |  | 1058|  3.43k|#define FALSE false
  ------------------
  650|  3.43k|    }
  651|  1.66M|    if(curlx_dyn_addn(&ts->rcvbuf, &byte, 1)) {
  ------------------
  |  Branch (651:8): [True: 1, False: 1.66M]
  ------------------
  652|      1|      failf(data, "CONNECT response too large");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  653|      1|      return CURLE_RECV_ERROR;
  654|      1|    }
  655|       |
  656|       |    /* if this is not the end of a header line then continue */
  657|  1.66M|    if(byte != 0x0a)
  ------------------
  |  Branch (657:8): [True: 1.62M, False: 35.2k]
  ------------------
  658|  1.62M|      continue;
  659|  35.2k|    else {
  660|  35.2k|      const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  661|  35.2k|      size_t hlen = curlx_dyn_len(&ts->rcvbuf);
  662|  35.2k|      if(hlen && ISNEWLINE(linep[0])) {
  ------------------
  |  |   50|  35.2k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 379, False: 34.8k]
  |  |  |  Branch (50:43): [True: 18, False: 34.8k]
  |  |  ------------------
  ------------------
  |  Branch (662:10): [True: 35.2k, False: 0]
  ------------------
  663|       |        /* end of headers */
  664|    397|        result = single_header(cf, data, ts);
  665|    397|        if(result)
  ------------------
  |  Branch (665:12): [True: 1, False: 396]
  ------------------
  666|      1|          return result;
  667|    397|      }
  668|  34.8k|      else
  669|  34.8k|        ts->maybe_folded = TRUE;
  ------------------
  |  | 1055|  34.8k|#define TRUE true
  ------------------
  670|  35.2k|    }
  671|       |
  672|  35.2k|    if(result)
  ------------------
  |  Branch (672:8): [True: 0, False: 35.2k]
  ------------------
  673|      0|      return result;
  674|  35.2k|  } /* while there is buffer left and loop is requested */
  675|       |
  676|    778|  if(error)
  ------------------
  |  Branch (676:6): [True: 550, False: 228]
  ------------------
  677|    550|    result = CURLE_RECV_ERROR;
  678|    778|  *done = (ts->keepon == KEEPON_DONE);
  679|    778|  if(!result && *done &&
  ------------------
  |  Branch (679:6): [True: 228, False: 550]
  |  Branch (679:17): [True: 228, False: 0]
  ------------------
  680|    228|     data->info.httpproxycode / 100 != 2 &&
  ------------------
  |  Branch (680:6): [True: 167, False: 61]
  ------------------
  681|    167|     !(h1_proxy_is_udp(cf) && data->info.httpproxycode == 101)) {
  ------------------
  |  Branch (681:8): [True: 0, False: 167]
  |  Branch (681:31): [True: 0, False: 0]
  ------------------
  682|       |    /* Deal with the possibly already received authenticate
  683|       |       headers. 'newurl' is set to a new URL if we must loop. */
  684|    167|    result = Curl_http_auth_act(data);
  685|    167|  }
  686|    778|  return result;
  687|  1.38k|}
cf-h1-proxy.c:single_header:
  468|  31.8k|{
  469|  31.8k|  CURLcode result = CURLE_OK;
  470|  31.8k|  const char *linep = curlx_dyn_ptr(&ts->rcvbuf);
  471|  31.8k|  size_t line_len = curlx_dyn_len(&ts->rcvbuf); /* bytes in this line */
  472|  31.8k|  const struct SingleRequest *k = &data->req;
  473|  31.8k|  int writetype;
  474|  31.8k|  ts->headerlines++;
  475|       |
  476|       |  /* output debug if that is requested */
  477|  31.8k|  Curl_debug(data, CURLINFO_HEADER_IN, linep, line_len);
  478|       |
  479|       |  /* send the header to the callback */
  480|  31.8k|  writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   44|  31.8k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
  ------------------
  |  |   46|  31.8k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  481|  31.8k|    (ts->headerlines == 1 ? CLIENTWRITE_STATUS : 0);
  ------------------
  |  |   45|    644|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
  |  Branch (481:6): [True: 644, False: 31.1k]
  ------------------
  482|  31.8k|  result = Curl_client_write(data, writetype, linep, line_len);
  483|  31.8k|  if(result)
  ------------------
  |  Branch (483:6): [True: 1, False: 31.8k]
  ------------------
  484|      1|    return result;
  485|       |
  486|  31.8k|  result = Curl_bump_headersize(data, line_len, TRUE);
  ------------------
  |  | 1055|  31.8k|#define TRUE true
  ------------------
  487|  31.8k|  if(result)
  ------------------
  |  Branch (487:6): [True: 0, False: 31.8k]
  ------------------
  488|      0|    return result;
  489|       |
  490|       |  /* Newlines are CRLF, so the CR is ignored as the line is not
  491|       |     really terminated until the LF comes. Treat a following CR
  492|       |     as end-of-headers as well.*/
  493|       |
  494|  31.8k|  if(ISNEWLINE(linep[0])) {
  ------------------
  |  |   50|  31.8k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 379, False: 31.4k]
  |  |  |  Branch (50:43): [True: 17, False: 31.4k]
  |  |  ------------------
  ------------------
  495|       |    /* end of response-headers from the proxy */
  496|       |
  497|    396|    if((407 == k->httpcode) && !data->state.authproblem) {
  ------------------
  |  Branch (497:8): [True: 225, False: 171]
  |  Branch (497:32): [True: 219, False: 6]
  ------------------
  498|       |      /* If we get a 407 response code with content length
  499|       |         when we have no auth problem, we must ignore the
  500|       |         whole response-body */
  501|    219|      ts->keepon = KEEPON_IGNORE;
  502|       |
  503|    219|      if(ts->cl) {
  ------------------
  |  Branch (503:10): [True: 56, False: 163]
  ------------------
  504|     56|        infof(data, "Ignore %" FMT_OFF_T " bytes of response-body", ts->cl);
  ------------------
  |  |  143|     56|  do {                               \
  |  |  144|     56|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     56|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 56, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 56]
  |  |  |  |  ------------------
  |  |  |  |  320|     56|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     56|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     56|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 56]
  |  |  ------------------
  ------------------
  505|     56|      }
  506|    163|      else if(ts->chunked_encoding) {
  ------------------
  |  Branch (506:15): [True: 141, False: 22]
  ------------------
  507|    141|        infof(data, "Ignore chunked response-body");
  ------------------
  |  |  143|    141|  do {                               \
  |  |  144|    141|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    141|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 141, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 141]
  |  |  |  |  ------------------
  |  |  |  |  320|    141|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    141|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    141|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 141]
  |  |  ------------------
  ------------------
  508|    141|      }
  509|     22|      else {
  510|       |        /* without content-length or chunked encoding, we
  511|       |           cannot keep the connection alive since the close is
  512|       |           the end signal so we bail out at once instead */
  513|     22|        CURL_TRC_CF(data, cf, "CONNECT: no content-length or chunked");
  ------------------
  |  |  153|     22|  do {                                          \
  |  |  154|     22|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     22|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     44|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 22, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     44|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     22|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     22|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     22|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 22]
  |  |  ------------------
  ------------------
  514|     22|        ts->keepon = KEEPON_DONE;
  515|     22|      }
  516|    219|    }
  517|    177|    else {
  518|    177|      ts->keepon = KEEPON_DONE;
  519|    177|    }
  520|       |
  521|    396|    DEBUGASSERT(ts->keepon == KEEPON_IGNORE ||
  ------------------
  |  | 1081|    396|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (521:5): [True: 396, False: 0]
  |  Branch (521:5): [True: 0, False: 0]
  |  Branch (521:5): [True: 197, False: 199]
  |  Branch (521:5): [True: 199, False: 0]
  ------------------
  522|    396|                ts->keepon == KEEPON_DONE);
  523|    396|    return result;
  524|    396|  }
  525|       |
  526|  31.4k|  if(h1_proxy_is_udp(cf)) {
  ------------------
  |  Branch (526:6): [True: 0, False: 31.4k]
  ------------------
  527|      0|    result = on_resp_header_udp(cf, data, ts, linep);
  528|      0|  }
  529|  31.4k|  else {
  530|  31.4k|    result = on_resp_header(cf, data, ts, linep);
  531|  31.4k|  }
  532|       |
  533|  31.4k|  if(result)
  ------------------
  |  Branch (533:6): [True: 4, False: 31.4k]
  ------------------
  534|      4|    return result;
  535|       |
  536|  31.4k|  curlx_dyn_reset(&ts->rcvbuf);
  537|  31.4k|  return result;
  538|  31.4k|}
cf-h1-proxy.c:on_resp_header:
  392|  31.4k|{
  393|  31.4k|  CURLcode result = CURLE_OK;
  394|  31.4k|  struct SingleRequest *k = &data->req;
  395|  31.4k|  (void)cf;
  396|       |
  397|  31.4k|  if((checkprefix("WWW-Authenticate:", header) && (401 == k->httpcode)) ||
  ------------------
  |  |   33|  62.8k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  31.4k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 839, False: 30.5k]
  |  |  ------------------
  ------------------
  |  Branch (397:51): [True: 591, False: 248]
  ------------------
  398|  30.8k|     (checkprefix("Proxy-authenticate:", header) && (407 == k->httpcode))) {
  ------------------
  |  |   33|  61.6k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  30.8k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1.41k, False: 29.4k]
  |  |  ------------------
  ------------------
  |  Branch (398:53): [True: 375, False: 1.03k]
  ------------------
  399|       |
  400|    966|    bool proxy = (k->httpcode == 407);
  401|    966|    char *auth = Curl_copy_header_value(header);
  402|    966|    if(!auth)
  ------------------
  |  Branch (402:8): [True: 0, False: 966]
  ------------------
  403|      0|      return CURLE_OUT_OF_MEMORY;
  404|       |
  405|    966|    CURL_TRC_CF(data, cf, "CONNECT: fwd auth header '%s'", header);
  ------------------
  |  |  153|    966|  do {                                          \
  |  |  154|    966|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    966|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.93k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 966, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 966]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.93k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    966|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    966|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    966|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 966]
  |  |  ------------------
  ------------------
  406|    966|    result = Curl_http_input_auth(data, proxy, auth);
  407|       |
  408|    966|    curlx_free(auth);
  ------------------
  |  | 1483|    966|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  409|       |
  410|    966|    if(result)
  ------------------
  |  Branch (410:8): [True: 0, False: 966]
  ------------------
  411|      0|      return result;
  412|    966|  }
  413|  30.4k|  else if(checkprefix("Content-Length:", header)) {
  ------------------
  |  |   33|  30.4k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  30.4k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 557, False: 29.8k]
  |  |  ------------------
  ------------------
  414|    557|    if(k->httpcode / 100 == 2) {
  ------------------
  |  Branch (414:8): [True: 293, False: 264]
  ------------------
  415|       |      /* A client MUST ignore any Content-Length or Transfer-Encoding
  416|       |         header fields received in a successful response to CONNECT.
  417|       |         "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
  418|    293|      infof(data, "Ignoring Content-Length in CONNECT %03d response",
  ------------------
  |  |  143|    293|  do {                               \
  |  |  144|    293|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    293|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 293, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 293]
  |  |  |  |  ------------------
  |  |  |  |  320|    293|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    293|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    293|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 293]
  |  |  ------------------
  ------------------
  419|    293|            k->httpcode);
  420|    293|    }
  421|    264|    else {
  422|    264|      const char *p = header + strlen("Content-Length:");
  423|    264|      if(curlx_str_numblanks(&p, &ts->cl)) {
  ------------------
  |  Branch (423:10): [True: 4, False: 260]
  ------------------
  424|      4|        failf(data, "Unsupported Content-Length value");
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  425|      4|        return CURLE_WEIRD_SERVER_REPLY;
  426|      4|      }
  427|    264|    }
  428|    557|  }
  429|  29.8k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (429:11): [True: 507, False: 29.3k]
  ------------------
  430|  29.8k|                             STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1292|  29.8k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
                                           STRCONST("Connection:"), STRCONST("close")))
  ------------------
  |  | 1292|  29.8k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  431|    507|    ts->close_connection = TRUE;
  ------------------
  |  | 1055|    507|#define TRUE true
  ------------------
  432|  29.3k|  else if(checkprefix("Transfer-Encoding:", header)) {
  ------------------
  |  |   33|  29.3k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  29.3k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 2.55k, False: 26.8k]
  |  |  ------------------
  ------------------
  433|  2.55k|    if(k->httpcode / 100 == 2) {
  ------------------
  |  Branch (433:8): [True: 608, False: 1.94k]
  ------------------
  434|       |      /* A client MUST ignore any Content-Length or Transfer-Encoding
  435|       |         header fields received in a successful response to CONNECT.
  436|       |         "Successful" described as: 2xx (Successful). RFC 7231 4.3.6 */
  437|    608|      infof(data, "Ignoring Transfer-Encoding in "
  ------------------
  |  |  143|    608|  do {                               \
  |  |  144|    608|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    608|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 608, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 608]
  |  |  |  |  ------------------
  |  |  |  |  320|    608|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    608|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    608|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 608]
  |  |  ------------------
  ------------------
  438|    608|            "CONNECT %03d response", k->httpcode);
  439|    608|    }
  440|  1.94k|    else if(Curl_compareheader(header,
  ------------------
  |  Branch (440:13): [True: 1.00k, False: 943]
  ------------------
  441|  1.94k|                               STRCONST("Transfer-Encoding:"),
  ------------------
  |  | 1292|  1.94k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  442|  1.94k|                               STRCONST("chunked"))) {
  ------------------
  |  | 1292|  1.94k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  443|  1.00k|      infof(data, "CONNECT responded chunked");
  ------------------
  |  |  143|  1.00k|  do {                               \
  |  |  144|  1.00k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.00k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.00k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.00k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.00k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.00k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.00k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
  444|  1.00k|      ts->chunked_encoding = TRUE;
  ------------------
  |  | 1055|  1.00k|#define TRUE true
  ------------------
  445|       |      /* reset our chunky engine */
  446|  1.00k|      Curl_httpchunk_reset(data, &ts->ch, TRUE);
  ------------------
  |  | 1055|  1.00k|#define TRUE true
  ------------------
  447|  1.00k|    }
  448|  2.55k|  }
  449|  26.8k|  else if(Curl_compareheader(header,
  ------------------
  |  Branch (449:11): [True: 0, False: 26.8k]
  ------------------
  450|  26.8k|                             STRCONST("Proxy-Connection:"),
  ------------------
  |  | 1292|  26.8k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  451|  26.8k|                             STRCONST("close")))
  ------------------
  |  | 1292|  26.8k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  452|      0|    ts->close_connection = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  453|  26.8k|  else if(!strncmp(header, "HTTP/1.", 7) &&
  ------------------
  |  Branch (453:11): [True: 2.54k, False: 24.2k]
  ------------------
  454|  2.54k|          ((header[7] == '0') || (header[7] == '1')) &&
  ------------------
  |  Branch (454:12): [True: 936, False: 1.60k]
  |  Branch (454:34): [True: 1.34k, False: 260]
  ------------------
  455|  2.28k|          (header[8] == ' ') &&
  ------------------
  |  Branch (455:11): [True: 2.22k, False: 62]
  ------------------
  456|  2.22k|          ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  29.0k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 2.13k, False: 90]
  |  |  |  Branch (44:38): [True: 1.57k, False: 554]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  28.4k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.49k, False: 82]
  |  |  |  Branch (44:38): [True: 1.45k, False: 45]
  |  |  ------------------
  ------------------
                        ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
  ------------------
  |  |   44|  28.2k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.40k, False: 51]
  |  |  |  Branch (44:38): [True: 1.32k, False: 78]
  |  |  ------------------
  ------------------
  457|  1.32k|          !ISDIGIT(header[12])) {
  ------------------
  |  |   44|  1.32k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 216, False: 1.10k]
  |  |  |  Branch (44:38): [True: 21, False: 195]
  |  |  ------------------
  ------------------
  458|       |    /* store the HTTP code from the proxy */
  459|  1.30k|    data->info.httpproxycode = k->httpcode = ((header[9] - '0') * 100) +
  460|  1.30k|      ((header[10] - '0') * 10) + (header[11] - '0');
  461|  1.30k|  }
  462|  31.4k|  return result;
  463|  31.4k|}
cf-h1-proxy.c:tunnel_is_established:
   84|  1.98k|{
   85|  1.98k|  return ts && (ts->tunnel_state == H1_TUNNEL_ESTABLISHED);
  ------------------
  |  Branch (85:10): [True: 1.98k, False: 0]
  |  Branch (85:16): [True: 61, False: 1.91k]
  ------------------
   86|  1.98k|}
cf-h1-proxy.c:cf_h1_proxy_close:
  910|    779|{
  911|    779|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  912|    779|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|    779|  do {                                          \
  |  |  154|    779|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    779|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 779, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 779]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    779|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    779|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    779|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 779]
  |  |  ------------------
  ------------------
  913|    779|  cf->connected = FALSE;
  ------------------
  |  | 1058|    779|#define FALSE false
  ------------------
  914|    779|  if(pctx && pctx->ts)
  ------------------
  |  Branch (914:6): [True: 779, False: 0]
  |  Branch (914:14): [True: 718, False: 61]
  ------------------
  915|    718|    h1_tunnel_go_state(cf, pctx->ts, H1_TUNNEL_INIT, data);
  916|    779|  if(cf->next)
  ------------------
  |  Branch (916:6): [True: 779, False: 0]
  ------------------
  917|    779|    cf->next->cft->do_close(cf->next, data);
  918|    779|}
cf-h1-proxy.c:cf_h1_proxy_adjust_pollset:
  865|    687|{
  866|    687|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  867|    687|  struct h1_tunnel_state *ts = pctx->ts;
  868|    687|  CURLcode result = CURLE_OK;
  869|       |
  870|    687|  if(!cf->connected) {
  ------------------
  |  Branch (870:6): [True: 582, False: 105]
  ------------------
  871|       |    /* If we are not connected, but the filter "below" is
  872|       |     * and not waiting on something, we are tunneling. */
  873|    582|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
  874|    582|    if(ts) {
  ------------------
  |  Branch (874:8): [True: 582, False: 0]
  ------------------
  875|       |      /* when we have sent a CONNECT to a proxy, we should rather either
  876|       |         wait for the socket to become readable to be able to get the
  877|       |         response headers or if we are still sending the request, wait
  878|       |         for write. */
  879|    582|      if(tunnel_want_send(ts))
  ------------------
  |  Branch (879:10): [True: 0, False: 582]
  ------------------
  880|      0|        result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  881|    582|      else
  882|    582|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|    582|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    582|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    582|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  883|    582|    }
  884|      0|    else
  885|      0|      result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  886|    582|  }
  887|    105|  else {
  888|    105|    if(cf->next)
  ------------------
  |  Branch (888:8): [True: 105, False: 0]
  ------------------
  889|    105|      result = cf->next->cft->adjust_pollset(cf->next, data, ps);
  890|    105|  }
  891|    687|  return result;
  892|    687|}
cf-h1-proxy.c:tunnel_want_send:
  227|    582|{
  228|    582|  return ts->tunnel_state == H1_TUNNEL_CONNECT;
  229|    582|}
cf-h1-proxy.c:cf_h1_proxy_data_pending:
  896|    115|{
  897|    115|  return cf->next ? cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1058|    115|#define FALSE false
  ------------------
  |  Branch (897:10): [True: 115, False: 0]
  ------------------
  898|    115|}
cf-h1-proxy.c:cf_h1_proxy_query:
  923|  3.52k|{
  924|  3.52k|  struct cf_h1_proxy_ctx *pctx = cf->ctx;
  925|  3.52k|  struct h1_tunnel_state *ts = pctx ? pctx->ts : NULL;
  ------------------
  |  Branch (925:32): [True: 3.52k, False: 0]
  ------------------
  926|  3.52k|  switch(query) {
  927|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  177|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (927:3): [True: 0, False: 3.52k]
  ------------------
  928|      0|    if(!ts || !ts->dest)
  ------------------
  |  Branch (928:8): [True: 0, False: 0]
  |  Branch (928:15): [True: 0, False: 0]
  ------------------
  929|      0|      break;
  930|      0|    *pres1 = (int)ts->dest->port;
  931|      0|    *((const char **)pres2) = ts->dest->hostname;
  932|      0|    return CURLE_OK;
  933|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (933:3): [True: 0, False: 3.52k]
  ------------------
  934|      0|    const char **palpn = pres2;
  935|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (935:5): [True: 0, False: 0]
  |  Branch (935:5): [True: 0, False: 0]
  ------------------
  936|      0|    *palpn = NULL;
  937|      0|    return CURLE_OK;
  938|      0|  }
  939|  3.52k|  default:
  ------------------
  |  Branch (939:3): [True: 3.52k, False: 0]
  ------------------
  940|  3.52k|    break;
  941|  3.52k|  }
  942|  3.52k|  return cf->next ?
  ------------------
  |  Branch (942:10): [True: 3.52k, False: 0]
  ------------------
  943|  3.52k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  944|  3.52k|    CURLE_UNKNOWN_OPTION;
  945|  3.52k|}
cf-h1-proxy.c:tunnel_free:
  202|  1.54k|{
  203|  1.54k|  if(ts) {
  ------------------
  |  Branch (203:6): [True: 772, False: 772]
  ------------------
  204|    772|    Curl_peer_unlink(&ts->dest);
  205|    772|    curlx_dyn_free(&ts->rcvbuf);
  206|    772|    curlx_dyn_free(&ts->request_data);
  207|    772|    Curl_httpchunk_free(data, &ts->ch);
  208|    772|    curlx_free(ts);
  ------------------
  |  | 1483|    772|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  209|    772|  }
  210|  1.54k|}

Curl_cf_haproxy_insert_after:
  246|    302|{
  247|    302|  struct Curl_cfilter *cf;
  248|    302|  CURLcode result;
  249|       |
  250|    302|  result = cf_haproxy_create(&cf, data);
  251|    302|  if(result)
  ------------------
  |  Branch (251:6): [True: 0, False: 302]
  ------------------
  252|      0|    goto out;
  253|    302|  Curl_conn_cf_insert_after(cf_at, cf);
  254|       |
  255|    302|out:
  256|    302|  return result;
  257|    302|}
cf-haproxy.c:cf_haproxy_destroy:
  171|    302|{
  172|    302|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|    302|  do {                                          \
  |  |  154|    302|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    302|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    604|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 302, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 302]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    604|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    302|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    302|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    302|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 302]
  |  |  ------------------
  ------------------
  173|    302|  cf_haproxy_ctx_free(cf->ctx);
  174|    302|}
cf-haproxy.c:cf_haproxy_ctx_free:
   56|    604|{
   57|    604|  if(ctx) {
  ------------------
  |  Branch (57:6): [True: 302, False: 302]
  ------------------
   58|    302|    curlx_dyn_free(&ctx->data_out);
   59|    302|    curlx_free(ctx);
  ------------------
  |  | 1483|    302|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   60|    302|  }
   61|    604|}
cf-haproxy.c:cf_haproxy_connect:
  115|    302|{
  116|    302|  struct cf_haproxy_ctx *ctx = cf->ctx;
  117|    302|  CURLcode result;
  118|    302|  size_t len;
  119|       |
  120|    302|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|    302|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (120:3): [True: 0, False: 302]
  |  Branch (120:3): [True: 302, False: 0]
  ------------------
  121|    302|  if(cf->connected) {
  ------------------
  |  Branch (121:6): [True: 0, False: 302]
  ------------------
  122|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  123|      0|    return CURLE_OK;
  124|      0|  }
  125|       |
  126|    302|  result = cf->next->cft->do_connect(cf->next, data, done);
  127|    302|  if(result || !*done)
  ------------------
  |  Branch (127:6): [True: 0, False: 302]
  |  Branch (127:16): [True: 0, False: 302]
  ------------------
  128|      0|    return result;
  129|       |
  130|    302|  switch(ctx->state) {
  131|    302|  case HAPROXY_INIT:
  ------------------
  |  Branch (131:3): [True: 302, False: 0]
  ------------------
  132|    302|    result = cf_haproxy_date_out_set(cf, data);
  133|    302|    if(result)
  ------------------
  |  Branch (133:8): [True: 1, False: 301]
  ------------------
  134|      1|      goto out;
  135|    301|    ctx->state = HAPROXY_SEND;
  136|    301|    FALLTHROUGH();
  ------------------
  |  |  821|    301|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  137|    301|  case HAPROXY_SEND:
  ------------------
  |  Branch (137:3): [True: 0, False: 302]
  ------------------
  138|    301|    len = curlx_dyn_len(&ctx->data_out);
  139|    301|    if(len > 0) {
  ------------------
  |  Branch (139:8): [True: 301, False: 0]
  ------------------
  140|    301|      size_t nwritten;
  141|    301|      result = Curl_conn_cf_send(cf->next, data,
  142|    301|                                 curlx_dyn_uptr(&ctx->data_out), len, FALSE,
  ------------------
  |  | 1058|    301|#define FALSE false
  ------------------
  143|    301|                                 &nwritten);
  144|    301|      if(result) {
  ------------------
  |  Branch (144:10): [True: 0, False: 301]
  ------------------
  145|      0|        if(result != CURLE_AGAIN)
  ------------------
  |  Branch (145:12): [True: 0, False: 0]
  ------------------
  146|      0|          goto out;
  147|      0|        result = CURLE_OK;
  148|      0|        nwritten = 0;
  149|      0|      }
  150|    301|      curlx_dyn_tail(&ctx->data_out, len - nwritten);
  151|    301|      if(curlx_dyn_len(&ctx->data_out) > 0) {
  ------------------
  |  Branch (151:10): [True: 0, False: 301]
  ------------------
  152|      0|        result = CURLE_OK;
  153|      0|        goto out;
  154|      0|      }
  155|    301|    }
  156|    301|    ctx->state = HAPROXY_DONE;
  157|    301|    FALLTHROUGH();
  ------------------
  |  |  821|    301|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  158|    301|  default:
  ------------------
  |  Branch (158:3): [True: 0, False: 302]
  ------------------
  159|    301|    curlx_dyn_free(&ctx->data_out);
  160|    301|    break;
  161|    302|  }
  162|       |
  163|    302|out:
  164|    302|  *done = (!result) && (ctx->state == HAPROXY_DONE);
  ------------------
  |  Branch (164:11): [True: 301, False: 1]
  |  Branch (164:24): [True: 301, False: 0]
  ------------------
  165|    302|  cf->connected = *done;
  166|    302|  return result;
  167|    302|}
cf-haproxy.c:cf_haproxy_date_out_set:
   65|    302|{
   66|       |  /* We fake a client connection report to the upstream server
   67|       |   * with the HAProxy protocol, reporting the client's source
   68|       |   * and destination IP addresses and ports.
   69|       |   * addresses: either the ones used to talk to the upstream
   70|       |   *            OR the value supplied by the user
   71|       |   * ports: the ports used in the upstream connection */
   72|    302|  const char *client_source_ip;
   73|    302|  const char *client_dest_ip;
   74|    302|  struct cf_haproxy_ctx *ctx = cf->ctx;
   75|    302|  CURLcode result;
   76|    302|  struct ip_quadruple ipquad;
   77|    302|  bool is_ipv6;
   78|       |
   79|    302|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|    302|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 302]
  |  Branch (79:3): [True: 302, False: 0]
  ------------------
   80|    302|  DEBUGASSERT(ctx->state == HAPROXY_INIT);
  ------------------
  |  | 1081|    302|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 0, False: 302]
  |  Branch (80:3): [True: 302, False: 0]
  ------------------
   81|    302|#ifdef USE_UNIX_SOCKETS
   82|    302|  if(Curl_conn_get_first_peer(cf->conn, cf->sockindex)->unix_socket)
  ------------------
  |  Branch (82:6): [True: 194, False: 108]
  ------------------
   83|       |    /* the buffer is large enough to hold this! */
   84|    194|    result = curlx_dyn_addn(&ctx->data_out, STRCONST("PROXY UNKNOWN\r\n"));
  ------------------
  |  | 1292|    194|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   85|    108|  else {
   86|    108|#endif /* USE_UNIX_SOCKETS */
   87|    108|  result = Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad);
   88|    108|  if(result)
  ------------------
  |  Branch (88:6): [True: 0, False: 108]
  ------------------
   89|      0|    return result;
   90|       |
   91|    108|  if(data->set.str[STRING_HAPROXY_CLIENT_IP]) {
  ------------------
  |  Branch (91:6): [True: 95, False: 13]
  ------------------
   92|     95|    client_source_ip = data->set.str[STRING_HAPROXY_CLIENT_IP];
   93|     95|    client_dest_ip = client_source_ip;
   94|     95|    is_ipv6 = !Curl_is_ipv4addr(client_source_ip);
   95|     95|  }
   96|     13|  else {
   97|     13|    client_source_ip = ipquad.local_ip;
   98|     13|    client_dest_ip = ipquad.remote_ip;
   99|     13|  }
  100|       |
  101|    108|  result = curlx_dyn_addf(&ctx->data_out, "PROXY %s %s %s %i %i\r\n",
  102|    108|                          is_ipv6 ? "TCP6" : "TCP4",
  ------------------
  |  Branch (102:27): [True: 95, False: 13]
  ------------------
  103|    108|                          client_source_ip, client_dest_ip,
  104|    108|                          ipquad.local_port, ipquad.remote_port);
  105|       |
  106|    108|#ifdef USE_UNIX_SOCKETS
  107|    108|  }
  108|    302|#endif /* USE_UNIX_SOCKETS */
  109|    302|  return result;
  110|    302|}
cf-haproxy.c:cf_haproxy_close:
  178|      1|{
  179|      1|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      1|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  180|      1|  cf->connected = FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
  181|      1|  cf_haproxy_ctx_reset(cf->ctx);
  182|      1|  if(cf->next)
  ------------------
  |  Branch (182:6): [True: 1, False: 0]
  ------------------
  183|      1|    cf->next->cft->do_close(cf->next, data);
  184|      1|}
cf-haproxy.c:cf_haproxy_ctx_reset:
   49|      1|{
   50|      1|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|      1|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (50:3): [True: 0, False: 1]
  |  Branch (50:3): [True: 1, False: 0]
  ------------------
   51|      1|  ctx->state = HAPROXY_INIT;
   52|      1|  curlx_dyn_reset(&ctx->data_out);
   53|      1|}
cf-haproxy.c:cf_haproxy_create:
  219|    302|{
  220|    302|  struct Curl_cfilter *cf = NULL;
  221|    302|  struct cf_haproxy_ctx *ctx;
  222|    302|  CURLcode result;
  223|       |
  224|    302|  (void)data;
  225|    302|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|    302|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  226|    302|  if(!ctx) {
  ------------------
  |  Branch (226:6): [True: 0, False: 302]
  ------------------
  227|      0|    result = CURLE_OUT_OF_MEMORY;
  228|      0|    goto out;
  229|      0|  }
  230|    302|  ctx->state = HAPROXY_INIT;
  231|    302|  curlx_dyn_init(&ctx->data_out, DYN_HAXPROXY);
  ------------------
  |  |   68|    302|#define DYN_HAXPROXY        2048
  ------------------
  232|       |
  233|    302|  result = Curl_cf_create(&cf, &Curl_cft_haproxy, ctx);
  234|    302|  if(result)
  ------------------
  |  Branch (234:6): [True: 0, False: 302]
  ------------------
  235|      0|    goto out;
  236|    302|  ctx = NULL;
  237|       |
  238|    302|out:
  239|    302|  cf_haproxy_ctx_free(ctx);
  240|    302|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (240:10): [True: 0, False: 302]
  ------------------
  241|    302|  return result;
  242|    302|}

Curl_cf_https_setup:
  820|    417|{
  821|    417|  CURLcode result = CURLE_OK;
  822|       |
  823|    417|  DEBUGASSERT(conn->scheme->protocol == CURLPROTO_HTTPS);
  ------------------
  |  | 1081|    417|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (823:3): [True: 0, False: 417]
  |  Branch (823:3): [True: 417, False: 0]
  ------------------
  824|       |
  825|    417|  if((conn->scheme->protocol != CURLPROTO_HTTPS) ||
  ------------------
  |  | 1079|    417|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (825:6): [True: 0, False: 417]
  ------------------
  826|    417|     !conn->bits.tls_enable_alpn)
  ------------------
  |  Branch (826:6): [True: 0, False: 417]
  ------------------
  827|      0|    goto out;
  828|       |
  829|    417|  result = cf_hc_add(data, conn, sockindex, conn->transport_wanted);
  830|       |
  831|    417|out:
  832|    417|  return result;
  833|    417|}
cf-https-connect.c:cf_hc_destroy:
  747|    417|{
  748|    417|  struct cf_hc_ctx *ctx = cf->ctx;
  749|       |
  750|    417|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|    417|  do {                                          \
  |  |  154|    417|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    417|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    834|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 417, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 417]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    834|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    417|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    417|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    417|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 417]
  |  |  ------------------
  ------------------
  751|    417|  cf_hc_ctx_destroy(data, ctx);
  752|    417|}
cf-https-connect.c:cf_hc_ctx_destroy:
  138|    834|{
  139|    834|  if(ctx) {
  ------------------
  |  Branch (139:6): [True: 417, False: 417]
  ------------------
  140|    417|    cf_hc_ctx_close(data, ctx);
  141|    417|    curlx_free(ctx);
  ------------------
  |  | 1483|    417|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  142|    417|  }
  143|    834|}
cf-https-connect.c:cf_hc_ctx_close:
  128|    834|{
  129|    834|  if(ctx) {
  ------------------
  |  Branch (129:6): [True: 834, False: 0]
  ------------------
  130|    834|    size_t i;
  131|  1.10k|    for(i = 0; i < ctx->baller_count; ++i)
  ------------------
  |  Branch (131:16): [True: 272, False: 834]
  ------------------
  132|    272|      cf_hc_baller_discard(&ctx->ballers[i], data);
  133|    834|  }
  134|    834|}
cf-https-connect.c:cf_hc_baller_discard:
   63|    272|{
   64|    272|  if(b->cf) {
  ------------------
  |  Branch (64:6): [True: 136, False: 136]
  ------------------
   65|    136|    Curl_conn_cf_close(b->cf, data);
   66|    136|    Curl_conn_cf_discard_chain(&b->cf, data);
   67|       |    b->cf = NULL;
   68|    136|  }
   69|    272|}
cf-https-connect.c:cf_hc_connect:
  484|   272k|{
  485|   272k|  struct cf_hc_ctx *ctx = cf->ctx;
  486|   272k|  CURLcode result = CURLE_OK;
  487|       |
  488|   272k|  if(cf->connected) {
  ------------------
  |  Branch (488:6): [True: 0, False: 272k]
  ------------------
  489|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  490|      0|    return CURLE_OK;
  491|      0|  }
  492|       |
  493|   272k|  *done = FALSE;
  ------------------
  |  | 1058|   272k|#define FALSE false
  ------------------
  494|       |
  495|   272k|  if(!ctx->httpsrr_resolved) {
  ------------------
  |  Branch (495:6): [True: 136, False: 272k]
  ------------------
  496|    136|    ctx->httpsrr_resolved = Curl_conn_dns_resolved_https(data, cf->sockindex);
  ------------------
  |  |   66|    136|#define Curl_conn_dns_resolved_https(a, b)   TRUE
  |  |  ------------------
  |  |  |  | 1055|    136|#define TRUE true
  |  |  ------------------
  ------------------
  497|    136|#ifdef DEBUGBUILD
  498|    136|    if(!ctx->httpsrr_resolved && getenv("CURL_DBG_AWAIT_HTTPSRR")) {
  ------------------
  |  Branch (498:8): [True: 0, False: 136]
  |  Branch (498:34): [True: 0, False: 0]
  ------------------
  499|      0|      CURL_TRC_CF(data, cf, "awaiting HTTPS-RR");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  500|      0|      return CURLE_OK;
  501|      0|    }
  502|    136|#endif
  503|    136|  }
  504|       |
  505|   272k|  switch(ctx->state) {
  ------------------
  |  Branch (505:10): [True: 272k, False: 0]
  ------------------
  506|    136|  case CF_HC_RESOLV:
  ------------------
  |  Branch (506:3): [True: 136, False: 272k]
  ------------------
  507|    136|    ctx->state = CF_HC_INIT;
  508|    136|    FALLTHROUGH();
  ------------------
  |  |  821|    136|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  509|       |
  510|    136|  case CF_HC_INIT:
  ------------------
  |  Branch (510:3): [True: 0, False: 272k]
  ------------------
  511|    136|    DEBUGASSERT(!cf->next);
  ------------------
  |  | 1081|    136|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (511:5): [True: 0, False: 136]
  |  Branch (511:5): [True: 136, False: 0]
  ------------------
  512|    136|    CURL_TRC_CF(data, cf, "connect, init");
  ------------------
  |  |  153|    136|  do {                                          \
  |  |  154|    136|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    136|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    272|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 136, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 136]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    272|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    136|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    136|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    136|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 136]
  |  |  ------------------
  ------------------
  513|    136|    result = cf_hc_set_baller1(cf, data);
  514|    136|    if(result) {
  ------------------
  |  Branch (514:8): [True: 0, False: 136]
  ------------------
  515|      0|      ctx->result = result;
  516|      0|      ctx->state = CF_HC_FAILURE;
  517|      0|      goto out;
  518|      0|    }
  519|    136|    cf_hc_set_baller2(cf, data);
  520|    136|    ctx->started = *Curl_pgrs_now(data);
  521|    136|    cf_hc_baller_init(&ctx->ballers[0], cf, data);
  522|    136|    if((ctx->baller_count > 1) || !ctx->ballers_complete) {
  ------------------
  |  Branch (522:8): [True: 0, False: 136]
  |  Branch (522:35): [True: 0, False: 136]
  ------------------
  523|      0|      Curl_expire(data, ctx->soft_eyeballs_timeout_ms, EXPIRE_ALPN_EYEBALLS);
  524|      0|    }
  525|    136|    ctx->state = CF_HC_CONNECT;
  526|    136|    FALLTHROUGH();
  ------------------
  |  |  821|    136|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  527|       |
  528|   272k|  case CF_HC_CONNECT:
  ------------------
  |  Branch (528:3): [True: 272k, False: 136]
  ------------------
  529|   272k|    if(!ctx->ballers_complete)
  ------------------
  |  Branch (529:8): [True: 0, False: 272k]
  ------------------
  530|      0|      cf_hc_set_baller2(cf, data);
  531|       |
  532|   272k|    if(cf_hc_baller_is_connecting(&ctx->ballers[0])) {
  ------------------
  |  Branch (532:8): [True: 272k, False: 0]
  ------------------
  533|   272k|      result = cf_hc_baller_connect(&ctx->ballers[0], cf, data, done);
  534|   272k|      if(!result && *done) {
  ------------------
  |  Branch (534:10): [True: 272k, False: 43]
  |  Branch (534:21): [True: 0, False: 272k]
  ------------------
  535|      0|        result = baller_connected(cf, data, &ctx->ballers[0]);
  536|      0|        goto out;
  537|      0|      }
  538|   272k|    }
  539|       |
  540|   272k|    if(time_to_start_baller2(cf, data)) {
  ------------------
  |  Branch (540:8): [True: 0, False: 272k]
  ------------------
  541|      0|      cf_hc_baller_init(&ctx->ballers[1], cf, data);
  542|      0|    }
  543|       |
  544|   272k|    if(cf_hc_baller_is_connecting(&ctx->ballers[1])) {
  ------------------
  |  Branch (544:8): [True: 0, False: 272k]
  ------------------
  545|      0|      result = cf_hc_baller_connect(&ctx->ballers[1], cf, data, done);
  546|      0|      if(!result && *done) {
  ------------------
  |  Branch (546:10): [True: 0, False: 0]
  |  Branch (546:21): [True: 0, False: 0]
  ------------------
  547|      0|        result = baller_connected(cf, data, &ctx->ballers[1]);
  548|      0|        goto out;
  549|      0|      }
  550|      0|    }
  551|       |
  552|   272k|    if(ctx->ballers[0].result &&
  ------------------
  |  Branch (552:8): [True: 43, False: 272k]
  ------------------
  553|     43|       (ctx->ballers[1].result ||
  ------------------
  |  Branch (553:9): [True: 0, False: 43]
  ------------------
  554|     43|        (ctx->ballers_complete && (ctx->baller_count < 2)))) {
  ------------------
  |  Branch (554:10): [True: 43, False: 0]
  |  Branch (554:35): [True: 43, False: 0]
  ------------------
  555|       |      /* all have failed. we give up */
  556|     43|      CURL_TRC_CF(data, cf, "connect, all attempts failed");
  ------------------
  |  |  153|     43|  do {                                          \
  |  |  154|     43|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     43|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     86|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 43, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     86|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     43|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     43|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     43|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 43]
  |  |  ------------------
  ------------------
  557|     43|      ctx->result = result = ctx->ballers[0].result;
  558|     43|      ctx->state = CF_HC_FAILURE;
  559|     43|      goto out;
  560|     43|    }
  561|   272k|    result = CURLE_OK;
  562|   272k|    *done = FALSE;
  ------------------
  |  | 1058|   272k|#define FALSE false
  ------------------
  563|   272k|    break;
  564|       |
  565|      0|  case CF_HC_FAILURE:
  ------------------
  |  Branch (565:3): [True: 0, False: 272k]
  ------------------
  566|      0|    result = ctx->result;
  567|      0|    cf->connected = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  568|      0|    *done = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  569|      0|    break;
  570|       |
  571|      0|  case CF_HC_SUCCESS:
  ------------------
  |  Branch (571:3): [True: 0, False: 272k]
  ------------------
  572|      0|    result = CURLE_OK;
  573|      0|    cf->connected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  574|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  575|      0|    break;
  576|   272k|  }
  577|       |
  578|   272k|out:
  579|   272k|  CURL_TRC_CF(data, cf, "connect -> %d, done=%d", result, *done);
  ------------------
  |  |  153|   272k|  do {                                          \
  |  |  154|   272k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   272k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   545k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 272k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 272k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   545k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   272k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   272k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   272k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 272k]
  |  |  ------------------
  ------------------
  580|   272k|  return result;
  581|   272k|}
cf-https-connect.c:cf_hc_set_baller1:
  394|    136|{
  395|    136|  struct cf_hc_ctx *ctx = cf->ctx;
  396|    136|  enum alpnid alpn1 = ALPN_none;
  397|    136|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1618|    136|#define VERBOSE(x) x
  ------------------
  398|       |
  399|    136|  DEBUGASSERT(cf->conn->bits.tls_enable_alpn);
  ------------------
  |  | 1081|    136|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (399:3): [True: 0, False: 136]
  |  Branch (399:3): [True: 136, False: 0]
  ------------------
  400|       |
  401|    136|  alpn1 = cf_hc_get_httpsrr_alpn(cf, data, ALPN_none);
  402|    136|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (402:6): [True: 136, False: 0]
  ------------------
  403|       |    /* preference is configured and allowed, can we use it? */
  404|    136|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1618|    136|#define VERBOSE(x) x
  ------------------
  405|    136|    alpn1 = cf_hc_get_pref_alpn(cf, data, ALPN_none);
  406|    136|  }
  407|    136|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (407:6): [True: 136, False: 0]
  ------------------
  408|    136|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1618|    136|#define VERBOSE(x) x
  ------------------
  409|    136|    alpn1 = cf_hc_get_first_alpn(cf, data,
  410|    136|                                 data->state.http_neg.wanted,
  411|    136|                                 ALPN_none);
  412|    136|  }
  413|    136|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (413:6): [True: 0, False: 136]
  ------------------
  414|      0|    VERBOSE(source = "allowed versions");
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
  415|      0|    alpn1 = cf_hc_get_first_alpn(cf, data,
  416|      0|                                 data->state.http_neg.allowed,
  417|      0|                                 ALPN_none);
  418|      0|  }
  419|       |
  420|    136|  if(alpn1 == ALPN_none) {
  ------------------
  |  Branch (420:6): [True: 0, False: 136]
  ------------------
  421|       |    /* None of the wanted/allowed HTTP versions could be chosen */
  422|      0|    if(ctx->check_h3_result) {
  ------------------
  |  Branch (422:8): [True: 0, False: 0]
  ------------------
  423|      0|      CURL_TRC_CF(data, cf, "unable to use HTTP/3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  424|      0|      return ctx->check_h3_result;
  425|      0|    }
  426|      0|    CURL_TRC_CF(data, cf, "unable to select HTTP version");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  427|      0|    return CURLE_FAILED_INIT;
  428|      0|  }
  429|       |
  430|    136|  cf_hc_baller_assign(&ctx->ballers[0], alpn1, ctx->def_transport);
  431|    136|  ctx->baller_count = 1;
  432|    136|  CURL_TRC_CF(data, cf, "1st attempt uses %s from %s",
  ------------------
  |  |  153|    136|  do {                                          \
  |  |  154|    136|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    136|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    272|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 136, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 136]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    272|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    136|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    136|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    136|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 136]
  |  |  ------------------
  ------------------
  433|    136|              ctx->ballers[0].name, source);
  434|       |
  435|    136|  switch(alpn1) {
  436|      0|  case ALPN_h1:
  ------------------
  |  Branch (436:3): [True: 0, False: 136]
  ------------------
  437|       |    /* We really want h1, switch off h2 to make it disappear in ALPN */
  438|      0|    data->state.http_neg.wanted &= (uint8_t)~CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  439|      0|    break;
  440|    136|  default:
  ------------------
  |  Branch (440:3): [True: 136, False: 0]
  ------------------
  441|    136|    break;
  442|    136|  }
  443|       |
  444|    136|  return CURLE_OK;
  445|    136|}
cf-https-connect.c:cf_hc_get_httpsrr_alpn:
  297|    272|{
  298|       |#ifdef USE_HTTPSRR
  299|       |  /* Is there an HTTPSRR use its ALPNs here.
  300|       |   * We are here after having selected a connection to a host+port and
  301|       |   * can no longer change that. Any HTTPSRR advice for other hosts and ports
  302|       |   * we need to ignore. */
  303|       |  const struct Curl_https_rrinfo *rr;
  304|       |  size_t i;
  305|       |
  306|       |  /* Do we have HTTPS-RR information? */
  307|       |  rr = Curl_conn_dns_get_https(data, cf->sockindex);
  308|       |
  309|       |  /* We do not support `rr->no_def_alpn`. */
  310|       |  if(Curl_httpsrr_applicable(data, rr) && !rr->no_def_alpn) {
  311|       |    for(i = 0; i < CURL_ARRAYSIZE(rr->alpns); ++i) {
  312|       |      enum alpnid alpn_rr = (enum alpnid)rr->alpns[i];
  313|       |      if(alpn_rr == not_this_one) /* don't want this one */
  314|       |        continue;
  315|       |      switch(alpn_rr) {
  316|       |      case ALPN_h3:
  317|       |        if((data->state.http_neg.allowed & CURL_HTTP_V3x) &&
  318|       |           cf_hc_may_h3(cf, data)) {
  319|       |          return alpn_rr;
  320|       |        }
  321|       |        break;
  322|       |      case ALPN_h2:
  323|       |        if(data->state.http_neg.allowed & CURL_HTTP_V2x) {
  324|       |          return alpn_rr;
  325|       |        }
  326|       |        break;
  327|       |      case ALPN_h1:
  328|       |        if(data->state.http_neg.allowed & CURL_HTTP_V1x) {
  329|       |          return alpn_rr;
  330|       |        }
  331|       |        break;
  332|       |      default: /* ignore */
  333|       |        break;
  334|       |      }
  335|       |    }
  336|       |  }
  337|       |#else
  338|    272|  (void)cf;
  339|    272|  (void)data;
  340|    272|  (void)not_this_one;
  341|    272|#endif
  342|    272|  return ALPN_none;
  343|    272|}
cf-https-connect.c:cf_hc_get_pref_alpn:
  348|    272|{
  349|    272|  if((data->state.http_neg.preferred & data->state.http_neg.allowed)) {
  ------------------
  |  Branch (349:6): [True: 0, False: 272]
  ------------------
  350|      0|    switch(data->state.http_neg.preferred) {
  351|      0|    case CURL_HTTP_V3x:
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (351:5): [True: 0, False: 0]
  ------------------
  352|      0|      if(cf_hc_may_h3(cf, data) && (ALPN_h3 != not_this_one))
  ------------------
  |  Branch (352:10): [True: 0, False: 0]
  |  Branch (352:36): [True: 0, False: 0]
  ------------------
  353|      0|        return ALPN_h3;
  354|      0|      break;
  355|      0|    case CURL_HTTP_V2x:
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (355:5): [True: 0, False: 0]
  ------------------
  356|      0|      if(ALPN_h2 != not_this_one)
  ------------------
  |  Branch (356:10): [True: 0, False: 0]
  ------------------
  357|      0|        return ALPN_h2;
  358|      0|      break;
  359|      0|    case CURL_HTTP_V1x:
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (359:5): [True: 0, False: 0]
  ------------------
  360|       |      /* If we are trying h2 already, h1 is already used as fallback */
  361|      0|      if((ALPN_h1 != not_this_one) && (ALPN_h2 != not_this_one))
  ------------------
  |  Branch (361:10): [True: 0, False: 0]
  |  Branch (361:39): [True: 0, False: 0]
  ------------------
  362|      0|        return ALPN_h1;
  363|      0|      break;
  364|      0|    default:
  ------------------
  |  Branch (364:5): [True: 0, False: 0]
  ------------------
  365|      0|      break;
  366|      0|    }
  367|      0|  }
  368|    272|  return ALPN_none;
  369|    272|}
cf-https-connect.c:cf_hc_get_first_alpn:
  375|    272|{
  376|       |  /* When told to not try h2, we also do not try h1 and vice versa */
  377|    272|  bool allow_h1_or_h2 = (not_this_one != ALPN_h1) &&
  ------------------
  |  Branch (377:25): [True: 272, False: 0]
  ------------------
  378|    272|                        (not_this_one != ALPN_h2);
  ------------------
  |  Branch (378:25): [True: 136, False: 136]
  ------------------
  379|    272|  if((ALPN_h3 != not_this_one) && (choices & CURL_HTTP_V3x) &&
  ------------------
  |  |   42|    272|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (379:6): [True: 272, False: 0]
  |  Branch (379:35): [True: 0, False: 272]
  ------------------
  380|      0|     cf_hc_may_h3(cf, data)) {
  ------------------
  |  Branch (380:6): [True: 0, False: 0]
  ------------------
  381|      0|    return ALPN_h3;
  382|      0|  }
  383|    272|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V2x)) {
  ------------------
  |  |   41|    136|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (383:6): [True: 136, False: 136]
  |  Branch (383:24): [True: 136, False: 0]
  ------------------
  384|    136|    return ALPN_h2;
  385|    136|  }
  386|    136|  if(allow_h1_or_h2 && (choices & CURL_HTTP_V1x)) {
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (386:6): [True: 0, False: 136]
  |  Branch (386:24): [True: 0, False: 0]
  ------------------
  387|      0|    return ALPN_h1;
  388|      0|  }
  389|    136|  return ALPN_none;
  390|    136|}
cf-https-connect.c:cf_hc_baller_assign:
  148|    136|{
  149|    136|  b->alpn_id = alpn_id;
  150|    136|  b->transport = def_transport;
  151|    136|  b->cf = NULL;
  152|    136|  b->result = CURLE_OK;
  153|    136|  b->reply_ms = -1;
  154|    136|  b->shutdown = FALSE;
  ------------------
  |  | 1058|    136|#define FALSE false
  ------------------
  155|    136|  switch(b->alpn_id) {
  156|      0|  case ALPN_h3:
  ------------------
  |  Branch (156:3): [True: 0, False: 136]
  ------------------
  157|      0|    b->name = "h3";
  158|      0|    b->transport = TRNSPRT_QUIC;
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  159|      0|    break;
  160|    136|  case ALPN_h2:
  ------------------
  |  Branch (160:3): [True: 136, False: 0]
  ------------------
  161|    136|    b->name = "h2";
  162|    136|    break;
  163|      0|  case ALPN_h1:
  ------------------
  |  Branch (163:3): [True: 0, False: 136]
  ------------------
  164|      0|    b->name = "h1";
  165|      0|    break;
  166|      0|  case ALPN_none:
  ------------------
  |  Branch (166:3): [True: 0, False: 136]
  ------------------
  167|      0|    b->name = "no-alpn";
  168|      0|    break;
  169|      0|  default:
  ------------------
  |  Branch (169:3): [True: 0, False: 136]
  ------------------
  170|      0|    b->result = CURLE_FAILED_INIT;
  171|      0|    break;
  172|    136|  }
  173|    136|}
cf-https-connect.c:cf_hc_set_baller2:
  449|    136|{
  450|    136|  struct cf_hc_ctx *ctx = cf->ctx;
  451|    136|  enum alpnid alpn2 = ALPN_none, alpn1 = ctx->ballers[0].alpn_id;
  452|    136|  VERBOSE(const char *source = "HTTPS-RR");
  ------------------
  |  | 1618|    136|#define VERBOSE(x) x
  ------------------
  453|       |
  454|    136|  if(ctx->ballers_complete)
  ------------------
  |  Branch (454:6): [True: 0, False: 136]
  ------------------
  455|      0|    return; /* already done */
  456|    136|  if(!ctx->httpsrr_resolved)
  ------------------
  |  Branch (456:6): [True: 0, False: 136]
  ------------------
  457|      0|    return; /* HTTPS-RR pending */
  458|       |
  459|    136|  alpn2 = cf_hc_get_httpsrr_alpn(cf, data, alpn1);
  460|    136|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (460:6): [True: 136, False: 0]
  ------------------
  461|       |    /* preference is configured and allowed, can we use it? */
  462|    136|    VERBOSE(source = "preferred version");
  ------------------
  |  | 1618|    136|#define VERBOSE(x) x
  ------------------
  463|    136|    alpn2 = cf_hc_get_pref_alpn(cf, data, alpn1);
  464|    136|  }
  465|    136|  if(alpn2 == ALPN_none) {
  ------------------
  |  Branch (465:6): [True: 136, False: 0]
  ------------------
  466|    136|    VERBOSE(source = "wanted versions");
  ------------------
  |  | 1618|    136|#define VERBOSE(x) x
  ------------------
  467|    136|    alpn2 = cf_hc_get_first_alpn(cf, data,
  468|    136|                                 data->state.http_neg.wanted,
  469|    136|                                 alpn1);
  470|    136|  }
  471|       |
  472|    136|  if(alpn2 != ALPN_none) {
  ------------------
  |  Branch (472:6): [True: 0, False: 136]
  ------------------
  473|      0|    cf_hc_baller_assign(&ctx->ballers[1], alpn2, ctx->def_transport);
  474|      0|    ctx->baller_count = 2;
  475|      0|    CURL_TRC_CF(data, cf, "2nd attempt uses %s from %s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  476|      0|                ctx->ballers[1].name, source);
  477|      0|  }
  478|       |  ctx->ballers_complete = TRUE;
  ------------------
  |  | 1055|    136|#define TRUE true
  ------------------
  479|    136|}
cf-https-connect.c:cf_hc_baller_init:
  178|    136|{
  179|    136|  struct Curl_cfilter *save = cf->next;
  180|       |
  181|    136|  cf->next = NULL;
  182|    136|  b->started = *Curl_pgrs_now(data);
  183|    136|  b->result = Curl_cf_setup_insert_after(cf, data, b->transport,
  184|    136|                                         CURL_CF_SSL_ENABLE);
  ------------------
  |  |  365|    136|#define CURL_CF_SSL_ENABLE   1
  ------------------
  185|    136|  b->cf = cf->next;
  186|    136|  cf->next = save;
  187|    136|}
cf-https-connect.c:cf_hc_baller_is_connecting:
   72|   818k|{
   73|   818k|  return b->cf && !b->result;
  ------------------
  |  Branch (73:10): [True: 545k, False: 272k]
  |  Branch (73:19): [True: 545k, False: 0]
  ------------------
   74|   818k|}
cf-https-connect.c:cf_hc_baller_connect:
  193|   272k|{
  194|   272k|  struct Curl_cfilter *save = cf->next;
  195|       |
  196|   272k|  cf->next = b->cf;
  197|   272k|  b->result = Curl_conn_cf_connect(cf->next, data, done);
  198|   272k|  b->cf = cf->next; /* it might mutate */
  199|   272k|  cf->next = save;
  200|   272k|  return b->result;
  201|   272k|}
cf-https-connect.c:time_to_start_baller2:
  249|   272k|{
  250|   272k|  struct cf_hc_ctx *ctx = cf->ctx;
  251|   272k|  timediff_t elapsed_ms;
  252|       |
  253|   272k|  if(ctx->baller_count < 2)
  ------------------
  |  Branch (253:6): [True: 272k, False: 0]
  ------------------
  254|   272k|    return FALSE;
  ------------------
  |  | 1058|   272k|#define FALSE false
  ------------------
  255|      0|  else if(cf_hc_baller_has_started(&ctx->ballers[1]))
  ------------------
  |  Branch (255:11): [True: 0, False: 0]
  ------------------
  256|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  257|      0|  else if(ctx->ballers[0].result) {
  ------------------
  |  Branch (257:11): [True: 0, False: 0]
  ------------------
  258|      0|    CURL_TRC_CF(data, cf, "%s baller failed, starting %s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  259|      0|                ctx->ballers[0].name, ctx->ballers[1].name);
  260|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  261|      0|  }
  262|       |
  263|      0|  elapsed_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &ctx->started);
  264|      0|  if(elapsed_ms >= ctx->hard_eyeballs_timeout_ms) {
  ------------------
  |  Branch (264:6): [True: 0, False: 0]
  ------------------
  265|      0|    CURL_TRC_CF(data, cf, "%s inconclusive after %" FMT_TIMEDIFF_T ", "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  266|      0|                "starting %s", ctx->ballers[0].name,
  267|      0|                ctx->hard_eyeballs_timeout_ms, ctx->ballers[1].name);
  268|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  269|      0|  }
  270|      0|  else if(elapsed_ms >= ctx->soft_eyeballs_timeout_ms) {
  ------------------
  |  Branch (270:11): [True: 0, False: 0]
  ------------------
  271|      0|    if(cf_hc_baller_reply_ms(&ctx->ballers[0], data) < 0) {
  ------------------
  |  Branch (271:8): [True: 0, False: 0]
  ------------------
  272|      0|      CURL_TRC_CF(data, cf, "%s has not seen any data after %"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  273|      0|                  FMT_TIMEDIFF_T "ms, starting %s",
  274|      0|                  ctx->ballers[0].name, ctx->soft_eyeballs_timeout_ms,
  275|      0|                  ctx->ballers[1].name);
  276|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  277|      0|    }
  278|      0|  }
  279|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  280|      0|}
cf-https-connect.c:cf_hc_close:
  735|    417|{
  736|    417|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|    417|  do {                                          \
  |  |  154|    417|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    417|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    834|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 417, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 417]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    834|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    417|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    417|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    417|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 417]
  |  |  ------------------
  ------------------
  737|    417|  cf_hc_ctx_close(data, cf->ctx);
  738|    417|  cf->connected = FALSE;
  ------------------
  |  | 1058|    417|#define FALSE false
  ------------------
  739|       |
  740|    417|  if(cf->next) {
  ------------------
  |  Branch (740:6): [True: 0, False: 417]
  ------------------
  741|      0|    cf->next->cft->do_close(cf->next, data);
  742|      0|    Curl_conn_cf_discard_chain(&cf->next, data);
  743|      0|  }
  744|    417|}
cf-https-connect.c:cf_hc_adjust_pollset:
  626|   354k|{
  627|   354k|  CURLcode result = CURLE_OK;
  628|   354k|  if(!cf->connected) {
  ------------------
  |  Branch (628:6): [True: 354k, False: 0]
  ------------------
  629|   354k|    struct cf_hc_ctx *ctx = cf->ctx;
  630|   354k|    size_t i;
  631|       |
  632|   627k|    for(i = 0; (i < ctx->baller_count) && !result; i++) {
  ------------------
  |  Branch (632:16): [True: 272k, False: 354k]
  |  Branch (632:43): [True: 272k, False: 0]
  ------------------
  633|   272k|      struct cf_hc_baller *b = &ctx->ballers[i];
  634|   272k|      if(!cf_hc_baller_is_connecting(b))
  ------------------
  |  Branch (634:10): [True: 0, False: 272k]
  ------------------
  635|      0|        continue;
  636|   272k|      result = Curl_conn_cf_adjust_pollset(b->cf, data, ps);
  637|   272k|    }
  638|   354k|    CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", result, ps->n);
  ------------------
  |  |  153|   354k|  do {                                          \
  |  |  154|   354k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   354k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   709k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 354k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 354k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   709k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   354k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   354k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   354k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 354k]
  |  |  ------------------
  ------------------
  639|   354k|  }
  640|   354k|  return result;
  641|   354k|}
cf-https-connect.c:cf_hc_cntrl:
  717|    417|{
  718|    417|  struct cf_hc_ctx *ctx = cf->ctx;
  719|    417|  CURLcode result = CURLE_OK;
  720|    417|  size_t i;
  721|       |
  722|    417|  if(!cf->connected) {
  ------------------
  |  Branch (722:6): [True: 417, False: 0]
  ------------------
  723|    553|    for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (723:16): [True: 136, False: 417]
  ------------------
  724|    136|      result = cf_hc_baller_cntrl(&ctx->ballers[i], data, event, arg1, arg2);
  725|    136|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (725:10): [True: 0, False: 136]
  |  Branch (725:20): [True: 0, False: 0]
  ------------------
  726|      0|        goto out;
  727|    136|    }
  728|    417|    result = CURLE_OK;
  729|    417|  }
  730|    417|out:
  731|    417|  return result;
  732|    417|}
cf-https-connect.c:cf_hc_baller_cntrl:
  105|    136|{
  106|    136|  if(b->cf && !b->result)
  ------------------
  |  Branch (106:6): [True: 136, False: 0]
  |  Branch (106:15): [True: 93, False: 43]
  ------------------
  107|     93|    return Curl_conn_cf_cntrl(b->cf, data, FALSE, event, arg1, arg2);
  ------------------
  |  | 1058|     93|#define FALSE false
  ------------------
  108|     43|  return CURLE_OK;
  109|    136|}
cf-https-connect.c:cf_hc_query:
  681|   710k|{
  682|   710k|  struct cf_hc_ctx *ctx = cf->ctx;
  683|   710k|  size_t i;
  684|       |
  685|   710k|  if(!cf->connected) {
  ------------------
  |  Branch (685:6): [True: 710k, False: 0]
  ------------------
  686|   710k|    switch(query) {
  687|    301|    case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  168|    301|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (687:5): [True: 301, False: 710k]
  ------------------
  688|    301|      struct curltime *when = pres2;
  689|    301|      *when = cf_get_max_baller_time(cf, data, CF_QUERY_TIMER_CONNECT);
  ------------------
  |  |  168|    301|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  690|    301|      return CURLE_OK;
  691|      0|    }
  692|    301|    case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  169|    301|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (692:5): [True: 301, False: 710k]
  ------------------
  693|    301|      struct curltime *when = pres2;
  694|    301|      *when = cf_get_max_baller_time(cf, data, CF_QUERY_TIMER_APPCONNECT);
  ------------------
  |  |  169|    301|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  695|    301|      return CURLE_OK;
  696|      0|    }
  697|   355k|    case CF_QUERY_NEED_FLUSH: {
  ------------------
  |  |  171|   355k|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (697:5): [True: 355k, False: 355k]
  ------------------
  698|   628k|      for(i = 0; i < ctx->baller_count; i++)
  ------------------
  |  Branch (698:18): [True: 272k, False: 355k]
  ------------------
  699|   272k|        if(cf_hc_baller_needs_flush(&ctx->ballers[i], data)) {
  ------------------
  |  Branch (699:12): [True: 0, False: 272k]
  ------------------
  700|      0|          *pres1 = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  701|      0|          return CURLE_OK;
  702|      0|        }
  703|   355k|      break;
  704|   355k|    }
  705|   355k|    default:
  ------------------
  |  Branch (705:5): [True: 354k, False: 355k]
  ------------------
  706|   354k|      break;
  707|   710k|    }
  708|   710k|  }
  709|   710k|  return cf->next ?
  ------------------
  |  Branch (709:10): [True: 0, False: 710k]
  ------------------
  710|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  711|   710k|    CURLE_UNKNOWN_OPTION;
  712|   710k|}
cf-https-connect.c:cf_get_max_baller_time:
  661|    602|{
  662|    602|  struct cf_hc_ctx *ctx = cf->ctx;
  663|    602|  struct curltime t, tmax;
  664|    602|  size_t i;
  665|       |
  666|    602|  memset(&tmax, 0, sizeof(tmax));
  667|    794|  for(i = 0; i < ctx->baller_count; i++) {
  ------------------
  |  Branch (667:14): [True: 192, False: 602]
  ------------------
  668|    192|    struct Curl_cfilter *cfb = ctx->ballers[i].cf;
  669|    192|    memset(&t, 0, sizeof(t));
  670|    192|    if(cfb && !cfb->cft->query(cfb, data, query, NULL, &t)) {
  ------------------
  |  Branch (670:8): [True: 192, False: 0]
  |  Branch (670:15): [True: 192, False: 0]
  ------------------
  671|    192|      if((t.tv_sec || t.tv_usec) && curlx_ptimediff_us(&t, &tmax) > 0)
  ------------------
  |  Branch (671:11): [True: 0, False: 192]
  |  Branch (671:23): [True: 0, False: 192]
  |  Branch (671:37): [True: 0, False: 0]
  ------------------
  672|      0|        tmax = t;
  673|    192|    }
  674|    192|  }
  675|    602|  return tmax;
  676|    602|}
cf-https-connect.c:cf_hc_baller_needs_flush:
   98|   272k|{
   99|   272k|  return b->cf && !b->result && Curl_conn_cf_needs_flush(b->cf, data);
  ------------------
  |  Branch (99:10): [True: 272k, False: 0]
  |  Branch (99:19): [True: 272k, False: 0]
  |  Branch (99:33): [True: 0, False: 272k]
  ------------------
  100|   272k|}
cf-https-connect.c:cf_hc_add:
  804|    417|{
  805|    417|  struct Curl_cfilter *cf;
  806|    417|  CURLcode result = CURLE_OK;
  807|       |
  808|    417|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    417|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (808:3): [True: 0, False: 417]
  |  Branch (808:3): [True: 417, False: 0]
  ------------------
  809|    417|  result = cf_hc_create(&cf, data, def_transport);
  810|    417|  if(result)
  ------------------
  |  Branch (810:6): [True: 0, False: 417]
  ------------------
  811|      0|    goto out;
  812|    417|  Curl_conn_cf_add(data, conn, sockindex, cf);
  813|    417|out:
  814|    417|  return result;
  815|    417|}
cf-https-connect.c:cf_hc_create:
  775|    417|{
  776|    417|  struct Curl_cfilter *cf = NULL;
  777|    417|  struct cf_hc_ctx *ctx;
  778|    417|  CURLcode result = CURLE_OK;
  779|       |
  780|    417|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|    417|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  781|    417|  if(!ctx) {
  ------------------
  |  Branch (781:6): [True: 0, False: 417]
  ------------------
  782|      0|    result = CURLE_OUT_OF_MEMORY;
  783|      0|    goto out;
  784|      0|  }
  785|    417|  ctx->def_transport = def_transport;
  786|    417|  ctx->hard_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout;
  787|    417|  ctx->soft_eyeballs_timeout_ms = data->set.happy_eyeballs_timeout / 2;
  788|       |
  789|    417|  result = Curl_cf_create(&cf, &Curl_cft_http_connect, ctx);
  790|    417|  if(result)
  ------------------
  |  Branch (790:6): [True: 0, False: 417]
  ------------------
  791|      0|    goto out;
  792|    417|  ctx = NULL;
  793|       |
  794|    417|out:
  795|    417|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (795:10): [True: 0, False: 417]
  ------------------
  796|    417|  cf_hc_ctx_destroy(data, ctx);
  797|    417|  return result;
  798|    417|}

cf_ip_happy_insert_after:
 1036|  10.3k|{
 1037|  10.3k|  cf_ip_connect_create *cf_create;
 1038|  10.3k|  struct Curl_cfilter *cf;
 1039|  10.3k|  CURLcode result;
 1040|       |
 1041|       |  /* Need to be first */
 1042|  10.3k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1081|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1042:3): [True: 0, False: 10.3k]
  |  Branch (1042:3): [True: 10.3k, False: 0]
  ------------------
 1043|  10.3k|  cf_create = get_cf_create(transport_out, tunnel_proxy);
 1044|  10.3k|  if(!cf_create) {
  ------------------
  |  Branch (1044:6): [True: 0, False: 10.3k]
  ------------------
 1045|      0|    CURL_TRC_CF(data, cf_at, "unsupported transport type %u%s",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1046|      0|                transport_out, tunnel_proxy ? "to proxy" : "");
 1047|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 1048|      0|  }
 1049|  10.3k|  result = cf_ip_happy_create(&cf, data, peer, cf_at->conn, cf_create,
 1050|  10.3k|                              transport_in, transport_out);
 1051|  10.3k|  if(result)
  ------------------
  |  Branch (1051:6): [True: 0, False: 10.3k]
  ------------------
 1052|      0|    return result;
 1053|       |
 1054|  10.3k|  Curl_conn_cf_insert_after(cf_at, cf);
 1055|  10.3k|  return CURLE_OK;
 1056|  10.3k|}
cf-ip-happy.c:cf_ip_happy_destroy:
  958|  10.3k|{
  959|  10.3k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  960|       |
  961|  10.3k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  10.3k|  do {                                          \
  |  |  154|  10.3k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.3k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.3k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.3k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.3k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
  962|  10.3k|  if(ctx) {
  ------------------
  |  Branch (962:6): [True: 10.3k, False: 0]
  ------------------
  963|  10.3k|    cf_ip_happy_ctx_clear(cf, data);
  964|  10.3k|    cf_ip_happy_ctx_destroy(ctx);
  965|  10.3k|  }
  966|  10.3k|}
cf-ip-happy.c:cf_ip_happy_ctx_clear:
  765|  23.6k|{
  766|  23.6k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  767|       |
  768|  23.6k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|  23.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (768:3): [True: 0, False: 23.6k]
  |  Branch (768:3): [True: 23.6k, False: 0]
  ------------------
  769|  23.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  23.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (769:3): [True: 0, False: 23.6k]
  |  Branch (769:3): [True: 23.6k, False: 0]
  ------------------
  770|  23.6k|  cf_ip_ballers_clear(cf, data, &ctx->ballers);
  771|  23.6k|}
cf-ip-happy.c:cf_ip_ballers_clear:
  302|  23.6k|{
  303|  23.6k|  (void)cf;
  304|  23.8k|  while(bs->running) {
  ------------------
  |  Branch (304:9): [True: 246, False: 23.6k]
  ------------------
  305|    246|    struct cf_ip_attempt *a = bs->running;
  306|    246|    bs->running = a->next;
  307|    246|    cf_ip_attempt_free(a, data);
  308|    246|  }
  309|  23.6k|  cf_ip_attempt_free(bs->winner, data);
  310|       |  bs->winner = NULL;
  311|  23.6k|}
cf-ip-happy.c:cf_ip_attempt_free:
  176|  23.8k|{
  177|  23.8k|  if(a) {
  ------------------
  |  Branch (177:6): [True: 10.2k, False: 13.5k]
  ------------------
  178|  10.2k|    if(a->cf)
  ------------------
  |  Branch (178:8): [True: 34, False: 10.2k]
  ------------------
  179|     34|      Curl_conn_cf_discard_chain(&a->cf, data);
  180|  10.2k|    curlx_free(a);
  ------------------
  |  | 1483|  10.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  181|  10.2k|  }
  182|  23.8k|}
cf-ip-happy.c:cf_ip_happy_ctx_destroy:
  774|  10.3k|{
  775|  10.3k|  if(ctx) {
  ------------------
  |  Branch (775:6): [True: 10.3k, False: 0]
  ------------------
  776|  10.3k|    Curl_peer_unlink(&ctx->peer);
  777|  10.3k|    curlx_free(ctx);
  ------------------
  |  | 1483|  10.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  778|  10.3k|  }
  779|  10.3k|}
cf-ip-happy.c:cf_ip_happy_connect:
  816|   285k|{
  817|   285k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  818|   285k|  CURLcode result = CURLE_OK;
  819|       |
  820|       |  /* -Werror=null-dereference finds false positives suddenly. */
  821|   285k|  if(!data)
  ------------------
  |  Branch (821:6): [True: 0, False: 285k]
  ------------------
  822|      0|    return CURLE_FAILED_INIT;
  823|       |
  824|   285k|  if(cf->connected) {
  ------------------
  |  Branch (824:6): [True: 2.57k, False: 283k]
  ------------------
  825|  2.57k|    *done = TRUE;
  ------------------
  |  | 1055|  2.57k|#define TRUE true
  ------------------
  826|  2.57k|    return CURLE_OK;
  827|  2.57k|  }
  828|       |
  829|   283k|  DEBUGASSERT(ctx);
  ------------------
  |  | 1081|   283k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (829:3): [True: 0, False: 283k]
  |  Branch (829:3): [True: 283k, False: 0]
  ------------------
  830|   283k|  *done = FALSE;
  ------------------
  |  | 1058|   283k|#define FALSE false
  ------------------
  831|       |
  832|   283k|  if(!ctx->dns_resolved) {
  ------------------
  |  Branch (832:6): [True: 149k, False: 133k]
  ------------------
  833|   149k|    result = Curl_conn_dns_result(cf->conn, cf->sockindex);
  834|   149k|    if(!result)
  ------------------
  |  Branch (834:8): [True: 10.2k, False: 138k]
  ------------------
  835|  10.2k|      ctx->dns_resolved = TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  836|   138k|    else if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (836:13): [True: 138k, False: 0]
  ------------------
  837|   138k|      result = CURLE_OK;
  838|   138k|    }
  839|      0|    else /* real error */
  840|      0|      goto out;
  841|   149k|  }
  842|       |
  843|   283k|  switch(ctx->state) {
  ------------------
  |  Branch (843:10): [True: 283k, False: 0]
  ------------------
  844|  10.3k|  case SCFST_INIT:
  ------------------
  |  Branch (844:3): [True: 10.3k, False: 272k]
  ------------------
  845|  10.3k|    DEBUGASSERT(CURL_SOCKET_BAD == Curl_conn_cf_get_socket(cf, data));
  ------------------
  |  | 1081|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (845:5): [True: 0, False: 10.3k]
  |  Branch (845:5): [True: 10.3k, False: 0]
  ------------------
  846|  10.3k|    DEBUGASSERT(!cf->connected);
  ------------------
  |  | 1081|  10.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (846:5): [True: 0, False: 10.3k]
  |  Branch (846:5): [True: 10.3k, False: 0]
  ------------------
  847|  10.3k|    result = cf_ip_happy_init(cf, data);
  848|  10.3k|    if(result)
  ------------------
  |  Branch (848:8): [True: 0, False: 10.3k]
  ------------------
  849|      0|      goto out;
  850|  10.3k|    ctx->state = SCFST_WAITING;
  851|  10.3k|    FALLTHROUGH();
  ------------------
  |  |  821|  10.3k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  852|   283k|  case SCFST_WAITING:
  ------------------
  |  Branch (852:3): [True: 272k, False: 10.3k]
  ------------------
  853|   283k|    result = is_connected(cf, data, done);
  854|   283k|    if(!result && *done) {
  ------------------
  |  Branch (854:8): [True: 282k, False: 187]
  |  Branch (854:19): [True: 10.0k, False: 272k]
  ------------------
  855|  10.0k|      DEBUGASSERT(ctx->ballers.winner);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (855:7): [True: 0, False: 10.0k]
  |  Branch (855:7): [True: 10.0k, False: 0]
  ------------------
  856|  10.0k|      DEBUGASSERT(ctx->ballers.winner->cf);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (856:7): [True: 0, False: 10.0k]
  |  Branch (856:7): [True: 10.0k, False: 0]
  ------------------
  857|  10.0k|      DEBUGASSERT(ctx->ballers.winner->cf->connected);
  ------------------
  |  | 1081|  10.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (857:7): [True: 0, False: 10.0k]
  |  Branch (857:7): [True: 10.0k, False: 0]
  ------------------
  858|       |      /* we have a winner. Install and activate it.
  859|       |       * close/free all others. */
  860|  10.0k|      ctx->state = SCFST_DONE;
  861|  10.0k|      cf->connected = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  862|  10.0k|      cf->next = ctx->ballers.winner->cf;
  863|  10.0k|      ctx->ballers.winner->cf = NULL;
  864|  10.0k|      cf_ip_happy_ctx_clear(cf, data);
  865|  10.0k|      Curl_expire_done(data, EXPIRE_HAPPY_EYEBALLS);
  866|       |      /* whatever errors where reported by ballers, clear our errorbuf */
  867|  10.0k|      Curl_reset_fail(data);
  868|       |
  869|  10.0k|      if(cf->conn->scheme->protocol & PROTO_FAMILY_SSH)
  ------------------
  |  |   90|  10.0k|#define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1082|  10.0k|#define CURLPROTO_SCP     (1L << 4)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_SSH  (CURLPROTO_SCP | CURLPROTO_SFTP)
  |  |  ------------------
  |  |  |  | 1083|  10.0k|#define CURLPROTO_SFTP    (1L << 5)
  |  |  ------------------
  ------------------
  |  Branch (869:10): [True: 0, False: 10.0k]
  ------------------
  870|      0|        Curl_pgrsTime(data, TIMER_APPCONNECT); /* we are connected already */
  871|  10.0k|#ifdef CURLVERBOSE
  872|  10.0k|      if(Curl_trc_cf_is_verbose(cf, data)) {
  ------------------
  |  |  323|  10.0k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  ------------------
  |  |  |  |  319|  20.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  320|  20.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  324|  10.0k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  873|      0|        struct ip_quadruple ipquad;
  874|      0|        bool is_ipv6;
  875|      0|        if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad)) {
  ------------------
  |  Branch (875:12): [True: 0, False: 0]
  ------------------
  876|      0|          const char *host;
  877|      0|          Curl_conn_get_current_host(data, cf->sockindex, &host, NULL);
  878|      0|          CURL_TRC_CF(data, cf, "Connected to %s (%s) port %u",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  879|      0|                      host, ipquad.remote_ip, ipquad.remote_port);
  880|      0|        }
  881|      0|      }
  882|  10.0k|#endif
  883|  10.0k|      data->info.numconnects++; /* to track the # of connections made */
  884|  10.0k|    }
  885|   283k|    break;
  886|   283k|  case SCFST_DONE:
  ------------------
  |  Branch (886:3): [True: 0, False: 283k]
  ------------------
  887|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  888|      0|    break;
  889|   283k|  }
  890|   283k|out:
  891|   283k|  return result;
  892|   283k|}
cf-ip-happy.c:cf_ip_happy_init:
  745|  10.3k|{
  746|  10.3k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  747|       |
  748|  10.3k|  if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (748:6): [True: 0, False: 10.3k]
  ------------------
  749|       |    /* a precaution, no need to continue if time already is up */
  750|      0|    failf(data, "Connection time-out");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  751|      0|    return CURLE_OPERATION_TIMEDOUT;
  752|      0|  }
  753|       |
  754|  10.3k|  CURL_TRC_CF(data, cf, "init ip ballers for transport %u",
  ------------------
  |  |  153|  10.3k|  do {                                          \
  |  |  154|  10.3k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.3k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.3k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.3k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.3k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
  755|  10.3k|              ctx->transport_out);
  756|  10.3k|  ctx->started = *Curl_pgrs_now(data);
  757|  10.3k|  return cf_ip_ballers_init(&ctx->ballers, cf, ctx->cf_create,
  758|  10.3k|                            ctx->transport_in, ctx->transport_out,
  759|  10.3k|                            data->set.happy_eyeballs_timeout,
  760|  10.3k|                            IP_HE_MAX_CONCURRENT_ATTEMPTS);
  ------------------
  |  |  741|  10.3k|#define IP_HE_MAX_CONCURRENT_ATTEMPTS     6
  ------------------
  761|  10.3k|}
cf-ip-happy.c:cf_ip_ballers_init:
  320|  10.3k|{
  321|  10.3k|  memset(bs, 0, sizeof(*bs));
  322|  10.3k|  bs->cf_create = cf_create;
  323|  10.3k|  bs->transport_in = transport_in;
  324|  10.3k|  bs->transport_out = transport_out;
  325|  10.3k|  bs->attempt_delay_ms = attempt_delay_ms;
  326|  10.3k|  bs->max_concurrent = max_concurrent;
  327|  10.3k|  bs->last_attempt_ai_family = AF_INET; /* so AF_INET6 is next */
  328|       |
  329|  10.3k|  if(transport_in == TRNSPRT_UNIX) {
  ------------------
  |  |  310|  10.3k|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (329:6): [True: 399, False: 9.94k]
  ------------------
  330|    399|#ifdef USE_UNIX_SOCKETS
  331|    399|    cf_ai_iter_init(&bs->addr_iter, cf, AF_UNIX);
  332|       |#else
  333|       |    return CURLE_UNSUPPORTED_PROTOCOL;
  334|       |#endif
  335|    399|  }
  336|  9.94k|  else { /* TCP/UDP/QUIC */
  337|  9.94k|#ifdef USE_IPV6
  338|  9.94k|    cf_ai_iter_init(&bs->ipv6_iter, cf, AF_INET6);
  339|  9.94k|#endif
  340|       |    cf_ai_iter_init(&bs->addr_iter, cf, AF_INET);
  341|  9.94k|  }
  342|  10.3k|  return CURLE_OK;
  343|  10.3k|}
cf-ip-happy.c:cf_ai_iter_init:
  128|  20.2k|{
  129|  20.2k|  iter->cf = cf;
  130|  20.2k|  iter->ai_family = ai_family;
  131|  20.2k|  iter->n = 0;
  132|  20.2k|}
cf-ip-happy.c:is_connected:
  685|   283k|{
  686|   283k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  687|   283k|  struct connectdata *conn = cf->conn;
  688|   283k|  CURLcode result;
  689|       |
  690|   283k|  result = cf_ip_ballers_run(&ctx->ballers, cf, data,
  691|   283k|                             (bool)ctx->dns_resolved, connected);
  692|       |
  693|   283k|  if(!result)
  ------------------
  |  Branch (693:6): [True: 282k, False: 187]
  ------------------
  694|   282k|    return CURLE_OK;
  695|    187|  else {
  696|    187|    struct Curl_peer *peer = NULL, *proxy_peer = NULL;
  697|    187|    char viamsg[160];
  698|       |
  699|    187|    peer = Curl_conn_get_first_peer(conn, cf->sockindex);
  700|    187|    if(!conn->origin || !peer)
  ------------------
  |  Branch (700:8): [True: 0, False: 187]
  |  Branch (700:25): [True: 0, False: 187]
  ------------------
  701|      0|      return CURLE_FAILED_INIT;
  702|       |
  703|    187|#ifndef CURL_DISABLE_PROXY
  704|    187|    if(conn->bits.socksproxy)
  ------------------
  |  Branch (704:8): [True: 22, False: 165]
  ------------------
  705|     22|      proxy_peer = conn->socks_proxy.peer;
  706|    165|    else if(conn->bits.httpproxy)
  ------------------
  |  Branch (706:13): [True: 5, False: 160]
  ------------------
  707|      5|      proxy_peer = conn->http_proxy.peer;
  708|    187|#endif
  709|       |
  710|    187|    viamsg[0] = 0;
  711|    187|    if((peer != conn->origin) && (peer != proxy_peer)) {
  ------------------
  |  Branch (711:8): [True: 144, False: 43]
  |  Branch (711:34): [True: 117, False: 27]
  ------------------
  712|    117|#ifdef USE_UNIX_SOCKETS
  713|    117|      if(peer->unix_socket)
  ------------------
  |  Branch (713:10): [True: 4, False: 113]
  ------------------
  714|      4|        curl_msnprintf(viamsg, sizeof(viamsg), " over unix://%s",
  715|      4|                       peer->hostname);
  716|    113|      else
  717|    113|#endif
  718|    113|      curl_msnprintf(viamsg, sizeof(viamsg), " via %s:%u",
  719|    113|                     peer->hostname, peer->port);
  720|    117|    }
  721|       |
  722|    187|    failf(data, "Failed to connect to %s:%u%s %s%s%safter "
  ------------------
  |  |   62|    187|#define failf Curl_failf
  ------------------
  723|    187|          "%" FMT_TIMEDIFF_T " ms: %s",
  724|    187|          conn->origin->hostname, conn->origin->port, viamsg,
  725|    187|          proxy_peer ? "over proxy " : "",
  ------------------
  |  Branch (725:11): [True: 27, False: 160]
  ------------------
  726|    187|          proxy_peer ? proxy_peer->hostname : "",
  ------------------
  |  Branch (726:11): [True: 27, False: 160]
  ------------------
  727|    187|          proxy_peer ? " " : "",
  ------------------
  |  Branch (727:11): [True: 27, False: 160]
  ------------------
  728|    187|          curlx_ptimediff_ms(Curl_pgrs_now(data),
  729|    187|                             &data->progress.t_startsingle),
  730|    187|          curl_easy_strerror(result));
  731|       |
  732|    187|#ifdef SOCKETIMEDOUT
  733|    187|    if(SOCKETIMEDOUT == data->state.os_errno)
  ------------------
  |  | 1135|    187|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (733:8): [True: 0, False: 187]
  ------------------
  734|      0|      result = CURLE_OPERATION_TIMEDOUT;
  735|    187|#endif
  736|       |
  737|    187|    return result;
  738|    187|  }
  739|   283k|}
cf-ip-happy.c:cf_ip_ballers_run:
  379|   283k|{
  380|   283k|  CURLcode result = CURLE_OK;
  381|   283k|  struct cf_ip_attempt *a = NULL, **panchor;
  382|   283k|  bool do_more;
  383|   283k|  timediff_t next_expire_ms;
  384|   283k|  uint32_t inconclusive, ongoing;
  385|   283k|  VERBOSE(int i);
  ------------------
  |  | 1618|   283k|#define VERBOSE(x) x
  ------------------
  386|       |
  387|   283k|  if(bs->winner)
  ------------------
  |  Branch (387:6): [True: 0, False: 283k]
  ------------------
  388|      0|    return CURLE_OK;
  389|       |
  390|   293k|evaluate:
  391|   293k|  ongoing = inconclusive = 0;
  392|       |
  393|       |  /* check if a running baller connects now */
  394|   293k|  VERBOSE(i = -1);
  ------------------
  |  | 1618|   293k|#define VERBOSE(x) x
  ------------------
  395|   427k|  for(panchor = &bs->running; *panchor; panchor = &((*panchor)->next)) {
  ------------------
  |  Branch (395:31): [True: 144k, False: 283k]
  ------------------
  396|   144k|    VERBOSE(++i);
  ------------------
  |  | 1618|   144k|#define VERBOSE(x) x
  ------------------
  397|   144k|    a = *panchor;
  398|   144k|    a->result = cf_ip_attempt_connect(a, data, connected);
  399|   144k|    if(!a->result) {
  ------------------
  |  Branch (399:8): [True: 143k, False: 239]
  ------------------
  400|   143k|      if(*connected) {
  ------------------
  |  Branch (400:10): [True: 10.0k, False: 133k]
  ------------------
  401|       |        /* connected, declare the winner, remove from running,
  402|       |         * clear remaining running list. */
  403|  10.0k|        CURL_TRC_CF(data, cf, "connect attempt #%d successful", i);
  ------------------
  |  |  153|  10.0k|  do {                                          \
  |  |  154|  10.0k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.0k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.0k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.0k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  404|  10.0k|        bs->winner = a;
  405|  10.0k|        *panchor = a->next;
  406|  10.0k|        a->next = NULL;
  407|  10.0k|        while(bs->running) {
  ------------------
  |  Branch (407:15): [True: 0, False: 10.0k]
  ------------------
  408|      0|          a = bs->running;
  409|      0|          bs->running = a->next;
  410|      0|          cf_ip_attempt_free(a, data);
  411|      0|        }
  412|  10.0k|        return CURLE_OK;
  413|  10.0k|      }
  414|       |      /* still running */
  415|   133k|      ++ongoing;
  416|   133k|    }
  417|    239|    else if(a->inconclusive) /* failed, but inconclusive */
  ------------------
  |  Branch (417:13): [True: 0, False: 239]
  ------------------
  418|      0|      ++inconclusive;
  419|   144k|  }
  420|   283k|  if(bs->running)
  ------------------
  |  Branch (420:6): [True: 134k, False: 149k]
  ------------------
  421|   134k|    CURL_TRC_CF(data, cf, "checked connect attempts: "
  ------------------
  |  |  153|   134k|  do {                                          \
  |  |  154|   134k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   134k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   268k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 134k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 134k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   268k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   134k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   134k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   134k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 134k]
  |  |  ------------------
  ------------------
  422|   283k|                "%u ongoing, %u inconclusive", ongoing, inconclusive);
  423|       |
  424|       |  /* no attempt connected yet, start another one? */
  425|   283k|  if(!ongoing) {
  ------------------
  |  Branch (425:6): [True: 149k, False: 133k]
  ------------------
  426|   149k|    if(!bs->started.tv_sec && !bs->started.tv_usec)
  ------------------
  |  Branch (426:8): [True: 10.3k, False: 139k]
  |  Branch (426:31): [True: 10.3k, False: 0]
  ------------------
  427|  10.3k|      bs->started = *Curl_pgrs_now(data);
  428|   149k|    do_more = TRUE;
  ------------------
  |  | 1055|   149k|#define TRUE true
  ------------------
  429|   149k|  }
  430|   133k|  else {
  431|   133k|    bool more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  432|   133k|#ifdef USE_IPV6
  433|   133k|    if(!more_possible)
  ------------------
  |  Branch (433:8): [True: 133k, False: 0]
  ------------------
  434|   133k|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  435|   133k|#endif
  436|   133k|    do_more = more_possible &&
  ------------------
  |  Branch (436:15): [True: 0, False: 133k]
  ------------------
  437|      0|      (curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started) >=
  ------------------
  |  Branch (437:7): [True: 0, False: 0]
  ------------------
  438|      0|       bs->attempt_delay_ms);
  439|   133k|    if(do_more)
  ------------------
  |  Branch (439:8): [True: 0, False: 133k]
  ------------------
  440|      0|      CURL_TRC_CF(data, cf, "happy eyeballs timeout expired, "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  441|   133k|                  "start next attempt");
  442|   133k|  }
  443|       |
  444|   283k|  if(do_more) {
  ------------------
  |  Branch (444:6): [True: 149k, False: 133k]
  ------------------
  445|       |    /* start the next attempt if there is another ip address to try.
  446|       |     * Alternate between address families when possible. */
  447|   149k|    const struct Curl_addrinfo *ai = NULL;
  448|   149k|    int ai_family = 0;
  449|   149k|    CURL_TRC_CF(data, cf, "want to do more");
  ------------------
  |  |  153|   149k|  do {                                          \
  |  |  154|   149k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   149k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   298k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 149k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 149k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   298k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   149k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   149k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   149k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 149k]
  |  |  ------------------
  ------------------
  450|   149k|#ifdef USE_IPV6
  451|   149k|    if((bs->last_attempt_ai_family == AF_INET) ||
  ------------------
  |  Branch (451:8): [True: 149k, False: 54]
  ------------------
  452|   149k|       !cf_ai_iter_has_more(&bs->addr_iter, data)) {
  ------------------
  |  Branch (452:8): [True: 29, False: 25]
  ------------------
  453|   149k|      ai = cf_ai_iter_next(&bs->ipv6_iter, data);
  454|   149k|      ai_family = bs->ipv6_iter.ai_family;
  455|   149k|      CURL_TRC_CF(data, cf, "check for next AAAA address: %s",
  ------------------
  |  |  153|   149k|  do {                                          \
  |  |  154|   149k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   149k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   298k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 149k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 149k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   298k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   149k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   149k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|   149k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 149k]
  |  |  ------------------
  ------------------
  456|   149k|                  ai ? "found" : "none");
  457|   149k|    }
  458|   149k|#endif
  459|   149k|    if(!ai) {
  ------------------
  |  Branch (459:8): [True: 149k, False: 73]
  ------------------
  460|   149k|      ai = cf_ai_iter_next(&bs->addr_iter, data);
  461|   149k|      ai_family = bs->addr_iter.ai_family;
  462|   149k|      CURL_TRC_CF(data, cf, "check for next A address: %s",
  ------------------
  |  |  153|   149k|  do {                                          \
  |  |  154|   149k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   149k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   298k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 149k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 149k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   298k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   149k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   149k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|   149k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 149k]
  |  |  ------------------
  ------------------
  463|   149k|                  ai ? "found" : "none");
  464|   149k|    }
  465|       |    /* We are (re-)starting attempts. We are not interested in
  466|       |     * keeping old failure information. The new attempt will either
  467|       |     * succeed or persist new failure. */
  468|   149k|    Curl_reset_fail(data);
  469|       |
  470|   149k|    if(ai) {  /* try another address */
  ------------------
  |  Branch (470:8): [True: 10.2k, False: 139k]
  ------------------
  471|  10.2k|      struct Curl_sockaddr_ex addr;
  472|       |
  473|       |      /* Discard oldest to make room for new attempt */
  474|  10.2k|      if(bs->max_concurrent)
  ------------------
  |  Branch (474:10): [True: 10.2k, False: 0]
  ------------------
  475|  10.2k|        cf_ip_ballers_prune(bs, cf, data, bs->max_concurrent - 1);
  476|       |
  477|  10.2k|      result = Curl_socket_addr_from_ai(&addr, ai, bs->transport_out);
  478|  10.2k|      if(result)
  ------------------
  |  Branch (478:10): [True: 0, False: 10.2k]
  ------------------
  479|      0|        goto out;
  480|       |
  481|  10.2k|      result = cf_ip_attempt_new(&a, cf, data, &addr, ai_family,
  482|  10.2k|                                 bs->transport_in, bs->transport_out,
  483|  10.2k|                                 bs->cf_create);
  484|  10.2k|      CURL_TRC_CF(data, cf, "starting %s attempt for ipv%s -> %d",
  ------------------
  |  |  153|  10.2k|  do {                                          \
  |  |  154|  10.2k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.2k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.2k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.2k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
  485|  10.2k|                  bs->running ? "next" : "first",
  486|  10.2k|                  (ai_family == AF_INET) ? "4" : "6", result);
  487|  10.2k|      if(result)
  ------------------
  |  Branch (487:10): [True: 0, False: 10.2k]
  ------------------
  488|      0|        goto out;
  489|  10.2k|      DEBUGASSERT(a);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (489:7): [True: 0, False: 10.2k]
  |  Branch (489:7): [True: 10.2k, False: 0]
  ------------------
  490|       |
  491|       |      /* append to running list */
  492|  10.2k|      panchor = &bs->running;
  493|  10.3k|      while(*panchor)
  ------------------
  |  Branch (493:13): [True: 25, False: 10.2k]
  ------------------
  494|     25|        panchor = &((*panchor)->next);
  495|  10.2k|      *panchor = a;
  496|  10.2k|      bs->last_attempt_started = *Curl_pgrs_now(data);
  497|  10.2k|      bs->last_attempt_ai_family = ai_family;
  498|       |      /* and run everything again */
  499|  10.2k|      goto evaluate;
  500|  10.2k|    }
  501|   139k|    else if(inconclusive) {
  ------------------
  |  Branch (501:13): [True: 0, False: 139k]
  ------------------
  502|       |      /* tried all addresses, no success but some where inconclusive.
  503|       |       * Let's restart the inconclusive ones. */
  504|      0|      timediff_t since_ms =
  505|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  506|      0|      timediff_t delay_ms = bs->attempt_delay_ms - since_ms;
  507|      0|      if(delay_ms <= 0) {
  ------------------
  |  Branch (507:10): [True: 0, False: 0]
  ------------------
  508|      0|        CURL_TRC_CF(data, cf, "all attempts inconclusive, restarting one");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  509|      0|        VERBOSE(i = -1);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
  510|      0|        for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (510:30): [True: 0, False: 0]
  ------------------
  511|      0|          VERBOSE(++i);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
  512|      0|          if(!a->inconclusive)
  ------------------
  |  Branch (512:14): [True: 0, False: 0]
  ------------------
  513|      0|            continue;
  514|      0|          result = cf_ip_attempt_restart(a, cf, data);
  515|      0|          CURL_TRC_CF(data, cf, "restarted baller %d -> %d", i, result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  516|      0|          if(result) /* serious failure */
  ------------------
  |  Branch (516:14): [True: 0, False: 0]
  ------------------
  517|      0|            goto out;
  518|      0|          bs->last_attempt_started = *Curl_pgrs_now(data);
  519|      0|          goto evaluate;
  520|      0|        }
  521|      0|        DEBUGASSERT(0); /* should not come here */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (521:9): [Folded, False: 0]
  |  Branch (521:9): [Folded, False: 0]
  ------------------
  522|      0|      }
  523|      0|      else {
  524|       |        /* let's wait some more before restarting */
  525|      0|        infof(data, "connect attempts inconclusive, retrying "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  526|      0|                    "in %" FMT_TIMEDIFF_T "ms", delay_ms);
  527|      0|        Curl_expire(data, delay_ms, EXPIRE_HAPPY_EYEBALLS);
  528|      0|      }
  529|       |      /* attempt timeout for restart has not expired yet */
  530|      0|      goto out;
  531|      0|    }
  532|   139k|    else if(!ongoing && dns_resolved) {
  ------------------
  |  Branch (532:13): [True: 139k, False: 0]
  |  Branch (532:25): [True: 187, False: 138k]
  ------------------
  533|       |      /* no more addresses, no inconclusive attempts */
  534|    187|      CURL_TRC_CF(data, cf, "no more attempts to try");
  ------------------
  |  |  153|    187|  do {                                          \
  |  |  154|    187|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    187|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    374|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 187, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 187]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    374|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    187|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    187|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    187|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 187]
  |  |  ------------------
  ------------------
  535|    187|      result = CURLE_COULDNT_CONNECT;
  536|    187|      VERBOSE(i = 0);
  ------------------
  |  | 1618|    187|#define VERBOSE(x) x
  ------------------
  537|    399|      for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (537:28): [True: 212, False: 187]
  ------------------
  538|    212|        CURL_TRC_CF(data, cf, "baller %d: result=%d", i, a->result);
  ------------------
  |  |  153|    212|  do {                                          \
  |  |  154|    212|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    212|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    424|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 212, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 212]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    424|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    212|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    212|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    212|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 212]
  |  |  ------------------
  ------------------
  539|    212|        if(a->result)
  ------------------
  |  Branch (539:12): [True: 212, False: 0]
  ------------------
  540|    212|          result = a->result;
  541|    212|      }
  542|    187|    }
  543|   149k|  }
  544|       |
  545|   273k|out:
  546|   273k|  if(!result) {
  ------------------
  |  Branch (546:6): [True: 272k, False: 187]
  ------------------
  547|   272k|    bool more_possible;
  548|       |
  549|       |    /* when do we need to be called again? */
  550|   272k|    next_expire_ms = Curl_timeleft_ms(data);
  551|   272k|    if(next_expire_ms < 0) {
  ------------------
  |  Branch (551:8): [True: 0, False: 272k]
  ------------------
  552|      0|      failf(data, "Connection timeout after %" FMT_OFF_T " ms",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  553|      0|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  554|      0|                               &data->progress.t_startsingle));
  555|      0|      return CURLE_OPERATION_TIMEDOUT;
  556|      0|    }
  557|       |
  558|   272k|    more_possible = cf_ai_iter_has_more(&bs->addr_iter, data);
  559|   272k|#ifdef USE_IPV6
  560|   272k|    if(!more_possible)
  ------------------
  |  Branch (560:8): [True: 272k, False: 0]
  ------------------
  561|   272k|      more_possible = cf_ai_iter_has_more(&bs->ipv6_iter, data);
  562|   272k|#endif
  563|   272k|    if(more_possible) {
  ------------------
  |  Branch (563:8): [True: 0, False: 272k]
  ------------------
  564|      0|      timediff_t expire_ms, elapsed_ms;
  565|      0|      elapsed_ms =
  566|      0|        curlx_ptimediff_ms(Curl_pgrs_now(data), &bs->last_attempt_started);
  567|      0|      expire_ms = CURLMAX(bs->attempt_delay_ms - elapsed_ms, 0);
  ------------------
  |  | 1286|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  568|      0|      next_expire_ms = CURLMIN(next_expire_ms, expire_ms);
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  569|      0|      if(next_expire_ms <= 0) {
  ------------------
  |  Branch (569:10): [True: 0, False: 0]
  ------------------
  570|      0|        CURL_TRC_CF(data, cf, "HAPPY_EYEBALLS timeout due, re-evaluate");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  571|      0|        goto evaluate;
  572|      0|      }
  573|      0|      CURL_TRC_CF(data, cf, "next HAPPY_EYEBALLS timeout in %" FMT_TIMEDIFF_T
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  574|      0|                  "ms", next_expire_ms);
  575|      0|      Curl_expire(data, next_expire_ms, EXPIRE_HAPPY_EYEBALLS);
  576|      0|    }
  577|   272k|  }
  578|   273k|  return result;
  579|   273k|}
cf-ip-happy.c:cf_ip_attempt_connect:
  232|   144k|{
  233|   144k|  *connected = (bool)a->connected;
  234|   144k|  if(!a->result && !*connected) {
  ------------------
  |  Branch (234:6): [True: 144k, False: 27]
  |  Branch (234:20): [True: 144k, False: 0]
  ------------------
  235|       |    /* evaluate again */
  236|   144k|    a->result = Curl_conn_cf_connect(a->cf, data, connected);
  237|       |
  238|   144k|    if(!a->result) {
  ------------------
  |  Branch (238:8): [True: 143k, False: 212]
  ------------------
  239|   143k|      if(*connected) {
  ------------------
  |  Branch (239:10): [True: 10.0k, False: 133k]
  ------------------
  240|  10.0k|        a->connected = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
  241|  10.0k|      }
  242|   143k|    }
  243|    212|    else {
  244|    212|      if(a->result == CURLE_WEIRD_SERVER_REPLY)
  ------------------
  |  Branch (244:10): [True: 0, False: 212]
  ------------------
  245|      0|        a->inconclusive = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  246|    212|      if(a->cf)
  ------------------
  |  Branch (246:10): [True: 212, False: 0]
  ------------------
  247|    212|        Curl_conn_cf_discard_chain(&a->cf, data);
  248|    212|    }
  249|   144k|  }
  250|   144k|  return a->result;
  251|   144k|}
cf-ip-happy.c:cf_ai_iter_has_more:
  151|   813k|{
  152|   813k|  return (iter->cf &&
  ------------------
  |  Branch (152:11): [True: 813k, False: 0]
  ------------------
  153|   813k|          !!Curl_conn_dns_get_ai(data, iter->cf->sockindex,
  ------------------
  |  Branch (153:11): [True: 25, False: 813k]
  ------------------
  154|   813k|                                 iter->ai_family, iter->n));
  155|   813k|}
cf-ip-happy.c:cf_ai_iter_next:
  136|   298k|{
  137|   298k|  const struct Curl_addrinfo *addr;
  138|       |
  139|   298k|  if(!iter->cf)
  ------------------
  |  Branch (139:6): [True: 403, False: 298k]
  ------------------
  140|    403|    return NULL;
  141|       |
  142|   298k|  addr = Curl_conn_dns_get_ai(data, iter->cf->sockindex,
  143|   298k|                              iter->ai_family, iter->n);
  144|   298k|  if(addr)
  ------------------
  |  Branch (144:6): [True: 10.2k, False: 288k]
  ------------------
  145|  10.2k|    iter->n++;
  146|   298k|  return addr;
  147|   298k|}
cf-ip-happy.c:cf_ip_ballers_prune:
  349|  10.2k|{
  350|  10.2k|  struct cf_ip_attempt *a = NULL, **panchor;
  351|  10.2k|  uint32_t ongoing = 0;
  352|       |
  353|  10.3k|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (353:24): [True: 25, False: 10.2k]
  ------------------
  354|     25|    if(!a->result && !a->connected)
  ------------------
  |  Branch (354:8): [True: 0, False: 25]
  |  Branch (354:22): [True: 0, False: 0]
  ------------------
  355|      0|      ++ongoing;
  356|     25|  }
  357|       |
  358|  10.2k|  panchor = &bs->running;
  359|  10.2k|  while(*panchor && (ongoing > max_concurrent)) {
  ------------------
  |  Branch (359:9): [True: 25, False: 10.2k]
  |  Branch (359:21): [True: 0, False: 25]
  ------------------
  360|      0|    a = *panchor;
  361|      0|    if(!a->result && !a->connected) {
  ------------------
  |  Branch (361:8): [True: 0, False: 0]
  |  Branch (361:22): [True: 0, False: 0]
  ------------------
  362|      0|      *panchor = a->next;
  363|      0|      a->next = NULL;
  364|      0|      cf_ip_attempt_free(a, data);
  365|      0|      --ongoing;
  366|      0|      CURL_TRC_CF(data, cf, "discarding oldest attempt to keep limit");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  367|      0|    }
  368|      0|    else {
  369|      0|      panchor = &a->next;
  370|      0|    }
  371|      0|  }
  372|  10.2k|}
cf-ip-happy.c:cf_ip_attempt_new:
  192|  10.2k|{
  193|  10.2k|  struct Curl_cfilter *wcf;
  194|  10.2k|  struct cf_ip_attempt *a;
  195|  10.2k|  CURLcode result = CURLE_OK;
  196|       |
  197|  10.2k|  *pa = NULL;
  198|  10.2k|  a = curlx_calloc(1, sizeof(*a));
  ------------------
  |  | 1480|  10.2k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  199|  10.2k|  if(!a)
  ------------------
  |  Branch (199:6): [True: 0, False: 10.2k]
  ------------------
  200|      0|    return CURLE_OUT_OF_MEMORY;
  201|       |
  202|  10.2k|  a->addr = *addr;
  203|  10.2k|  a->ai_family = ai_family;
  204|  10.2k|  a->transport_in = transport_in;
  205|  10.2k|  a->transport_out = transport_out;
  206|  10.2k|  a->result = CURLE_OK;
  207|  10.2k|  a->cf_create = cf_create;
  208|  10.2k|  *pa = a;
  209|       |
  210|  10.2k|  result = a->cf_create(&a->cf, data, cf->conn, &a->addr,
  211|  10.2k|                        a->transport_in, a->transport_out);
  212|  10.2k|  if(result)
  ------------------
  |  Branch (212:6): [True: 0, False: 10.2k]
  ------------------
  213|      0|    goto out;
  214|       |
  215|       |  /* the new filter might have sub-filters */
  216|  20.5k|  for(wcf = a->cf; wcf; wcf = wcf->next) {
  ------------------
  |  Branch (216:20): [True: 10.2k, False: 10.2k]
  ------------------
  217|  10.2k|    wcf->conn = cf->conn;
  218|  10.2k|    wcf->sockindex = cf->sockindex;
  219|  10.2k|  }
  220|       |
  221|  10.2k|out:
  222|  10.2k|  if(result) {
  ------------------
  |  Branch (222:6): [True: 0, False: 10.2k]
  ------------------
  223|      0|    cf_ip_attempt_free(a, data);
  224|       |    *pa = NULL;
  225|      0|  }
  226|  10.2k|  return result;
  227|  10.2k|}
cf-ip-happy.c:cf_ip_happy_close:
  896|  3.24k|{
  897|  3.24k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  898|       |
  899|  3.24k|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|  3.24k|  do {                                          \
  |  |  154|  3.24k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.24k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.49k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.24k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.49k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.24k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.24k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.24k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.24k]
  |  |  ------------------
  ------------------
  900|  3.24k|  cf_ip_happy_ctx_clear(cf, data);
  901|  3.24k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  3.24k|#define FALSE false
  ------------------
  902|  3.24k|  ctx->state = SCFST_INIT;
  903|       |
  904|  3.24k|  if(cf->next) {
  ------------------
  |  Branch (904:6): [True: 2.94k, False: 300]
  ------------------
  905|  2.94k|    cf->next->cft->do_close(cf->next, data);
  906|  2.94k|    Curl_conn_cf_discard_chain(&cf->next, data);
  907|  2.94k|  }
  908|  3.24k|}
cf-ip-happy.c:cf_ip_happy_adjust_pollset:
  802|   764k|{
  803|   764k|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  804|   764k|  CURLcode result = CURLE_OK;
  805|       |
  806|   764k|  if(!cf->connected) {
  ------------------
  |  Branch (806:6): [True: 272k, False: 491k]
  ------------------
  807|   272k|    result = cf_ip_ballers_pollset(&ctx->ballers, data, ps);
  808|   272k|    CURL_TRC_CF(data, cf, "adjust_pollset -> %d, %u socks", result, ps->n);
  ------------------
  |  |  153|   272k|  do {                                          \
  |  |  154|   272k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   272k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   545k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 272k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 272k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   545k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   272k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   272k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   272k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 272k]
  |  |  ------------------
  ------------------
  809|   272k|  }
  810|   764k|  return result;
  811|   764k|}
cf-ip-happy.c:cf_ip_ballers_pollset:
  606|   272k|{
  607|   272k|  struct cf_ip_attempt *a;
  608|   272k|  CURLcode result = CURLE_OK;
  609|   406k|  for(a = bs->running; a && !result; a = a->next) {
  ------------------
  |  Branch (609:24): [True: 133k, False: 272k]
  |  Branch (609:29): [True: 133k, False: 0]
  ------------------
  610|   133k|    if(a->result)
  ------------------
  |  Branch (610:8): [True: 2, False: 133k]
  ------------------
  611|      2|      continue;
  612|   133k|    result = Curl_conn_cf_adjust_pollset(a->cf, data, ps);
  613|   133k|  }
  614|   272k|  return result;
  615|   272k|}
cf-ip-happy.c:cf_ip_happy_query:
  924|  1.28M|{
  925|  1.28M|  struct cf_ip_happy_ctx *ctx = cf->ctx;
  926|       |
  927|  1.28M|  if(!cf->connected) {
  ------------------
  |  Branch (927:6): [True: 283k, False: 1.00M]
  ------------------
  928|   283k|    switch(query) {
  929|      0|    case CF_QUERY_CONNECT_REPLY_MS: {
  ------------------
  |  |  166|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (929:5): [True: 0, False: 283k]
  ------------------
  930|      0|      *pres1 = cf_ip_ballers_min_reply_ms(&ctx->ballers, data);
  931|      0|      CURL_TRC_CF(data, cf, "query connect reply: %dms", *pres1);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  932|      0|      return CURLE_OK;
  933|      0|    }
  934|    259|    case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  168|    259|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (934:5): [True: 259, False: 283k]
  ------------------
  935|    259|      struct curltime *when = pres2;
  936|    259|      *when = cf_ip_ballers_max_time(&ctx->ballers, data,
  937|    259|                                     CF_QUERY_TIMER_CONNECT);
  ------------------
  |  |  168|    259|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  938|    259|      return CURLE_OK;
  939|      0|    }
  940|    259|    case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  169|    259|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (940:5): [True: 259, False: 283k]
  ------------------
  941|    259|      struct curltime *when = pres2;
  942|    259|      *when = cf_ip_ballers_max_time(&ctx->ballers, data,
  943|    259|                                     CF_QUERY_TIMER_APPCONNECT);
  ------------------
  |  |  169|    259|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  944|    259|      return CURLE_OK;
  945|      0|    }
  946|   283k|    default:
  ------------------
  |  Branch (946:5): [True: 283k, False: 518]
  ------------------
  947|   283k|      break;
  948|   283k|    }
  949|   283k|  }
  950|       |
  951|  1.28M|  return cf->next ?
  ------------------
  |  Branch (951:10): [True: 1.00M, False: 283k]
  ------------------
  952|  1.00M|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  953|  1.28M|    CURLE_UNKNOWN_OPTION;
  954|  1.28M|}
cf-ip-happy.c:cf_ip_ballers_max_time:
  634|    518|{
  635|    518|  struct curltime t, tmax;
  636|    518|  struct cf_ip_attempt *a;
  637|       |
  638|    518|  memset(&tmax, 0, sizeof(tmax));
  639|    942|  for(a = bs->running; a; a = a->next) {
  ------------------
  |  Branch (639:24): [True: 424, False: 518]
  ------------------
  640|    424|    memset(&t, 0, sizeof(t));
  641|    424|    if(a->cf && !a->cf->cft->query(a->cf, data, query, NULL, &t)) {
  ------------------
  |  Branch (641:8): [True: 0, False: 424]
  |  Branch (641:17): [True: 0, False: 0]
  ------------------
  642|      0|      if((t.tv_sec || t.tv_usec) && curlx_ptimediff_us(&t, &tmax) > 0)
  ------------------
  |  Branch (642:11): [True: 0, False: 0]
  |  Branch (642:23): [True: 0, False: 0]
  |  Branch (642:37): [True: 0, False: 0]
  ------------------
  643|      0|        tmax = t;
  644|      0|    }
  645|    424|  }
  646|    518|  return tmax;
  647|    518|}
cf-ip-happy.c:get_cf_create:
   93|  10.3k|{
   94|  10.3k|  size_t i;
   95|  14.4k|  for(i = 0; i < CURL_ARRAYSIZE(transport_providers); ++i) {
  ------------------
  |  | 1294|  14.4k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (95:14): [True: 14.4k, False: 0]
  ------------------
   96|  14.4k|    if((transport == transport_providers[i].transport) &&
  ------------------
  |  Branch (96:8): [True: 13.2k, False: 1.19k]
  ------------------
   97|  13.2k|       (tunnel_proxy == transport_providers[i].tunnel_proxy))
  ------------------
  |  Branch (97:8): [True: 10.3k, False: 2.93k]
  ------------------
   98|  10.3k|      return transport_providers[i].cf_create;
   99|  14.4k|  }
  100|      0|  return NULL;
  101|  10.3k|}
cf-ip-happy.c:cf_ip_happy_create:
 1003|  10.3k|{
 1004|  10.3k|  struct cf_ip_happy_ctx *ctx = NULL;
 1005|  10.3k|  CURLcode result;
 1006|       |
 1007|  10.3k|  (void)data;
 1008|  10.3k|  (void)conn;
 1009|  10.3k|  *pcf = NULL;
 1010|  10.3k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  10.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1011|  10.3k|  if(!ctx) {
  ------------------
  |  Branch (1011:6): [True: 0, False: 10.3k]
  ------------------
 1012|      0|    result = CURLE_OUT_OF_MEMORY;
 1013|      0|    goto out;
 1014|      0|  }
 1015|  10.3k|  ctx->transport_in = transport_in;
 1016|  10.3k|  ctx->transport_out = transport_out;
 1017|  10.3k|  ctx->cf_create = cf_create;
 1018|  10.3k|  Curl_peer_link(&ctx->peer, peer);
 1019|       |
 1020|  10.3k|  result = Curl_cf_create(pcf, &Curl_cft_ip_happy, ctx);
 1021|       |
 1022|  10.3k|out:
 1023|  10.3k|  if(result) {
  ------------------
  |  Branch (1023:6): [True: 0, False: 10.3k]
  ------------------
 1024|       |    curlx_safefree(*pcf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1025|      0|    cf_ip_happy_ctx_destroy(ctx);
 1026|      0|  }
 1027|  10.3k|  return result;
 1028|  10.3k|}

Curl_socket_addr_from_ai:
  276|  10.2k|{
  277|       |  /*
  278|       |   * The Curl_sockaddr_ex structure is libcurl's external API
  279|       |   * curl_sockaddr structure with enough space available to directly hold
  280|       |   * any protocol-specific address structures. The variable declared here
  281|       |   * will be used to pass / receive data to/from the fopensocket callback
  282|       |   * if this has been set, before that, it is initialized from parameters.
  283|       |   */
  284|  10.2k|  addr->family = ai->ai_family;
  285|  10.2k|  addr->socktype = Curl_socktype_for_transport(transport);
  286|  10.2k|  addr->protocol = Curl_protocol_for_transport(transport);
  287|  10.2k|  addr->addrlen = (unsigned int)ai->ai_addrlen;
  288|       |
  289|  10.2k|  DEBUGASSERT(addr->addrlen <= sizeof(addr->curl_sa_addrbuf));
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 0, False: 10.2k]
  |  Branch (289:3): [True: 10.2k, False: 0]
  ------------------
  290|  10.2k|  if(addr->addrlen > sizeof(addr->curl_sa_addrbuf))
  ------------------
  |  |   55|  10.2k|#define curl_sa_addrbuf addr.buf
  ------------------
  |  Branch (290:6): [True: 0, False: 10.2k]
  ------------------
  291|      0|    return CURLE_TOO_LARGE;
  292|       |
  293|  10.2k|  memcpy(&addr->curl_sa_addrbuf, ai->ai_addr, addr->addrlen);
  ------------------
  |  |   55|  10.2k|#define curl_sa_addrbuf addr.buf
  ------------------
  294|  10.2k|  return CURLE_OK;
  295|  10.2k|}
Curl_parse_interface:
  517|    262|{
  518|    262|  static const char if_prefix[] = "if!";
  519|    262|  static const char host_prefix[] = "host!";
  520|    262|  static const char if_host_prefix[] = "ifhost!";
  521|    262|  size_t len;
  522|       |
  523|    262|  DEBUGASSERT(dev);
  ------------------
  |  | 1081|    262|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 262]
  |  Branch (523:3): [True: 262, False: 0]
  ------------------
  524|    262|  DEBUGASSERT(iface);
  ------------------
  |  | 1081|    262|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (524:3): [True: 0, False: 262]
  |  Branch (524:3): [True: 262, False: 0]
  ------------------
  525|    262|  DEBUGASSERT(host);
  ------------------
  |  | 1081|    262|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (525:3): [True: 0, False: 262]
  |  Branch (525:3): [True: 262, False: 0]
  ------------------
  526|       |
  527|    262|  len = strlen(input);
  528|    262|  if(len > 512)
  ------------------
  |  Branch (528:6): [True: 1, False: 261]
  ------------------
  529|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  530|       |
  531|    261|  if(!strncmp(if_prefix, input, strlen(if_prefix))) {
  ------------------
  |  Branch (531:6): [True: 5, False: 256]
  ------------------
  532|      5|    input += strlen(if_prefix);
  533|      5|    if(!*input)
  ------------------
  |  Branch (533:8): [True: 1, False: 4]
  ------------------
  534|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  535|      4|    *iface = curlx_memdup0(input, len - strlen(if_prefix));
  536|      4|    return *iface ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (536:12): [True: 4, False: 0]
  ------------------
  537|      5|  }
  538|    256|  else if(!strncmp(host_prefix, input, strlen(host_prefix))) {
  ------------------
  |  Branch (538:11): [True: 11, False: 245]
  ------------------
  539|     11|    input += strlen(host_prefix);
  540|     11|    if(!*input)
  ------------------
  |  Branch (540:8): [True: 1, False: 10]
  ------------------
  541|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
  542|     10|    *host = curlx_memdup0(input, len - strlen(host_prefix));
  543|     10|    return *host ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (543:12): [True: 10, False: 0]
  ------------------
  544|     11|  }
  545|    245|  else if(!strncmp(if_host_prefix, input, strlen(if_host_prefix))) {
  ------------------
  |  Branch (545:11): [True: 6, False: 239]
  ------------------
  546|      6|    const char *host_part;
  547|      6|    input += strlen(if_host_prefix);
  548|      6|    len -= strlen(if_host_prefix);
  549|      6|    host_part = memchr(input, '!', len);
  550|      6|    if(!host_part || !*(host_part + 1))
  ------------------
  |  Branch (550:8): [True: 1, False: 5]
  |  Branch (550:22): [True: 1, False: 4]
  ------------------
  551|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
  552|      4|    *iface = curlx_memdup0(input, host_part - input);
  553|      4|    if(!*iface)
  ------------------
  |  Branch (553:8): [True: 0, False: 4]
  ------------------
  554|      0|      return CURLE_OUT_OF_MEMORY;
  555|      4|    ++host_part;
  556|      4|    *host = curlx_memdup0(host_part, len - (host_part - input));
  557|      4|    if(!*host) {
  ------------------
  |  Branch (557:8): [True: 0, False: 4]
  ------------------
  558|      0|      curlx_safefree(*iface);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  559|      0|      return CURLE_OUT_OF_MEMORY;
  560|      0|    }
  561|      4|    return CURLE_OK;
  562|      4|  }
  563|       |
  564|    239|  if(!*input)
  ------------------
  |  Branch (564:6): [True: 1, False: 238]
  ------------------
  565|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  566|    238|  *dev = curlx_memdup0(input, len);
  567|    238|  return *dev ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (567:10): [True: 238, False: 0]
  ------------------
  568|    239|}
Curl_cf_tcp_create:
 1773|  9.89k|{
 1774|  9.89k|  struct cf_socket_ctx *ctx = NULL;
 1775|  9.89k|  struct Curl_cfilter *cf = NULL;
 1776|  9.89k|  CURLcode result;
 1777|       |
 1778|  9.89k|  (void)data;
 1779|  9.89k|  (void)conn;
 1780|  9.89k|  (void)transport_in;
 1781|  9.89k|  DEBUGASSERT(transport_out == TRNSPRT_TCP);
  ------------------
  |  | 1081|  9.89k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1781:3): [True: 0, False: 9.89k]
  |  Branch (1781:3): [True: 9.89k, False: 0]
  ------------------
 1782|  9.89k|  if(!addr) {
  ------------------
  |  Branch (1782:6): [True: 0, False: 9.89k]
  ------------------
 1783|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
 1784|      0|    goto out;
 1785|      0|  }
 1786|       |
 1787|  9.89k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  9.89k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1788|  9.89k|  if(!ctx) {
  ------------------
  |  Branch (1788:6): [True: 0, False: 9.89k]
  ------------------
 1789|      0|    result = CURLE_OUT_OF_MEMORY;
 1790|      0|    goto out;
 1791|      0|  }
 1792|       |
 1793|  9.89k|  result = cf_socket_ctx_init(ctx, addr, transport_out);
 1794|  9.89k|  if(result)
  ------------------
  |  Branch (1794:6): [True: 0, False: 9.89k]
  ------------------
 1795|      0|    goto out;
 1796|       |
 1797|  9.89k|  result = Curl_cf_create(&cf, &Curl_cft_tcp, ctx);
 1798|       |
 1799|  9.89k|out:
 1800|  9.89k|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (1800:10): [True: 9.89k, False: 0]
  ------------------
 1801|  9.89k|  if(result) {
  ------------------
  |  Branch (1801:6): [True: 0, False: 9.89k]
  ------------------
 1802|      0|    curlx_safefree(cf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1803|      0|    curlx_safefree(ctx);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1804|      0|  }
 1805|       |
 1806|  9.89k|  return result;
 1807|  9.89k|}
Curl_cf_unix_create:
 1997|    398|{
 1998|    398|  struct cf_socket_ctx *ctx = NULL;
 1999|    398|  struct Curl_cfilter *cf = NULL;
 2000|    398|  CURLcode result;
 2001|       |
 2002|    398|  (void)data;
 2003|    398|  (void)conn;
 2004|    398|  (void)transport_in;
 2005|    398|  DEBUGASSERT(transport_out == TRNSPRT_UNIX);
  ------------------
  |  | 1081|    398|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2005:3): [True: 0, False: 398]
  |  Branch (2005:3): [True: 398, False: 0]
  ------------------
 2006|    398|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|    398|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 2007|    398|  if(!ctx) {
  ------------------
  |  Branch (2007:6): [True: 0, False: 398]
  ------------------
 2008|      0|    result = CURLE_OUT_OF_MEMORY;
 2009|      0|    goto out;
 2010|      0|  }
 2011|       |
 2012|    398|  result = cf_socket_ctx_init(ctx, addr, transport_out);
 2013|    398|  if(result)
  ------------------
  |  Branch (2013:6): [True: 0, False: 398]
  ------------------
 2014|      0|    goto out;
 2015|       |
 2016|    398|  result = Curl_cf_create(&cf, &Curl_cft_unix, ctx);
 2017|       |
 2018|    398|out:
 2019|    398|  *pcf = (!result) ? cf : NULL;
  ------------------
  |  Branch (2019:10): [True: 398, False: 0]
  ------------------
 2020|    398|  if(result) {
  ------------------
  |  Branch (2020:6): [True: 0, False: 398]
  ------------------
 2021|      0|    curlx_safefree(cf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2022|      0|    curlx_safefree(ctx);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2023|      0|  }
 2024|       |
 2025|    398|  return result;
 2026|    398|}
cf-socket.c:socket_open:
  352|  10.2k|{
  353|  10.2k|  char errbuf[STRERROR_LEN];
  354|       |
  355|  10.2k|#ifdef SOCK_CLOEXEC
  356|  10.2k|  addr->socktype |= SOCK_CLOEXEC;
  357|  10.2k|#endif
  358|       |
  359|  10.2k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (359:3): [True: 0, False: 10.2k]
  |  Branch (359:3): [True: 10.2k, False: 0]
  ------------------
  360|  10.2k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (360:3): [True: 0, False: 10.2k]
  |  Branch (360:3): [True: 10.2k, False: 0]
  ------------------
  361|  10.2k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (361:6): [True: 10.2k, False: 79]
  ------------------
  362|       |    /*
  363|       |     * If the opensocket callback is set, all the destination address
  364|       |     * information is passed to the callback. Depending on this information the
  365|       |     * callback may opt to abort the connection, this is indicated returning
  366|       |     * CURL_SOCKET_BAD; otherwise it will return a not-connected socket. When
  367|       |     * the callback returns a valid socket the destination address information
  368|       |     * might have been changed and this 'new' address will actually be used
  369|       |     * here to connect.
  370|       |     */
  371|  10.2k|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  372|  10.2k|    *sockfd = data->set.fopensocket(data->set.opensocket_client,
  373|  10.2k|                                    CURLSOCKTYPE_IPCXN,
  374|  10.2k|                                    (struct curl_sockaddr *)addr);
  375|  10.2k|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|  10.2k|#define FALSE false
  ------------------
  376|  10.2k|  }
  377|     79|  else {
  378|       |    /* opensocket callback not set, so create the socket now */
  379|     79|#ifdef DEBUGBUILD
  380|     79|    if((addr->family == AF_INET6) && getenv("CURL_DBG_SOCK_FAIL_IPV6")) {
  ------------------
  |  Branch (380:8): [True: 26, False: 53]
  |  Branch (380:38): [True: 0, False: 26]
  ------------------
  381|      0|      failf(data, "CURL_DBG_SOCK_FAIL_IPV6: failed to open socket");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  382|      0|      return CURLE_COULDNT_CONNECT;
  383|      0|    }
  384|     79|#endif
  385|     79|    *sockfd = CURL_SOCKET(addr->family, addr->socktype, addr->protocol);
  ------------------
  |  | 1436|     79|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  386|     79|    if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  |  145|     79|#define CURL_SOCKET_BAD (-1)
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if((*sockfd == CURL_SOCKET_BAD) && (SOCKERRNO == SOCKENOMEM))
  ------------------
  |  | 1133|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (386:8): [True: 0, False: 79]
  |  Branch (386:40): [True: 0, False: 0]
  ------------------
  387|      0|      return CURLE_OUT_OF_MEMORY;
  388|     79|  }
  389|       |
  390|  10.2k|  if(*sockfd == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  10.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (390:6): [True: 30, False: 10.2k]
  ------------------
  391|       |    /* no socket, no connection */
  392|     30|    failf(data, "failed to open socket: %s",
  ------------------
  |  |   62|     30|#define failf Curl_failf
  ------------------
  393|     30|          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  ------------------
  |  | 1095|     30|#define SOCKERRNO         errno
  ------------------
  394|     30|    return CURLE_COULDNT_CONNECT;
  395|     30|  }
  396|       |
  397|       |#ifdef USE_SO_NOSIGPIPE
  398|       |  if(Curl_sock_nosigpipe(*sockfd) < 0) {
  399|       |    failf(data, "setsockopt enable SO_NOSIGPIPE: %s",
  400|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  401|       |    sclose(*sockfd);
  402|       |    *sockfd = CURL_SOCKET_BAD;
  403|       |    return CURLE_COULDNT_CONNECT;
  404|       |  }
  405|       |#endif /* USE_SO_NOSIGPIPE */
  406|       |
  407|       |#if defined(HAVE_FCNTL) && !defined(SOCK_CLOEXEC)
  408|       |  if(fcntl(*sockfd, F_SETFD, FD_CLOEXEC) < 0) {
  409|       |    failf(data, "fcntl set CLOEXEC: %s",
  410|       |          curlx_strerror(SOCKERRNO, errbuf, sizeof(errbuf)));
  411|       |    sclose(*sockfd);
  412|       |    *sockfd = CURL_SOCKET_BAD;
  413|       |    return CURLE_COULDNT_CONNECT;
  414|       |  }
  415|       |#endif
  416|       |
  417|  10.2k|#if defined(USE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  418|  10.2k|  if(addr->family == AF_INET6) {
  ------------------
  |  Branch (418:6): [True: 73, False: 10.1k]
  ------------------
  419|     73|    struct sockaddr_in6 * const sa6 = (void *)&addr->curl_sa_addr;
  ------------------
  |  |   54|     73|#define curl_sa_addr    addr.sa
  ------------------
  420|     73|    sa6->sin6_scope_id = get_scope_id(data, sa6);
  421|     73|  }
  422|  10.2k|#endif
  423|  10.2k|  return CURLE_OK;
  424|  10.2k|}
cf-socket.c:get_scope_id:
  309|     73|{
  310|     73|  uint32_t scope_id = 0;
  311|     73|  if(data->conn->scope_id)
  ------------------
  |  Branch (311:6): [True: 11, False: 62]
  ------------------
  312|     11|    return data->conn->scope_id;
  313|       |  /* NOLINTNEXTLINE(clang-analyzer-core.uninitialized.Assign) */
  314|     62|  scope_id = sa6->sin6_scope_id;
  315|     62|  if(!scope_id && IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) {
  ------------------
  |  Branch (315:6): [True: 62, False: 0]
  |  Branch (315:19): [True: 1, False: 61]
  ------------------
  316|       |    /* The resolver did not set scope_id for this link-local address.
  317|       |     * Try to determine it from the system's network interfaces.
  318|       |     * Without a scope_id, connect() to a link-local address fails
  319|       |     * with EINVAL on Linux.
  320|       |     * NOTE: On multi-homed hosts with several interfaces having
  321|       |     * link-local addresses, this picks the first one found, which
  322|       |     * may not be the correct outgoing interface. */
  323|      1|#if defined(HAVE_GETIFADDRS) && defined(HAVE_NET_IF_H)
  324|      1|    struct ifaddrs *ifa, *ifa_list;
  325|      1|    if(getifaddrs(&ifa_list) == 0) {
  ------------------
  |  Branch (325:8): [True: 1, False: 0]
  ------------------
  326|      5|      for(ifa = ifa_list; ifa; ifa = ifa->ifa_next) {
  ------------------
  |  Branch (326:27): [True: 4, False: 1]
  ------------------
  327|      4|        if(ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET6 &&
  ------------------
  |  Branch (327:12): [True: 4, False: 0]
  |  Branch (327:29): [True: 0, False: 4]
  ------------------
  328|      0|           (ifa->ifa_flags & IFF_UP) &&
  ------------------
  |  Branch (328:12): [True: 0, False: 0]
  ------------------
  329|      0|           !(ifa->ifa_flags & IFF_LOOPBACK)) {
  ------------------
  |  Branch (329:12): [True: 0, False: 0]
  ------------------
  330|      0|          struct sockaddr_in6 *s6 = (void *)ifa->ifa_addr;
  331|      0|          if(IN6_IS_ADDR_LINKLOCAL(&s6->sin6_addr) && s6->sin6_scope_id) {
  ------------------
  |  Branch (331:14): [True: 0, False: 0]
  |  Branch (331:55): [True: 0, False: 0]
  ------------------
  332|      0|            scope_id = s6->sin6_scope_id;
  333|      0|            infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  334|      0|                  "determined scope_id=%lu for link-local address "
  335|      0|                  "from local interface",
  336|      0|                  (unsigned long)scope_id);
  337|      0|            break;
  338|      0|          }
  339|      0|        }
  340|      4|      }
  341|      1|      freeifaddrs(ifa_list);
  342|      1|    }
  343|      1|#endif /* HAVE_GETIFADDRS && HAVE_NET_IF_H */
  344|      1|  }
  345|     62|  return scope_id;
  346|     73|}
cf-socket.c:socket_close:
  457|  10.2k|{
  458|  10.2k|  if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  10.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (458:6): [True: 0, False: 10.2k]
  ------------------
  459|      0|    return 0;
  460|       |
  461|  10.2k|  if(use_callback && conn && conn->fclosesocket) {
  ------------------
  |  Branch (461:6): [True: 10.2k, False: 0]
  |  Branch (461:22): [True: 10.2k, False: 0]
  |  Branch (461:30): [True: 0, False: 10.2k]
  ------------------
  462|      0|    int rc;
  463|      0|    Curl_multi_will_close(data, sock);
  464|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  465|      0|    rc = conn->fclosesocket(conn->closesocket_client, sock);
  466|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  467|      0|    return rc;
  468|      0|  }
  469|       |
  470|  10.2k|  if(conn)
  ------------------
  |  Branch (470:6): [True: 10.2k, False: 0]
  ------------------
  471|       |    /* tell the multi-socket code about this */
  472|  10.2k|    Curl_multi_will_close(data, sock);
  473|       |
  474|  10.2k|  sclose(sock);
  ------------------
  |  | 1428|  10.2k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  475|       |
  476|  10.2k|  return 0;
  477|  10.2k|}
cf-socket.c:cf_socket_destroy:
 1016|  10.2k|{
 1017|  10.2k|  struct cf_socket_ctx *ctx = cf->ctx;
 1018|       |
 1019|  10.2k|  cf_socket_close(cf, data);
 1020|  10.2k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  10.2k|  do {                                          \
  |  |  154|  10.2k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.2k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.2k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.2k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
 1021|  10.2k|  curlx_free(ctx);
  ------------------
  |  | 1483|  10.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1022|       |  cf->ctx = NULL;
 1023|  10.2k|}
cf-socket.c:cf_tcp_connect:
 1304|   144k|{
 1305|   144k|  struct cf_socket_ctx *ctx = cf->ctx;
 1306|   144k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1307|   144k|  int rc = 0;
 1308|       |
 1309|   144k|  if(cf->connected) {
  ------------------
  |  Branch (1309:6): [True: 0, False: 144k]
  ------------------
 1310|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1311|      0|    return CURLE_OK;
 1312|      0|  }
 1313|       |
 1314|   144k|  *done = FALSE; /* a negative world view is best */
  ------------------
  |  | 1058|   144k|#define FALSE false
  ------------------
 1315|   144k|  if(ctx->sock == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   144k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1315:6): [True: 10.2k, False: 133k]
  ------------------
 1316|  10.2k|    int error;
 1317|       |
 1318|  10.2k|    result = cf_socket_open(cf, data);
 1319|  10.2k|    if(result)
  ------------------
  |  Branch (1319:8): [True: 167, False: 10.1k]
  ------------------
 1320|    167|      goto out;
 1321|       |
 1322|  10.1k|    if(cf->connected) {
  ------------------
  |  Branch (1322:8): [True: 10.0k, False: 79]
  ------------------
 1323|  10.0k|      *done = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
 1324|  10.0k|      return CURLE_OK;
 1325|  10.0k|    }
 1326|       |
 1327|       |    /* Connect TCP socket */
 1328|     79|    rc = do_connect(cf, data, (bool)cf->conn->bits.tcp_fastopen);
 1329|     79|    error = SOCKERRNO;
  ------------------
  |  | 1095|     79|#define SOCKERRNO         errno
  ------------------
 1330|     79|    set_local_ip(cf, data);
 1331|     79|    CURL_TRC_CF(data, cf, "local address %s port %d...",
  ------------------
  |  |  153|     79|  do {                                          \
  |  |  154|     79|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     79|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    158|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 79, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 79]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    158|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     79|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     79|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     79|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 79]
  |  |  ------------------
  ------------------
 1332|     79|                ctx->ip.local_ip, ctx->ip.local_port);
 1333|     79|    if(rc == -1) {
  ------------------
  |  Branch (1333:8): [True: 79, False: 0]
  ------------------
 1334|     79|      result = socket_connect_result(data, ctx->ip.remote_ip, error);
 1335|     79|      goto out;
 1336|     79|    }
 1337|     79|  }
 1338|       |
 1339|       |#ifdef mpeix
 1340|       |  /* Call this function once now, and ignore the results. We do this to
 1341|       |     "clear" the error state on the socket so that we can later read it
 1342|       |     reliably. This is reported necessary on the MPE/iX operating
 1343|       |     system. */
 1344|       |  (void)verifyconnect(ctx->sock, NULL);
 1345|       |#endif
 1346|       |  /* check socket for connect */
 1347|   133k|  rc = SOCKET_WRITABLE(ctx->sock, 0);
  ------------------
  |  |   79|   133k|  Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  |  |                 Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z)
  |  |  ------------------
  |  |  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  |  |  ------------------
  ------------------
 1348|       |
 1349|   133k|  if(rc == 0) { /* no connection yet */
  ------------------
  |  Branch (1349:6): [True: 133k, False: 19]
  ------------------
 1350|   133k|    CURL_TRC_CF(data, cf, "not connected yet on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|   133k|  do {                                          \
  |  |  154|   133k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   133k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   267k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 133k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   267k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   133k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   133k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   133k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 133k]
  |  |  ------------------
  ------------------
 1351|   133k|    return CURLE_OK;
 1352|   133k|  }
 1353|     19|  else if(rc == CURL_CSELECT_OUT || cf->conn->bits.tcp_fastopen) {
  ------------------
  |  |  291|     38|#define CURL_CSELECT_OUT  0x02
  ------------------
  |  Branch (1353:11): [True: 0, False: 19]
  |  Branch (1353:37): [True: 0, False: 19]
  ------------------
 1354|      0|    if(verifyconnect(ctx->sock, &ctx->error)) {
  ------------------
  |  Branch (1354:8): [True: 0, False: 0]
  ------------------
 1355|       |      /* we are connected with TCP, awesome! */
 1356|      0|      ctx->connected_at = *Curl_pgrs_now(data);
 1357|      0|      set_local_ip(cf, data);
 1358|      0|      *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1359|      0|      cf->connected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1360|      0|      CURL_TRC_CF(data, cf, "connected on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1361|      0|      return CURLE_OK;
 1362|      0|    }
 1363|      0|  }
 1364|     19|  else if(rc & CURL_CSELECT_ERR) {
  ------------------
  |  |  292|     19|#define CURL_CSELECT_ERR  0x04
  ------------------
  |  Branch (1364:11): [True: 19, False: 0]
  ------------------
 1365|     19|    CURL_TRC_CF(data, cf, "poll/select error on fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|     19|  do {                                          \
  |  |  154|     19|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     19|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     38|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 19, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     38|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     19|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     19|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     19|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 19]
  |  |  ------------------
  ------------------
 1366|     19|    (void)verifyconnect(ctx->sock, &ctx->error);
 1367|     19|    result = CURLE_COULDNT_CONNECT;
 1368|     19|  }
 1369|       |
 1370|    265|out:
 1371|    265|  if(result) {
  ------------------
  |  Branch (1371:6): [True: 212, False: 53]
  ------------------
 1372|    212|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|    212|#define VERBOSE(x) x
  ------------------
 1373|    212|    set_local_ip(cf, data);
 1374|    212|    if(ctx->error) {
  ------------------
  |  Branch (1374:8): [True: 19, False: 193]
  ------------------
 1375|     19|      data->state.os_errno = ctx->error;
 1376|     19|      SET_SOCKERRNO(ctx->error);
  ------------------
  |  | 1096|     19|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
 1377|     19|      VERBOSE(curlx_strerror(ctx->error, buffer, sizeof(buffer)));
  ------------------
  |  | 1618|     19|#define VERBOSE(x) x
  ------------------
 1378|     19|    }
 1379|    193|    else {
 1380|    193|      VERBOSE(curlx_strcopy(buffer, sizeof(buffer), STRCONST("peer closed")));
  ------------------
  |  | 1618|    193|#define VERBOSE(x) x
  ------------------
 1381|    193|    }
 1382|    212|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    212|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1382:8): [True: 45, False: 167]
  ------------------
 1383|     45|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1055|     45|#define TRUE true
  ------------------
 1384|     45|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|     45|#define CURL_SOCKET_BAD (-1)
  ------------------
 1385|     45|    }
 1386|    212|    infof(data, "connect to %s port %u from %s port %d failed: %s",
  ------------------
  |  |  143|    212|  do {                               \
  |  |  144|    212|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    212|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 212, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 212]
  |  |  |  |  ------------------
  |  |  |  |  320|    212|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    212|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    212|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 212]
  |  |  ------------------
  ------------------
 1387|    212|          ctx->ip.remote_ip, ctx->ip.remote_port,
 1388|    212|          ctx->ip.local_ip, ctx->ip.local_port,
 1389|    212|          curlx_strerror(ctx->error, buffer, sizeof(buffer)));
 1390|       |    *done = FALSE;
  ------------------
  |  | 1058|    212|#define FALSE false
  ------------------
 1391|    212|  }
 1392|    265|  return result;
 1393|   133k|}
cf-socket.c:cf_socket_open:
 1093|  10.2k|{
 1094|  10.2k|  struct cf_socket_ctx *ctx = cf->ctx;
 1095|  10.2k|  int error = 0;
 1096|  10.2k|  bool isconnected = FALSE;
  ------------------
  |  | 1058|  10.2k|#define FALSE false
  ------------------
 1097|  10.2k|  CURLcode result = CURLE_COULDNT_CONNECT;
 1098|  10.2k|  bool is_tcp;
 1099|       |
 1100|  10.2k|  DEBUGASSERT(ctx->sock == CURL_SOCKET_BAD);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1100:3): [True: 0, False: 10.2k]
  |  Branch (1100:3): [True: 10.2k, False: 0]
  ------------------
 1101|  10.2k|  ctx->started_at = *Curl_pgrs_now(data);
 1102|  10.2k|#ifdef SOCK_NONBLOCK
 1103|       |  /* Do not tuck SOCK_NONBLOCK into socktype when opensocket callback is set
 1104|       |   * because we would not know how socketype is about to be used in the
 1105|       |   * callback, SOCK_NONBLOCK might get factored out before calling socket().
 1106|       |   */
 1107|  10.2k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1107:6): [True: 79, False: 10.2k]
  ------------------
 1108|     79|    ctx->addr.socktype |= SOCK_NONBLOCK;
 1109|  10.2k|#endif
 1110|  10.2k|  result = socket_open(data, &ctx->addr, &ctx->sock);
 1111|  10.2k|#ifdef SOCK_NONBLOCK
 1112|       |  /* Restore the socktype after the socket is created. */
 1113|  10.2k|  if(!data->set.fopensocket)
  ------------------
  |  Branch (1113:6): [True: 79, False: 10.2k]
  ------------------
 1114|     79|    ctx->addr.socktype &= ~SOCK_NONBLOCK;
 1115|  10.2k|#endif
 1116|  10.2k|  if(result)
  ------------------
  |  Branch (1116:6): [True: 30, False: 10.2k]
  ------------------
 1117|     30|    goto out;
 1118|       |
 1119|  10.2k|  result = set_remote_ip(cf, data);
 1120|  10.2k|  if(result)
  ------------------
  |  Branch (1120:6): [True: 0, False: 10.2k]
  ------------------
 1121|      0|    goto out;
 1122|       |
 1123|  10.2k|#ifdef USE_IPV6
 1124|  10.2k|  if(ctx->addr.family == AF_INET6) {
  ------------------
  |  Branch (1124:6): [True: 73, False: 10.1k]
  ------------------
 1125|       |#ifdef USE_WINSOCK
 1126|       |    /* Turn on support for IPv4-mapped IPv6 addresses.
 1127|       |     * Linux kernel, NetBSD, FreeBSD, Darwin, lwIP: default is off;
 1128|       |     * Windows Vista and later: default is on;
 1129|       |     * DragonFly BSD: acts like off, and dummy setting;
 1130|       |     * OpenBSD and earlier Windows: unsupported.
 1131|       |     * Linux: controlled by /proc/sys/net/ipv6/bindv6only.
 1132|       |     */
 1133|       |    int on = 0;
 1134|       |    (void)setsockopt(ctx->sock, IPPROTO_IPV6, IPV6_V6ONLY,
 1135|       |                     (void *)&on, sizeof(on));
 1136|       |#endif
 1137|     73|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1138|     73|    {
 1139|     73|      struct sockaddr_in6 *sa6 = (void *)&ctx->addr.curl_sa_addr;
  ------------------
  |  |   54|     73|#define curl_sa_addr    addr.sa
  ------------------
 1140|     73|      if(sa6->sin6_scope_id)
  ------------------
  |  Branch (1140:10): [True: 11, False: 62]
  ------------------
 1141|     11|        infof(data, "  Trying [%s]:%d scope_id=%lu...",
  ------------------
  |  |  143|     11|  do {                               \
  |  |  144|     11|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     11|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 11, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  320|     11|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     11|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     11|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 11]
  |  |  ------------------
  ------------------
 1142|     73|              ctx->ip.remote_ip, ctx->ip.remote_port,
 1143|     73|              (unsigned long)sa6->sin6_scope_id);
 1144|     62|      else
 1145|     62|#endif
 1146|     62|        infof(data, "  Trying [%s]:%d...",
  ------------------
  |  |  143|     62|  do {                               \
  |  |  144|     62|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     62|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 62, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 62]
  |  |  |  |  ------------------
  |  |  |  |  320|     62|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     62|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     62|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 62]
  |  |  ------------------
  ------------------
 1147|     73|              ctx->ip.remote_ip, ctx->ip.remote_port);
 1148|     73|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
 1149|     73|    }
 1150|     73|#endif
 1151|     73|  }
 1152|  10.1k|  else
 1153|  10.1k|#endif
 1154|  10.1k|    infof(data, "  Trying %s:%d...", ctx->ip.remote_ip, ctx->ip.remote_port);
  ------------------
  |  |  143|  10.1k|  do {                               \
  |  |  144|  10.1k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.1k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.1k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.1k]
  |  |  ------------------
  ------------------
 1155|       |
 1156|  10.2k|#ifdef USE_IPV6
 1157|  10.2k|  is_tcp = (ctx->addr.family == AF_INET ||
  ------------------
  |  Branch (1157:13): [True: 9.79k, False: 468]
  ------------------
 1158|    468|            ctx->addr.family == AF_INET6) &&
  ------------------
  |  Branch (1158:13): [True: 73, False: 395]
  ------------------
 1159|  9.86k|    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
  ------------------
  |  Branch (1159:5): [True: 9.86k, False: 0]
  ------------------
 1160|       |#else
 1161|       |  is_tcp = (ctx->addr.family == AF_INET) &&
 1162|       |    cf_socktype(ctx->addr.socktype) == SOCK_STREAM;
 1163|       |#endif
 1164|  10.2k|  if(is_tcp && data->set.tcp_nodelay)
  ------------------
  |  Branch (1164:6): [True: 9.86k, False: 395]
  |  Branch (1164:16): [True: 9.86k, False: 5]
  ------------------
 1165|  9.86k|    tcpnodelay(cf, data, ctx->sock);
 1166|       |
 1167|  10.2k|  if(is_tcp && data->set.tcp_keepalive)
  ------------------
  |  Branch (1167:6): [True: 9.86k, False: 395]
  |  Branch (1167:16): [True: 47, False: 9.82k]
  ------------------
 1168|     47|    tcpkeepalive(cf, data, ctx->sock);
 1169|       |
 1170|  10.2k|  if(data->set.fsockopt) {
  ------------------
  |  Branch (1170:6): [True: 10.1k, False: 79]
  ------------------
 1171|       |    /* activate callback for setting socket options */
 1172|  10.1k|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|  10.1k|#define TRUE true
  ------------------
 1173|  10.1k|    error = data->set.fsockopt(data->set.sockopt_client,
 1174|  10.1k|                               ctx->sock,
 1175|  10.1k|                               CURLSOCKTYPE_IPCXN);
 1176|  10.1k|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|  10.1k|#define FALSE false
  ------------------
 1177|       |
 1178|  10.1k|    if(error == CURL_SOCKOPT_ALREADY_CONNECTED)
  ------------------
  |  |  421|  10.1k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  |  Branch (1178:8): [True: 10.1k, False: 0]
  ------------------
 1179|  10.1k|      isconnected = TRUE;
  ------------------
  |  | 1055|  10.1k|#define TRUE true
  ------------------
 1180|      0|    else if(error) {
  ------------------
  |  Branch (1180:13): [True: 0, False: 0]
  ------------------
 1181|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 1182|      0|      goto out;
 1183|      0|    }
 1184|  10.1k|  }
 1185|       |
 1186|  10.2k|#ifndef CURL_DISABLE_BINDLOCAL
 1187|       |  /* possibly bind the local end to an IP, interface or port */
 1188|  10.2k|  if(ctx->addr.family == AF_INET
  ------------------
  |  Branch (1188:6): [True: 9.79k, False: 468]
  ------------------
 1189|    468|#ifdef USE_IPV6
 1190|    468|     || ctx->addr.family == AF_INET6
  ------------------
  |  Branch (1190:9): [True: 73, False: 395]
  ------------------
 1191|  10.2k|#endif
 1192|  10.2k|    ) {
 1193|  9.86k|    result = bindlocal(data, cf->conn, ctx->sock, ctx->addr.family,
 1194|  9.86k|                       Curl_ipv6_scope(&ctx->addr.curl_sa_addr),
  ------------------
  |  |   54|  9.86k|#define curl_sa_addr    addr.sa
  ------------------
 1195|  9.86k|                       ctx->transport);
 1196|  9.86k|    if(result) {
  ------------------
  |  Branch (1196:8): [True: 137, False: 9.73k]
  ------------------
 1197|    137|      if(result == CURLE_UNSUPPORTED_PROTOCOL) {
  ------------------
  |  Branch (1197:10): [True: 9, False: 128]
  ------------------
 1198|       |        /* The address family is not supported on this interface.
 1199|       |           We can continue trying addresses */
 1200|      9|        result = CURLE_COULDNT_CONNECT;
 1201|      9|      }
 1202|    137|      goto out;
 1203|    137|    }
 1204|  9.86k|  }
 1205|  10.1k|#endif
 1206|       |
 1207|       |#ifndef SOCK_NONBLOCK
 1208|       |  /* Set socket non-blocking, must be a non-blocking socket for
 1209|       |   * a non-blocking connect. */
 1210|       |  error = curlx_nonblock(ctx->sock, TRUE);
 1211|       |  if(error < 0) {
 1212|       |    result = CURLE_UNSUPPORTED_PROTOCOL;
 1213|       |    ctx->error = SOCKERRNO;
 1214|       |    goto out;
 1215|       |  }
 1216|       |#else
 1217|  10.1k|  if(data->set.fopensocket) {
  ------------------
  |  Branch (1217:6): [True: 10.0k, False: 79]
  ------------------
 1218|       |    /* Set socket non-blocking, must be a non-blocking socket for
 1219|       |     * a non-blocking connect. */
 1220|  10.0k|    error = curlx_nonblock(ctx->sock, TRUE);
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
 1221|  10.0k|    if(error < 0) {
  ------------------
  |  Branch (1221:8): [True: 0, False: 10.0k]
  ------------------
 1222|      0|      result = CURLE_UNSUPPORTED_PROTOCOL;
 1223|      0|      ctx->error = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
 1224|      0|      goto out;
 1225|      0|    }
 1226|  10.0k|  }
 1227|  10.1k|#endif
 1228|  10.1k|  ctx->sock_connected = (cf_socktype(ctx->addr.socktype) != SOCK_DGRAM);
 1229|  10.2k|out:
 1230|  10.2k|  if(result) {
  ------------------
  |  Branch (1230:6): [True: 167, False: 10.1k]
  ------------------
 1231|    167|    if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    167|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1231:8): [True: 137, False: 30]
  ------------------
 1232|    137|      socket_close(data, cf->conn, TRUE, ctx->sock);
  ------------------
  |  | 1055|    137|#define TRUE true
  ------------------
 1233|    137|      ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|    137|#define CURL_SOCKET_BAD (-1)
  ------------------
 1234|    137|    }
 1235|    167|  }
 1236|  10.1k|  else if(isconnected) {
  ------------------
  |  Branch (1236:11): [True: 10.0k, False: 79]
  ------------------
 1237|  10.0k|    set_local_ip(cf, data);
 1238|  10.0k|    ctx->connected_at = *Curl_pgrs_now(data);
 1239|  10.0k|    cf->connected = TRUE;
  ------------------
  |  | 1055|  10.0k|#define TRUE true
  ------------------
 1240|  10.0k|  }
 1241|  10.2k|  CURL_TRC_CF(data, cf, "cf_socket_open() -> %d, fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|  10.2k|  do {                                          \
  |  |  154|  10.2k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.2k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.2k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.2k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
 1242|  10.2k|              result, ctx->sock);
 1243|  10.2k|  return result;
 1244|  10.1k|}
cf-socket.c:set_remote_ip:
 1059|  10.2k|{
 1060|  10.2k|  struct cf_socket_ctx *ctx = cf->ctx;
 1061|       |
 1062|       |  /* store remote address and port used in this connection attempt */
 1063|  10.2k|  ctx->ip.transport = ctx->transport;
 1064|  10.2k|  if(!Curl_addr2string(&ctx->addr.curl_sa_addr,
  ------------------
  |  |   54|  10.2k|#define curl_sa_addr    addr.sa
  ------------------
  |  Branch (1064:6): [True: 0, False: 10.2k]
  ------------------
 1065|  10.2k|                       (curl_socklen_t)ctx->addr.addrlen,
 1066|  10.2k|                       ctx->ip.remote_ip, &ctx->ip.remote_port)) {
 1067|      0|    char buffer[STRERROR_LEN];
 1068|       |
 1069|      0|    ctx->error = errno;
 1070|       |    /* malformed address or bug in inet_ntop, try next address */
 1071|      0|    failf(data, "curl_sa_addr inet_ntop() failed with errno %d: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1072|      0|          errno, curlx_strerror(errno, buffer, sizeof(buffer)));
 1073|      0|    return CURLE_FAILED_INIT;
 1074|      0|  }
 1075|  10.2k|  return CURLE_OK;
 1076|  10.2k|}
cf-socket.c:cf_socktype:
 1081|  19.9k|{
 1082|  19.9k|#ifdef SOCK_CLOEXEC
 1083|  19.9k|  x &= ~SOCK_CLOEXEC;
 1084|  19.9k|#endif
 1085|  19.9k|#ifdef SOCK_NONBLOCK
 1086|       |  x &= ~SOCK_NONBLOCK;
 1087|  19.9k|#endif
 1088|  19.9k|  return x;
 1089|  19.9k|}
cf-socket.c:tcpnodelay:
   84|  9.86k|{
   85|  9.86k|#if defined(TCP_NODELAY) && defined(CURL_TCP_NODELAY_SUPPORTED)
   86|  9.86k|  curl_socklen_t onoff = (curl_socklen_t)1;
   87|  9.86k|  int level = IPPROTO_TCP;
   88|  9.86k|  VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|  9.86k|#define VERBOSE(x) x
  ------------------
   89|       |
   90|  9.86k|  if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, sizeof(onoff)) < 0)
  ------------------
  |  Branch (90:6): [True: 9.78k, False: 79]
  ------------------
   91|  9.78k|    CURL_TRC_CF(data, cf, "Could not set TCP_NODELAY: %s",
  ------------------
  |  |  153|  9.78k|  do {                                          \
  |  |  154|  9.78k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  9.78k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  19.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 9.78k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.78k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  19.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  9.78k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  9.78k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  9.78k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 9.78k]
  |  |  ------------------
  ------------------
   92|  9.86k|                curlx_strerror(SOCKERRNO, buffer, sizeof(buffer)));
   93|       |#else
   94|       |  (void)cf;
   95|       |  (void)data;
   96|       |  (void)sockfd;
   97|       |#endif
   98|  9.86k|}
cf-socket.c:tcpkeepalive:
  118|     47|{
  119|     47|  int optval = data->set.tcp_keepalive ? 1 : 0;
  ------------------
  |  Branch (119:16): [True: 47, False: 0]
  ------------------
  120|       |
  121|       |  /* only set IDLE and INTVL if setting KEEPALIVE is successful */
  122|     47|  if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE,
  ------------------
  |  Branch (122:6): [True: 0, False: 47]
  ------------------
  123|     47|                (void *)&optval, sizeof(optval)) < 0) {
  124|      0|    CURL_TRC_CF(data, cf, "Failed to set SO_KEEPALIVE on fd "
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  125|      0|                "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  126|      0|  }
  127|     47|  else {
  128|       |#ifdef USE_WINSOCK
  129|       |    /* Windows 10, version 1709 (10.0.16299) and later versions can use
  130|       |       setsockopt() TCP_KEEP*. Older versions return with failure. */
  131|       |    if(curlx_verify_windows_version(10, 0, 16299, PLATFORM_WINNT,
  132|       |                                    VERSION_GREATER_THAN_EQUAL)) {
  133|       |      CURL_TRC_CF(data, cf, "Set TCP_KEEP* on fd=%" FMT_SOCKET_T, sockfd);
  134|       |      optval = curlx_sltosi(data->set.tcp_keepidle);
  135|       |/* Offered by mingw-w64 v12+, MS SDK 6.0A/VS2008+ */
  136|       |#ifndef TCP_KEEPALIVE
  137|       |#define TCP_KEEPALIVE 3
  138|       |#endif
  139|       |/* Offered by mingw-w64 v12+, MS SDK 10.0.15063.0/VS2017 15.1+ */
  140|       |#ifndef TCP_KEEPCNT
  141|       |#define TCP_KEEPCNT 16
  142|       |#endif
  143|       |/* Offered by mingw-w64 v12+, MS SDK 10.0.16299.0/VS2017 15.4+ */
  144|       |#ifndef TCP_KEEPIDLE
  145|       |#define TCP_KEEPIDLE TCP_KEEPALIVE
  146|       |#endif
  147|       |#ifndef TCP_KEEPINTVL
  148|       |#define TCP_KEEPINTVL 17
  149|       |#endif
  150|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  151|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  152|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  153|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  154|       |      }
  155|       |      optval = curlx_sltosi(data->set.tcp_keepintvl);
  156|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  157|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  158|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  159|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  160|       |      }
  161|       |      optval = curlx_sltosi(data->set.tcp_keepcnt);
  162|       |      if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  163|       |                    (const char *)&optval, sizeof(optval)) < 0) {
  164|       |        CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  165|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  166|       |      }
  167|       |    }
  168|       |    else {
  169|       |/* Offered by mingw-w64 and MS SDK. Latter only when targeting Win7+. */
  170|       |#ifndef SIO_KEEPALIVE_VALS
  171|       |#define SIO_KEEPALIVE_VALS  _WSAIOW(IOC_VENDOR, 4)
  172|       |      struct tcp_keepalive {
  173|       |        u_long onoff;
  174|       |        u_long keepalivetime;
  175|       |        u_long keepaliveinterval;
  176|       |      };
  177|       |#endif
  178|       |      struct tcp_keepalive vals;
  179|       |      DWORD dummy;
  180|       |      vals.onoff = 1;
  181|       |      optval = curlx_sltosi(data->set.tcp_keepidle);
  182|       |      KEEPALIVE_FACTOR(optval);
  183|       |      vals.keepalivetime = (u_long)optval;
  184|       |      optval = curlx_sltosi(data->set.tcp_keepintvl);
  185|       |      KEEPALIVE_FACTOR(optval);
  186|       |      vals.keepaliveinterval = (u_long)optval;
  187|       |      if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID)&vals, sizeof(vals),
  188|       |                  NULL, 0, &dummy, NULL, NULL) != 0) {
  189|       |        CURL_TRC_CF(data, cf, "Failed to set SIO_KEEPALIVE_VALS on fd "
  190|       |                    "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  191|       |      }
  192|       |    }
  193|       |#else /* !USE_WINSOCK */
  194|     47|#ifdef TCP_KEEPIDLE
  195|     47|    optval = curlx_sltosi(data->set.tcp_keepidle);
  196|     47|    KEEPALIVE_FACTOR(optval);
  197|     47|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE,
  ------------------
  |  Branch (197:8): [True: 47, False: 0]
  ------------------
  198|     47|                  (void *)&optval, sizeof(optval)) < 0) {
  199|     47|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd "
  ------------------
  |  |  153|     47|  do {                                          \
  |  |  154|     47|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     47|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     94|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 47, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     94|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     47|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     47|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     47|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 47]
  |  |  ------------------
  ------------------
  200|     47|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  201|     47|    }
  202|       |#elif defined(TCP_KEEPALIVE)
  203|       |    /* macOS style */
  204|       |    optval = curlx_sltosi(data->set.tcp_keepidle);
  205|       |    KEEPALIVE_FACTOR(optval);
  206|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE,
  207|       |                  (void *)&optval, sizeof(optval)) < 0) {
  208|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE on fd "
  209|       |                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  210|       |    }
  211|       |#elif defined(TCP_KEEPALIVE_THRESHOLD)
  212|       |    /* Solaris <11.4 style */
  213|       |    optval = curlx_sltosi(data->set.tcp_keepidle);
  214|       |    KEEPALIVE_FACTOR(optval);
  215|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_THRESHOLD,
  216|       |                  (void *)&optval, sizeof(optval)) < 0) {
  217|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_THRESHOLD on fd "
  218|       |                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  219|       |    }
  220|       |#endif
  221|     47|#ifdef TCP_KEEPINTVL
  222|     47|    optval = curlx_sltosi(data->set.tcp_keepintvl);
  223|     47|    KEEPALIVE_FACTOR(optval);
  224|     47|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL,
  ------------------
  |  Branch (224:8): [True: 47, False: 0]
  ------------------
  225|     47|                  (void *)&optval, sizeof(optval)) < 0) {
  226|     47|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd "
  ------------------
  |  |  153|     47|  do {                                          \
  |  |  154|     47|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     47|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     94|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 47, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     94|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     47|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     47|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     47|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 47]
  |  |  ------------------
  ------------------
  227|     47|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  228|     47|    }
  229|       |#elif defined(TCP_KEEPALIVE_ABORT_THRESHOLD)
  230|       |    /* Solaris <11.4 style */
  231|       |    /* TCP_KEEPALIVE_ABORT_THRESHOLD should equal to
  232|       |     * TCP_KEEPCNT * TCP_KEEPINTVL on other platforms.
  233|       |     * The default value of TCP_KEEPCNT is 9 on Linux,
  234|       |     * 8 on *BSD/macOS, 5 or 10 on Windows. We use the
  235|       |     * default config for Solaris <11.4 because there is
  236|       |     * no default value for TCP_KEEPCNT on Solaris 11.4.
  237|       |     *
  238|       |     * Note that the consequent probes will not be sent
  239|       |     * at equal intervals on Solaris, but will be sent
  240|       |     * using the exponential backoff algorithm. */
  241|       |    {
  242|       |      int keepcnt = curlx_sltosi(data->set.tcp_keepcnt);
  243|       |      int keepintvl = curlx_sltosi(data->set.tcp_keepintvl);
  244|       |
  245|       |      if(keepcnt > 0 && keepintvl > (INT_MAX / keepcnt))
  246|       |        optval = INT_MAX;
  247|       |      else
  248|       |        optval = keepcnt * keepintvl;
  249|       |    }
  250|       |    KEEPALIVE_FACTOR(optval);
  251|       |    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_ABORT_THRESHOLD,
  252|       |                  (void *)&optval, sizeof(optval)) < 0) {
  253|       |      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_ABORT_THRESHOLD"
  254|       |                  " on fd %" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  255|       |    }
  256|       |#endif
  257|     47|#ifdef TCP_KEEPCNT
  258|     47|    optval = curlx_sltosi(data->set.tcp_keepcnt);
  259|     47|    if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT,
  ------------------
  |  Branch (259:8): [True: 47, False: 0]
  ------------------
  260|     47|                  (void *)&optval, sizeof(optval)) < 0) {
  261|     47|      CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd "
  ------------------
  |  |  153|     47|  do {                                          \
  |  |  154|     47|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     47|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     94|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 47, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     94|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     47|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     47|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     47|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 47]
  |  |  ------------------
  ------------------
  262|     47|                  "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO);
  263|     47|    }
  264|     47|#endif
  265|     47|#endif /* USE_WINSOCK */
  266|     47|  }
  267|     47|}
cf-socket.c:bindlocal:
  574|  9.86k|{
  575|  9.86k|  struct Curl_sockaddr_storage sa;
  576|  9.86k|  struct sockaddr *sock = (struct sockaddr *)&sa;  /* bind to this address */
  577|  9.86k|  curl_socklen_t sizeof_sa = 0; /* size of the data sock points to */
  578|  9.86k|  struct sockaddr_in *si4 = (struct sockaddr_in *)&sa;
  579|  9.86k|#ifdef USE_IPV6
  580|  9.86k|  struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa;
  581|  9.86k|#endif
  582|       |
  583|  9.86k|  struct Curl_dns_entry *h = NULL;
  584|  9.86k|  unsigned short port = data->set.localport; /* use this port number, 0 for
  585|       |                                                "random" */
  586|       |  /* how many port numbers to try to bind to, increasing one at a time */
  587|  9.86k|  int portnum = data->set.localportrange;
  588|  9.86k|  const char *dev = data->set.str[STRING_DEVICE];
  589|  9.86k|  const char *iface_input = data->set.str[STRING_INTERFACE];
  590|  9.86k|  const char *host_input = data->set.str[STRING_BINDHOST];
  591|  9.86k|  const char *iface = iface_input ? iface_input : dev;
  ------------------
  |  Branch (591:23): [True: 7, False: 9.86k]
  ------------------
  592|  9.86k|  const char *host = host_input ? host_input : dev;
  ------------------
  |  Branch (592:22): [True: 16, False: 9.85k]
  ------------------
  593|  9.86k|  int error;
  594|  9.86k|#ifdef IP_BIND_ADDRESS_NO_PORT
  595|  9.86k|  int on = 1;
  596|  9.86k|#endif
  597|       |#ifndef USE_IPV6
  598|       |  (void)scope;
  599|       |#endif
  600|       |
  601|       |  /*************************************************************
  602|       |   * Select device to bind socket to
  603|       |   *************************************************************/
  604|  9.86k|  if(!iface && !host && !port)
  ------------------
  |  Branch (604:6): [True: 9.75k, False: 110]
  |  Branch (604:16): [True: 9.74k, False: 12]
  |  Branch (604:25): [True: 9.73k, False: 16]
  ------------------
  605|       |    /* no local kind of binding was requested */
  606|  9.73k|    return CURLE_OK;
  607|    138|  else if(iface && (strlen(iface) >= 255))
  ------------------
  |  Branch (607:11): [True: 110, False: 28]
  |  Branch (607:20): [True: 3, False: 107]
  ------------------
  608|      3|    return CURLE_BAD_FUNCTION_ARGUMENT;
  609|       |
  610|    135|  memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
  611|       |
  612|    135|  if(iface || host) {
  ------------------
  |  Branch (612:6): [True: 107, False: 28]
  |  Branch (612:15): [True: 12, False: 16]
  ------------------
  613|    119|    char myhost[256] = "";
  614|    119|    int done = 0; /* -1 for error, 1 for address found */
  615|    119|    if2ip_result_t if2ip_result = IF2IP_NOT_FOUND;
  616|       |
  617|    119|#ifdef SO_BINDTODEVICE
  618|    119|    if(iface) {
  ------------------
  |  Branch (618:8): [True: 107, False: 12]
  ------------------
  619|       |      /*
  620|       |       * This binds the local socket to a particular interface. This will
  621|       |       * force even requests to other local interfaces to go out the external
  622|       |       * interface. Only bind to the interface when specified as interface,
  623|       |       * not as a hostname or ip address.
  624|       |       *
  625|       |       * The interface might be a VRF, eg: vrf-blue, which means it cannot be
  626|       |       * converted to an IP address and would fail Curl_if2ip. Try to
  627|       |       * use it straight away.
  628|       |       */
  629|    107|      if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
  ------------------
  |  Branch (629:10): [True: 3, False: 104]
  ------------------
  630|    107|                    iface, (curl_socklen_t)strlen(iface) + 1) == 0) {
  631|       |        /* This is often "errno 1, error: Operation not permitted" if you are
  632|       |         * not running as root or another suitable privileged user. If it
  633|       |         * succeeds it means the parameter was a valid interface and not an IP
  634|       |         * address. Return immediately.
  635|       |         */
  636|      3|        if(!host_input) {
  ------------------
  |  Branch (636:12): [True: 1, False: 2]
  ------------------
  637|      1|          infof(data, "socket successfully bound to interface '%s'", iface);
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  638|      1|          return CURLE_OK;
  639|      1|        }
  640|      3|      }
  641|    107|    }
  642|    118|#endif
  643|    118|    if(!host_input) {
  ------------------
  |  Branch (643:8): [True: 102, False: 16]
  ------------------
  644|       |      /* Discover IP from input device, then bind to it */
  645|    102|      if2ip_result = Curl_if2ip(af,
  646|    102|#ifdef USE_IPV6
  647|    102|                                scope, conn->scope_id,
  648|    102|#endif
  649|    102|                                iface, myhost, sizeof(myhost));
  650|    102|    }
  651|    118|    switch(if2ip_result) {
  ------------------
  |  Branch (651:12): [True: 118, False: 0]
  ------------------
  652|    115|    case IF2IP_NOT_FOUND:
  ------------------
  |  Branch (652:5): [True: 115, False: 3]
  ------------------
  653|    115|      if(iface_input && !host_input) {
  ------------------
  |  Branch (653:10): [True: 7, False: 108]
  |  Branch (653:25): [True: 3, False: 4]
  ------------------
  654|       |        /* Do not fall back to treating it as a hostname */
  655|      3|        char buffer[STRERROR_LEN];
  656|      3|        data->state.os_errno = error = SOCKERRNO;
  ------------------
  |  | 1095|      3|#define SOCKERRNO         errno
  ------------------
  657|      3|        failf(data, "Could not bind to interface '%s' with errno %d: %s",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  658|      3|              iface, error, curlx_strerror(error, buffer, sizeof(buffer)));
  659|      3|        return CURLE_INTERFACE_FAILED;
  660|      3|      }
  661|    112|      break;
  662|    112|    case IF2IP_AF_NOT_SUPPORTED:
  ------------------
  |  Branch (662:5): [True: 1, False: 117]
  ------------------
  663|       |      /* Signal the caller to try another address family if available */
  664|      1|      return CURLE_UNSUPPORTED_PROTOCOL;
  665|      2|    case IF2IP_FOUND:
  ------------------
  |  Branch (665:5): [True: 2, False: 116]
  ------------------
  666|       |      /*
  667|       |       * We now have the numerical IP address in the 'myhost' buffer
  668|       |       */
  669|      2|      host = myhost;
  670|      2|      infof(data, "Local Interface %s is ip %s using address family %i",
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
  671|      2|            iface, host, af);
  672|      2|      done = 1;
  673|      2|      break;
  674|    118|    }
  675|    114|    if(!iface_input || host_input) {
  ------------------
  |  Branch (675:8): [True: 110, False: 4]
  |  Branch (675:24): [True: 4, False: 0]
  ------------------
  676|       |      /*
  677|       |       * This was not an interface, resolve the name as a hostname
  678|       |       * or IP number
  679|       |       *
  680|       |       * Temporarily force name resolution to use only the address type
  681|       |       * of the connection. The resolve functions should really be changed
  682|       |       * to take a type parameter instead.
  683|       |       */
  684|    114|      uint8_t dns_queries = (af == AF_INET) ?
  ------------------
  |  Branch (684:29): [True: 94, False: 20]
  ------------------
  685|     94|                            CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|     94|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|     20|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                                          CURL_DNSQ_A : (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|     20|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  686|    114|#ifdef USE_IPV6
  687|    114|      if(af == AF_INET6)
  ------------------
  |  Branch (687:10): [True: 20, False: 94]
  ------------------
  688|     20|        dns_queries = CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     20|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  689|    114|#endif
  690|       |
  691|    114|      (void)Curl_resolv_blocking(data, dns_queries, host, 80, transport, &h);
  692|    114|      if(h) {
  ------------------
  |  Branch (692:10): [True: 25, False: 89]
  ------------------
  693|     25|        int h_af = h->addr->ai_family;
  694|       |        /* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
  695|     25|        Curl_printable_address(h->addr, myhost, sizeof(myhost));
  696|     25|        infof(data, "Name '%s' family %i resolved to '%s' family %i",
  ------------------
  |  |  143|     25|  do {                               \
  |  |  144|     25|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     25|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 25, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  320|     25|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     25|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     25|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 25]
  |  |  ------------------
  ------------------
  697|     25|              host, af, myhost, h_af);
  698|     25|        Curl_dns_entry_unlink(data, &h); /* this will NULL, potential free h */
  699|     25|        if(af != h_af) {
  ------------------
  |  Branch (699:12): [True: 8, False: 17]
  ------------------
  700|       |          /* bad IP version combo, signal the caller to try another address
  701|       |             family if available */
  702|      8|          return CURLE_UNSUPPORTED_PROTOCOL;
  703|      8|        }
  704|     17|        done = 1;
  705|     17|      }
  706|     89|      else {
  707|       |        /*
  708|       |         * provided dev was no interface (or interfaces are not supported
  709|       |         * e.g. Solaris) no ip address and no domain we fail here
  710|       |         */
  711|     89|        done = -1;
  712|     89|      }
  713|    114|    }
  714|       |
  715|    106|    if(done > 0) {
  ------------------
  |  Branch (715:8): [True: 17, False: 89]
  ------------------
  716|     17|#ifdef USE_IPV6
  717|       |      /* IPv6 address */
  718|     17|      if(af == AF_INET6) {
  ------------------
  |  Branch (718:10): [True: 4, False: 13]
  ------------------
  719|      4|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  720|      4|        char *scope_ptr = strchr(myhost, '%');
  721|      4|        if(scope_ptr)
  ------------------
  |  Branch (721:12): [True: 0, False: 4]
  ------------------
  722|      0|          *(scope_ptr++) = '\0';
  723|      4|#endif
  724|      4|        if(curlx_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0) {
  ------------------
  |  |   43|      4|  inet_pton(x, y, z)
  ------------------
  |  Branch (724:12): [True: 4, False: 0]
  ------------------
  725|      4|          si6->sin6_family = AF_INET6;
  726|      4|          si6->sin6_port = htons(port);
  727|      4|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  728|      4|          if(scope_ptr) {
  ------------------
  |  Branch (728:14): [True: 0, False: 4]
  ------------------
  729|       |            /* The "myhost" string either comes from Curl_if2ip or from
  730|       |               Curl_printable_address. The latter returns only numeric scope
  731|       |               IDs and the former returns none at all. Making the scope ID,
  732|       |               if present, known to be numeric */
  733|      0|            curl_off_t scope_id;
  734|      0|            if(curlx_str_number((const char **)CURL_UNCONST(&scope_ptr),
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (734:16): [True: 0, False: 0]
  ------------------
  735|      0|                                &scope_id, UINT_MAX))
  736|      0|              return CURLE_UNSUPPORTED_PROTOCOL;
  737|      0|            si6->sin6_scope_id = (unsigned int)scope_id;
  738|      0|          }
  739|      4|#endif
  740|      4|        }
  741|      4|        sizeof_sa = sizeof(struct sockaddr_in6);
  742|      4|      }
  743|     13|      else
  744|     13|#endif
  745|       |      /* IPv4 address */
  746|     13|      if((af == AF_INET) &&
  ------------------
  |  Branch (746:10): [True: 13, False: 0]
  ------------------
  747|     13|         (curlx_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
  ------------------
  |  |   43|     13|  inet_pton(x, y, z)
  ------------------
  |  Branch (747:10): [True: 13, False: 0]
  ------------------
  748|     13|        si4->sin_family = AF_INET;
  749|     13|        si4->sin_port = htons(port);
  750|     13|        sizeof_sa = sizeof(struct sockaddr_in);
  751|     13|      }
  752|     17|    }
  753|       |
  754|    106|    if(done < 1) {
  ------------------
  |  Branch (754:8): [True: 89, False: 17]
  ------------------
  755|       |      /* errorbuf is set false so failf will overwrite any message already in
  756|       |         the error buffer, so the user receives this error message instead of a
  757|       |         generic resolve error. */
  758|     89|      char buffer[STRERROR_LEN];
  759|     89|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1058|     89|#define FALSE false
  ------------------
  760|     89|      data->state.os_errno = error = SOCKERRNO;
  ------------------
  |  | 1095|     89|#define SOCKERRNO         errno
  ------------------
  761|     89|      failf(data, "Could not bind to '%s' with errno %d: %s", host,
  ------------------
  |  |   62|     89|#define failf Curl_failf
  ------------------
  762|     89|            error, curlx_strerror(error, buffer, sizeof(buffer)));
  763|     89|      return CURLE_INTERFACE_FAILED;
  764|     89|    }
  765|    106|  }
  766|     16|  else {
  767|       |    /* no device was given, prepare sa to match af's needs */
  768|     16|#ifdef USE_IPV6
  769|     16|    if(af == AF_INET6) {
  ------------------
  |  Branch (769:8): [True: 1, False: 15]
  ------------------
  770|      1|      si6->sin6_family = AF_INET6;
  771|      1|      si6->sin6_port = htons(port);
  772|      1|      sizeof_sa = sizeof(struct sockaddr_in6);
  773|      1|    }
  774|     15|    else
  775|     15|#endif
  776|     15|    if(af == AF_INET) {
  ------------------
  |  Branch (776:8): [True: 15, False: 0]
  ------------------
  777|     15|      si4->sin_family = AF_INET;
  778|     15|      si4->sin_port = htons(port);
  779|     15|      sizeof_sa = sizeof(struct sockaddr_in);
  780|     15|    }
  781|     16|  }
  782|     33|#ifdef IP_BIND_ADDRESS_NO_PORT
  783|     33|  (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on));
  784|     33|#endif
  785|  23.6k|  for(;;) {
  786|  23.6k|    if(bind(sockfd, sock, sizeof_sa) >= 0) {
  ------------------
  |  Branch (786:8): [True: 0, False: 23.6k]
  ------------------
  787|       |      /* we succeeded to bind */
  788|      0|      infof(data, "Local port: %hu", port);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  789|      0|      conn->bits.bound = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  790|      0|      return CURLE_OK;
  791|      0|    }
  792|       |
  793|  23.6k|    if(--portnum > 0) {
  ------------------
  |  Branch (793:8): [True: 23.6k, False: 27]
  ------------------
  794|  23.6k|      port++; /* try next port */
  795|  23.6k|      if(port == 0)
  ------------------
  |  Branch (795:10): [True: 6, False: 23.6k]
  ------------------
  796|      6|        break;
  797|  23.6k|      infof(data, "Bind to local port %d failed, trying next", port - 1);
  ------------------
  |  |  143|  23.6k|  do {                               \
  |  |  144|  23.6k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  23.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 23.6k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 23.6k]
  |  |  |  |  ------------------
  |  |  |  |  320|  23.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  23.6k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  23.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
  798|       |      /* We reuse/clobber the port variable here below */
  799|  23.6k|      if(sock->sa_family == AF_INET)
  ------------------
  |  Branch (799:10): [True: 23.6k, False: 0]
  ------------------
  800|  23.6k|        si4->sin_port = htons(port);
  801|      0|#ifdef USE_IPV6
  802|      0|      else
  803|      0|        si6->sin6_port = htons(port);
  804|  23.6k|#endif
  805|  23.6k|    }
  806|     27|    else
  807|     27|      break;
  808|  23.6k|  }
  809|     33|  {
  810|     33|    char buffer[STRERROR_LEN];
  811|     33|    data->state.os_errno = error = SOCKERRNO;
  ------------------
  |  | 1095|     33|#define SOCKERRNO         errno
  ------------------
  812|     33|    failf(data, "bind failed with errno %d: %s",
  ------------------
  |  |   62|     33|#define failf Curl_failf
  ------------------
  813|     33|          error, curlx_strerror(error, buffer, sizeof(buffer)));
  814|     33|  }
  815|       |
  816|     33|  return CURLE_INTERFACE_FAILED;
  817|     33|}
cf-socket.c:do_connect:
 1248|     79|{
 1249|     79|  struct cf_socket_ctx *ctx = cf->ctx;
 1250|     79|#ifdef TCP_FASTOPEN_CONNECT
 1251|     79|  int optval = 1;
 1252|     79|#endif
 1253|     79|  int rc = -1;
 1254|       |
 1255|     79|  (void)data;
 1256|     79|  if(is_tcp_fastopen) {
  ------------------
  |  Branch (1256:6): [True: 0, False: 79]
  ------------------
 1257|       |#ifdef CONNECT_DATA_IDEMPOTENT /* Darwin */
 1258|       |#  ifdef HAVE_BUILTIN_AVAILABLE
 1259|       |    /* while connectx function is available since macOS 10.11 / iOS 9,
 1260|       |       it did not have the interface declared correctly until
 1261|       |       Xcode 9 / macOS SDK 10.13 */
 1262|       |    if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
 1263|       |      sa_endpoints_t endpoints;
 1264|       |      endpoints.sae_srcif = 0;
 1265|       |      endpoints.sae_srcaddr = NULL;
 1266|       |      endpoints.sae_srcaddrlen = 0;
 1267|       |      endpoints.sae_dstaddr = &ctx->addr.curl_sa_addr;
 1268|       |      endpoints.sae_dstaddrlen = ctx->addr.addrlen;
 1269|       |
 1270|       |      rc = connectx(ctx->sock, &endpoints, SAE_ASSOCID_ANY,
 1271|       |                    CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT,
 1272|       |                    NULL, 0, NULL, NULL);
 1273|       |    }
 1274|       |    else {
 1275|       |      rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1276|       |    }
 1277|       |#  else
 1278|       |    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1279|       |#  endif /* HAVE_BUILTIN_AVAILABLE */
 1280|       |#elif defined(TCP_FASTOPEN_CONNECT) /* Linux >= 4.11 */
 1281|      0|    if(setsockopt(ctx->sock, IPPROTO_TCP, TCP_FASTOPEN_CONNECT,
  ------------------
  |  Branch (1281:8): [True: 0, False: 0]
  ------------------
 1282|      0|                  (void *)&optval, sizeof(optval)) < 0)
 1283|      0|      CURL_TRC_CF(data, cf, "Failed to enable TCP Fast Open on fd %"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1284|      0|                  FMT_SOCKET_T, ctx->sock);
 1285|       |
 1286|      0|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
  ------------------
  |  |   54|      0|#define curl_sa_addr    addr.sa
  ------------------
 1287|       |#elif defined(MSG_FASTOPEN) /* old Linux */
 1288|       |    if(Curl_conn_is_ssl(cf->conn, cf->sockindex))
 1289|       |      rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1290|       |    else
 1291|       |      rc = 0; /* Do nothing */
 1292|       |#endif
 1293|      0|  }
 1294|     79|  else {
 1295|     79|    rc = connect(ctx->sock, &ctx->addr.curl_sa_addr,
  ------------------
  |  |   54|     79|#define curl_sa_addr    addr.sa
  ------------------
 1296|     79|                 (curl_socklen_t)ctx->addr.addrlen);
 1297|     79|  }
 1298|     79|  return rc;
 1299|     79|}
cf-socket.c:socket_connect_result:
  879|     79|{
  880|     79|  switch(error) {
  881|     53|  case SOCKEINPROGRESS:
  ------------------
  |  | 1128|     53|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
  |  Branch (881:3): [True: 53, False: 26]
  ------------------
  882|     53|  case SOCKEWOULDBLOCK:
  ------------------
  |  | 1137|     53|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (882:3): [True: 0, False: 79]
  ------------------
  883|     53|#ifdef EAGAIN
  884|       |#if (EAGAIN) != (SOCKEWOULDBLOCK)
  885|       |    /* On some platforms EAGAIN and EWOULDBLOCK are the
  886|       |     * same value, and on others they are different, hence
  887|       |     * the odd #if
  888|       |     */
  889|       |  case EAGAIN:
  890|       |#endif
  891|     53|#endif
  892|     53|    return CURLE_OK;
  893|       |
  894|     26|  default:
  ------------------
  |  Branch (894:3): [True: 26, False: 53]
  ------------------
  895|       |    /* unknown error, fallthrough and try another address! */
  896|     26|    {
  897|     26|      VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|     26|#define VERBOSE(x) x
  ------------------
  898|     26|      infof(data, "Immediate connect fail for %s: %s", ipaddress,
  ------------------
  |  |  143|     26|  do {                               \
  |  |  144|     26|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     26|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 26, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 26]
  |  |  |  |  ------------------
  |  |  |  |  320|     26|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     26|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     26|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 26]
  |  |  ------------------
  ------------------
  899|     26|            curlx_strerror(error, buffer, sizeof(buffer)));
  900|     26|      NOVERBOSE((void)ipaddress);
  ------------------
  |  | 1619|     26|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|     26|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  901|     26|    }
  902|     26|    data->state.os_errno = error;
  903|       |    /* connect failed */
  904|     26|    return CURLE_COULDNT_CONNECT;
  905|     79|  }
  906|     79|}
cf-socket.c:verifyconnect:
  824|     19|{
  825|     19|  bool rc = TRUE;
  ------------------
  |  | 1055|     19|#define TRUE true
  ------------------
  826|     19|#ifdef SO_ERROR
  827|     19|  int err = 0;
  828|     19|  curl_socklen_t errSize = sizeof(err);
  829|       |
  830|       |#ifdef _WIN32
  831|       |  /*
  832|       |   * In October 2003 we effectively nullified this function on Windows due to
  833|       |   * problems with it using all CPU in multi-threaded cases.
  834|       |   *
  835|       |   * In May 2004, we brought it back to offer more info back on connect
  836|       |   * failures. We could reproduce the former problems with this function, but
  837|       |   * could avoid them by adding this SleepEx() call below:
  838|       |   *
  839|       |   *    "I do not have Rational Quantify, but the hint from his post was
  840|       |   *    ntdll::NtRemoveIoCompletion(). I would assume the SleepEx (or maybe
  841|       |   *    Sleep(0) would be enough?) would release whatever
  842|       |   *    mutex/critical-section the ntdll call is waiting on.
  843|       |   *
  844|       |   *    Someone got to verify this on Win-NT 4.0, 2000."
  845|       |   */
  846|       |  SleepEx(0, FALSE);
  847|       |#endif
  848|       |
  849|     19|  if(getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
  ------------------
  |  Branch (849:6): [True: 0, False: 19]
  ------------------
  850|      0|    err = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  851|       |#if defined(EBADIOCTL) && defined(__minix)
  852|       |  /* Minix 3.1.x does not support getsockopt on UDP sockets */
  853|       |  if(EBADIOCTL == err) {
  854|       |    SET_SOCKERRNO(0);
  855|       |    err = 0;
  856|       |  }
  857|       |#endif
  858|     19|  if((err == 0) || (SOCKEISCONN == err))
  ------------------
  |  | 1131|     19|#define SOCKEISCONN       EISCONN
  ------------------
  |  Branch (858:6): [True: 0, False: 19]
  |  Branch (858:20): [True: 0, False: 19]
  ------------------
  859|       |    /* we are connected, awesome! */
  860|      0|    rc = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  861|     19|  else
  862|       |    /* This was not a successful connect */
  863|     19|    rc = FALSE;
  ------------------
  |  | 1058|     19|#define FALSE false
  ------------------
  864|     19|  if(error)
  ------------------
  |  Branch (864:6): [True: 19, False: 0]
  ------------------
  865|     19|    *error = err;
  866|       |#else
  867|       |  (void)sockfd;
  868|       |  if(error)
  869|       |    *error = SOCKERRNO;
  870|       |#endif
  871|     19|  return rc;
  872|     19|}
cf-socket.c:cf_socket_close:
  976|  20.3k|{
  977|  20.3k|  struct cf_socket_ctx *ctx = cf->ctx;
  978|       |
  979|  20.3k|  if(ctx && ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  20.3k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (979:6): [True: 20.3k, False: 0]
  |  Branch (979:13): [True: 10.0k, False: 10.2k]
  ------------------
  980|  10.0k|    CURL_TRC_CF(data, cf, "cf_socket_close, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  10.0k|  do {                                          \
  |  |  154|  10.0k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.0k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.0k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.0k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.0k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.0k]
  |  |  ------------------
  ------------------
  981|  10.0k|    if(ctx->sock == cf->conn->sock[cf->sockindex])
  ------------------
  |  Branch (981:8): [True: 7.10k, False: 2.98k]
  ------------------
  982|  7.10k|      cf->conn->sock[cf->sockindex] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  7.10k|#define CURL_SOCKET_BAD (-1)
  ------------------
  983|  10.0k|    socket_close(data, cf->conn, !ctx->accepted, ctx->sock);
  984|  10.0k|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.0k|#define CURL_SOCKET_BAD (-1)
  ------------------
  985|  10.0k|    ctx->active = FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
  986|  10.0k|    memset(&ctx->started_at, 0, sizeof(ctx->started_at));
  987|  10.0k|    memset(&ctx->connected_at, 0, sizeof(ctx->connected_at));
  988|  10.0k|  }
  989|       |
  990|       |  cf->connected = FALSE;
  ------------------
  |  | 1058|  20.3k|#define FALSE false
  ------------------
  991|  20.3k|}
cf-socket.c:cf_socket_shutdown:
  996|  4.52k|{
  997|  4.52k|  if(cf->connected) {
  ------------------
  |  Branch (997:6): [True: 4.52k, False: 0]
  ------------------
  998|  4.52k|    struct cf_socket_ctx *ctx = cf->ctx;
  999|       |
 1000|  4.52k|    CURL_TRC_CF(data, cf, "cf_socket_shutdown, fd=%" FMT_SOCKET_T, ctx->sock);
  ------------------
  |  |  153|  4.52k|  do {                                          \
  |  |  154|  4.52k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.52k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  9.05k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.52k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  9.05k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.52k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.52k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.52k]
  |  |  ------------------
  ------------------
 1001|       |    /* On TCP, and when the socket looks well and non-blocking mode
 1002|       |     * can be enabled, receive dangling bytes before close to avoid
 1003|       |     * entering RST states unnecessarily. */
 1004|  4.52k|    if(ctx->sock != CURL_SOCKET_BAD &&
  ------------------
  |  |  145|  9.05k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1004:8): [True: 4.52k, False: 0]
  ------------------
 1005|  4.52k|       ctx->transport == TRNSPRT_TCP &&
  ------------------
  |  |  307|  9.05k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (1005:8): [True: 4.30k, False: 222]
  ------------------
 1006|  4.30k|       (curlx_nonblock(ctx->sock, TRUE) >= 0)) {
  ------------------
  |  | 1055|  4.30k|#define TRUE true
  ------------------
  |  Branch (1006:8): [True: 4.30k, False: 0]
  ------------------
 1007|  4.30k|      unsigned char buf[1024];
 1008|  4.30k|      (void)sread(ctx->sock, buf, sizeof(buf));
  ------------------
  |  |  954|  4.30k|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  955|  4.30k|                                     (RECV_TYPE_ARG2)(y), \
  |  |  956|  4.30k|                                     (RECV_TYPE_ARG3)(z), \
  |  |  957|  4.30k|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1009|  4.30k|    }
 1010|  4.52k|  }
 1011|       |  *done = TRUE;
  ------------------
  |  | 1055|  4.52k|#define TRUE true
  ------------------
 1012|  4.52k|  return CURLE_OK;
 1013|  4.52k|}
cf-socket.c:cf_socket_adjust_pollset:
 1398|   817k|{
 1399|   817k|  struct cf_socket_ctx *ctx = cf->ctx;
 1400|   817k|  CURLcode result = CURLE_OK;
 1401|       |
 1402|   817k|  if(ctx->sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   817k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1402:6): [True: 817k, False: 0]
  ------------------
 1403|       |    /* A listening socket filter needs to be connected before the accept
 1404|       |     * for some weird FTP interaction. This should be rewritten, so that
 1405|       |     * FTP no longer does the socket checks and accept calls and delegates
 1406|       |     * all that to the filter. */
 1407|   817k|    if(ctx->listening) {
  ------------------
  |  Branch (1407:8): [True: 0, False: 817k]
  ------------------
 1408|      0|      result = Curl_pollset_set_in_only(data, ps, ctx->sock);
  ------------------
  |  |  172|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1409|      0|      CURL_TRC_CF(data, cf, "adjust_pollset, listening, POLLIN fd=%"
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1410|      0|                  FMT_SOCKET_T, ctx->sock);
 1411|      0|    }
 1412|   817k|    else if(!cf->connected) {
  ------------------
  |  Branch (1412:13): [True: 133k, False: 683k]
  ------------------
 1413|   133k|      result = Curl_pollset_set_out_only(data, ps, ctx->sock);
  ------------------
  |  |  174|   133k|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|   133k|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|   133k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1414|   133k|      CURL_TRC_CF(data, cf, "adjust_pollset, !connected, POLLOUT fd=%"
  ------------------
  |  |  153|   133k|  do {                                          \
  |  |  154|   133k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   133k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   267k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 133k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 133k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   267k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   133k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   133k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   133k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 133k]
  |  |  ------------------
  ------------------
 1415|   133k|                  FMT_SOCKET_T, ctx->sock);
 1416|   133k|    }
 1417|   683k|    else if(!ctx->active) {
  ------------------
  |  Branch (1417:13): [True: 491k, False: 192k]
  ------------------
 1418|   491k|      result = Curl_pollset_add_in(data, ps, ctx->sock);
  ------------------
  |  |  162|   491k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|   491k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1419|   491k|      CURL_TRC_CF(data, cf, "adjust_pollset, !active, POLLIN fd=%"
  ------------------
  |  |  153|   491k|  do {                                          \
  |  |  154|   491k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   491k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   983k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 491k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 491k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   983k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   491k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   491k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   491k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 491k]
  |  |  ------------------
  ------------------
 1420|   491k|                  FMT_SOCKET_T, ctx->sock);
 1421|   491k|    }
 1422|   817k|  }
 1423|   817k|  return result;
 1424|   817k|}
cf-socket.c:cf_socket_send:
 1457|  21.2k|{
 1458|  21.2k|  struct cf_socket_ctx *ctx = cf->ctx;
 1459|  21.2k|  curl_socket_t fdsave;
 1460|  21.2k|  ssize_t rv;
 1461|  21.2k|  CURLcode result = CURLE_OK;
 1462|  21.2k|  VERBOSE(size_t orig_len = len);
  ------------------
  |  | 1618|  21.2k|#define VERBOSE(x) x
  ------------------
 1463|       |
 1464|  21.2k|  (void)eos;
 1465|  21.2k|  *pnwritten = 0;
 1466|  21.2k|  fdsave = cf->conn->sock[cf->sockindex];
 1467|  21.2k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1468|       |
 1469|  21.2k|#ifdef DEBUGBUILD
 1470|       |  /* simulate network blocking/partial writes */
 1471|  21.2k|  if(ctx->wblock_percent > 0) {
  ------------------
  |  Branch (1471:6): [True: 0, False: 21.2k]
  ------------------
 1472|      0|    unsigned char c = 0;
 1473|      0|    Curl_rand_bytes(data, FALSE, &c, 1);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1474|      0|    if(c >= ((100 - ctx->wblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1474:8): [True: 0, False: 0]
  ------------------
 1475|      0|      CURL_TRC_CF(data, cf, "send(len=%zu) SIMULATE EWOULDBLOCK", orig_len);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1476|      0|      cf->conn->sock[cf->sockindex] = fdsave;
 1477|      0|      return CURLE_AGAIN;
 1478|      0|    }
 1479|      0|  }
 1480|  21.2k|  if(cf->cft != &Curl_cft_udp && ctx->wpartial_percent > 0 && len > 8) {
  ------------------
  |  Branch (1480:6): [True: 21.2k, False: 0]
  |  Branch (1480:34): [True: 0, False: 21.2k]
  |  Branch (1480:63): [True: 0, False: 0]
  ------------------
 1481|      0|    len = len * ctx->wpartial_percent / 100;
 1482|      0|    if(!len)
  ------------------
  |  Branch (1482:8): [True: 0, False: 0]
  ------------------
 1483|      0|      len = 1;
 1484|      0|    CURL_TRC_CF(data, cf, "send(len=%zu) SIMULATE partial write of %zu bytes",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1485|      0|                orig_len, len);
 1486|      0|  }
 1487|  21.2k|#endif
 1488|       |
 1489|       |#if defined(MSG_FASTOPEN) && !defined(TCP_FASTOPEN_CONNECT) /* Linux */
 1490|       |  if(cf->conn->bits.tcp_fastopen) {
 1491|       |    rv = sendto(ctx->sock, buf, len, MSG_FASTOPEN,
 1492|       |                &ctx->addr.curl_sa_addr, ctx->addr.addrlen);
 1493|       |    cf->conn->bits.tcp_fastopen = FALSE;
 1494|       |  }
 1495|       |  else
 1496|       |#endif
 1497|  21.2k|    rv = swrite(ctx->sock, buf, len);
  ------------------
  |  |  976|  21.2k|#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
  |  |  977|  21.2k|                                      (const SEND_TYPE_ARG2)(y), \
  |  |  978|  21.2k|                                      (SEND_TYPE_ARG3)(z), \
  |  |  979|  21.2k|                                      (SEND_TYPE_ARG4)(SEND_4TH_ARG))
  |  |  ------------------
  |  |  |  |  919|  21.2k|#define SEND_4TH_ARG MSG_NOSIGNAL
  |  |  ------------------
  ------------------
 1498|       |
 1499|  21.2k|  if(!curlx_sztouz(rv, pnwritten)) {
  ------------------
  |  Branch (1499:6): [True: 61, False: 21.2k]
  ------------------
 1500|     61|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1095|     61|#define SOCKERRNO         errno
  ------------------
 1501|       |
 1502|     61|    if(
 1503|       |#ifdef USE_WINSOCK
 1504|       |      /* This is how Windows does it */
 1505|       |      (SOCKEWOULDBLOCK == sockerr)
 1506|       |#else
 1507|       |      /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned
 1508|       |         due to its inability to send off data without blocking. We therefore
 1509|       |         treat both error codes the same here */
 1510|     61|      (SOCKEWOULDBLOCK == sockerr) ||
  ------------------
  |  | 1137|     61|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (1510:7): [True: 61, False: 0]
  ------------------
 1511|      0|      (EAGAIN == sockerr) || (SOCKEINTR == sockerr) ||
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1511:7): [True: 0, False: 0]
  |  Branch (1511:30): [True: 0, False: 0]
  ------------------
 1512|      0|      (SOCKEINPROGRESS == sockerr)
  ------------------
  |  | 1128|      0|#define SOCKEINPROGRESS   EINPROGRESS
  ------------------
  |  Branch (1512:7): [True: 0, False: 0]
  ------------------
 1513|     61|#endif
 1514|     61|      ) {
 1515|       |      /* EWOULDBLOCK */
 1516|     61|      result = CURLE_AGAIN;
 1517|     61|    }
 1518|      0|    else {
 1519|      0|      char buffer[STRERROR_LEN];
 1520|      0|      failf(data, "Send failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1521|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1522|      0|      data->state.os_errno = sockerr;
 1523|      0|      result = CURLE_SEND_ERROR;
 1524|      0|    }
 1525|     61|  }
 1526|       |
 1527|       |#ifdef USE_WINSOCK
 1528|       |  if(!result)
 1529|       |    win_update_sndbuf_size(data, ctx);
 1530|       |#endif
 1531|       |
 1532|  21.2k|  CURL_TRC_CF(data, cf, "send(len=%zu) -> %d, %zu",
  ------------------
  |  |  153|  21.2k|  do {                                          \
  |  |  154|  21.2k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  21.2k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  42.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 21.2k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 21.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  42.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  21.2k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  21.2k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  21.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 21.2k]
  |  |  ------------------
  ------------------
 1533|  21.2k|              orig_len, result, *pnwritten);
 1534|  21.2k|  cf->conn->sock[cf->sockindex] = fdsave;
 1535|  21.2k|  return result;
 1536|  21.2k|}
cf-socket.c:cf_socket_recv:
 1540|  3.86M|{
 1541|  3.86M|  struct cf_socket_ctx *ctx = cf->ctx;
 1542|  3.86M|  CURLcode result = CURLE_OK;
 1543|  3.86M|  ssize_t rv;
 1544|       |
 1545|  3.86M|  *pnread = 0;
 1546|  3.86M|#ifdef DEBUGBUILD
 1547|       |  /* simulate network blocking/partial reads */
 1548|  3.86M|  if(cf->cft != &Curl_cft_udp && ctx->rblock_percent > 0) {
  ------------------
  |  Branch (1548:6): [True: 3.86M, False: 0]
  |  Branch (1548:34): [True: 0, False: 3.86M]
  ------------------
 1549|      0|    unsigned char c = 0;
 1550|      0|    Curl_rand(data, &c, 1);
  ------------------
  |  |   33|      0|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  ------------------
 1551|      0|    if(c >= ((100 - ctx->rblock_percent) * 256 / 100)) {
  ------------------
  |  Branch (1551:8): [True: 0, False: 0]
  ------------------
 1552|      0|      CURL_TRC_CF(data, cf, "recv(len=%zu) SIMULATE EWOULDBLOCK", len);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1553|      0|      return CURLE_AGAIN;
 1554|      0|    }
 1555|      0|  }
 1556|  3.86M|  if(cf->cft != &Curl_cft_udp && ctx->recv_max && ctx->recv_max < len) {
  ------------------
  |  Branch (1556:6): [True: 3.86M, False: 0]
  |  Branch (1556:34): [True: 0, False: 3.86M]
  |  Branch (1556:51): [True: 0, False: 0]
  ------------------
 1557|      0|    CURL_TRC_CF(data, cf, "recv(len=%zu) SIMULATE max read of %zu bytes",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1558|      0|                len, ctx->recv_max);
 1559|      0|    len = ctx->recv_max;
 1560|      0|  }
 1561|  3.86M|#endif
 1562|       |
 1563|  3.86M|  rv = sread(ctx->sock, buf, len);
  ------------------
  |  |  954|  3.86M|#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
  |  |  955|  3.86M|                                     (RECV_TYPE_ARG2)(y), \
  |  |  956|  3.86M|                                     (RECV_TYPE_ARG3)(z), \
  |  |  957|  3.86M|                                     (RECV_TYPE_ARG4)(0))
  ------------------
 1564|       |
 1565|  3.86M|  if(!curlx_sztouz(rv, pnread)) {
  ------------------
  |  Branch (1565:6): [True: 4.14k, False: 3.86M]
  ------------------
 1566|  4.14k|    int sockerr = SOCKERRNO;
  ------------------
  |  | 1095|  4.14k|#define SOCKERRNO         errno
  ------------------
 1567|       |
 1568|  4.14k|    if(
 1569|       |#ifdef USE_WINSOCK
 1570|       |      /* This is how Windows does it */
 1571|       |      (SOCKEWOULDBLOCK == sockerr)
 1572|       |#else
 1573|       |      /* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned
 1574|       |         due to its inability to send off data without blocking. We therefore
 1575|       |         treat both error codes the same here */
 1576|  4.14k|      (SOCKEWOULDBLOCK == sockerr) ||
  ------------------
  |  | 1137|  4.14k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (1576:7): [True: 4.14k, False: 0]
  ------------------
 1577|      0|      (EAGAIN == sockerr) || (SOCKEINTR == sockerr)
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (1577:7): [True: 0, False: 0]
  |  Branch (1577:30): [True: 0, False: 0]
  ------------------
 1578|  4.14k|#endif
 1579|  4.14k|      ) {
 1580|       |      /* EWOULDBLOCK */
 1581|  4.14k|      result = CURLE_AGAIN;
 1582|  4.14k|    }
 1583|      0|    else {
 1584|      0|      char buffer[STRERROR_LEN];
 1585|      0|      failf(data, "Recv failure: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1586|      0|            curlx_strerror(sockerr, buffer, sizeof(buffer)));
 1587|      0|      data->state.os_errno = sockerr;
 1588|      0|      result = CURLE_RECV_ERROR;
 1589|      0|    }
 1590|  4.14k|  }
 1591|       |
 1592|  3.86M|  CURL_TRC_CF(data, cf, "recv(len=%zu) -> %d, %zu", len, result, *pnread);
  ------------------
  |  |  153|  3.86M|  do {                                          \
  |  |  154|  3.86M|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.86M|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.73M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.86M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.86M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.73M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.86M|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.86M|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.86M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.86M]
  |  |  ------------------
  ------------------
 1593|  3.86M|  if(!result && !ctx->got_first_byte) {
  ------------------
  |  Branch (1593:6): [True: 3.86M, False: 4.14k]
  |  Branch (1593:17): [True: 9.05k, False: 3.85M]
  ------------------
 1594|  9.05k|    ctx->first_byte_at = *Curl_pgrs_now(data);
 1595|       |    ctx->got_first_byte = TRUE;
  ------------------
  |  | 1055|  9.05k|#define TRUE true
  ------------------
 1596|  9.05k|  }
 1597|  3.86M|  return result;
 1598|  3.86M|}
cf-socket.c:cf_socket_cntrl:
 1629|  54.9k|{
 1630|  54.9k|  struct cf_socket_ctx *ctx = cf->ctx;
 1631|       |
 1632|  54.9k|  (void)arg1;
 1633|  54.9k|  (void)arg2;
 1634|  54.9k|  switch(event) {
  ------------------
  |  Branch (1634:10): [True: 17.3k, False: 37.5k]
  ------------------
 1635|  7.10k|  case CF_CTRL_CONN_INFO_UPDATE:
  ------------------
  |  |  125|  7.10k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  |  Branch (1635:3): [True: 7.10k, False: 47.8k]
  ------------------
 1636|  7.10k|    cf_socket_active(cf, data);
 1637|  7.10k|    cf_socket_update_data(cf, data);
 1638|  7.10k|    break;
 1639|  10.2k|  case CF_CTRL_DATA_SETUP:
  ------------------
  |  |  119|  10.2k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
  |  Branch (1639:3): [True: 10.2k, False: 44.6k]
  ------------------
 1640|  10.2k|    cf_socket_update_data(cf, data);
 1641|  10.2k|    break;
 1642|      0|  case CF_CTRL_FORGET_SOCKET:
  ------------------
  |  |  126|      0|#define CF_CTRL_FORGET_SOCKET    (256 + 1) /* 0          NULL     ignored */
  ------------------
  |  Branch (1642:3): [True: 0, False: 54.9k]
  ------------------
 1643|      0|    ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1644|      0|    break;
 1645|  54.9k|  }
 1646|  54.9k|  return CURLE_OK;
 1647|  54.9k|}
cf-socket.c:cf_socket_active:
 1613|  7.10k|{
 1614|  7.10k|  struct cf_socket_ctx *ctx = cf->ctx;
 1615|       |
 1616|       |  /* use this socket from now on */
 1617|  7.10k|  cf->conn->sock[cf->sockindex] = ctx->sock;
 1618|  7.10k|  set_local_ip(cf, data);
 1619|  7.10k|#ifdef USE_IPV6
 1620|  7.10k|  if(cf->sockindex == FIRSTSOCKET)
  ------------------
  |  |  303|  7.10k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1620:6): [True: 7.10k, False: 0]
  ------------------
 1621|  7.10k|    cf->conn->bits.ipv6 = (ctx->addr.family == AF_INET6);
 1622|  7.10k|#endif
 1623|       |  ctx->active = TRUE;
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
 1624|  7.10k|}
cf-socket.c:cf_socket_update_data:
 1602|  17.3k|{
 1603|       |  /* Update the IP info held in the transfer, if we have that. */
 1604|  17.3k|  if(cf->connected && (cf->sockindex == FIRSTSOCKET)) {
  ------------------
  |  |  303|  17.3k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1604:6): [True: 17.3k, False: 0]
  |  Branch (1604:23): [True: 17.3k, False: 0]
  ------------------
 1605|  17.3k|    struct cf_socket_ctx *ctx = cf->ctx;
 1606|  17.3k|    data->info.primary = ctx->ip;
 1607|       |    /* not sure if this is redundant... */
 1608|  17.3k|    data->info.conn_remote_port = cf->conn->origin->port;
 1609|  17.3k|  }
 1610|  17.3k|}
cf-socket.c:cf_socket_conn_is_alive:
 1652|  10.2k|{
 1653|  10.2k|  struct cf_socket_ctx *ctx = cf->ctx;
 1654|  10.2k|  struct pollfd pfd[1];
 1655|  10.2k|  int r;
 1656|       |
 1657|  10.2k|  *input_pending = FALSE;
  ------------------
  |  | 1058|  10.2k|#define FALSE false
  ------------------
 1658|       |
 1659|  10.2k|  if(!ctx || ctx->sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  10.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1659:6): [True: 0, False: 10.2k]
  |  Branch (1659:14): [True: 0, False: 10.2k]
  ------------------
 1660|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1661|       |
 1662|       |  /* Check with 0 timeout if there are any events pending on the socket */
 1663|  10.2k|  pfd[0].fd = ctx->sock;
 1664|  10.2k|  pfd[0].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
 1665|  10.2k|  pfd[0].revents = 0;
 1666|       |
 1667|  10.2k|  r = Curl_poll(pfd, 1, 0);
 1668|  10.2k|  if(r < 0) {
  ------------------
  |  Branch (1668:6): [True: 0, False: 10.2k]
  ------------------
 1669|      0|    CURL_TRC_CF(data, cf, "is_alive: poll error, assume dead");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1670|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1671|      0|  }
 1672|  10.2k|  else if(r == 0) {
  ------------------
  |  Branch (1672:11): [True: 14, False: 10.2k]
  ------------------
 1673|     14|    CURL_TRC_CF(data, cf, "is_alive: poll timeout, assume alive");
  ------------------
  |  |  153|     14|  do {                                          \
  |  |  154|     14|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     14|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     28|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 14, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     28|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     14|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     14|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     14|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 14]
  |  |  ------------------
  ------------------
 1674|     14|    return TRUE;
  ------------------
  |  | 1055|     14|#define TRUE true
  ------------------
 1675|     14|  }
 1676|  10.2k|  else if(pfd[0].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL)) {
  ------------------
  |  Branch (1676:11): [True: 0, False: 10.2k]
  ------------------
 1677|      0|    CURL_TRC_CF(data, cf, "is_alive: err/hup/etc events, assume dead");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1678|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1679|      0|  }
 1680|       |
 1681|  10.2k|  CURL_TRC_CF(data, cf, "is_alive: valid events, looks alive");
  ------------------
  |  |  153|  10.2k|  do {                                          \
  |  |  154|  10.2k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.2k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.2k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.2k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
 1682|  10.2k|  *input_pending = TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
 1683|       |  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
 1684|  10.2k|}
cf-socket.c:cf_socket_query:
 1689|  1.41M|{
 1690|  1.41M|  struct cf_socket_ctx *ctx = cf->ctx;
 1691|       |
 1692|  1.41M|  switch(query) {
 1693|   492k|  case CF_QUERY_SOCKET:
  ------------------
  |  |  167|   492k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1693:3): [True: 492k, False: 923k]
  ------------------
 1694|   492k|    DEBUGASSERT(pres2);
  ------------------
  |  | 1081|   492k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1694:5): [True: 0, False: 492k]
  |  Branch (1694:5): [True: 492k, False: 0]
  ------------------
 1695|   492k|    *((curl_socket_t *)pres2) = ctx->sock;
 1696|   492k|    return CURLE_OK;
 1697|      0|  case CF_QUERY_TRANSPORT:
  ------------------
  |  |  180|      0|#define CF_QUERY_TRANSPORT         14  /* TRNSPRT_*  - * */
  ------------------
  |  Branch (1697:3): [True: 0, False: 1.41M]
  ------------------
 1698|      0|    DEBUGASSERT(pres1);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1698:5): [True: 0, False: 0]
  |  Branch (1698:5): [True: 0, False: 0]
  ------------------
 1699|      0|    *pres1 = ctx->transport;
 1700|      0|    return CURLE_OK;
 1701|      0|  case CF_QUERY_REMOTE_ADDR:
  ------------------
  |  |  176|      0|#define CF_QUERY_REMOTE_ADDR       10  /* -          `Curl_sockaddr_ex *` */
  ------------------
  |  Branch (1701:3): [True: 0, False: 1.41M]
  ------------------
 1702|      0|    DEBUGASSERT(pres2);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1702:5): [True: 0, False: 0]
  |  Branch (1702:5): [True: 0, False: 0]
  ------------------
 1703|      0|    *((const struct Curl_sockaddr_ex **)pres2) = cf->connected ?
  ------------------
  |  Branch (1703:50): [True: 0, False: 0]
  ------------------
 1704|      0|                                                 &ctx->addr : NULL;
 1705|      0|    return CURLE_OK;
 1706|      0|  case CF_QUERY_CONNECT_REPLY_MS:
  ------------------
  |  |  166|      0|#define CF_QUERY_CONNECT_REPLY_MS   2  /* number     -        */
  ------------------
  |  Branch (1706:3): [True: 0, False: 1.41M]
  ------------------
 1707|      0|    if(ctx->got_first_byte) {
  ------------------
  |  Branch (1707:8): [True: 0, False: 0]
  ------------------
 1708|      0|      timediff_t ms = curlx_ptimediff_ms(&ctx->first_byte_at,
 1709|      0|                                         &ctx->started_at);
 1710|      0|      *pres1 = (ms < INT_MAX) ? (int)ms : INT_MAX;
  ------------------
  |  Branch (1710:16): [True: 0, False: 0]
  ------------------
 1711|      0|    }
 1712|      0|    else
 1713|      0|      *pres1 = -1;
 1714|      0|    return CURLE_OK;
 1715|  10.0k|  case CF_QUERY_TIMER_CONNECT: {
  ------------------
  |  |  168|  10.0k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  |  Branch (1715:3): [True: 10.0k, False: 1.40M]
  ------------------
 1716|  10.0k|    struct curltime *when = pres2;
 1717|  10.0k|    switch(ctx->transport) {
 1718|      0|    case TRNSPRT_UDP:
  ------------------
  |  |  308|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (1718:5): [True: 0, False: 10.0k]
  ------------------
 1719|      0|    case TRNSPRT_QUIC:
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (1719:5): [True: 0, False: 10.0k]
  ------------------
 1720|       |      /* Since UDP connected sockets work different from TCP, we use the
 1721|       |       * time of the first byte from the peer as the "connect" time. */
 1722|      0|      if(ctx->got_first_byte) {
  ------------------
  |  Branch (1722:10): [True: 0, False: 0]
  ------------------
 1723|      0|        *when = ctx->first_byte_at;
 1724|      0|        break;
 1725|      0|      }
 1726|      0|      FALLTHROUGH();
  ------------------
  |  |  821|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1727|  10.0k|    default:
  ------------------
  |  Branch (1727:5): [True: 10.0k, False: 0]
  ------------------
 1728|  10.0k|      *when = ctx->connected_at;
 1729|  10.0k|      break;
 1730|  10.0k|    }
 1731|  10.0k|    return CURLE_OK;
 1732|  10.0k|  }
 1733|    108|  case CF_QUERY_IP_INFO:
  ------------------
  |  |  172|    108|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
  |  Branch (1733:3): [True: 108, False: 1.41M]
  ------------------
 1734|    108|#ifdef USE_IPV6
 1735|    108|    *pres1 = (ctx->addr.family == AF_INET6);
 1736|       |#else
 1737|       |    *pres1 = FALSE;
 1738|       |#endif
 1739|    108|    *(struct ip_quadruple *)pres2 = ctx->ip;
 1740|    108|    return CURLE_OK;
 1741|   913k|  default:
  ------------------
  |  Branch (1741:3): [True: 913k, False: 502k]
  ------------------
 1742|   913k|    break;
 1743|  1.41M|  }
 1744|   913k|  return cf->next ?
  ------------------
  |  Branch (1744:10): [True: 0, False: 913k]
  ------------------
 1745|      0|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1746|   913k|    CURLE_UNKNOWN_OPTION;
 1747|  1.41M|}
cf-socket.c:cf_socket_ctx_init:
  937|  10.2k|{
  938|  10.2k|  memset(ctx, 0, sizeof(*ctx));
  939|  10.2k|  ctx->sock = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  10.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
  940|  10.2k|  ctx->transport = transport;
  941|  10.2k|  ctx->addr = *addr;
  942|       |
  943|  10.2k|#ifdef DEBUGBUILD
  944|  10.2k|  {
  945|  10.2k|    const char *p = getenv("CURL_DBG_SOCK_WBLOCK");
  946|  10.2k|    if(p) {
  ------------------
  |  Branch (946:8): [True: 0, False: 10.2k]
  ------------------
  947|      0|      curl_off_t l;
  948|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (948:10): [True: 0, False: 0]
  ------------------
  949|      0|        ctx->wblock_percent = (int)l;
  950|      0|    }
  951|  10.2k|    p = getenv("CURL_DBG_SOCK_WPARTIAL");
  952|  10.2k|    if(p) {
  ------------------
  |  Branch (952:8): [True: 0, False: 10.2k]
  ------------------
  953|      0|      curl_off_t l;
  954|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (954:10): [True: 0, False: 0]
  ------------------
  955|      0|        ctx->wpartial_percent = (int)l;
  956|      0|    }
  957|  10.2k|    p = getenv("CURL_DBG_SOCK_RBLOCK");
  958|  10.2k|    if(p) {
  ------------------
  |  Branch (958:8): [True: 0, False: 10.2k]
  ------------------
  959|      0|      curl_off_t l;
  960|      0|      if(!curlx_str_number(&p, &l, 100))
  ------------------
  |  Branch (960:10): [True: 0, False: 0]
  ------------------
  961|      0|        ctx->rblock_percent = (int)l;
  962|      0|    }
  963|  10.2k|    p = getenv("CURL_DBG_SOCK_RMAX");
  964|  10.2k|    if(p) {
  ------------------
  |  Branch (964:8): [True: 0, False: 10.2k]
  ------------------
  965|      0|      curl_off_t l;
  966|      0|      if(!curlx_str_number(&p, &l, CURL_OFF_T_MAX))
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (966:10): [True: 0, False: 0]
  ------------------
  967|      0|        ctx->recv_max = (size_t)l;
  968|      0|    }
  969|  10.2k|  }
  970|  10.2k|#endif
  971|       |
  972|  10.2k|  return CURLE_OK;
  973|  10.2k|}
cf-socket.c:set_local_ip:
 1027|  17.4k|{
 1028|  17.4k|  struct cf_socket_ctx *ctx = cf->ctx;
 1029|  17.4k|  ctx->ip.local_ip[0] = 0;
 1030|  17.4k|  ctx->ip.local_port = 0;
 1031|       |
 1032|  17.4k|#ifdef HAVE_GETSOCKNAME
 1033|  17.4k|  if((ctx->sock != CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|  17.4k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1033:6): [True: 17.2k, False: 167]
  ------------------
 1034|  17.2k|     !(data->conn->scheme->protocol & CURLPROTO_TFTP)) {
  ------------------
  |  | 1089|  17.2k|#define CURLPROTO_TFTP    (1L << 11)
  ------------------
  |  Branch (1034:6): [True: 17.2k, False: 0]
  ------------------
 1035|       |    /* TFTP does not connect, so it cannot get the IP like this */
 1036|  17.2k|    struct Curl_sockaddr_storage ssloc;
 1037|  17.2k|    curl_socklen_t slen = sizeof(struct Curl_sockaddr_storage);
 1038|  17.2k|    VERBOSE(char buffer[STRERROR_LEN]);
  ------------------
  |  | 1618|  17.2k|#define VERBOSE(x) x
  ------------------
 1039|       |
 1040|  17.2k|    memset(&ssloc, 0, sizeof(ssloc));
 1041|  17.2k|    if(getsockname(ctx->sock, (struct sockaddr *)&ssloc, &slen)) {
  ------------------
  |  Branch (1041:8): [True: 0, False: 17.2k]
  ------------------
 1042|      0|      VERBOSE(int error = SOCKERRNO);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
 1043|      0|      infof(data, "getsockname() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1044|      0|            error, curlx_strerror(error, buffer, sizeof(buffer)));
 1045|      0|    }
 1046|  17.2k|    else if(!Curl_addr2string((struct sockaddr *)&ssloc, slen,
  ------------------
  |  Branch (1046:13): [True: 0, False: 17.2k]
  ------------------
 1047|  17.2k|                              ctx->ip.local_ip, &ctx->ip.local_port)) {
 1048|      0|      infof(data, "ssloc inet_ntop() failed with errno %d: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1049|      0|            errno, curlx_strerror(errno, buffer, sizeof(buffer)));
 1050|      0|    }
 1051|  17.2k|  }
 1052|       |#else
 1053|       |  (void)data;
 1054|       |#endif
 1055|  17.4k|}

Curl_cf_def_shutdown:
   49|     42|{
   50|     42|  (void)cf;
   51|     42|  (void)data;
   52|       |  *done = TRUE;
  ------------------
  |  | 1055|     42|#define TRUE true
  ------------------
   53|     42|  return CURLE_OK;
   54|     42|}
Curl_cf_def_adjust_pollset:
   59|    868|{
   60|       |  /* NOP */
   61|    868|  (void)cf;
   62|    868|  (void)data;
   63|    868|  (void)ps;
   64|    868|  return CURLE_OK;
   65|    868|}
Curl_cf_def_data_pending:
   69|   195k|{
   70|   195k|  return cf->next ?
  ------------------
  |  Branch (70:10): [True: 808, False: 195k]
  ------------------
   71|    808|    cf->next->cft->has_data_pending(cf->next, data) : FALSE;
  ------------------
  |  | 1058|   195k|#define FALSE false
  ------------------
   72|   195k|}
Curl_cf_def_send:
   77|  3.80k|{
   78|  3.80k|  if(cf->next)
  ------------------
  |  Branch (78:6): [True: 3.80k, False: 0]
  ------------------
   79|  3.80k|    return cf->next->cft->do_send(cf->next, data, buf, len, eos, pnwritten);
   80|      0|  *pnwritten = 0;
   81|      0|  return CURLE_RECV_ERROR;
   82|  3.80k|}
Curl_cf_def_recv:
   86|  1.75M|{
   87|  1.75M|  if(cf->next)
  ------------------
  |  Branch (87:6): [True: 1.75M, False: 0]
  ------------------
   88|  1.75M|    return cf->next->cft->do_recv(cf->next, data, buf, len, pnread);
   89|      0|  *pnread = 0;
   90|      0|  return CURLE_SEND_ERROR;
   91|  1.75M|}
Curl_cf_def_conn_is_alive:
   96|     20|{
   97|     20|  return cf->next ?
  ------------------
  |  Branch (97:10): [True: 20, False: 0]
  ------------------
   98|     20|    cf->next->cft->is_alive(cf->next, data, input_pending) :
   99|       |    FALSE; /* pessimistic in absence of data */
  ------------------
  |  | 1058|     20|#define FALSE false
  ------------------
  100|     20|}
Curl_cf_def_query:
  113|  4.00M|{
  114|  4.00M|  return cf->next ?
  ------------------
  |  Branch (114:10): [True: 3.98M, False: 12.7k]
  ------------------
  115|  3.98M|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  116|  4.00M|    CURLE_UNKNOWN_OPTION;
  117|  4.00M|}
Curl_conn_trc_filters:
  122|   806k|{
  123|   806k|  if(CURL_TRC_M_is_verbose(data) && data->conn) {
  ------------------
  |  |  135|   806k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|  1.61M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.61M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 806k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 806k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.61M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.61M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (123:37): [True: 0, False: 0]
  ------------------
  124|      0|    struct Curl_cfilter *cf = data->conn->cfilter[sockindex];
  125|       |
  126|      0|    if(cf) {
  ------------------
  |  Branch (126:8): [True: 0, False: 0]
  ------------------
  127|      0|      char msg[256], *buf;
  128|      0|      int blen, n;
  129|       |
  130|      0|      buf = msg;
  131|      0|      blen = sizeof(msg) - 1;
  132|      0|      n = curl_msnprintf(buf, blen, "%s [%d]", info, sockindex);
  133|      0|      buf += n;
  134|      0|      blen -= n;
  135|      0|      for(; cf && blen; cf = cf->next) {
  ------------------
  |  Branch (135:13): [True: 0, False: 0]
  |  Branch (135:19): [True: 0, False: 0]
  ------------------
  136|      0|        n = curl_msnprintf(buf, blen, "[%s%s]",
  137|      0|                           cf->connected ? "" : "!", cf->cft->name);
  ------------------
  |  Branch (137:28): [True: 0, False: 0]
  ------------------
  138|      0|        buf += n;
  139|      0|        blen -= n;
  140|      0|      }
  141|      0|      CURL_TRC_M(data, "%s%s", msg, blen ? "" : "...");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  142|      0|    }
  143|      0|    else
  144|      0|      CURL_TRC_M(data, "%s [%d][-]", info, sockindex);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  145|      0|  }
  146|   806k|}
Curl_conn_cf_discard_chain:
  151|  53.0k|{
  152|  53.0k|  struct Curl_cfilter *cfn, *cf = *pcf;
  153|       |
  154|  53.0k|  if(cf) {
  ------------------
  |  Branch (154:6): [True: 17.5k, False: 35.5k]
  ------------------
  155|  17.5k|    *pcf = NULL;
  156|  45.0k|    while(cf) {
  ------------------
  |  Branch (156:11): [True: 27.4k, False: 17.5k]
  ------------------
  157|  27.4k|      cfn = cf->next;
  158|       |      /* prevent destroying filter to mess with its sub-chain, since
  159|       |       * we have the reference now and will call destroy on it.
  160|       |       */
  161|  27.4k|      cf->next = NULL;
  162|  27.4k|      cf->cft->destroy(cf, data);
  163|  27.4k|      curlx_free(cf);
  ------------------
  |  | 1483|  27.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  164|  27.4k|      cf = cfn;
  165|  27.4k|    }
  166|  17.5k|  }
  167|  53.0k|}
Curl_conn_cf_discard_all:
  171|  46.5k|{
  172|  46.5k|  Curl_conn_cf_discard_chain(&conn->cfilter[sockindex], data);
  173|  46.5k|}
Curl_conn_close:
  176|  22.0k|{
  177|  22.0k|  struct Curl_cfilter *cf;
  178|       |
  179|  22.0k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  22.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 22.0k]
  |  Branch (179:3): [True: 22.0k, False: 0]
  ------------------
  180|       |  /* it is valid to call that without filters being present */
  181|  22.0k|  cf = data->conn->cfilter[sockindex];
  182|  22.0k|  if(cf) {
  ------------------
  |  Branch (182:6): [True: 11.0k, False: 11.0k]
  ------------------
  183|  11.0k|    cf->cft->do_close(cf, data);
  184|  11.0k|  }
  185|  22.0k|  Curl_shutdown_clear(data, sockindex);
  186|  22.0k|}
Curl_conn_shutdown:
  189|  4.52k|{
  190|  4.52k|  struct Curl_cfilter *cf;
  191|  4.52k|  CURLcode result = CURLE_OK;
  192|  4.52k|  timediff_t timeout_ms;
  193|       |
  194|  4.52k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  4.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 4.52k]
  |  Branch (194:3): [True: 4.52k, False: 0]
  ------------------
  195|       |
  196|  4.52k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  4.52k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 4.52k, False: 0]
  |  |  |  Branch (382:50): [True: 4.52k, False: 0]
  |  |  ------------------
  ------------------
  197|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  198|       |
  199|       |  /* Get the first connected filter that is not shut down already. */
  200|  4.52k|  cf = data->conn->cfilter[sockindex];
  201|  4.52k|  while(cf && (!cf->connected || cf->shutdown))
  ------------------
  |  Branch (201:9): [True: 4.52k, False: 0]
  |  Branch (201:16): [True: 0, False: 4.52k]
  |  Branch (201:34): [True: 0, False: 4.52k]
  ------------------
  202|      0|    cf = cf->next;
  203|       |
  204|  4.52k|  if(!cf) {
  ------------------
  |  Branch (204:6): [True: 0, False: 4.52k]
  ------------------
  205|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  206|      0|    return CURLE_OK;
  207|      0|  }
  208|       |
  209|  4.52k|  *done = FALSE;
  ------------------
  |  | 1058|  4.52k|#define FALSE false
  ------------------
  210|  4.52k|  if(!Curl_shutdown_started(data, sockindex)) {
  ------------------
  |  Branch (210:6): [True: 0, False: 4.52k]
  ------------------
  211|      0|    Curl_shutdown_start(data, sockindex, 0);
  212|      0|  }
  213|  4.52k|  else {
  214|  4.52k|    timeout_ms = Curl_shutdown_timeleft(data, data->conn, sockindex);
  215|  4.52k|    if(timeout_ms < 0) {
  ------------------
  |  Branch (215:8): [True: 0, False: 4.52k]
  ------------------
  216|       |      /* info message, since this might be regarded as acceptable */
  217|      0|      infof(data, "shutdown timeout");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  218|      0|      return CURLE_OPERATION_TIMEDOUT;
  219|      0|    }
  220|  4.52k|  }
  221|       |
  222|  9.09k|  while(cf) {
  ------------------
  |  Branch (222:9): [True: 4.56k, False: 4.52k]
  ------------------
  223|  4.56k|    if(!cf->shutdown) {
  ------------------
  |  Branch (223:8): [True: 4.56k, False: 0]
  ------------------
  224|  4.56k|      bool cfdone = FALSE;
  ------------------
  |  | 1058|  4.56k|#define FALSE false
  ------------------
  225|  4.56k|      result = cf->cft->do_shutdown(cf, data, &cfdone);
  226|  4.56k|      if(result) {
  ------------------
  |  Branch (226:10): [True: 0, False: 4.56k]
  ------------------
  227|      0|        CURL_TRC_CF(data, cf, "shut down failed with %d", result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  228|      0|        return result;
  229|      0|      }
  230|  4.56k|      else if(!cfdone) {
  ------------------
  |  Branch (230:15): [True: 0, False: 4.56k]
  ------------------
  231|      0|        CURL_TRC_CF(data, cf, "shut down not done yet");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  232|      0|        return CURLE_OK;
  233|      0|      }
  234|  4.56k|      CURL_TRC_CF(data, cf, "shut down successfully");
  ------------------
  |  |  153|  4.56k|  do {                                          \
  |  |  154|  4.56k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  4.56k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  9.13k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.56k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.56k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  9.13k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  4.56k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  4.56k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  4.56k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 4.56k]
  |  |  ------------------
  ------------------
  235|  4.56k|      cf->shutdown = TRUE;
  ------------------
  |  | 1055|  4.56k|#define TRUE true
  ------------------
  236|  4.56k|    }
  237|  4.56k|    cf = cf->next;
  238|  4.56k|  }
  239|  4.52k|  *done = (!result);
  240|  4.52k|  return result;
  241|  4.52k|}
Curl_cf_recv:
  245|  3.86M|{
  246|  3.86M|  struct Curl_cfilter *cf;
  247|       |
  248|  3.86M|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  3.86M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 3.86M]
  |  Branch (248:3): [True: 3.86M, False: 0]
  ------------------
  249|  3.86M|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  3.86M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 3.86M]
  |  Branch (249:3): [True: 3.86M, False: 0]
  ------------------
  250|  3.86M|  cf = data->conn->cfilter[sockindex];
  251|  10.8M|  while(cf && !cf->connected)
  ------------------
  |  Branch (251:9): [True: 10.8M, False: 0]
  |  Branch (251:15): [True: 6.94M, False: 3.86M]
  ------------------
  252|  6.94M|    cf = cf->next;
  253|  3.86M|  if(cf)
  ------------------
  |  Branch (253:6): [True: 3.86M, False: 0]
  ------------------
  254|  3.86M|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  255|      0|  failf(data, "recv: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  256|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (256:3): [Folded, False: 0]
  |  Branch (256:3): [Folded, False: 0]
  ------------------
  257|      0|  *pnread = 0;
  258|      0|  return CURLE_FAILED_INIT;
  259|      0|}
Curl_cf_send:
  264|  17.6k|{
  265|  17.6k|  struct Curl_cfilter *cf;
  266|       |
  267|  17.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (267:3): [True: 0, False: 17.6k]
  |  Branch (267:3): [True: 17.6k, False: 0]
  ------------------
  268|  17.6k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (268:3): [True: 0, False: 17.6k]
  |  Branch (268:3): [True: 17.6k, False: 0]
  ------------------
  269|  17.6k|  cf = data->conn->cfilter[sockindex];
  270|  17.6k|  while(cf && !cf->connected)
  ------------------
  |  Branch (270:9): [True: 17.6k, False: 0]
  |  Branch (270:15): [True: 0, False: 17.6k]
  ------------------
  271|      0|    cf = cf->next;
  272|  17.6k|  if(cf) {
  ------------------
  |  Branch (272:6): [True: 17.6k, False: 0]
  ------------------
  273|  17.6k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  274|  17.6k|  }
  275|      0|  failf(data, "send: no filter connected");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  276|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (276:3): [Folded, False: 0]
  |  Branch (276:3): [Folded, False: 0]
  ------------------
  277|      0|  *pnwritten = 0;
  278|      0|  return CURLE_FAILED_INIT;
  279|      0|}
Curl_cf_recv_bufq:
  299|    205|{
  300|    205|  struct cf_io_ctx io;
  301|       |
  302|    205|  if(!cf || !data) {
  ------------------
  |  Branch (302:6): [True: 0, False: 205]
  |  Branch (302:13): [True: 0, False: 205]
  ------------------
  303|      0|    *pnread = 0;
  304|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  305|      0|  }
  306|    205|  io.data = data;
  307|    205|  io.cf = cf;
  308|    205|  return Curl_bufq_sipn(bufq, maxlen, cf_bufq_reader, &io, pnread);
  309|    205|}
Curl_cf_send_bufq:
  324|    126|{
  325|    126|  struct cf_io_ctx io;
  326|       |
  327|    126|  if(!cf || !data) {
  ------------------
  |  Branch (327:6): [True: 0, False: 126]
  |  Branch (327:13): [True: 0, False: 126]
  ------------------
  328|      0|    *pnwritten = 0;
  329|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  330|      0|  }
  331|    126|  io.data = data;
  332|    126|  io.cf = cf;
  333|    126|  if(buf && blen)
  ------------------
  |  Branch (333:6): [True: 0, False: 126]
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|    return Curl_bufq_write_pass(bufq, buf, blen, cf_bufq_writer, &io,
  335|      0|                                pnwritten);
  336|    126|  else
  337|    126|    return Curl_bufq_pass(bufq, cf_bufq_writer, &io, pnwritten);
  338|    126|}
Curl_cf_create:
  343|  49.1k|{
  344|  49.1k|  struct Curl_cfilter *cf;
  345|  49.1k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  346|       |
  347|  49.1k|  DEBUGASSERT(cft);
  ------------------
  |  | 1081|  49.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (347:3): [True: 0, False: 49.1k]
  |  Branch (347:3): [True: 49.1k, False: 0]
  ------------------
  348|  49.1k|  cf = curlx_calloc(1, sizeof(*cf));
  ------------------
  |  | 1480|  49.1k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  349|  49.1k|  if(!cf)
  ------------------
  |  Branch (349:6): [True: 0, False: 49.1k]
  ------------------
  350|      0|    goto out;
  351|       |
  352|  49.1k|  cf->cft = cft;
  353|  49.1k|  cf->ctx = ctx;
  354|  49.1k|  result = CURLE_OK;
  355|  49.1k|out:
  356|  49.1k|  *pcf = cf;
  357|  49.1k|  return result;
  358|  49.1k|}
Curl_conn_cf_add:
  364|  22.0k|{
  365|  22.0k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  22.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (365:3): [True: 0, False: 22.0k]
  |  Branch (365:3): [True: 22.0k, False: 0]
  ------------------
  366|  22.0k|  DEBUGASSERT(!cf->conn);
  ------------------
  |  | 1081|  22.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 22.0k]
  |  Branch (366:3): [True: 22.0k, False: 0]
  ------------------
  367|  22.0k|  DEBUGASSERT(!cf->next);
  ------------------
  |  | 1081|  22.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (367:3): [True: 0, False: 22.0k]
  |  Branch (367:3): [True: 22.0k, False: 0]
  ------------------
  368|       |
  369|  22.0k|  cf->next = conn->cfilter[sockindex];
  370|  22.0k|  cf->conn = conn;
  371|  22.0k|  cf->sockindex = sockindex;
  372|  22.0k|  conn->cfilter[sockindex] = cf;
  373|  22.0k|  CURL_TRC_CF(data, cf, "added");
  ------------------
  |  |  153|  22.0k|  do {                                          \
  |  |  154|  22.0k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  22.0k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  44.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 22.0k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 22.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  44.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  22.0k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  22.0k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  374|  22.0k|}
Curl_conn_cf_insert_after:
  378|  16.8k|{
  379|  16.8k|  struct Curl_cfilter *tail, **pnext;
  380|       |
  381|  16.8k|  DEBUGASSERT(cf_at);
  ------------------
  |  | 1081|  16.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 16.8k]
  |  Branch (381:3): [True: 16.8k, False: 0]
  ------------------
  382|  16.8k|  DEBUGASSERT(cf_new);
  ------------------
  |  | 1081|  16.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (382:3): [True: 0, False: 16.8k]
  |  Branch (382:3): [True: 16.8k, False: 0]
  ------------------
  383|  16.8k|  DEBUGASSERT(!cf_new->conn);
  ------------------
  |  | 1081|  16.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (383:3): [True: 0, False: 16.8k]
  |  Branch (383:3): [True: 16.8k, False: 0]
  ------------------
  384|       |
  385|  16.8k|  tail = cf_at->next;
  386|  16.8k|  cf_at->next = cf_new;
  387|  16.8k|  do {
  388|  16.8k|    cf_new->conn = cf_at->conn;
  389|  16.8k|    cf_new->sockindex = cf_at->sockindex;
  390|  16.8k|    pnext = &cf_new->next;
  391|  16.8k|    cf_new = cf_new->next;
  392|  16.8k|  } while(cf_new);
  ------------------
  |  Branch (392:11): [True: 0, False: 16.8k]
  ------------------
  393|  16.8k|  *pnext = tail;
  394|  16.8k|}
Curl_conn_cf_connect:
  423|  1.97M|{
  424|  1.97M|  if(cf)
  ------------------
  |  Branch (424:6): [True: 1.97M, False: 0]
  ------------------
  425|  1.97M|    return cf->cft->do_connect(cf, data, done);
  426|      0|  return CURLE_FAILED_INIT;
  427|  1.97M|}
Curl_conn_cf_close:
  430|    143|{
  431|    143|  if(cf)
  ------------------
  |  Branch (431:6): [True: 143, False: 0]
  ------------------
  432|    143|    cf->cft->do_close(cf, data);
  433|    143|}
Curl_conn_cf_send:
  438|  2.78k|{
  439|  2.78k|  if(cf)
  ------------------
  |  Branch (439:6): [True: 2.78k, False: 0]
  ------------------
  440|  2.78k|    return cf->cft->do_send(cf, data, buf, len, eos, pnwritten);
  441|      0|  *pnwritten = 0;
  442|      0|  return CURLE_SEND_ERROR;
  443|  2.78k|}
Curl_conn_cf_recv:
  447|  2.07k|{
  448|  2.07k|  if(cf)
  ------------------
  |  Branch (448:6): [True: 2.07k, False: 0]
  ------------------
  449|  2.07k|    return cf->cft->do_recv(cf, data, buf, len, pnread);
  450|      0|  *pnread = 0;
  451|      0|  return CURLE_RECV_ERROR;
  452|  2.07k|}
Curl_conn_connect:
  544|   868k|{
  545|   868k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  546|   868k|  struct pollfd a_few_on_stack[CF_CONN_NUM_POLLS_ON_STACK];
  547|   868k|  struct easy_pollset ps;
  548|   868k|  struct curl_pollfds cpfds;
  549|   868k|  struct Curl_cfilter *cf;
  550|   868k|  CURLcode result = CURLE_OK;
  551|       |
  552|   868k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   868k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (552:3): [True: 0, False: 868k]
  |  Branch (552:3): [True: 868k, False: 0]
  ------------------
  553|   868k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   868k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (553:3): [True: 0, False: 868k]
  |  Branch (553:3): [True: 868k, False: 0]
  ------------------
  554|   868k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|   868k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 868k, False: 0]
  |  |  |  Branch (382:50): [True: 868k, False: 0]
  |  |  ------------------
  ------------------
  555|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  556|       |
  557|   868k|  if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|   868k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (557:6): [True: 0, False: 868k]
  ------------------
  558|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  559|      0|    return CURLE_OK;
  560|      0|  }
  561|       |
  562|   868k|  cf = data->conn->cfilter[sockindex];
  563|   868k|  if(!cf) {
  ------------------
  |  Branch (563:6): [True: 0, False: 868k]
  ------------------
  564|      0|    *done = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  565|      0|    return CURLE_FAILED_INIT;
  566|      0|  }
  567|       |
  568|   868k|  *done = (bool)cf->connected;
  569|   868k|  if(*done)
  ------------------
  |  Branch (569:6): [True: 10.2k, False: 858k]
  ------------------
  570|  10.2k|    return CURLE_OK;
  571|       |
  572|   858k|  Curl_pollset_init(&ps);
  573|   858k|  Curl_pollfds_init(&cpfds, a_few_on_stack, CF_CONN_NUM_POLLS_ON_STACK);
  ------------------
  |  |  545|   858k|#define CF_CONN_NUM_POLLS_ON_STACK 5
  ------------------
  574|   858k|  while(!*done) {
  ------------------
  |  Branch (574:9): [True: 858k, False: 0]
  ------------------
  575|   858k|    if(Curl_conn_needs_flush(data, sockindex)) {
  ------------------
  |  Branch (575:8): [True: 0, False: 858k]
  ------------------
  576|      0|      DEBUGF(infof(data, "Curl_conn_connect(index=%d), flush", sockindex));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  577|      0|      result = Curl_conn_flush(data, sockindex);
  578|      0|      if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (578:10): [True: 0, False: 0]
  |  Branch (578:20): [True: 0, False: 0]
  ------------------
  579|      0|        return result;
  580|      0|    }
  581|       |
  582|   858k|    result = cf->cft->do_connect(cf, data, done);
  583|   858k|    CURL_TRC_CF(data, cf, "Curl_conn_connect(block=%d) -> %d, done=%d",
  ------------------
  |  |  153|   858k|  do {                                          \
  |  |  154|   858k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|   858k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.71M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 858k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 858k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.71M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|   858k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|   858k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|   858k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 858k]
  |  |  ------------------
  ------------------
  584|   858k|                blocking, result, *done);
  585|   858k|    if(!result && *done) {
  ------------------
  |  Branch (585:8): [True: 854k, False: 3.64k]
  |  Branch (585:19): [True: 7.10k, False: 847k]
  ------------------
  586|       |      /* Now that the complete filter chain is connected, let all filters
  587|       |       * persist information at the connection. E.g. cf-socket sets the
  588|       |       * socket and ip related information. */
  589|  7.10k|      cf_cntrl_update_info(data, data->conn);
  590|  7.10k|      conn_report_connect_stats(cf, data);
  591|  7.10k|      data->conn->keepalive = *Curl_pgrs_now(data);
  592|  7.10k|      VERBOSE(result = cf_verboseconnect(data, cf));
  ------------------
  |  | 1618|  7.10k|#define VERBOSE(x) x
  ------------------
  593|  7.10k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "connected"));
  ------------------
  |  | 1618|  7.10k|#define VERBOSE(x) x
  ------------------
  594|  7.10k|      conn_remove_setup_filters(data, sockindex);
  595|  7.10k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "reduced to"));
  ------------------
  |  | 1618|  7.10k|#define VERBOSE(x) x
  ------------------
  596|  7.10k|      goto out;
  597|  7.10k|    }
  598|   851k|    else if(result) {
  ------------------
  |  Branch (598:13): [True: 3.64k, False: 847k]
  ------------------
  599|  3.64k|      CURL_TRC_CF(data, cf, "Curl_conn_connect(), filter returned %d", result);
  ------------------
  |  |  153|  3.64k|  do {                                          \
  |  |  154|  3.64k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.64k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.28k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.64k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.28k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.64k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.64k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  600|  3.64k|      VERBOSE(Curl_conn_trc_filters(data, sockindex, "failed to connect"));
  ------------------
  |  | 1618|  3.64k|#define VERBOSE(x) x
  ------------------
  601|  3.64k|      conn_report_connect_stats(cf, data);
  602|  3.64k|      goto out;
  603|  3.64k|    }
  604|       |
  605|   847k|    if(!blocking)
  ------------------
  |  Branch (605:8): [True: 847k, False: 0]
  ------------------
  606|   847k|      goto out;
  607|      0|    else {
  608|       |      /* check allowed time left */
  609|      0|      const timediff_t timeout_ms = Curl_timeleft_ms(data);
  610|      0|      curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
  611|      0|      int rc;
  612|       |
  613|      0|      if(timeout_ms < 0) {
  ------------------
  |  Branch (613:10): [True: 0, False: 0]
  ------------------
  614|       |        /* no need to continue if time already is up */
  615|      0|        failf(data, "connect timeout");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  616|      0|        result = CURLE_OPERATION_TIMEDOUT;
  617|      0|        goto out;
  618|      0|      }
  619|       |
  620|      0|      CURL_TRC_CF(data, cf, "Curl_conn_connect(block=1), do poll");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  621|      0|      Curl_pollset_reset(&ps);
  622|      0|      Curl_pollfds_reset(&cpfds);
  623|       |      /* In general, we want to send after connect, wait on that. */
  624|      0|      if(sockfd != CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (624:10): [True: 0, False: 0]
  ------------------
  625|      0|        result = Curl_pollset_set_out_only(data, &ps, sockfd);
  ------------------
  |  |  174|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  626|      0|      if(!result)
  ------------------
  |  Branch (626:10): [True: 0, False: 0]
  ------------------
  627|      0|        result = Curl_conn_adjust_pollset(data, data->conn, &ps);
  628|      0|      if(result)
  ------------------
  |  Branch (628:10): [True: 0, False: 0]
  ------------------
  629|      0|        goto out;
  630|      0|      result = Curl_pollfds_add_ps(&cpfds, &ps);
  631|      0|      if(result)
  ------------------
  |  Branch (631:10): [True: 0, False: 0]
  ------------------
  632|      0|        goto out;
  633|       |
  634|      0|      rc = Curl_poll(cpfds.pfds, cpfds.n,
  635|      0|                     CURLMIN(timeout_ms, (cpfds.n ? 1000 : 10)));
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  |  Branch (1287:31): [True: 0, False: 0]
  |  |  |  Branch (1287:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  636|      0|      CURL_TRC_CF(data, cf, "Curl_conn_connect(block=1), Curl_poll() -> %d",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  637|      0|                  rc);
  638|      0|      if(rc < 0) {
  ------------------
  |  Branch (638:10): [True: 0, False: 0]
  ------------------
  639|      0|        result = CURLE_COULDNT_CONNECT;
  640|      0|        goto out;
  641|      0|      }
  642|       |      /* continue iterating */
  643|      0|    }
  644|   847k|  }
  645|       |
  646|   858k|out:
  647|   858k|  Curl_pollset_cleanup(&ps);
  648|   858k|  Curl_pollfds_cleanup(&cpfds);
  649|   858k|  return result;
  650|   858k|}
Curl_conn_is_connected:
  660|  1.53M|{
  661|  1.53M|  struct Curl_cfilter *cf;
  662|       |
  663|  1.53M|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  1.53M|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 1.53M, False: 0]
  |  |  |  Branch (382:50): [True: 1.53M, False: 0]
  |  |  ------------------
  ------------------
  664|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  665|  1.53M|  cf = conn->cfilter[sockindex];
  666|  1.53M|  if(cf)
  ------------------
  |  Branch (666:6): [True: 1.53M, False: 4.52k]
  ------------------
  667|  1.53M|    return (bool)cf->connected;
  668|  4.52k|  else if(conn->scheme->flags & PROTOPT_NONETWORK)
  ------------------
  |  |  215|  4.52k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (668:11): [True: 0, False: 4.52k]
  ------------------
  669|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  670|  4.52k|  return FALSE;
  ------------------
  |  | 1058|  4.52k|#define FALSE false
  ------------------
  671|  1.53M|}
Curl_conn_is_ssl:
  704|  32.7k|{
  705|  32.7k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  32.7k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 32.7k, False: 0]
  |  |  |  Branch (382:50): [True: 32.7k, False: 0]
  |  |  ------------------
  ------------------
  706|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  707|  32.7k|  return conn ? cf_is_ssl(conn->cfilter[sockindex]) : FALSE;
  ------------------
  |  | 1058|  32.7k|#define FALSE false
  ------------------
  |  Branch (707:10): [True: 32.7k, False: 0]
  ------------------
  708|  32.7k|}
Curl_conn_is_multiplex:
  739|  2.16M|{
  740|  2.16M|  struct Curl_cfilter *cf;
  741|       |
  742|  2.16M|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  2.16M|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 2.16M, False: 0]
  |  |  |  Branch (382:50): [True: 2.16M, False: 0]
  |  |  ------------------
  ------------------
  743|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  744|  2.16M|  cf = conn ? conn->cfilter[sockindex] : NULL;
  ------------------
  |  Branch (744:8): [True: 2.16M, False: 0]
  ------------------
  745|       |
  746|  2.17M|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (746:9): [True: 2.17M, False: 1.95k]
  ------------------
  747|  2.17M|    if(cf->cft->flags & CF_TYPE_MULTIPLEX)
  ------------------
  |  |  208|  2.17M|#define CF_TYPE_MULTIPLEX   (1 << 2)
  ------------------
  |  Branch (747:8): [True: 0, False: 2.17M]
  ------------------
  748|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  749|  2.17M|    if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  206|  2.17M|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
                  if(cf->cft->flags & (CF_TYPE_IP_CONNECT | CF_TYPE_SSL))
  ------------------
  |  |  207|  2.17M|#define CF_TYPE_SSL         (1 << 1)
  ------------------
  |  Branch (749:8): [True: 2.15M, False: 15.9k]
  ------------------
  750|  2.15M|      return FALSE;
  ------------------
  |  | 1058|  2.15M|#define FALSE false
  ------------------
  751|  2.17M|  }
  752|  1.95k|  return FALSE;
  ------------------
  |  | 1058|  1.95k|#define FALSE false
  ------------------
  753|  2.16M|}
Curl_socktype_for_transport:
  763|  11.0k|{
  764|  11.0k|  switch(transport) {
  765|  10.6k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  10.6k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (765:3): [True: 10.6k, False: 398]
  ------------------
  766|  10.6k|    return SOCK_STREAM;
  767|    398|  case TRNSPRT_UNIX:
  ------------------
  |  |  310|    398|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (767:3): [True: 398, False: 10.6k]
  ------------------
  768|    398|    return SOCK_STREAM;
  769|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (769:3): [True: 0, False: 11.0k]
  ------------------
  770|       |    return SOCK_DGRAM;
  771|  11.0k|  }
  772|  11.0k|}
Curl_protocol_for_transport:
  775|  11.0k|{
  776|  11.0k|  switch(transport) {
  777|  10.6k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  10.6k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (777:3): [True: 10.6k, False: 398]
  ------------------
  778|  10.6k|    return IPPROTO_TCP;
  779|    398|  case TRNSPRT_UNIX:
  ------------------
  |  |  310|    398|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (779:3): [True: 398, False: 10.6k]
  ------------------
  780|    398|    return IPPROTO_IP;
  781|      0|  default: /* UDP and QUIC */
  ------------------
  |  Branch (781:3): [True: 0, False: 11.0k]
  ------------------
  782|       |    return IPPROTO_UDP;
  783|  11.0k|  }
  784|  11.0k|}
Curl_conn_cf_wants_httpsrr:
  788|   712k|{
  789|   712k|  (void)data;
  790|  2.40M|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (790:9): [True: 1.91M, False: 491k]
  ------------------
  791|  1.91M|    if(cf->cft->flags & CF_TYPE_HTTPSRR)
  ------------------
  |  |  212|  1.91M|#define CF_TYPE_HTTPSRR     (1 << 6)
  ------------------
  |  Branch (791:8): [True: 220k, False: 1.69M]
  ------------------
  792|   220k|      return TRUE;
  ------------------
  |  | 1055|   220k|#define TRUE true
  ------------------
  793|  1.91M|  }
  794|   491k|  return FALSE;
  ------------------
  |  | 1058|   491k|#define FALSE false
  ------------------
  795|   712k|}
Curl_conn_data_pending:
  829|   195k|{
  830|   195k|  struct Curl_cfilter *cf;
  831|       |
  832|   195k|  (void)data;
  833|   195k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   195k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (833:3): [True: 0, False: 195k]
  |  Branch (833:3): [True: 195k, False: 0]
  ------------------
  834|   195k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|   195k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (834:3): [True: 0, False: 195k]
  |  Branch (834:3): [True: 195k, False: 0]
  ------------------
  835|   195k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|   195k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 195k, False: 0]
  |  |  |  Branch (382:50): [True: 195k, False: 0]
  |  |  ------------------
  ------------------
  836|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  837|       |
  838|   195k|  cf = data->conn->cfilter[sockindex];
  839|   195k|  while(cf && !cf->connected) {
  ------------------
  |  Branch (839:9): [True: 195k, False: 0]
  |  Branch (839:15): [True: 0, False: 195k]
  ------------------
  840|      0|    cf = cf->next;
  841|      0|  }
  842|   195k|  if(cf) {
  ------------------
  |  Branch (842:6): [True: 195k, False: 0]
  ------------------
  843|   195k|    return cf->cft->has_data_pending(cf, data);
  844|   195k|  }
  845|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  846|   195k|}
Curl_conn_cf_needs_flush:
  850|  1.53M|{
  851|  1.53M|  CURLcode result;
  852|  1.53M|  int pending = 0;
  853|  1.53M|  result = cf ? cf->cft->query(cf, data, CF_QUERY_NEED_FLUSH,
  ------------------
  |  |  171|  1.53M|#define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
  ------------------
  |  Branch (853:12): [True: 1.53M, False: 0]
  ------------------
  854|  1.53M|                               &pending, NULL) : CURLE_UNKNOWN_OPTION;
  855|  1.53M|  return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1058|  1.53M|#define FALSE false
  ------------------
                return (result || !pending) ? FALSE : TRUE;
  ------------------
  |  | 1055|  1.53M|#define TRUE true
  ------------------
  |  Branch (855:11): [True: 1.53M, False: 0]
  |  Branch (855:21): [True: 0, False: 0]
  ------------------
  856|  1.53M|}
Curl_conn_needs_flush:
  859|  1.26M|{
  860|  1.26M|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  1.26M|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 1.25M, False: 97]
  |  |  |  Branch (382:50): [True: 1.25M, False: 0]
  |  |  ------------------
  ------------------
  861|     97|    return FALSE;
  ------------------
  |  | 1058|     97|#define FALSE false
  ------------------
  862|  1.25M|  return Curl_conn_cf_needs_flush(data->conn->cfilter[sockindex], data);
  863|  1.26M|}
Curl_conn_cf_adjust_pollset:
  868|  2.48M|{
  869|  2.48M|  CURLcode result = CURLE_OK;
  870|       |  /* Get the lowest not-connected filter, if there are any */
  871|  4.58M|  while(cf && !cf->connected && cf->next && !cf->next->connected)
  ------------------
  |  Branch (871:9): [True: 3.55M, False: 1.03M]
  |  Branch (871:15): [True: 3.35M, False: 191k]
  |  Branch (871:33): [True: 2.59M, False: 762k]
  |  Branch (871:45): [True: 2.10M, False: 491k]
  ------------------
  872|  2.10M|    cf = cf->next;
  873|       |  /* Skip all filters that have already shut down */
  874|  2.48M|  while(cf && cf->shutdown)
  ------------------
  |  Branch (874:9): [True: 1.44M, False: 1.03M]
  |  Branch (874:15): [True: 0, False: 1.44M]
  ------------------
  875|      0|    cf = cf->next;
  876|       |  /* From there on, give all filters a chance to adjust the pollset.
  877|       |   * Lower filters are called later, so they may override */
  878|  4.91M|  while(cf && !result) {
  ------------------
  |  Branch (878:9): [True: 2.43M, False: 2.48M]
  |  Branch (878:15): [True: 2.43M, False: 0]
  ------------------
  879|  2.43M|    result = cf->cft->adjust_pollset(cf, data, ps);
  880|  2.43M|    cf = cf->next;
  881|  2.43M|  }
  882|  2.48M|  return result;
  883|  2.48M|}
Curl_conn_adjust_pollset:
  888|  1.03M|{
  889|  1.03M|  CURLcode result = CURLE_OK;
  890|  1.03M|  int i;
  891|       |
  892|  1.03M|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  1.03M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (892:3): [True: 0, False: 1.03M]
  |  Branch (892:3): [True: 1.03M, False: 0]
  ------------------
  893|  1.03M|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  1.03M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (893:3): [True: 0, False: 1.03M]
  |  Branch (893:3): [True: 1.03M, False: 0]
  ------------------
  894|       |  /* During connect time, connection filters may add sockets to the pollset
  895|       |   * even when the transfer neither wants to send nor receive. And those
  896|       |   * sockets, when having events, are served.
  897|       |   * Once connected however, a transfer that neither wants to send nor receive
  898|       |   * will never call the connection filters. Any sockets added by the filters
  899|       |   * will not change state and POLLIN/POLLOUT events will trigger forever,
  900|       |   * making us busy loop. See #21671 */
  901|  1.03M|  if(ps->n || !Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  303|   355k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (901:6): [True: 683k, False: 355k]
  |  Branch (901:15): [True: 355k, False: 0]
  ------------------
  902|      0|     (conn->cfilter[SECONDARYSOCKET] &&
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (902:7): [True: 0, False: 0]
  ------------------
  903|  1.03M|      !Curl_conn_is_connected(conn, SECONDARYSOCKET))) {
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (903:7): [True: 0, False: 0]
  ------------------
  904|  3.11M|    for(i = 0; (i < 2) && !result && conn; ++i) {
  ------------------
  |  Branch (904:16): [True: 2.07M, False: 1.03M]
  |  Branch (904:27): [True: 2.07M, False: 0]
  |  Branch (904:38): [True: 2.07M, False: 0]
  ------------------
  905|  2.07M|      result = Curl_conn_cf_adjust_pollset(conn->cfilter[i], data, ps);
  906|  2.07M|    }
  907|  1.03M|  }
  908|  1.03M|  return result;
  909|  1.03M|}
Curl_conn_cf_cntrl:
  991|   134k|{
  992|   134k|  CURLcode result = CURLE_OK;
  993|       |
  994|   227k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (994:9): [True: 93.9k, False: 134k]
  ------------------
  995|  93.9k|    if(cf->cft->cntrl == Curl_cf_def_cntrl)
  ------------------
  |  Branch (995:8): [True: 27.4k, False: 66.5k]
  ------------------
  996|  27.4k|      continue;
  997|  66.5k|    result = cf->cft->cntrl(cf, data, event, arg1, arg2);
  998|  66.5k|    if(!ignore_result && result)
  ------------------
  |  Branch (998:8): [True: 10.2k, False: 56.2k]
  |  Branch (998:26): [True: 0, False: 10.2k]
  ------------------
  999|      0|      break;
 1000|  66.5k|  }
 1001|   134k|  return result;
 1002|   134k|}
Curl_conn_cf_get_socket:
 1006|   858k|{
 1007|   858k|  curl_socket_t sock;
 1008|   858k|  if(cf && !cf->cft->query(cf, data, CF_QUERY_SOCKET, NULL, &sock))
  ------------------
  |  |  167|   858k|#define CF_QUERY_SOCKET             3  /* -          curl_socket_t */
  ------------------
  |  Branch (1008:6): [True: 858k, False: 0]
  |  Branch (1008:12): [True: 492k, False: 366k]
  ------------------
 1009|   492k|    return sock;
 1010|   366k|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|   366k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1011|   858k|}
Curl_conn_cf_get_alpn_negotiated:
 1024|    772|{
 1025|    772|  const char *alpn = NULL;
 1026|    772|  CURL_TRC_CF(data, cf, "query ALPN");
  ------------------
  |  |  153|    772|  do {                                          \
  |  |  154|    772|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    772|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.54k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 772, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 772]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.54k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    772|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    772|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    772|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 772]
  |  |  ------------------
  ------------------
 1027|    772|  if(cf && !cf->cft->query(cf, data, CF_QUERY_ALPN_NEGOTIATED, NULL,
  ------------------
  |  |  181|    772|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1027:6): [True: 772, False: 0]
  |  Branch (1027:12): [True: 3, False: 769]
  ------------------
 1028|    772|                           CURL_UNCONST(&alpn)))
  ------------------
  |  |  866|    772|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1029|      3|    return alpn;
 1030|    769|  return NULL;
 1031|    772|}
Curl_conn_cf_get_ip_info:
 1047|    108|{
 1048|    108|  CURLcode result = CURLE_UNKNOWN_OPTION;
 1049|    108|  if(cf) {
  ------------------
  |  Branch (1049:6): [True: 108, False: 0]
  ------------------
 1050|    108|    int ipv6 = 0;
 1051|    108|    result = cf->cft->query(cf, data, CF_QUERY_IP_INFO, &ipv6, ipquad);
  ------------------
  |  |  172|    108|#define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
  ------------------
 1052|    108|    *is_ipv6 = !!ipv6;
 1053|    108|  }
 1054|    108|  return result;
 1055|    108|}
Curl_conn_get_first_socket:
 1058|   847k|{
 1059|   847k|  struct Curl_cfilter *cf;
 1060|       |
 1061|   847k|  if(!data->conn)
  ------------------
  |  Branch (1061:6): [True: 0, False: 847k]
  ------------------
 1062|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
 1063|       |
 1064|   847k|  cf = data->conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  303|   847k|#define FIRSTSOCKET     0
  ------------------
 1065|       |  /* if the top filter has not connected, ask it (and its sub-filters)
 1066|       |   * for the socket. Otherwise conn->sock[sockindex] should have it. */
 1067|   847k|  if(cf && !cf->connected)
  ------------------
  |  Branch (1067:6): [True: 847k, False: 0]
  |  Branch (1067:12): [True: 847k, False: 0]
  ------------------
 1068|   847k|    return Curl_conn_cf_get_socket(cf, data);
 1069|      0|  return data->conn->sock[FIRSTSOCKET];
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
 1070|   847k|}
Curl_conn_ev_data_setup:
 1082|  21.3k|{
 1083|  21.3k|  return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  | 1058|  21.3k|#define FALSE false
  ------------------
                return cf_cntrl_all(data->conn, data, FALSE, CF_CTRL_DATA_SETUP, 0, NULL);
  ------------------
  |  |  119|  21.3k|#define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
  ------------------
 1084|  21.3k|}
Curl_conn_ev_data_done_send:
 1099|  17.2k|{
 1100|  17.2k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE_SEND, 0, NULL);
  ------------------
  |  | 1055|  17.2k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE_SEND, 0, NULL);
  ------------------
  |  |  123|  17.2k|#define CF_CTRL_DATA_DONE_SEND          8  /* 0          NULL     ignored */
  ------------------
 1101|  17.2k|}
Curl_conn_ev_data_done:
 1108|  21.3k|{
 1109|  21.3k|  cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  | 1055|  21.3k|#define TRUE true
  ------------------
                cf_cntrl_all(data->conn, data, TRUE, CF_CTRL_DATA_DONE, premature, NULL);
  ------------------
  |  |  122|  21.3k|#define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
  ------------------
 1110|  21.3k|}
Curl_conn_is_alive:
 1120|  10.2k|{
 1121|  10.2k|  struct Curl_cfilter *cf = conn->cfilter[FIRSTSOCKET];
  ------------------
  |  |  303|  10.2k|#define FIRSTSOCKET     0
  ------------------
 1122|  10.2k|  return cf && !cf->conn->bits.close &&
  ------------------
  |  Branch (1122:10): [True: 10.2k, False: 0]
  |  Branch (1122:16): [True: 10.2k, False: 0]
  ------------------
 1123|  10.2k|         cf->cft->is_alive(cf, data, input_pending);
  ------------------
  |  Branch (1123:10): [True: 10.2k, False: 0]
  ------------------
 1124|  10.2k|}
Curl_conn_get_max_concurrent:
 1141|  11.8k|{
 1142|  11.8k|  struct Curl_cfilter *cf;
 1143|  11.8k|  CURLcode result;
 1144|  11.8k|  int n = -1;
 1145|       |
 1146|  11.8k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  11.8k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 11.8k, False: 0]
  |  |  |  Branch (382:50): [True: 11.8k, False: 0]
  |  |  ------------------
  ------------------
 1147|      0|    return 0;
 1148|       |
 1149|  11.8k|  cf = conn->cfilter[sockindex];
 1150|  11.8k|  result = cf ? cf->cft->query(cf, data, CF_QUERY_MAX_CONCURRENT,
  ------------------
  |  |  165|  11.8k|#define CF_QUERY_MAX_CONCURRENT     1  /* number     -        */
  ------------------
  |  Branch (1150:12): [True: 11.8k, False: 0]
  ------------------
 1151|  11.8k|                               &n, NULL) : CURLE_UNKNOWN_OPTION;
 1152|       |  /* If no filter answered the query, the default is a non-multiplexed
 1153|       |   * connection with limit 1. Otherwise, the query may return 0
 1154|       |   * for connections that are in shutdown, e.g. server HTTP/2 GOAWAY. */
 1155|  11.8k|  return (result || n < 0) ? 1 : (size_t)n;
  ------------------
  |  Branch (1155:11): [True: 11.8k, False: 0]
  |  Branch (1155:21): [True: 0, False: 0]
  ------------------
 1156|  11.8k|}
Curl_conn_recv:
 1185|  3.86M|{
 1186|  3.86M|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  3.86M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1186:3): [True: 0, False: 3.86M]
  |  Branch (1186:3): [True: 3.86M, False: 0]
  ------------------
 1187|  3.86M|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  3.86M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1187:3): [True: 0, False: 3.86M]
  |  Branch (1187:3): [True: 3.86M, False: 0]
  ------------------
 1188|  3.86M|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  3.86M|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 3.86M, False: 0]
  |  |  |  Branch (382:50): [True: 3.86M, False: 0]
  |  |  ------------------
  ------------------
 1189|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1190|  3.86M|  if(data && data->conn && data->conn->recv[sockindex])
  ------------------
  |  Branch (1190:6): [True: 3.86M, False: 0]
  |  Branch (1190:14): [True: 3.86M, False: 0]
  |  Branch (1190:28): [True: 3.86M, False: 0]
  ------------------
 1191|  3.86M|    return data->conn->recv[sockindex](data, sockindex, buf, len, pnread);
 1192|      0|  *pnread = 0;
 1193|      0|  return CURLE_FAILED_INIT;
 1194|  3.86M|}
Curl_conn_send:
 1199|  17.6k|{
 1200|  17.6k|  size_t write_len = len;
 1201|       |
 1202|  17.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1202:3): [True: 0, False: 17.6k]
  |  Branch (1202:3): [True: 17.6k, False: 0]
  ------------------
 1203|  17.6k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1203:3): [True: 0, False: 17.6k]
  |  Branch (1203:3): [True: 17.6k, False: 0]
  ------------------
 1204|  17.6k|  DEBUGASSERT(CONN_SOCK_IDX_VALID(sockindex));
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1204:3): [True: 0, False: 17.6k]
  |  Branch (1204:3): [True: 0, False: 0]
  |  Branch (1204:3): [True: 17.6k, False: 0]
  |  Branch (1204:3): [True: 17.6k, False: 0]
  ------------------
 1205|  17.6k|  if(!CONN_SOCK_IDX_VALID(sockindex))
  ------------------
  |  |  382|  17.6k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 17.6k, False: 0]
  |  |  |  Branch (382:50): [True: 17.6k, False: 0]
  |  |  ------------------
  ------------------
 1206|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1207|  17.6k|#ifdef DEBUGBUILD
 1208|  17.6k|  if(write_len) {
  ------------------
  |  Branch (1208:6): [True: 17.5k, False: 95]
  ------------------
 1209|       |    /* Allow debug builds to override this logic to force short sends */
 1210|  17.5k|    const char *p = getenv("CURL_SMALLSENDS");
 1211|  17.5k|    if(p) {
  ------------------
  |  Branch (1211:8): [True: 0, False: 17.5k]
  ------------------
 1212|      0|      curl_off_t altsize;
 1213|      0|      if(!curlx_str_number(&p, &altsize, write_len)) {
  ------------------
  |  Branch (1213:10): [True: 0, False: 0]
  ------------------
 1214|      0|        write_len = (size_t)altsize;
 1215|      0|        if(write_len != len)
  ------------------
  |  Branch (1215:12): [True: 0, False: 0]
  ------------------
 1216|      0|          eos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1217|      0|      }
 1218|      0|    }
 1219|  17.5k|  }
 1220|  17.6k|#endif
 1221|  17.6k|  if(data && data->conn && data->conn->send[sockindex])
  ------------------
  |  Branch (1221:6): [True: 17.6k, False: 0]
  |  Branch (1221:14): [True: 17.6k, False: 0]
  |  Branch (1221:28): [True: 17.6k, False: 0]
  ------------------
 1222|  17.6k|    return data->conn->send[sockindex](data, sockindex, buf, write_len, eos,
 1223|  17.6k|                                       pnwritten);
 1224|      0|  *pnwritten = 0;
 1225|      0|  return CURLE_FAILED_INIT;
 1226|  17.6k|}
cfilters.c:cf_bufq_reader:
  289|    205|{
  290|    205|  struct cf_io_ctx *io = writer_ctx;
  291|    205|  return Curl_conn_cf_recv(io->cf, io->data, (char *)buf, blen, pnread);
  292|    205|}
cfilters.c:cf_bufq_writer:
  314|    126|{
  315|    126|  struct cf_io_ctx *io = writer_ctx;
  316|       |  return Curl_conn_cf_send(io->cf, io->data, buf, buflen, FALSE, pnwritten);
  ------------------
  |  | 1058|    126|#define FALSE false
  ------------------
  317|    126|}
cfilters.c:cf_cntrl_update_info:
  496|  7.10k|{
  497|  7.10k|  cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
                cf_cntrl_all(conn, data, TRUE, CF_CTRL_CONN_INFO_UPDATE, 0, NULL);
  ------------------
  |  |  125|  7.10k|#define CF_CTRL_CONN_INFO_UPDATE (256 + 0) /* 0          NULL     ignored */
  ------------------
  498|  7.10k|}
cfilters.c:conn_report_connect_stats:
  505|  10.7k|{
  506|  10.7k|  if(cf) {
  ------------------
  |  Branch (506:6): [True: 10.7k, False: 0]
  ------------------
  507|  10.7k|    struct curltime connected;
  508|  10.7k|    struct curltime appconnected;
  509|       |
  510|  10.7k|    memset(&connected, 0, sizeof(connected));
  511|  10.7k|    cf->cft->query(cf, data, CF_QUERY_TIMER_CONNECT, NULL, &connected);
  ------------------
  |  |  168|  10.7k|#define CF_QUERY_TIMER_CONNECT      4  /* -          struct curltime */
  ------------------
  512|  10.7k|    if(connected.tv_sec || connected.tv_usec)
  ------------------
  |  Branch (512:8): [True: 10.0k, False: 737]
  |  Branch (512:28): [True: 0, False: 737]
  ------------------
  513|  10.0k|      Curl_pgrsTimeWas(data, TIMER_CONNECT, connected);
  514|       |
  515|  10.7k|    memset(&appconnected, 0, sizeof(appconnected));
  516|  10.7k|    cf->cft->query(cf, data, CF_QUERY_TIMER_APPCONNECT, NULL, &appconnected);
  ------------------
  |  |  169|  10.7k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  517|  10.7k|    if(appconnected.tv_sec || appconnected.tv_usec)
  ------------------
  |  Branch (517:8): [True: 0, False: 10.7k]
  |  Branch (517:31): [True: 0, False: 10.7k]
  ------------------
  518|      0|      Curl_pgrsTimeWas(data, TIMER_APPCONNECT, appconnected);
  519|  10.7k|  }
  520|  10.7k|}
cfilters.c:cf_verboseconnect:
  457|  7.10k|{
  458|  7.10k|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  319|  7.10k|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 7.10k, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 7.10k]
  |  |  ------------------
  |  |  320|  7.10k|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  459|      0|    struct ip_quadruple ipquad;
  460|      0|    bool is_ipv6;
  461|      0|    CURLcode result;
  462|       |
  463|      0|    result = Curl_conn_cf_get_ip_info(cf, data, &is_ipv6, &ipquad);
  464|      0|    if(result)
  ------------------
  |  Branch (464:8): [True: 0, False: 0]
  ------------------
  465|      0|      return result;
  466|       |
  467|      0|    infof(data, "Established %sconnection to %s (%s port %u) from %s port %u ",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  468|      0|          (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "",
  469|      0|          CURL_CONN_HOST_DISPNAME(data->conn),
  470|      0|          ipquad.remote_ip, ipquad.remote_port,
  471|      0|          ipquad.local_ip, ipquad.local_port);
  472|      0|  }
  473|  7.10k|  return CURLE_OK;
  474|  7.10k|}
cfilters.c:conn_remove_setup_filters:
  524|  7.10k|{
  525|  7.10k|  struct Curl_cfilter **anchor = &data->conn->cfilter[sockindex];
  526|  35.9k|  while(*anchor) {
  ------------------
  |  Branch (526:9): [True: 28.8k, False: 7.10k]
  ------------------
  527|  28.8k|    struct Curl_cfilter *cf = *anchor;
  528|  28.8k|    if(cf->connected && (cf->cft->flags & CF_TYPE_SETUP)) {
  ------------------
  |  |  211|  28.8k|#define CF_TYPE_SETUP       (1 << 5)
  ------------------
  |  Branch (528:8): [True: 28.8k, False: 0]
  |  Branch (528:25): [True: 21.6k, False: 7.18k]
  ------------------
  529|  21.6k|      *anchor = cf->next;
  530|  21.6k|      cf->next = NULL;
  531|  21.6k|      CURL_TRC_CF(data, cf, "removing connected setup filter");
  ------------------
  |  |  153|  21.6k|  do {                                          \
  |  |  154|  21.6k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  21.6k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  43.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 21.6k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 21.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  43.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  21.6k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  21.6k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  21.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 21.6k]
  |  |  ------------------
  ------------------
  532|  21.6k|      cf->cft->destroy(cf, data);
  533|  21.6k|      curlx_free(cf);
  ------------------
  |  | 1483|  21.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  534|  21.6k|    }
  535|  7.18k|    else
  536|  7.18k|      anchor = &cf->next;
  537|  28.8k|  }
  538|  7.10k|}
cfilters.c:cf_is_ssl:
  691|  32.7k|{
  692|  39.0k|  for(; cf; cf = cf->next) {
  ------------------
  |  Branch (692:9): [True: 39.0k, False: 0]
  ------------------
  693|       |    /* A tunneling proxy does not offer end2end encryption, even if
  694|       |     * it does SSL itself (e.g. QUIC H3 proxy) */
  695|  39.0k|    if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  207|  39.0k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                  if((cf->cft->flags & CF_TYPE_SSL) && !(cf->cft->flags & CF_TYPE_PROXY))
  ------------------
  |  |  209|      0|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (695:8): [True: 0, False: 39.0k]
  |  Branch (695:42): [True: 0, False: 0]
  ------------------
  696|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  697|  39.0k|    if(cf->cft->flags & CF_TYPE_IP_CONNECT)
  ------------------
  |  |  206|  39.0k|#define CF_TYPE_IP_CONNECT  (1 << 0)
  ------------------
  |  Branch (697:8): [True: 32.7k, False: 6.29k]
  ------------------
  698|  32.7k|      return FALSE;
  ------------------
  |  | 1058|  32.7k|#define FALSE false
  ------------------
  699|  39.0k|  }
  700|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  701|  32.7k|}
cfilters.c:cf_cntrl_all:
  481|  66.9k|{
  482|  66.9k|  CURLcode result = CURLE_OK;
  483|  66.9k|  size_t i;
  484|       |
  485|   200k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1294|   200k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (485:14): [True: 133k, False: 66.9k]
  ------------------
  486|   133k|    result = Curl_conn_cf_cntrl(conn->cfilter[i], data, ignore_result,
  487|   133k|                                event, arg1, arg2);
  488|   133k|    if(!ignore_result && result)
  ------------------
  |  Branch (488:8): [True: 42.6k, False: 91.3k]
  |  Branch (488:26): [True: 0, False: 42.6k]
  ------------------
  489|      0|      break;
  490|   133k|  }
  491|  66.9k|  return result;
  492|  66.9k|}

Curl_cpool_init:
  117|  15.3k|{
  118|  15.3k|  Curl_hash_init(&cpool->dest2bundle, size, Curl_hash_str,
  119|  15.3k|                 curlx_str_key_compare, cpool_bundle_free_entry);
  120|       |
  121|  15.3k|  DEBUGASSERT(idata);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 15.3k]
  |  Branch (121:3): [True: 15.3k, False: 0]
  ------------------
  122|       |
  123|  15.3k|  cpool->idata = idata;
  124|  15.3k|  cpool->share = share;
  125|       |  cpool->initialized = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  126|  15.3k|}
Curl_cpool_destroy:
  232|  15.3k|{
  233|  15.3k|  if(cpool && cpool->initialized && cpool->idata) {
  ------------------
  |  Branch (233:6): [True: 15.3k, False: 0]
  |  Branch (233:15): [True: 15.3k, False: 0]
  |  Branch (233:37): [True: 15.3k, False: 0]
  ------------------
  234|  15.3k|    struct connectdata *conn;
  235|  15.3k|    struct Curl_sigpipe_ctx pipe_ctx;
  236|       |
  237|  15.3k|    CURL_TRC_M(cpool->idata, "%s[CPOOL] destroy, %zu connections",
  ------------------
  |  |  148|  15.3k|  do {                                   \
  |  |  149|  15.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  15.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  15.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  30.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  30.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  15.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  15.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  238|  15.3k|               cpool->share ? "[SHARE] " : "", cpool->num_conn);
  239|       |    /* Move all connections to the shutdown list */
  240|  15.3k|    sigpipe_init(&pipe_ctx);
  241|  15.3k|    CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|  15.3k|  do {                                                                  \
  |  |   43|  15.3k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 15.3k, False: 0]
  |  |  ------------------
  |  |   44|  15.3k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  15.3k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 15.3k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  15.3k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  15.3k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  15.3k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  15.3k|#define TRUE true
  |  |  ------------------
  |  |   49|  15.3k|    }                                                                   \
  |  |   50|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  |  Branch (241:5): [True: 0, False: 15.3k]
  |  Branch (241:5): [True: 15.3k, False: 0]
  ------------------
  242|  15.3k|    conn = cpool_get_first(cpool);
  243|  15.3k|    if(conn)
  ------------------
  |  Branch (243:8): [True: 1.48k, False: 13.8k]
  ------------------
  244|  1.48k|      sigpipe_apply(cpool->idata, &pipe_ctx);
  245|  16.8k|    while(conn) {
  ------------------
  |  Branch (245:11): [True: 1.49k, False: 15.3k]
  ------------------
  246|  1.49k|      cpool_remove_conn(cpool, conn);
  247|  1.49k|      cpool_discard_conn(cpool, cpool->idata, conn, FALSE);
  ------------------
  |  | 1058|  1.49k|#define FALSE false
  ------------------
  248|  1.49k|      conn = cpool_get_first(cpool);
  249|  1.49k|    }
  250|  15.3k|    CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|  15.3k|  do {                                                                  \
  |  |   54|  15.3k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 15.3k, False: 0]
  |  |  ------------------
  |  |   55|  15.3k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  15.3k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  15.3k|#define FALSE false
  |  |  ------------------
  |  |   57|  15.3k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  15.3k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 15.3k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  15.3k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  15.3k|    }                                                                   \
  |  |   60|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  |  Branch (250:5): [True: 0, False: 15.3k]
  |  Branch (250:5): [True: 15.3k, False: 0]
  ------------------
  251|  15.3k|    sigpipe_restore(&pipe_ctx);
  252|  15.3k|    Curl_hash_destroy(&cpool->dest2bundle);
  253|  15.3k|  }
  254|  15.3k|}
Curl_cpool_xfer_init:
  270|  16.1k|{
  271|  16.1k|  struct cpool *cpool = cpool_get_instance(data);
  272|       |
  273|  16.1k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 16.1k]
  |  Branch (273:3): [True: 16.1k, False: 0]
  ------------------
  274|  16.1k|  if(cpool) {
  ------------------
  |  Branch (274:6): [True: 16.1k, False: 0]
  ------------------
  275|  16.1k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  16.1k|  do {                                                                  \
  |  |   43|  16.1k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 16.1k, False: 0]
  |  |  ------------------
  |  |   44|  16.1k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  16.1k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 16.1k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  16.1k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  16.1k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  16.1k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  16.1k|#define TRUE true
  |  |  ------------------
  |  |   49|  16.1k|    }                                                                   \
  |  |   50|  16.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  |  Branch (275:5): [True: 0, False: 16.1k]
  |  Branch (275:5): [True: 16.1k, False: 0]
  ------------------
  276|       |    /* the identifier inside the connection cache */
  277|  16.1k|    data->id = cpool->next_easy_id++;
  278|  16.1k|    if(cpool->next_easy_id <= 0)
  ------------------
  |  Branch (278:8): [True: 0, False: 16.1k]
  ------------------
  279|      0|      cpool->next_easy_id = 0;
  280|  16.1k|    data->state.lastconnect_id = -1;
  281|       |
  282|  16.1k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  16.1k|  do {                                                                  \
  |  |   54|  16.1k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 16.1k, False: 0]
  |  |  ------------------
  |  |   55|  16.1k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  16.1k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  16.1k|#define FALSE false
  |  |  ------------------
  |  |   57|  16.1k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  16.1k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 16.1k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  16.1k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  16.1k|    }                                                                   \
  |  |   60|  16.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  |  Branch (282:5): [True: 0, False: 16.1k]
  |  Branch (282:5): [True: 16.1k, False: 0]
  ------------------
  283|  16.1k|  }
  284|      0|  else {
  285|       |    /* We should not get here, but in a non-debug build, do something */
  286|      0|    data->id = 0;
  287|      0|    data->state.lastconnect_id = -1;
  288|      0|  }
  289|  16.1k|}
Curl_cpool_check_limits:
  372|  11.0k|{
  373|  11.0k|  struct cpool *cpool = cpool_get_instance(data);
  374|  11.0k|  struct cpool_bundle *bundle;
  375|  11.0k|  size_t dest_limit = 0;
  376|  11.0k|  size_t total_limit = 0;
  377|  11.0k|  size_t shutdowns;
  378|  11.0k|  int res = CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  11.0k|#define CPOOL_LIMIT_OK     0
  ------------------
  379|       |
  380|  11.0k|  if(!cpool)
  ------------------
  |  Branch (380:6): [True: 0, False: 11.0k]
  ------------------
  381|      0|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|      0|#define CPOOL_LIMIT_OK     0
  ------------------
  382|       |
  383|  11.0k|  if(cpool->idata->multi) {
  ------------------
  |  Branch (383:6): [True: 11.0k, False: 0]
  ------------------
  384|  11.0k|    dest_limit = cpool->idata->multi->max_host_connections;
  385|  11.0k|    total_limit = cpool->idata->multi->max_total_connections;
  386|  11.0k|  }
  387|       |
  388|  11.0k|  if(!dest_limit && !total_limit)
  ------------------
  |  Branch (388:6): [True: 11.0k, False: 0]
  |  Branch (388:21): [True: 11.0k, False: 0]
  ------------------
  389|  11.0k|    return CPOOL_LIMIT_OK;
  ------------------
  |  |   90|  11.0k|#define CPOOL_LIMIT_OK     0
  ------------------
  390|       |
  391|      0|  CPOOL_LOCK(cpool, cpool->idata);
  ------------------
  |  |   42|      0|  do {                                                                  \
  |  |   43|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      0|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (391:3): [True: 0, False: 0]
  |  Branch (391:3): [True: 0, False: 0]
  ------------------
  392|      0|  if(dest_limit) {
  ------------------
  |  Branch (392:6): [True: 0, False: 0]
  ------------------
  393|      0|    size_t live;
  394|       |
  395|      0|    bundle = cpool_find_bundle(cpool, conn);
  396|      0|    live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (396:12): [True: 0, False: 0]
  ------------------
  397|      0|    shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
  398|      0|    while((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (398:11): [True: 0, False: 0]
  ------------------
  399|      0|      if(shutdowns) {
  ------------------
  |  Branch (399:10): [True: 0, False: 0]
  ------------------
  400|       |        /* close one connection in shutdown right away, if we can */
  401|      0|        if(!Curl_cshutdn_close_oldest(data, conn->destination))
  ------------------
  |  Branch (401:12): [True: 0, False: 0]
  ------------------
  402|      0|          break;
  403|      0|      }
  404|      0|      else if(!bundle)
  ------------------
  |  Branch (404:15): [True: 0, False: 0]
  ------------------
  405|      0|        break;
  406|      0|      else {
  407|      0|        struct connectdata *oldest_idle = NULL;
  408|       |        /* The bundle is full. Extract the oldest connection that may
  409|       |         * be removed now, if there is one. */
  410|      0|        oldest_idle = cpool_bundle_get_oldest_idle(bundle,
  411|      0|                                                   Curl_pgrs_now(data));
  412|      0|        if(!oldest_idle)
  ------------------
  |  Branch (412:12): [True: 0, False: 0]
  ------------------
  413|      0|          break;
  414|       |        /* disconnect the old conn and continue */
  415|      0|        CURL_TRC_M(data, "Discarding connection #%" FMT_OFF_T
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  416|      0|                   " from %zu to reach destination limit of %zu",
  417|      0|                   oldest_idle->connection_id,
  418|      0|                   Curl_llist_count(&bundle->conns), dest_limit);
  419|      0|        Curl_conn_terminate(cpool->idata, oldest_idle, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  420|       |
  421|       |        /* in case the bundle was destroyed in disconnect, look it up again */
  422|      0|        bundle = cpool_find_bundle(cpool, conn);
  423|      0|        live = bundle ? Curl_llist_count(&bundle->conns) : 0;
  ------------------
  |  Branch (423:16): [True: 0, False: 0]
  ------------------
  424|      0|      }
  425|      0|      shutdowns = Curl_cshutdn_dest_count(cpool->idata, conn->destination);
  426|      0|    }
  427|      0|    if((live + shutdowns) >= dest_limit) {
  ------------------
  |  Branch (427:8): [True: 0, False: 0]
  ------------------
  428|      0|      res = CPOOL_LIMIT_DEST;
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  429|      0|      goto out;
  430|      0|    }
  431|      0|  }
  432|       |
  433|      0|  if(total_limit) {
  ------------------
  |  Branch (433:6): [True: 0, False: 0]
  ------------------
  434|      0|    shutdowns = Curl_cshutdn_count(cpool->idata);
  435|      0|    while((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (435:11): [True: 0, False: 0]
  ------------------
  436|      0|      if(shutdowns) {
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|       |        /* close one connection in shutdown right away, if we can */
  438|      0|        if(!Curl_cshutdn_close_oldest(data, NULL))
  ------------------
  |  Branch (438:12): [True: 0, False: 0]
  ------------------
  439|      0|          break;
  440|      0|      }
  441|      0|      else {
  442|      0|        struct connectdata *oldest_idle =
  443|      0|          cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  444|      0|        if(!oldest_idle)
  ------------------
  |  Branch (444:12): [True: 0, False: 0]
  ------------------
  445|      0|          break;
  446|       |        /* disconnect the old conn and continue */
  447|      0|        CURL_TRC_M(data, "Discarding connection #%"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  448|      0|                   FMT_OFF_T " from %zu to reach total "
  449|      0|                   "limit of %zu",
  450|      0|                   oldest_idle->connection_id, cpool->num_conn, total_limit);
  451|      0|        Curl_conn_terminate(cpool->idata, oldest_idle, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  452|      0|      }
  453|      0|      shutdowns = Curl_cshutdn_count(cpool->idata);
  454|      0|    }
  455|      0|    if((cpool->num_conn + shutdowns) >= total_limit) {
  ------------------
  |  Branch (455:8): [True: 0, False: 0]
  ------------------
  456|      0|      res = CPOOL_LIMIT_TOTAL;
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  457|      0|      goto out;
  458|      0|    }
  459|      0|  }
  460|       |
  461|      0|out:
  462|      0|  CPOOL_UNLOCK(cpool, cpool->idata);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   57|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (462:3): [True: 0, False: 0]
  |  Branch (462:3): [True: 0, False: 0]
  ------------------
  463|      0|  return res;
  464|      0|}
Curl_cpool_add:
  468|  11.0k|{
  469|  11.0k|  CURLcode result = CURLE_OK;
  470|  11.0k|  struct cpool_bundle *bundle = NULL;
  471|  11.0k|  struct cpool *cpool = cpool_get_instance(data);
  472|  11.0k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (472:3): [True: 0, False: 11.0k]
  |  Branch (472:3): [True: 11.0k, False: 0]
  ------------------
  473|       |
  474|  11.0k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (474:3): [True: 0, False: 11.0k]
  |  Branch (474:3): [True: 11.0k, False: 0]
  ------------------
  475|  11.0k|  if(!cpool)
  ------------------
  |  Branch (475:6): [True: 0, False: 11.0k]
  ------------------
  476|      0|    return CURLE_FAILED_INIT;
  477|       |
  478|  11.0k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  11.0k|  do {                                                                  \
  |  |   43|  11.0k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 11.0k, False: 0]
  |  |  ------------------
  |  |   44|  11.0k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  11.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 11.0k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  11.0k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  11.0k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  11.0k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  11.0k|#define TRUE true
  |  |  ------------------
  |  |   49|  11.0k|    }                                                                   \
  |  |   50|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  |  Branch (478:3): [True: 0, False: 11.0k]
  |  Branch (478:3): [True: 11.0k, False: 0]
  ------------------
  479|  11.0k|  bundle = cpool_find_bundle(cpool, conn);
  480|  11.0k|  if(!bundle) {
  ------------------
  |  Branch (480:6): [True: 10.9k, False: 34]
  ------------------
  481|  10.9k|    bundle = cpool_add_bundle(cpool, conn);
  482|  10.9k|    if(!bundle) {
  ------------------
  |  Branch (482:8): [True: 0, False: 10.9k]
  ------------------
  483|      0|      result = CURLE_OUT_OF_MEMORY;
  484|      0|      goto out;
  485|      0|    }
  486|  10.9k|  }
  487|       |
  488|  11.0k|  cpool_bundle_add(bundle, conn);
  489|  11.0k|  conn->connection_id = cpool->next_connection_id++;
  490|  11.0k|  cpool->num_conn++;
  491|  11.0k|  CURL_TRC_M(data, "[CPOOL] added connection %" FMT_OFF_T ". "
  ------------------
  |  |  148|  11.0k|  do {                                   \
  |  |  149|  11.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  492|  11.0k|             "The cache now contains %zu members",
  493|  11.0k|             conn->connection_id, cpool->num_conn);
  494|  11.0k|out:
  495|  11.0k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  11.0k|  do {                                                                  \
  |  |   54|  11.0k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 11.0k, False: 0]
  |  |  ------------------
  |  |   55|  11.0k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  11.0k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  11.0k|#define FALSE false
  |  |  ------------------
  |  |   57|  11.0k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  11.0k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 11.0k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  11.0k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  11.0k|    }                                                                   \
  |  |   60|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  |  Branch (495:3): [True: 0, False: 11.0k]
  |  Branch (495:3): [True: 11.0k, False: 0]
  ------------------
  496|       |
  497|  11.0k|  return result;
  498|  11.0k|}
Curl_cpool_conn_now_idle:
  555|  11.8k|{
  556|  11.8k|  unsigned int maxconnects;
  557|  11.8k|  struct connectdata *oldest_idle = NULL;
  558|  11.8k|  struct cpool *cpool = cpool_get_instance(data);
  559|  11.8k|  bool kept = TRUE;
  ------------------
  |  | 1055|  11.8k|#define TRUE true
  ------------------
  560|       |
  561|  11.8k|  if(!data || !data->multi)
  ------------------
  |  Branch (561:6): [True: 0, False: 11.8k]
  |  Branch (561:15): [True: 0, False: 11.8k]
  ------------------
  562|      0|    return kept;
  563|       |
  564|  11.8k|  if(!data->multi->maxconnects) {
  ------------------
  |  Branch (564:6): [True: 11.8k, False: 0]
  ------------------
  565|  11.8k|    unsigned int running = Curl_multi_xfers_running(data->multi);
  566|  11.8k|    maxconnects = (running <= UINT_MAX / 4) ? running * 4 : UINT_MAX;
  ------------------
  |  Branch (566:19): [True: 11.8k, False: 0]
  ------------------
  567|  11.8k|  }
  568|      0|  else {
  569|      0|    maxconnects = data->multi->maxconnects;
  570|      0|  }
  571|       |
  572|  11.8k|  conn->lastused = *Curl_pgrs_now(data); /* it was used up until now */
  573|  11.8k|  if(cpool && maxconnects) {
  ------------------
  |  Branch (573:6): [True: 11.8k, False: 0]
  |  Branch (573:15): [True: 11.8k, False: 0]
  ------------------
  574|       |    /* may be called form a callback already under lock */
  575|  11.8k|    bool do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  11.8k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 11.8k, False: 0]
  |  |  |  Branch (39:39): [True: 11.8k, False: 0]
  |  |  ------------------
  ------------------
  576|  11.8k|    if(do_lock)
  ------------------
  |  Branch (576:8): [True: 0, False: 11.8k]
  ------------------
  577|      0|      CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|      0|  do {                                                                  \
  |  |   43|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   44|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|      0|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|      0|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|      0|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   49|      0|    }                                                                   \
  |  |   50|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (577:7): [True: 0, False: 0]
  |  Branch (577:7): [True: 0, False: 0]
  ------------------
  578|  11.8k|    if(cpool->num_conn > maxconnects) {
  ------------------
  |  Branch (578:8): [True: 0, False: 11.8k]
  ------------------
  579|      0|      infof(data, "Connection pool is full, closing the oldest of %zu/%u",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  580|      0|            cpool->num_conn, maxconnects);
  581|       |
  582|      0|      oldest_idle = cpool_get_oldest_idle(cpool, Curl_pgrs_now(data));
  583|      0|      kept = (oldest_idle != conn);
  584|      0|      if(oldest_idle) {
  ------------------
  |  Branch (584:10): [True: 0, False: 0]
  ------------------
  585|      0|        Curl_conn_terminate(data, oldest_idle, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  586|      0|      }
  587|      0|    }
  588|  11.8k|    if(do_lock)
  ------------------
  |  Branch (588:8): [True: 0, False: 11.8k]
  ------------------
  589|      0|      CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|      0|  do {                                                                  \
  |  |   54|      0|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   55|      0|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|      0|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   57|      0|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|      0|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|      0|    }                                                                   \
  |  |   60|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (589:7): [True: 0, False: 0]
  |  Branch (589:7): [True: 0, False: 0]
  ------------------
  590|  11.8k|  }
  591|       |
  592|  11.8k|  return kept;
  593|  11.8k|}
Curl_cpool_find:
  600|  21.4k|{
  601|  21.4k|  struct cpool *cpool = cpool_get_instance(data);
  602|  21.4k|  struct cpool_bundle *bundle;
  603|  21.4k|  bool found = FALSE;
  ------------------
  |  | 1058|  21.4k|#define FALSE false
  ------------------
  604|       |
  605|  21.4k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  21.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (605:3): [True: 0, False: 21.4k]
  |  Branch (605:3): [True: 21.4k, False: 0]
  ------------------
  606|  21.4k|  DEBUGASSERT(conn_cb);
  ------------------
  |  | 1081|  21.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (606:3): [True: 0, False: 21.4k]
  |  Branch (606:3): [True: 21.4k, False: 0]
  ------------------
  607|  21.4k|  if(!cpool)
  ------------------
  |  Branch (607:6): [True: 0, False: 21.4k]
  ------------------
  608|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  609|       |
  610|  21.4k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  21.4k|  do {                                                                  \
  |  |   43|  21.4k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 21.4k, False: 0]
  |  |  ------------------
  |  |   44|  21.4k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  21.4k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 21.4k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  21.4k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  21.4k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  21.4k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  21.4k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  21.4k|#define TRUE true
  |  |  ------------------
  |  |   49|  21.4k|    }                                                                   \
  |  |   50|  21.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  |  Branch (610:3): [True: 0, False: 21.4k]
  |  Branch (610:3): [True: 21.4k, False: 0]
  ------------------
  611|  21.4k|  bundle = Curl_hash_pick(&cpool->dest2bundle,
  612|  21.4k|                          CURL_UNCONST(destination),
  ------------------
  |  |  866|  21.4k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  613|  21.4k|                          strlen(destination) + 1);
  614|  21.4k|  if(bundle) {
  ------------------
  |  Branch (614:6): [True: 10.5k, False: 10.9k]
  ------------------
  615|  10.5k|    struct Curl_llist_node *curr = Curl_llist_head(&bundle->conns);
  616|  10.8k|    while(curr) {
  ------------------
  |  Branch (616:11): [True: 10.5k, False: 264]
  ------------------
  617|  10.5k|      struct connectdata *conn = Curl_node_elem(curr);
  618|       |      /* Get next node now. callback might discard current */
  619|  10.5k|      curr = Curl_node_next(curr);
  620|       |
  621|  10.5k|      if(conn_cb(conn, userdata)) {
  ------------------
  |  Branch (621:10): [True: 10.2k, False: 273]
  ------------------
  622|  10.2k|        found = TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  623|  10.2k|        break;
  624|  10.2k|      }
  625|  10.5k|    }
  626|  10.5k|  }
  627|       |
  628|  21.4k|  if(done_cb) {
  ------------------
  |  Branch (628:6): [True: 21.4k, False: 0]
  ------------------
  629|  21.4k|    found = done_cb(userdata);
  630|  21.4k|  }
  631|  21.4k|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  21.4k|  do {                                                                  \
  |  |   54|  21.4k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 21.4k, False: 0]
  |  |  ------------------
  |  |   55|  21.4k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  21.4k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  21.4k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  21.4k|#define FALSE false
  |  |  ------------------
  |  |   57|  21.4k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  21.4k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 21.4k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  21.4k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  21.4k|    }                                                                   \
  |  |   60|  21.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 21.4k]
  |  |  ------------------
  ------------------
  |  Branch (631:3): [True: 0, False: 21.4k]
  |  Branch (631:3): [True: 21.4k, False: 0]
  ------------------
  632|  21.4k|  return found;
  633|  21.4k|}
Curl_conn_terminate:
  638|  9.53k|{
  639|  9.53k|  struct cpool *cpool = cpool_get_instance(data);
  640|  9.53k|  bool do_lock;
  641|       |
  642|  9.53k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  9.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (642:3): [True: 0, False: 9.53k]
  |  Branch (642:3): [True: 9.53k, False: 0]
  ------------------
  643|  9.53k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1081|  9.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (643:3): [True: 0, False: 9.53k]
  |  Branch (643:3): [True: 0, False: 0]
  |  Branch (643:3): [True: 9.53k, False: 0]
  |  Branch (643:3): [True: 9.53k, False: 0]
  ------------------
  644|  9.53k|  if(!cpool)
  ------------------
  |  Branch (644:6): [True: 0, False: 9.53k]
  ------------------
  645|      0|    return;
  646|       |
  647|       |  /* If this connection is not marked to force-close, leave it open if there
  648|       |   * are other users of it */
  649|  9.53k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  346|  19.0k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 9.53k]
  |  |  ------------------
  ------------------
  |  Branch (649:26): [True: 0, False: 0]
  ------------------
  650|      0|    DEBUGASSERT(0); /* does this ever happen? */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (650:5): [Folded, False: 0]
  |  Branch (650:5): [Folded, False: 0]
  ------------------
  651|      0|    DEBUGF(infof(data, "conn terminate when inuse: %u", conn->attached_xfers));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  652|      0|    return;
  653|      0|  }
  654|       |
  655|       |  /* This method may be called while we are under lock, e.g. from a
  656|       |   * user callback in find. */
  657|  9.53k|  do_lock = !CPOOL_IS_LOCKED(cpool);
  ------------------
  |  |   39|  9.53k|#define CPOOL_IS_LOCKED(c)    ((c) && (c)->locked)
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 9.53k, False: 0]
  |  |  |  Branch (39:39): [True: 9.48k, False: 49]
  |  |  ------------------
  ------------------
  658|  9.53k|  if(do_lock)
  ------------------
  |  Branch (658:6): [True: 49, False: 9.48k]
  ------------------
  659|     49|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|     49|  do {                                                                  \
  |  |   43|     49|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 49, False: 0]
  |  |  ------------------
  |  |   44|     49|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     49|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 49]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|     49|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|     49|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|     49|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|     49|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|     49|#define TRUE true
  |  |  ------------------
  |  |   49|     49|    }                                                                   \
  |  |   50|     49|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 49]
  |  |  ------------------
  ------------------
  |  Branch (659:5): [True: 0, False: 49]
  |  Branch (659:5): [True: 49, False: 0]
  ------------------
  660|       |
  661|  9.53k|  if(conn->bits.in_cpool) {
  ------------------
  |  Branch (661:6): [True: 9.53k, False: 0]
  ------------------
  662|  9.53k|    cpool_remove_conn(cpool, conn);
  663|  9.53k|    DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1081|  9.53k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (663:5): [True: 0, False: 9.53k]
  |  Branch (663:5): [True: 9.53k, False: 0]
  ------------------
  664|  9.53k|  }
  665|       |
  666|       |  /* treat the connection as aborted in CONNECT_ONLY situations,
  667|       |   * so no graceful shutdown is attempted. */
  668|  9.53k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (668:6): [True: 59, False: 9.47k]
  ------------------
  669|     59|    aborted = TRUE;
  ------------------
  |  | 1055|     59|#define TRUE true
  ------------------
  670|       |
  671|  9.53k|  if(data->multi) {
  ------------------
  |  Branch (671:6): [True: 9.53k, False: 0]
  ------------------
  672|       |    /* Add it to the multi's cpool for shutdown handling */
  673|  9.53k|    infof(data, "%s connection #%" FMT_OFF_T,
  ------------------
  |  |  143|  9.53k|  do {                               \
  |  |  144|  9.53k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  9.53k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 9.53k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.53k]
  |  |  |  |  ------------------
  |  |  |  |  320|  9.53k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  9.53k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  9.53k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 9.53k]
  |  |  ------------------
  ------------------
  674|  9.53k|          aborted ? "closing" : "shutting down", conn->connection_id);
  675|  9.53k|    cpool_discard_conn(&data->multi->cpool, data, conn, aborted);
  676|  9.53k|  }
  677|      0|  else {
  678|       |    /* No multi available, terminate */
  679|      0|    infof(data, "closing connection #%" FMT_OFF_T, conn->connection_id);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  680|      0|    Curl_cshutdn_terminate(cpool->idata, conn, !aborted);
  681|      0|  }
  682|       |
  683|  9.53k|  if(do_lock)
  ------------------
  |  Branch (683:6): [True: 49, False: 9.48k]
  ------------------
  684|       |    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|     49|  do {                                                                  \
  |  |   54|     49|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 49, False: 0]
  |  |  ------------------
  |  |   55|     49|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|     49|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|     49|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|     49|#define FALSE false
  |  |  ------------------
  |  |   57|     49|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     49|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 49]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     49|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|     49|    }                                                                   \
  |  |   60|     49|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 49]
  |  |  ------------------
  ------------------
  |  Branch (684:5): [True: 0, False: 49]
  |  Branch (684:5): [True: 49, False: 0]
  ------------------
  685|  9.53k|}
Curl_cpool_prune_dead:
  719|  21.5k|{
  720|  21.5k|  struct cpool *cpool = cpool_get_instance(data);
  721|  21.5k|  struct cpool_reaper_ctx reaper;
  722|  21.5k|  timediff_t elapsed;
  723|       |
  724|  21.5k|  if(!cpool)
  ------------------
  |  Branch (724:6): [True: 0, False: 21.5k]
  ------------------
  725|      0|    return;
  726|       |
  727|  21.5k|  memset(&reaper, 0, sizeof(reaper));
  728|  21.5k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  21.5k|  do {                                                                  \
  |  |   43|  21.5k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 21.5k, False: 0]
  |  |  ------------------
  |  |   44|  21.5k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  21.5k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 21.5k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  21.5k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  21.5k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  21.5k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  21.5k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  21.5k|#define TRUE true
  |  |  ------------------
  |  |   49|  21.5k|    }                                                                   \
  |  |   50|  21.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
  |  Branch (728:3): [True: 0, False: 21.5k]
  |  Branch (728:3): [True: 21.5k, False: 0]
  ------------------
  729|  21.5k|  elapsed = curlx_ptimediff_ms(Curl_pgrs_now(data), &cpool->last_cleanup);
  730|       |
  731|  21.5k|  if(elapsed >= 1000L) {
  ------------------
  |  Branch (731:6): [True: 10.3k, False: 11.1k]
  ------------------
  732|  10.3k|    while(cpool_foreach(data, cpool, &reaper, cpool_reap_dead_cb))
  ------------------
  |  Branch (732:11): [True: 0, False: 10.3k]
  ------------------
  733|      0|      ;
  734|  10.3k|    cpool->last_cleanup = *Curl_pgrs_now(data);
  735|  10.3k|  }
  736|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  21.5k|  do {                                                                  \
  |  |   54|  21.5k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 21.5k, False: 0]
  |  |  ------------------
  |  |   55|  21.5k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  21.5k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  21.5k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  21.5k|#define FALSE false
  |  |  ------------------
  |  |   57|  21.5k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  21.5k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 21.5k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  21.5k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  21.5k|    }                                                                   \
  |  |   60|  21.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
  |  Branch (736:3): [True: 0, False: 21.5k]
  |  Branch (736:3): [True: 21.5k, False: 0]
  ------------------
  737|  21.5k|}
Curl_cpool_get_conn:
  780|     49|{
  781|     49|  struct cpool *cpool = cpool_get_instance(data);
  782|     49|  struct cpool_find_ctx fctx;
  783|       |
  784|     49|  if(!cpool)
  ------------------
  |  Branch (784:6): [True: 0, False: 49]
  ------------------
  785|      0|    return NULL;
  786|     49|  fctx.id = conn_id;
  787|     49|  fctx.conn = NULL;
  788|     49|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|     49|  do {                                                                  \
  |  |   43|     49|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 49, False: 0]
  |  |  ------------------
  |  |   44|     49|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     49|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 49]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|     49|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|     49|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|     49|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|     49|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|     49|#define TRUE true
  |  |  ------------------
  |  |   49|     49|    }                                                                   \
  |  |   50|     49|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 49]
  |  |  ------------------
  ------------------
  |  Branch (788:3): [True: 0, False: 49]
  |  Branch (788:3): [True: 49, False: 0]
  ------------------
  789|     49|  cpool_foreach(data, cpool, &fctx, cpool_find_conn);
  790|     49|  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|     49|  do {                                                                  \
  |  |   54|     49|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 49, False: 0]
  |  |  ------------------
  |  |   55|     49|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|     49|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|     49|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|     49|#define FALSE false
  |  |  ------------------
  |  |   57|     49|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|     49|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 49]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     49|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|     49|    }                                                                   \
  |  |   60|     49|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 49]
  |  |  ------------------
  ------------------
  |  Branch (790:3): [True: 0, False: 49]
  |  Branch (790:3): [True: 49, False: 0]
  ------------------
  791|     49|  return fctx.conn;
  792|     49|}
Curl_cpool_do_by_id:
  814|  2.52k|{
  815|  2.52k|  struct cpool *cpool = cpool_get_instance(data);
  816|  2.52k|  struct cpool_do_conn_ctx dctx;
  817|       |
  818|  2.52k|  if(!cpool)
  ------------------
  |  Branch (818:6): [True: 0, False: 2.52k]
  ------------------
  819|      0|    return;
  820|  2.52k|  dctx.id = conn_id;
  821|  2.52k|  dctx.cb = cb;
  822|  2.52k|  dctx.cbdata = cbdata;
  823|  2.52k|  CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  2.52k|  do {                                                                  \
  |  |   43|  2.52k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 2.52k, False: 0]
  |  |  ------------------
  |  |   44|  2.52k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  2.52k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2.52k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  2.52k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  2.52k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  2.52k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  2.52k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  2.52k|#define TRUE true
  |  |  ------------------
  |  |   49|  2.52k|    }                                                                   \
  |  |   50|  2.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 2.52k]
  |  |  ------------------
  ------------------
  |  Branch (823:3): [True: 0, False: 2.52k]
  |  Branch (823:3): [True: 2.52k, False: 0]
  ------------------
  824|  2.52k|  cpool_foreach(data, cpool, &dctx, cpool_do_conn);
  825|       |  CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  2.52k|  do {                                                                  \
  |  |   54|  2.52k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 2.52k, False: 0]
  |  |  ------------------
  |  |   55|  2.52k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  2.52k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  2.52k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  2.52k|#define FALSE false
  |  |  ------------------
  |  |   57|  2.52k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  2.52k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 2.52k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  2.52k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  2.52k|    }                                                                   \
  |  |   60|  2.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 2.52k]
  |  |  ------------------
  ------------------
  |  Branch (825:3): [True: 0, False: 2.52k]
  |  Branch (825:3): [True: 2.52k, False: 0]
  ------------------
  826|  2.52k|}
Curl_cpool_do_locked:
  831|  21.3k|{
  832|  21.3k|  struct cpool *cpool = cpool_get_instance(data);
  833|  21.3k|  if(cpool) {
  ------------------
  |  Branch (833:6): [True: 21.3k, False: 0]
  ------------------
  834|  21.3k|    CPOOL_LOCK(cpool, data);
  ------------------
  |  |   42|  21.3k|  do {                                                                  \
  |  |   43|  21.3k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (43:8): [True: 21.3k, False: 0]
  |  |  ------------------
  |  |   44|  21.3k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  21.3k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 21.3k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   45|  21.3k|        Curl_share_lock((d), CURL_LOCK_DATA_CONNECT,                    \
  |  |   46|      0|                        CURL_LOCK_ACCESS_SINGLE);                       \
  |  |   47|  21.3k|      DEBUGASSERT(!(c)->locked);                                        \
  |  |  ------------------
  |  |  |  | 1081|  21.3k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   48|  21.3k|      (c)->locked = TRUE;                                               \
  |  |  ------------------
  |  |  |  | 1055|  21.3k|#define TRUE true
  |  |  ------------------
  |  |   49|  21.3k|    }                                                                   \
  |  |   50|  21.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (50:11): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  |  Branch (834:5): [True: 0, False: 21.3k]
  |  Branch (834:5): [True: 21.3k, False: 0]
  ------------------
  835|  21.3k|    cb(conn, data, cbdata);
  836|  21.3k|    CPOOL_UNLOCK(cpool, data);
  ------------------
  |  |   53|  21.3k|  do {                                                                  \
  |  |   54|  21.3k|    if(c) {                                                             \
  |  |  ------------------
  |  |  |  Branch (54:8): [True: 21.3k, False: 0]
  |  |  ------------------
  |  |   55|  21.3k|      DEBUGASSERT((c)->locked);                                         \
  |  |  ------------------
  |  |  |  | 1081|  21.3k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |   56|  21.3k|      (c)->locked = FALSE;                                              \
  |  |  ------------------
  |  |  |  | 1058|  21.3k|#define FALSE false
  |  |  ------------------
  |  |   57|  21.3k|      if(CURL_SHARE_KEEP_CONNECT((c)->share))                           \
  |  |  ------------------
  |  |  |  |   41|  21.3k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (41:4): [True: 0, False: 21.3k]
  |  |  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  21.3k|        Curl_share_unlock((d), CURL_LOCK_DATA_CONNECT);                 \
  |  |   59|  21.3k|    }                                                                   \
  |  |   60|  21.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (60:11): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  |  Branch (836:5): [True: 0, False: 21.3k]
  |  Branch (836:5): [True: 21.3k, False: 0]
  ------------------
  837|  21.3k|  }
  838|      0|  else
  839|      0|    cb(conn, data, cbdata);
  840|  21.3k|}
conncache.c:cpool_bundle_free_entry:
  109|  10.9k|{
  110|  10.9k|  cpool_bundle_destroy((struct cpool_bundle *)freethis);
  111|  10.9k|}
conncache.c:cpool_bundle_destroy:
   84|  10.9k|{
   85|  10.9k|  DEBUGASSERT(!Curl_llist_count(&bundle->conns));
  ------------------
  |  | 1081|  10.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 10.9k]
  |  Branch (85:3): [True: 10.9k, False: 0]
  ------------------
   86|  10.9k|  curlx_free(bundle);
  ------------------
  |  | 1483|  10.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   87|  10.9k|}
conncache.c:cpool_get_first:
  130|  16.8k|{
  131|  16.8k|  struct Curl_hash_iterator iter;
  132|  16.8k|  struct Curl_hash_element *he;
  133|  16.8k|  struct cpool_bundle *bundle;
  134|  16.8k|  struct Curl_llist_node *conn_node;
  135|       |
  136|  16.8k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  137|  16.8k|  for(he = Curl_hash_next_element(&iter); he;
  ------------------
  |  Branch (137:43): [True: 1.49k, False: 15.3k]
  ------------------
  138|  16.8k|      he = Curl_hash_next_element(&iter)) {
  139|  1.49k|    bundle = he->ptr;
  140|  1.49k|    conn_node = Curl_llist_head(&bundle->conns);
  141|  1.49k|    if(conn_node)
  ------------------
  |  Branch (141:8): [True: 1.49k, False: 0]
  ------------------
  142|  1.49k|      return Curl_node_elem(conn_node);
  143|  1.49k|  }
  144|  15.3k|  return NULL;
  145|  16.8k|}
conncache.c:cpool_remove_conn:
  164|  11.0k|{
  165|  11.0k|  struct Curl_llist *list = Curl_node_llist(&conn->cpool_node);
  166|  11.0k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 11.0k]
  |  Branch (166:3): [True: 11.0k, False: 0]
  ------------------
  167|  11.0k|  if(list) {
  ------------------
  |  Branch (167:6): [True: 11.0k, False: 0]
  ------------------
  168|       |    /* The connection is certainly in the pool, but where? */
  169|  11.0k|    struct cpool_bundle *bundle = cpool_find_bundle(cpool, conn);
  170|  11.0k|    if(bundle && (list == &bundle->conns)) {
  ------------------
  |  Branch (170:8): [True: 11.0k, False: 0]
  |  Branch (170:18): [True: 11.0k, False: 0]
  ------------------
  171|  11.0k|      cpool_bundle_remove(bundle, conn);
  172|  11.0k|      if(!Curl_llist_count(&bundle->conns))
  ------------------
  |  Branch (172:10): [True: 10.9k, False: 34]
  ------------------
  173|  10.9k|        cpool_remove_bundle(cpool, bundle);
  174|  11.0k|      conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  175|  11.0k|      cpool->num_conn--;
  176|  11.0k|    }
  177|      0|    else {
  178|       |      /* Should have been in the bundle list */
  179|       |      DEBUGASSERT(NULL);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:7): [True: 0, False: 0]
  |  Branch (179:7): [True: 0, False: 0]
  ------------------
  180|      0|    }
  181|  11.0k|  }
  182|  11.0k|}
conncache.c:cpool_bundle_remove:
  101|  11.0k|{
  102|  11.0k|  (void)bundle;
  103|  11.0k|  DEBUGASSERT(Curl_node_llist(&conn->cpool_node) == &bundle->conns);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (103:3): [True: 0, False: 11.0k]
  |  Branch (103:3): [True: 11.0k, False: 0]
  ------------------
  104|  11.0k|  Curl_node_remove(&conn->cpool_node);
  105|       |  conn->bits.in_cpool = FALSE;
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  106|  11.0k|}
conncache.c:cpool_remove_bundle:
  156|  10.9k|{
  157|  10.9k|  if(!cpool)
  ------------------
  |  Branch (157:6): [True: 0, False: 10.9k]
  ------------------
  158|      0|    return;
  159|  10.9k|  Curl_hash_delete(&cpool->dest2bundle, bundle->dest, bundle->dest_len);
  160|  10.9k|}
conncache.c:cpool_discard_conn:
  188|  11.0k|{
  189|  11.0k|  bool done = FALSE;
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  190|       |
  191|  11.0k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 11.0k]
  |  Branch (191:3): [True: 11.0k, False: 0]
  ------------------
  192|  11.0k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 11.0k]
  |  Branch (192:3): [True: 11.0k, False: 0]
  ------------------
  193|  11.0k|  DEBUGASSERT(cpool);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 0, False: 11.0k]
  |  Branch (193:3): [True: 11.0k, False: 0]
  ------------------
  194|  11.0k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 11.0k]
  |  Branch (194:3): [True: 11.0k, False: 0]
  ------------------
  195|       |
  196|       |  /*
  197|       |   * If this connection is not marked to force-close, leave it open if there
  198|       |   * are other users of it
  199|       |   */
  200|  11.0k|  if(CONN_INUSE(conn) && !aborted) {
  ------------------
  |  |  346|  22.0k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
  |  Branch (200:26): [True: 0, False: 0]
  ------------------
  201|      0|    CURL_TRC_M(data, "[CPOOL] not discarding #%" FMT_OFF_T
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  202|      0|               " still in use by %u transfers", conn->connection_id,
  203|      0|               conn->attached_xfers);
  204|      0|    return;
  205|      0|  }
  206|       |
  207|       |  /* treat the connection as aborted in CONNECT_ONLY situations, we do
  208|       |   * not know what the APP did with it. */
  209|  11.0k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (209:6): [True: 68, False: 10.9k]
  ------------------
  210|     68|    aborted = TRUE;
  ------------------
  |  | 1055|     68|#define TRUE true
  ------------------
  211|  11.0k|  conn->bits.aborted = aborted;
  212|       |
  213|       |  /* We do not shutdown dead connections. The term 'dead' can be misleading
  214|       |   * here, as we also mark errored connections/transfers as 'dead'.
  215|       |   * If we do a shutdown for an aborted transfer, the server might think
  216|       |   * it was successful otherwise (for example an ftps: upload). This is
  217|       |   * not what we want. */
  218|  11.0k|  if(aborted)
  ------------------
  |  Branch (218:6): [True: 6.50k, False: 4.52k]
  ------------------
  219|  6.50k|    done = TRUE;
  ------------------
  |  | 1055|  6.50k|#define TRUE true
  ------------------
  220|  11.0k|  if(!done) {
  ------------------
  |  Branch (220:6): [True: 4.52k, False: 6.50k]
  ------------------
  221|       |    /* Attempt to shutdown the connection right away. */
  222|  4.52k|    Curl_cshutdn_run_once(cpool->idata, conn, &done);
  223|  4.52k|  }
  224|       |
  225|  11.0k|  if(done || !data->multi)
  ------------------
  |  Branch (225:6): [True: 11.0k, False: 0]
  |  Branch (225:14): [True: 0, False: 0]
  ------------------
  226|  11.0k|    Curl_cshutdn_terminate(cpool->idata, conn, FALSE);
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  227|      0|  else
  228|      0|    Curl_cshutdn_add(&data->multi->cshutdn, conn, cpool->num_conn);
  229|  11.0k|}
conncache.c:cpool_get_instance:
  257|   126k|{
  258|   126k|  if(data) {
  ------------------
  |  Branch (258:6): [True: 126k, False: 0]
  ------------------
  259|   126k|    if(CURL_SHARE_KEEP_CONNECT(data->share))
  ------------------
  |  |   41|   126k|  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  |  |  ------------------
  |  |  |  Branch (41:4): [True: 0, False: 126k]
  |  |  |  Branch (41:11): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  260|      0|      return &data->share->cpool;
  261|   126k|    else if(data->multi_easy)
  ------------------
  |  Branch (261:13): [True: 0, False: 126k]
  ------------------
  262|      0|      return &data->multi_easy->cpool;
  263|   126k|    else if(data->multi)
  ------------------
  |  Branch (263:13): [True: 126k, False: 0]
  ------------------
  264|   126k|      return &data->multi->cpool;
  265|   126k|  }
  266|      0|  return NULL;
  267|   126k|}
conncache.c:cpool_find_bundle:
  149|  22.0k|{
  150|  22.0k|  return Curl_hash_pick(&cpool->dest2bundle,
  151|  22.0k|                        conn->destination, strlen(conn->destination) + 1);
  152|  22.0k|}
conncache.c:cpool_add_bundle:
  293|  10.9k|{
  294|  10.9k|  struct cpool_bundle *bundle;
  295|       |
  296|  10.9k|  bundle = cpool_bundle_create(conn->destination);
  297|  10.9k|  if(!bundle)
  ------------------
  |  Branch (297:6): [True: 0, False: 10.9k]
  ------------------
  298|      0|    return NULL;
  299|       |
  300|  10.9k|  if(!Curl_hash_add(&cpool->dest2bundle,
  ------------------
  |  Branch (300:6): [True: 0, False: 10.9k]
  ------------------
  301|  10.9k|                    bundle->dest, bundle->dest_len, bundle)) {
  302|      0|    cpool_bundle_destroy(bundle);
  303|      0|    return NULL;
  304|      0|  }
  305|  10.9k|  return bundle;
  306|  10.9k|}
conncache.c:cpool_bundle_create:
   70|  10.9k|{
   71|  10.9k|  struct cpool_bundle *bundle;
   72|  10.9k|  size_t dest_len = strlen(dest) + 1;
   73|       |
   74|  10.9k|  bundle = curlx_calloc(1, sizeof(*bundle) + dest_len - 1);
  ------------------
  |  | 1480|  10.9k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   75|  10.9k|  if(!bundle)
  ------------------
  |  Branch (75:6): [True: 0, False: 10.9k]
  ------------------
   76|      0|    return NULL;
   77|  10.9k|  Curl_llist_init(&bundle->conns, NULL);
   78|  10.9k|  bundle->dest_len = dest_len;
   79|  10.9k|  memcpy(bundle->dest, dest, bundle->dest_len);
   80|  10.9k|  return bundle;
   81|  10.9k|}
conncache.c:cpool_bundle_add:
   92|  11.0k|{
   93|  11.0k|  DEBUGASSERT(!Curl_node_llist(&conn->cpool_node));
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (93:3): [True: 0, False: 11.0k]
  |  Branch (93:3): [True: 11.0k, False: 0]
  ------------------
   94|  11.0k|  Curl_llist_append(&bundle->conns, conn, &conn->cpool_node);
   95|       |  conn->bits.in_cpool = TRUE;
  ------------------
  |  | 1055|  11.0k|#define TRUE true
  ------------------
   96|  11.0k|}
conncache.c:cpool_foreach:
  517|  12.9k|{
  518|  12.9k|  struct Curl_hash_iterator iter;
  519|  12.9k|  struct Curl_hash_element *he;
  520|       |
  521|  12.9k|  if(!cpool)
  ------------------
  |  Branch (521:6): [True: 0, False: 12.9k]
  ------------------
  522|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  523|       |
  524|  12.9k|  Curl_hash_start_iterate(&cpool->dest2bundle, &iter);
  525|       |
  526|  12.9k|  he = Curl_hash_next_element(&iter);
  527|  12.9k|  while(he) {
  ------------------
  |  Branch (527:9): [True: 1.53k, False: 11.4k]
  ------------------
  528|  1.53k|    struct Curl_llist_node *curr;
  529|  1.53k|    struct cpool_bundle *bundle = he->ptr;
  530|  1.53k|    he = Curl_hash_next_element(&iter);
  531|       |
  532|  1.53k|    curr = Curl_llist_head(&bundle->conns);
  533|  1.56k|    while(curr) {
  ------------------
  |  Branch (533:11): [True: 1.54k, False: 16]
  ------------------
  534|       |      /* Yes, we need to update curr before calling func(), because func()
  535|       |         might decide to remove the connection */
  536|  1.54k|      struct connectdata *conn = Curl_node_elem(curr);
  537|  1.54k|      curr = Curl_node_next(curr);
  538|       |
  539|  1.54k|      if(func(data, conn, param) == 1) {
  ------------------
  |  Branch (539:10): [True: 1.51k, False: 28]
  ------------------
  540|  1.51k|        return TRUE;
  ------------------
  |  | 1055|  1.51k|#define TRUE true
  ------------------
  541|  1.51k|      }
  542|  1.54k|    }
  543|  1.53k|  }
  544|  11.4k|  return FALSE;
  ------------------
  |  | 1058|  11.4k|#define FALSE false
  ------------------
  545|  12.9k|}
conncache.c:cpool_find_conn:
  768|     56|{
  769|     56|  struct cpool_find_ctx *fctx = param;
  770|     56|  (void)data;
  771|     56|  if(conn->connection_id == fctx->id) {
  ------------------
  |  Branch (771:6): [True: 49, False: 7]
  ------------------
  772|     49|    fctx->conn = conn;
  773|     49|    return 1;
  774|     49|  }
  775|      7|  return 0;
  776|     56|}
conncache.c:cpool_do_conn:
  802|  1.49k|{
  803|  1.49k|  struct cpool_do_conn_ctx *dctx = param;
  804|       |
  805|  1.49k|  if(conn->connection_id == dctx->id) {
  ------------------
  |  Branch (805:6): [True: 1.47k, False: 21]
  ------------------
  806|  1.47k|    dctx->cb(conn, data, dctx->cbdata);
  807|  1.47k|    return 1;
  808|  1.47k|  }
  809|     21|  return 0;
  810|  1.49k|}

timeleft_now_ms:
  112|  2.49M|{
  113|  2.49M|  timediff_t timeleft_ms = 0;
  114|  2.49M|  timediff_t ctimeleft_ms = 0;
  115|       |
  116|  2.49M|  if(Curl_shutdown_started(data, FIRSTSOCKET))
  ------------------
  |  |  303|  2.49M|#define FIRSTSOCKET     0
  ------------------
  |  Branch (116:6): [True: 0, False: 2.49M]
  ------------------
  117|      0|    return Curl_shutdown_timeleft(data, data->conn, FIRSTSOCKET);
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
  118|  2.49M|  else if(Curl_is_connecting(data)) {
  ------------------
  |  Branch (118:11): [True: 2.05M, False: 440k]
  ------------------
  119|  2.05M|    timediff_t ctimeout_ms = (data->set.connecttimeout > 0) ?
  ------------------
  |  Branch (119:30): [True: 25.2k, False: 2.02M]
  ------------------
  120|  2.02M|      data->set.connecttimeout : DEFAULT_CONNECT_TIMEOUT;
  ------------------
  |  |   43|  2.02M|#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
  ------------------
  121|  2.05M|    ctimeleft_ms = ctimeout_ms -
  122|  2.05M|      curlx_ptimediff_ms(pnow, &data->progress.t_startsingle);
  123|  2.05M|    if(!ctimeleft_ms)
  ------------------
  |  Branch (123:8): [True: 2, False: 2.05M]
  ------------------
  124|      2|      ctimeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
  125|  2.05M|  }
  126|   440k|  else if(!data->set.timeout || data->set.connect_only) {
  ------------------
  |  Branch (126:11): [True: 0, False: 440k]
  |  Branch (126:33): [True: 12.3k, False: 427k]
  ------------------
  127|  12.3k|    return 0; /* no timeout in place or checked, return "no limit" */
  128|  12.3k|  }
  129|       |
  130|  2.48M|  if(data->set.timeout) {
  ------------------
  |  Branch (130:6): [True: 2.48M, False: 0]
  ------------------
  131|  2.48M|    timeleft_ms = data->set.timeout -
  132|  2.48M|      curlx_ptimediff_ms(pnow, &data->progress.t_startop);
  133|  2.48M|    if(!timeleft_ms)
  ------------------
  |  Branch (133:8): [True: 12, False: 2.48M]
  ------------------
  134|     12|      timeleft_ms = -1; /* 0 is "no limit", fake 1 ms expiry */
  135|  2.48M|  }
  136|       |
  137|  2.48M|  if(!ctimeleft_ms)
  ------------------
  |  Branch (137:6): [True: 427k, False: 2.05M]
  ------------------
  138|   427k|    return timeleft_ms;
  139|  2.05M|  else if(!timeleft_ms)
  ------------------
  |  Branch (139:11): [True: 0, False: 2.05M]
  ------------------
  140|      0|    return ctimeleft_ms;
  141|  2.05M|  return CURLMIN(ctimeleft_ms, timeleft_ms);
  ------------------
  |  | 1287|  2.05M|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 6.51k, False: 2.04M]
  |  |  ------------------
  ------------------
  142|  2.48M|}
Curl_timeleft_ms:
  145|  2.49M|{
  146|  2.49M|  return timeleft_now_ms(data, Curl_pgrs_now(data));
  147|  2.49M|}
Curl_shutdown_start:
  151|  4.52k|{
  152|  4.52k|  struct connectdata *conn = data->conn;
  153|       |
  154|  4.52k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  4.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (154:3): [True: 0, False: 4.52k]
  |  Branch (154:3): [True: 4.52k, False: 0]
  ------------------
  155|  4.52k|  conn->shutdown.start[sockindex] = *Curl_pgrs_now(data);
  156|  4.52k|  conn->shutdown.timeout_ms = (timeout_ms > 0) ?
  ------------------
  |  Branch (156:31): [True: 0, False: 4.52k]
  ------------------
  157|      0|    (timediff_t)timeout_ms :
  158|  4.52k|    ((data->set.shutdowntimeout > 0) ?
  ------------------
  |  Branch (158:6): [True: 0, False: 4.52k]
  ------------------
  159|  4.52k|     data->set.shutdowntimeout : DEFAULT_SHUTDOWN_TIMEOUT_MS);
  ------------------
  |  |   45|  4.52k|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
  160|       |  /* Set a timer, unless we operate on the admin handle */
  161|  4.52k|  if(data->mid)
  ------------------
  |  Branch (161:6): [True: 0, False: 4.52k]
  ------------------
  162|      0|    Curl_expire_ex(data, conn->shutdown.timeout_ms, EXPIRE_SHUTDOWN);
  163|  4.52k|  CURL_TRC_M(data, "shutdown start on%s connection",
  ------------------
  |  |  148|  4.52k|  do {                                   \
  |  |  149|  4.52k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  4.52k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  4.52k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  9.05k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4.52k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.52k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  9.05k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  4.52k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  4.52k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  4.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 4.52k]
  |  |  ------------------
  ------------------
  164|  4.52k|             sockindex ? " secondary" : "");
  165|  4.52k|}
Curl_shutdown_timeleft:
  170|  4.52k|{
  171|  4.52k|  timediff_t left_ms;
  172|       |
  173|  4.52k|  if(!conn->shutdown.start[sockindex].tv_sec ||
  ------------------
  |  Branch (173:6): [True: 0, False: 4.52k]
  ------------------
  174|  4.52k|     (conn->shutdown.timeout_ms <= 0))
  ------------------
  |  Branch (174:6): [True: 0, False: 4.52k]
  ------------------
  175|      0|    return 0; /* not started or no limits */
  176|       |
  177|  4.52k|  left_ms = conn->shutdown.timeout_ms -
  178|  4.52k|            curlx_ptimediff_ms(Curl_pgrs_now(data),
  179|  4.52k|                               &conn->shutdown.start[sockindex]);
  180|  4.52k|  return left_ms ? left_ms : -1;
  ------------------
  |  Branch (180:10): [True: 4.52k, False: 0]
  ------------------
  181|  4.52k|}
Curl_shutdown_clear:
  200|  22.0k|{
  201|  22.0k|  struct curltime *pt = &data->conn->shutdown.start[sockindex];
  202|  22.0k|  memset(pt, 0, sizeof(*pt));
  203|  22.0k|}
Curl_shutdown_started:
  206|  4.63M|{
  207|  4.63M|  if(data->conn) {
  ------------------
  |  Branch (207:6): [True: 4.60M, False: 24.9k]
  ------------------
  208|  4.60M|    struct curltime *pt = &data->conn->shutdown.start[sockindex];
  209|  4.60M|    return (pt->tv_sec > 0) || (pt->tv_usec > 0);
  ------------------
  |  Branch (209:12): [True: 4.52k, False: 4.60M]
  |  Branch (209:32): [True: 0, False: 4.60M]
  ------------------
  210|  4.60M|  }
  211|  24.9k|  return FALSE;
  ------------------
  |  | 1058|  24.9k|#define FALSE false
  ------------------
  212|  4.63M|}
Curl_addr2string:
  218|  27.5k|{
  219|  27.5k|  struct sockaddr_in *si = NULL;
  220|  27.5k|#ifdef USE_IPV6
  221|  27.5k|  struct sockaddr_in6 *si6 = NULL;
  222|  27.5k|#endif
  223|  27.5k|#ifdef USE_UNIX_SOCKETS
  224|  27.5k|  struct sockaddr_un *su = NULL;
  225|       |#else
  226|       |  (void)salen;
  227|       |#endif
  228|       |
  229|  27.5k|  switch(sa->sa_family) {
  230|  9.86k|  case AF_INET:
  ------------------
  |  Branch (230:3): [True: 9.86k, False: 17.6k]
  ------------------
  231|  9.86k|    si = (struct sockaddr_in *)(void *)sa;
  232|  9.86k|    if(curlx_inet_ntop(sa->sa_family, &si->sin_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   44|  9.86k|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  |  |  ------------------
  |  |  |  Branch (44:3): [True: 9.86k, False: 0]
  |  |  ------------------
  ------------------
  233|  9.86k|      *port = ntohs(si->sin_port);
  234|  9.86k|      return TRUE;
  ------------------
  |  | 1055|  9.86k|#define TRUE true
  ------------------
  235|  9.86k|    }
  236|      0|    break;
  237|      0|#ifdef USE_IPV6
  238|    125|  case AF_INET6:
  ------------------
  |  Branch (238:3): [True: 125, False: 27.4k]
  ------------------
  239|    125|    si6 = (struct sockaddr_in6 *)(void *)sa;
  240|    125|    if(curlx_inet_ntop(sa->sa_family, &si6->sin6_addr, addr, MAX_IPADR_LEN)) {
  ------------------
  |  |   44|    125|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  |  |  ------------------
  |  |  |  Branch (44:3): [True: 125, False: 0]
  |  |  ------------------
  ------------------
  241|    125|      *port = ntohs(si6->sin6_port);
  242|    125|      return TRUE;
  ------------------
  |  | 1055|    125|#define TRUE true
  ------------------
  243|    125|    }
  244|      0|    break;
  245|      0|#endif
  246|      0|#ifdef USE_UNIX_SOCKETS
  247|  17.5k|  case AF_UNIX:
  ------------------
  |  Branch (247:3): [True: 17.5k, False: 9.99k]
  ------------------
  248|  17.5k|    if(salen > (curl_socklen_t)sizeof(CURL_SA_FAMILY_T)) {
  ------------------
  |  Branch (248:8): [True: 395, False: 17.1k]
  ------------------
  249|    395|      su = (struct sockaddr_un *)sa;
  250|    395|      curl_msnprintf(addr, MAX_IPADR_LEN, "%s", su->sun_path);
  ------------------
  |  |   41|    395|#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
  ------------------
  251|    395|    }
  252|  17.1k|    else
  253|  17.1k|      addr[0] = 0; /* socket with no name */
  254|  17.5k|    *port = 0;
  255|  17.5k|    return TRUE;
  ------------------
  |  | 1055|  17.5k|#define TRUE true
  ------------------
  256|      0|#endif
  257|      0|  default:
  ------------------
  |  Branch (257:3): [True: 0, False: 27.5k]
  ------------------
  258|      0|    break;
  259|  27.5k|  }
  260|       |
  261|      0|  addr[0] = '\0';
  262|      0|  *port = 0;
  263|      0|  errno = SOCKEAFNOSUPPORT;
  ------------------
  |  | 1124|      0|#define SOCKEAFNOSUPPORT  EAFNOSUPPORT
  ------------------
  264|       |  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  265|  27.5k|}
Curl_getconnectinfo:
  275|     56|{
  276|     56|  DEBUGASSERT(data);
  ------------------
  |  | 1081|     56|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (276:3): [True: 0, False: 56]
  |  Branch (276:3): [True: 56, False: 0]
  ------------------
  277|       |
  278|       |  /* this works for an easy handle:
  279|       |   * - that has been used for curl_easy_perform()
  280|       |   * - that is associated with a multi handle, and whose connection
  281|       |   *   was detached with CURLOPT_CONNECT_ONLY
  282|       |   */
  283|     56|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (283:6): [True: 49, False: 7]
  ------------------
  284|     49|    struct connectdata *conn;
  285|       |
  286|     49|    conn = Curl_cpool_get_conn(data, data->state.lastconnect_id);
  287|     49|    if(!conn) {
  ------------------
  |  Branch (287:8): [True: 0, False: 49]
  ------------------
  288|      0|      data->state.lastconnect_id = -1;
  289|      0|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  290|      0|    }
  291|       |
  292|     49|    if(connp)
  ------------------
  |  Branch (292:8): [True: 49, False: 0]
  ------------------
  293|       |      /* only store this if the caller cares for it */
  294|     49|      *connp = conn;
  295|     49|    return conn->sock[FIRSTSOCKET];
  ------------------
  |  |  303|     49|#define FIRSTSOCKET     0
  ------------------
  296|     49|  }
  297|      7|  return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      7|#define CURL_SOCKET_BAD (-1)
  ------------------
  298|     56|}
Curl_conncontrol:
  309|  19.9k|{
  310|       |  /* close if a connection, or a stream that is not multiplexed. */
  311|       |  /* This function will be called both before and after this connection is
  312|       |     associated with a transfer. */
  313|  19.9k|  bool closeit, is_multiplex;
  314|  19.9k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  19.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 19.9k]
  |  Branch (314:3): [True: 19.9k, False: 0]
  ------------------
  315|  19.9k|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  316|  19.9k|  (void)reason; /* useful for debugging */
  317|  19.9k|#endif
  318|  19.9k|  is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  303|  19.9k|#define FIRSTSOCKET     0
  ------------------
  319|  19.9k|  closeit = (ctrl == CONNCTRL_CONNECTION) ||
  ------------------
  |  |   91|  19.9k|#define CONNCTRL_CONNECTION 1
  ------------------
  |  Branch (319:13): [True: 10.1k, False: 9.78k]
  ------------------
  320|  9.78k|            ((ctrl == CONNCTRL_STREAM) && !is_multiplex);
  ------------------
  |  |   92|  9.78k|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (320:14): [True: 9.78k, False: 0]
  |  Branch (320:43): [True: 9.78k, False: 0]
  ------------------
  321|  19.9k|  if((ctrl == CONNCTRL_STREAM) && is_multiplex)
  ------------------
  |  |   92|  19.9k|#define CONNCTRL_STREAM     2
  ------------------
  |  Branch (321:6): [True: 9.78k, False: 10.1k]
  |  Branch (321:35): [True: 0, False: 9.78k]
  ------------------
  322|      0|    ;  /* stream signal on multiplex conn never affects close state */
  323|  19.9k|  else if((curl_bit)closeit != conn->bits.close) {
  ------------------
  |  Branch (323:11): [True: 9.48k, False: 10.4k]
  ------------------
  324|  9.48k|    conn->bits.close = closeit; /* the only place in the source code that
  325|       |                                   should assign this bit */
  326|  9.48k|  }
  327|  19.9k|}
Curl_cf_setup_insert_after:
  615|    136|{
  616|    136|  struct Curl_cfilter *cf;
  617|    136|  CURLcode result;
  618|       |
  619|    136|  DEBUGASSERT(data);
  ------------------
  |  | 1081|    136|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (619:3): [True: 0, False: 136]
  |  Branch (619:3): [True: 136, False: 0]
  ------------------
  620|    136|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  621|    136|  if(result)
  ------------------
  |  Branch (621:6): [True: 0, False: 136]
  ------------------
  622|      0|    goto out;
  623|    136|  Curl_conn_cf_insert_after(cf_at, cf);
  624|    136|out:
  625|    136|  return result;
  626|    136|}
Curl_conn_setup:
  632|  11.0k|{
  633|  11.0k|  CURLcode result = CURLE_OK;
  634|  11.0k|  struct Curl_peer *peer = Curl_conn_get_first_peer(conn, sockindex);
  635|  11.0k|  uint8_t dns_queries;
  636|       |
  637|  11.0k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (637:3): [True: 0, False: 11.0k]
  |  Branch (637:3): [True: 11.0k, False: 0]
  ------------------
  638|  11.0k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (638:3): [True: 0, False: 11.0k]
  |  Branch (638:3): [True: 11.0k, False: 0]
  ------------------
  639|  11.0k|  DEBUGASSERT(!conn->cfilter[sockindex]);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (639:3): [True: 0, False: 11.0k]
  |  Branch (639:3): [True: 11.0k, False: 0]
  ------------------
  640|       |
  641|  11.0k|  if(!peer)
  ------------------
  |  Branch (641:6): [True: 0, False: 11.0k]
  ------------------
  642|      0|    return CURLE_FAILED_INIT;
  643|       |
  644|  11.0k|#ifndef CURL_DISABLE_HTTP
  645|  11.0k|  if(!conn->cfilter[sockindex] &&
  ------------------
  |  Branch (645:6): [True: 11.0k, False: 0]
  ------------------
  646|  11.0k|     conn->scheme->protocol == CURLPROTO_HTTPS) {
  ------------------
  |  | 1079|  11.0k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (646:6): [True: 417, False: 10.6k]
  ------------------
  647|    417|    DEBUGASSERT(ssl_mode != CURL_CF_SSL_DISABLE);
  ------------------
  |  | 1081|    417|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (647:5): [True: 0, False: 417]
  |  Branch (647:5): [True: 417, False: 0]
  ------------------
  648|    417|    result = Curl_cf_https_setup(data, conn, sockindex);
  649|    417|    if(result)
  ------------------
  |  Branch (649:8): [True: 0, False: 417]
  ------------------
  650|      0|      goto out;
  651|    417|  }
  652|  11.0k|#endif /* !CURL_DISABLE_HTTP */
  653|       |
  654|       |  /* Still no cfilter set, apply default. */
  655|  11.0k|  if(!conn->cfilter[sockindex]) {
  ------------------
  |  Branch (655:6): [True: 10.6k, False: 417]
  ------------------
  656|  10.6k|    result = cf_setup_add(data, conn, sockindex,
  657|  10.6k|                          conn->transport_wanted, ssl_mode);
  658|  10.6k|    if(result)
  ------------------
  |  Branch (658:8): [True: 0, False: 10.6k]
  ------------------
  659|      0|      goto out;
  660|  10.6k|  }
  661|       |
  662|  11.0k|  dns_queries = Curl_resolv_dns_queries(data, conn->ip_version);
  663|       |#ifdef USE_HTTPSRR
  664|       |  if(sockindex == FIRSTSOCKET)
  665|       |    dns_queries |= CURL_DNSQ_HTTPS;
  666|       |#endif
  667|  11.0k|  result = Curl_cf_dns_add(data, conn, sockindex, peer, dns_queries,
  668|  11.0k|                           conn->transport_wanted);
  669|  11.0k|  DEBUGASSERT(conn->cfilter[sockindex]);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (669:3): [True: 0, False: 11.0k]
  |  Branch (669:3): [True: 11.0k, False: 0]
  ------------------
  670|  11.0k|out:
  671|  11.0k|  return result;
  672|  11.0k|}
Curl_conn_get_destination:
  686|  24.5k|{
  687|  24.5k|#ifndef CURL_DISABLE_PROXY
  688|  24.5k|  if(conn->http_proxy.peer && !conn->bits.tunnel_proxy)
  ------------------
  |  Branch (688:6): [True: 5.97k, False: 18.5k]
  |  Branch (688:31): [True: 0, False: 5.97k]
  ------------------
  689|      0|    return conn->http_proxy.peer;
  690|  24.5k|#endif
  691|  24.5k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  304|  24.5k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (691:10): [True: 0, False: 24.5k]
  ------------------
  692|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (692:6): [True: 0, False: 0]
  ------------------
  693|  24.5k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (693:6): [True: 23.8k, False: 680]
  ------------------
  694|  24.5k|}
Curl_conn_get_first_peer:
  698|   807k|{
  699|   807k|#ifndef CURL_DISABLE_PROXY
  700|   807k|  if(conn->socks_proxy.peer)
  ------------------
  |  Branch (700:6): [True: 492k, False: 315k]
  ------------------
  701|   492k|    return conn->socks_proxy.peer;
  702|   315k|  if(conn->http_proxy.peer)
  ------------------
  |  Branch (702:6): [True: 9.74k, False: 306k]
  ------------------
  703|  9.74k|    return conn->http_proxy.peer;
  704|   306k|#endif
  705|   306k|  return (sockindex == SECONDARYSOCKET) ?
  ------------------
  |  |  304|   306k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (705:10): [True: 0, False: 306k]
  ------------------
  706|      0|    (conn->via_peer2 ? conn->via_peer2 : conn->origin2) :
  ------------------
  |  Branch (706:6): [True: 0, False: 0]
  ------------------
  707|   306k|    (conn->via_peer ? conn->via_peer : conn->origin);
  ------------------
  |  Branch (707:6): [True: 32.0k, False: 274k]
  ------------------
  708|   315k|}
connect.c:cf_setup_destroy:
  536|  10.7k|{
  537|  10.7k|  struct cf_setup_ctx *ctx = cf->ctx;
  538|       |
  539|  10.7k|  CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  10.7k|  do {                                          \
  |  |  154|  10.7k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.7k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  21.4k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.7k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  21.4k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.7k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.7k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  540|       |  curlx_safefree(ctx);
  ------------------
  |  | 1327|  10.7k|  do {                      \
  |  | 1328|  10.7k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  10.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  10.7k|    (ptr) = NULL;           \
  |  | 1330|  10.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 10.7k]
  |  |  ------------------
  ------------------
  541|  10.7k|}
connect.c:cf_setup_connect:
  348|   774k|{
  349|   774k|  struct cf_setup_ctx *ctx = cf->ctx;
  350|   774k|  CURLcode result = CURLE_OK;
  351|   774k|  struct Curl_peer *first_peer =
  352|   774k|    Curl_conn_get_first_peer(cf->conn, cf->sockindex);
  353|       |
  354|   774k|  if(cf->connected) {
  ------------------
  |  Branch (354:6): [True: 0, False: 774k]
  ------------------
  355|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  356|      0|    return CURLE_OK;
  357|      0|  }
  358|       |
  359|       |  /* connect current sub-chain */
  360|   788k|connect_sub_chain:
  361|   788k|  VERBOSE(Curl_conn_trc_filters(data, cf->sockindex, "cf_setup_connect"));
  ------------------
  |  | 1618|   788k|#define VERBOSE(x) x
  ------------------
  362|       |
  363|   788k|  if(cf->next && !cf->next->connected) {
  ------------------
  |  Branch (363:6): [True: 778k, False: 10.3k]
  |  Branch (363:18): [True: 778k, False: 0]
  ------------------
  364|   778k|    result = Curl_conn_cf_connect(cf->next, data, done);
  365|   778k|    if(result || !*done)
  ------------------
  |  Branch (365:8): [True: 3.09k, False: 775k]
  |  Branch (365:18): [True: 764k, False: 10.4k]
  ------------------
  366|   767k|      return result;
  367|   778k|  }
  368|       |
  369|  20.7k|  if(ctx->state < CF_SETUP_CNNCT_EYEBALLS) {
  ------------------
  |  Branch (369:6): [True: 10.3k, False: 10.4k]
  ------------------
  370|       |    /* What type of thing we do connect to first?
  371|       |     * - without a proxy, `ctx->transport` defines it
  372|       |     * - with non-tunneling proxy, `ctx->transport` also applies, but
  373|       |     *   for QUIC we need the cf-h3-proxy, not the standard vquic one
  374|       |     * - with tunneling proxy, transport is defined by the proxytype
  375|       |     *   chosen and `ctx->transport` is tunneled through it.
  376|       |     */
  377|  10.3k|    uint8_t transport_out = ctx->transport;
  378|  10.3k|    bool tunnel_proxy = FALSE;
  ------------------
  |  | 1058|  10.3k|#define FALSE false
  ------------------
  379|  10.3k|#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
  380|  10.3k|    CURL_TRC_CF(data, cf, "happy eyeballing, httpproxy=%d, type=%d, "
  ------------------
  |  |  153|  10.3k|  do {                                          \
  |  |  154|  10.3k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  10.3k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  20.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 10.3k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  20.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  10.3k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  10.3k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  10.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
  381|  10.3k|                "transport=%d",
  382|  10.3k|                cf->conn->bits.httpproxy, cf->conn->http_proxy.proxytype,
  383|  10.3k|                ctx->transport);
  384|  10.3k|    if(cf->conn->bits.httpproxy && cf->conn->bits.tunnel_proxy) {
  ------------------
  |  Branch (384:8): [True: 2.93k, False: 7.40k]
  |  Branch (384:36): [True: 2.93k, False: 0]
  ------------------
  385|  2.93k|      transport_out =
  386|  2.93k|        Curl_http_proxy_transport(cf->conn->http_proxy.proxytype);
  387|  2.93k|      tunnel_proxy = TRUE;
  ------------------
  |  | 1055|  2.93k|#define TRUE true
  ------------------
  388|  2.93k|      if((transport_out == TRNSPRT_QUIC) && (cf->conn->bits.socksproxy)) {
  ------------------
  |  |  309|  2.93k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (388:10): [True: 0, False: 2.93k]
  |  Branch (388:45): [True: 0, False: 0]
  ------------------
  389|      0|        failf(data, "HTTP/3 proxy not possible via SOCKS");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  390|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  391|      0|      }
  392|  2.93k|    }
  393|  10.3k|#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
  394|       |
  395|  10.3k|    result = cf_ip_happy_insert_after(cf, data, first_peer,
  396|  10.3k|                                      ctx->transport, transport_out,
  397|  10.3k|                                      tunnel_proxy);
  398|  10.3k|    if(result)
  ------------------
  |  Branch (398:8): [True: 0, False: 10.3k]
  ------------------
  399|      0|      return result;
  400|  10.3k|    ctx->state = (tunnel_proxy && (transport_out == TRNSPRT_QUIC)) ?
  ------------------
  |  |  309|  2.93k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (400:19): [True: 2.93k, False: 7.40k]
  |  Branch (400:35): [True: 0, False: 2.93k]
  ------------------
  401|  10.3k|      CF_SETUP_CNNCT_HTTP_PROXY : CF_SETUP_CNNCT_EYEBALLS;
  402|  10.3k|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (402:8): [True: 0, False: 10.3k]
  |  Branch (402:21): [True: 10.3k, False: 0]
  ------------------
  403|  10.3k|      goto connect_sub_chain;
  404|  10.3k|  }
  405|       |
  406|       |  /* sub-chain connected, do we need to add more? */
  407|  10.4k|#ifndef CURL_DISABLE_PROXY
  408|  10.4k|  if(ctx->state < CF_SETUP_CNNCT_SOCKS && cf->conn->bits.socksproxy) {
  ------------------
  |  Branch (408:6): [True: 10.0k, False: 389]
  |  Branch (408:43): [True: 154, False: 9.88k]
  ------------------
  409|    154|    struct Curl_peer *dest; /* where SOCKS should tunnel to */
  410|       |
  411|    154|    if(cf->conn->bits.httpproxy)
  ------------------
  |  Branch (411:8): [True: 57, False: 97]
  ------------------
  412|     57|      dest = cf->conn->http_proxy.peer;
  413|     97|    else
  414|     97|      dest = Curl_conn_get_destination(cf->conn, cf->sockindex);
  415|    154|    if(!dest)
  ------------------
  |  Branch (415:8): [True: 0, False: 154]
  ------------------
  416|      0|      return CURLE_FAILED_INIT;
  417|       |
  418|    154|    result = Curl_cf_socks_proxy_insert_after(
  419|    154|      cf, data, dest, cf->conn->ip_version,
  420|    154|      cf->conn->socks_proxy.proxytype,
  421|    154|      cf->conn->socks_proxy.creds);
  422|       |
  423|    154|    if(result) {
  ------------------
  |  Branch (423:8): [True: 0, False: 154]
  ------------------
  424|       |      /* 'dest' might be freed now so it can't be dereferenced */
  425|      0|      CURL_TRC_CF(data, cf, "added SOCKS filter failed -> %d", result);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  426|      0|      return result;
  427|      0|    }
  428|    154|    CURL_TRC_CF(data, cf, "added SOCKS filter to %s:%u -> %d",
  ------------------
  |  |  153|    154|  do {                                          \
  |  |  154|    154|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    154|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    308|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 154, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 154]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    308|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    154|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    154|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    154|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 154]
  |  |  ------------------
  ------------------
  429|    154|                dest->hostname, dest->port, result);
  430|    154|    ctx->state = CF_SETUP_CNNCT_SOCKS;
  431|    154|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (431:8): [True: 0, False: 154]
  |  Branch (431:21): [True: 154, False: 0]
  ------------------
  432|    154|      goto connect_sub_chain;
  433|    154|  }
  434|       |
  435|  10.2k|  if(ctx->state < CF_SETUP_CNNCT_HTTP_PROXY && cf->conn->bits.httpproxy) {
  ------------------
  |  Branch (435:6): [True: 9.91k, False: 362]
  |  Branch (435:48): [True: 2.87k, False: 7.04k]
  ------------------
  436|  2.87k|#ifdef USE_SSL
  437|  2.87k|    if(IS_HTTPS_PROXY(cf->conn->http_proxy.proxytype) &&
  ------------------
  |  |   80|  5.74k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  2.87k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (80:4): [True: 831, False: 2.04k]
  |  |  ------------------
  |  |   81|  2.87k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  2.04k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (81:4): [True: 1.26k, False: 772]
  |  |  ------------------
  |  |   82|  5.74k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|    772|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 0, False: 772]
  |  |  ------------------
  ------------------
  438|  2.10k|       !Curl_conn_is_ssl(cf->conn, cf->sockindex)) {
  ------------------
  |  Branch (438:8): [True: 2.10k, False: 0]
  ------------------
  439|  2.10k|      result = Curl_cf_ssl_proxy_insert_after(cf, data);
  440|  2.10k|      if(result)
  ------------------
  |  Branch (440:10): [True: 0, False: 2.10k]
  ------------------
  441|      0|        return result;
  442|  2.10k|    }
  443|  2.87k|#endif /* USE_SSL */
  444|       |
  445|  2.87k|#ifndef CURL_DISABLE_HTTP
  446|  2.87k|    if(cf->conn->bits.tunnel_proxy) {
  ------------------
  |  Branch (446:8): [True: 2.87k, False: 0]
  ------------------
  447|  2.87k|      struct Curl_peer *dest; /* where HTTP should tunnel to */
  448|  2.87k|      dest = Curl_conn_get_destination(cf->conn, cf->sockindex);
  449|  2.87k|      result = Curl_cf_http_proxy_insert_after(
  450|  2.87k|        cf, data, dest, ctx->transport, cf->conn->http_proxy.proxytype);
  451|  2.87k|      if(result)
  ------------------
  |  Branch (451:10): [True: 0, False: 2.87k]
  ------------------
  452|      0|        return result;
  453|  2.87k|    }
  454|  2.87k|#endif /* !CURL_DISABLE_HTTP */
  455|  2.87k|    ctx->state = CF_SETUP_CNNCT_HTTP_PROXY;
  456|  2.87k|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (456:8): [True: 0, False: 2.87k]
  |  Branch (456:21): [True: 2.87k, False: 0]
  ------------------
  457|  2.87k|      goto connect_sub_chain;
  458|  2.87k|  }
  459|  7.40k|#endif /* !CURL_DISABLE_PROXY */
  460|       |
  461|  7.40k|  if(ctx->state < CF_SETUP_CNNCT_HAPROXY) {
  ------------------
  |  Branch (461:6): [True: 7.10k, False: 301]
  ------------------
  462|  7.10k|#ifndef CURL_DISABLE_PROXY
  463|  7.10k|    if(data->set.haproxyprotocol) {
  ------------------
  |  Branch (463:8): [True: 302, False: 6.80k]
  ------------------
  464|    302|      if(ctx->transport == TRNSPRT_QUIC) {
  ------------------
  |  |  309|    302|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (464:10): [True: 0, False: 302]
  ------------------
  465|      0|        failf(data, "haproxy protocol not support QUIC");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  466|      0|        return CURLE_UNSUPPORTED_PROTOCOL;
  467|      0|      }
  468|    302|      result = Curl_cf_haproxy_insert_after(cf, data);
  469|    302|      if(result)
  ------------------
  |  Branch (469:10): [True: 0, False: 302]
  ------------------
  470|      0|        return result;
  471|    302|    }
  472|  7.10k|#endif /* !CURL_DISABLE_PROXY */
  473|  7.10k|    ctx->state = CF_SETUP_CNNCT_HAPROXY;
  474|  7.10k|    if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (474:8): [True: 0, False: 7.10k]
  |  Branch (474:21): [True: 302, False: 6.80k]
  ------------------
  475|    302|      goto connect_sub_chain;
  476|  7.10k|  }
  477|       |
  478|       |  /* Adding Curl_cf_quic_insert_after() because now we
  479|       |     need the next filter to be QUIC/HTTP/3 (which has SSL) */
  480|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) && \
  481|       |  defined(USE_PROXY_HTTP3)
  482|       |  if(ctx->transport == TRNSPRT_QUIC && cf->conn->bits.httpproxy &&
  483|       |     cf->conn->bits.tunnel_proxy &&
  484|       |     (data->state.http_neg.wanted == CURL_HTTP_V3x)) {
  485|       |    if(ctx->state < CF_SETUP_CNNCT_SSL) {
  486|       |      result = Curl_cf_quic_insert_after(cf);
  487|       |      if(result)
  488|       |        return result;
  489|       |      ctx->state = CF_SETUP_CNNCT_SSL;
  490|       |    }
  491|       |    if(!cf->next || !cf->next->connected)
  492|       |      goto connect_sub_chain;
  493|       |  }
  494|       |  else
  495|       |#endif /* !CURL_DISABLE_HTTP && USE_HTTP3 && USE_PROXY_HTTP3 */
  496|  7.10k|  {
  497|  7.10k|    if(ctx->state < CF_SETUP_CNNCT_SSL) {
  ------------------
  |  Branch (497:8): [True: 7.10k, False: 0]
  ------------------
  498|  7.10k|#ifdef USE_SSL
  499|  7.10k|      if((ctx->ssl_mode == CURL_CF_SSL_ENABLE ||
  ------------------
  |  |  365|  14.2k|#define CURL_CF_SSL_ENABLE   1
  ------------------
  |  Branch (499:11): [True: 0, False: 7.10k]
  ------------------
  500|  7.10k|          (ctx->ssl_mode != CURL_CF_SSL_DISABLE &&
  ------------------
  |  |  364|  14.2k|#define CURL_CF_SSL_DISABLE  0
  ------------------
  |  Branch (500:12): [True: 7.10k, False: 0]
  ------------------
  501|  7.10k|           cf->conn->scheme->flags & PROTOPT_SSL)) && /* we want SSL */
  ------------------
  |  |  207|  7.10k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (501:12): [True: 0, False: 7.10k]
  ------------------
  502|      0|         !Curl_conn_is_ssl(cf->conn, cf->sockindex)) { /* it is missing */
  ------------------
  |  Branch (502:10): [True: 0, False: 0]
  ------------------
  503|      0|        result = Curl_cf_ssl_insert_after(cf, data);
  504|      0|        if(result)
  ------------------
  |  Branch (504:12): [True: 0, False: 0]
  ------------------
  505|      0|          return result;
  506|      0|      }
  507|  7.10k|#endif /* USE_SSL */
  508|  7.10k|      ctx->state = CF_SETUP_CNNCT_SSL;
  509|  7.10k|      if(!cf->next || !cf->next->connected)
  ------------------
  |  Branch (509:10): [True: 0, False: 7.10k]
  |  Branch (509:23): [True: 0, False: 7.10k]
  ------------------
  510|      0|        goto connect_sub_chain;
  511|  7.10k|    }
  512|  7.10k|  }
  513|       |
  514|  7.10k|  ctx->state = CF_SETUP_DONE;
  515|  7.10k|  cf->connected = TRUE;
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
  516|       |  *done = TRUE;
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
  517|  7.10k|  return CURLE_OK;
  518|  7.10k|}
connect.c:cf_setup_close:
  522|  3.64k|{
  523|  3.64k|  struct cf_setup_ctx *ctx = cf->ctx;
  524|       |
  525|  3.64k|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|  3.64k|  do {                                          \
  |  |  154|  3.64k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.64k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.29k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.64k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.29k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.64k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.64k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
  526|  3.64k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  3.64k|#define FALSE false
  ------------------
  527|  3.64k|  ctx->state = CF_SETUP_INIT;
  528|       |
  529|  3.64k|  if(cf->next) {
  ------------------
  |  Branch (529:6): [True: 3.23k, False: 406]
  ------------------
  530|  3.23k|    cf->next->cft->do_close(cf->next, data);
  531|  3.23k|    Curl_conn_cf_discard_chain(&cf->next, data);
  532|  3.23k|  }
  533|  3.64k|}
connect.c:cf_setup_create:
  565|  10.7k|{
  566|  10.7k|  struct Curl_cfilter *cf = NULL;
  567|  10.7k|  struct cf_setup_ctx *ctx;
  568|  10.7k|  CURLcode result = CURLE_OK;
  569|       |
  570|  10.7k|  (void)data;
  571|  10.7k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  10.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  572|  10.7k|  if(!ctx) {
  ------------------
  |  Branch (572:6): [True: 0, False: 10.7k]
  ------------------
  573|      0|    result = CURLE_OUT_OF_MEMORY;
  574|      0|    goto out;
  575|      0|  }
  576|  10.7k|  ctx->state = CF_SETUP_INIT;
  577|  10.7k|  ctx->ssl_mode = ssl_mode;
  578|  10.7k|  ctx->transport = transport;
  579|       |
  580|  10.7k|  result = Curl_cf_create(&cf, &Curl_cft_setup, ctx);
  581|  10.7k|  if(result)
  ------------------
  |  Branch (581:6): [True: 0, False: 10.7k]
  ------------------
  582|      0|    goto out;
  583|  10.7k|  ctx = NULL;
  584|       |
  585|  10.7k|out:
  586|  10.7k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (586:10): [True: 0, False: 10.7k]
  ------------------
  587|  10.7k|  if(ctx) {
  ------------------
  |  Branch (587:6): [True: 0, False: 10.7k]
  ------------------
  588|      0|    curlx_free(ctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  589|      0|  }
  590|  10.7k|  return result;
  591|  10.7k|}
connect.c:cf_setup_add:
  598|  10.6k|{
  599|  10.6k|  struct Curl_cfilter *cf;
  600|  10.6k|  CURLcode result = CURLE_OK;
  601|       |
  602|  10.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  10.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (602:3): [True: 0, False: 10.6k]
  |  Branch (602:3): [True: 10.6k, False: 0]
  ------------------
  603|  10.6k|  result = cf_setup_create(&cf, data, transport, ssl_mode);
  604|  10.6k|  if(result)
  ------------------
  |  Branch (604:6): [True: 0, False: 10.6k]
  ------------------
  605|      0|    goto out;
  606|  10.6k|  Curl_conn_cf_add(data, conn, sockindex, cf);
  607|  10.6k|out:
  608|  10.6k|  return result;
  609|  10.6k|}

Curl_get_content_encodings:
  641|    337|{
  642|    337|  struct dynbuf enc;
  643|    337|  const struct Curl_cwtype * const *cep;
  644|    337|  CURLcode result = CURLE_OK;
  645|    337|  curlx_dyn_init(&enc, 255);
  646|       |
  647|  1.68k|  for(cep = general_unencoders; *cep && !result; cep++) {
  ------------------
  |  Branch (647:33): [True: 1.34k, False: 337]
  |  Branch (647:41): [True: 1.34k, False: 0]
  ------------------
  648|  1.34k|    const struct Curl_cwtype *ce = *cep;
  649|  1.34k|    if(!curl_strequal(ce->name, CONTENT_ENCODING_DEFAULT)) {
  ------------------
  |  |   54|  1.34k|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  |  Branch (649:8): [True: 1.01k, False: 337]
  ------------------
  650|  1.01k|      if(curlx_dyn_len(&enc))
  ------------------
  |  Branch (650:10): [True: 674, False: 337]
  ------------------
  651|    674|        result = curlx_dyn_addn(&enc, ", ", 2);
  652|  1.01k|      if(!result)
  ------------------
  |  Branch (652:10): [True: 1.01k, False: 0]
  ------------------
  653|  1.01k|        result = curlx_dyn_add(&enc, ce->name);
  654|  1.01k|    }
  655|  1.34k|  }
  656|    337|  if(!result && !curlx_dyn_len(&enc))
  ------------------
  |  Branch (656:6): [True: 337, False: 0]
  |  Branch (656:17): [True: 0, False: 337]
  ------------------
  657|      0|    result = curlx_dyn_add(&enc, CONTENT_ENCODING_DEFAULT);
  ------------------
  |  |   54|      0|#define CONTENT_ENCODING_DEFAULT  "identity"
  ------------------
  658|       |
  659|    337|  if(!result)
  ------------------
  |  Branch (659:6): [True: 337, False: 0]
  ------------------
  660|    337|    return curlx_dyn_ptr(&enc);
  661|      0|  return NULL;
  662|    337|}
Curl_build_unencoding_stack:
  733|  3.00k|{
  734|  3.00k|  Curl_cwriter_phase phase = is_transfer ?
  ------------------
  |  Branch (734:30): [True: 1.08k, False: 1.92k]
  ------------------
  735|  1.92k|    CURL_CW_TRANSFER_DECODE : CURL_CW_CONTENT_DECODE;
  736|  3.00k|  CURLcode result;
  737|  3.00k|  bool has_chunked = FALSE;
  ------------------
  |  | 1058|  3.00k|#define FALSE false
  ------------------
  738|       |
  739|  4.43k|  do {
  740|  4.43k|    const char *name;
  741|  4.43k|    size_t namelen;
  742|  4.43k|    bool is_chunked = FALSE;
  ------------------
  |  | 1058|  4.43k|#define FALSE false
  ------------------
  743|       |
  744|       |    /* Parse a single encoding name. */
  745|  8.54k|    while(ISBLANK(*enclist) || *enclist == ',')
  ------------------
  |  |   45|  17.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 1.91k, False: 6.63k]
  |  |  |  Branch (45:38): [True: 408, False: 6.22k]
  |  |  ------------------
  ------------------
  |  Branch (745:32): [True: 1.79k, False: 4.43k]
  ------------------
  746|  4.11k|      enclist++;
  747|       |
  748|  4.43k|    name = enclist;
  749|       |
  750|  37.6k|    for(namelen = 0; *enclist && *enclist != ','; enclist++)
  ------------------
  |  Branch (750:22): [True: 34.8k, False: 2.79k]
  |  Branch (750:34): [True: 33.2k, False: 1.64k]
  ------------------
  751|  33.2k|      if(*enclist > ' ')
  ------------------
  |  Branch (751:10): [True: 24.5k, False: 8.70k]
  ------------------
  752|  24.5k|        namelen = enclist - name + 1;
  753|       |
  754|  4.43k|    if(namelen) {
  ------------------
  |  Branch (754:8): [True: 3.14k, False: 1.28k]
  ------------------
  755|  3.14k|      const struct Curl_cwtype *cwt;
  756|  3.14k|      struct Curl_cwriter *writer;
  757|       |
  758|  3.14k|      CURL_TRC_WRITE(data, "looking for %s decoder: %.*s",
  ------------------
  |  |  158|  3.14k|  do {                                                     \
  |  |  159|  3.14k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  3.14k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  6.29k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.14k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  6.29k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  3.14k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  3.14k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|  3.14k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 3.14k]
  |  |  ------------------
  ------------------
  759|  3.14k|                     is_transfer ? "transfer" : "content", (int)namelen, name);
  760|  3.14k|      is_chunked = (is_transfer && (namelen == 7) &&
  ------------------
  |  Branch (760:21): [True: 628, False: 2.51k]
  |  Branch (760:36): [True: 542, False: 86]
  ------------------
  761|    542|                    curl_strnequal(name, "chunked", 7));
  ------------------
  |  Branch (761:21): [True: 528, False: 14]
  ------------------
  762|       |      /* if we skip the decoding in this phase, do not look further.
  763|       |       * Exception is "chunked" transfer-encoding which always must happen */
  764|  3.14k|      if((is_transfer && !data->set.http_transfer_encoding && !is_chunked) ||
  ------------------
  |  Branch (764:11): [True: 628, False: 2.51k]
  |  Branch (764:26): [True: 546, False: 82]
  |  Branch (764:63): [True: 54, False: 492]
  ------------------
  765|  3.09k|         (!is_transfer && data->set.http_ce_skip)) {
  ------------------
  |  Branch (765:11): [True: 2.51k, False: 574]
  |  Branch (765:27): [True: 18, False: 2.50k]
  ------------------
  766|     72|        bool is_identity = curl_strnequal(name, "identity", 8);
  767|       |        /* not requested, ignore */
  768|     72|        CURL_TRC_WRITE(data, "decoder not requested, ignored: %.*s",
  ------------------
  |  |  158|     72|  do {                                                     \
  |  |  159|     72|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|     72|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    144|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 72, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 72]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    144|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     72|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|     72|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|     72|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 72]
  |  |  ------------------
  ------------------
  769|     72|                       (int)namelen, name);
  770|     72|        if(is_transfer && !data->set.http_te_skip) {
  ------------------
  |  Branch (770:12): [True: 54, False: 18]
  |  Branch (770:27): [True: 5, False: 49]
  ------------------
  771|      5|          if(has_chunked)
  ------------------
  |  Branch (771:14): [True: 1, False: 4]
  ------------------
  772|      1|            failf(data, "A Transfer-Encoding (%.*s) was listed after chunked",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  773|      1|                  (int)namelen, name);
  774|      4|          else if(is_identity)
  ------------------
  |  Branch (774:19): [True: 0, False: 4]
  ------------------
  775|      0|            continue;
  776|      4|          else
  777|      4|            failf(data, "Unsolicited Transfer-Encoding (%.*s) found",
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  778|      4|                  (int)namelen, name);
  779|      5|          return CURLE_BAD_CONTENT_ENCODING;
  780|      5|        }
  781|     67|        return CURLE_OK;
  782|     72|      }
  783|       |
  784|  3.07k|      if(Curl_cwriter_count(data, phase) >= MAX_ENCODE_STACK) {
  ------------------
  |  |   59|  3.07k|#define MAX_ENCODE_STACK 5
  ------------------
  |  Branch (784:10): [True: 3, False: 3.07k]
  ------------------
  785|      3|        failf(data, "Reject response exceeding limit of %d %s encodings",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  786|      3|              MAX_ENCODE_STACK,
  ------------------
  |  |   59|      3|#define MAX_ENCODE_STACK 5
  ------------------
  787|      3|              is_transfer ? "transfer" : "content");
  ------------------
  |  Branch (787:15): [True: 2, False: 1]
  ------------------
  788|      3|        return CURLE_BAD_CONTENT_ENCODING;
  789|      3|      }
  790|       |
  791|  3.07k|      cwt = find_unencode_writer(name, namelen, phase);
  792|  3.07k|      if(cwt && is_chunked && Curl_cwriter_get_by_type(data, cwt)) {
  ------------------
  |  Branch (792:10): [True: 1.76k, False: 1.31k]
  |  Branch (792:17): [True: 528, False: 1.23k]
  |  Branch (792:31): [True: 200, False: 328]
  ------------------
  793|       |        /* A 'chunked' transfer encoding has already been added.
  794|       |         * Ignore duplicates. See #13451.
  795|       |         * Also RFC 9112, ch. 6.1:
  796|       |         * "A sender MUST NOT apply the chunked transfer coding more than
  797|       |         *  once to a message body."
  798|       |         */
  799|    200|        CURL_TRC_WRITE(data, "ignoring duplicate 'chunked' decoder");
  ------------------
  |  |  158|    200|  do {                                                     \
  |  |  159|    200|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|    200|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    400|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 200, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 200]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    400|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    200|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    200|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    200|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 200]
  |  |  ------------------
  ------------------
  800|    200|        return CURLE_OK;
  801|    200|      }
  802|       |
  803|  2.87k|      if(is_transfer && !is_chunked &&
  ------------------
  |  Branch (803:10): [True: 372, False: 2.50k]
  |  Branch (803:25): [True: 44, False: 328]
  ------------------
  804|     44|         Curl_cwriter_get_by_name(data, "chunked")) {
  ------------------
  |  Branch (804:10): [True: 2, False: 42]
  ------------------
  805|       |        /* RFC 9112, ch. 6.1:
  806|       |         * "If any transfer coding other than chunked is applied to a
  807|       |         *  response's content, the sender MUST either apply chunked as the
  808|       |         *  final transfer coding or terminate the message by closing the
  809|       |         *  connection."
  810|       |         * "chunked" must be the last added to be the first in its phase,
  811|       |         *  reject this.
  812|       |         */
  813|      2|        failf(data, "Reject response due to 'chunked' not being the last "
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  814|      2|              "Transfer-Encoding");
  815|      2|        return CURLE_BAD_CONTENT_ENCODING;
  816|      2|      }
  817|       |
  818|  2.87k|      if(!cwt)
  ------------------
  |  Branch (818:10): [True: 1.30k, False: 1.56k]
  ------------------
  819|  1.30k|        cwt = &error_writer; /* Defer error at use. */
  820|       |
  821|  2.87k|      result = Curl_cwriter_create(&writer, data, cwt, phase);
  822|  2.87k|      CURL_TRC_WRITE(data, "added %s decoder %s -> %d",
  ------------------
  |  |  158|  2.87k|  do {                                                     \
  |  |  159|  2.87k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  2.87k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.74k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.87k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.74k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.87k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  2.87k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|  2.87k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 2.87k]
  |  |  ------------------
  ------------------
  823|  2.87k|                     is_transfer ? "transfer" : "content", cwt->name, result);
  824|  2.87k|      if(result)
  ------------------
  |  Branch (824:10): [True: 0, False: 2.87k]
  ------------------
  825|      0|        return result;
  826|       |
  827|  2.87k|      result = Curl_cwriter_add(data, writer);
  828|  2.87k|      if(result) {
  ------------------
  |  Branch (828:10): [True: 0, False: 2.87k]
  ------------------
  829|      0|        Curl_cwriter_free(data, writer);
  830|      0|        return result;
  831|      0|      }
  832|  2.87k|      if(is_chunked)
  ------------------
  |  Branch (832:10): [True: 328, False: 2.54k]
  ------------------
  833|    328|        has_chunked = TRUE;
  ------------------
  |  | 1055|    328|#define TRUE true
  ------------------
  834|  2.87k|    }
  835|  4.43k|  } while(*enclist);
  ------------------
  |  Branch (835:11): [True: 1.42k, False: 2.73k]
  ------------------
  836|       |
  837|  2.73k|  return CURLE_OK;
  838|  3.00k|}
content_encoding.c:deflate_do_init:
  245|    984|{
  246|    984|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  247|    984|  z_stream *z = &zp->z; /* zlib state structure */
  248|       |
  249|       |  /* Initialize zlib */
  250|    984|  z->zalloc = (alloc_func)zalloc_cb;
  251|    984|  z->zfree = (free_func)zfree_cb;
  252|       |
  253|    984|  if(inflateInit(z) != Z_OK)
  ------------------
  |  Branch (253:6): [True: 0, False: 984]
  ------------------
  254|      0|    return process_zlib_error(data, z);
  255|    984|  zp->zlib_init = ZLIB_INIT;
  256|    984|  return CURLE_OK;
  257|    984|}
content_encoding.c:zalloc_cb:
   89|  1.90k|{
   90|  1.90k|  (void)opaque;
   91|       |  /* not a typo, keep it curlx_calloc() */
   92|  1.90k|  return (voidpf)curlx_calloc(items, size);
  ------------------
  |  | 1480|  1.90k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   93|  1.90k|}
content_encoding.c:zfree_cb:
   96|  1.90k|{
   97|  1.90k|  (void)opaque;
   98|  1.90k|  curlx_free(ptr);
  ------------------
  |  | 1483|  1.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   99|  1.90k|}
content_encoding.c:process_zlib_error:
  102|    420|{
  103|    420|  if(z->msg)
  ------------------
  |  Branch (103:6): [True: 416, False: 4]
  ------------------
  104|    416|    failf(data, "Error while processing content unencoding: %s", z->msg);
  ------------------
  |  |   62|    416|#define failf Curl_failf
  ------------------
  105|      4|  else
  106|      4|    failf(data, "Error while processing content unencoding: "
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  107|      4|          "Unknown failure within decompression software.");
  108|       |
  109|    420|  return CURLE_BAD_CONTENT_ENCODING;
  110|    420|}
content_encoding.c:deflate_do_write:
  262|   113k|{
  263|   113k|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  264|   113k|  z_stream *z = &zp->z; /* zlib state structure */
  265|       |
  266|   113k|  if(!(type & CLIENTWRITE_BODY) || !nbytes)
  ------------------
  |  |   42|   113k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (266:6): [True: 3.25k, False: 110k]
  |  Branch (266:36): [True: 0, False: 110k]
  ------------------
  267|  3.25k|    return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  268|       |
  269|       |  /* Set the compressed input when this function is called */
  270|   110k|  z->next_in = (z_const Bytef *)buf;
  271|   110k|  z->avail_in = (uInt)nbytes;
  272|       |
  273|   110k|  if(zp->zlib_init == ZLIB_EXTERNAL_TRAILER)
  ------------------
  |  Branch (273:6): [True: 20, False: 110k]
  ------------------
  274|     20|    return process_trailer(data, zp);
  275|       |
  276|       |  /* Now uncompress the data */
  277|   110k|  return inflate_stream(data, writer, type, ZLIB_INFLATING);
  278|   110k|}
content_encoding.c:process_trailer:
  125|     46|{
  126|     46|  z_stream *z = &zp->z;
  127|     46|  CURLcode result = CURLE_OK;
  128|     46|  uInt len = z->avail_in < zp->trailerlen ? z->avail_in : zp->trailerlen;
  ------------------
  |  Branch (128:14): [True: 23, False: 23]
  ------------------
  129|       |
  130|       |  /* Consume expected trailer bytes. Terminate stream if exhausted.
  131|       |     Issue an error if unexpected bytes follow. */
  132|       |
  133|     46|  zp->trailerlen -= len;
  134|     46|  z->avail_in -= len;
  135|     46|  z->next_in += len;
  136|     46|  if(z->avail_in)
  ------------------
  |  Branch (136:6): [True: 18, False: 28]
  ------------------
  137|     18|    result = CURLE_WRITE_ERROR;
  138|     46|  if(result || !zp->trailerlen)
  ------------------
  |  Branch (138:6): [True: 18, False: 28]
  |  Branch (138:16): [True: 5, False: 23]
  ------------------
  139|     23|    result = exit_zlib(data, z, &zp->zlib_init, result);
  140|     23|  else {
  141|       |    /* Only occurs for gzip with zlib < 1.2.0.4 or raw deflate. */
  142|     23|    zp->zlib_init = ZLIB_EXTERNAL_TRAILER;
  143|     23|  }
  144|     46|  return result;
  145|     46|}
content_encoding.c:exit_zlib:
  114|  1.71k|{
  115|  1.71k|  if(*zlib_init != ZLIB_UNINIT) {
  ------------------
  |  Branch (115:6): [True: 1.17k, False: 542]
  ------------------
  116|  1.17k|    if(inflateEnd(z) != Z_OK && result == CURLE_OK)
  ------------------
  |  Branch (116:8): [True: 0, False: 1.17k]
  |  Branch (116:33): [True: 0, False: 0]
  ------------------
  117|      0|      result = process_zlib_error(data, z);
  118|  1.17k|    *zlib_init = ZLIB_UNINIT;
  119|  1.17k|  }
  120|       |
  121|  1.71k|  return result;
  122|  1.71k|}
content_encoding.c:inflate_stream:
  150|   113k|{
  151|   113k|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  152|   113k|  z_stream *z = &zp->z;         /* zlib state structure */
  153|   113k|  uInt nread = z->avail_in;
  154|   113k|  z_const Bytef *orig_in = z->next_in;
  155|   113k|  bool done = FALSE;
  ------------------
  |  | 1058|   113k|#define FALSE false
  ------------------
  156|   113k|  CURLcode result = CURLE_OK;   /* Curl_client_write status */
  157|   113k|  int i = 0;
  158|       |
  159|       |  /* Check state. */
  160|   113k|  if(zp->zlib_init != ZLIB_INIT &&
  ------------------
  |  Branch (160:6): [True: 112k, False: 824]
  ------------------
  161|   112k|     zp->zlib_init != ZLIB_INFLATING &&
  ------------------
  |  Branch (161:6): [True: 3.04k, False: 109k]
  ------------------
  162|  3.04k|     zp->zlib_init != ZLIB_INIT_GZIP)
  ------------------
  |  Branch (162:6): [True: 4, False: 3.04k]
  ------------------
  163|      4|    return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR);
  164|       |
  165|       |  /* because the buffer size is fixed, iteratively decompress and transfer to
  166|       |     the client via next_write function. */
  167|   357k|  while(!done) {
  ------------------
  |  Branch (167:9): [True: 243k, False: 113k]
  ------------------
  168|   243k|    int status; /* zlib status */
  169|   243k|    done = TRUE;
  ------------------
  |  | 1055|   243k|#define TRUE true
  ------------------
  170|       |
  171|   243k|    if(++i > (1024 * 1024 / DECOMPRESS_BUFFER_SIZE)) {
  ------------------
  |  |   62|   243k|#define DECOMPRESS_BUFFER_SIZE 16384 /* buffer size for decompressed data */
  ------------------
  |  Branch (171:8): [True: 187, False: 243k]
  ------------------
  172|       |      /* check every MB of output if we are not exceeding time limit */
  173|    187|      i = 0;
  174|    187|      if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (174:10): [True: 0, False: 187]
  ------------------
  175|      0|        failf(data, "Operation timed out while decoding payload");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  176|      0|        return exit_zlib(data, z, &zp->zlib_init, CURLE_OPERATION_TIMEDOUT);
  177|      0|      }
  178|    187|    }
  179|       |
  180|       |    /* (re)set buffer for decompressed output for every iteration */
  181|   243k|    z->next_out = (Bytef *)zp->buffer;
  182|   243k|    z->avail_out = DECOMPRESS_BUFFER_SIZE;
  ------------------
  |  |   62|   243k|#define DECOMPRESS_BUFFER_SIZE 16384 /* buffer size for decompressed data */
  ------------------
  183|       |
  184|   243k|    status = inflate(z, Z_BLOCK);
  185|       |
  186|       |    /* Flush output data if some. */
  187|   243k|    if(z->avail_out != DECOMPRESS_BUFFER_SIZE) {
  ------------------
  |  |   62|   243k|#define DECOMPRESS_BUFFER_SIZE 16384 /* buffer size for decompressed data */
  ------------------
  |  Branch (187:8): [True: 124k, False: 119k]
  ------------------
  188|   124k|      if(status == Z_OK || status == Z_STREAM_END) {
  ------------------
  |  Branch (188:10): [True: 124k, False: 113]
  |  Branch (188:28): [True: 0, False: 113]
  ------------------
  189|   124k|        zp->zlib_init = started; /* Data started. */
  190|   124k|        result = Curl_cwriter_write(data, writer->next, type, zp->buffer,
  191|   124k|                                    DECOMPRESS_BUFFER_SIZE - z->avail_out);
  ------------------
  |  |   62|   124k|#define DECOMPRESS_BUFFER_SIZE 16384 /* buffer size for decompressed data */
  ------------------
  192|   124k|        if(result) {
  ------------------
  |  Branch (192:12): [True: 94, False: 124k]
  ------------------
  193|     94|          exit_zlib(data, z, &zp->zlib_init, result);
  194|     94|          break;
  195|     94|        }
  196|   124k|      }
  197|   124k|    }
  198|       |
  199|       |    /* Dispatch by inflate() status. */
  200|   243k|    switch(status) {
  201|   129k|    case Z_OK:
  ------------------
  |  Branch (201:5): [True: 129k, False: 113k]
  ------------------
  202|       |      /* Always loop: there may be unflushed latched data in zlib state. */
  203|   129k|      done = FALSE;
  ------------------
  |  | 1058|   129k|#define FALSE false
  ------------------
  204|   129k|      break;
  205|   113k|    case Z_BUF_ERROR:
  ------------------
  |  Branch (205:5): [True: 113k, False: 130k]
  ------------------
  206|       |      /* No more data to flush: exit loop. */
  207|   113k|      break;
  208|     26|    case Z_STREAM_END:
  ------------------
  |  Branch (208:5): [True: 26, False: 243k]
  ------------------
  209|     26|      result = process_trailer(data, zp);
  210|     26|      break;
  211|    617|    case Z_DATA_ERROR:
  ------------------
  |  Branch (211:5): [True: 617, False: 243k]
  ------------------
  212|       |      /* some servers seem to not generate zlib headers, so this is an attempt
  213|       |         to fix and continue anyway */
  214|    617|      if(zp->zlib_init == ZLIB_INIT) {
  ------------------
  |  Branch (214:10): [True: 201, False: 416]
  ------------------
  215|    201|        if(inflateReset2(z, -MAX_WBITS) == Z_OK) {
  ------------------
  |  Branch (215:12): [True: 201, False: 0]
  ------------------
  216|    201|          z->next_in = orig_in;
  217|    201|          z->avail_in = nread;
  218|    201|          zp->zlib_init = ZLIB_INFLATING;
  219|    201|          zp->trailerlen = 4; /* Tolerate up to 4 unknown trailer bytes. */
  220|    201|          done = FALSE;
  ------------------
  |  | 1058|    201|#define FALSE false
  ------------------
  221|    201|          break;
  222|    201|        }
  223|      0|        zp->zlib_init = ZLIB_UNINIT; /* inflateEnd() already called. */
  224|      0|      }
  225|    416|      result = exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z));
  226|    416|      break;
  227|      4|    default:
  ------------------
  |  Branch (227:5): [True: 4, False: 243k]
  ------------------
  228|      4|      result = exit_zlib(data, z, &zp->zlib_init, process_zlib_error(data, z));
  229|      4|      break;
  230|   243k|    }
  231|   243k|  }
  232|       |
  233|       |  /* We are about to leave this call so the `nread' data bytes will not be seen
  234|       |     again. If we are in a state that would wrongly allow restart in raw mode
  235|       |     at the next call, assume output has already started. */
  236|   113k|  if(nread && zp->zlib_init == ZLIB_INIT)
  ------------------
  |  Branch (236:6): [True: 113k, False: 0]
  |  Branch (236:15): [True: 112, False: 113k]
  ------------------
  237|    112|    zp->zlib_init = started; /* Cannot restart anymore. */
  238|       |
  239|   113k|  return result;
  240|   113k|}
content_encoding.c:deflate_do_close:
  282|    984|{
  283|    984|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  284|    984|  z_stream *z = &zp->z; /* zlib state structure */
  285|       |
  286|    984|  exit_zlib(data, z, &zp->zlib_init, CURLE_OK);
  287|    984|}
content_encoding.c:gzip_do_init:
  304|    187|{
  305|    187|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  306|    187|  z_stream *z = &zp->z; /* zlib state structure */
  307|       |
  308|       |  /* Initialize zlib */
  309|    187|  z->zalloc = (alloc_func)zalloc_cb;
  310|    187|  z->zfree = (free_func)zfree_cb;
  311|       |
  312|    187|  if(inflateInit2(z, MAX_WBITS + 32) != Z_OK)
  ------------------
  |  Branch (312:6): [True: 0, False: 187]
  ------------------
  313|      0|    return process_zlib_error(data, z);
  314|       |
  315|    187|  zp->zlib_init = ZLIB_INIT_GZIP; /* Transparent gzip decompress state */
  316|    187|  return CURLE_OK;
  317|    187|}
content_encoding.c:gzip_do_write:
  322|  4.41k|{
  323|  4.41k|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  324|  4.41k|  z_stream *z = &zp->z; /* zlib state structure */
  325|       |
  326|  4.41k|  if(!(type & CLIENTWRITE_BODY) || !nbytes)
  ------------------
  |  |   42|  4.41k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (326:6): [True: 1.37k, False: 3.04k]
  |  Branch (326:36): [True: 0, False: 3.04k]
  ------------------
  327|  1.37k|    return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  328|       |
  329|  3.04k|  if(zp->zlib_init == ZLIB_INIT_GZIP) {
  ------------------
  |  Branch (329:6): [True: 3.04k, False: 1]
  ------------------
  330|       |    /* Let zlib handle the gzip decompression entirely */
  331|  3.04k|    z->next_in = (z_const Bytef *)buf;
  332|  3.04k|    z->avail_in = (uInt)nbytes;
  333|       |    /* Now uncompress the data */
  334|  3.04k|    return inflate_stream(data, writer, type, ZLIB_INIT_GZIP);
  335|  3.04k|  }
  336|       |
  337|       |  /* We are running with an old version: return error. */
  338|      1|  return exit_zlib(data, z, &zp->zlib_init, CURLE_WRITE_ERROR);
  339|  3.04k|}
content_encoding.c:gzip_do_close:
  343|    187|{
  344|    187|  struct zlib_writer *zp = (struct zlib_writer *)writer;
  345|    187|  z_stream *z = &zp->z; /* zlib state structure */
  346|       |
  347|    187|  exit_zlib(data, z, &zp->zlib_init, CURLE_OK);
  348|    187|}
content_encoding.c:find_unencode_writer:
  707|  3.07k|{
  708|  3.07k|  const struct Curl_cwtype * const *cep;
  709|       |
  710|  3.07k|  if(phase == CURL_CW_TRANSFER_DECODE) {
  ------------------
  |  Branch (710:6): [True: 572, False: 2.50k]
  ------------------
  711|    616|    for(cep = transfer_unencoders; *cep; cep++) {
  ------------------
  |  Branch (711:36): [True: 572, False: 44]
  ------------------
  712|    572|      const struct Curl_cwtype *ce = *cep;
  713|    572|      if((curl_strnequal(name, ce->name, len) && !ce->name[len]) ||
  ------------------
  |  Branch (713:11): [True: 540, False: 32]
  |  Branch (713:50): [True: 528, False: 12]
  ------------------
  714|     44|         (ce->alias && curl_strnequal(name, ce->alias, len) &&
  ------------------
  |  Branch (714:11): [True: 0, False: 44]
  |  Branch (714:24): [True: 0, False: 0]
  ------------------
  715|      0|          !ce->alias[len]))
  ------------------
  |  Branch (715:11): [True: 0, False: 0]
  ------------------
  716|    528|        return ce;
  717|    572|    }
  718|    572|  }
  719|       |  /* look among the general decoders */
  720|  9.14k|  for(cep = general_unencoders; *cep; cep++) {
  ------------------
  |  Branch (720:33): [True: 7.83k, False: 1.31k]
  ------------------
  721|  7.83k|    const struct Curl_cwtype *ce = *cep;
  722|  7.83k|    if((curl_strnequal(name, ce->name, len) && !ce->name[len]) ||
  ------------------
  |  Branch (722:9): [True: 1.19k, False: 6.64k]
  |  Branch (722:48): [True: 1.17k, False: 19]
  ------------------
  723|  6.66k|       (ce->alias && curl_strnequal(name, ce->alias, len) && !ce->alias[len]))
  ------------------
  |  Branch (723:9): [True: 3.85k, False: 2.80k]
  |  Branch (723:22): [True: 127, False: 3.72k]
  |  Branch (723:62): [True: 63, False: 64]
  ------------------
  724|  1.23k|      return ce;
  725|  7.83k|  }
  726|  1.31k|  return NULL;
  727|  2.54k|}
content_encoding.c:error_do_init:
  667|  1.30k|{
  668|  1.30k|  (void)data;
  669|  1.30k|  (void)writer;
  670|  1.30k|  return CURLE_OK;
  671|  1.30k|}
content_encoding.c:error_do_write:
  676|  32.6k|{
  677|  32.6k|  (void)writer;
  678|  32.6k|  (void)buf;
  679|  32.6k|  (void)nbytes;
  680|       |
  681|  32.6k|  if(!(type & CLIENTWRITE_BODY) || !nbytes)
  ------------------
  |  |   42|  32.6k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (681:6): [True: 32.6k, False: 6]
  |  Branch (681:36): [True: 0, False: 6]
  ------------------
  682|  32.6k|    return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  683|      6|  failf(data, "Unrecognized content encoding type");
  ------------------
  |  |   62|      6|#define failf Curl_failf
  ------------------
  684|      6|  return CURLE_BAD_CONTENT_ENCODING;
  685|  32.6k|}
content_encoding.c:error_do_close:
  689|  1.30k|{
  690|  1.30k|  (void)data;
  691|  1.30k|  (void)writer;
  692|  1.30k|}

Curl_cookie_add:
  943|  37.6k|{
  944|  37.6k|  struct Cookie comem;
  945|  37.6k|  struct Cookie *co;
  946|  37.6k|  size_t myhash;
  947|  37.6k|  CURLcode result;
  948|  37.6k|  bool replaces = FALSE;
  ------------------
  |  | 1058|  37.6k|#define FALSE false
  ------------------
  949|  37.6k|  bool okay;
  950|       |
  951|  37.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  37.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (951:3): [True: 0, False: 37.6k]
  |  Branch (951:3): [True: 37.6k, False: 0]
  ------------------
  952|  37.6k|  DEBUGASSERT(MAX_SET_COOKIE_AMOUNT <= 255); /* counter is an unsigned char */
  ------------------
  |  | 1081|  37.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (952:3): [True: 0, Folded]
  |  Branch (952:3): [True: 37.6k, Folded]
  ------------------
  953|  37.6k|  if(data->req.setcookies >= MAX_SET_COOKIE_AMOUNT)
  ------------------
  |  |   90|  37.6k|#define MAX_SET_COOKIE_AMOUNT 50
  ------------------
  |  Branch (953:6): [True: 1.89k, False: 35.7k]
  ------------------
  954|  1.89k|    return CURLE_OK; /* silently ignore */
  955|       |
  956|  35.7k|  co = &comem;
  957|  35.7k|  memset(co, 0, sizeof(comem));
  958|       |
  959|  35.7k|  if(httpheader)
  ------------------
  |  Branch (959:6): [True: 23.5k, False: 12.2k]
  ------------------
  960|  23.5k|    result = parse_cookie_header(data, co, ci, &okay,
  961|  23.5k|                                 lineptr, domain, path, secure);
  962|  12.2k|  else
  963|  12.2k|    result = parse_netscape(co, ci, &okay, lineptr, secure);
  964|       |
  965|  35.7k|  if(result || !okay)
  ------------------
  |  Branch (965:6): [True: 0, False: 35.7k]
  |  Branch (965:16): [True: 19.5k, False: 16.1k]
  ------------------
  966|  19.5k|    goto fail;
  967|       |
  968|  16.1k|  if(co->prefix_secure && !co->secure)
  ------------------
  |  Branch (968:6): [True: 202, False: 15.9k]
  |  Branch (968:27): [True: 134, False: 68]
  ------------------
  969|       |    /* The __Secure- prefix only requires that the cookie be set secure */
  970|    134|    goto fail;
  971|       |
  972|  16.0k|  if(co->prefix_host) {
  ------------------
  |  Branch (972:6): [True: 166, False: 15.8k]
  ------------------
  973|       |    /*
  974|       |     * The __Host- prefix requires the cookie to be secure, have a "/" path
  975|       |     * and not have a domain set.
  976|       |     */
  977|    166|    if(co->secure && co->path && !strcmp(co->path, "/") && !co->tailmatch)
  ------------------
  |  Branch (977:8): [True: 53, False: 113]
  |  Branch (977:22): [True: 52, False: 1]
  |  Branch (977:34): [True: 32, False: 20]
  |  Branch (977:60): [True: 31, False: 1]
  ------------------
  978|     31|      ;
  979|    135|    else
  980|    135|      goto fail;
  981|    166|  }
  982|       |
  983|  15.9k|  if(!ci->running &&    /* read from a file */
  ------------------
  |  Branch (983:6): [True: 1.32k, False: 14.6k]
  ------------------
  984|  1.32k|     ci->newsession &&  /* clean session cookies */
  ------------------
  |  Branch (984:6): [True: 0, False: 1.32k]
  ------------------
  985|      0|     !co->expires)      /* this is a session cookie */
  ------------------
  |  Branch (985:6): [True: 0, False: 0]
  ------------------
  986|      0|    goto fail;
  987|       |
  988|  15.9k|  co->livecookie = ci->running;
  989|  15.9k|  co->creationtime = ++ci->lastct;
  990|       |
  991|       |  /*
  992|       |   * Now we have parsed the incoming line, we must now check if this supersedes
  993|       |   * an already existing cookie, which it may if the previous have the same
  994|       |   * domain and path as this.
  995|       |   */
  996|       |
  997|       |  /* remove expired cookies */
  998|  15.9k|  if(!noexpire)
  ------------------
  |  Branch (998:6): [True: 15.9k, False: 0]
  ------------------
  999|  15.9k|    remove_expired(ci);
 1000|       |
 1001|  15.9k|  if(is_public_suffix(data, co, domain))
  ------------------
  |  Branch (1001:6): [True: 0, False: 15.9k]
  ------------------
 1002|      0|    goto fail;
 1003|       |
 1004|  15.9k|  if(!replace_existing(data, co, ci, secure, &replaces))
  ------------------
  |  Branch (1004:6): [True: 0, False: 15.9k]
  ------------------
 1005|      0|    goto fail;
 1006|       |
 1007|       |  /* clone the stack struct into heap */
 1008|  15.9k|  co = curlx_memdup(&comem, sizeof(comem));
 1009|  15.9k|  if(!co) {
  ------------------
  |  Branch (1009:6): [True: 0, False: 15.9k]
  ------------------
 1010|      0|    co = &comem;
 1011|      0|    result = CURLE_OUT_OF_MEMORY;
 1012|      0|    goto fail; /* bail out if we are this low on memory */
 1013|      0|  }
 1014|       |
 1015|       |  /* add this cookie to the list */
 1016|  15.9k|  myhash = cookiehash(co->domain);
 1017|  15.9k|  Curl_llist_append(&ci->cookielist[myhash], co, &co->node);
 1018|       |
 1019|  15.9k|  if(ci->running)
  ------------------
  |  Branch (1019:6): [True: 14.6k, False: 1.32k]
  ------------------
 1020|       |    /* Only show this when NOT reading the cookies from a file */
 1021|  14.6k|    infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
  ------------------
  |  |  143|  14.6k|  do {                               \
  |  |  144|  14.6k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  14.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 14.6k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 14.6k]
  |  |  |  |  ------------------
  |  |  |  |  320|  14.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  14.6k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  14.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 14.6k]
  |  |  ------------------
  ------------------
 1022|  15.9k|          "expire %" FMT_OFF_T,
 1023|  15.9k|          replaces ? "Replaced" : "Added", co->name, co->value,
 1024|  15.9k|          co->domain, co->path, co->expires);
 1025|       |
 1026|  15.9k|  if(!replaces)
  ------------------
  |  Branch (1026:6): [True: 5.69k, False: 10.2k]
  ------------------
 1027|  5.69k|    ci->numcookies++; /* one more cookie in the jar */
 1028|       |
 1029|       |  /*
 1030|       |   * Now that we have added a new cookie to the jar, update the expiration
 1031|       |   * tracker in case it is the next one to expire.
 1032|       |   */
 1033|  15.9k|  if(co->expires && (co->expires < ci->next_expiration))
  ------------------
  |  Branch (1033:6): [True: 1.22k, False: 14.7k]
  |  Branch (1033:21): [True: 903, False: 318]
  ------------------
 1034|    903|    ci->next_expiration = co->expires;
 1035|       |
 1036|  15.9k|  if(httpheader)
  ------------------
  |  Branch (1036:6): [True: 15.6k, False: 242]
  ------------------
 1037|  15.6k|    data->req.setcookies++;
 1038|       |
 1039|  15.9k|  return result;
 1040|  19.8k|fail:
 1041|       |  freecookie(co, FALSE);
  ------------------
  |  | 1058|  19.8k|#define FALSE false
  ------------------
 1042|  19.8k|  return result;
 1043|  15.9k|}
Curl_cookie_init:
 1060|  15.4k|{
 1061|  15.4k|  int i;
 1062|  15.4k|  struct CookieInfo *ci = curlx_calloc(1, sizeof(struct CookieInfo));
  ------------------
  |  | 1480|  15.4k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1063|  15.4k|  if(!ci)
  ------------------
  |  Branch (1063:6): [True: 0, False: 15.4k]
  ------------------
 1064|      0|    return NULL;
 1065|       |
 1066|       |  /* This does not use the destructor callback since we want to add
 1067|       |     and remove to lists while keeping the cookie struct intact */
 1068|   986k|  for(i = 0; i < COOKIE_HASH_SIZE; i++)
  ------------------
  |  |   54|   986k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1068:14): [True: 970k, False: 15.4k]
  ------------------
 1069|   970k|    Curl_llist_init(&ci->cookielist[i], NULL);
 1070|       |  /*
 1071|       |   * Initialize the next_expiration time to signal that we do not have enough
 1072|       |   * information yet.
 1073|       |   */
 1074|  15.4k|  ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  594|  15.4k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 1075|       |
 1076|  15.4k|  return ci;
 1077|  15.4k|}
Curl_cookie_loadfiles:
 1165|  12.4k|{
 1166|  12.4k|  CURLcode result = CURLE_OK;
 1167|  12.4k|  struct curl_slist *list = data->state.cookielist;
 1168|  12.4k|  if(list) {
  ------------------
  |  Branch (1168:6): [True: 11.7k, False: 753]
  ------------------
 1169|  11.7k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1170|  11.7k|    if(!data->cookies)
  ------------------
  |  Branch (1170:8): [True: 0, False: 11.7k]
  ------------------
 1171|      0|      data->cookies = Curl_cookie_init();
 1172|  11.7k|    if(!data->cookies)
  ------------------
  |  Branch (1172:8): [True: 0, False: 11.7k]
  ------------------
 1173|      0|      result = CURLE_OUT_OF_MEMORY;
 1174|  11.7k|    else {
 1175|  11.7k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1055|  11.7k|#define TRUE true
  ------------------
 1176|  23.4k|      while(list) {
  ------------------
  |  Branch (1176:13): [True: 11.7k, False: 11.7k]
  ------------------
 1177|  11.7k|        result = cookie_load(data, list->data, data->cookies,
 1178|  11.7k|                             (bool)data->set.cookiesession);
 1179|  11.7k|        if(result)
  ------------------
  |  Branch (1179:12): [True: 0, False: 11.7k]
  ------------------
 1180|      0|          break;
 1181|  11.7k|        list = list->next;
 1182|  11.7k|      }
 1183|  11.7k|    }
 1184|  11.7k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1185|  11.7k|  }
 1186|  12.4k|  return result;
 1187|  12.4k|}
Curl_secure_context:
 1242|  24.2k|{
 1243|  24.2k|  return conn->scheme->protocol & (CURLPROTO_HTTPS | CURLPROTO_WSS) ||
  ------------------
  |  | 1079|  24.2k|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
                return conn->scheme->protocol & (CURLPROTO_HTTPS | CURLPROTO_WSS) ||
  ------------------
  |  |   64|  24.2k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1243:10): [True: 0, False: 24.2k]
  ------------------
 1244|  24.2k|    curl_strequal("localhost", host) ||
  ------------------
  |  Branch (1244:5): [True: 81, False: 24.2k]
  ------------------
 1245|  24.2k|    !strcmp(host, "127.0.0.1") ||
  ------------------
  |  Branch (1245:5): [True: 704, False: 23.5k]
  ------------------
 1246|  23.5k|    !strcmp(host, "::1");
  ------------------
  |  Branch (1246:5): [True: 0, False: 23.5k]
  ------------------
 1247|  24.2k|}
Curl_cookie_clearall:
 1369|  15.4k|{
 1370|  15.4k|  if(ci) {
  ------------------
  |  Branch (1370:6): [True: 15.4k, False: 2]
  ------------------
 1371|  15.4k|    unsigned int i;
 1372|   986k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|   986k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1372:16): [True: 970k, False: 15.4k]
  ------------------
 1373|   970k|      struct Curl_llist_node *n;
 1374|   975k|      for(n = Curl_llist_head(&ci->cookielist[i]); n;) {
  ------------------
  |  Branch (1374:52): [True: 5.31k, False: 970k]
  ------------------
 1375|  5.31k|        struct Cookie *c = Curl_node_elem(n);
 1376|  5.31k|        struct Curl_llist_node *e = Curl_node_next(n);
 1377|  5.31k|        Curl_node_remove(n);
 1378|       |        freecookie(c, TRUE);
  ------------------
  |  | 1055|  5.31k|#define TRUE true
  ------------------
 1379|  5.31k|        n = e;
 1380|  5.31k|      }
 1381|   970k|    }
 1382|  15.4k|    ci->numcookies = 0;
 1383|  15.4k|  }
 1384|  15.4k|}
Curl_cookie_clearsess:
 1392|      1|{
 1393|      1|  unsigned int i;
 1394|       |
 1395|      1|  if(!ci)
  ------------------
  |  Branch (1395:6): [True: 1, False: 0]
  ------------------
 1396|      1|    return;
 1397|       |
 1398|      0|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|      0|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1398:14): [True: 0, False: 0]
  ------------------
 1399|      0|    struct Curl_llist_node *n = Curl_llist_head(&ci->cookielist[i]);
 1400|      0|    struct Curl_llist_node *e = NULL;
 1401|       |
 1402|      0|    for(; n; n = e) {
  ------------------
  |  Branch (1402:11): [True: 0, False: 0]
  ------------------
 1403|      0|      struct Cookie *curr = Curl_node_elem(n);
 1404|      0|      e = Curl_node_next(n); /* in case the node is removed, get it early */
 1405|      0|      if(!curr->expires) {
  ------------------
  |  Branch (1405:10): [True: 0, False: 0]
  ------------------
 1406|      0|        Curl_node_remove(n);
 1407|       |        freecookie(curr, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1408|      0|        ci->numcookies--;
 1409|      0|      }
 1410|      0|    }
 1411|      0|  }
 1412|      0|}
Curl_cookie_cleanup:
 1420|  15.4k|{
 1421|  15.4k|  if(ci) {
  ------------------
  |  Branch (1421:6): [True: 15.4k, False: 0]
  ------------------
 1422|  15.4k|    Curl_cookie_clearall(ci);
 1423|  15.4k|    curlx_free(ci); /* free the base struct as well */
  ------------------
  |  | 1483|  15.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1424|  15.4k|  }
 1425|  15.4k|}
Curl_flush_cookies:
 1613|  33.2k|{
 1614|  33.2k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1615|       |  /* only save the cookie file if a transfer was started (cookies->running is
 1616|       |     set), as otherwise the cookies were not completely initialized and there
 1617|       |     might be cookie files that were not loaded so saving the file is the
 1618|       |     wrong thing. */
 1619|  33.2k|  if(data->cookies) {
  ------------------
  |  Branch (1619:6): [True: 15.4k, False: 17.8k]
  ------------------
 1620|  15.4k|    if(data->set.str[STRING_COOKIEJAR] && data->cookies->running) {
  ------------------
  |  Branch (1620:8): [True: 15.3k, False: 58]
  |  Branch (1620:43): [True: 11.7k, False: 3.64k]
  ------------------
 1621|       |      /* if we have a destination file for all the cookies to get dumped to */
 1622|  11.7k|      CURLcode result = cookie_output(data, data->cookies,
 1623|  11.7k|                                      data->set.str[STRING_COOKIEJAR]);
 1624|  11.7k|      if(result)
  ------------------
  |  Branch (1624:10): [True: 0, False: 11.7k]
  ------------------
 1625|      0|        infof(data, "WARNING: failed to save cookies in %s: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1626|  11.7k|              data->set.str[STRING_COOKIEJAR], curl_easy_strerror(result));
 1627|  11.7k|    }
 1628|       |
 1629|  15.4k|    if(cleanup && (!data->share || (data->cookies != data->share->cookies))) {
  ------------------
  |  Branch (1629:8): [True: 15.4k, False: 0]
  |  Branch (1629:20): [True: 15.4k, False: 0]
  |  Branch (1629:36): [True: 0, False: 0]
  ------------------
 1630|  15.4k|      Curl_cookie_cleanup(data->cookies);
 1631|       |      data->cookies = NULL;
 1632|  15.4k|    }
 1633|  15.4k|  }
 1634|  33.2k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1635|  33.2k|}
Curl_cookie_run:
 1638|  12.4k|{
 1639|  12.4k|  Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1640|  12.4k|  if(data->cookies)
  ------------------
  |  Branch (1640:6): [True: 11.7k, False: 751]
  ------------------
 1641|  11.7k|    data->cookies->running = TRUE;
  ------------------
  |  | 1055|  11.7k|#define TRUE true
  ------------------
 1642|  12.4k|  Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1643|  12.4k|}
cookie.c:parse_cookie_header:
  429|  23.5k|{
  430|       |  /* This line was read off an HTTP-header */
  431|  23.5k|  time_t now = 0;
  432|  23.5k|  size_t linelength = strlen(ptr);
  433|  23.5k|  CURLcode result = CURLE_OK;
  434|  23.5k|  struct Curl_str cookie[COOKIE_PIECES];
  435|  23.5k|  *okay = FALSE;
  ------------------
  |  | 1058|  23.5k|#define FALSE false
  ------------------
  436|  23.5k|  if(linelength > MAX_COOKIE_LINE)
  ------------------
  |  |   81|  23.5k|#define MAX_COOKIE_LINE 5000
  ------------------
  |  Branch (436:6): [True: 114, False: 23.4k]
  ------------------
  437|       |    /* discard overly long lines at once */
  438|    114|    return CURLE_OK;
  439|       |
  440|       |  /* memset instead of initializer because gcc 4.8.1 is silly */
  441|  23.4k|  memset(cookie, 0, sizeof(cookie));
  442|   125k|  do {
  443|   125k|    struct Curl_str name;
  444|   125k|    struct Curl_str val;
  445|       |
  446|       |    /* we have a <name>=<value> pair or a stand-alone word here */
  447|   125k|    if(!curlx_str_cspn(&ptr, &name, ";\t\r\n=")) {
  ------------------
  |  Branch (447:8): [True: 123k, False: 2.21k]
  ------------------
  448|   123k|      bool sep = FALSE;
  ------------------
  |  | 1058|   123k|#define FALSE false
  ------------------
  449|   123k|      curlx_str_trimblanks(&name);
  450|       |
  451|   123k|      if(!curlx_str_single(&ptr, '=')) {
  ------------------
  |  Branch (451:10): [True: 67.5k, False: 55.9k]
  ------------------
  452|  67.5k|        sep = TRUE; /* a '=' was used */
  ------------------
  |  | 1055|  67.5k|#define TRUE true
  ------------------
  453|  67.5k|        if(!curlx_str_cspn(&ptr, &val, ";\r\n"))
  ------------------
  |  Branch (453:12): [True: 50.6k, False: 16.8k]
  ------------------
  454|  50.6k|          curlx_str_trimblanks(&val);
  455|       |
  456|       |        /* Reject cookies with a TAB inside the value */
  457|  67.5k|        if(curlx_strlen(&val) &&
  ------------------
  |  |   50|   135k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 50.5k, False: 16.9k]
  |  |  ------------------
  ------------------
  458|  50.5k|           memchr(curlx_str(&val), '\t', curlx_strlen(&val))) {
  ------------------
  |  |   49|  50.5k|#define curlx_str(x)    ((x)->str)
  ------------------
                         memchr(curlx_str(&val), '\t', curlx_strlen(&val))) {
  ------------------
  |  |   50|  50.5k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (458:12): [True: 1.09k, False: 49.4k]
  ------------------
  459|  1.09k|          infof(data, "cookie contains TAB, dropping");
  ------------------
  |  |  143|  1.09k|  do {                               \
  |  |  144|  1.09k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.09k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.09k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.09k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.09k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.09k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.09k]
  |  |  ------------------
  ------------------
  460|  1.09k|          return CURLE_OK;
  461|  1.09k|        }
  462|  67.5k|      }
  463|  55.9k|      else
  464|  55.9k|        curlx_str_init(&val);
  465|       |
  466|   122k|      if(!curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|   122k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (466:10): [True: 23.2k, False: 99.1k]
  ------------------
  467|       |        /* The first name/value pair is the actual cookie name */
  468|  23.2k|        if(!sep ||
  ------------------
  |  Branch (468:12): [True: 2.34k, False: 20.8k]
  ------------------
  469|       |           /* Bad name/value pair. */
  470|  20.8k|           invalid_octets(curlx_str(&name), curlx_strlen(&name)) ||
  ------------------
  |  |   49|  20.8k|#define curlx_str(x)    ((x)->str)
  ------------------
                         invalid_octets(curlx_str(&name), curlx_strlen(&name)) ||
  ------------------
  |  |   50|  20.8k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (470:12): [True: 425, False: 20.4k]
  ------------------
  471|  20.4k|           invalid_octets(curlx_str(&val), curlx_strlen(&val)) ||
  ------------------
  |  |   49|  20.4k|#define curlx_str(x)    ((x)->str)
  ------------------
                         invalid_octets(curlx_str(&val), curlx_strlen(&val)) ||
  ------------------
  |  |   50|  20.4k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (471:12): [True: 1.43k, False: 19.0k]
  ------------------
  472|  19.0k|           !curlx_strlen(&name)) {
  ------------------
  |  |   50|  19.0k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (472:12): [True: 13, False: 19.0k]
  ------------------
  473|  4.21k|          infof(data, "invalid octets in name/value, cookie dropped");
  ------------------
  |  |  143|  4.21k|  do {                               \
  |  |  144|  4.21k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  4.21k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 4.21k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.21k]
  |  |  |  |  ------------------
  |  |  |  |  320|  4.21k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  4.21k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  4.21k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4.21k]
  |  |  ------------------
  ------------------
  474|  4.21k|          return CURLE_OK;
  475|  4.21k|        }
  476|       |
  477|       |        /*
  478|       |         * Check for too long individual name or contents, or too long
  479|       |         * combination of name + contents. Chrome and Firefox support 4095 or
  480|       |         * 4096 bytes combo
  481|       |         */
  482|  19.0k|        if(curlx_strlen(&name) >= (MAX_NAME - 1) ||
  ------------------
  |  |   50|  19.0k|#define curlx_strlen(x) ((x)->len)
  ------------------
                      if(curlx_strlen(&name) >= (MAX_NAME - 1) ||
  ------------------
  |  |   85|  19.0k|#define MAX_NAME 4096
  ------------------
  |  Branch (482:12): [True: 11, False: 18.9k]
  ------------------
  483|  18.9k|           curlx_strlen(&val) >= (MAX_NAME - 1) ||
  ------------------
  |  |   50|  18.9k|#define curlx_strlen(x) ((x)->len)
  ------------------
                         curlx_strlen(&val) >= (MAX_NAME - 1) ||
  ------------------
  |  |   85|  18.9k|#define MAX_NAME 4096
  ------------------
  |  Branch (483:12): [True: 11, False: 18.9k]
  ------------------
  484|  18.9k|           ((curlx_strlen(&name) + curlx_strlen(&val)) > MAX_NAME)) {
  ------------------
  |  |   50|  18.9k|#define curlx_strlen(x) ((x)->len)
  ------------------
                         ((curlx_strlen(&name) + curlx_strlen(&val)) > MAX_NAME)) {
  ------------------
  |  |   50|  18.9k|#define curlx_strlen(x) ((x)->len)
  ------------------
                         ((curlx_strlen(&name) + curlx_strlen(&val)) > MAX_NAME)) {
  ------------------
  |  |   85|  18.9k|#define MAX_NAME 4096
  ------------------
  |  Branch (484:12): [True: 11, False: 18.9k]
  ------------------
  485|     33|          infof(data, "oversized cookie dropped, name/val %zu + %zu bytes",
  ------------------
  |  |  143|     33|  do {                               \
  |  |  144|     33|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     33|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 33, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 33]
  |  |  |  |  ------------------
  |  |  |  |  320|     33|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     33|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     33|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 33]
  |  |  ------------------
  ------------------
  486|     33|                curlx_strlen(&name), curlx_strlen(&val));
  487|     33|          return CURLE_OK;
  488|     33|        }
  489|       |
  490|       |        /* Check if we have a reserved prefix set. */
  491|  18.9k|        if(!strncmp("__Secure-", curlx_str(&name), 9))
  ------------------
  |  |   49|  18.9k|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (491:12): [True: 212, False: 18.7k]
  ------------------
  492|    212|          co->prefix_secure = TRUE;
  ------------------
  |  | 1055|    212|#define TRUE true
  ------------------
  493|  18.7k|        else if(!strncmp("__Host-", curlx_str(&name), 7))
  ------------------
  |  |   49|  18.7k|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (493:17): [True: 176, False: 18.5k]
  ------------------
  494|    176|          co->prefix_host = TRUE;
  ------------------
  |  | 1055|    176|#define TRUE true
  ------------------
  495|       |
  496|  18.9k|        cookie[COOKIE_NAME] = name;
  ------------------
  |  |  365|  18.9k|#define COOKIE_NAME   0
  ------------------
  497|  18.9k|        cookie[COOKIE_VALUE] = val;
  ------------------
  |  |  366|  18.9k|#define COOKIE_VALUE  1
  ------------------
  498|  18.9k|      }
  499|  99.1k|      else if(!sep) {
  ------------------
  |  Branch (499:15): [True: 53.5k, False: 45.5k]
  ------------------
  500|       |        /*
  501|       |         * this is a "<name>" with no content
  502|       |         */
  503|       |
  504|       |        /*
  505|       |         * secure cookies are only allowed to be set when the connection is
  506|       |         * using a secure protocol, or when the cookie is being set by
  507|       |         * reading from file
  508|       |         */
  509|  53.5k|        if(curlx_str_casecompare(&name, "secure")) {
  ------------------
  |  Branch (509:12): [True: 2.46k, False: 51.1k]
  ------------------
  510|  2.46k|          if(secure || !ci->running)
  ------------------
  |  Branch (510:14): [True: 418, False: 2.04k]
  |  Branch (510:24): [True: 0, False: 2.04k]
  ------------------
  511|    418|            co->secure = TRUE;
  ------------------
  |  | 1055|    418|#define TRUE true
  ------------------
  512|  2.04k|          else {
  513|  2.04k|            infof(data, "skipped cookie because not 'secure'");
  ------------------
  |  |  143|  2.04k|  do {                               \
  |  |  144|  2.04k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.04k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.04k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.04k]
  |  |  ------------------
  ------------------
  514|  2.04k|            return CURLE_OK;
  515|  2.04k|          }
  516|  2.46k|        }
  517|  51.1k|        else if(curlx_str_casecompare(&name, "httponly"))
  ------------------
  |  Branch (517:17): [True: 232, False: 50.8k]
  ------------------
  518|    232|          co->httponly = TRUE;
  ------------------
  |  | 1055|    232|#define TRUE true
  ------------------
  519|  53.5k|      }
  520|  45.5k|      else if(curlx_str_casecompare(&name, "path")) {
  ------------------
  |  Branch (520:15): [True: 5.89k, False: 39.6k]
  ------------------
  521|  5.89k|        cookie[COOKIE_PATH] = val;
  ------------------
  |  |  368|  5.89k|#define COOKIE_PATH   3
  ------------------
  522|  5.89k|      }
  523|  39.6k|      else if(curlx_str_casecompare(&name, "domain") && curlx_strlen(&val)) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (523:15): [True: 0, False: 39.6k]
  ------------------
  524|      0|        bool is_ip;
  525|      0|        const char *v = curlx_str(&val);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  526|       |        /*
  527|       |         * Now, we make sure that our host is within the given domain, or
  528|       |         * the given domain is not valid and thus cannot be set.
  529|       |         */
  530|       |
  531|      0|        if('.' == *v)
  ------------------
  |  Branch (531:12): [True: 0, False: 0]
  ------------------
  532|      0|          curlx_str_nudge(&val, 1);
  533|       |
  534|      0|#ifndef USE_LIBPSL
  535|       |        /*
  536|       |         * Without PSL we do not know when the incoming cookie is set on a
  537|       |         * TLD or otherwise "protected" suffix. To reduce risk, we require a
  538|       |         * dot OR the exact hostname being "localhost".
  539|       |         */
  540|      0|        if(bad_domain(curlx_str(&val), curlx_strlen(&val)))
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
                      if(bad_domain(curlx_str(&val), curlx_strlen(&val)))
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (540:12): [True: 0, False: 0]
  ------------------
  541|      0|          domain = ":";
  542|      0|#endif
  543|       |
  544|      0|        is_ip = Curl_host_is_ipnum(domain ? domain : curlx_str(&val));
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (544:36): [True: 0, False: 0]
  ------------------
  545|       |
  546|      0|        if(!domain ||
  ------------------
  |  Branch (546:12): [True: 0, False: 0]
  ------------------
  547|      0|           (is_ip &&
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  ------------------
  548|      0|            !strncmp(curlx_str(&val), domain, curlx_strlen(&val)) &&
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
                          !strncmp(curlx_str(&val), domain, curlx_strlen(&val)) &&
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (548:13): [True: 0, False: 0]
  ------------------
  549|      0|            (curlx_strlen(&val) == strlen(domain))) ||
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (549:13): [True: 0, False: 0]
  ------------------
  550|      0|           (!is_ip && cookie_tailmatch(curlx_str(&val),
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  |  Branch (550:23): [True: 0, False: 0]
  ------------------
  551|      0|                                          curlx_strlen(&val), domain))) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  552|      0|          cookie[COOKIE_DOMAIN] = val;
  ------------------
  |  |  367|      0|#define COOKIE_DOMAIN 2
  ------------------
  553|      0|          if(!is_ip)
  ------------------
  |  Branch (553:14): [True: 0, False: 0]
  ------------------
  554|      0|            co->tailmatch = TRUE; /* we always do that if the domain name was
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  555|       |                                     given */
  556|      0|        }
  557|      0|        else {
  558|       |          /*
  559|       |           * We did not get a tailmatch and then the attempted set domain is
  560|       |           * not a domain to which the current host belongs. Mark as bad.
  561|       |           */
  562|      0|          infof(data, "skipped cookie with bad tailmatch domain: %s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  563|      0|                curlx_str(&val));
  564|      0|          return CURLE_OK;
  565|      0|        }
  566|      0|      }
  567|  39.6k|      else if(curlx_str_casecompare(&name, "max-age") && curlx_strlen(&val)) {
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (567:15): [True: 0, False: 39.6k]
  ------------------
  568|       |        /*
  569|       |         * Defined in RFC2109:
  570|       |         *
  571|       |         * Optional. The Max-Age attribute defines the lifetime of the
  572|       |         * cookie, in seconds. The delta-seconds value is a decimal non-
  573|       |         * negative integer. After delta-seconds seconds elapse, the
  574|       |         * client should discard the cookie. A value of zero means the
  575|       |         * cookie should be discarded immediately.
  576|       |         */
  577|      0|        int rc;
  578|      0|        const char *maxage = curlx_str(&val);
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  579|      0|        if(*maxage == '\"')
  ------------------
  |  Branch (579:12): [True: 0, False: 0]
  ------------------
  580|      0|          maxage++;
  581|      0|        rc = curlx_str_number(&maxage, &co->expires, CURL_OFF_T_MAX);
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  582|      0|        if(!now)
  ------------------
  |  Branch (582:12): [True: 0, False: 0]
  ------------------
  583|      0|          now = time(NULL);
  584|      0|        switch(rc) {
  585|      0|        case STRE_OVERFLOW:
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  |  Branch (585:9): [True: 0, False: 0]
  ------------------
  586|       |          /* overflow, used max value */
  587|      0|          co->expires = CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  588|      0|          break;
  589|      0|        default:
  ------------------
  |  Branch (589:9): [True: 0, False: 0]
  ------------------
  590|       |          /* negative or otherwise bad, expire */
  591|      0|          co->expires = 1;
  592|      0|          break;
  593|      0|        case STRE_OK:
  ------------------
  |  |   28|      0|#define STRE_OK       0
  ------------------
  |  Branch (593:9): [True: 0, False: 0]
  ------------------
  594|      0|          if(!co->expires)
  ------------------
  |  Branch (594:14): [True: 0, False: 0]
  ------------------
  595|      0|            co->expires = 1; /* expire now */
  596|      0|          else if(CURL_OFF_T_MAX - now < co->expires)
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (596:19): [True: 0, False: 0]
  ------------------
  597|       |            /* would overflow */
  598|      0|            co->expires = CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  599|      0|          else
  600|      0|            co->expires += now;
  601|      0|          break;
  602|      0|        }
  603|      0|        cap_expires(now, co);
  604|      0|      }
  605|  39.6k|      else if(curlx_str_casecompare(&name, "expires") && curlx_strlen(&val) &&
  ------------------
  |  |   50|  59.7k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 19.8k, False: 277]
  |  |  ------------------
  ------------------
  |  Branch (605:15): [True: 20.0k, False: 19.5k]
  ------------------
  606|  19.8k|              !co->expires && (curlx_strlen(&val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |   50|  19.4k|#define curlx_strlen(x) ((x)->len)
  ------------------
                            !co->expires && (curlx_strlen(&val) < MAX_DATE_LENGTH)) {
  ------------------
  |  |  363|  19.4k|#define MAX_DATE_LENGTH 80
  ------------------
  |  Branch (606:15): [True: 19.4k, False: 378]
  |  Branch (606:31): [True: 19.0k, False: 405]
  ------------------
  607|       |        /*
  608|       |         * Let max-age have priority.
  609|       |         *
  610|       |         * If the date cannot get parsed for whatever reason, the cookie
  611|       |         * will be treated as a session cookie
  612|       |         */
  613|  19.0k|        char dbuf[MAX_DATE_LENGTH + 1];
  614|  19.0k|        time_t date = 0;
  615|  19.0k|        memcpy(dbuf, curlx_str(&val), curlx_strlen(&val));
  ------------------
  |  |   49|  19.0k|#define curlx_str(x)    ((x)->str)
  ------------------
                      memcpy(dbuf, curlx_str(&val), curlx_strlen(&val));
  ------------------
  |  |   50|  19.0k|#define curlx_strlen(x) ((x)->len)
  ------------------
  616|  19.0k|        dbuf[curlx_strlen(&val)] = 0;
  ------------------
  |  |   50|  19.0k|#define curlx_strlen(x) ((x)->len)
  ------------------
  617|  19.0k|        if(!Curl_getdate_capped(dbuf, &date)) {
  ------------------
  |  Branch (617:12): [True: 986, False: 18.0k]
  ------------------
  618|    986|          if(!date)
  ------------------
  |  Branch (618:14): [True: 44, False: 942]
  ------------------
  619|     44|            date++;
  620|    986|          co->expires = (curl_off_t)date;
  621|    986|        }
  622|  18.0k|        else
  623|  18.0k|          co->expires = 0;
  624|  19.0k|        if(!now)
  ------------------
  |  Branch (624:12): [True: 6.56k, False: 12.4k]
  ------------------
  625|  6.56k|          now = time(NULL);
  626|  19.0k|        cap_expires(now, co);
  627|  19.0k|      }
  628|   122k|    }
  629|   125k|  } while(!curlx_str_single(&ptr, ';'));
  ------------------
  |  Branch (629:11): [True: 102k, False: 16.0k]
  ------------------
  630|       |
  631|  16.0k|  if(curlx_strlen(&cookie[COOKIE_NAME])) {
  ------------------
  |  |   50|  16.0k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 15.9k, False: 96]
  |  |  ------------------
  ------------------
  632|       |    /* the header was fine, now store the data */
  633|  15.9k|    result = storecookie(co, &cookie[0], path, domain);
  634|  15.9k|    if(!result)
  ------------------
  |  Branch (634:8): [True: 15.9k, False: 0]
  ------------------
  635|  15.9k|      *okay = TRUE;
  ------------------
  |  | 1055|  15.9k|#define TRUE true
  ------------------
  636|  15.9k|  }
  637|  16.0k|  return result;
  638|  23.4k|}
cookie.c:invalid_octets:
  347|  41.3k|{
  348|  41.3k|  const unsigned char *p = (const unsigned char *)ptr;
  349|       |  /* Reject all bytes \x01 - \x1f (*except* \x09, TAB) + \x7f */
  350|   438k|  while(len && *p) {
  ------------------
  |  Branch (350:9): [True: 399k, False: 39.4k]
  |  Branch (350:16): [True: 399k, False: 0]
  ------------------
  351|   399k|    if(((*p != 9) && (*p < 0x20)) || (*p == 0x7f))
  ------------------
  |  Branch (351:9): [True: 399k, False: 0]
  |  Branch (351:22): [True: 1.68k, False: 397k]
  |  Branch (351:38): [True: 182, False: 397k]
  ------------------
  352|  1.86k|      return TRUE;
  ------------------
  |  | 1055|  1.86k|#define TRUE true
  ------------------
  353|   397k|    p++;
  354|   397k|    len--;
  355|   397k|  }
  356|  39.4k|  return FALSE;
  ------------------
  |  | 1058|  39.4k|#define FALSE false
  ------------------
  357|  41.3k|}
cookie.c:cap_expires:
   53|  19.0k|{
   54|  19.0k|  if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |  614|    986|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
                if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
  ------------------
  |  |   44|    986|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
  |  Branch (54:6): [True: 986, False: 18.0k]
  |  Branch (54:21): [True: 986, False: 0]
  ------------------
   55|    986|    timediff_t cap = now + COOKIES_MAXAGE;
  ------------------
  |  |   44|    986|#define COOKIES_MAXAGE (400 * 24 * 3600)
  ------------------
   56|    986|    if(co->expires > cap) {
  ------------------
  |  Branch (56:8): [True: 376, False: 610]
  ------------------
   57|    376|      cap += 30;
   58|    376|      co->expires = (cap / 60) * 60;
   59|    376|    }
   60|    986|  }
   61|  19.0k|}
cookie.c:storecookie:
  374|  15.9k|{
  375|  15.9k|  CURLcode result;
  376|  15.9k|  result = strstore(&co->name, curlx_str(&cp[COOKIE_NAME]),
  ------------------
  |  |   49|  15.9k|#define curlx_str(x)    ((x)->str)
  ------------------
  377|  15.9k|                    curlx_strlen(&cp[COOKIE_NAME]));
  ------------------
  |  |   50|  15.9k|#define curlx_strlen(x) ((x)->len)
  ------------------
  378|  15.9k|  if(!result)
  ------------------
  |  Branch (378:6): [True: 15.9k, False: 0]
  ------------------
  379|  15.9k|    result = strstore(&co->value, curlx_str(&cp[COOKIE_VALUE]),
  ------------------
  |  |   49|  15.9k|#define curlx_str(x)    ((x)->str)
  ------------------
  380|  15.9k|                      curlx_strlen(&cp[COOKIE_VALUE]));
  ------------------
  |  |   50|  15.9k|#define curlx_strlen(x) ((x)->len)
  ------------------
  381|  15.9k|  if(!result) {
  ------------------
  |  Branch (381:6): [True: 15.9k, False: 0]
  ------------------
  382|  15.9k|    size_t plen = 0;
  383|  15.9k|    if(curlx_strlen(&cp[COOKIE_PATH])) {
  ------------------
  |  |   50|  15.9k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 2.19k, False: 13.7k]
  |  |  ------------------
  ------------------
  384|  2.19k|      path = curlx_str(&cp[COOKIE_PATH]);
  ------------------
  |  |   49|  2.19k|#define curlx_str(x)    ((x)->str)
  ------------------
  385|  2.19k|      plen = curlx_strlen(&cp[COOKIE_PATH]);
  ------------------
  |  |   50|  2.19k|#define curlx_strlen(x) ((x)->len)
  ------------------
  386|  2.19k|    }
  387|  13.7k|    else if(path) {
  ------------------
  |  Branch (387:13): [True: 12.7k, False: 1.06k]
  ------------------
  388|       |      /* No path was given in the header line, set the default */
  389|  12.7k|      const char *endslash = strrchr(path, '/');
  390|  12.7k|      if(endslash)
  ------------------
  |  Branch (390:10): [True: 12.7k, False: 0]
  ------------------
  391|  12.7k|        plen = endslash - path + 1; /* include end slash */
  392|      0|      else
  393|      0|        plen = strlen(path);
  394|  12.7k|    }
  395|       |
  396|  15.9k|    if(path) {
  ------------------
  |  Branch (396:8): [True: 14.8k, False: 1.06k]
  ------------------
  397|  14.8k|      co->path = sanitize_cookie_path(path, plen);
  398|  14.8k|      if(!co->path)
  ------------------
  |  Branch (398:10): [True: 0, False: 14.8k]
  ------------------
  399|      0|        result = CURLE_OUT_OF_MEMORY;
  400|  14.8k|    }
  401|  15.9k|  }
  402|  15.9k|  if(!result) {
  ------------------
  |  Branch (402:6): [True: 15.9k, False: 0]
  ------------------
  403|  15.9k|    if(curlx_strlen(&cp[COOKIE_DOMAIN]))
  ------------------
  |  |   50|  15.9k|#define curlx_strlen(x) ((x)->len)
  |  |  ------------------
  |  |  |  Branch (50:25): [True: 0, False: 15.9k]
  |  |  ------------------
  ------------------
  404|      0|      result = strstore(&co->domain, curlx_str(&cp[COOKIE_DOMAIN]),
  ------------------
  |  |   49|      0|#define curlx_str(x)    ((x)->str)
  ------------------
  405|      0|                        curlx_strlen(&cp[COOKIE_DOMAIN]));
  ------------------
  |  |   50|      0|#define curlx_strlen(x) ((x)->len)
  ------------------
  406|  15.9k|    else if(domain) {
  ------------------
  |  Branch (406:13): [True: 14.8k, False: 1.09k]
  ------------------
  407|       |      /* no domain was given in the header line, set the default */
  408|  14.8k|      co->domain = curlx_strdup(domain);
  ------------------
  |  | 1477|  14.8k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  409|  14.8k|      if(!co->domain)
  ------------------
  |  Branch (409:10): [True: 0, False: 14.8k]
  ------------------
  410|      0|        result = CURLE_OUT_OF_MEMORY;
  411|  14.8k|    }
  412|  15.9k|  }
  413|  15.9k|  return result;
  414|  15.9k|}
cookie.c:strstore:
  256|  31.9k|{
  257|  31.9k|  DEBUGASSERT(str);
  ------------------
  |  | 1081|  31.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (257:3): [True: 0, False: 31.9k]
  |  Branch (257:3): [True: 31.9k, False: 0]
  ------------------
  258|  31.9k|  *str = curlx_memdup0(newstr, len);
  259|  31.9k|  if(!*str)
  ------------------
  |  Branch (259:6): [True: 0, False: 31.9k]
  ------------------
  260|      0|    return CURLE_OUT_OF_MEMORY;
  261|  31.9k|  return CURLE_OK;
  262|  31.9k|}
cookie.c:sanitize_cookie_path:
  227|  14.9k|{
  228|       |  /* some sites send path attribute within '"'. */
  229|  14.9k|  if(len && (cookie_path[0] == '\"')) {
  ------------------
  |  Branch (229:6): [True: 14.9k, False: 0]
  |  Branch (229:13): [True: 296, False: 14.7k]
  ------------------
  230|    296|    cookie_path++;
  231|    296|    len--;
  232|       |
  233|    296|    if(len && (cookie_path[len - 1] == '\"'))
  ------------------
  |  Branch (233:8): [True: 284, False: 12]
  |  Branch (233:15): [True: 47, False: 237]
  ------------------
  234|     47|      len--;
  235|    296|  }
  236|       |
  237|       |  /* RFC6265 5.2.4 The Path Attribute */
  238|  14.9k|  if(!len || (cookie_path[0] != '/'))
  ------------------
  |  Branch (238:6): [True: 13, False: 14.9k]
  |  Branch (238:14): [True: 786, False: 14.1k]
  ------------------
  239|       |    /* Let cookie-path be the default-path. */
  240|    799|    return curlx_strdup("/");
  ------------------
  |  | 1477|    799|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  241|       |
  242|       |  /* remove trailing slash when path is non-empty */
  243|       |  /* convert /hoge/ to /hoge */
  244|  14.1k|  if(len > 1 && cookie_path[len - 1] == '/')
  ------------------
  |  Branch (244:6): [True: 4.51k, False: 9.68k]
  |  Branch (244:17): [True: 3.66k, False: 843]
  ------------------
  245|  3.66k|    len--;
  246|       |
  247|  14.1k|  return curlx_memdup0(cookie_path, len);
  248|  14.9k|}
cookie.c:parse_netscape:
  646|  12.2k|{
  647|       |  /*
  648|       |   * This line is NOT an HTTP header style line, we do offer support for
  649|       |   * reading the odd netscape cookies-file format here
  650|       |   */
  651|  12.2k|  const char *ptr, *next;
  652|  12.2k|  int fields;
  653|  12.2k|  size_t len;
  654|  12.2k|  *okay = FALSE;
  ------------------
  |  | 1058|  12.2k|#define FALSE false
  ------------------
  655|       |
  656|       |  /*
  657|       |   * In 2008, Internet Explorer introduced HTTP-only cookies to prevent XSS
  658|       |   * attacks. Cookies marked httpOnly are not accessible to JavaScript. In
  659|       |   * Firefox's cookie files, they are prefixed #HttpOnly_ and the rest
  660|       |   * remains as usual, so we skip 10 characters of the line.
  661|       |   */
  662|  12.2k|  if(strncmp(lineptr, "#HttpOnly_", 10) == 0) {
  ------------------
  |  Branch (662:6): [True: 10, False: 12.2k]
  ------------------
  663|     10|    lineptr += 10;
  664|     10|    co->httponly = TRUE;
  ------------------
  |  | 1055|     10|#define TRUE true
  ------------------
  665|     10|  }
  666|       |
  667|  12.2k|  if(lineptr[0] == '#')
  ------------------
  |  Branch (667:6): [True: 42, False: 12.1k]
  ------------------
  668|       |    /* do not even try the comments */
  669|     42|    return CURLE_OK;
  670|       |
  671|       |  /*
  672|       |   * Now loop through the fields and init the struct we already have
  673|       |   * allocated
  674|       |   */
  675|  12.1k|  fields = 0;
  676|  29.7k|  for(next = lineptr; next; fields++) {
  ------------------
  |  Branch (676:23): [True: 17.6k, False: 12.1k]
  ------------------
  677|  17.6k|    ptr = next;
  678|  17.6k|    len = strcspn(ptr, "\t\r\n");
  679|  17.6k|    next = (ptr[len] == '\t' ? &ptr[len + 1] : NULL);
  ------------------
  |  Branch (679:13): [True: 5.43k, False: 12.1k]
  ------------------
  680|  17.6k|    switch(fields) {
  ------------------
  |  Branch (680:12): [True: 13.6k, False: 3.96k]
  ------------------
  681|  12.1k|    case 0:
  ------------------
  |  Branch (681:5): [True: 12.1k, False: 5.43k]
  ------------------
  682|  12.1k|      if(ptr[0] == '.') { /* skip preceding dots */
  ------------------
  |  Branch (682:10): [True: 2, False: 12.1k]
  ------------------
  683|      2|        ptr++;
  684|      2|        len--;
  685|      2|      }
  686|  12.1k|      co->domain = curlx_memdup0(ptr, len);
  687|  12.1k|      if(!co->domain)
  ------------------
  |  Branch (687:10): [True: 0, False: 12.1k]
  ------------------
  688|      0|        return CURLE_OUT_OF_MEMORY;
  689|  12.1k|      break;
  690|  12.1k|    case 1:
  ------------------
  |  Branch (690:5): [True: 425, False: 17.2k]
  ------------------
  691|       |      /*
  692|       |       * flag: A TRUE/FALSE value indicating if all machines within a given
  693|       |       * domain can access the variable. Set TRUE when the cookie says
  694|       |       * .example.com and to false when the domain is complete www.example.com
  695|       |       */
  696|    425|      co->tailmatch = !!curl_strnequal(ptr, "TRUE", len);
  697|    425|      break;
  698|    419|    case 2:
  ------------------
  |  Branch (698:5): [True: 419, False: 17.2k]
  ------------------
  699|       |      /* The file format allows the path field to remain not filled in */
  700|    419|      if(strncmp("TRUE", ptr, len) && strncmp("FALSE", ptr, len)) {
  ------------------
  |  Branch (700:10): [True: 106, False: 313]
  |  Branch (700:39): [True: 105, False: 1]
  ------------------
  701|       |        /* only if the path does not look like a boolean option! */
  702|    105|        co->path = sanitize_cookie_path(ptr, len);
  703|    105|        if(!co->path)
  ------------------
  |  Branch (703:12): [True: 0, False: 105]
  ------------------
  704|      0|          return CURLE_OUT_OF_MEMORY;
  705|    105|        break;
  706|    105|      }
  707|    314|      else {
  708|       |        /* this does not look like a path, make one up! */
  709|    314|        co->path = curlx_strdup("/");
  ------------------
  |  | 1477|    314|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  710|    314|        if(!co->path)
  ------------------
  |  Branch (710:12): [True: 0, False: 314]
  ------------------
  711|      0|          return CURLE_OUT_OF_MEMORY;
  712|    314|      }
  713|    314|      fields++; /* add a field and fall down to secure */
  714|    314|      FALLTHROUGH();
  ------------------
  |  |  821|    314|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  715|    332|    case 3:
  ------------------
  |  Branch (715:5): [True: 18, False: 17.6k]
  ------------------
  716|    332|      co->secure = FALSE;
  ------------------
  |  | 1058|    332|#define FALSE false
  ------------------
  717|    332|      if(curl_strnequal(ptr, "TRUE", len)) {
  ------------------
  |  Branch (717:10): [True: 322, False: 10]
  ------------------
  718|    322|        if(secure || ci->running)
  ------------------
  |  Branch (718:12): [True: 322, False: 0]
  |  Branch (718:22): [True: 0, False: 0]
  ------------------
  719|    322|          co->secure = TRUE;
  ------------------
  |  | 1055|    322|#define TRUE true
  ------------------
  720|      0|        else
  721|      0|          return CURLE_OK;
  722|    322|      }
  723|    332|      break;
  724|    332|    case 4:
  ------------------
  |  Branch (724:5): [True: 323, False: 17.3k]
  ------------------
  725|    323|      if(curlx_str_number(&ptr, &co->expires, CURL_OFF_T_MAX))
  ------------------
  |  |  594|    323|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (725:10): [True: 46, False: 277]
  ------------------
  726|     46|        return CURLE_OK;
  727|    277|      break;
  728|    277|    case 5:
  ------------------
  |  Branch (728:5): [True: 263, False: 17.3k]
  ------------------
  729|    263|      co->name = curlx_memdup0(ptr, len);
  730|    263|      if(!co->name)
  ------------------
  |  Branch (730:10): [True: 0, False: 263]
  ------------------
  731|      0|        return CURLE_OUT_OF_MEMORY;
  732|    263|      else {
  733|       |        /* For Netscape file format cookies we check prefix on the name */
  734|    263|        if(curl_strnequal("__Secure-", co->name, 9))
  ------------------
  |  Branch (734:12): [True: 2, False: 261]
  ------------------
  735|      2|          co->prefix_secure = TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
  736|    261|        else if(curl_strnequal("__Host-", co->name, 7))
  ------------------
  |  Branch (736:17): [True: 4, False: 257]
  ------------------
  737|      4|          co->prefix_host = TRUE;
  ------------------
  |  | 1055|      4|#define TRUE true
  ------------------
  738|    263|      }
  739|    263|      break;
  740|    263|    case 6:
  ------------------
  |  Branch (740:5): [True: 22, False: 17.6k]
  ------------------
  741|     22|      co->value = curlx_memdup0(ptr, len);
  742|     22|      if(!co->value)
  ------------------
  |  Branch (742:10): [True: 0, False: 22]
  ------------------
  743|      0|        return CURLE_OUT_OF_MEMORY;
  744|     22|      break;
  745|  17.6k|    }
  746|  17.6k|  }
  747|  12.1k|  if(fields == 6) {
  ------------------
  |  Branch (747:6): [True: 241, False: 11.9k]
  ------------------
  748|       |    /* we got a cookie with blank contents, fix it */
  749|    241|    co->value = curlx_strdup("");
  ------------------
  |  | 1477|    241|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  750|    241|    if(!co->value)
  ------------------
  |  Branch (750:8): [True: 0, False: 241]
  ------------------
  751|      0|      return CURLE_OUT_OF_MEMORY;
  752|    241|    else
  753|    241|      fields++;
  754|    241|  }
  755|       |
  756|  12.1k|  if(fields != 7)
  ------------------
  |  Branch (756:6): [True: 11.9k, False: 246]
  ------------------
  757|       |    /* we did not find the sufficient number of fields */
  758|  11.9k|    return CURLE_OK;
  759|       |
  760|    246|  *okay = TRUE;
  ------------------
  |  | 1055|    246|#define TRUE true
  ------------------
  761|    246|  return CURLE_OK;
  762|  12.1k|}
cookie.c:remove_expired:
  274|  39.3k|{
  275|  39.3k|  struct Cookie *co;
  276|  39.3k|  curl_off_t now = (curl_off_t)time(NULL);
  277|  39.3k|  unsigned int i;
  278|       |
  279|       |  /*
  280|       |   * If the earliest expiration timestamp in the jar is in the future we can
  281|       |   * skip scanning the whole jar and instead exit early as there will not be
  282|       |   * any cookies to evict. If we need to evict, reset the next_expiration
  283|       |   * counter in order to track the next one. In case the recorded first
  284|       |   * expiration is the max offset, then perform the safe fallback of checking
  285|       |   * all cookies.
  286|       |   */
  287|  39.3k|  if(now < ci->next_expiration &&
  ------------------
  |  Branch (287:6): [True: 38.9k, False: 378]
  ------------------
  288|  38.9k|     ci->next_expiration != CURL_OFF_T_MAX)
  ------------------
  |  |  594|  38.9k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (288:6): [True: 1.43k, False: 37.5k]
  ------------------
  289|  1.43k|    return;
  290|  37.9k|  else
  291|  37.9k|    ci->next_expiration = CURL_OFF_T_MAX;
  ------------------
  |  |  594|  37.9k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  292|       |
  293|  2.42M|  for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  2.42M|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (293:14): [True: 2.38M, False: 37.9k]
  ------------------
  294|  2.38M|    struct Curl_llist_node *n;
  295|  2.38M|    struct Curl_llist_node *e = NULL;
  296|       |
  297|  2.49M|    for(n = Curl_llist_head(&ci->cookielist[i]); n; n = e) {
  ------------------
  |  Branch (297:50): [True: 103k, False: 2.38M]
  ------------------
  298|   103k|      co = Curl_node_elem(n);
  299|   103k|      e = Curl_node_next(n);
  300|   103k|      if(co->expires) {
  ------------------
  |  Branch (300:10): [True: 1.19k, False: 102k]
  ------------------
  301|  1.19k|        if(co->expires < now) {
  ------------------
  |  Branch (301:12): [True: 378, False: 821]
  ------------------
  302|    378|          Curl_node_remove(n);
  303|    378|          freecookie(co, TRUE);
  ------------------
  |  | 1055|    378|#define TRUE true
  ------------------
  304|    378|          ci->numcookies--;
  305|    378|        }
  306|    821|        else if(co->expires < ci->next_expiration)
  ------------------
  |  Branch (306:17): [True: 317, False: 504]
  ------------------
  307|       |          /*
  308|       |           * If this cookie has an expiration timestamp earlier than what we
  309|       |           * have seen so far then record it for the next round of expirations.
  310|       |           */
  311|    317|          ci->next_expiration = co->expires;
  312|  1.19k|      }
  313|   103k|    }
  314|  2.38M|  }
  315|  37.9k|}
cookie.c:is_public_suffix:
  767|  15.9k|{
  768|       |#ifdef USE_LIBPSL
  769|       |  /*
  770|       |   * Check if the domain is a Public Suffix and if yes, ignore the cookie. We
  771|       |   * must also check that the data handle is not NULL since the psl code will
  772|       |   * dereference it.
  773|       |   */
  774|       |  DEBUGF(infof(data, "PSL check set-cookie '%s' for domain=%s in %s",
  775|       |               co->name, co->domain, domain));
  776|       |  if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
  777|       |    bool acceptable = FALSE;
  778|       |    char lcase[256];
  779|       |    char lcookie[256];
  780|       |    size_t dlen = strlen(domain);
  781|       |    size_t clen = strlen(co->domain);
  782|       |
  783|       |    /* trim trailing dots */
  784|       |    if(dlen && (domain[dlen - 1] == '.'))
  785|       |      dlen--;
  786|       |    if(clen && (co->domain[clen - 1] == '.'))
  787|       |      clen--;
  788|       |
  789|       |    if((dlen < sizeof(lcase)) && (clen < sizeof(lcookie))) {
  790|       |      const psl_ctx_t *psl = Curl_psl_use(data);
  791|       |      if(psl) {
  792|       |        /* the PSL check requires lowercase domain name and pattern */
  793|       |        Curl_strntolower(lcase, domain, dlen);
  794|       |        lcase[dlen] = 0;
  795|       |        Curl_strntolower(lcookie, co->domain, clen);
  796|       |        lcookie[clen] = 0;
  797|       |        acceptable = psl_is_cookie_domain_acceptable(psl, lcase, lcookie);
  798|       |        Curl_psl_release(data);
  799|       |      }
  800|       |      else
  801|       |        infof(data, "libpsl problem, rejecting cookie for safety");
  802|       |    }
  803|       |
  804|       |    if(!acceptable) {
  805|       |      infof(data, "cookie '%s' dropped, domain '%s' must not "
  806|       |            "set cookies for '%s'", co->name, domain, co->domain);
  807|       |      return TRUE;
  808|       |    }
  809|       |  }
  810|       |#else
  811|  15.9k|  (void)data;
  812|  15.9k|  (void)co;
  813|  15.9k|  (void)domain;
  814|  15.9k|  DEBUGF(infof(data, "NO PSL to check set-cookie '%s' for domain=%s in %s",
  ------------------
  |  | 1067|   111k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 15.9k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 15.9k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 15.9k]
  |  |  ------------------
  ------------------
  815|  15.9k|               co->name, co->domain, domain));
  816|  15.9k|#endif
  817|       |  return FALSE;
  ------------------
  |  | 1058|  15.9k|#define FALSE false
  ------------------
  818|  15.9k|}
cookie.c:replace_existing:
  826|  15.9k|{
  827|  15.9k|  bool replace_old = FALSE;
  ------------------
  |  | 1058|  15.9k|#define FALSE false
  ------------------
  828|  15.9k|  struct Curl_llist_node *replace_n = NULL;
  829|  15.9k|  struct Curl_llist_node *n;
  830|  15.9k|  size_t myhash = cookiehash(co->domain);
  831|   133k|  for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (831:53): [True: 117k, False: 15.9k]
  ------------------
  832|   117k|    struct Cookie *clist = Curl_node_elem(n);
  833|   117k|    if(!strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (833:8): [True: 24.1k, False: 93.7k]
  ------------------
  834|       |      /* the names are identical */
  835|  24.1k|      bool matching_domains = FALSE;
  ------------------
  |  | 1058|  24.1k|#define FALSE false
  ------------------
  836|       |
  837|  24.1k|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (837:10): [True: 24.0k, False: 40]
  |  Branch (837:27): [True: 24.0k, False: 0]
  ------------------
  838|  24.0k|        if(curl_strequal(clist->domain, co->domain))
  ------------------
  |  Branch (838:12): [True: 24.0k, False: 1]
  ------------------
  839|       |          /* The domains are identical */
  840|  24.0k|          matching_domains = TRUE;
  ------------------
  |  | 1055|  24.0k|#define TRUE true
  ------------------
  841|  24.0k|      }
  842|     40|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (842:15): [True: 40, False: 0]
  |  Branch (842:33): [True: 0, False: 40]
  ------------------
  843|      0|        matching_domains = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  844|       |
  845|  24.1k|      if(matching_domains && /* the domains were identical */
  ------------------
  |  Branch (845:10): [True: 24.0k, False: 41]
  ------------------
  846|  24.0k|         clist->path && co->path && /* both have paths */
  ------------------
  |  Branch (846:10): [True: 24.0k, False: 0]
  |  Branch (846:25): [True: 24.0k, False: 0]
  ------------------
  847|  24.0k|         clist->secure && !co->secure && !secure) {
  ------------------
  |  Branch (847:10): [True: 420, False: 23.6k]
  |  Branch (847:27): [True: 260, False: 160]
  |  Branch (847:42): [True: 0, False: 260]
  ------------------
  848|      0|        size_t cllen;
  849|      0|        const char *sep = NULL;
  850|       |
  851|       |        /*
  852|       |         * A non-secure cookie may not overlay an existing secure cookie.
  853|       |         * For an existing cookie "a" with path "/login", refuse a new
  854|       |         * cookie "a" with for example path "/login/en", while the path
  855|       |         * "/loginhelper" is ok.
  856|       |         */
  857|       |
  858|      0|        DEBUGASSERT(clist->path[0]);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (858:9): [True: 0, False: 0]
  |  Branch (858:9): [True: 0, False: 0]
  ------------------
  859|      0|        if(clist->path[0])
  ------------------
  |  Branch (859:12): [True: 0, False: 0]
  ------------------
  860|      0|          sep = strchr(clist->path + 1, '/');
  861|      0|        if(sep)
  ------------------
  |  Branch (861:12): [True: 0, False: 0]
  ------------------
  862|      0|          cllen = sep - clist->path;
  863|      0|        else
  864|      0|          cllen = strlen(clist->path);
  865|       |
  866|      0|        if(!strncmp(clist->path, co->path, cllen)) {
  ------------------
  |  Branch (866:12): [True: 0, False: 0]
  ------------------
  867|      0|          infof(data, "cookie '%s' for domain '%s' dropped, would "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  868|      0|                "overlay an existing cookie", co->name, co->domain);
  869|      0|          return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  870|      0|        }
  871|      0|      }
  872|  24.1k|    }
  873|       |
  874|   117k|    if(!replace_n && !strcmp(clist->name, co->name)) {
  ------------------
  |  Branch (874:8): [True: 97.9k, False: 19.9k]
  |  Branch (874:22): [True: 21.9k, False: 76.0k]
  ------------------
  875|       |      /* the names are identical */
  876|       |
  877|  21.9k|      if(clist->domain && co->domain) {
  ------------------
  |  Branch (877:10): [True: 21.8k, False: 40]
  |  Branch (877:27): [True: 21.8k, False: 0]
  ------------------
  878|  21.8k|        if(curl_strequal(clist->domain, co->domain) &&
  ------------------
  |  Branch (878:12): [True: 21.8k, False: 1]
  ------------------
  879|  21.8k|           (clist->tailmatch == co->tailmatch))
  ------------------
  |  Branch (879:12): [True: 21.8k, False: 0]
  ------------------
  880|       |          /* The domains are identical */
  881|  21.8k|          replace_old = TRUE;
  ------------------
  |  | 1055|  21.8k|#define TRUE true
  ------------------
  882|  21.8k|      }
  883|     40|      else if(!clist->domain && !co->domain)
  ------------------
  |  Branch (883:15): [True: 40, False: 0]
  |  Branch (883:33): [True: 0, False: 40]
  ------------------
  884|      0|        replace_old = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  885|       |
  886|  21.9k|      if(replace_old) {
  ------------------
  |  Branch (886:10): [True: 21.8k, False: 41]
  ------------------
  887|       |        /* the domains were identical */
  888|       |
  889|  21.8k|        if(clist->path && co->path &&
  ------------------
  |  Branch (889:12): [True: 21.8k, False: 0]
  |  Branch (889:27): [True: 21.8k, False: 0]
  ------------------
  890|  21.8k|           strcmp(clist->path, co->path))
  ------------------
  |  Branch (890:12): [True: 11.6k, False: 10.2k]
  ------------------
  891|  11.6k|          replace_old = FALSE;
  ------------------
  |  | 1058|  11.6k|#define FALSE false
  ------------------
  892|  10.2k|        else if(!clist->path != !co->path)
  ------------------
  |  Branch (892:17): [True: 0, False: 10.2k]
  ------------------
  893|      0|          replace_old = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  894|  21.8k|      }
  895|       |
  896|  21.9k|      if(replace_old && !co->livecookie && clist->livecookie) {
  ------------------
  |  Branch (896:10): [True: 10.2k, False: 11.6k]
  |  Branch (896:25): [True: 0, False: 10.2k]
  |  Branch (896:44): [True: 0, False: 0]
  ------------------
  897|       |        /*
  898|       |         * Both cookies matched fine, except that the already present cookie
  899|       |         * is "live", which means it was set from a header, while the new one
  900|       |         * was read from a file and thus is not "live". "live" cookies are
  901|       |         * preferred so the new cookie is freed.
  902|       |         */
  903|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  904|      0|      }
  905|  21.9k|      if(replace_old)
  ------------------
  |  Branch (905:10): [True: 10.2k, False: 11.6k]
  ------------------
  906|  10.2k|        replace_n = n;
  907|  21.9k|    }
  908|   117k|  }
  909|  15.9k|  if(replace_n) {
  ------------------
  |  Branch (909:6): [True: 10.2k, False: 5.69k]
  ------------------
  910|  10.2k|    struct Cookie *repl = Curl_node_elem(replace_n);
  911|       |
  912|       |    /* when replacing, creationtime is kept from old */
  913|  10.2k|    co->creationtime = repl->creationtime;
  914|       |
  915|       |    /* unlink the old */
  916|  10.2k|    Curl_node_remove(replace_n);
  917|       |
  918|       |    /* free the old cookie */
  919|  10.2k|    freecookie(repl, TRUE);
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  920|  10.2k|  }
  921|  15.9k|  *replacep = replace_old;
  922|       |  return TRUE;
  ------------------
  |  | 1055|  15.9k|#define TRUE true
  ------------------
  923|  15.9k|}
cookie.c:cookiehash:
  212|  31.8k|{
  213|  31.8k|  const char *top;
  214|  31.8k|  size_t len;
  215|       |
  216|  31.8k|  if(!domain || Curl_host_is_ipnum(domain))
  ------------------
  |  Branch (216:6): [True: 2.16k, False: 29.6k]
  |  Branch (216:17): [True: 19.4k, False: 10.2k]
  ------------------
  217|  21.6k|    return 0;
  218|       |
  219|  10.2k|  top = get_top_domain(domain, &len);
  220|  10.2k|  return cookie_hash_domain(top, len);
  221|  31.8k|}
cookie.c:get_top_domain:
  162|  10.2k|{
  163|  10.2k|  size_t len = 0;
  164|  10.2k|  const char *first = NULL, *last;
  165|       |
  166|  10.2k|  if(domain) {
  ------------------
  |  Branch (166:6): [True: 10.2k, False: 0]
  ------------------
  167|  10.2k|    len = strlen(domain);
  168|  10.2k|    last = memrchr(domain, '.', len);
  169|  10.2k|    if(last) {
  ------------------
  |  Branch (169:8): [True: 6.46k, False: 3.74k]
  ------------------
  170|  6.46k|      first = memrchr(domain, '.', (last - domain));
  171|  6.46k|      if(first)
  ------------------
  |  Branch (171:10): [True: 914, False: 5.54k]
  ------------------
  172|    914|        len -= (++first - domain);
  173|  6.46k|    }
  174|  10.2k|  }
  175|       |
  176|  10.2k|  if(outlen)
  ------------------
  |  Branch (176:6): [True: 10.2k, False: 0]
  ------------------
  177|  10.2k|    *outlen = len;
  178|       |
  179|  10.2k|  return first ? first : domain;
  ------------------
  |  Branch (179:10): [True: 914, False: 9.29k]
  ------------------
  180|  10.2k|}
cookie.c:cookie_hash_domain:
  191|  10.2k|{
  192|  10.2k|  const char *end = domain + len;
  193|  10.2k|  size_t h = 5381;
  194|       |
  195|  48.3k|  while(domain < end) {
  ------------------
  |  Branch (195:9): [True: 38.1k, False: 10.2k]
  ------------------
  196|  38.1k|    size_t j = (size_t)Curl_raw_toupper(*domain++);
  197|  38.1k|    h += h << 5;
  198|  38.1k|    h ^= j;
  199|  38.1k|  }
  200|       |
  201|  10.2k|  return (h % COOKIE_HASH_SIZE);
  ------------------
  |  |   54|  10.2k|#define COOKIE_HASH_SIZE 63
  ------------------
  202|  10.2k|}
cookie.c:freecookie:
   64|  35.7k|{
   65|  35.7k|  curlx_free(co->domain);
  ------------------
  |  | 1483|  35.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  35.7k|  curlx_free(co->path);
  ------------------
  |  | 1483|  35.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  35.7k|  curlx_free(co->name);
  ------------------
  |  | 1483|  35.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   68|  35.7k|  curlx_free(co->value);
  ------------------
  |  | 1483|  35.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   69|  35.7k|  if(maintoo)
  ------------------
  |  Branch (69:6): [True: 15.9k, False: 19.8k]
  ------------------
   70|  15.9k|    curlx_free(co);
  ------------------
  |  | 1483|  15.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   71|  35.7k|}
cookie.c:cookie_load:
 1090|  11.7k|{
 1091|  11.7k|  FILE *handle = NULL;
 1092|  11.7k|  CURLcode result = CURLE_OK;
 1093|  11.7k|  FILE *fp = NULL;
 1094|  11.7k|  DEBUGASSERT(ci);
  ------------------
  |  | 1081|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1094:3): [True: 0, False: 11.7k]
  |  Branch (1094:3): [True: 11.7k, False: 0]
  ------------------
 1095|  11.7k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1095:3): [True: 0, False: 11.7k]
  |  Branch (1095:3): [True: 11.7k, False: 0]
  ------------------
 1096|  11.7k|  DEBUGASSERT(file);
  ------------------
  |  | 1081|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1096:3): [True: 0, False: 11.7k]
  |  Branch (1096:3): [True: 11.7k, False: 0]
  ------------------
 1097|       |
 1098|  11.7k|  ci->newsession = newsession; /* new session? */
 1099|  11.7k|  ci->running = FALSE; /* this is not running, this is init */
  ------------------
  |  | 1058|  11.7k|#define FALSE false
  ------------------
 1100|       |
 1101|  11.7k|  if(file && *file) {
  ------------------
  |  Branch (1101:6): [True: 11.7k, False: 0]
  |  Branch (1101:14): [True: 11.7k, False: 0]
  ------------------
 1102|  11.7k|    if(!strcmp(file, "-"))
  ------------------
  |  Branch (1102:8): [True: 0, False: 11.7k]
  ------------------
 1103|      0|      fp = stdin;
 1104|  11.7k|    else {
 1105|  11.7k|      fp = curlx_fopen(file, "rb");
  ------------------
  |  |   74|  11.7k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
 1106|  11.7k|      if(!fp)
  ------------------
  |  Branch (1106:10): [True: 0, False: 11.7k]
  ------------------
 1107|      0|        infof(data, "WARNING: failed to open cookie file \"%s\"", file);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1108|  11.7k|      else {
 1109|  11.7k|        curlx_struct_stat stat;
  ------------------
  |  |   63|  11.7k|#define curlx_struct_stat       struct stat
  ------------------
 1110|  11.7k|        if((curlx_fstat(fileno(fp), &stat) != -1) && S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  11.7k|#define curlx_fstat             fstat
  ------------------
  |  Branch (1110:12): [True: 11.7k, False: 0]
  |  Branch (1110:54): [True: 0, False: 11.7k]
  ------------------
 1111|      0|          curlx_fclose(fp);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1112|      0|          fp = NULL;
 1113|      0|          infof(data, "WARNING: cookie filename points to a directory: \"%s\"",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1114|      0|                file);
 1115|      0|        }
 1116|  11.7k|        else
 1117|  11.7k|          handle = fp;
 1118|  11.7k|      }
 1119|  11.7k|    }
 1120|  11.7k|  }
 1121|       |
 1122|  11.7k|  if(fp) {
  ------------------
  |  Branch (1122:6): [True: 11.7k, False: 0]
  ------------------
 1123|  11.7k|    struct dynbuf buf;
 1124|  11.7k|    bool eof = FALSE;
  ------------------
  |  | 1058|  11.7k|#define FALSE false
  ------------------
 1125|  11.7k|    curlx_dyn_init(&buf, MAX_COOKIE_LINE);
  ------------------
  |  |   81|  11.7k|#define MAX_COOKIE_LINE 5000
  ------------------
 1126|  11.7k|    do {
 1127|  11.7k|      result = Curl_get_line(&buf, fp, &eof);
 1128|  11.7k|      if(!result) {
  ------------------
  |  Branch (1128:10): [True: 11.7k, False: 0]
  ------------------
 1129|  11.7k|        const char *lineptr = curlx_dyn_ptr(&buf);
 1130|  11.7k|        bool headerline = FALSE;
  ------------------
  |  | 1058|  11.7k|#define FALSE false
  ------------------
 1131|  11.7k|        if(checkprefix("Set-Cookie:", lineptr)) {
  ------------------
  |  |   33|  11.7k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  11.7k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 11.7k]
  |  |  ------------------
  ------------------
 1132|       |          /* This is a cookie line, get it! */
 1133|      0|          lineptr += 11;
 1134|      0|          headerline = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1135|      0|          curlx_str_passblanks(&lineptr);
 1136|      0|        }
 1137|       |
 1138|  11.7k|        result = Curl_cookie_add(data, ci, headerline, TRUE, lineptr, NULL,
  ------------------
  |  | 1055|  11.7k|#define TRUE true
  ------------------
 1139|  11.7k|                                 NULL, TRUE);
  ------------------
  |  | 1055|  11.7k|#define TRUE true
  ------------------
 1140|       |        /* File reading cookie failures are not propagated back to the
 1141|       |           caller because there is no way to do that */
 1142|  11.7k|      }
 1143|  11.7k|    } while(!result && !eof);
  ------------------
  |  Branch (1143:13): [True: 11.7k, False: 0]
  |  Branch (1143:24): [True: 0, False: 11.7k]
  ------------------
 1144|  11.7k|    curlx_dyn_free(&buf); /* free the line buffer */
 1145|       |
 1146|       |    /*
 1147|       |     * Remove expired cookies from the hash. We must make sure to run this
 1148|       |     * after reading the file, and not on every cookie.
 1149|       |     */
 1150|  11.7k|    remove_expired(ci);
 1151|       |
 1152|  11.7k|    if(handle)
  ------------------
  |  Branch (1152:8): [True: 11.7k, False: 0]
  ------------------
 1153|  11.7k|      curlx_fclose(handle);
  ------------------
  |  |   79|  11.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1154|  11.7k|  }
 1155|  11.7k|  data->state.cookie_engine = TRUE;
  ------------------
  |  | 1055|  11.7k|#define TRUE true
  ------------------
 1156|  11.7k|  ci->running = TRUE; /* now, we are running */
  ------------------
  |  | 1055|  11.7k|#define TRUE true
  ------------------
 1157|       |
 1158|  11.7k|  return result;
 1159|  11.7k|}
cookie.c:get_netscape_format:
 1435|  4.18k|{
 1436|  4.18k|  return curl_maprintf(
 1437|  4.18k|    "%s"               /* httponly preamble */
 1438|  4.18k|    "%s%s\t"           /* domain */
 1439|  4.18k|    "%s\t"             /* tailmatch */
 1440|  4.18k|    "%s\t"             /* path */
 1441|  4.18k|    "%s\t"             /* secure */
 1442|  4.18k|    "%" FMT_OFF_T "\t" /* expires */
 1443|  4.18k|    "%s\t"             /* name */
 1444|  4.18k|    "%s",              /* value */
 1445|  4.18k|    co->httponly ? "#HttpOnly_" : "",
  ------------------
  |  Branch (1445:5): [True: 1, False: 4.18k]
  ------------------
 1446|       |    /*
 1447|       |     * Make sure all domains are prefixed with a dot if they allow
 1448|       |     * tailmatching. This is Mozilla-style.
 1449|       |     */
 1450|  4.18k|    (co->tailmatch && co->domain && co->domain[0] != '.') ? "." : "",
  ------------------
  |  Branch (1450:6): [True: 137, False: 4.04k]
  |  Branch (1450:23): [True: 137, False: 0]
  |  Branch (1450:37): [True: 137, False: 0]
  ------------------
 1451|  4.18k|    co->domain ? co->domain : "unknown",
  ------------------
  |  Branch (1451:5): [True: 4.18k, False: 0]
  ------------------
 1452|  4.18k|    co->tailmatch ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1452:5): [True: 137, False: 4.04k]
  ------------------
 1453|  4.18k|    co->path ? co->path : "/",
  ------------------
  |  Branch (1453:5): [True: 4.18k, False: 0]
  ------------------
 1454|  4.18k|    co->secure ? "TRUE" : "FALSE",
  ------------------
  |  Branch (1454:5): [True: 233, False: 3.95k]
  ------------------
 1455|  4.18k|    co->expires,
 1456|  4.18k|    co->name,
 1457|  4.18k|    co->value ? co->value : "");
  ------------------
  |  Branch (1457:5): [True: 4.18k, False: 0]
  ------------------
 1458|  4.18k|}
cookie.c:cookie_output:
 1471|  11.7k|{
 1472|  11.7k|  FILE *out = NULL;
 1473|  11.7k|  bool use_stdout = FALSE;
  ------------------
  |  | 1058|  11.7k|#define FALSE false
  ------------------
 1474|  11.7k|  char *tempstore = NULL;
 1475|  11.7k|  CURLcode result = CURLE_OK;
 1476|       |
 1477|  11.7k|  if(!ci)
  ------------------
  |  Branch (1477:6): [True: 0, False: 11.7k]
  ------------------
 1478|       |    /* no cookie engine alive */
 1479|      0|    return CURLE_OK;
 1480|       |
 1481|       |  /* at first, remove expired cookies */
 1482|  11.7k|  remove_expired(ci);
 1483|       |
 1484|  11.7k|  if(!strcmp("-", filename)) {
  ------------------
  |  Branch (1484:6): [True: 0, False: 11.7k]
  ------------------
 1485|       |    /* use stdout */
 1486|      0|    out = stdout;
 1487|      0|    use_stdout = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1488|      0|  }
 1489|  11.7k|  else {
 1490|  11.7k|    result = Curl_fopen(data, filename, &out, &tempstore);
 1491|  11.7k|    if(result)
  ------------------
  |  Branch (1491:8): [True: 0, False: 11.7k]
  ------------------
 1492|      0|      goto error;
 1493|  11.7k|  }
 1494|       |
 1495|  11.7k|  fputs("# Netscape HTTP Cookie File\n"
 1496|  11.7k|        "# https://curl.se/docs/http-cookies.html\n"
 1497|  11.7k|        "# This file was generated by libcurl! Edit at your own risk.\n\n",
 1498|  11.7k|        out);
 1499|       |
 1500|  11.7k|  if(ci->numcookies) {
  ------------------
  |  Branch (1500:6): [True: 888, False: 10.8k]
  ------------------
 1501|    888|    unsigned int i;
 1502|    888|    size_t nvalid = 0;
 1503|    888|    struct Cookie **array;
 1504|    888|    struct Curl_llist_node *n;
 1505|       |
 1506|    888|    array = curlx_calloc(1, sizeof(struct Cookie *) * ci->numcookies);
  ------------------
  |  | 1480|    888|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1507|    888|    if(!array) {
  ------------------
  |  Branch (1507:8): [True: 0, False: 888]
  ------------------
 1508|      0|      result = CURLE_OUT_OF_MEMORY;
 1509|      0|      goto error;
 1510|      0|    }
 1511|       |
 1512|       |    /* only sort the cookies with a domain property */
 1513|  56.8k|    for(i = 0; i < COOKIE_HASH_SIZE; i++) {
  ------------------
  |  |   54|  56.8k|#define COOKIE_HASH_SIZE 63
  ------------------
  |  Branch (1513:16): [True: 55.9k, False: 888]
  ------------------
 1514|  60.1k|      for(n = Curl_llist_head(&ci->cookielist[i]); n; n = Curl_node_next(n)) {
  ------------------
  |  Branch (1514:52): [True: 4.19k, False: 55.9k]
  ------------------
 1515|  4.19k|        struct Cookie *co = Curl_node_elem(n);
 1516|  4.19k|        if(!co->domain)
  ------------------
  |  Branch (1516:12): [True: 10, False: 4.18k]
  ------------------
 1517|     10|          continue;
 1518|  4.18k|        array[nvalid++] = co;
 1519|  4.18k|      }
 1520|  55.9k|    }
 1521|       |
 1522|    888|    qsort(array, nvalid, sizeof(struct Cookie *), cookie_sort_ct);
 1523|       |
 1524|  5.07k|    for(i = 0; i < nvalid; i++) {
  ------------------
  |  Branch (1524:16): [True: 4.18k, False: 888]
  ------------------
 1525|  4.18k|      char *format_ptr = get_netscape_format(array[i]);
 1526|  4.18k|      if(!format_ptr) {
  ------------------
  |  Branch (1526:10): [True: 0, False: 4.18k]
  ------------------
 1527|      0|        curlx_free(array);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1528|      0|        result = CURLE_OUT_OF_MEMORY;
 1529|      0|        goto error;
 1530|      0|      }
 1531|  4.18k|      curl_mfprintf(out, "%s\n", format_ptr);
 1532|  4.18k|      curlx_free(format_ptr);
  ------------------
  |  | 1483|  4.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1533|  4.18k|    }
 1534|       |
 1535|    888|    curlx_free(array);
  ------------------
  |  | 1483|    888|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1536|    888|  }
 1537|       |
 1538|  11.7k|  if(!use_stdout) {
  ------------------
  |  Branch (1538:6): [True: 11.7k, False: 0]
  ------------------
 1539|  11.7k|    curlx_fclose(out);
  ------------------
  |  |   79|  11.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1540|  11.7k|    out = NULL;
 1541|  11.7k|    if(tempstore && curlx_rename(tempstore, filename)) {
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (1541:8): [True: 0, False: 11.7k]
  |  Branch (1541:21): [True: 0, False: 0]
  ------------------
 1542|      0|      result = CURLE_WRITE_ERROR;
 1543|      0|      goto error;
 1544|      0|    }
 1545|  11.7k|  }
 1546|       |
 1547|       |  /*
 1548|       |   * If we reach here we have successfully written a cookie file so there is
 1549|       |   * no need to inspect the error, any error case should have jumped into the
 1550|       |   * error block below.
 1551|       |   */
 1552|  11.7k|  curlx_free(tempstore);
  ------------------
  |  | 1483|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1553|  11.7k|  return CURLE_OK;
 1554|       |
 1555|      0|error:
 1556|      0|  if(out && !use_stdout)
  ------------------
  |  Branch (1556:6): [True: 0, False: 0]
  |  Branch (1556:13): [True: 0, False: 0]
  ------------------
 1557|      0|    curlx_fclose(out);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
 1558|      0|  if(tempstore) {
  ------------------
  |  Branch (1558:6): [True: 0, False: 0]
  ------------------
 1559|      0|    unlink(tempstore);
 1560|      0|    curlx_free(tempstore);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1561|      0|  }
 1562|      0|  return result;
 1563|  11.7k|}
cookie.c:cookie_sort_ct:
 1234|  7.96k|{
 1235|  7.96k|  const struct Cookie *c1 = *(const struct Cookie * const *)p1;
 1236|  7.96k|  const struct Cookie *c2 = *(const struct Cookie * const *)p2;
 1237|       |
 1238|  7.96k|  return (c2->creationtime > c1->creationtime) ? 1 : -1;
  ------------------
  |  Branch (1238:10): [True: 5.67k, False: 2.28k]
  ------------------
 1239|  7.96k|}

Curl_creds_create:
   41|  29.7k|{
   42|  29.7k|  struct Curl_creds *creds = NULL;
   43|  29.7k|  size_t ulen = user ? strlen(user) : 0;
  ------------------
  |  Branch (43:17): [True: 24.2k, False: 5.49k]
  ------------------
   44|  29.7k|  size_t plen = passwd ? strlen(passwd) : 0;
  ------------------
  |  Branch (44:17): [True: 24.9k, False: 4.79k]
  ------------------
   45|  29.7k|  size_t olen = oauth_bearer ? strlen(oauth_bearer) : 0;
  ------------------
  |  Branch (45:17): [True: 22.9k, False: 6.72k]
  ------------------
   46|  29.7k|  size_t salen = sasl_authzid ? strlen(sasl_authzid) : 0;
  ------------------
  |  Branch (46:18): [True: 19.3k, False: 10.3k]
  ------------------
   47|  29.7k|  size_t sslen = sasl_service ? strlen(sasl_service) : 0;
  ------------------
  |  Branch (47:18): [True: 19.2k, False: 10.4k]
  ------------------
   48|  29.7k|  char *s, *buf;
   49|  29.7k|  CURLcode result = CURLE_OK;
   50|       |
   51|  29.7k|  Curl_creds_unlink(pcreds);
   52|       |
   53|       |  /* Everything empty/NULL, this is the NULL credential */
   54|  29.7k|  if(!ulen && !plen && !olen && !salen && !sslen)
  ------------------
  |  Branch (54:6): [True: 22.8k, False: 6.87k]
  |  Branch (54:15): [True: 13.1k, False: 9.72k]
  |  Branch (54:24): [True: 10.7k, False: 2.32k]
  |  Branch (54:33): [True: 10.6k, False: 116]
  |  Branch (54:43): [True: 10.5k, False: 107]
  ------------------
   55|  10.5k|    goto out;
   56|       |
   57|  19.1k|  if((ulen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  19.1k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (57:6): [True: 0, False: 19.1k]
  ------------------
   58|  19.1k|     (plen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  19.1k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (58:6): [True: 0, False: 19.1k]
  ------------------
   59|  19.1k|     (olen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  19.1k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (59:6): [True: 0, False: 19.1k]
  ------------------
   60|  19.1k|     (salen > CURL_MAX_INPUT_LENGTH) ||
  ------------------
  |  |   45|  19.1k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (60:6): [True: 0, False: 19.1k]
  ------------------
   61|  19.1k|     (sslen > CURL_MAX_INPUT_LENGTH)) {
  ------------------
  |  |   45|  19.1k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (61:6): [True: 0, False: 19.1k]
  ------------------
   62|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
   63|      0|    goto out;
   64|      0|  }
   65|       |
   66|       |  /* null-terminator for user already part of struct */
   67|  19.1k|  creds = curlx_calloc(1, sizeof(*creds) +
  ------------------
  |  | 1480|  19.1k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   68|  19.1k|                       ulen + plen + 1 + olen + 1 + salen + 1 + sslen + 1);
   69|  19.1k|  if(!creds) {
  ------------------
  |  Branch (69:6): [True: 0, False: 19.1k]
  ------------------
   70|      0|    result = CURLE_OUT_OF_MEMORY;
   71|      0|    goto out;
   72|      0|  }
   73|       |
   74|  19.1k|  creds->refcount = 1;
   75|  19.1k|  creds->source = source;
   76|       |  /* Some compilers try to be too smart about our dynamic struct size */
   77|  19.1k|  buf = ((char *)creds) + offsetof(struct Curl_creds, buf);
   78|  19.1k|  creds->user = s = buf;
   79|  19.1k|  if(ulen)
  ------------------
  |  Branch (79:6): [True: 6.87k, False: 12.2k]
  ------------------
   80|  6.87k|    memcpy(s, user, ulen + 1);
   81|  19.1k|  creds->passwd = s = buf + ulen + 1;
   82|  19.1k|  if(plen)
  ------------------
  |  Branch (82:6): [True: 10.4k, False: 8.70k]
  ------------------
   83|  10.4k|    memcpy(s, passwd, plen + 1);
   84|  19.1k|  creds->oauth_bearer = s = buf + ulen + 1 + plen + 1;
   85|  19.1k|  if(olen)
  ------------------
  |  Branch (85:6): [True: 2.81k, False: 16.3k]
  ------------------
   86|  2.81k|    memcpy(s, oauth_bearer, olen + 1);
   87|  19.1k|  creds->sasl_authzid = s = buf + ulen + 1 + plen + 1 + olen + 1;
   88|  19.1k|  if(salen)
  ------------------
  |  Branch (88:6): [True: 192, False: 18.9k]
  ------------------
   89|    192|    memcpy(s, sasl_authzid, salen + 1);
   90|  19.1k|  creds->sasl_service = s = buf + ulen + 1 + plen + 1 + olen + 1 + salen + 1;
   91|  19.1k|  if(sslen)
  ------------------
  |  Branch (91:6): [True: 180, False: 18.9k]
  ------------------
   92|    180|    memcpy(s, sasl_service, sslen + 1);
   93|       |
   94|  29.7k|out:
   95|  29.7k|  if(!result)
  ------------------
  |  Branch (95:6): [True: 29.7k, False: 0]
  ------------------
   96|  29.7k|    *pcreds = creds;
   97|      0|  else
   98|      0|    Curl_creds_unlink(&creds);
   99|  29.7k|  return result;
  100|  19.1k|}
Curl_creds_merge:
  107|  19.1k|{
  108|  19.1k|  struct Curl_creds *creds_out = NULL;
  109|  19.1k|  CURLcode result;
  110|       |
  111|  19.1k|  if(!user || !user[0])
  ------------------
  |  Branch (111:6): [True: 14.3k, False: 4.79k]
  |  Branch (111:15): [True: 699, False: 4.09k]
  ------------------
  112|  15.0k|    user = Curl_creds_user(creds_in);
  ------------------
  |  |   75|  15.0k|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 5.92k, False: 9.09k]
  |  |  ------------------
  ------------------
  113|  19.1k|  if(!passwd || !passwd[0])
  ------------------
  |  Branch (113:6): [True: 18.7k, False: 384]
  |  Branch (113:17): [True: 216, False: 168]
  ------------------
  114|  18.9k|    passwd = Curl_creds_passwd(creds_in);
  ------------------
  |  |   76|  18.9k|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 6.27k, False: 12.6k]
  |  |  ------------------
  ------------------
  115|  19.1k|  result = Curl_creds_create(user, passwd,
  116|  19.1k|                             Curl_creds_oauth_bearer(creds_in),
  ------------------
  |  |   77|  19.1k|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (77:43): [True: 6.27k, False: 12.8k]
  |  |  ------------------
  ------------------
  117|  19.1k|                             Curl_creds_sasl_authzid(creds_in),
  ------------------
  |  |   78|  19.1k|#define Curl_creds_sasl_authzid(c)       ((c) ? (c)->sasl_authzid : "")
  |  |  ------------------
  |  |  |  Branch (78:43): [True: 6.27k, False: 12.8k]
  |  |  ------------------
  ------------------
  118|  19.1k|                             Curl_creds_sasl_service(creds_in),
  ------------------
  |  |   79|  19.1k|#define Curl_creds_sasl_service(c)       ((c) ? (c)->sasl_service : "")
  |  |  ------------------
  |  |  |  Branch (79:43): [True: 6.27k, False: 12.8k]
  |  |  ------------------
  ------------------
  119|  19.1k|                             source, &creds_out);
  120|  19.1k|  Curl_creds_link(pcreds_out, creds_out);
  121|  19.1k|  Curl_creds_unlink(&creds_out);
  122|  19.1k|  return result;
  123|  19.1k|}
Curl_creds_link:
  126|  68.6k|{
  127|  68.6k|  if(*pdest != src) {
  ------------------
  |  Branch (127:6): [True: 30.5k, False: 38.1k]
  ------------------
  128|  30.5k|    Curl_creds_unlink(pdest);
  129|  30.5k|    *pdest = src;
  130|  30.5k|    if(src) {
  ------------------
  |  Branch (130:8): [True: 30.5k, False: 0]
  ------------------
  131|  30.5k|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1081|  30.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:7): [True: 0, False: 30.5k]
  |  Branch (131:7): [True: 30.5k, False: 0]
  ------------------
  132|  30.5k|      src->refcount++;
  133|  30.5k|    }
  134|  30.5k|  }
  135|  68.6k|}
Curl_creds_unlink:
  138|   233k|{
  139|   233k|  if(*pcreds) {
  ------------------
  |  Branch (139:6): [True: 49.6k, False: 184k]
  ------------------
  140|  49.6k|    struct Curl_creds *creds = *pcreds;
  141|       |
  142|  49.6k|    DEBUGASSERT(creds->refcount);
  ------------------
  |  | 1081|  49.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (142:5): [True: 0, False: 49.6k]
  |  Branch (142:5): [True: 49.6k, False: 0]
  ------------------
  143|  49.6k|    *pcreds = NULL;
  144|  49.6k|    if(creds->refcount)
  ------------------
  |  Branch (144:8): [True: 49.6k, False: 0]
  ------------------
  145|  49.6k|      creds->refcount--;
  146|  49.6k|    if(!creds->refcount) {
  ------------------
  |  Branch (146:8): [True: 19.1k, False: 30.5k]
  ------------------
  147|  19.1k|      curlx_free(creds);
  ------------------
  |  | 1483|  19.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  148|  19.1k|    }
  149|  49.6k|  }
  150|   233k|}
Curl_creds_same:
  153|  10.3k|{
  154|  10.3k|  return (c1 == c2) ||
  ------------------
  |  Branch (154:10): [True: 2.31k, False: 8.00k]
  ------------------
  155|  8.00k|         (c1 && c2 &&
  ------------------
  |  Branch (155:11): [True: 7.98k, False: 12]
  |  Branch (155:17): [True: 7.98k, False: 3]
  ------------------
  156|  7.98k|          !Curl_timestrcmp(c1->user, c2->user) &&
  ------------------
  |  Branch (156:11): [True: 7.97k, False: 11]
  ------------------
  157|  7.97k|          !Curl_timestrcmp(c1->passwd, c2->passwd) &&
  ------------------
  |  Branch (157:11): [True: 7.97k, False: 0]
  ------------------
  158|  7.97k|          !Curl_timestrcmp(c1->oauth_bearer, c2->oauth_bearer) &&
  ------------------
  |  Branch (158:11): [True: 7.97k, False: 0]
  ------------------
  159|  7.97k|          !Curl_timestrcmp(c1->sasl_authzid, c2->sasl_authzid) &&
  ------------------
  |  Branch (159:11): [True: 7.97k, False: 0]
  ------------------
  160|  7.97k|          !Curl_timestrcmp(c1->sasl_service, c2->sasl_service));
  ------------------
  |  Branch (160:11): [True: 7.97k, False: 0]
  ------------------
  161|  10.3k|}
Curl_creds_trace:
  166|  21.5k|{
  167|  21.5k|  if(creds) {
  ------------------
  |  Branch (167:6): [True: 12.5k, False: 9.04k]
  ------------------
  168|  12.5k|    CURL_TRC_M(data, "%s: user=%s, passwd=%s, "
  ------------------
  |  |  148|  12.5k|  do {                                   \
  |  |  149|  12.5k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  12.5k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  12.5k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  25.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 12.5k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 12.5k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  25.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  12.5k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  12.5k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  12.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 12.5k]
  |  |  ------------------
  ------------------
  169|  12.5k|               "sasl_authzid=%s, oauth_bearer=%s, source=%d",
  170|  12.5k|               msg,
  171|  12.5k|               Curl_creds_user(creds),
  172|  12.5k|               Curl_creds_has_passwd(creds) ? "***" : "",
  173|  12.5k|               Curl_creds_sasl_authzid(creds),
  174|  12.5k|               Curl_creds_has_oauth_bearer(creds) ? "***" : "",
  175|  12.5k|               creds->source);
  176|  12.5k|  }
  177|  9.04k|  else
  178|  9.04k|    CURL_TRC_M(data, "%s: -", msg);
  ------------------
  |  |  148|  9.04k|  do {                                   \
  |  |  149|  9.04k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  9.04k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  9.04k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  18.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 9.04k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.04k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  18.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  9.04k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  9.04k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  9.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 9.04k]
  |  |  ------------------
  ------------------
  179|  21.5k|}

Curl_cshutdn_run_once:
  113|  4.52k|{
  114|  4.52k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  4.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 4.52k]
  |  Branch (114:3): [True: 4.52k, False: 0]
  ------------------
  115|  4.52k|  Curl_attach_connection(data, conn);
  116|  4.52k|  cshutdn_run_once(data, conn, done);
  117|  4.52k|  CURL_TRC_M(data, "[SHUTDOWN] shutdown, done=%d", *done);
  ------------------
  |  |  148|  4.52k|  do {                                   \
  |  |  149|  4.52k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  4.52k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  4.52k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  9.05k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 4.52k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.52k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  9.05k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  4.52k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  4.52k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  4.52k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 4.52k]
  |  |  ------------------
  ------------------
  118|  4.52k|  Curl_detach_connection(data);
  119|  4.52k|}
Curl_cshutdn_terminate:
  124|  11.0k|{
  125|  11.0k|  struct Curl_easy *admin = data;
  126|  11.0k|  bool done;
  127|       |
  128|       |  /* there must be a connection to close */
  129|  11.0k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 0, False: 11.0k]
  |  Branch (129:3): [True: 11.0k, False: 0]
  ------------------
  130|       |  /* it must be removed from the connection pool */
  131|  11.0k|  DEBUGASSERT(!conn->bits.in_cpool);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (131:3): [True: 0, False: 11.0k]
  |  Branch (131:3): [True: 11.0k, False: 0]
  ------------------
  132|       |  /* the transfer must be detached from the connection */
  133|  11.0k|  DEBUGASSERT(data && !data->conn);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (133:3): [True: 0, False: 11.0k]
  |  Branch (133:3): [True: 0, False: 0]
  |  Branch (133:3): [True: 11.0k, False: 0]
  |  Branch (133:3): [True: 11.0k, False: 0]
  ------------------
  134|       |
  135|       |  /* If we can obtain an internal admin handle, use that to attach
  136|       |   * and terminate the connection. Some protocol will try to mess with
  137|       |   * `data` during shutdown and we do not want that with a `data` from
  138|       |   * the application. */
  139|  11.0k|  if(data->multi && data->multi->admin)
  ------------------
  |  Branch (139:6): [True: 11.0k, False: 0]
  |  Branch (139:21): [True: 11.0k, False: 0]
  ------------------
  140|  11.0k|    admin = data->multi->admin;
  141|       |
  142|  11.0k|  Curl_attach_connection(admin, conn);
  143|       |
  144|  11.0k|  cshutdn_run_conn_handler(admin, conn);
  145|  11.0k|  if(do_shutdown) {
  ------------------
  |  Branch (145:6): [True: 0, False: 11.0k]
  ------------------
  146|       |    /* Make a last attempt to shutdown handlers and filters, if
  147|       |     * not done so already. */
  148|      0|    cshutdn_run_once(admin, conn, &done);
  149|      0|  }
  150|  11.0k|  CURL_TRC_M(admin, "[SHUTDOWN] %sclosing connection #%" FMT_OFF_T,
  ------------------
  |  |  148|  11.0k|  do {                                   \
  |  |  149|  11.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  151|  11.0k|             conn->bits.shutdown_filters ? "" : "force ",
  152|  11.0k|             conn->connection_id);
  153|  11.0k|  Curl_conn_close(admin, SECONDARYSOCKET);
  ------------------
  |  |  304|  11.0k|#define SECONDARYSOCKET 1
  ------------------
  154|  11.0k|  Curl_conn_close(admin, FIRSTSOCKET);
  ------------------
  |  |  303|  11.0k|#define FIRSTSOCKET     0
  ------------------
  155|  11.0k|  Curl_detach_connection(admin);
  156|       |
  157|  11.0k|  if(data->multi)
  ------------------
  |  Branch (157:6): [True: 11.0k, False: 0]
  ------------------
  158|  11.0k|    Curl_multi_ev_conn_done(data->multi, data, conn);
  159|  11.0k|  Curl_conn_free(admin, conn);
  160|       |
  161|  11.0k|  if(data->multi) {
  ------------------
  |  Branch (161:6): [True: 11.0k, False: 0]
  ------------------
  162|  11.0k|    CURL_TRC_M(data, "[SHUTDOWN] trigger multi connchanged");
  ------------------
  |  |  148|  11.0k|  do {                                   \
  |  |  149|  11.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  163|  11.0k|    Curl_multi_connchanged(data->multi);
  164|  11.0k|  }
  165|  11.0k|}
Curl_cshutdn_init:
  321|  15.3k|{
  322|  15.3k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (322:3): [True: 0, False: 15.3k]
  |  Branch (322:3): [True: 15.3k, False: 0]
  ------------------
  323|  15.3k|  cshutdn->multi = multi;
  324|  15.3k|  Curl_llist_init(&cshutdn->list, NULL);
  325|       |  cshutdn->initialized = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  326|  15.3k|  return 0; /* good */
  327|  15.3k|}
Curl_cshutdn_destroy:
  331|  15.3k|{
  332|  15.3k|  if(cshutdn->initialized && data) {
  ------------------
  |  Branch (332:6): [True: 15.3k, False: 0]
  |  Branch (332:30): [True: 15.3k, False: 0]
  ------------------
  333|  15.3k|    int timeout_ms = 0;
  334|       |    /* for testing, run graceful shutdown */
  335|  15.3k|#ifdef DEBUGBUILD
  336|  15.3k|    {
  337|  15.3k|      const char *p = getenv("CURL_GRACEFUL_SHUTDOWN");
  338|  15.3k|      if(p) {
  ------------------
  |  Branch (338:10): [True: 0, False: 15.3k]
  ------------------
  339|      0|        curl_off_t l;
  340|      0|        if(!curlx_str_number(&p, &l, INT_MAX))
  ------------------
  |  Branch (340:12): [True: 0, False: 0]
  ------------------
  341|      0|          timeout_ms = (int)l;
  342|      0|      }
  343|  15.3k|    }
  344|  15.3k|#endif
  345|       |
  346|  15.3k|    CURL_TRC_M(data, "[SHUTDOWN] destroy, %zu connections, timeout=%dms",
  ------------------
  |  |  148|  15.3k|  do {                                   \
  |  |  149|  15.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  15.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  15.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  30.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  30.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  15.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  15.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  347|  15.3k|               Curl_llist_count(&cshutdn->list), timeout_ms);
  348|  15.3k|    cshutdn_terminate_all(cshutdn, data, timeout_ms);
  349|  15.3k|  }
  350|       |  cshutdn->multi = NULL;
  351|  15.3k|}
Curl_cshutdn_perform:
  429|   699k|{
  430|   699k|  cshutdn_perform(cshutdn, data, sigpipe_ctx);
  431|   699k|}
Curl_cshutdn_setfds:
  438|   684k|{
  439|   684k|  if(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (439:6): [True: 0, False: 684k]
  ------------------
  440|      0|    struct Curl_llist_node *e;
  441|      0|    struct easy_pollset ps;
  442|       |
  443|      0|    Curl_pollset_init(&ps);
  444|      0|    for(e = Curl_llist_head(&cshutdn->list); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (444:46): [True: 0, False: 0]
  ------------------
  445|      0|      unsigned int i;
  446|      0|      struct connectdata *conn = Curl_node_elem(e);
  447|      0|      CURLcode result;
  448|       |
  449|      0|      Curl_pollset_reset(&ps);
  450|      0|      Curl_attach_connection(data, conn);
  451|      0|      result = Curl_conn_adjust_pollset(data, conn, &ps);
  452|      0|      Curl_detach_connection(data);
  453|       |
  454|      0|      if(result)
  ------------------
  |  Branch (454:10): [True: 0, False: 0]
  ------------------
  455|      0|        continue;
  456|       |
  457|      0|      for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (457:18): [True: 0, False: 0]
  ------------------
  458|      0|        curl_socket_t sock = ps.sockets[i];
  459|      0|        if(!FDSET_SOCK(sock))
  ------------------
  |  |  101|      0|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (459:12): [True: 0, False: 0]
  ------------------
  460|      0|          continue;
  461|      0|        if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
  |  Branch (461:12): [True: 0, False: 0]
  ------------------
  462|      0|          FD_SET(sock, read_fd_set);
  463|      0|        if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|      0|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (463:12): [True: 0, False: 0]
  ------------------
  464|      0|          FD_SET(sock, write_fd_set);
  465|      0|        if((ps.actions[i] & (CURL_POLL_OUT | CURL_POLL_IN)) &&
  ------------------
  |  |  284|      0|#define CURL_POLL_OUT    2
  ------------------
                      if((ps.actions[i] & (CURL_POLL_OUT | CURL_POLL_IN)) &&
  ------------------
  |  |  283|      0|#define CURL_POLL_IN     1
  ------------------
  |  Branch (465:12): [True: 0, False: 0]
  ------------------
  466|      0|           ((int)sock > *maxfd))
  ------------------
  |  Branch (466:12): [True: 0, False: 0]
  ------------------
  467|      0|          *maxfd = (int)sock;
  468|      0|      }
  469|      0|    }
  470|      0|    Curl_pollset_cleanup(&ps);
  471|      0|  }
  472|   684k|}
cshutdn.c:cshutdn_run_once:
   72|  4.52k|{
   73|  4.52k|  CURLcode r1, r2;
   74|  4.52k|  bool done1, done2;
   75|       |
   76|       |  /* We expect to be attached when called */
   77|  4.52k|  DEBUGASSERT(data->conn == conn);
  ------------------
  |  | 1081|  4.52k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 4.52k]
  |  Branch (77:3): [True: 4.52k, False: 0]
  ------------------
   78|       |
   79|  4.52k|  if(!Curl_shutdown_started(data, FIRSTSOCKET)) {
  ------------------
  |  |  303|  4.52k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (79:6): [True: 4.52k, False: 0]
  ------------------
   80|  4.52k|    Curl_shutdown_start(data, FIRSTSOCKET, 0);
  ------------------
  |  |  303|  4.52k|#define FIRSTSOCKET     0
  ------------------
   81|  4.52k|  }
   82|       |
   83|  4.52k|  cshutdn_run_conn_handler(data, conn);
   84|       |
   85|  4.52k|  if(conn->bits.shutdown_filters) {
  ------------------
  |  Branch (85:6): [True: 0, False: 4.52k]
  ------------------
   86|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   87|      0|    return;
   88|      0|  }
   89|       |
   90|  4.52k|  if(!conn->bits.connect_only && Curl_conn_is_connected(conn, FIRSTSOCKET))
  ------------------
  |  |  303|  4.52k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (90:6): [True: 4.52k, False: 0]
  |  Branch (90:34): [True: 4.52k, False: 0]
  ------------------
   91|  4.52k|    r1 = Curl_conn_shutdown(data, FIRSTSOCKET, &done1);
  ------------------
  |  |  303|  4.52k|#define FIRSTSOCKET     0
  ------------------
   92|      0|  else {
   93|      0|    r1 = CURLE_OK;
   94|      0|    done1 = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   95|      0|  }
   96|       |
   97|  4.52k|  if(!conn->bits.connect_only && Curl_conn_is_connected(conn, SECONDARYSOCKET))
  ------------------
  |  |  304|  4.52k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (97:6): [True: 4.52k, False: 0]
  |  Branch (97:34): [True: 0, False: 4.52k]
  ------------------
   98|      0|    r2 = Curl_conn_shutdown(data, SECONDARYSOCKET, &done2);
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
   99|  4.52k|  else {
  100|  4.52k|    r2 = CURLE_OK;
  101|  4.52k|    done2 = TRUE;
  ------------------
  |  | 1055|  4.52k|#define TRUE true
  ------------------
  102|  4.52k|  }
  103|       |
  104|       |  /* we are done when any failed or both report success */
  105|  4.52k|  *done = (r1 || r2 || (done1 && done2));
  ------------------
  |  Branch (105:12): [True: 0, False: 4.52k]
  |  Branch (105:18): [True: 0, False: 4.52k]
  |  Branch (105:25): [True: 4.52k, False: 0]
  |  Branch (105:34): [True: 4.52k, False: 0]
  ------------------
  106|  4.52k|  if(*done)
  ------------------
  |  Branch (106:6): [True: 4.52k, False: 0]
  ------------------
  107|  4.52k|    conn->bits.shutdown_filters = TRUE;
  ------------------
  |  | 1055|  4.52k|#define TRUE true
  ------------------
  108|  4.52k|}
cshutdn.c:cshutdn_run_conn_handler:
   43|  15.5k|{
   44|  15.5k|  if(!conn->bits.shutdown_handler) {
  ------------------
  |  Branch (44:6): [True: 11.0k, False: 4.52k]
  ------------------
   45|       |
   46|  11.0k|    if(conn->scheme && conn->scheme->run->disconnect) {
  ------------------
  |  Branch (46:8): [True: 11.0k, False: 0]
  |  Branch (46:24): [True: 0, False: 11.0k]
  ------------------
   47|       |      /* Some disconnect handlers do a blocking wait on server responses.
   48|       |       * FTP/IMAP/SMTP and SFTP are among them. When using the internal
   49|       |       * handle, set an overall short timeout so we do not hang for the
   50|       |       * default 120 seconds. */
   51|      0|      if(data->state.internal) {
  ------------------
  |  Branch (51:10): [True: 0, False: 0]
  ------------------
   52|      0|        data->set.timeout = DEFAULT_SHUTDOWN_TIMEOUT_MS;
  ------------------
  |  |   45|      0|#define DEFAULT_SHUTDOWN_TIMEOUT_MS   (2 * 1000)
  ------------------
   53|      0|        Curl_pgrsTime(data, TIMER_STARTOP);
   54|      0|      }
   55|       |
   56|       |      /* This is set if protocol-specific cleanups should be made */
   57|      0|      DEBUGF(infof(data, "connection #%" FMT_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
   58|      0|                   ", shutdown protocol handler (aborted=%d)",
   59|      0|                   conn->connection_id, conn->bits.aborted));
   60|       |      /* There are protocol handlers that block on retrieving
   61|       |       * server responses here (FTP). Set a short timeout. */
   62|      0|      conn->scheme->run->disconnect(data, conn, (bool)conn->bits.aborted);
   63|      0|    }
   64|       |
   65|       |    conn->bits.shutdown_handler = TRUE;
  ------------------
  |  | 1055|  11.0k|#define TRUE true
  ------------------
   66|  11.0k|  }
   67|  15.5k|}
cshutdn.c:cshutdn_terminate_all:
  269|  15.3k|{
  270|  15.3k|  struct curltime started = *Curl_pgrs_now(data);
  271|  15.3k|  struct Curl_llist_node *e;
  272|  15.3k|  struct Curl_sigpipe_ctx sigpipe_ctx;
  273|       |
  274|  15.3k|  DEBUGASSERT(cshutdn);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 15.3k]
  |  Branch (274:3): [True: 15.3k, False: 0]
  ------------------
  275|  15.3k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 0, False: 15.3k]
  |  Branch (275:3): [True: 15.3k, False: 0]
  ------------------
  276|       |
  277|  15.3k|  CURL_TRC_M(data, "[SHUTDOWN] shutdown all");
  ------------------
  |  |  148|  15.3k|  do {                                   \
  |  |  149|  15.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  15.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  15.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  30.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  30.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  15.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  15.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  278|  15.3k|  sigpipe_init(&sigpipe_ctx);
  279|       |
  280|  15.3k|  while(Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (280:9): [True: 0, False: 15.3k]
  ------------------
  281|      0|    timediff_t spent_ms;
  282|      0|    int remain_ms;
  283|       |
  284|      0|    cshutdn_perform(cshutdn, data, &sigpipe_ctx);
  285|       |
  286|      0|    if(!Curl_llist_head(&cshutdn->list)) {
  ------------------
  |  Branch (286:8): [True: 0, False: 0]
  ------------------
  287|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished cleanly");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  288|      0|      break;
  289|      0|    }
  290|       |
  291|       |    /* wait for activity, timeout or "nothing" */
  292|      0|    spent_ms = curlx_ptimediff_ms(Curl_pgrs_now(data), &started);
  293|      0|    if(spent_ms >= (timediff_t)timeout_ms) {
  ------------------
  |  Branch (293:8): [True: 0, False: 0]
  ------------------
  294|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished, %s",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  295|      0|                 (timeout_ms > 0) ? "timeout" : "best effort done");
  296|      0|      break;
  297|      0|    }
  298|       |
  299|      0|    remain_ms = timeout_ms - (int)spent_ms;
  300|      0|    if(cshutdn_wait(cshutdn, data, remain_ms)) {
  ------------------
  |  Branch (300:8): [True: 0, False: 0]
  ------------------
  301|      0|      CURL_TRC_M(data, "[SHUTDOWN] shutdown finished, aborted");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  302|      0|      break;
  303|      0|    }
  304|      0|  }
  305|       |
  306|       |  /* Terminate any remaining. */
  307|  15.3k|  e = Curl_llist_head(&cshutdn->list);
  308|  15.3k|  while(e) {
  ------------------
  |  Branch (308:9): [True: 0, False: 15.3k]
  ------------------
  309|      0|    struct connectdata *conn = Curl_node_elem(e);
  310|      0|    Curl_node_remove(e);
  311|      0|    Curl_cshutdn_terminate(data, conn, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  312|      0|    e = Curl_llist_head(&cshutdn->list);
  313|      0|  }
  314|  15.3k|  DEBUGASSERT(!Curl_llist_count(&cshutdn->list));
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (314:3): [True: 0, False: 15.3k]
  |  Branch (314:3): [True: 15.3k, False: 0]
  ------------------
  315|       |
  316|  15.3k|  sigpipe_restore(&sigpipe_ctx);
  317|  15.3k|}
cshutdn.c:cshutdn_perform:
  231|   699k|{
  232|   699k|  struct Curl_llist_node *e = Curl_llist_head(&cshutdn->list);
  233|   699k|  struct Curl_llist_node *enext;
  234|   699k|  struct connectdata *conn;
  235|   699k|  timediff_t next_expire_ms = 0, ms;
  236|   699k|  bool done;
  237|       |
  238|   699k|  if(!e)
  ------------------
  |  Branch (238:6): [True: 699k, False: 0]
  ------------------
  239|   699k|    return;
  240|       |
  241|      0|  CURL_TRC_M(data, "[SHUTDOWN] perform on %zu connections",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  242|      0|             Curl_llist_count(&cshutdn->list));
  243|      0|  sigpipe_apply(data, sigpipe_ctx);
  244|      0|  while(e) {
  ------------------
  |  Branch (244:9): [True: 0, False: 0]
  ------------------
  245|      0|    enext = Curl_node_next(e);
  246|      0|    conn = Curl_node_elem(e);
  247|      0|    Curl_cshutdn_run_once(data, conn, &done);
  248|      0|    if(done) {
  ------------------
  |  Branch (248:8): [True: 0, False: 0]
  ------------------
  249|      0|      Curl_node_remove(e);
  250|      0|      Curl_cshutdn_terminate(data, conn, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  251|      0|    }
  252|      0|    else {
  253|       |      /* idata has one timer list, but maybe more than one connection.
  254|       |       * Set EXPIRE_SHUTDOWN to the smallest time left for all. */
  255|      0|      ms = Curl_conn_shutdown_timeleft(data, conn);
  256|      0|      if(ms && ms < next_expire_ms)
  ------------------
  |  Branch (256:10): [True: 0, False: 0]
  |  Branch (256:16): [True: 0, False: 0]
  ------------------
  257|      0|        next_expire_ms = ms;
  258|      0|    }
  259|      0|    e = enext;
  260|      0|  }
  261|       |
  262|      0|  if(next_expire_ms)
  ------------------
  |  Branch (262:6): [True: 0, False: 0]
  ------------------
  263|      0|    Curl_expire_ex(data, next_expire_ms, EXPIRE_SHUTDOWN);
  264|      0|}

Curl_freeaddrinfo:
   72|  10.6k|{
   73|  10.6k|  struct Curl_addrinfo *vqualifier canext;
   74|  10.6k|  struct Curl_addrinfo *ca;
   75|       |
   76|  20.8k|  for(ca = cahead; ca; ca = canext) {
  ------------------
  |  Branch (76:20): [True: 10.2k, False: 10.6k]
  ------------------
   77|  10.2k|    canext = ca->ai_next;
   78|  10.2k|    curlx_free(ca);
  ------------------
  |  | 1483|  10.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  10.2k|  }
   80|  10.6k|}
Curl_getaddrinfo_ex:
  100|    789|{
  101|    789|  const struct addrinfo *ai;
  102|    789|  struct addrinfo *aihead;
  103|    789|  struct Curl_addrinfo *cafirst = NULL;
  104|    789|  struct Curl_addrinfo *calast = NULL;
  105|    789|  struct Curl_addrinfo *ca;
  106|    789|  size_t ss_size;
  107|    789|  int error;
  108|       |
  109|    789|  *result = NULL; /* assume failure */
  110|       |
  111|    789|  error = CURL_GETADDRINFO(nodename, servname, hints, &aihead);
  ------------------
  |  | 1432|    789|  curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
  ------------------
  112|    789|  if(error)
  ------------------
  |  Branch (112:6): [True: 717, False: 72]
  ------------------
  113|    717|    return error;
  114|       |
  115|       |  /* traverse the addrinfo list */
  116|       |
  117|    145|  for(ai = aihead; ai != NULL; ai = ai->ai_next) {
  ------------------
  |  Branch (117:20): [True: 73, False: 72]
  ------------------
  118|     73|    size_t namelen = ai->ai_canonname ? strlen(ai->ai_canonname) + 1 : 0;
  ------------------
  |  Branch (118:22): [True: 0, False: 73]
  ------------------
  119|       |    /* ignore elements with unsupported address family,
  120|       |       settle family-specific sockaddr structure size. */
  121|     73|    if(ai->ai_family == AF_INET)
  ------------------
  |  Branch (121:8): [True: 72, False: 1]
  ------------------
  122|     72|      ss_size = sizeof(struct sockaddr_in);
  123|      1|#ifdef USE_IPV6
  124|      1|    else if(ai->ai_family == AF_INET6)
  ------------------
  |  Branch (124:13): [True: 1, False: 0]
  ------------------
  125|      1|      ss_size = sizeof(struct sockaddr_in6);
  126|      0|#endif
  127|      0|    else
  128|      0|      continue;
  129|       |
  130|       |    /* ignore elements without required address info */
  131|     73|    if(!ai->ai_addr || !(ai->ai_addrlen > 0))
  ------------------
  |  Branch (131:8): [True: 0, False: 73]
  |  Branch (131:24): [True: 0, False: 73]
  ------------------
  132|      0|      continue;
  133|       |
  134|       |    /* ignore elements with bogus address size */
  135|     73|    if((size_t)ai->ai_addrlen < ss_size)
  ------------------
  |  Branch (135:8): [True: 0, False: 73]
  ------------------
  136|      0|      continue;
  137|       |
  138|     73|    ca = curlx_malloc(sizeof(struct Curl_addrinfo) + ss_size + namelen);
  ------------------
  |  | 1478|     73|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  139|     73|    if(!ca) {
  ------------------
  |  Branch (139:8): [True: 0, False: 73]
  ------------------
  140|      0|      error = EAI_MEMORY;
  141|      0|      break;
  142|      0|    }
  143|       |
  144|       |    /* copy each structure member individually, member ordering,
  145|       |       size, or padding might be different for each platform. */
  146|       |
  147|     73|    ca->ai_flags     = ai->ai_flags;
  148|     73|    ca->ai_family    = ai->ai_family;
  149|     73|    ca->ai_socktype  = ai->ai_socktype;
  150|     73|    ca->ai_protocol  = ai->ai_protocol;
  151|     73|    ca->ai_addrlen   = (curl_socklen_t)ss_size;
  152|     73|    ca->ai_addr      = NULL;
  153|     73|    ca->ai_canonname = NULL;
  154|     73|    ca->ai_next      = NULL;
  155|       |
  156|     73|    ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  157|     73|    memcpy(ca->ai_addr, ai->ai_addr, ss_size);
  158|       |
  159|     73|    if(namelen) {
  ------------------
  |  Branch (159:8): [True: 0, False: 73]
  ------------------
  160|      0|      ca->ai_canonname = (void *)((char *)ca->ai_addr + ss_size);
  161|      0|      memcpy(ca->ai_canonname, ai->ai_canonname, namelen);
  162|      0|    }
  163|       |
  164|       |    /* if the return list is empty, this becomes the first element */
  165|     73|    if(!cafirst)
  ------------------
  |  Branch (165:8): [True: 73, False: 0]
  ------------------
  166|     73|      cafirst = ca;
  167|       |
  168|       |    /* add this element last in the return list */
  169|     73|    if(calast)
  ------------------
  |  Branch (169:8): [True: 0, False: 73]
  ------------------
  170|      0|      calast->ai_next = ca;
  171|     73|    calast = ca;
  172|     73|  }
  173|       |
  174|       |  /* destroy the addrinfo list */
  175|     72|  if(aihead)
  ------------------
  |  Branch (175:6): [True: 73, False: 18.4E]
  ------------------
  176|     73|    CURL_FREEADDRINFO(aihead);
  ------------------
  |  | 1434|     73|  curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
  ------------------
  177|       |
  178|       |  /* if we failed, also destroy the Curl_addrinfo list */
  179|     72|  if(error) {
  ------------------
  |  Branch (179:6): [True: 0, False: 72]
  ------------------
  180|      0|    Curl_freeaddrinfo(cafirst);
  181|      0|    cafirst = NULL;
  182|      0|  }
  183|     72|  else if(!cafirst) {
  ------------------
  |  Branch (183:11): [True: 0, False: 72]
  ------------------
  184|      0|#ifdef EAI_NONAME
  185|       |    /* rfc3493 conformant */
  186|      0|    error = EAI_NONAME;
  187|       |#else
  188|       |    /* rfc3493 obsoleted */
  189|       |    error = EAI_NODATA;
  190|       |#endif
  191|       |#ifdef USE_WINSOCK
  192|       |    SET_SOCKERRNO(error);
  193|       |#endif
  194|      0|  }
  195|       |
  196|     72|  *result = cafirst;
  197|       |
  198|       |  /* This is not a CURLcode */
  199|     72|  return error;
  200|    789|}
Curl_str2addr:
  410|  9.66k|{
  411|  9.66k|  struct in_addr in;
  412|  9.66k|  if(curlx_inet_pton(AF_INET, dotted, &in) > 0)
  ------------------
  |  |   43|  9.66k|  inet_pton(x, y, z)
  ------------------
  |  Branch (412:6): [True: 9.63k, False: 29]
  ------------------
  413|       |    /* This is a dotted IP address 123.123.123.123-style */
  414|  9.63k|    return ip2addr(addrp, AF_INET, &in, dotted, port);
  415|     29|#ifdef USE_IPV6
  416|     29|  {
  417|     29|    struct in6_addr in6;
  418|     29|    if(curlx_inet_pton(AF_INET6, dotted, &in6) > 0)
  ------------------
  |  |   43|     29|  inet_pton(x, y, z)
  ------------------
  |  Branch (418:8): [True: 29, False: 0]
  ------------------
  419|       |      /* This is a dotted IPv6 address ::1-style */
  420|     29|      return ip2addr(addrp, AF_INET6, &in6, dotted, port);
  421|     29|  }
  422|      0|#endif
  423|      0|  return CURLE_BAD_FUNCTION_ARGUMENT; /* bad input format */
  424|     29|}
Curl_is_ipv4addr:
  427|  23.1k|{
  428|  23.1k|  struct in_addr in;
  429|  23.1k|  return (curlx_inet_pton(AF_INET, address, &in) > 0);
  ------------------
  |  |   43|  23.1k|  inet_pton(x, y, z)
  ------------------
  430|  23.1k|}
Curl_is_ipaddr:
  433|  12.2k|{
  434|  12.2k|  if(Curl_is_ipv4addr(address))
  ------------------
  |  Branch (434:6): [True: 9.63k, False: 2.65k]
  ------------------
  435|  9.63k|    return TRUE;
  ------------------
  |  | 1055|  9.63k|#define TRUE true
  ------------------
  436|  2.65k|#ifdef USE_IPV6
  437|  2.65k|  {
  438|  2.65k|    struct in6_addr in6;
  439|  2.65k|    if(curlx_inet_pton(AF_INET6, address, &in6) > 0)
  ------------------
  |  |   43|  2.65k|  inet_pton(x, y, z)
  ------------------
  |  Branch (439:8): [True: 29, False: 2.62k]
  ------------------
  440|       |      /* This is a dotted IPv6 address ::1-style */
  441|     29|      return TRUE;
  ------------------
  |  | 1055|     29|#define TRUE true
  ------------------
  442|  2.65k|  }
  443|  2.62k|#endif
  444|  2.62k|  return FALSE;
  ------------------
  |  | 1058|  2.62k|#define FALSE false
  ------------------
  445|  2.65k|}
Curl_looks_like_ipv6:
  449|    113|{
  450|    113|  const char *zonep = NULL;
  451|    113|  size_t i = 0, hlen = 0, zlen = 0;
  452|       |
  453|    113|  if(host)
  ------------------
  |  Branch (453:6): [True: 113, False: 0]
  ------------------
  454|    113|    memset(host, 0, sizeof(*host));
  455|    113|  if(zone)
  ------------------
  |  Branch (455:6): [True: 113, False: 0]
  ------------------
  456|    113|    memset(zone, 0, sizeof(*zone));
  457|       |
  458|    591|  for(i = 0; i < len; ++i, ++hlen) {
  ------------------
  |  Branch (458:14): [True: 478, False: 113]
  ------------------
  459|    478|    if(!s[i] || !(ISXDIGIT(s[i]) || (s[i] == ':') || (s[i] == '.')))
  ------------------
  |  |   39|    956|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|    956|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 478, False: 0]
  |  |  |  |  |  Branch (44:38): [True: 85, False: 393]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|    871|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 90, False: 303]
  |  |  |  |  |  Branch (27:43): [True: 90, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|    303|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 48, False: 255]
  |  |  |  |  |  Branch (28:43): [True: 48, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (459:8): [True: 0, False: 478]
  |  Branch (459:37): [True: 255, False: 0]
  |  Branch (459:54): [True: 0, False: 0]
  ------------------
  460|      0|      break;
  461|    478|  }
  462|       |
  463|    113|  if((i < len) && (s[i] == '%')) { /* address followed by a zone? */
  ------------------
  |  Branch (463:6): [True: 0, False: 113]
  |  Branch (463:19): [True: 0, False: 0]
  ------------------
  464|      0|    i += 1;
  465|      0|    if(maybe_url_encoded && !strncmp("25", s + i, 2))
  ------------------
  |  Branch (465:8): [True: 0, False: 0]
  |  Branch (465:29): [True: 0, False: 0]
  ------------------
  466|      0|      i += 2;
  467|      0|    zonep = s + i;
  468|      0|    for(; i < len; ++i, ++zlen) {
  ------------------
  |  Branch (468:11): [True: 0, False: 0]
  ------------------
  469|       |      /* Allow unreserved characters as defined in RFC 3986 */
  470|      0|      if(!s[i] || !(ISALPHA(s[i]) || ISXDIGIT(s[i]) || (s[i] == '-') ||
  ------------------
  |  |   38|      0|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if(!s[i] || !(ISALPHA(s[i]) || ISXDIGIT(s[i]) || (s[i] == '-') ||
  ------------------
  |  |   39|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|      0|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (27:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|      0|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (28:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (470:10): [True: 0, False: 0]
  |  Branch (470:56): [True: 0, False: 0]
  ------------------
  471|      0|                    (s[i] == '.') || (s[i] == '_') || (s[i] == '~')))
  ------------------
  |  Branch (471:21): [True: 0, False: 0]
  |  Branch (471:38): [True: 0, False: 0]
  |  Branch (471:55): [True: 0, False: 0]
  ------------------
  472|      0|        break;
  473|      0|    }
  474|      0|  }
  475|       |
  476|    113|  if(i != len)
  ------------------
  |  Branch (476:6): [True: 0, False: 113]
  ------------------
  477|      0|    return FALSE; /* invalid chars in zone */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  478|    113|  if(host && hlen) {
  ------------------
  |  Branch (478:6): [True: 113, False: 0]
  |  Branch (478:14): [True: 113, False: 0]
  ------------------
  479|    113|    host->str = s;
  480|    113|    host->len = hlen;
  481|    113|  }
  482|    113|  if(zone && zlen) {
  ------------------
  |  Branch (482:6): [True: 113, False: 0]
  |  Branch (482:14): [True: 0, False: 113]
  ------------------
  483|      0|    zone->str = zonep;
  484|      0|    zone->len = zlen;
  485|      0|  }
  486|       |  return TRUE;
  ------------------
  |  | 1055|    113|#define TRUE true
  ------------------
  487|    113|}
Curl_unix2addr:
  497|    400|{
  498|    400|  struct Curl_addrinfo *ai;
  499|    400|  struct sockaddr_un *sa_un;
  500|    400|  size_t path_len;
  501|       |
  502|    400|  *paddr = NULL;
  503|       |
  504|       |  /* sun_path must be able to store the null-terminated path */
  505|    400|  path_len = strlen(path) + 1;
  506|    400|  if(path_len > sizeof(sa_un->sun_path))
  ------------------
  |  Branch (506:6): [True: 1, False: 399]
  ------------------
  507|      1|    return CURLE_TOO_LARGE;
  508|       |
  509|    399|  ai = curlx_calloc(1,
  ------------------
  |  | 1480|    399|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  510|    399|                    sizeof(struct Curl_addrinfo) + sizeof(struct sockaddr_un));
  511|    399|  if(!ai)
  ------------------
  |  Branch (511:6): [True: 0, False: 399]
  ------------------
  512|      0|    return CURLE_OUT_OF_MEMORY;
  513|       |
  514|    399|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  515|    399|  sa_un = (void *)ai->ai_addr;
  516|    399|  sa_un->sun_family = AF_UNIX;
  517|       |
  518|    399|  ai->ai_family = AF_UNIX;
  519|    399|  ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */
  520|    399|  ai->ai_addrlen = (curl_socklen_t)
  521|    399|    ((offsetof(struct sockaddr_un, sun_path) + path_len) & 0x7FFFFFFF);
  522|       |
  523|       |  /* Abstract Unix domain socket have NULL prefix instead of suffix */
  524|    399|  if(abstract)
  ------------------
  |  Branch (524:6): [True: 372, False: 27]
  ------------------
  525|    372|    memcpy(sa_un->sun_path + 1, path, path_len - 1);
  526|     27|  else
  527|     27|    memcpy(sa_un->sun_path, path, path_len); /* copy NUL byte */
  528|       |
  529|    399|  *paddr = ai;
  530|    399|  return CURLE_OK;
  531|    399|}
curl_dbg_freeaddrinfo:
  545|     73|{
  546|     73|  curl_dbg_log("ADDR %s:%d freeaddrinfo(%p)\n",
  547|     73|               source, line, (void *)freethis);
  548|       |#ifdef USE_LWIPSOCK
  549|       |  lwip_freeaddrinfo(freethis);
  550|       |#elif defined(USE_FAKE_GETADDRINFO)
  551|       |  {
  552|       |    const char *env = getenv("CURL_DNS_SERVER");
  553|       |    if(env)
  554|       |      r_freeaddrinfo(freethis);
  555|       |    else
  556|       |      /* !checksrc! disable BANNEDFUNC 1 */
  557|       |      freeaddrinfo(freethis);
  558|       |  }
  559|       |#else
  560|       |  /* !checksrc! disable BANNEDFUNC 1 */
  561|     73|  freeaddrinfo(freethis);
  562|     73|#endif
  563|     73|}
curl_dbg_getaddrinfo:
  579|    789|{
  580|       |#ifdef USE_LWIPSOCK
  581|       |  int res = lwip_getaddrinfo(hostname, service, hints, result);
  582|       |#elif defined(USE_FAKE_GETADDRINFO)
  583|       |  int res;
  584|       |  const char *env = getenv("CURL_DNS_SERVER");
  585|       |  if(env)
  586|       |    res = r_getaddrinfo(hostname, service, hints, result);
  587|       |  else
  588|       |    /* !checksrc! disable BANNEDFUNC 1 */
  589|       |    res = getaddrinfo(hostname, service, hints, result);
  590|       |#else
  591|       |  /* !checksrc! disable BANNEDFUNC 1 */
  592|    789|  int res = getaddrinfo(hostname, service, hints, result);
  593|    789|#endif
  594|    789|  if(res == 0)
  ------------------
  |  Branch (594:6): [True: 73, False: 716]
  ------------------
  595|       |    /* success */
  596|     73|    curl_dbg_log("ADDR %s:%d getaddrinfo() = %p\n", source, line,
  597|     73|                 (void *)*result);
  598|    716|  else
  599|    716|    curl_dbg_log("ADDR %s:%d getaddrinfo() failed\n", source, line);
  600|    789|  return res;
  601|    789|}
curl_addrinfo.c:ip2addr:
  344|  9.66k|{
  345|  9.66k|  struct Curl_addrinfo *ai;
  346|  9.66k|  size_t addrsize;
  347|  9.66k|  size_t namelen;
  348|  9.66k|  struct sockaddr_in *addr;
  349|  9.66k|#ifdef USE_IPV6
  350|  9.66k|  struct sockaddr_in6 *addr6;
  351|  9.66k|#endif
  352|       |
  353|  9.66k|  DEBUGASSERT(inaddr && hostname);
  ------------------
  |  | 1081|  9.66k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 9.66k]
  |  Branch (353:3): [True: 0, False: 0]
  |  Branch (353:3): [True: 9.66k, False: 0]
  |  Branch (353:3): [True: 9.66k, False: 0]
  ------------------
  354|       |
  355|  9.66k|  namelen = strlen(hostname) + 1;
  356|  9.66k|  *addrp = NULL;
  357|       |
  358|  9.66k|  if(af == AF_INET)
  ------------------
  |  Branch (358:6): [True: 9.63k, False: 29]
  ------------------
  359|  9.63k|    addrsize = sizeof(struct sockaddr_in);
  360|     29|#ifdef USE_IPV6
  361|     29|  else if(af == AF_INET6)
  ------------------
  |  Branch (361:11): [True: 29, False: 0]
  ------------------
  362|     29|    addrsize = sizeof(struct sockaddr_in6);
  363|      0|#endif
  364|      0|  else
  365|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  366|       |
  367|       |  /* allocate memory to hold the struct, the address and the name */
  368|  9.66k|  ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + addrsize + namelen);
  ------------------
  |  | 1480|  9.66k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  369|  9.66k|  if(!ai)
  ------------------
  |  Branch (369:6): [True: 0, False: 9.66k]
  ------------------
  370|      0|    return CURLE_OUT_OF_MEMORY;
  371|       |  /* put the address after the struct */
  372|  9.66k|  ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  373|       |  /* then put the name after the address */
  374|  9.66k|  ai->ai_canonname = (char *)ai->ai_addr + addrsize;
  375|  9.66k|  memcpy(ai->ai_canonname, hostname, namelen);
  376|  9.66k|  ai->ai_family = af;
  377|  9.66k|  ai->ai_socktype = SOCK_STREAM;
  378|  9.66k|  ai->ai_addrlen = (curl_socklen_t)addrsize;
  379|       |  /* leave the rest of the struct filled with zero */
  380|       |
  381|  9.66k|  switch(af) {
  ------------------
  |  Branch (381:10): [True: 9.66k, False: 0]
  ------------------
  382|  9.63k|  case AF_INET:
  ------------------
  |  Branch (382:3): [True: 9.63k, False: 29]
  ------------------
  383|  9.63k|    addr = (void *)ai->ai_addr; /* storage area for this info */
  384|       |
  385|  9.63k|    memcpy(&addr->sin_addr, inaddr, sizeof(struct in_addr));
  386|  9.63k|    addr->sin_family = (CURL_SA_FAMILY_T)af;
  387|  9.63k|    addr->sin_port = htons((unsigned short)port);
  388|  9.63k|    break;
  389|       |
  390|      0|#ifdef USE_IPV6
  391|     29|  case AF_INET6:
  ------------------
  |  Branch (391:3): [True: 29, False: 9.63k]
  ------------------
  392|     29|    addr6 = (void *)ai->ai_addr; /* storage area for this info */
  393|       |
  394|     29|    memcpy(&addr6->sin6_addr, inaddr, sizeof(struct in6_addr));
  395|     29|    addr6->sin6_family = (CURL_SA_FAMILY_T)af;
  396|     29|    addr6->sin6_port = htons((unsigned short)port);
  397|     29|    break;
  398|  9.66k|#endif
  399|  9.66k|  }
  400|  9.66k|  *addrp = ai;
  401|  9.66k|  return CURLE_OK;
  402|  9.66k|}

Curl_fopen:
   87|  42.3k|{
   88|  42.3k|  CURLcode result = CURLE_WRITE_ERROR;
   89|  42.3k|  unsigned char randbuf[41];
   90|  42.3k|  char *tempstore = NULL;
   91|  42.3k|#ifndef _WIN32
   92|  42.3k|  curlx_struct_stat sb;
  ------------------
  |  |   63|  42.3k|#define curlx_struct_stat       struct stat
  ------------------
   93|  42.3k|#endif
   94|  42.3k|  int fd = -1;
   95|  42.3k|  char *dir = NULL;
   96|  42.3k|  *tempname = NULL;
   97|       |
   98|  42.3k|#ifndef _WIN32
   99|  42.3k|  *fh = curlx_fopen(filename, FOPEN_WRITETEXT);
  ------------------
  |  |   74|  42.3k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  100|  42.3k|  if(!*fh)
  ------------------
  |  Branch (100:6): [True: 0, False: 42.3k]
  ------------------
  101|      0|    goto fail;
  102|  42.3k|  if(curlx_fstat(fileno(*fh), &sb) == -1 || !S_ISREG(sb.st_mode)) {
  ------------------
  |  |   62|  42.3k|#define curlx_fstat             fstat
  ------------------
  |  Branch (102:6): [True: 0, False: 42.3k]
  |  Branch (102:45): [True: 42.3k, False: 0]
  ------------------
  103|  42.3k|    return CURLE_OK;
  104|  42.3k|  }
  105|      0|  curlx_fclose(*fh);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  106|      0|#ifdef HAVE_GETEUID
  107|       |  /* If the existing file is not owned by the user, do not inherit
  108|       |   * its permissions at the temp file created below. The permissions
  109|       |   * might be unsuitable for holding user private data. */
  110|      0|  if(sb.st_uid != geteuid())
  ------------------
  |  Branch (110:6): [True: 0, False: 0]
  ------------------
  111|      0|    sb.st_mode = 0;
  112|      0|#endif
  113|      0|#endif /* !_WIN32 */
  114|      0|  *fh = NULL;
  115|       |
  116|      0|  result = Curl_rand_alnum(data, randbuf, sizeof(randbuf));
  117|      0|  if(result)
  ------------------
  |  Branch (117:6): [True: 0, False: 0]
  ------------------
  118|      0|    goto fail;
  119|       |
  120|      0|  dir = dirslash(filename);
  121|      0|  if(dir) {
  ------------------
  |  Branch (121:6): [True: 0, False: 0]
  ------------------
  122|       |    /* The temp filename should not end up too long for the target file
  123|       |       system */
  124|      0|    tempstore = curl_maprintf("%s%s.tmp", dir, randbuf);
  125|      0|    curlx_free(dir);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  126|      0|  }
  127|       |
  128|      0|  if(!tempstore) {
  ------------------
  |  Branch (128:6): [True: 0, False: 0]
  ------------------
  129|      0|    result = CURLE_OUT_OF_MEMORY;
  130|      0|    goto fail;
  131|      0|  }
  132|       |
  133|      0|  result = CURLE_WRITE_ERROR;
  134|       |#ifdef _WIN32
  135|       |  fd = curlx_open(tempstore, _O_WRONLY | _O_CREAT | _O_EXCL,
  136|       |                  _S_IREAD | _S_IWRITE);
  137|       |#elif (defined(ANDROID) || defined(__ANDROID__)) && \
  138|       |  (defined(__i386__) || defined(__arm__))
  139|       |  fd = curlx_open(tempstore, O_WRONLY | O_CREAT | O_EXCL,
  140|       |                  (mode_t)(S_IRUSR | S_IWUSR | sb.st_mode));
  141|       |#else
  142|      0|  fd = curlx_open(tempstore, O_WRONLY | O_CREAT | O_EXCL,
  ------------------
  |  |   68|      0|#define curlx_open              open
  ------------------
  143|      0|                  S_IRUSR | S_IWUSR | sb.st_mode);
  144|      0|#endif
  145|      0|  if(fd == -1)
  ------------------
  |  Branch (145:6): [True: 0, False: 0]
  ------------------
  146|      0|    goto fail;
  147|       |
  148|      0|  *fh = curlx_fdopen(fd, FOPEN_WRITETEXT);
  ------------------
  |  |   78|      0|  curl_dbg_fdopen(file, mode, __LINE__, __FILE__)
  ------------------
  149|      0|  if(!*fh)
  ------------------
  |  Branch (149:6): [True: 0, False: 0]
  ------------------
  150|      0|    goto fail;
  151|       |
  152|      0|  *tempname = tempstore;
  153|      0|  return CURLE_OK;
  154|       |
  155|      0|fail:
  156|      0|  if(fd != -1) {
  ------------------
  |  Branch (156:6): [True: 0, False: 0]
  ------------------
  157|      0|    curlx_close(fd);
  ------------------
  |  |   69|      0|#define curlx_close             close
  ------------------
  158|      0|    unlink(tempstore);
  159|      0|  }
  160|       |
  161|      0|  curlx_free(tempstore);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  162|      0|  return result;
  163|      0|}

Curl_get_line:
   36|  40.1k|{
   37|  40.1k|  CURLcode result;
   38|  40.1k|  char buffer[128];
   39|  40.1k|  curlx_dyn_reset(buf);
   40|  40.1k|  while(1) {
  ------------------
  |  Branch (40:9): [True: 40.1k, Folded]
  ------------------
   41|  40.1k|    size_t rlen;
   42|  40.1k|    const char *b = fgets(buffer, sizeof(buffer), input);
   43|  40.1k|    if(!b && ferror(input))
  ------------------
  |  Branch (43:8): [True: 40.1k, False: 0]
  |  Branch (43:14): [True: 0, False: 40.1k]
  ------------------
   44|      0|      return CURLE_READ_ERROR;
   45|       |
   46|  40.1k|    *eof = feof(input);
   47|       |
   48|  40.1k|    rlen = b ? strlen(b) : 0;
  ------------------
  |  Branch (48:12): [True: 0, False: 40.1k]
  ------------------
   49|  40.1k|    if(rlen) {
  ------------------
  |  Branch (49:8): [True: 0, False: 40.1k]
  ------------------
   50|      0|      result = curlx_dyn_addn(buf, b, rlen);
   51|      0|      if(result)
  ------------------
  |  Branch (51:10): [True: 0, False: 0]
  ------------------
   52|       |        /* too long line or out of memory */
   53|      0|        return result;
   54|      0|    }
   55|       |    /* now check the full line */
   56|  40.1k|    rlen = curlx_dyn_len(buf);
   57|  40.1k|    b = curlx_dyn_ptr(buf);
   58|  40.1k|    if(rlen && (b[rlen - 1] == '\n'))
  ------------------
  |  Branch (58:8): [True: 0, False: 40.1k]
  |  Branch (58:16): [True: 0, False: 0]
  ------------------
   59|       |      /* LF at end of the line */
   60|      0|      return CURLE_OK; /* all good */
   61|  40.1k|    if(*eof)
  ------------------
  |  Branch (61:8): [True: 40.1k, False: 0]
  ------------------
   62|       |      /* append a newline */
   63|  40.1k|      return curlx_dyn_addn(buf, "\n", 1);
   64|       |    /* otherwise get next line to append */
   65|  40.1k|  }
   66|       |  /* UNREACHABLE */
   67|  40.1k|}

Curl_share_lock:
  373|  95.0k|{
  374|  95.0k|  struct Curl_share *share = data->share;
  375|       |
  376|  95.0k|  if(!share)
  ------------------
  |  Branch (376:6): [True: 95.0k, False: 0]
  ------------------
  377|  95.0k|    return CURLSHE_INVALID;
  378|       |
  379|      0|  if(share->specifier & (unsigned int)(1 << type)) {
  ------------------
  |  Branch (379:6): [True: 0, False: 0]
  ------------------
  380|      0|    if(share->lockfunc) /* only call this if set! */
  ------------------
  |  Branch (380:8): [True: 0, False: 0]
  ------------------
  381|      0|      share->lockfunc(data, type, accesstype, share->clientdata);
  382|      0|  }
  383|       |  /* else if we do not share this, pretend successful lock */
  384|       |
  385|      0|  return CURLSHE_OK;
  386|  95.0k|}
Curl_share_unlock:
  389|  95.0k|{
  390|  95.0k|  struct Curl_share *share = data->share;
  391|       |
  392|  95.0k|  if(!share)
  ------------------
  |  Branch (392:6): [True: 95.0k, False: 0]
  ------------------
  393|  95.0k|    return CURLSHE_INVALID;
  394|       |
  395|      0|  if(share->specifier & (unsigned int)(1 << type)) {
  ------------------
  |  Branch (395:6): [True: 0, False: 0]
  ------------------
  396|      0|    if(share->unlockfunc) /* only call this if set! */
  ------------------
  |  Branch (396:8): [True: 0, False: 0]
  ------------------
  397|      0|      share->unlockfunc(data, type, share->clientdata);
  398|      0|  }
  399|       |
  400|      0|  return CURLSHE_OK;
  401|  95.0k|}
Curl_share_easy_unlink:
  404|  33.9k|{
  405|  33.9k|  struct Curl_share *share = data->share;
  406|       |
  407|  33.9k|  if(share) {
  ------------------
  |  Branch (407:6): [True: 0, False: 33.9k]
  ------------------
  408|      0|    bool locked = share_lock_acquire(share, data);
  409|       |
  410|       |    /* If data has a connection from this share, detach it. */
  411|      0|    if(data->conn && (share->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
  ------------------
  |  Branch (411:8): [True: 0, False: 0]
  |  Branch (411:22): [True: 0, False: 0]
  ------------------
  412|      0|      Curl_detach_connection(data);
  413|       |
  414|      0|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
  415|      0|    if(share->cookies == data->cookies)
  ------------------
  |  Branch (415:8): [True: 0, False: 0]
  ------------------
  416|      0|      data->cookies = NULL;
  417|      0|#endif
  418|       |
  419|      0|#ifndef CURL_DISABLE_HSTS
  420|      0|    if(share->hsts == data->hsts)
  ------------------
  |  Branch (420:8): [True: 0, False: 0]
  ------------------
  421|      0|      data->hsts = NULL;
  422|      0|#endif
  423|       |#ifdef USE_LIBPSL
  424|       |    if(&share->psl == data->psl)
  425|       |      data->psl = data->multi ? &data->multi->psl : NULL;
  426|       |#endif
  427|       |
  428|      0|    share_unlink(&data->share, data, locked);
  429|      0|  }
  430|  33.9k|  return CURLE_OK;
  431|  33.9k|}

Curl_thread_create:
   52|    768|{
   53|    768|  curl_thread_t t = curlx_malloc(sizeof(pthread_t));
  ------------------
  |  |   33|    768|#  define curl_thread_t          pthread_t *
  ------------------
                curl_thread_t t = curlx_malloc(sizeof(pthread_t));
  ------------------
  |  | 1478|    768|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   54|    768|  struct Curl_actual_call *ac = NULL;
   55|    768|  int rc;
   56|       |
   57|    768|  if(t)
  ------------------
  |  Branch (57:6): [True: 768, False: 0]
  ------------------
   58|    768|    ac = curlx_malloc(sizeof(struct Curl_actual_call));
  ------------------
  |  | 1478|    768|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   59|    768|  if(!(ac && t))
  ------------------
  |  Branch (59:8): [True: 768, False: 0]
  |  Branch (59:14): [True: 768, False: 0]
  ------------------
   60|      0|    goto err;
   61|       |
   62|    768|  ac->func = func;
   63|    768|  ac->arg = arg;
   64|       |
   65|    768|  rc = pthread_create(t, NULL, curl_thread_create_thunk, ac);
   66|    768|  if(rc) {
  ------------------
  |  Branch (66:6): [True: 0, False: 768]
  ------------------
   67|      0|    errno = rc;
   68|      0|    goto err;
   69|      0|  }
   70|       |
   71|    768|  return t;
   72|       |
   73|      0|err:
   74|      0|  curlx_free(t);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|      0|  curlx_free(ac);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|      0|  return curl_thread_t_null;
  ------------------
  |  |   34|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
   77|    768|}
Curl_thread_join:
   89|    768|{
   90|    768|  int ret = (pthread_join(**hnd, NULL) == 0);
   91|       |
   92|    768|  curlx_free(*hnd);
  ------------------
  |  | 1483|    768|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   93|    768|  *hnd = curl_thread_t_null;
  ------------------
  |  |   34|    768|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
   94|       |
   95|    768|  return ret;
   96|    768|}
Curl_cond_signal:
  142|  2.37k|{
  143|       |  /* return code defined as always 0 */
  144|  2.37k|  (void)pthread_cond_signal(c);
  145|  2.37k|}
Curl_cond_wait:
  148|    630|{
  149|       |  /* return code defined as always 0 */
  150|    630|  (void)pthread_cond_wait(c, m);
  151|    630|}
Curl_cond_timedwait:
  155|    621|{
  156|    621|  struct curltime now;
  157|    621|  struct timespec ts;
  158|    621|  timediff_t usec;
  159|    621|  int rc;
  160|       |
  161|       |  /* POSIX expects an "absolute" time until the condition wait ends.
  162|       |   * We cannot use `curlx_now()` here that may run on some monotonic clock
  163|       |   * that will be most likely in the past, as far as POSIX abstime is
  164|       |   * concerned. */
  165|    621|#ifdef HAVE_GETTIMEOFDAY
  166|    621|  struct timeval tv;
  167|    621|  (void)gettimeofday(&tv, NULL);
  168|    621|  now.tv_sec = tv.tv_sec;
  169|    621|  now.tv_usec = (int)tv.tv_usec;
  170|       |#else
  171|       |  now.tv_sec = time(NULL);
  172|       |  now.tv_usec = 0;
  173|       |#endif
  174|       |
  175|    621|  ts.tv_sec = now.tv_sec + (timeout_ms / 1000);
  176|    621|  usec = now.tv_usec + ((timeout_ms % 1000) * 1000);
  177|    621|  if(usec >= 1000000) {
  ------------------
  |  Branch (177:6): [True: 0, False: 621]
  ------------------
  178|      0|    ++ts.tv_sec;
  179|      0|    usec %= 1000000;
  180|      0|  }
  181|    621|  ts.tv_nsec = (long)usec * 1000;
  182|       |
  183|    621|  rc = pthread_cond_timedwait(c, m, &ts);
  184|    621|  if(rc == SOCKETIMEDOUT)
  ------------------
  |  | 1135|    621|#define SOCKETIMEDOUT     ETIMEDOUT
  ------------------
  |  Branch (184:6): [True: 0, False: 621]
  ------------------
  185|      0|    return CURLE_OPERATION_TIMEDOUT;
  186|    621|  return rc ? CURLE_UNRECOVERABLE_POLL : CURLE_OK;
  ------------------
  |  Branch (186:10): [True: 0, False: 621]
  ------------------
  187|    621|}
curl_threads.c:curl_thread_create_thunk:
   38|    767|{
   39|    767|  struct Curl_actual_call *ac = arg;
   40|    767|  unsigned int (*func)(void *) = ac->func;
   41|    767|  void *real_arg = ac->arg;
   42|       |
   43|    767|  curlx_free(ac);
  ------------------
  |  | 1483|    767|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   44|       |
   45|    767|  (*func)(real_arg);
   46|       |
   47|    767|  return 0;
   48|    767|}

Curl_debug:
  129|   229k|{
  130|   229k|  if(data->set.verbose) {
  ------------------
  |  Branch (130:6): [True: 0, False: 229k]
  ------------------
  131|      0|    static const char s_infotype[CURLINFO_END][3] = {
  132|      0|      "* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
  133|      0|    char buf[TRC_LINE_MAX];
  134|      0|    size_t len;
  135|      0|    if(data->set.fdebug) {
  ------------------
  |  Branch (135:8): [True: 0, False: 0]
  ------------------
  136|      0|      bool inCallback = Curl_is_in_callback(data);
  137|       |
  138|      0|      if(CURL_TRC_IDS(data) && (size < TRC_LINE_MAX)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      0|  Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                    if(CURL_TRC_IDS(data) && (size < TRC_LINE_MAX)) {
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  |  Branch (138:32): [True: 0, False: 0]
  ------------------
  139|      0|        len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  140|      0|        len += curl_msnprintf(buf + len, TRC_LINE_MAX - len, "%.*s",
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  141|      0|                              (int)size, ptr);
  142|      0|        len = trc_end_buf(buf, len, TRC_LINE_MAX, FALSE);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
                      len = trc_end_buf(buf, len, TRC_LINE_MAX, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  143|      0|        Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  144|      0|        (void)(*data->set.fdebug)(data, type, buf, len, data->set.debugdata);
  145|      0|        Curl_set_in_callback(data, inCallback);
  146|      0|      }
  147|      0|      else {
  148|      0|        Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  149|      0|        (void)(*data->set.fdebug)(data, type, CURL_UNCONST(ptr),
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  150|      0|                                  size, data->set.debugdata);
  151|      0|        Curl_set_in_callback(data, inCallback);
  152|      0|      }
  153|      0|    }
  154|      0|    else {
  155|      0|      switch(type) {
  156|      0|      case CURLINFO_TEXT:
  ------------------
  |  Branch (156:7): [True: 0, False: 0]
  ------------------
  157|      0|      case CURLINFO_HEADER_OUT:
  ------------------
  |  Branch (157:7): [True: 0, False: 0]
  ------------------
  158|      0|      case CURLINFO_HEADER_IN:
  ------------------
  |  Branch (158:7): [True: 0, False: 0]
  ------------------
  159|      0|#ifndef CURL_DISABLE_VERBOSE_STRINGS
  160|      0|        if(CURL_TRC_IDS(data)) {
  ------------------
  |  |   90|      0|  (Curl_trc_is_verbose(data) && \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   91|      0|  Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  161|      0|          len = trc_print_ids(data, buf, TRC_LINE_MAX);
  ------------------
  |  |   78|      0|#define TRC_LINE_MAX 2048
  ------------------
  162|      0|          fwrite(buf, len, 1, data->set.err);
  163|      0|        }
  164|      0|#endif
  165|      0|        fwrite(s_infotype[type], 2, 1, data->set.err);
  166|      0|        fwrite(ptr, size, 1, data->set.err);
  167|      0|        break;
  168|      0|      default: /* nada */
  ------------------
  |  Branch (168:7): [True: 0, False: 0]
  ------------------
  169|      0|        break;
  170|      0|      }
  171|      0|    }
  172|      0|  }
  173|   229k|}
Curl_failf:
  179|  27.9k|{
  180|  27.9k|  DEBUGASSERT(!strchr(fmt, '\n'));
  ------------------
  |  | 1081|  27.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 27.9k]
  |  Branch (180:3): [True: 27.9k, False: 0]
  ------------------
  181|  27.9k|  if(data->set.verbose || data->set.errorbuffer) {
  ------------------
  |  Branch (181:6): [True: 0, False: 27.9k]
  |  Branch (181:27): [True: 0, False: 27.9k]
  ------------------
  182|      0|    va_list ap;
  183|      0|    size_t len;
  184|      0|    char error[CURL_ERROR_SIZE + 2];
  185|      0|    va_start(ap, fmt);
  186|      0|    len = curl_mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
  ------------------
  |  |  867|      0|#define CURL_ERROR_SIZE 256
  ------------------
  187|       |
  188|      0|    if(data->set.errorbuffer && !data->state.errorbuf) {
  ------------------
  |  Branch (188:8): [True: 0, False: 0]
  |  Branch (188:33): [True: 0, False: 0]
  ------------------
  189|      0|      curlx_strcopy(data->set.errorbuffer, CURL_ERROR_SIZE, error, len);
  ------------------
  |  |  867|      0|#define CURL_ERROR_SIZE 256
  ------------------
  190|      0|      data->state.errorbuf = TRUE; /* wrote error string */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  191|      0|    }
  192|      0|    error[len++] = '\n';
  193|      0|    error[len] = '\0';
  194|      0|    trc_write(data, CURLINFO_TEXT, error, len);
  195|       |    va_end(ap);
  196|      0|  }
  197|  27.9k|}
Curl_reset_fail:
  200|   159k|{
  201|   159k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (201:6): [True: 0, False: 159k]
  ------------------
  202|      0|    data->set.errorbuffer[0] = 0;
  203|       |  data->state.errorbuf = FALSE;
  ------------------
  |  | 1058|   159k|#define FALSE false
  ------------------
  204|   159k|}
Curl_trc_opt:
  667|      1|{
  668|      1|  CURLcode result = config ? trc_opt(config) : CURLE_OK;
  ------------------
  |  Branch (668:21): [True: 0, False: 1]
  ------------------
  669|      1|#ifdef DEBUGBUILD
  670|       |  /* CURL_DEBUG can override anything */
  671|      1|  if(!result) {
  ------------------
  |  Branch (671:6): [True: 1, False: 0]
  ------------------
  672|      1|    const char *dbg_config = getenv("CURL_DEBUG");
  673|      1|    if(dbg_config)
  ------------------
  |  Branch (673:8): [True: 0, False: 1]
  ------------------
  674|      0|      result = trc_opt(dbg_config);
  675|      1|  }
  676|      1|#endif /* DEBUGBUILD */
  677|      1|  return result;
  678|      1|}
Curl_trc_init:
  681|      1|{
  682|      1|#ifdef DEBUGBUILD
  683|      1|  return Curl_trc_opt(NULL);
  684|       |#else
  685|       |  return CURLE_OK;
  686|       |#endif
  687|      1|}

curlx_base64_encode:
  243|  4.60k|{
  244|  4.60k|  return base64_encode(curlx_base64encdec, '=',
  245|  4.60k|                       inputbuff, insize, outptr, outlen);
  246|  4.60k|}
base64.c:base64_encode:
  169|  4.60k|{
  170|  4.60k|  char *output;
  171|  4.60k|  char *base64data;
  172|  4.60k|  const unsigned char *in = (const unsigned char *)inputbuff;
  173|       |
  174|  4.60k|  *outptr = NULL;
  175|  4.60k|  *outlen = 0;
  176|       |
  177|  4.60k|  if(!insize)
  ------------------
  |  Branch (177:6): [True: 0, False: 4.60k]
  ------------------
  178|      0|    return CURLE_OK;
  179|       |
  180|       |  /* safety precaution */
  181|  4.60k|  DEBUGASSERT(insize <= CURL_MAX_BASE64_INPUT);
  ------------------
  |  | 1081|  4.60k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (181:3): [True: 0, False: 4.60k]
  |  Branch (181:3): [True: 4.60k, False: 0]
  ------------------
  182|  4.60k|  if(insize > CURL_MAX_BASE64_INPUT)
  ------------------
  |  |   38|  4.60k|#define CURL_MAX_BASE64_INPUT 16000000
  ------------------
  |  Branch (182:6): [True: 0, False: 4.60k]
  ------------------
  183|      0|    return CURLE_TOO_LARGE;
  184|       |
  185|  4.60k|  base64data = output = curlx_malloc(((insize + 2) / 3 * 4) + 1);
  ------------------
  |  | 1478|  4.60k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  186|  4.60k|  if(!output)
  ------------------
  |  Branch (186:6): [True: 0, False: 4.60k]
  ------------------
  187|      0|    return CURLE_OUT_OF_MEMORY;
  188|       |
  189|   743k|  while(insize >= 3) {
  ------------------
  |  Branch (189:9): [True: 738k, False: 4.60k]
  ------------------
  190|   738k|    *output++ = table64[in[0] >> 2];
  191|   738k|    *output++ = table64[((in[0] & 0x03) << 4) | (in[1] >> 4)];
  192|   738k|    *output++ = table64[((in[1] & 0x0F) << 2) | ((in[2] & 0xC0) >> 6)];
  193|   738k|    *output++ = table64[in[2] & 0x3F];
  194|   738k|    insize -= 3;
  195|   738k|    in += 3;
  196|   738k|  }
  197|  4.60k|  if(insize) {
  ------------------
  |  Branch (197:6): [True: 3.78k, False: 821]
  ------------------
  198|       |    /* this is only one or two bytes now */
  199|  3.78k|    *output++ = table64[in[0] >> 2];
  200|  3.78k|    if(insize == 1) {
  ------------------
  |  Branch (200:8): [True: 612, False: 3.17k]
  ------------------
  201|    612|      *output++ = table64[((in[0] & 0x03) << 4)];
  202|    612|      if(padbyte) {
  ------------------
  |  Branch (202:10): [True: 612, False: 0]
  ------------------
  203|    612|        *output++ = padbyte;
  204|    612|        *output++ = padbyte;
  205|    612|      }
  206|    612|    }
  207|  3.17k|    else {
  208|       |      /* insize == 2 */
  209|  3.17k|      *output++ = table64[((in[0] & 0x03) << 4) | ((in[1] & 0xF0) >> 4)];
  210|  3.17k|      *output++ = table64[((in[1] & 0x0F) << 2)];
  211|  3.17k|      if(padbyte)
  ------------------
  |  Branch (211:10): [True: 3.17k, False: 0]
  ------------------
  212|  3.17k|        *output++ = padbyte;
  213|  3.17k|    }
  214|  3.78k|  }
  215|       |
  216|       |  /* Null-terminate */
  217|  4.60k|  *output = '\0';
  218|       |
  219|       |  /* Return the pointer to the new data (allocated memory) */
  220|  4.60k|  *outptr = base64data;
  221|       |
  222|       |  /* Return the length of the new data */
  223|  4.60k|  *outlen = (size_t)(output - base64data);
  224|       |
  225|  4.60k|  return CURLE_OK;
  226|  4.60k|}

curlx_dyn_init:
   39|   482k|{
   40|   482k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   482k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (40:3): [True: 0, False: 482k]
  |  Branch (40:3): [True: 482k, False: 0]
  ------------------
   41|   482k|  DEBUGASSERT(toobig);
  ------------------
  |  | 1081|   482k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (41:3): [True: 0, False: 482k]
  |  Branch (41:3): [True: 482k, False: 0]
  ------------------
   42|   482k|  DEBUGASSERT(toobig <= MAX_DYNBUF_SIZE); /* catch crazy mistakes */
  ------------------
  |  | 1081|   482k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (42:3): [True: 0, False: 482k]
  |  Branch (42:3): [True: 482k, False: 0]
  ------------------
   43|   482k|  s->bufr = NULL;
   44|   482k|  s->leng = 0;
   45|   482k|  s->allc = 0;
   46|   482k|  s->toobig = toobig;
   47|   482k|#ifdef DEBUGBUILD
   48|   482k|  s->init = DYNINIT;
  ------------------
  |  |   32|   482k|#define DYNINIT 0xbee51da /* random pattern */
  ------------------
   49|   482k|#endif
   50|   482k|}
curlx_dyn_free:
   57|  2.67M|{
   58|  2.67M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  2.67M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (58:3): [True: 0, False: 2.67M]
  |  Branch (58:3): [True: 2.67M, False: 0]
  ------------------
   59|  2.67M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  2.67M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (59:3): [True: 0, False: 2.67M]
  |  Branch (59:3): [True: 2.67M, False: 0]
  ------------------
   60|  2.67M|  curlx_safefree(s->bufr);
  ------------------
  |  | 1327|  2.67M|  do {                      \
  |  | 1328|  2.67M|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.67M|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.67M|    (ptr) = NULL;           \
  |  | 1330|  2.67M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.67M]
  |  |  ------------------
  ------------------
   61|  2.67M|  s->leng = s->allc = 0;
   62|  2.67M|}
curlx_dyn_reset:
  126|   324k|{
  127|   324k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   324k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (127:3): [True: 0, False: 324k]
  |  Branch (127:3): [True: 324k, False: 0]
  ------------------
  128|   324k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|   324k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (128:3): [True: 0, False: 324k]
  |  Branch (128:3): [True: 324k, False: 0]
  ------------------
  129|   324k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|   324k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (129:3): [True: 324k, False: 0]
  |  Branch (129:3): [True: 0, False: 0]
  |  Branch (129:3): [True: 77.3k, False: 247k]
  |  Branch (129:3): [True: 247k, False: 0]
  ------------------
  130|   324k|  if(s->leng)
  ------------------
  |  Branch (130:6): [True: 247k, False: 77.3k]
  ------------------
  131|   247k|    s->bufr[0] = 0;
  132|   324k|  s->leng = 0;
  133|   324k|}
curlx_dyn_tail:
  140|    301|{
  141|    301|  DEBUGASSERT(s);
  ------------------
  |  | 1081|    301|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (141:3): [True: 0, False: 301]
  |  Branch (141:3): [True: 301, False: 0]
  ------------------
  142|    301|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|    301|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (142:3): [True: 0, False: 301]
  |  Branch (142:3): [True: 301, False: 0]
  ------------------
  143|    301|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|    301|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (143:3): [True: 301, False: 0]
  |  Branch (143:3): [True: 0, False: 0]
  |  Branch (143:3): [True: 0, False: 301]
  |  Branch (143:3): [True: 301, False: 0]
  ------------------
  144|    301|  if(trail > s->leng)
  ------------------
  |  Branch (144:6): [True: 0, False: 301]
  ------------------
  145|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  146|    301|  else if(trail == s->leng)
  ------------------
  |  Branch (146:11): [True: 0, False: 301]
  ------------------
  147|      0|    return CURLE_OK;
  148|    301|  else if(!trail) {
  ------------------
  |  Branch (148:11): [True: 301, False: 0]
  ------------------
  149|    301|    curlx_dyn_reset(s);
  150|    301|  }
  151|      0|  else {
  152|      0|    memmove(&s->bufr[0], &s->bufr[s->leng - trail], trail);
  153|      0|    s->leng = trail;
  154|      0|    s->bufr[s->leng] = 0;
  155|      0|  }
  156|    301|  return CURLE_OK;
  157|    301|}
curlx_dyn_addn:
  163|   180M|{
  164|   180M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (164:3): [True: 0, False: 180M]
  |  Branch (164:3): [True: 180M, False: 0]
  ------------------
  165|   180M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (165:3): [True: 0, False: 180M]
  |  Branch (165:3): [True: 180M, False: 0]
  ------------------
  166|   180M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 180M, False: 0]
  |  Branch (166:3): [True: 0, False: 0]
  |  Branch (166:3): [True: 3.05M, False: 177M]
  |  Branch (166:3): [True: 177M, False: 0]
  ------------------
  167|   180M|  return dyn_nappend(s, mem, len);
  168|   180M|}
curlx_dyn_add:
  174|  41.1k|{
  175|  41.1k|  size_t n;
  176|  41.1k|  DEBUGASSERT(str);
  ------------------
  |  | 1081|  41.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (176:3): [True: 0, False: 41.1k]
  |  Branch (176:3): [True: 41.1k, False: 0]
  ------------------
  177|  41.1k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  41.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 41.1k]
  |  Branch (177:3): [True: 41.1k, False: 0]
  ------------------
  178|  41.1k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  41.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 41.1k]
  |  Branch (178:3): [True: 41.1k, False: 0]
  ------------------
  179|  41.1k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  41.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 41.1k, False: 0]
  |  Branch (179:3): [True: 0, False: 0]
  |  Branch (179:3): [True: 11.1k, False: 30.0k]
  |  Branch (179:3): [True: 30.0k, False: 0]
  ------------------
  180|  41.1k|  n = strlen(str);
  181|  41.1k|  return dyn_nappend(s, (const unsigned char *)str, n);
  182|  41.1k|}
curlx_dyn_vaddf:
  188|   423k|{
  189|   423k|#ifdef BUILDING_LIBCURL
  190|   423k|  int rc;
  191|   423k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (191:3): [True: 0, False: 423k]
  |  Branch (191:3): [True: 423k, False: 0]
  ------------------
  192|   423k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (192:3): [True: 0, False: 423k]
  |  Branch (192:3): [True: 423k, False: 0]
  ------------------
  193|   423k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (193:3): [True: 423k, False: 0]
  |  Branch (193:3): [True: 0, False: 0]
  |  Branch (193:3): [True: 56.0k, False: 367k]
  |  Branch (193:3): [True: 367k, False: 0]
  ------------------
  194|   423k|  DEBUGASSERT(fmt);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (194:3): [True: 0, False: 423k]
  |  Branch (194:3): [True: 423k, False: 0]
  ------------------
  195|   423k|  rc = curlx_dyn_vprintf(s, fmt, ap);
  196|       |
  197|   423k|  if(!rc)
  ------------------
  |  Branch (197:6): [True: 423k, False: 41]
  ------------------
  198|   423k|    return CURLE_OK;
  199|     41|  else if(rc == MERR_TOO_LARGE)
  ------------------
  |  |   29|     41|#define MERR_TOO_LARGE 2
  ------------------
  |  Branch (199:11): [True: 41, False: 0]
  ------------------
  200|     41|    return CURLE_TOO_LARGE;
  201|      0|  return CURLE_OUT_OF_MEMORY;
  202|       |#else
  203|       |  char *str;
  204|       |  str = curl_mvaprintf(fmt, ap); /* this allocs a new string to append */
  205|       |
  206|       |  if(str) {
  207|       |    CURLcode result = dyn_nappend(s, (const unsigned char *)str, strlen(str));
  208|       |    curl_free(str);
  209|       |    return result;
  210|       |  }
  211|       |  /* If we failed, we cleanup the whole buffer and return error */
  212|       |  curlx_dyn_free(s);
  213|       |  return CURLE_OUT_OF_MEMORY;
  214|       |#endif
  215|   423k|}
curlx_dyn_addf:
  221|   423k|{
  222|   423k|  CURLcode result;
  223|   423k|  va_list ap;
  224|   423k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 0, False: 423k]
  |  Branch (224:3): [True: 423k, False: 0]
  ------------------
  225|   423k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (225:3): [True: 0, False: 423k]
  |  Branch (225:3): [True: 423k, False: 0]
  ------------------
  226|   423k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (226:3): [True: 423k, False: 0]
  |  Branch (226:3): [True: 0, False: 0]
  |  Branch (226:3): [True: 56.0k, False: 367k]
  |  Branch (226:3): [True: 367k, False: 0]
  ------------------
  227|   423k|  DEBUGASSERT(strcmp(fmt, "%s")); /* use curlx_dyn_add instead */
  ------------------
  |  | 1081|   423k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 0, False: 423k]
  |  Branch (227:3): [True: 423k, False: 0]
  ------------------
  228|   423k|  va_start(ap, fmt);
  229|   423k|  result = curlx_dyn_vaddf(s, fmt, ap);
  230|       |  va_end(ap);
  231|   423k|  return result;
  232|   423k|}
curlx_dyn_ptr:
  238|  1.07M|{
  239|  1.07M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  1.07M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (239:3): [True: 0, False: 1.07M]
  |  Branch (239:3): [True: 1.07M, False: 0]
  ------------------
  240|  1.07M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  1.07M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 1.07M]
  |  Branch (240:3): [True: 1.07M, False: 0]
  ------------------
  241|  1.07M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  1.07M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 1.07M, False: 0]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 42.2k, False: 1.03M]
  |  Branch (241:3): [True: 1.03M, False: 0]
  ------------------
  242|  1.07M|  return s->bufr;
  243|  1.07M|}
curlx_dyn_take:
  246|  2.09k|{
  247|  2.09k|  char *ptr = s->bufr;
  248|  2.09k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (248:3): [True: 0, False: 2.09k]
  |  Branch (248:3): [True: 2.09k, False: 0]
  ------------------
  249|  2.09k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (249:3): [True: 0, False: 2.09k]
  |  Branch (249:3): [True: 2.09k, False: 0]
  ------------------
  250|  2.09k|  *plen = s->leng;
  251|       |  s->bufr = NULL;
  252|  2.09k|  s->leng = 0;
  253|  2.09k|  s->allc = 0;
  254|  2.09k|  return ptr;
  255|  2.09k|}
curlx_dyn_uptr:
  261|  1.12k|{
  262|  1.12k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  1.12k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (262:3): [True: 0, False: 1.12k]
  |  Branch (262:3): [True: 1.12k, False: 0]
  ------------------
  263|  1.12k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  1.12k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (263:3): [True: 0, False: 1.12k]
  |  Branch (263:3): [True: 1.12k, False: 0]
  ------------------
  264|  1.12k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  1.12k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (264:3): [True: 1.12k, False: 0]
  |  Branch (264:3): [True: 0, False: 0]
  |  Branch (264:3): [True: 0, False: 1.12k]
  |  Branch (264:3): [True: 1.12k, False: 0]
  ------------------
  265|  1.12k|  return (unsigned char *)s->bufr;
  266|  1.12k|}
curlx_dyn_len:
  272|  5.79M|{
  273|  5.79M|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  5.79M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (273:3): [True: 0, False: 5.79M]
  |  Branch (273:3): [True: 5.79M, False: 0]
  ------------------
  274|  5.79M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  5.79M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (274:3): [True: 0, False: 5.79M]
  |  Branch (274:3): [True: 5.79M, False: 0]
  ------------------
  275|  5.79M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  5.79M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:3): [True: 5.79M, False: 0]
  |  Branch (275:3): [True: 0, False: 0]
  |  Branch (275:3): [True: 2.57M, False: 3.21M]
  |  Branch (275:3): [True: 3.21M, False: 0]
  ------------------
  276|  5.79M|  return s->leng;
  277|  5.79M|}
curlx_dyn_setlen:
  283|  20.8k|{
  284|  20.8k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  20.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (284:3): [True: 0, False: 20.8k]
  |  Branch (284:3): [True: 20.8k, False: 0]
  ------------------
  285|  20.8k|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|  20.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (285:3): [True: 0, False: 20.8k]
  |  Branch (285:3): [True: 20.8k, False: 0]
  ------------------
  286|  20.8k|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|  20.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (286:3): [True: 20.8k, False: 0]
  |  Branch (286:3): [True: 0, False: 0]
  |  Branch (286:3): [True: 0, False: 20.8k]
  |  Branch (286:3): [True: 20.8k, False: 0]
  ------------------
  287|  20.8k|  if(set > s->leng)
  ------------------
  |  Branch (287:6): [True: 0, False: 20.8k]
  ------------------
  288|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  289|  20.8k|  s->leng = set;
  290|  20.8k|  s->bufr[s->leng] = 0;
  291|  20.8k|  return CURLE_OK;
  292|  20.8k|}
dynbuf.c:dyn_nappend:
   69|   180M|{
   70|   180M|  size_t idx = s->leng;
   71|   180M|  size_t a = s->allc;
   72|   180M|  size_t fit = len + idx + 1; /* new string + old string + zero byte */
   73|       |
   74|       |  /* try to detect if there is rubbish in the struct */
   75|   180M|  DEBUGASSERT(s->init == DYNINIT);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (75:3): [True: 0, False: 180M]
  |  Branch (75:3): [True: 180M, False: 0]
  ------------------
   76|   180M|  DEBUGASSERT(s->toobig);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 180M]
  |  Branch (76:3): [True: 180M, False: 0]
  ------------------
   77|   180M|  DEBUGASSERT(idx < s->toobig);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 180M]
  |  Branch (77:3): [True: 180M, False: 0]
  ------------------
   78|   180M|  DEBUGASSERT(!s->leng || s->bufr);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (78:3): [True: 180M, False: 0]
  |  Branch (78:3): [True: 0, False: 0]
  |  Branch (78:3): [True: 3.06M, False: 177M]
  |  Branch (78:3): [True: 177M, False: 0]
  ------------------
   79|   180M|  DEBUGASSERT(a <= s->toobig);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 180M]
  |  Branch (79:3): [True: 180M, False: 0]
  ------------------
   80|   180M|  DEBUGASSERT(!len || mem);
  ------------------
  |  | 1081|   180M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (80:3): [True: 180M, False: 0]
  |  Branch (80:3): [True: 0, False: 0]
  |  Branch (80:3): [True: 8.19k, False: 180M]
  |  Branch (80:3): [True: 180M, False: 0]
  ------------------
   81|       |
   82|   180M|  if(fit > s->toobig) {
  ------------------
  |  Branch (82:6): [True: 63, False: 180M]
  ------------------
   83|     63|    curlx_dyn_free(s);
   84|     63|    return CURLE_TOO_LARGE;
   85|     63|  }
   86|   180M|  else if(!a) {
  ------------------
  |  Branch (86:11): [True: 2.83M, False: 177M]
  ------------------
   87|  2.83M|    DEBUGASSERT(!idx);
  ------------------
  |  | 1081|  2.83M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:5): [True: 0, False: 2.83M]
  |  Branch (87:5): [True: 2.83M, False: 0]
  ------------------
   88|       |    /* first invoke */
   89|  2.83M|    if(MIN_FIRST_ALLOC > s->toobig)
  ------------------
  |  |   29|  2.83M|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (89:8): [True: 40.7k, False: 2.78M]
  ------------------
   90|  40.7k|      a = s->toobig;
   91|  2.78M|    else if(fit < MIN_FIRST_ALLOC)
  ------------------
  |  |   29|  2.78M|#define MIN_FIRST_ALLOC 32
  ------------------
  |  Branch (91:13): [True: 2.78M, False: 7.89k]
  ------------------
   92|  2.78M|      a = MIN_FIRST_ALLOC;
  ------------------
  |  |   29|  2.78M|#define MIN_FIRST_ALLOC 32
  ------------------
   93|  7.89k|    else
   94|  7.89k|      a = fit;
   95|  2.83M|  }
   96|   177M|  else {
   97|   177M|    while(a < fit)
  ------------------
  |  Branch (97:11): [True: 370k, False: 177M]
  ------------------
   98|   370k|      a *= 2;
   99|   177M|    if(a > s->toobig)
  ------------------
  |  Branch (99:8): [True: 14.7k, False: 177M]
  ------------------
  100|       |      /* no point in allocating a larger buffer than this is allowed to use */
  101|  14.7k|      a = s->toobig;
  102|   177M|  }
  103|       |
  104|   180M|  if(a != s->allc) {
  ------------------
  |  Branch (104:6): [True: 3.19M, False: 177M]
  ------------------
  105|  3.19M|    void *p = curlx_realloc(s->bufr, a);
  ------------------
  |  | 1482|  3.19M|  curl_dbg_realloc(ptr, size, __LINE__, __FILE__)
  ------------------
  106|  3.19M|    if(!p) {
  ------------------
  |  Branch (106:8): [True: 0, False: 3.19M]
  ------------------
  107|      0|      curlx_dyn_free(s);
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    }
  110|  3.19M|    s->bufr = p;
  111|  3.19M|    s->allc = a;
  112|  3.19M|  }
  113|       |
  114|   180M|  if(len)
  ------------------
  |  Branch (114:6): [True: 180M, False: 8.19k]
  ------------------
  115|   180M|    memcpy(&s->bufr[idx], mem, len);
  116|   180M|  s->leng = idx + len;
  117|   180M|  s->bufr[s->leng] = 0;
  118|   180M|  return CURLE_OK;
  119|   180M|}

curlx_nonblock:
   47|  14.3k|{
   48|  14.3k|#ifdef HAVE_FCNTL_O_NONBLOCK
   49|       |  /* most recent Unix versions */
   50|  14.3k|  int flags;
   51|  14.3k|  flags = sfcntl(sockfd, F_GETFL, 0);
  ------------------
  |  | 1008|  14.3k|#  define sfcntl  fcntl
  ------------------
   52|  14.3k|  if(flags < 0)
  ------------------
  |  Branch (52:6): [True: 0, False: 14.3k]
  ------------------
   53|      0|    return -1;
   54|       |  /* Check if the current file status flags have already satisfied
   55|       |   * the request, if so, it is no need to call fcntl() to replicate it.
   56|       |   */
   57|  14.3k|  if(!!(flags & O_NONBLOCK) == !!nonblock)
  ------------------
  |  Branch (57:6): [True: 4.30k, False: 10.0k]
  ------------------
   58|  4.30k|    return 0;
   59|  10.0k|  if(nonblock)
  ------------------
  |  Branch (59:6): [True: 10.0k, False: 0]
  ------------------
   60|  10.0k|    flags |= O_NONBLOCK;
   61|      0|  else
   62|      0|    flags &= ~O_NONBLOCK;
   63|  10.0k|  return sfcntl(sockfd, F_SETFL, flags);
  ------------------
  |  | 1008|  10.0k|#  define sfcntl  fcntl
  ------------------
   64|       |
   65|       |#elif defined(HAVE_IOCTLSOCKET_CAMEL_FIONBIO)
   66|       |
   67|       |  /* Amiga */
   68|       |  long flags = nonblock ? 1L : 0L;
   69|       |  return IoctlSocket(sockfd, FIONBIO, (char *)&flags);
   70|       |
   71|       |#elif defined(HAVE_IOCTL_FIONBIO)
   72|       |
   73|       |  /* older Unix versions */
   74|       |  int flags = nonblock ? 1 : 0;
   75|       |  return ioctl(sockfd, FIONBIO, &flags);
   76|       |
   77|       |#elif defined(HAVE_IOCTLSOCKET_FIONBIO)
   78|       |
   79|       |  /* Windows */
   80|       |  unsigned long flags = nonblock ? 1UL : 0UL;
   81|       |  return ioctlsocket(sockfd, (long)FIONBIO, &flags);
   82|       |
   83|       |#elif defined(HAVE_SETSOCKOPT_SO_NONBLOCK)
   84|       |
   85|       |  /* Orbis OS */
   86|       |  long b = nonblock ? 1L : 0L;
   87|       |  return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
   88|       |
   89|       |#else
   90|       |#error "no non-blocking method was found/used/set"
   91|       |#endif
   92|  14.3k|}

curlx_strcopy:
   42|  16.8k|{
   43|  16.8k|  DEBUGASSERT(slen < dsize);
  ------------------
  |  | 1081|  16.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (43:3): [True: 0, False: 16.8k]
  |  Branch (43:3): [True: 16.8k, False: 0]
  ------------------
   44|  16.8k|  if(slen < dsize) {
  ------------------
  |  Branch (44:6): [True: 16.8k, False: 0]
  ------------------
   45|  16.8k|    memcpy(dest, src, slen);
   46|  16.8k|    dest[slen] = 0;
   47|  16.8k|  }
   48|      0|  else if(dsize)
  ------------------
  |  Branch (48:11): [True: 0, False: 0]
  ------------------
   49|      0|    dest[0] = 0;
   50|  16.8k|}

curlx_memdup:
   65|  15.9k|{
   66|  15.9k|  void *buffer = curlx_malloc(length);
  ------------------
  |  | 1478|  15.9k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   67|  15.9k|  if(!buffer)
  ------------------
  |  Branch (67:6): [True: 0, False: 15.9k]
  ------------------
   68|      0|    return NULL; /* fail */
   69|       |
   70|  15.9k|  memcpy(buffer, src, length);
   71|       |
   72|  15.9k|  return buffer;
   73|  15.9k|}
curlx_memdup0:
   86|   226k|{
   87|   226k|  char *buf = (length < SIZE_MAX) ? curlx_malloc(length + 1) : NULL;
  ------------------
  |  | 1478|   226k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  |  Branch (87:15): [True: 226k, False: 0]
  ------------------
   88|   226k|  if(!buf)
  ------------------
  |  Branch (88:6): [True: 0, False: 226k]
  ------------------
   89|      0|    return NULL;
   90|   226k|  if(length) {
  ------------------
  |  Branch (90:6): [True: 194k, False: 32.3k]
  ------------------
   91|   194k|    DEBUGASSERT(src); /* must never be NULL */
  ------------------
  |  | 1081|   194k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:5): [True: 0, False: 194k]
  |  Branch (91:5): [True: 194k, False: 0]
  ------------------
   92|   194k|    memcpy(buf, src, length);
   93|   194k|  }
   94|   226k|  buf[length] = 0;
   95|   226k|  return buf;
   96|   226k|}

curlx_strerror:
  249|    174|{
  250|       |#ifdef _WIN32
  251|       |  DWORD old_win_err = GetLastError();
  252|       |#endif
  253|    174|  int old_errno = errno;
  254|    174|  char *p;
  255|       |
  256|    174|  if(!buflen)
  ------------------
  |  Branch (256:6): [True: 0, False: 174]
  ------------------
  257|      0|    return NULL;
  258|       |
  259|    174|#ifndef _WIN32
  260|    174|  DEBUGASSERT(err >= 0);
  ------------------
  |  | 1081|    174|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (260:3): [True: 0, False: 174]
  |  Branch (260:3): [True: 174, False: 0]
  ------------------
  261|    174|#endif
  262|       |
  263|    174|  *buf = '\0';
  264|       |
  265|       |#ifdef _WIN32
  266|       |  if((strerror_s(buf, buflen, err) || !strcmp(buf, "Unknown error")) &&
  267|       |#ifdef USE_WINSOCK
  268|       |     !get_winsock_error(err, buf, buflen) &&
  269|       |#endif
  270|       |     !curlx_get_winapi_error((DWORD)err, buf, buflen))
  271|       |    SNPRINTF(buf, buflen, "Unknown error %d (%#x)", err, err);
  272|       |#else /* !_WIN32 */
  273|       |
  274|       |#if defined(HAVE_STRERROR_R) && defined(HAVE_POSIX_STRERROR_R)
  275|       |  /*
  276|       |   * The POSIX-style strerror_r() may set errno to ERANGE if insufficient
  277|       |   * storage is supplied via 'strerrbuf' and 'buflen' to hold the generated
  278|       |   * message string, or EINVAL if 'errnum' is not a valid error number.
  279|       |   */
  280|       |  if(strerror_r(err, buf, buflen) &&
  281|       |     buflen > sizeof("Unknown error ") + 20) {
  282|       |    if(buf[0] == '\0')
  283|       |      SNPRINTF(buf, buflen, "Unknown error %d", err);
  284|       |  }
  285|       |#elif defined(HAVE_STRERROR_R) && defined(HAVE_GLIBC_STRERROR_R)
  286|       |  /*
  287|       |   * The glibc-style strerror_r() only *might* use the buffer we pass to
  288|       |   * the function, but it always returns the error message as a pointer,
  289|       |   * so we must copy that string unconditionally (if non-NULL).
  290|       |   */
  291|    174|  {
  292|    174|    char buffer[256];
  293|    174|    const char *msg = strerror_r(err, buffer, sizeof(buffer));
  294|    174|    if(msg && buflen > 1)
  ------------------
  |  Branch (294:8): [True: 174, False: 0]
  |  Branch (294:15): [True: 174, False: 0]
  ------------------
  295|    174|      SNPRINTF(buf, buflen, "%s", msg);
  ------------------
  |  |   43|    174|#define SNPRINTF curl_msnprintf
  ------------------
  296|      0|    else if(buflen > sizeof("Unknown error ") + 20)
  ------------------
  |  Branch (296:13): [True: 0, False: 0]
  ------------------
  297|      0|      SNPRINTF(buf, buflen, "Unknown error %d", err);
  ------------------
  |  |   43|      0|#define SNPRINTF curl_msnprintf
  ------------------
  298|    174|  }
  299|       |#else
  300|       |  {
  301|       |    /* !checksrc! disable BANNEDFUNC 1 */
  302|       |    const char *msg = strerror(err);
  303|       |    if(msg && buflen > 1)
  304|       |      SNPRINTF(buf, buflen, "%s", msg);
  305|       |    else if(buflen > sizeof("Unknown error ") + 20)
  306|       |      SNPRINTF(buf, buflen, "Unknown error %d", err);
  307|       |  }
  308|       |#endif
  309|       |
  310|    174|#endif /* _WIN32 */
  311|       |
  312|       |  /* strip trailing '\r\n' or '\n'. */
  313|    174|  p = strrchr(buf, '\n');
  314|    174|  if(p && (p - buf) >= 2)
  ------------------
  |  Branch (314:6): [True: 0, False: 174]
  |  Branch (314:11): [True: 0, False: 0]
  ------------------
  315|      0|    *p = '\0';
  316|    174|  p = strrchr(buf, '\r');
  317|    174|  if(p && (p - buf) >= 1)
  ------------------
  |  Branch (317:6): [True: 0, False: 174]
  |  Branch (317:11): [True: 0, False: 0]
  ------------------
  318|      0|    *p = '\0';
  319|       |
  320|    174|  if(errno != old_errno)
  ------------------
  |  Branch (320:6): [True: 0, False: 174]
  ------------------
  321|    174|    errno = old_errno;
  322|       |
  323|       |#ifdef _WIN32
  324|       |  if(old_win_err != GetLastError())
  325|       |    SetLastError(old_win_err);
  326|       |#endif
  327|       |
  328|    174|  return buf;
  329|    174|}

curlx_str_init:
   27|   238k|{
   28|       |  out->str = NULL;
   29|   238k|  out->len = 0;
   30|   238k|}
curlx_str_assign:
   33|  2.68k|{
   34|  2.68k|  out->str = str;
   35|  2.68k|  out->len = len;
   36|  2.68k|}
curlx_str_until:
   51|   119k|{
   52|   119k|  const char *s;
   53|   119k|  size_t len = 0;
   54|   119k|  DEBUGASSERT(linep);
  ------------------
  |  | 1081|   119k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (54:3): [True: 0, False: 119k]
  |  Branch (54:3): [True: 119k, False: 0]
  ------------------
   55|   119k|  DEBUGASSERT(*linep);
  ------------------
  |  | 1081|   119k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (55:3): [True: 0, False: 119k]
  |  Branch (55:3): [True: 119k, False: 0]
  ------------------
   56|   119k|  DEBUGASSERT(out);
  ------------------
  |  | 1081|   119k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (56:3): [True: 0, False: 119k]
  |  Branch (56:3): [True: 119k, False: 0]
  ------------------
   57|   119k|  DEBUGASSERT(delim);
  ------------------
  |  | 1081|   119k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (57:3): [True: 0, False: 119k]
  |  Branch (57:3): [True: 119k, False: 0]
  ------------------
   58|   119k|  s = *linep;
   59|       |
   60|   119k|  curlx_str_init(out);
   61|  3.00M|  while(*s && (*s != delim)) {
  ------------------
  |  Branch (61:9): [True: 2.96M, False: 41.0k]
  |  Branch (61:15): [True: 2.89M, False: 78.8k]
  ------------------
   62|  2.89M|    s++;
   63|  2.89M|    if(++len > max) {
  ------------------
  |  Branch (63:8): [True: 45, False: 2.89M]
  ------------------
   64|     45|      return STRE_BIG;
  ------------------
  |  |   29|     45|#define STRE_BIG      1
  ------------------
   65|     45|    }
   66|  2.89M|  }
   67|   119k|  if(!len)
  ------------------
  |  Branch (67:6): [True: 3.05k, False: 116k]
  ------------------
   68|  3.05k|    return STRE_SHORT;
  ------------------
  |  |   30|  3.05k|#define STRE_SHORT    2
  ------------------
   69|   116k|  out->str = *linep;
   70|   116k|  out->len = len;
   71|   116k|  *linep = s; /* point to the first byte after the word */
   72|   116k|  return STRE_OK;
  ------------------
  |  |   28|   116k|#define STRE_OK       0
  ------------------
   73|   119k|}
curlx_str_word:
   78|  15.3k|{
   79|  15.3k|  return curlx_str_until(linep, out, max, ' ');
   80|  15.3k|}
curlx_str_untilnl:
   86|  43.7k|{
   87|  43.7k|  const char *s = *linep;
   88|  43.7k|  size_t len = 0;
   89|  43.7k|  DEBUGASSERT(linep && *linep && out && max);
  ------------------
  |  | 1081|  43.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 43.7k]
  |  Branch (89:3): [True: 0, False: 0]
  |  Branch (89:3): [True: 0, False: 0]
  |  Branch (89:3): [True: 0, False: 0]
  |  Branch (89:3): [True: 43.7k, False: 0]
  |  Branch (89:3): [True: 43.7k, False: 0]
  |  Branch (89:3): [True: 43.7k, False: 0]
  |  Branch (89:3): [True: 43.7k, False: 0]
  ------------------
   90|       |
   91|  43.7k|  curlx_str_init(out);
   92|  5.65M|  while(*s && !ISNEWLINE(*s)) {
  ------------------
  |  |   50|  5.63M|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 25.7k, False: 5.61M]
  |  |  |  Branch (50:43): [True: 1.97k, False: 5.60M]
  |  |  ------------------
  ------------------
  |  Branch (92:9): [True: 5.63M, False: 16.0k]
  ------------------
   93|  5.60M|    s++;
   94|  5.60M|    if(++len > max)
  ------------------
  |  Branch (94:8): [True: 1, False: 5.60M]
  ------------------
   95|      1|      return STRE_BIG;
  ------------------
  |  |   29|      1|#define STRE_BIG      1
  ------------------
   96|  5.60M|  }
   97|  43.7k|  if(!len)
  ------------------
  |  Branch (97:6): [True: 6.14k, False: 37.6k]
  ------------------
   98|  6.14k|    return STRE_SHORT;
  ------------------
  |  |   30|  6.14k|#define STRE_SHORT    2
  ------------------
   99|  37.6k|  out->str = *linep;
  100|  37.6k|  out->len = len;
  101|  37.6k|  *linep = s; /* point to the first byte after the word */
  102|  37.6k|  return STRE_OK;
  ------------------
  |  |   28|  37.6k|#define STRE_OK       0
  ------------------
  103|  43.7k|}
curlx_str_single:
  139|   768k|{
  140|   768k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1081|   768k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (140:3): [True: 0, False: 768k]
  |  Branch (140:3): [True: 0, False: 0]
  |  Branch (140:3): [True: 768k, False: 0]
  |  Branch (140:3): [True: 768k, False: 0]
  ------------------
  141|   768k|  if(**linep != byte)
  ------------------
  |  Branch (141:6): [True: 517k, False: 251k]
  ------------------
  142|   517k|    return STRE_BYTE;
  ------------------
  |  |   33|   517k|#define STRE_BYTE     5
  ------------------
  143|   251k|  (*linep)++; /* move over it */
  144|   251k|  return STRE_OK;
  ------------------
  |  |   28|   251k|#define STRE_OK       0
  ------------------
  145|   768k|}
curlx_str_singlespace:
  150|  15.3k|{
  151|  15.3k|  return curlx_str_single(linep, ' ');
  152|  15.3k|}
curlx_str_number:
  209|  1.94M|{
  210|  1.94M|  return str_num_base(linep, nump, max, 10);
  211|  1.94M|}
curlx_str_hex:
  216|    495|{
  217|    495|  return str_num_base(linep, nump, max, 16);
  218|    495|}
curlx_str_octal:
  223|  78.1k|{
  224|  78.1k|  return str_num_base(linep, nump, max, 8);
  225|  78.1k|}
curlx_str_numblanks:
  232|  2.87k|{
  233|  2.87k|  curlx_str_passblanks(str);
  234|  2.87k|  return curlx_str_number(str, num, CURL_OFF_T_MAX);
  ------------------
  |  |  594|  2.87k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  235|  2.87k|}
curlx_str_newline:
  240|  2.04k|{
  241|  2.04k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1081|  2.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 0, False: 2.04k]
  |  Branch (241:3): [True: 0, False: 0]
  |  Branch (241:3): [True: 2.04k, False: 0]
  |  Branch (241:3): [True: 2.04k, False: 0]
  ------------------
  242|  2.04k|  if(ISNEWLINE(**linep)) {
  ------------------
  |  |   50|  2.04k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 1.93k, False: 113]
  |  |  |  Branch (50:43): [True: 103, False: 10]
  |  |  ------------------
  ------------------
  243|  2.03k|    (*linep)++;
  244|  2.03k|    return STRE_OK; /* yessir */
  ------------------
  |  |   28|  2.03k|#define STRE_OK       0
  ------------------
  245|  2.03k|  }
  246|     10|  return STRE_NEWLINE;
  ------------------
  |  |   34|     10|#define STRE_NEWLINE  6
  ------------------
  247|  2.04k|}
curlx_str_casecompare:
  253|   332k|{
  254|   332k|  size_t clen = check ? strlen(check) : 0;
  ------------------
  |  Branch (254:17): [True: 332k, False: 0]
  ------------------
  255|   332k|  return ((str->len == clen) && curl_strnequal(str->str, check, clen));
  ------------------
  |  Branch (255:11): [True: 79.7k, False: 252k]
  |  Branch (255:33): [True: 36.1k, False: 43.6k]
  ------------------
  256|   332k|}
curlx_str_cmp:
  261|  24.6k|{
  262|  24.6k|  if(check) {
  ------------------
  |  Branch (262:6): [True: 24.6k, False: 0]
  ------------------
  263|  24.6k|    size_t clen = strlen(check);
  264|  24.6k|    return ((str->len == clen) && !strncmp(str->str, check, clen));
  ------------------
  |  Branch (264:13): [True: 16.7k, False: 7.89k]
  |  Branch (264:35): [True: 16.6k, False: 119]
  ------------------
  265|  24.6k|  }
  266|      0|  return !!(str->len);
  267|  24.6k|}
curlx_str_nudge:
  272|  27.6k|{
  273|  27.6k|  if(num <= str->len) {
  ------------------
  |  Branch (273:6): [True: 27.6k, False: 0]
  ------------------
  274|  27.6k|    str->str += num;
  275|  27.6k|    str->len -= num;
  276|  27.6k|    return STRE_OK;
  ------------------
  |  |   28|  27.6k|#define STRE_OK       0
  ------------------
  277|  27.6k|  }
  278|      0|  return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  279|  27.6k|}
curlx_str_cspn:
  285|   196k|{
  286|   196k|  const char *s = *linep;
  287|   196k|  size_t len;
  288|   196k|  DEBUGASSERT(linep && *linep);
  ------------------
  |  | 1081|   196k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (288:3): [True: 0, False: 196k]
  |  Branch (288:3): [True: 0, False: 0]
  |  Branch (288:3): [True: 196k, False: 0]
  |  Branch (288:3): [True: 196k, False: 0]
  ------------------
  289|       |
  290|   196k|  len = strcspn(s, reject);
  291|   196k|  if(len) {
  ------------------
  |  Branch (291:6): [True: 177k, False: 19.3k]
  ------------------
  292|   177k|    out->str = s;
  293|   177k|    out->len = len;
  294|   177k|    *linep = &s[len];
  295|   177k|    return STRE_OK;
  ------------------
  |  |   28|   177k|#define STRE_OK       0
  ------------------
  296|   177k|  }
  297|  19.3k|  curlx_str_init(out);
  298|  19.3k|  return STRE_SHORT;
  ------------------
  |  |   30|  19.3k|#define STRE_SHORT    2
  ------------------
  299|   196k|}
curlx_str_trimblanks:
  303|   234k|{
  304|   261k|  while(out->len && ISBLANK(*out->str))
  ------------------
  |  |   45|   253k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 24.4k, False: 228k]
  |  |  |  Branch (45:38): [True: 3.24k, False: 225k]
  |  |  ------------------
  ------------------
  |  Branch (304:9): [True: 253k, False: 8.56k]
  ------------------
  305|  27.6k|    curlx_str_nudge(out, 1);
  306|       |
  307|       |  /* trim trailing spaces and tabs */
  308|   242k|  while(out->len && ISBLANK(out->str[out->len - 1]))
  ------------------
  |  |   45|   233k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 7.12k, False: 226k]
  |  |  |  Branch (45:38): [True: 837, False: 225k]
  |  |  ------------------
  ------------------
  |  Branch (308:9): [True: 233k, False: 8.56k]
  ------------------
  309|  7.96k|    out->len--;
  310|   234k|}
curlx_str_passblanks:
  314|   279k|{
  315|   321k|  while(ISBLANK(**linep))
  ------------------
  |  |   45|   321k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 35.1k, False: 286k]
  |  |  |  Branch (45:38): [True: 6.74k, False: 279k]
  |  |  ------------------
  ------------------
  316|  41.8k|    (*linep)++; /* move over it */
  317|   279k|}
strparse.c:str_num_base:
  172|  2.02M|{
  173|  2.02M|  curl_off_t num = 0;
  174|  2.02M|  const char *p;
  175|  2.02M|  int m = (base == 10) ? '9' :   /* the largest digit possible */
  ------------------
  |  Branch (175:11): [True: 1.94M, False: 78.6k]
  ------------------
  176|  2.02M|    (base == 16) ? 'f' : '7';
  ------------------
  |  Branch (176:5): [True: 495, False: 78.1k]
  ------------------
  177|  2.02M|  DEBUGASSERT(linep && *linep && nump);
  ------------------
  |  | 1081|  2.02M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (177:3): [True: 0, False: 2.02M]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 0, False: 0]
  |  Branch (177:3): [True: 2.02M, False: 18.4E]
  |  Branch (177:3): [True: 2.02M, False: 0]
  |  Branch (177:3): [True: 2.02M, False: 0]
  ------------------
  178|  2.02M|  DEBUGASSERT((base == 8) || (base == 10) || (base == 16));
  ------------------
  |  | 1081|  2.02M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 2.02M, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 0, False: 0]
  |  Branch (178:3): [True: 78.1k, False: 1.95M]
  |  Branch (178:3): [True: 1.94M, False: 495]
  |  Branch (178:3): [True: 495, False: 0]
  ------------------
  179|  2.02M|  DEBUGASSERT(max >= 0); /* mostly to catch SIZE_MAX, which is too large */
  ------------------
  |  | 1081|  2.02M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 2.02M]
  |  Branch (179:3): [True: 2.02M, False: 0]
  ------------------
  180|  2.02M|  *nump = 0;
  181|  2.02M|  p = *linep;
  182|  2.02M|  if(!valid_digit(*p, m))
  ------------------
  |  |  156|  2.02M|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 2.00M, False: 27.3k]
  |  |  |  Branch (156:20): [True: 950k, False: 1.05M]
  |  |  |  Branch (156:36): [True: 950k, False: 123]
  |  |  ------------------
  ------------------
  183|  1.07M|    return STRE_NO_NUM;
  ------------------
  |  |   36|  1.07M|#define STRE_NO_NUM   8
  ------------------
  184|   950k|  if(max < base) {
  ------------------
  |  Branch (184:6): [True: 0, False: 950k]
  ------------------
  185|       |    /* special-case low max scenario because check needs to be different */
  186|      0|    do {
  187|      0|      int n = curlx_hexval(*p++);
  ------------------
  |  |  112|      0|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  188|      0|      num = (num * base) + n;
  189|      0|      if(num > max)
  ------------------
  |  Branch (189:10): [True: 0, False: 0]
  ------------------
  190|      0|        return STRE_OVERFLOW;
  ------------------
  |  |   35|      0|#define STRE_OVERFLOW 7
  ------------------
  191|      0|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|      0|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 0, False: 0]
  |  |  |  Branch (156:20): [True: 0, False: 0]
  |  |  |  Branch (156:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  192|      0|  }
  193|   950k|  else {
  194|  1.87M|    do {
  195|  1.87M|      int n = curlx_hexval(*p++);
  ------------------
  |  |  112|  1.87M|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  196|  1.87M|      if(num > ((max - n) / base))
  ------------------
  |  Branch (196:10): [True: 884, False: 1.87M]
  ------------------
  197|    884|        return STRE_OVERFLOW;
  ------------------
  |  |   35|    884|#define STRE_OVERFLOW 7
  ------------------
  198|  1.87M|      num = (num * base) + n;
  199|  1.87M|    } while(valid_digit(*p, m));
  ------------------
  |  |  156|  1.87M|  (((x) >= '0') && ((x) <= (m)) && curlx_hexasciitable[(x) - '0'])
  |  |  ------------------
  |  |  |  Branch (156:4): [True: 1.70M, False: 169k]
  |  |  |  Branch (156:20): [True: 922k, False: 780k]
  |  |  |  Branch (156:36): [True: 922k, False: 202]
  |  |  ------------------
  ------------------
  200|   950k|  }
  201|   949k|  *nump = num;
  202|   949k|  *linep = p;
  203|   949k|  return STRE_OK;
  ------------------
  |  |   28|   949k|#define STRE_OK       0
  ------------------
  204|   950k|}

curlx_mstotv:
   35|    180|{
   36|    180|  if(!tv)
  ------------------
  |  Branch (36:6): [True: 0, False: 180]
  ------------------
   37|      0|    return NULL;
   38|       |
   39|    180|  if(ms < 0)
  ------------------
  |  Branch (39:6): [True: 0, False: 180]
  ------------------
   40|      0|    return NULL;
   41|       |
   42|    180|  if(ms > 0) {
  ------------------
  |  Branch (42:6): [True: 180, False: 0]
  ------------------
   43|    180|    timediff_t tv_sec = ms / 1000;
   44|    180|    timediff_t tv_usec = (ms % 1000) * 1000; /* max=999000 */
   45|    180|#ifdef HAVE_SUSECONDS_T
   46|       |#if TIMEDIFF_T_MAX > TIME_T_MAX
   47|       |    /* tv_sec overflow check in case time_t is signed */
   48|       |    if(tv_sec > TIME_T_MAX)
   49|       |      tv_sec = TIME_T_MAX;
   50|       |#endif
   51|    180|    tv->tv_sec = (time_t)tv_sec;
   52|    180|    tv->tv_usec = (suseconds_t)tv_usec;
   53|       |#elif defined(_WIN32) /* maybe also others in the future */
   54|       |#if TIMEDIFF_T_MAX > LONG_MAX
   55|       |    /* tv_sec overflow check on Windows there we know it is long */
   56|       |    if(tv_sec > LONG_MAX)
   57|       |      tv_sec = LONG_MAX;
   58|       |#endif
   59|       |    tv->tv_sec = (long)tv_sec;
   60|       |    tv->tv_usec = (long)tv_usec;
   61|       |#else
   62|       |#if TIMEDIFF_T_MAX > INT_MAX
   63|       |    /* tv_sec overflow check in case time_t is signed */
   64|       |    if(tv_sec > INT_MAX)
   65|       |      tv_sec = INT_MAX;
   66|       |#endif
   67|       |    tv->tv_sec = (int)tv_sec;
   68|       |    tv->tv_usec = (int)tv_usec;
   69|       |#endif
   70|    180|  }
   71|      0|  else {
   72|      0|    tv->tv_sec = 0;
   73|      0|    tv->tv_usec = 0;
   74|      0|  }
   75|       |
   76|    180|  return tv;
   77|    180|}

curlx_pnow:
   54|  13.0M|{
   55|       |  /*
   56|       |   * clock_gettime() is granted to be increased monotonically when the
   57|       |   * monotonic clock is queried. Time starting point is unspecified, it
   58|       |   * could be the system start-up time, the Epoch, or something else,
   59|       |   * in any case the time starting point does not change once that the
   60|       |   * system has started up.
   61|       |   */
   62|  13.0M|  struct timespec tsnow;
   63|       |
   64|       |  /*
   65|       |   * clock_gettime() may be defined by Apple's SDK as weak symbol thus
   66|       |   * code compiles but fails during runtime if clock_gettime() is
   67|       |   * called on unsupported OS version.
   68|       |   */
   69|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   70|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   71|       |  bool have_clock_gettime = FALSE;
   72|       |  if(__builtin_available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *))
   73|       |    have_clock_gettime = TRUE;
   74|       |#endif
   75|       |
   76|  13.0M|#ifdef HAVE_CLOCK_GETTIME_MONOTONIC_RAW
   77|  13.0M|  if(
   78|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   79|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   80|       |    have_clock_gettime &&
   81|       |#endif
   82|  13.0M|    (clock_gettime(CLOCK_MONOTONIC_RAW, &tsnow) == 0)) {
  ------------------
  |  Branch (82:5): [True: 13.0M, False: 18.4E]
  ------------------
   83|  13.0M|    pnow->tv_sec = tsnow.tv_sec;
   84|  13.0M|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   85|  13.0M|  }
   86|  18.4E|  else
   87|  18.4E|#endif
   88|       |
   89|  18.4E|  if(
   90|       |#if defined(__APPLE__) && defined(HAVE_BUILTIN_AVAILABLE) && \
   91|       |  (HAVE_BUILTIN_AVAILABLE == 1)
   92|       |    have_clock_gettime &&
   93|       |#endif
   94|  18.4E|    (clock_gettime(CLOCK_MONOTONIC, &tsnow) == 0)) {
  ------------------
  |  Branch (94:5): [True: 0, False: 18.4E]
  ------------------
   95|      0|    pnow->tv_sec = tsnow.tv_sec;
   96|      0|    pnow->tv_usec = (int)(tsnow.tv_nsec / 1000);
   97|      0|  }
   98|       |  /*
   99|       |   * Even when the configure process has truly detected monotonic clock
  100|       |   * availability, it might happen that it is not actually available at
  101|       |   * runtime. When this occurs, fallback to other time source.
  102|       |   */
  103|  18.4E|#ifdef HAVE_GETTIMEOFDAY
  104|  18.4E|  else {
  105|  18.4E|    struct timeval now;
  106|  18.4E|    (void)gettimeofday(&now, NULL);
  107|  18.4E|    pnow->tv_sec = now.tv_sec;
  108|  18.4E|    pnow->tv_usec = (int)now.tv_usec;
  109|  18.4E|  }
  110|       |#else
  111|       |  else {
  112|       |    pnow->tv_sec = time(NULL);
  113|       |    pnow->tv_usec = 0;
  114|       |  }
  115|       |#endif
  116|  13.0M|}
curlx_now:
  176|  2.89k|{
  177|  2.89k|  struct curltime now;
  178|  2.89k|  curlx_pnow(&now);
  179|  2.89k|  return now;
  180|  2.89k|}
curlx_ptimediff_ms:
  190|  9.95M|{
  191|  9.95M|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  192|  9.95M|  if(diff >= (TIMEDIFF_T_MAX / 1000))
  ------------------
  |  |   33|  9.95M|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|  9.95M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (192:6): [True: 0, False: 9.95M]
  ------------------
  193|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  194|  9.95M|  else if(diff <= (TIMEDIFF_T_MIN / 1000))
  ------------------
  |  |   34|  9.95M|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|  9.95M|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|  9.95M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (194:11): [True: 0, False: 9.95M]
  ------------------
  195|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  196|  9.95M|  return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
  197|  9.95M|}
curlx_ptimediff_us:
  225|  10.1M|{
  226|  10.1M|  timediff_t diff = (timediff_t)newer->tv_sec - older->tv_sec;
  227|  10.1M|  if(diff >= (TIMEDIFF_T_MAX / 1000000))
  ------------------
  |  |   33|  10.1M|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|  10.1M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (227:6): [True: 0, False: 10.1M]
  ------------------
  228|      0|    return TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  229|  10.1M|  else if(diff <= (TIMEDIFF_T_MIN / 1000000))
  ------------------
  |  |   34|  10.1M|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|  10.1M|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|  10.1M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (229:11): [True: 0, False: 10.1M]
  ------------------
  230|      0|    return TIMEDIFF_T_MIN;
  ------------------
  |  |   34|      0|#define TIMEDIFF_T_MIN CURL_OFF_T_MIN
  |  |  ------------------
  |  |  |  |  596|      0|#define CURL_OFF_T_MIN (-CURL_OFF_T_MAX - 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  231|  10.1M|  return (diff * 1000000) + newer->tv_usec - older->tv_usec;
  232|  10.1M|}
curlx_gmtime:
  253|  2.74k|{
  254|       |#ifdef _WIN32
  255|       |  if(gmtime_s(store, &intime)) /* thread-safe */
  256|       |    return CURLE_BAD_FUNCTION_ARGUMENT;
  257|       |#elif defined(HAVE_GMTIME_R)
  258|       |  const struct tm *tm;
  259|  2.74k|  tm = gmtime_r(&intime, store); /* thread-safe */
  260|  2.74k|  if(!tm)
  ------------------
  |  Branch (260:6): [True: 0, False: 2.74k]
  ------------------
  261|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  262|       |#else
  263|       |  const struct tm *tm;
  264|       |  /* !checksrc! disable BANNEDFUNC 1 */
  265|       |  tm = gmtime(&intime); /* not thread-safe */
  266|       |  if(tm)
  267|       |    *store = *tm; /* copy the pointed struct to the local copy */
  268|       |  else
  269|       |    return CURLE_BAD_FUNCTION_ARGUMENT;
  270|       |#endif
  271|       |
  272|  2.74k|  return CURLE_OK;
  273|  2.74k|}

curlx_wait_ms:
   59|   925k|{
   60|   925k|  int r = 0;
   61|       |
   62|   925k|  if(!timeout_ms)
  ------------------
  |  Branch (62:6): [True: 924k, False: 180]
  ------------------
   63|   924k|    return 0;
   64|    180|  if(timeout_ms < 0) {
  ------------------
  |  Branch (64:6): [True: 0, False: 180]
  ------------------
   65|      0|    SET_SOCKERRNO(SOCKEINVAL);
  ------------------
  |  | 1096|      0|#define SET_SOCKERRNO(x)  (errno = (x))
  ------------------
   66|      0|    return -1;
   67|      0|  }
   68|       |#ifdef MSDOS
   69|       |  delay((unsigned int)timeout_ms);
   70|       |#elif defined(_WIN32)
   71|       |  /* prevent overflow, timeout_ms is typecast to ULONG/DWORD. */
   72|       |#if TIMEDIFF_T_MAX >= ULONG_MAX
   73|       |  if(timeout_ms >= ULONG_MAX)
   74|       |    timeout_ms = ULONG_MAX - 1;
   75|       |    /* do not use ULONG_MAX, because that is equal to INFINITE */
   76|       |#endif
   77|       |  Sleep((DWORD)timeout_ms);
   78|       |#else
   79|       |  /* avoid using poll() for this since it behaves incorrectly with no sockets
   80|       |     on Apple operating systems */
   81|    180|  {
   82|    180|    struct timeval pending_tv;
   83|    180|    r = select(0, NULL, NULL, NULL, curlx_mstotv(&pending_tv, timeout_ms));
   84|    180|  }
   85|    180|#endif /* _WIN32 */
   86|    180|  if(r) {
  ------------------
  |  Branch (86:6): [True: 0, False: 180]
  ------------------
   87|      0|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (87:8): [True: 0, False: 0]
  |  Branch (87:21): [True: 0, False: 0]
  ------------------
   88|       |      /* make EINTR from select or poll not a "lethal" error */
   89|      0|      r = 0;
   90|      0|    else
   91|      0|      r = -1;
   92|      0|  }
   93|    180|  return r;
   94|    180|}

curlx_uztosi:
   73|  8.20k|{
   74|       |#ifdef __INTEL_COMPILER
   75|       |#pragma warning(push)
   76|       |#pragma warning(disable:810) /* conversion may lose significant bits */
   77|       |#endif
   78|       |
   79|  8.20k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_SINT);
  ------------------
  |  | 1081|  8.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (79:3): [True: 0, False: 8.20k]
  |  Branch (79:3): [True: 8.20k, False: 0]
  ------------------
   80|  8.20k|  return (int)(uznum & (size_t)CURL_MASK_SINT);
  ------------------
  |  |   44|  8.20k|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|  8.20k|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
   81|       |
   82|       |#ifdef __INTEL_COMPILER
   83|       |#pragma warning(pop)
   84|       |#endif
   85|  8.20k|}
curlx_uztoui:
  111|  13.4k|{
  112|       |#ifdef __INTEL_COMPILER
  113|       |#pragma warning(push)
  114|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  115|       |#endif
  116|       |
  117|  13.4k|#if UINT_MAX < SIZE_MAX
  118|  13.4k|  DEBUGASSERT(uznum <= (size_t)CURL_MASK_UINT);
  ------------------
  |  | 1081|  13.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 13.4k]
  |  Branch (118:3): [True: 13.4k, False: 0]
  ------------------
  119|  13.4k|#endif
  120|  13.4k|  return (unsigned int)(uznum & (size_t)CURL_MASK_UINT);
  ------------------
  |  |   43|  13.4k|#define CURL_MASK_UINT    ((unsigned int)~0)
  ------------------
  121|       |
  122|       |#ifdef __INTEL_COMPILER
  123|       |#pragma warning(pop)
  124|       |#endif
  125|  13.4k|}
curlx_sltosi:
  131|    141|{
  132|       |#ifdef __INTEL_COMPILER
  133|       |#pragma warning(push)
  134|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  135|       |#endif
  136|       |
  137|    141|  DEBUGASSERT(slnum >= 0);
  ------------------
  |  | 1081|    141|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 0, False: 141]
  |  Branch (137:3): [True: 141, False: 0]
  ------------------
  138|    141|#if INT_MAX < LONG_MAX
  139|    141|  DEBUGASSERT((unsigned long)slnum <= (unsigned long)CURL_MASK_SINT);
  ------------------
  |  | 1081|    141|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 141]
  |  Branch (139:3): [True: 141, False: 0]
  ------------------
  140|    141|#endif
  141|    141|  return (int)(slnum & (long)CURL_MASK_SINT);
  ------------------
  |  |   44|    141|#define CURL_MASK_SINT    (CURL_MASK_UINT >> 1)
  |  |  ------------------
  |  |  |  |   43|    141|#define CURL_MASK_UINT    ((unsigned int)~0)
  |  |  ------------------
  ------------------
  142|       |
  143|       |#ifdef __INTEL_COMPILER
  144|       |#pragma warning(pop)
  145|       |#endif
  146|    141|}
curlx_sltous:
  173|    120|{
  174|       |#ifdef __INTEL_COMPILER
  175|       |#pragma warning(push)
  176|       |#pragma warning(disable:810) /* conversion may lose significant bits */
  177|       |#endif
  178|       |
  179|    120|  DEBUGASSERT(slnum >= 0);
  ------------------
  |  | 1081|    120|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 120]
  |  Branch (179:3): [True: 120, False: 0]
  ------------------
  180|    120|  DEBUGASSERT((unsigned long)slnum <= (unsigned long)CURL_MASK_USHORT);
  ------------------
  |  | 1081|    120|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (180:3): [True: 0, False: 120]
  |  Branch (180:3): [True: 120, False: 0]
  ------------------
  181|    120|  return (unsigned short)(slnum & (long)CURL_MASK_USHORT);
  ------------------
  |  |   41|    120|#define CURL_MASK_USHORT  ((unsigned short)~0)
  ------------------
  182|       |
  183|       |#ifdef __INTEL_COMPILER
  184|       |#pragma warning(pop)
  185|       |#endif
  186|    120|}
curlx_uitouz:
  282|  2.13M|{
  283|  2.13M|  return (size_t)uinum;
  284|  2.13M|}
curlx_sotouz_range:
  287|  1.50M|{
  288|  1.50M|  if(sonum < 0)
  ------------------
  |  Branch (288:6): [True: 0, False: 1.50M]
  ------------------
  289|      0|    return uzmin;
  290|       |#if SIZEOF_CURL_OFF_T > SIZEOF_SIZE_T
  291|       |  if(sonum > SIZE_MAX)
  292|       |    return uzmax;
  293|       |#endif
  294|  1.50M|  return CURLMIN(CURLMAX((size_t)sonum, uzmin), uzmax);
  ------------------
  |  | 1287|  3.00M|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 1.50M, False: 1.79k]
  |  |  |  Branch (1287:25): [True: 1.50M, False: 59]
  |  |  |  Branch (1287:37): [True: 1.50M, False: 59]
  |  |  ------------------
  ------------------
  295|  1.50M|}
curlx_sztouz:
  298|  3.89M|{
  299|  3.89M|  if(sznum < 0) {
  ------------------
  |  Branch (299:6): [True: 4.20k, False: 3.88M]
  ------------------
  300|  4.20k|    *puznum = 0;
  301|  4.20k|    return FALSE;
  ------------------
  |  | 1058|  4.20k|#define FALSE false
  ------------------
  302|  4.20k|  }
  303|  3.88M|  *puznum = (size_t)sznum;
  304|       |  return TRUE;
  ------------------
  |  | 1055|  3.88M|#define TRUE true
  ------------------
  305|  3.89M|}

Curl_cw_out_is_paused:
  459|  1.71M|{
  460|  1.71M|  struct Curl_cwriter *cw_out;
  461|  1.71M|  struct cw_out_ctx *ctx;
  462|       |
  463|  1.71M|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  464|  1.71M|  if(!cw_out)
  ------------------
  |  Branch (464:6): [True: 2.50k, False: 1.71M]
  ------------------
  465|  2.50k|    return FALSE;
  ------------------
  |  | 1058|  2.50k|#define FALSE false
  ------------------
  466|       |
  467|  1.71M|  ctx = (struct cw_out_ctx *)cw_out;
  468|  1.71M|  return (bool)ctx->paused;
  469|  1.71M|}
Curl_cw_out_done:
  510|  21.3k|{
  511|  21.3k|  struct Curl_cwriter *cw_out;
  512|  21.3k|  CURLcode result = CURLE_OK;
  513|       |
  514|  21.3k|  cw_out = Curl_cwriter_get_by_type(data, &Curl_cwt_out);
  515|  21.3k|  if(cw_out) {
  ------------------
  |  Branch (515:6): [True: 15.6k, False: 5.60k]
  ------------------
  516|  15.6k|    CURL_TRC_WRITE(data, "[OUT] done");
  ------------------
  |  |  158|  15.6k|  do {                                                     \
  |  |  159|  15.6k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  15.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  31.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 15.6k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  31.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  15.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  15.6k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  15.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  517|  15.6k|    result = Curl_cw_pause_flush(data);
  518|  15.6k|    if(!result)
  ------------------
  |  Branch (518:8): [True: 15.6k, False: 0]
  ------------------
  519|  15.6k|      result = cw_out_flush(data, cw_out, TRUE);
  ------------------
  |  | 1055|  15.6k|#define TRUE true
  ------------------
  520|  15.6k|  }
  521|  21.3k|  return result;
  522|  21.3k|}
cw-out.c:cw_out_init:
  106|  15.7k|{
  107|  15.7k|  struct cw_out_ctx *ctx = writer->ctx;
  108|  15.7k|  (void)data;
  109|       |  ctx->buf = NULL;
  110|  15.7k|  return CURLE_OK;
  111|  15.7k|}
cw-out.c:cw_out_write:
  426|  1.70M|{
  427|  1.70M|  struct cw_out_ctx *ctx = writer->ctx;
  428|  1.70M|  CURLcode result;
  429|  1.70M|  bool flush_all = !!(type & CLIENTWRITE_EOS);
  ------------------
  |  |   49|  1.70M|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  430|       |
  431|  1.70M|  if((type & CLIENTWRITE_BODY) ||
  ------------------
  |  |   42|  1.70M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (431:6): [True: 1.49M, False: 211k]
  ------------------
  432|  1.50M|     ((type & CLIENTWRITE_HEADER) && data->set.include_header)) {
  ------------------
  |  |   44|   211k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  |  Branch (432:7): [True: 211k, False: 0]
  |  Branch (432:38): [True: 8.30k, False: 203k]
  ------------------
  433|  1.50M|    cw_out_type otype = (!blen && (type & CLIENTWRITE_0LEN)) ?
  ------------------
  |  |   50|      0|#define CLIENTWRITE_0LEN    (1 << 8) /* write even 0-length buffers */
  ------------------
  |  Branch (433:26): [True: 0, False: 1.50M]
  |  Branch (433:35): [True: 0, False: 0]
  ------------------
  434|  1.50M|                        CW_OUT_BODY_0LEN : CW_OUT_BODY;
  435|  1.50M|    result = cw_out_do_write(ctx, data, otype, flush_all, buf, blen);
  436|  1.50M|    if(result)
  ------------------
  |  Branch (436:8): [True: 3, False: 1.50M]
  ------------------
  437|      3|      return result;
  438|  1.50M|  }
  439|       |
  440|  1.70M|  if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   44|  1.70M|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
                if(type & (CLIENTWRITE_HEADER | CLIENTWRITE_INFO)) {
  ------------------
  |  |   43|  1.70M|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
  |  Branch (440:6): [True: 211k, False: 1.49M]
  ------------------
  441|   211k|    result = cw_out_do_write(ctx, data, CW_OUT_HDS, flush_all, buf, blen);
  442|   211k|    if(result)
  ------------------
  |  Branch (442:8): [True: 0, False: 211k]
  ------------------
  443|      0|      return result;
  444|   211k|  }
  445|       |
  446|  1.70M|  return CURLE_OK;
  447|  1.70M|}
cw-out.c:cw_out_do_write:
  376|  1.71M|{
  377|  1.71M|  CURLcode result = CURLE_OK;
  378|       |
  379|       |  /* if we have buffered data and it is a different type than what
  380|       |   * we are writing now, try to flush all */
  381|  1.71M|  if(ctx->buf && ctx->buf->type != otype) {
  ------------------
  |  Branch (381:6): [True: 0, False: 1.71M]
  |  Branch (381:18): [True: 0, False: 0]
  ------------------
  382|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  383|      0|    if(result)
  ------------------
  |  Branch (383:8): [True: 0, False: 0]
  ------------------
  384|      0|      goto out;
  385|      0|  }
  386|       |
  387|  1.71M|  if(ctx->buf) {
  ------------------
  |  Branch (387:6): [True: 0, False: 1.71M]
  ------------------
  388|       |    /* still have buffered data, append and flush */
  389|      0|    result = cw_out_append(ctx, data, otype, buf, blen);
  390|      0|    if(result)
  ------------------
  |  Branch (390:8): [True: 0, False: 0]
  ------------------
  391|      0|      goto out;
  392|      0|    result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  393|      0|    if(result)
  ------------------
  |  Branch (393:8): [True: 0, False: 0]
  ------------------
  394|      0|      goto out;
  395|      0|  }
  396|  1.71M|  else {
  397|       |    /* nothing buffered, try direct write */
  398|  1.71M|    size_t consumed;
  399|  1.71M|    result = cw_out_ptr_flush(ctx, data, otype, flush_all,
  400|  1.71M|                              buf, blen, &consumed);
  401|  1.71M|    if(result && (result != CURLE_AGAIN))
  ------------------
  |  Branch (401:8): [True: 3, False: 1.71M]
  |  Branch (401:18): [True: 3, False: 0]
  ------------------
  402|      3|      return result;
  403|  1.71M|    result = CURLE_OK;
  404|  1.71M|    if(consumed < blen) {
  ------------------
  |  Branch (404:8): [True: 0, False: 1.71M]
  ------------------
  405|       |      /* did not write all, append the rest */
  406|      0|      result = cw_out_append(ctx, data, otype,
  407|      0|                             buf + consumed, blen - consumed);
  408|      0|      if(result)
  ------------------
  |  Branch (408:10): [True: 0, False: 0]
  ------------------
  409|      0|        goto out;
  410|      0|    }
  411|  1.71M|  }
  412|       |
  413|  1.71M|out:
  414|  1.71M|  if(result) {
  ------------------
  |  Branch (414:6): [True: 0, False: 1.71M]
  ------------------
  415|       |    /* We do not want to invoked client callbacks a second time after
  416|       |     * encountering an error. See issue #13337 */
  417|       |    ctx->errored = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  418|      0|    cw_out_bufs_free(ctx);
  419|      0|  }
  420|  1.71M|  return result;
  421|  1.71M|}
cw-out.c:cw_out_flush_chain:
  311|  15.6k|{
  312|  15.6k|  struct cw_out_buf *cwbuf = *pcwbuf;
  313|  15.6k|  CURLcode result;
  314|       |
  315|  15.6k|  if(!cwbuf)
  ------------------
  |  Branch (315:6): [True: 15.6k, False: 0]
  ------------------
  316|  15.6k|    return CURLE_OK;
  317|      0|  if(ctx->paused)
  ------------------
  |  Branch (317:6): [True: 0, False: 0]
  ------------------
  318|      0|    return CURLE_OK;
  319|       |
  320|       |  /* write the end of the chain until it blocks or gets empty */
  321|      0|  while(cwbuf->next) {
  ------------------
  |  Branch (321:9): [True: 0, False: 0]
  ------------------
  322|      0|    struct cw_out_buf **plast = &cwbuf->next;
  323|      0|    while((*plast)->next)
  ------------------
  |  Branch (323:11): [True: 0, False: 0]
  ------------------
  324|      0|      plast = &(*plast)->next;
  325|      0|    result = cw_out_flush_chain(ctx, data, plast, flush_all);
  326|      0|    if(result)
  ------------------
  |  Branch (326:8): [True: 0, False: 0]
  ------------------
  327|      0|      return result;
  328|      0|    if(*plast) {
  ------------------
  |  Branch (328:8): [True: 0, False: 0]
  ------------------
  329|       |      /* could not write last, paused again? */
  330|      0|      DEBUGASSERT(ctx->paused);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:7): [True: 0, False: 0]
  |  Branch (330:7): [True: 0, False: 0]
  ------------------
  331|      0|      return CURLE_OK;
  332|      0|    }
  333|      0|  }
  334|       |
  335|      0|  result = cw_out_buf_flush(ctx, data, cwbuf, flush_all);
  336|      0|  if(result)
  ------------------
  |  Branch (336:6): [True: 0, False: 0]
  ------------------
  337|      0|    return result;
  338|      0|  if(!curlx_dyn_len(&cwbuf->b)) {
  ------------------
  |  Branch (338:6): [True: 0, False: 0]
  ------------------
  339|      0|    cw_out_buf_free(cwbuf);
  340|       |    *pcwbuf = NULL;
  341|      0|  }
  342|      0|  return CURLE_OK;
  343|      0|}
cw-out.c:cw_out_ptr_flush:
  227|  1.71M|{
  228|  1.71M|  curl_write_callback wcb = NULL;
  229|  1.71M|  void *wcb_data;
  230|  1.71M|  size_t max_write, min_write;
  231|  1.71M|  size_t wlen, nwritten = 0;
  232|  1.71M|  CURLcode result = CURLE_OK;
  233|       |
  234|       |  /* If we errored once, we do not invoke the client callback again */
  235|  1.71M|  if(ctx->errored)
  ------------------
  |  Branch (235:6): [True: 0, False: 1.71M]
  ------------------
  236|      0|    return CURLE_WRITE_ERROR;
  237|       |
  238|       |  /* write callbacks may get NULLed by the client between calls. */
  239|  1.71M|  cw_get_writefunc(data, otype, &wcb, &wcb_data, &max_write, &min_write);
  240|  1.71M|  if(!wcb) {
  ------------------
  |  Branch (240:6): [True: 211k, False: 1.50M]
  ------------------
  241|   211k|    *pconsumed = blen;
  242|   211k|    return CURLE_OK;
  243|   211k|  }
  244|       |
  245|  1.50M|  *pconsumed = 0;
  246|  1.50M|  if(otype == CW_OUT_BODY_0LEN) {
  ------------------
  |  Branch (246:6): [True: 0, False: 1.50M]
  ------------------
  247|      0|    DEBUGASSERT(!blen);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:5): [True: 0, False: 0]
  |  Branch (247:5): [True: 0, False: 0]
  ------------------
  248|      0|    return cw_out_cb_write(ctx, data, wcb, wcb_data, otype,
  249|      0|                           buf, blen, &nwritten);
  250|      0|  }
  251|  1.50M|  else {
  252|  3.01M|    while(blen && !ctx->paused) {
  ------------------
  |  Branch (252:11): [True: 1.50M, False: 1.50M]
  |  Branch (252:19): [True: 1.50M, False: 0]
  ------------------
  253|  1.50M|      if(!flush_all && blen < min_write)
  ------------------
  |  Branch (253:10): [True: 1.50M, False: 0]
  |  Branch (253:24): [True: 0, False: 1.50M]
  ------------------
  254|      0|        break;
  255|  1.50M|      wlen = max_write ? CURLMIN(blen, max_write) : blen;
  ------------------
  |  | 1287|  1.50M|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 1.50M, False: 1.23k]
  |  |  ------------------
  ------------------
  |  Branch (255:14): [True: 1.50M, False: 0]
  ------------------
  256|  1.50M|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (256:10): [True: 1.50M, False: 0]
  ------------------
  257|  1.50M|        result = Curl_pgrs_deliver_check(data, wlen);
  258|  1.50M|      if(!result)
  ------------------
  |  Branch (258:10): [True: 1.50M, False: 3]
  ------------------
  259|  1.50M|        result = cw_out_cb_write(ctx, data, wcb, wcb_data, otype,
  260|  1.50M|                                 buf, wlen, &nwritten);
  261|  1.50M|      if(result)
  ------------------
  |  Branch (261:10): [True: 3, False: 1.50M]
  ------------------
  262|      3|        return result;
  263|  1.50M|      if(otype == CW_OUT_BODY)
  ------------------
  |  Branch (263:10): [True: 1.50M, False: 0]
  ------------------
  264|  1.50M|        Curl_pgrs_deliver_inc(data, nwritten);
  265|  1.50M|      *pconsumed += nwritten;
  266|  1.50M|      blen -= nwritten;
  267|  1.50M|      buf += nwritten;
  268|  1.50M|    }
  269|  1.50M|  }
  270|  1.50M|  return CURLE_OK;
  271|  1.50M|}
cw-out.c:cw_get_writefunc:
  147|  1.71M|{
  148|  1.71M|  switch(otype) {
  149|  1.50M|  case CW_OUT_BODY:
  ------------------
  |  Branch (149:3): [True: 1.50M, False: 211k]
  ------------------
  150|  1.50M|  case CW_OUT_BODY_0LEN:
  ------------------
  |  Branch (150:3): [True: 0, False: 1.71M]
  ------------------
  151|  1.50M|    *pwcb = data->set.fwrite_func;
  152|  1.50M|    *pwcb_data = data->set.out;
  153|  1.50M|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|  1.50M|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  154|       |    /* if we ever want buffering of BODY output, we can set `min_write`
  155|       |     * the preferred size. The default should always be to pass data
  156|       |     * to the client as it comes without delay */
  157|  1.50M|    *pmin_write = 0;
  158|  1.50M|    break;
  159|   211k|  case CW_OUT_HDS:
  ------------------
  |  Branch (159:3): [True: 211k, False: 1.50M]
  ------------------
  160|   211k|    *pwcb = data->set.fwrite_header ? data->set.fwrite_header :
  ------------------
  |  Branch (160:13): [True: 0, False: 211k]
  ------------------
  161|   211k|             (data->set.writeheader ? data->set.fwrite_func : NULL);
  ------------------
  |  Branch (161:15): [True: 0, False: 211k]
  ------------------
  162|   211k|    *pwcb_data = data->set.writeheader;
  163|   211k|    *pmax_write = 0; /* do not chunk-write headers, write them as they are */
  164|   211k|    *pmin_write = 0;
  165|   211k|    break;
  166|      0|  default:
  ------------------
  |  Branch (166:3): [True: 0, False: 1.71M]
  ------------------
  167|      0|    *pwcb = NULL;
  168|      0|    *pwcb_data = NULL;
  169|      0|    *pmax_write = CURL_MAX_WRITE_SIZE;
  ------------------
  |  |  265|      0|#define CURL_MAX_WRITE_SIZE 16384
  ------------------
  170|      0|    *pmin_write = 0;
  171|  1.71M|  }
  172|  1.71M|}
cw-out.c:cw_out_cb_write:
  181|  1.50M|{
  182|  1.50M|  size_t nwritten;
  183|  1.50M|  CURLcode result;
  184|       |
  185|  1.50M|  NOVERBOSE((void)otype);
  ------------------
  |  | 1619|  1.50M|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|  1.50M|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 1.50M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|       |
  187|  1.50M|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  1.50M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (187:3): [True: 0, False: 1.50M]
  |  Branch (187:3): [True: 1.50M, False: 0]
  ------------------
  188|  1.50M|  *pnwritten = 0;
  189|  1.50M|  Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|  1.50M|#define TRUE true
  ------------------
  190|  1.50M|  nwritten = wcb((char *)CURL_UNCONST(buf), 1, blen, wcb_data);
  ------------------
  |  |  866|  1.50M|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  191|  1.50M|  Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|  1.50M|#define FALSE false
  ------------------
  192|  1.50M|  CURL_TRC_WRITE(data, "[OUT] wrote %zu %s bytes -> %zu",
  ------------------
  |  |  158|  1.50M|  do {                                                     \
  |  |  159|  1.50M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.50M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.01M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.50M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.50M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.01M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.50M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.50M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (160:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  161|  1.50M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.50M]
  |  |  ------------------
  ------------------
  193|  1.50M|                 blen, (otype == CW_OUT_HDS) ? "header" : "body",
  194|  1.50M|                 nwritten);
  195|  1.50M|  if(nwritten == CURL_WRITEFUNC_PAUSE) {
  ------------------
  |  |  277|  1.50M|#define CURL_WRITEFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (195:6): [True: 0, False: 1.50M]
  ------------------
  196|      0|    if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|       |      /* Protocols that work without network cannot be paused. This is
  198|       |         actually only file:// now, and it cannot pause since the transfer is
  199|       |         not done using the "normal" procedure. */
  200|      0|      failf(data, "Write callback asked for PAUSE when not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  201|      0|      return CURLE_WRITE_ERROR;
  202|      0|    }
  203|      0|    ctx->paused = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  204|      0|    CURL_TRC_WRITE(data, "[OUT] PAUSE requested by client");
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  205|      0|    result = Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  206|      0|    return result ? result : CURLE_AGAIN;
  ------------------
  |  Branch (206:12): [True: 0, False: 0]
  ------------------
  207|      0|  }
  208|  1.50M|  else if(nwritten == CURL_WRITEFUNC_ERROR) {
  ------------------
  |  |  281|  1.50M|#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
  ------------------
  |  Branch (208:11): [True: 0, False: 1.50M]
  ------------------
  209|      0|    failf(data, "client returned ERROR on write of %zu bytes", blen);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  210|      0|    return CURLE_WRITE_ERROR;
  211|      0|  }
  212|  1.50M|  else if(nwritten != blen) {
  ------------------
  |  Branch (212:11): [True: 0, False: 1.50M]
  ------------------
  213|      0|    failf(data, "Failure writing output to destination, "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  214|      0|          "passed %zu returned %zu", blen, nwritten);
  215|      0|    return CURLE_WRITE_ERROR;
  216|      0|  }
  217|  1.50M|  *pnwritten = nwritten;
  218|  1.50M|  return CURLE_OK;
  219|  1.50M|}
cw-out.c:cw_out_bufs_free:
  114|  15.7k|{
  115|  15.7k|  while(ctx->buf) {
  ------------------
  |  Branch (115:9): [True: 0, False: 15.7k]
  ------------------
  116|      0|    struct cw_out_buf *next = ctx->buf->next;
  117|      0|    cw_out_buf_free(ctx->buf);
  118|      0|    ctx->buf = next;
  119|      0|  }
  120|  15.7k|}
cw-out.c:cw_out_close:
  134|  15.7k|{
  135|  15.7k|  struct cw_out_ctx *ctx = writer->ctx;
  136|       |
  137|  15.7k|  (void)data;
  138|  15.7k|  cw_out_bufs_free(ctx);
  139|  15.7k|}
cw-out.c:cw_out_flush:
  474|  15.6k|{
  475|  15.6k|  struct cw_out_ctx *ctx = (struct cw_out_ctx *)cw_out;
  476|  15.6k|  CURLcode result = CURLE_OK;
  477|       |
  478|  15.6k|  if(ctx->errored)
  ------------------
  |  Branch (478:6): [True: 0, False: 15.6k]
  ------------------
  479|      0|    return CURLE_WRITE_ERROR;
  480|  15.6k|  if(ctx->paused)
  ------------------
  |  Branch (480:6): [True: 0, False: 15.6k]
  ------------------
  481|      0|    return CURLE_OK;  /* not doing it */
  482|       |
  483|  15.6k|  result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all);
  484|  15.6k|  if(result) {
  ------------------
  |  Branch (484:6): [True: 0, False: 15.6k]
  ------------------
  485|      0|    ctx->errored = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  486|      0|    cw_out_bufs_free(ctx);
  487|      0|    return result;
  488|      0|  }
  489|  15.6k|  return result;
  490|  15.6k|}

Curl_cw_pause_flush:
  216|  15.6k|{
  217|  15.6k|  struct Curl_cwriter *cw_pause;
  218|  15.6k|  CURLcode result = CURLE_OK;
  219|       |
  220|  15.6k|  cw_pause = Curl_cwriter_get_by_type(data, &Curl_cwt_pause);
  221|  15.6k|  if(cw_pause)
  ------------------
  |  Branch (221:6): [True: 15.6k, False: 0]
  ------------------
  222|  15.6k|    result = cw_pause_flush(data, cw_pause);
  223|       |
  224|  15.6k|  return result;
  225|  15.6k|}
cw-pause.c:cw_pause_init:
   75|  15.7k|{
   76|  15.7k|  struct cw_pause_ctx *ctx = writer->ctx;
   77|  15.7k|  (void)data;
   78|       |  ctx->buf = NULL;
   79|  15.7k|  return CURLE_OK;
   80|  15.7k|}
cw-pause.c:cw_pause_write:
  145|  1.69M|{
  146|  1.69M|  struct cw_pause_ctx *ctx = writer->ctx;
  147|  1.69M|  CURLcode result = CURLE_OK;
  148|  1.69M|  size_t wlen = 0;
  149|  1.69M|  bool decoding = Curl_cwriter_is_content_decoding(data);
  150|       |
  151|  1.69M|  if(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (151:6): [True: 0, False: 1.69M]
  |  Branch (151:18): [True: 0, False: 0]
  ------------------
  152|      0|    result = cw_pause_flush(data, writer);
  153|      0|    if(result)
  ------------------
  |  Branch (153:8): [True: 0, False: 0]
  ------------------
  154|      0|      return result;
  155|      0|  }
  156|       |
  157|  1.69M|  while(!ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (157:9): [True: 1.69M, False: 0]
  |  Branch (157:22): [True: 1.69M, False: 0]
  ------------------
  158|  1.69M|    int wtype = type;
  159|  1.69M|    DEBUGASSERT(!ctx->buf);
  ------------------
  |  | 1081|  1.69M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:5): [True: 0, False: 1.69M]
  |  Branch (159:5): [True: 1.69M, False: 0]
  ------------------
  160|       |    /* content decoding might blow up size considerably, write smaller
  161|       |     * chunks to make pausing need buffer less. */
  162|  1.69M|    wlen = (decoding && (type & CLIENTWRITE_BODY)) ?
  ------------------
  |  |   42|   113k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (162:13): [True: 113k, False: 1.58M]
  |  Branch (162:25): [True: 96.9k, False: 16.2k]
  ------------------
  163|  1.60M|           CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1287|  96.9k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 96.7k, False: 195]
  |  |  ------------------
  ------------------
  164|  1.69M|    if(wlen < blen)
  ------------------
  |  Branch (164:8): [True: 195, False: 1.69M]
  ------------------
  165|    195|      wtype &= ~CLIENTWRITE_EOS;
  ------------------
  |  |   49|    195|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  166|  1.69M|    result = Curl_cwriter_write(data, writer->next, wtype, buf, wlen);
  167|  1.69M|    CURL_TRC_WRITE(data, "[PAUSE] writing %zu/%zu bytes of type %x -> %d",
  ------------------
  |  |  158|  1.69M|  do {                                                     \
  |  |  159|  1.69M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.69M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.39M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.69M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.69M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.39M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.69M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.69M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.69M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.69M]
  |  |  ------------------
  ------------------
  168|  1.69M|                   wlen, blen, wtype, result);
  169|  1.69M|    if(result)
  ------------------
  |  Branch (169:8): [True: 452, False: 1.69M]
  ------------------
  170|    452|      return result;
  171|  1.69M|    buf += wlen;
  172|  1.69M|    blen -= wlen;
  173|  1.69M|    if(!blen)
  ------------------
  |  Branch (173:8): [True: 1.69M, False: 194]
  ------------------
  174|  1.69M|      return result;
  175|  1.69M|  }
  176|       |
  177|      0|  do {
  178|      0|    size_t nwritten = 0;
  179|      0|    if(ctx->buf && (ctx->buf->type == type) && (type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (179:8): [True: 0, False: 0]
  |  Branch (179:20): [True: 0, False: 0]
  |  Branch (179:48): [True: 0, False: 0]
  ------------------
  180|       |      /* same type and body, append to current buffer which has a soft
  181|       |       * limit and should take everything up to OOM. */
  182|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  183|      0|    }
  184|      0|    else {
  185|       |      /* Need a new buf, type changed */
  186|      0|      struct cw_pause_buf *cwbuf = cw_pause_buf_create(type, blen);
  187|      0|      if(!cwbuf)
  ------------------
  |  Branch (187:10): [True: 0, False: 0]
  ------------------
  188|      0|        return CURLE_OUT_OF_MEMORY;
  189|      0|      cwbuf->next = ctx->buf;
  190|      0|      ctx->buf = cwbuf;
  191|      0|      result = Curl_bufq_cwrite(&ctx->buf->b, buf, blen, &nwritten);
  192|      0|    }
  193|      0|    CURL_TRC_WRITE(data, "[PAUSE] buffer %zu more bytes of type %x, "
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  194|      0|                   "total=%zu -> %d", nwritten, type, ctx->buf_total + wlen,
  195|      0|                   result);
  196|      0|    if(result)
  ------------------
  |  Branch (196:8): [True: 0, False: 0]
  ------------------
  197|      0|      return result;
  198|      0|    buf += nwritten;
  199|      0|    blen -= nwritten;
  200|      0|    ctx->buf_total += nwritten;
  201|      0|  } while(blen);
  ------------------
  |  Branch (201:11): [True: 0, False: 0]
  ------------------
  202|       |
  203|      0|  return result;
  204|      0|}
cw-pause.c:cw_pause_close:
   92|  15.7k|{
   93|  15.7k|  struct cw_pause_ctx *ctx = writer->ctx;
   94|       |
   95|  15.7k|  (void)data;
   96|  15.7k|  cw_pause_bufs_free(ctx);
   97|  15.7k|}
cw-pause.c:cw_pause_bufs_free:
   83|  15.7k|{
   84|  15.7k|  while(ctx->buf) {
  ------------------
  |  Branch (84:9): [True: 0, False: 15.7k]
  ------------------
   85|      0|    struct cw_pause_buf *next = ctx->buf->next;
   86|      0|    cw_pause_buf_free(ctx->buf);
   87|      0|    ctx->buf = next;
   88|      0|  }
   89|  15.7k|}
cw-pause.c:cw_pause_flush:
  101|  15.6k|{
  102|  15.6k|  struct cw_pause_ctx *ctx = (struct cw_pause_ctx *)cw_pause;
  103|  15.6k|  bool decoding = Curl_cwriter_is_content_decoding(data);
  104|  15.6k|  CURLcode result = CURLE_OK;
  105|       |
  106|       |  /* write the end of the chain until it blocks or gets empty */
  107|  15.6k|  while(ctx->buf && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (107:9): [True: 0, False: 15.6k]
  |  Branch (107:21): [True: 0, False: 0]
  ------------------
  108|      0|    struct cw_pause_buf **plast = &ctx->buf;
  109|      0|    size_t blen, wlen = 0;
  110|      0|    const unsigned char *buf = NULL;
  111|       |
  112|      0|    while((*plast)->next) /* got to last in list */
  ------------------
  |  Branch (112:11): [True: 0, False: 0]
  ------------------
  113|      0|      plast = &(*plast)->next;
  114|      0|    if(Curl_bufq_peek(&(*plast)->b, &buf, &blen)) {
  ------------------
  |  Branch (114:8): [True: 0, False: 0]
  ------------------
  115|      0|      wlen = (decoding && ((*plast)->type & CLIENTWRITE_BODY)) ?
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (115:15): [True: 0, False: 0]
  |  Branch (115:27): [True: 0, False: 0]
  ------------------
  116|      0|             CURLMIN(blen, CW_PAUSE_DEC_WRITE_CHUNK) : blen;
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  117|      0|      result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
  118|      0|                                  (const char *)buf, wlen);
  119|      0|      CURL_TRC_WRITE(data, "[PAUSE] flushed %zu/%zu bytes, type=%x -> %d",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  120|      0|                     wlen, ctx->buf_total, (*plast)->type, result);
  121|      0|      Curl_bufq_skip(&(*plast)->b, wlen);
  122|      0|      DEBUGASSERT(ctx->buf_total >= wlen);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:7): [True: 0, False: 0]
  |  Branch (122:7): [True: 0, False: 0]
  ------------------
  123|      0|      ctx->buf_total -= wlen;
  124|      0|      if(result)
  ------------------
  |  Branch (124:10): [True: 0, False: 0]
  ------------------
  125|      0|        return result;
  126|      0|    }
  127|      0|    else if((*plast)->type & CLIENTWRITE_EOS) {
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (127:13): [True: 0, False: 0]
  ------------------
  128|      0|      result = Curl_cwriter_write(data, cw_pause->next, (*plast)->type,
  129|      0|                                  (const char *)buf, 0);
  130|      0|      CURL_TRC_WRITE(data, "[PAUSE] flushed 0/%zu bytes, type=%x -> %d",
  ------------------
  |  |  158|      0|  do {                                                     \
  |  |  159|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      0|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  131|      0|                     ctx->buf_total, (*plast)->type, result);
  132|      0|    }
  133|       |
  134|      0|    if(Curl_bufq_is_empty(&(*plast)->b)) {
  ------------------
  |  Branch (134:8): [True: 0, False: 0]
  ------------------
  135|      0|      cw_pause_buf_free(*plast);
  136|      0|      *plast = NULL;
  137|      0|    }
  138|      0|  }
  139|  15.6k|  return result;
  140|  15.6k|}

Curl_dnscache_prune:
  172|  21.3k|{
  173|  21.3k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  174|       |  /* the timeout may be set -1 (forever) */
  175|  21.3k|  timediff_t timeout_ms = data->set.dns_cache_timeout_ms;
  176|       |
  177|  21.3k|  if(!dnscache || (timeout_ms == -1))
  ------------------
  |  Branch (177:6): [True: 0, False: 21.3k]
  |  Branch (177:19): [True: 0, False: 21.3k]
  ------------------
  178|       |    /* NULL hostcache means we cannot do it */
  179|      0|    return;
  180|       |
  181|  21.3k|  dnscache_lock(data, dnscache);
  182|       |
  183|  21.3k|  do {
  184|       |    /* Remove outdated and unused entries from the hostcache */
  185|  21.3k|    timediff_t oldest_ms =
  186|  21.3k|      dnscache_prune(&dnscache->entries, timeout_ms, *Curl_pgrs_now(data));
  187|       |
  188|  21.3k|    if(Curl_hash_count(&dnscache->entries) > MAX_DNS_CACHE_SIZE)
  ------------------
  |  |   61|  21.3k|#define MAX_DNS_CACHE_SIZE 29999
  ------------------
  |  Branch (188:8): [True: 0, False: 21.3k]
  ------------------
  189|       |      /* prune the ones over half this age */
  190|      0|      timeout_ms = oldest_ms / 2;
  191|  21.3k|    else
  192|  21.3k|      break;
  193|       |
  194|       |    /* if the cache size is still too big, use the oldest age as new prune
  195|       |       limit */
  196|  21.3k|  } while(timeout_ms);
  ------------------
  |  Branch (196:11): [True: 0, False: 0]
  ------------------
  197|       |
  198|  21.3k|  dnscache_unlock(data, dnscache);
  199|  21.3k|}
Curl_dnscache_get:
  299|   724k|{
  300|   724k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  301|   724k|  struct Curl_dns_entry *dns = NULL;
  302|   724k|  CURLcode result = CURLE_OK;
  303|       |
  304|   724k|  dnscache_lock(data, dnscache);
  305|   724k|  result = fetch_addr(data, dnscache, dns_queries, hostname, port, &dns);
  306|   724k|  if(!result && dns)
  ------------------
  |  Branch (306:6): [True: 724k, False: 142]
  |  Branch (306:17): [True: 178, False: 723k]
  ------------------
  307|    178|    dns->refcount++; /* we pass out a reference */
  308|   724k|  else if(result) {
  ------------------
  |  Branch (308:11): [True: 142, False: 723k]
  ------------------
  309|    142|    DEBUGASSERT(!dns);
  ------------------
  |  | 1081|    142|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (309:5): [True: 0, False: 142]
  |  Branch (309:5): [True: 142, False: 0]
  ------------------
  310|    142|    dns = NULL;
  311|    142|  }
  312|   724k|  dnscache_unlock(data, dnscache);
  313|       |
  314|   724k|  *pentry = dns;
  315|   724k|  return result;
  316|   724k|}
dns_shuffle_addr:
  348|     22|{
  349|     22|  CURLcode result = CURLE_OK;
  350|     22|  const int num_addrs = num_addresses(*addr);
  351|       |
  352|     22|  if(num_addrs > 1) {
  ------------------
  |  Branch (352:6): [True: 18, False: 4]
  ------------------
  353|     18|    struct Curl_addrinfo **nodes;
  354|     18|    CURL_TRC_DNS(data, "Shuffling %i addresses", num_addrs);
  ------------------
  |  |  168|     18|  do {                                 \
  |  |  169|     18|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|     18|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     18|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|     36|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 18, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 18]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|     36|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     18|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|     18|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  355|       |
  356|     18|    nodes = curlx_malloc(num_addrs * sizeof(*nodes));
  ------------------
  |  | 1478|     18|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  357|     18|    if(nodes) {
  ------------------
  |  Branch (357:8): [True: 18, False: 0]
  ------------------
  358|     18|      int i;
  359|     18|      unsigned int *rnd;
  360|     18|      const size_t rnd_size = num_addrs * sizeof(*rnd);
  361|       |
  362|       |      /* build a plain array of Curl_addrinfo pointers */
  363|     18|      nodes[0] = *addr;
  364|     36|      for(i = 1; i < num_addrs; i++) {
  ------------------
  |  Branch (364:18): [True: 18, False: 18]
  ------------------
  365|     18|        nodes[i] = nodes[i - 1]->ai_next;
  366|     18|      }
  367|       |
  368|     18|      rnd = curlx_malloc(rnd_size);
  ------------------
  |  | 1478|     18|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  369|     18|      if(rnd) {
  ------------------
  |  Branch (369:10): [True: 18, False: 0]
  ------------------
  370|       |        /* Fisher-Yates shuffle */
  371|     18|        if(Curl_rand(data, (unsigned char *)rnd, rnd_size) == CURLE_OK) {
  ------------------
  |  |   33|     18|#define Curl_rand(a, b, c) Curl_rand_bytes(a, TRUE, b, c)
  |  |  ------------------
  |  |  |  | 1055|     18|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (371:12): [True: 18, False: 0]
  ------------------
  372|     18|          struct Curl_addrinfo *swap_tmp;
  373|     36|          for(i = num_addrs - 1; i > 0; i--) {
  ------------------
  |  Branch (373:34): [True: 18, False: 18]
  ------------------
  374|     18|            swap_tmp = nodes[rnd[i] % (unsigned int)(i + 1)];
  375|     18|            nodes[rnd[i] % (unsigned int)(i + 1)] = nodes[i];
  376|     18|            nodes[i] = swap_tmp;
  377|     18|          }
  378|       |
  379|       |          /* relink list in the new order */
  380|     36|          for(i = 1; i < num_addrs; i++) {
  ------------------
  |  Branch (380:22): [True: 18, False: 18]
  ------------------
  381|     18|            nodes[i - 1]->ai_next = nodes[i];
  382|     18|          }
  383|       |
  384|     18|          nodes[num_addrs - 1]->ai_next = NULL;
  385|     18|          *addr = nodes[0];
  386|     18|        }
  387|     18|        curlx_free(rnd);
  ------------------
  |  | 1483|     18|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  388|     18|      }
  389|      0|      else
  390|      0|        result = CURLE_OUT_OF_MEMORY;
  391|     18|      curlx_free(nodes);
  ------------------
  |  | 1483|     18|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  392|     18|    }
  393|      0|    else
  394|      0|      result = CURLE_OUT_OF_MEMORY;
  395|     18|  }
  396|     22|  return result;
  397|     22|}
Curl_dnscache_mk_entry:
  496|  10.1k|{
  497|  10.1k|  return dnscache_entry_create(data, dns_queries, paddr, NULL, hostname,
  498|  10.1k|                               hostname ? strlen(hostname) : 0,
  ------------------
  |  Branch (498:32): [True: 9.71k, False: 399]
  ------------------
  499|       |                               port, FALSE);
  ------------------
  |  | 1058|  10.1k|#define FALSE false
  ------------------
  500|  10.1k|}
Curl_dnscache_mk_entry2:
  508|     73|{
  509|     73|  return dnscache_entry_create(data, dns_queries, paddr1, paddr2, hostname,
  510|     73|                               hostname ? strlen(hostname) : 0,
  ------------------
  |  Branch (510:32): [True: 73, False: 0]
  ------------------
  511|       |                               port, FALSE);
  ------------------
  |  | 1058|     73|#define FALSE false
  ------------------
  512|     73|}
Curl_dnscache_add:
  569|  9.77k|{
  570|  9.77k|  struct Curl_dnscache *dnscache = dnscache_get(data);
  571|  9.77k|  char id[MAX_HOSTCACHE_LEN];
  572|  9.77k|  size_t idlen;
  573|       |
  574|  9.77k|  if(!dnscache)
  ------------------
  |  Branch (574:6): [True: 0, False: 9.77k]
  ------------------
  575|      0|    return CURLE_FAILED_INIT;
  576|       |  /* Create an entry id, based upon the hostname and port */
  577|  9.77k|  idlen = create_dnscache_id(entry->hostname, 0, entry->port, id, sizeof(id));
  578|       |
  579|       |  /* Store the resolved data in our DNS cache and up ref count */
  580|  9.77k|  dnscache_lock(data, dnscache);
  581|  9.77k|  if(!Curl_hash_add(&dnscache->entries, id, idlen + 1, (void *)entry)) {
  ------------------
  |  Branch (581:6): [True: 0, False: 9.77k]
  ------------------
  582|      0|    dnscache_unlock(data, dnscache);
  583|      0|    return CURLE_OUT_OF_MEMORY;
  584|      0|  }
  585|  9.77k|  entry->refcount++;
  586|  9.77k|  dnscache_unlock(data, dnscache);
  587|  9.77k|  return CURLE_OK;
  588|  9.77k|}
Curl_dnscache_add_negative:
  594|    433|{
  595|    433|  struct Curl_dnscache *dnscache = dnscache_get(data);
  596|    433|  struct Curl_dns_entry *dns;
  597|    433|  DEBUGASSERT(dnscache);
  ------------------
  |  | 1081|    433|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (597:3): [True: 0, False: 433]
  |  Branch (597:3): [True: 433, False: 0]
  ------------------
  598|    433|  if(!dnscache)
  ------------------
  |  Branch (598:6): [True: 0, False: 433]
  ------------------
  599|      0|    return CURLE_FAILED_INIT;
  600|       |
  601|    433|  dnscache_lock(data, dnscache);
  602|       |
  603|       |  /* put this new host in the cache */
  604|    433|  dns = dnscache_add_addr(data, dnscache, dns_queries, NULL,
  605|    433|                          host, strlen(host), port, FALSE);
  ------------------
  |  | 1058|    433|#define FALSE false
  ------------------
  606|    433|  if(dns) {
  ------------------
  |  Branch (606:6): [True: 433, False: 0]
  ------------------
  607|       |    /* release the returned reference; the cache itself will keep the
  608|       |     * entry alive: */
  609|    433|    dns->refcount--;
  610|    433|    dnscache_unlock(data, dnscache);
  611|    433|    CURL_TRC_DNS(data, "cache negative name resolve for %s:%d type=%s",
  ------------------
  |  |  168|    433|  do {                                 \
  |  |  169|    433|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    433|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    433|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    866|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 433, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 433]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    866|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    433|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    433|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    433|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 433]
  |  |  ------------------
  ------------------
  612|    433|                 host, port, Curl_resolv_query_str(dns_queries));
  613|    433|    return CURLE_OK;
  614|    433|  }
  615|      0|  dnscache_unlock(data, dnscache);
  616|      0|  return CURLE_OUT_OF_MEMORY;
  617|    433|}
Curl_dns_entry_unlink:
  628|  14.8k|{
  629|  14.8k|  if(*pdns) {
  ------------------
  |  Branch (629:6): [True: 10.3k, False: 4.50k]
  ------------------
  630|  10.3k|    struct Curl_dnscache *dnscache = dnscache_get(data);
  631|  10.3k|    struct Curl_dns_entry *dns = *pdns;
  632|  10.3k|    *pdns = NULL;
  633|  10.3k|    dnscache_lock(data, dnscache);
  634|  10.3k|    dns->refcount--;
  635|  10.3k|    if(dns->refcount == 0)
  ------------------
  |  Branch (635:8): [True: 407, False: 9.95k]
  ------------------
  636|    407|      dnscache_entry_free(dns);
  637|  10.3k|    dnscache_unlock(data, dnscache);
  638|  10.3k|  }
  639|  14.8k|}
Curl_dnscache_init:
  654|  15.3k|{
  655|  15.3k|  Curl_hash_init(&dns->entries, size, Curl_hash_str, curlx_str_key_compare,
  656|  15.3k|                 dnscache_entry_dtor);
  657|  15.3k|}
Curl_dnscache_destroy:
  660|  15.3k|{
  661|  15.3k|  Curl_hash_destroy(&dns->entries);
  662|  15.3k|}
dnscache.c:dnscache_get:
  145|   766k|{
  146|   766k|  if(data->share && data->share->specifier & (1 << CURL_LOCK_DATA_DNS))
  ------------------
  |  Branch (146:6): [True: 0, False: 766k]
  |  Branch (146:21): [True: 0, False: 0]
  ------------------
  147|      0|    return &data->share->dnscache;
  148|   766k|  if(data->multi)
  ------------------
  |  Branch (148:6): [True: 766k, False: 0]
  ------------------
  149|   766k|    return &data->multi->dnscache;
  150|      0|  return NULL;
  151|   766k|}
dnscache.c:dnscache_lock:
  155|   766k|{
  156|   766k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (156:6): [True: 0, False: 766k]
  |  Branch (156:21): [True: 0, False: 0]
  ------------------
  157|      0|    Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
  158|   766k|}
dnscache.c:dnscache_prune:
  130|  21.3k|{
  131|  21.3k|  struct dnscache_prune_data user;
  132|       |
  133|  21.3k|  user.max_age_ms = cache_timeout_ms;
  134|  21.3k|  user.now = now;
  135|  21.3k|  user.oldest_ms = 0;
  136|       |
  137|  21.3k|  Curl_hash_clean_with_criterium(hostcache,
  138|  21.3k|                                 (void *)&user,
  139|  21.3k|                                 dnscache_entry_is_stale);
  140|       |
  141|  21.3k|  return user.oldest_ms;
  142|  21.3k|}
dnscache.c:dnscache_entry_is_stale:
  106|  17.7k|{
  107|  17.7k|  struct dnscache_prune_data *prune = (struct dnscache_prune_data *)datap;
  108|  17.7k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)hc;
  109|       |
  110|  17.7k|  if(dns->timestamp.tv_sec || dns->timestamp.tv_usec) {
  ------------------
  |  Branch (110:6): [True: 17.7k, False: 0]
  |  Branch (110:31): [True: 0, False: 0]
  ------------------
  111|       |    /* get age in milliseconds */
  112|  17.7k|    timediff_t age = curlx_ptimediff_ms(&prune->now, &dns->timestamp);
  113|  17.7k|    if(!dns->addr)
  ------------------
  |  Branch (113:8): [True: 837, False: 16.8k]
  ------------------
  114|    837|      age *= 2; /* negative entries age twice as fast */
  115|  17.7k|    if(age >= prune->max_age_ms)
  ------------------
  |  Branch (115:8): [True: 9, False: 17.7k]
  ------------------
  116|      9|      return TRUE;
  ------------------
  |  | 1055|      9|#define TRUE true
  ------------------
  117|  17.7k|    if(age > prune->oldest_ms)
  ------------------
  |  Branch (117:8): [True: 6.00k, False: 11.7k]
  ------------------
  118|  6.00k|      prune->oldest_ms = age;
  119|  17.7k|  }
  120|  17.7k|  return FALSE;
  ------------------
  |  | 1058|  17.7k|#define FALSE false
  ------------------
  121|  17.7k|}
dnscache.c:dnscache_unlock:
  162|   766k|{
  163|   766k|  if(data->share && dnscache == &data->share->dnscache)
  ------------------
  |  Branch (163:6): [True: 0, False: 766k]
  |  Branch (163:21): [True: 0, False: 0]
  ------------------
  164|      0|    Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
  165|   766k|}
dnscache.c:fetch_addr:
  218|   724k|{
  219|   724k|  struct Curl_dns_entry *dns = NULL;
  220|   724k|  char entry_id[MAX_HOSTCACHE_LEN];
  221|   724k|  size_t entry_len;
  222|   724k|  CURLcode result = CURLE_OK;
  223|       |
  224|   724k|  *pdns = NULL;
  225|   724k|  if(!dnscache)
  ------------------
  |  Branch (225:6): [True: 0, False: 724k]
  ------------------
  226|      0|    return CURLE_OK;
  227|       |
  228|       |  /* Create an entry id, based upon the hostname and port */
  229|   724k|  entry_len = create_dnscache_id(hostname, 0, port,
  230|   724k|                                 entry_id, sizeof(entry_id));
  231|       |
  232|       |  /* See if it is already in our dns cache */
  233|   724k|  dns = Curl_hash_pick(&dnscache->entries, entry_id, entry_len + 1);
  234|       |
  235|       |  /* No entry found in cache, check if we might have a wildcard entry */
  236|   724k|  if(!dns && data->state.wildcard_resolve) {
  ------------------
  |  Branch (236:6): [True: 723k, False: 328]
  |  Branch (236:14): [True: 0, False: 723k]
  ------------------
  237|      0|    entry_len = create_dnscache_id("*", 1, port, entry_id, sizeof(entry_id));
  238|       |
  239|       |    /* See if it is already in our dns cache */
  240|      0|    dns = Curl_hash_pick(&dnscache->entries, entry_id, entry_len + 1);
  241|      0|  }
  242|       |
  243|   724k|  if(dns && (data->set.dns_cache_timeout_ms != -1)) {
  ------------------
  |  Branch (243:6): [True: 328, False: 723k]
  |  Branch (243:13): [True: 328, False: 0]
  ------------------
  244|       |    /* See whether the returned entry is stale. Done before we release lock */
  245|    328|    struct dnscache_prune_data user;
  246|       |
  247|    328|    user.now = *Curl_pgrs_now(data);
  248|    328|    user.max_age_ms = data->set.dns_cache_timeout_ms;
  249|    328|    user.oldest_ms = 0;
  250|       |
  251|    328|    if(dnscache_entry_is_stale(&user, dns)) {
  ------------------
  |  Branch (251:8): [True: 1, False: 327]
  ------------------
  252|      1|      infof(data, "Hostname in DNS cache was stale, zapped");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  253|      1|      dns = NULL; /* the memory deallocation is being handled by the hash */
  254|      1|      Curl_hash_delete(&dnscache->entries, entry_id, entry_len + 1);
  255|      1|    }
  256|    328|  }
  257|       |
  258|   724k|  if(dns) {
  ------------------
  |  Branch (258:6): [True: 327, False: 723k]
  ------------------
  259|    327|    if((dns->dns_queries & dns_queries) != dns_queries) {
  ------------------
  |  Branch (259:8): [True: 7, False: 320]
  ------------------
  260|       |      /* The entry does not cover all wanted DNS queries, a miss. */
  261|      7|      dns = NULL;
  262|      7|    }
  263|    320|    else if(!(dns->dns_responses & dns_queries)) {
  ------------------
  |  Branch (263:13): [True: 142, False: 178]
  ------------------
  264|       |      /* The entry has no responses for the wanted DNS queries. */
  265|    142|      CURL_TRC_DNS(data, "cache entry does not have type=%s addresses",
  ------------------
  |  |  168|    142|  do {                                 \
  |  |  169|    142|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|    142|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    142|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    284|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 142, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 142]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    284|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    142|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|    142|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|    142|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 142]
  |  |  ------------------
  ------------------
  266|    142|                   Curl_resolv_query_str(dns_queries));
  267|    142|      dns = NULL;
  268|    142|      result = CURLE_COULDNT_RESOLVE_HOST;
  269|    142|    }
  270|    327|  }
  271|       |
  272|   724k|  if(dns && !dns->addr) { /* negative entry */
  ------------------
  |  Branch (272:6): [True: 178, False: 724k]
  |  Branch (272:13): [True: 0, False: 178]
  ------------------
  273|       |    dns = NULL;
  274|      0|    result = CURLE_COULDNT_RESOLVE_HOST;
  275|      0|  }
  276|   724k|  *pdns = dns;
  277|   724k|  return result;
  278|   724k|}
dnscache.c:num_addresses:
  323|     22|{
  324|     22|  int i = 0;
  325|     62|  while(addr) {
  ------------------
  |  Branch (325:9): [True: 40, False: 22]
  ------------------
  326|     40|    addr = addr->ai_next;
  327|     40|    i++;
  328|     40|  }
  329|     22|  return i;
  330|     22|}
dnscache.c:dnscache_entry_create:
  419|  10.6k|{
  420|  10.6k|  struct Curl_dns_entry *dns = NULL;
  421|       |
  422|       |  /* Create a new cache entry, struct already has the hostname NUL */
  423|  10.6k|  dns = curlx_calloc(1, sizeof(struct Curl_dns_entry) + hostlen);
  ------------------
  |  | 1480|  10.6k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  424|  10.6k|  if(!dns)
  ------------------
  |  Branch (424:6): [True: 0, False: 10.6k]
  ------------------
  425|      0|    goto out;
  426|       |
  427|  10.6k|  dns->refcount = 1; /* the cache has the first reference */
  428|  10.6k|  dns->dns_queries = dns_queries;
  429|  10.6k|  dns->port = port;
  430|  10.6k|  if(hostlen)
  ------------------
  |  Branch (430:6): [True: 10.2k, False: 399]
  ------------------
  431|  10.2k|    memcpy(dns->hostname, hostname, hostlen);
  432|       |
  433|  10.6k|  if(permanent) {
  ------------------
  |  Branch (433:6): [True: 0, False: 10.6k]
  ------------------
  434|      0|    dns->timestamp.tv_sec = 0; /* an entry that never goes stale */
  435|      0|    dns->timestamp.tv_usec = 0; /* an entry that never goes stale */
  436|      0|  }
  437|  10.6k|  else {
  438|  10.6k|    dns->timestamp = *Curl_pgrs_now(data);
  439|  10.6k|  }
  440|       |
  441|       |  /* Take the given address lists into the entry */
  442|  10.6k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (442:6): [True: 10.1k, False: 434]
  |  Branch (442:16): [True: 10.1k, False: 0]
  ------------------
  443|  10.1k|    dns->addr = *paddr1;
  444|  10.1k|    *paddr1 = NULL;
  445|  10.1k|  }
  446|  10.6k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (446:6): [True: 62, False: 10.5k]
  |  Branch (446:16): [True: 1, False: 61]
  ------------------
  447|      1|    struct Curl_addrinfo **phead = &dns->addr;
  448|      1|    while(*phead)
  ------------------
  |  Branch (448:11): [True: 0, False: 1]
  ------------------
  449|      0|      phead = &(*phead)->ai_next;
  450|      1|    *phead = *paddr2;
  451|      1|    *paddr2 = NULL;
  452|      1|  }
  453|       |
  454|  10.6k|  if((dns_queries & CURL_DNSQ_A) &&
  ------------------
  |  |   51|  10.6k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (454:6): [True: 10.2k, False: 410]
  ------------------
  455|  10.2k|     dnscache_ai_has_family(dns->addr, PF_INET))
  ------------------
  |  Branch (455:6): [True: 9.74k, False: 459]
  ------------------
  456|  9.74k|    dns->dns_responses |= CURL_DNSQ_A;
  ------------------
  |  |   51|  9.74k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  457|       |
  458|  10.6k|#ifdef USE_IPV6
  459|  10.6k|  if((dns_queries & CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  10.6k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (459:6): [True: 10.0k, False: 541]
  ------------------
  460|  10.0k|     dnscache_ai_has_family(dns->addr, PF_INET6))
  ------------------
  |  Branch (460:6): [True: 68, False: 10.0k]
  ------------------
  461|     68|    dns->dns_responses |= CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     68|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  462|  10.6k|#endif /* USE_IPV6 */
  463|       |
  464|  10.6k|#ifndef CURL_DISABLE_SHUFFLE_DNS
  465|       |  /* shuffle addresses if requested */
  466|  10.6k|  if(data->set.dns_shuffle_addresses && dns->addr) {
  ------------------
  |  Branch (466:6): [True: 23, False: 10.5k]
  |  Branch (466:41): [True: 22, False: 1]
  ------------------
  467|     22|    CURLcode result = dns_shuffle_addr(data, &dns->addr);
  468|     22|    if(result) {
  ------------------
  |  Branch (468:8): [True: 0, False: 22]
  ------------------
  469|       |      /* free without lock, we are the sole owner */
  470|      0|      dnscache_entry_free(dns);
  471|      0|      dns = NULL;
  472|      0|      goto out;
  473|      0|    }
  474|     22|  }
  475|       |#else
  476|       |  (void)data;
  477|       |#endif
  478|       |
  479|  10.6k|out:
  480|  10.6k|  if(paddr1 && *paddr1) {
  ------------------
  |  Branch (480:6): [True: 10.1k, False: 434]
  |  Branch (480:16): [True: 0, False: 10.1k]
  ------------------
  481|      0|    Curl_freeaddrinfo(*paddr1);
  482|      0|    *paddr1 = NULL;
  483|      0|  }
  484|  10.6k|  if(paddr2 && *paddr2) {
  ------------------
  |  Branch (484:6): [True: 62, False: 10.5k]
  |  Branch (484:16): [True: 0, False: 62]
  ------------------
  485|      0|    Curl_freeaddrinfo(*paddr2);
  486|       |    *paddr2 = NULL;
  487|      0|  }
  488|  10.6k|  return dns;
  489|  10.6k|}
dnscache.c:dnscache_ai_has_family:
  402|  20.2k|{
  403|  29.9k|  for(; ai; ai = ai->ai_next) {
  ------------------
  |  Branch (403:9): [True: 19.5k, False: 10.4k]
  ------------------
  404|  19.5k|    if(ai->ai_family == ai_family)
  ------------------
  |  Branch (404:8): [True: 9.81k, False: 9.68k]
  ------------------
  405|  9.81k|      return TRUE;
  ------------------
  |  | 1055|  9.81k|#define TRUE true
  ------------------
  406|  19.5k|  }
  407|  10.4k|  return FALSE;
  ------------------
  |  | 1058|  10.4k|#define FALSE false
  ------------------
  408|  20.2k|}
dnscache.c:create_dnscache_id:
   82|   734k|{
   83|   734k|  size_t len = nlen ? nlen : strlen(name);
  ------------------
  |  Branch (83:16): [True: 433, False: 734k]
  ------------------
   84|   734k|  DEBUGASSERT(buflen >= MAX_HOSTCACHE_LEN);
  ------------------
  |  | 1081|   734k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (84:3): [True: 0, False: 734k]
  |  Branch (84:3): [True: 734k, False: 0]
  ------------------
   85|   734k|  if(len > (buflen - 7))
  ------------------
  |  Branch (85:6): [True: 7, False: 734k]
  ------------------
   86|      7|    len = buflen - 7;
   87|       |  /* store and lower case the name */
   88|   734k|  Curl_strntolower(ptr, name, len);
   89|   734k|  return curl_msnprintf(&ptr[len], 7, ":%u", port) + len;
   90|   734k|}
dnscache.c:dnscache_add_addr:
  539|    433|{
  540|    433|  char entry_id[MAX_HOSTCACHE_LEN];
  541|    433|  size_t entry_len;
  542|    433|  struct Curl_dns_entry *dns;
  543|    433|  struct Curl_dns_entry *dns2;
  544|       |
  545|    433|  dns = dnscache_entry_create(data, dns_queries, paddr, NULL,
  546|    433|                              hostname, hlen, port, permanent);
  547|    433|  if(!dns)
  ------------------
  |  Branch (547:6): [True: 0, False: 433]
  ------------------
  548|      0|    return NULL;
  549|       |
  550|       |  /* Create an entry id, based upon the hostname and port */
  551|    433|  entry_len = create_dnscache_id(hostname, hlen, port,
  552|    433|                                 entry_id, sizeof(entry_id));
  553|       |
  554|       |  /* Store the resolved data in our DNS cache. */
  555|    433|  dns2 = Curl_hash_add(&dnscache->entries, entry_id, entry_len + 1,
  556|    433|                       (void *)dns);
  557|    433|  if(!dns2) {
  ------------------
  |  Branch (557:6): [True: 0, False: 433]
  ------------------
  558|      0|    dnscache_entry_free(dns);
  559|      0|    return NULL;
  560|      0|  }
  561|       |
  562|    433|  dns = dns2;
  563|    433|  dns->refcount++;         /* mark entry as in-use */
  564|    433|  return dns;
  565|    433|}
dnscache.c:dnscache_entry_free:
   64|  10.6k|{
   65|  10.6k|  Curl_freeaddrinfo(dns->addr);
   66|       |#ifdef USE_HTTPSRR
   67|       |  if(dns->hinfo) {
   68|       |    Curl_httpsrr_cleanup(dns->hinfo);
   69|       |    curlx_free(dns->hinfo);
   70|       |  }
   71|       |#endif
   72|  10.6k|  curlx_free(dns);
  ------------------
  |  | 1483|  10.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   73|  10.6k|}
dnscache.c:dnscache_entry_dtor:
  642|  10.2k|{
  643|  10.2k|  struct Curl_dns_entry *dns = (struct Curl_dns_entry *)entry;
  644|  10.2k|  DEBUGASSERT(dns && (dns->refcount > 0));
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (644:3): [True: 0, False: 10.2k]
  |  Branch (644:3): [True: 0, False: 0]
  |  Branch (644:3): [True: 10.2k, False: 0]
  |  Branch (644:3): [True: 10.2k, False: 0]
  ------------------
  645|  10.2k|  dns->refcount--;
  646|  10.2k|  if(dns->refcount == 0)
  ------------------
  |  Branch (646:6): [True: 10.2k, False: 0]
  ------------------
  647|  10.2k|    dnscache_entry_free(dns);
  648|  10.2k|}

doh_req_encode:
   85|    760|{
   86|    760|  const size_t hostlen = strlen(host);
   87|    760|  unsigned char *orig = dnsp;
   88|    760|  const char *hostp = host;
   89|       |
   90|       |  /* The expected output length is 16 bytes more than the length of
   91|       |   * the QNAME-encoding of the hostname.
   92|       |   *
   93|       |   * A valid DNS name may not contain a zero-length label, except at
   94|       |   * the end. For this reason, a name beginning with a dot, or
   95|       |   * containing a sequence of two or more consecutive dots, is invalid
   96|       |   * and cannot be encoded as a QNAME.
   97|       |   *
   98|       |   * If the hostname ends with a trailing dot, the corresponding
   99|       |   * QNAME-encoding is one byte longer than the hostname. If (as is
  100|       |   * also valid) the hostname is shortened by the omission of the
  101|       |   * trailing dot, then its QNAME-encoding will be two bytes longer
  102|       |   * than the hostname.
  103|       |   *
  104|       |   * Each [ label, dot ] pair is encoded as [ length, label ],
  105|       |   * preserving overall length. A final [ label ] without a dot is
  106|       |   * also encoded as [ length, label ], increasing overall length
  107|       |   * by one. The encoding is completed by appending a zero byte,
  108|       |   * representing the zero-length root label, again increasing
  109|       |   * the overall length by one.
  110|       |   */
  111|       |
  112|    760|  size_t expected_len;
  113|    760|  DEBUGASSERT(hostlen);
  ------------------
  |  | 1081|    760|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 760]
  |  Branch (113:3): [True: 760, False: 0]
  ------------------
  114|    760|  expected_len = 12 + 1 + hostlen + 4;
  115|    760|  if(host[hostlen - 1] != '.')
  ------------------
  |  Branch (115:6): [True: 745, False: 15]
  ------------------
  116|    745|    expected_len++;
  117|       |
  118|    760|  if(expected_len > DOH_MAX_DNSREQ_SIZE)
  ------------------
  |  |   87|    760|#define DOH_MAX_DNSREQ_SIZE (256 + 16)
  ------------------
  |  Branch (118:6): [True: 0, False: 760]
  ------------------
  119|      0|    return DOH_DNS_NAME_TOO_LONG;
  120|       |
  121|    760|  if(len < expected_len)
  ------------------
  |  Branch (121:6): [True: 0, False: 760]
  ------------------
  122|      0|    return DOH_TOO_SMALL_BUFFER;
  123|       |
  124|    760|  *dnsp++ = 0; /* 16-bit id */
  125|    760|  *dnsp++ = 0;
  126|    760|  *dnsp++ = 0x01; /* |QR|   Opcode  |AA|TC|RD| Set the RD bit */
  127|    760|  *dnsp++ = '\0'; /* |RA|   Z    |   RCODE   |                */
  128|    760|  *dnsp++ = '\0';
  129|    760|  *dnsp++ = 1;    /* QDCOUNT (number of entries in the question section) */
  130|    760|  *dnsp++ = '\0';
  131|    760|  *dnsp++ = '\0'; /* ANCOUNT */
  132|    760|  *dnsp++ = '\0';
  133|    760|  *dnsp++ = '\0'; /* NSCOUNT */
  134|    760|  *dnsp++ = '\0';
  135|    760|  *dnsp++ = '\0'; /* ARCOUNT */
  136|       |
  137|       |  /* encode each label and store it in the QNAME */
  138|  1.54k|  while(*hostp) {
  ------------------
  |  Branch (138:9): [True: 798, False: 751]
  ------------------
  139|    798|    size_t labellen;
  140|    798|    const char *dot = strchr(hostp, '.');
  141|    798|    if(dot)
  ------------------
  |  Branch (141:8): [True: 60, False: 738]
  ------------------
  142|     60|      labellen = dot - hostp;
  143|    738|    else
  144|    738|      labellen = strlen(hostp);
  145|    798|    if((labellen > 63) || (!labellen)) {
  ------------------
  |  Branch (145:8): [True: 1, False: 797]
  |  Branch (145:27): [True: 8, False: 789]
  ------------------
  146|       |      /* label is too long or too short, error out */
  147|      9|      *olen = 0;
  148|      9|      return DOH_DNS_BAD_LABEL;
  149|      9|    }
  150|       |    /* label is non-empty, process it */
  151|    789|    *dnsp++ = (unsigned char)labellen;
  152|    789|    memcpy(dnsp, hostp, labellen);
  153|    789|    dnsp += labellen;
  154|    789|    hostp += labellen;
  155|       |    /* advance past dot, but only if there is one */
  156|    789|    if(dot)
  ------------------
  |  Branch (156:8): [True: 52, False: 737]
  ------------------
  157|     52|      hostp++;
  158|    789|  } /* next label */
  159|       |
  160|    751|  *dnsp++ = 0; /* append zero-length label for root */
  161|       |
  162|       |  /* There are assigned TYPE codes beyond 255: use range [1..65535] */
  163|    751|  *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8-bit TYPE */
  164|    751|  *dnsp++ = (unsigned char)(255 & dnstype);        /* lower 8-bit TYPE */
  165|       |
  166|    751|  *dnsp++ = '\0'; /* upper 8-bit CLASS */
  167|    751|  *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */
  ------------------
  |  |   41|    751|#define DNS_CLASS_IN 0x01
  ------------------
  168|       |
  169|    751|  *olen = dnsp - orig;
  170|       |
  171|       |  /* verify that our estimation of length is valid, since
  172|       |   * this has led to buffer overflows in this function */
  173|    751|  DEBUGASSERT(*olen == expected_len);
  ------------------
  |  | 1081|    751|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (173:3): [True: 0, False: 751]
  |  Branch (173:3): [True: 751, False: 0]
  ------------------
  174|    751|  return DOH_OK;
  175|    751|}
Curl_doh:
  457|    403|{
  458|    403|  CURLcode result = CURLE_OK;
  459|    403|  struct doh_probes *dohp = NULL;
  460|    403|  size_t i;
  461|       |
  462|    403|  DEBUGASSERT(!async->doh);
  ------------------
  |  | 1081|    403|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (462:3): [True: 0, False: 403]
  |  Branch (462:3): [True: 403, False: 0]
  ------------------
  463|    403|  DEBUGASSERT(async->hostname[0]);
  ------------------
  |  | 1081|    403|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (463:3): [True: 0, False: 403]
  |  Branch (463:3): [True: 403, False: 0]
  ------------------
  464|    403|  if(async->doh) {
  ------------------
  |  Branch (464:6): [True: 0, False: 403]
  ------------------
  465|      0|    DEBUGASSERT(0); /* should not happen */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (465:5): [Folded, False: 0]
  |  Branch (465:5): [Folded, False: 0]
  ------------------
  466|      0|    Curl_doh_cleanup(data, async);
  467|      0|  }
  468|       |
  469|       |  /* start clean, consider allocating this struct on demand */
  470|    403|  async->doh = dohp = curlx_calloc(1, sizeof(struct doh_probes));
  ------------------
  |  | 1480|    403|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  471|    403|  if(!dohp)
  ------------------
  |  Branch (471:6): [True: 0, False: 403]
  ------------------
  472|      0|    return CURLE_OUT_OF_MEMORY;
  473|       |
  474|  1.20k|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (474:14): [True: 806, False: 403]
  ------------------
  475|    806|    dohp->probe_resp[i].probe_mid = UINT32_MAX;
  476|    806|    curlx_dyn_init(&dohp->probe_resp[i].body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    806|#define DYN_DOH_RESPONSE    3000
  ------------------
  477|    806|  }
  478|       |
  479|    403|  dohp->host = async->hostname;
  480|    403|  dohp->port = async->port;
  481|       |  /* We are making sub easy handles and want to be called back when
  482|       |   * one is done. */
  483|    403|  data->sub_xfer_done = doh_probe_done;
  484|       |
  485|       |  /* create IPv4 DoH request */
  486|    403|  if(async->dns_queries & CURL_DNSQ_A) {
  ------------------
  |  |   51|    403|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (486:6): [True: 397, False: 6]
  ------------------
  487|    397|    result = doh_probe_run(data, CURL_DNS_TYPE_A,
  488|    397|                           async->hostname, data->set.str[STRING_DOH],
  489|    397|                           data->multi, async->id,
  490|    397|                           &dohp->probe_resp[DOH_SLOT_IPV4].probe_mid);
  491|    397|    if(result)
  ------------------
  |  Branch (491:8): [True: 8, False: 389]
  ------------------
  492|      8|      goto error;
  493|    389|    dohp->pending++;
  494|    389|  }
  495|       |
  496|    395|#ifdef USE_IPV6
  497|    395|  if(async->dns_queries & CURL_DNSQ_AAAA) {
  ------------------
  |  |   52|    395|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (497:6): [True: 363, False: 32]
  ------------------
  498|       |    /* create IPv6 DoH request */
  499|    363|    result = doh_probe_run(data, CURL_DNS_TYPE_AAAA,
  500|    363|                           async->hostname, data->set.str[STRING_DOH],
  501|    363|                           data->multi, async->id,
  502|    363|                           &dohp->probe_resp[DOH_SLOT_IPV6].probe_mid);
  503|    363|    if(result)
  ------------------
  |  Branch (503:8): [True: 1, False: 362]
  ------------------
  504|      1|      goto error;
  505|    362|    dohp->pending++;
  506|    362|  }
  507|    394|#endif
  508|       |
  509|       |#ifdef USE_HTTPSRR
  510|       |  if(async->dns_queries & CURL_DNSQ_HTTPS) {
  511|       |    char *qname = NULL;
  512|       |    if(async->port != PORT_HTTPS) {
  513|       |      qname = curl_maprintf("_%d._https.%s", async->port, async->hostname);
  514|       |      if(!qname)
  515|       |        goto error;
  516|       |    }
  517|       |    result = doh_probe_run(data, CURL_DNS_TYPE_HTTPS,
  518|       |                           qname ? qname : async->hostname,
  519|       |                           data->set.str[STRING_DOH], data->multi,
  520|       |                           async->id,
  521|       |                           &dohp->probe_resp[DOH_SLOT_HTTPS_RR].probe_mid);
  522|       |    curlx_free(qname);
  523|       |    if(result)
  524|       |      goto error;
  525|       |    dohp->pending++;
  526|       |  }
  527|       |#endif
  528|    394|  return CURLE_OK;
  529|       |
  530|      9|error:
  531|      9|  Curl_doh_cleanup(data, async);
  532|      9|  return result;
  533|    395|}
de_init:
  719|    241|{
  720|    241|  int i;
  721|    241|  memset(de, 0, sizeof(*de));
  722|    241|  de->ttl = INT_MAX;
  723|  1.20k|  for(i = 0; i < DOH_MAX_CNAME; i++)
  ------------------
  |  |  128|  1.20k|#define DOH_MAX_CNAME 4
  ------------------
  |  Branch (723:14): [True: 964, False: 241]
  ------------------
  724|    964|    curlx_dyn_init(&de->cname[i], DYN_DOH_CNAME);
  ------------------
  |  |   66|    964|#define DYN_DOH_CNAME       256
  ------------------
  725|    241|}
de_cleanup:
 1052|    241|{
 1053|    241|  int i = 0;
 1054|    241|  for(i = 0; i < d->numcname; i++) {
  ------------------
  |  Branch (1054:14): [True: 0, False: 241]
  ------------------
 1055|      0|    curlx_dyn_free(&d->cname[i]);
 1056|      0|  }
 1057|       |#ifdef USE_HTTPSRR
 1058|       |  for(i = 0; i < d->numhttps_rrs; i++)
 1059|       |    curlx_safefree(d->https_rrs[i].val);
 1060|       |#endif
 1061|    241|}
Curl_doh_take_result:
 1221|   355k|{
 1222|   355k|  struct doh_probes *dohp = async->doh;
 1223|   355k|  CURLcode result = CURLE_OK;
 1224|   355k|  struct dohentry de;
 1225|       |
 1226|   355k|  *pdns = NULL; /* defaults to no response */
 1227|   355k|  if(!dohp)
  ------------------
  |  Branch (1227:6): [True: 0, False: 355k]
  ------------------
 1228|      0|    return CURLE_OUT_OF_MEMORY;
 1229|       |
 1230|   355k|  if(dohp->probe_resp[DOH_SLOT_IPV4].probe_mid == UINT32_MAX &&
  ------------------
  |  Branch (1230:6): [True: 14, False: 355k]
  ------------------
 1231|     14|     dohp->probe_resp[DOH_SLOT_IPV6].probe_mid == UINT32_MAX) {
  ------------------
  |  Branch (1231:6): [True: 0, False: 14]
  ------------------
 1232|      0|    failf(data, "Could not DoH-resolve: %s", dohp->host);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1233|      0|    return async->for_proxy ?
  ------------------
  |  Branch (1233:12): [True: 0, False: 0]
  ------------------
 1234|      0|      CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1235|      0|  }
 1236|   355k|  else if(!dohp->pending) {
  ------------------
  |  Branch (1236:11): [True: 241, False: 355k]
  ------------------
 1237|    241|    DOHcode rc[DOH_SLOT_COUNT];
 1238|    241|    int slot;
 1239|       |
 1240|    241|    memset(rc, 0, sizeof(rc));
 1241|       |    /* remove DoH handles from multi handle and close them */
 1242|    241|    doh_close(data, async);
 1243|       |    /* parse the responses, create the struct and return it! */
 1244|    241|    de_init(&de);
 1245|    723|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1245:19): [True: 482, False: 241]
  ------------------
 1246|    482|      struct doh_response *p = &dohp->probe_resp[slot];
 1247|    482|      if(!p->dnstype)
  ------------------
  |  Branch (1247:10): [True: 482, False: 0]
  ------------------
 1248|    482|        continue;
 1249|      0|      rc[slot] = doh_resp_decode(curlx_dyn_uptr(&p->body),
 1250|      0|                                 curlx_dyn_len(&p->body),
 1251|      0|                                 p->dnstype, &de);
 1252|      0|      if(rc[slot]) {
  ------------------
  |  Branch (1252:10): [True: 0, False: 0]
  ------------------
 1253|      0|        CURL_TRC_DNS(data, "DoH: %s type %s for %s", doh_strerror(rc[slot]),
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1254|      0|                     doh_type2name(p->dnstype), dohp->host);
 1255|      0|      }
 1256|      0|    } /* next slot */
 1257|       |
 1258|    241|    if(!rc[DOH_SLOT_IPV4] || !rc[DOH_SLOT_IPV6]) {
  ------------------
  |  Branch (1258:8): [True: 241, False: 0]
  |  Branch (1258:30): [True: 0, False: 0]
  ------------------
 1259|       |      /* we have an address, of one kind or other */
 1260|    241|      struct Curl_dns_entry *dns;
 1261|    241|      struct Curl_addrinfo *ai;
 1262|       |
 1263|    241|      if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)) {
  ------------------
  |  |  326|    241|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|    482|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 241, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 241]
  |  |  |  |  ------------------
  |  |  |  |  320|    482|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|    241|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1264|      0|        CURL_TRC_DNS(data, "hostname: %s", dohp->host);
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1265|      0|        doh_show(data, &de);
 1266|      0|      }
 1267|       |
 1268|    241|      result = doh2ai(&de, dohp->host, dohp->port, &ai);
 1269|    241|      if(result)
  ------------------
  |  Branch (1269:10): [True: 241, False: 0]
  ------------------
 1270|    241|        goto error;
 1271|       |
 1272|       |      /* we got a response, create a dns entry. */
 1273|      0|      dns = Curl_dnscache_mk_entry(data, async->dns_queries,
 1274|      0|                                   &ai, dohp->host, dohp->port);
 1275|      0|      if(!dns) {
  ------------------
  |  Branch (1275:10): [True: 0, False: 0]
  ------------------
 1276|      0|        result = CURLE_OUT_OF_MEMORY;
 1277|      0|        goto error;
 1278|      0|      }
 1279|       |
 1280|       |      /* Now add and HTTPSRR information if we have */
 1281|       |#ifdef USE_HTTPSRR
 1282|       |      if(de.numhttps_rrs > 0 && result == CURLE_OK) {
 1283|       |        struct Curl_https_rrinfo *hrr = NULL;
 1284|       |        result = doh_resp_decode_httpsrr(data, de.https_rrs->val,
 1285|       |                                         de.https_rrs->len, &hrr);
 1286|       |        if(result) {
 1287|       |          infof(data, "Failed to decode HTTPS RR");
 1288|       |          Curl_dns_entry_unlink(data, &dns);
 1289|       |          goto error;
 1290|       |        }
 1291|       |        infof(data, "Some HTTPS RR to process");
 1292|       |#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
 1293|       |        doh_print_httpsrr(data, hrr);
 1294|       |#endif
 1295|       |        Curl_dns_entry_set_https_rr(dns, hrr);
 1296|       |      }
 1297|       |#endif /* USE_HTTPSRR */
 1298|       |
 1299|       |      /* and add the entry to the cache */
 1300|      0|      result = Curl_dnscache_add(data, dns);
 1301|      0|      *pdns = dns;
 1302|      0|    } /* address processing done */
 1303|      0|    else {
 1304|      0|      result = async->for_proxy ?
  ------------------
  |  Branch (1304:16): [True: 0, False: 0]
  ------------------
 1305|      0|        CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST;
 1306|      0|    }
 1307|       |
 1308|    241|  } /* !dohp->pending */
 1309|   355k|  else
 1310|       |    /* wait for pending DoH transactions to complete */
 1311|   355k|    return CURLE_AGAIN;
 1312|       |
 1313|    241|error:
 1314|    241|  de_cleanup(&de);
 1315|    241|  Curl_doh_cleanup(data, async);
 1316|    241|  return result;
 1317|   355k|}
Curl_doh_cleanup:
 1350|  1.88k|{
 1351|  1.88k|  struct doh_probes *dohp = async->doh;
 1352|  1.88k|  if(dohp) {
  ------------------
  |  Branch (1352:6): [True: 403, False: 1.48k]
  ------------------
 1353|    403|    int i;
 1354|    403|    doh_close(data, async);
 1355|  1.20k|    for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (1355:16): [True: 806, False: 403]
  ------------------
 1356|    806|      curlx_dyn_free(&dohp->probe_resp[i].body);
 1357|    806|    }
 1358|       |    curlx_safefree(async->doh);
  ------------------
  |  | 1327|    403|  do {                      \
  |  | 1328|    403|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    403|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    403|    (ptr) = NULL;           \
  |  | 1330|    403|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 403]
  |  |  ------------------
  ------------------
 1359|    403|  }
 1360|  1.88k|}
doh.c:doh_probe_done:
  221|    528|{
  222|    528|  struct Curl_resolv_async *async = NULL;
  223|    528|  struct doh_probes *dohp = NULL;
  224|    528|  struct doh_request *doh_req = NULL;
  225|    528|  int i;
  226|       |
  227|    528|  doh_req = Curl_meta_get(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   84|    528|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  228|    528|  if(!doh_req) {
  ------------------
  |  Branch (228:6): [True: 0, False: 528]
  ------------------
  229|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (229:5): [Folded, False: 0]
  |  Branch (229:5): [Folded, False: 0]
  ------------------
  230|      0|    return;
  231|      0|  }
  232|       |
  233|    528|  async = Curl_async_get(data, doh_req->resolv_id);
  234|    528|  if(!async) {
  ------------------
  |  Branch (234:6): [True: 0, False: 528]
  ------------------
  235|      0|    CURL_TRC_DNS(data, "[%u] ignoring outdated DoH response",
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  236|      0|                 doh_req->resolv_id);
  237|      0|    return;
  238|      0|  }
  239|    528|  dohp = async->doh;
  240|       |
  241|    781|  for(i = 0; i < DOH_SLOT_COUNT; ++i) {
  ------------------
  |  Branch (241:14): [True: 781, False: 0]
  ------------------
  242|    781|    if(dohp->probe_resp[i].probe_mid == doh->mid)
  ------------------
  |  Branch (242:8): [True: 528, False: 253]
  ------------------
  243|    528|      break;
  244|    781|  }
  245|       |  /* We really should have found the slot where to store the response */
  246|    528|  if(i >= DOH_SLOT_COUNT) {
  ------------------
  |  Branch (246:6): [True: 0, False: 528]
  ------------------
  247|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:5): [Folded, False: 0]
  |  Branch (247:5): [Folded, False: 0]
  ------------------
  248|      0|    failf(data, "DoH: unknown sub request done");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  249|      0|    return;
  250|      0|  }
  251|       |
  252|    528|  dohp->pending--;
  253|    528|  infof(doh, "a DoH request is completed, %u to go", dohp->pending);
  ------------------
  |  |  143|    528|  do {                               \
  |  |  144|    528|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    528|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 528, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 528]
  |  |  |  |  ------------------
  |  |  |  |  320|    528|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    528|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    528|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 528]
  |  |  ------------------
  ------------------
  254|    528|  dohp->probe_resp[i].result = result;
  255|       |  /* We expect either the meta data still to exist or the sub request
  256|       |   * to have already failed. */
  257|    528|  if(!result) {
  ------------------
  |  Branch (257:6): [True: 0, False: 528]
  ------------------
  258|      0|    dohp->probe_resp[i].dnstype = doh_req->dnstype;
  259|      0|    result = curlx_dyn_addn(&dohp->probe_resp[i].body,
  260|      0|                            curlx_dyn_ptr(&doh_req->resp_body),
  261|      0|                            curlx_dyn_len(&doh_req->resp_body));
  262|      0|    curlx_dyn_free(&doh_req->resp_body);
  263|      0|  }
  264|    528|  Curl_meta_remove(doh, CURL_EZM_DOH_PROBE);
  ------------------
  |  |   84|    528|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  265|       |
  266|    528|  if(result)
  ------------------
  |  Branch (266:6): [True: 528, False: 0]
  ------------------
  267|    528|    infof(doh, "DoH request %s", curl_easy_strerror(result));
  ------------------
  |  |  143|    528|  do {                               \
  |  |  144|    528|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    528|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 528, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 528]
  |  |  |  |  ------------------
  |  |  |  |  320|    528|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    528|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    528|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 528]
  |  |  ------------------
  ------------------
  268|       |
  269|    528|  if(!dohp->pending) {
  ------------------
  |  Branch (269:6): [True: 275, False: 253]
  ------------------
  270|       |    /* DoH completed, run the transfer picking up the results */
  271|    275|    Curl_multi_mark_dirty(data);
  272|    275|  }
  273|    528|}
doh.c:doh_probe_run:
  302|    760|{
  303|    760|  struct Curl_easy *doh = NULL;
  304|    760|  CURLcode result = CURLE_OK;
  305|    760|  timediff_t timeout_ms;
  306|    760|  struct doh_request *doh_req;
  307|    760|  DOHcode d;
  308|       |
  309|    760|  *pmid = UINT32_MAX;
  310|       |
  311|    760|  doh_req = curlx_calloc(1, sizeof(*doh_req));
  ------------------
  |  | 1480|    760|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  312|    760|  if(!doh_req)
  ------------------
  |  Branch (312:6): [True: 0, False: 760]
  ------------------
  313|      0|    return CURLE_OUT_OF_MEMORY;
  314|    760|  doh_req->resolv_id = resolv_id;
  315|    760|  doh_req->dnstype = dnstype;
  316|    760|  curlx_dyn_init(&doh_req->resp_body, DYN_DOH_RESPONSE);
  ------------------
  |  |   65|    760|#define DYN_DOH_RESPONSE    3000
  ------------------
  317|       |
  318|    760|  d = doh_req_encode(host, dnstype, doh_req->req_body,
  319|    760|                     sizeof(doh_req->req_body),
  320|    760|                     &doh_req->req_body_len);
  321|    760|  if(d) {
  ------------------
  |  Branch (321:6): [True: 9, False: 751]
  ------------------
  322|      9|    failf(data, "Failed to encode DoH packet [%d]", d);
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  323|      9|    result = CURLE_OUT_OF_MEMORY;
  324|      9|    goto error;
  325|      9|  }
  326|       |
  327|    751|  timeout_ms = Curl_timeleft_ms(data);
  328|    751|  if(timeout_ms < 0) {
  ------------------
  |  Branch (328:6): [True: 0, False: 751]
  ------------------
  329|      0|    result = CURLE_OPERATION_TIMEDOUT;
  330|      0|    goto error;
  331|      0|  }
  332|       |
  333|    751|  doh_req->req_hds =
  334|    751|    curl_slist_append(NULL, "Content-Type: application/dns-message");
  335|    751|  if(!doh_req->req_hds) {
  ------------------
  |  Branch (335:6): [True: 0, False: 751]
  ------------------
  336|      0|    result = CURLE_OUT_OF_MEMORY;
  337|      0|    goto error;
  338|      0|  }
  339|       |
  340|       |  /* Curl_open() is the internal version of curl_easy_init() */
  341|    751|  result = Curl_open(&doh);
  342|    751|  if(result)
  ------------------
  |  Branch (342:6): [True: 0, False: 751]
  ------------------
  343|      0|    goto error;
  344|       |
  345|       |  /* pass in the struct pointer via a local variable to please coverity and
  346|       |     the gcc typecheck helpers */
  347|    751|  VERBOSE(doh->state.feat = &Curl_trc_feat_dns);
  ------------------
  |  | 1618|    751|#define VERBOSE(x) x
  ------------------
  348|    751|  ERROR_CHECK_SETOPT(CURLOPT_URL, url);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   132k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  349|    751|  ERROR_CHECK_SETOPT(CURLOPT_DEFAULT_PROTOCOL, "https");
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   132k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  350|    751|  ERROR_CHECK_SETOPT(CURLOPT_WRITEFUNCTION, doh_probe_write_cb);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   141k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  351|    751|  ERROR_CHECK_SETOPT(CURLOPT_WRITEDATA, doh);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   129k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  352|    751|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDS, doh_req->req_body);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   132k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 751, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  353|    751|  ERROR_CHECK_SETOPT(CURLOPT_POSTFIELDSIZE, (long)doh_req->req_body_len);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  354|    751|  ERROR_CHECK_SETOPT(CURLOPT_HTTPHEADER, doh_req->req_hds);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   131k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  355|    751|#ifdef USE_HTTP2
  356|    751|  ERROR_CHECK_SETOPT(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  357|    751|  ERROR_CHECK_SETOPT(CURLOPT_PIPEWAIT, 1L);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  358|    751|#endif
  359|       |#ifndef DEBUGBUILD
  360|       |  /* enforce HTTPS if not debug */
  361|       |  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
  362|       |#else
  363|       |  /* in debug mode, also allow http */
  364|    751|  ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  365|    751|#endif
  366|    751|  ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  367|    751|  ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 751, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 751, Folded]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  368|    751|  if(data->set.err && data->set.err != stderr)
  ------------------
  |  Branch (368:6): [True: 751, False: 0]
  |  Branch (368:23): [True: 0, False: 751]
  ------------------
  369|      0|    ERROR_CHECK_SETOPT(CURLOPT_STDERR, data->set.err);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  370|    751|  if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns))
  ------------------
  |  |  326|    751|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  1.50k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 751, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 751]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.50k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|    751|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  371|      0|    ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  372|    751|  if(data->set.no_signal)
  ------------------
  |  Branch (372:6): [True: 7, False: 744]
  ------------------
  373|      7|    ERROR_CHECK_SETOPT(CURLOPT_NOSIGNAL, 1L);
  ------------------
  |  |  288|      7|  do {                                                  \
  |  |  289|      7|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      7|  __extension__({                                                       \
  |  |  |  |   46|      7|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 7, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      7|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.21k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      7|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      7|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      7|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      7|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      7|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      7|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      7|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      7|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      7|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      7|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      7|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      7|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      7|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      7|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      7|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      7|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      7|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      7|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      7|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      7|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      7|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      7|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      7|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      7|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      7|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      7|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      7|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      7|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      7|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      7|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      7|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      7|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      7|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      7|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      7|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      7|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      7|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      7|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      7|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      7|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      7|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      7|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      7|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      7|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      7|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      7|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      7|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      7|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      7|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      7|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      7|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      7|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      7|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      7|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      7|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      7|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      7|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      7|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      7|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      7|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      7|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      7|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      7|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      7|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      7|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      7|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      7|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      7|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      7|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      7|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      7|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      7|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      7|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      7|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      7|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      7|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      7|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      7|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      7|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      7|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      7|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      7|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      7|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      7|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      7|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      7|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      7|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      7|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      7|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      7|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      7|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      7|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      7|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      7|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      7|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      7|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      7|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      7|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      7|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      7|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      7|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      7|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      7|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      7|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      7|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      7|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      7|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      7|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      7|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      7|      )                                                                 \
  |  |  |  |  158|      7|    }                                                                   \
  |  |  |  |  159|      7|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      7|  })
  |  |  ------------------
  |  |  290|      7|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 7]
  |  |  ------------------
  |  |  291|      7|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      7|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      7|      goto error;                                       \
  |  |  294|      7|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 7]
  |  |  ------------------
  ------------------
  374|       |
  375|    751|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYHOST,
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|  1.50k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 751, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  376|    751|                     data->set.doh_verifyhost ? 2L : 0L);
  377|    751|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYPEER,
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|  1.50k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 751, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  378|    751|                     data->set.doh_verifypeer ? 1L : 0L);
  379|    751|  ERROR_CHECK_SETOPT(CURLOPT_SSL_VERIFYSTATUS,
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|  1.50k|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (159:40): [True: 4, False: 747]
  |  |  |  |  ------------------
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  380|    751|                     data->set.doh_verifystatus ? 1L : 0L);
  381|       |
  382|       |  /* Inherit *some* SSL options from the user's transfer. This is a
  383|       |     best-guess as to which options are needed for compatibility. #3661
  384|       |
  385|       |     Note DoH does not inherit the user's proxy server so proxy SSL settings
  386|       |     have no effect and are not inherited. If that changes then two new
  387|       |     options should be added to check doh proxy insecure separately,
  388|       |     CURLOPT_DOH_PROXY_SSL_VERIFYHOST and CURLOPT_DOH_PROXY_SSL_VERIFYPEER.
  389|       |     */
  390|    751|  doh->set.ssl.custom_cafile = data->set.ssl.custom_cafile;
  391|    751|  doh->set.ssl.custom_capath = data->set.ssl.custom_capath;
  392|    751|  doh->set.ssl.custom_cablob = data->set.ssl.custom_cablob;
  393|    751|  if(data->set.str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (393:6): [True: 751, False: 0]
  ------------------
  394|    751|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO, data->set.str[STRING_SSL_CAFILE]);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   132k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  395|    751|  }
  396|    751|  if(data->set.blobs[BLOB_CAINFO]) {
  ------------------
  |  Branch (396:6): [True: 0, False: 751]
  ------------------
  397|      0|    ERROR_CHECK_SETOPT(CURLOPT_CAINFO_BLOB, data->set.blobs[BLOB_CAINFO]);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  398|      0|  }
  399|    751|  if(data->set.str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (399:6): [True: 751, False: 0]
  ------------------
  400|    751|    ERROR_CHECK_SETOPT(CURLOPT_CAPATH, data->set.str[STRING_SSL_CAPATH]);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   132k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  401|    751|  }
  402|    751|  if(data->set.str[STRING_SSL_CRLFILE]) {
  ------------------
  |  Branch (402:6): [True: 751, False: 0]
  ------------------
  403|    751|    ERROR_CHECK_SETOPT(CURLOPT_CRLFILE, data->set.str[STRING_SSL_CRLFILE]);
  ------------------
  |  |  288|    751|  do {                                                  \
  |  |  289|    751|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|    751|  __extension__({                                                       \
  |  |  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|   132k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|    751|      )                                                                 \
  |  |  |  |  158|    751|    }                                                                   \
  |  |  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|    751|  })
  |  |  ------------------
  |  |  290|    751|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 751]
  |  |  ------------------
  |  |  291|    751|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|    751|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|    751|      goto error;                                       \
  |  |  294|    751|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 751]
  |  |  ------------------
  ------------------
  404|    751|  }
  405|    751|  if(data->set.ssl.certinfo)
  ------------------
  |  Branch (405:6): [True: 3, False: 748]
  ------------------
  406|      3|    ERROR_CHECK_SETOPT(CURLOPT_CERTINFO, 1L);
  ------------------
  |  |  288|      3|  do {                                                  \
  |  |  289|      3|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      3|  __extension__({                                                       \
  |  |  |  |   46|      3|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 3, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      3|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|    522|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      3|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      3|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      3|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      3|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      3|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      3|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      3|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      3|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      3|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      3|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      3|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      3|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      3|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      3|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      3|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      3|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      3|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      3|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      3|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      3|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      3|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      3|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      3|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      3|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      3|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      3|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      3|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      3|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      3|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      3|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      3|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      3|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      3|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      3|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      3|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      3|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      3|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      3|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      3|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      3|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      3|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      3|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      3|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      3|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      3|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      3|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      3|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      3|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      3|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      3|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      3|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      3|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      3|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      3|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      3|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      3|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      3|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      3|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      3|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      3|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      3|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      3|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      3|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      3|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      3|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      3|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      3|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      3|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      3|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      3|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      3|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      3|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      3|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      3|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      3|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      3|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      3|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      3|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      3|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      3|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      3|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      3|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      3|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      3|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      3|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      3|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      3|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      3|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      3|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      3|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      3|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      3|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      3|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      3|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      3|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      3|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      3|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      3|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      3|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      3|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      3|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      3|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      3|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      3|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      3|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      3|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      3|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      3|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      3|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      3|      )                                                                 \
  |  |  |  |  158|      3|    }                                                                   \
  |  |  |  |  159|      3|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      3|  })
  |  |  ------------------
  |  |  290|      3|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 3]
  |  |  ------------------
  |  |  291|      3|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      3|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      3|      goto error;                                       \
  |  |  294|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  407|    751|  if(data->set.ssl.fsslctx)
  ------------------
  |  Branch (407:6): [True: 0, False: 751]
  ------------------
  408|      0|    ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_FUNCTION, data->set.ssl.fsslctx);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  409|    751|  if(data->set.ssl.fsslctxp)
  ------------------
  |  Branch (409:6): [True: 0, False: 751]
  ------------------
  410|      0|    ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_DATA, data->set.ssl.fsslctxp);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  411|    751|  if(data->set.fdebug)
  ------------------
  |  Branch (411:6): [True: 0, False: 751]
  ------------------
  412|      0|    ERROR_CHECK_SETOPT(CURLOPT_DEBUGFUNCTION, data->set.fdebug);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  413|    751|  if(data->set.debugdata)
  ------------------
  |  Branch (413:6): [True: 0, False: 751]
  ------------------
  414|      0|    ERROR_CHECK_SETOPT(CURLOPT_DEBUGDATA, data->set.debugdata);
  ------------------
  |  |  288|      0|  do {                                                  \
  |  |  289|      0|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      0|  __extension__({                                                       \
  |  |  |  |   46|      0|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 0, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      0|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      0|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      0|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      0|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      0|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      0|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      0|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      0|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      0|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      0|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      0|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      0|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      0|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      0|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      0|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      0|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      0|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      0|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      0|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      0|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      0|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      0|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      0|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      0|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      0|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      0|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      0|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      0|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      0|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      0|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      0|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      0|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      0|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      0|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      0|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      0|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      0|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      0|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      0|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      0|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      0|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      0|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      0|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      0|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      0|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      0|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      0|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      0|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      0|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      0|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      0|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      0|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      0|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      0|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      0|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      0|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      0|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      0|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      0|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      0|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      0|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      0|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      0|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      0|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      0|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      0|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      0|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      0|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      0|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      0|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      0|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      0|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      0|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      0|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      0|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      0|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      0|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      0|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      0|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      0|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      0|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      0|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      0|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      0|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      0|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      0|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      0|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      0|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      0|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      0|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      0|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      0|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      0|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      0|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      0|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      0|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      0|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      0|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      0|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      0|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      0|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      0|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      0|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      0|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      0|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      0|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      0|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      0|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      0|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      0|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      0|      )                                                                 \
  |  |  |  |  158|      0|    }                                                                   \
  |  |  |  |  159|      0|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      0|  })
  |  |  ------------------
  |  |  290|      0|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  291|      0|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      0|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      0|      goto error;                                       \
  |  |  294|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  415|    751|  if(data->set.str[STRING_SSL_EC_CURVES]) {
  ------------------
  |  Branch (415:6): [True: 9, False: 742]
  ------------------
  416|      9|    ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
  ------------------
  |  |  288|      9|  do {                                                  \
  |  |  289|      9|    result = curl_easy_setopt((CURL *)doh, x, y);       \
  |  |  ------------------
  |  |  |  |   45|      9|  __extension__({                                                       \
  |  |  |  |   46|      9|    if(__builtin_constant_p(option)) {                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (46:8): [True: 9, Folded]
  |  |  |  |  ------------------
  |  |  |  |   47|      9|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|  1.59k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  |  |  Branch (59:49): [Folded, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   48|      9|        if(curlcheck_long_option(option))                               \
  |  |  |  |   49|      9|          if(!curlcheck_long(value))                                    \
  |  |  |  |   50|      9|            Wcurl_easy_setopt_err_long();                               \
  |  |  |  |   51|      9|        if(curlcheck_off_t_option(option))                              \
  |  |  |  |   52|      9|          if(!curlcheck_off_t(value))                                   \
  |  |  |  |   53|      9|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |  |  |   54|      9|        if(curlcheck_string_option(option))                             \
  |  |  |  |   55|      9|          if(!curlcheck_string(value))                                  \
  |  |  |  |   56|      9|            Wcurl_easy_setopt_err_string();                             \
  |  |  |  |   57|      9|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |  |  |   58|      9|        if(curlcheck_write_cb_option(option))                           \
  |  |  |  |   59|      9|          if(!curlcheck_write_cb(value))                                \
  |  |  |  |   60|      9|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |  |  |   61|      9|        if(curlcheck_curl_option(option))                               \
  |  |  |  |   62|      9|          if(!curlcheck_curl(value))                                    \
  |  |  |  |   63|      9|            Wcurl_easy_setopt_err_curl();                               \
  |  |  |  |   64|      9|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |  |  |   65|      9|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |  |  |   66|      9|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |  |  |   67|      9|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |  |  |   68|      9|          if(!curlcheck_read_cb(value))                                 \
  |  |  |  |   69|      9|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |  |  |   70|      9|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |  |  |   71|      9|          if(!curlcheck_ioctl_cb(value))                                \
  |  |  |  |   72|      9|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |  |  |   73|      9|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |  |  |   74|      9|          if(!curlcheck_sockopt_cb(value))                              \
  |  |  |  |   75|      9|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |  |  |   76|      9|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |  |  |   77|      9|          if(!curlcheck_opensocket_cb(value))                           \
  |  |  |  |   78|      9|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |  |  |   79|      9|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |  |  |   80|      9|          if(!curlcheck_progress_cb(value))                             \
  |  |  |  |   81|      9|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |  |  |   82|      9|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |  |  |   83|      9|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |  |  |   84|      9|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |  |  |   85|      9|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |  |  |   86|      9|          if(!curlcheck_debug_cb(value))                                \
  |  |  |  |   87|      9|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |  |  |   88|      9|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |  |  |   89|      9|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |  |  |   90|      9|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |  |  |   91|      9|        if(curlcheck_conv_cb_option(option))                            \
  |  |  |  |   92|      9|          if(!curlcheck_conv_cb(value))                                 \
  |  |  |  |   93|      9|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |  |  |   94|      9|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |  |  |   95|      9|          if(!curlcheck_seek_cb(value))                                 \
  |  |  |  |   96|      9|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |  |  |   97|      9|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |  |  |   98|      9|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |  |  |   99|      9|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  |  |  100|      9|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  |  |  101|      9|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  |  |  102|      9|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  |  |  103|      9|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  |  |  104|      9|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  |  |  105|      9|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  |  |  106|      9|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  |  |  107|      9|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  |  |  108|      9|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  |  |  109|      9|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  |  |  110|      9|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  |  |  111|      9|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  |  |  112|      9|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  |  |  113|      9|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  |  |  114|      9|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  |  |  115|      9|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  |  |  116|      9|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  |  |  117|      9|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  |  |  118|      9|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  |  |  119|      9|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  |  |  120|      9|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  |  |  121|      9|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  |  |  122|      9|          if(!curlcheck_interleave_cb(value))                           \
  |  |  |  |  123|      9|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  |  |  124|      9|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  |  |  125|      9|          if(!curlcheck_prereq_cb(value))                               \
  |  |  |  |  126|      9|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  |  |  127|      9|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  |  |  128|      9|          if(!curlcheck_trailer_cb(value))                              \
  |  |  |  |  129|      9|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  |  |  130|      9|        if(curlcheck_cb_data_option(option))                            \
  |  |  |  |  131|      9|          if(!curlcheck_cb_data(value))                                 \
  |  |  |  |  132|      9|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  |  |  133|      9|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  |  |  134|      9|          if(!curlcheck_error_buffer(value))                            \
  |  |  |  |  135|      9|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  |  |  136|      9|        if((option) == CURLOPT_CURLU)                                   \
  |  |  |  |  137|      9|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  |  |  138|      9|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  |  |  139|      9|        if((option) == CURLOPT_STDERR)                                  \
  |  |  |  |  140|      9|          if(!curlcheck_FILE(value))                                    \
  |  |  |  |  141|      9|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  |  |  142|      9|        if(curlcheck_postfields_option(option))                         \
  |  |  |  |  143|      9|          if(!curlcheck_postfields(value))                              \
  |  |  |  |  144|      9|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  |  |  145|      9|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  |  |  146|      9|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  |  |  147|      9|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  |  |  148|      9|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  |  |  149|      9|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  |  |  150|      9|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  |  |  151|      9|        if(curlcheck_slist_option(option))                              \
  |  |  |  |  152|      9|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  |  |  153|      9|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  |  |  154|      9|        if((option) == CURLOPT_SHARE)                                   \
  |  |  |  |  155|      9|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  |  |  156|      9|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  |  |  157|      9|      )                                                                 \
  |  |  |  |  158|      9|    }                                                                   \
  |  |  |  |  159|      9|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  |  |  160|      9|  })
  |  |  ------------------
  |  |  290|      9|    if(result &&                                        \
  |  |  ------------------
  |  |  |  Branch (290:8): [True: 0, False: 9]
  |  |  ------------------
  |  |  291|      9|       result != CURLE_NOT_BUILT_IN &&                  \
  |  |  ------------------
  |  |  |  Branch (291:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  292|      9|       result != CURLE_UNKNOWN_OPTION)                  \
  |  |  ------------------
  |  |  |  Branch (292:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  293|      9|      goto error;                                       \
  |  |  294|      9|  } while(0)
  |  |  ------------------
  |  |  |  Branch (294:11): [Folded, False: 9]
  |  |  ------------------
  ------------------
  417|      9|                       data->set.str[STRING_SSL_EC_CURVES]);
  418|      9|  }
  419|       |
  420|    751|  (void)curl_easy_setopt(doh, CURLOPT_SSL_OPTIONS,
  ------------------
  |  |   45|    751|  __extension__({                                                       \
  |  |   46|    751|    if(__builtin_constant_p(option)) {                                  \
  |  |  ------------------
  |  |  |  Branch (46:8): [True: 751, Folded]
  |  |  ------------------
  |  |   47|    751|      CURL_IGNORE_DEPRECATION(                                          \
  |  |  ------------------
  |  |  |  |   59|   130k|#define CURL_IGNORE_DEPRECATION(statements)     statements
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [True: 0, Folded]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 0]
  |  |  |  |  |  Branch (59:49): [Folded, False: 751]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   48|    751|        if(curlcheck_long_option(option))                               \
  |  |   49|    751|          if(!curlcheck_long(value))                                    \
  |  |   50|    751|            Wcurl_easy_setopt_err_long();                               \
  |  |   51|    751|        if(curlcheck_off_t_option(option))                              \
  |  |   52|    751|          if(!curlcheck_off_t(value))                                   \
  |  |   53|    751|            Wcurl_easy_setopt_err_curl_off_t();                         \
  |  |   54|    751|        if(curlcheck_string_option(option))                             \
  |  |   55|    751|          if(!curlcheck_string(value))                                  \
  |  |   56|    751|            Wcurl_easy_setopt_err_string();                             \
  |  |   57|    751|        if((option) == CURLOPT_PRIVATE) { }                             \
  |  |   58|    751|        if(curlcheck_write_cb_option(option))                           \
  |  |   59|    751|          if(!curlcheck_write_cb(value))                                \
  |  |   60|    751|            Wcurl_easy_setopt_err_write_callback();                     \
  |  |   61|    751|        if(curlcheck_curl_option(option))                               \
  |  |   62|    751|          if(!curlcheck_curl(value))                                    \
  |  |   63|    751|            Wcurl_easy_setopt_err_curl();                               \
  |  |   64|    751|        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
  |  |   65|    751|          if(!curlcheck_resolver_start_callback(value))                 \
  |  |   66|    751|            Wcurl_easy_setopt_err_resolver_start_callback();            \
  |  |   67|    751|        if((option) == CURLOPT_READFUNCTION)                            \
  |  |   68|    751|          if(!curlcheck_read_cb(value))                                 \
  |  |   69|    751|            Wcurl_easy_setopt_err_read_cb();                            \
  |  |   70|    751|        if((option) == CURLOPT_IOCTLFUNCTION)                           \
  |  |   71|    751|          if(!curlcheck_ioctl_cb(value))                                \
  |  |   72|    751|            Wcurl_easy_setopt_err_ioctl_cb();                           \
  |  |   73|    751|        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
  |  |   74|    751|          if(!curlcheck_sockopt_cb(value))                              \
  |  |   75|    751|            Wcurl_easy_setopt_err_sockopt_cb();                         \
  |  |   76|    751|        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
  |  |   77|    751|          if(!curlcheck_opensocket_cb(value))                           \
  |  |   78|    751|            Wcurl_easy_setopt_err_opensocket_cb();                      \
  |  |   79|    751|        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
  |  |   80|    751|          if(!curlcheck_progress_cb(value))                             \
  |  |   81|    751|            Wcurl_easy_setopt_err_progress_cb();                        \
  |  |   82|    751|        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
  |  |   83|    751|          if(!curlcheck_xferinfo_cb(value))                             \
  |  |   84|    751|            Wcurl_easy_setopt_err_xferinfo_cb();                        \
  |  |   85|    751|        if((option) == CURLOPT_DEBUGFUNCTION)                           \
  |  |   86|    751|          if(!curlcheck_debug_cb(value))                                \
  |  |   87|    751|            Wcurl_easy_setopt_err_debug_cb();                           \
  |  |   88|    751|        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
  |  |   89|    751|          if(!curlcheck_ssl_ctx_cb(value))                              \
  |  |   90|    751|            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
  |  |   91|    751|        if(curlcheck_conv_cb_option(option))                            \
  |  |   92|    751|          if(!curlcheck_conv_cb(value))                                 \
  |  |   93|    751|            Wcurl_easy_setopt_err_conv_cb();                            \
  |  |   94|    751|        if((option) == CURLOPT_SEEKFUNCTION)                            \
  |  |   95|    751|          if(!curlcheck_seek_cb(value))                                 \
  |  |   96|    751|            Wcurl_easy_setopt_err_seek_cb();                            \
  |  |   97|    751|        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
  |  |   98|    751|          if(!curlcheck_chunk_bgn_cb(value))                            \
  |  |   99|    751|            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
  |  |  100|    751|        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
  |  |  101|    751|          if(!curlcheck_chunk_end_cb(value))                            \
  |  |  102|    751|            Wcurl_easy_setopt_err_chunk_end_cb();                       \
  |  |  103|    751|        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
  |  |  104|    751|          if(!curlcheck_close_socket_cb(value))                         \
  |  |  105|    751|            Wcurl_easy_setopt_err_close_socket_cb();                    \
  |  |  106|    751|        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
  |  |  107|    751|          if(!curlcheck_fnmatch_cb(value))                              \
  |  |  108|    751|            Wcurl_easy_setopt_err_fnmatch_cb();                         \
  |  |  109|    751|        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
  |  |  110|    751|          if(!curlcheck_hstsread_cb(value))                             \
  |  |  111|    751|            Wcurl_easy_setopt_err_hstsread_cb();                        \
  |  |  112|    751|        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
  |  |  113|    751|          if(!curlcheck_hstswrite_cb(value))                            \
  |  |  114|    751|            Wcurl_easy_setopt_err_hstswrite_cb();                       \
  |  |  115|    751|        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
  |  |  116|    751|          if(!curlcheck_ssh_hostkey_cb(value))                          \
  |  |  117|    751|            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
  |  |  118|    751|        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
  |  |  119|    751|          if(!curlcheck_ssh_key_cb(value))                              \
  |  |  120|    751|            Wcurl_easy_setopt_err_ssh_key_cb();                         \
  |  |  121|    751|        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
  |  |  122|    751|          if(!curlcheck_interleave_cb(value))                           \
  |  |  123|    751|            Wcurl_easy_setopt_err_interleave_cb();                      \
  |  |  124|    751|        if((option) == CURLOPT_PREREQFUNCTION)                          \
  |  |  125|    751|          if(!curlcheck_prereq_cb(value))                               \
  |  |  126|    751|            Wcurl_easy_setopt_err_prereq_cb();                          \
  |  |  127|    751|        if((option) == CURLOPT_TRAILERFUNCTION)                         \
  |  |  128|    751|          if(!curlcheck_trailer_cb(value))                              \
  |  |  129|    751|            Wcurl_easy_setopt_err_trailer_cb();                         \
  |  |  130|    751|        if(curlcheck_cb_data_option(option))                            \
  |  |  131|    751|          if(!curlcheck_cb_data(value))                                 \
  |  |  132|    751|            Wcurl_easy_setopt_err_cb_data();                            \
  |  |  133|    751|        if((option) == CURLOPT_ERRORBUFFER)                             \
  |  |  134|    751|          if(!curlcheck_error_buffer(value))                            \
  |  |  135|    751|            Wcurl_easy_setopt_err_error_buffer();                       \
  |  |  136|    751|        if((option) == CURLOPT_CURLU)                                   \
  |  |  137|    751|          if(!curlcheck_ptr((value), CURLU))                            \
  |  |  138|    751|            Wcurl_easy_setopt_err_curlu();                              \
  |  |  139|    751|        if((option) == CURLOPT_STDERR)                                  \
  |  |  140|    751|          if(!curlcheck_FILE(value))                                    \
  |  |  141|    751|            Wcurl_easy_setopt_err_FILE();                               \
  |  |  142|    751|        if(curlcheck_postfields_option(option))                         \
  |  |  143|    751|          if(!curlcheck_postfields(value))                              \
  |  |  144|    751|            Wcurl_easy_setopt_err_postfields();                         \
  |  |  145|    751|        if((option) == CURLOPT_HTTPPOST)                                \
  |  |  146|    751|          if(!curlcheck_arr((value), struct curl_httppost))             \
  |  |  147|    751|            Wcurl_easy_setopt_err_curl_httpost();                       \
  |  |  148|    751|        if((option) == CURLOPT_MIMEPOST)                                \
  |  |  149|    751|          if(!curlcheck_ptr((value), curl_mime))                        \
  |  |  150|    751|            Wcurl_easy_setopt_err_curl_mimepost();                      \
  |  |  151|    751|        if(curlcheck_slist_option(option))                              \
  |  |  152|    751|          if(!curlcheck_arr((value), struct curl_slist))                \
  |  |  153|    751|            Wcurl_easy_setopt_err_curl_slist();                         \
  |  |  154|    751|        if((option) == CURLOPT_SHARE)                                   \
  |  |  155|    751|          if(!curlcheck_ptr((value), CURLSH))                           \
  |  |  156|    751|            Wcurl_easy_setopt_err_CURLSH();                             \
  |  |  157|    751|      )                                                                 \
  |  |  158|    751|    }                                                                   \
  |  |  159|    751|    (curl_easy_setopt)(handle, option, value);                          \
  |  |  160|    751|  })
  ------------------
  421|    751|                         (long)data->set.ssl.primary.ssl_options);
  422|       |
  423|    751|  doh->state.internal = TRUE;
  ------------------
  |  | 1055|    751|#define TRUE true
  ------------------
  424|    751|  doh->master_mid = data->mid; /* master transfer of this one */
  425|       |
  426|    751|  result = Curl_meta_set(doh, CURL_EZM_DOH_PROBE, doh_req, doh_probe_dtor);
  ------------------
  |  |   84|    751|#define CURL_EZM_DOH_PROBE   "ezm:doh-p"
  ------------------
  427|    751|  doh_req = NULL; /* call took ownership */
  428|    751|  if(result)
  ------------------
  |  Branch (428:6): [True: 0, False: 751]
  ------------------
  429|      0|    goto error;
  430|       |
  431|       |  /* DoH handles must not inherit private_data. The handles may be passed to
  432|       |     the user via callbacks and the user will be able to identify them as
  433|       |     internal handles because private data is not set. The user can then set
  434|       |     private_data via CURLOPT_PRIVATE if they so choose. */
  435|    751|  DEBUGASSERT(!doh->set.private_data);
  ------------------
  |  | 1081|    751|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (435:3): [True: 0, False: 751]
  |  Branch (435:3): [True: 751, False: 0]
  ------------------
  436|       |
  437|    751|  if(curl_multi_add_handle(multi, doh))
  ------------------
  |  Branch (437:6): [True: 0, False: 751]
  ------------------
  438|      0|    goto error;
  439|       |
  440|    751|  *pmid = doh->mid;
  441|    751|  return CURLE_OK;
  442|       |
  443|      9|error:
  444|      9|  Curl_close(&doh);
  445|      9|  if(doh_req)
  ------------------
  |  Branch (445:6): [True: 9, False: 0]
  ------------------
  446|      9|    doh_probe_dtor(NULL, 0, doh_req);
  447|      9|  return result;
  448|    751|}
doh.c:doh_probe_dtor:
  276|    760|{
  277|    760|  (void)key;
  278|    760|  (void)klen;
  279|    760|  if(e) {
  ------------------
  |  Branch (279:6): [True: 760, False: 0]
  ------------------
  280|    760|    struct doh_request *doh_req = e;
  281|    760|    curl_slist_free_all(doh_req->req_hds);
  282|    760|    curlx_dyn_free(&doh_req->resp_body);
  283|    760|    curlx_free(e);
  ------------------
  |  | 1483|    760|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  284|    760|  }
  285|    760|}
doh.c:doh2ai:
  938|    241|{
  939|    241|  struct Curl_addrinfo *ai;
  940|    241|  struct Curl_addrinfo *prevai = NULL;
  941|    241|  struct Curl_addrinfo *firstai = NULL;
  942|    241|  struct sockaddr_in *addr;
  943|    241|#ifdef USE_IPV6
  944|    241|  struct sockaddr_in6 *addr6;
  945|    241|#endif
  946|    241|  CURLcode result = CURLE_OK;
  947|    241|  int i;
  948|    241|  size_t hostlen = strlen(hostname) + 1; /* include null-terminator */
  949|       |
  950|    241|  DEBUGASSERT(de);
  ------------------
  |  | 1081|    241|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (950:3): [True: 0, False: 241]
  |  Branch (950:3): [True: 241, False: 0]
  ------------------
  951|       |
  952|    241|  if(!de->numaddr)
  ------------------
  |  Branch (952:6): [True: 241, False: 0]
  ------------------
  953|    241|    return CURLE_COULDNT_RESOLVE_HOST;
  954|       |
  955|      0|  for(i = 0; i < de->numaddr; i++) {
  ------------------
  |  Branch (955:14): [True: 0, False: 0]
  ------------------
  956|      0|    size_t ss_size;
  957|      0|    CURL_SA_FAMILY_T addrtype;
  ------------------
  |  | 1275|      0|#    define CURL_SA_FAMILY_T sa_family_t
  ------------------
  958|      0|    if(de->addr[i].type == CURL_DNS_TYPE_AAAA) {
  ------------------
  |  Branch (958:8): [True: 0, False: 0]
  ------------------
  959|       |#ifndef USE_IPV6
  960|       |      /* we cannot handle IPv6 addresses */
  961|       |      continue;
  962|       |#else
  963|      0|      ss_size = sizeof(struct sockaddr_in6);
  964|      0|      addrtype = AF_INET6;
  965|      0|#endif
  966|      0|    }
  967|      0|    else {
  968|      0|      ss_size = sizeof(struct sockaddr_in);
  969|      0|      addrtype = AF_INET;
  970|      0|    }
  971|       |
  972|      0|    ai = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen);
  ------------------
  |  | 1480|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  973|      0|    if(!ai) {
  ------------------
  |  Branch (973:8): [True: 0, False: 0]
  ------------------
  974|      0|      result = CURLE_OUT_OF_MEMORY;
  975|      0|      break;
  976|      0|    }
  977|      0|    ai->ai_addr = (void *)((char *)ai + sizeof(struct Curl_addrinfo));
  978|      0|    ai->ai_canonname = (void *)((char *)ai->ai_addr + ss_size);
  979|      0|    memcpy(ai->ai_canonname, hostname, hostlen);
  980|       |
  981|      0|    if(!firstai)
  ------------------
  |  Branch (981:8): [True: 0, False: 0]
  ------------------
  982|       |      /* store the pointer we want to return from this function */
  983|      0|      firstai = ai;
  984|       |
  985|      0|    if(prevai)
  ------------------
  |  Branch (985:8): [True: 0, False: 0]
  ------------------
  986|       |      /* make the previous entry point to this */
  987|      0|      prevai->ai_next = ai;
  988|       |
  989|      0|    ai->ai_family = addrtype;
  990|       |
  991|       |    /* we return all names as STREAM, so when using this address for TFTP
  992|       |       the type must be ignored and conn->socktype be used instead! */
  993|      0|    ai->ai_socktype = SOCK_STREAM;
  994|       |
  995|      0|    ai->ai_addrlen = (curl_socklen_t)ss_size;
  996|       |
  997|       |    /* leave the rest of the struct filled with zero */
  998|       |
  999|      0|    switch(ai->ai_family) {
  ------------------
  |  Branch (999:12): [True: 0, False: 0]
  ------------------
 1000|      0|    case AF_INET:
  ------------------
  |  Branch (1000:5): [True: 0, False: 0]
  ------------------
 1001|      0|      addr = (void *)ai->ai_addr; /* storage area for this info */
 1002|      0|      DEBUGASSERT(sizeof(struct in_addr) == sizeof(de->addr[i].ip.v4));
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1002:7): [True: 0, Folded]
  |  Branch (1002:7): [True: 0, Folded]
  ------------------
 1003|      0|      memcpy(&addr->sin_addr, &de->addr[i].ip.v4, sizeof(struct in_addr));
 1004|      0|      addr->sin_family = addrtype;
 1005|      0|      addr->sin_port = htons((unsigned short)port);
 1006|      0|      break;
 1007|       |
 1008|      0|#ifdef USE_IPV6
 1009|      0|    case AF_INET6:
  ------------------
  |  Branch (1009:5): [True: 0, False: 0]
  ------------------
 1010|      0|      addr6 = (void *)ai->ai_addr; /* storage area for this info */
 1011|      0|      DEBUGASSERT(sizeof(struct in6_addr) == sizeof(de->addr[i].ip.v6));
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1011:7): [True: 0, Folded]
  |  Branch (1011:7): [True: 0, Folded]
  ------------------
 1012|      0|      memcpy(&addr6->sin6_addr, &de->addr[i].ip.v6, sizeof(struct in6_addr));
 1013|      0|      addr6->sin6_family = addrtype;
 1014|      0|      addr6->sin6_port = htons((unsigned short)port);
 1015|      0|      break;
 1016|      0|#endif
 1017|      0|    }
 1018|       |
 1019|      0|    prevai = ai;
 1020|      0|  }
 1021|       |
 1022|      0|  if(result) {
  ------------------
  |  Branch (1022:6): [True: 0, False: 0]
  ------------------
 1023|      0|    Curl_freeaddrinfo(firstai);
 1024|      0|    firstai = NULL;
 1025|      0|  }
 1026|      0|  *aip = firstai;
 1027|       |
 1028|      0|  return result;
 1029|      0|}
doh.c:doh_close:
 1321|    644|{
 1322|    644|  struct doh_probes *doh = async ? async->doh : NULL;
  ------------------
  |  Branch (1322:28): [True: 644, False: 0]
  ------------------
 1323|    644|  if(doh && data->multi) {
  ------------------
  |  Branch (1323:6): [True: 644, False: 0]
  |  Branch (1323:13): [True: 644, False: 0]
  ------------------
 1324|    644|    struct Curl_easy *probe_data;
 1325|    644|    uint32_t mid;
 1326|    644|    size_t slot;
 1327|  1.93k|    for(slot = 0; slot < DOH_SLOT_COUNT; slot++) {
  ------------------
  |  Branch (1327:19): [True: 1.28k, False: 644]
  ------------------
 1328|  1.28k|      mid = doh->probe_resp[slot].probe_mid;
 1329|  1.28k|      if(mid == UINT32_MAX)
  ------------------
  |  Branch (1329:10): [True: 537, False: 751]
  ------------------
 1330|    537|        continue;
 1331|    751|      doh->probe_resp[slot].probe_mid = UINT32_MAX;
 1332|       |      /* should have been called before data is removed from multi handle */
 1333|    751|      DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|    751|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1333:7): [True: 0, False: 751]
  |  Branch (1333:7): [True: 751, False: 0]
  ------------------
 1334|    751|      probe_data = data->multi ? Curl_multi_get_easy(data->multi, mid) : NULL;
  ------------------
  |  Branch (1334:20): [True: 751, False: 0]
  ------------------
 1335|    751|      if(!probe_data) {
  ------------------
  |  Branch (1335:10): [True: 0, False: 751]
  ------------------
 1336|      0|        DEBUGF(infof(data, "Curl_doh_close: xfer for mid=%u not found!",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1337|      0|                     doh->probe_resp[slot].probe_mid));
 1338|      0|        continue;
 1339|      0|      }
 1340|       |      /* data->multi might already be reset at this time */
 1341|    751|      curl_multi_remove_handle(data->multi, probe_data);
 1342|    751|      Curl_close(&probe_data);
 1343|    751|    }
 1344|    644|    data->sub_xfer_done = NULL;
 1345|    644|  }
 1346|    644|}

Curl_dynhds_init:
   59|  1.64k|{
   60|  1.64k|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1081|  1.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 1.64k]
  |  Branch (60:3): [True: 1.64k, False: 0]
  ------------------
   61|  1.64k|  DEBUGASSERT(max_strs_size);
  ------------------
  |  | 1081|  1.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (61:3): [True: 0, False: 1.64k]
  |  Branch (61:3): [True: 1.64k, False: 0]
  ------------------
   62|  1.64k|  dynhds->hds = NULL;
   63|  1.64k|  dynhds->hds_len = dynhds->hds_allc = dynhds->strs_len = 0;
   64|  1.64k|  dynhds->max_entries = max_entries;
   65|  1.64k|  dynhds->max_strs_size = max_strs_size;
   66|  1.64k|  dynhds->opts = 0;
   67|  1.64k|}
Curl_dynhds_free:
   70|  1.64k|{
   71|  1.64k|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1081|  1.64k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (71:3): [True: 0, False: 1.64k]
  |  Branch (71:3): [True: 1.64k, False: 0]
  ------------------
   72|  1.64k|  if(dynhds->hds && dynhds->hds_len) {
  ------------------
  |  Branch (72:6): [True: 823, False: 825]
  |  Branch (72:21): [True: 823, False: 0]
  ------------------
   73|    823|    size_t i;
   74|    823|    DEBUGASSERT(dynhds->hds);
  ------------------
  |  | 1081|    823|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:5): [True: 0, False: 823]
  |  Branch (74:5): [True: 823, False: 0]
  ------------------
   75|  5.81k|    for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (75:16): [True: 4.99k, False: 823]
  ------------------
   76|  4.99k|      entry_free(dynhds->hds[i]);
   77|  4.99k|    }
   78|    823|  }
   79|  1.64k|  curlx_safefree(dynhds->hds);
  ------------------
  |  | 1327|  1.64k|  do {                      \
  |  | 1328|  1.64k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.64k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.64k|    (ptr) = NULL;           \
  |  | 1330|  1.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
   80|  1.64k|  dynhds->hds_len = dynhds->hds_allc = dynhds->strs_len = 0;
   81|  1.64k|}
Curl_dynhds_add:
  134|  4.99k|{
  135|  4.99k|  struct dynhds_entry *entry = NULL;
  136|  4.99k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  137|       |
  138|  4.99k|  DEBUGASSERT(dynhds);
  ------------------
  |  | 1081|  4.99k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 4.99k]
  |  Branch (138:3): [True: 4.99k, False: 0]
  ------------------
  139|  4.99k|  if(dynhds->max_entries && dynhds->hds_len >= dynhds->max_entries)
  ------------------
  |  Branch (139:6): [True: 0, False: 4.99k]
  |  Branch (139:29): [True: 0, False: 0]
  ------------------
  140|      0|    return CURLE_OUT_OF_MEMORY;
  141|  4.99k|  if(dynhds->strs_len + namelen + valuelen > dynhds->max_strs_size)
  ------------------
  |  Branch (141:6): [True: 0, False: 4.99k]
  ------------------
  142|      0|    return CURLE_OUT_OF_MEMORY;
  143|       |
  144|  4.99k|  entry = entry_new(name, namelen, value, valuelen, dynhds->opts);
  145|  4.99k|  if(!entry)
  ------------------
  |  Branch (145:6): [True: 0, False: 4.99k]
  ------------------
  146|      0|    goto out;
  147|       |
  148|  4.99k|  if(dynhds->hds_len + 1 >= dynhds->hds_allc) {
  ------------------
  |  Branch (148:6): [True: 1.01k, False: 3.98k]
  ------------------
  149|  1.01k|    size_t nallc = dynhds->hds_len + 16;
  150|  1.01k|    struct dynhds_entry **nhds;
  151|       |
  152|  1.01k|    if(dynhds->max_entries && nallc > dynhds->max_entries)
  ------------------
  |  Branch (152:8): [True: 0, False: 1.01k]
  |  Branch (152:31): [True: 0, False: 0]
  ------------------
  153|      0|      nallc = dynhds->max_entries;
  154|       |
  155|  1.01k|    nhds = curlx_calloc(nallc, sizeof(struct dynhds_entry *));
  ------------------
  |  | 1480|  1.01k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  156|  1.01k|    if(!nhds)
  ------------------
  |  Branch (156:8): [True: 0, False: 1.01k]
  ------------------
  157|      0|      goto out;
  158|  1.01k|    if(dynhds->hds) {
  ------------------
  |  Branch (158:8): [True: 190, False: 823]
  ------------------
  159|    190|      memcpy(nhds, dynhds->hds,
  160|    190|             dynhds->hds_len * sizeof(struct dynhds_entry *));
  161|    190|      curlx_safefree(dynhds->hds);
  ------------------
  |  | 1327|    190|  do {                      \
  |  | 1328|    190|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    190|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    190|    (ptr) = NULL;           \
  |  | 1330|    190|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 190]
  |  |  ------------------
  ------------------
  162|    190|    }
  163|  1.01k|    dynhds->hds = nhds;
  164|  1.01k|    dynhds->hds_allc = nallc;
  165|  1.01k|  }
  166|  4.99k|  dynhds->hds[dynhds->hds_len++] = entry;
  167|  4.99k|  entry = NULL;
  168|  4.99k|  dynhds->strs_len += namelen + valuelen;
  169|  4.99k|  result = CURLE_OK;
  170|       |
  171|  4.99k|out:
  172|  4.99k|  if(entry)
  ------------------
  |  Branch (172:6): [True: 0, False: 4.99k]
  ------------------
  173|      0|    entry_free(entry);
  174|  4.99k|  return result;
  175|  4.99k|}
Curl_dynhds_cadd:
  179|  1.64k|{
  180|  1.64k|  return Curl_dynhds_add(dynhds, name, strlen(name), value, strlen(value));
  181|  1.64k|}
Curl_dynhds_h1_add_line:
  185|    214|{
  186|    214|  const char *p;
  187|    214|  const char *name;
  188|    214|  size_t namelen;
  189|    214|  const char *value;
  190|    214|  size_t valuelen, i;
  191|       |
  192|    214|  if(!line || !line_len)
  ------------------
  |  Branch (192:6): [True: 0, False: 214]
  |  Branch (192:15): [True: 0, False: 214]
  ------------------
  193|      0|    return CURLE_OK;
  194|       |
  195|    214|  p = memchr(line, ':', line_len);
  196|    214|  if(!p)
  ------------------
  |  Branch (196:6): [True: 0, False: 214]
  ------------------
  197|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  198|    214|  name = line;
  199|    214|  namelen = p - line;
  200|    214|  p++; /* move past the colon */
  201|    428|  for(i = namelen + 1; i < line_len; ++i, ++p) {
  ------------------
  |  Branch (201:24): [True: 428, False: 0]
  ------------------
  202|    428|    if(!ISBLANK(*p))
  ------------------
  |  |   45|    428|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 214, False: 214]
  |  |  |  Branch (45:38): [True: 0, False: 214]
  |  |  ------------------
  ------------------
  203|    214|      break;
  204|    428|  }
  205|    214|  value = p;
  206|    214|  valuelen = line_len - i;
  207|       |
  208|    214|  p = memchr(value, '\r', valuelen);
  209|    214|  if(!p)
  ------------------
  |  Branch (209:6): [True: 0, False: 214]
  ------------------
  210|      0|    p = memchr(value, '\n', valuelen);
  211|    214|  if(p)
  ------------------
  |  Branch (211:6): [True: 214, False: 0]
  ------------------
  212|    214|    valuelen = (size_t)(p - value);
  213|       |
  214|    214|  return Curl_dynhds_add(dynhds, name, namelen, value, valuelen);
  215|    214|}
Curl_dynhds_h1_cadd_line:
  218|    214|{
  219|    214|  return Curl_dynhds_h1_add_line(dynhds, line, line ? strlen(line) : 0);
  ------------------
  |  Branch (219:48): [True: 214, False: 0]
  ------------------
  220|    214|}
Curl_dynhds_h1_dprint:
  342|    823|{
  343|    823|  CURLcode result = CURLE_OK;
  344|    823|  size_t i;
  345|       |
  346|    823|  if(!dynhds->hds_len)
  ------------------
  |  Branch (346:6): [True: 0, False: 823]
  ------------------
  347|      0|    return result;
  348|       |
  349|  5.81k|  for(i = 0; i < dynhds->hds_len; ++i) {
  ------------------
  |  Branch (349:14): [True: 4.99k, False: 823]
  ------------------
  350|  4.99k|    result = curlx_dyn_addf(dbuf, "%.*s: %.*s\r\n",
  351|  4.99k|                            (int)dynhds->hds[i]->namelen, dynhds->hds[i]->name,
  352|  4.99k|                            (int)dynhds->hds[i]->valuelen,
  353|  4.99k|                            dynhds->hds[i]->value);
  354|  4.99k|    if(result)
  ------------------
  |  Branch (354:8): [True: 0, False: 4.99k]
  ------------------
  355|      0|      break;
  356|  4.99k|  }
  357|       |
  358|    823|  return result;
  359|    823|}
dynhds.c:entry_free:
   53|  4.99k|{
   54|  4.99k|  curlx_free(e);
  ------------------
  |  | 1483|  4.99k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   55|  4.99k|}
dynhds.c:entry_new:
   32|  4.99k|{
   33|  4.99k|  struct dynhds_entry *e;
   34|  4.99k|  char *p;
   35|       |
   36|  4.99k|  DEBUGASSERT(name);
  ------------------
  |  | 1081|  4.99k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 0, False: 4.99k]
  |  Branch (36:3): [True: 4.99k, False: 0]
  ------------------
   37|  4.99k|  DEBUGASSERT(value);
  ------------------
  |  | 1081|  4.99k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (37:3): [True: 0, False: 4.99k]
  |  Branch (37:3): [True: 4.99k, False: 0]
  ------------------
   38|  4.99k|  e = curlx_calloc(1, sizeof(*e) + namelen + valuelen + 2);
  ------------------
  |  | 1480|  4.99k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   39|  4.99k|  if(!e)
  ------------------
  |  Branch (39:6): [True: 0, False: 4.99k]
  ------------------
   40|      0|    return NULL;
   41|  4.99k|  e->name = p = (char *)e + sizeof(*e);
   42|  4.99k|  memcpy(p, name, namelen);
   43|  4.99k|  e->namelen = namelen;
   44|  4.99k|  e->value = p += namelen + 1; /* leave a \0 at the end of name */
   45|  4.99k|  memcpy(p, value, valuelen);
   46|  4.99k|  e->valuelen = valuelen;
   47|  4.99k|  if(opts & DYNHDS_OPT_LOWERCASE)
  ------------------
  |  |   54|  4.99k|#define DYNHDS_OPT_LOWERCASE     (1 << 0)
  ------------------
  |  Branch (47:6): [True: 0, False: 4.99k]
  ------------------
   48|      0|    Curl_strntolower(e->name, e->name, e->namelen);
   49|  4.99k|  return e;
   50|  4.99k|}

curl_easy_init:
  331|  32.4k|{
  332|  32.4k|  CURLcode result;
  333|  32.4k|  struct Curl_easy *data;
  334|       |
  335|       |  /* Make sure we inited the global SSL stuff */
  336|  32.4k|  global_init_lock();
  ------------------
  |  |   87|  32.4k|#define global_init_lock()   curl_simple_lock_lock(&s_lock)
  ------------------
  337|       |
  338|  32.4k|  if(!initialized) {
  ------------------
  |  Branch (338:6): [True: 1, False: 32.4k]
  ------------------
  339|      1|    result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 3022|      1|#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
  |  |  ------------------
  |  |  |  | 3020|      1|#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3018|      1|#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
  |  |  |  |  ------------------
  |  |  |  |               #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
  |  |  |  |  ------------------
  |  |  |  |  |  | 3019|      1|#define CURL_GLOBAL_WIN32 (1 << 1)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  result = global_init(CURL_GLOBAL_DEFAULT, TRUE);
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  340|      1|    if(result) {
  ------------------
  |  Branch (340:8): [True: 0, False: 1]
  ------------------
  341|       |      /* something in the global init failed, return nothing */
  342|      0|      DEBUGF(curl_mfprintf(stderr, "Error: curl_global_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  343|      0|      global_init_unlock();
  ------------------
  |  |   88|      0|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  344|      0|      return NULL;
  345|      0|    }
  346|      1|  }
  347|  32.4k|  global_init_unlock();
  ------------------
  |  |   88|  32.4k|#define global_init_unlock() curl_simple_lock_unlock(&s_lock)
  ------------------
  348|       |
  349|       |  /* We use Curl_open() with undefined URL so far */
  350|  32.4k|  result = Curl_open(&data);
  351|  32.4k|  if(result) {
  ------------------
  |  Branch (351:6): [True: 0, False: 32.4k]
  ------------------
  352|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_open failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  353|      0|    return NULL;
  354|      0|  }
  355|       |
  356|  32.4k|  return data;
  357|  32.4k|}
curl_easy_cleanup:
  839|  17.1k|{
  840|  17.1k|  struct Curl_easy *data = curl;
  841|  17.1k|  if(GOOD_EASY_HANDLE(data)) {
  ------------------
  |  |  136|  17.1k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  17.1k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  17.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:3): [True: 17.1k, False: 0]
  |  |  |  Branch (136:5): [True: 17.1k, False: 0]
  |  |  |  Branch (136:12): [True: 17.1k, False: 0]
  |  |  ------------------
  |  |  137|  17.1k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (841:6): [True: 0, False: 0]
  |  Branch (841:6): [True: 0, False: 0]
  ------------------
  842|  17.1k|    struct Curl_sigpipe_ctx sigpipe_ctx;
  843|  17.1k|    sigpipe_ignore(data, &sigpipe_ctx);
  844|  17.1k|    Curl_close(&data);
  845|  17.1k|    sigpipe_restore(&sigpipe_ctx);
  846|  17.1k|  }
  847|  17.1k|}
Curl_meta_set:
 1378|  21.6k|{
 1379|  21.6k|  DEBUGASSERT(meta_data); /* never set to NULL */
  ------------------
  |  | 1081|  21.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1379:3): [True: 0, False: 21.6k]
  |  Branch (1379:3): [True: 21.6k, False: 0]
  ------------------
 1380|  21.6k|  if(!Curl_hash_add2(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  866|  21.6k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (1380:6): [True: 0, False: 21.6k]
  ------------------
 1381|  21.6k|                     meta_data, meta_dtor)) {
 1382|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1383|      0|    return CURLE_OUT_OF_MEMORY;
 1384|      0|  }
 1385|  21.6k|  return CURLE_OK;
 1386|  21.6k|}
Curl_meta_remove:
 1389|  16.6k|{
 1390|  16.6k|  Curl_hash_delete(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  16.6k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1391|  16.6k|}
Curl_meta_get:
 1394|  36.2k|{
 1395|  36.2k|  return Curl_hash_pick(&data->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  36.2k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 1396|  36.2k|}
easy.c:global_init:
  125|      1|{
  126|      1|  if(initialized++)
  ------------------
  |  Branch (126:6): [True: 0, False: 1]
  ------------------
  127|      0|    return CURLE_OK;
  128|       |
  129|      1|  if(memoryfuncs) {
  ------------------
  |  Branch (129:6): [True: 1, False: 0]
  ------------------
  130|       |    /* Setup the default memory functions here (again) */
  131|      1|    Curl_cmalloc = (curl_malloc_callback)malloc;
  132|      1|    Curl_cfree = (curl_free_callback)free;
  133|      1|    Curl_crealloc = (curl_realloc_callback)realloc;
  134|      1|    Curl_cstrdup = (curl_strdup_callback)CURLX_STRDUP_LOW;
  ------------------
  |  | 1472|      1|#define CURLX_STRDUP_LOW strdup
  ------------------
  135|      1|    Curl_ccalloc = (curl_calloc_callback)calloc;
  136|      1|  }
  137|       |
  138|      1|  if(Curl_trc_init()) {
  ------------------
  |  Branch (138:6): [True: 0, False: 1]
  ------------------
  139|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_trc_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  140|      0|    goto fail;
  141|      0|  }
  142|       |
  143|      1|  if(!Curl_ssl_init()) {
  ------------------
  |  Branch (143:6): [True: 0, False: 1]
  ------------------
  144|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssl_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  145|      0|    goto fail;
  146|      0|  }
  147|       |
  148|      1|  if(!Curl_vquic_init()) {
  ------------------
  |  |   54|      1|#define Curl_vquic_init() 1
  ------------------
  |  Branch (148:6): [Folded, False: 1]
  ------------------
  149|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_vquic_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  150|      0|    goto fail;
  151|      0|  }
  152|       |
  153|      1|  if(Curl_win32_init(flags)) {
  ------------------
  |  |   34|      1|#define Curl_win32_init(x) CURLE_OK
  |  |  ------------------
  |  |  |  Branch (34:28): [Folded, False: 1]
  |  |  ------------------
  ------------------
  154|      0|    DEBUGF(curl_mfprintf(stderr, "Error: win32_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  155|      0|    goto fail;
  156|      0|  }
  157|       |
  158|      1|  if(Curl_amiga_init()) {
  ------------------
  |  |   36|      1|#define Curl_amiga_init()    CURLE_OK
  |  |  ------------------
  |  |  |  Branch (36:30): [Folded, False: 1]
  |  |  ------------------
  ------------------
  159|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_amiga_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  160|      0|    goto fail;
  161|      0|  }
  162|       |
  163|      1|  if(Curl_macos_init()) {
  ------------------
  |  |   31|      1|#define Curl_macos_init() CURLE_OK
  |  |  ------------------
  |  |  |  Branch (31:27): [Folded, False: 1]
  |  |  ------------------
  ------------------
  164|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_macos_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  165|      0|    goto fail;
  166|      0|  }
  167|       |
  168|      1|  if(Curl_async_global_init()) {
  ------------------
  |  Branch (168:6): [True: 0, False: 1]
  ------------------
  169|      0|    DEBUGF(curl_mfprintf(stderr, "Error: resolver_global_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  170|      0|    goto fail;
  171|      0|  }
  172|       |
  173|      1|  if(Curl_ssh_init()) {
  ------------------
  |  |  259|      1|#define Curl_ssh_init() 0
  |  |  ------------------
  |  |  |  Branch (259:25): [Folded, False: 1]
  |  |  ------------------
  ------------------
  174|      0|    DEBUGF(curl_mfprintf(stderr, "Error: Curl_ssh_init failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  175|      0|    goto fail;
  176|      0|  }
  177|       |
  178|      1|  easy_init_flags = flags;
  179|       |
  180|      1|#ifdef DEBUGBUILD
  181|      1|  if(getenv("CURL_GLOBAL_INIT"))
  ------------------
  |  Branch (181:6): [True: 0, False: 1]
  ------------------
  182|       |    /* alloc data that will leak if *cleanup() is not called! */
  183|      0|    leakpointer = curlx_malloc(1);
  ------------------
  |  | 1478|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  184|      1|#endif
  185|       |
  186|      1|  return CURLE_OK;
  187|       |
  188|      0|fail:
  189|      0|  initialized--; /* undo the increase */
  190|      0|  return CURLE_FAILED_INIT;
  191|      1|}

easy.c:curl_simple_lock_lock:
   64|  32.4k|{
   65|  32.4k|  for(;;) {
   66|  32.4k|    if(!atomic_exchange_explicit(lock, true, memory_order_acquire))
  ------------------
  |  Branch (66:8): [True: 32.4k, False: 0]
  ------------------
   67|  32.4k|      break;
   68|       |    /* Reduce cache coherency traffic */
   69|      0|    while(atomic_load_explicit(lock, memory_order_relaxed)) {
  ------------------
  |  Branch (69:11): [True: 0, False: 0]
  ------------------
   70|       |      /* Reduce load (not mandatory) */
   71|      0|#ifdef HAVE_BUILTIN_IA32_PAUSE
   72|      0|      __builtin_ia32_pause();
   73|       |#elif defined(__aarch64__)
   74|       |      __asm__ volatile("yield" ::: "memory");
   75|       |#elif defined(HAVE_SCHED_YIELD)
   76|       |      sched_yield();
   77|       |#endif
   78|      0|    }
   79|      0|  }
   80|  32.4k|}
easy.c:curl_simple_lock_unlock:
   83|  32.4k|{
   84|  32.4k|  atomic_store_explicit(lock, false, memory_order_release);
   85|  32.4k|}

curl_easy_escape:
   51|  10.4k|{
   52|  10.4k|  size_t len;
   53|  10.4k|  struct dynbuf d;
   54|  10.4k|  (void)curl;
   55|       |
   56|  10.4k|  if(!string || (length < 0))
  ------------------
  |  Branch (56:6): [True: 0, False: 10.4k]
  |  Branch (56:17): [True: 0, False: 10.4k]
  ------------------
   57|      0|    return NULL;
   58|       |
   59|  10.4k|  len = (length ? (size_t)length : strlen(string));
  ------------------
  |  Branch (59:10): [True: 0, False: 10.4k]
  ------------------
   60|  10.4k|  if(!len)
  ------------------
  |  Branch (60:6): [True: 0, False: 10.4k]
  ------------------
   61|      0|    return curlx_strdup("");
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   62|       |
   63|  10.4k|  if(len > SIZE_MAX / 16)
  ------------------
  |  Branch (63:6): [True: 0, False: 10.4k]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|  10.4k|  curlx_dyn_init(&d, (len * 3) + 1);
   67|       |
   68|  80.1k|  while(len--) {
  ------------------
  |  Branch (68:9): [True: 69.7k, False: 10.4k]
  ------------------
   69|       |    /* treat the characters unsigned */
   70|  69.7k|    unsigned char in = (unsigned char)*string++;
   71|       |
   72|  69.7k|    if(ISUNRESERVED(in)) {
  ------------------
  |  |   49|  69.7k|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   41|   139k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   44|   139k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (44:22): [True: 46.5k, False: 23.1k]
  |  |  |  |  |  |  |  Branch (44:38): [True: 40.7k, False: 5.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|  98.6k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:22): [True: 1.36k, False: 27.5k]
  |  |  |  |  |  |  |  Branch (43:38): [True: 713, False: 651]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|  28.2k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 5.04k, False: 23.1k]
  |  |  |  |  |  |  |  Branch (42:38): [True: 4.27k, False: 764]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   48|  23.9k|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:4): [True: 604, False: 23.3k]
  |  |  |  |  |  Branch (48:20): [True: 22.5k, False: 764]
  |  |  |  |  |  Branch (48:36): [True: 113, False: 651]
  |  |  |  |  |  Branch (48:52): [True: 651, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|       |      /* append this */
   74|  69.7k|      if(curlx_dyn_addn(&d, &in, 1))
  ------------------
  |  Branch (74:10): [True: 0, False: 69.7k]
  ------------------
   75|      0|        return NULL;
   76|  69.7k|    }
   77|      0|    else {
   78|       |      /* encode it */
   79|      0|      unsigned char out[3] = { '%' };
   80|      0|      Curl_hexbyte(&out[1], in);
   81|      0|      if(curlx_dyn_addn(&d, out, 3))
  ------------------
  |  Branch (81:10): [True: 0, False: 0]
  ------------------
   82|      0|        return NULL;
   83|      0|    }
   84|  69.7k|  }
   85|       |
   86|  10.4k|  return curlx_dyn_ptr(&d);
   87|  10.4k|}
Curl_urldecode:
  108|  10.5k|{
  109|  10.5k|  size_t alloc;
  110|  10.5k|  char *ns;
  111|       |
  112|  10.5k|  DEBUGASSERT(string);
  ------------------
  |  | 1081|  10.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 10.5k]
  |  Branch (112:3): [True: 10.5k, False: 0]
  ------------------
  113|  10.5k|  DEBUGASSERT(ctrl >= REJECT_NADA); /* crash on TRUE/FALSE */
  ------------------
  |  | 1081|  10.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (113:3): [True: 0, False: 10.5k]
  |  Branch (113:3): [True: 10.5k, False: 0]
  ------------------
  114|       |
  115|  10.5k|  alloc = (length ? length : strlen(string));
  ------------------
  |  Branch (115:12): [True: 3.91k, False: 6.63k]
  ------------------
  116|  10.5k|  ns = curlx_malloc(alloc + 1);
  ------------------
  |  | 1478|  10.5k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  117|       |
  118|  10.5k|  if(!ns)
  ------------------
  |  Branch (118:6): [True: 0, False: 10.5k]
  ------------------
  119|      0|    return CURLE_OUT_OF_MEMORY;
  120|       |
  121|       |  /* store output string */
  122|  10.5k|  *ostring = ns;
  123|       |
  124|  5.38M|  while(alloc) {
  ------------------
  |  Branch (124:9): [True: 5.37M, False: 10.5k]
  ------------------
  125|  5.37M|    unsigned char in = (unsigned char)*string;
  126|  5.37M|    if(('%' == in) && (alloc > 2) &&
  ------------------
  |  Branch (126:8): [True: 1.47M, False: 3.89M]
  |  Branch (126:23): [True: 1.47M, False: 172]
  ------------------
  127|  1.47M|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  6.84M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  2.95M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 32.6k, False: 1.44M]
  |  |  |  |  |  Branch (44:38): [True: 5.87k, False: 26.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  2.95M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 13.3k, False: 1.45M]
  |  |  |  |  |  Branch (27:43): [True: 6.70k, False: 6.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  1.46M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 19.5k, False: 1.44M]
  |  |  |  |  |  Branch (28:43): [True: 10.0k, False: 9.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  22.6k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  45.2k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 15.0k, False: 7.52k]
  |  |  |  |  |  Branch (44:38): [True: 4.51k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  40.7k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 5.33k, False: 12.7k]
  |  |  |  |  |  Branch (27:43): [True: 2.34k, False: 2.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  15.7k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 8.04k, False: 7.72k]
  |  |  |  |  |  Branch (28:43): [True: 4.05k, False: 3.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|       |      /* this is two hexadecimal digits following a '%' */
  129|  10.9k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  112|  10.9k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  130|  10.9k|                           curlx_hexval(string[2]));
  ------------------
  |  |  112|  10.9k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  131|  10.9k|      string += 3;
  132|  10.9k|      alloc -= 3;
  133|  10.9k|    }
  134|  5.35M|    else {
  135|  5.35M|      string++;
  136|  5.35M|      alloc--;
  137|  5.35M|    }
  138|       |
  139|  5.37M|    if(((ctrl == REJECT_CTRL) && (in < 0x20)) ||
  ------------------
  |  Branch (139:9): [True: 4.99M, False: 372k]
  |  Branch (139:34): [True: 8, False: 4.99M]
  ------------------
  140|  5.37M|       ((ctrl == REJECT_ZERO) && (in == 0))) {
  ------------------
  |  Branch (140:9): [True: 372k, False: 4.99M]
  |  Branch (140:34): [True: 3, False: 372k]
  ------------------
  141|     11|      curlx_safefree(*ostring);
  ------------------
  |  | 1327|     11|  do {                      \
  |  | 1328|     11|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     11|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     11|    (ptr) = NULL;           \
  |  | 1330|     11|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 11]
  |  |  ------------------
  ------------------
  142|     11|      return CURLE_URL_MALFORMAT;
  143|     11|    }
  144|       |
  145|  5.37M|    *ns++ = (char)in;
  146|  5.37M|  }
  147|  10.5k|  *ns = 0; /* terminate it */
  148|       |
  149|  10.5k|  if(olen)
  ------------------
  |  Branch (149:6): [True: 5.14k, False: 5.38k]
  ------------------
  150|       |    /* store output size */
  151|  5.14k|    *olen = ns - *ostring;
  152|       |
  153|  10.5k|  return CURLE_OK;
  154|  10.5k|}
curl_free:
  191|  38.6k|{
  192|  38.6k|  curlx_free(p);
  ------------------
  |  | 1483|  38.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  193|  38.6k|}
Curl_hexencode:
  203|  8.04k|{
  204|  8.04k|  DEBUGASSERT(src && len && (olen >= 3));
  ------------------
  |  | 1081|  8.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (204:3): [True: 0, False: 8.04k]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 0, False: 0]
  |  Branch (204:3): [True: 8.04k, False: 0]
  |  Branch (204:3): [True: 8.04k, False: 0]
  |  Branch (204:3): [True: 8.04k, False: 0]
  ------------------
  205|  8.04k|  if(src && len && (olen >= 3)) {
  ------------------
  |  Branch (205:6): [True: 8.04k, False: 0]
  |  Branch (205:13): [True: 8.04k, False: 0]
  |  Branch (205:20): [True: 8.04k, False: 0]
  ------------------
  206|   265k|    while(len-- && (olen >= 3)) {
  ------------------
  |  Branch (206:11): [True: 257k, False: 8.04k]
  |  Branch (206:20): [True: 257k, False: 0]
  ------------------
  207|   257k|      out[0] = Curl_ldigits[*src >> 4];
  208|   257k|      out[1] = Curl_ldigits[*src & 0x0F];
  209|   257k|      ++src;
  210|   257k|      out += 2;
  211|   257k|      olen -= 2;
  212|   257k|    }
  213|  8.04k|    *out = 0;
  214|  8.04k|  }
  215|      0|  else if(olen)
  ------------------
  |  Branch (215:11): [True: 0, False: 0]
  ------------------
  216|      0|    *out = 0;
  217|  8.04k|}
Curl_hexbyte:
  225|  1.29M|{
  226|  1.29M|  dest[0] = Curl_udigits[val >> 4];
  227|  1.29M|  dest[1] = Curl_udigits[val & 0x0F];
  228|  1.29M|}

curl_formadd:
  610|    123|{
  611|    123|  va_list arg;
  612|    123|  CURLFORMcode form;
  613|    123|  va_start(arg, last_post);
  614|    123|  form = FormAdd(httppost, last_post, arg);
  615|       |  va_end(arg);
  616|    123|  return form;
  617|    123|}
curl_formfree:
  665|    246|{
  666|    246|  struct curl_httppost *next;
  667|       |
  668|    246|  if(!form)
  ------------------
  |  Branch (668:6): [True: 123, False: 123]
  ------------------
  669|       |    /* no form to free, get out of this */
  670|    123|    return;
  671|       |
  672|    123|  do {
  673|    123|    next = form->next;  /* the following form line */
  674|       |
  675|       |    /* recurse to sub-contents */
  676|    123|    curl_formfree(form->more);
  677|       |
  678|    123|    if(!(form->flags & HTTPPOST_PTRNAME))
  ------------------
  |  |   39|    123|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|    123|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (678:8): [True: 123, False: 0]
  ------------------
  679|    123|      curlx_free(form->name); /* free the name */
  ------------------
  |  | 1483|    123|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  680|    123|    if(!(form->flags &
  ------------------
  |  Branch (680:8): [True: 0, False: 123]
  ------------------
  681|    123|         (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   41|    123|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|    123|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                       (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   45|    123|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|    123|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
                       (HTTPPOST_PTRCONTENTS | HTTPPOST_BUFFER | HTTPPOST_CALLBACK)))
  ------------------
  |  |   44|    123|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|    123|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  682|      0|      curlx_free(form->contents); /* free the contents */
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  683|    123|    curlx_free(form->contenttype); /* free the content type */
  ------------------
  |  | 1483|    123|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  684|    123|    curlx_free(form->showfilename); /* free the faked filename */
  ------------------
  |  | 1483|    123|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  685|    123|    curlx_free(form);       /* free the struct */
  ------------------
  |  | 1483|    123|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  686|    123|    form = next;
  687|    123|  } while(form); /* continue */
  ------------------
  |  Branch (687:11): [True: 0, False: 123]
  ------------------
  688|    123|}
formdata.c:FormAdd:
  302|    123|{
  303|    123|  struct FormInfo *first_form, *curr, *form = NULL;
  304|    123|  CURLFORMcode retval = CURL_FORMADD_OK;
  305|    123|  CURLformoption option;
  306|    123|  const struct curl_forms *forms = NULL;
  307|    123|  char *avalue = NULL;
  308|    123|  struct curl_httppost *newchain = NULL;
  309|    123|  struct curl_httppost *lastnode = NULL;
  310|       |
  311|    123|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  312|    123|#ifdef HAVE_UINTPTR_T
  313|    123|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  314|       |#else
  315|       |#define form_int_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  316|       |#endif
  317|       |
  318|       |  /*
  319|       |   * We need to allocate the first struct to fill in.
  320|       |   */
  321|    123|  first_form = NewFormInfo();
  322|    123|  if(!first_form)
  ------------------
  |  Branch (322:6): [True: 0, False: 123]
  ------------------
  323|      0|    return CURL_FORMADD_MEMORY;
  324|       |
  325|    123|  curr = first_form;
  326|       |
  327|       |  /*
  328|       |   * Loop through all the options set. Break if we have an error to report.
  329|       |   */
  330|    492|  while(retval == CURL_FORMADD_OK) {
  ------------------
  |  Branch (330:9): [True: 492, False: 0]
  ------------------
  331|       |
  332|       |    /* first see if we have more parts of the array param */
  333|    492|    if(forms) {
  ------------------
  |  Branch (333:8): [True: 0, False: 492]
  ------------------
  334|       |      /* get the upcoming option from the given array */
  335|      0|      option = forms->option;
  336|      0|      avalue = (char *)CURL_UNCONST(forms->value);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  337|       |
  338|      0|      forms++; /* advance this to next entry */
  339|      0|      if(CURLFORM_END == option) {
  ------------------
  |  Branch (339:10): [True: 0, False: 0]
  ------------------
  340|       |        /* end of array state */
  341|      0|        forms = NULL;
  342|      0|        continue;
  343|      0|      }
  344|      0|    }
  345|    492|    else {
  346|       |      /* This is not array-state, get next option. This gets an 'int' with
  347|       |         va_arg() because CURLformoption might be a smaller type than int and
  348|       |         might cause compiler warnings and wrong behavior. */
  349|    492|      option = (CURLformoption)va_arg(params, int);
  350|    492|      if(CURLFORM_END == option)
  ------------------
  |  Branch (350:10): [True: 123, False: 369]
  ------------------
  351|    123|        break;
  352|    492|    }
  353|       |
  354|    369|    switch(option) {
  355|      0|    case CURLFORM_ARRAY:
  ------------------
  |  Branch (355:5): [True: 0, False: 369]
  ------------------
  356|      0|      if(forms)
  ------------------
  |  Branch (356:10): [True: 0, False: 0]
  ------------------
  357|       |        /* we do not support an array from within an array */
  358|      0|        retval = CURL_FORMADD_ILLEGAL_ARRAY;
  359|      0|      else {
  360|      0|        forms = va_arg(params, struct curl_forms *);
  361|      0|        if(!forms)
  ------------------
  |  Branch (361:12): [True: 0, False: 0]
  ------------------
  362|      0|          retval = CURL_FORMADD_NULL;
  363|      0|      }
  364|      0|      break;
  365|       |
  366|       |      /*
  367|       |       * Set the Name property.
  368|       |       */
  369|      0|    case CURLFORM_PTRNAME:
  ------------------
  |  Branch (369:5): [True: 0, False: 369]
  ------------------
  370|      0|      curr->flags |= HTTPPOST_PTRNAME;
  ------------------
  |  |   39|      0|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|      0|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  371|      0|      FALLTHROUGH();
  ------------------
  |  |  821|      0|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  372|    123|    case CURLFORM_COPYNAME:
  ------------------
  |  Branch (372:5): [True: 123, False: 246]
  ------------------
  373|    123|      if(Curl_bufref_ptr(&curr->name))
  ------------------
  |  Branch (373:10): [True: 0, False: 123]
  ------------------
  374|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  375|    123|      else {
  376|    123|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|    123|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 123]
  |  |  ------------------
  ------------------
  377|    123|        if(avalue)
  ------------------
  |  Branch (377:12): [True: 123, False: 0]
  ------------------
  378|    123|          Curl_bufref_set(&curr->name, avalue, 0, NULL); /* No copy yet. */
  379|      0|        else
  380|      0|          retval = CURL_FORMADD_NULL;
  381|    123|      }
  382|    123|      break;
  383|      0|    case CURLFORM_NAMELENGTH:
  ------------------
  |  Branch (383:5): [True: 0, False: 369]
  ------------------
  384|      0|      if(curr->namelength)
  ------------------
  |  Branch (384:10): [True: 0, False: 0]
  ------------------
  385|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  386|      0|      else
  387|      0|        curr->namelength = (size_t)form_int_arg(long);
  ------------------
  |  |  313|      0|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  388|      0|      break;
  389|       |
  390|       |      /*
  391|       |       * Set the contents property.
  392|       |       */
  393|    123|    case CURLFORM_PTRCONTENTS:
  ------------------
  |  Branch (393:5): [True: 123, False: 246]
  ------------------
  394|    123|      curr->flags |= HTTPPOST_PTRCONTENTS;
  ------------------
  |  |   41|    123|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|    123|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  395|    123|      FALLTHROUGH();
  ------------------
  |  |  821|    123|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  396|    123|    case CURLFORM_COPYCONTENTS:
  ------------------
  |  Branch (396:5): [True: 0, False: 369]
  ------------------
  397|    123|      if(Curl_bufref_ptr(&curr->value))
  ------------------
  |  Branch (397:10): [True: 0, False: 123]
  ------------------
  398|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  399|    123|      else {
  400|    123|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|    123|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 123]
  |  |  ------------------
  ------------------
  401|    123|        if(avalue)
  ------------------
  |  Branch (401:12): [True: 123, False: 0]
  ------------------
  402|    123|          Curl_bufref_set(&curr->value, avalue, 0, NULL); /* No copy yet. */
  403|      0|        else
  404|      0|          retval = CURL_FORMADD_NULL;
  405|    123|      }
  406|    123|      break;
  407|      0|    case CURLFORM_CONTENTSLENGTH:
  ------------------
  |  Branch (407:5): [True: 0, False: 369]
  ------------------
  408|      0|      curr->contentslength = (curl_off_t)(size_t)form_int_arg(long);
  ------------------
  |  |  313|      0|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  409|      0|      break;
  410|       |
  411|    123|    case CURLFORM_CONTENTLEN:
  ------------------
  |  Branch (411:5): [True: 123, False: 246]
  ------------------
  412|    123|      curr->flags |= CURL_HTTPPOST_LARGE;
  ------------------
  |  |  220|    123|#define CURL_HTTPPOST_LARGE (1 << 7)
  ------------------
  413|    123|      curr->contentslength = form_int_arg(curl_off_t);
  ------------------
  |  |  313|    123|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 123]
  |  |  ------------------
  ------------------
  414|    123|      break;
  415|       |
  416|       |      /* Get contents from a given filename */
  417|      0|    case CURLFORM_FILECONTENT:
  ------------------
  |  Branch (417:5): [True: 0, False: 369]
  ------------------
  418|      0|      if(curr->flags & (HTTPPOST_PTRCONTENTS | HTTPPOST_READFILE))
  ------------------
  |  |   41|      0|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|      0|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                    if(curr->flags & (HTTPPOST_PTRCONTENTS | HTTPPOST_READFILE))
  ------------------
  |  |   42|      0|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|      0|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  ------------------
  419|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  420|      0|      else {
  421|      0|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  422|      0|        if(avalue) {
  ------------------
  |  Branch (422:12): [True: 0, False: 0]
  ------------------
  423|      0|          if(Curl_bufref_memdup0(&curr->value, avalue, strlen(avalue)))
  ------------------
  |  Branch (423:14): [True: 0, False: 0]
  ------------------
  424|      0|            retval = CURL_FORMADD_MEMORY;
  425|      0|          else
  426|      0|            curr->flags |= HTTPPOST_READFILE;
  ------------------
  |  |   42|      0|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|      0|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  427|      0|        }
  428|      0|        else
  429|      0|          retval = CURL_FORMADD_NULL;
  430|      0|      }
  431|      0|      break;
  432|       |
  433|       |      /* We upload a file */
  434|      0|    case CURLFORM_FILE:
  ------------------
  |  Branch (434:5): [True: 0, False: 369]
  ------------------
  435|      0|      avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  436|      0|      if(Curl_bufref_ptr(&curr->value)) {
  ------------------
  |  Branch (436:10): [True: 0, False: 0]
  ------------------
  437|      0|        if(curr->flags & HTTPPOST_FILENAME) {
  ------------------
  |  |   40|      0|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      0|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (437:12): [True: 0, False: 0]
  ------------------
  438|      0|          if(avalue) {
  ------------------
  |  Branch (438:14): [True: 0, False: 0]
  ------------------
  439|      0|            form = NewFormInfo();
  440|      0|            if(!form ||
  ------------------
  |  Branch (440:16): [True: 0, False: 0]
  ------------------
  441|      0|               Curl_bufref_memdup0(&form->value, avalue, strlen(avalue))) {
  ------------------
  |  Branch (441:16): [True: 0, False: 0]
  ------------------
  442|      0|              curlx_free(form);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  443|      0|              retval = CURL_FORMADD_MEMORY;
  444|      0|            }
  445|      0|            else {
  446|      0|              AddFormInfo(form, curr);
  447|      0|              curr = form;
  448|      0|              form = NULL;
  449|      0|            }
  450|      0|          }
  451|      0|          else
  452|      0|            retval = CURL_FORMADD_NULL;
  453|      0|        }
  454|      0|        else
  455|      0|          retval = CURL_FORMADD_OPTION_TWICE;
  456|      0|      }
  457|      0|      else {
  458|      0|        if(avalue) {
  ------------------
  |  Branch (458:12): [True: 0, False: 0]
  ------------------
  459|      0|          if(Curl_bufref_memdup0(&curr->value, avalue, strlen(avalue)))
  ------------------
  |  Branch (459:14): [True: 0, False: 0]
  ------------------
  460|      0|            retval = CURL_FORMADD_MEMORY;
  461|      0|          else
  462|      0|            curr->flags |= HTTPPOST_FILENAME;
  ------------------
  |  |   40|      0|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      0|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  463|      0|        }
  464|      0|        else
  465|      0|          retval = CURL_FORMADD_NULL;
  466|      0|      }
  467|      0|      break;
  468|       |
  469|      0|    case CURLFORM_BUFFERPTR:
  ------------------
  |  Branch (469:5): [True: 0, False: 369]
  ------------------
  470|      0|      curr->flags |= HTTPPOST_PTRBUFFER | HTTPPOST_BUFFER;
  ------------------
  |  |   43|      0|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|      0|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
                    curr->flags |= HTTPPOST_PTRBUFFER | HTTPPOST_BUFFER;
  ------------------
  |  |   45|      0|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|      0|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  471|      0|      if(curr->buffer)
  ------------------
  |  Branch (471:10): [True: 0, False: 0]
  ------------------
  472|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  473|      0|      else {
  474|      0|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  475|      0|        if(avalue) {
  ------------------
  |  Branch (475:12): [True: 0, False: 0]
  ------------------
  476|      0|          curr->buffer = avalue; /* store for the moment */
  477|       |          /* Make value non-NULL to be accepted as fine */
  478|      0|          Curl_bufref_set(&curr->value, avalue, 0, NULL);
  479|      0|        }
  480|      0|        else
  481|      0|          retval = CURL_FORMADD_NULL;
  482|      0|      }
  483|      0|      break;
  484|       |
  485|      0|    case CURLFORM_BUFFERLENGTH:
  ------------------
  |  Branch (485:5): [True: 0, False: 369]
  ------------------
  486|      0|      if(curr->bufferlength)
  ------------------
  |  Branch (486:10): [True: 0, False: 0]
  ------------------
  487|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  488|      0|      else
  489|      0|        curr->bufferlength = (size_t)form_int_arg(long);
  ------------------
  |  |  313|      0|#define form_int_arg(t) (forms ? (t)(uintptr_t)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (313:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  490|      0|      break;
  491|       |
  492|      0|    case CURLFORM_STREAM:
  ------------------
  |  Branch (492:5): [True: 0, False: 369]
  ------------------
  493|      0|      curr->flags |= HTTPPOST_CALLBACK;
  ------------------
  |  |   44|      0|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|      0|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  494|      0|      if(curr->userp)
  ------------------
  |  Branch (494:10): [True: 0, False: 0]
  ------------------
  495|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  496|      0|      else {
  497|      0|        avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  498|      0|        if(avalue) {
  ------------------
  |  Branch (498:12): [True: 0, False: 0]
  ------------------
  499|      0|          curr->userp = avalue;
  500|       |          /* The following line is not strictly true but we derive a value
  501|       |             from this later on and we need this non-NULL to be accepted as
  502|       |             a fine form part */
  503|      0|          Curl_bufref_set(&curr->value, avalue, 0, NULL);
  504|      0|        }
  505|      0|        else
  506|      0|          retval = CURL_FORMADD_NULL;
  507|      0|      }
  508|      0|      break;
  509|       |
  510|      0|    case CURLFORM_CONTENTTYPE:
  ------------------
  |  Branch (510:5): [True: 0, False: 369]
  ------------------
  511|      0|      avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  512|      0|      if(Curl_bufref_ptr(&curr->contenttype)) {
  ------------------
  |  Branch (512:10): [True: 0, False: 0]
  ------------------
  513|      0|        if(curr->flags & HTTPPOST_FILENAME) {
  ------------------
  |  |   40|      0|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|      0|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (513:12): [True: 0, False: 0]
  ------------------
  514|      0|          if(avalue) {
  ------------------
  |  Branch (514:14): [True: 0, False: 0]
  ------------------
  515|      0|            form = NewFormInfo();
  516|      0|            if(!form || Curl_bufref_memdup0(&form->contenttype, avalue,
  ------------------
  |  Branch (516:16): [True: 0, False: 0]
  |  Branch (516:25): [True: 0, False: 0]
  ------------------
  517|      0|                                            strlen(avalue))) {
  518|      0|              curlx_free(form);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  519|      0|              retval = CURL_FORMADD_MEMORY;
  520|      0|            }
  521|      0|            else {
  522|      0|              AddFormInfo(form, curr);
  523|      0|              curr = form;
  524|      0|              form = NULL;
  525|      0|            }
  526|      0|          }
  527|      0|          else
  528|      0|            retval = CURL_FORMADD_NULL;
  529|      0|        }
  530|      0|        else
  531|      0|          retval = CURL_FORMADD_OPTION_TWICE;
  532|      0|      }
  533|      0|      else if(avalue) {
  ------------------
  |  Branch (533:15): [True: 0, False: 0]
  ------------------
  534|      0|        if(Curl_bufref_memdup0(&curr->contenttype, avalue, strlen(avalue)))
  ------------------
  |  Branch (534:12): [True: 0, False: 0]
  ------------------
  535|      0|          retval = CURL_FORMADD_MEMORY;
  536|      0|      }
  537|      0|      else
  538|      0|        retval = CURL_FORMADD_NULL;
  539|      0|      break;
  540|       |
  541|      0|    case CURLFORM_CONTENTHEADER: {
  ------------------
  |  Branch (541:5): [True: 0, False: 369]
  ------------------
  542|       |      /* this "cast increases required alignment of target type" but
  543|       |         we consider it OK anyway */
  544|      0|      struct curl_slist *list = form_ptr_arg(struct curl_slist *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  545|       |
  546|      0|      if(curr->contentheader)
  ------------------
  |  Branch (546:10): [True: 0, False: 0]
  ------------------
  547|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  548|      0|      else
  549|      0|        curr->contentheader = list;
  550|       |
  551|      0|      break;
  552|    123|    }
  553|      0|    case CURLFORM_FILENAME:
  ------------------
  |  Branch (553:5): [True: 0, False: 369]
  ------------------
  554|      0|    case CURLFORM_BUFFER:
  ------------------
  |  Branch (554:5): [True: 0, False: 369]
  ------------------
  555|      0|      avalue = form_ptr_arg(char *);
  ------------------
  |  |  311|      0|#define form_ptr_arg(t) (forms ? (t)(void *)avalue : va_arg(params, t))
  |  |  ------------------
  |  |  |  Branch (311:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  556|      0|      if(Curl_bufref_ptr(&curr->showfilename))
  ------------------
  |  Branch (556:10): [True: 0, False: 0]
  ------------------
  557|      0|        retval = CURL_FORMADD_OPTION_TWICE;
  558|      0|      else if(Curl_bufref_memdup0(&curr->showfilename, avalue, strlen(avalue)))
  ------------------
  |  Branch (558:15): [True: 0, False: 0]
  ------------------
  559|      0|        retval = CURL_FORMADD_MEMORY;
  560|      0|      break;
  561|       |
  562|      0|    default:
  ------------------
  |  Branch (562:5): [True: 0, False: 369]
  ------------------
  563|      0|      retval = CURL_FORMADD_UNKNOWN_OPTION;
  564|      0|      break;
  565|    369|    }
  566|    369|  }
  567|       |
  568|    123|  if(!retval)
  ------------------
  |  Branch (568:6): [True: 123, False: 0]
  ------------------
  569|    123|    retval = FormAddCheck(first_form, &newchain, &lastnode);
  570|       |
  571|    123|  if(retval)
  ------------------
  |  Branch (571:6): [True: 0, False: 123]
  ------------------
  572|       |    /* On error, free allocated fields for all nodes of the FormInfo linked
  573|       |       list without deallocating nodes. List nodes are deallocated later on */
  574|      0|    free_formlist(first_form);
  575|       |
  576|       |  /* Always deallocate FormInfo linked list nodes without touching node
  577|       |     fields given that these have either been deallocated or are owned
  578|       |     now by the httppost linked list */
  579|    246|  while(first_form) {
  ------------------
  |  Branch (579:9): [True: 123, False: 123]
  ------------------
  580|    123|    struct FormInfo *ptr = first_form->more;
  581|    123|    curlx_free(first_form);
  ------------------
  |  | 1483|    123|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  582|    123|    first_form = ptr;
  583|    123|  }
  584|       |
  585|    123|  if(!retval) {
  ------------------
  |  Branch (585:6): [True: 123, False: 0]
  ------------------
  586|       |    /* Only if all is fine, link the new chain into the provided list */
  587|    123|    if(*last_post)
  ------------------
  |  Branch (587:8): [True: 0, False: 123]
  ------------------
  588|      0|      (*last_post)->next = newchain;
  589|    123|    else
  590|    123|      (*httppost) = newchain;
  591|       |
  592|    123|    (*last_post) = lastnode;
  593|    123|  }
  594|      0|  else
  595|      0|    free_chain(newchain);
  596|       |
  597|    123|  return retval;
  598|    123|#undef form_ptr_arg
  599|    123|#undef form_int_arg
  600|    123|}
formdata.c:NewFormInfo:
  107|    123|{
  108|    123|  struct FormInfo *form_info = curlx_calloc(1, sizeof(struct FormInfo));
  ------------------
  |  | 1480|    123|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  109|       |
  110|    123|  if(form_info) {
  ------------------
  |  Branch (110:6): [True: 123, False: 0]
  ------------------
  111|    123|    Curl_bufref_init(&form_info->name);
  112|    123|    Curl_bufref_init(&form_info->value);
  113|    123|    Curl_bufref_init(&form_info->contenttype);
  114|    123|    Curl_bufref_init(&form_info->showfilename);
  115|    123|  }
  116|       |
  117|    123|  return form_info;
  118|    123|}
formdata.c:FormAddCheck:
  218|    123|{
  219|    123|  const char *prevtype = NULL;
  220|    123|  struct FormInfo *form = NULL;
  221|    123|  struct curl_httppost *post = NULL;
  222|       |
  223|       |  /* go through the list, check for completeness and if everything is
  224|       |   * alright add the HttpPost item otherwise set retval accordingly */
  225|       |
  226|    246|  for(form = first_form; form != NULL; form = form->more) {
  ------------------
  |  Branch (226:26): [True: 123, False: 123]
  ------------------
  227|    123|    const char *name = Curl_bufref_ptr(&form->name);
  228|       |
  229|    123|    if(((!name || !Curl_bufref_ptr(&form->value)) && !post) ||
  ------------------
  |  Branch (229:10): [True: 0, False: 123]
  |  Branch (229:19): [True: 0, False: 123]
  |  Branch (229:54): [True: 0, False: 0]
  ------------------
  230|    123|       (form->contentslength &&
  ------------------
  |  Branch (230:9): [True: 83, False: 40]
  ------------------
  231|     83|        (form->flags & HTTPPOST_FILENAME)) ||
  ------------------
  |  |   40|     83|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|     83|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 83]
  ------------------
  232|    123|       ((form->flags & HTTPPOST_FILENAME) &&
  ------------------
  |  |   40|    123|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|    123|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (232:9): [True: 0, False: 123]
  ------------------
  233|      0|        (form->flags & HTTPPOST_PTRCONTENTS)) ||
  ------------------
  |  |   41|      0|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|      0|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  |  Branch (233:9): [True: 0, False: 0]
  ------------------
  234|       |
  235|    123|       (!form->buffer &&
  ------------------
  |  Branch (235:9): [True: 123, False: 0]
  ------------------
  236|    123|        (form->flags & HTTPPOST_BUFFER) &&
  ------------------
  |  |   45|    123|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|    123|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (236:9): [True: 0, False: 123]
  ------------------
  237|      0|        (form->flags & HTTPPOST_PTRBUFFER)) ||
  ------------------
  |  |   43|      0|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|      0|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
  |  Branch (237:9): [True: 0, False: 0]
  ------------------
  238|       |
  239|    123|       ((form->flags & HTTPPOST_READFILE) &&
  ------------------
  |  |   42|    123|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|    123|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (239:9): [True: 0, False: 123]
  ------------------
  240|      0|        (form->flags & HTTPPOST_PTRCONTENTS))
  ------------------
  |  |   41|      0|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|      0|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
  |  Branch (240:9): [True: 0, False: 0]
  ------------------
  241|    123|      ) {
  242|      0|      return CURL_FORMADD_INCOMPLETE;
  243|      0|    }
  244|    123|    if(((form->flags & HTTPPOST_FILENAME) ||
  ------------------
  |  |   40|    123|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|    123|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
  |  Branch (244:9): [True: 0, False: 123]
  ------------------
  245|    123|        (form->flags & HTTPPOST_BUFFER)) &&
  ------------------
  |  |   45|    123|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|    123|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (245:9): [True: 0, False: 123]
  ------------------
  246|      0|       !Curl_bufref_ptr(&form->contenttype)) {
  ------------------
  |  Branch (246:8): [True: 0, False: 0]
  ------------------
  247|      0|      const char *f = Curl_bufref_ptr((form->flags & HTTPPOST_BUFFER) ?
  ------------------
  |  |   45|      0|#define HTTPPOST_BUFFER      CURL_HTTPPOST_BUFFER
  |  |  ------------------
  |  |  |  |  213|      0|#define CURL_HTTPPOST_BUFFER (1 << 4)
  |  |  ------------------
  ------------------
  |  Branch (247:39): [True: 0, False: 0]
  ------------------
  248|      0|                                      &form->showfilename : &form->value);
  249|      0|      const char *type = Curl_mime_contenttype(f);
  250|      0|      if(!type)
  ------------------
  |  Branch (250:10): [True: 0, False: 0]
  ------------------
  251|      0|        type = prevtype;
  252|      0|      if(!type)
  ------------------
  |  Branch (252:10): [True: 0, False: 0]
  ------------------
  253|      0|        type = FILE_CONTENTTYPE_DEFAULT;
  ------------------
  |  |   38|      0|#define FILE_CONTENTTYPE_DEFAULT        "application/octet-stream"
  ------------------
  254|       |
  255|       |      /* our contenttype is missing */
  256|      0|      if(Curl_bufref_memdup0(&form->contenttype, type, strlen(type)))
  ------------------
  |  Branch (256:10): [True: 0, False: 0]
  ------------------
  257|      0|        return CURL_FORMADD_MEMORY;
  258|      0|    }
  259|    123|    if(name && form->namelength) {
  ------------------
  |  Branch (259:8): [True: 123, False: 0]
  |  Branch (259:16): [True: 0, False: 123]
  ------------------
  260|      0|      if(memchr(name, 0, form->namelength))
  ------------------
  |  Branch (260:10): [True: 0, False: 0]
  ------------------
  261|      0|        return CURL_FORMADD_NULL;
  262|      0|    }
  263|    123|    if(!(form->flags & HTTPPOST_PTRNAME)) {
  ------------------
  |  |   39|    123|#define HTTPPOST_PTRNAME     CURL_HTTPPOST_PTRNAME
  |  |  ------------------
  |  |  |  |  209|    123|#define CURL_HTTPPOST_PTRNAME (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (263:8): [True: 123, False: 0]
  ------------------
  264|       |      /* Note that there is small risk that form->name is NULL here if the app
  265|       |         passed in a bad combo, so we check for that. */
  266|    123|      if(FormInfoCopyField(&form->name, form->namelength))
  ------------------
  |  Branch (266:10): [True: 0, False: 123]
  ------------------
  267|      0|        return CURL_FORMADD_MEMORY;
  268|    123|    }
  269|    123|    if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
  ------------------
  |  |   40|    123|#define HTTPPOST_FILENAME    CURL_HTTPPOST_FILENAME
  |  |  ------------------
  |  |  |  |  205|    123|#define CURL_HTTPPOST_FILENAME (1 << 0)
  |  |  ------------------
  ------------------
                  if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE |
  ------------------
  |  |   42|    123|#define HTTPPOST_READFILE    CURL_HTTPPOST_READFILE
  |  |  ------------------
  |  |  |  |  207|    123|#define CURL_HTTPPOST_READFILE (1 << 1)
  |  |  ------------------
  ------------------
  |  Branch (269:8): [True: 0, False: 123]
  ------------------
  270|    123|                        HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
  ------------------
  |  |   41|    123|#define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS
  |  |  ------------------
  |  |  |  |  211|    123|#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
  |  |  ------------------
  ------------------
                                      HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
  ------------------
  |  |   43|    123|#define HTTPPOST_PTRBUFFER   CURL_HTTPPOST_PTRBUFFER
  |  |  ------------------
  |  |  |  |  215|    123|#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
  |  |  ------------------
  ------------------
  271|    123|                        HTTPPOST_CALLBACK))) {
  ------------------
  |  |   44|    123|#define HTTPPOST_CALLBACK    CURL_HTTPPOST_CALLBACK
  |  |  ------------------
  |  |  |  |  218|    123|#define CURL_HTTPPOST_CALLBACK (1 << 6)
  |  |  ------------------
  ------------------
  272|      0|      if(FormInfoCopyField(&form->value, (size_t)form->contentslength))
  ------------------
  |  Branch (272:10): [True: 0, False: 0]
  ------------------
  273|      0|        return CURL_FORMADD_MEMORY;
  274|      0|    }
  275|    123|    post = AddHttpPost(form, post, httppost, last_post);
  276|       |
  277|    123|    if(!post)
  ------------------
  |  Branch (277:8): [True: 0, False: 123]
  ------------------
  278|      0|      return CURL_FORMADD_MEMORY;
  279|       |
  280|    123|    if(Curl_bufref_ptr(&form->contenttype))
  ------------------
  |  Branch (280:8): [True: 0, False: 123]
  ------------------
  281|      0|      prevtype = Curl_bufref_ptr(&form->contenttype);
  282|    123|  }
  283|       |
  284|    123|  return CURL_FORMADD_OK;
  285|    123|}
formdata.c:FormInfoCopyField:
  122|    123|{
  123|    123|  const char *value = Curl_bufref_ptr(field);
  124|    123|  CURLcode result = CURLE_OK;
  125|       |
  126|    123|  if(value) {
  ------------------
  |  Branch (126:6): [True: 123, False: 0]
  ------------------
  127|    123|    if(!len)
  ------------------
  |  Branch (127:8): [True: 123, False: 0]
  ------------------
  128|    123|      len = strlen(value);
  129|    123|    result = Curl_bufref_memdup0(field, value, len);
  130|    123|  }
  131|       |
  132|    123|  return result;
  133|    123|}
formdata.c:AddHttpPost:
   61|    123|{
   62|    123|  struct curl_httppost *post;
   63|    123|  size_t namelength = src->namelength;
   64|    123|  if(!namelength && Curl_bufref_ptr(&src->name))
  ------------------
  |  Branch (64:6): [True: 123, False: 0]
  |  Branch (64:21): [True: 123, False: 0]
  ------------------
   65|    123|    namelength = strlen(Curl_bufref_ptr(&src->name));
   66|    123|  if((src->bufferlength > LONG_MAX) || (namelength > LONG_MAX))
  ------------------
  |  Branch (66:6): [True: 0, False: 123]
  |  Branch (66:40): [True: 0, False: 123]
  ------------------
   67|       |    /* avoid overflow in typecasts below */
   68|      0|    return NULL;
   69|    123|  post = curlx_calloc(1, sizeof(struct curl_httppost));
  ------------------
  |  | 1480|    123|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   70|    123|  if(post) {
  ------------------
  |  Branch (70:6): [True: 123, False: 0]
  ------------------
   71|    123|    post->name = CURL_UNCONST(Curl_bufref_ptr(&src->name));
  ------------------
  |  |  866|    123|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   72|    123|    post->namelength = (long)namelength;
   73|    123|    post->contents = CURL_UNCONST(Curl_bufref_ptr(&src->value));
  ------------------
  |  |  866|    123|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   74|    123|    post->contentlen = src->contentslength;
   75|    123|    post->buffer = src->buffer;
   76|    123|    post->bufferlength = (long)src->bufferlength;
   77|    123|    post->contenttype = CURL_UNCONST(Curl_bufref_ptr(&src->contenttype));
  ------------------
  |  |  866|    123|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   78|    123|    post->flags = src->flags | CURL_HTTPPOST_LARGE;
  ------------------
  |  |  220|    123|#define CURL_HTTPPOST_LARGE (1 << 7)
  ------------------
   79|    123|    post->contentheader = src->contentheader;
   80|    123|    post->showfilename = CURL_UNCONST(Curl_bufref_ptr(&src->showfilename));
  ------------------
  |  |  866|    123|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   81|    123|    post->userp = src->userp;
   82|    123|  }
   83|      0|  else
   84|      0|    return NULL;
   85|       |
   86|    123|  if(parent_post) {
  ------------------
  |  Branch (86:6): [True: 0, False: 123]
  ------------------
   87|       |    /* now, point our 'more' to the original 'more' */
   88|      0|    post->more = parent_post->more;
   89|       |
   90|       |    /* then move the original 'more' to point to ourselves */
   91|      0|    parent_post->more = post;
   92|      0|  }
   93|    123|  else {
   94|       |    /* make the previous point to this */
   95|    123|    if(*last_post)
  ------------------
  |  Branch (95:8): [True: 0, False: 123]
  ------------------
   96|      0|      (*last_post)->next = post;
   97|    123|    else
   98|    123|      (*httppost) = post;
   99|       |
  100|    123|    (*last_post) = post;
  101|    123|  }
  102|    123|  return post;
  103|    123|}

Curl_wildcard_init:
  183|      4|{
  184|      4|  Curl_llist_init(&wc->filelist, fileinfo_dtor);
  185|      4|  wc->state = CURLWC_INIT;
  186|      4|}
Curl_wildcard_dtor:
  189|  49.3k|{
  190|  49.3k|  struct WildcardData *wc = *wcp;
  191|  49.3k|  if(!wc)
  ------------------
  |  Branch (191:6): [True: 49.3k, False: 4]
  ------------------
  192|  49.3k|    return;
  193|       |
  194|      4|  if(wc->dtor) {
  ------------------
  |  Branch (194:6): [True: 0, False: 4]
  ------------------
  195|      0|    wc->dtor(wc->ftpwc);
  196|      0|    wc->dtor = ZERO_NULL;
  ------------------
  |  | 1155|      0|#define ZERO_NULL 0
  ------------------
  197|      0|    wc->ftpwc = NULL;
  198|      0|  }
  199|      4|  DEBUGASSERT(wc->ftpwc == NULL);
  ------------------
  |  | 1081|      4|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (199:3): [True: 0, False: 4]
  |  Branch (199:3): [True: 4, False: 0]
  ------------------
  200|       |
  201|      4|  Curl_llist_destroy(&wc->filelist, NULL);
  202|      4|  curlx_safefree(wc->path);
  ------------------
  |  | 1327|      4|  do {                      \
  |  | 1328|      4|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      4|    (ptr) = NULL;           \
  |  | 1330|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  203|      4|  curlx_safefree(wc->pattern);
  ------------------
  |  | 1327|      4|  do {                      \
  |  | 1328|      4|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      4|    (ptr) = NULL;           \
  |  | 1330|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  204|      4|  wc->state = CURLWC_INIT;
  205|      4|  curlx_free(wc);
  ------------------
  |  | 1483|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  206|       |  *wcp = NULL;
  207|      4|}

curl_getenv:
   27|  81.8k|{
   28|       |#if defined(CURL_WINDOWS_UWP) || \
   29|       |  defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
   30|       |  (void)variable;
   31|       |  return NULL;
   32|       |#elif defined(_WIN32)
   33|       |  /* This uses Windows API instead of C runtime getenv() to get the environment
   34|       |     variable since some changes are not always visible to the latter. #4774 */
   35|       |  char *buf = NULL;
   36|       |  char *tmp;
   37|       |  DWORD bufsize;
   38|       |  DWORD rc = 1;
   39|       |  const DWORD max = 32768; /* max env var size from MSCRT source */
   40|       |
   41|       |  for(;;) {
   42|       |    tmp = curlx_realloc(buf, rc);
   43|       |    if(!tmp) {
   44|       |      curlx_free(buf);
   45|       |      return NULL;
   46|       |    }
   47|       |
   48|       |    buf = tmp;
   49|       |    bufsize = rc;
   50|       |
   51|       |    /* it is possible for rc to be 0 if the variable was found but empty.
   52|       |       Since getenv does not make that distinction we ignore it as well. */
   53|       |    rc = GetEnvironmentVariableA(variable, buf, bufsize);
   54|       |    if(!rc || rc == bufsize || rc > max) {
   55|       |      curlx_free(buf);
   56|       |      return NULL;
   57|       |    }
   58|       |
   59|       |    /* if rc < bufsize then rc is bytes written not including null */
   60|       |    if(rc < bufsize)
   61|       |      return buf;
   62|       |
   63|       |    /* else rc is bytes needed, try again */
   64|       |  }
   65|       |#else
   66|  81.8k|  char *env = getenv(variable);
   67|  81.8k|  return (env && env[0]) ? curlx_strdup(env) : NULL;
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  |  Branch (67:11): [True: 0, False: 81.8k]
  |  Branch (67:18): [True: 0, False: 0]
  ------------------
   68|  81.8k|#endif
   69|  81.8k|}

Curl_initinfo:
   42|  45.6k|{
   43|  45.6k|  struct Progress *pro = &data->progress;
   44|  45.6k|  struct PureInfo *info = &data->info;
   45|       |
   46|  45.6k|  pro->t_nslookup = 0;
   47|  45.6k|  pro->t_connect = 0;
   48|  45.6k|  pro->t_appconnect = 0;
   49|  45.6k|  pro->t_pretransfer = 0;
   50|  45.6k|  pro->t_posttransfer = 0;
   51|  45.6k|  pro->t_starttransfer = 0;
   52|  45.6k|  pro->timespent = 0;
   53|  45.6k|  pro->t_redirect = 0;
   54|  45.6k|  pro->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1058|  45.6k|#define FALSE false
  ------------------
   55|       |
   56|  45.6k|  info->httpcode = 0;
   57|  45.6k|  info->httpproxycode = 0;
   58|  45.6k|  info->httpversion = 0;
   59|  45.6k|  info->filetime = -1; /* -1 is an illegal time and thus means unknown */
   60|  45.6k|  info->timecond = FALSE;
  ------------------
  |  | 1058|  45.6k|#define FALSE false
  ------------------
   61|       |
   62|  45.6k|  info->header_size = 0;
   63|  45.6k|  info->request_size = 0;
   64|  45.6k|  info->proxyauthavail = 0;
   65|  45.6k|  info->httpauthavail = 0;
   66|  45.6k|  info->proxyauthpicked = 0;
   67|  45.6k|  info->httpauthpicked = 0;
   68|  45.6k|  info->numconnects = 0;
   69|       |
   70|  45.6k|  curlx_safefree(info->contenttype);
  ------------------
  |  | 1327|  45.6k|  do {                      \
  |  | 1328|  45.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  45.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  45.6k|    (ptr) = NULL;           \
  |  | 1330|  45.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 45.6k]
  |  |  ------------------
  ------------------
   71|  45.6k|  curlx_safefree(info->wouldredirect);
  ------------------
  |  | 1327|  45.6k|  do {                      \
  |  | 1328|  45.6k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  45.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  45.6k|    (ptr) = NULL;           \
  |  | 1330|  45.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 45.6k]
  |  |  ------------------
  ------------------
   72|       |
   73|  45.6k|  memset(&info->primary, 0, sizeof(info->primary));
   74|  45.6k|  info->retry_after = 0;
   75|       |
   76|  45.6k|  info->conn_scheme = 0;
   77|  45.6k|  info->conn_protocol = 0;
   78|  45.6k|  info->used_proxy = 0;
   79|       |
   80|  45.6k|#ifdef USE_SSL
   81|  45.6k|  Curl_ssl_free_certinfo(data);
   82|  45.6k|#endif
   83|  45.6k|}

Curl_hash_init:
   82|   117k|{
   83|   117k|  DEBUGASSERT(h);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (83:3): [True: 0, False: 117k]
  |  Branch (83:3): [True: 117k, False: 0]
  ------------------
   84|   117k|  DEBUGASSERT(slots);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (84:3): [True: 0, False: 117k]
  |  Branch (84:3): [True: 117k, False: 0]
  ------------------
   85|   117k|  DEBUGASSERT(hfunc);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (85:3): [True: 0, False: 117k]
  |  Branch (85:3): [True: 117k, False: 0]
  ------------------
   86|   117k|  DEBUGASSERT(comparator);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (86:3): [True: 0, False: 117k]
  |  Branch (86:3): [True: 117k, False: 0]
  ------------------
   87|   117k|  DEBUGASSERT(dtor);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (87:3): [True: 0, False: 117k]
  |  Branch (87:3): [True: 117k, False: 0]
  ------------------
   88|       |
   89|   117k|  h->table = NULL;
   90|   117k|  h->hash_func = hfunc;
   91|   117k|  h->comp_func = comparator;
   92|   117k|  h->dtor = dtor;
   93|   117k|  h->size = 0;
   94|   117k|  h->slots = slots;
   95|   117k|#ifdef DEBUGBUILD
   96|   117k|  h->init = HASHINIT;
  ------------------
  |  |   30|   117k|#define HASHINIT 0x7017e781
  ------------------
   97|   117k|#endif
   98|   117k|}
Curl_hash_add2:
  163|  63.7k|{
  164|  63.7k|  struct Curl_hash_element *he, **slot;
  165|       |
  166|  63.7k|  DEBUGASSERT(h);
  ------------------
  |  | 1081|  63.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 63.7k]
  |  Branch (166:3): [True: 63.7k, False: 0]
  ------------------
  167|  63.7k|  DEBUGASSERT(h->slots);
  ------------------
  |  | 1081|  63.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (167:3): [True: 0, False: 63.7k]
  |  Branch (167:3): [True: 63.7k, False: 0]
  ------------------
  168|  63.7k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|  63.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (168:3): [True: 0, False: 63.7k]
  |  Branch (168:3): [True: 63.7k, False: 0]
  ------------------
  169|  63.7k|  if(!h->table) {
  ------------------
  |  Branch (169:6): [True: 52.3k, False: 11.3k]
  ------------------
  170|  52.3k|    h->table = curlx_calloc(h->slots, sizeof(struct Curl_hash_element *));
  ------------------
  |  | 1480|  52.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  171|  52.3k|    if(!h->table)
  ------------------
  |  Branch (171:8): [True: 0, False: 52.3k]
  ------------------
  172|      0|      return NULL; /* OOM */
  173|  52.3k|  }
  174|       |
  175|  63.7k|  slot = CURL_HASH_SLOT_ADDR(h, key, key_len);
  ------------------
  |  |  159|  63.7k|#define CURL_HASH_SLOT_ADDR(x, y, z) &CURL_HASH_SLOT(x, y, z)
  |  |  ------------------
  |  |  |  |  158|  63.7k|#define CURL_HASH_SLOT(x, y, z)      x->table[(x)->hash_func(y, z, (x)->slots)]
  |  |  ------------------
  ------------------
  176|  63.7k|  for(he = *slot; he; he = he->next) {
  ------------------
  |  Branch (176:19): [True: 10.5k, False: 53.2k]
  ------------------
  177|  10.5k|    if(h->comp_func(he->key, he->key_len, key, key_len)) {
  ------------------
  |  Branch (177:8): [True: 10.4k, False: 27]
  ------------------
  178|       |      /* existing key entry, overwrite by clearing old pointer */
  179|  10.4k|      hash_elem_clear_ptr(h, he);
  180|  10.4k|      he->ptr = p;
  181|  10.4k|      he->dtor = dtor;
  182|  10.4k|      return p;
  183|  10.4k|    }
  184|  10.5k|  }
  185|       |
  186|  53.2k|  he = hash_elem_create(key, key_len, p, dtor);
  187|  53.2k|  if(!he)
  ------------------
  |  Branch (187:6): [True: 0, False: 53.2k]
  ------------------
  188|      0|    return NULL; /* OOM */
  189|       |
  190|  53.2k|  hash_elem_link(h, slot, he);
  191|  53.2k|  return p; /* return the new entry */
  192|  53.2k|}
Curl_hash_add:
  203|  21.2k|{
  204|       |  return Curl_hash_add2(h, key, key_len, p, NULL);
  205|  21.2k|}
Curl_hash_delete:
  213|  38.6k|{
  214|  38.6k|  DEBUGASSERT(h);
  ------------------
  |  | 1081|  38.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (214:3): [True: 0, False: 38.6k]
  |  Branch (214:3): [True: 38.6k, False: 0]
  ------------------
  215|  38.6k|  DEBUGASSERT(h->slots);
  ------------------
  |  | 1081|  38.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (215:3): [True: 0, False: 38.6k]
  |  Branch (215:3): [True: 38.6k, False: 0]
  ------------------
  216|  38.6k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|  38.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 38.6k]
  |  Branch (216:3): [True: 38.6k, False: 0]
  ------------------
  217|  38.6k|  if(h->table) {
  ------------------
  |  Branch (217:6): [True: 33.2k, False: 5.37k]
  ------------------
  218|  33.2k|    struct Curl_hash_element *he, **he_anchor;
  219|       |
  220|  33.2k|    he_anchor = CURL_HASH_SLOT_ADDR(h, key, key_len);
  ------------------
  |  |  159|  33.2k|#define CURL_HASH_SLOT_ADDR(x, y, z) &CURL_HASH_SLOT(x, y, z)
  |  |  ------------------
  |  |  |  |  158|  33.2k|#define CURL_HASH_SLOT(x, y, z)      x->table[(x)->hash_func(y, z, (x)->slots)]
  |  |  ------------------
  ------------------
  221|  33.2k|    while(*he_anchor) {
  ------------------
  |  Branch (221:11): [True: 11.5k, False: 21.7k]
  ------------------
  222|  11.5k|      he = *he_anchor;
  223|  11.5k|      if(h->comp_func(he->key, he->key_len, key, key_len)) {
  ------------------
  |  Branch (223:10): [True: 11.5k, False: 0]
  ------------------
  224|  11.5k|        hash_elem_unlink(h, he_anchor, he);
  225|  11.5k|        hash_elem_destroy(h, he);
  226|  11.5k|        return 0;
  227|  11.5k|      }
  228|      0|      he_anchor = &he->next;
  229|      0|    }
  230|  33.2k|  }
  231|  27.1k|  return 1;
  232|  38.6k|}
Curl_hash_pick:
  239|  2.96M|{
  240|  2.96M|  DEBUGASSERT(h);
  ------------------
  |  | 1081|  2.96M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [True: 0, False: 2.96M]
  |  Branch (240:3): [True: 2.96M, False: 0]
  ------------------
  241|  2.96M|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|  2.96M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 0, False: 2.96M]
  |  Branch (241:3): [True: 2.96M, False: 0]
  ------------------
  242|  2.96M|  if(h->table) {
  ------------------
  |  Branch (242:6): [True: 2.91M, False: 54.6k]
  ------------------
  243|  2.91M|    struct Curl_hash_element *he;
  244|  2.91M|    DEBUGASSERT(h->slots);
  ------------------
  |  | 1081|  2.91M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:5): [True: 0, False: 2.91M]
  |  Branch (244:5): [True: 2.91M, False: 0]
  ------------------
  245|  2.91M|    he = CURL_HASH_SLOT(h, key, key_len);
  ------------------
  |  |  158|  2.91M|#define CURL_HASH_SLOT(x, y, z)      x->table[(x)->hash_func(y, z, (x)->slots)]
  ------------------
  246|  2.95M|    while(he) {
  ------------------
  |  Branch (246:11): [True: 2.25M, False: 702k]
  ------------------
  247|  2.25M|      if(h->comp_func(he->key, he->key_len, key, key_len)) {
  ------------------
  |  Branch (247:10): [True: 2.20M, False: 47.2k]
  ------------------
  248|  2.20M|        return he->ptr;
  249|  2.20M|      }
  250|  47.2k|      he = he->next;
  251|  47.2k|    }
  252|  2.91M|  }
  253|   757k|  return NULL;
  254|  2.96M|}
Curl_hash_destroy:
  264|   117k|{
  265|   117k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (265:3): [True: 0, False: 117k]
  |  Branch (265:3): [True: 117k, False: 0]
  ------------------
  266|   117k|  if(h->table) {
  ------------------
  |  Branch (266:6): [True: 52.3k, False: 65.5k]
  ------------------
  267|  52.3k|    Curl_hash_clean(h);
  268|  52.3k|    curlx_safefree(h->table);
  ------------------
  |  | 1327|  52.3k|  do {                      \
  |  | 1328|  52.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  52.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  52.3k|    (ptr) = NULL;           \
  |  | 1330|  52.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 52.3k]
  |  |  ------------------
  ------------------
  269|  52.3k|  }
  270|   117k|  DEBUGASSERT(h->size == 0);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:3): [True: 0, False: 117k]
  |  Branch (270:3): [True: 117k, False: 0]
  ------------------
  271|   117k|  h->slots = 0;
  272|   117k|}
Curl_hash_clean:
  279|  52.3k|{
  280|  52.3k|  if(h && h->table) {
  ------------------
  |  Branch (280:6): [True: 52.3k, False: 0]
  |  Branch (280:11): [True: 52.3k, False: 0]
  ------------------
  281|  52.3k|    struct Curl_hash_element *he, **he_anchor;
  282|  52.3k|    size_t i;
  283|  52.3k|    DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|  52.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (283:5): [True: 0, False: 52.3k]
  |  Branch (283:5): [True: 52.3k, False: 0]
  ------------------
  284|  2.50M|    for(i = 0; i < h->slots; ++i) {
  ------------------
  |  Branch (284:16): [True: 2.45M, False: 52.3k]
  ------------------
  285|  2.45M|      he_anchor = &h->table[i];
  286|  2.49M|      while(*he_anchor) {
  ------------------
  |  Branch (286:13): [True: 41.6k, False: 2.45M]
  ------------------
  287|  41.6k|        he = *he_anchor;
  288|  41.6k|        hash_elem_unlink(h, he_anchor, he);
  289|  41.6k|        hash_elem_destroy(h, he);
  290|  41.6k|      }
  291|  2.45M|    }
  292|  52.3k|  }
  293|  52.3k|}
Curl_hash_count:
  296|  21.3k|{
  297|  21.3k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|  21.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (297:3): [True: 0, False: 21.3k]
  |  Branch (297:3): [True: 21.3k, False: 0]
  ------------------
  298|  21.3k|  return h->size;
  299|  21.3k|}
Curl_hash_clean_with_criterium:
  304|  21.3k|{
  305|  21.3k|  size_t i;
  306|       |
  307|  21.3k|  if(!h || !h->table)
  ------------------
  |  Branch (307:6): [True: 0, False: 21.3k]
  |  Branch (307:12): [True: 4.19k, False: 17.1k]
  ------------------
  308|  4.19k|    return;
  309|       |
  310|  17.1k|  DEBUGASSERT(h->init == HASHINIT);
  ------------------
  |  | 1081|  17.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 17.1k]
  |  Branch (310:3): [True: 17.1k, False: 0]
  ------------------
  311|  1.23M|  for(i = 0; i < h->slots; ++i) {
  ------------------
  |  Branch (311:14): [True: 1.21M, False: 17.1k]
  ------------------
  312|  1.21M|    struct Curl_hash_element *he, **he_anchor = &h->table[i];
  313|  1.23M|    while(*he_anchor) {
  ------------------
  |  Branch (313:11): [True: 17.4k, False: 1.21M]
  ------------------
  314|       |      /* ask the callback function if we shall remove this entry or not */
  315|  17.4k|      if(!comp || comp(user, (*he_anchor)->ptr)) {
  ------------------
  |  Branch (315:10): [True: 0, False: 17.4k]
  |  Branch (315:19): [True: 8, False: 17.3k]
  ------------------
  316|      8|        he = *he_anchor;
  317|      8|        hash_elem_unlink(h, he_anchor, he);
  318|      8|        hash_elem_destroy(h, he);
  319|      8|      }
  320|  17.3k|      else
  321|  17.3k|        he_anchor = &(*he_anchor)->next;
  322|  17.4k|    }
  323|  1.21M|  }
  324|  17.1k|}
Curl_hash_str:
  327|  3.00M|{
  328|  3.00M|  const char *key_str = (const char *)key;
  329|  3.00M|  const char *end = key_str + key_length;
  330|  3.00M|  size_t h = 5381;
  331|       |
  332|  56.2M|  while(key_str < end) {
  ------------------
  |  Branch (332:9): [True: 53.2M, False: 3.00M]
  ------------------
  333|  53.2M|    size_t j = (size_t)*key_str++;
  334|  53.2M|    h += h << 5;
  335|  53.2M|    h ^= j;
  336|  53.2M|  }
  337|       |
  338|  3.00M|  return (h % slots_num);
  339|  3.00M|}
curlx_str_key_compare:
  343|  2.27M|{
  344|  2.27M|  if((key1_len == key2_len) && !memcmp(k1, k2, key1_len))
  ------------------
  |  Branch (344:6): [True: 2.23M, False: 47.2k]
  |  Branch (344:32): [True: 2.23M, False: 31]
  ------------------
  345|  2.23M|    return 1;
  346|       |
  347|  47.2k|  return 0;
  348|  2.27M|}
Curl_hash_start_iterate:
  352|  29.8k|{
  353|  29.8k|  DEBUGASSERT(hash->init == HASHINIT);
  ------------------
  |  | 1081|  29.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (353:3): [True: 0, False: 29.8k]
  |  Branch (353:3): [True: 29.8k, False: 0]
  ------------------
  354|  29.8k|  iter->hash = hash;
  355|  29.8k|  iter->slot_index = 0;
  356|  29.8k|  iter->current = NULL;
  357|  29.8k|#ifdef DEBUGBUILD
  358|  29.8k|  iter->init = ITERINIT;
  ------------------
  |  |   31|  29.8k|#define ITERINIT 0x5FEDCBA9
  ------------------
  359|  29.8k|#endif
  360|  29.8k|}
Curl_hash_next_element:
  364|  31.3k|{
  365|  31.3k|  struct Curl_hash *h;
  366|  31.3k|  DEBUGASSERT(iter->init == ITERINIT);
  ------------------
  |  | 1081|  31.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (366:3): [True: 0, False: 31.3k]
  |  Branch (366:3): [True: 31.3k, False: 0]
  ------------------
  367|  31.3k|  h = iter->hash;
  368|  31.3k|  if(!h->table)
  ------------------
  |  Branch (368:6): [True: 15.3k, False: 15.9k]
  ------------------
  369|  15.3k|    return NULL; /* empty hash, nothing to return */
  370|       |
  371|       |  /* Get the next element in the current list, if any */
  372|  15.9k|  if(iter->current)
  ------------------
  |  Branch (372:6): [True: 1.53k, False: 14.4k]
  ------------------
  373|  1.53k|    iter->current = iter->current->next;
  374|       |
  375|       |  /* If we have reached the end of the list, find the next one */
  376|  15.9k|  if(!iter->current) {
  ------------------
  |  Branch (376:6): [True: 15.9k, False: 1]
  ------------------
  377|  15.9k|    size_t i;
  378|  1.28M|    for(i = iter->slot_index; i < h->slots; i++) {
  ------------------
  |  Branch (378:31): [True: 1.26M, False: 12.9k]
  ------------------
  379|  1.26M|      if(h->table[i]) {
  ------------------
  |  Branch (379:10): [True: 3.02k, False: 1.26M]
  ------------------
  380|  3.02k|        iter->current = h->table[i];
  381|  3.02k|        iter->slot_index = i + 1;
  382|  3.02k|        break;
  383|  3.02k|      }
  384|  1.26M|    }
  385|  15.9k|  }
  386|       |
  387|  15.9k|  return iter->current;
  388|  31.3k|}
hash.c:hash_elem_clear_ptr:
  122|  63.7k|{
  123|  63.7k|  DEBUGASSERT(h);
  ------------------
  |  | 1081|  63.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (123:3): [True: 0, False: 63.7k]
  |  Branch (123:3): [True: 63.7k, False: 0]
  ------------------
  124|  63.7k|  DEBUGASSERT(he);
  ------------------
  |  | 1081|  63.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (124:3): [True: 0, False: 63.7k]
  |  Branch (124:3): [True: 63.7k, False: 0]
  ------------------
  125|  63.7k|  if(he->ptr) {
  ------------------
  |  Branch (125:6): [True: 63.7k, False: 0]
  ------------------
  126|  63.7k|    if(he->dtor)
  ------------------
  |  Branch (126:8): [True: 42.5k, False: 21.2k]
  ------------------
  127|  42.5k|      he->dtor(he->key, he->key_len, he->ptr);
  128|  21.2k|    else
  129|  21.2k|      h->dtor(he->ptr);
  130|       |    he->ptr = NULL;
  131|  63.7k|  }
  132|  63.7k|}
hash.c:hash_elem_create:
  104|  53.2k|{
  105|  53.2k|  struct Curl_hash_element *he;
  106|       |
  107|       |  /* allocate the struct plus memory after it to store the key */
  108|  53.2k|  he = curlx_malloc(sizeof(struct Curl_hash_element) + key_len);
  ------------------
  |  | 1478|  53.2k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  109|  53.2k|  if(he) {
  ------------------
  |  Branch (109:6): [True: 53.2k, False: 0]
  ------------------
  110|  53.2k|    he->next = NULL;
  111|       |    /* copy the key */
  112|  53.2k|    memcpy(he->key, key, key_len);
  113|  53.2k|    he->key_len = key_len;
  114|  53.2k|    he->ptr = CURL_UNCONST(p);
  ------------------
  |  |  866|  53.2k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  115|  53.2k|    he->dtor = dtor;
  116|  53.2k|  }
  117|  53.2k|  return he;
  118|  53.2k|}
hash.c:hash_elem_link:
  152|  53.2k|{
  153|  53.2k|  he->next = *he_anchor;
  154|  53.2k|  *he_anchor = he;
  155|  53.2k|  ++h->size;
  156|  53.2k|}
hash.c:hash_elem_unlink:
  144|  53.2k|{
  145|  53.2k|  *he_anchor = he->next;
  146|  53.2k|  --h->size;
  147|  53.2k|}
hash.c:hash_elem_destroy:
  136|  53.2k|{
  137|  53.2k|  hash_elem_clear_ptr(h, he);
  138|  53.2k|  curlx_free(he);
  ------------------
  |  | 1483|  53.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  139|  53.2k|}

Curl_headers_init:
  325|  11.0k|{
  326|  11.0k|  struct Curl_cwriter *writer;
  327|  11.0k|  CURLcode result;
  328|       |
  329|  11.0k|  if(data->conn && (data->conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  11.0k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  11.0k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  11.0k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  11.0k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  11.0k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  11.0k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (329:6): [True: 11.0k, False: 0]
  |  Branch (329:20): [True: 422, False: 10.6k]
  ------------------
  330|       |    /* avoid installing it twice */
  331|    422|    if(Curl_cwriter_get_by_name(data, hds_cw_collect.name))
  ------------------
  |  Branch (331:8): [True: 0, False: 422]
  ------------------
  332|      0|      return CURLE_OK;
  333|       |
  334|    422|    result = Curl_cwriter_create(&writer, data, &hds_cw_collect,
  335|    422|                                 CURL_CW_PROTOCOL);
  336|    422|    if(result)
  ------------------
  |  Branch (336:8): [True: 0, False: 422]
  ------------------
  337|      0|      return result;
  338|       |
  339|    422|    result = Curl_cwriter_add(data, writer);
  340|    422|    if(result) {
  ------------------
  |  Branch (340:8): [True: 0, False: 422]
  ------------------
  341|      0|      Curl_cwriter_free(data, writer);
  342|      0|      return result;
  343|      0|    }
  344|    422|  }
  345|  11.0k|  return CURLE_OK;
  346|  11.0k|}
Curl_headers_cleanup:
  352|  45.6k|{
  353|  45.6k|  struct Curl_llist_node *e;
  354|  45.6k|  struct Curl_llist_node *n;
  355|       |
  356|  45.6k|  for(e = Curl_llist_head(&data->state.httphdrs); e; e = n) {
  ------------------
  |  Branch (356:51): [True: 0, False: 45.6k]
  ------------------
  357|      0|    struct Curl_header_store *hs = Curl_node_elem(e);
  358|      0|    n = Curl_node_next(e);
  359|      0|    curlx_free(hs);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  360|      0|  }
  361|  45.6k|  headers_reset(data);
  362|  45.6k|  return CURLE_OK;
  363|  45.6k|}
headers.c:headers_reset:
  287|  45.6k|{
  288|  45.6k|  Curl_llist_init(&data->state.httphdrs, NULL);
  289|       |  data->state.prevhead = NULL;
  290|  45.6k|}

Curl_HMAC_init:
   48|  13.4k|{
   49|  13.4k|  size_t i;
   50|  13.4k|  struct HMAC_context *ctxt;
   51|  13.4k|  unsigned char *hkey;
   52|  13.4k|  unsigned char b;
   53|       |
   54|       |  /* Create HMAC context. */
   55|  13.4k|  i = sizeof(*ctxt) + (2 * hashparams->ctxtsize) + hashparams->resultlen;
   56|  13.4k|  ctxt = curlx_malloc(i);
  ------------------
  |  | 1478|  13.4k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   57|       |
   58|  13.4k|  if(!ctxt)
  ------------------
  |  Branch (58:6): [True: 0, False: 13.4k]
  ------------------
   59|      0|    return ctxt;
   60|       |
   61|  13.4k|  ctxt->hash = hashparams;
   62|  13.4k|  ctxt->hashctxt1 = (void *)(ctxt + 1);
   63|  13.4k|  ctxt->hashctxt2 = (void *)((char *)ctxt->hashctxt1 + hashparams->ctxtsize);
   64|       |
   65|       |  /* If the key is too long, replace it by its hash digest. */
   66|  13.4k|  if(keylen > hashparams->maxkeylen) {
  ------------------
  |  Branch (66:6): [True: 103, False: 13.3k]
  ------------------
   67|    103|    if(hashparams->hinit(ctxt->hashctxt1))
  ------------------
  |  Branch (67:8): [True: 0, False: 103]
  ------------------
   68|      0|      goto fail;
   69|    103|    hashparams->hupdate(ctxt->hashctxt1, key, keylen);
   70|    103|    hkey = (unsigned char *)ctxt->hashctxt2 + hashparams->ctxtsize;
   71|    103|    hashparams->hfinal(hkey, ctxt->hashctxt1);
   72|    103|    key = hkey;
   73|    103|    keylen = hashparams->resultlen;
   74|    103|  }
   75|       |
   76|       |  /* Prime the two hash contexts with the modified key. */
   77|  13.4k|  if(hashparams->hinit(ctxt->hashctxt1) ||
  ------------------
  |  Branch (77:6): [True: 0, False: 13.4k]
  ------------------
   78|  13.4k|     hashparams->hinit(ctxt->hashctxt2))
  ------------------
  |  Branch (78:6): [True: 0, False: 13.4k]
  ------------------
   79|      0|    goto fail;
   80|       |
   81|   385k|  for(i = 0; i < keylen; i++) {
  ------------------
  |  Branch (81:14): [True: 372k, False: 13.4k]
  ------------------
   82|   372k|    b = (unsigned char)(*key ^ hmac_ipad);
   83|   372k|    hashparams->hupdate(ctxt->hashctxt1, &b, 1);
   84|   372k|    b = (unsigned char)(*key++ ^ hmac_opad);
   85|   372k|    hashparams->hupdate(ctxt->hashctxt2, &b, 1);
   86|   372k|  }
   87|       |
   88|   499k|  for(; i < hashparams->maxkeylen; i++) {
  ------------------
  |  Branch (88:9): [True: 486k, False: 13.4k]
  ------------------
   89|   486k|    hashparams->hupdate(ctxt->hashctxt1, &hmac_ipad, 1);
   90|   486k|    hashparams->hupdate(ctxt->hashctxt2, &hmac_opad, 1);
   91|   486k|  }
   92|       |
   93|       |  /* Done, return pointer to HMAC context. */
   94|  13.4k|  return ctxt;
   95|       |
   96|      0|fail:
   97|      0|  curlx_free(ctxt);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   98|       |  return NULL;
   99|  13.4k|}
Curl_HMAC_update:
  104|  13.4k|{
  105|       |  /* Update first hash calculation. */
  106|  13.4k|  ctxt->hash->hupdate(ctxt->hashctxt1, data, len);
  107|  13.4k|}
Curl_HMAC_final:
  110|  13.4k|{
  111|  13.4k|  const struct HMAC_params *hashparams = ctxt->hash;
  112|       |
  113|       |  /* Do not get output if called with a null parameter: only release
  114|       |     storage. */
  115|       |
  116|  13.4k|  if(!output)
  ------------------
  |  Branch (116:6): [True: 0, False: 13.4k]
  ------------------
  117|      0|    output = (unsigned char *)ctxt->hashctxt2 + ctxt->hash->ctxtsize;
  118|       |
  119|  13.4k|  hashparams->hfinal(output, ctxt->hashctxt1);
  120|  13.4k|  hashparams->hupdate(ctxt->hashctxt2, output, hashparams->resultlen);
  121|  13.4k|  hashparams->hfinal(output, ctxt->hashctxt2);
  122|  13.4k|  curlx_free(ctxt);
  ------------------
  |  | 1483|  13.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  123|  13.4k|  return 0;
  124|  13.4k|}
Curl_hmacit:
  147|  13.4k|{
  148|  13.4k|  struct HMAC_context *ctxt;
  149|  13.4k|  if(keylen > UINT_MAX) /* unlikely to ever happen */
  ------------------
  |  Branch (149:6): [True: 0, False: 13.4k]
  ------------------
  150|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  151|  13.4k|  ctxt = Curl_HMAC_init(hashparams, key, curlx_uztoui(keylen));
  152|       |
  153|  13.4k|  if(!ctxt)
  ------------------
  |  Branch (153:6): [True: 0, False: 13.4k]
  ------------------
  154|      0|    return CURLE_OUT_OF_MEMORY;
  155|       |
  156|       |  /* Update the digest with the given challenge */
  157|  13.4k|  do {
  158|  13.4k|    unsigned int ilen = (unsigned int)CURLMIN(datalen, UINT_MAX);
  ------------------
  |  | 1287|  13.4k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 13.4k, False: 0]
  |  |  ------------------
  ------------------
  159|  13.4k|    Curl_HMAC_update(ctxt, data, ilen);
  160|  13.4k|    datalen -= ilen;
  161|  13.4k|    data += ilen;
  162|  13.4k|  } while(datalen);
  ------------------
  |  Branch (162:11): [True: 0, False: 13.4k]
  ------------------
  163|       |
  164|       |  /* Finalise the digest */
  165|  13.4k|  Curl_HMAC_final(ctxt, output);
  166|       |
  167|  13.4k|  return CURLE_OK;
  168|  13.4k|}

Curl_resolv_dns_queries:
  126|  11.1k|{
  127|  11.1k|  (void)data;
  128|  11.1k|  switch(ip_version) {
  129|     11|  case CURL_IPRESOLVE_V6:
  ------------------
  |  | 2306|     11|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (129:3): [True: 11, False: 11.1k]
  ------------------
  130|     11|    return CURL_DNSQ_AAAA;
  ------------------
  |  |   52|     11|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  131|    138|  case CURL_IPRESOLVE_V4:
  ------------------
  |  | 2305|    138|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (131:3): [True: 138, False: 11.0k]
  ------------------
  132|    138|    return CURL_DNSQ_A;
  ------------------
  |  |   51|    138|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  133|  11.0k|  default:
  ------------------
  |  Branch (133:3): [True: 11.0k, False: 149]
  ------------------
  134|  11.0k|    if(ipv6works(data))
  ------------------
  |  Branch (134:8): [True: 11.0k, False: 0]
  ------------------
  135|  11.0k|      return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   51|  11.0k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                    return (CURL_DNSQ_A | CURL_DNSQ_AAAA);
  ------------------
  |  |   52|  11.0k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  136|      0|    else
  137|      0|      return CURL_DNSQ_A;
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  138|  11.1k|  }
  139|  11.1k|}
Curl_resolv_query_str:
  143|    790|{
  144|    790|  switch(dns_queries) {
  145|      0|  case (CURL_DNSQ_A | CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (145:3): [True: 0, False: 790]
  ------------------
  146|      0|    return "A+AAAA+HTTPS";
  147|      0|  case (CURL_DNSQ_A | CURL_DNSQ_AAAA):
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_AAAA):
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (147:3): [True: 0, False: 790]
  ------------------
  148|      0|    return "A+AAAA";
  149|      0|  case (CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   52|      0|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
                case (CURL_DNSQ_AAAA | CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (149:3): [True: 0, False: 790]
  ------------------
  150|      0|    return "AAAA+HTTPS";
  151|    348|  case (CURL_DNSQ_AAAA):
  ------------------
  |  |   52|    348|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (151:3): [True: 348, False: 442]
  ------------------
  152|    348|    return "AAAA";
  153|      0|  case (CURL_DNSQ_A | CURL_DNSQ_HTTPS):
  ------------------
  |  |   51|      0|#define CURL_DNSQ_A           (1U << 0)
  ------------------
                case (CURL_DNSQ_A | CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (153:3): [True: 0, False: 790]
  ------------------
  154|      0|    return "A+HTTPS";
  155|    442|  case (CURL_DNSQ_A):
  ------------------
  |  |   51|    442|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (155:3): [True: 442, False: 348]
  ------------------
  156|    442|    return "A";
  157|      0|  case (CURL_DNSQ_HTTPS):
  ------------------
  |  |   53|      0|#define CURL_DNSQ_HTTPS       (1U << 2)
  ------------------
  |  Branch (157:3): [True: 0, False: 790]
  ------------------
  158|      0|    return "HTTPS";
  159|      0|  case 0:
  ------------------
  |  Branch (159:3): [True: 0, False: 790]
  ------------------
  160|      0|    return "-";
  161|      0|  default:
  ------------------
  |  Branch (161:3): [True: 0, False: 790]
  ------------------
  162|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (162:5): [Folded, False: 0]
  |  Branch (162:5): [Folded, False: 0]
  ------------------
  163|      0|    return "???";
  164|    790|  }
  165|    790|}
Curl_printable_address:
  177|    101|{
  178|    101|  DEBUGASSERT(bufsize);
  ------------------
  |  | 1081|    101|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (178:3): [True: 0, False: 101]
  |  Branch (178:3): [True: 101, False: 0]
  ------------------
  179|    101|  buf[0] = 0;
  180|       |
  181|    101|  switch(ai->ai_family) {
  182|     93|  case AF_INET: {
  ------------------
  |  Branch (182:3): [True: 93, False: 8]
  ------------------
  183|     93|    const struct sockaddr_in *sa4 = (const void *)ai->ai_addr;
  184|     93|    const struct in_addr *ipaddr4 = &sa4->sin_addr;
  185|     93|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr4, buf, bufsize);
  ------------------
  |  |   44|     93|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  ------------------
  186|     93|    break;
  187|      0|  }
  188|      0|#ifdef USE_IPV6
  189|      8|  case AF_INET6: {
  ------------------
  |  Branch (189:3): [True: 8, False: 93]
  ------------------
  190|      8|    const struct sockaddr_in6 *sa6 = (const void *)ai->ai_addr;
  191|      8|    const struct in6_addr *ipaddr6 = &sa6->sin6_addr;
  192|      8|    (void)curlx_inet_ntop(ai->ai_family, (const void *)ipaddr6, buf, bufsize);
  ------------------
  |  |   44|      8|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  ------------------
  193|      8|    break;
  194|      0|  }
  195|      0|#endif
  196|      0|  default:
  ------------------
  |  Branch (196:3): [True: 0, False: 101]
  ------------------
  197|      0|    break;
  198|    101|  }
  199|    101|}
Curl_probeipv6:
  290|  15.3k|{
  291|       |  /* probe to see if we have a working IPv6 stack */
  292|  15.3k|  curl_socket_t s = CURL_SOCKET(PF_INET6, SOCK_DGRAM, 0);
  ------------------
  |  | 1436|  15.3k|  curl_dbg_socket((int)(domain), type, protocol, __LINE__, __FILE__)
  ------------------
  293|  15.3k|  multi->ipv6_works = FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
  294|  15.3k|  if(s == CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  15.3k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (294:6): [True: 0, False: 15.3k]
  ------------------
  295|      0|    if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if(SOCKERRNO == SOCKENOMEM)
  ------------------
  |  | 1133|      0|#define SOCKENOMEM        ENOMEM
  ------------------
  |  Branch (295:8): [True: 0, False: 0]
  ------------------
  296|      0|      return CURLE_OUT_OF_MEMORY;
  297|      0|  }
  298|  15.3k|  else {
  299|  15.3k|    multi->ipv6_works = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  300|  15.3k|    sclose(s);
  ------------------
  |  | 1428|  15.3k|#define sclose(sockfd) curl_dbg_sclose(sockfd, __LINE__, __FILE__)
  ------------------
  301|  15.3k|  }
  302|  15.3k|  return CURLE_OK;
  303|  15.3k|}
Curl_host_is_ipnum:
  321|  29.6k|{
  322|  29.6k|  struct in_addr in;
  323|  29.6k|#ifdef USE_IPV6
  324|  29.6k|  struct in6_addr in6;
  325|  29.6k|#endif
  326|  29.6k|  if(curlx_inet_pton(AF_INET, hostname, &in) > 0
  ------------------
  |  |   43|  29.6k|  inet_pton(x, y, z)
  ------------------
  |  Branch (326:6): [True: 19.4k, False: 10.2k]
  ------------------
  327|  10.2k|#ifdef USE_IPV6
  328|  10.2k|     || curlx_inet_pton(AF_INET6, hostname, &in6) > 0
  ------------------
  |  |   43|  10.2k|  inet_pton(x, y, z)
  ------------------
  |  Branch (328:9): [True: 44, False: 10.2k]
  ------------------
  329|  29.6k|#endif
  330|  29.6k|    )
  331|  19.4k|    return TRUE;
  ------------------
  |  | 1055|  19.4k|#define TRUE true
  ------------------
  332|  10.2k|  return FALSE;
  ------------------
  |  | 1058|  10.2k|#define FALSE false
  ------------------
  333|  29.6k|}
Curl_resolv_announce_start:
  364|  10.5k|{
  365|  10.5k|  if(data->set.resolver_start) {
  ------------------
  |  Branch (365:6): [True: 0, False: 10.5k]
  ------------------
  366|      0|    int rc;
  367|       |
  368|      0|    CURL_TRC_DNS(data, "announcing resolve to application");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  369|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  370|      0|    rc = data->set.resolver_start(resolver, NULL,
  371|      0|                                  data->set.resolver_start_client);
  372|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  373|      0|    if(rc) {
  ------------------
  |  Branch (373:8): [True: 0, False: 0]
  ------------------
  374|      0|      CURL_TRC_DNS(data, "application aborted resolve");
  ------------------
  |  |  168|      0|  do {                                 \
  |  |  169|      0|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|      0|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  375|      0|      return CURLE_ABORTED_BY_CALLBACK;
  376|      0|    }
  377|      0|  }
  378|  10.5k|  return CURLE_OK;
  379|  10.5k|}
Curl_resolv_elapsed_ms:
  469|   104k|{
  470|   104k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  471|   104k|  if(!async)
  ------------------
  |  Branch (471:6): [True: 0, False: 104k]
  ------------------
  472|      0|    return CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  473|   104k|  return curlx_ptimediff_ms(Curl_pgrs_now(data), &async->start);
  474|   104k|}
Curl_resolv_has_answers:
  478|   712k|{
  479|   712k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  480|   712k|  uint8_t check_queries;
  481|       |  /* a no longer existing/running resolve has all answers. */
  482|   712k|  if(!async || async->done)
  ------------------
  |  Branch (482:6): [True: 0, False: 712k]
  |  Branch (482:16): [True: 0, False: 712k]
  ------------------
  483|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  484|       |  /* Relevant are only queries undertaken. Others are considered answered. */
  485|   712k|  check_queries = (dns_queries & async->dns_queries);
  486|   712k|  if((check_queries & async->dns_responses) != check_queries) {
  ------------------
  |  Branch (486:6): [True: 104k, False: 608k]
  ------------------
  487|   104k|    return FALSE;
  ------------------
  |  | 1058|   104k|#define FALSE false
  ------------------
  488|   104k|  }
  489|   608k|  return TRUE;
  ------------------
  |  | 1055|   608k|#define TRUE true
  ------------------
  490|   712k|}
Curl_resolv_get_ai:
  496|   555k|{
  497|   555k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
  498|   555k|  (void)index;
  499|   555k|  if(!async)
  ------------------
  |  Branch (499:6): [True: 0, False: 555k]
  ------------------
  500|      0|    return NULL;
  501|   555k|  if((ai_family == AF_INET) && !(async->dns_queries & CURL_DNSQ_A))
  ------------------
  |  |   51|   277k|#define CURL_DNSQ_A           (1U << 0)
  ------------------
  |  Branch (501:6): [True: 277k, False: 277k]
  |  Branch (501:32): [True: 0, False: 277k]
  ------------------
  502|      0|    return NULL;
  503|   555k|#ifdef USE_IPV6
  504|   555k|  if((ai_family == AF_INET6) && !(async->dns_queries & CURL_DNSQ_AAAA))
  ------------------
  |  |   52|   277k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (504:6): [True: 277k, False: 277k]
  |  Branch (504:33): [True: 24, False: 277k]
  ------------------
  505|     24|    return NULL;
  506|   555k|#endif
  507|   555k|  return Curl_async_get_ai(data, async, ai_family, index);
  508|   555k|}
Curl_resolv_blocking:
  755|    114|{
  756|    114|  CURLcode result;
  757|    114|  uint32_t resolv_id;
  758|    114|  DEBUGASSERT(hostname && *hostname);
  ------------------
  |  | 1081|    114|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (758:3): [True: 0, False: 114]
  |  Branch (758:3): [True: 0, False: 0]
  |  Branch (758:3): [True: 114, False: 0]
  |  Branch (758:3): [True: 114, False: 0]
  ------------------
  759|    114|  *pdns = NULL;
  760|       |  /* We cannot do a blocking resolve using DoH currently */
  761|    114|  result = hostip_resolv(data, dns_queries,
  762|    114|                         hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1058|    114|#define FALSE false
  ------------------
                                       hostname, port, transport, FALSE, 0, FALSE,
  ------------------
  |  | 1058|    114|#define FALSE false
  ------------------
  763|    114|                         &resolv_id, pdns);
  764|    114|  switch(result) {
  765|     17|  case CURLE_OK:
  ------------------
  |  Branch (765:3): [True: 17, False: 97]
  ------------------
  766|     17|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1081|     17|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (766:5): [True: 0, False: 17]
  |  Branch (766:5): [True: 17, False: 0]
  ------------------
  767|     17|    break;
  768|     17|#ifdef USE_CURL_ASYNC
  769|     97|  case CURLE_AGAIN:
  ------------------
  |  Branch (769:3): [True: 97, False: 17]
  ------------------
  770|     97|    DEBUGASSERT(!*pdns);
  ------------------
  |  | 1081|     97|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (770:5): [True: 0, False: 97]
  |  Branch (770:5): [True: 97, False: 0]
  ------------------
  771|     97|    result = Curl_async_await(data, resolv_id, pdns);
  772|     97|    Curl_resolv_destroy(data, resolv_id);
  773|     97|    break;
  774|      0|#endif
  775|      0|  default:
  ------------------
  |  Branch (775:3): [True: 0, False: 114]
  ------------------
  776|      0|    break;
  777|    114|  }
  778|    114|  return result;
  779|    114|}
Curl_resolv:
  984|  11.1k|{
  985|  11.1k|  *presolv_id = 0;
  986|  11.1k|  *pdns = NULL;
  987|       |
  988|  11.1k|  if(timeout_ms < 0)
  ------------------
  |  Branch (988:6): [True: 0, False: 11.1k]
  ------------------
  989|       |    /* got an already expired timeout */
  990|      0|    return CURLE_OPERATION_TIMEDOUT;
  991|  11.1k|  else if(!timeout_ms)
  ------------------
  |  Branch (991:11): [True: 0, False: 11.1k]
  ------------------
  992|      0|    timeout_ms = CURL_TIMEOUT_RESOLVE_MS;
  ------------------
  |  |   38|      0|#define CURL_TIMEOUT_RESOLVE_MS (300 * 1000)
  ------------------
  993|       |
  994|  11.1k|#ifdef USE_UNIX_SOCKETS
  995|  11.1k|  if(peer->unix_socket)
  ------------------
  |  Branch (995:6): [True: 400, False: 10.7k]
  ------------------
  996|    400|    return resolv_unix(data, peer->hostname, (bool)peer->abstract_uds, pdns);
  997|       |#else
  998|       |  if(peer->unix_socket)
  999|       |    return hostip_resolv_failed(data, peer->hostname, for_proxy);
 1000|       |#endif
 1001|       |
 1002|       |#ifdef USE_ALARM_TIMEOUT
 1003|       |  if(timeout_ms && data->set.no_signal) {
 1004|       |    /* Cannot use ALARM when signals are disabled */
 1005|       |    timeout_ms = 0;
 1006|       |  }
 1007|       |  if(timeout_ms && !Curl_doh_wanted(data)) {
 1008|       |    return resolv_alarm_timeout(data, dns_queries, peer->hostname, peer->port,
 1009|       |                                transport, for_proxy, timeout_ms, presolv_id,
 1010|       |                                pdns);
 1011|       |  }
 1012|       |#endif /* !USE_ALARM_TIMEOUT */
 1013|       |
 1014|       |#ifndef CURLRES_ASYNCH
 1015|       |  if(timeout_ms)
 1016|       |    infof(data, "timeout on name lookup is not supported");
 1017|       |#endif
 1018|       |
 1019|  10.7k|  return hostip_resolv(data, dns_queries, peer->hostname, peer->port,
 1020|       |                       transport, for_proxy, timeout_ms, TRUE, presolv_id,
  ------------------
  |  | 1055|  10.7k|#define TRUE true
  ------------------
 1021|  10.7k|                       pdns);
 1022|  11.1k|}
Curl_async_get:
 1028|  2.08M|{
 1029|  2.08M|  struct Curl_resolv_async *async = data->state.async;
 1030|  2.08M|  for(; async; async = async->next) {
  ------------------
  |  Branch (1030:9): [True: 2.08M, False: 0]
  ------------------
 1031|  2.08M|    if(async->id == resolv_id)
  ------------------
  |  Branch (1031:8): [True: 2.08M, False: 0]
  ------------------
 1032|  2.08M|      return async;
 1033|  2.08M|  }
 1034|      0|  return NULL;
 1035|  2.08M|}
Curl_resolv_take_result:
 1039|   713k|{
 1040|   713k|  struct Curl_resolv_async *async = Curl_async_get(data, resolv_id);
 1041|   713k|  CURLcode result;
 1042|       |
 1043|       |  /* If async resolving is ongoing, this must be set */
 1044|   713k|  if(!async)
  ------------------
  |  Branch (1044:6): [True: 0, False: 713k]
  ------------------
 1045|      0|    return CURLE_FAILED_INIT;
 1046|       |
 1047|       |  /* check if we have the name resolved by now (from someone else) */
 1048|   713k|  result = Curl_dnscache_get(data, async->dns_queries,
 1049|   713k|                             async->hostname, async->port, pdns);
 1050|   713k|  if(*pdns) {
  ------------------
  |  Branch (1050:6): [True: 0, False: 713k]
  ------------------
 1051|       |    /* Tell a possibly async resolver we no longer need the results. */
 1052|      0|    infof(data, "Hostname '%s' was found in DNS cache", async->hostname);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1053|      0|    Curl_async_shutdown(data, async);
 1054|      0|    return CURLE_OK;
 1055|      0|  }
 1056|   713k|  else if(result) {
  ------------------
  |  Branch (1056:11): [True: 27, False: 713k]
  ------------------
 1057|     27|    Curl_async_shutdown(data, async);
 1058|     27|    return Curl_async_failed(data, async, NULL);
 1059|     27|  }
 1060|       |
 1061|   713k|  result = hostip_resolv_take_result(data, async, pdns);
 1062|       |
 1063|   713k|  if(*pdns) {
  ------------------
  |  Branch (1063:6): [True: 65, False: 713k]
  ------------------
 1064|       |    /* Add to cache */
 1065|     65|    result = Curl_dnscache_add(data, *pdns);
 1066|     65|    if(result)
  ------------------
  |  Branch (1066:8): [True: 0, False: 65]
  ------------------
 1067|      0|      Curl_dns_entry_unlink(data, pdns);
 1068|     65|  }
 1069|   713k|  else if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|   713k|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 179, False: 713k]
  |  |  ------------------
  |  |   78|   713k|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 254, False: 712k]
  |  |  ------------------
  ------------------
 1070|    433|    Curl_dnscache_add_negative(data, async->dns_queries,
 1071|    433|                               async->hostname, async->port);
 1072|    433|    failf(data, "Could not resolve: %s:%u", async->hostname, async->port);
  ------------------
  |  |   62|    433|#define failf Curl_failf
  ------------------
 1073|    433|  }
 1074|   712k|  else if(result) {
  ------------------
  |  Branch (1074:11): [True: 0, False: 712k]
  ------------------
 1075|      0|    failf(data, "Error %d resolving %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1076|      0|          result, async->hostname, async->port);
 1077|      0|  }
 1078|   713k|  return result;
 1079|   713k|}
Curl_resolv_pollset:
 1083|   712k|{
 1084|   712k|  struct Curl_resolv_async *async = data->state.async;
 1085|   712k|  CURLcode result = CURLE_OK;
 1086|       |
 1087|   712k|  (void)ps;
 1088|  1.43M|  for(; async && !result; async = async->next) {
  ------------------
  |  Branch (1088:9): [True: 718k, False: 712k]
  |  Branch (1088:18): [True: 718k, False: 0]
  ------------------
 1089|   718k|#ifndef CURL_DISABLE_DOH
 1090|   718k|    if(async->doh) /* DoH has nothing for the pollset */
  ------------------
  |  Branch (1090:8): [True: 355k, False: 363k]
  ------------------
 1091|   355k|      continue;
 1092|   363k|#endif
 1093|   363k|    result = Curl_async_pollset(data, async, ps);
 1094|   363k|  }
 1095|   712k|  return result;
 1096|   712k|}
Curl_resolv_destroy:
 1099|  7.27k|{
 1100|  7.27k|  struct Curl_resolv_async **panchor = &data->state.async;
 1101|       |
 1102|  7.28k|  for(; *panchor; panchor = &(*panchor)->next) {
  ------------------
  |  Branch (1102:9): [True: 113, False: 7.17k]
  ------------------
 1103|    113|    struct Curl_resolv_async *async = *panchor;
 1104|    113|    if(async->id == resolv_id) {
  ------------------
  |  Branch (1104:8): [True: 102, False: 11]
  ------------------
 1105|    102|      *panchor = async->next;
 1106|    102|      Curl_async_destroy(data, async);
 1107|    102|      break;
 1108|    102|    }
 1109|    113|  }
 1110|  7.27k|}
Curl_resolv_shutdown_all:
 1113|  21.3k|{
 1114|  21.3k|  struct Curl_resolv_async *async = data->state.async;
 1115|  22.0k|  for(; async; async = async->next) {
  ------------------
  |  Branch (1115:9): [True: 748, False: 21.3k]
  ------------------
 1116|    748|    Curl_async_shutdown(data, async);
 1117|    748|  }
 1118|  21.3k|}
Curl_resolv_destroy_all:
 1121|  56.4k|{
 1122|  57.2k|  while(data->state.async) {
  ------------------
  |  Branch (1122:9): [True: 748, False: 56.4k]
  ------------------
 1123|    748|    struct Curl_resolv_async *async = data->state.async;
 1124|    748|    data->state.async = async->next;
 1125|    748|    Curl_async_destroy(data, async);
 1126|    748|  }
 1127|  56.4k|}
hostip.c:ipv6works:
  309|  11.0k|{
  310|  11.0k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (310:3): [True: 0, False: 11.0k]
  |  Branch (310:3): [True: 11.0k, False: 0]
  ------------------
  311|  11.0k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|  11.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (311:3): [True: 0, False: 11.0k]
  |  Branch (311:3): [True: 11.0k, False: 0]
  ------------------
  312|  11.0k|  return data ? data->multi->ipv6_works : FALSE;
  ------------------
  |  | 1058|  11.0k|#define FALSE false
  ------------------
  |  Branch (312:10): [True: 11.0k, False: 0]
  ------------------
  313|  11.0k|}
hostip.c:hostip_resolv:
  677|  10.8k|{
  678|  10.8k|  size_t hostname_len;
  679|  10.8k|  CURLcode result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|  10.8k|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 3.46k, False: 7.39k]
  |  |  ------------------
  ------------------
  680|  10.8k|  bool cache_dns = FALSE;
  ------------------
  |  | 1058|  10.8k|#define FALSE false
  ------------------
  681|       |
  682|  10.8k|  (void)timeout_ms; /* not used in all ifdefs */
  683|  10.8k|  *presolv_id = 0;
  684|  10.8k|  *pdns = NULL;
  685|       |
  686|       |#ifdef CURL_DISABLE_DOH
  687|       |  (void)allowDOH;
  688|       |#endif
  689|       |
  690|       |  /* We should intentionally error and not resolve .onion TLDs */
  691|  10.8k|  hostname_len = strlen(hostname);
  692|  10.8k|  DEBUGASSERT(hostname_len);
  ------------------
  |  | 1081|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (692:3): [True: 0, False: 10.8k]
  |  Branch (692:3): [True: 10.8k, False: 0]
  ------------------
  693|  10.8k|  if(hostname_len >= 7 &&
  ------------------
  |  Branch (693:6): [True: 9.96k, False: 905]
  ------------------
  694|  9.96k|     (curl_strequal(&hostname[hostname_len - 6], ".onion") ||
  ------------------
  |  Branch (694:7): [True: 0, False: 9.96k]
  ------------------
  695|  9.96k|      curl_strequal(&hostname[hostname_len - 7], ".onion."))) {
  ------------------
  |  Branch (695:7): [True: 0, False: 9.96k]
  ------------------
  696|      0|    failf(data, "Not resolving .onion address (RFC 7686)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  697|      0|    goto out;
  698|      0|  }
  699|       |
  700|  10.8k|#ifdef DEBUGBUILD
  701|  10.8k|  CURL_TRC_DNS(data, "hostip_resolv(%s:%u, queries=%s)",
  ------------------
  |  |  168|  10.8k|  do {                                 \
  |  |  169|  10.8k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|  10.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  21.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  21.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|  10.8k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|  10.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 10.8k]
  |  |  ------------------
  ------------------
  702|  10.8k|               hostname, port, Curl_resolv_query_str(dns_queries));
  703|  10.8k|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   56|  10.8k|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|  10.8k|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|  10.8k|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) &&
  ------------------
  |  |   52|  10.8k|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (703:6): [True: 27, False: 10.8k]
  ------------------
  704|     27|     getenv("CURL_DBG_RESOLV_FAIL_IPV6")) {
  ------------------
  |  Branch (704:6): [True: 0, False: 27]
  ------------------
  705|      0|    infof(data, "DEBUG fail ipv6 resolve");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  706|      0|    result = hostip_resolv_failed(data, hostname, for_proxy);
  707|      0|    goto out;
  708|      0|  }
  709|  10.8k|#endif
  710|       |  /* Let's check our DNS cache first */
  711|  10.8k|  result = Curl_dnscache_get(data, dns_queries, hostname, port, pdns);
  712|  10.8k|  if(*pdns) {
  ------------------
  |  Branch (712:6): [True: 178, False: 10.6k]
  ------------------
  713|    178|    infof(data, "Hostname %s was found in DNS cache", hostname);
  ------------------
  |  |  143|    178|  do {                               \
  |  |  144|    178|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    178|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 178, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 178]
  |  |  |  |  ------------------
  |  |  |  |  320|    178|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    178|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    178|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 178]
  |  |  ------------------
  ------------------
  714|    178|    result = CURLE_OK;
  715|    178|  }
  716|  10.6k|  else if(result) {
  ------------------
  |  Branch (716:11): [True: 115, False: 10.5k]
  ------------------
  717|    115|    infof(data, "Negative DNS entry");
  ------------------
  |  |  143|    115|  do {                               \
  |  |  144|    115|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    115|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 115, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 115]
  |  |  |  |  ------------------
  |  |  |  |  320|    115|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    115|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    115|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 115]
  |  |  ------------------
  ------------------
  718|    115|    result = hostip_resolv_failed(data, hostname, for_proxy);
  719|    115|  }
  720|  10.5k|  else {
  721|       |    /* No luck, we need to start resolving. */
  722|  10.5k|    cache_dns = TRUE;
  ------------------
  |  | 1055|  10.5k|#define TRUE true
  ------------------
  723|  10.5k|    result = hostip_resolv_start(data, dns_queries, hostname, port,
  724|  10.5k|                                 transport, for_proxy, timeout_ms, allowDOH,
  725|  10.5k|                                 presolv_id, pdns);
  726|  10.5k|  }
  727|       |
  728|  10.8k|out:
  729|  10.8k|  if(result && (result != CURLE_AGAIN)) {
  ------------------
  |  Branch (729:6): [True: 974, False: 9.89k]
  |  Branch (729:16): [True: 124, False: 850]
  ------------------
  730|    124|    Curl_dns_entry_unlink(data, pdns);
  731|    124|    if(IS_RESOLV_FAIL(result)) {
  ------------------
  |  |   77|    124|  (((result) == CURLE_COULDNT_RESOLVE_HOST) || \
  |  |  ------------------
  |  |  |  Branch (77:4): [True: 115, False: 9]
  |  |  ------------------
  |  |   78|    124|   ((result) == CURLE_COULDNT_RESOLVE_PROXY))
  |  |  ------------------
  |  |  |  Branch (78:4): [True: 0, False: 9]
  |  |  ------------------
  ------------------
  732|    115|      if(cache_dns)
  ------------------
  |  Branch (732:10): [True: 0, False: 115]
  ------------------
  733|      0|        Curl_dnscache_add_negative(data, dns_queries, hostname, port);
  734|    115|      failf(data, "Could not resolve: %s:%u", hostname, port);
  ------------------
  |  |   62|    115|#define failf Curl_failf
  ------------------
  735|    115|    }
  736|      9|    else {
  737|      9|      failf(data, "Error %d resolving %s:%u", result, hostname, port);
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  738|      9|    }
  739|    124|  }
  740|  10.7k|  else if(cache_dns && *pdns) {
  ------------------
  |  Branch (740:11): [True: 10.5k, False: 178]
  |  Branch (740:24): [True: 9.71k, False: 850]
  ------------------
  741|  9.71k|    result = Curl_dnscache_add(data, *pdns);
  742|  9.71k|    if(result)
  ------------------
  |  Branch (742:8): [True: 0, False: 9.71k]
  ------------------
  743|      0|      Curl_dns_entry_unlink(data, pdns);
  744|  9.71k|  }
  745|       |
  746|  10.8k|  return result;
  747|  10.8k|}
hostip.c:hostip_resolv_failed:
  347|    115|{
  348|    115|  failf(data, "Could not resolve %s: %s",
  ------------------
  |  |   62|    115|#define failf Curl_failf
  ------------------
  349|    115|        for_proxy ? "proxy" : "host", hostname);
  ------------------
  |  Branch (349:9): [True: 0, False: 115]
  ------------------
  350|    115|  return RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|    115|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 115]
  |  |  ------------------
  ------------------
  351|    115|}
hostip.c:hostip_resolv_start:
  541|  10.5k|{
  542|  10.5k|#ifdef USE_CURL_ASYNC
  543|  10.5k|  struct Curl_resolv_async *async = NULL;
  544|  10.5k|#endif
  545|  10.5k|  struct Curl_addrinfo *addr = NULL;
  546|  10.5k|  size_t hostname_len;
  547|  10.5k|  CURLcode result = CURLE_OK;
  548|       |
  549|  10.5k|  (void)timeout_ms; /* not in all ifdefs */
  550|  10.5k|  *presolv_id = 0;
  551|  10.5k|  *pdns = NULL;
  552|       |
  553|       |  /* Check for "known" things to resolve ourselves. */
  554|  10.5k|#ifndef USE_RESOLVE_ON_IPS
  555|  10.5k|  if(Curl_is_ipaddr(hostname)) {
  ------------------
  |  Branch (555:6): [True: 9.66k, False: 907]
  ------------------
  556|       |    /* test655 verifies that the announce is done, even though there
  557|       |     * is no real resolving. So, keep doing this. */
  558|  9.66k|    result = Curl_resolv_announce_start(data, NULL);
  559|  9.66k|    if(result)
  ------------------
  |  Branch (559:8): [True: 0, False: 9.66k]
  ------------------
  560|      0|      goto out;
  561|       |    /* shortcut literal IP addresses, if we are not told to resolve them. */
  562|  9.66k|    result = Curl_str2addr(hostname, port, &addr);
  563|  9.66k|    goto out;
  564|  9.66k|  }
  565|    907|#endif
  566|       |
  567|    907|  hostname_len = strlen(hostname);
  568|    907|  if(curl_strequal(hostname, "localhost") ||
  ------------------
  |  Branch (568:6): [True: 24, False: 883]
  ------------------
  569|    883|     curl_strequal(hostname, "localhost.") ||
  ------------------
  |  Branch (569:6): [True: 1, False: 882]
  ------------------
  570|    882|     tailmatch(hostname, hostname_len, STRCONST(".localhost")) ||
  ------------------
  |  | 1292|    882|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (570:6): [True: 14, False: 868]
  ------------------
  571|    868|     tailmatch(hostname, hostname_len, STRCONST(".localhost."))) {
  ------------------
  |  | 1292|    868|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (571:6): [True: 9, False: 859]
  ------------------
  572|     48|    result = Curl_resolv_announce_start(data, NULL);
  573|     48|    if(result)
  ------------------
  |  Branch (573:8): [True: 0, False: 48]
  ------------------
  574|      0|      goto out;
  575|     48|    addr = get_localhost(port, hostname);
  576|     48|    if(!addr)
  ------------------
  |  Branch (576:8): [True: 0, False: 48]
  ------------------
  577|      0|      result = CURLE_OUT_OF_MEMORY;
  578|     48|    goto out;
  579|     48|  }
  580|       |
  581|    859|#ifndef CURL_DISABLE_DOH
  582|    859|  if(!Curl_is_ipaddr(hostname) && allowDOH && data->set.doh) {
  ------------------
  |  Branch (582:6): [True: 859, False: 0]
  |  Branch (582:35): [True: 762, False: 97]
  |  Branch (582:47): [True: 403, False: 359]
  ------------------
  583|    403|    result = Curl_resolv_announce_start(data, NULL);
  584|    403|    if(result)
  ------------------
  |  Branch (584:8): [True: 0, False: 403]
  ------------------
  585|      0|      goto out;
  586|    403|    if(!async) {
  ------------------
  |  Branch (586:8): [True: 403, False: 0]
  ------------------
  587|    403|      async = hostip_async_new(data, dns_queries, hostname, port,
  588|    403|                               transport, for_proxy, timeout_ms);
  589|    403|      if(!async) {
  ------------------
  |  Branch (589:10): [True: 0, False: 403]
  ------------------
  590|      0|        result = CURLE_OUT_OF_MEMORY;
  591|      0|        goto out;
  592|      0|      }
  593|    403|    }
  594|    403|    result = Curl_doh(data, async);
  595|    403|    goto out;
  596|    403|  }
  597|       |#else
  598|       |  (void)allowDOH;
  599|       |#endif
  600|       |
  601|       |  /* Can we provide the requested IP specifics in resolving? */
  602|    456|  if(!can_resolve_dns_queries(data, dns_queries)) {
  ------------------
  |  Branch (602:6): [True: 0, False: 456]
  ------------------
  603|      0|    result = RESOLV_FAIL(for_proxy);
  ------------------
  |  |   74|      0|  ((for_proxy) ? CURLE_COULDNT_RESOLVE_PROXY : CURLE_COULDNT_RESOLVE_HOST)
  |  |  ------------------
  |  |  |  Branch (74:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  604|      0|    goto out;
  605|      0|  }
  606|       |
  607|    456|#ifdef CURLRES_ASYNCH
  608|    456|  (void)addr;
  609|    456|  if(!async) {
  ------------------
  |  Branch (609:6): [True: 456, False: 0]
  ------------------
  610|    456|    async = hostip_async_new(data, dns_queries, hostname, port,
  611|    456|                             transport, for_proxy, timeout_ms);
  612|    456|    if(!async) {
  ------------------
  |  Branch (612:8): [True: 0, False: 456]
  ------------------
  613|      0|      result = CURLE_OUT_OF_MEMORY;
  614|      0|      goto out;
  615|      0|    }
  616|    456|  }
  617|    456|  result = Curl_async_getaddrinfo(data, async);
  618|    456|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (618:6): [True: 0, False: 456]
  ------------------
  619|       |    /* the answer might be there already. Check. */
  620|      0|    CURLcode r2 = hostip_resolv_take_result(data, async, pdns);
  621|      0|    if(r2)
  ------------------
  |  Branch (621:8): [True: 0, False: 0]
  ------------------
  622|      0|      result = r2;
  623|      0|    else if(*pdns)
  ------------------
  |  Branch (623:13): [True: 0, False: 0]
  ------------------
  624|      0|      result = CURLE_OK;
  625|      0|  }
  626|       |#else
  627|       |  result = Curl_resolv_announce_start(data, NULL);
  628|       |  if(result)
  629|       |    goto out;
  630|       |  addr = Curl_sync_getaddrinfo(data, dns_queries, hostname, port, transport);
  631|       |  if(!addr)
  632|       |    result = RESOLV_FAIL(for_proxy);
  633|       |#endif
  634|       |
  635|  10.5k|out:
  636|  10.5k|  if(!result) {
  ------------------
  |  Branch (636:6): [True: 10.5k, False: 9]
  ------------------
  637|  10.5k|    if(addr) {
  ------------------
  |  Branch (637:8): [True: 9.71k, False: 850]
  ------------------
  638|       |      /* we got a response, create a dns entry, add to cache, return */
  639|  9.71k|      DEBUGASSERT(!*pdns);
  ------------------
  |  | 1081|  9.71k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (639:7): [True: 0, False: 9.71k]
  |  Branch (639:7): [True: 9.71k, False: 0]
  ------------------
  640|  9.71k|      *pdns = Curl_dnscache_mk_entry(data, dns_queries, &addr, hostname, port);
  641|  9.71k|      if(!*pdns)
  ------------------
  |  Branch (641:10): [True: 0, False: 9.71k]
  ------------------
  642|      0|        result = CURLE_OUT_OF_MEMORY;
  643|  9.71k|    }
  644|    850|    else if(!*pdns)
  ------------------
  |  Branch (644:13): [True: 850, False: 0]
  ------------------
  645|    850|      result = CURLE_AGAIN;
  646|  10.5k|  }
  647|      9|  else if(*pdns)
  ------------------
  |  Branch (647:11): [True: 0, False: 9]
  ------------------
  648|      0|    Curl_dns_entry_unlink(data, pdns);
  649|      9|  else if(addr)
  ------------------
  |  Branch (649:11): [True: 0, False: 9]
  ------------------
  650|      0|    Curl_freeaddrinfo(addr);
  651|       |
  652|  10.5k|#ifdef USE_CURL_ASYNC
  653|  10.5k|  if(async) {
  ------------------
  |  Branch (653:6): [True: 859, False: 9.71k]
  ------------------
  654|    859|    if(result == CURLE_AGAIN) { /* still need it, link, return id. */
  ------------------
  |  Branch (654:8): [True: 850, False: 9]
  ------------------
  655|    850|      *presolv_id = async->id;
  656|    850|      async->next = data->state.async;
  657|    850|      data->state.async = async;
  658|    850|    }
  659|      9|    else {
  660|      9|      Curl_async_destroy(data, async);
  661|      9|    }
  662|    859|  }
  663|  10.5k|#endif
  664|  10.5k|  return result;
  665|  10.5k|}
hostip.c:tailmatch:
  338|  1.75k|{
  339|  1.75k|  if(plen > flen)
  ------------------
  |  Branch (339:6): [True: 1.57k, False: 174]
  ------------------
  340|  1.57k|    return FALSE;
  ------------------
  |  | 1058|  1.57k|#define FALSE false
  ------------------
  341|    174|  return curl_strnequal(part, &full[flen - plen], plen);
  342|  1.75k|}
hostip.c:get_localhost:
  248|     48|{
  249|     48|  struct Curl_addrinfo *ca;
  250|     48|  struct Curl_addrinfo *ca6;
  251|     48|  const size_t ss_size = sizeof(struct sockaddr_in);
  252|     48|  const size_t hostlen = strlen(name);
  253|     48|  struct sockaddr_in sa;
  254|     48|  unsigned int ipv4;
  255|     48|  unsigned short port16 = (unsigned short)(port & 0xffff);
  256|       |
  257|       |  /* memset to clear the sa.sin_zero field */
  258|     48|  memset(&sa, 0, sizeof(sa));
  259|     48|  sa.sin_family = AF_INET;
  260|     48|  sa.sin_port = htons(port16);
  261|     48|  if(curlx_inet_pton(AF_INET, "127.0.0.1", (char *)&ipv4) < 1)
  ------------------
  |  |   43|     48|  inet_pton(x, y, z)
  ------------------
  |  Branch (261:6): [True: 0, False: 48]
  ------------------
  262|      0|    return NULL;
  263|     48|  memcpy(&sa.sin_addr, &ipv4, sizeof(ipv4));
  264|       |
  265|     48|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1480|     48|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  266|     48|  if(!ca)
  ------------------
  |  Branch (266:6): [True: 0, False: 48]
  ------------------
  267|      0|    return NULL;
  268|     48|  ca->ai_flags     = 0;
  269|     48|  ca->ai_family    = AF_INET;
  270|     48|  ca->ai_socktype  = SOCK_STREAM;
  271|     48|  ca->ai_protocol  = IPPROTO_TCP;
  272|     48|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  273|     48|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  274|     48|  memcpy(ca->ai_addr, &sa, ss_size);
  275|     48|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  276|     48|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  277|       |
  278|     48|  ca6 = get_localhost6(port, name);
  279|     48|  if(!ca6)
  ------------------
  |  Branch (279:6): [True: 0, False: 48]
  ------------------
  280|      0|    return ca;
  281|     48|  ca6->ai_next = ca;
  282|     48|  return ca6;
  283|     48|}
hostip.c:get_localhost6:
  212|     48|{
  213|     48|  struct Curl_addrinfo *ca;
  214|     48|  const size_t ss_size = sizeof(struct sockaddr_in6);
  215|     48|  const size_t hostlen = strlen(name);
  216|     48|  struct sockaddr_in6 sa6;
  217|     48|  unsigned char ipv6[16];
  218|     48|  unsigned short port16 = (unsigned short)(port & 0xffff);
  219|     48|  ca = curlx_calloc(1, sizeof(struct Curl_addrinfo) + ss_size + hostlen + 1);
  ------------------
  |  | 1480|     48|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  220|     48|  if(!ca)
  ------------------
  |  Branch (220:6): [True: 0, False: 48]
  ------------------
  221|      0|    return NULL;
  222|       |
  223|     48|  memset(&sa6, 0, sizeof(sa6));
  224|     48|  sa6.sin6_family = AF_INET6;
  225|     48|  sa6.sin6_port = htons(port16);
  226|       |
  227|     48|  (void)curlx_inet_pton(AF_INET6, "::1", ipv6);
  ------------------
  |  |   43|     48|  inet_pton(x, y, z)
  ------------------
  228|     48|  memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));
  229|       |
  230|     48|  ca->ai_flags     = 0;
  231|     48|  ca->ai_family    = AF_INET6;
  232|     48|  ca->ai_socktype  = SOCK_STREAM;
  233|     48|  ca->ai_protocol  = IPPROTO_TCP;
  234|     48|  ca->ai_addrlen   = (curl_socklen_t)ss_size;
  235|       |  ca->ai_next      = NULL;
  236|     48|  ca->ai_addr = (void *)((char *)ca + sizeof(struct Curl_addrinfo));
  237|     48|  memcpy(ca->ai_addr, &sa6, ss_size);
  238|     48|  ca->ai_canonname = (char *)ca->ai_addr + ss_size;
  239|     48|  curlx_strcopy(ca->ai_canonname, hostlen + 1, name, hostlen);
  240|     48|  return ca;
  241|     48|}
hostip.c:hostip_async_new:
  390|    859|{
  391|    859|  struct Curl_resolv_async *async;
  392|    859|  size_t hostlen = strlen(hostname);
  393|       |
  394|    859|  if(!data->multi) {
  ------------------
  |  Branch (394:6): [True: 0, False: 859]
  ------------------
  395|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (395:5): [Folded, False: 0]
  |  Branch (395:5): [Folded, False: 0]
  ------------------
  396|      0|    return NULL;
  397|      0|  }
  398|       |
  399|       |  /* struct size already includes the NUL for hostname */
  400|    859|  async = curlx_calloc(1, sizeof(*async) + hostlen);
  ------------------
  |  | 1480|    859|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  401|    859|  if(!async)
  ------------------
  |  Branch (401:6): [True: 0, False: 859]
  ------------------
  402|      0|    return NULL;
  403|       |
  404|       |  /* Give every async resolve operation a "unique" id. This may
  405|       |   * wrap around after a long time, making collisions highly unlikely.
  406|       |   * As we keep the async structs at the easy handle, chances of
  407|       |   * easy `mid plus resolv->id` colliding should be astronomical.
  408|       |   * `resolv_id == 0` is never used. */
  409|    859|  if(data->multi->last_resolv_id == UINT32_MAX)
  ------------------
  |  Branch (409:6): [True: 0, False: 859]
  ------------------
  410|      0|    data->multi->last_resolv_id = 1; /* wrap around */
  411|    859|  else
  412|    859|    data->multi->last_resolv_id++;
  413|    859|  async->id = data->multi->last_resolv_id;
  414|    859|  async->dns_queries = dns_queries;
  415|    859|  async->port = port;
  416|    859|  async->transport = transport;
  417|    859|  async->for_proxy = for_proxy;
  418|    859|  async->start = *Curl_pgrs_now(data);
  419|    859|  async->timeout_ms = timeout_ms;
  420|    859|  if(hostlen) {
  ------------------
  |  Branch (420:6): [True: 859, False: 0]
  ------------------
  421|    859|    memcpy(async->hostname, hostname, hostlen);
  422|    859|    async->is_ipaddr = Curl_is_ipaddr(async->hostname);
  423|    859|    if(async->is_ipaddr)
  ------------------
  |  Branch (423:8): [True: 0, False: 859]
  ------------------
  424|      0|      async->is_ipv4addr = Curl_is_ipv4addr(async->hostname);
  425|    859|  }
  426|       |
  427|    859|  return async;
  428|    859|}
hostip.c:can_resolve_dns_queries:
  355|    456|{
  356|    456|  (void)data;
  357|    456|  if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   56|    456|#define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   51|    456|#define CURL_DNSQ_A           (1U << 0)
  |  |  ------------------
  |  |               #define CURL_DNSQ_IP(x)       (uint8_t)((x)&(CURL_DNSQ_A | CURL_DNSQ_AAAA))
  |  |  ------------------
  |  |  |  |   52|    456|#define CURL_DNSQ_AAAA        (1U << 1)
  |  |  ------------------
  ------------------
                if((CURL_DNSQ_IP(dns_queries) == CURL_DNSQ_AAAA) && !ipv6works(data))
  ------------------
  |  |   52|    456|#define CURL_DNSQ_AAAA        (1U << 1)
  ------------------
  |  Branch (357:6): [True: 14, False: 442]
  |  Branch (357:55): [True: 0, False: 14]
  ------------------
  358|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  359|    456|  return TRUE;
  ------------------
  |  | 1055|    456|#define TRUE true
  ------------------
  360|    456|}
hostip.c:resolv_unix:
  934|    400|{
  935|    400|  struct Curl_addrinfo *addr;
  936|    400|  CURLcode result;
  937|       |
  938|    400|  DEBUGASSERT(unix_path);
  ------------------
  |  | 1081|    400|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (938:3): [True: 0, False: 400]
  |  Branch (938:3): [True: 400, False: 0]
  ------------------
  939|    400|  *pdns = NULL;
  940|       |
  941|    400|  result = Curl_unix2addr(unix_path, abstract_path, &addr);
  942|    400|  if(result) {
  ------------------
  |  Branch (942:6): [True: 1, False: 399]
  ------------------
  943|      1|    if(result == CURLE_TOO_LARGE) {
  ------------------
  |  Branch (943:8): [True: 1, False: 0]
  ------------------
  944|       |      /* Long paths are not supported for now */
  945|      1|      failf(data, "Unix socket path too long: '%s'", unix_path);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  946|      1|      result = CURLE_COULDNT_RESOLVE_HOST;
  947|      1|    }
  948|      1|    return result;
  949|      1|  }
  950|       |
  951|    399|  *pdns = Curl_dnscache_mk_entry(data, 0, &addr, NULL, 0);
  952|    399|  return *pdns ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (952:10): [True: 399, False: 0]
  ------------------
  953|    400|}
hostip.c:hostip_resolv_take_result:
  433|   713k|{
  434|   713k|  CURLcode result;
  435|       |
  436|       |  /* If async resolving is ongoing, this must be set */
  437|   713k|  if(!async)
  ------------------
  |  Branch (437:6): [True: 0, False: 713k]
  ------------------
  438|      0|    return CURLE_FAILED_INIT;
  439|       |
  440|   713k|#ifndef CURL_DISABLE_DOH
  441|   713k|  if(async->doh)
  ------------------
  |  Branch (441:6): [True: 355k, False: 357k]
  ------------------
  442|   355k|    result = Curl_doh_take_result(data, async, pdns);
  443|   357k|  else
  444|   357k|#endif
  445|   357k|  result = Curl_async_take_result(data, async, pdns);
  446|       |
  447|   713k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (447:6): [True: 712k, False: 498]
  ------------------
  448|   712k|    CURL_TRC_DNS(data, "resolve incomplete, queries=%s, responses=%s, "
  ------------------
  |  |  168|   712k|  do {                                 \
  |  |  169|   712k|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|   712k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   712k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.42M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 712k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 712k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.42M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   712k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|   712k|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|   712k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 712k]
  |  |  ------------------
  ------------------
  449|   712k|                 "ongoing=%d for %s:%d",
  450|   712k|                 Curl_resolv_query_str(async->dns_queries),
  451|   712k|                 Curl_resolv_query_str(async->dns_responses),
  452|   712k|                 async->queries_ongoing, async->hostname, async->port);
  453|   712k|    result = CURLE_OK;
  454|   712k|  }
  455|    498|  else if(result) {
  ------------------
  |  Branch (455:11): [True: 433, False: 65]
  ------------------
  456|    433|    result = Curl_async_failed(data, async, NULL);
  457|    433|  }
  458|     65|  else {
  459|     65|    CURL_TRC_DNS(data, "resolve complete for %s:%u",
  ------------------
  |  |  168|     65|  do {                                 \
  |  |  169|     65|    if(CURL_TRC_DNS_is_verbose(data))  \
  |  |  ------------------
  |  |  |  |  137|     65|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_dns)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|     65|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    130|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 65, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 65]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    130|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|     65|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  170|     65|      Curl_trc_dns(data, __VA_ARGS__); \
  |  |  171|     65|  } while(0)
  |  |  ------------------
  |  |  |  Branch (171:11): [Folded, False: 65]
  |  |  ------------------
  ------------------
  460|     65|                 async->hostname, async->port);
  461|     65|    DEBUGASSERT(*pdns);
  ------------------
  |  | 1081|     65|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (461:5): [True: 0, False: 65]
  |  Branch (461:5): [True: 65, False: 0]
  ------------------
  462|     65|  }
  463|       |
  464|   713k|  return result;
  465|   713k|}

Curl_hsts_init:
   67|  15.3k|{
   68|  15.3k|  struct hsts *h = curlx_calloc(1, sizeof(struct hsts));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   69|  15.3k|  if(h) {
  ------------------
  |  Branch (69:6): [True: 15.3k, False: 0]
  ------------------
   70|       |    Curl_llist_init(&h->list, NULL);
   71|  15.3k|  }
   72|  15.3k|  return h;
   73|  15.3k|}
Curl_hsts_cleanup:
   78|  33.2k|{
   79|  33.2k|  struct hsts *h = *hp;
   80|  33.2k|  if(h) {
  ------------------
  |  Branch (80:6): [True: 15.3k, False: 17.8k]
  ------------------
   81|  15.3k|    struct Curl_llist_node *e;
   82|  15.3k|    struct Curl_llist_node *n;
   83|  15.3k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (83:40): [True: 0, False: 15.3k]
  ------------------
   84|      0|      struct stsentry *sts = Curl_node_elem(e);
   85|      0|      n = Curl_node_next(e);
   86|      0|      hsts_free(sts);
  ------------------
  |  |   75|      0|#define hsts_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
   87|      0|    }
   88|  15.3k|    curlx_free(h->filename);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   89|  15.3k|    curlx_free(h);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|       |    *hp = NULL;
   91|  15.3k|  }
   92|  33.2k|}
hsts_check:
  146|    506|{
  147|    506|  struct stsentry *bestsub = NULL;
  148|    506|  if(h) {
  ------------------
  |  Branch (148:6): [True: 506, False: 0]
  ------------------
  149|    506|    time_t now = time(NULL);
  ------------------
  |  |   63|    506|#define time(x) hsts_debugtime(x)
  ------------------
  150|    506|    struct Curl_llist_node *e;
  151|    506|    struct Curl_llist_node *n;
  152|    506|    size_t blen = 0;
  153|       |
  154|    506|    if((hlen > MAX_HSTS_HOSTLEN) || !hlen)
  ------------------
  |  |   42|    506|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (154:8): [True: 3, False: 503]
  |  Branch (154:37): [True: 0, False: 503]
  ------------------
  155|      3|      return NULL;
  156|    503|    if(hostname[hlen - 1] == '.')
  ------------------
  |  Branch (156:8): [True: 15, False: 488]
  ------------------
  157|       |      /* remove the trailing dot */
  158|     15|      --hlen;
  159|       |
  160|    503|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (160:40): [True: 0, False: 503]
  ------------------
  161|      0|      struct stsentry *sts = Curl_node_elem(e);
  162|      0|      size_t ntail;
  163|      0|      n = Curl_node_next(e);
  164|      0|      if(sts->expires <= now) {
  ------------------
  |  Branch (164:10): [True: 0, False: 0]
  ------------------
  165|       |        /* remove expired entries */
  166|      0|        Curl_node_remove(&sts->node);
  167|      0|        hsts_free(sts);
  ------------------
  |  |   75|      0|#define hsts_free(x) curlx_free(x)
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  168|      0|        continue;
  169|      0|      }
  170|      0|      ntail = strlen(sts->host);
  171|      0|      if((subdomain && sts->includeSubDomains) && (ntail < hlen)) {
  ------------------
  |  Branch (171:11): [True: 0, False: 0]
  |  Branch (171:24): [True: 0, False: 0]
  |  Branch (171:51): [True: 0, False: 0]
  ------------------
  172|      0|        size_t offs = hlen - ntail;
  173|      0|        if((hostname[offs - 1] == '.') &&
  ------------------
  |  Branch (173:12): [True: 0, False: 0]
  ------------------
  174|      0|           curl_strnequal(&hostname[offs], sts->host, ntail) &&
  ------------------
  |  Branch (174:12): [True: 0, False: 0]
  ------------------
  175|      0|           (ntail > blen)) {
  ------------------
  |  Branch (175:12): [True: 0, False: 0]
  ------------------
  176|       |          /* save the tail match with the longest tail */
  177|      0|          bestsub = sts;
  178|      0|          blen = ntail;
  179|      0|        }
  180|      0|      }
  181|       |      /* avoid curl_strequal because the hostname is not null-terminated */
  182|      0|      if((hlen == ntail) && curl_strnequal(hostname, sts->host, hlen))
  ------------------
  |  Branch (182:10): [True: 0, False: 0]
  |  Branch (182:29): [True: 0, False: 0]
  ------------------
  183|      0|        return sts;
  184|      0|    }
  185|    503|  }
  186|    503|  return bestsub;
  187|    506|}
Curl_hsts_save:
  349|  33.2k|{
  350|  33.2k|  struct Curl_llist_node *e;
  351|  33.2k|  struct Curl_llist_node *n;
  352|  33.2k|  CURLcode result = CURLE_OK;
  353|  33.2k|  FILE *out;
  354|  33.2k|  char *tempstore = NULL;
  355|       |
  356|  33.2k|  if(!h)
  ------------------
  |  Branch (356:6): [True: 17.8k, False: 15.3k]
  ------------------
  357|       |    /* no cache activated */
  358|  17.8k|    return CURLE_OK;
  359|       |
  360|       |  /* if no new name is given, use the one we stored from the load */
  361|  15.3k|  if(!file && h->filename)
  ------------------
  |  Branch (361:6): [True: 3, False: 15.3k]
  |  Branch (361:15): [True: 0, False: 3]
  ------------------
  362|      0|    file = h->filename;
  363|       |
  364|  15.3k|  if((h->flags & CURLHSTS_READONLYFILE) || !file || !file[0])
  ------------------
  |  | 1074|  15.3k|#define CURLHSTS_READONLYFILE (1L << 1)
  ------------------
  |  Branch (364:6): [True: 0, False: 15.3k]
  |  Branch (364:44): [True: 3, False: 15.3k]
  |  Branch (364:53): [True: 0, False: 15.3k]
  ------------------
  365|       |    /* marked as read-only, no file or zero length filename */
  366|      3|    goto skipsave;
  367|       |
  368|  15.3k|  result = Curl_fopen(data, file, &out, &tempstore);
  369|  15.3k|  if(!result) {
  ------------------
  |  Branch (369:6): [True: 15.3k, False: 0]
  ------------------
  370|  15.3k|    fputs("# Your HSTS cache. https://curl.se/docs/hsts.html\n"
  371|  15.3k|          "# This file was generated by libcurl! Edit at your own risk.\n",
  372|  15.3k|          out);
  373|  15.3k|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (373:40): [True: 0, False: 15.3k]
  ------------------
  374|      0|      struct stsentry *sts = Curl_node_elem(e);
  375|      0|      n = Curl_node_next(e);
  376|      0|      result = hsts_out(sts, out);
  377|      0|      if(result)
  ------------------
  |  Branch (377:10): [True: 0, False: 0]
  ------------------
  378|      0|        break;
  379|      0|    }
  380|  15.3k|    curlx_fclose(out);
  ------------------
  |  |   79|  15.3k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  381|  15.3k|    if(!result && tempstore && curlx_rename(tempstore, file))
  ------------------
  |  |   70|      0|#define curlx_rename            rename
  ------------------
  |  Branch (381:8): [True: 15.3k, False: 0]
  |  Branch (381:19): [True: 0, False: 15.3k]
  |  Branch (381:32): [True: 0, False: 0]
  ------------------
  382|      0|      result = CURLE_WRITE_ERROR;
  383|       |
  384|  15.3k|    if(result && tempstore)
  ------------------
  |  Branch (384:8): [True: 0, False: 15.3k]
  |  Branch (384:18): [True: 0, False: 0]
  ------------------
  385|      0|      unlink(tempstore);
  386|  15.3k|  }
  387|  15.3k|  curlx_free(tempstore);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  388|  15.3k|skipsave:
  389|  15.3k|  if(data->set.hsts_write) {
  ------------------
  |  Branch (389:6): [True: 0, False: 15.3k]
  ------------------
  390|       |    /* if there is a write callback */
  391|      0|    struct curl_index i; /* count */
  392|      0|    i.total = Curl_llist_count(&h->list);
  393|      0|    i.index = 0;
  394|      0|    for(e = Curl_llist_head(&h->list); e; e = n) {
  ------------------
  |  Branch (394:40): [True: 0, False: 0]
  ------------------
  395|      0|      struct stsentry *sts = Curl_node_elem(e);
  396|      0|      bool stop;
  397|      0|      n = Curl_node_next(e);
  398|      0|      result = hsts_push(data, &i, sts, &stop);
  399|      0|      if(result || stop)
  ------------------
  |  Branch (399:10): [True: 0, False: 0]
  |  Branch (399:20): [True: 0, False: 0]
  ------------------
  400|      0|        break;
  401|      0|      i.index++;
  402|      0|    }
  403|      0|  }
  404|  15.3k|  return result;
  405|  15.3k|}
Curl_hsts_loadfile:
  584|  11.7k|{
  585|  11.7k|  DEBUGASSERT(h);
  ------------------
  |  | 1081|  11.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (585:3): [True: 0, False: 11.7k]
  |  Branch (585:3): [True: 11.7k, False: 0]
  ------------------
  586|  11.7k|  (void)data;
  587|  11.7k|  return hsts_load(h, file);
  588|  11.7k|}
Curl_hsts_loadcb:
  594|  12.4k|{
  595|  12.4k|  if(h)
  ------------------
  |  Branch (595:6): [True: 11.7k, False: 751]
  ------------------
  596|  11.7k|    return hsts_pull(data, h);
  597|    751|  return CURLE_OK;
  598|  12.4k|}
Curl_hsts_loadfiles:
  601|  12.4k|{
  602|  12.4k|  CURLcode result = CURLE_OK;
  603|  12.4k|  struct curl_slist *l = data->state.hstslist;
  604|  12.4k|  if(l) {
  ------------------
  |  Branch (604:6): [True: 11.7k, False: 751]
  ------------------
  605|  11.7k|    Curl_share_lock(data, CURL_LOCK_DATA_HSTS, CURL_LOCK_ACCESS_SINGLE);
  606|       |
  607|  23.4k|    while(l) {
  ------------------
  |  Branch (607:11): [True: 11.7k, False: 11.7k]
  ------------------
  608|  11.7k|      result = Curl_hsts_loadfile(data, data->hsts, l->data);
  609|  11.7k|      if(result)
  ------------------
  |  Branch (609:10): [True: 0, False: 11.7k]
  ------------------
  610|      0|        break;
  611|  11.7k|      l = l->next;
  612|  11.7k|    }
  613|  11.7k|    Curl_share_unlock(data, CURL_LOCK_DATA_HSTS);
  614|  11.7k|  }
  615|  12.4k|  return result;
  616|  12.4k|}
Curl_hsts_applies:
  619|    506|{
  620|       |  return !!hsts_check(h, dest->hostname, strlen(dest->hostname), TRUE);
  ------------------
  |  | 1055|    506|#define TRUE true
  ------------------
  621|    506|}
hsts.c:hsts_debugtime:
   51|    506|{
   52|    506|  const char *timestr = getenv("CURL_TIME");
   53|    506|  (void)unused;
   54|    506|  if(timestr) {
  ------------------
  |  Branch (54:6): [True: 0, False: 506]
  ------------------
   55|      0|    curl_off_t val;
   56|      0|    if(!curlx_str_number(&timestr, &val, TIME_T_MAX))
  ------------------
  |  |  614|      0|#  define TIME_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (56:8): [True: 0, False: 0]
  ------------------
   57|      0|      val += (curl_off_t)deltatime;
   58|      0|    return (time_t)val;
   59|      0|  }
   60|    506|  return time(NULL);
   61|    506|}
hsts.c:hsts_load:
  539|  11.7k|{
  540|  11.7k|  CURLcode result = CURLE_OK;
  541|  11.7k|  FILE *fp;
  542|       |
  543|       |  /* we need a private copy of the filename so that the hsts cache file
  544|       |     name survives an easy handle reset */
  545|  11.7k|  curlx_free(h->filename);
  ------------------
  |  | 1483|  11.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  546|  11.7k|  h->filename = curlx_strdup(file);
  ------------------
  |  | 1477|  11.7k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  547|  11.7k|  if(!h->filename)
  ------------------
  |  Branch (547:6): [True: 0, False: 11.7k]
  ------------------
  548|      0|    return CURLE_OUT_OF_MEMORY;
  549|       |
  550|  11.7k|  fp = curlx_fopen(file, FOPEN_READTEXT);
  ------------------
  |  |   74|  11.7k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  551|  11.7k|  if(fp) {
  ------------------
  |  Branch (551:6): [True: 11.7k, False: 0]
  ------------------
  552|  11.7k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  11.7k|#define curlx_struct_stat       struct stat
  ------------------
  553|  11.7k|    if((curlx_fstat(fileno(fp), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  11.7k|#define curlx_fstat             fstat
  ------------------
  |  Branch (553:8): [True: 0, False: 11.7k]
  |  Branch (553:50): [True: 11.7k, False: 0]
  ------------------
  554|  11.7k|      struct dynbuf buf;
  555|  11.7k|      bool eof = FALSE;
  ------------------
  |  | 1058|  11.7k|#define FALSE false
  ------------------
  556|  11.7k|      curlx_dyn_init(&buf, MAX_HSTS_LINE);
  ------------------
  |  |   41|  11.7k|#define MAX_HSTS_LINE    4095
  ------------------
  557|  11.7k|      do {
  558|  11.7k|        result = Curl_get_line(&buf, fp, &eof);
  559|  11.7k|        if(!result) {
  ------------------
  |  Branch (559:12): [True: 11.7k, False: 0]
  ------------------
  560|  11.7k|          const char *lineptr = curlx_dyn_ptr(&buf);
  561|  11.7k|          curlx_str_passblanks(&lineptr);
  562|       |
  563|       |          /* Skip empty or commented lines, since we know the line will have
  564|       |             a trailing newline from Curl_get_line we can treat length 1 as
  565|       |             empty. */
  566|  11.7k|          if((*lineptr == '#') || strlen(lineptr) <= 1)
  ------------------
  |  Branch (566:14): [True: 0, False: 11.7k]
  |  Branch (566:35): [True: 11.7k, False: 0]
  ------------------
  567|  11.7k|            continue;
  568|       |
  569|      0|          hsts_add(h, lineptr);
  570|      0|        }
  571|  11.7k|      } while(!result && !eof);
  ------------------
  |  Branch (571:15): [True: 11.7k, False: 0]
  |  Branch (571:26): [True: 0, False: 11.7k]
  ------------------
  572|  11.7k|      curlx_dyn_free(&buf); /* free the line buffer */
  573|  11.7k|    }
  574|  11.7k|    curlx_fclose(fp);
  ------------------
  |  |   79|  11.7k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  575|  11.7k|  }
  576|  11.7k|  return result;
  577|  11.7k|}
hsts.c:hsts_pull:
  491|  11.7k|{
  492|       |  /* if the HSTS read callback is set, use it */
  493|  11.7k|  if(data->set.hsts_read) {
  ------------------
  |  Branch (493:6): [True: 0, False: 11.7k]
  ------------------
  494|      0|    CURLSTScode sc;
  495|      0|    DEBUGASSERT(h);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (495:5): [True: 0, False: 0]
  |  Branch (495:5): [True: 0, False: 0]
  ------------------
  496|      0|    do {
  497|      0|      char buffer[MAX_HSTS_HOSTLEN + 1];
  498|      0|      struct curl_hstsentry e;
  499|      0|      e.name = buffer;
  500|      0|      e.namelen = sizeof(buffer) - 1;
  501|      0|      e.includeSubDomains = FALSE; /* default */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  502|      0|      e.expire[0] = 0;
  503|      0|      e.expire[MAX_HSTS_DATELEN] = 0;
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  504|      0|      e.name[0] = 0; /* to make it clean */
  505|      0|      e.name[MAX_HSTS_HOSTLEN] = 0;
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  506|      0|      sc = data->set.hsts_read(data, &e, data->set.hsts_read_userp);
  507|      0|      if(sc == CURLSTS_OK) {
  ------------------
  |  Branch (507:10): [True: 0, False: 0]
  ------------------
  508|      0|        CURLcode result;
  509|      0|        const char *date = e.expire;
  510|      0|        if(!e.name[0] || e.expire[MAX_HSTS_DATELEN] ||
  ------------------
  |  |   43|      0|#define MAX_HSTS_DATELEN 17
  ------------------
  |  Branch (510:12): [True: 0, False: 0]
  |  Branch (510:26): [True: 0, False: 0]
  ------------------
  511|      0|           e.name[MAX_HSTS_HOSTLEN])
  ------------------
  |  |   42|      0|#define MAX_HSTS_HOSTLEN 2048
  ------------------
  |  Branch (511:12): [True: 0, False: 0]
  ------------------
  512|       |          /* bail out if no name was stored or if a null-terminator is gone */
  513|      0|          return CURLE_BAD_FUNCTION_ARGUMENT;
  514|      0|        if(!date[0])
  ------------------
  |  Branch (514:12): [True: 0, False: 0]
  ------------------
  515|      0|          date = UNLIMITED;
  ------------------
  |  |   44|      0|#define UNLIMITED        "unlimited"
  ------------------
  516|      0|        result = hsts_add_host_expire(h, e.name, strlen(e.name),
  517|      0|                                      date, strlen(date),
  518|       |                                      /* bitfield to bool conversion: */
  519|      0|                                      e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
                                                    e.includeSubDomains ? TRUE : FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  |  Branch (519:39): [True: 0, False: 0]
  ------------------
  520|      0|        if(result)
  ------------------
  |  Branch (520:12): [True: 0, False: 0]
  ------------------
  521|      0|          return result;
  522|      0|      }
  523|      0|      else if(sc == CURLSTS_FAIL)
  ------------------
  |  Branch (523:15): [True: 0, False: 0]
  ------------------
  524|      0|        return CURLE_ABORTED_BY_CALLBACK;
  525|      0|    } while(sc == CURLSTS_OK);
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  ------------------
  526|      0|  }
  527|  11.7k|  return CURLE_OK;
  528|  11.7k|}

Curl_http_neg_init:
   89|  12.4k|{
   90|  12.4k|  memset(neg, 0, sizeof(*neg));
   91|  12.4k|  neg->accept_09 = data->set.http09_allowed;
   92|  12.4k|  switch(data->set.httpwant) {
   93|      2|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2315|      2|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (93:3): [True: 2, False: 12.4k]
  ------------------
   94|      2|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      2|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   95|      2|    neg->only_10 = TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
   96|      2|    break;
   97|      1|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2316|      1|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (97:3): [True: 1, False: 12.4k]
  ------------------
   98|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V1x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
   99|      1|    break;
  100|      1|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2317|      1|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (100:3): [True: 1, False: 12.4k]
  ------------------
  101|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|      1|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|      1|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  102|      1|    neg->h2_upgrade = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  103|      1|    break;
  104|    753|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2318|    753|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (104:3): [True: 753, False: 11.6k]
  ------------------
  105|    753|    neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|    753|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|    753|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  106|    753|    break;
  107|      1|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2320|      1|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (107:3): [True: 1, False: 12.4k]
  ------------------
  108|      1|    neg->wanted = neg->allowed = (CURL_HTTP_V2x);
  ------------------
  |  |   41|      1|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  109|      1|    data->state.http_neg.h2_prior_knowledge = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  110|      1|    break;
  111|      0|  case CURL_HTTP_VERSION_3:
  ------------------
  |  | 2322|      0|#define CURL_HTTP_VERSION_3     30L /* Use HTTP/3, fallback to HTTP/2 or
  ------------------
  |  Branch (111:3): [True: 0, False: 12.4k]
  ------------------
  112|      0|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  113|      0|    neg->allowed = neg->wanted;
  114|      0|    break;
  115|      0|  case CURL_HTTP_VERSION_3ONLY:
  ------------------
  |  | 2326|      0|#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
  ------------------
  |  Branch (115:3): [True: 0, False: 12.4k]
  ------------------
  116|      0|    neg->wanted = neg->allowed = (CURL_HTTP_V3x);
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  117|      0|    break;
  118|  11.6k|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2312|  11.6k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (118:3): [True: 11.6k, False: 758]
  ------------------
  119|  11.6k|  default:
  ------------------
  |  Branch (119:3): [True: 0, False: 12.4k]
  ------------------
  120|  11.6k|    neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  11.6k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  11.6k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  121|  11.6k|    neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   40|  11.6k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   41|  11.6k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                  neg->allowed = (CURL_HTTP_V1x | CURL_HTTP_V2x | CURL_HTTP_V3x);
  ------------------
  |  |   42|  11.6k|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  122|  11.6k|    break;
  123|  12.4k|  }
  124|  12.4k|}
Curl_http_setup_conn:
  128|    660|{
  129|       |  /* allocate the HTTP-specific struct for the Curl_easy, only to survive
  130|       |     during this request */
  131|    660|  if(data->state.http_neg.wanted == CURL_HTTP_V3x) {
  ------------------
  |  |   42|    660|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (131:6): [True: 0, False: 660]
  ------------------
  132|       |    /* only HTTP/3, needs to work */
  133|      0|    CURLcode result = Curl_conn_may_http3(data, conn, conn->transport_wanted);
  134|      0|    if(result)
  ------------------
  |  Branch (134:8): [True: 0, False: 0]
  ------------------
  135|      0|      return result;
  136|      0|  }
  137|    660|  return CURLE_OK;
  138|    660|}
Curl_checkProxyheaders:
  154|  2.67k|{
  155|  2.67k|  struct curl_slist *head;
  156|       |
  157|  2.67k|  for(head = (conn->bits.proxy && data->set.sep_headers) ?
  ------------------
  |  Branch (157:15): [True: 2.67k, False: 0]
  |  Branch (157:35): [True: 2.16k, False: 510]
  ------------------
  158|  2.16k|        data->set.proxyheaders : data->set.headers;
  159|  14.5k|      head; head = head->next) {
  ------------------
  |  Branch (159:7): [True: 11.8k, False: 2.67k]
  ------------------
  160|  11.8k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (160:8): [True: 8, False: 11.8k]
  ------------------
  161|      8|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|      8|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 3, False: 5]
  |  |  |  Branch (26:45): [True: 1, False: 4]
  |  |  ------------------
  ------------------
  162|      4|      return head->data;
  163|  11.8k|  }
  164|       |
  165|  2.67k|  return NULL;
  166|  2.67k|}
Curl_copy_header_value:
  229|  22.5k|{
  230|  22.5k|  struct Curl_str out;
  231|       |
  232|       |  /* find the end of the header name */
  233|  22.5k|  if(!curlx_str_until(&header, &out, MAX_HTTP_RESP_HEADER_SIZE, ':') &&
  ------------------
  |  |  153|  22.5k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (233:6): [True: 22.5k, False: 0]
  ------------------
  234|  22.5k|     !curlx_str_single(&header, ':')) {
  ------------------
  |  Branch (234:6): [True: 22.5k, False: 0]
  ------------------
  235|  22.5k|    curlx_str_untilnl(&header, &out, MAX_HTTP_RESP_HEADER_SIZE);
  ------------------
  |  |  153|  22.5k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  236|  22.5k|    curlx_str_trimblanks(&out);
  237|  22.5k|    return curlx_memdup0(curlx_str(&out), curlx_strlen(&out));
  ------------------
  |  |   49|  22.5k|#define curlx_str(x)    ((x)->str)
  ------------------
                  return curlx_memdup0(curlx_str(&out), curlx_strlen(&out));
  ------------------
  |  |   50|  22.5k|#define curlx_strlen(x) ((x)->len)
  ------------------
  238|  22.5k|  }
  239|       |  /* bad input, should never happen */
  240|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (240:3): [Folded, False: 0]
  |  Branch (240:3): [Folded, False: 0]
  ------------------
  241|      0|  return NULL;
  242|      0|}
Curl_http_auth_act:
  551|  12.2k|{
  552|  12.2k|  struct connectdata *conn = data->conn;
  553|  12.2k|  bool pickhost = FALSE;
  ------------------
  |  | 1058|  12.2k|#define FALSE false
  ------------------
  554|  12.2k|  bool pickproxy = FALSE;
  ------------------
  |  | 1058|  12.2k|#define FALSE false
  ------------------
  555|  12.2k|  CURLcode result = CURLE_OK;
  556|  12.2k|  unsigned long authmask = ~0UL;
  557|       |
  558|  12.2k|  if(!Curl_creds_has_oauth_bearer(data->state.creds))
  ------------------
  |  |   73|  12.2k|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 8.81k, False: 3.47k]
  |  |  |  Branch (73:50): [True: 1.13k, False: 7.68k]
  |  |  ------------------
  ------------------
  559|  11.1k|    authmask &= (unsigned long)~CURLAUTH_BEARER;
  ------------------
  |  |  844|  11.1k|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  560|       |
  561|  12.2k|  if(100 <= data->req.httpcode && data->req.httpcode <= 199)
  ------------------
  |  Branch (561:6): [True: 12.2k, False: 65]
  |  Branch (561:35): [True: 3, False: 12.2k]
  ------------------
  562|       |    /* this is a transient response code, ignore */
  563|      3|    return CURLE_OK;
  564|       |
  565|  12.2k|  if(data->state.authproblem)
  ------------------
  |  Branch (565:6): [True: 64, False: 12.2k]
  ------------------
  566|     64|    return data->set.http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK;
  ------------------
  |  Branch (566:12): [True: 4, False: 60]
  ------------------
  567|       |
  568|  12.2k|  if(data->state.creds &&
  ------------------
  |  Branch (568:6): [True: 8.76k, False: 3.46k]
  ------------------
  569|  8.76k|     ((data->req.httpcode == 401) ||
  ------------------
  |  Branch (569:7): [True: 252, False: 8.51k]
  ------------------
  570|  8.51k|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (570:8): [True: 0, False: 8.51k]
  |  Branch (570:29): [True: 0, False: 0]
  ------------------
  571|    252|    pickhost = pickoneauth(&data->state.authhost, authmask);
  572|    252|    if(!pickhost)
  ------------------
  |  Branch (572:8): [True: 35, False: 217]
  ------------------
  573|     35|      data->state.authproblem = TRUE;
  ------------------
  |  | 1055|     35|#define TRUE true
  ------------------
  574|    217|    else
  575|    217|      data->info.httpauthpicked = data->state.authhost.picked;
  576|    252|    if(data->state.authhost.picked == CURLAUTH_NTLM &&
  ------------------
  |  |  838|    504|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (576:8): [True: 0, False: 252]
  ------------------
  577|      0|       (data->req.httpversion_sent > 11)) {
  ------------------
  |  Branch (577:8): [True: 0, False: 0]
  ------------------
  578|      0|      infof(data, "Forcing HTTP/1.1 for NTLM");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  579|      0|      connclose(conn, "Force HTTP/1.1 connection");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  580|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  581|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  582|      0|    }
  583|    252|  }
  584|  12.2k|#ifndef CURL_DISABLE_PROXY
  585|  12.2k|  if(conn->http_proxy.creds &&
  ------------------
  |  Branch (585:6): [True: 110, False: 12.1k]
  ------------------
  586|    110|     ((data->req.httpcode == 407) ||
  ------------------
  |  Branch (586:7): [True: 37, False: 73]
  ------------------
  587|     73|      (data->req.authneg && data->req.httpcode < 300))) {
  ------------------
  |  Branch (587:8): [True: 0, False: 73]
  |  Branch (587:29): [True: 0, False: 0]
  ------------------
  588|     37|    pickproxy = pickoneauth(&data->state.authproxy,
  589|     37|                            authmask & ~CURLAUTH_BEARER);
  ------------------
  |  |  844|     37|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  590|     37|    if(!pickproxy)
  ------------------
  |  Branch (590:8): [True: 13, False: 24]
  ------------------
  591|     13|      data->state.authproblem = TRUE;
  ------------------
  |  | 1055|     13|#define TRUE true
  ------------------
  592|     24|    else
  593|     24|      data->info.proxyauthpicked = data->state.authproxy.picked;
  594|     37|  }
  595|  12.2k|#endif
  596|       |
  597|  12.2k|  if(pickhost || pickproxy) {
  ------------------
  |  Branch (597:6): [True: 217, False: 12.0k]
  |  Branch (597:18): [True: 24, False: 11.9k]
  ------------------
  598|    241|    result = http_perhapsrewind(data, conn);
  599|    241|    if(result)
  ------------------
  |  Branch (599:8): [True: 0, False: 241]
  ------------------
  600|      0|      return result;
  601|       |
  602|       |    /* In case this is GSS auth, the newurl field is already allocated so
  603|       |       we must make sure to free it before allocating a new one. As figured
  604|       |       out in bug #2284386 */
  605|    241|    curlx_free(data->req.newurl);
  ------------------
  |  | 1483|    241|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  606|       |    /* clone URL */
  607|    241|    data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|    241|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|    241|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  608|    241|    if(!data->req.newurl)
  ------------------
  |  Branch (608:8): [True: 0, False: 241]
  ------------------
  609|      0|      return CURLE_OUT_OF_MEMORY;
  610|    241|  }
  611|  11.9k|  else if((data->req.httpcode < 300) &&
  ------------------
  |  Branch (611:11): [True: 174, False: 11.8k]
  ------------------
  612|    174|          !data->state.authhost.done &&
  ------------------
  |  Branch (612:11): [True: 9, False: 165]
  ------------------
  613|      9|          data->req.authneg) {
  ------------------
  |  Branch (613:11): [True: 0, False: 9]
  ------------------
  614|       |    /* no (known) authentication available,
  615|       |       authentication is not "done" yet and
  616|       |       no authentication seems to be required and
  617|       |       we did not try HEAD or GET */
  618|      0|    if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (618:8): [True: 0, False: 0]
  ------------------
  619|      0|       (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (619:8): [True: 0, False: 0]
  ------------------
  620|       |      /* clone URL */
  621|      0|      data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  622|      0|      if(!data->req.newurl)
  ------------------
  |  Branch (622:10): [True: 0, False: 0]
  ------------------
  623|      0|        return CURLE_OUT_OF_MEMORY;
  624|      0|      data->state.authhost.done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  625|      0|    }
  626|      0|  }
  627|  12.2k|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (627:6): [True: 9, False: 12.2k]
  ------------------
  628|      9|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|      9|#define failf Curl_failf
  ------------------
  629|      9|          data->req.httpcode);
  630|      9|    result = CURLE_HTTP_RETURNED_ERROR;
  631|      9|  }
  632|       |
  633|  12.2k|  return result;
  634|  12.2k|}
Curl_http_output_auth:
  773|  18.1k|{
  774|  18.1k|  CURLcode result = CURLE_OK;
  775|  18.1k|  struct auth *authhost;
  776|  18.1k|  struct auth *authproxy;
  777|  18.1k|  const char *path_and_query = path;
  778|  18.1k|  char *tmp_str = NULL;
  779|       |
  780|  18.1k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  18.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (780:3): [True: 0, False: 18.1k]
  |  Branch (780:3): [True: 18.1k, False: 0]
  ------------------
  781|  18.1k|  authhost = &data->state.authhost;
  782|  18.1k|  authproxy = &data->state.authproxy;
  783|       |
  784|  18.1k|  if(
  785|  18.1k|#ifndef CURL_DISABLE_PROXY
  786|  18.1k|    (!conn->bits.httpproxy || !conn->http_proxy.creds) &&
  ------------------
  |  Branch (786:6): [True: 17.2k, False: 905]
  |  Branch (786:31): [True: 558, False: 347]
  ------------------
  787|  17.8k|#endif
  788|       |#ifdef USE_SPNEGO
  789|       |    !(authhost->want & CURLAUTH_NEGOTIATE) &&
  790|       |    !(authproxy->want & CURLAUTH_NEGOTIATE) &&
  791|       |#endif
  792|  17.8k|    !data->state.creds) {
  ------------------
  |  Branch (792:5): [True: 6.00k, False: 11.8k]
  ------------------
  793|       |    /* no authentication with no user or password */
  794|  6.00k|    authhost->done = TRUE;
  ------------------
  |  | 1055|  6.00k|#define TRUE true
  ------------------
  795|  6.00k|    authproxy->done = TRUE;
  ------------------
  |  | 1055|  6.00k|#define TRUE true
  ------------------
  796|  6.00k|    result = CURLE_OK;
  797|  6.00k|    goto out;
  798|  6.00k|  }
  799|       |
  800|  12.1k|  if(query) {
  ------------------
  |  Branch (800:6): [True: 0, False: 12.1k]
  ------------------
  801|      0|    tmp_str = curl_maprintf("%s?%s", path, query);
  802|      0|    if(!tmp_str) {
  ------------------
  |  Branch (802:8): [True: 0, False: 0]
  ------------------
  803|      0|      result = CURLE_OUT_OF_MEMORY;
  804|      0|      goto out;
  805|      0|    }
  806|      0|    path_and_query = tmp_str;
  807|      0|  }
  808|       |
  809|  12.1k|  if(authhost->want && !authhost->picked)
  ------------------
  |  Branch (809:6): [True: 12.1k, False: 61]
  |  Branch (809:24): [True: 3.95k, False: 8.14k]
  ------------------
  810|       |    /* The app has selected one or more methods, but none has been picked
  811|       |       so far by a server round-trip. Then we set the picked one to the
  812|       |       want one, and if this is one single bit it will be used instantly. */
  813|  3.95k|    authhost->picked = authhost->want;
  814|       |
  815|  12.1k|  if(authproxy->want && !authproxy->picked)
  ------------------
  |  Branch (815:6): [True: 12.1k, False: 15]
  |  Branch (815:25): [True: 3.96k, False: 8.18k]
  ------------------
  816|       |    /* The app has selected one or more methods, but none has been picked so
  817|       |       far by a proxy round-trip. Then we set the picked one to the want one,
  818|       |       and if this is one single bit it will be used instantly. */
  819|  3.96k|    authproxy->picked = authproxy->want;
  820|       |
  821|  12.1k|#ifndef CURL_DISABLE_PROXY
  822|       |  /* Send proxy authentication header if needed */
  823|  12.1k|  if(conn->bits.httpproxy && (!conn->bits.tunnel_proxy || is_connect)) {
  ------------------
  |  Branch (823:6): [True: 811, False: 11.3k]
  |  Branch (823:31): [True: 0, False: 811]
  |  Branch (823:59): [True: 731, False: 80]
  ------------------
  824|    731|    result = output_auth_headers(data, conn, authproxy, request,
  825|    731|                                 path_and_query, TRUE);
  ------------------
  |  | 1055|    731|#define TRUE true
  ------------------
  826|    731|    if(result)
  ------------------
  |  Branch (826:8): [True: 0, False: 731]
  ------------------
  827|      0|      goto out;
  828|    731|  }
  829|  11.4k|  else
  830|       |#else
  831|       |  (void)is_connect;
  832|       |#endif /* CURL_DISABLE_PROXY */
  833|       |    /* we have no proxy so let's pretend we are done authenticating
  834|       |       with it */
  835|  11.4k|    authproxy->done = TRUE;
  ------------------
  |  | 1055|  11.4k|#define TRUE true
  ------------------
  836|       |
  837|       |  /* Either we have credentials for the origin we talk to or
  838|       |     performing authentication is allowed here */
  839|  12.1k|  if(data->state.creds || Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (839:6): [True: 11.9k, False: 223]
  |  Branch (839:27): [True: 223, False: 0]
  ------------------
  840|  12.1k|    result = output_auth_headers(data, conn, authhost, request,
  841|  12.1k|                                 path_and_query, FALSE);
  ------------------
  |  | 1058|  12.1k|#define FALSE false
  ------------------
  842|      0|  else
  843|      0|    authhost->done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  844|       |
  845|  12.1k|  if(((authhost->multipass && !authhost->done) ||
  ------------------
  |  Branch (845:8): [True: 224, False: 11.9k]
  |  Branch (845:31): [True: 224, False: 0]
  ------------------
  846|  11.9k|      (authproxy->multipass && !authproxy->done)) &&
  ------------------
  |  Branch (846:8): [True: 14, False: 11.9k]
  |  Branch (846:32): [True: 14, False: 0]
  ------------------
  847|    238|     (httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (847:6): [True: 0, False: 238]
  ------------------
  848|      0|     (httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (848:6): [True: 0, False: 0]
  ------------------
  849|       |    /* Auth is required and we are not authenticated yet. Make a PUT or POST
  850|       |       with content-length zero as a "probe". */
  851|      0|    data->req.authneg = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  852|      0|  }
  853|  12.1k|  else
  854|  12.1k|    data->req.authneg = FALSE;
  ------------------
  |  | 1058|  12.1k|#define FALSE false
  ------------------
  855|       |
  856|  18.1k|out:
  857|  18.1k|  curlx_free(tmp_str);
  ------------------
  |  | 1483|  18.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  858|  18.1k|  return result;
  859|  12.1k|}
Curl_http_input_auth:
 1034|  2.30k|{
 1035|       |  /*
 1036|       |   * This resource requires authentication
 1037|       |   */
 1038|  2.30k|#if defined(USE_SPNEGO) ||                      \
 1039|  2.30k|  defined(USE_NTLM) ||                          \
 1040|  2.30k|  !defined(CURL_DISABLE_DIGEST_AUTH) ||         \
 1041|  2.30k|  !defined(CURL_DISABLE_BASIC_AUTH) ||          \
 1042|  2.30k|  !defined(CURL_DISABLE_BEARER_AUTH)
 1043|       |
 1044|  2.30k|  uint32_t *availp;
 1045|  2.30k|  struct auth *authp;
 1046|  2.30k|  CURLcode result = CURLE_OK;
 1047|  2.30k|  DEBUGASSERT(auth);
  ------------------
  |  | 1081|  2.30k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1047:3): [True: 0, False: 2.30k]
  |  Branch (1047:3): [True: 2.30k, False: 0]
  ------------------
 1048|  2.30k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  2.30k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1048:3): [True: 0, False: 2.30k]
  |  Branch (1048:3): [True: 2.30k, False: 0]
  ------------------
 1049|       |
 1050|  2.30k|  if(proxy) {
  ------------------
  |  Branch (1050:6): [True: 902, False: 1.40k]
  ------------------
 1051|    902|    availp = &data->info.proxyauthavail;
 1052|    902|    authp = &data->state.authproxy;
 1053|    902|  }
 1054|  1.40k|  else {
 1055|  1.40k|    availp = &data->info.httpauthavail;
 1056|  1.40k|    authp = &data->state.authhost;
 1057|  1.40k|  }
 1058|       |
 1059|       |  /*
 1060|       |   * Here we check if we want the specific single authentication (using ==) and
 1061|       |   * if we do, we initiate usage of it.
 1062|       |   *
 1063|       |   * If the provided authentication is wanted as one out of several accepted
 1064|       |   * types (using &), we OR this authentication type to the authavail
 1065|       |   * variable.
 1066|       |   *
 1067|       |   * Note:
 1068|       |   *
 1069|       |   * ->picked is first set to the 'want' value (one or more bits) before the
 1070|       |   * request is sent, and then it is again set _after_ all response 401/407
 1071|       |   * headers have been received but then only to a single preferred method
 1072|       |   * (bit).
 1073|       |   */
 1074|       |
 1075|   178k|  while(*auth) {
  ------------------
  |  Branch (1075:9): [True: 178k, False: 492]
  ------------------
 1076|       |#ifdef USE_SPNEGO
 1077|       |    if(authcmp("Negotiate", auth))
 1078|       |      result = auth_spnego(data, proxy, auth, authp, availp);
 1079|       |#endif
 1080|       |#ifdef USE_NTLM
 1081|       |    if(!result && authcmp("NTLM", auth))
 1082|       |      result = auth_ntlm(data, proxy, auth, authp, availp);
 1083|       |#endif
 1084|   178k|#ifndef CURL_DISABLE_DIGEST_AUTH
 1085|   178k|    if(!result && authcmp("Digest", auth))
  ------------------
  |  Branch (1085:8): [True: 178k, False: 0]
  |  Branch (1085:19): [True: 48.9k, False: 129k]
  ------------------
 1086|  48.9k|      result = auth_digest(data, proxy, auth, authp, availp);
 1087|   178k|#endif
 1088|   178k|#ifndef CURL_DISABLE_BASIC_AUTH
 1089|   178k|    if(!result && authcmp("Basic", auth))
  ------------------
  |  Branch (1089:8): [True: 178k, False: 0]
  |  Branch (1089:19): [True: 51.0k, False: 127k]
  ------------------
 1090|  51.0k|      result = auth_basic(data, authp, availp);
 1091|   178k|#endif
 1092|   178k|#ifndef CURL_DISABLE_BEARER_AUTH
 1093|   178k|    if(authcmp("Bearer", auth))
  ------------------
  |  Branch (1093:8): [True: 976, False: 177k]
  ------------------
 1094|    976|      result = auth_bearer(data, authp, availp);
 1095|   178k|#endif
 1096|       |
 1097|   178k|    if(result)
  ------------------
  |  Branch (1097:8): [True: 0, False: 178k]
  ------------------
 1098|      0|      break;
 1099|       |
 1100|       |    /* there may be multiple methods on one line, so keep reading */
 1101|   178k|    auth = strchr(auth, ',');
 1102|   178k|    if(auth) /* if we are on a comma, skip it */
  ------------------
  |  Branch (1102:8): [True: 176k, False: 1.81k]
  ------------------
 1103|   176k|      auth++;
 1104|  1.81k|    else
 1105|  1.81k|      break;
 1106|   176k|    curlx_str_passblanks(&auth);
 1107|   176k|  }
 1108|  2.30k|  return result;
 1109|       |#else
 1110|       |  (void)data;
 1111|       |  (void)proxy;
 1112|       |  (void)auth;
 1113|       |  /* nothing to do when disabled */
 1114|       |  return CURLE_OK;
 1115|       |#endif
 1116|  2.30k|}
Curl_http_follow:
 1142|  10.8k|{
 1143|  10.8k|  bool disallowport = FALSE;
  ------------------
  |  | 1058|  10.8k|#define FALSE false
  ------------------
 1144|  10.8k|  bool reachedmax = FALSE;
  ------------------
  |  | 1058|  10.8k|#define FALSE false
  ------------------
 1145|  10.8k|  char *follow_url = NULL;
 1146|  10.8k|  CURLUcode uc;
 1147|  10.8k|  CURLcode rewind_result;
 1148|  10.8k|  bool switch_to_get = FALSE;
  ------------------
  |  | 1058|  10.8k|#define FALSE false
  ------------------
 1149|       |
 1150|  10.8k|  DEBUGASSERT(type != FOLLOW_NONE);
  ------------------
  |  | 1081|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1150:3): [True: 0, False: 10.8k]
  |  Branch (1150:3): [True: 10.8k, False: 0]
  ------------------
 1151|       |
 1152|  10.8k|  if(type != FOLLOW_FAKE)
  ------------------
  |  Branch (1152:6): [True: 10.7k, False: 138]
  ------------------
 1153|  10.7k|    data->state.requests++; /* count all real follows */
 1154|  10.8k|  if(type == FOLLOW_REDIR) {
  ------------------
  |  Branch (1154:6): [True: 10.7k, False: 138]
  ------------------
 1155|  10.7k|    if((data->set.maxredirs != -1) &&
  ------------------
  |  Branch (1155:8): [True: 10.7k, False: 0]
  ------------------
 1156|  10.7k|       (data->state.followlocation >= data->set.maxredirs)) {
  ------------------
  |  Branch (1156:8): [True: 14, False: 10.6k]
  ------------------
 1157|     14|      reachedmax = TRUE;
  ------------------
  |  | 1055|     14|#define TRUE true
  ------------------
 1158|     14|      type = FOLLOW_FAKE; /* switch to fake to store the would-be-redirected
 1159|       |                             to URL */
 1160|     14|    }
 1161|  10.6k|    else {
 1162|  10.6k|      data->state.followlocation++; /* count redirect-followings, including
 1163|       |                                       auth reloads */
 1164|       |
 1165|  10.6k|      if(data->set.http_auto_referer) {
  ------------------
  |  Branch (1165:10): [True: 4.74k, False: 5.94k]
  ------------------
 1166|  4.74k|        CURLU *u;
 1167|  4.74k|        char *referer = NULL;
 1168|       |
 1169|       |        /* We are asked to automatically set the previous URL as the referer
 1170|       |           when we get the next URL. We pick the ->url field, which may or may
 1171|       |           not be 100% correct */
 1172|  4.74k|        Curl_bufref_free(&data->state.referer);
 1173|       |
 1174|       |        /* Make a copy of the URL without credentials and fragment */
 1175|  4.74k|        u = curl_url();
 1176|  4.74k|        if(!u)
  ------------------
  |  Branch (1176:12): [True: 0, False: 4.74k]
  ------------------
 1177|      0|          return CURLE_OUT_OF_MEMORY;
 1178|       |
 1179|  4.74k|        uc = curl_url_set(u, CURLUPART_URL,
 1180|  4.74k|                          Curl_bufref_ptr(&data->state.url), 0);
 1181|  4.74k|        if(!uc)
  ------------------
  |  Branch (1181:12): [True: 4.74k, False: 0]
  ------------------
 1182|  4.74k|          uc = curl_url_set(u, CURLUPART_FRAGMENT, NULL, 0);
 1183|  4.74k|        if(!uc)
  ------------------
  |  Branch (1183:12): [True: 4.74k, False: 0]
  ------------------
 1184|  4.74k|          uc = curl_url_set(u, CURLUPART_USER, NULL, 0);
 1185|  4.74k|        if(!uc)
  ------------------
  |  Branch (1185:12): [True: 4.74k, False: 0]
  ------------------
 1186|  4.74k|          uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0);
 1187|  4.74k|        if(!uc)
  ------------------
  |  Branch (1187:12): [True: 4.74k, False: 0]
  ------------------
 1188|  4.74k|          uc = curl_url_get(u, CURLUPART_URL, &referer, 0);
 1189|       |
 1190|  4.74k|        curl_url_cleanup(u);
 1191|       |
 1192|  4.74k|        if(uc || !referer)
  ------------------
  |  Branch (1192:12): [True: 0, False: 4.74k]
  |  Branch (1192:18): [True: 0, False: 4.74k]
  ------------------
 1193|      0|          return CURLE_OUT_OF_MEMORY;
 1194|       |
 1195|  4.74k|        Curl_bufref_set(&data->state.referer, referer, 0, curl_free);
 1196|  4.74k|      }
 1197|  10.6k|    }
 1198|  10.7k|  }
 1199|       |
 1200|  10.8k|  if((type != FOLLOW_RETRY) &&
  ------------------
  |  Branch (1200:6): [True: 10.8k, False: 0]
  ------------------
 1201|  10.8k|     (data->req.httpcode != 401) && (data->req.httpcode != 407) &&
  ------------------
  |  Branch (1201:6): [True: 10.6k, False: 197]
  |  Branch (1201:37): [True: 10.6k, False: 3]
  ------------------
 1202|  10.6k|     Curl_is_absolute_url(newurl, NULL, 0, FALSE)) {
  ------------------
  |  | 1058|  10.6k|#define FALSE false
  ------------------
  |  Branch (1202:6): [True: 66, False: 10.5k]
  ------------------
 1203|       |    /* If this is not redirect due to a 401 or 407 response and an absolute
 1204|       |       URL: do not allow a custom port number */
 1205|     66|    disallowport = TRUE;
  ------------------
  |  | 1055|     66|#define TRUE true
  ------------------
 1206|     66|  }
 1207|       |
 1208|  10.8k|  DEBUGASSERT(data->state.uh);
  ------------------
  |  | 1081|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1208:3): [True: 0, False: 10.8k]
  |  Branch (1208:3): [True: 10.8k, False: 0]
  ------------------
 1209|  10.8k|  uc = curl_url_set(data->state.uh, CURLUPART_URL, newurl, (unsigned int)
 1210|  10.8k|                    ((type == FOLLOW_FAKE) ? CURLU_NON_SUPPORT_SCHEME :
  ------------------
  |  |   90|    152|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (1210:22): [True: 152, False: 10.6k]
  ------------------
 1211|  10.8k|                     ((type == FOLLOW_REDIR) ? CURLU_URLENCODE : 0) |
  ------------------
  |  |   94|  10.6k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1211:23): [True: 10.6k, False: 0]
  ------------------
 1212|  10.6k|                     CURLU_ALLOW_SPACE |
  ------------------
  |  |   99|  10.6k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1213|  10.6k|                     (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   91|  4.35k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1213:23): [True: 4.35k, False: 6.33k]
  ------------------
 1214|  10.8k|  if(uc) {
  ------------------
  |  Branch (1214:6): [True: 35, False: 10.8k]
  ------------------
 1215|     35|    if((uc == CURLUE_OUT_OF_MEMORY) || (type != FOLLOW_FAKE)) {
  ------------------
  |  Branch (1215:8): [True: 0, False: 35]
  |  Branch (1215:40): [True: 5, False: 30]
  ------------------
 1216|      5|      failf(data, "The redirect target URL could not be parsed: %s",
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
 1217|      5|            curl_url_strerror(uc));
 1218|      5|      return Curl_uc_to_curlcode(uc);
 1219|      5|    }
 1220|       |
 1221|       |    /* the URL could not be parsed for some reason, but since this is FAKE
 1222|       |       mode, duplicate the field as-is */
 1223|     30|    follow_url = curlx_strdup(newurl);
  ------------------
  |  | 1477|     30|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1224|     30|    if(!follow_url)
  ------------------
  |  Branch (1224:8): [True: 0, False: 30]
  ------------------
 1225|      0|      return CURLE_OUT_OF_MEMORY;
 1226|     30|  }
 1227|  10.8k|  else {
 1228|  10.8k|    CURLU *u = curl_url();
 1229|  10.8k|    if(!u)
  ------------------
  |  Branch (1229:8): [True: 0, False: 10.8k]
  ------------------
 1230|      0|      return CURLE_OUT_OF_MEMORY;
 1231|  10.8k|    uc = curl_url_set(u, CURLUPART_URL,
 1232|  10.8k|                      Curl_bufref_ptr(&data->state.url),
 1233|  10.8k|                      CURLU_URLENCODE | CURLU_ALLOW_SPACE);
  ------------------
  |  |   94|  10.8k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
                                    CURLU_URLENCODE | CURLU_ALLOW_SPACE);
  ------------------
  |  |   99|  10.8k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1234|  10.8k|    if(!uc)
  ------------------
  |  Branch (1234:8): [True: 10.8k, False: 0]
  ------------------
 1235|  10.8k|      uc = curl_url_get(data->state.uh, CURLUPART_URL, &follow_url, 0);
 1236|  10.8k|    if(uc) {
  ------------------
  |  Branch (1236:8): [True: 0, False: 10.8k]
  ------------------
 1237|      0|      curl_url_cleanup(u);
 1238|      0|      return Curl_uc_to_curlcode(uc);
 1239|      0|    }
 1240|       |
 1241|  10.8k|#ifndef CURL_DISABLE_DIGEST_AUTH
 1242|  10.8k|    {
 1243|  10.8k|      bool same_origin = Curl_url_same_origin(u, data->state.uh);
 1244|  10.8k|      curl_url_cleanup(u);
 1245|  10.8k|      if(!same_origin)
  ------------------
  |  Branch (1245:10): [True: 78, False: 10.7k]
  ------------------
 1246|     78|        Curl_auth_digest_cleanup(&data->state.digest);
 1247|  10.8k|    }
 1248|       |#else
 1249|       |    curl_url_cleanup(u);
 1250|       |#endif
 1251|  10.8k|  }
 1252|  10.8k|  DEBUGASSERT(follow_url);
  ------------------
  |  | 1081|  10.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1252:3): [True: 0, False: 10.8k]
  |  Branch (1252:3): [True: 10.8k, False: 0]
  ------------------
 1253|       |
 1254|  10.8k|  if(type == FOLLOW_FAKE) {
  ------------------
  |  Branch (1254:6): [True: 152, False: 10.6k]
  ------------------
 1255|       |    /* we are only figuring out the new URL if we would have followed locations
 1256|       |       but now we are done so we can get out! */
 1257|    152|    data->info.wouldredirect = follow_url;
 1258|       |
 1259|    152|    if(reachedmax) {
  ------------------
  |  Branch (1259:8): [True: 14, False: 138]
  ------------------
 1260|     14|      failf(data, "Maximum (%d) redirects followed", data->set.maxredirs);
  ------------------
  |  |   62|     14|#define failf Curl_failf
  ------------------
 1261|     14|      return CURLE_TOO_MANY_REDIRECTS;
 1262|     14|    }
 1263|    138|    return CURLE_OK;
 1264|    152|  }
 1265|       |
 1266|  10.6k|  if(disallowport)
  ------------------
  |  Branch (1266:6): [True: 42, False: 10.6k]
  ------------------
 1267|     42|    data->state.allow_port = FALSE;
  ------------------
  |  | 1058|     42|#define FALSE false
  ------------------
 1268|       |
 1269|  10.6k|  Curl_bufref_set(&data->state.url, follow_url, 0, curl_free);
 1270|  10.6k|  rewind_result = Curl_req_soft_reset(&data->req, data);
 1271|  10.6k|  infof(data, "Issue another request to this URL: '%s'", follow_url);
  ------------------
  |  |  143|  10.6k|  do {                               \
  |  |  144|  10.6k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.6k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.6k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.6k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.6k]
  |  |  ------------------
  ------------------
 1272|  10.6k|  if((data->set.http_follow_mode == CURLFOLLOW_FIRSTONLY) &&
  ------------------
  |  |  186|  10.6k|#define CURLFOLLOW_FIRSTONLY 3L
  ------------------
  |  Branch (1272:6): [True: 759, False: 9.92k]
  ------------------
 1273|    759|     data->set.str[STRING_CUSTOMREQUEST] &&
  ------------------
  |  Branch (1273:6): [True: 319, False: 440]
  ------------------
 1274|    319|     !data->state.http_ignorecustom) {
  ------------------
  |  Branch (1274:6): [True: 24, False: 295]
  ------------------
 1275|     24|    data->state.http_ignorecustom = TRUE;
  ------------------
  |  | 1055|     24|#define TRUE true
  ------------------
 1276|     24|    infof(data, "Drop custom request method for next request");
  ------------------
  |  |  143|     24|  do {                               \
  |  |  144|     24|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     24|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 24, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 24]
  |  |  |  |  ------------------
  |  |  |  |  320|     24|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     24|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     24|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 24]
  |  |  ------------------
  ------------------
 1277|     24|  }
 1278|       |
 1279|       |  /*
 1280|       |   * We get here when the HTTP code is 300-399 (and 401). We need to perform
 1281|       |   * differently based on exactly what return code there was.
 1282|       |   *
 1283|       |   * News from 7.10.6: we can also get here on a 401 or 407, in case we act on
 1284|       |   * an HTTP (proxy-) authentication scheme other than Basic.
 1285|       |   */
 1286|  10.6k|  switch(data->info.httpcode) {
 1287|       |    /* 401 - Act on a WWW-Authenticate, we keep on moving and do the
 1288|       |       Authorization: XXXX header in the HTTP request code snippet */
 1289|       |    /* 407 - Act on a Proxy-Authenticate, we keep on moving and do the
 1290|       |       Proxy-Authorization: XXXX header in the HTTP request code snippet */
 1291|       |    /* 300 - Multiple Choices */
 1292|       |    /* 306 - Not used */
 1293|       |    /* 307 - Temporary Redirect */
 1294|  3.85k|  default: /* for all above (and the unknown ones) */
  ------------------
  |  Branch (1294:3): [True: 3.85k, False: 6.82k]
  ------------------
 1295|       |    /* Some codes are explicitly mentioned since I have checked RFC2616 and
 1296|       |     * they seem to be OK to POST to.
 1297|       |     */
 1298|  3.85k|    break;
 1299|  3.85k|  case 301: /* Moved Permanently */
  ------------------
  |  Branch (1299:3): [True: 735, False: 9.94k]
  ------------------
 1300|       |    /* (quote from RFC7231, section 6.4.2)
 1301|       |     *
 1302|       |     * Note: For historical reasons, a user agent MAY change the request
 1303|       |     * method from POST to GET for the subsequent request. If this
 1304|       |     * behavior is undesired, the 307 (Temporary Redirect) status code
 1305|       |     * can be used instead.
 1306|       |     *
 1307|       |     * ----
 1308|       |     *
 1309|       |     * Many webservers expect this, so these servers often answers to a POST
 1310|       |     * request with an error page. To be sure that libcurl gets the page that
 1311|       |     * most user agents would get, libcurl has to force GET.
 1312|       |     *
 1313|       |     * This behavior is forbidden by RFC1945 and the obsolete RFC2616, and
 1314|       |     * can be overridden with CURLOPT_POSTREDIR.
 1315|       |     */
 1316|    735|    if(HTTPREQ_IS_POST(data) && !data->set.post301) {
  ------------------
  |  | 1136|  1.47k|  ((data)->state.httpreq == HTTPREQ_POST ||      \
  |  |  ------------------
  |  |  |  Branch (1136:4): [True: 17, False: 718]
  |  |  ------------------
  |  | 1137|    735|   (data)->state.httpreq == HTTPREQ_POST_FORM || \
  |  |  ------------------
  |  |  |  Branch (1137:4): [True: 2, False: 716]
  |  |  ------------------
  |  | 1138|  1.47k|   (data)->state.httpreq == HTTPREQ_POST_MIME)
  |  |  ------------------
  |  |  |  Branch (1138:4): [True: 1, False: 715]
  |  |  ------------------
  ------------------
  |  Branch (1316:33): [True: 20, False: 0]
  ------------------
 1317|     20|      http_switch_to_get(data, 301);
 1318|     20|      switch_to_get = TRUE;
  ------------------
  |  | 1055|     20|#define TRUE true
  ------------------
 1319|     20|    }
 1320|    735|    break;
 1321|  1.04k|  case 302: /* Found */
  ------------------
  |  Branch (1321:3): [True: 1.04k, False: 9.63k]
  ------------------
 1322|       |    /* (quote from RFC7231, section 6.4.3)
 1323|       |     *
 1324|       |     * Note: For historical reasons, a user agent MAY change the request
 1325|       |     * method from POST to GET for the subsequent request. If this
 1326|       |     * behavior is undesired, the 307 (Temporary Redirect) status code
 1327|       |     * can be used instead.
 1328|       |     *
 1329|       |     * ----
 1330|       |     *
 1331|       |     * Many webservers expect this, so these servers often answers to a POST
 1332|       |     * request with an error page. To be sure that libcurl gets the page that
 1333|       |     * most user agents would get, libcurl has to force GET.
 1334|       |     *
 1335|       |     * This behavior is forbidden by RFC1945 and the obsolete RFC2616, and
 1336|       |     * can be overridden with CURLOPT_POSTREDIR.
 1337|       |     */
 1338|  1.04k|    if(HTTPREQ_IS_POST(data) && !data->set.post302) {
  ------------------
  |  | 1136|  2.09k|  ((data)->state.httpreq == HTTPREQ_POST ||      \
  |  |  ------------------
  |  |  |  Branch (1136:4): [True: 6, False: 1.04k]
  |  |  ------------------
  |  | 1137|  1.04k|   (data)->state.httpreq == HTTPREQ_POST_FORM || \
  |  |  ------------------
  |  |  |  Branch (1137:4): [True: 2, False: 1.04k]
  |  |  ------------------
  |  | 1138|  2.09k|   (data)->state.httpreq == HTTPREQ_POST_MIME)
  |  |  ------------------
  |  |  |  Branch (1138:4): [True: 5, False: 1.03k]
  |  |  ------------------
  ------------------
  |  Branch (1338:33): [True: 13, False: 0]
  ------------------
 1339|     13|      http_switch_to_get(data, 302);
 1340|     13|      switch_to_get = TRUE;
  ------------------
  |  | 1055|     13|#define TRUE true
  ------------------
 1341|     13|    }
 1342|  1.04k|    break;
 1343|       |
 1344|  1.16k|  case 303: /* See Other */
  ------------------
  |  Branch (1344:3): [True: 1.16k, False: 9.51k]
  ------------------
 1345|       |    /* 'See Other' location is not the resource but a substitute for the
 1346|       |     * resource. In this case we switch the method to GET/HEAD, unless the
 1347|       |     * method is POST and the user specified to keep it as POST.
 1348|       |     */
 1349|  1.16k|    if(!HTTPREQ_IS_POST(data) || !data->set.post303) {
  ------------------
  |  | 1136|  2.33k|  ((data)->state.httpreq == HTTPREQ_POST ||      \
  |  |  ------------------
  |  |  |  Branch (1136:4): [True: 46, False: 1.12k]
  |  |  ------------------
  |  | 1137|  1.16k|   (data)->state.httpreq == HTTPREQ_POST_FORM || \
  |  |  ------------------
  |  |  |  Branch (1137:4): [True: 20, False: 1.10k]
  |  |  ------------------
  |  | 1138|  2.33k|   (data)->state.httpreq == HTTPREQ_POST_MIME)
  |  |  ------------------
  |  |  |  Branch (1138:4): [True: 12, False: 1.08k]
  |  |  ------------------
  ------------------
  |  Branch (1349:34): [True: 60, False: 18]
  ------------------
 1350|  1.14k|      http_switch_to_get(data, 303);
 1351|  1.14k|      switch_to_get = TRUE;
  ------------------
  |  | 1055|  1.14k|#define TRUE true
  ------------------
 1352|  1.14k|    }
 1353|  1.16k|    break;
 1354|  3.85k|  case 304: /* Not Modified */
  ------------------
  |  Branch (1354:3): [True: 3.85k, False: 6.82k]
  ------------------
 1355|       |    /* 304 means we did a conditional request and it was "Not modified".
 1356|       |     * We should not get any Location: header in this response!
 1357|       |     */
 1358|  3.85k|    break;
 1359|     18|  case 305: /* Use Proxy */
  ------------------
  |  Branch (1359:3): [True: 18, False: 10.6k]
  ------------------
 1360|       |    /* (quote from RFC2616, section 10.3.6):
 1361|       |     * "The requested resource MUST be accessed through the proxy given
 1362|       |     * by the Location field. The Location field gives the URI of the
 1363|       |     * proxy. The recipient is expected to repeat this single request
 1364|       |     * via the proxy. 305 responses MUST only be generated by origin
 1365|       |     * servers."
 1366|       |     */
 1367|     18|    break;
 1368|  10.6k|  }
 1369|       |
 1370|       |  /* When rewind of upload data failed and we are not switching to GET,
 1371|       |   * we need to fail the follow, as we cannot send the data again. */
 1372|  10.6k|  if(rewind_result && !switch_to_get)
  ------------------
  |  Branch (1372:6): [True: 3, False: 10.6k]
  |  Branch (1372:23): [True: 1, False: 2]
  ------------------
 1373|      1|    return rewind_result;
 1374|       |
 1375|  10.6k|  Curl_pgrsTime(data, TIMER_REDIRECT);
 1376|  10.6k|  Curl_pgrsResetTransferSizes(data);
 1377|       |
 1378|  10.6k|  return CURLE_OK;
 1379|  10.6k|}
Curl_compareheader:
 1394|  60.5k|{
 1395|       |  /* RFC2616, section 4.2 says: "Each header field consists of a name followed
 1396|       |   * by a colon (":") and the field value. Field names are case-insensitive.
 1397|       |   * The field value MAY be preceded by any amount of LWS, though a single SP
 1398|       |   * is preferred." */
 1399|       |
 1400|  60.5k|  const char *p;
 1401|  60.5k|  struct Curl_str val;
 1402|  60.5k|  DEBUGASSERT(hlen);
  ------------------
  |  | 1081|  60.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1402:3): [True: 0, False: 60.5k]
  |  Branch (1402:3): [True: 60.5k, False: 0]
  ------------------
 1403|  60.5k|  DEBUGASSERT(clen);
  ------------------
  |  | 1081|  60.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1403:3): [True: 0, False: 60.5k]
  |  Branch (1403:3): [True: 60.5k, False: 0]
  ------------------
 1404|  60.5k|  DEBUGASSERT(header);
  ------------------
  |  | 1081|  60.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1404:3): [True: 0, False: 60.5k]
  |  Branch (1404:3): [True: 60.5k, False: 0]
  ------------------
 1405|  60.5k|  DEBUGASSERT(content);
  ------------------
  |  | 1081|  60.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1405:3): [True: 0, False: 60.5k]
  |  Branch (1405:3): [True: 60.5k, False: 0]
  ------------------
 1406|       |
 1407|  60.5k|  if(!curl_strnequal(headerline, header, hlen))
  ------------------
  |  Branch (1407:6): [True: 54.6k, False: 5.80k]
  ------------------
 1408|  54.6k|    return FALSE; /* does not start with header */
  ------------------
  |  | 1058|  54.6k|#define FALSE false
  ------------------
 1409|       |
 1410|       |  /* pass the header */
 1411|  5.80k|  p = &headerline[hlen];
 1412|       |
 1413|  5.80k|  if(curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE))
  ------------------
  |  |  153|  5.80k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1413:6): [True: 463, False: 5.34k]
  ------------------
 1414|    463|    return FALSE;
  ------------------
  |  | 1058|    463|#define FALSE false
  ------------------
 1415|  5.34k|  curlx_str_trimblanks(&val);
 1416|       |
 1417|       |  /* find the content string in the rest of the line */
 1418|  5.34k|  if(curlx_strlen(&val) >= clen) {
  ------------------
  |  |   50|  5.34k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1418:6): [True: 3.79k, False: 1.55k]
  ------------------
 1419|  3.79k|    size_t len;
 1420|  3.79k|    p = curlx_str(&val);
  ------------------
  |  |   49|  3.79k|#define curlx_str(x)    ((x)->str)
  ------------------
 1421|  14.9k|    for(len = curlx_strlen(&val); len >= clen;) {
  ------------------
  |  |   50|  3.79k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1421:35): [True: 14.4k, False: 431]
  ------------------
 1422|  14.4k|      struct Curl_str next;
 1423|  14.4k|      const char *o = p;
 1424|       |      /* after a match there must be a comma, space, newline or null byte */
 1425|  14.4k|      if(curl_strnequal(p, content, clen) &&
  ------------------
  |  Branch (1425:10): [True: 2.08k, False: 12.4k]
  ------------------
 1426|  2.08k|         ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   45|  3.42k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 121, False: 1.21k]
  |  |  |  Branch (45:38): [True: 157, False: 1.05k]
  |  |  ------------------
  ------------------
                       ((p[clen] == ',') || ISBLANK(p[clen]) || ISNEWLINE(p[clen]) ||
  ------------------
  |  |   50|  3.14k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 242, False: 816]
  |  |  |  Branch (50:43): [True: 176, False: 640]
  |  |  ------------------
  ------------------
  |  Branch (1426:11): [True: 752, False: 1.33k]
  ------------------
 1427|    640|          !p[clen]))
  ------------------
  |  Branch (1427:11): [True: 306, False: 334]
  ------------------
 1428|  1.75k|        return TRUE; /* match! */
  ------------------
  |  | 1055|  1.75k|#define TRUE true
  ------------------
 1429|       |      /* advance to the next comma */
 1430|  12.7k|      if(curlx_str_until(&p, &next, MAX_HTTP_RESP_HEADER_SIZE, ',') ||
  ------------------
  |  |  153|  12.7k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1430:10): [True: 192, False: 12.5k]
  ------------------
 1431|  12.5k|         curlx_str_single(&p, ','))
  ------------------
  |  Branch (1431:10): [True: 1.41k, False: 11.1k]
  ------------------
 1432|  1.60k|        break; /* no comma, get out */
 1433|       |
 1434|       |      /* if there are more dummy commas, move over them as well */
 1435|  11.1k|      do
 1436|  11.6k|        curlx_str_passblanks(&p);
 1437|  11.6k|      while(!curlx_str_single(&p, ','));
  ------------------
  |  Branch (1437:13): [True: 538, False: 11.1k]
  ------------------
 1438|  11.1k|      len -= (p - o);
 1439|  11.1k|    }
 1440|  3.79k|  }
 1441|  3.59k|  return FALSE; /* no match */
  ------------------
  |  | 1058|  3.59k|#define FALSE false
  ------------------
 1442|  5.34k|}
Curl_http_perform_pollset:
 1595|   191k|{
 1596|   191k|  struct connectdata *conn = data->conn;
 1597|   191k|  CURLcode result = CURLE_OK;
 1598|       |
 1599|   191k|  if(CURL_REQ_WANT_RECV(data)) {
  ------------------
  |  |   40|   191k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|   191k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 191k, False: 26]
  |  |  ------------------
  ------------------
 1600|   191k|    result = Curl_pollset_add_in(data, ps, conn->sock[FIRSTSOCKET]);
  ------------------
  |  |  162|   191k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|   191k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1601|   191k|  }
 1602|       |
 1603|       |  /* on a "Expect: 100-continue" timed wait, do not poll for outgoing */
 1604|   191k|  if(!result && Curl_req_want_send(data) && !http_exp100_is_waiting(data)) {
  ------------------
  |  Branch (1604:6): [True: 191k, False: 0]
  |  Branch (1604:17): [True: 46, False: 191k]
  |  Branch (1604:45): [True: 46, False: 0]
  ------------------
 1605|     46|    result = Curl_pollset_add_out(data, ps, conn->sock[FIRSTSOCKET]);
  ------------------
  |  |  166|     46|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, 0)
  |  |  ------------------
  |  |  |  |  284|     46|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1606|     46|  }
 1607|   191k|  return result;
 1608|   191k|}
Curl_http_done:
 1644|  17.3k|{
 1645|  17.3k|  struct connectdata *conn = data->conn;
 1646|       |
 1647|       |  /* Clear multipass flag. If authentication is not done yet, then it will get
 1648|       |   * a chance to be set back to true when we output the next auth header */
 1649|  17.3k|  data->state.authhost.multipass = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
 1650|  17.3k|  data->state.authproxy.multipass = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
 1651|       |
 1652|  17.3k|  if(curlx_dyn_len(&data->state.headerb)) {
  ------------------
  |  Branch (1652:6): [True: 1.58k, False: 15.7k]
  ------------------
 1653|  1.58k|    (void)http_write_header(data, curlx_dyn_ptr(&data->state.headerb),
 1654|  1.58k|                            curlx_dyn_len(&data->state.headerb));
 1655|  1.58k|  }
 1656|  17.3k|  curlx_dyn_reset(&data->state.headerb);
 1657|       |
 1658|  17.3k|  if(status)
  ------------------
  |  Branch (1658:6): [True: 2.42k, False: 14.9k]
  ------------------
 1659|  2.42k|    return status;
 1660|       |
 1661|  14.9k|  if(!premature && /* this check is pointless when DONE is called before the
  ------------------
  |  Branch (1661:6): [True: 14.7k, False: 166]
  ------------------
 1662|       |                      entire operation is complete */
 1663|  14.7k|     !conn->bits.retry &&
  ------------------
  |  Branch (1663:6): [True: 14.7k, False: 0]
  ------------------
 1664|  14.7k|     !data->set.connect_only &&
  ------------------
  |  Branch (1664:6): [True: 14.7k, False: 59]
  ------------------
 1665|  14.7k|     (data->req.bytecount +
  ------------------
  |  Branch (1665:6): [True: 2.42k, False: 12.3k]
  ------------------
 1666|  14.7k|      data->req.headerbytecount -
 1667|  14.7k|      data->req.deductheadercount) <= 0) {
 1668|       |    /* If this connection is not closed to be retried, AND nothing was
 1669|       |       read from the HTTP server (that counts), this cannot be right so we
 1670|       |       return an error here */
 1671|  2.42k|    failf(data, "Empty reply from server");
  ------------------
  |  |   62|  2.42k|#define failf Curl_failf
  ------------------
 1672|       |    /* Mark it as closed to avoid the "left intact" message */
 1673|  2.42k|    streamclose(conn, "Empty reply from server");
  ------------------
  |  |  102|  2.42k|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|  2.42k|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 1674|  2.42k|    return CURLE_GOT_NOTHING;
 1675|  2.42k|  }
 1676|       |
 1677|  12.5k|  return CURLE_OK;
 1678|  14.9k|}
Curl_add_custom_headers:
 1727|  17.3k|{
 1728|  17.3k|  struct curl_slist *h[2];
 1729|  17.3k|  struct curl_slist *headers;
 1730|  17.3k|  int numlists = 1; /* by default */
 1731|  17.3k|  int i;
 1732|       |
 1733|  17.3k|#ifndef CURL_DISABLE_PROXY
 1734|  17.3k|  enum Curl_proxy_use proxy;
 1735|       |
 1736|  17.3k|  if(is_connect)
  ------------------
  |  Branch (1736:6): [True: 0, False: 17.3k]
  ------------------
 1737|      0|    proxy = HEADER_CONNECT;
 1738|  17.3k|  else
 1739|  17.3k|    proxy = data->conn->bits.httpproxy && !data->conn->bits.tunnel_proxy ?
  ------------------
  |  Branch (1739:13): [True: 81, False: 17.2k]
  |  Branch (1739:43): [True: 0, False: 81]
  ------------------
 1740|  17.3k|      HEADER_PROXY : HEADER_SERVER;
 1741|       |
 1742|  17.3k|  switch(proxy) {
  ------------------
  |  Branch (1742:10): [True: 17.3k, False: 0]
  ------------------
 1743|  17.3k|  case HEADER_SERVER:
  ------------------
  |  Branch (1743:3): [True: 17.3k, False: 0]
  ------------------
 1744|  17.3k|    h[0] = data->set.headers;
 1745|  17.3k|    break;
 1746|      0|  case HEADER_PROXY:
  ------------------
  |  Branch (1746:3): [True: 0, False: 17.3k]
  ------------------
 1747|      0|    h[0] = data->set.headers;
 1748|      0|    if(data->set.sep_headers) {
  ------------------
  |  Branch (1748:8): [True: 0, False: 0]
  ------------------
 1749|      0|      h[1] = data->set.proxyheaders;
 1750|      0|      numlists++;
 1751|      0|    }
 1752|      0|    break;
 1753|      0|  case HEADER_CONNECT:
  ------------------
  |  Branch (1753:3): [True: 0, False: 17.3k]
  ------------------
 1754|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (1754:8): [True: 0, False: 0]
  ------------------
 1755|      0|      h[0] = data->set.proxyheaders;
 1756|      0|    else
 1757|      0|      h[0] = data->set.headers;
 1758|      0|    break;
 1759|      0|  case HEADER_CONNECT_UDP:
  ------------------
  |  Branch (1759:3): [True: 0, False: 17.3k]
  ------------------
 1760|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (1760:8): [True: 0, False: 0]
  ------------------
 1761|      0|      h[0] = data->set.proxyheaders;
 1762|      0|    else
 1763|      0|      h[0] = data->set.headers;
 1764|      0|    break;
 1765|  17.3k|  }
 1766|       |#else
 1767|       |  (void)is_connect;
 1768|       |  h[0] = data->set.headers;
 1769|       |#endif
 1770|       |
 1771|       |  /* loop through one or two lists */
 1772|  34.6k|  for(i = 0; i < numlists; i++) {
  ------------------
  |  Branch (1772:14): [True: 17.3k, False: 17.3k]
  ------------------
 1773|  38.3k|    for(headers = h[i]; headers; headers = headers->next) {
  ------------------
  |  Branch (1773:25): [True: 21.0k, False: 17.3k]
  ------------------
 1774|  21.0k|      CURLcode result = CURLE_OK;
 1775|  21.0k|      bool blankheader = FALSE;
  ------------------
  |  | 1058|  21.0k|#define FALSE false
  ------------------
 1776|  21.0k|      struct Curl_str name;
 1777|  21.0k|      const char *p = headers->data;
 1778|  21.0k|      const char *origp = p;
 1779|       |
 1780|       |      /* explicitly asked to send header without content is done by a header
 1781|       |         that ends with a semicolon, but there must be no colon present in the
 1782|       |         name */
 1783|  21.0k|      if(!curlx_str_until(&p, &name, MAX_HTTP_RESP_HEADER_SIZE, ';') &&
  ------------------
  |  |  153|  21.0k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1783:10): [True: 19.2k, False: 1.82k]
  ------------------
 1784|  19.2k|         !curlx_str_single(&p, ';') &&
  ------------------
  |  Branch (1784:10): [True: 3.01k, False: 16.2k]
  ------------------
 1785|  3.01k|         !curlx_str_single(&p, '\0') &&
  ------------------
  |  Branch (1785:10): [True: 1.05k, False: 1.95k]
  ------------------
 1786|  1.05k|         !memchr(curlx_str(&name), ':', curlx_strlen(&name)))
  ------------------
  |  |   49|  1.05k|#define curlx_str(x)    ((x)->str)
  ------------------
                       !memchr(curlx_str(&name), ':', curlx_strlen(&name)))
  ------------------
  |  |   50|  1.05k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1786:10): [True: 984, False: 74]
  ------------------
 1787|    984|        blankheader = TRUE;
  ------------------
  |  | 1055|    984|#define TRUE true
  ------------------
 1788|  20.0k|      else {
 1789|  20.0k|        p = origp;
 1790|  20.0k|        if(!curlx_str_until(&p, &name, MAX_HTTP_RESP_HEADER_SIZE, ':') &&
  ------------------
  |  |  153|  20.0k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (1790:12): [True: 19.0k, False: 997]
  ------------------
 1791|  19.0k|           !curlx_str_single(&p, ':')) {
  ------------------
  |  Branch (1791:12): [True: 15.4k, False: 3.66k]
  ------------------
 1792|  15.4k|          struct Curl_str val;
 1793|  15.4k|          curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE);
  ------------------
  |  |  153|  15.4k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 1794|  15.4k|          curlx_str_trimblanks(&val);
 1795|  15.4k|          if(!curlx_strlen(&val))
  ------------------
  |  |   50|  15.4k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (1795:14): [True: 533, False: 14.8k]
  ------------------
 1796|       |            /* no content, do not send this */
 1797|    533|            continue;
 1798|  15.4k|        }
 1799|  4.66k|        else
 1800|       |          /* no colon */
 1801|  4.66k|          continue;
 1802|  20.0k|      }
 1803|       |
 1804|       |      /* only send this if the contents was non-blank or done special */
 1805|       |
 1806|  15.8k|      if(data->state.aptr.host &&
  ------------------
  |  Branch (1806:10): [True: 0, False: 15.8k]
  ------------------
 1807|       |         /* a Host: header was sent already, do not pass on any custom
 1808|       |            Host: header as that will produce *two* in the same
 1809|       |            request! */
 1810|      0|         curlx_str_casecompare(&name, "Host"))
  ------------------
  |  Branch (1810:10): [True: 0, False: 0]
  ------------------
 1811|      0|        ;
 1812|  15.8k|      else if(data->state.httpreq == HTTPREQ_POST_FORM &&
  ------------------
  |  Branch (1812:15): [True: 830, False: 15.0k]
  ------------------
 1813|       |              /* this header (extended by formdata.c) is sent later */
 1814|    830|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (1814:15): [True: 0, False: 830]
  ------------------
 1815|      0|        ;
 1816|  15.8k|      else if(data->state.httpreq == HTTPREQ_POST_MIME &&
  ------------------
  |  Branch (1816:15): [True: 573, False: 15.2k]
  ------------------
 1817|       |              /* this header is sent later */
 1818|    573|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (1818:15): [True: 0, False: 573]
  ------------------
 1819|      0|        ;
 1820|  15.8k|      else if(data->req.authneg &&
  ------------------
  |  Branch (1820:15): [True: 0, False: 15.8k]
  ------------------
 1821|       |              /* while doing auth neg, do not allow the custom length since
 1822|       |                 we will force length zero then */
 1823|      0|              curlx_str_casecompare(&name, "Content-Length"))
  ------------------
  |  Branch (1823:15): [True: 0, False: 0]
  ------------------
 1824|      0|        ;
 1825|  15.8k|      else if(curlx_str_casecompare(&name, "Connection"))
  ------------------
  |  Branch (1825:15): [True: 18, False: 15.8k]
  ------------------
 1826|       |        /* Connection headers are handled specially */
 1827|     18|        ;
 1828|  15.8k|      else if((httpversion >= 20) &&
  ------------------
  |  Branch (1828:15): [True: 0, False: 15.8k]
  ------------------
 1829|      0|              curlx_str_casecompare(&name, "Transfer-Encoding"))
  ------------------
  |  Branch (1829:15): [True: 0, False: 0]
  ------------------
 1830|       |        /* HTTP/2 does not support chunked requests */
 1831|      0|        ;
 1832|  15.8k|      else if((curlx_str_casecompare(&name, "Authorization") ||
  ------------------
  |  Branch (1832:16): [True: 0, False: 15.8k]
  ------------------
 1833|  15.8k|               curlx_str_casecompare(&name, "Cookie")) &&
  ------------------
  |  Branch (1833:16): [True: 5.26k, False: 10.5k]
  ------------------
 1834|       |              /* be careful of sending this potentially sensitive header to
 1835|       |                 other hosts */
 1836|  5.26k|              !Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (1836:15): [True: 82, False: 5.17k]
  ------------------
 1837|     82|        ;
 1838|  15.7k|      else if(blankheader)
  ------------------
  |  Branch (1838:15): [True: 984, False: 14.7k]
  ------------------
 1839|    984|        result = curlx_dyn_addf(req, "%.*s:\r\n", (int)curlx_strlen(&name),
  ------------------
  |  |   50|    984|#define curlx_strlen(x) ((x)->len)
  ------------------
 1840|    984|                                curlx_str(&name));
  ------------------
  |  |   49|    984|#define curlx_str(x)    ((x)->str)
  ------------------
 1841|  14.7k|      else
 1842|  14.7k|        result = curlx_dyn_addf(req, "%s\r\n", origp);
 1843|       |
 1844|  15.8k|      if(result)
  ------------------
  |  Branch (1844:10): [True: 10, False: 15.8k]
  ------------------
 1845|     10|        return result;
 1846|  15.8k|    }
 1847|  17.3k|  }
 1848|       |
 1849|  17.3k|  return CURLE_OK;
 1850|  17.3k|}
Curl_add_timecondition:
 1855|  2.70k|{
 1856|  2.70k|  const struct tm *tm;
 1857|  2.70k|  struct tm keeptime;
 1858|  2.70k|  CURLcode result;
 1859|  2.70k|  char datestr[80];
 1860|  2.70k|  const char *condp;
 1861|  2.70k|  size_t len;
 1862|       |
 1863|  2.70k|  if(data->set.timecondition == CURL_TIMECOND_NONE)
  ------------------
  |  | 2410|  2.70k|#define CURL_TIMECOND_NONE         0L
  ------------------
  |  Branch (1863:6): [True: 2.65k, False: 56]
  ------------------
 1864|       |    /* no condition was asked for */
 1865|  2.65k|    return CURLE_OK;
 1866|       |
 1867|     56|  result = curlx_gmtime(data->set.timevalue, &keeptime);
 1868|     56|  if(result) {
  ------------------
  |  Branch (1868:6): [True: 0, False: 56]
  ------------------
 1869|      0|    failf(data, "Invalid TIMEVALUE");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1870|      0|    return result;
 1871|      0|  }
 1872|     56|  tm = &keeptime;
 1873|       |
 1874|     56|  switch(data->set.timecondition) {
 1875|      0|  default:
  ------------------
  |  Branch (1875:3): [True: 0, False: 56]
  ------------------
 1876|      0|    DEBUGF(infof(data, "invalid time condition"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1877|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1878|       |
 1879|     23|  case CURL_TIMECOND_IFMODSINCE:
  ------------------
  |  | 2411|     23|#define CURL_TIMECOND_IFMODSINCE   1L
  ------------------
  |  Branch (1879:3): [True: 23, False: 33]
  ------------------
 1880|     23|    condp = "If-Modified-Since";
 1881|     23|    len = 17;
 1882|     23|    break;
 1883|      2|  case CURL_TIMECOND_IFUNMODSINCE:
  ------------------
  |  | 2412|      2|#define CURL_TIMECOND_IFUNMODSINCE 2L
  ------------------
  |  Branch (1883:3): [True: 2, False: 54]
  ------------------
 1884|      2|    condp = "If-Unmodified-Since";
 1885|      2|    len = 19;
 1886|      2|    break;
 1887|     31|  case CURL_TIMECOND_LASTMOD:
  ------------------
  |  | 2413|     31|#define CURL_TIMECOND_LASTMOD      3L
  ------------------
  |  Branch (1887:3): [True: 31, False: 25]
  ------------------
 1888|     31|    condp = "Last-Modified";
 1889|     31|    len = 13;
 1890|     31|    break;
 1891|     56|  }
 1892|       |
 1893|     56|  if(Curl_checkheaders(data, condp, len)) {
  ------------------
  |  Branch (1893:6): [True: 0, False: 56]
  ------------------
 1894|       |    /* A custom header was specified; it will be sent instead. */
 1895|      0|    return CURLE_OK;
 1896|      0|  }
 1897|       |
 1898|       |  /* The If-Modified-Since header family should have their times set in
 1899|       |   * GMT as RFC2616 defines: "All HTTP date/time stamps MUST be
 1900|       |   * represented in Greenwich Mean Time (GMT), without exception. For the
 1901|       |   * purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal
 1902|       |   * Time)." (see page 20 of RFC2616).
 1903|       |   */
 1904|       |
 1905|       |  /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
 1906|     56|  curl_msnprintf(datestr, sizeof(datestr),
 1907|     56|                 "%s: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
 1908|     56|                 condp,
 1909|     56|                 Curl_wkday[tm->tm_wday ? tm->tm_wday - 1 : 6],
  ------------------
  |  Branch (1909:29): [True: 55, False: 1]
  ------------------
 1910|     56|                 tm->tm_mday,
 1911|     56|                 Curl_month[tm->tm_mon],
 1912|     56|                 tm->tm_year + 1900,
 1913|     56|                 tm->tm_hour,
 1914|     56|                 tm->tm_min,
 1915|     56|                 tm->tm_sec);
 1916|       |
 1917|     56|  result = curlx_dyn_add(req, datestr);
 1918|     56|  return result;
 1919|     56|}
Curl_http_method:
 1933|  2.68k|{
 1934|  2.68k|  Curl_HttpReq httpreq = (Curl_HttpReq)data->state.httpreq;
 1935|  2.68k|  const char *request;
 1936|  2.68k|#ifndef CURL_DISABLE_WEBSOCKETS
 1937|  2.68k|  if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   63|  2.68k|#define CURLPROTO_WS     (1L << 30)
  ------------------
                if(data->conn->scheme->protocol & (CURLPROTO_WS | CURLPROTO_WSS))
  ------------------
  |  |   64|  2.68k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  ------------------
  |  Branch (1937:6): [True: 0, False: 2.68k]
  ------------------
 1938|      0|    httpreq = HTTPREQ_GET;
 1939|  2.68k|  else
 1940|  2.68k|#endif
 1941|  2.68k|  if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  |   84|  2.68k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  2.68k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  2.68k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  2.68k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  2.68k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  2.68k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                if((data->conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_FTP)) &&
  ------------------
  |  | 1080|  2.68k|#define CURLPROTO_FTP     (1L << 2)
  ------------------
  |  Branch (1941:6): [True: 0, False: 2.68k]
  ------------------
 1942|      0|     data->state.upload)
  ------------------
  |  Branch (1942:6): [True: 0, False: 0]
  ------------------
 1943|      0|    httpreq = HTTPREQ_PUT;
 1944|       |
 1945|       |  /* Now set the 'request' pointer to the proper request string */
 1946|  2.68k|  if(data->set.str[STRING_CUSTOMREQUEST] &&
  ------------------
  |  Branch (1946:6): [True: 298, False: 2.38k]
  ------------------
 1947|    298|     !data->state.http_ignorecustom) {
  ------------------
  |  Branch (1947:6): [True: 183, False: 115]
  ------------------
 1948|    183|    request = data->set.str[STRING_CUSTOMREQUEST];
 1949|    183|  }
 1950|  2.50k|  else {
 1951|  2.50k|    if(data->req.no_body)
  ------------------
  |  Branch (1951:8): [True: 2.15k, False: 345]
  ------------------
 1952|  2.15k|      request = "HEAD";
 1953|    345|    else {
 1954|    345|      DEBUGASSERT((httpreq >= HTTPREQ_GET) && (httpreq <= HTTPREQ_HEAD));
  ------------------
  |  | 1081|    345|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1954:7): [True: 0, False: 345]
  |  Branch (1954:7): [True: 0, False: 0]
  |  Branch (1954:7): [True: 345, False: 0]
  |  Branch (1954:7): [True: 345, False: 0]
  ------------------
 1955|    345|      switch(httpreq) {
 1956|      3|      case HTTPREQ_POST:
  ------------------
  |  Branch (1956:7): [True: 3, False: 342]
  ------------------
 1957|     28|      case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (1957:7): [True: 25, False: 320]
  ------------------
 1958|     44|      case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (1958:7): [True: 16, False: 329]
  ------------------
 1959|     44|        request = "POST";
 1960|     44|        break;
 1961|     61|      case HTTPREQ_PUT:
  ------------------
  |  Branch (1961:7): [True: 61, False: 284]
  ------------------
 1962|     61|        request = "PUT";
 1963|     61|        break;
 1964|      0|      default: /* this should never happen */
  ------------------
  |  Branch (1964:7): [True: 0, False: 345]
  ------------------
 1965|    163|      case HTTPREQ_GET:
  ------------------
  |  Branch (1965:7): [True: 163, False: 182]
  ------------------
 1966|    163|        request = "GET";
 1967|    163|        break;
 1968|     77|      case HTTPREQ_HEAD:
  ------------------
  |  Branch (1968:7): [True: 77, False: 268]
  ------------------
 1969|     77|        request = "HEAD";
 1970|     77|        break;
 1971|    345|      }
 1972|    345|    }
 1973|  2.50k|  }
 1974|  2.68k|  *method = request;
 1975|  2.68k|  *reqp = httpreq;
 1976|  2.68k|}
Curl_bump_headersize:
 3841|   210k|{
 3842|   210k|  size_t bad = 0;
 3843|   210k|  unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
  ------------------
  |  |  153|   210k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
 3844|   210k|  if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
  ------------------
  |  |  153|   210k|#define MAX_HTTP_RESP_HEADER_SIZE (300 * 1024)
  ------------------
  |  Branch (3844:6): [True: 210k, False: 0]
  ------------------
 3845|   210k|    data->info.header_size += (unsigned int)delta;
 3846|   210k|    data->req.allheadercount += (unsigned int)delta;
 3847|   210k|    if(!connect_only)
  ------------------
  |  Branch (3847:8): [True: 178k, False: 31.8k]
  ------------------
 3848|   178k|      data->req.headerbytecount += (unsigned int)delta;
 3849|   210k|    if(data->req.allheadercount > max)
  ------------------
  |  Branch (3849:8): [True: 0, False: 210k]
  ------------------
 3850|      0|      bad = data->req.allheadercount;
 3851|   210k|    else if(data->info.header_size > (max * 20)) {
  ------------------
  |  Branch (3851:13): [True: 0, False: 210k]
  ------------------
 3852|      0|      bad = data->info.header_size;
 3853|      0|      max *= 20;
 3854|      0|    }
 3855|   210k|  }
 3856|      0|  else
 3857|      0|    bad = data->req.allheadercount + delta;
 3858|   210k|  if(bad) {
  ------------------
  |  Branch (3858:6): [True: 0, False: 210k]
  ------------------
 3859|      0|    failf(data, "Too large response headers: %zu > %u", bad, max);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3860|      0|    return CURLE_RECV_ERROR;
 3861|      0|  }
 3862|   210k|  return CURLE_OK;
 3863|   210k|}
Curl_http_to_fold:
 4379|  13.2k|{
 4380|  13.2k|  size_t len = curlx_dyn_len(bf);
 4381|  13.2k|  const char *hd = curlx_dyn_ptr(bf);
 4382|  13.2k|  if(len && (hd[len - 1] == '\n'))
  ------------------
  |  Branch (4382:6): [True: 13.2k, False: 0]
  |  Branch (4382:13): [True: 13.2k, False: 0]
  ------------------
 4383|  13.2k|    len--;
 4384|  13.2k|  if(len && (hd[len - 1] == '\r'))
  ------------------
  |  Branch (4384:6): [True: 13.2k, False: 0]
  |  Branch (4384:13): [True: 217, False: 12.9k]
  ------------------
 4385|    217|    len--;
 4386|  19.0k|  while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
  ------------------
  |  |   45|  18.8k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 3.56k, False: 15.2k]
  |  |  |  Branch (45:38): [True: 2.31k, False: 12.9k]
  |  |  ------------------
  ------------------
  |  Branch (4386:9): [True: 18.8k, False: 220]
  ------------------
 4387|  5.88k|    len--;
 4388|  13.2k|  curlx_dyn_setlen(bf, len);
 4389|  13.2k|}
Curl_http_write_resp_hds:
 4593|  2.05M|{
 4594|  2.05M|  if(!data->req.header) {
  ------------------
  |  Branch (4594:6): [True: 0, False: 2.05M]
  ------------------
 4595|      0|    *pconsumed = 0;
 4596|      0|    return CURLE_OK;
 4597|      0|  }
 4598|  2.05M|  else {
 4599|  2.05M|    CURLcode result;
 4600|       |
 4601|  2.05M|    result = http_parse_headers(data, buf, blen, pconsumed);
 4602|  2.05M|    if(!result && !data->req.header) {
  ------------------
  |  Branch (4602:8): [True: 2.05M, False: 1.43k]
  |  Branch (4602:19): [True: 11.9k, False: 2.04M]
  ------------------
 4603|  11.9k|      if(!data->req.no_body && curlx_dyn_len(&data->state.headerb)) {
  ------------------
  |  Branch (4603:10): [True: 2.25k, False: 9.72k]
  |  Branch (4603:32): [True: 1, False: 2.24k]
  ------------------
 4604|       |        /* leftover from parsing something that turned out not
 4605|       |         * to be a header, only happens if we allow for
 4606|       |         * HTTP/0.9 like responses */
 4607|      1|        result = Curl_client_write(data, CLIENTWRITE_BODY,
  ------------------
  |  |   42|      1|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
 4608|      1|                                   curlx_dyn_ptr(&data->state.headerb),
 4609|      1|                                   curlx_dyn_len(&data->state.headerb));
 4610|      1|      }
 4611|  11.9k|      curlx_dyn_free(&data->state.headerb);
 4612|  11.9k|    }
 4613|  2.05M|    return result;
 4614|  2.05M|  }
 4615|  2.05M|}
Curl_http_req_make:
 4676|    824|{
 4677|    824|  struct httpreq *req;
 4678|    824|  CURLcode result = CURLE_OUT_OF_MEMORY;
 4679|       |
 4680|    824|  DEBUGASSERT(method && m_len);
  ------------------
  |  | 1081|    824|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4680:3): [True: 0, False: 824]
  |  Branch (4680:3): [True: 0, False: 0]
  |  Branch (4680:3): [True: 824, False: 0]
  |  Branch (4680:3): [True: 824, False: 0]
  ------------------
 4681|       |
 4682|    824|  req = curlx_calloc(1, sizeof(*req) + m_len);
  ------------------
  |  | 1480|    824|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 4683|    824|  if(!req)
  ------------------
  |  Branch (4683:6): [True: 0, False: 824]
  ------------------
 4684|      0|    goto out;
 4685|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4686|       |#pragma GCC diagnostic push
 4687|       |/* error: 'memcpy' offset [137, 142] from the object at 'req' is out of
 4688|       |   the bounds of referenced subobject 'method' with type 'char[1]' at
 4689|       |   offset 136 */
 4690|       |#pragma GCC diagnostic ignored "-Warray-bounds"
 4691|       |#endif
 4692|    824|  memcpy(req->method, method, m_len);
 4693|       |#if defined(__GNUC__) && __GNUC__ >= 13
 4694|       |#pragma GCC diagnostic pop
 4695|       |#endif
 4696|    824|  if(scheme) {
  ------------------
  |  Branch (4696:6): [True: 0, False: 824]
  ------------------
 4697|      0|    req->scheme = curlx_memdup0(scheme, s_len);
 4698|      0|    if(!req->scheme)
  ------------------
  |  Branch (4698:8): [True: 0, False: 0]
  ------------------
 4699|      0|      goto out;
 4700|      0|  }
 4701|    824|  if(authority) {
  ------------------
  |  Branch (4701:6): [True: 824, False: 0]
  ------------------
 4702|    824|    req->authority = curlx_memdup0(authority, a_len);
 4703|    824|    if(!req->authority)
  ------------------
  |  Branch (4703:8): [True: 0, False: 824]
  ------------------
 4704|      0|      goto out;
 4705|    824|  }
 4706|    824|  if(path) {
  ------------------
  |  Branch (4706:6): [True: 0, False: 824]
  ------------------
 4707|      0|    req->path = curlx_memdup0(path, p_len);
 4708|      0|    if(!req->path)
  ------------------
  |  Branch (4708:8): [True: 0, False: 0]
  ------------------
 4709|      0|      goto out;
 4710|      0|  }
 4711|    824|  Curl_dynhds_init(&req->headers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|    824|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4712|    824|  Curl_dynhds_init(&req->trailers, 0, DYN_HTTP_REQUEST);
  ------------------
  |  |   69|    824|#define DYN_HTTP_REQUEST    (1024 * 1024)
  ------------------
 4713|    824|  result = CURLE_OK;
 4714|       |
 4715|    824|out:
 4716|    824|  if(result && req)
  ------------------
  |  Branch (4716:6): [True: 0, False: 824]
  |  Branch (4716:16): [True: 0, False: 0]
  ------------------
 4717|      0|    Curl_http_req_free(req);
 4718|    824|  *preq = result ? NULL : req;
  ------------------
  |  Branch (4718:11): [True: 0, False: 824]
  ------------------
 4719|    824|  return result;
 4720|    824|}
Curl_http_req_free:
 4844|    824|{
 4845|    824|  if(req) {
  ------------------
  |  Branch (4845:6): [True: 824, False: 0]
  ------------------
 4846|    824|    curlx_free(req->scheme);
  ------------------
  |  | 1483|    824|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4847|    824|    curlx_free(req->authority);
  ------------------
  |  | 1483|    824|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4848|    824|    curlx_free(req->path);
  ------------------
  |  | 1483|    824|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4849|    824|    Curl_dynhds_free(&req->headers);
 4850|    824|    Curl_dynhds_free(&req->trailers);
 4851|    824|    curlx_free(req);
  ------------------
  |  | 1483|    824|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 4852|    824|  }
 4853|    824|}
http.c:pickoneauth:
  351|    289|{
  352|    289|  bool picked;
  353|       |  /* only deal with authentication we want */
  354|    289|  unsigned long avail = pick->avail & pick->want & mask;
  355|    289|  picked = TRUE;
  ------------------
  |  | 1055|    289|#define TRUE true
  ------------------
  356|       |
  357|       |  /* The order of these checks is highly relevant, as this will be the order
  358|       |     of preference in case of the existence of multiple accepted types. */
  359|    289|  if(avail & CURLAUTH_NEGOTIATE)
  ------------------
  |  |  833|    289|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  |  Branch (359:6): [True: 0, False: 289]
  ------------------
  360|      0|    pick->picked = CURLAUTH_NEGOTIATE;
  ------------------
  |  |  833|      0|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  361|    289|#ifndef CURL_DISABLE_BEARER_AUTH
  362|    289|  else if(avail & CURLAUTH_BEARER)
  ------------------
  |  |  844|    289|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (362:11): [True: 5, False: 284]
  ------------------
  363|      5|    pick->picked = CURLAUTH_BEARER;
  ------------------
  |  |  844|      5|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  364|    284|#endif
  365|    284|#ifndef CURL_DISABLE_DIGEST_AUTH
  366|    284|  else if(avail & CURLAUTH_DIGEST)
  ------------------
  |  |  832|    284|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (366:11): [True: 132, False: 152]
  ------------------
  367|    132|    pick->picked = CURLAUTH_DIGEST;
  ------------------
  |  |  832|    132|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  368|    152|#endif
  369|    152|  else if(avail & CURLAUTH_NTLM)
  ------------------
  |  |  838|    152|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  |  Branch (369:11): [True: 0, False: 152]
  ------------------
  370|      0|    pick->picked = CURLAUTH_NTLM;
  ------------------
  |  |  838|      0|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  371|    152|#ifndef CURL_DISABLE_BASIC_AUTH
  372|    152|  else if(avail & CURLAUTH_BASIC)
  ------------------
  |  |  831|    152|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (372:11): [True: 104, False: 48]
  ------------------
  373|    104|    pick->picked = CURLAUTH_BASIC;
  ------------------
  |  |  831|    104|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  374|     48|#endif
  375|     48|#ifndef CURL_DISABLE_AWS
  376|     48|  else if(avail & CURLAUTH_AWS_SIGV4)
  ------------------
  |  |  845|     48|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (376:11): [True: 0, False: 48]
  ------------------
  377|      0|    pick->picked = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|      0|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  378|     48|#endif
  379|     48|  else {
  380|     48|    pick->picked = CURLAUTH_PICKNONE; /* we select to use nothing */
  ------------------
  |  |  123|     48|#define CURLAUTH_PICKNONE (1 << 30) /* do not use auth */
  ------------------
  381|     48|    picked = FALSE;
  ------------------
  |  | 1058|     48|#define FALSE false
  ------------------
  382|     48|  }
  383|    289|  pick->avail = CURLAUTH_NONE; /* clear it here */
  ------------------
  |  |  830|    289|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  384|       |
  385|    289|  return picked;
  386|    289|}
http.c:http_perhapsrewind:
  398|  10.9k|{
  399|  10.9k|  curl_off_t bytessent = data->req.writebytecount;
  400|  10.9k|  curl_off_t expectsend = Curl_creader_total_length(data);
  401|  10.9k|  curl_off_t upload_remain = (expectsend >= 0) ? (expectsend - bytessent) : -1;
  ------------------
  |  Branch (401:30): [True: 10.7k, False: 185]
  ------------------
  402|  10.9k|  bool little_upload_remains = (upload_remain >= 0 && upload_remain < 2000);
  ------------------
  |  Branch (402:33): [True: 10.7k, False: 185]
  |  Branch (402:55): [True: 10.7k, False: 0]
  ------------------
  403|  10.9k|  bool needs_rewind = Curl_creader_needs_rewind(data);
  404|       |  /* By default, we would like to abort the transfer when little or unknown
  405|       |   * amount remains. This may be overridden by authentications further
  406|       |   * below! */
  407|  10.9k|  bool abort_upload = (!data->req.upload_done && !little_upload_remains);
  ------------------
  |  Branch (407:24): [True: 194, False: 10.7k]
  |  Branch (407:50): [True: 0, False: 194]
  ------------------
  408|  10.9k|  VERBOSE(const char *ongoing_auth = NULL);
  ------------------
  |  | 1618|  10.9k|#define VERBOSE(x) x
  ------------------
  409|       |
  410|       |  /* We need a rewind before uploading client read data again. The
  411|       |   * checks below influence of the upload is to be continued
  412|       |   * or aborted early.
  413|       |   * This depends on how much remains to be sent and in what state
  414|       |   * the authentication is. Some auth schemes such as NTLM do not work
  415|       |   * for a new connection. */
  416|  10.9k|  if(needs_rewind) {
  ------------------
  |  Branch (416:6): [True: 743, False: 10.1k]
  ------------------
  417|    743|    infof(data, "Need to rewind upload for next request");
  ------------------
  |  |  143|    743|  do {                               \
  |  |  144|    743|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    743|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 743, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 743]
  |  |  |  |  ------------------
  |  |  |  |  320|    743|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    743|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    743|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 743]
  |  |  ------------------
  ------------------
  418|    743|    Curl_creader_set_rewind(data, TRUE);
  ------------------
  |  | 1055|    743|#define TRUE true
  ------------------
  419|    743|  }
  420|       |
  421|  10.9k|  if(conn->bits.close)
  ------------------
  |  Branch (421:6): [True: 3, False: 10.9k]
  ------------------
  422|       |    /* If we already decided to close this connection, we cannot veto. */
  423|      3|    return CURLE_OK;
  424|       |
  425|  10.9k|  if(abort_upload) {
  ------------------
  |  Branch (425:6): [True: 0, False: 10.9k]
  ------------------
  426|       |    /* We would like to abort the upload - but should we? */
  427|       |#ifdef USE_NTLM
  428|       |    if((data->state.authproxy.picked == CURLAUTH_NTLM) ||
  429|       |       (data->state.authhost.picked == CURLAUTH_NTLM)) {
  430|       |      VERBOSE(ongoing_auth = "NTLM");
  431|       |      if((conn->http_ntlm_state != NTLMSTATE_NONE) ||
  432|       |         (conn->proxy_ntlm_state != NTLMSTATE_NONE)) {
  433|       |        /* The NTLM-negotiation has started, keep on sending.
  434|       |         * Need to do further work on same connection */
  435|       |        abort_upload = FALSE;
  436|       |      }
  437|       |    }
  438|       |#endif
  439|       |#ifdef USE_SPNEGO
  440|       |    /* There is still data left to send */
  441|       |    if((data->state.authproxy.picked == CURLAUTH_NEGOTIATE) ||
  442|       |       (data->state.authhost.picked == CURLAUTH_NEGOTIATE)) {
  443|       |      VERBOSE(ongoing_auth = "NEGOTIATE");
  444|       |      if((conn->http_negotiate_state != GSS_AUTHNONE) ||
  445|       |         (conn->proxy_negotiate_state != GSS_AUTHNONE)) {
  446|       |        /* The NEGOTIATE-negotiation has started, keep on sending.
  447|       |         * Need to do further work on same connection */
  448|       |        abort_upload = FALSE;
  449|       |      }
  450|       |    }
  451|       |#endif
  452|      0|  }
  453|       |
  454|  10.9k|  if(abort_upload) {
  ------------------
  |  Branch (454:6): [True: 0, False: 10.9k]
  ------------------
  455|      0|    if(upload_remain >= 0)
  ------------------
  |  Branch (455:8): [True: 0, False: 0]
  ------------------
  456|      0|      infof(data, "%s%sclose instead of sending %" FMT_OFF_T " more bytes",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  457|      0|            ongoing_auth ? ongoing_auth : "",
  458|      0|            ongoing_auth ? " send, " : "",
  459|      0|            upload_remain);
  460|      0|    else
  461|      0|      infof(data, "%s%sclose instead of sending unknown amount "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  462|      0|            "of more bytes",
  463|      0|            ongoing_auth ? ongoing_auth : "",
  464|      0|            ongoing_auth ? " send, " : "");
  465|       |    /* We decided to abort the ongoing transfer */
  466|      0|    streamclose(conn, "Mid-auth HTTP and much data left to send");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  467|      0|    data->req.size = 0; /* do not download any more than 0 bytes */
  468|       |    data->req.http_bodyless = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  469|      0|  }
  470|  10.9k|  return CURLE_OK;
  471|  10.9k|}
http.c:http_should_fail:
  482|  24.3k|{
  483|  24.3k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  24.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (483:3): [True: 0, False: 24.3k]
  |  Branch (483:3): [True: 24.3k, False: 0]
  ------------------
  484|  24.3k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  24.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (484:3): [True: 0, False: 24.3k]
  |  Branch (484:3): [True: 24.3k, False: 0]
  ------------------
  485|       |
  486|       |  /*
  487|       |   * If we have not been asked to fail on error,
  488|       |   * do not fail.
  489|       |   */
  490|  24.3k|  if(!data->set.http_fail_on_error)
  ------------------
  |  Branch (490:6): [True: 24.1k, False: 213]
  ------------------
  491|  24.1k|    return FALSE;
  ------------------
  |  | 1058|  24.1k|#define FALSE false
  ------------------
  492|       |
  493|       |  /*
  494|       |   * Any code < 400 is never terminal.
  495|       |   */
  496|    213|  if(httpcode < 400)
  ------------------
  |  Branch (496:6): [True: 147, False: 66]
  ------------------
  497|    147|    return FALSE;
  ------------------
  |  | 1058|    147|#define FALSE false
  ------------------
  498|       |
  499|       |  /*
  500|       |   * A 416 response to a resume request is presumably because the file is
  501|       |   * already completely downloaded and thus not actually a fail.
  502|       |   */
  503|     66|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (503:6): [True: 24, False: 42]
  |  Branch (503:33): [True: 14, False: 10]
  ------------------
  504|     14|     httpcode == 416)
  ------------------
  |  Branch (504:6): [True: 2, False: 12]
  ------------------
  505|      2|    return FALSE;
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
  506|       |
  507|       |  /*
  508|       |   * Any code >= 400 that is not 401 or 407 is always
  509|       |   * a terminal error
  510|       |   */
  511|     64|  if((httpcode != 401) && (httpcode != 407))
  ------------------
  |  Branch (511:6): [True: 11, False: 53]
  |  Branch (511:27): [True: 7, False: 4]
  ------------------
  512|      7|    return TRUE;
  ------------------
  |  | 1055|      7|#define TRUE true
  ------------------
  513|       |
  514|       |  /*
  515|       |   * All we have left to deal with is 401 and 407
  516|       |   */
  517|     57|  DEBUGASSERT((httpcode == 401) || (httpcode == 407));
  ------------------
  |  | 1081|     57|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (517:3): [True: 57, False: 0]
  |  Branch (517:3): [True: 0, False: 0]
  |  Branch (517:3): [True: 53, False: 4]
  |  Branch (517:3): [True: 4, False: 0]
  ------------------
  518|       |
  519|       |  /*
  520|       |   * Examine the current authentication state to see if this is an error. The
  521|       |   * idea is for this function to get called after processing all the headers
  522|       |   * in a response message. If we have been to asked to authenticate
  523|       |   * a particular stage, and we have done it, we are OK. If we are already
  524|       |   * completely authenticated, it is not OK to get another 401 or 407.
  525|       |   *
  526|       |   * It is possible for authentication to go stale such that the client needs
  527|       |   * to reauthenticate. Once that info is available, use it here.
  528|       |   */
  529|       |
  530|       |  /*
  531|       |   * Either we are not authenticating, or we are supposed to be authenticating
  532|       |   * something else. This is an error.
  533|       |   */
  534|     57|  if((httpcode == 401) && !data->state.creds)
  ------------------
  |  Branch (534:6): [True: 53, False: 4]
  |  Branch (534:27): [True: 1, False: 52]
  ------------------
  535|      1|    return TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  536|     56|#ifndef CURL_DISABLE_PROXY
  537|     56|  if((httpcode == 407) && !data->conn->http_proxy.creds)
  ------------------
  |  Branch (537:6): [True: 4, False: 52]
  |  Branch (537:27): [True: 1, False: 3]
  ------------------
  538|      1|    return TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  539|     55|#endif
  540|       |
  541|     55|  return (bool)data->state.authproblem;
  542|     56|}
http.c:output_auth_headers:
  647|  12.8k|{
  648|  12.8k|  const char *auth = NULL;
  649|  12.8k|  CURLcode result = CURLE_OK;
  650|  12.8k|  (void)conn;
  651|       |
  652|       |#ifdef CURL_DISABLE_DIGEST_AUTH
  653|       |  (void)request;
  654|       |  (void)path;
  655|       |#endif
  656|  12.8k|#ifndef CURL_DISABLE_AWS
  657|  12.8k|  if((authstatus->picked == CURLAUTH_AWS_SIGV4) && !proxy) {
  ------------------
  |  |  845|  12.8k|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
  |  Branch (657:6): [True: 2.69k, False: 10.1k]
  |  Branch (657:52): [True: 2.69k, False: 0]
  ------------------
  658|       |    /* this method is never for proxy */
  659|  2.69k|    auth = "AWS_SIGV4";
  660|  2.69k|    result = Curl_output_aws_sigv4(data);
  661|  2.69k|    if(result)
  ------------------
  |  Branch (661:8): [True: 16, False: 2.68k]
  ------------------
  662|     16|      return result;
  663|  2.69k|  }
  664|  10.1k|  else
  665|  10.1k|#endif
  666|       |#ifdef USE_SPNEGO
  667|       |  if(authstatus->picked == CURLAUTH_NEGOTIATE) {
  668|       |    auth = "Negotiate";
  669|       |    result = Curl_output_negotiate(data, conn, proxy);
  670|       |    if(result)
  671|       |      return result;
  672|       |  }
  673|       |  else
  674|       |#endif
  675|       |#ifdef USE_NTLM
  676|       |  if(authstatus->picked == CURLAUTH_NTLM) {
  677|       |    auth = "NTLM";
  678|       |    result = Curl_output_ntlm(data, proxy);
  679|       |    if(result)
  680|       |      return result;
  681|       |  }
  682|       |  else
  683|       |#endif
  684|  10.1k|#ifndef CURL_DISABLE_DIGEST_AUTH
  685|  10.1k|  if(authstatus->picked == CURLAUTH_DIGEST) {
  ------------------
  |  |  832|  10.1k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (685:6): [True: 1.17k, False: 9.02k]
  ------------------
  686|  1.17k|    auth = "Digest";
  687|  1.17k|    result = Curl_output_digest(data,
  688|  1.17k|                                proxy,
  689|  1.17k|                                (const unsigned char *)request,
  690|  1.17k|                                (const unsigned char *)path);
  691|  1.17k|    if(result)
  ------------------
  |  Branch (691:8): [True: 0, False: 1.17k]
  ------------------
  692|      0|      return result;
  693|  1.17k|  }
  694|  9.02k|  else
  695|  9.02k|#endif
  696|  9.02k|#ifndef CURL_DISABLE_BASIC_AUTH
  697|  9.02k|  if(authstatus->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  831|  9.02k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (697:6): [True: 5.07k, False: 3.94k]
  ------------------
  698|       |    /* Basic */
  699|  5.07k|    if(
  700|  5.07k|#ifndef CURL_DISABLE_PROXY
  701|  5.07k|       (proxy && conn->http_proxy.creds &&
  ------------------
  |  Branch (701:9): [True: 642, False: 4.43k]
  |  Branch (701:18): [True: 208, False: 434]
  ------------------
  702|    208|        !Curl_checkProxyheaders(data, conn,
  ------------------
  |  Branch (702:9): [True: 208, False: 0]
  ------------------
  703|    208|                                STRCONST("Proxy-authorization"))) ||
  ------------------
  |  | 1292|    208|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  704|  4.86k|#endif
  705|  4.86k|       (!proxy && data->state.creds &&
  ------------------
  |  Branch (705:9): [True: 4.43k, False: 434]
  |  Branch (705:19): [True: 4.26k, False: 165]
  ------------------
  706|  4.47k|        !Curl_checkheaders(data, STRCONST("Authorization")))) {
  ------------------
  |  | 1292|  4.26k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (706:9): [True: 4.26k, False: 0]
  ------------------
  707|  4.47k|      auth = "Basic";
  708|  4.47k|      result = http_output_basic(data, conn, proxy);
  709|  4.47k|      if(result)
  ------------------
  |  Branch (709:10): [True: 0, False: 4.47k]
  ------------------
  710|      0|        return result;
  711|  4.47k|    }
  712|       |
  713|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  714|       |       functions work that way */
  715|  5.07k|    authstatus->done = TRUE;
  ------------------
  |  | 1055|  5.07k|#define TRUE true
  ------------------
  716|  5.07k|  }
  717|  12.8k|#endif
  718|  12.8k|#ifndef CURL_DISABLE_BEARER_AUTH
  719|  12.8k|  if(authstatus->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  844|  12.8k|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (719:6): [True: 120, False: 12.7k]
  ------------------
  720|       |    /* Bearer */
  721|    120|    if(!proxy && Curl_creds_has_oauth_bearer(data->state.creds) &&
  ------------------
  |  |   73|    239|#define Curl_creds_has_oauth_bearer(c)   ((c) && (c)->oauth_bearer[0])
  |  |  ------------------
  |  |  |  Branch (73:43): [True: 118, False: 1]
  |  |  |  Branch (73:50): [True: 29, False: 89]
  |  |  ------------------
  ------------------
  |  Branch (721:8): [True: 119, False: 1]
  ------------------
  722|     29|       !Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1292|     29|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (722:8): [True: 29, False: 0]
  ------------------
  723|     29|      auth = "Bearer";
  724|     29|      result = http_output_bearer(data);
  725|     29|      if(result)
  ------------------
  |  Branch (725:10): [True: 0, False: 29]
  ------------------
  726|      0|        return result;
  727|     29|    }
  728|       |
  729|       |    /* NOTE: this function should set 'done' TRUE, as the other auth
  730|       |       functions work that way */
  731|    120|    authstatus->done = TRUE;
  ------------------
  |  | 1055|    120|#define TRUE true
  ------------------
  732|    120|  }
  733|  12.8k|#endif
  734|       |
  735|  12.8k|  if(auth) {
  ------------------
  |  Branch (735:6): [True: 8.36k, False: 4.51k]
  ------------------
  736|  8.36k|#ifndef CURL_DISABLE_PROXY
  737|  8.36k|    if(proxy)
  ------------------
  |  Branch (737:8): [True: 228, False: 8.13k]
  ------------------
  738|    228|      data->info.proxyauthpicked = authstatus->picked;
  739|  8.13k|    else
  740|  8.13k|      data->info.httpauthpicked = authstatus->picked;
  741|  8.36k|    infof(data, "%s auth using %s with user '%s'",
  ------------------
  |  |  143|  8.36k|  do {                               \
  |  |  144|  8.36k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  8.36k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 8.36k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 8.36k]
  |  |  |  |  ------------------
  |  |  |  |  320|  8.36k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  8.36k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  8.36k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 8.36k]
  |  |  ------------------
  ------------------
  742|  8.36k|          proxy ? "Proxy" : "Server", auth,
  743|  8.36k|          proxy ? (conn->http_proxy.creds ?
  744|  8.36k|                   conn->http_proxy.creds->user : "") :
  745|  8.36k|          (data->state.creds ?
  746|  8.36k|           data->state.creds->user : ""));
  747|       |#else
  748|       |    (void)proxy;
  749|       |    infof(data, "Server auth using %s with user '%s'",
  750|       |          auth, data->state.creds ?
  751|       |          data->state.creds->user : "");
  752|       |#endif
  753|  8.36k|    authstatus->multipass = !authstatus->done;
  754|  8.36k|  }
  755|  4.51k|  else {
  756|  4.51k|    authstatus->multipass = FALSE;
  ------------------
  |  | 1058|  4.51k|#define FALSE false
  ------------------
  757|  4.51k|    if(proxy)
  ------------------
  |  Branch (757:8): [True: 503, False: 4.01k]
  ------------------
  758|    503|      data->info.proxyauthpicked = 0;
  759|  4.01k|    else
  760|  4.01k|      data->info.httpauthpicked = 0;
  761|  4.51k|  }
  762|       |
  763|  12.8k|  return result;
  764|  12.8k|}
http.c:http_output_basic:
  255|  4.47k|{
  256|  4.47k|  size_t size = 0;
  257|  4.47k|  char *authorization = NULL;
  258|  4.47k|  char **p_hd;
  259|  4.47k|  CURLcode result;
  260|  4.47k|  struct Curl_creds *creds = NULL;
  261|  4.47k|  char *out;
  262|       |
  263|       |  /* credentials are unique per transfer for HTTP, do not use the ones for the
  264|       |     connection */
  265|  4.47k|  if(proxy) {
  ------------------
  |  Branch (265:6): [True: 208, False: 4.26k]
  ------------------
  266|    208|#ifndef CURL_DISABLE_PROXY
  267|    208|    p_hd = &data->req.hd_proxy_auth;
  268|    208|    creds = conn->http_proxy.creds;
  269|       |#else
  270|       |    (void)conn;
  271|       |    return CURLE_NOT_BUILT_IN;
  272|       |#endif
  273|    208|  }
  274|  4.26k|  else {
  275|  4.26k|    p_hd = &data->req.hd_auth;
  276|  4.26k|    creds = data->state.creds;
  277|  4.26k|  }
  278|       |
  279|  4.47k|  if(!creds) {
  ------------------
  |  Branch (279:6): [True: 0, False: 4.47k]
  ------------------
  280|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (280:5): [Folded, False: 0]
  |  Branch (280:5): [Folded, False: 0]
  ------------------
  281|      0|    return CURLE_FAILED_INIT;
  282|      0|  }
  283|       |
  284|  4.47k|  out = curl_maprintf("%s:%s", creds->user, creds->passwd);
  285|  4.47k|  if(!out)
  ------------------
  |  Branch (285:6): [True: 0, False: 4.47k]
  ------------------
  286|      0|    return CURLE_OUT_OF_MEMORY;
  287|       |
  288|  4.47k|  result = curlx_base64_encode((uint8_t *)out, strlen(out),
  289|  4.47k|                               &authorization, &size);
  290|  4.47k|  if(result)
  ------------------
  |  Branch (290:6): [True: 0, False: 4.47k]
  ------------------
  291|      0|    goto fail;
  292|       |
  293|  4.47k|  if(!authorization) {
  ------------------
  |  Branch (293:6): [True: 0, False: 4.47k]
  ------------------
  294|      0|    result = CURLE_REMOTE_ACCESS_DENIED;
  295|      0|    goto fail;
  296|      0|  }
  297|       |
  298|  4.47k|  curlx_free(*p_hd);
  ------------------
  |  | 1483|  4.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  299|  4.47k|  *p_hd = curl_maprintf("%sAuthorization: Basic %s\r\n",
  300|  4.47k|                        proxy ? "Proxy-" : "",
  ------------------
  |  Branch (300:25): [True: 208, False: 4.26k]
  ------------------
  301|  4.47k|                        authorization);
  302|  4.47k|  curlx_free(authorization);
  ------------------
  |  | 1483|  4.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|  4.47k|  if(!*p_hd) {
  ------------------
  |  Branch (303:6): [True: 0, False: 4.47k]
  ------------------
  304|      0|    result = CURLE_OUT_OF_MEMORY;
  305|      0|    goto fail;
  306|      0|  }
  307|       |
  308|  4.47k|fail:
  309|  4.47k|  curlx_free(out);
  ------------------
  |  | 1483|  4.47k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  310|  4.47k|  return result;
  311|  4.47k|}
http.c:http_output_bearer:
  323|     29|{
  324|     29|  char **userp;
  325|     29|  CURLcode result = CURLE_OK;
  326|       |
  327|     29|  DEBUGASSERT(Curl_creds_has_oauth_bearer(data->state.creds));
  ------------------
  |  | 1081|     29|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 29]
  |  Branch (327:3): [True: 0, False: 0]
  |  Branch (327:3): [True: 29, False: 0]
  |  Branch (327:3): [True: 29, False: 0]
  ------------------
  328|     29|  userp = &data->req.hd_auth;
  329|     29|  curlx_free(*userp);
  ------------------
  |  | 1483|     29|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  330|     29|  *userp = curl_maprintf("Authorization: Bearer %s\r\n",
  331|     29|                         Curl_creds_oauth_bearer(data->state.creds));
  ------------------
  |  |   77|     29|#define Curl_creds_oauth_bearer(c)       ((c) ? (c)->oauth_bearer : "")
  |  |  ------------------
  |  |  |  Branch (77:43): [True: 29, False: 0]
  |  |  ------------------
  ------------------
  332|       |
  333|     29|  if(!*userp) {
  ------------------
  |  Branch (333:6): [True: 0, False: 29]
  ------------------
  334|      0|    result = CURLE_OUT_OF_MEMORY;
  335|      0|    goto fail;
  336|      0|  }
  337|       |
  338|     29|fail:
  339|     29|  return result;
  340|     29|}
http.c:authcmp:
  887|   534k|{
  888|       |  /* the auth string must not have an alnum following */
  889|   534k|  size_t n = strlen(auth);
  890|   534k|  return curl_strnequal(auth, line, n) && !ISALNUM(line[n]);
  ------------------
  |  |   41|   640k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|   210k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 10.9k, False: 94.4k]
  |  |  |  |  |  Branch (44:38): [True: 1.07k, False: 9.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   209k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 3.84k, False: 100k]
  |  |  |  |  |  Branch (43:38): [True: 2.95k, False: 890]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|   101k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 4.25k, False: 97.1k]
  |  |  |  |  |  Branch (42:38): [True: 447, False: 3.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (890:10): [True: 105k, False: 429k]
  ------------------
  891|   534k|}
http.c:auth_digest:
  962|  48.9k|{
  963|  48.9k|  if(authp->avail & CURLAUTH_DIGEST) {
  ------------------
  |  |  832|  48.9k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  |  Branch (963:6): [True: 9.25k, False: 39.6k]
  ------------------
  964|  9.25k|    *availp |= CURLAUTH_DIGEST;
  ------------------
  |  |  832|  9.25k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  965|  9.25k|    infof(data, "Ignoring duplicate digest auth header.");
  ------------------
  |  |  143|  9.25k|  do {                               \
  |  |  144|  9.25k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  9.25k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 9.25k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.25k]
  |  |  |  |  ------------------
  |  |  |  |  320|  9.25k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  9.25k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  9.25k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 9.25k]
  |  |  ------------------
  ------------------
  966|  9.25k|  }
  967|  39.6k|  else if(Curl_auth_is_digest_supported()) {
  ------------------
  |  Branch (967:11): [True: 39.6k, False: 0]
  ------------------
  968|  39.6k|    CURLcode result;
  969|       |
  970|  39.6k|    *availp |= CURLAUTH_DIGEST;
  ------------------
  |  |  832|  39.6k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  971|  39.6k|    authp->avail |= CURLAUTH_DIGEST;
  ------------------
  |  |  832|  39.6k|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  972|       |
  973|       |    /* We call this function on input Digest headers even if Digest
  974|       |     * authentication is not activated yet, as we need to store the
  975|       |     * incoming data from this header in case we are going to use
  976|       |     * Digest */
  977|  39.6k|    result = Curl_input_digest(data, proxy, auth);
  978|  39.6k|    if(result) {
  ------------------
  |  Branch (978:8): [True: 39.0k, False: 580]
  ------------------
  979|  39.0k|      if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (979:10): [True: 0, False: 39.0k]
  ------------------
  980|      0|        return result;
  981|  39.0k|      infof(data, "Digest authentication problem, ignoring.");
  ------------------
  |  |  143|  39.0k|  do {                               \
  |  |  144|  39.0k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  39.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 39.0k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 39.0k]
  |  |  |  |  ------------------
  |  |  |  |  320|  39.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  39.0k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  39.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 39.0k]
  |  |  ------------------
  ------------------
  982|  39.0k|      data->state.authproblem = TRUE;
  ------------------
  |  | 1055|  39.0k|#define TRUE true
  ------------------
  983|  39.0k|    }
  984|  39.6k|  }
  985|  48.9k|  return CURLE_OK;
  986|  48.9k|}
http.c:auth_basic:
  993|  51.0k|{
  994|  51.0k|  *availp |= CURLAUTH_BASIC;
  ------------------
  |  |  831|  51.0k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  995|  51.0k|  authp->avail |= CURLAUTH_BASIC;
  ------------------
  |  |  831|  51.0k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  996|  51.0k|  if(authp->picked == CURLAUTH_BASIC) {
  ------------------
  |  |  831|  51.0k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (996:6): [True: 49.7k, False: 1.34k]
  ------------------
  997|       |    /* We asked for Basic authentication but got a 40X back anyway, which
  998|       |       means our name+password is not valid. */
  999|  49.7k|    authp->avail = CURLAUTH_NONE;
  ------------------
  |  |  830|  49.7k|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
 1000|  49.7k|    infof(data, "Basic authentication problem, ignoring.");
  ------------------
  |  |  143|  49.7k|  do {                               \
  |  |  144|  49.7k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  49.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 49.7k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 49.7k]
  |  |  |  |  ------------------
  |  |  |  |  320|  49.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  49.7k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  49.7k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 49.7k]
  |  |  ------------------
  ------------------
 1001|       |    data->state.authproblem = TRUE;
  ------------------
  |  | 1055|  49.7k|#define TRUE true
  ------------------
 1002|  49.7k|  }
 1003|  51.0k|  return CURLE_OK;
 1004|  51.0k|}
http.c:auth_bearer:
 1011|    976|{
 1012|    976|  *availp |= CURLAUTH_BEARER;
  ------------------
  |  |  844|    976|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
 1013|    976|  authp->avail |= CURLAUTH_BEARER;
  ------------------
  |  |  844|    976|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
 1014|    976|  if(authp->picked == CURLAUTH_BEARER) {
  ------------------
  |  |  844|    976|#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
  ------------------
  |  Branch (1014:6): [True: 227, False: 749]
  ------------------
 1015|       |    /* We asked for Bearer authentication but got a 40X back anyway, which
 1016|       |       means our token is not valid. */
 1017|    227|    authp->avail = CURLAUTH_NONE;
  ------------------
  |  |  830|    227|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
 1018|    227|    infof(data, "Bearer authentication problem, ignoring.");
  ------------------
  |  |  143|    227|  do {                               \
  |  |  144|    227|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    227|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 227, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 227]
  |  |  |  |  ------------------
  |  |  |  |  320|    227|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    227|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    227|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 227]
  |  |  ------------------
  ------------------
 1019|       |    data->state.authproblem = TRUE;
  ------------------
  |  | 1055|    227|#define TRUE true
  ------------------
 1020|    227|  }
 1021|    976|  return CURLE_OK;
 1022|    976|}
http.c:http_switch_to_get:
 1119|  1.18k|{
 1120|  1.18k|  const char *req = data->set.str[STRING_CUSTOMREQUEST];
 1121|       |
 1122|  1.18k|  if((req || data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (1122:7): [True: 160, False: 1.02k]
  |  Branch (1122:14): [True: 213, False: 808]
  ------------------
 1123|    373|     (data->set.http_follow_mode == CURLFOLLOW_OBEYCODE)) {
  ------------------
  |  |  183|    373|#define CURLFOLLOW_OBEYCODE  2L
  ------------------
  |  Branch (1123:6): [True: 178, False: 195]
  ------------------
 1124|    178|    NOVERBOSE((void)code);
  ------------------
  |  | 1619|    178|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|    178|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 178]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1125|    178|    infof(data, "Switch to GET because of %d response", code);
  ------------------
  |  |  143|    178|  do {                               \
  |  |  144|    178|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    178|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 178, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 178]
  |  |  |  |  ------------------
  |  |  |  |  320|    178|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    178|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    178|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 178]
  |  |  ------------------
  ------------------
 1126|    178|    data->state.http_ignorecustom = TRUE;
  ------------------
  |  | 1055|    178|#define TRUE true
  ------------------
 1127|    178|  }
 1128|  1.00k|  else if(req && (data->set.http_follow_mode != CURLFOLLOW_FIRSTONLY))
  ------------------
  |  |  186|    107|#define CURLFOLLOW_FIRSTONLY 3L
  ------------------
  |  Branch (1128:11): [True: 107, False: 896]
  |  Branch (1128:18): [True: 18, False: 89]
  ------------------
 1129|     18|    infof(data, "Stick to %s instead of GET", req);
  ------------------
  |  |  143|     18|  do {                               \
  |  |  144|     18|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     18|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 18, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  320|     18|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     18|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
 1130|       |
 1131|  1.18k|  data->state.httpreq = HTTPREQ_GET;
 1132|       |  Curl_creader_set_rewind(data, FALSE);
  ------------------
  |  | 1058|  1.18k|#define FALSE false
  ------------------
 1133|  1.18k|}
http.c:http_exp100_is_waiting:
 1561|     46|{
 1562|     46|  struct Curl_creader *r = Curl_creader_get_by_type(data, &cr_exp100);
 1563|     46|  if(r) {
  ------------------
  |  Branch (1563:6): [True: 0, False: 46]
  ------------------
 1564|      0|    struct cr_exp100_ctx *ctx = r->ctx;
 1565|      0|    return ctx->state == EXP100_AWAITING_CONTINUE;
 1566|      0|  }
 1567|     46|  return FALSE;
  ------------------
  |  | 1058|     46|#define FALSE false
  ------------------
 1568|     46|}
http.c:http_write_header:
 1612|  15.8k|{
 1613|  15.8k|  CURLcode result;
 1614|  15.8k|  int writetype;
 1615|       |
 1616|       |  /* now, only output this if the header AND body are requested:
 1617|       |   */
 1618|  15.8k|  Curl_debug(data, CURLINFO_HEADER_IN, hd, hdlen);
 1619|       |
 1620|  15.8k|  writetype = CLIENTWRITE_HEADER |
  ------------------
  |  |   44|  15.8k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
 1621|  15.8k|    ((data->req.httpcode / 100 == 1) ? CLIENTWRITE_1XX : 0);
  ------------------
  |  |   47|  2.12k|#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
  ------------------
  |  Branch (1621:6): [True: 2.12k, False: 13.6k]
  ------------------
 1622|       |
 1623|  15.8k|  result = Curl_client_write(data, writetype, hd, hdlen);
 1624|  15.8k|  if(result)
  ------------------
  |  Branch (1624:6): [True: 1, False: 15.8k]
  ------------------
 1625|      1|    return result;
 1626|       |
 1627|  15.8k|  result = Curl_bump_headersize(data, hdlen, FALSE);
  ------------------
  |  | 1058|  15.8k|#define FALSE false
  ------------------
 1628|  15.8k|  if(result)
  ------------------
  |  Branch (1628:6): [True: 0, False: 15.8k]
  ------------------
 1629|      0|    return result;
 1630|       |
 1631|  15.8k|  data->req.deductheadercount = (100 <= data->req.httpcode &&
  ------------------
  |  Branch (1631:34): [True: 15.1k, False: 651]
  ------------------
 1632|  15.1k|                                 199 >= data->req.httpcode) ?
  ------------------
  |  Branch (1632:34): [True: 2.12k, False: 13.0k]
  ------------------
 1633|  13.6k|    data->req.headerbytecount : 0;
 1634|  15.8k|  return result;
 1635|  15.8k|}
http.c:http_rw_hd:
 4211|   177k|{
 4212|   177k|  CURLcode result = CURLE_OK;
 4213|   177k|  struct SingleRequest *k = &data->req;
 4214|   177k|  int writetype;
 4215|   177k|  DEBUGASSERT(!hd[hdlen]); /* null-terminated */
  ------------------
  |  | 1081|   177k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4215:3): [True: 0, False: 177k]
  |  Branch (4215:3): [True: 177k, False: 0]
  ------------------
 4216|       |
 4217|   177k|  *pconsumed = 0;
 4218|   177k|  if((0x0a == *hd) || (0x0d == *hd)) {
  ------------------
  |  Branch (4218:6): [True: 12.1k, False: 165k]
  |  Branch (4218:23): [True: 2.05k, False: 163k]
  ------------------
 4219|       |    /* Empty header line means end of headers! */
 4220|  14.2k|    struct dynbuf last_header;
 4221|  14.2k|    size_t consumed;
 4222|       |
 4223|  14.2k|    curlx_dyn_init(&last_header, hdlen + 1);
 4224|  14.2k|    result = curlx_dyn_addn(&last_header, hd, hdlen);
 4225|  14.2k|    if(result)
  ------------------
  |  Branch (4225:8): [True: 0, False: 14.2k]
  ------------------
 4226|      0|      return result;
 4227|       |
 4228|       |    /* analyze the response to find out what to do. */
 4229|       |    /* Caveat: we clear anything in the header brigade, because a
 4230|       |     * response might switch HTTP version which may call use recursively.
 4231|       |     * Not nice, but that is currently the way of things. */
 4232|  14.2k|    curlx_dyn_reset(&data->state.headerb);
 4233|  14.2k|    result = http_on_response(data, curlx_dyn_ptr(&last_header),
 4234|  14.2k|                              curlx_dyn_len(&last_header),
 4235|  14.2k|                              buf_remain, blen, &consumed);
 4236|  14.2k|    *pconsumed += consumed;
 4237|  14.2k|    curlx_dyn_free(&last_header);
 4238|  14.2k|    return result;
 4239|  14.2k|  }
 4240|       |
 4241|       |  /*
 4242|       |   * Checks for special headers coming up.
 4243|       |   */
 4244|       |
 4245|   163k|  writetype = CLIENTWRITE_HEADER;
  ------------------
  |  |   44|   163k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
 4246|   163k|  if(!k->headerline++) {
  ------------------
  |  Branch (4246:6): [True: 16.6k, False: 146k]
  ------------------
 4247|       |    /* This is the first header, it MUST be the error code line
 4248|       |       or else we consider this to be the body right away! */
 4249|  16.6k|    bool fine_statusline = FALSE;
  ------------------
  |  | 1058|  16.6k|#define FALSE false
  ------------------
 4250|       |
 4251|  16.6k|    k->httpversion = 0; /* Do not know yet */
 4252|  16.6k|    if(data->conn->scheme->protocol & PROTO_FAMILY_HTTP) {
  ------------------
  |  |   84|  16.6k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  16.6k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  16.6k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  16.6k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  16.6k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  16.6k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (4252:8): [True: 0, False: 16.6k]
  ------------------
 4253|       |      /*
 4254|       |       * https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2
 4255|       |       *
 4256|       |       * The response code is always a three-digit number in HTTP as the spec
 4257|       |       * says. We allow any three-digit number here, but we cannot make
 4258|       |       * guarantees on future behaviors since it is not within the protocol.
 4259|       |       */
 4260|      0|      const char *p = hd;
 4261|       |
 4262|      0|      curlx_str_passblanks(&p);
 4263|      0|      if(!strncmp(p, "HTTP/", 5)) {
  ------------------
  |  Branch (4263:10): [True: 0, False: 0]
  ------------------
 4264|      0|        p += 5;
 4265|      0|        switch(*p) {
 4266|      0|        case '1':
  ------------------
  |  Branch (4266:9): [True: 0, False: 0]
  ------------------
 4267|      0|          p++;
 4268|      0|          if((p[0] == '.') && (p[1] == '0' || p[1] == '1')) {
  ------------------
  |  Branch (4268:14): [True: 0, False: 0]
  |  Branch (4268:32): [True: 0, False: 0]
  |  Branch (4268:47): [True: 0, False: 0]
  ------------------
 4269|      0|            if(ISBLANK(p[2])) {
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4270|      0|              k->httpversion = (unsigned char)(10 + (p[1] - '0'));
 4271|      0|              p += 3;
 4272|      0|              if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                            if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                            if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4273|      0|                k->httpcode = ((p[0] - '0') * 100) + ((p[1] - '0') * 10) +
 4274|      0|                  (p[2] - '0');
 4275|       |                /* RFC 9112 requires a single space following the status code,
 4276|       |                   but the browsers do not so let's not insist */
 4277|      0|                fine_statusline = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4278|      0|              }
 4279|      0|            }
 4280|      0|          }
 4281|      0|          if(!fine_statusline) {
  ------------------
  |  Branch (4281:14): [True: 0, False: 0]
  ------------------
 4282|      0|            failf(data, "Unsupported HTTP/1 subversion in response");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4283|      0|            return CURLE_UNSUPPORTED_PROTOCOL;
 4284|      0|          }
 4285|      0|          break;
 4286|      0|        case '2':
  ------------------
  |  Branch (4286:9): [True: 0, False: 0]
  ------------------
 4287|      0|        case '3':
  ------------------
  |  Branch (4287:9): [True: 0, False: 0]
  ------------------
 4288|      0|          if(!ISBLANK(p[1]))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4289|      0|            break;
 4290|      0|          k->httpversion = (unsigned char)((*p - '0') * 10);
 4291|      0|          p += 2;
 4292|      0|          if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                        if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                        if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
  ------------------
  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4293|      0|            k->httpcode = ((p[0] - '0') * 100) + ((p[1] - '0') * 10) +
 4294|      0|              (p[2] - '0');
 4295|      0|            p += 3;
 4296|      0|            if(!ISBLANK(*p))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4297|      0|              break;
 4298|      0|            fine_statusline = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4299|      0|          }
 4300|      0|          break;
 4301|      0|        default: /* unsupported */
  ------------------
  |  Branch (4301:9): [True: 0, False: 0]
  ------------------
 4302|      0|          failf(data, "Unsupported HTTP version in response");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4303|      0|          return CURLE_UNSUPPORTED_PROTOCOL;
 4304|      0|        }
 4305|      0|      }
 4306|       |
 4307|      0|      if(!fine_statusline) {
  ------------------
  |  Branch (4307:10): [True: 0, False: 0]
  ------------------
 4308|       |        /* If user has set option HTTP200ALIASES,
 4309|       |           compare header line against list of aliases
 4310|       |        */
 4311|      0|        statusline check = checkhttpprefix(data, hd, hdlen);
 4312|      0|        if(check == STATUS_DONE) {
  ------------------
  |  Branch (4312:12): [True: 0, False: 0]
  ------------------
 4313|      0|          fine_statusline = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4314|      0|          k->httpcode = 200;
 4315|      0|          k->httpversion = 10;
 4316|      0|        }
 4317|      0|      }
 4318|      0|    }
 4319|  16.6k|    else if(data->conn->scheme->protocol & CURLPROTO_RTSP) {
  ------------------
  |  | 1096|  16.6k|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (4319:13): [True: 16.6k, False: 0]
  ------------------
 4320|  16.6k|      const char *p = hd;
 4321|  16.6k|      struct Curl_str ver;
 4322|  16.6k|      curl_off_t status;
 4323|       |      /* we set the max string a little excessive to forgive some leading
 4324|       |         spaces */
 4325|  16.6k|      if(!curlx_str_until(&p, &ver, 32, ' ') &&
  ------------------
  |  Branch (4325:10): [True: 16.6k, False: 2]
  ------------------
 4326|  16.6k|         !curlx_str_single(&p, ' ') &&
  ------------------
  |  Branch (4326:10): [True: 16.6k, False: 13]
  ------------------
 4327|  16.6k|         !curlx_str_number(&p, &status, 999)) {
  ------------------
  |  Branch (4327:10): [True: 16.6k, False: 26]
  ------------------
 4328|  16.6k|        curlx_str_trimblanks(&ver);
 4329|  16.6k|        if(curlx_str_cmp(&ver, "RTSP/1.0")) {
  ------------------
  |  Branch (4329:12): [True: 16.5k, False: 72]
  ------------------
 4330|  16.5k|          k->httpcode = (int)status;
 4331|  16.5k|          fine_statusline = TRUE;
  ------------------
  |  | 1055|  16.5k|#define TRUE true
  ------------------
 4332|  16.5k|          k->httpversion = 11; /* RTSP acts like HTTP 1.1 */
 4333|  16.5k|        }
 4334|  16.6k|      }
 4335|  16.6k|      if(!fine_statusline)
  ------------------
  |  Branch (4335:10): [True: 113, False: 16.5k]
  ------------------
 4336|    113|        return CURLE_WEIRD_SERVER_REPLY;
 4337|  16.6k|    }
 4338|       |
 4339|  16.5k|    if(fine_statusline) {
  ------------------
  |  Branch (4339:8): [True: 16.5k, False: 0]
  ------------------
 4340|  16.5k|      result = http_statusline(data, data->conn);
 4341|  16.5k|      if(result)
  ------------------
  |  Branch (4341:10): [True: 0, False: 16.5k]
  ------------------
 4342|      0|        return result;
 4343|  16.5k|      writetype |= CLIENTWRITE_STATUS;
  ------------------
  |  |   45|  16.5k|#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
  ------------------
 4344|  16.5k|    }
 4345|      0|    else {
 4346|      0|      k->header = FALSE;   /* this is not a header line */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 4347|      0|      return CURLE_WEIRD_SERVER_REPLY;
 4348|      0|    }
 4349|  16.5k|  }
 4350|       |
 4351|   163k|  result = verify_header(data, hd, hdlen);
 4352|   163k|  if(result)
  ------------------
  |  Branch (4352:6): [True: 625, False: 162k]
  ------------------
 4353|    625|    return result;
 4354|       |
 4355|   162k|  result = http_header(data, hd, hdlen);
 4356|   162k|  if(result)
  ------------------
  |  Branch (4356:6): [True: 342, False: 162k]
  ------------------
 4357|    342|    return result;
 4358|       |
 4359|       |  /*
 4360|       |   * Taken in one (more) header. Write it to the client.
 4361|       |   */
 4362|   162k|  Curl_debug(data, CURLINFO_HEADER_IN, hd, hdlen);
 4363|       |
 4364|   162k|  if(k->httpcode / 100 == 1)
  ------------------
  |  Branch (4364:6): [True: 8.22k, False: 154k]
  ------------------
 4365|  8.22k|    writetype |= CLIENTWRITE_1XX;
  ------------------
  |  |   47|  8.22k|#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
  ------------------
 4366|   162k|  result = Curl_client_write(data, writetype, hd, hdlen);
 4367|   162k|  if(result)
  ------------------
  |  Branch (4367:6): [True: 1, False: 162k]
  ------------------
 4368|      1|    return result;
 4369|       |
 4370|   162k|  result = Curl_bump_headersize(data, hdlen, FALSE);
  ------------------
  |  | 1058|   162k|#define FALSE false
  ------------------
 4371|   162k|  if(result)
  ------------------
  |  Branch (4371:6): [True: 0, False: 162k]
  ------------------
 4372|      0|    return result;
 4373|       |
 4374|   162k|  return CURLE_OK;
 4375|   162k|}
http.c:http_on_response:
 4089|  14.2k|{
 4090|  14.2k|  struct connectdata *conn = data->conn;
 4091|  14.2k|  CURLcode result = CURLE_OK;
 4092|  14.2k|  struct SingleRequest *k = &data->req;
 4093|  14.2k|  bool conn_changed = FALSE;
  ------------------
  |  | 1058|  14.2k|#define FALSE false
  ------------------
 4094|       |
 4095|  14.2k|  (void)buf; /* not used without HTTP2 enabled */
 4096|  14.2k|  *pconsumed = 0;
 4097|       |
 4098|  14.2k|  if(k->upgr101 == UPGR101_RECEIVED) {
  ------------------
  |  Branch (4098:6): [True: 0, False: 14.2k]
  ------------------
 4099|       |    /* supposedly upgraded to http2 now */
 4100|      0|    if(data->req.httpversion != 20)
  ------------------
  |  Branch (4100:8): [True: 0, False: 0]
  ------------------
 4101|      0|      infof(data, "Lying server, not serving HTTP/2");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4102|      0|  }
 4103|       |
 4104|  14.2k|  if(k->httpcode < 200 && last_hd) {
  ------------------
  |  Branch (4104:6): [True: 2.08k, False: 12.1k]
  |  Branch (4104:27): [True: 2.08k, False: 0]
  ------------------
 4105|       |    /* Intermediate responses might trigger processing of more responses,
 4106|       |     * write the last header to the client before proceeding. */
 4107|  2.08k|    result = http_write_header(data, last_hd, last_hd_len);
 4108|  2.08k|    last_hd = NULL; /* handled it */
 4109|  2.08k|    if(result)
  ------------------
  |  Branch (4109:8): [True: 0, False: 2.08k]
  ------------------
 4110|      0|      goto out;
 4111|  2.08k|  }
 4112|       |
 4113|  14.2k|  if(k->httpcode < 100) {
  ------------------
  |  Branch (4113:6): [True: 39, False: 14.1k]
  ------------------
 4114|     39|    failf(data, "Unsupported response code in HTTP response");
  ------------------
  |  |   62|     39|#define failf Curl_failf
  ------------------
 4115|     39|    result = CURLE_UNSUPPORTED_PROTOCOL;
 4116|     39|    goto out;
 4117|     39|  }
 4118|  14.1k|  else if(k->httpcode < 200) {
  ------------------
  |  Branch (4118:11): [True: 2.04k, False: 12.1k]
  ------------------
 4119|  2.04k|    result = http_on_1xx_response(data, buf, blen, pconsumed, &conn_changed);
 4120|  2.04k|    goto out;
 4121|  2.04k|  }
 4122|       |
 4123|       |  /* k->httpcode >= 200, final response */
 4124|  12.1k|  k->header = FALSE;
  ------------------
  |  | 1058|  12.1k|#define FALSE false
  ------------------
 4125|  12.1k|  if(conn->bits.upgrade_in_progress) {
  ------------------
  |  Branch (4125:6): [True: 0, False: 12.1k]
  ------------------
 4126|       |    /* Asked for protocol upgrade, but it was not selected */
 4127|      0|    conn->bits.upgrade_in_progress = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 4128|      0|    conn_changed = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4129|      0|  }
 4130|       |
 4131|  12.1k|  if((k->size == -1) && !k->chunk && !conn->bits.close &&
  ------------------
  |  Branch (4131:6): [True: 6.61k, False: 5.52k]
  |  Branch (4131:25): [True: 6.32k, False: 292]
  |  Branch (4131:38): [True: 6.29k, False: 26]
  ------------------
 4132|  6.29k|     (k->httpversion == 11) &&
  ------------------
  |  Branch (4132:6): [True: 6.29k, False: 0]
  ------------------
 4133|  6.29k|     !(conn->scheme->protocol & CURLPROTO_RTSP) &&
  ------------------
  |  | 1096|  6.29k|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (4133:6): [True: 0, False: 6.29k]
  ------------------
 4134|      0|     data->state.httpreq != HTTPREQ_HEAD) {
  ------------------
  |  Branch (4134:6): [True: 0, False: 0]
  ------------------
 4135|       |    /* On HTTP 1.1, when connection is not to get closed, but no
 4136|       |       Content-Length nor Transfer-Encoding chunked have been received,
 4137|       |       according to RFC2616 section 4.4 point 5, we assume that the server
 4138|       |       will close the connection to signal the end of the document. */
 4139|      0|    infof(data, "no chunk, no close, no size. Assume close to signal end");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4140|      0|    streamclose(conn, "HTTP: No end-of-message indicator");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 4141|      0|  }
 4142|       |
 4143|  12.1k|  http_check_auth_closure(data, conn);
 4144|       |
 4145|  12.1k|#ifndef CURL_DISABLE_WEBSOCKETS
 4146|       |  /* All >=200 HTTP status codes are errors when wanting ws */
 4147|  12.1k|  if(data->req.upgr101 == UPGR101_WS) {
  ------------------
  |  Branch (4147:6): [True: 0, False: 12.1k]
  ------------------
 4148|      0|    failf(data, "Refused WebSocket upgrade: %d", k->httpcode);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4149|      0|    result = CURLE_HTTP_RETURNED_ERROR;
 4150|      0|    goto out;
 4151|      0|  }
 4152|  12.1k|#endif
 4153|       |
 4154|       |  /* Check if this response means the transfer errored. */
 4155|  12.1k|  if(http_should_fail(data, data->req.httpcode)) {
  ------------------
  |  Branch (4155:6): [True: 11, False: 12.1k]
  ------------------
 4156|     11|    failf(data, "The requested URL returned error: %d",
  ------------------
  |  |   62|     11|#define failf Curl_failf
  ------------------
 4157|     11|          k->httpcode);
 4158|     11|    result = CURLE_HTTP_RETURNED_ERROR;
 4159|     11|    goto out;
 4160|     11|  }
 4161|       |
 4162|       |  /* Curl_http_auth_act() checks what authentication methods that are
 4163|       |   * available and decides which one (if any) to use. It will set 'newurl' if
 4164|       |   * an auth method was picked. */
 4165|  12.1k|  result = Curl_http_auth_act(data);
 4166|  12.1k|  if(result)
  ------------------
  |  Branch (4166:6): [True: 5, False: 12.1k]
  ------------------
 4167|      5|    goto out;
 4168|       |
 4169|  12.1k|  if(k->httpcode >= 300) {
  ------------------
  |  Branch (4169:6): [True: 12.0k, False: 109]
  ------------------
 4170|  12.0k|    result = http_handle_send_error(data);
 4171|  12.0k|    if(result)
  ------------------
  |  Branch (4171:8): [True: 0, False: 12.0k]
  ------------------
 4172|      0|      goto out;
 4173|  12.0k|  }
 4174|       |
 4175|       |  /* If we requested a "no body", this is a good time to get
 4176|       |   * out and return home.
 4177|       |   */
 4178|  12.1k|  if(data->req.no_body)
  ------------------
  |  Branch (4178:6): [True: 9.84k, False: 2.27k]
  ------------------
 4179|  9.84k|    k->download_done = TRUE;
  ------------------
  |  | 1055|  9.84k|#define TRUE true
  ------------------
 4180|       |
 4181|       |  /* If max download size is *zero* (nothing) we already have nothing and can
 4182|       |     safely return ok now! For HTTP/2, we would like to call
 4183|       |     http2_handle_stream_close to properly close a stream. In order to do
 4184|       |     this, we keep reading until we close the stream. */
 4185|  12.1k|  if((k->maxdownload == 0) && (k->httpversion_sent < 20))
  ------------------
  |  Branch (4185:6): [True: 3.85k, False: 8.26k]
  |  Branch (4185:31): [True: 3.85k, False: 0]
  ------------------
 4186|  3.85k|    k->download_done = TRUE;
  ------------------
  |  | 1055|  3.85k|#define TRUE true
  ------------------
 4187|       |
 4188|       |  /* final response without error, prepare to receive the body */
 4189|  12.1k|  result = http_firstwrite(data);
 4190|       |
 4191|  12.1k|  if(!result)
  ------------------
  |  Branch (4191:6): [True: 12.0k, False: 96]
  ------------------
 4192|       |    /* This is the last response that we get for the current request. Check on
 4193|       |     * the body size and determine if the response is complete. */
 4194|  12.0k|    result = http_size(data);
 4195|       |
 4196|  14.2k|out:
 4197|  14.2k|  if(last_hd)
  ------------------
  |  Branch (4197:6): [True: 12.1k, False: 2.08k]
  ------------------
 4198|       |    /* if not written yet, write it now */
 4199|  12.1k|    result = Curl_1st_fatal(result,
 4200|  12.1k|                            http_write_header(data, last_hd, last_hd_len));
 4201|  14.2k|  if(conn_changed)
  ------------------
  |  Branch (4201:6): [True: 1, False: 14.2k]
  ------------------
 4202|       |    /* poke the multi handle to allow pending pipewait to retry */
 4203|      1|    Curl_multi_connchanged(data->multi);
 4204|  14.2k|  return result;
 4205|  12.1k|}
http.c:http_on_1xx_response:
 3936|  2.04k|{
 3937|  2.04k|  struct SingleRequest *k = &data->req;
 3938|       |
 3939|       |  /* "A user agent MAY ignore unexpected 1xx status responses."
 3940|       |   * By default, we expect to get more responses after this one. */
 3941|  2.04k|  k->header = TRUE;
  ------------------
  |  | 1055|  2.04k|#define TRUE true
  ------------------
 3942|  2.04k|  k->headerline = 0; /* restart the header line counter */
 3943|       |
 3944|  2.04k|  switch(k->httpcode) {
 3945|  1.98k|  case 100:
  ------------------
  |  Branch (3945:3): [True: 1.98k, False: 67]
  ------------------
 3946|       |    /* We have made an HTTP PUT or POST and this is 1.1-lingo that tells us
 3947|       |     * that the server is OK with this and ready to receive the data. */
 3948|  1.98k|    http_exp100_got100(data);
 3949|  1.98k|    break;
 3950|      1|  case 101:
  ------------------
  |  Branch (3950:3): [True: 1, False: 2.04k]
  ------------------
 3951|      1|    return http_on_101_upgrade(data, buf, blen, pconsumed, conn_changed);
 3952|     66|  default:
  ------------------
  |  Branch (3952:3): [True: 66, False: 1.98k]
  ------------------
 3953|       |    /* The server may send us other 1xx responses, like informative 103. This
 3954|       |     * has no influence on request processing and we expect to receive a
 3955|       |     * final response eventually. */
 3956|     66|    break;
 3957|  2.04k|  }
 3958|  2.04k|  return CURLE_OK;
 3959|  2.04k|}
http.c:http_exp100_got100:
 1554|  1.98k|{
 1555|  1.98k|  struct Curl_creader *r = Curl_creader_get_by_type(data, &cr_exp100);
 1556|  1.98k|  if(r)
  ------------------
  |  Branch (1556:6): [True: 0, False: 1.98k]
  ------------------
 1557|      0|    http_exp100_continue(data, r);
 1558|  1.98k|}
http.c:http_on_101_upgrade:
 3873|      1|{
 3874|      1|  struct connectdata *conn = data->conn;
 3875|      1|  struct SingleRequest *k = &data->req;
 3876|       |
 3877|       |#if !defined(USE_NGHTTP2) && defined(CURL_DISABLE_WEBSOCKETS)
 3878|       |  (void)buf;
 3879|       |  (void)blen;
 3880|       |  (void)pconsumed;
 3881|       |#else
 3882|      1|  CURLcode result;
 3883|      1|  int upgr101_requested = k->upgr101;
 3884|      1|#endif
 3885|       |
 3886|      1|  if(k->httpversion_sent != 11) {
  ------------------
  |  Branch (3886:6): [True: 0, False: 1]
  ------------------
 3887|       |    /* invalid for other HTTP versions */
 3888|      0|    failf(data, "server sent 101 response while not talking HTTP/1.1");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3889|      0|    return CURLE_WEIRD_SERVER_REPLY;
 3890|      0|  }
 3891|       |
 3892|       |  /* Whatever the success, upgrade was selected. */
 3893|      1|  k->upgr101 = UPGR101_RECEIVED;
 3894|      1|  conn->bits.upgrade_in_progress = FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
 3895|      1|  *conn_changed = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
 3896|       |
 3897|       |  /* To be fully compliant, we would check the "Upgrade:" response header to
 3898|       |   * mention the protocol we requested. */
 3899|      1|#ifdef USE_NGHTTP2
 3900|      1|  if(upgr101_requested == UPGR101_H2) {
  ------------------
  |  Branch (3900:6): [True: 0, False: 1]
  ------------------
 3901|       |    /* Switch to HTTP/2, where we will get more responses. blen bytes in buf
 3902|       |     * are already h2 protocol bytes */
 3903|      0|    infof(data, "Received 101, Switching to HTTP/2");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3904|      0|    result = Curl_http2_upgrade(data, conn, FIRSTSOCKET, buf, blen);
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
 3905|      0|    if(!result)
  ------------------
  |  Branch (3905:8): [True: 0, False: 0]
  ------------------
 3906|      0|      *pconsumed += blen;
 3907|      0|    return result;
 3908|      0|  }
 3909|      1|#endif
 3910|      1|#ifndef CURL_DISABLE_WEBSOCKETS
 3911|      1|  if(upgr101_requested == UPGR101_WS) {
  ------------------
  |  Branch (3911:6): [True: 0, False: 1]
  ------------------
 3912|       |    /* Switch to WebSocket, where we now stream ws frames. blen bytes in buf
 3913|       |     * are already ws protocol bytes */
 3914|      0|    infof(data, "Received 101, Switching to WebSocket");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3915|      0|    result = Curl_ws_accept(data, buf, blen);
 3916|      0|    if(!result)
  ------------------
  |  Branch (3916:8): [True: 0, False: 0]
  ------------------
 3917|      0|      *pconsumed += blen; /* ws accept handled the data */
 3918|      0|    return result;
 3919|      0|  }
 3920|      1|#endif
 3921|       |  /* We silently accept this as the final response. What are we switching to
 3922|       |   * if we did not ask for an Upgrade? Maybe the application provided an
 3923|       |   * `Upgrade: xxx` header? */
 3924|      1|  k->header = FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
 3925|      1|  return CURLE_OK;
 3926|      1|}
http.c:http_handle_send_error:
 4010|  12.0k|{
 4011|  12.0k|  struct connectdata *conn = data->conn;
 4012|  12.0k|  struct SingleRequest *k = &data->req;
 4013|  12.0k|  CURLcode result = CURLE_OK;
 4014|       |
 4015|  12.0k|  if(!data->req.authneg && !conn->bits.close &&
  ------------------
  |  Branch (4015:6): [True: 12.0k, False: 0]
  |  Branch (4015:28): [True: 11.9k, False: 36]
  ------------------
 4016|  11.9k|     !Curl_creader_will_rewind(data)) {
  ------------------
  |  Branch (4016:6): [True: 11.2k, False: 713]
  ------------------
 4017|       |    /*
 4018|       |     * General treatment of errors when about to send data.
 4019|       |     * Including: "417 Expectation Failed", while waiting for
 4020|       |     * 100-continue.
 4021|       |     *
 4022|       |     * The check for close above is done because if something
 4023|       |     * else has already deemed the connection to get closed then
 4024|       |     * something else should have considered the big picture and
 4025|       |     * we avoid this check.
 4026|       |     */
 4027|       |
 4028|  11.2k|    switch(data->state.httpreq) {
 4029|    466|    case HTTPREQ_PUT:
  ------------------
  |  Branch (4029:5): [True: 466, False: 10.7k]
  ------------------
 4030|  1.09k|    case HTTPREQ_POST:
  ------------------
  |  Branch (4030:5): [True: 630, False: 10.6k]
  ------------------
 4031|  1.46k|    case HTTPREQ_POST_FORM:
  ------------------
  |  Branch (4031:5): [True: 366, False: 10.8k]
  ------------------
 4032|  1.92k|    case HTTPREQ_POST_MIME:
  ------------------
  |  Branch (4032:5): [True: 458, False: 10.8k]
  ------------------
 4033|       |      /* We got an error response. If this happened before the
 4034|       |       * whole request body has been sent we stop sending and
 4035|       |       * mark the connection for closure after we have read the
 4036|       |       * entire response. */
 4037|  1.92k|      if(!Curl_req_done_sending(data)) {
  ------------------
  |  Branch (4037:10): [True: 2, False: 1.91k]
  ------------------
 4038|      2|        if((k->httpcode == 417) && http_exp100_is_selected(data)) {
  ------------------
  |  Branch (4038:12): [True: 0, False: 2]
  |  Branch (4038:36): [True: 0, False: 0]
  ------------------
 4039|       |          /* 417 Expectation Failed - try again without the
 4040|       |             Expect header */
 4041|      0|          if(!k->writebytecount && http_exp100_is_waiting(data)) {
  ------------------
  |  Branch (4041:14): [True: 0, False: 0]
  |  Branch (4041:36): [True: 0, False: 0]
  ------------------
 4042|      0|            infof(data, "Got HTTP failure 417 while waiting for a 100");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4043|      0|          }
 4044|      0|          else {
 4045|      0|            infof(data, "Got HTTP failure 417 while sending data");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4046|      0|            streamclose(conn, "Stop sending data before everything sent");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 4047|      0|            result = http_perhapsrewind(data, conn);
 4048|      0|            if(result)
  ------------------
  |  Branch (4048:16): [True: 0, False: 0]
  ------------------
 4049|      0|              return result;
 4050|      0|          }
 4051|      0|          data->state.disableexpect = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4052|      0|          Curl_req_abort_sending(data);
 4053|      0|          DEBUGASSERT(!data->req.newurl);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4053:11): [True: 0, False: 0]
  |  Branch (4053:11): [True: 0, False: 0]
  ------------------
 4054|      0|          data->req.newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
 4055|      0|          if(!data->req.newurl)
  ------------------
  |  Branch (4055:14): [True: 0, False: 0]
  ------------------
 4056|      0|            return CURLE_OUT_OF_MEMORY;
 4057|      0|        }
 4058|      2|        else if(data->set.http_keep_sending_on_error) {
  ------------------
  |  Branch (4058:17): [True: 0, False: 2]
  ------------------
 4059|      0|          infof(data, "HTTP error before end of send, keep sending");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4060|      0|          http_exp100_send_anyway(data);
 4061|      0|        }
 4062|      2|        else {
 4063|      2|          infof(data, "HTTP error before end of send, stop sending");
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 4064|      2|          streamclose(conn, "Stop sending data before everything sent");
  ------------------
  |  |  102|      2|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      2|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 4065|      2|          result = Curl_req_abort_sending(data);
 4066|      2|          if(result)
  ------------------
  |  Branch (4066:14): [True: 0, False: 2]
  ------------------
 4067|      0|            return result;
 4068|      2|        }
 4069|      2|      }
 4070|  1.92k|      break;
 4071|       |
 4072|  9.34k|    default: /* default label present to avoid compiler warnings */
  ------------------
  |  Branch (4072:5): [True: 9.34k, False: 1.92k]
  ------------------
 4073|  9.34k|      break;
 4074|  11.2k|    }
 4075|  11.2k|  }
 4076|       |
 4077|  12.0k|  if(Curl_creader_will_rewind(data) && !Curl_req_done_sending(data)) {
  ------------------
  |  Branch (4077:6): [True: 719, False: 11.2k]
  |  Branch (4077:40): [True: 10, False: 709]
  ------------------
 4078|       |    /* We rewind before next send, continue sending now */
 4079|     10|    infof(data, "Keep sending data to get tossed away");
  ------------------
  |  |  143|     10|  do {                               \
  |  |  144|     10|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     10|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  320|     10|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     10|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     10|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10]
  |  |  ------------------
  ------------------
 4080|     10|    CURL_REQ_SET_SEND(data);
  ------------------
  |  |   44|     10|#define CURL_REQ_SET_SEND(d)   ((d)->req.io_flags |= REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|     10|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
 4081|     10|  }
 4082|  12.0k|  return result;
 4083|  12.0k|}
http.c:http_firstwrite:
 2660|  12.1k|{
 2661|  12.1k|  struct connectdata *conn = data->conn;
 2662|  12.1k|  struct SingleRequest *k = &data->req;
 2663|       |
 2664|  12.1k|  if(data->req.newurl) {
  ------------------
  |  Branch (2664:6): [True: 10.3k, False: 1.79k]
  ------------------
 2665|  10.3k|    if(conn->bits.close) {
  ------------------
  |  Branch (2665:8): [True: 18, False: 10.3k]
  ------------------
 2666|       |      /* Abort after the headers if "follow Location" is set
 2667|       |         and we are set to close anyway. */
 2668|     18|      CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|     18|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|     18|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
 2669|     18|      k->done = TRUE;
  ------------------
  |  | 1055|     18|#define TRUE true
  ------------------
 2670|     18|      return CURLE_OK;
 2671|     18|    }
 2672|       |    /* We have a new URL to load, but since we want to be able to reuse this
 2673|       |       connection properly, we read the full response in "ignore more" */
 2674|  10.3k|    k->ignorebody = TRUE;
  ------------------
  |  | 1055|  10.3k|#define TRUE true
  ------------------
 2675|  10.3k|    infof(data, "Ignoring the response-body");
  ------------------
  |  |  143|  10.3k|  do {                               \
  |  |  144|  10.3k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.3k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.3k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  10.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.3k]
  |  |  ------------------
  ------------------
 2676|  10.3k|  }
 2677|  12.1k|  if(data->state.resume_from && !k->content_range &&
  ------------------
  |  Branch (2677:6): [True: 297, False: 11.8k]
  |  Branch (2677:33): [True: 296, False: 1]
  ------------------
 2678|    296|     (data->state.httpreq == HTTPREQ_GET) &&
  ------------------
  |  Branch (2678:6): [True: 204, False: 92]
  ------------------
 2679|    204|     !k->ignorebody) {
  ------------------
  |  Branch (2679:6): [True: 97, False: 107]
  ------------------
 2680|       |
 2681|     97|    if(k->size == data->state.resume_from) {
  ------------------
  |  Branch (2681:8): [True: 1, False: 96]
  ------------------
 2682|       |      /* The resume point is at the end of file, consider this fine even if it
 2683|       |         does not allow resume from here. */
 2684|      1|      infof(data, "The entire document is already downloaded");
  ------------------
  |  |  143|      1|  do {                               \
  |  |  144|      1|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      1|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  320|      1|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      1|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
 2685|      1|      streamclose(conn, "already downloaded");
  ------------------
  |  |  102|      1|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      1|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2686|       |      /* Abort download */
 2687|      1|      CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|      1|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|      1|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
 2688|      1|      k->done = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
 2689|      1|      return CURLE_OK;
 2690|      1|    }
 2691|       |
 2692|       |    /* we wanted to resume a download, although the server does not seem to
 2693|       |     * support this and we did this with a GET (if it was not a GET we did a
 2694|       |     * POST or PUT resume) */
 2695|     96|    failf(data, "HTTP server does not seem to support "
  ------------------
  |  |   62|     96|#define failf Curl_failf
  ------------------
 2696|     96|          "byte ranges. Cannot resume.");
 2697|     96|    return CURLE_RANGE_ERROR;
 2698|     97|  }
 2699|       |
 2700|  12.0k|  if(data->set.timecondition && !data->state.range) {
  ------------------
  |  Branch (2700:6): [True: 174, False: 11.8k]
  |  Branch (2700:33): [True: 78, False: 96]
  ------------------
 2701|       |    /* A time condition has been set AND no ranges have been requested. This
 2702|       |       seems to be what chapter 13.3.4 of RFC 2616 defines to be the correct
 2703|       |       action for an HTTP/1.1 client */
 2704|       |
 2705|     78|    if(!Curl_meets_timecondition(data, k->timeofdoc)) {
  ------------------
  |  Branch (2705:8): [True: 0, False: 78]
  ------------------
 2706|      0|      k->done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2707|       |      /* We are simulating an HTTP 304 from server so we return
 2708|       |         what should have been returned from the server */
 2709|      0|      data->info.httpcode = 304;
 2710|      0|      infof(data, "Simulate an HTTP 304 response");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2711|       |      /* we abort the transfer before it is completed == we ruin the
 2712|       |         reuse ability. Close the connection */
 2713|      0|      streamclose(conn, "Simulated 304 handling");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2714|      0|      return CURLE_OK;
 2715|      0|    }
 2716|     78|  } /* we have a time condition */
 2717|       |
 2718|  12.0k|  return CURLE_OK;
 2719|  12.0k|}
http.c:http_size:
 3791|  12.0k|{
 3792|  12.0k|  struct SingleRequest *k = &data->req;
 3793|  12.0k|  if(data->req.ignore_cl || k->chunk) {
  ------------------
  |  Branch (3793:6): [True: 1, False: 12.0k]
  |  Branch (3793:29): [True: 292, False: 11.7k]
  ------------------
 3794|    293|    k->size = k->maxdownload = -1;
 3795|    293|  }
 3796|  11.7k|  else if(k->size != -1) {
  ------------------
  |  Branch (3796:11): [True: 5.46k, False: 6.27k]
  ------------------
 3797|  5.46k|    if(data->set.max_filesize &&
  ------------------
  |  Branch (3797:8): [True: 238, False: 5.22k]
  ------------------
 3798|    238|       !k->ignorebody &&
  ------------------
  |  Branch (3798:8): [True: 106, False: 132]
  ------------------
 3799|    106|       (k->size > data->set.max_filesize)) {
  ------------------
  |  Branch (3799:8): [True: 59, False: 47]
  ------------------
 3800|     59|      failf(data, "Maximum file size exceeded");
  ------------------
  |  |   62|     59|#define failf Curl_failf
  ------------------
 3801|     59|      return CURLE_FILESIZE_EXCEEDED;
 3802|     59|    }
 3803|  5.40k|    if(k->ignorebody)
  ------------------
  |  Branch (3803:8): [True: 3.98k, False: 1.41k]
  ------------------
 3804|  3.98k|      infof(data, "setting size while ignoring");
  ------------------
  |  |  143|  3.98k|  do {                               \
  |  |  144|  3.98k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  3.98k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3.98k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.98k]
  |  |  |  |  ------------------
  |  |  |  |  320|  3.98k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  3.98k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  3.98k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3.98k]
  |  |  ------------------
  ------------------
 3805|  5.40k|    Curl_pgrsSetDownloadSize(data, k->size);
 3806|  5.40k|    k->maxdownload = k->size;
 3807|  5.40k|  }
 3808|  11.9k|  return CURLE_OK;
 3809|  12.0k|}
http.c:checkprefixmax:
 3111|   187k|{
 3112|   187k|  size_t ch = CURLMIN(strlen(prefix), len);
  ------------------
  |  | 1287|   187k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 173k, False: 14.3k]
  |  |  ------------------
  ------------------
 3113|   187k|  return curl_strnequal(prefix, buffer, ch);
 3114|   187k|}
http.c:http_statusline:
 3701|  16.5k|{
 3702|  16.5k|  struct SingleRequest *k = &data->req;
 3703|       |
 3704|  16.5k|  switch(k->httpversion) {
 3705|      0|  case 10:
  ------------------
  |  Branch (3705:3): [True: 0, False: 16.5k]
  ------------------
 3706|  16.5k|  case 11:
  ------------------
  |  Branch (3706:3): [True: 16.5k, False: 0]
  ------------------
 3707|  16.5k|#ifdef USE_HTTP2
 3708|  16.5k|  case 20:
  ------------------
  |  Branch (3708:3): [True: 0, False: 16.5k]
  ------------------
 3709|  16.5k|#endif
 3710|       |#ifdef USE_HTTP3
 3711|       |  case 30:
 3712|       |#endif
 3713|       |    /* no major version switch mid-connection */
 3714|  16.5k|    if(k->httpversion_sent &&
  ------------------
  |  Branch (3714:8): [True: 16.5k, False: 0]
  ------------------
 3715|  16.5k|       (k->httpversion / 10 != k->httpversion_sent / 10)) {
  ------------------
  |  Branch (3715:8): [True: 0, False: 16.5k]
  ------------------
 3716|      0|      failf(data, "Version mismatch (from HTTP/%d to HTTP/%d)",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3717|      0|            k->httpversion_sent / 10, k->httpversion / 10);
 3718|      0|      return CURLE_WEIRD_SERVER_REPLY;
 3719|      0|    }
 3720|  16.5k|    break;
 3721|  16.5k|  default:
  ------------------
  |  Branch (3721:3): [True: 0, False: 16.5k]
  ------------------
 3722|      0|    failf(data, "Unsupported HTTP version (%d.%d) in response",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3723|      0|          k->httpversion / 10, k->httpversion % 10);
 3724|      0|    return CURLE_UNSUPPORTED_PROTOCOL;
 3725|  16.5k|  }
 3726|       |
 3727|  16.5k|  data->info.httpcode = k->httpcode;
 3728|  16.5k|  data->info.httpversion = k->httpversion;
 3729|  16.5k|  conn->httpversion_seen = k->httpversion;
 3730|       |
 3731|  16.5k|  if(!data->state.http_neg.rcvd_min ||
  ------------------
  |  Branch (3731:6): [True: 4.95k, False: 11.6k]
  ------------------
 3732|  11.6k|     data->state.http_neg.rcvd_min > k->httpversion)
  ------------------
  |  Branch (3732:6): [True: 0, False: 11.6k]
  ------------------
 3733|       |    /* store the lowest server version we encounter */
 3734|  4.95k|    data->state.http_neg.rcvd_min = k->httpversion;
 3735|       |
 3736|       |  /*
 3737|       |   * This code executes as part of processing the header. As a
 3738|       |   * result, it is not totally clear how to interpret the
 3739|       |   * response code yet as that depends on what other headers may
 3740|       |   * be present. 401 and 407 may be errors, but may be OK
 3741|       |   * depending on how authentication is working. Other codes
 3742|       |   * are definitely errors, so give up here.
 3743|       |   */
 3744|  16.5k|  if(data->state.resume_from && data->state.httpreq == HTTPREQ_GET &&
  ------------------
  |  Branch (3744:6): [True: 1.14k, False: 15.4k]
  |  Branch (3744:33): [True: 837, False: 307]
  ------------------
 3745|    837|     k->httpcode == 416) {
  ------------------
  |  Branch (3745:6): [True: 2, False: 835]
  ------------------
 3746|       |    /* "Requested Range Not Satisfiable", proceed and pretend this is no
 3747|       |       error */
 3748|      2|    k->ignorebody = TRUE; /* Avoid appending error msg to good data. */
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
 3749|      2|  }
 3750|       |
 3751|  16.5k|  if(k->httpversion == 10) {
  ------------------
  |  Branch (3751:6): [True: 0, False: 16.5k]
  ------------------
 3752|       |    /* Default action for HTTP/1.0 must be to close, unless
 3753|       |       we get one of those fancy headers that tell us the
 3754|       |       server keeps it open for us! */
 3755|      0|    infof(data, "HTTP 1.0, assume close after body");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3756|      0|    connclose(conn, "HTTP/1.0 close after body");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
 3757|      0|  }
 3758|       |
 3759|  16.5k|  k->http_bodyless = k->httpcode >= 100 && k->httpcode < 200;
  ------------------
  |  Branch (3759:22): [True: 15.7k, False: 792]
  |  Branch (3759:44): [True: 2.15k, False: 13.6k]
  ------------------
 3760|  16.5k|  switch(k->httpcode) {
 3761|  3.92k|  case 304:
  ------------------
  |  Branch (3761:3): [True: 3.92k, False: 12.6k]
  ------------------
 3762|       |    /* (quote from RFC2616, section 10.3.5): The 304 response
 3763|       |     * MUST NOT contain a message-body, and thus is always
 3764|       |     * terminated by the first empty line after the header
 3765|       |     * fields. */
 3766|  3.92k|    if(data->set.timecondition)
  ------------------
  |  Branch (3766:8): [True: 81, False: 3.84k]
  ------------------
 3767|     81|      data->info.timecond = TRUE;
  ------------------
  |  | 1055|     81|#define TRUE true
  ------------------
 3768|  3.92k|    FALLTHROUGH();
  ------------------
  |  |  821|  3.92k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 3769|  3.93k|  case 204:
  ------------------
  |  Branch (3769:3): [True: 6, False: 16.5k]
  ------------------
 3770|       |    /* (quote from RFC2616, section 10.2.5): The server has
 3771|       |     * fulfilled the request but does not need to return an
 3772|       |     * entity-body ... The 204 response MUST NOT include a
 3773|       |     * message-body, and thus is always terminated by the first
 3774|       |     * empty line after the header fields. */
 3775|  3.93k|    k->size = 0;
 3776|  3.93k|    k->maxdownload = 0;
 3777|  3.93k|    k->http_bodyless = TRUE;
  ------------------
  |  | 1055|  3.93k|#define TRUE true
  ------------------
 3778|  3.93k|    break;
 3779|  12.6k|  default:
  ------------------
  |  Branch (3779:3): [True: 12.6k, False: 3.93k]
  ------------------
 3780|  12.6k|    break;
 3781|  16.5k|  }
 3782|  16.5k|  return CURLE_OK;
 3783|  16.5k|}
http.c:verify_header:
 3813|   163k|{
 3814|   163k|  struct SingleRequest *k = &data->req;
 3815|   163k|  const char *ptr = memchr(hd, 0x00, hdlen);
 3816|   163k|  if(ptr) {
  ------------------
  |  Branch (3816:6): [True: 357, False: 163k]
  ------------------
 3817|       |    /* this is bad, bail out */
 3818|    357|    failf(data, "Nul byte in header");
  ------------------
  |  |   62|    357|#define failf Curl_failf
  ------------------
 3819|    357|    return CURLE_WEIRD_SERVER_REPLY;
 3820|    357|  }
 3821|   163k|  if(k->headerline < 2)
  ------------------
  |  Branch (3821:6): [True: 16.5k, False: 146k]
  ------------------
 3822|       |    /* the first "header" is the status-line and it has no colon */
 3823|  16.5k|    return CURLE_OK;
 3824|   146k|  if(((hd[0] == ' ') || (hd[0] == '\t')) && k->headerline > 2)
  ------------------
  |  Branch (3824:7): [True: 1.06k, False: 145k]
  |  Branch (3824:25): [True: 362, False: 145k]
  |  Branch (3824:45): [True: 0, False: 1.42k]
  ------------------
 3825|       |    /* line folding, cannot happen on line 2 */
 3826|      0|    ;
 3827|   146k|  else {
 3828|   146k|    ptr = memchr(hd, ':', hdlen);
 3829|   146k|    if(!ptr) {
  ------------------
  |  Branch (3829:8): [True: 268, False: 146k]
  ------------------
 3830|       |      /* this is bad, bail out */
 3831|    268|      failf(data, "Header without colon");
  ------------------
  |  |   62|    268|#define failf Curl_failf
  ------------------
 3832|    268|      return CURLE_WEIRD_SERVER_REPLY;
 3833|    268|    }
 3834|   146k|  }
 3835|   146k|  return CURLE_OK;
 3836|   146k|}
http.c:http_header:
 3649|   162k|{
 3650|   162k|  CURLcode result = CURLE_OK;
 3651|       |
 3652|   162k|  switch(hd[0]) {
  ------------------
  |  Branch (3652:10): [True: 148k, False: 14.2k]
  ------------------
 3653|    600|  case 'a':
  ------------------
  |  Branch (3653:3): [True: 600, False: 162k]
  ------------------
 3654|  2.36k|  case 'A':
  ------------------
  |  Branch (3654:3): [True: 1.76k, False: 161k]
  ------------------
 3655|  2.36k|    result = http_header_a(data, hd, hdlen);
 3656|  2.36k|    break;
 3657|  7.92k|  case 'c':
  ------------------
  |  Branch (3657:3): [True: 7.92k, False: 154k]
  ------------------
 3658|  36.7k|  case 'C':
  ------------------
  |  Branch (3658:3): [True: 28.7k, False: 134k]
  ------------------
 3659|  36.7k|    result = http_header_c(data, hd, hdlen);
 3660|  36.7k|    break;
 3661|    979|  case 'l':
  ------------------
  |  Branch (3661:3): [True: 979, False: 161k]
  ------------------
 3662|  16.9k|  case 'L':
  ------------------
  |  Branch (3662:3): [True: 15.9k, False: 146k]
  ------------------
 3663|  16.9k|    result = http_header_l(data, hd, hdlen);
 3664|  16.9k|    break;
 3665|  2.35k|  case 'p':
  ------------------
  |  Branch (3665:3): [True: 2.35k, False: 160k]
  ------------------
 3666|  4.69k|  case 'P':
  ------------------
  |  Branch (3666:3): [True: 2.34k, False: 160k]
  ------------------
 3667|  4.69k|    result = http_header_p(data, hd, hdlen);
 3668|  4.69k|    break;
 3669|  9.15k|  case 'r':
  ------------------
  |  Branch (3669:3): [True: 9.15k, False: 153k]
  ------------------
 3670|  27.3k|  case 'R':
  ------------------
  |  Branch (3670:3): [True: 18.2k, False: 144k]
  ------------------
 3671|  27.3k|    result = http_header_r(data, hd, hdlen);
 3672|  27.3k|    break;
 3673|  2.34k|  case 's':
  ------------------
  |  Branch (3673:3): [True: 2.34k, False: 160k]
  ------------------
 3674|  42.3k|  case 'S':
  ------------------
  |  Branch (3674:3): [True: 39.9k, False: 122k]
  ------------------
 3675|  42.3k|    result = http_header_s(data, hd, hdlen);
 3676|  42.3k|    break;
 3677|  1.96k|  case 't':
  ------------------
  |  Branch (3677:3): [True: 1.96k, False: 160k]
  ------------------
 3678|  7.09k|  case 'T':
  ------------------
  |  Branch (3678:3): [True: 5.12k, False: 157k]
  ------------------
 3679|  7.09k|    result = http_header_t(data, hd, hdlen);
 3680|  7.09k|    break;
 3681|  6.55k|  case 'w':
  ------------------
  |  Branch (3681:3): [True: 6.55k, False: 156k]
  ------------------
 3682|  11.0k|  case 'W':
  ------------------
  |  Branch (3682:3): [True: 4.53k, False: 158k]
  ------------------
 3683|  11.0k|    result = http_header_w(data, hd, hdlen);
 3684|  11.0k|    break;
 3685|   162k|  }
 3686|       |
 3687|   162k|  if(!result) {
  ------------------
  |  Branch (3687:6): [True: 162k, False: 267]
  ------------------
 3688|   162k|    struct connectdata *conn = data->conn;
 3689|   162k|    if(conn->scheme->protocol & CURLPROTO_RTSP)
  ------------------
  |  | 1096|   162k|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (3689:8): [True: 162k, False: 0]
  ------------------
 3690|   162k|      result = Curl_rtsp_parseheader(data, hd);
 3691|   162k|  }
 3692|   162k|  return result;
 3693|   162k|}
http.c:http_header_a:
 3190|  2.36k|{
 3191|  2.36k|#ifndef CURL_DISABLE_ALTSVC
 3192|  2.36k|  const char *v;
 3193|  2.36k|  struct connectdata *conn = data->conn;
 3194|  2.36k|  v = (data->asi &&
  ------------------
  |  Branch (3194:8): [True: 2.36k, False: 0]
  ------------------
 3195|  2.36k|       (Curl_xfer_is_secure(data) ||
  ------------------
  |  Branch (3195:9): [True: 0, False: 2.36k]
  ------------------
 3196|  2.36k|#ifdef DEBUGBUILD
 3197|       |        /* allow debug builds to circumvent the HTTPS restriction */
 3198|  2.36k|        getenv("CURL_ALTSVC_HTTP")
  ------------------
  |  Branch (3198:9): [True: 2.36k, False: 0]
  ------------------
 3199|       |#else
 3200|       |        0
 3201|       |#endif
 3202|  2.36k|         )) ? HD_VAL(hd, hdlen, "Alt-Svc:") : NULL;
  ------------------
  |  | 3175|  2.36k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 1.34k, False: 1.01k]
  |  |  |  Branch (3175:37): [True: 1.34k, False: 0]
  |  |  ------------------
  |  | 3176|  2.36k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 0, False: 1.34k]
  |  |  ------------------
  ------------------
 3203|  2.36k|  if(v) {
  ------------------
  |  Branch (3203:6): [True: 0, False: 2.36k]
  ------------------
 3204|       |    /* the ALPN of the current request */
 3205|      0|    struct SingleRequest *k = &data->req;
 3206|      0|    enum alpnid id = (k->httpversion == 30) ? ALPN_h3 :
  ------------------
  |  Branch (3206:22): [True: 0, False: 0]
  ------------------
 3207|      0|      (k->httpversion == 20) ? ALPN_h2 : ALPN_h1;
  ------------------
  |  Branch (3207:7): [True: 0, False: 0]
  ------------------
 3208|      0|    return Curl_altsvc_parse(data, data->asi, v, id, conn->origin->hostname,
 3209|      0|                             curlx_uitous((unsigned int)conn->origin->port));
 3210|      0|  }
 3211|       |#else
 3212|       |  (void)data;
 3213|       |  (void)hd;
 3214|       |  (void)hdlen;
 3215|       |#endif
 3216|  2.36k|  return CURLE_OK;
 3217|  2.36k|}
http.c:http_header_c:
 3224|  36.7k|{
 3225|  36.7k|  struct connectdata *conn = data->conn;
 3226|  36.7k|  struct SingleRequest *k = &data->req;
 3227|  36.7k|  const char *v;
 3228|       |
 3229|       |  /* Check for Content-Length: header lines to get size. Browsers insist we
 3230|       |     should accept multiple Content-Length headers and that a comma separated
 3231|       |     list also is fine and then we should accept them all as long as they are
 3232|       |     the same value. Different values trigger error.
 3233|       |   */
 3234|  36.7k|  v = (!k->http_bodyless && !data->set.ignorecl) ?
  ------------------
  |  Branch (3234:8): [True: 34.7k, False: 1.91k]
  |  Branch (3234:29): [True: 34.7k, False: 64]
  ------------------
 3235|  36.7k|    HD_VAL(hd, hdlen, "Content-Length:") : NULL;
  ------------------
  |  | 3175|  34.7k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 17.3k, False: 17.3k]
  |  |  |  Branch (3175:37): [True: 17.3k, False: 0]
  |  |  ------------------
  |  | 3176|  34.7k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 2.52k, False: 14.8k]
  |  |  ------------------
  ------------------
 3236|  36.7k|  if(v) {
  ------------------
  |  Branch (3236:6): [True: 2.52k, False: 34.1k]
  ------------------
 3237|  2.60k|    do {
 3238|  2.60k|      curl_off_t contentlength;
 3239|  2.60k|      int offt = curlx_str_numblanks(&v, &contentlength);
 3240|       |
 3241|  2.60k|      if(offt == STRE_OVERFLOW) {
  ------------------
  |  |   35|  2.60k|#define STRE_OVERFLOW 7
  ------------------
  |  Branch (3241:10): [True: 365, False: 2.24k]
  ------------------
 3242|       |        /* out of range */
 3243|    365|        if(data->set.max_filesize) {
  ------------------
  |  Branch (3243:12): [True: 4, False: 361]
  ------------------
 3244|      4|          failf(data, "Maximum file size exceeded");
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
 3245|      4|          return CURLE_FILESIZE_EXCEEDED;
 3246|      4|        }
 3247|    361|        streamclose(conn, "overflow content-length");
  ------------------
  |  |  102|    361|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|    361|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 3248|    361|        infof(data, "Overflow Content-Length: value");
  ------------------
  |  |  143|    361|  do {                               \
  |  |  144|    361|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    361|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 361, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 361]
  |  |  |  |  ------------------
  |  |  |  |  320|    361|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    361|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    361|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 361]
  |  |  ------------------
  ------------------
 3249|    361|        return CURLE_OK;
 3250|    365|      }
 3251|  2.24k|      else {
 3252|  2.24k|        if((offt == STRE_OK) &&
  ------------------
  |  |   28|  2.24k|#define STRE_OK       0
  ------------------
  |  Branch (3252:12): [True: 2.22k, False: 16]
  ------------------
 3253|  2.22k|           ((k->size == -1) || /* not set to something before */
  ------------------
  |  Branch (3253:13): [True: 1.81k, False: 412]
  ------------------
 3254|  2.13k|            (k->size == contentlength))) { /* or the same value */
  ------------------
  |  Branch (3254:13): [True: 319, False: 93]
  ------------------
 3255|       |
 3256|  2.13k|          k->size = contentlength;
 3257|  2.13k|          curlx_str_passblanks(&v);
 3258|       |
 3259|       |          /* on a comma, loop and get the next instead */
 3260|  2.13k|          if(!curlx_str_single(&v, ','))
  ------------------
  |  Branch (3260:14): [True: 85, False: 2.04k]
  ------------------
 3261|     85|            continue;
 3262|       |
 3263|  2.04k|          if(!curlx_str_newline(&v)) {
  ------------------
  |  Branch (3263:14): [True: 2.03k, False: 10]
  ------------------
 3264|  2.03k|            k->maxdownload = k->size;
 3265|  2.03k|            return CURLE_OK;
 3266|  2.03k|          }
 3267|  2.04k|        }
 3268|       |        /* negative, different value or rubbish - bad HTTP */
 3269|    119|        failf(data, "Invalid Content-Length: value");
  ------------------
  |  |   62|    119|#define failf Curl_failf
  ------------------
 3270|    119|        return CURLE_WEIRD_SERVER_REPLY;
 3271|  2.24k|      }
 3272|  2.60k|    } while(1);
  ------------------
  |  Branch (3272:13): [True: 85, Folded]
  ------------------
 3273|  2.52k|  }
 3274|  34.1k|  v = (!k->http_bodyless && data->set.str[STRING_ENCODING]) ?
  ------------------
  |  Branch (3274:8): [True: 32.2k, False: 1.91k]
  |  Branch (3274:29): [True: 18.9k, False: 13.3k]
  ------------------
 3275|  34.1k|    HD_VAL(hd, hdlen, "Content-Encoding:") : NULL;
  ------------------
  |  | 3175|  18.9k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 8.62k, False: 10.2k]
  |  |  |  Branch (3175:37): [True: 8.62k, False: 0]
  |  |  ------------------
  |  | 3176|  18.9k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 1.92k, False: 6.69k]
  |  |  ------------------
  ------------------
 3276|  34.1k|  if(v) {
  ------------------
  |  Branch (3276:6): [True: 1.92k, False: 32.2k]
  ------------------
 3277|       |    /*
 3278|       |     * Process Content-Encoding. Look for the values: identity, gzip, deflate,
 3279|       |     * compress, x-gzip and x-compress. x-gzip and x-compress are the same as
 3280|       |     * gzip and compress. (Sec 3.5 RFC 2616). zlib cannot handle compress.
 3281|       |     * Errors are handled further down when the response body is processed
 3282|       |     */
 3283|  1.92k|    return Curl_build_unencoding_stack(data, v, FALSE);
  ------------------
  |  | 1058|  1.92k|#define FALSE false
  ------------------
 3284|  1.92k|  }
 3285|       |  /* check for Content-Type: header lines to get the MIME-type */
 3286|  32.2k|  v = HD_VAL(hd, hdlen, "Content-Type:");
  ------------------
  |  | 3175|  32.2k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 22.5k, False: 9.73k]
  |  |  |  Branch (3175:37): [True: 22.5k, False: 0]
  |  |  ------------------
  |  | 3176|  32.2k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 7.20k, False: 15.3k]
  |  |  ------------------
  ------------------
 3287|  32.2k|  if(v) {
  ------------------
  |  Branch (3287:6): [True: 7.20k, False: 25.0k]
  ------------------
 3288|  7.20k|    char *contenttype = Curl_copy_header_value(hd);
 3289|  7.20k|    if(!contenttype)
  ------------------
  |  Branch (3289:8): [True: 0, False: 7.20k]
  ------------------
 3290|      0|      return CURLE_OUT_OF_MEMORY;
 3291|  7.20k|    if(!*contenttype)
  ------------------
  |  Branch (3291:8): [True: 4.68k, False: 2.52k]
  ------------------
 3292|       |      /* ignore empty data */
 3293|  4.68k|      curlx_free(contenttype);
  ------------------
  |  | 1483|  4.68k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3294|  2.52k|    else {
 3295|  2.52k|      curlx_free(data->info.contenttype);
  ------------------
  |  | 1483|  2.52k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3296|  2.52k|      data->info.contenttype = contenttype;
 3297|  2.52k|    }
 3298|  7.20k|    return CURLE_OK;
 3299|  7.20k|  }
 3300|  25.0k|  if((k->httpversion < 20) &&
  ------------------
  |  Branch (3300:6): [True: 25.0k, False: 0]
  ------------------
 3301|  25.0k|     HD_IS_AND_SAYS(hd, hdlen, "Connection:", "close")) {
  ------------------
  |  | 3181|  25.0k|  (HD_IS(hd, hdlen, n) && \
  |  |  ------------------
  |  |  |  | 3172|  50.1k|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3172:4): [True: 16.1k, False: 8.95k]
  |  |  |  |  |  Branch (3172:36): [True: 2.01k, False: 14.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3182|  25.0k|   ((hdlen) > ((sizeof(n) - 1) + (sizeof(v) - 1))) && \
  |  |  ------------------
  |  |  |  Branch (3182:4): [True: 1.82k, False: 183]
  |  |  ------------------
  |  | 3183|  25.0k|   Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|  1.82k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |                  Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|  1.82k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (3183:4): [True: 247, False: 1.58k]
  |  |  ------------------
  ------------------
 3302|       |    /*
 3303|       |     * [RFC 2616, section 8.1.2.1]
 3304|       |     * "Connection: close" is HTTP/1.1 language and means that
 3305|       |     * the connection will close when this request has been
 3306|       |     * served.
 3307|       |     */
 3308|    247|    connclose(conn, "Connection: close used");
  ------------------
  |  |  103|    247|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|    247|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
 3309|    247|    return CURLE_OK;
 3310|    247|  }
 3311|  24.8k|  if((k->httpversion == 10) &&
  ------------------
  |  Branch (3311:6): [True: 0, False: 24.8k]
  ------------------
 3312|      0|     HD_IS_AND_SAYS(hd, hdlen, "Connection:", "keep-alive")) {
  ------------------
  |  | 3181|      0|  (HD_IS(hd, hdlen, n) && \
  |  |  ------------------
  |  |  |  | 3172|      0|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3172:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (3172:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3182|      0|   ((hdlen) > ((sizeof(n) - 1) + (sizeof(v) - 1))) && \
  |  |  ------------------
  |  |  |  Branch (3182:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 3183|      0|   Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |                  Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (3183:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3313|       |    /*
 3314|       |     * An HTTP/1.0 reply with the 'Connection: keep-alive' line
 3315|       |     * tells us the connection will be kept alive for our
 3316|       |     * pleasure. Default action for 1.0 is to close.
 3317|       |     *
 3318|       |     * [RFC2068, section 19.7.1] */
 3319|      0|    connkeep(conn, "Connection keep-alive");
  ------------------
  |  |  104|      0|#define connkeep(x, y)    Curl_conncontrol(x, CONNCTRL_KEEP, y)
  |  |  ------------------
  |  |  |  |   90|      0|#define CONNCTRL_KEEP       0 /* undo a marked closure */
  |  |  ------------------
  ------------------
 3320|      0|    infof(data, "HTTP/1.0 connection set to keep alive");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3321|      0|    return CURLE_OK;
 3322|      0|  }
 3323|  24.8k|  v = !k->http_bodyless ? HD_VAL(hd, hdlen, "Content-Range:") : NULL;
  ------------------
  |  | 3175|  22.9k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 13.2k, False: 9.64k]
  |  |  |  Branch (3175:37): [True: 13.2k, False: 0]
  |  |  ------------------
  |  | 3176|  22.9k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 732, False: 12.5k]
  |  |  ------------------
  ------------------
  |  Branch (3323:7): [True: 22.9k, False: 1.89k]
  ------------------
 3324|  24.8k|  if(v) {
  ------------------
  |  Branch (3324:6): [True: 732, False: 24.0k]
  ------------------
 3325|       |    /* Content-Range: bytes [num]-
 3326|       |       Content-Range: bytes: [num]-
 3327|       |       Content-Range: [num]-
 3328|       |       Content-Range: [asterisk]/[total]
 3329|       |
 3330|       |       The second format was added since Sun's webserver
 3331|       |       JavaWebServer/1.1.1 obviously sends the header this way!
 3332|       |       The third added since some servers use that!
 3333|       |       The fourth means the requested range was unsatisfied.
 3334|       |    */
 3335|       |
 3336|    732|    const char *ptr = v;
 3337|       |
 3338|       |    /* Move forward until first digit or asterisk */
 3339|  9.25k|    while(*ptr && !ISDIGIT(*ptr) && *ptr != '*')
  ------------------
  |  |   44|  18.3k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 4.75k, False: 4.39k]
  |  |  |  Branch (44:38): [True: 614, False: 4.14k]
  |  |  ------------------
  ------------------
  |  Branch (3339:11): [True: 9.14k, False: 109]
  |  Branch (3339:37): [True: 8.52k, False: 9]
  ------------------
 3340|  8.52k|      ptr++;
 3341|       |
 3342|       |    /* if it truly stopped on a digit */
 3343|    732|    if(ISDIGIT(*ptr)) {
  ------------------
  |  |   44|    732|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 614, False: 118]
  |  |  |  Branch (44:38): [True: 614, False: 0]
  |  |  ------------------
  ------------------
 3344|    614|      if(!curlx_str_number(&ptr, &k->offset, CURL_OFF_T_MAX) &&
  ------------------
  |  |  594|    614|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (3344:10): [True: 439, False: 175]
  ------------------
 3345|    439|         (data->state.resume_from == k->offset))
  ------------------
  |  Branch (3345:10): [True: 35, False: 404]
  ------------------
 3346|       |        /* we asked for a resume and we got it */
 3347|     35|        k->content_range = TRUE;
  ------------------
  |  | 1055|     35|#define TRUE true
  ------------------
 3348|    614|    }
 3349|    118|    else if(k->httpcode < 300)
  ------------------
  |  Branch (3349:13): [True: 52, False: 66]
  ------------------
 3350|     52|      data->state.resume_from = 0; /* get everything */
 3351|    732|  }
 3352|  24.8k|  return CURLE_OK;
 3353|  24.8k|}
http.c:http_header_l:
 3360|  16.9k|{
 3361|  16.9k|  struct connectdata *conn = data->conn;
 3362|  16.9k|  struct SingleRequest *k = &data->req;
 3363|  16.9k|  const char *v = (!k->http_bodyless &&
  ------------------
  |  Branch (3363:20): [True: 12.6k, False: 4.27k]
  ------------------
 3364|  12.6k|                   (data->set.timecondition || data->set.get_filetime)) ?
  ------------------
  |  Branch (3364:21): [True: 369, False: 12.3k]
  |  Branch (3364:48): [True: 224, False: 12.0k]
  ------------------
 3365|  16.9k|    HD_VAL(hd, hdlen, "Last-Modified:") : NULL;
  ------------------
  |  | 3175|    593|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 205, False: 388]
  |  |  |  Branch (3175:37): [True: 205, False: 0]
  |  |  ------------------
  |  | 3176|    593|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 0, False: 205]
  |  |  ------------------
  ------------------
 3366|  16.9k|  if(v) {
  ------------------
  |  Branch (3366:6): [True: 0, False: 16.9k]
  ------------------
 3367|      0|    if(Curl_getdate_capped(v, &k->timeofdoc))
  ------------------
  |  Branch (3367:8): [True: 0, False: 0]
  ------------------
 3368|      0|      k->timeofdoc = 0;
 3369|      0|    if(data->set.get_filetime)
  ------------------
  |  Branch (3369:8): [True: 0, False: 0]
  ------------------
 3370|      0|      data->info.filetime = k->timeofdoc;
 3371|      0|    return CURLE_OK;
 3372|      0|  }
 3373|  16.9k|  if(HD_IS(hd, hdlen, "Location:")) {
  ------------------
  |  | 3172|  16.9k|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  ------------------
  |  |  |  Branch (3172:4): [True: 15.6k, False: 1.26k]
  |  |  |  Branch (3172:36): [True: 13.0k, False: 2.65k]
  |  |  ------------------
  ------------------
 3374|       |    /* this is the URL that the server advises us to use instead */
 3375|  13.0k|    char *location = Curl_copy_header_value(hd);
 3376|  13.0k|    if(!location)
  ------------------
  |  Branch (3376:8): [True: 0, False: 13.0k]
  ------------------
 3377|      0|      return CURLE_OUT_OF_MEMORY;
 3378|  13.0k|    if(!*location ||
  ------------------
  |  Branch (3378:8): [True: 1.53k, False: 11.5k]
  ------------------
 3379|  11.5k|       (data->req.location && !strcmp(data->req.location, location))) {
  ------------------
  |  Branch (3379:9): [True: 510, False: 10.9k]
  |  Branch (3379:31): [True: 376, False: 134]
  ------------------
 3380|       |      /* ignore empty header, or exact repeat of a previous one */
 3381|  1.90k|      curlx_free(location);
  ------------------
  |  | 1483|  1.90k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3382|  1.90k|      return CURLE_OK;
 3383|  1.90k|    }
 3384|  11.1k|    else {
 3385|       |      /* has value and is not an exact repeat */
 3386|  11.1k|      if(data->req.location) {
  ------------------
  |  Branch (3386:10): [True: 134, False: 10.9k]
  ------------------
 3387|    134|        failf(data, "Multiple Location headers");
  ------------------
  |  |   62|    134|#define failf Curl_failf
  ------------------
 3388|    134|        curlx_free(location);
  ------------------
  |  | 1483|    134|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3389|    134|        return CURLE_WEIRD_SERVER_REPLY;
 3390|    134|      }
 3391|  10.9k|      data->req.location = location;
 3392|       |
 3393|  10.9k|      if((k->httpcode >= 300 && k->httpcode < 400) &&
  ------------------
  |  Branch (3393:11): [True: 10.8k, False: 114]
  |  Branch (3393:33): [True: 10.8k, False: 33]
  ------------------
 3394|  10.8k|         data->set.http_follow_mode) {
  ------------------
  |  Branch (3394:10): [True: 10.6k, False: 176]
  ------------------
 3395|  10.6k|        CURLcode result;
 3396|  10.6k|        DEBUGASSERT(!data->req.newurl);
  ------------------
  |  | 1081|  10.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3396:9): [True: 0, False: 10.6k]
  |  Branch (3396:9): [True: 10.6k, False: 0]
  ------------------
 3397|  10.6k|        data->req.newurl = curlx_strdup(data->req.location); /* clone */
  ------------------
  |  | 1477|  10.6k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 3398|  10.6k|        if(!data->req.newurl)
  ------------------
  |  Branch (3398:12): [True: 0, False: 10.6k]
  ------------------
 3399|      0|          return CURLE_OUT_OF_MEMORY;
 3400|       |
 3401|       |        /* some cases of POST and PUT etc needs to rewind the data
 3402|       |           stream at this point */
 3403|  10.6k|        result = http_perhapsrewind(data, conn);
 3404|  10.6k|        if(result)
  ------------------
  |  Branch (3404:12): [True: 0, False: 10.6k]
  ------------------
 3405|      0|          return result;
 3406|       |
 3407|       |        /* mark the next request as a followed location: */
 3408|  10.6k|        data->state.this_is_a_follow = TRUE;
  ------------------
  |  | 1055|  10.6k|#define TRUE true
  ------------------
 3409|  10.6k|      }
 3410|  10.9k|    }
 3411|  13.0k|  }
 3412|  14.9k|  return CURLE_OK;
 3413|  16.9k|}
http.c:http_header_p:
 3420|  4.69k|{
 3421|  4.69k|  struct SingleRequest *k = &data->req;
 3422|       |
 3423|  4.69k|#ifndef CURL_DISABLE_PROXY
 3424|  4.69k|  const char *v = HD_VAL(hd, hdlen, "Proxy-Connection:");
  ------------------
  |  | 3175|  4.69k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 2.43k, False: 2.25k]
  |  |  |  Branch (3175:37): [True: 2.43k, False: 0]
  |  |  ------------------
  |  | 3176|  4.69k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 122, False: 2.31k]
  |  |  ------------------
  ------------------
 3425|  4.69k|  if(v) {
  ------------------
  |  Branch (3425:6): [True: 122, False: 4.57k]
  ------------------
 3426|    122|    struct connectdata *conn = data->conn;
 3427|    122|    if((k->httpversion == 10) && conn->bits.httpproxy &&
  ------------------
  |  Branch (3427:8): [True: 0, False: 122]
  |  Branch (3427:34): [True: 0, False: 0]
  ------------------
 3428|      0|       HD_IS_AND_SAYS(hd, hdlen, "Proxy-Connection:", "keep-alive")) {
  ------------------
  |  | 3181|      0|  (HD_IS(hd, hdlen, n) && \
  |  |  ------------------
  |  |  |  | 3172|      0|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3172:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (3172:36): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3182|      0|   ((hdlen) > ((sizeof(n) - 1) + (sizeof(v) - 1))) && \
  |  |  ------------------
  |  |  |  Branch (3182:4): [True: 0, False: 0]
  |  |  ------------------
  |  | 3183|      0|   Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |                  Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|      0|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (3183:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3429|       |      /*
 3430|       |       * When an HTTP/1.0 reply comes when using a proxy, the
 3431|       |       * 'Proxy-Connection: keep-alive' line tells us the
 3432|       |       * connection will be kept alive for our pleasure.
 3433|       |       * Default action for 1.0 is to close.
 3434|       |       */
 3435|      0|      connkeep(conn, "Proxy-Connection keep-alive"); /* do not close */
  ------------------
  |  |  104|      0|#define connkeep(x, y)    Curl_conncontrol(x, CONNCTRL_KEEP, y)
  |  |  ------------------
  |  |  |  |   90|      0|#define CONNCTRL_KEEP       0 /* undo a marked closure */
  |  |  ------------------
  ------------------
 3436|      0|      infof(data, "HTTP/1.0 proxy connection set to keep alive");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3437|      0|    }
 3438|    122|    else if((k->httpversion == 11) && conn->bits.httpproxy &&
  ------------------
  |  Branch (3438:13): [True: 122, False: 0]
  |  Branch (3438:39): [True: 39, False: 83]
  ------------------
 3439|     39|            HD_IS_AND_SAYS(hd, hdlen, "Proxy-Connection:", "close")) {
  ------------------
  |  | 3181|     39|  (HD_IS(hd, hdlen, n) && \
  |  |  ------------------
  |  |  |  | 3172|     78|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (3172:4): [True: 39, False: 0]
  |  |  |  |  |  Branch (3172:36): [True: 39, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 3182|     39|   ((hdlen) > ((sizeof(n) - 1) + (sizeof(v) - 1))) && \
  |  |  ------------------
  |  |  |  Branch (3182:4): [True: 6, False: 33]
  |  |  ------------------
  |  | 3183|     39|   Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|      6|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |                  Curl_compareheader(hd, STRCONST(n), STRCONST(v)))
  |  |  ------------------
  |  |  |  | 1292|      6|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (3183:4): [True: 0, False: 6]
  |  |  ------------------
  ------------------
 3440|       |      /*
 3441|       |       * We get an HTTP/1.1 response from a proxy and it says it will
 3442|       |       * close down after this transfer.
 3443|       |       */
 3444|      0|      connclose(conn, "Proxy-Connection: asked to close after done");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
 3445|      0|      infof(data, "HTTP/1.1 proxy connection set close");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3446|      0|    }
 3447|    122|    return CURLE_OK;
 3448|    122|  }
 3449|  4.57k|#endif
 3450|  4.57k|  if((407 == k->httpcode) && HD_IS(hd, hdlen, "Proxy-authenticate:")) {
  ------------------
  |  | 3172|  1.73k|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  ------------------
  |  |  |  Branch (3172:4): [True: 1.35k, False: 379]
  |  |  |  Branch (3172:36): [True: 527, False: 826]
  |  |  ------------------
  ------------------
  |  Branch (3450:6): [True: 1.73k, False: 2.83k]
  ------------------
 3451|    527|    char *auth = Curl_copy_header_value(hd);
 3452|    527|    CURLcode result = auth ? CURLE_OK : CURLE_OUT_OF_MEMORY;
  ------------------
  |  Branch (3452:23): [True: 527, False: 0]
  ------------------
 3453|    527|    if(!result) {
  ------------------
  |  Branch (3453:8): [True: 527, False: 0]
  ------------------
 3454|    527|      result = Curl_http_input_auth(data, TRUE, auth);
  ------------------
  |  | 1055|    527|#define TRUE true
  ------------------
 3455|    527|      curlx_free(auth);
  ------------------
  |  | 1483|    527|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3456|    527|    }
 3457|    527|    return result;
 3458|    527|  }
 3459|       |#ifdef USE_SPNEGO
 3460|       |  if(HD_IS(hd, hdlen, "Persistent-Auth:")) {
 3461|       |    struct connectdata *conn = data->conn;
 3462|       |    struct negotiatedata *negdata = Curl_auth_nego_get(conn, FALSE);
 3463|       |    struct auth *authp = &data->state.authhost;
 3464|       |    if(!negdata)
 3465|       |      return CURLE_OUT_OF_MEMORY;
 3466|       |    if(authp->picked == CURLAUTH_NEGOTIATE) {
 3467|       |      char *persistentauth = Curl_copy_header_value(hd);
 3468|       |      if(!persistentauth)
 3469|       |        return CURLE_OUT_OF_MEMORY;
 3470|       |      negdata->noauthpersist = !!checkprefix("false", persistentauth);
 3471|       |      negdata->havenoauthpersist = TRUE;
 3472|       |      infof(data, "Negotiate: noauthpersist -> %d, header part: %s",
 3473|       |            negdata->noauthpersist, persistentauth);
 3474|       |      curlx_free(persistentauth);
 3475|       |    }
 3476|       |  }
 3477|       |#endif
 3478|  4.04k|  return CURLE_OK;
 3479|  4.57k|}
http.c:http_header_r:
 3486|  27.3k|{
 3487|  27.3k|  const char *v = HD_VAL(hd, hdlen, "Retry-After:");
  ------------------
  |  | 3175|  27.3k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 25.3k, False: 2.09k]
  |  |  |  Branch (3175:37): [True: 25.3k, False: 0]
  |  |  ------------------
  |  | 3176|  27.3k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 5.99k, False: 19.3k]
  |  |  ------------------
  ------------------
 3488|  27.3k|  if(v) {
  ------------------
  |  Branch (3488:6): [True: 5.99k, False: 21.4k]
  ------------------
 3489|       |    /* Retry-After = HTTP-date / delay-seconds */
 3490|  5.99k|    curl_off_t retry_after = 0; /* zero for unknown or "now" */
 3491|  5.99k|    time_t date = 0;
 3492|  5.99k|    curlx_str_passblanks(&v);
 3493|       |
 3494|       |    /* try it as a date first, because a date can otherwise start with and
 3495|       |       get treated as a number */
 3496|  5.99k|    if(!Curl_getdate_capped(v, &date)) {
  ------------------
  |  Branch (3496:8): [True: 2.60k, False: 3.39k]
  ------------------
 3497|  2.60k|      time_t current = time(NULL);
 3498|  2.60k|      if(date >= current)
  ------------------
  |  Branch (3498:10): [True: 1.40k, False: 1.19k]
  ------------------
 3499|       |        /* convert date to number of seconds into the future */
 3500|  1.40k|        retry_after = date - current;
 3501|  2.60k|    }
 3502|  3.39k|    else
 3503|       |      /* Try it as a decimal number, ignore errors */
 3504|  3.39k|      (void)curlx_str_number(&v, &retry_after, CURL_OFF_T_MAX);
  ------------------
  |  |  594|  3.39k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
 3505|       |    /* limit to 6 hours max. this is not documented so that it can be changed
 3506|       |       in the future if necessary. */
 3507|  5.99k|    if(retry_after > 21600)
  ------------------
  |  Branch (3507:8): [True: 1.42k, False: 4.57k]
  ------------------
 3508|  1.42k|      retry_after = 21600;
 3509|  5.99k|    data->info.retry_after = retry_after;
 3510|  5.99k|  }
 3511|  27.3k|  return CURLE_OK;
 3512|  27.3k|}
http.c:http_header_s:
 3519|  42.3k|{
 3520|  42.3k|#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_HSTS)
 3521|  42.3k|  struct connectdata *conn = data->conn;
 3522|  42.3k|  const char *v;
 3523|       |#else
 3524|       |  (void)data;
 3525|       |  (void)hd;
 3526|       |  (void)hdlen;
 3527|       |#endif
 3528|       |
 3529|  42.3k|#ifndef CURL_DISABLE_COOKIES
 3530|  42.3k|  v = (data->cookies && data->state.cookie_engine) ?
  ------------------
  |  Branch (3530:8): [True: 42.3k, False: 0]
  |  Branch (3530:25): [True: 42.3k, False: 0]
  ------------------
 3531|  42.3k|    HD_VAL(hd, hdlen, "Set-Cookie:") : NULL;
  ------------------
  |  | 3175|  42.3k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 39.6k, False: 2.61k]
  |  |  |  Branch (3175:37): [True: 39.6k, False: 0]
  |  |  ------------------
  |  | 3176|  42.3k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 24.2k, False: 15.3k]
  |  |  ------------------
  ------------------
 3532|  42.3k|  if(v) {
  ------------------
  |  Branch (3532:6): [True: 24.2k, False: 18.0k]
  ------------------
 3533|       |    /* If there is a custom-set Host: name, use it here, or else use
 3534|       |     * real peer hostname. */
 3535|  24.2k|    const char *host = data->req.cookiehost ?
  ------------------
  |  Branch (3535:24): [True: 0, False: 24.2k]
  ------------------
 3536|  24.2k|      data->req.cookiehost : conn->origin->hostname;
 3537|  24.2k|    const bool secure_context = Curl_secure_context(conn, host);
 3538|  24.2k|    CURLcode result;
 3539|  24.2k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 3540|  24.2k|    result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, v, host,
  ------------------
  |  | 1055|  24.2k|#define TRUE true
  ------------------
                  result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, v, host,
  ------------------
  |  | 1058|  24.2k|#define FALSE false
  ------------------
 3541|  24.2k|                             data->state.up.path, secure_context);
 3542|  24.2k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 3543|  24.2k|    return result;
 3544|  24.2k|  }
 3545|  18.0k|#endif
 3546|  18.0k|#ifndef CURL_DISABLE_HSTS
 3547|       |  /* If enabled, the header is incoming and this is over HTTPS */
 3548|  18.0k|  v = (data->hsts &&
  ------------------
  |  Branch (3548:8): [True: 18.0k, False: 0]
  ------------------
 3549|  18.0k|       (Curl_xfer_is_secure(data) ||
  ------------------
  |  Branch (3549:9): [True: 0, False: 18.0k]
  ------------------
 3550|  18.0k|#ifdef DEBUGBUILD
 3551|       |        /* allow debug builds to circumvent the HTTPS restriction */
 3552|  18.0k|        getenv("CURL_HSTS_HTTP")
  ------------------
  |  Branch (3552:9): [True: 18.0k, False: 0]
  ------------------
 3553|       |#else
 3554|       |        0
 3555|       |#endif
 3556|  18.0k|         )
 3557|  18.0k|    ) ? HD_VAL(hd, hdlen, "Strict-Transport-Security:") : NULL;
  ------------------
  |  | 3175|  18.0k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 10.2k, False: 7.74k]
  |  |  |  Branch (3175:37): [True: 10.2k, False: 0]
  |  |  ------------------
  |  | 3176|  18.0k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
 3558|  18.0k|  if(v) {
  ------------------
  |  Branch (3558:6): [True: 0, False: 18.0k]
  ------------------
 3559|      0|    CURLcode result =
 3560|      0|      Curl_hsts_parse(data->hsts, conn->origin->hostname, v);
 3561|      0|    if(result) {
  ------------------
  |  Branch (3561:8): [True: 0, False: 0]
  ------------------
 3562|      0|      if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (3562:10): [True: 0, False: 0]
  ------------------
 3563|      0|        return result;
 3564|      0|      infof(data, "Illegal STS header skipped");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3565|      0|    }
 3566|      0|#ifdef DEBUGBUILD
 3567|      0|    else
 3568|      0|      infof(data, "Parsed STS header fine (%zu entries)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3569|      0|            Curl_llist_count(&data->hsts->list));
 3570|      0|#endif
 3571|      0|  }
 3572|  18.0k|#endif
 3573|       |
 3574|  18.0k|  return CURLE_OK;
 3575|  18.0k|}
http.c:http_header_t:
 3582|  7.09k|{
 3583|  7.09k|  struct connectdata *conn = data->conn;
 3584|  7.09k|  struct SingleRequest *k = &data->req;
 3585|       |
 3586|       |  /* RFC 9112, ch. 6.1
 3587|       |   * "Transfer-Encoding MAY be sent in a response to a HEAD request or
 3588|       |   *  in a 304 (Not Modified) response (Section 15.4.5 of [HTTP]) to a
 3589|       |   *  GET request, neither of which includes a message body, to indicate
 3590|       |   *  that the origin server would have applied a transfer coding to the
 3591|       |   *  message body if the request had been an unconditional GET."
 3592|       |   *
 3593|       |   * Read: in these cases the 'Transfer-Encoding' does not apply
 3594|       |   * to any data following the response headers. Do not add any decoders.
 3595|       |   */
 3596|  7.09k|  const char *v = (!k->http_bodyless &&
  ------------------
  |  Branch (3596:20): [True: 6.69k, False: 397]
  ------------------
 3597|  6.69k|                   (data->state.httpreq != HTTPREQ_HEAD) &&
  ------------------
  |  Branch (3597:20): [True: 6.39k, False: 297]
  ------------------
 3598|  6.39k|                   (k->httpcode != 304)) ?
  ------------------
  |  Branch (3598:20): [True: 6.39k, False: 0]
  ------------------
 3599|  7.09k|    HD_VAL(hd, hdlen, "Transfer-Encoding:") : NULL;
  ------------------
  |  | 3175|  6.39k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 3.08k, False: 3.31k]
  |  |  |  Branch (3175:37): [True: 3.08k, False: 0]
  |  |  ------------------
  |  | 3176|  6.39k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 1.08k, False: 2.00k]
  |  |  ------------------
  ------------------
 3600|  7.09k|  if(v) {
  ------------------
  |  Branch (3600:6): [True: 1.08k, False: 6.01k]
  ------------------
 3601|       |    /* One or more encodings. We check for chunked and/or a compression
 3602|       |       algorithm. */
 3603|  1.08k|    CURLcode result = Curl_build_unencoding_stack(data, v, TRUE);
  ------------------
  |  | 1055|  1.08k|#define TRUE true
  ------------------
 3604|  1.08k|    if(result)
  ------------------
  |  Branch (3604:8): [True: 9, False: 1.07k]
  ------------------
 3605|      9|      return result;
 3606|  1.07k|    if(!k->chunk && data->set.http_transfer_encoding) {
  ------------------
  |  Branch (3606:8): [True: 479, False: 592]
  |  Branch (3606:21): [True: 379, False: 100]
  ------------------
 3607|       |      /* if this is not chunked, only close can signal the end of this
 3608|       |       * transfer as Content-Length is said not to be trusted for
 3609|       |       * transfer-encoding! */
 3610|    379|      connclose(conn, "HTTP/1.1 transfer-encoding without chunks");
  ------------------
  |  |  103|    379|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|    379|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
 3611|    379|      k->ignore_cl = TRUE;
  ------------------
  |  | 1055|    379|#define TRUE true
  ------------------
 3612|    379|    }
 3613|  1.07k|    return CURLE_OK;
 3614|  1.08k|  }
 3615|  6.01k|  v = HD_VAL(hd, hdlen, "Trailer:");
  ------------------
  |  | 3175|  6.01k|  ((((hdlen) >= (sizeof(n) - 1)) && (hd) && \
  |  |  ------------------
  |  |  |  Branch (3175:5): [True: 5.16k, False: 849]
  |  |  |  Branch (3175:37): [True: 5.16k, False: 0]
  |  |  ------------------
  |  | 3176|  6.01k|    curl_strnequal(n, hd, sizeof(n) - 1)) ? ((hd) + (sizeof(n) - 1)) : NULL)
  |  |  ------------------
  |  |  |  Branch (3176:5): [True: 0, False: 5.16k]
  |  |  ------------------
  ------------------
 3616|  6.01k|  if(v) {
  ------------------
  |  Branch (3616:6): [True: 0, False: 6.01k]
  ------------------
 3617|      0|    data->req.resp_trailer = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3618|      0|    return CURLE_OK;
 3619|      0|  }
 3620|  6.01k|  return CURLE_OK;
 3621|  6.01k|}
http.c:http_header_w:
 3628|  11.0k|{
 3629|  11.0k|  struct SingleRequest *k = &data->req;
 3630|  11.0k|  CURLcode result = CURLE_OK;
 3631|       |
 3632|  11.0k|  if((401 == k->httpcode) && HD_IS(hd, hdlen, "WWW-Authenticate:")) {
  ------------------
  |  | 3172|  3.73k|  (((hdlen) >= (sizeof(n) - 1)) && curl_strnequal(n, hd, sizeof(n) - 1))
  |  |  ------------------
  |  |  |  Branch (3172:4): [True: 1.28k, False: 2.44k]
  |  |  |  Branch (3172:36): [True: 816, False: 473]
  |  |  ------------------
  ------------------
  |  Branch (3632:6): [True: 3.73k, False: 7.35k]
  ------------------
 3633|    816|    char *auth = Curl_copy_header_value(hd);
 3634|    816|    if(!auth)
  ------------------
  |  Branch (3634:8): [True: 0, False: 816]
  ------------------
 3635|      0|      result = CURLE_OUT_OF_MEMORY;
 3636|    816|    else {
 3637|    816|      result = Curl_http_input_auth(data, FALSE, auth);
  ------------------
  |  | 1058|    816|#define FALSE false
  ------------------
 3638|    816|      curlx_free(auth);
  ------------------
  |  | 1483|    816|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3639|    816|    }
 3640|    816|  }
 3641|  11.0k|  return result;
 3642|  11.0k|}
http.c:http_parse_headers:
 4403|  2.05M|{
 4404|  2.05M|  struct connectdata *conn = data->conn;
 4405|  2.05M|  CURLcode result = CURLE_OK;
 4406|  2.05M|  struct SingleRequest *k = &data->req;
 4407|  2.05M|  const char *end_ptr;
 4408|  2.05M|  bool leftover_body = FALSE;
  ------------------
  |  | 1058|  2.05M|#define FALSE false
  ------------------
 4409|       |
 4410|       |  /* we have bytes for the next header, make sure it is not a folded header
 4411|       |     before passing it on */
 4412|  2.05M|  if(data->state.maybe_folded && blen) {
  ------------------
  |  Branch (4412:6): [True: 43.3k, False: 2.01M]
  |  Branch (4412:34): [True: 43.3k, False: 0]
  ------------------
 4413|  43.3k|    if(ISBLANK(buf[0])) {
  ------------------
  |  |   45|  43.3k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 2.61k, False: 40.7k]
  |  |  |  Branch (45:38): [True: 1.70k, False: 39.0k]
  |  |  ------------------
  ------------------
 4414|       |      /* folded, remove the trailing newlines and append the next header */
 4415|  4.31k|      unfold_header(data);
 4416|  4.31k|    }
 4417|  39.0k|    else {
 4418|       |      /* the header data we hold is a complete header, pass it on */
 4419|  39.0k|      size_t ignore_this;
 4420|  39.0k|      result = http_rw_hd(data, curlx_dyn_ptr(&data->state.headerb),
 4421|  39.0k|                          curlx_dyn_len(&data->state.headerb),
 4422|  39.0k|                          NULL, 0, &ignore_this);
 4423|  39.0k|      curlx_dyn_reset(&data->state.headerb);
 4424|  39.0k|      if(result)
  ------------------
  |  Branch (4424:10): [True: 102, False: 38.9k]
  ------------------
 4425|    102|        return result;
 4426|  39.0k|    }
 4427|  43.2k|    data->state.maybe_folded = FALSE;
  ------------------
  |  | 1058|  43.2k|#define FALSE false
  ------------------
 4428|  43.2k|  }
 4429|       |
 4430|       |  /* header line within buffer loop */
 4431|  2.05M|  *pconsumed = 0;
 4432|  2.19M|  while(blen && k->header) {
  ------------------
  |  Branch (4432:9): [True: 2.19M, False: 5.30k]
  |  Branch (4432:17): [True: 2.18M, False: 10.2k]
  ------------------
 4433|  2.18M|    size_t consumed;
 4434|  2.18M|    size_t hlen;
 4435|  2.18M|    const char *hd;
 4436|  2.18M|    size_t unfold_len = 0;
 4437|       |
 4438|  2.18M|    if(data->state.leading_unfold) {
  ------------------
  |  Branch (4438:8): [True: 14.5k, False: 2.16M]
  ------------------
 4439|       |      /* immediately after an unfold, keep only a single whitespace */
 4440|  26.9k|      while(blen && ISBLANK(buf[0])) {
  ------------------
  |  |   45|  22.2k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 6.78k, False: 15.4k]
  |  |  |  Branch (45:38): [True: 5.68k, False: 9.75k]
  |  |  ------------------
  ------------------
  |  Branch (4440:13): [True: 22.2k, False: 4.74k]
  ------------------
 4441|  12.4k|        buf++;
 4442|  12.4k|        blen--;
 4443|  12.4k|        unfold_len++;
 4444|  12.4k|      }
 4445|  14.5k|      if(blen) {
  ------------------
  |  Branch (4445:10): [True: 9.75k, False: 4.74k]
  ------------------
 4446|       |        /* insert a single space */
 4447|  9.75k|        result = curlx_dyn_addn(&data->state.headerb, " ", 1);
 4448|  9.75k|        if(result)
  ------------------
  |  Branch (4448:12): [True: 0, False: 9.75k]
  ------------------
 4449|      0|          return result;
 4450|  9.75k|        data->state.leading_unfold = FALSE; /* done now */
  ------------------
  |  | 1058|  9.75k|#define FALSE false
  ------------------
 4451|  9.75k|      }
 4452|  14.5k|    }
 4453|       |
 4454|  2.18M|    end_ptr = memchr(buf, '\n', blen);
 4455|  2.18M|    if(!end_ptr) {
  ------------------
  |  Branch (4455:8): [True: 1.99M, False: 187k]
  ------------------
 4456|       |      /* Not a complete header line within buffer, append the data to
 4457|       |         the end of the headerbuff. */
 4458|  1.99M|      result = curlx_dyn_addn(&data->state.headerb, buf, blen);
 4459|  1.99M|      if(result)
  ------------------
  |  Branch (4459:10): [True: 2, False: 1.99M]
  ------------------
 4460|      2|        return result;
 4461|  1.99M|      *pconsumed += blen + unfold_len;
 4462|       |
 4463|  1.99M|      if(!k->headerline) {
  ------------------
  |  Branch (4463:10): [True: 170k, False: 1.82M]
  ------------------
 4464|       |        /* check if this looks like a protocol header */
 4465|   170k|        statusline st =
 4466|   170k|          checkprotoprefix(data, conn,
 4467|   170k|                           curlx_dyn_ptr(&data->state.headerb),
 4468|   170k|                           curlx_dyn_len(&data->state.headerb));
 4469|       |
 4470|   170k|        if(st == STATUS_BAD) {
  ------------------
  |  Branch (4470:12): [True: 110, False: 170k]
  ------------------
 4471|       |          /* this is not the beginning of a protocol first header line.
 4472|       |           * Cannot be 0.9 if version was detected or connection was reused. */
 4473|    110|          k->header = FALSE;
  ------------------
  |  | 1058|    110|#define FALSE false
  ------------------
 4474|    110|          streamclose(conn, "bad HTTP: No end-of-message indicator");
  ------------------
  |  |  102|    110|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|    110|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 4475|    110|          if((k->httpversion >= 10) || conn->bits.reuse) {
  ------------------
  |  Branch (4475:14): [True: 16, False: 94]
  |  Branch (4475:40): [True: 61, False: 33]
  ------------------
 4476|     77|            failf(data, "Invalid status line");
  ------------------
  |  |   62|     77|#define failf Curl_failf
  ------------------
 4477|     77|            return CURLE_WEIRD_SERVER_REPLY;
 4478|     77|          }
 4479|     33|          if(!data->state.http_neg.accept_09) {
  ------------------
  |  Branch (4479:14): [True: 31, False: 2]
  ------------------
 4480|     31|            failf(data, "Received HTTP/0.9 when not allowed");
  ------------------
  |  |   62|     31|#define failf Curl_failf
  ------------------
 4481|     31|            return CURLE_UNSUPPORTED_PROTOCOL;
 4482|     31|          }
 4483|      2|          leftover_body = TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
 4484|      2|          goto out;
 4485|     33|        }
 4486|   170k|      }
 4487|  1.99M|      goto out; /* read more and try again */
 4488|  1.99M|    }
 4489|       |
 4490|       |    /* the size of the remaining header line */
 4491|   187k|    consumed = (end_ptr - buf) + 1;
 4492|       |
 4493|   187k|    result = curlx_dyn_addn(&data->state.headerb, buf, consumed);
 4494|   187k|    if(result)
  ------------------
  |  Branch (4494:8): [True: 2, False: 187k]
  ------------------
 4495|      2|      return result;
 4496|   187k|    blen -= consumed;
 4497|   187k|    buf += consumed;
 4498|   187k|    *pconsumed += consumed + unfold_len;
 4499|       |
 4500|       |    /****
 4501|       |     * We now have a FULL header line in 'headerb'.
 4502|       |     *****/
 4503|       |
 4504|   187k|    hlen = curlx_dyn_len(&data->state.headerb);
 4505|   187k|    hd = curlx_dyn_ptr(&data->state.headerb);
 4506|       |
 4507|   187k|    if(!k->headerline) {
  ------------------
  |  Branch (4507:8): [True: 16.7k, False: 170k]
  ------------------
 4508|       |      /* the first read "header", the status line */
 4509|  16.7k|      statusline st = checkprotoprefix(data, conn, hd, hlen);
 4510|  16.7k|      if(st == STATUS_BAD) {
  ------------------
  |  Branch (4510:10): [True: 36, False: 16.6k]
  ------------------
 4511|     36|        streamclose(conn, "bad HTTP: No end-of-message indicator");
  ------------------
  |  |  102|     36|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|     36|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 4512|       |        /* this is not the beginning of a protocol first header line.
 4513|       |         * Cannot be 0.9 if version was detected or connection was reused. */
 4514|     36|        if((k->httpversion >= 10) || conn->bits.reuse) {
  ------------------
  |  Branch (4514:12): [True: 12, False: 24]
  |  Branch (4514:38): [True: 21, False: 3]
  ------------------
 4515|     33|          failf(data, "Invalid status line");
  ------------------
  |  |   62|     33|#define failf Curl_failf
  ------------------
 4516|     33|          return CURLE_WEIRD_SERVER_REPLY;
 4517|     33|        }
 4518|      3|        if(!data->state.http_neg.accept_09) {
  ------------------
  |  Branch (4518:12): [True: 1, False: 2]
  ------------------
 4519|      1|          failf(data, "Received HTTP/0.9 when not allowed");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4520|      1|          return CURLE_UNSUPPORTED_PROTOCOL;
 4521|      1|        }
 4522|      2|        k->header = FALSE;
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
 4523|      2|        leftover_body = TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
 4524|      2|        goto out;
 4525|      3|      }
 4526|  16.7k|    }
 4527|   170k|    else {
 4528|   170k|      if(hlen && !ISNEWLINE(hd[0])) {
  ------------------
  |  |   50|   170k|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 12.1k, False: 158k]
  |  |  |  Branch (50:43): [True: 2.05k, False: 156k]
  |  |  ------------------
  ------------------
  |  Branch (4528:10): [True: 170k, False: 0]
  ------------------
 4529|       |        /* this is NOT the header separator */
 4530|       |
 4531|       |        /* if we have bytes for the next header, check for folding */
 4532|   156k|        if(blen && ISBLANK(buf[0])) {
  ------------------
  |  |   45|   113k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 2.42k, False: 110k]
  |  |  |  Branch (45:38): [True: 3.02k, False: 107k]
  |  |  ------------------
  ------------------
  |  Branch (4532:12): [True: 113k, False: 43.4k]
  ------------------
 4533|       |          /* remove the trailing CRLF and append the next header */
 4534|  5.44k|          unfold_header(data);
 4535|  5.44k|          continue;
 4536|  5.44k|        }
 4537|   151k|        else if(!blen) {
  ------------------
  |  Branch (4537:17): [True: 43.4k, False: 107k]
  ------------------
 4538|       |          /* this might be a folded header so deal with it in next invoke */
 4539|  43.4k|          data->state.maybe_folded = TRUE;
  ------------------
  |  | 1055|  43.4k|#define TRUE true
  ------------------
 4540|  43.4k|          break;
 4541|  43.4k|        }
 4542|   156k|      }
 4543|   170k|    }
 4544|       |
 4545|   138k|    result = http_rw_hd(data, hd, hlen, buf, blen, &consumed);
 4546|       |    /* We are done with this line. We reset because response
 4547|       |     * processing might switch to HTTP/2 and that might call us
 4548|       |     * directly again. */
 4549|   138k|    curlx_dyn_reset(&data->state.headerb);
 4550|   138k|    if(consumed) {
  ------------------
  |  Branch (4550:8): [True: 0, False: 138k]
  ------------------
 4551|      0|      blen -= consumed;
 4552|      0|      buf += consumed;
 4553|      0|      *pconsumed += consumed;
 4554|      0|    }
 4555|   138k|    if(result)
  ------------------
  |  Branch (4555:8): [True: 1.18k, False: 137k]
  ------------------
 4556|  1.18k|      return result;
 4557|   138k|  }
 4558|       |
 4559|       |  /* We might have reached the end of the header part here, but
 4560|       |     there might be a non-header part left in the end of the read
 4561|       |     buffer. */
 4562|  2.05M|out:
 4563|  2.05M|  if(!k->header && !leftover_body) {
  ------------------
  |  Branch (4563:6): [True: 11.9k, False: 2.04M]
  |  Branch (4563:20): [True: 11.9k, False: 4]
  ------------------
 4564|  11.9k|    curlx_dyn_free(&data->state.headerb);
 4565|  11.9k|  }
 4566|  2.05M|  return CURLE_OK;
 4567|  2.05M|}
http.c:unfold_header:
 4392|  9.76k|{
 4393|  9.76k|  Curl_http_to_fold(&data->state.headerb);
 4394|       |  data->state.leading_unfold = TRUE;
  ------------------
  |  | 1055|  9.76k|#define TRUE true
  ------------------
 4395|  9.76k|}
http.c:checkprotoprefix:
 3159|   187k|{
 3160|   187k|#ifndef CURL_DISABLE_RTSP
 3161|   187k|  if(conn->scheme->protocol & CURLPROTO_RTSP)
  ------------------
  |  | 1096|   187k|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (3161:6): [True: 187k, False: 0]
  ------------------
 3162|   187k|    return checkrtspprefix(data, s, len);
 3163|       |#else
 3164|       |  (void)conn;
 3165|       |#endif /* CURL_DISABLE_RTSP */
 3166|       |
 3167|      0|  return checkhttpprefix(data, s, len);
 3168|   187k|}
http.c:checkrtspprefix:
 3145|   187k|{
 3146|   187k|  statusline status = STATUS_BAD;
 3147|   187k|  statusline onmatch = len >= 5 ? STATUS_DONE : STATUS_UNKNOWN;
  ------------------
  |  Branch (3147:24): [True: 176k, False: 11.5k]
  ------------------
 3148|   187k|  (void)data;
 3149|   187k|  if(checkprefixmax("RTSP/", s, len))
  ------------------
  |  Branch (3149:6): [True: 187k, False: 146]
  ------------------
 3150|   187k|    status = onmatch;
 3151|       |
 3152|   187k|  return status;
 3153|   187k|}

Curl_h1_req_write_head:
  324|    823|{
  325|    823|  CURLcode result;
  326|       |
  327|    823|  result = curlx_dyn_addf(dbuf, "%s %s%s%s%s HTTP/1.%d\r\n",
  328|    823|                          req->method,
  329|    823|                          req->scheme ? req->scheme : "",
  ------------------
  |  Branch (329:27): [True: 0, False: 823]
  ------------------
  330|    823|                          req->scheme ? "://" : "",
  ------------------
  |  Branch (330:27): [True: 0, False: 823]
  ------------------
  331|    823|                          req->authority ? req->authority : "",
  ------------------
  |  Branch (331:27): [True: 823, False: 0]
  ------------------
  332|    823|                          req->path ? req->path : "",
  ------------------
  |  Branch (332:27): [True: 0, False: 823]
  ------------------
  333|    823|                          http_minor);
  334|    823|  if(result)
  ------------------
  |  Branch (334:6): [True: 0, False: 823]
  ------------------
  335|      0|    goto out;
  336|       |
  337|    823|  result = Curl_dynhds_h1_dprint(&req->headers, dbuf);
  338|    823|  if(result)
  ------------------
  |  Branch (338:6): [True: 0, False: 823]
  ------------------
  339|      0|    goto out;
  340|       |
  341|    823|  result = curlx_dyn_addn(dbuf, STRCONST("\r\n"));
  ------------------
  |  | 1292|    823|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  342|       |
  343|    823|out:
  344|    823|  return result;
  345|    823|}

canon_path:
  689|  2.68k|{
  690|  2.68k|  CURLcode result = CURLE_OK;
  691|       |
  692|  2.68k|  struct Curl_str original_path;
  693|       |
  694|  2.68k|  curlx_str_assign(&original_path, q, len);
  695|       |
  696|       |  /* Normalized path will be either the same or shorter than the original
  697|       |   * path, plus trailing slash */
  698|       |
  699|  2.68k|  if(do_uri_encode)
  ------------------
  |  Branch (699:6): [True: 2.63k, False: 49]
  ------------------
  700|  2.63k|    result = uri_encode_path(&original_path, new_path);
  701|     49|  else
  702|     49|    result = curlx_dyn_addn(new_path, q, len);
  703|       |
  704|  2.68k|  if(!result) {
  ------------------
  |  Branch (704:6): [True: 2.68k, False: 0]
  ------------------
  705|  2.68k|    if(curlx_dyn_len(new_path) == 0)
  ------------------
  |  Branch (705:8): [True: 0, False: 2.68k]
  ------------------
  706|      0|      result = curlx_dyn_add(new_path, "/");
  707|  2.68k|  }
  708|       |
  709|  2.68k|  return result;
  710|  2.68k|}
canon_query:
  715|  2.68k|{
  716|  2.68k|  CURLcode result = CURLE_OK;
  717|       |
  718|  2.68k|  struct dynbuf query_array[MAX_QUERY_COMPONENTS];
  719|  2.68k|  struct pair encoded_query_array[MAX_QUERY_COMPONENTS];
  720|  2.68k|  size_t num_query_components;
  721|  2.68k|  size_t counted_query_components = 0;
  722|  2.68k|  size_t index;
  723|       |
  724|  2.68k|  if(!query)
  ------------------
  |  Branch (724:6): [True: 1.65k, False: 1.02k]
  ------------------
  725|  1.65k|    return result;
  726|       |
  727|  1.02k|  result = split_to_dyn_array(query, &query_array[0], &num_query_components);
  728|  1.02k|  if(result) {
  ------------------
  |  Branch (728:6): [True: 0, False: 1.02k]
  ------------------
  729|      0|    goto fail;
  730|      0|  }
  731|       |
  732|       |  /* Create list of pairs, each pair containing an encoded query
  733|       |   * component */
  734|       |
  735|  3.48k|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (735:18): [True: 2.45k, False: 1.02k]
  ------------------
  736|  2.45k|    const char *in_key;
  737|  2.45k|    size_t in_key_len;
  738|  2.45k|    const char *offset;
  739|  2.45k|    size_t query_part_len = curlx_dyn_len(&query_array[index]);
  740|  2.45k|    const char *query_part = curlx_dyn_ptr(&query_array[index]);
  741|       |
  742|  2.45k|    in_key = query_part;
  743|       |
  744|  2.45k|    offset = strchr(query_part, '=');
  745|       |    /* If there is no equals, this key has no value */
  746|  2.45k|    if(!offset) {
  ------------------
  |  Branch (746:8): [True: 1.35k, False: 1.10k]
  ------------------
  747|  1.35k|      in_key_len = strlen(in_key);
  748|  1.35k|    }
  749|  1.10k|    else {
  750|  1.10k|      in_key_len = offset - in_key;
  751|  1.10k|    }
  752|       |
  753|  2.45k|    curlx_dyn_init(&encoded_query_array[index].key,
  754|  2.45k|      (query_part_len * 3) + 1);
  755|  2.45k|    curlx_dyn_init(&encoded_query_array[index].value,
  756|  2.45k|      (query_part_len * 3) + 1);
  757|  2.45k|    counted_query_components++;
  758|       |
  759|       |    /* Decode/encode the key */
  760|  2.45k|    result = normalize_query(in_key, in_key_len,
  761|  2.45k|                             &encoded_query_array[index].key);
  762|  2.45k|    if(result) {
  ------------------
  |  Branch (762:8): [True: 0, False: 2.45k]
  ------------------
  763|      0|      goto fail;
  764|      0|    }
  765|       |
  766|       |    /* Decode/encode the value if it exists */
  767|  2.45k|    if(offset && offset != (query_part + query_part_len - 1)) {
  ------------------
  |  Branch (767:8): [True: 1.10k, False: 1.35k]
  |  Branch (767:18): [True: 929, False: 172]
  ------------------
  768|    929|      size_t in_value_len;
  769|    929|      const char *in_value = offset + 1;
  770|    929|      in_value_len = query_part + query_part_len - (offset + 1);
  771|    929|      result = normalize_query(in_value, in_value_len,
  772|    929|                               &encoded_query_array[index].value);
  773|    929|      if(result) {
  ------------------
  |  Branch (773:10): [True: 0, False: 929]
  ------------------
  774|      0|        goto fail;
  775|      0|      }
  776|    929|    }
  777|  1.52k|    else {
  778|       |      /* If there is no value, the value is an empty string */
  779|  1.52k|      curlx_dyn_init(&encoded_query_array[index].value, 2);
  780|  1.52k|      result = curlx_dyn_addn(&encoded_query_array[index].value, "", 1);
  781|  1.52k|    }
  782|       |
  783|  2.45k|    if(result) {
  ------------------
  |  Branch (783:8): [True: 0, False: 2.45k]
  ------------------
  784|      0|      goto fail;
  785|      0|    }
  786|  2.45k|  }
  787|       |
  788|       |  /* Sort the encoded query components by key and value */
  789|  1.02k|  qsort(&encoded_query_array, num_query_components,
  790|  1.02k|        sizeof(struct pair), compare_func);
  791|       |
  792|       |  /* Append the query components together to make a full query string */
  793|  3.48k|  for(index = 0; index < num_query_components; index++) {
  ------------------
  |  Branch (793:18): [True: 2.45k, False: 1.02k]
  ------------------
  794|       |
  795|  2.45k|    if(index)
  ------------------
  |  Branch (795:8): [True: 1.45k, False: 1.00k]
  ------------------
  796|  1.45k|      result = curlx_dyn_addn(dq, "&", 1);
  797|  2.45k|    if(!result) {
  ------------------
  |  Branch (797:8): [True: 2.45k, False: 0]
  ------------------
  798|  2.45k|      const char *key_ptr = curlx_dyn_ptr(&encoded_query_array[index].key);
  799|  2.45k|      const char *value_ptr = curlx_dyn_ptr(&encoded_query_array[index].value);
  800|  2.45k|      size_t vlen = curlx_dyn_len(&encoded_query_array[index].value);
  801|  2.45k|      if(value_ptr && vlen) {
  ------------------
  |  Branch (801:10): [True: 2.45k, False: 0]
  |  Branch (801:23): [True: 2.45k, False: 0]
  ------------------
  802|  2.45k|        result = curlx_dyn_addf(dq, "%s=%s", key_ptr, value_ptr);
  803|  2.45k|      }
  804|      0|      else {
  805|       |        /* Empty value is always encoded to key= */
  806|      0|        result = curlx_dyn_addf(dq, "%s=", key_ptr);
  807|      0|      }
  808|  2.45k|    }
  809|  2.45k|    if(result)
  ------------------
  |  Branch (809:8): [True: 0, False: 2.45k]
  ------------------
  810|      0|      break;
  811|  2.45k|  }
  812|       |
  813|  1.02k|fail:
  814|  1.02k|  if(counted_query_components)
  ------------------
  |  Branch (814:6): [True: 1.00k, False: 25]
  ------------------
  815|       |    /* the encoded_query_array might not be initialized yet */
  816|  1.00k|    pair_array_free(&encoded_query_array[0], counted_query_components);
  817|  1.02k|  dyn_array_free(&query_array[0], num_query_components);
  818|  1.02k|  return result;
  819|  1.02k|}
Curl_output_aws_sigv4:
  822|  2.69k|{
  823|  2.69k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  824|  2.69k|  struct connectdata *conn = data->conn;
  825|  2.69k|  const char *line;
  826|  2.69k|  struct Curl_str provider0;
  827|  2.69k|  struct Curl_str provider1;
  828|  2.69k|  struct Curl_str region = { NULL, 0 };
  829|  2.69k|  struct Curl_str service = { NULL, 0 };
  830|  2.69k|  const char *hostname = conn->origin->hostname;
  831|  2.69k|  time_t clock;
  832|  2.69k|  struct tm tm;
  833|  2.69k|  char timestamp[TIMESTAMP_SIZE];
  834|  2.69k|  char date[9];
  835|  2.69k|  struct dynbuf canonical_headers;
  836|  2.69k|  struct dynbuf signed_headers;
  837|  2.69k|  struct dynbuf canonical_query;
  838|  2.69k|  struct dynbuf canonical_path;
  839|  2.69k|  char *date_header = NULL;
  840|  2.69k|  Curl_HttpReq httpreq;
  841|  2.69k|  const char *method = NULL;
  842|  2.69k|  const char *payload_hash = NULL;
  843|  2.69k|  size_t payload_hash_len = 0;
  844|  2.69k|  unsigned char sha_hash[CURL_SHA256_DIGEST_LENGTH];
  845|  2.69k|  char sha_hex[SHA256_HEX_LENGTH];
  846|  2.69k|  char content_sha256_hdr[CONTENT_SHA256_HDR_LEN + 2] = ""; /* add \r\n */
  847|  2.69k|  char *canonical_request = NULL;
  848|  2.69k|  char *request_type = NULL;
  849|  2.69k|  char *credential_scope = NULL;
  850|  2.69k|  char *str_to_sign = NULL;
  851|  2.69k|  const char *user = Curl_creds_user(data->state.creds);
  ------------------
  |  |   75|  2.69k|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 2.68k, False: 12]
  |  |  ------------------
  ------------------
  852|  2.69k|  const char *passwd = Curl_creds_passwd(data->state.creds);
  ------------------
  |  |   76|  2.69k|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 2.68k, False: 12]
  |  |  ------------------
  ------------------
  853|  2.69k|  char *secret = NULL;
  854|  2.69k|  unsigned char sign0[CURL_SHA256_DIGEST_LENGTH] = { 0 };
  855|  2.69k|  unsigned char sign1[CURL_SHA256_DIGEST_LENGTH] = { 0 };
  856|  2.69k|  char *auth_headers = NULL;
  857|       |
  858|  2.69k|  if(data->set.path_as_is) {
  ------------------
  |  Branch (858:6): [True: 2, False: 2.69k]
  ------------------
  859|      2|    failf(data, "Cannot use sigv4 authentication with path-as-is flag");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  860|      2|    return CURLE_BAD_FUNCTION_ARGUMENT;
  861|      2|  }
  862|       |
  863|  2.69k|  if(Curl_checkheaders(data, STRCONST("Authorization"))) {
  ------------------
  |  | 1292|  2.69k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (863:6): [True: 0, False: 2.69k]
  ------------------
  864|       |    /* Authorization already present, Bailing out */
  865|      0|    return CURLE_OK;
  866|      0|  }
  867|       |
  868|       |  /* we init those buffers here, so goto fail will free initialized dynbuf */
  869|  2.69k|  curlx_dyn_init(&canonical_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  2.69k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  870|  2.69k|  curlx_dyn_init(&canonical_query, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  2.69k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  871|  2.69k|  curlx_dyn_init(&signed_headers, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  2.69k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  872|  2.69k|  curlx_dyn_init(&canonical_path, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  2.69k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  873|       |
  874|       |  /*
  875|       |   * Parameters parsing
  876|       |   * Google and Outscale use the same OSC or GOOG,
  877|       |   * but Amazon uses AWS and AMZ for header arguments.
  878|       |   * AWS is the default because most of non-amazon providers
  879|       |   * are still using aws:amz as a prefix.
  880|       |   */
  881|  2.69k|  line = data->set.str[STRING_AWS_SIGV4];
  882|  2.69k|  if(!line || !*line)
  ------------------
  |  Branch (882:6): [True: 1.67k, False: 1.02k]
  |  Branch (882:15): [True: 524, False: 497]
  ------------------
  883|  2.19k|    line = "aws:amz";
  884|       |
  885|       |  /* provider0[:provider1[:region[:service]]]
  886|       |
  887|       |     No string can be longer than N bytes of non-whitespace
  888|       |  */
  889|  2.69k|  if(curlx_str_until(&line, &provider0, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  284|  2.69k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (889:6): [True: 2, False: 2.69k]
  ------------------
  890|      2|    failf(data, "first aws-sigv4 provider cannot be empty");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  891|      2|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  892|      2|    goto fail;
  893|      2|  }
  894|  2.69k|  if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (894:6): [True: 229, False: 2.46k]
  ------------------
  895|  2.46k|     curlx_str_until(&line, &provider1, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  284|  2.46k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (895:6): [True: 21, False: 2.44k]
  ------------------
  896|    250|    provider1 = provider0;
  897|    250|  }
  898|  2.44k|  else if(curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (898:11): [True: 2.21k, False: 225]
  ------------------
  899|    225|          curlx_str_until(&line, &region, MAX_SIGV4_LEN, ':') ||
  ------------------
  |  |  284|    225|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (899:11): [True: 27, False: 198]
  ------------------
  900|    198|          curlx_str_single(&line, ':') ||
  ------------------
  |  Branch (900:11): [True: 66, False: 132]
  ------------------
  901|  2.31k|          curlx_str_until(&line, &service, MAX_SIGV4_LEN, ':')) {
  ------------------
  |  |  284|    132|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (901:11): [True: 1, False: 131]
  ------------------
  902|       |    /* nothing to do */
  903|  2.31k|  }
  904|       |
  905|  2.69k|  if(!curlx_strlen(&service)) {
  ------------------
  |  |   50|  2.69k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (905:6): [True: 2.56k, False: 131]
  ------------------
  906|  2.56k|    const char *p = hostname;
  907|  2.56k|    if(curlx_str_until(&p, &service, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  284|  2.56k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (907:8): [True: 2, False: 2.56k]
  ------------------
  908|  2.56k|       curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (908:8): [True: 4, False: 2.55k]
  ------------------
  909|      6|      failf(data, "aws-sigv4: service missing in parameters and hostname");
  ------------------
  |  |   62|      6|#define failf Curl_failf
  ------------------
  910|      6|      result = CURLE_URL_MALFORMAT;
  911|      6|      goto fail;
  912|      6|    }
  913|       |
  914|  2.55k|    infof(data, "aws_sigv4: picked service %.*s from host",
  ------------------
  |  |  143|  2.55k|  do {                               \
  |  |  144|  2.55k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.55k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.55k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.55k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.55k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.55k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.55k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.55k]
  |  |  ------------------
  ------------------
  915|  2.55k|          (int)curlx_strlen(&service), curlx_str(&service));
  916|       |
  917|  2.55k|    if(!curlx_strlen(&region)) {
  ------------------
  |  |   50|  2.55k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (917:8): [True: 2.49k, False: 67]
  ------------------
  918|  2.49k|      if(curlx_str_until(&p, &region, MAX_SIGV4_LEN, '.') ||
  ------------------
  |  |  284|  2.49k|#define MAX_SIGV4_LEN    64
  ------------------
  |  Branch (918:10): [True: 1, False: 2.48k]
  ------------------
  919|  2.48k|         curlx_str_single(&p, '.')) {
  ------------------
  |  Branch (919:10): [True: 1, False: 2.48k]
  ------------------
  920|      2|        failf(data, "aws-sigv4: region missing in parameters and hostname");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  921|      2|        result = CURLE_URL_MALFORMAT;
  922|      2|        goto fail;
  923|      2|      }
  924|  2.48k|      infof(data, "aws_sigv4: picked region %.*s from host",
  ------------------
  |  |  143|  2.48k|  do {                               \
  |  |  144|  2.48k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.48k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.48k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.48k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.48k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.48k]
  |  |  ------------------
  ------------------
  925|  2.48k|            (int)curlx_strlen(&region), curlx_str(&region));
  926|  2.48k|    }
  927|  2.55k|  }
  928|       |
  929|  2.68k|  Curl_http_method(data, &method, &httpreq);
  930|       |
  931|  2.68k|  payload_hash =
  932|  2.68k|    parse_content_sha_hdr(data, curlx_str(&provider1),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
  933|  2.68k|                          curlx_strlen(&provider1), &payload_hash_len);
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
  934|       |
  935|  2.68k|  if(!payload_hash) {
  ------------------
  |  Branch (935:6): [True: 2.68k, False: 0]
  ------------------
  936|       |    /* AWS S3 requires a x-amz-content-sha256 header, and supports special
  937|       |     * values like UNSIGNED-PAYLOAD */
  938|  2.68k|    bool sign_as_s3 = curlx_str_casecompare(&provider0, "aws") &&
  ------------------
  |  Branch (938:23): [True: 2.19k, False: 494]
  ------------------
  939|  2.19k|                      curlx_str_casecompare(&service, "s3");
  ------------------
  |  Branch (939:23): [True: 11, False: 2.18k]
  ------------------
  940|       |
  941|  2.68k|    if(sign_as_s3)
  ------------------
  |  Branch (941:8): [True: 11, False: 2.67k]
  ------------------
  942|     11|      result = calc_s3_payload_hash(data, httpreq, curlx_str(&provider1),
  ------------------
  |  |   49|     11|#define curlx_str(x)    ((x)->str)
  ------------------
  943|     11|                                    curlx_strlen(&provider1), sha_hash,
  ------------------
  |  |   50|     11|#define curlx_strlen(x) ((x)->len)
  ------------------
  944|     11|                                    sha_hex, content_sha256_hdr);
  945|  2.67k|    else
  946|  2.67k|      result = calc_payload_hash(data, sha_hash, sha_hex);
  947|  2.68k|    if(result)
  ------------------
  |  Branch (947:8): [True: 0, False: 2.68k]
  ------------------
  948|      0|      goto fail;
  949|       |
  950|  2.68k|    payload_hash = sha_hex;
  951|       |    /* may be shorter than SHA256_HEX_LENGTH, like S3_UNSIGNED_PAYLOAD */
  952|  2.68k|    payload_hash_len = strlen(sha_hex);
  953|  2.68k|  }
  954|       |
  955|  2.68k|#ifdef DEBUGBUILD
  956|  2.68k|  {
  957|  2.68k|    char *force_timestamp = getenv("CURL_FORCETIME");
  958|  2.68k|    if(force_timestamp)
  ------------------
  |  Branch (958:8): [True: 0, False: 2.68k]
  ------------------
  959|      0|      clock = 0;
  960|  2.68k|    else
  961|  2.68k|      clock = time(NULL);
  962|  2.68k|  }
  963|       |#else
  964|       |  clock = time(NULL);
  965|       |#endif
  966|  2.68k|  result = curlx_gmtime(clock, &tm);
  967|  2.68k|  if(result) {
  ------------------
  |  Branch (967:6): [True: 0, False: 2.68k]
  ------------------
  968|      0|    goto fail;
  969|      0|  }
  970|  2.68k|  if(!strftime(timestamp, sizeof(timestamp), "%Y%m%dT%H%M%SZ", &tm)) {
  ------------------
  |  Branch (970:6): [True: 0, False: 2.68k]
  ------------------
  971|      0|    result = CURLE_OUT_OF_MEMORY;
  972|      0|    goto fail;
  973|      0|  }
  974|       |
  975|  2.68k|  result = make_headers(data, hostname, timestamp,
  976|  2.68k|                        curlx_str(&provider1), curlx_strlen(&provider1),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
                                      curlx_str(&provider1), curlx_strlen(&provider1),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
  977|  2.68k|                        &date_header, content_sha256_hdr,
  978|  2.68k|                        &canonical_headers, &signed_headers);
  979|  2.68k|  if(result)
  ------------------
  |  Branch (979:6): [True: 4, False: 2.68k]
  ------------------
  980|      4|    goto fail;
  981|       |
  982|  2.68k|  if(*content_sha256_hdr) {
  ------------------
  |  Branch (982:6): [True: 11, False: 2.67k]
  ------------------
  983|       |    /* make_headers() needed this without the \r\n for canonicalization */
  984|     11|    size_t hdrlen = strlen(content_sha256_hdr);
  985|     11|    DEBUGASSERT(hdrlen + 3 < sizeof(content_sha256_hdr));
  ------------------
  |  | 1081|     11|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (985:5): [True: 0, False: 11]
  |  Branch (985:5): [True: 11, False: 0]
  ------------------
  986|     11|    memcpy(content_sha256_hdr + hdrlen, "\r\n", 3);
  987|     11|  }
  988|       |
  989|  2.68k|  memcpy(date, timestamp, sizeof(date));
  990|  2.68k|  date[sizeof(date) - 1] = 0;
  991|       |
  992|  2.68k|  result = canon_query(data->state.up.query, &canonical_query);
  993|  2.68k|  if(result)
  ------------------
  |  Branch (993:6): [True: 0, False: 2.68k]
  ------------------
  994|      0|    goto fail;
  995|       |
  996|  2.68k|  result = canon_path(data->state.up.path, strlen(data->state.up.path),
  997|  2.68k|                      &canonical_path,
  998|  2.68k|                      should_urlencode(&service));
  999|  2.68k|  if(result)
  ------------------
  |  Branch (999:6): [True: 0, False: 2.68k]
  ------------------
 1000|      0|    goto fail;
 1001|  2.68k|  result = CURLE_OUT_OF_MEMORY;
 1002|       |
 1003|  2.68k|  canonical_request =
 1004|  2.68k|    curl_maprintf("%s\n" /* HTTPRequestMethod */
 1005|  2.68k|                  "%s\n" /* CanonicalURI */
 1006|  2.68k|                  "%s\n" /* CanonicalQueryString */
 1007|  2.68k|                  "%s\n" /* CanonicalHeaders */
 1008|  2.68k|                  "%s\n" /* SignedHeaders */
 1009|  2.68k|                  "%.*s",  /* HashedRequestPayload in hex */
 1010|  2.68k|                  method,
 1011|  2.68k|                  curlx_dyn_ptr(&canonical_path),
 1012|  2.68k|                  curlx_dyn_ptr(&canonical_query) ?
  ------------------
  |  Branch (1012:19): [True: 1.00k, False: 1.67k]
  ------------------
 1013|  1.67k|                  curlx_dyn_ptr(&canonical_query) : "",
 1014|  2.68k|                  curlx_dyn_ptr(&canonical_headers),
 1015|  2.68k|                  curlx_dyn_ptr(&signed_headers),
 1016|  2.68k|                  (int)payload_hash_len, payload_hash);
 1017|  2.68k|  if(!canonical_request)
  ------------------
  |  Branch (1017:6): [True: 0, False: 2.68k]
  ------------------
 1018|      0|    goto fail;
 1019|       |
 1020|  2.68k|  infof(data, "aws_sigv4: Canonical request (enclosed in []) - [%s]",
  ------------------
  |  |  143|  2.68k|  do {                               \
  |  |  144|  2.68k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.68k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.68k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.68k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.68k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1021|  2.68k|        canonical_request);
 1022|       |
 1023|  2.68k|  request_type = curl_maprintf("%.*s4_request",
 1024|  2.68k|                               (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1025|  2.68k|                               curlx_str(&provider0));
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1026|  2.68k|  if(!request_type)
  ------------------
  |  Branch (1026:6): [True: 0, False: 2.68k]
  ------------------
 1027|      0|    goto fail;
 1028|       |
 1029|       |  /* provider0 is lowercased *after* curl_maprintf() so that the buffer
 1030|       |     can be written to */
 1031|  2.68k|  Curl_strntolower(request_type, request_type, curlx_strlen(&provider0));
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1032|       |
 1033|  2.68k|  credential_scope = curl_maprintf("%s/%.*s/%.*s/%s", date,
 1034|  2.68k|                                   (int)curlx_strlen(&region),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1035|  2.68k|                                   curlx_str(&region),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1036|  2.68k|                                   (int)curlx_strlen(&service),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1037|  2.68k|                                   curlx_str(&service),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1038|  2.68k|                                   request_type);
 1039|  2.68k|  if(!credential_scope)
  ------------------
  |  Branch (1039:6): [True: 0, False: 2.68k]
  ------------------
 1040|      0|    goto fail;
 1041|       |
 1042|  2.68k|  if(Curl_sha256it(sha_hash, (unsigned char *)canonical_request,
  ------------------
  |  Branch (1042:6): [True: 0, False: 2.68k]
  ------------------
 1043|  2.68k|                   strlen(canonical_request)))
 1044|      0|    goto fail;
 1045|       |
 1046|  2.68k|  sha256_to_hex(sha_hex, sha_hash);
 1047|       |
 1048|       |  /*
 1049|       |   * Google allows using RSA key instead of HMAC, so this code might change
 1050|       |   * in the future. For now we only support HMAC.
 1051|       |   */
 1052|  2.68k|  str_to_sign = curl_maprintf("%.*s4-HMAC-SHA256\n" /* Algorithm */
 1053|  2.68k|                              "%s\n" /* RequestDateTime */
 1054|  2.68k|                              "%s\n" /* CredentialScope */
 1055|  2.68k|                              "%s",  /* HashedCanonicalRequest in hex */
 1056|  2.68k|                              (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1057|  2.68k|                              curlx_str(&provider0),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1058|  2.68k|                              timestamp,
 1059|  2.68k|                              credential_scope,
 1060|  2.68k|                              sha_hex);
 1061|  2.68k|  if(!str_to_sign)
  ------------------
  |  Branch (1061:6): [True: 0, False: 2.68k]
  ------------------
 1062|      0|    goto fail;
 1063|       |
 1064|       |  /* make provider0 part done uppercase */
 1065|  2.68k|  Curl_strntoupper(str_to_sign, curlx_str(&provider0),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1066|  2.68k|                   curlx_strlen(&provider0));
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1067|       |
 1068|  2.68k|  infof(data, "aws_sigv4: String to sign (enclosed in []) - [%s]",
  ------------------
  |  |  143|  2.68k|  do {                               \
  |  |  144|  2.68k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.68k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.68k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.68k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.68k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1069|  2.68k|        str_to_sign);
 1070|       |
 1071|  2.68k|  secret = curl_maprintf("%.*s4%s", (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1072|  2.68k|                         curlx_str(&provider0), passwd);
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1073|  2.68k|  if(!secret)
  ------------------
  |  Branch (1073:6): [True: 0, False: 2.68k]
  ------------------
 1074|      0|    goto fail;
 1075|       |  /* make provider0 part done uppercase */
 1076|  2.68k|  Curl_strntoupper(secret, curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
                Curl_strntoupper(secret, curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1077|       |
 1078|  2.68k|  HMAC_SHA256(secret, strlen(secret), date, strlen(date), sign0);
  ------------------
  |  |   42|  2.68k|  do {                                               \
  |  |   43|  2.68k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  2.68k|                         (const unsigned char *)(k), \
  |  |   45|  2.68k|                         kl,                         \
  |  |   46|  2.68k|                         (const unsigned char *)(d), \
  |  |   47|  2.68k|                         dl, o);                     \
  |  |   48|  2.68k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 2.68k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1079|  2.68k|  HMAC_SHA256(sign0, sizeof(sign0),
  ------------------
  |  |   42|  2.68k|  do {                                               \
  |  |   43|  2.68k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  2.68k|                         (const unsigned char *)(k), \
  |  |   45|  2.68k|                         kl,                         \
  |  |   46|  2.68k|                         (const unsigned char *)(d), \
  |  |   47|  2.68k|                         dl, o);                     \
  |  |   48|  2.68k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 2.68k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1080|  2.68k|              curlx_str(&region), curlx_strlen(&region), sign1);
 1081|  2.68k|  HMAC_SHA256(sign1, sizeof(sign1),
  ------------------
  |  |   42|  2.68k|  do {                                               \
  |  |   43|  2.68k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  2.68k|                         (const unsigned char *)(k), \
  |  |   45|  2.68k|                         kl,                         \
  |  |   46|  2.68k|                         (const unsigned char *)(d), \
  |  |   47|  2.68k|                         dl, o);                     \
  |  |   48|  2.68k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 2.68k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1082|  2.68k|              curlx_str(&service), curlx_strlen(&service), sign0);
 1083|  2.68k|  HMAC_SHA256(sign0, sizeof(sign0), request_type, strlen(request_type), sign1);
  ------------------
  |  |   42|  2.68k|  do {                                               \
  |  |   43|  2.68k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  2.68k|                         (const unsigned char *)(k), \
  |  |   45|  2.68k|                         kl,                         \
  |  |   46|  2.68k|                         (const unsigned char *)(d), \
  |  |   47|  2.68k|                         dl, o);                     \
  |  |   48|  2.68k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 2.68k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1084|  2.68k|  HMAC_SHA256(sign1, sizeof(sign1), str_to_sign, strlen(str_to_sign), sign0);
  ------------------
  |  |   42|  2.68k|  do {                                               \
  |  |   43|  2.68k|    result = Curl_hmacit(&Curl_HMAC_SHA256,          \
  |  |   44|  2.68k|                         (const unsigned char *)(k), \
  |  |   45|  2.68k|                         kl,                         \
  |  |   46|  2.68k|                         (const unsigned char *)(d), \
  |  |   47|  2.68k|                         dl, o);                     \
  |  |   48|  2.68k|    if(result) {                                     \
  |  |  ------------------
  |  |  |  Branch (48:8): [True: 0, False: 2.68k]
  |  |  ------------------
  |  |   49|      0|      goto fail;                                     \
  |  |   50|      0|    }                                                \
  |  |   51|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (51:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1085|       |
 1086|  2.68k|  sha256_to_hex(sha_hex, sign0);
 1087|       |
 1088|  2.68k|  infof(data, "aws_sigv4: Signature - %s", sha_hex);
  ------------------
  |  |  143|  2.68k|  do {                               \
  |  |  144|  2.68k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.68k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.68k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.68k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.68k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.68k]
  |  |  ------------------
  ------------------
 1089|       |
 1090|  2.68k|  auth_headers = curl_maprintf("Authorization: %.*s4-HMAC-SHA256 "
 1091|  2.68k|                               "Credential=%s/%s, "
 1092|  2.68k|                               "SignedHeaders=%s, "
 1093|  2.68k|                               "Signature=%s\r\n"
 1094|       |                               /*
 1095|       |                                * date_header is added here, only if it was not
 1096|       |                                * user-specified (using CURLOPT_HTTPHEADER).
 1097|       |                                * date_header includes \r\n
 1098|       |                                */
 1099|  2.68k|                               "%s"
 1100|  2.68k|                               "%s", /* optional sha256 header includes \r\n */
 1101|  2.68k|                               (int)curlx_strlen(&provider0),
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1102|  2.68k|                               curlx_str(&provider0),
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
 1103|  2.68k|                               user,
 1104|  2.68k|                               credential_scope,
 1105|  2.68k|                               curlx_dyn_ptr(&signed_headers),
 1106|  2.68k|                               sha_hex,
 1107|  2.68k|                               date_header ? date_header : "",
  ------------------
  |  Branch (1107:32): [True: 2.53k, False: 143]
  ------------------
 1108|  2.68k|                               content_sha256_hdr);
 1109|  2.68k|  if(!auth_headers) {
  ------------------
  |  Branch (1109:6): [True: 0, False: 2.68k]
  ------------------
 1110|      0|    goto fail;
 1111|      0|  }
 1112|       |  /* provider 0 uppercase */
 1113|  2.68k|  Curl_strntoupper(&auth_headers[sizeof("Authorization: ") - 1],
 1114|  2.68k|                   curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   49|  2.68k|#define curlx_str(x)    ((x)->str)
  ------------------
                                 curlx_str(&provider0), curlx_strlen(&provider0));
  ------------------
  |  |   50|  2.68k|#define curlx_strlen(x) ((x)->len)
  ------------------
 1115|       |
 1116|  2.68k|  curlx_free(data->req.hd_auth);
  ------------------
  |  | 1483|  2.68k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1117|  2.68k|  data->req.hd_auth = auth_headers;
 1118|  2.68k|  data->state.authhost.done = TRUE;
  ------------------
  |  | 1055|  2.68k|#define TRUE true
  ------------------
 1119|  2.68k|  result = CURLE_OK;
 1120|       |
 1121|  2.69k|fail:
 1122|  2.69k|  curlx_dyn_free(&canonical_query);
 1123|  2.69k|  curlx_dyn_free(&canonical_path);
 1124|  2.69k|  curlx_dyn_free(&canonical_headers);
 1125|  2.69k|  curlx_dyn_free(&signed_headers);
 1126|  2.69k|  curlx_free(canonical_request);
  ------------------
  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1127|  2.69k|  curlx_free(request_type);
  ------------------
  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1128|  2.69k|  curlx_free(credential_scope);
  ------------------
  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1129|  2.69k|  curlx_free(str_to_sign);
  ------------------
  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1130|  2.69k|  curlx_free(secret);
  ------------------
  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1131|  2.69k|  curlx_free(date_header);
  ------------------
  |  | 1483|  2.69k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1132|  2.69k|  return result;
 1133|  2.68k|}
http_aws_sigv4.c:uri_encode_path:
  206|  2.63k|{
  207|  2.63k|  const char *p = curlx_str(original_path);
  ------------------
  |  |   49|  2.63k|#define curlx_str(x)    ((x)->str)
  ------------------
  208|  2.63k|  size_t i;
  209|       |
  210|   654k|  for(i = 0; i < curlx_strlen(original_path); i++) {
  ------------------
  |  |   50|   654k|#define curlx_strlen(x) ((x)->len)
  ------------------
  |  Branch (210:14): [True: 651k, False: 2.63k]
  ------------------
  211|       |    /* Do not encode slashes or unreserved chars from RFC 3986 */
  212|   651k|    CURLcode result = CURLE_OK;
  213|   651k|    unsigned char c = p[i];
  214|   651k|    if(is_reserved_char(c) || c == '/')
  ------------------
  |  Branch (214:8): [True: 326k, False: 325k]
  |  Branch (214:31): [True: 43.2k, False: 282k]
  ------------------
  215|   369k|      result = curlx_dyn_addn(new_path, &c, 1);
  216|   282k|    else
  217|   282k|      result = curlx_dyn_addf(new_path, "%%%02X", c);
  218|   651k|    if(result)
  ------------------
  |  Branch (218:8): [True: 0, False: 651k]
  ------------------
  219|      0|      return result;
  220|   651k|  }
  221|       |
  222|  2.63k|  return CURLE_OK;
  223|  2.63k|}
http_aws_sigv4.c:is_reserved_char:
  200|   726k|{
  201|   726k|  return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   41|  1.45M|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|  1.45M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 387k, False: 338k]
  |  |  |  |  |  Branch (44:38): [True: 138k, False: 249k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|  1.31M|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 88.5k, False: 499k]
  |  |  |  |  |  Branch (43:38): [True: 73.7k, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|   514k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 147k, False: 366k]
  |  |  |  |  |  Branch (42:38): [True: 125k, False: 21.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                return (ISALNUM(c) || ISURLPUNTCS(c));
  ------------------
  |  |   48|   388k|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  ------------------
  |  |  |  Branch (48:4): [True: 3.79k, False: 384k]
  |  |  |  Branch (48:20): [True: 3.48k, False: 381k]
  |  |  |  Branch (48:36): [True: 5.54k, False: 375k]
  |  |  |  Branch (48:52): [True: 13.9k, False: 361k]
  |  |  ------------------
  ------------------
  202|   726k|}
http_aws_sigv4.c:split_to_dyn_array:
  153|  1.02k|{
  154|  1.02k|  CURLcode result = CURLE_OK;
  155|  1.02k|  size_t len = strlen(source);
  156|  1.02k|  size_t pos;         /* Position in result buffer */
  157|  1.02k|  size_t start = 0;   /* Start of current segment */
  158|  1.02k|  size_t segment_length = 0;
  159|  1.02k|  size_t index = 0;
  160|  1.02k|  size_t num_splits = 0;
  161|       |
  162|       |  /* Split source_ptr on SPLIT_BY and store the segment offsets and length in
  163|       |   * array */
  164|   112k|  for(pos = 0; pos < len; pos++) {
  ------------------
  |  Branch (164:16): [True: 111k, False: 1.02k]
  ------------------
  165|   111k|    if(source[pos] == SPLIT_BY) {
  ------------------
  |  |  148|   111k|#define SPLIT_BY '&'
  ------------------
  |  Branch (165:8): [True: 1.93k, False: 109k]
  ------------------
  166|  1.93k|      if(segment_length) {
  ------------------
  |  Branch (166:10): [True: 1.50k, False: 433]
  ------------------
  167|  1.50k|        curlx_dyn_init(&db[index], segment_length + 1);
  168|  1.50k|        result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  169|  1.50k|        if(result)
  ------------------
  |  Branch (169:12): [True: 0, False: 1.50k]
  ------------------
  170|      0|          goto fail;
  171|       |
  172|  1.50k|        segment_length = 0;
  173|  1.50k|        index++;
  174|  1.50k|        if(++num_splits == MAX_QUERY_COMPONENTS) {
  ------------------
  |  |   58|  1.50k|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (174:12): [True: 0, False: 1.50k]
  ------------------
  175|      0|          result = CURLE_TOO_LARGE;
  176|      0|          goto fail;
  177|      0|        }
  178|  1.50k|      }
  179|  1.93k|      start = pos + 1;
  180|  1.93k|    }
  181|   109k|    else {
  182|   109k|      segment_length++;
  183|   109k|    }
  184|   111k|  }
  185|       |
  186|  1.02k|  if(segment_length) {
  ------------------
  |  Branch (186:6): [True: 957, False: 72]
  ------------------
  187|    957|    curlx_dyn_init(&db[index], segment_length + 1);
  188|    957|    result = curlx_dyn_addn(&db[index], &source[start], segment_length);
  189|    957|    if(!result) {
  ------------------
  |  Branch (189:8): [True: 957, False: 0]
  ------------------
  190|    957|      if(++num_splits == MAX_QUERY_COMPONENTS)
  ------------------
  |  |   58|    957|#define MAX_QUERY_COMPONENTS 128
  ------------------
  |  Branch (190:10): [True: 0, False: 957]
  ------------------
  191|      0|        result = CURLE_TOO_LARGE;
  192|    957|    }
  193|    957|  }
  194|  1.02k|fail:
  195|  1.02k|  *num_splits_out = num_splits;
  196|  1.02k|  return result;
  197|  1.02k|}
http_aws_sigv4.c:normalize_query:
  230|  3.38k|{
  231|  3.38k|  CURLcode result = CURLE_OK;
  232|       |
  233|  78.2k|  while(len && !result) {
  ------------------
  |  Branch (233:9): [True: 74.8k, False: 3.38k]
  |  Branch (233:16): [True: 74.8k, False: 0]
  ------------------
  234|  74.8k|    unsigned char in = (unsigned char)*string;
  235|  74.8k|    if(('%' == in) && (len > 2) &&
  ------------------
  |  Branch (235:8): [True: 19.4k, False: 55.4k]
  |  Branch (235:23): [True: 19.1k, False: 226]
  ------------------
  236|  19.1k|       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  94.0k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  38.3k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 17.9k, False: 1.22k]
  |  |  |  |  |  Branch (44:38): [True: 6.59k, False: 11.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  31.7k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 383, False: 12.2k]
  |  |  |  |  |  Branch (27:43): [True: 185, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  12.4k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 11.1k, False: 1.27k]
  |  |  |  |  |  Branch (28:43): [True: 10.8k, False: 290]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                     ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
  ------------------
  |  |   39|  17.6k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  35.2k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 17.2k, False: 362]
  |  |  |  |  |  Branch (44:38): [True: 7.59k, False: 9.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  27.6k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 247, False: 9.78k]
  |  |  |  |  |  Branch (27:43): [True: 139, False: 108]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  9.88k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 9.29k, False: 593]
  |  |  |  |  |  Branch (28:43): [True: 9.13k, False: 162]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  237|       |      /* this is two hexadecimal digits following a '%' */
  238|  16.8k|      in = (unsigned char)((curlx_hexval(string[1]) << 4) |
  ------------------
  |  |  112|  16.8k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  239|  16.8k|                           curlx_hexval(string[2]));
  ------------------
  |  |  112|  16.8k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  240|  16.8k|      string += 3;
  241|  16.8k|      len -= 3;
  242|  16.8k|      if(in == '+') {
  ------------------
  |  Branch (242:10): [True: 25, False: 16.8k]
  ------------------
  243|       |        /* decodes to plus, so leave this encoded */
  244|     25|        result = curlx_dyn_addn(db, "%2B", 3);
  245|     25|        continue;
  246|     25|      }
  247|  16.8k|    }
  248|  57.9k|    else {
  249|  57.9k|      string++;
  250|  57.9k|      len--;
  251|  57.9k|    }
  252|       |
  253|  74.8k|    if(is_reserved_char(in))
  ------------------
  |  Branch (253:8): [True: 38.3k, False: 36.4k]
  ------------------
  254|       |      /* Escape unreserved chars from RFC 3986 */
  255|  38.3k|      result = curlx_dyn_addn(db, &in, 1);
  256|  36.4k|    else if(in == '+')
  ------------------
  |  Branch (256:13): [True: 2.76k, False: 33.6k]
  ------------------
  257|       |      /* Encode '+' as space */
  258|  2.76k|      result = curlx_dyn_add(db, "%20");
  259|  33.6k|    else
  260|  33.6k|      result = curlx_dyn_addf(db, "%%%02X", in);
  261|  74.8k|  }
  262|       |
  263|  3.38k|  return result;
  264|  3.38k|}
http_aws_sigv4.c:compare_func:
  647|  3.44k|{
  648|  3.44k|  const struct pair *aa = a;
  649|  3.44k|  const struct pair *bb = b;
  650|  3.44k|  const size_t aa_key_len = curlx_dyn_len(&aa->key);
  651|  3.44k|  const size_t bb_key_len = curlx_dyn_len(&bb->key);
  652|  3.44k|  const size_t aa_value_len = curlx_dyn_len(&aa->value);
  653|  3.44k|  const size_t bb_value_len = curlx_dyn_len(&bb->value);
  654|  3.44k|  int compare;
  655|       |
  656|       |  /* If one element is empty, the other is always sorted higher */
  657|       |
  658|       |  /* Compare keys */
  659|  3.44k|  if((aa_key_len == 0) && (bb_key_len == 0))
  ------------------
  |  Branch (659:6): [True: 321, False: 3.12k]
  |  Branch (659:27): [True: 211, False: 110]
  ------------------
  660|    211|    return 0;
  661|  3.23k|  if(aa_key_len == 0)
  ------------------
  |  Branch (661:6): [True: 110, False: 3.12k]
  ------------------
  662|    110|    return -1;
  663|  3.12k|  if(bb_key_len == 0)
  ------------------
  |  Branch (663:6): [True: 296, False: 2.82k]
  ------------------
  664|    296|    return 1;
  665|  2.82k|  compare = strcmp(curlx_dyn_ptr(&aa->key), curlx_dyn_ptr(&bb->key));
  666|  2.82k|  if(compare) {
  ------------------
  |  Branch (666:6): [True: 2.22k, False: 598]
  ------------------
  667|  2.22k|    return compare;
  668|  2.22k|  }
  669|       |
  670|       |  /* Compare values */
  671|    598|  if((aa_value_len == 0) && (bb_value_len == 0))
  ------------------
  |  Branch (671:6): [True: 0, False: 598]
  |  Branch (671:29): [True: 0, False: 0]
  ------------------
  672|      0|    return 0;
  673|    598|  if(aa_value_len == 0)
  ------------------
  |  Branch (673:6): [True: 0, False: 598]
  ------------------
  674|      0|    return -1;
  675|    598|  if(bb_value_len == 0)
  ------------------
  |  Branch (675:6): [True: 0, False: 598]
  ------------------
  676|      0|    return 1;
  677|    598|  compare = strcmp(curlx_dyn_ptr(&aa->value), curlx_dyn_ptr(&bb->value));
  678|       |
  679|    598|  return compare;
  680|    598|}
http_aws_sigv4.c:pair_array_free:
  122|  1.00k|{
  123|  1.00k|  size_t index;
  124|       |
  125|  3.46k|  for(index = 0; index != num_elements; index++) {
  ------------------
  |  Branch (125:18): [True: 2.45k, False: 1.00k]
  ------------------
  126|  2.45k|    curlx_dyn_free(&pair_array[index].key);
  127|  2.45k|    curlx_dyn_free(&pair_array[index].value);
  128|  2.45k|  }
  129|  1.00k|}
http_aws_sigv4.c:dyn_array_free:
  135|  1.02k|{
  136|  1.02k|  size_t index;
  137|       |
  138|  3.48k|  for(index = 0; index < num_elements; index++)
  ------------------
  |  Branch (138:18): [True: 2.45k, False: 1.02k]
  ------------------
  139|  2.45k|    curlx_dyn_free((&db[index]));
  140|  1.02k|}
http_aws_sigv4.c:parse_content_sha_hdr:
  559|  2.68k|{
  560|  2.68k|  char key[CONTENT_SHA256_KEY_LEN];
  561|  2.68k|  size_t key_len;
  562|  2.68k|  const char *value;
  563|  2.68k|  size_t len;
  564|       |
  565|  2.68k|  key_len = curl_msnprintf(key, sizeof(key), "x-%.*s-content-sha256",
  566|  2.68k|                           (int)plen, provider1);
  567|       |
  568|  2.68k|  value = Curl_checkheaders(data, key, key_len);
  569|  2.68k|  if(!value)
  ------------------
  |  Branch (569:6): [True: 2.68k, False: 0]
  ------------------
  570|  2.68k|    return NULL;
  571|       |
  572|      0|  value = strchr(value, ':');
  573|      0|  if(!value)
  ------------------
  |  Branch (573:6): [True: 0, False: 0]
  ------------------
  574|      0|    return NULL;
  575|      0|  ++value;
  576|       |
  577|      0|  curlx_str_passblanks(&value);
  578|       |
  579|      0|  len = strlen(value);
  580|      0|  while(len > 0 && ISBLANK(value[len - 1]))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (580:9): [True: 0, False: 0]
  ------------------
  581|      0|    --len;
  582|       |
  583|      0|  *value_len = len;
  584|      0|  return value;
  585|      0|}
http_aws_sigv4.c:calc_s3_payload_hash:
  615|     11|{
  616|     11|  bool empty_method = (httpreq == HTTPREQ_GET || httpreq == HTTPREQ_HEAD);
  ------------------
  |  Branch (616:24): [True: 5, False: 6]
  |  Branch (616:50): [True: 0, False: 6]
  ------------------
  617|       |  /* The request method or filesize indicate no request payload */
  618|     11|  bool empty_payload = (empty_method || data->set.filesize == 0);
  ------------------
  |  Branch (618:25): [True: 5, False: 6]
  |  Branch (618:41): [True: 0, False: 6]
  ------------------
  619|       |  /* The POST payload is in memory */
  620|     11|  bool post_payload = (httpreq == HTTPREQ_POST && data->set.postfields);
  ------------------
  |  Branch (620:24): [True: 3, False: 8]
  |  Branch (620:51): [True: 3, False: 0]
  ------------------
  621|     11|  CURLcode result = CURLE_OUT_OF_MEMORY;
  622|       |
  623|     11|  if(empty_payload || post_payload) {
  ------------------
  |  Branch (623:6): [True: 5, False: 6]
  |  Branch (623:23): [True: 3, False: 3]
  ------------------
  624|       |    /* Calculate a real hash when we know the request payload */
  625|      8|    result = calc_payload_hash(data, sha_hash, sha_hex);
  626|      8|    if(result)
  ------------------
  |  Branch (626:8): [True: 0, False: 8]
  ------------------
  627|      0|      goto fail;
  628|      8|  }
  629|      3|  else {
  630|       |    /* Fall back to s3's UNSIGNED-PAYLOAD */
  631|      3|    size_t len = sizeof(S3_UNSIGNED_PAYLOAD) - 1;
  ------------------
  |  |  607|      3|#define S3_UNSIGNED_PAYLOAD "UNSIGNED-PAYLOAD"
  ------------------
  632|      3|    DEBUGASSERT(len < SHA256_HEX_LENGTH); /* 16 < 65 */
  ------------------
  |  | 1081|      3|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (632:5): [True: 0, False: 3]
  |  Branch (632:5): [True: 3, False: 0]
  ------------------
  633|      3|    memcpy(sha_hex, S3_UNSIGNED_PAYLOAD, len);
  ------------------
  |  |  607|      3|#define S3_UNSIGNED_PAYLOAD "UNSIGNED-PAYLOAD"
  ------------------
  634|      3|    sha_hex[len] = 0;
  635|      3|  }
  636|       |
  637|       |  /* format the required content-sha256 header */
  638|     11|  curl_msnprintf(header, CONTENT_SHA256_HDR_LEN,
  ------------------
  |  |  552|     11|#define CONTENT_SHA256_HDR_LEN (CONTENT_SHA256_KEY_LEN + 2 + SHA256_HEX_LENGTH)
  |  |  ------------------
  |  |  |  |  550|     11|#define CONTENT_SHA256_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Content-Sha256"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|     11|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define CONTENT_SHA256_HDR_LEN (CONTENT_SHA256_KEY_LEN + 2 + SHA256_HEX_LENGTH)
  |  |  ------------------
  |  |  |  |   56|     11|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  |  |  ------------------
  |  |  |  |  |  |   37|     11|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  639|     11|                 "x-%.*s-content-sha256: %s", (int)plen, provider1, sha_hex);
  640|       |
  641|     11|  result = CURLE_OK;
  642|     11|fail:
  643|     11|  return result;
  644|     11|}
http_aws_sigv4.c:calc_payload_hash:
  589|  2.68k|{
  590|  2.68k|  const char *post_data = data->set.postfields;
  591|  2.68k|  size_t post_data_len = 0;
  592|  2.68k|  CURLcode result;
  593|       |
  594|  2.68k|  if(post_data) {
  ------------------
  |  Branch (594:6): [True: 76, False: 2.60k]
  ------------------
  595|     76|    if(data->set.postfieldsize < 0)
  ------------------
  |  Branch (595:8): [True: 76, False: 0]
  ------------------
  596|     76|      post_data_len = strlen(post_data);
  597|      0|    else
  598|      0|      post_data_len = (size_t)data->set.postfieldsize;
  599|     76|  }
  600|  2.68k|  result = Curl_sha256it(sha_hash, (const unsigned char *)post_data,
  601|  2.68k|                         post_data_len);
  602|  2.68k|  if(!result)
  ------------------
  |  Branch (602:6): [True: 2.68k, False: 0]
  ------------------
  603|  2.68k|    sha256_to_hex(sha_hex, sha_hash);
  604|  2.68k|  return result;
  605|  2.68k|}
http_aws_sigv4.c:make_headers:
  382|  2.68k|{
  383|  2.68k|  char date_hdr_key[DATE_HDR_KEY_LEN];
  384|  2.68k|  char date_full_hdr[DATE_FULL_HDR_LEN];
  385|  2.68k|  struct curl_slist *head = NULL;
  386|  2.68k|  struct curl_slist *tmp_head = NULL;
  387|  2.68k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  388|  2.68k|  struct curl_slist *l;
  389|  2.68k|  bool again = TRUE;
  ------------------
  |  | 1055|  2.68k|#define TRUE true
  ------------------
  390|       |
  391|  2.68k|  curl_msnprintf(date_hdr_key, DATE_HDR_KEY_LEN, "X-%.*s-Date",
  ------------------
  |  |  285|  2.68k|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  ------------------
  |  |  |  |  284|  2.68k|#define MAX_SIGV4_LEN    64
  |  |  ------------------
  ------------------
  392|  2.68k|                 (int)plen, provider1);
  393|       |  /* provider1 ucfirst */
  394|  2.68k|  Curl_strntolower(&date_hdr_key[2], provider1, plen);
  395|  2.68k|  date_hdr_key[2] = Curl_raw_toupper(provider1[0]);
  396|       |
  397|  2.68k|  curl_msnprintf(date_full_hdr, DATE_FULL_HDR_LEN,
  ------------------
  |  |  288|  2.68k|#define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |  285|  2.68k|#define DATE_HDR_KEY_LEN (MAX_SIGV4_LEN + sizeof("X--Date"))
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|  2.68k|#define MAX_SIGV4_LEN    64
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DATE_FULL_HDR_LEN (DATE_HDR_KEY_LEN + TIMESTAMP_SIZE + 1)
  |  |  ------------------
  |  |  |  |   53|  2.68k|#define TIMESTAMP_SIZE 17
  |  |  ------------------
  ------------------
  398|  2.68k|                 "x-%.*s-date:%s", (int)plen, provider1, timestamp);
  399|       |  /* provider1 lowercase */
  400|  2.68k|  Curl_strntolower(&date_full_hdr[2], provider1, plen);
  401|       |
  402|  2.68k|  if(!Curl_checkheaders(data, STRCONST("Host"))) {
  ------------------
  |  | 1292|  2.68k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (402:6): [True: 2.63k, False: 53]
  ------------------
  403|  2.63k|    char *fullhost;
  404|       |
  405|  2.63k|    if(data->state.aptr.host) {
  ------------------
  |  Branch (405:8): [True: 0, False: 2.63k]
  ------------------
  406|       |      /* remove /r/n as the separator for canonical request must be '\n' */
  407|      0|      size_t pos = strcspn(data->state.aptr.host, "\n\r");
  408|      0|      fullhost = curlx_memdup0(data->state.aptr.host, pos);
  409|      0|    }
  410|  2.63k|    else
  411|  2.63k|      fullhost = curl_maprintf("host:%s", hostname);
  412|       |
  413|  2.63k|    if(fullhost)
  ------------------
  |  Branch (413:8): [True: 2.63k, False: 0]
  ------------------
  414|  2.63k|      head = Curl_slist_append_nodup(NULL, fullhost);
  415|  2.63k|    if(!head) {
  ------------------
  |  Branch (415:8): [True: 0, False: 2.63k]
  ------------------
  416|      0|      curlx_free(fullhost);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  417|      0|      goto fail;
  418|      0|    }
  419|  2.63k|  }
  420|       |
  421|  2.68k|  if(*content_sha256_header) {
  ------------------
  |  Branch (421:6): [True: 11, False: 2.67k]
  ------------------
  422|     11|    tmp_head = curl_slist_append(head, content_sha256_header);
  423|     11|    if(!tmp_head)
  ------------------
  |  Branch (423:8): [True: 0, False: 11]
  ------------------
  424|      0|      goto fail;
  425|     11|    head = tmp_head;
  426|     11|  }
  427|       |
  428|       |  /* copy user headers to our header list. the logic is based on how http.c
  429|       |     handles user headers.
  430|       |
  431|       |     user headers in format 'name:' with no value are used to signal that an
  432|       |     internal header of that name should be removed. those user headers are not
  433|       |     added to this list.
  434|       |
  435|       |     user headers in format 'name;' with no value are used to signal that a
  436|       |     header of that name with no value should be sent. those user headers are
  437|       |     added to this list but in the format that they will be sent, ie the
  438|       |     semi-colon is changed to a colon for format 'name:'.
  439|       |
  440|       |     user headers with a value of whitespace only, or without a colon or
  441|       |     semi-colon, are not added to this list.
  442|       |     */
  443|  10.5k|  for(l = data->set.headers; l; l = l->next) {
  ------------------
  |  Branch (443:30): [True: 7.87k, False: 2.68k]
  ------------------
  444|  7.87k|    char *dupdata;
  445|  7.87k|    const char *ptr;
  446|  7.87k|    const char *sep = strchr(l->data, ':');
  447|  7.87k|    if(!sep)
  ------------------
  |  Branch (447:8): [True: 5.07k, False: 2.79k]
  ------------------
  448|  5.07k|      sep = strchr(l->data, ';');
  449|  7.87k|    if(!sep || (*sep == ':' && !*(sep + 1)))
  ------------------
  |  Branch (449:8): [True: 880, False: 6.99k]
  |  Branch (449:17): [True: 2.79k, False: 4.19k]
  |  Branch (449:32): [True: 472, False: 2.32k]
  ------------------
  450|  1.35k|      continue;
  451|  6.72k|    for(ptr = sep + 1; ISBLANK(*ptr); ++ptr)
  ------------------
  |  |   45|  6.72k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 131, False: 6.59k]
  |  |  |  Branch (45:38): [True: 80, False: 6.51k]
  |  |  ------------------
  ------------------
  452|    211|      ;
  453|  6.51k|    if(!*ptr && ptr != sep + 1) /* a value of whitespace only */
  ------------------
  |  Branch (453:8): [True: 3.76k, False: 2.75k]
  |  Branch (453:17): [True: 104, False: 3.66k]
  ------------------
  454|    104|      continue;
  455|  6.41k|    dupdata = curlx_strdup(l->data);
  ------------------
  |  | 1477|  6.41k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  456|  6.41k|    if(!dupdata)
  ------------------
  |  Branch (456:8): [True: 0, False: 6.41k]
  ------------------
  457|      0|      goto fail;
  458|  6.41k|    dupdata[sep - l->data] = ':';
  459|  6.41k|    tmp_head = Curl_slist_append_nodup(head, dupdata);
  460|  6.41k|    if(!tmp_head) {
  ------------------
  |  Branch (460:8): [True: 0, False: 6.41k]
  ------------------
  461|      0|      curlx_free(dupdata);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  462|      0|      goto fail;
  463|      0|    }
  464|  6.41k|    head = tmp_head;
  465|  6.41k|  }
  466|       |
  467|  2.68k|  trim_headers(head);
  468|       |
  469|  2.68k|  *date_header = find_date_hdr(data, date_hdr_key);
  470|  2.68k|  if(!*date_header) {
  ------------------
  |  Branch (470:6): [True: 2.53k, False: 147]
  ------------------
  471|  2.53k|    tmp_head = curl_slist_append(head, date_full_hdr);
  472|  2.53k|    if(!tmp_head)
  ------------------
  |  Branch (472:8): [True: 0, False: 2.53k]
  ------------------
  473|      0|      goto fail;
  474|  2.53k|    head = tmp_head;
  475|  2.53k|    *date_header = curl_maprintf("%s: %s\r\n", date_hdr_key, timestamp);
  476|  2.53k|    if(!*date_header)
  ------------------
  |  Branch (476:8): [True: 0, False: 2.53k]
  ------------------
  477|      0|      goto fail;
  478|  2.53k|  }
  479|    147|  else {
  480|    147|    const char *value;
  481|    147|    const char *endp;
  482|    147|    value = strchr(*date_header, ':');
  483|    147|    if(!value) {
  ------------------
  |  Branch (483:8): [True: 4, False: 143]
  ------------------
  484|      4|      *date_header = NULL;
  485|      4|      goto fail;
  486|      4|    }
  487|    143|    ++value;
  488|    143|    curlx_str_passblanks(&value);
  489|    143|    endp = value;
  490|    468|    while(*endp && ISALNUM(*endp))
  ------------------
  |  |   41|    399|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|    798|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 361, False: 38]
  |  |  |  |  |  Branch (44:38): [True: 139, False: 222]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|    659|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 66, False: 194]
  |  |  |  |  |  Branch (43:38): [True: 40, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|    220|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 172, False: 48]
  |  |  |  |  |  Branch (42:38): [True: 146, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (490:11): [True: 399, False: 69]
  ------------------
  491|    325|      ++endp;
  492|       |    /* 16 bytes => "19700101T000000Z" */
  493|    143|    if((endp - value) == TIMESTAMP_SIZE - 1) {
  ------------------
  |  |   53|    143|#define TIMESTAMP_SIZE 17
  ------------------
  |  Branch (493:8): [True: 0, False: 143]
  ------------------
  494|      0|      memcpy(timestamp, value, TIMESTAMP_SIZE - 1);
  ------------------
  |  |   53|      0|#define TIMESTAMP_SIZE 17
  ------------------
  495|      0|      timestamp[TIMESTAMP_SIZE - 1] = 0;
  ------------------
  |  |   53|      0|#define TIMESTAMP_SIZE 17
  ------------------
  496|      0|    }
  497|    143|    else
  498|       |      /* bad timestamp length */
  499|    143|      timestamp[0] = 0;
  500|    143|    *date_header = NULL;
  501|    143|  }
  502|       |
  503|       |  /* alpha-sort by header name in a case sensitive manner */
  504|  6.76k|  do {
  505|  6.76k|    again = FALSE;
  ------------------
  |  | 1058|  6.76k|#define FALSE false
  ------------------
  506|   447k|    for(l = head; l; l = l->next) {
  ------------------
  |  Branch (506:19): [True: 441k, False: 6.76k]
  ------------------
  507|   441k|      struct curl_slist *next = l->next;
  508|       |
  509|   441k|      if(next && compare_header_names(l->data, next->data) > 0) {
  ------------------
  |  Branch (509:10): [True: 434k, False: 6.73k]
  |  Branch (509:18): [True: 72.1k, False: 362k]
  ------------------
  510|  72.1k|        char *tmp = l->data;
  511|       |
  512|  72.1k|        l->data = next->data;
  513|  72.1k|        next->data = tmp;
  514|  72.1k|        again = TRUE;
  ------------------
  |  | 1055|  72.1k|#define TRUE true
  ------------------
  515|  72.1k|      }
  516|   441k|    }
  517|  6.76k|  } while(again);
  ------------------
  |  Branch (517:11): [True: 4.08k, False: 2.68k]
  ------------------
  518|       |
  519|  2.68k|  result = merge_duplicate_headers(head);
  520|  2.68k|  if(result)
  ------------------
  |  Branch (520:6): [True: 0, False: 2.68k]
  ------------------
  521|      0|    goto fail;
  522|       |
  523|  10.3k|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (523:17): [True: 7.65k, False: 2.67k]
  ------------------
  524|  7.65k|    char *tmp;
  525|       |
  526|  7.65k|    if(curlx_dyn_add(canonical_headers, l->data))
  ------------------
  |  Branch (526:8): [True: 12, False: 7.63k]
  ------------------
  527|     12|      goto fail;
  528|  7.63k|    if(curlx_dyn_add(canonical_headers, "\n"))
  ------------------
  |  Branch (528:8): [True: 0, False: 7.63k]
  ------------------
  529|      0|      goto fail;
  530|       |
  531|  7.63k|    tmp = strchr(l->data, ':');
  532|  7.63k|    if(tmp)
  ------------------
  |  Branch (532:8): [True: 7.63k, False: 0]
  ------------------
  533|  7.63k|      *tmp = 0;
  534|       |
  535|  7.63k|    if(l != head) {
  ------------------
  |  Branch (535:8): [True: 4.98k, False: 2.65k]
  ------------------
  536|  4.98k|      if(curlx_dyn_add(signed_headers, ";"))
  ------------------
  |  Branch (536:10): [True: 0, False: 4.98k]
  ------------------
  537|      0|        goto fail;
  538|  4.98k|    }
  539|  7.63k|    if(curlx_dyn_add(signed_headers, l->data))
  ------------------
  |  Branch (539:8): [True: 0, False: 7.63k]
  ------------------
  540|      0|      goto fail;
  541|  7.63k|  }
  542|       |
  543|  2.67k|  result = CURLE_OK;
  544|  2.68k|fail:
  545|  2.68k|  curl_slist_free_all(head);
  546|       |
  547|  2.68k|  return result;
  548|  2.67k|}
http_aws_sigv4.c:trim_headers:
   82|  2.68k|{
   83|  2.68k|  struct curl_slist *l;
   84|  11.7k|  for(l = head; l; l = l->next) {
  ------------------
  |  Branch (84:17): [True: 9.05k, False: 2.68k]
  ------------------
   85|  9.05k|    const char *value; /* to read from */
   86|  9.05k|    char *store;
   87|  9.05k|    size_t colon = strcspn(l->data, ":");
   88|  9.05k|    Curl_strntolower(l->data, l->data, colon);
   89|       |
   90|  9.05k|    value = &l->data[colon];
   91|  9.05k|    if(!*value)
  ------------------
  |  Branch (91:8): [True: 0, False: 9.05k]
  ------------------
   92|      0|      continue;
   93|  9.05k|    ++value;
   94|  9.05k|    store = (char *)CURL_UNCONST(value);
  ------------------
  |  |  866|  9.05k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   95|       |
   96|       |    /* skip leading whitespace */
   97|  9.05k|    curlx_str_passblanks(&value);
   98|       |
   99|  2.06M|    while(*value) {
  ------------------
  |  Branch (99:11): [True: 2.05M, False: 9.05k]
  ------------------
  100|  2.05M|      int space = 0;
  101|  2.05M|      while(ISBLANK(*value)) {
  ------------------
  |  |   45|  2.05M|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 934, False: 2.05M]
  |  |  |  Branch (45:38): [True: 1.26k, False: 2.05M]
  |  |  ------------------
  ------------------
  102|  2.19k|        value++;
  103|  2.19k|        space++;
  104|  2.19k|      }
  105|  2.05M|      if(space) {
  ------------------
  |  Branch (105:10): [True: 1.59k, False: 2.04M]
  ------------------
  106|       |        /* replace any number of consecutive whitespace with a single space,
  107|       |           unless at the end of the string, then nothing */
  108|  1.59k|        if(*value)
  ------------------
  |  Branch (108:12): [True: 1.37k, False: 222]
  ------------------
  109|  1.37k|          *store++ = ' ';
  110|  1.59k|      }
  111|  2.04M|      else
  112|  2.04M|        *store++ = *value++;
  113|  2.05M|    }
  114|  9.05k|    *store = 0; /* null-terminate */
  115|  9.05k|  }
  116|  2.68k|}
http_aws_sigv4.c:find_date_hdr:
   72|  2.68k|{
   73|  2.68k|  char *tmp = Curl_checkheaders(data, sig_hdr, strlen(sig_hdr));
   74|       |
   75|  2.68k|  if(tmp)
  ------------------
  |  Branch (75:6): [True: 136, False: 2.55k]
  ------------------
   76|    136|    return tmp;
   77|  2.55k|  return Curl_checkheaders(data, STRCONST("Date"));
  ------------------
  |  | 1292|  2.55k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   78|  2.68k|}
http_aws_sigv4.c:compare_header_names:
  293|   443k|{
  294|   443k|  const char *colon_a;
  295|   443k|  const char *colon_b;
  296|   443k|  size_t len_a;
  297|   443k|  size_t len_b;
  298|   443k|  size_t min_len;
  299|   443k|  int cmp;
  300|       |
  301|   443k|  colon_a = strchr(a, ':');
  302|   443k|  colon_b = strchr(b, ':');
  303|       |
  304|   443k|  DEBUGASSERT(colon_a);
  ------------------
  |  | 1081|   443k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (304:3): [True: 0, False: 443k]
  |  Branch (304:3): [True: 443k, False: 0]
  ------------------
  305|   443k|  DEBUGASSERT(colon_b);
  ------------------
  |  | 1081|   443k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (305:3): [True: 0, False: 443k]
  |  Branch (305:3): [True: 443k, False: 0]
  ------------------
  306|       |
  307|   443k|  len_a = colon_a ? (size_t)(colon_a - a) : strlen(a);
  ------------------
  |  Branch (307:11): [True: 443k, False: 0]
  ------------------
  308|   443k|  len_b = colon_b ? (size_t)(colon_b - b) : strlen(b);
  ------------------
  |  Branch (308:11): [True: 443k, False: 0]
  ------------------
  309|       |
  310|   443k|  min_len = (len_a < len_b) ? len_a : len_b;
  ------------------
  |  Branch (310:13): [True: 16.1k, False: 427k]
  ------------------
  311|       |
  312|   443k|  cmp = strncmp(a, b, min_len);
  313|       |
  314|       |  /* return the shorter of the two if one is shorter */
  315|   443k|  if(!cmp)
  ------------------
  |  Branch (315:6): [True: 349k, False: 94.1k]
  ------------------
  316|   349k|    return (int)(len_a - len_b);
  317|       |
  318|  94.1k|  return cmp;
  319|   443k|}
http_aws_sigv4.c:merge_duplicate_headers:
  325|  2.68k|{
  326|  2.68k|  struct curl_slist *curr = head;
  327|  2.68k|  CURLcode result = CURLE_OK;
  328|       |
  329|  11.6k|  while(curr) {
  ------------------
  |  Branch (329:9): [True: 11.5k, False: 31]
  ------------------
  330|  11.5k|    struct curl_slist *next = curr->next;
  331|  11.5k|    if(!next)
  ------------------
  |  Branch (331:8): [True: 2.65k, False: 8.94k]
  ------------------
  332|  2.65k|      break;
  333|       |
  334|  8.94k|    if(compare_header_names(curr->data, next->data) == 0) {
  ------------------
  |  Branch (334:8): [True: 3.93k, False: 5.01k]
  ------------------
  335|  3.93k|      struct dynbuf buf;
  336|  3.93k|      const char *colon_next;
  337|  3.93k|      const char *val_next;
  338|       |
  339|  3.93k|      curlx_dyn_init(&buf, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  3.93k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  340|       |
  341|  3.93k|      result = curlx_dyn_add(&buf, curr->data);
  342|  3.93k|      if(result)
  ------------------
  |  Branch (342:10): [True: 0, False: 3.93k]
  ------------------
  343|      0|        return result;
  344|       |
  345|  3.93k|      colon_next = strchr(next->data, ':');
  346|  3.93k|      DEBUGASSERT(colon_next);
  ------------------
  |  | 1081|  3.93k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (346:7): [True: 0, False: 3.93k]
  |  Branch (346:7): [True: 3.93k, False: 0]
  ------------------
  347|  3.93k|      val_next = colon_next + 1;
  348|       |
  349|  3.93k|      result = curlx_dyn_addn(&buf, ",", 1);
  350|  3.93k|      if(result)
  ------------------
  |  Branch (350:10): [True: 0, False: 3.93k]
  ------------------
  351|      0|        return result;
  352|       |
  353|  3.93k|      result = curlx_dyn_add(&buf, val_next);
  354|  3.93k|      if(result)
  ------------------
  |  Branch (354:10): [True: 0, False: 3.93k]
  ------------------
  355|      0|        return result;
  356|       |
  357|  3.93k|      curlx_free(curr->data);
  ------------------
  |  | 1483|  3.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  358|  3.93k|      curr->data = curlx_dyn_ptr(&buf);
  359|       |
  360|  3.93k|      curr->next = next->next;
  361|  3.93k|      curlx_free(next->data);
  ------------------
  |  | 1483|  3.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  362|  3.93k|      curlx_free(next);
  ------------------
  |  | 1483|  3.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  363|  3.93k|    }
  364|  5.01k|    else {
  365|  5.01k|      curr = curr->next;
  366|  5.01k|    }
  367|  8.94k|  }
  368|       |
  369|  2.68k|  return CURLE_OK;
  370|  2.68k|}
http_aws_sigv4.c:should_urlencode:
  267|  2.68k|{
  268|       |  /*
  269|       |   * These services require unmodified (not additionally URL-encoded) URL
  270|       |   * paths.
  271|       |   * should_urlencode == true is equivalent to should_urlencode_uri_path
  272|       |   * from the AWS SDK. Urls are already normalized by the curl URL parser
  273|       |   */
  274|       |
  275|  2.68k|  if(curlx_str_cmp(service_name, "s3") ||
  ------------------
  |  Branch (275:6): [True: 24, False: 2.65k]
  ------------------
  276|  2.65k|     curlx_str_cmp(service_name, "s3-express") ||
  ------------------
  |  Branch (276:6): [True: 7, False: 2.65k]
  ------------------
  277|  2.65k|     curlx_str_cmp(service_name, "s3-outposts")) {
  ------------------
  |  Branch (277:6): [True: 18, False: 2.63k]
  ------------------
  278|     49|    return false;
  279|     49|  }
  280|  2.63k|  return true;
  281|  2.68k|}
http_aws_sigv4.c:sha256_to_hex:
   66|  8.04k|{
   67|  8.04k|  Curl_hexencode(sha, CURL_SHA256_DIGEST_LENGTH,
  ------------------
  |  |   37|  8.04k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  ------------------
   68|  8.04k|                 (unsigned char *)dst, SHA256_HEX_LENGTH);
  ------------------
  |  |   56|  8.04k|#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
  |  |  ------------------
  |  |  |  |   37|  8.04k|#define CURL_SHA256_DIGEST_LENGTH 32 /* fixed size */
  |  |  ------------------
  ------------------
   69|  8.04k|}

Curl_httpchunk_init:
   74|  1.10k|{
   75|  1.10k|  (void)data;
   76|  1.10k|  ch->hexindex = 0;      /* start at 0 */
   77|  1.10k|  ch->state = CHUNK_HEX; /* we get hex first! */
   78|  1.10k|  ch->last_code = CHUNKE_OK;
   79|  1.10k|  curlx_dyn_init(&ch->trailer, DYN_H1_TRAILER);
  ------------------
  |  |   75|  1.10k|#define DYN_H1_TRAILER      4096
  ------------------
   80|  1.10k|  ch->ignore_body = ignore_body;
   81|  1.10k|}
Curl_httpchunk_reset:
   85|  1.01k|{
   86|  1.01k|  (void)data;
   87|  1.01k|  ch->hexindex = 0;      /* start at 0 */
   88|  1.01k|  ch->state = CHUNK_HEX; /* we get hex first! */
   89|  1.01k|  ch->last_code = CHUNKE_OK;
   90|  1.01k|  curlx_dyn_reset(&ch->trailer);
   91|  1.01k|  ch->ignore_body = ignore_body;
   92|  1.01k|}
Curl_httpchunk_free:
   95|  1.10k|{
   96|  1.10k|  (void)data;
   97|  1.10k|  curlx_dyn_free(&ch->trailer);
   98|  1.10k|}
Curl_httpchunk_is_done:
  101|  64.7k|{
  102|  64.7k|  (void)data;
  103|  64.7k|  return ch->state == CHUNK_DONE;
  104|  64.7k|}
Curl_httpchunk_read:
  384|  64.7k|{
  385|       |  return httpchunk_readwrite(data, ch, NULL, buf, blen, pconsumed);
  386|  64.7k|}
http_chunks.c:httpchunk_readwrite:
  111|  64.7k|{
  112|  64.7k|  CURLcode result = CURLE_OK;
  113|  64.7k|  size_t piece;
  114|       |
  115|  64.7k|  *pconsumed = 0; /* nothing's written yet */
  116|       |  /* first check terminal states that will not progress anywhere */
  117|  64.7k|  if(ch->state == CHUNK_DONE)
  ------------------
  |  Branch (117:6): [True: 3, False: 64.7k]
  ------------------
  118|      3|    return CURLE_OK;
  119|  64.7k|  if(ch->state == CHUNK_FAILED)
  ------------------
  |  Branch (119:6): [True: 0, False: 64.7k]
  ------------------
  120|      0|    return CURLE_RECV_ERROR;
  121|       |
  122|       |  /* the original data is written to the client, but we go on with the
  123|       |     chunk read process, to properly calculate the content length */
  124|  64.7k|  if(data->set.http_te_skip && !ch->ignore_body) {
  ------------------
  |  Branch (124:6): [True: 1, False: 64.7k]
  |  Branch (124:32): [True: 1, False: 0]
  ------------------
  125|      1|    if(cw_next)
  ------------------
  |  Branch (125:8): [True: 1, False: 0]
  ------------------
  126|      1|      result = Curl_cwriter_write(data, cw_next, CLIENTWRITE_BODY, buf, blen);
  ------------------
  |  |   42|      1|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  127|      0|    else
  128|      0|      result = Curl_client_write(data, CLIENTWRITE_BODY, buf, blen);
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  129|      1|    if(result) {
  ------------------
  |  Branch (129:8): [True: 0, False: 1]
  ------------------
  130|      0|      ch->state = CHUNK_FAILED;
  131|      0|      ch->last_code = CHUNKE_PASSTHRU_ERROR;
  132|      0|      return result;
  133|      0|    }
  134|      1|  }
  135|       |
  136|   134k|  while(blen) {
  ------------------
  |  Branch (136:9): [True: 69.7k, False: 64.7k]
  ------------------
  137|  69.7k|    switch(ch->state) {
  ------------------
  |  Branch (137:12): [True: 69.7k, False: 0]
  ------------------
  138|  1.06k|    case CHUNK_HEX:
  ------------------
  |  Branch (138:5): [True: 1.06k, False: 68.6k]
  ------------------
  139|  1.06k|      if(ISXDIGIT(*buf)) {
  ------------------
  |  |   39|  1.06k|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  2.13k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 971, False: 95]
  |  |  |  |  |  Branch (44:38): [True: 343, False: 628]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  1.78k|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 297, False: 426]
  |  |  |  |  |  Branch (27:43): [True: 267, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|    456|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 345, False: 111]
  |  |  |  |  |  Branch (28:43): [True: 292, False: 53]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  140|    902|        if(ch->hexindex >= CHUNK_MAXNUM_LEN) {
  ------------------
  |  |   39|    902|#define CHUNK_MAXNUM_LEN (SIZEOF_CURL_OFF_T * 2)
  |  |  ------------------
  |  |  |  |  632|    902|#define SIZEOF_CURL_OFF_T 8
  |  |  ------------------
  ------------------
  |  Branch (140:12): [True: 2, False: 900]
  ------------------
  141|      2|          failf(data, "chunk hex-length longer than %d", CHUNK_MAXNUM_LEN);
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
                        failf(data, "chunk hex-length longer than %d", CHUNK_MAXNUM_LEN);
  ------------------
  |  |   39|      2|#define CHUNK_MAXNUM_LEN (SIZEOF_CURL_OFF_T * 2)
  |  |  ------------------
  |  |  |  |  632|      2|#define SIZEOF_CURL_OFF_T 8
  |  |  ------------------
  ------------------
  142|      2|          ch->state = CHUNK_FAILED;
  143|      2|          ch->last_code = CHUNKE_TOO_LONG_HEX; /* longer than we support */
  144|      2|          return CURLE_RECV_ERROR;
  145|      2|        }
  146|    900|        ch->hexbuffer[ch->hexindex++] = *buf;
  147|    900|        buf++;
  148|    900|        blen--;
  149|    900|        (*pconsumed)++;
  150|    900|      }
  151|    164|      else {
  152|    164|        const char *p;
  153|    164|        if(ch->hexindex == 0) {
  ------------------
  |  Branch (153:12): [True: 12, False: 152]
  ------------------
  154|       |          /* This is illegal data, we received junk where we expected
  155|       |             a hexadecimal digit. */
  156|     12|          failf(data, "chunk hex-length char not a hex digit: 0x%x", *buf);
  ------------------
  |  |   62|     12|#define failf Curl_failf
  ------------------
  157|     12|          ch->state = CHUNK_FAILED;
  158|     12|          ch->last_code = CHUNKE_ILLEGAL_HEX;
  159|     12|          return CURLE_RECV_ERROR;
  160|     12|        }
  161|       |        /* blen and buf are unmodified */
  162|    152|        ch->hexbuffer[ch->hexindex] = 0;
  163|    152|        p = &ch->hexbuffer[0];
  164|    152|        if(curlx_str_hex(&p, &ch->datasize, CURL_OFF_T_MAX)) {
  ------------------
  |  |  594|    152|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (164:12): [True: 2, False: 150]
  ------------------
  165|      2|          failf(data, "invalid chunk size: '%s'", ch->hexbuffer);
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  166|      2|          ch->state = CHUNK_FAILED;
  167|      2|          ch->last_code = CHUNKE_ILLEGAL_HEX;
  168|      2|          return CURLE_RECV_ERROR;
  169|      2|        }
  170|    150|        ch->state = CHUNK_LF; /* now wait for the CRLF */
  171|    150|      }
  172|  1.05k|      break;
  173|       |
  174|  1.34k|    case CHUNK_LF:
  ------------------
  |  Branch (174:5): [True: 1.34k, False: 68.3k]
  ------------------
  175|       |      /* waiting for the LF after a chunk size */
  176|  1.34k|      if(*buf == 0x0a) {
  ------------------
  |  Branch (176:10): [True: 140, False: 1.20k]
  ------------------
  177|       |        /* we are now expecting data to come, unless size was zero! */
  178|    140|        if(ch->datasize == 0) {
  ------------------
  |  Branch (178:12): [True: 32, False: 108]
  ------------------
  179|     32|          ch->state = CHUNK_TRAILER; /* now check for trailers */
  180|     32|        }
  181|    108|        else {
  182|    108|          ch->state = CHUNK_DATA;
  183|    108|          CURL_TRC_WRITE(data, "http_chunked, chunk start of %"
  ------------------
  |  |  158|    108|  do {                                                     \
  |  |  159|    108|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|    108|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    216|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 108, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    216|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    108|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|    108|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|    108|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 108]
  |  |  ------------------
  ------------------
  184|    108|                         FMT_OFF_T " bytes", ch->datasize);
  185|    108|        }
  186|    140|      }
  187|       |
  188|  1.34k|      buf++;
  189|  1.34k|      blen--;
  190|  1.34k|      (*pconsumed)++;
  191|  1.34k|      break;
  192|       |
  193|  1.14k|    case CHUNK_DATA:
  ------------------
  |  Branch (193:5): [True: 1.14k, False: 68.5k]
  ------------------
  194|       |      /* We expect 'datasize' of data. We have 'blen' right now, it can be
  195|       |         more or less than 'datasize'. Get the smallest piece.
  196|       |      */
  197|  1.14k|      piece = blen;
  198|  1.14k|      if(ch->datasize < (curl_off_t)blen)
  ------------------
  |  Branch (198:10): [True: 0, False: 1.14k]
  ------------------
  199|      0|        piece = curlx_sotouz(ch->datasize);
  200|       |
  201|       |      /* Write the data portion available */
  202|  1.14k|      if(!data->set.http_te_skip && !ch->ignore_body) {
  ------------------
  |  Branch (202:10): [True: 1.14k, False: 0]
  |  Branch (202:37): [True: 0, False: 1.14k]
  ------------------
  203|      0|        if(cw_next)
  ------------------
  |  Branch (203:12): [True: 0, False: 0]
  ------------------
  204|      0|          result = Curl_cwriter_write(data, cw_next, CLIENTWRITE_BODY,
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  205|      0|                                      buf, piece);
  206|      0|        else
  207|      0|          result = Curl_client_write(data, CLIENTWRITE_BODY, buf, piece);
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  208|      0|        if(result) {
  ------------------
  |  Branch (208:12): [True: 0, False: 0]
  ------------------
  209|      0|          ch->state = CHUNK_FAILED;
  210|      0|          ch->last_code = CHUNKE_PASSTHRU_ERROR;
  211|      0|          return result;
  212|      0|        }
  213|      0|      }
  214|       |
  215|  1.14k|      *pconsumed += piece;
  216|  1.14k|      ch->datasize -= piece; /* decrease amount left to expect */
  217|  1.14k|      buf += piece;    /* move read pointer forward */
  218|  1.14k|      blen -= piece;   /* decrease space left in this round */
  219|  1.14k|      CURL_TRC_WRITE(data, "http_chunked, write %zu body bytes, %"
  ------------------
  |  |  158|  1.14k|  do {                                                     \
  |  |  159|  1.14k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.14k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.28k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.14k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.14k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.28k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.14k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.14k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.14k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.14k]
  |  |  ------------------
  ------------------
  220|  1.14k|                     FMT_OFF_T " bytes in chunk remain",
  221|  1.14k|                     piece, ch->datasize);
  222|       |
  223|  1.14k|      if(ch->datasize == 0)
  ------------------
  |  Branch (223:10): [True: 26, False: 1.11k]
  ------------------
  224|       |        /* end of data this round, we now expect a trailing CRLF */
  225|     26|        ch->state = CHUNK_POSTLF;
  226|  1.14k|      break;
  227|       |
  228|     35|    case CHUNK_POSTLF:
  ------------------
  |  Branch (228:5): [True: 35, False: 69.6k]
  ------------------
  229|     35|      if(*buf == 0x0a) {
  ------------------
  |  Branch (229:10): [True: 19, False: 16]
  ------------------
  230|       |        /* The last one before we go back to hex state and start all over. */
  231|     19|        Curl_httpchunk_reset(data, ch, (bool)ch->ignore_body);
  232|     19|      }
  233|     16|      else if(*buf != 0x0d) {
  ------------------
  |  Branch (233:15): [True: 6, False: 10]
  ------------------
  234|      6|        ch->state = CHUNK_FAILED;
  235|      6|        ch->last_code = CHUNKE_BAD_CHUNK;
  236|      6|        return CURLE_RECV_ERROR;
  237|      6|      }
  238|     29|      buf++;
  239|     29|      blen--;
  240|     29|      (*pconsumed)++;
  241|     29|      break;
  242|       |
  243|  61.2k|    case CHUNK_TRAILER:
  ------------------
  |  Branch (243:5): [True: 61.2k, False: 8.48k]
  ------------------
  244|  61.2k|      if((*buf == 0x0d) || (*buf == 0x0a)) {
  ------------------
  |  Branch (244:10): [True: 93, False: 61.1k]
  |  Branch (244:28): [True: 2.35k, False: 58.7k]
  ------------------
  245|  2.44k|        const char *tr = curlx_dyn_ptr(&ch->trailer);
  246|       |        /* this is the end of a trailer, but if the trailer was zero bytes
  247|       |           there was no trailer and we move on */
  248|       |
  249|  2.44k|        if(tr) {
  ------------------
  |  Branch (249:12): [True: 2.44k, False: 3]
  ------------------
  250|  2.44k|          result = curlx_dyn_addn(&ch->trailer, STRCONST("\x0d\x0a"));
  ------------------
  |  | 1292|  2.44k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  251|  2.44k|          if(result) {
  ------------------
  |  Branch (251:14): [True: 0, False: 2.44k]
  ------------------
  252|      0|            ch->state = CHUNK_FAILED;
  253|      0|            ch->last_code = CHUNKE_OUT_OF_MEMORY;
  254|      0|            return result;
  255|      0|          }
  256|  2.44k|          tr = curlx_dyn_ptr(&ch->trailer);
  257|  2.44k|          if(!data->set.http_te_skip) {
  ------------------
  |  Branch (257:14): [True: 2.44k, False: 0]
  ------------------
  258|  2.44k|            size_t trlen = curlx_dyn_len(&ch->trailer);
  259|  2.44k|            if(cw_next)
  ------------------
  |  Branch (259:16): [True: 0, False: 2.44k]
  ------------------
  260|      0|              result = Curl_cwriter_write(data, cw_next,
  261|      0|                                          CLIENTWRITE_HEADER |
  ------------------
  |  |   44|      0|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  262|      0|                                          CLIENTWRITE_TRAILER,
  ------------------
  |  |   48|      0|#define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */
  ------------------
  263|      0|                                          tr, trlen);
  264|  2.44k|            else
  265|  2.44k|              result = Curl_client_write(data,
  266|  2.44k|                                         CLIENTWRITE_HEADER |
  ------------------
  |  |   44|  2.44k|#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
  ------------------
  267|  2.44k|                                         CLIENTWRITE_TRAILER,
  ------------------
  |  |   48|  2.44k|#define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */
  ------------------
  268|  2.44k|                                         tr, trlen);
  269|  2.44k|            if(result) {
  ------------------
  |  Branch (269:16): [True: 0, False: 2.44k]
  ------------------
  270|      0|              ch->state = CHUNK_FAILED;
  271|      0|              ch->last_code = CHUNKE_PASSTHRU_ERROR;
  272|      0|              return result;
  273|      0|            }
  274|  2.44k|          }
  275|  2.44k|          curlx_dyn_reset(&ch->trailer);
  276|  2.44k|          ch->state = CHUNK_TRAILER_CR;
  277|  2.44k|          if(*buf == 0x0a)
  ------------------
  |  Branch (277:14): [True: 2.35k, False: 93]
  ------------------
  278|       |            /* already on the LF */
  279|  2.35k|            break;
  280|  2.44k|        }
  281|      3|        else {
  282|       |          /* no trailer, we are on the final CRLF pair */
  283|      3|          ch->state = CHUNK_TRAILER_POSTCR;
  284|      3|          break; /* do not advance the pointer */
  285|      3|        }
  286|  2.44k|      }
  287|  58.7k|      else {
  288|  58.7k|        result = curlx_dyn_addn(&ch->trailer, buf, 1);
  289|  58.7k|        if(result) {
  ------------------
  |  Branch (289:12): [True: 1, False: 58.7k]
  ------------------
  290|      1|          ch->state = CHUNK_FAILED;
  291|      1|          ch->last_code = CHUNKE_OUT_OF_MEMORY;
  292|      1|          return result;
  293|      1|        }
  294|  58.7k|      }
  295|  58.8k|      buf++;
  296|  58.8k|      blen--;
  297|  58.8k|      (*pconsumed)++;
  298|  58.8k|      break;
  299|       |
  300|  2.44k|    case CHUNK_TRAILER_CR:
  ------------------
  |  Branch (300:5): [True: 2.44k, False: 67.2k]
  ------------------
  301|  2.44k|      if(*buf == 0x0a) {
  ------------------
  |  Branch (301:10): [True: 2.44k, False: 4]
  ------------------
  302|  2.44k|        ch->state = CHUNK_TRAILER_POSTCR;
  303|  2.44k|        buf++;
  304|  2.44k|        blen--;
  305|  2.44k|        (*pconsumed)++;
  306|  2.44k|      }
  307|      4|      else {
  308|      4|        ch->state = CHUNK_FAILED;
  309|      4|        ch->last_code = CHUNKE_BAD_CHUNK;
  310|      4|        return CURLE_RECV_ERROR;
  311|      4|      }
  312|  2.44k|      break;
  313|       |
  314|  2.44k|    case CHUNK_TRAILER_POSTCR:
  ------------------
  |  Branch (314:5): [True: 2.44k, False: 67.2k]
  ------------------
  315|       |      /* We enter this state when a CR should arrive so we expect to
  316|       |         have to first pass a CR before we wait for LF */
  317|  2.44k|      if((*buf != 0x0d) && (*buf != 0x0a)) {
  ------------------
  |  Branch (317:10): [True: 2.44k, False: 1]
  |  Branch (317:28): [True: 2.42k, False: 13]
  ------------------
  318|       |        /* not a CR then it must be another header in the trailer */
  319|  2.42k|        ch->state = CHUNK_TRAILER;
  320|  2.42k|        break;
  321|  2.42k|      }
  322|     14|      if(*buf == 0x0d) {
  ------------------
  |  Branch (322:10): [True: 1, False: 13]
  ------------------
  323|       |        /* skip if CR */
  324|      1|        buf++;
  325|      1|        blen--;
  326|      1|        (*pconsumed)++;
  327|      1|      }
  328|       |      /* now wait for the final LF */
  329|     14|      ch->state = CHUNK_STOP;
  330|     14|      break;
  331|       |
  332|     14|    case CHUNK_STOP:
  ------------------
  |  Branch (332:5): [True: 14, False: 69.7k]
  ------------------
  333|     14|      if(*buf == 0x0a) {
  ------------------
  |  Branch (333:10): [True: 13, False: 1]
  ------------------
  334|     13|        blen--;
  335|     13|        (*pconsumed)++;
  336|       |        /* Record the length of any data left in the end of the buffer
  337|       |           even if there is no more chunks to read */
  338|     13|        ch->datasize = blen;
  339|     13|        ch->state = CHUNK_DONE;
  340|     13|        CURL_TRC_WRITE(data, "http_chunk, response complete");
  ------------------
  |  |  158|     13|  do {                                                     \
  |  |  159|     13|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|     13|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     26|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 13, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     26|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|     13|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|     13|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|     13|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 13]
  |  |  ------------------
  ------------------
  341|     13|        return CURLE_OK;
  342|     13|      }
  343|      1|      else {
  344|      1|        ch->state = CHUNK_FAILED;
  345|      1|        ch->last_code = CHUNKE_BAD_CHUNK;
  346|      1|        CURL_TRC_WRITE(data, "http_chunk error, expected 0x0a, seeing 0x%ux",
  ------------------
  |  |  158|      1|  do {                                                     \
  |  |  159|      1|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|      1|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      1|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|      1|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  347|      1|                       (unsigned int)*buf);
  348|      1|        return CURLE_RECV_ERROR;
  349|      1|      }
  350|      0|    case CHUNK_DONE:
  ------------------
  |  Branch (350:5): [True: 0, False: 69.7k]
  ------------------
  351|      0|      return CURLE_OK;
  352|       |
  353|      0|    case CHUNK_FAILED:
  ------------------
  |  Branch (353:5): [True: 0, False: 69.7k]
  ------------------
  354|      0|      return CURLE_RECV_ERROR;
  355|  69.7k|    }
  356|  69.7k|  }
  357|  64.7k|  return CURLE_OK;
  358|  64.7k|}
http_chunks.c:cw_chunked_init:
  395|    328|{
  396|    328|  struct chunked_writer *ctx = writer->ctx;
  397|       |
  398|    328|  data->req.chunk = TRUE;      /* chunks coming our way. */
  ------------------
  |  | 1055|    328|#define TRUE true
  ------------------
  399|       |  Curl_httpchunk_init(data, &ctx->ch, FALSE);
  ------------------
  |  | 1058|    328|#define FALSE false
  ------------------
  400|    328|  return CURLE_OK;
  401|    328|}
http_chunks.c:cw_chunked_write:
  413|  4.17k|{
  414|  4.17k|  struct chunked_writer *ctx = writer->ctx;
  415|  4.17k|  CURLcode result;
  416|  4.17k|  size_t consumed;
  417|       |
  418|  4.17k|  if(!(type & CLIENTWRITE_BODY))
  ------------------
  |  |   42|  4.17k|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (418:6): [True: 4.16k, False: 6]
  ------------------
  419|  4.16k|    return Curl_cwriter_write(data, writer->next, type, buf, blen);
  420|       |
  421|      6|  consumed = 0;
  422|      6|  result = httpchunk_readwrite(data, &ctx->ch, writer->next, buf, blen,
  423|      6|                               &consumed);
  424|       |
  425|      6|  if(result) {
  ------------------
  |  Branch (425:6): [True: 6, False: 0]
  ------------------
  426|      6|    if(CHUNKE_PASSTHRU_ERROR == ctx->ch.last_code) {
  ------------------
  |  Branch (426:8): [True: 0, False: 6]
  ------------------
  427|      0|      failf(data, "Failed reading the chunked-encoded stream");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  428|      0|    }
  429|      6|    else {
  430|      6|      failf(data, "%s in chunked-encoding",
  ------------------
  |  |   62|      6|#define failf Curl_failf
  ------------------
  431|      6|            Curl_chunked_strerror(ctx->ch.last_code));
  432|      6|    }
  433|      6|    return result;
  434|      6|  }
  435|       |
  436|      0|  blen -= consumed;
  437|      0|  if(CHUNK_DONE == ctx->ch.state) {
  ------------------
  |  Branch (437:6): [True: 0, False: 0]
  ------------------
  438|       |    /* chunks read successfully, download is complete */
  439|      0|    data->req.download_done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  440|      0|    if(blen) {
  ------------------
  |  Branch (440:8): [True: 0, False: 0]
  ------------------
  441|      0|      infof(data, "Leftovers after chunking: %zu bytes", blen);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  442|      0|    }
  443|      0|  }
  444|      0|  else if((type & CLIENTWRITE_EOS) && !data->req.no_body) {
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (444:11): [True: 0, False: 0]
  |  Branch (444:39): [True: 0, False: 0]
  ------------------
  445|      0|    failf(data, "transfer closed with outstanding read data remaining");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  446|      0|    return CURLE_PARTIAL_FILE;
  447|      0|  }
  448|       |
  449|      0|  return CURLE_OK;
  450|      0|}
http_chunks.c:Curl_chunked_strerror:
  361|      6|{
  362|      6|  switch(code) {
  363|      0|  default:
  ------------------
  |  Branch (363:3): [True: 0, False: 6]
  ------------------
  364|      0|    return "OK";
  365|      0|  case CHUNKE_TOO_LONG_HEX:
  ------------------
  |  Branch (365:3): [True: 0, False: 6]
  ------------------
  366|      0|    return "Too long hexadecimal number";
  367|      6|  case CHUNKE_ILLEGAL_HEX:
  ------------------
  |  Branch (367:3): [True: 6, False: 0]
  ------------------
  368|      6|    return "Illegal or missing hexadecimal sequence";
  369|      0|  case CHUNKE_BAD_CHUNK:
  ------------------
  |  Branch (369:3): [True: 0, False: 6]
  ------------------
  370|      0|    return "Malformed encoding found";
  371|      0|  case CHUNKE_PASSTHRU_ERROR:
  ------------------
  |  Branch (371:3): [True: 0, False: 6]
  ------------------
  372|      0|    return "Error writing data to client";
  373|      0|  case CHUNKE_BAD_ENCODING:
  ------------------
  |  Branch (373:3): [True: 0, False: 6]
  ------------------
  374|      0|    return "Bad content-encoding found";
  375|      0|  case CHUNKE_OUT_OF_MEMORY:
  ------------------
  |  Branch (375:3): [True: 0, False: 6]
  ------------------
  376|      0|    return "Out of memory";
  377|      6|  }
  378|      6|}
http_chunks.c:cw_chunked_close:
  405|    328|{
  406|    328|  struct chunked_writer *ctx = writer->ctx;
  407|    328|  Curl_httpchunk_free(data, &ctx->ch);
  408|    328|}

Curl_input_digest:
   45|  39.6k|{
   46|       |  /* Point to the correct struct with this */
   47|  39.6k|  struct digestdata *digest;
   48|       |
   49|  39.6k|  if(proxy) {
  ------------------
  |  Branch (49:6): [True: 601, False: 39.0k]
  ------------------
   50|    601|    digest = &data->state.proxydigest;
   51|    601|  }
   52|  39.0k|  else {
   53|  39.0k|    digest = &data->state.digest;
   54|  39.0k|  }
   55|       |
   56|  39.6k|  if(!checkprefix("Digest", header) || !ISBLANK(header[6]))
  ------------------
  |  |   33|  79.3k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  39.6k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  ------------------
                if(!checkprefix("Digest", header) || !ISBLANK(header[6]))
  ------------------
  |  |   45|  39.6k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 26.8k, False: 12.7k]
  |  |  |  Branch (45:38): [True: 3.64k, False: 9.12k]
  |  |  ------------------
  ------------------
  |  Branch (56:6): [True: 0, False: 39.6k]
  ------------------
   57|  9.12k|    return CURLE_BAD_CONTENT_ENCODING;
   58|       |
   59|  30.5k|  header += strlen("Digest");
   60|  30.5k|  curlx_str_passblanks(&header);
   61|       |
   62|  30.5k|  return Curl_auth_decode_digest_http_message(header, digest);
   63|  39.6k|}
Curl_output_digest:
   69|  1.17k|{
   70|  1.17k|  CURLcode result;
   71|  1.17k|  char *response;
   72|  1.17k|  size_t len;
   73|  1.17k|  bool have_chlg;
   74|       |
   75|       |  /* Point to the address of the pointer that holds the string to send to the
   76|       |     server, which is for a plain host or for an HTTP proxy */
   77|  1.17k|  char **allocuserpwd;
   78|       |
   79|       |  /* Point to the name and password for this */
   80|  1.17k|  struct Curl_creds *creds = NULL;
   81|       |
   82|       |  /* Point to the correct struct with this */
   83|  1.17k|  struct digestdata *digest;
   84|  1.17k|  struct auth *authp;
   85|       |
   86|  1.17k|  if(proxy) {
  ------------------
  |  Branch (86:6): [True: 20, False: 1.15k]
  ------------------
   87|       |#ifdef CURL_DISABLE_PROXY
   88|       |    return CURLE_NOT_BUILT_IN;
   89|       |#else
   90|     20|    digest = &data->state.proxydigest;
   91|     20|    allocuserpwd = &data->req.hd_proxy_auth;
   92|     20|    creds = data->conn->http_proxy.creds;
   93|     20|    authp = &data->state.authproxy;
   94|     20|#endif
   95|     20|  }
   96|  1.15k|  else {
   97|  1.15k|    digest = &data->state.digest;
   98|  1.15k|    allocuserpwd = &data->req.hd_auth;
   99|  1.15k|    creds = data->state.creds;
  100|  1.15k|    authp = &data->state.authhost;
  101|  1.15k|  }
  102|       |
  103|  1.17k|  curlx_safefree(*allocuserpwd);
  ------------------
  |  | 1327|  1.17k|  do {                      \
  |  | 1328|  1.17k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.17k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.17k|    (ptr) = NULL;           \
  |  | 1330|  1.17k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.17k]
  |  |  ------------------
  ------------------
  104|       |
  105|       |#ifdef USE_WINDOWS_SSPI
  106|       |  have_chlg = !!digest->input_token;
  107|       |#else
  108|  1.17k|  have_chlg = !!digest->nonce;
  109|  1.17k|#endif
  110|       |
  111|  1.17k|  if(!have_chlg) {
  ------------------
  |  Branch (111:6): [True: 238, False: 939]
  ------------------
  112|    238|    authp->done = FALSE;
  ------------------
  |  | 1058|    238|#define FALSE false
  ------------------
  113|    238|    return CURLE_OK;
  114|    238|  }
  115|       |
  116|    939|  result = Curl_auth_create_digest_http_message(data, creds, request,
  117|    939|                                                uripath, digest,
  118|    939|                                                &response, &len);
  119|    939|  if(result)
  ------------------
  |  Branch (119:6): [True: 0, False: 939]
  ------------------
  120|      0|    return result;
  121|       |
  122|    939|  *allocuserpwd = curl_maprintf("%sAuthorization: Digest %s\r\n",
  123|    939|                                proxy ? "Proxy-" : "", response);
  ------------------
  |  Branch (123:33): [True: 6, False: 933]
  ------------------
  124|    939|  curlx_free(response);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  125|    939|  if(!*allocuserpwd)
  ------------------
  |  Branch (125:6): [True: 0, False: 939]
  ------------------
  126|      0|    return CURLE_OUT_OF_MEMORY;
  127|       |
  128|    939|  authp->done = TRUE;
  ------------------
  |  | 1055|    939|#define TRUE true
  ------------------
  129|       |
  130|    939|  return CURLE_OK;
  131|    939|}
Curl_http_auth_cleanup_digest:
  134|  33.2k|{
  135|  33.2k|  Curl_auth_digest_cleanup(&data->state.digest);
  136|  33.2k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
  137|  33.2k|}

Curl_http_proxy_create_tunnel_request:
  442|    824|{
  443|    824|  CURLcode result;
  444|       |
  445|    824|  if(udp_tunnel)
  ------------------
  |  Branch (445:6): [True: 0, False: 824]
  ------------------
  446|      0|    result = http_proxy_create_CONNECTUDP(preq, cf, data, dest, ver);
  447|    824|  else
  448|    824|    result = http_proxy_create_CONNECT(preq, cf, data, dest, ver);
  449|    824|  if(result)
  ------------------
  |  Branch (449:6): [True: 1, False: 823]
  ------------------
  450|      1|    return result;
  451|       |
  452|    823|  if(udp_tunnel)
  ------------------
  |  Branch (452:6): [True: 0, False: 823]
  ------------------
  453|      0|    infof(data, "Establishing %s proxy UDP tunnel to %s:%s",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  454|    823|          (ver == PROXY_HTTP_V2) ? "HTTP/2" :
  455|    823|          (ver == PROXY_HTTP_V3) ? "HTTP/3" : "HTTP",
  456|    823|          data->state.up.hostname, data->state.up.port);
  457|    823|  else
  458|    823|    infof(data, "Establishing %s proxy tunnel to %s",
  ------------------
  |  |  143|    823|  do {                               \
  |  |  144|    823|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    823|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 823, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 823]
  |  |  |  |  ------------------
  |  |  |  |  320|    823|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    823|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|    823|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 823]
  |  |  ------------------
  ------------------
  459|    823|          (ver == PROXY_HTTP_V2) ? "HTTP/2" :
  460|    823|          (ver == PROXY_HTTP_V3) ? "HTTP/3" : "HTTP",
  461|    823|          (*preq)->authority);
  462|    823|  return CURLE_OK;
  463|    824|}
Curl_cf_http_proxy_insert_after:
  758|  2.87k|{
  759|  2.87k|  struct Curl_cfilter *cf;
  760|  2.87k|  struct cf_proxy_ctx *ctx = NULL;
  761|  2.87k|  CURLcode result;
  762|       |
  763|  2.87k|  (void)data;
  764|  2.87k|  if(!dest)
  ------------------
  |  Branch (764:6): [True: 0, False: 2.87k]
  ------------------
  765|      0|    return CURLE_FAILED_INIT;
  766|       |
  767|  2.87k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  2.87k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  768|  2.87k|  if(!ctx) {
  ------------------
  |  Branch (768:6): [True: 0, False: 2.87k]
  ------------------
  769|      0|    result = CURLE_OUT_OF_MEMORY;
  770|      0|    goto out;
  771|      0|  }
  772|  2.87k|  Curl_peer_link(&ctx->dest, dest);
  773|  2.87k|  ctx->proxytype = proxytype;
  774|  2.87k|  ctx->udp_tunnel = (transport == TRNSPRT_QUIC);
  ------------------
  |  |  309|  2.87k|#define TRNSPRT_QUIC 5
  ------------------
  775|       |
  776|  2.87k|  result = Curl_cf_create(&cf, &Curl_cft_http_proxy, ctx);
  777|  2.87k|  if(result)
  ------------------
  |  Branch (777:6): [True: 0, False: 2.87k]
  ------------------
  778|      0|    goto out;
  779|  2.87k|  ctx = NULL;
  780|  2.87k|  Curl_conn_cf_insert_after(cf_at, cf);
  781|       |
  782|  2.87k|out:
  783|  2.87k|  cf_https_proxy_ctx_free(ctx);
  784|  2.87k|  return result;
  785|  2.87k|}
Curl_http_proxy_transport:
  788|  2.93k|{
  789|  2.93k|  switch(proxytype) {
  790|      0|  case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (790:3): [True: 0, False: 2.93k]
  ------------------
  791|      0|    return TRNSPRT_QUIC;
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  792|  2.93k|  default:
  ------------------
  |  Branch (792:3): [True: 2.93k, False: 0]
  ------------------
  793|  2.93k|    return TRNSPRT_TCP;
  ------------------
  |  |  307|  2.93k|#define TRNSPRT_TCP  3
  ------------------
  794|  2.93k|  }
  795|  2.93k|}
http_proxy.c:proxy_http_ver_major:
  183|    824|{
  184|    824|  switch(ver) {
  ------------------
  |  Branch (184:10): [True: 824, False: 0]
  ------------------
  185|    824|  case PROXY_HTTP_V1:
  ------------------
  |  Branch (185:3): [True: 824, False: 0]
  ------------------
  186|    824|    return 11;
  187|      0|  case PROXY_HTTP_V2:
  ------------------
  |  Branch (187:3): [True: 0, False: 824]
  ------------------
  188|      0|    return 20;
  189|      0|  case PROXY_HTTP_V3:
  ------------------
  |  Branch (189:3): [True: 0, False: 824]
  ------------------
  190|      0|    return 30;
  191|    824|  }
  192|      0|  return 0;
  193|    824|}
http_proxy.c:dynhds_add_custom:
   45|    823|{
   46|    823|  struct connectdata *conn = data->conn;
   47|    823|  struct curl_slist *h[2];
   48|    823|  struct curl_slist *headers;
   49|    823|  int numlists = 1; /* by default */
   50|    823|  int i;
   51|       |
   52|    823|  enum Curl_proxy_use proxy;
   53|       |
   54|    823|  if(is_connect && !is_udp)
  ------------------
  |  Branch (54:6): [True: 823, False: 0]
  |  Branch (54:20): [True: 823, False: 0]
  ------------------
   55|    823|    proxy = HEADER_CONNECT;
   56|      0|  else if(is_connect && is_udp)
  ------------------
  |  Branch (56:11): [True: 0, False: 0]
  |  Branch (56:25): [True: 0, False: 0]
  ------------------
   57|      0|    proxy = HEADER_CONNECT_UDP;
   58|      0|  else
   59|      0|    proxy = (conn->bits.httpproxy && !conn->bits.tunnel_proxy) ?
  ------------------
  |  Branch (59:14): [True: 0, False: 0]
  |  Branch (59:38): [True: 0, False: 0]
  ------------------
   60|      0|      HEADER_PROXY : HEADER_SERVER;
   61|       |
   62|    823|  switch(proxy) {
  ------------------
  |  Branch (62:10): [True: 823, False: 0]
  ------------------
   63|      0|  case HEADER_SERVER:
  ------------------
  |  Branch (63:3): [True: 0, False: 823]
  ------------------
   64|      0|    h[0] = data->set.headers;
   65|      0|    break;
   66|      0|  case HEADER_PROXY:
  ------------------
  |  Branch (66:3): [True: 0, False: 823]
  ------------------
   67|      0|    h[0] = data->set.headers;
   68|      0|    if(data->set.sep_headers) {
  ------------------
  |  Branch (68:8): [True: 0, False: 0]
  ------------------
   69|      0|      h[1] = data->set.proxyheaders;
   70|      0|      numlists++;
   71|      0|    }
   72|      0|    break;
   73|    823|  case HEADER_CONNECT:
  ------------------
  |  Branch (73:3): [True: 823, False: 0]
  ------------------
   74|    823|    if(data->set.sep_headers)
  ------------------
  |  Branch (74:8): [True: 671, False: 152]
  ------------------
   75|    671|      h[0] = data->set.proxyheaders;
   76|    152|    else
   77|    152|      h[0] = data->set.headers;
   78|    823|    break;
   79|      0|  case HEADER_CONNECT_UDP:
  ------------------
  |  Branch (79:3): [True: 0, False: 823]
  ------------------
   80|      0|    if(data->set.sep_headers)
  ------------------
  |  Branch (80:8): [True: 0, False: 0]
  ------------------
   81|      0|      h[0] = data->set.proxyheaders;
   82|      0|    else
   83|      0|      h[0] = data->set.headers;
   84|      0|    break;
   85|    823|  }
   86|       |
   87|       |  /* loop through one or two lists */
   88|  1.64k|  for(i = 0; i < numlists; i++) {
  ------------------
  |  Branch (88:14): [True: 823, False: 823]
  ------------------
   89|  4.50k|    for(headers = h[i]; headers; headers = headers->next) {
  ------------------
  |  Branch (89:25): [True: 3.68k, False: 823]
  ------------------
   90|  3.68k|      struct Curl_str name;
   91|  3.68k|      const char *value = NULL;
   92|  3.68k|      size_t valuelen = 0;
   93|  3.68k|      const char *ptr = headers->data;
   94|       |
   95|       |      /* There are 2 quirks in place for custom headers:
   96|       |       * 1. setting only 'name:' to suppress a header from being sent
   97|       |       * 2. setting only 'name;' to send an empty (illegal) header
   98|       |       */
   99|  3.68k|      if(!curlx_str_cspn(&ptr, &name, ";:")) {
  ------------------
  |  Branch (99:10): [True: 3.34k, False: 339]
  ------------------
  100|  3.34k|        if(!curlx_str_single(&ptr, ':')) {
  ------------------
  |  Branch (100:12): [True: 130, False: 3.21k]
  ------------------
  101|    130|          curlx_str_passblanks(&ptr);
  102|    130|          if(*ptr) {
  ------------------
  |  Branch (102:14): [True: 76, False: 54]
  ------------------
  103|     76|            value = ptr;
  104|     76|            valuelen = strlen(value);
  105|     76|          }
  106|     54|          else {
  107|       |            /* quirk #1, suppress this header */
  108|     54|            continue;
  109|     54|          }
  110|    130|        }
  111|  3.21k|        else if(!curlx_str_single(&ptr, ';')) {
  ------------------
  |  Branch (111:17): [True: 3.05k, False: 156]
  ------------------
  112|  3.05k|          curlx_str_passblanks(&ptr);
  113|  3.05k|          if(!*ptr) {
  ------------------
  |  Branch (113:14): [True: 3.05k, False: 3]
  ------------------
  114|       |            /* quirk #2, send an empty header */
  115|  3.05k|            value = "";
  116|  3.05k|            valuelen = 0;
  117|  3.05k|          }
  118|      3|          else {
  119|       |            /* this may be used for something else in the future,
  120|       |             * ignore this for now */
  121|      3|            continue;
  122|      3|          }
  123|  3.05k|        }
  124|    156|        else
  125|       |          /* neither : nor ; in provided header value. We ignore this
  126|       |           * silently */
  127|    156|          continue;
  128|  3.34k|      }
  129|    339|      else
  130|       |        /* no name, move on */
  131|    339|        continue;
  132|       |
  133|  3.13k|      DEBUGASSERT(curlx_strlen(&name) && value);
  ------------------
  |  | 1081|  3.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (133:7): [True: 0, False: 3.13k]
  |  Branch (133:7): [True: 0, False: 0]
  |  Branch (133:7): [True: 3.13k, False: 0]
  |  Branch (133:7): [True: 3.13k, False: 0]
  ------------------
  134|  3.13k|      if(data->state.aptr.host &&
  ------------------
  |  Branch (134:10): [True: 0, False: 3.13k]
  ------------------
  135|       |         /* a Host: header was sent already, do not pass on any custom Host:
  136|       |            header as that will produce *two* in the same request! */
  137|      0|         curlx_str_casecompare(&name, "Host"))
  ------------------
  |  Branch (137:10): [True: 0, False: 0]
  ------------------
  138|      0|        ;
  139|  3.13k|      else if(data->state.httpreq == HTTPREQ_POST_FORM &&
  ------------------
  |  Branch (139:15): [True: 351, False: 2.78k]
  ------------------
  140|       |              /* this header (extended by formdata.c) is sent later */
  141|    351|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (141:15): [True: 0, False: 351]
  ------------------
  142|      0|        ;
  143|  3.13k|      else if(data->state.httpreq == HTTPREQ_POST_MIME &&
  ------------------
  |  Branch (143:15): [True: 2.54k, False: 588]
  ------------------
  144|       |              /* this header is sent later */
  145|  2.54k|              curlx_str_casecompare(&name, "Content-Type"))
  ------------------
  |  Branch (145:15): [True: 0, False: 2.54k]
  ------------------
  146|      0|        ;
  147|  3.13k|      else if(data->req.authneg &&
  ------------------
  |  Branch (147:15): [True: 0, False: 3.13k]
  ------------------
  148|       |              /* while doing auth neg, do not allow the custom length since
  149|       |                 we will force length zero then */
  150|      0|              curlx_str_casecompare(&name, "Content-Length"))
  ------------------
  |  Branch (150:15): [True: 0, False: 0]
  ------------------
  151|      0|        ;
  152|  3.13k|      else if((httpversion >= 20) &&
  ------------------
  |  Branch (152:15): [True: 0, False: 3.13k]
  ------------------
  153|      0|              curlx_str_casecompare(&name, "Transfer-Encoding"))
  ------------------
  |  Branch (153:15): [True: 0, False: 0]
  ------------------
  154|      0|        ;
  155|       |      /* HTTP/2 and HTTP/3 do not support chunked requests */
  156|  3.13k|      else if((curlx_str_casecompare(&name, "Authorization") ||
  ------------------
  |  Branch (156:16): [True: 0, False: 3.13k]
  ------------------
  157|  3.13k|               curlx_str_casecompare(&name, "Cookie")) &&
  ------------------
  |  Branch (157:16): [True: 6, False: 3.12k]
  ------------------
  158|       |              /* be careful of sending this potentially sensitive header to
  159|       |                 other hosts */
  160|      6|              !Curl_auth_allowed_to_host(data))
  ------------------
  |  Branch (160:15): [True: 0, False: 6]
  ------------------
  161|      0|        ;
  162|  3.13k|      else {
  163|  3.13k|        CURLcode result =
  164|  3.13k|          Curl_dynhds_add(hds, curlx_str(&name), curlx_strlen(&name),
  ------------------
  |  |   49|  3.13k|#define curlx_str(x)    ((x)->str)
  ------------------
                        Curl_dynhds_add(hds, curlx_str(&name), curlx_strlen(&name),
  ------------------
  |  |   50|  3.13k|#define curlx_strlen(x) ((x)->len)
  ------------------
  165|  3.13k|                          value, valuelen);
  166|  3.13k|        if(result)
  ------------------
  |  Branch (166:12): [True: 0, False: 3.13k]
  ------------------
  167|      0|          return result;
  168|  3.13k|      }
  169|  3.13k|    }
  170|    823|  }
  171|       |
  172|    823|  return CURLE_OK;
  173|    823|}
http_proxy.c:http_proxy_create_CONNECT:
  200|    824|{
  201|    824|  char *authority = NULL;
  202|    824|  int httpversion = proxy_http_ver_major(ver);
  203|    824|  CURLcode result;
  204|    824|  struct httpreq *req = NULL;
  205|       |
  206|    824|  authority = curl_maprintf("%s%s%s:%u",
  207|    824|                            dest->ipv6 ? "[" : "",
  ------------------
  |  Branch (207:29): [True: 0, False: 824]
  ------------------
  208|    824|                            dest->hostname,
  209|    824|                            dest->ipv6 ? "]" : "",
  ------------------
  |  Branch (209:29): [True: 0, False: 824]
  ------------------
  210|    824|                            dest->port);
  211|    824|  if(!authority) {
  ------------------
  |  Branch (211:6): [True: 0, False: 824]
  ------------------
  212|      0|    result = CURLE_OUT_OF_MEMORY;
  213|      0|    goto out;
  214|      0|  }
  215|       |
  216|    824|  result = Curl_http_req_make(&req, "CONNECT", sizeof("CONNECT") - 1,
  217|    824|                              NULL, 0, authority, strlen(authority),
  218|    824|                              NULL, 0);
  219|    824|  if(result)
  ------------------
  |  Branch (219:6): [True: 0, False: 824]
  ------------------
  220|      0|    goto out;
  221|       |
  222|       |  /* Setup the proxy-authorization header, if any */
  223|    824|  result = Curl_http_output_auth(data, cf->conn, req->method, HTTPREQ_GET,
  224|    824|                                 req->authority, NULL, TRUE);
  ------------------
  |  | 1055|    824|#define TRUE true
  ------------------
  225|    824|  if(result)
  ------------------
  |  Branch (225:6): [True: 1, False: 823]
  ------------------
  226|      1|    goto out;
  227|       |
  228|       |  /* If user is not overriding Host: header, we add for HTTP/1.x */
  229|    823|  if(ver == PROXY_HTTP_V1 &&
  ------------------
  |  Branch (229:6): [True: 823, False: 0]
  ------------------
  230|    823|     !Curl_checkProxyheaders(data, cf->conn, STRCONST("Host"))) {
  ------------------
  |  | 1292|    823|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (230:6): [True: 819, False: 4]
  ------------------
  231|    819|    result = Curl_dynhds_cadd(&req->headers, "Host", authority);
  232|    819|    if(result)
  ------------------
  |  Branch (232:8): [True: 0, False: 819]
  ------------------
  233|      0|      goto out;
  234|    819|  }
  235|       |
  236|    823|  if(data->req.hd_proxy_auth) {
  ------------------
  |  Branch (236:6): [True: 214, False: 609]
  ------------------
  237|    214|    result = Curl_dynhds_h1_cadd_line(&req->headers,
  238|    214|                                      data->req.hd_proxy_auth);
  239|    214|    if(result)
  ------------------
  |  Branch (239:8): [True: 0, False: 214]
  ------------------
  240|      0|      goto out;
  241|    214|  }
  242|       |
  243|    823|  if(!Curl_checkProxyheaders(data, cf->conn, STRCONST("User-Agent")) &&
  ------------------
  |  | 1292|    823|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (243:6): [True: 823, False: 0]
  ------------------
  244|    823|     data->set.str[STRING_USERAGENT] && *data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (244:6): [True: 40, False: 783]
  |  Branch (244:41): [True: 6, False: 34]
  ------------------
  245|      6|    result = Curl_dynhds_cadd(&req->headers, "User-Agent",
  246|      6|                              data->set.str[STRING_USERAGENT]);
  247|      6|    if(result)
  ------------------
  |  Branch (247:8): [True: 0, False: 6]
  ------------------
  248|      0|      goto out;
  249|      6|  }
  250|       |
  251|    823|  if(ver == PROXY_HTTP_V1 &&
  ------------------
  |  Branch (251:6): [True: 823, False: 0]
  ------------------
  252|    823|     !Curl_checkProxyheaders(data, cf->conn, STRCONST("Proxy-Connection"))) {
  ------------------
  |  | 1292|    823|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (252:6): [True: 823, False: 0]
  ------------------
  253|    823|    result = Curl_dynhds_cadd(&req->headers, "Proxy-Connection", "Keep-Alive");
  254|    823|    if(result)
  ------------------
  |  Branch (254:8): [True: 0, False: 823]
  ------------------
  255|      0|      goto out;
  256|    823|  }
  257|       |
  258|    823|  result = dynhds_add_custom(data, TRUE, httpversion,
  ------------------
  |  | 1055|    823|#define TRUE true
  ------------------
  259|    823|                             FALSE, &req->headers);
  ------------------
  |  | 1058|    823|#define FALSE false
  ------------------
  260|       |
  261|    824|out:
  262|    824|  if(result && req) {
  ------------------
  |  Branch (262:6): [True: 1, False: 823]
  |  Branch (262:16): [True: 1, False: 0]
  ------------------
  263|      1|    Curl_http_req_free(req);
  264|      1|    req = NULL;
  265|      1|  }
  266|    824|  curlx_free(authority);
  ------------------
  |  | 1483|    824|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  267|    824|  *preq = req;
  268|    824|  return result;
  269|    823|}
http_proxy.c:http_proxy_cf_destroy:
  718|  2.87k|{
  719|  2.87k|  struct cf_proxy_ctx *ctx = cf->ctx;
  720|  2.87k|  if(ctx) {
  ------------------
  |  Branch (720:6): [True: 2.87k, False: 0]
  ------------------
  721|  2.87k|    CURL_TRC_CF(data, cf, "destroy");
  ------------------
  |  |  153|  2.87k|  do {                                          \
  |  |  154|  2.87k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.87k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.74k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.87k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.74k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.87k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.87k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.87k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.87k]
  |  |  ------------------
  ------------------
  722|  2.87k|    cf_https_proxy_ctx_free(ctx);
  723|  2.87k|  }
  724|  2.87k|}
http_proxy.c:http_proxy_cf_connect:
  557|  3.68k|{
  558|  3.68k|  struct cf_proxy_ctx *ctx = cf->ctx;
  559|  3.68k|  CURLcode result;
  560|  3.68k|  const char *tunnel_type; /* Determine tunnel type once and reuse */
  561|       |
  562|  3.68k|  tunnel_type = ctx->udp_tunnel ? "CONNECT-UDP" : "CONNECT";
  ------------------
  |  Branch (562:17): [True: 0, False: 3.68k]
  ------------------
  563|       |
  564|  3.68k|  if(cf->connected) {
  ------------------
  |  Branch (564:6): [True: 1, False: 3.68k]
  ------------------
  565|      1|    *done = TRUE;
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  566|      1|    return CURLE_OK;
  567|      1|  }
  568|       |
  569|  3.68k|  CURL_TRC_CF(data, cf, "%s", tunnel_type);
  ------------------
  |  |  153|  3.68k|  do {                                          \
  |  |  154|  3.68k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  3.68k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  7.36k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3.68k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  7.36k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  3.68k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  3.68k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  3.68k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3.68k]
  |  |  ------------------
  ------------------
  570|  4.45k|connect_sub:
  571|       |  /* in case of h3_proxy, cf->next will be NULL initially */
  572|  4.45k|  if(cf->next) {
  ------------------
  |  Branch (572:6): [True: 4.45k, False: 0]
  ------------------
  573|  4.45k|    result = cf->next->cft->do_connect(cf->next, data, done);
  574|  4.45k|    if(result || !*done)
  ------------------
  |  Branch (574:8): [True: 2.79k, False: 1.66k]
  |  Branch (574:18): [True: 830, False: 833]
  ------------------
  575|  3.62k|      return result;
  576|  4.45k|  }
  577|       |
  578|    833|  *done = FALSE;
  ------------------
  |  | 1058|    833|#define FALSE false
  ------------------
  579|    833|  if(!ctx->sub_filter_installed) {
  ------------------
  |  Branch (579:6): [True: 772, False: 61]
  ------------------
  580|    772|    const char *alpn = NULL;
  581|       |
  582|       |    /* in case of h3_proxy, cf->next will be NULL initially */
  583|    772|    if(cf->next) {
  ------------------
  |  Branch (583:8): [True: 772, False: 0]
  ------------------
  584|    772|      alpn = Curl_conn_cf_get_alpn_negotiated(cf->next, data);
  585|    772|    }
  586|       |
  587|    772|    if(alpn)
  ------------------
  |  Branch (587:8): [True: 0, False: 772]
  ------------------
  588|      0|      infof(data, "%s: '%s' negotiated", tunnel_type, alpn);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  589|    772|    else if(!alpn) {
  ------------------
  |  Branch (589:13): [True: 772, False: 0]
  ------------------
  590|       |      /* No ALPN, proxytype rules. Fake ALPN */
  591|    772|      infof(data, "%s: no ALPN negotiated", tunnel_type);
  ------------------
  |  |  143|    772|  do {                               \
  |  |  144|    772|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    772|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 772, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 772]
  |  |  |  |  ------------------
  |  |  |  |  320|    772|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    772|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    772|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 772]
  |  |  ------------------
  ------------------
  592|    772|      switch(ctx->proxytype) {
  593|      1|      case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|      1|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (593:7): [True: 1, False: 771]
  ------------------
  594|      1|        alpn = "http/1.0";
  595|      1|        break;
  596|      0|      case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|      0|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (596:7): [True: 0, False: 772]
  ------------------
  597|      0|        alpn = "h2";
  598|      0|        break;
  599|      0|      case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (599:7): [True: 0, False: 772]
  ------------------
  600|      0|        alpn = "h3";
  601|      0|        break;
  602|    771|      default:
  ------------------
  |  Branch (602:7): [True: 771, False: 1]
  ------------------
  603|    771|        alpn = "http/1.1";
  604|    771|        break;
  605|    772|      }
  606|    772|    }
  607|       |
  608|    772|    if(!strcmp(alpn, "http/1.0")) {
  ------------------
  |  Branch (608:8): [True: 1, False: 771]
  ------------------
  609|      1|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/1.0");
  ------------------
  |  |  153|      1|  do {                                          \
  |  |  154|      1|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      1|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      1|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      1|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      1|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1]
  |  |  ------------------
  ------------------
  610|      1|      result = Curl_cf_h1_proxy_insert_after(cf, data, ctx->dest, 10,
  611|      1|                                             (bool)ctx->udp_tunnel);
  612|      1|      if(result)
  ------------------
  |  Branch (612:10): [True: 0, False: 1]
  ------------------
  613|      0|        goto out;
  614|      1|    }
  615|    771|    else if(!strcmp(alpn, "http/1.1")) {
  ------------------
  |  Branch (615:13): [True: 771, False: 0]
  ------------------
  616|    771|      int httpversion = (ctx->proxytype == CURLPROXY_HTTP_1_0) ? 10 : 11;
  ------------------
  |  |  792|    771|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (616:25): [True: 0, False: 771]
  ------------------
  617|    771|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/1.%d",
  ------------------
  |  |  153|    771|  do {                                          \
  |  |  154|    771|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    771|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.54k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 771, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 771]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.54k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    771|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    771|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    771|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 771]
  |  |  ------------------
  ------------------
  618|    771|                  httpversion % 10);
  619|    771|      result = Curl_cf_h1_proxy_insert_after(cf, data, ctx->dest, httpversion,
  620|    771|                                             (bool)ctx->udp_tunnel);
  621|    771|      if(result)
  ------------------
  |  Branch (621:10): [True: 0, False: 771]
  ------------------
  622|      0|        goto out;
  623|    771|    }
  624|      0|#ifdef USE_NGHTTP2
  625|      0|    else if(!strcmp(alpn, "h2")) {
  ------------------
  |  Branch (625:13): [True: 0, False: 0]
  ------------------
  626|      0|      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/2");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  627|      0|      result = Curl_cf_h2_proxy_insert_after(cf, data, ctx->dest,
  628|      0|                                             (bool)ctx->udp_tunnel);
  629|      0|      if(result)
  ------------------
  |  Branch (629:10): [True: 0, False: 0]
  ------------------
  630|      0|        goto out;
  631|      0|    }
  632|      0|#endif /* USE_NGHTTP2 */
  633|       |#if defined(USE_PROXY_HTTP3) && defined(USE_NGHTTP3) && \
  634|       |  defined(USE_NGTCP2) && defined(USE_OPENSSL)
  635|       |    else if(!strcmp(alpn, "h3")) {
  636|       |      CURL_TRC_CF(data, cf, "installing subfilter for HTTP/3");
  637|       |      result = Curl_cf_h3_proxy_insert_after(cf, data, ctx->dest,
  638|       |                                             (bool)ctx->udp_tunnel);
  639|       |      if(result)
  640|       |        goto out;
  641|       |    }
  642|       |#endif /* USE_PROXY_HTTP3 && USE_NGHTTP3 && USE_NGTCP2 && USE_OPENSSL */
  643|      0|    else {
  644|      0|      failf(data, "%s: negotiated ALPN '%s' not supported", tunnel_type, alpn);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  645|      0|      result = CURLE_COULDNT_CONNECT;
  646|      0|      goto out;
  647|      0|    }
  648|       |
  649|    772|    ctx->sub_filter_installed = TRUE;
  ------------------
  |  | 1055|    772|#define TRUE true
  ------------------
  650|       |    /* after we installed the filter "below" us, we call connect
  651|       |     * on out sub-chain again.
  652|       |     */
  653|    772|    goto connect_sub;
  654|    772|  }
  655|     61|  else {
  656|       |    /* subchain connected and we had already installed the protocol filter.
  657|       |     * This means the protocol tunnel is established, we are done.
  658|       |     */
  659|     61|    DEBUGASSERT(ctx->sub_filter_installed);
  ------------------
  |  | 1081|     61|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (659:5): [True: 0, False: 61]
  |  Branch (659:5): [True: 61, False: 0]
  ------------------
  660|     61|    if(ctx->udp_tunnel) {
  ------------------
  |  Branch (660:8): [True: 0, False: 61]
  ------------------
  661|       |#ifdef USE_PROXY_HTTP3
  662|       |      /* Insert capsule filter between us and the protocol sub-filter.
  663|       |       * This handles encap/decap of UDP datagrams in capsule format. */
  664|       |      result = Curl_cf_capsule_insert_after(cf, data);
  665|       |      if(result)
  666|       |        goto out;
  667|       |      CURL_TRC_CF(data, cf, "installed capsule filter for UDP tunnel");
  668|       |#else
  669|      0|      result = CURLE_NOT_BUILT_IN;
  670|      0|      goto out;
  671|      0|#endif /* USE_PROXY_HTTP3 */
  672|      0|    }
  673|     61|    result = CURLE_OK;
  674|     61|  }
  675|       |
  676|     61|out:
  677|     61|  if(!result) {
  ------------------
  |  Branch (677:6): [True: 61, False: 0]
  ------------------
  678|     61|    cf->connected = TRUE;
  ------------------
  |  | 1055|     61|#define TRUE true
  ------------------
  679|       |    *done = TRUE;
  ------------------
  |  | 1055|     61|#define TRUE true
  ------------------
  680|     61|  }
  681|     61|  return result;
  682|    833|}
http_proxy.c:http_proxy_cf_close:
  728|  2.81k|{
  729|  2.81k|  CURL_TRC_CF(data, cf, "close");
  ------------------
  |  |  153|  2.81k|  do {                                          \
  |  |  154|  2.81k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.81k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  5.62k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.81k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.81k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  5.62k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.81k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.81k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.81k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
  730|  2.81k|  cf->connected = FALSE;
  ------------------
  |  | 1058|  2.81k|#define FALSE false
  ------------------
  731|  2.81k|  if(cf->next)
  ------------------
  |  Branch (731:6): [True: 2.81k, False: 0]
  ------------------
  732|  2.81k|    cf->next->cft->do_close(cf->next, data);
  733|  2.81k|}
http_proxy.c:cf_http_proxy_query:
  687|  7.34k|{
  688|  7.34k|  struct cf_proxy_ctx *ctx = cf->ctx;
  689|  7.34k|  switch(query) {
  690|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  177|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (690:3): [True: 0, False: 7.34k]
  ------------------
  691|      0|    *pres1 = (int)ctx->dest->port;
  692|      0|    *((const char **)pres2) = ctx->dest->hostname;
  693|      0|    return CURLE_OK;
  694|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (694:3): [True: 0, False: 7.34k]
  ------------------
  695|      0|    const char **palpn = pres2;
  696|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (696:5): [True: 0, False: 0]
  |  Branch (696:5): [True: 0, False: 0]
  ------------------
  697|      0|    *palpn = NULL;
  698|      0|    return CURLE_OK;
  699|      0|  }
  700|  7.34k|  default:
  ------------------
  |  Branch (700:3): [True: 7.34k, False: 0]
  ------------------
  701|  7.34k|    break;
  702|  7.34k|  }
  703|  7.34k|  return cf->next ?
  ------------------
  |  Branch (703:10): [True: 7.34k, False: 0]
  ------------------
  704|  7.34k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
  705|  7.34k|    CURLE_UNKNOWN_OPTION;
  706|  7.34k|}
http_proxy.c:cf_https_proxy_ctx_free:
  709|  5.74k|{
  710|  5.74k|  if(ctx) {
  ------------------
  |  Branch (710:6): [True: 2.87k, False: 2.87k]
  ------------------
  711|  2.87k|    Curl_peer_unlink(&ctx->dest);
  712|  2.87k|    curlx_free(ctx);
  ------------------
  |  | 1483|  2.87k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  713|  2.87k|  }
  714|  5.74k|}

Curl_is_ASCII_str:
  236|  42.7k|{
  237|  42.7k|  if(s && s->len) {
  ------------------
  |  Branch (237:6): [True: 42.7k, False: 0]
  |  Branch (237:11): [True: 42.7k, False: 0]
  ------------------
  238|  42.7k|    const unsigned char *ch = (const unsigned char *)s->str;
  239|  42.7k|    size_t i;
  240|   621k|    for(i = 0; i < s->len; ++i) {
  ------------------
  |  Branch (240:16): [True: 578k, False: 42.5k]
  ------------------
  241|   578k|      if(ch[i] & 0x80)
  ------------------
  |  Branch (241:10): [True: 135, False: 578k]
  ------------------
  242|    135|        return FALSE;
  ------------------
  |  | 1058|    135|#define FALSE false
  ------------------
  243|   578k|    }
  244|  42.7k|  }
  245|  42.5k|  return TRUE;
  ------------------
  |  | 1055|  42.5k|#define TRUE true
  ------------------
  246|  42.7k|}
Curl_idn_decode:
  313|    135|{
  314|    135|  char *d = NULL;
  315|    135|  CURLcode result = idn_decode(input, &d);
  316|    135|#ifdef USE_LIBIDN2
  317|    135|  if(!result) {
  ------------------
  |  Branch (317:6): [True: 0, False: 135]
  ------------------
  318|      0|    char *c = curlx_strdup(d);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  319|      0|    idn2_free(d);
  320|      0|    if(c)
  ------------------
  |  Branch (320:8): [True: 0, False: 0]
  ------------------
  321|      0|      d = c;
  322|      0|    else
  323|      0|      result = CURLE_OUT_OF_MEMORY;
  324|      0|  }
  325|    135|#endif
  326|    135|  if(!result) {
  ------------------
  |  Branch (326:6): [True: 0, False: 135]
  ------------------
  327|      0|    if(!d[0]) { /* ended up zero length, not acceptable */
  ------------------
  |  Branch (327:8): [True: 0, False: 0]
  ------------------
  328|      0|      result = CURLE_URL_MALFORMAT;
  329|      0|      curlx_free(d);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  330|      0|    }
  331|      0|    else
  332|      0|      *output = d;
  333|      0|  }
  334|    135|  return result;
  335|    135|}
idn.c:idn_decode:
  258|    135|{
  259|    135|  char *decoded = NULL;
  260|    135|  CURLcode result = CURLE_OK;
  261|    135|#ifdef USE_LIBIDN2
  262|    135|  if(idn2_check_version(IDN2_VERSION)) {
  ------------------
  |  Branch (262:6): [True: 135, False: 0]
  ------------------
  263|    135|    int flags = IDN2_NFC_INPUT
  264|    135|#if IDN2_VERSION_NUMBER >= 0x00140000
  265|       |      /* IDN2_NFC_INPUT: Normalize input string using normalization form C.
  266|       |         IDN2_NONTRANSITIONAL: Perform Unicode TR46 non-transitional
  267|       |         processing. */
  268|    135|      | IDN2_NONTRANSITIONAL
  269|    135|#endif
  270|    135|      ;
  271|    135|    int rc = IDN2_LOOKUP(input, &decoded, flags);
  ------------------
  |  |   41|    135|  idn2_lookup_ul((const char *)(name), (char **)(host), flags)
  ------------------
  272|    135|    if(rc != IDN2_OK)
  ------------------
  |  Branch (272:8): [True: 135, False: 0]
  ------------------
  273|       |      /* fallback to TR46 Transitional mode for better IDNA2003
  274|       |         compatibility */
  275|    135|      rc = IDN2_LOOKUP(input, &decoded, IDN2_TRANSITIONAL);
  ------------------
  |  |   41|    135|  idn2_lookup_ul((const char *)(name), (char **)(host), flags)
  ------------------
  276|    135|    if(rc != IDN2_OK)
  ------------------
  |  Branch (276:8): [True: 135, False: 0]
  ------------------
  277|    135|      result = CURLE_URL_MALFORMAT;
  278|    135|  }
  279|      0|  else
  280|       |    /* a too old libidn2 version */
  281|      0|    result = CURLE_NOT_BUILT_IN;
  282|       |#elif defined(USE_WIN32_IDN)
  283|       |  result = win32_idn_to_ascii(input, &decoded);
  284|       |#elif defined(USE_APPLE_IDN)
  285|       |  result = mac_idn_to_ascii(input, &decoded);
  286|       |#endif
  287|    135|  if(!result)
  ------------------
  |  Branch (287:6): [True: 0, False: 135]
  ------------------
  288|      0|    *output = decoded;
  289|    135|  return result;
  290|    135|}

Curl_ipv6_scope:
   62|  9.86k|{
   63|  9.86k|  if(sa->sa_family == AF_INET6) {
  ------------------
  |  Branch (63:6): [True: 73, False: 9.79k]
  ------------------
   64|     73|    const struct sockaddr_in6 *sa6 =
   65|     73|      (const struct sockaddr_in6 *)(const void *)sa;
   66|     73|    const unsigned char *b = sa6->sin6_addr.s6_addr;
   67|     73|    unsigned short w = (unsigned short)((b[0] << 8) | b[1]);
   68|       |
   69|     73|    if((b[0] & 0xFE) == 0xFC) /* Handle ULAs */
  ------------------
  |  Branch (69:8): [True: 1, False: 72]
  ------------------
   70|      1|      return IPV6_SCOPE_UNIQUELOCAL;
  ------------------
  |  |   32|      1|#define IPV6_SCOPE_UNIQUELOCAL  3       /* Unique local */
  ------------------
   71|     72|    switch(w & 0xFFC0) {
   72|      1|    case 0xFE80:
  ------------------
  |  Branch (72:5): [True: 1, False: 71]
  ------------------
   73|      1|      return IPV6_SCOPE_LINKLOCAL;
  ------------------
  |  |   30|      1|#define IPV6_SCOPE_LINKLOCAL    1       /* Link-local scope. */
  ------------------
   74|      1|    case 0xFEC0:
  ------------------
  |  Branch (74:5): [True: 1, False: 71]
  ------------------
   75|      1|      return IPV6_SCOPE_SITELOCAL;
  ------------------
  |  |   31|      1|#define IPV6_SCOPE_SITELOCAL    2       /* Site-local scope (deprecated). */
  ------------------
   76|     57|    case 0x0000:
  ------------------
  |  Branch (76:5): [True: 57, False: 15]
  ------------------
   77|     57|      w = b[1] | b[2] | b[3] | b[4] | b[5] | b[6] | b[7] | b[8] | b[9] |
   78|     57|          b[10] | b[11] | b[12] | b[13] | b[14];
   79|     57|      if(w || b[15] != 0x01)
  ------------------
  |  Branch (79:10): [True: 13, False: 44]
  |  Branch (79:15): [True: 12, False: 32]
  ------------------
   80|     25|        break;
   81|     32|      return IPV6_SCOPE_NODELOCAL;
  ------------------
  |  |   33|     32|#define IPV6_SCOPE_NODELOCAL    4       /* Loopback. */
  ------------------
   82|     13|    default:
  ------------------
  |  Branch (82:5): [True: 13, False: 59]
  ------------------
   83|     13|      break;
   84|     72|    }
   85|     72|  }
   86|  9.83k|  return IPV6_SCOPE_GLOBAL;
  ------------------
  |  |   29|  9.83k|#define IPV6_SCOPE_GLOBAL       0       /* Global scope. */
  ------------------
   87|  9.86k|}
Curl_if2ip:
  101|    102|{
  102|    102|  struct ifaddrs *iface, *head;
  103|    102|  if2ip_result_t res = IF2IP_NOT_FOUND;
  104|       |
  105|       |#if defined(USE_IPV6) && !defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
  106|       |  (void)local_scope_id;
  107|       |#endif
  108|       |
  109|    102|  if(getifaddrs(&head) >= 0) {
  ------------------
  |  Branch (109:6): [True: 102, False: 0]
  ------------------
  110|    506|    for(iface = head; iface != NULL; iface = iface->ifa_next) {
  ------------------
  |  Branch (110:23): [True: 406, False: 100]
  ------------------
  111|    406|      if(iface->ifa_addr) {
  ------------------
  |  Branch (111:10): [True: 406, False: 0]
  ------------------
  112|    406|        if(iface->ifa_addr->sa_family == af) {
  ------------------
  |  Branch (112:12): [True: 168, False: 238]
  ------------------
  113|    168|          if(curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (113:14): [True: 2, False: 166]
  ------------------
  114|      2|            void *addr;
  115|      2|            const char *ip;
  116|      2|            char scope[12] = "";
  117|      2|            char ipstr[64];
  118|      2|#ifdef USE_IPV6
  119|      2|            if(af == AF_INET6) {
  ------------------
  |  Branch (119:16): [True: 0, False: 2]
  ------------------
  120|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  121|      0|              unsigned int scopeid = 0;
  122|      0|#endif
  123|      0|              unsigned int ifscope = Curl_ipv6_scope(iface->ifa_addr);
  124|       |
  125|      0|              if(ifscope != remote_scope) {
  ------------------
  |  Branch (125:18): [True: 0, False: 0]
  ------------------
  126|       |                /* We are interested only in interface addresses whose scope
  127|       |                   matches the remote address we want to connect to: global
  128|       |                   for global, link-local for link-local, etc... */
  129|      0|                if(res == IF2IP_NOT_FOUND)
  ------------------
  |  Branch (129:20): [True: 0, False: 0]
  ------------------
  130|      0|                  res = IF2IP_AF_NOT_SUPPORTED;
  131|      0|                continue;
  132|      0|              }
  133|       |
  134|      0|              addr =
  135|      0|                &((struct sockaddr_in6 *)(void *)iface->ifa_addr)->sin6_addr;
  136|      0|#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
  137|       |              /* Include the scope of this interface as part of the address */
  138|      0|              scopeid = ((struct sockaddr_in6 *)(void *)iface->ifa_addr)
  139|      0|                          ->sin6_scope_id;
  140|       |
  141|       |              /* If given, scope id should match. */
  142|      0|              if(local_scope_id && scopeid != local_scope_id) {
  ------------------
  |  Branch (142:18): [True: 0, False: 0]
  |  Branch (142:36): [True: 0, False: 0]
  ------------------
  143|      0|                if(res == IF2IP_NOT_FOUND)
  ------------------
  |  Branch (143:20): [True: 0, False: 0]
  ------------------
  144|      0|                  res = IF2IP_AF_NOT_SUPPORTED;
  145|       |
  146|      0|                continue;
  147|      0|              }
  148|       |
  149|      0|              if(scopeid)
  ------------------
  |  Branch (149:18): [True: 0, False: 0]
  ------------------
  150|      0|                curl_msnprintf(scope, sizeof(scope), "%%%u", scopeid);
  151|      0|#endif
  152|      0|            }
  153|      2|            else
  154|      2|#endif
  155|      2|              addr =
  156|      2|                &((struct sockaddr_in *)(void *)iface->ifa_addr)->sin_addr;
  157|      2|            res = IF2IP_FOUND;
  158|      2|            ip = curlx_inet_ntop(af, addr, ipstr, sizeof(ipstr));
  ------------------
  |  |   44|      2|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  ------------------
  159|      2|            curl_msnprintf(buf, buf_size, "%s%s", ip, scope);
  160|      2|            break;
  161|      2|          }
  162|    168|        }
  163|    238|        else if((res == IF2IP_NOT_FOUND) &&
  ------------------
  |  Branch (163:17): [True: 233, False: 5]
  ------------------
  164|    233|                curl_strequal(iface->ifa_name, interf)) {
  ------------------
  |  Branch (164:17): [True: 3, False: 230]
  ------------------
  165|      3|          res = IF2IP_AF_NOT_SUPPORTED;
  166|      3|        }
  167|    406|      }
  168|    406|    }
  169|       |
  170|    102|    freeifaddrs(head);
  171|    102|  }
  172|       |
  173|    102|  return res;
  174|    102|}

Curl_llist_init:
   46|  1.59M|{
   47|  1.59M|  l->_size = 0;
   48|  1.59M|  l->_dtor = dtor;
   49|  1.59M|  l->_head = NULL;
   50|  1.59M|  l->_tail = NULL;
   51|  1.59M|#ifdef DEBUGBUILD
   52|  1.59M|  l->_init = LLISTINIT;
  ------------------
  |  |   29|  1.59M|#define LLISTINIT 0x100cc001 /* random pattern */
  ------------------
   53|  1.59M|#endif
   54|  1.59M|}
Curl_llist_insert_next:
   71|   817k|{
   72|   817k|  DEBUGASSERT(list);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (72:3): [True: 0, False: 817k]
  |  Branch (72:3): [True: 817k, False: 0]
  ------------------
   73|   817k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (73:3): [True: 0, False: 817k]
  |  Branch (73:3): [True: 817k, False: 0]
  ------------------
   74|   817k|  DEBUGASSERT(ne);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (74:3): [True: 0, False: 817k]
  |  Branch (74:3): [True: 817k, False: 0]
  ------------------
   75|       |
   76|   817k|#ifdef DEBUGBUILD
   77|   817k|  ne->_init = NODEINIT;
  ------------------
  |  |   30|   817k|#define NODEINIT  0x12344321 /* random pattern */
  ------------------
   78|   817k|#endif
   79|   817k|  ne->_ptr = CURL_UNCONST(p);
  ------------------
  |  |  866|   817k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   80|   817k|  ne->_list = list;
   81|   817k|  if(list->_size == 0) {
  ------------------
  |  Branch (81:6): [True: 43.9k, False: 773k]
  ------------------
   82|  43.9k|    list->_head = ne;
   83|  43.9k|    list->_head->_prev = NULL;
   84|  43.9k|    list->_head->_next = NULL;
   85|  43.9k|    list->_tail = ne;
   86|  43.9k|  }
   87|   773k|  else {
   88|       |    /* if 'e' is NULL here, we insert the new element first in the list */
   89|   773k|    ne->_next = e ? e->_next : list->_head;
  ------------------
  |  Branch (89:17): [True: 763k, False: 10.0k]
  ------------------
   90|   773k|    ne->_prev = e;
   91|   773k|    if(!e) {
  ------------------
  |  Branch (91:8): [True: 10.0k, False: 763k]
  ------------------
   92|  10.0k|      list->_head->_prev = ne;
   93|  10.0k|      list->_head = ne;
   94|  10.0k|    }
   95|   763k|    else if(e->_next) {
  ------------------
  |  Branch (95:13): [True: 13.1k, False: 750k]
  ------------------
   96|  13.1k|      e->_next->_prev = ne;
   97|  13.1k|    }
   98|   750k|    else {
   99|   750k|      list->_tail = ne;
  100|   750k|    }
  101|   773k|    if(e)
  ------------------
  |  Branch (101:8): [True: 763k, False: 10.0k]
  ------------------
  102|   763k|      e->_next = ne;
  103|   773k|  }
  104|       |
  105|   817k|  ++list->_size;
  106|   817k|}
Curl_llist_append:
  119|  44.9k|{
  120|  44.9k|  DEBUGASSERT(list);
  ------------------
  |  | 1081|  44.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (120:3): [True: 0, False: 44.9k]
  |  Branch (120:3): [True: 44.9k, False: 0]
  ------------------
  121|  44.9k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1081|  44.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (121:3): [True: 0, False: 44.9k]
  |  Branch (121:3): [True: 44.9k, False: 0]
  ------------------
  122|  44.9k|  DEBUGASSERT(ne);
  ------------------
  |  | 1081|  44.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 44.9k]
  |  Branch (122:3): [True: 44.9k, False: 0]
  ------------------
  123|  44.9k|  Curl_llist_insert_next(list, list->_tail, p, ne);
  124|  44.9k|}
Curl_node_take_elem:
  127|   817k|{
  128|   817k|  void *ptr;
  129|   817k|  struct Curl_llist *list;
  130|   817k|  if(!e)
  ------------------
  |  Branch (130:6): [True: 0, False: 817k]
  ------------------
  131|      0|    return NULL;
  132|       |
  133|   817k|  list = e->_list;
  134|   817k|  DEBUGASSERT(list);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (134:3): [True: 0, False: 817k]
  |  Branch (134:3): [True: 817k, False: 0]
  ------------------
  135|   817k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 817k]
  |  Branch (135:3): [True: 817k, False: 0]
  ------------------
  136|   817k|  DEBUGASSERT(list->_size);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (136:3): [True: 0, False: 817k]
  |  Branch (136:3): [True: 817k, False: 0]
  ------------------
  137|   817k|  DEBUGASSERT(e->_init == NODEINIT);
  ------------------
  |  | 1081|   817k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (137:3): [True: 0, False: 817k]
  |  Branch (137:3): [True: 817k, False: 0]
  ------------------
  138|   817k|  if(list) {
  ------------------
  |  Branch (138:6): [True: 817k, False: 0]
  ------------------
  139|   817k|    if(e == list->_head) {
  ------------------
  |  Branch (139:8): [True: 59.0k, False: 758k]
  ------------------
  140|  59.0k|      list->_head = e->_next;
  141|       |
  142|  59.0k|      if(!list->_head)
  ------------------
  |  Branch (142:10): [True: 43.9k, False: 15.1k]
  ------------------
  143|  43.9k|        list->_tail = NULL;
  144|  15.1k|      else
  145|  15.1k|        e->_next->_prev = NULL;
  146|  59.0k|    }
  147|   758k|    else {
  148|   758k|      if(e->_prev)
  ------------------
  |  Branch (148:10): [True: 758k, False: 18.4E]
  ------------------
  149|   758k|        e->_prev->_next = e->_next;
  150|       |
  151|   758k|      if(!e->_next)
  ------------------
  |  Branch (151:10): [True: 739k, False: 18.8k]
  ------------------
  152|   739k|        list->_tail = e->_prev;
  153|  18.8k|      else
  154|  18.8k|        e->_next->_prev = e->_prev;
  155|   758k|    }
  156|   817k|    --list->_size;
  157|   817k|  }
  158|   817k|  ptr = e->_ptr;
  159|       |
  160|   817k|  e->_list = NULL;
  161|   817k|  e->_ptr  = NULL;
  162|   817k|  e->_prev = NULL;
  163|   817k|  e->_next = NULL;
  164|   817k|#ifdef DEBUGBUILD
  165|   817k|  e->_init = NODEREM; /* specific pattern on remove - not zero */
  ------------------
  |  |   31|   817k|#define NODEREM   0x54321012 /* random pattern */
  ------------------
  166|   817k|#endif
  167|       |
  168|   817k|  return ptr;
  169|   817k|}
Curl_node_remove:
  188|   801k|{
  189|       |  node_uremove(e, NULL);
  190|   801k|}
Curl_llist_destroy:
  193|   426k|{
  194|   426k|  if(list) {
  ------------------
  |  Branch (194:6): [True: 426k, False: 0]
  ------------------
  195|   426k|    DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1081|   426k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (195:5): [True: 0, False: 426k]
  |  Branch (195:5): [True: 426k, False: 0]
  ------------------
  196|   441k|    while(list->_size > 0)
  ------------------
  |  Branch (196:11): [True: 14.5k, False: 426k]
  ------------------
  197|  14.5k|      node_uremove(list->_tail, user);
  198|   426k|  }
  199|   426k|}
Curl_llist_head:
  204|  8.18M|{
  205|  8.18M|  DEBUGASSERT(list);
  ------------------
  |  | 1081|  8.18M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (205:3): [True: 0, False: 8.18M]
  |  Branch (205:3): [True: 8.18M, False: 18.4E]
  ------------------
  206|  8.18M|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1081|  8.18M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (206:3): [True: 0, False: 8.18M]
  |  Branch (206:3): [True: 8.18M, False: 18.4E]
  ------------------
  207|  8.18M|  return VERIFYNODE(list->_head);
  ------------------
  |  |   33|  8.18M|#define VERIFYNODE(x) verifynode(x)
  ------------------
  208|  8.18M|}
Curl_llist_count:
  227|   874k|{
  228|   874k|  DEBUGASSERT(list);
  ------------------
  |  | 1081|   874k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (228:3): [True: 0, False: 874k]
  |  Branch (228:3): [True: 874k, False: 0]
  ------------------
  229|   874k|  DEBUGASSERT(list->_init == LLISTINIT);
  ------------------
  |  | 1081|   874k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (229:3): [True: 0, False: 874k]
  |  Branch (229:3): [True: 874k, False: 0]
  ------------------
  230|   874k|  return list->_size;
  231|   874k|}
Curl_node_elem:
  235|  2.56M|{
  236|  2.56M|  DEBUGASSERT(n);
  ------------------
  |  | 1081|  2.56M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (236:3): [True: 0, False: 2.56M]
  |  Branch (236:3): [True: 2.56M, False: 0]
  ------------------
  237|  2.56M|  DEBUGASSERT(n->_init == NODEINIT);
  ------------------
  |  | 1081|  2.56M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (237:3): [True: 0, False: 2.56M]
  |  Branch (237:3): [True: 2.56M, False: 0]
  ------------------
  238|  2.56M|  return n->_ptr;
  239|  2.56M|}
Curl_node_next:
  244|  1.75M|{
  245|  1.75M|  DEBUGASSERT(n);
  ------------------
  |  | 1081|  1.75M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 1.75M]
  |  Branch (245:3): [True: 1.75M, False: 0]
  ------------------
  246|  1.75M|  DEBUGASSERT(n->_init == NODEINIT);
  ------------------
  |  | 1081|  1.75M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (246:3): [True: 0, False: 1.75M]
  |  Branch (246:3): [True: 1.75M, False: 0]
  ------------------
  247|  1.75M|  return VERIFYNODE(n->_next);
  ------------------
  |  |   33|  1.75M|#define VERIFYNODE(x) verifynode(x)
  ------------------
  248|  1.75M|}
Curl_node_llist:
  268|  35.2k|{
  269|  35.2k|  DEBUGASSERT(n);
  ------------------
  |  | 1081|  35.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (269:3): [True: 0, False: 35.2k]
  |  Branch (269:3): [True: 35.2k, False: 0]
  ------------------
  270|  35.2k|  DEBUGASSERT(!n->_list || n->_init == NODEINIT);
  ------------------
  |  | 1081|  35.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:3): [True: 35.2k, False: 0]
  |  Branch (270:3): [True: 0, False: 0]
  |  Branch (270:3): [True: 11.6k, False: 23.5k]
  |  Branch (270:3): [True: 23.5k, False: 0]
  ------------------
  271|  35.2k|  return n->_list;
  272|  35.2k|}
llist.c:node_uremove:
  172|   816k|{
  173|   816k|  struct Curl_llist *list;
  174|   816k|  void *ptr;
  175|   816k|  if(!e)
  ------------------
  |  Branch (175:6): [True: 0, False: 816k]
  ------------------
  176|      0|    return;
  177|       |
  178|   816k|  list = e->_list;
  179|   816k|  DEBUGASSERT(list);
  ------------------
  |  | 1081|   816k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 816k]
  |  Branch (179:3): [True: 816k, False: 0]
  ------------------
  180|   816k|  if(list) {
  ------------------
  |  Branch (180:6): [True: 816k, False: 0]
  ------------------
  181|   816k|    ptr = Curl_node_take_elem(e);
  182|   816k|    if(list->_dtor)
  ------------------
  |  Branch (182:8): [True: 0, False: 816k]
  ------------------
  183|      0|      list->_dtor(user, ptr);
  184|   816k|  }
  185|   816k|}
llist.c:verifynode:
   35|  9.94M|{
   36|  9.94M|  DEBUGASSERT(!n || (n->_init == NODEINIT));
  ------------------
  |  | 1081|  9.94M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (36:3): [True: 9.94M, False: 0]
  |  Branch (36:3): [True: 0, False: 0]
  |  Branch (36:3): [True: 7.38M, False: 2.55M]
  |  Branch (36:3): [True: 2.55M, False: 0]
  ------------------
   37|  9.94M|  return n;
   38|  9.94M|}

Curl_md5it:
  549|  2.81k|{
  550|  2.81k|  CURLcode result;
  551|  2.81k|  my_md5_ctx ctx;
  552|       |
  553|  2.81k|  result = my_md5_init(&ctx);
  554|  2.81k|  if(!result) {
  ------------------
  |  Branch (554:6): [True: 2.81k, False: 0]
  ------------------
  555|  2.81k|    do {
  556|  2.81k|      unsigned int ilen = (unsigned int)CURLMIN(len, UINT_MAX);
  ------------------
  |  | 1287|  2.81k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 2.81k, False: 0]
  |  |  ------------------
  ------------------
  557|  2.81k|      my_md5_update(&ctx, input, ilen);
  558|  2.81k|      input += ilen;
  559|  2.81k|      len -= ilen;
  560|  2.81k|    } while(len);
  ------------------
  |  Branch (560:13): [True: 0, False: 2.81k]
  ------------------
  561|  2.81k|    my_md5_final(output, &ctx);
  562|  2.81k|  }
  563|  2.81k|  return result;
  564|  2.81k|}
md5.c:my_md5_init:
   82|  2.81k|{
   83|  2.81k|  if(!MD5_Init(ctx))
  ------------------
  |  Branch (83:6): [True: 0, False: 2.81k]
  ------------------
   84|      0|    return CURLE_OUT_OF_MEMORY;
   85|       |
   86|  2.81k|  return CURLE_OK;
   87|  2.81k|}
md5.c:my_md5_update:
   91|  2.81k|{
   92|  2.81k|  (void)MD5_Update(ctx, input, len);
   93|  2.81k|}
md5.c:my_md5_final:
   96|  2.81k|{
   97|  2.81k|  (void)MD5_Final(digest, ctx);
   98|  2.81k|}

curl_dbg_malloc:
  212|   853k|{
  213|   853k|  struct memdebug *mem;
  214|   853k|  size_t size;
  215|       |
  216|   853k|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1081|   853k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (216:3): [True: 0, False: 853k]
  |  Branch (216:3): [True: 853k, False: 0]
  ------------------
  217|       |
  218|   853k|  if(countcheck("malloc", line, source))
  ------------------
  |  Branch (218:6): [True: 0, False: 853k]
  ------------------
  219|      0|    return NULL;
  220|       |
  221|       |  /* alloc at least 64 bytes */
  222|   853k|  size = sizeof(struct memdebug) + wantedsize;
  223|       |
  224|   853k|  mem = Curl_cmalloc(size);
  225|   853k|  if(mem) {
  ------------------
  |  Branch (225:6): [True: 853k, False: 0]
  ------------------
  226|   853k|    mem->size = wantedsize;
  227|   853k|  }
  228|       |
  229|   853k|  if(source)
  ------------------
  |  Branch (229:6): [True: 415k, False: 437k]
  ------------------
  230|   415k|    curl_dbg_log("MEM %s:%d malloc(%zu) = %p\n",
  231|   415k|                 source, line, wantedsize,
  232|   415k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (232:18): [True: 415k, False: 0]
  ------------------
  233|       |
  234|   853k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (234:10): [True: 853k, False: 0]
  ------------------
  235|   853k|}
curl_dbg_calloc:
  240|   717k|{
  241|   717k|  struct memdebug *mem;
  242|   717k|  size_t size, user_size;
  243|       |
  244|   717k|  DEBUGASSERT(wanted_elements != 0);
  ------------------
  |  | 1081|   717k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (244:3): [True: 0, False: 717k]
  |  Branch (244:3): [True: 717k, False: 0]
  ------------------
  245|   717k|  DEBUGASSERT(wanted_size != 0);
  ------------------
  |  | 1081|   717k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (245:3): [True: 0, False: 717k]
  |  Branch (245:3): [True: 717k, False: 0]
  ------------------
  246|       |
  247|   717k|  if(countcheck("calloc", line, source))
  ------------------
  |  Branch (247:6): [True: 0, False: 717k]
  ------------------
  248|      0|    return NULL;
  249|       |
  250|       |  /* alloc at least 64 bytes */
  251|   717k|  user_size = wanted_size * wanted_elements;
  252|   717k|  size = sizeof(struct memdebug) + user_size;
  253|       |
  254|   717k|  mem = Curl_ccalloc(1, size);
  255|   717k|  if(mem)
  ------------------
  |  Branch (255:6): [True: 717k, False: 0]
  ------------------
  256|   717k|    mem->size = user_size;
  257|       |
  258|   717k|  if(source)
  ------------------
  |  Branch (258:6): [True: 717k, False: 0]
  ------------------
  259|   717k|    curl_dbg_log("MEM %s:%d calloc(%zu,%zu) = %p\n",
  260|   717k|                 source, line, wanted_elements, wanted_size,
  261|   717k|                 mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (261:18): [True: 717k, False: 0]
  ------------------
  262|       |
  263|   717k|  return mem ? mem->mem : NULL;
  ------------------
  |  Branch (263:10): [True: 717k, False: 0]
  ------------------
  264|   717k|}
curl_dbg_strdup:
  268|   437k|{
  269|   437k|  char *mem;
  270|   437k|  size_t len;
  271|       |
  272|   437k|  DEBUGASSERT(str != NULL);
  ------------------
  |  | 1081|   437k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (272:3): [True: 0, False: 437k]
  |  Branch (272:3): [True: 437k, False: 0]
  ------------------
  273|       |
  274|   437k|  if(countcheck("strdup", line, source))
  ------------------
  |  Branch (274:6): [True: 0, False: 437k]
  ------------------
  275|      0|    return NULL;
  276|       |
  277|   437k|  len = strlen(str) + 1;
  278|       |
  279|   437k|  mem = curl_dbg_malloc(len, 0, NULL); /* NULL prevents logging */
  280|   437k|  if(mem)
  ------------------
  |  Branch (280:6): [True: 437k, False: 0]
  ------------------
  281|   437k|    memcpy(mem, str, len);
  282|       |
  283|   437k|  if(source)
  ------------------
  |  Branch (283:6): [True: 437k, False: 0]
  ------------------
  284|   437k|    curl_dbg_log("MEM %s:%d strdup(%p) (%zu) = %p\n",
  285|   437k|                 source, line, (const void *)str, len, (const void *)mem);
  286|       |
  287|   437k|  return mem;
  288|   437k|}
curl_dbg_realloc:
  321|  3.19M|{
  322|  3.19M|  struct memdebug *mem = NULL;
  323|  3.19M|  bool was_locked;
  324|       |
  325|  3.19M|  size_t size = sizeof(struct memdebug) + wantedsize;
  326|       |
  327|  3.19M|  DEBUGASSERT(wantedsize != 0);
  ------------------
  |  | 1081|  3.19M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (327:3): [True: 0, False: 3.19M]
  |  Branch (327:3): [True: 3.19M, False: 0]
  ------------------
  328|       |
  329|  3.19M|  if(countcheck("realloc", line, source))
  ------------------
  |  Branch (329:6): [True: 0, False: 3.19M]
  ------------------
  330|      0|    return NULL;
  331|       |
  332|       |  /* need to realloc under lock, as we get out-of-order log
  333|       |   * entries otherwise, since another thread might alloc the
  334|       |   * memory released by realloc() before otherwise would log it. */
  335|  3.19M|  was_locked = curl_dbg_lock();
  336|       |#ifdef __INTEL_COMPILER
  337|       |#  pragma warning(push)
  338|       |#  pragma warning(disable:1684)
  339|       |   /* 1684: conversion from pointer to same-sized integral type */
  340|       |#endif
  341|       |
  342|  3.19M|  if(ptr)
  ------------------
  |  Branch (342:6): [True: 364k, False: 2.83M]
  ------------------
  343|   364k|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  344|       |
  345|       |#ifdef __INTEL_COMPILER
  346|       |#  pragma warning(pop)
  347|       |#endif
  348|       |
  349|  3.19M|  mem = Curl_crealloc(mem, size);
  350|  3.19M|  if(source)
  ------------------
  |  Branch (350:6): [True: 3.19M, False: 0]
  ------------------
  351|  3.19M|    curl_dbg_log_locked("MEM %s:%d realloc(%p, %zu) = %p\n",
  352|  3.19M|                        source, line, (void *)ptr, wantedsize,
  353|  3.19M|                        mem ? (void *)mem->mem : (void *)0);
  ------------------
  |  Branch (353:25): [True: 3.19M, False: 0]
  ------------------
  354|       |
  355|  3.19M|  curl_dbg_unlock(was_locked);
  356|  3.19M|  if(mem) {
  ------------------
  |  Branch (356:6): [True: 3.19M, False: 0]
  ------------------
  357|  3.19M|    mem->size = wantedsize;
  358|  3.19M|    return mem->mem;
  359|  3.19M|  }
  360|       |
  361|      0|  return NULL;
  362|  3.19M|}
curl_dbg_free:
  365|  13.6M|{
  366|  13.6M|  if(ptr) {
  ------------------
  |  Branch (366:6): [True: 4.40M, False: 9.29M]
  ------------------
  367|  4.40M|    struct memdebug *mem;
  368|       |
  369|  4.40M|    if(source)
  ------------------
  |  Branch (369:8): [True: 4.40M, False: 0]
  ------------------
  370|  4.40M|      curl_dbg_log("MEM %s:%d free(%p)\n", source, line, (void *)ptr);
  371|       |
  372|       |#ifdef __INTEL_COMPILER
  373|       |#  pragma warning(push)
  374|       |#  pragma warning(disable:1684)
  375|       |   /* 1684: conversion from pointer to same-sized integral type */
  376|       |#endif
  377|       |
  378|  4.40M|    mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
  379|       |
  380|       |#ifdef __INTEL_COMPILER
  381|       |#  pragma warning(pop)
  382|       |#endif
  383|       |
  384|       |    /* free for real */
  385|  4.40M|    Curl_cfree(mem);
  386|  4.40M|  }
  387|  13.6M|}
curl_dbg_socket:
  391|  15.4k|{
  392|  15.4k|  curl_socket_t sockfd;
  393|       |
  394|  15.4k|  if(countcheck("socket", line, source))
  ------------------
  |  Branch (394:6): [True: 0, False: 15.4k]
  ------------------
  395|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  396|       |
  397|       |  /* !checksrc! disable BANNEDFUNC 1 */
  398|  15.4k|  sockfd = socket(domain, type, protocol);
  399|       |
  400|  15.4k|  if(source && (sockfd != CURL_SOCKET_BAD))
  ------------------
  |  |  145|  15.4k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (400:6): [True: 15.4k, False: 0]
  |  Branch (400:16): [True: 15.4k, False: 0]
  ------------------
  401|  15.4k|    curl_dbg_log("FD %s:%d socket() = %" FMT_SOCKET_T "\n",
  402|  15.4k|                 source, line, sockfd);
  403|       |
  404|  15.4k|  return sockfd;
  405|  15.4k|}
curl_dbg_mark_sclose:
  461|  25.6k|{
  462|  25.6k|  if(source)
  ------------------
  |  Branch (462:6): [True: 25.6k, False: 0]
  ------------------
  463|  25.6k|    curl_dbg_log("FD %s:%d sclose(%" FMT_SOCKET_T ")\n",
  464|  25.6k|                 source, line, sockfd);
  465|  25.6k|}
curl_dbg_sclose:
  469|  25.6k|{
  470|  25.6k|  curl_dbg_mark_sclose(sockfd, line, source);
  471|  25.6k|  return CURL_SCLOSE(sockfd);
  ------------------
  |  |  999|  25.6k|#  define CURL_SCLOSE(x)  close(x)
  ------------------
  472|  25.6k|}
curl_dbg_fopen:
  477|  82.5k|{
  478|  82.5k|  FILE *res = CURLX_FOPEN_LOW(file, mode);
  ------------------
  |  |   64|  82.5k|#define CURLX_FOPEN_LOW         fopen
  ------------------
  479|  82.5k|  if(source)
  ------------------
  |  Branch (479:6): [True: 82.5k, False: 0]
  ------------------
  480|  82.5k|    curl_dbg_log("FILE %s:%d fopen(\"%s\",\"%s\") = %p\n",
  481|  82.5k|                 source, line, file, mode, (void *)res);
  482|       |
  483|  82.5k|  return res;
  484|  82.5k|}
curl_dbg_fclose:
  510|  82.5k|{
  511|  82.5k|  int res;
  512|       |
  513|  82.5k|  DEBUGASSERT(file != NULL);
  ------------------
  |  | 1081|  82.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (513:3): [True: 0, False: 82.5k]
  |  Branch (513:3): [True: 82.5k, False: 0]
  ------------------
  514|       |
  515|  82.5k|  if(source)
  ------------------
  |  Branch (515:6): [True: 82.5k, False: 0]
  ------------------
  516|  82.5k|    curl_dbg_log("FILE %s:%d fclose(%p)\n", source, line, (void *)file);
  517|       |
  518|       |  /* !checksrc! disable BANNEDFUNC 1 */
  519|  82.5k|  res = fclose(file);
  520|       |
  521|  82.5k|  return res;
  522|  82.5k|}
curl_dbg_log:
  565|  6.17M|{
  566|  6.17M|  bool was_locked;
  567|  6.17M|  va_list ap;
  568|       |
  569|  6.17M|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (569:6): [True: 6.17M, False: 18.4E]
  ------------------
  570|  6.17M|    return;
  571|       |
  572|  18.4E|  was_locked = curl_dbg_lock();
  573|  18.4E|  va_start(ap, format);
  574|  18.4E|  curl_dbg_vlog(format, ap);
  575|       |  va_end(ap);
  576|  18.4E|  curl_dbg_unlock(was_locked);
  577|  18.4E|}
memdebug.c:countcheck:
  187|  5.21M|{
  188|       |  /* if source is NULL, then the call is made internally and this check
  189|       |     should not be made */
  190|  5.21M|  if(memlimit && source) {
  ------------------
  |  Branch (190:6): [True: 0, False: 5.21M]
  |  Branch (190:18): [True: 0, False: 0]
  ------------------
  191|      0|    if(!memsize) {
  ------------------
  |  Branch (191:8): [True: 0, False: 0]
  ------------------
  192|       |      /* log to file */
  193|      0|      curl_dbg_log("LIMIT %s:%d %s reached memlimit\n", source, line, func);
  194|       |      /* log to stderr also */
  195|      0|      curl_mfprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
  196|      0|                    source, line, func);
  197|      0|      dump_bt();
  198|      0|      fflush(curl_dbg_logfile); /* because it might crash now */
  199|       |      /* !checksrc! disable ERRNOVAR 1 */
  200|      0|      errno = ENOMEM;
  201|      0|      return TRUE; /* RETURN ERROR! */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  202|      0|    }
  203|      0|    else
  204|      0|      memsize--; /* countdown */
  205|      0|  }
  206|       |
  207|  5.21M|  return FALSE; /* allow this */
  ------------------
  |  | 1058|  5.21M|#define FALSE false
  ------------------
  208|  5.21M|}
memdebug.c:curl_dbg_lock:
   74|  3.19M|{
   75|  3.19M|#ifdef USE_MUTEX
   76|  3.19M|  if(dbg_mutex_init) {
  ------------------
  |  Branch (76:6): [True: 0, False: 3.19M]
  ------------------
   77|      0|    Curl_mutex_acquire(&dbg_mutex);
  ------------------
  |  |   36|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
   78|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   79|      0|  }
   80|  3.19M|#endif
   81|  3.19M|  return FALSE;
  ------------------
  |  | 1058|  3.19M|#define FALSE false
  ------------------
   82|  3.19M|}
memdebug.c:curl_dbg_unlock:
   85|  3.19M|{
   86|  3.19M|#ifdef USE_MUTEX
   87|  3.19M|  if(was_locked)
  ------------------
  |  Branch (87:6): [True: 0, False: 3.19M]
  ------------------
   88|      0|    Curl_mutex_release(&dbg_mutex);
  ------------------
  |  |   37|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
   89|       |#else
   90|       |  (void)was_locked;
   91|       |#endif
   92|  3.19M|}
memdebug.c:curl_dbg_log_locked:
  552|  3.19M|{
  553|  3.19M|  va_list ap;
  554|       |
  555|  3.19M|  if(!curl_dbg_logfile)
  ------------------
  |  Branch (555:6): [True: 3.19M, False: 0]
  ------------------
  556|  3.19M|    return;
  557|       |
  558|  3.19M|  va_start(ap, format);
  559|      0|  curl_dbg_vlog(format, ap);
  560|       |  va_end(ap);
  561|      0|}

Curl_mime_cleanpart:
 1090|  69.9k|{
 1091|  69.9k|  if(part) {
  ------------------
  |  Branch (1091:6): [True: 3.22k, False: 66.6k]
  ------------------
 1092|  3.22k|    cleanup_part_content(part);
 1093|  3.22k|    curl_slist_free_all(part->curlheaders);
 1094|  3.22k|    if(part->flags & MIME_USERHEADERS_OWNER)
  ------------------
  |  |   34|  3.22k|#define MIME_USERHEADERS_OWNER  (1 << 0)
  ------------------
  |  Branch (1094:8): [True: 0, False: 3.22k]
  ------------------
 1095|      0|      curl_slist_free_all(part->userheaders);
 1096|  3.22k|    curlx_safefree(part->mimetype);
  ------------------
  |  | 1327|  3.22k|  do {                      \
  |  | 1328|  3.22k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  3.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  3.22k|    (ptr) = NULL;           \
  |  | 1330|  3.22k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 3.22k]
  |  |  ------------------
  ------------------
 1097|  3.22k|    curlx_safefree(part->name);
  ------------------
  |  | 1327|  3.22k|  do {                      \
  |  | 1328|  3.22k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  3.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  3.22k|    (ptr) = NULL;           \
  |  | 1330|  3.22k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 3.22k]
  |  |  ------------------
  ------------------
 1098|       |    curlx_safefree(part->filename);
  ------------------
  |  | 1327|  3.22k|  do {                      \
  |  | 1328|  3.22k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  3.22k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  3.22k|    (ptr) = NULL;           \
  |  | 1330|  3.22k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 3.22k]
  |  |  ------------------
  ------------------
 1099|  3.22k|    Curl_mime_initpart(part);
 1100|  3.22k|  }
 1101|  69.9k|}
curl_mime_free:
 1105|    353|{
 1106|    353|  curl_mimepart *part;
 1107|       |
 1108|    353|  if(mime) {
  ------------------
  |  Branch (1108:6): [True: 353, False: 0]
  ------------------
 1109|    353|    mime_subparts_unbind(mime);  /* Be sure it is not referenced anymore. */
 1110|  3.24k|    while(mime->firstpart) {
  ------------------
  |  Branch (1110:11): [True: 2.89k, False: 353]
  ------------------
 1111|  2.89k|      part = mime->firstpart;
 1112|  2.89k|      mime->firstpart = part->nextpart;
 1113|  2.89k|      Curl_mime_cleanpart(part);
 1114|  2.89k|      curlx_free(part);
  ------------------
  |  | 1483|  2.89k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1115|  2.89k|    }
 1116|    353|    curlx_free(mime);
  ------------------
  |  | 1483|    353|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1117|    353|  }
 1118|    353|}
curl_mime_init:
 1204|    353|{
 1205|    353|  curl_mime *mime;
 1206|       |
 1207|    353|  mime = (curl_mime *)curlx_malloc(sizeof(*mime));
  ------------------
  |  | 1478|    353|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1208|       |
 1209|    353|  if(mime) {
  ------------------
  |  Branch (1209:6): [True: 353, False: 0]
  ------------------
 1210|    353|    mime->parent = NULL;
 1211|    353|    mime->firstpart = NULL;
 1212|    353|    mime->lastpart = NULL;
 1213|       |
 1214|    353|    memset(mime->boundary, '-', MIME_BOUNDARY_DASHES);
  ------------------
  |  |   28|    353|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1215|    353|    if(Curl_rand_alnum(easy,
  ------------------
  |  Branch (1215:8): [True: 0, False: 353]
  ------------------
 1216|    353|                       (unsigned char *)&mime->boundary[MIME_BOUNDARY_DASHES],
  ------------------
  |  |   28|    353|#define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
  ------------------
 1217|    353|                       MIME_RAND_BOUNDARY_CHARS + 1)) {
  ------------------
  |  |   29|    353|#define MIME_RAND_BOUNDARY_CHARS        22  /* Nb. of random boundary chars. */
  ------------------
 1218|       |      /* failed to get random separator, bail out */
 1219|      0|      curlx_free(mime);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1220|      0|      return NULL;
 1221|      0|    }
 1222|    353|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1223|    353|  }
 1224|       |
 1225|    353|  return mime;
 1226|    353|}
Curl_mime_initpart:
 1230|  6.45k|{
 1231|  6.45k|  memset(part, 0, sizeof(*part));
 1232|  6.45k|  part->lastreadstatus = 1; /* Successful read status. */
 1233|       |  mimesetstate(&part->state, MIMESTATE_BEGIN, NULL);
 1234|  6.45k|}
curl_mime_addpart:
 1238|  2.89k|{
 1239|  2.89k|  curl_mimepart *part;
 1240|       |
 1241|  2.89k|  if(!mime)
  ------------------
  |  Branch (1241:6): [True: 0, False: 2.89k]
  ------------------
 1242|      0|    return NULL;
 1243|       |
 1244|  2.89k|  part = (curl_mimepart *)curlx_malloc(sizeof(*part));
  ------------------
  |  | 1478|  2.89k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1245|       |
 1246|  2.89k|  if(part) {
  ------------------
  |  Branch (1246:6): [True: 2.89k, False: 0]
  ------------------
 1247|  2.89k|    Curl_mime_initpart(part);
 1248|  2.89k|    part->parent = mime;
 1249|       |
 1250|  2.89k|    if(mime->lastpart)
  ------------------
  |  Branch (1250:8): [True: 2.54k, False: 353]
  ------------------
 1251|  2.54k|      mime->lastpart->nextpart = part;
 1252|    353|    else
 1253|    353|      mime->firstpart = part;
 1254|       |
 1255|  2.89k|    mime->lastpart = part;
 1256|  2.89k|  }
 1257|       |
 1258|  2.89k|  return part;
 1259|  2.89k|}
curl_mime_name:
 1263|    211|{
 1264|    211|  if(!part)
  ------------------
  |  Branch (1264:6): [True: 0, False: 211]
  ------------------
 1265|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1266|       |
 1267|    211|  curlx_safefree(part->name);
  ------------------
  |  | 1327|    211|  do {                      \
  |  | 1328|    211|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    211|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    211|    (ptr) = NULL;           \
  |  | 1330|    211|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 211]
  |  |  ------------------
  ------------------
 1268|       |
 1269|    211|  if(name) {
  ------------------
  |  Branch (1269:6): [True: 211, False: 0]
  ------------------
 1270|    211|    part->name = curlx_strdup(name);
  ------------------
  |  | 1477|    211|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1271|    211|    if(!part->name)
  ------------------
  |  Branch (1271:8): [True: 0, False: 211]
  ------------------
 1272|      0|      return CURLE_OUT_OF_MEMORY;
 1273|    211|  }
 1274|       |
 1275|    211|  return CURLE_OK;
 1276|    211|}
curl_mime_data:
 1297|    670|{
 1298|    670|  if(!part)
  ------------------
  |  Branch (1298:6): [True: 0, False: 670]
  ------------------
 1299|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1300|       |
 1301|    670|  cleanup_part_content(part);
 1302|       |
 1303|    670|  if(data) {
  ------------------
  |  Branch (1303:6): [True: 670, False: 0]
  ------------------
 1304|    670|    if(datasize == CURL_ZERO_TERMINATED)
  ------------------
  |  | 2423|    670|#define CURL_ZERO_TERMINATED ((size_t)-1)
  ------------------
  |  Branch (1304:8): [True: 0, False: 670]
  ------------------
 1305|      0|      datasize = strlen(data);
 1306|       |
 1307|    670|    part->data = curlx_memdup0(data, datasize);
 1308|    670|    if(!part->data)
  ------------------
  |  Branch (1308:8): [True: 0, False: 670]
  ------------------
 1309|      0|      return CURLE_OUT_OF_MEMORY;
 1310|       |
 1311|    670|    part->datasize = datasize;
 1312|    670|    part->readfunc = mime_mem_read;
 1313|    670|    part->seekfunc = mime_mem_seek;
 1314|    670|    part->freefunc = mime_mem_free;
 1315|    670|    part->flags |= MIME_FAST_READ;
  ------------------
  |  |   36|    670|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1316|    670|    part->kind = MIMEKIND_DATA;
 1317|    670|  }
 1318|       |
 1319|    670|  return CURLE_OK;
 1320|    670|}
Curl_mime_set_subparts:
 1463|    334|{
 1464|    334|  curl_mime *root;
 1465|       |
 1466|    334|  if(!part)
  ------------------
  |  Branch (1466:6): [True: 0, False: 334]
  ------------------
 1467|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1468|       |
 1469|       |  /* Accept setting twice the same subparts. */
 1470|    334|  if(part->kind == MIMEKIND_MULTIPART && part->arg == subparts)
  ------------------
  |  Branch (1470:6): [True: 0, False: 334]
  |  Branch (1470:42): [True: 0, False: 0]
  ------------------
 1471|      0|    return CURLE_OK;
 1472|       |
 1473|    334|  cleanup_part_content(part);
 1474|       |
 1475|    334|  if(subparts) {
  ------------------
  |  Branch (1475:6): [True: 334, False: 0]
  ------------------
 1476|       |    /* Should not have been attached already. */
 1477|    334|    if(subparts->parent)
  ------------------
  |  Branch (1477:8): [True: 0, False: 334]
  ------------------
 1478|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1479|       |
 1480|       |    /* Should not be the part's root. */
 1481|    334|    root = part->parent;
 1482|    334|    if(root) {
  ------------------
  |  Branch (1482:8): [True: 0, False: 334]
  ------------------
 1483|      0|      while(root->parent && root->parent->parent)
  ------------------
  |  Branch (1483:13): [True: 0, False: 0]
  |  Branch (1483:29): [True: 0, False: 0]
  ------------------
 1484|      0|        root = root->parent->parent;
 1485|      0|      if(subparts == root) {
  ------------------
  |  Branch (1485:10): [True: 0, False: 0]
  ------------------
 1486|       |        /* cannot add as a subpart of itself. */
 1487|      0|        return CURLE_BAD_FUNCTION_ARGUMENT;
 1488|      0|      }
 1489|      0|    }
 1490|       |
 1491|       |    /* If subparts have already been used as a top-level MIMEPOST,
 1492|       |       they might not be positioned at start. Rewind them now, as
 1493|       |       a future check while rewinding the parent may cause this
 1494|       |       content to be skipped. */
 1495|    334|    if(mime_subparts_seek(subparts, (curl_off_t)0, SEEK_SET) !=
  ------------------
  |  Branch (1495:8): [True: 0, False: 334]
  ------------------
 1496|    334|       CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|    334|#define CURL_SEEKFUNC_OK       0
  ------------------
 1497|      0|      return CURLE_SEND_FAIL_REWIND;
 1498|       |
 1499|    334|    subparts->parent = part;
 1500|       |    /* Subparts are processed internally: no read callback. */
 1501|    334|    part->seekfunc = mime_subparts_seek;
 1502|    334|    part->freefunc = take_ownership ? mime_subparts_free :
  ------------------
  |  Branch (1502:22): [True: 0, False: 334]
  ------------------
 1503|    334|      mime_subparts_unbind;
 1504|    334|    part->arg = subparts;
 1505|    334|    part->datasize = -1;
 1506|    334|    part->kind = MIMEKIND_MULTIPART;
 1507|    334|  }
 1508|       |
 1509|    334|  return CURLE_OK;
 1510|    334|}
mime.c:cleanup_part_content:
 1048|  4.56k|{
 1049|  4.56k|  if(part->freefunc)
  ------------------
  |  Branch (1049:6): [True: 670, False: 3.89k]
  ------------------
 1050|    670|    part->freefunc(part->arg);
 1051|       |
 1052|  4.56k|  part->readfunc = NULL;
 1053|  4.56k|  part->seekfunc = NULL;
 1054|  4.56k|  part->freefunc = NULL;
 1055|  4.56k|  part->arg = (void *)part;           /* Defaults to part itself. */
 1056|  4.56k|  part->data = NULL;
 1057|  4.56k|  part->fp = NULL;
 1058|  4.56k|  part->datasize = (curl_off_t)0;     /* No size yet. */
 1059|  4.56k|  cleanup_encoder_state(&part->encstate);
 1060|  4.56k|  part->kind = MIMEKIND_NONE;
 1061|  4.56k|  part->flags &= ~(unsigned int)MIME_FAST_READ;
  ------------------
  |  |   36|  4.56k|#define MIME_FAST_READ          (1 << 2)
  ------------------
 1062|  4.56k|  part->lastreadstatus = 1; /* Successful read status. */
 1063|  4.56k|  part->state.state = MIMESTATE_BEGIN;
 1064|  4.56k|}
mime.c:cleanup_encoder_state:
  284|  4.56k|{
  285|  4.56k|  p->pos = 0;
  286|  4.56k|  p->bufbeg = 0;
  287|  4.56k|  p->bufend = 0;
  288|  4.56k|}
mime.c:mime_subparts_unbind:
 1079|    353|{
 1080|    353|  curl_mime *mime = (curl_mime *)ptr;
 1081|       |
 1082|    353|  if(mime && mime->parent) {
  ------------------
  |  Branch (1082:6): [True: 353, False: 0]
  |  Branch (1082:14): [True: 334, False: 19]
  ------------------
 1083|    334|    mime->parent->freefunc = NULL;  /* Be sure we will not be called again. */
 1084|    334|    cleanup_part_content(mime->parent);  /* Avoid dangling pointer in part. */
 1085|       |    mime->parent = NULL;
 1086|    334|  }
 1087|    353|}
mime.c:mimesetstate:
  190|  6.81k|{
  191|  6.81k|  state->state = tok;
  192|  6.81k|  state->ptr = ptr;
  193|  6.81k|  state->offset = 0;
  194|  6.81k|}
mime.c:mime_mem_free:
  605|    670|{
  606|       |  curlx_safefree(((curl_mimepart *)ptr)->data);
  ------------------
  |  | 1327|    670|  do {                      \
  |  | 1328|    670|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    670|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    670|    (ptr) = NULL;           \
  |  | 1330|    670|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 670]
  |  |  ------------------
  ------------------
  607|    670|}
mime.c:mime_subparts_seek:
 1023|    334|{
 1024|    334|  curl_mime *mime = (curl_mime *)instream;
 1025|    334|  curl_mimepart *part;
 1026|    334|  int rc = CURL_SEEKFUNC_OK;
  ------------------
  |  |  380|    334|#define CURL_SEEKFUNC_OK       0
  ------------------
 1027|       |
 1028|    334|  if(whence != SEEK_SET || offset)
  ------------------
  |  Branch (1028:6): [True: 0, False: 334]
  |  Branch (1028:28): [True: 0, False: 334]
  ------------------
 1029|      0|    return CURL_SEEKFUNC_CANTSEEK;    /* Only support full rewind. */
  ------------------
  |  |  382|      0|#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking cannot be done, so
  ------------------
 1030|       |
 1031|    334|  if(mime->state.state == MIMESTATE_BEGIN)
  ------------------
  |  Branch (1031:6): [True: 334, False: 0]
  ------------------
 1032|    334|    return CURL_SEEKFUNC_OK;           /* Already rewound. */
  ------------------
  |  |  380|    334|#define CURL_SEEKFUNC_OK       0
  ------------------
 1033|       |
 1034|      0|  for(part = mime->firstpart; part; part = part->nextpart) {
  ------------------
  |  Branch (1034:31): [True: 0, False: 0]
  ------------------
 1035|      0|    int res = mime_part_rewind(part);
 1036|      0|    if(res != CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1036:8): [True: 0, False: 0]
  ------------------
 1037|      0|      rc = res;
 1038|      0|  }
 1039|       |
 1040|      0|  if(rc == CURL_SEEKFUNC_OK)
  ------------------
  |  |  380|      0|#define CURL_SEEKFUNC_OK       0
  ------------------
  |  Branch (1040:6): [True: 0, False: 0]
  ------------------
 1041|      0|    mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
 1042|       |
 1043|      0|  return rc;
 1044|    334|}

curl_mvsnprintf:
 1106|   885k|{
 1107|   885k|  int retcode;
 1108|   885k|  struct nsprintf info;
 1109|       |
 1110|   885k|  info.buffer = buffer;
 1111|   885k|  info.length = 0;
 1112|   885k|  info.max = maxlength;
 1113|       |
 1114|   885k|  retcode = formatf(&info, addbyter, format, args);
 1115|   885k|  if(info.max) {
  ------------------
  |  Branch (1115:6): [True: 885k, False: 18]
  ------------------
 1116|       |    /* we terminate this with a zero byte */
 1117|   885k|    if(info.max == info.length) {
  ------------------
  |  Branch (1117:8): [True: 27, False: 885k]
  ------------------
 1118|       |      /* we are at maximum, scrap the last letter */
 1119|     27|      info.buffer[-1] = 0;
 1120|     27|      DEBUGASSERT(retcode);
  ------------------
  |  | 1081|     27|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1120:7): [True: 0, False: 27]
  |  Branch (1120:7): [True: 27, False: 0]
  ------------------
 1121|     27|      retcode--; /* do not count the nul byte */
 1122|     27|    }
 1123|   885k|    else
 1124|   885k|      info.buffer[0] = 0;
 1125|   885k|  }
 1126|   885k|  return retcode;
 1127|   885k|}
curl_msnprintf:
 1130|   885k|{
 1131|   885k|  int retcode;
 1132|   885k|  va_list args; /* argument pointer */
 1133|   885k|  va_start(args, format);
 1134|   885k|  retcode = curl_mvsnprintf(buffer, maxlength, format, args);
 1135|       |  va_end(args);
 1136|   885k|  return retcode;
 1137|   885k|}
curlx_dyn_vprintf:
 1153|   423k|{
 1154|   423k|  struct asprintf info;
 1155|   423k|  info.b = dyn;
 1156|   423k|  info.merr = MERR_OK;
  ------------------
  |  |   27|   423k|#define MERR_OK        0
  ------------------
 1157|       |
 1158|   423k|  (void)formatf(&info, alloc_addbyter, format, args);
 1159|   423k|  if(info.merr) {
  ------------------
  |  Branch (1159:6): [True: 41, False: 423k]
  ------------------
 1160|     41|    curlx_dyn_free(info.b);
 1161|     41|    return info.merr;
 1162|     41|  }
 1163|   423k|  return 0;
 1164|   423k|}
curl_mvaprintf:
 1167|   124k|{
 1168|   124k|  struct asprintf info;
 1169|   124k|  struct dynbuf dyn;
 1170|   124k|  info.b = &dyn;
 1171|   124k|  curlx_dyn_init(info.b, DYN_APRINTF);
  ------------------
  |  |   70|   124k|#define DYN_APRINTF         8000000
  ------------------
 1172|   124k|  info.merr = MERR_OK;
  ------------------
  |  |   27|   124k|#define MERR_OK        0
  ------------------
 1173|       |
 1174|   124k|  (void)formatf(&info, alloc_addbyter, format, args);
 1175|   124k|  if(info.merr) {
  ------------------
  |  Branch (1175:6): [True: 0, False: 124k]
  ------------------
 1176|      0|    curlx_dyn_free(info.b);
 1177|      0|    return NULL;
 1178|      0|  }
 1179|   124k|  if(curlx_dyn_len(info.b))
  ------------------
  |  Branch (1179:6): [True: 124k, False: 0]
  ------------------
 1180|   124k|    return curlx_dyn_ptr(info.b);
 1181|      0|  return curlx_strdup("");
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1182|   124k|}
curl_maprintf:
 1185|   124k|{
 1186|   124k|  va_list args;
 1187|   124k|  char *s;
 1188|   124k|  va_start(args, format);
 1189|   124k|  s = curl_mvaprintf(format, args);
 1190|       |  va_end(args);
 1191|   124k|  return s;
 1192|   124k|}
curl_mfprintf:
 1232|  6.66k|{
 1233|  6.66k|  int retcode;
 1234|  6.66k|  va_list args; /* argument pointer */
 1235|  6.66k|  va_start(args, format);
 1236|  6.66k|  retcode = formatf(fd, fputc_wrapper, format, args);
 1237|       |  va_end(args);
 1238|  6.66k|  return retcode;
 1239|  6.66k|}
mprintf.c:formatf:
  976|  1.43M|{
  977|  1.43M|  int done = 0;   /* number of characters written */
  978|  1.43M|  int i;
  979|  1.43M|  int ocount = 0; /* number of output segments */
  980|  1.43M|  int icount = 0; /* number of input arguments */
  981|       |
  982|  1.43M|  struct outsegment output[MAX_SEGMENTS];
  983|  1.43M|  struct va_input input[MAX_PARAMETERS];
  984|  1.43M|  char work[BUFFSIZE + 2];
  985|       |
  986|       |  /* Parse the format string */
  987|  1.43M|  if(parsefmt(format, output, input, &ocount, &icount, ap_save))
  ------------------
  |  Branch (987:6): [True: 0, False: 1.43M]
  ------------------
  988|      0|    return 0;
  989|       |
  990|  4.11M|  for(i = 0; i < ocount; i++) {
  ------------------
  |  Branch (990:14): [True: 2.68M, False: 1.43M]
  ------------------
  991|  2.68M|    struct outsegment *optr = &output[i];
  992|  2.68M|    struct va_input *iptr = &input[optr->input];
  993|  2.68M|    struct mproperty p;
  994|  2.68M|    size_t outlen = optr->outlen;
  995|       |
  996|  2.68M|    if(outlen) {
  ------------------
  |  Branch (996:8): [True: 1.51M, False: 1.16M]
  ------------------
  997|  1.51M|      const char *str = optr->start;
  998|  4.18M|      for(; outlen && *str; outlen--) {
  ------------------
  |  Branch (998:13): [True: 2.66M, False: 1.51M]
  |  Branch (998:23): [True: 2.66M, False: 0]
  ------------------
  999|  2.66M|        if(stream(*str++, userp))
  ------------------
  |  Branch (999:12): [True: 4, False: 2.66M]
  ------------------
 1000|      4|          return done;
 1001|  2.66M|        done++;
 1002|  2.66M|      }
 1003|  1.51M|      if(optr->flags & FLAGS_SUBSTR)
  ------------------
  |  Branch (1003:10): [True: 135k, False: 1.37M]
  ------------------
 1004|       |        /* this is a substring */
 1005|   135k|        continue;
 1006|  1.51M|    }
 1007|       |
 1008|  2.54M|    p.flags = optr->flags;
 1009|       |
 1010|       |    /* pick up the specified width */
 1011|  2.54M|    if(p.flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (1011:8): [True: 0, False: 2.54M]
  ------------------
 1012|      0|      p.width = (int)input[optr->width].val.nums;
 1013|      0|      if(p.width < 0) {
  ------------------
  |  Branch (1013:10): [True: 0, False: 0]
  ------------------
 1014|       |        /* "A negative field width is taken as a '-' flag followed by a
 1015|       |           positive field width." */
 1016|      0|        if(p.width == INT_MIN)
  ------------------
  |  Branch (1016:12): [True: 0, False: 0]
  ------------------
 1017|      0|          p.width = INT_MAX;
 1018|      0|        else
 1019|      0|          p.width = -p.width;
 1020|      0|        p.flags |= FLAGS_LEFT;
 1021|      0|        p.flags &= ~(unsigned int)FLAGS_PAD_NIL;
 1022|      0|      }
 1023|      0|    }
 1024|  2.54M|    else
 1025|  2.54M|      p.width = optr->width;
 1026|       |
 1027|       |    /* pick up the specified precision */
 1028|  2.54M|    if(p.flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (1028:8): [True: 37.8k, False: 2.50M]
  ------------------
 1029|  37.8k|      p.prec = (int)input[optr->precision].val.nums;
 1030|  37.8k|      if(p.prec < 0)
  ------------------
  |  Branch (1030:10): [True: 0, False: 37.8k]
  ------------------
 1031|       |        /* "A negative precision is taken as if the precision were
 1032|       |           omitted." */
 1033|      0|        p.prec = -1;
 1034|  37.8k|    }
 1035|  2.50M|    else if(p.flags & FLAGS_PREC)
  ------------------
  |  Branch (1035:13): [True: 0, False: 2.50M]
  ------------------
 1036|      0|      p.prec = optr->precision;
 1037|  2.50M|    else
 1038|  2.50M|      p.prec = -1;
 1039|       |
 1040|  2.54M|    switch(iptr->type) {
 1041|  1.28M|    case MTYPE_INTU:
  ------------------
  |  Branch (1041:5): [True: 1.28M, False: 1.25M]
  ------------------
 1042|  1.28M|    case MTYPE_LONGU:
  ------------------
  |  Branch (1042:5): [True: 0, False: 2.54M]
  ------------------
 1043|  1.28M|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (1043:5): [True: 0, False: 2.54M]
  ------------------
 1044|  1.28M|      p.flags |= FLAGS_UNSIGNED;
 1045|  1.28M|      if(out_number(userp, stream, &p, iptr->val.numu, 0, work, &done))
  ------------------
  |  Branch (1045:10): [True: 7, False: 1.28M]
  ------------------
 1046|      7|        return done;
 1047|  1.28M|      break;
 1048|       |
 1049|  1.28M|    case MTYPE_INT:
  ------------------
  |  Branch (1049:5): [True: 7.22k, False: 2.53M]
  ------------------
 1050|  35.1k|    case MTYPE_LONG:
  ------------------
  |  Branch (1050:5): [True: 27.9k, False: 2.51M]
  ------------------
 1051|  35.1k|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (1051:5): [True: 0, False: 2.54M]
  ------------------
 1052|  35.1k|      if(out_number(userp, stream, &p, iptr->val.numu,
  ------------------
  |  Branch (1052:10): [True: 1, False: 35.1k]
  ------------------
 1053|  35.1k|                    iptr->val.nums, work, &done))
 1054|      1|        return done;
 1055|  35.1k|      break;
 1056|       |
 1057|  1.22M|    case MTYPE_STRING:
  ------------------
  |  Branch (1057:5): [True: 1.22M, False: 1.32M]
  ------------------
 1058|  1.22M|      if(out_string(userp, stream, &p, iptr->val.str, &done))
  ------------------
  |  Branch (1058:10): [True: 54, False: 1.22M]
  ------------------
 1059|     54|        return done;
 1060|  1.22M|      break;
 1061|       |
 1062|  1.22M|    case MTYPE_PTR:
  ------------------
  |  Branch (1062:5): [True: 0, False: 2.54M]
  ------------------
 1063|      0|      if(out_pointer(userp, stream, &p, iptr->val.ptr, work, &done))
  ------------------
  |  Branch (1063:10): [True: 0, False: 0]
  ------------------
 1064|      0|        return done;
 1065|      0|      break;
 1066|       |
 1067|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (1067:5): [True: 0, False: 2.54M]
  ------------------
 1068|      0|      if(out_double(userp, stream, &p, iptr->val.dnum, work, &done))
  ------------------
  |  Branch (1068:10): [True: 0, False: 0]
  ------------------
 1069|      0|        return done;
 1070|      0|      break;
 1071|       |
 1072|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (1072:5): [True: 0, False: 2.54M]
  ------------------
 1073|       |      /* Answer the count of characters written. */
 1074|      0|      if(p.flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (1074:10): [True: 0, False: 0]
  ------------------
 1075|      0|        *(int64_t *)iptr->val.ptr = (int64_t)done;
 1076|      0|      else if(p.flags & FLAGS_LONG)
  ------------------
  |  Branch (1076:15): [True: 0, False: 0]
  ------------------
 1077|      0|        *(long *)iptr->val.ptr = (long)done;
 1078|      0|      else if(!(p.flags & FLAGS_SHORT))
  ------------------
  |  Branch (1078:15): [True: 0, False: 0]
  ------------------
 1079|      0|        *(int *)iptr->val.ptr = done;
 1080|      0|      else
 1081|      0|        *(short *)iptr->val.ptr = (short)done;
 1082|      0|      break;
 1083|       |
 1084|      0|    default:
  ------------------
  |  Branch (1084:5): [True: 0, False: 2.54M]
  ------------------
 1085|      0|      break;
 1086|  2.54M|    }
 1087|  2.54M|  }
 1088|  1.43M|  return done;
 1089|  1.43M|}
mprintf.c:parsefmt:
  431|  1.43M|{
  432|  1.43M|  const char *fmt = format;
  433|  1.43M|  int param_num = 0;
  434|  1.43M|  int max_param = -1;
  435|  1.43M|  int i;
  436|  1.43M|  int ocount = 0;
  437|  1.43M|  unsigned char usedinput[MAX_PARAMETERS / 8];
  438|  1.43M|  size_t outlen = 0;
  439|  1.43M|  struct outsegment *optr;
  440|  1.43M|  int use_dollar = DOLLAR_UNKNOWN;
  441|  1.43M|  const char *start = fmt;
  442|       |
  443|       |  /* clear, set a bit for each used input */
  444|  1.43M|  memset(usedinput, 0, sizeof(usedinput));
  445|       |
  446|  6.65M|  while(*fmt) {
  ------------------
  |  Branch (446:9): [True: 5.21M, False: 1.43M]
  ------------------
  447|  5.21M|    if(*fmt == '%') {
  ------------------
  |  Branch (447:8): [True: 2.86M, False: 2.35M]
  ------------------
  448|  2.86M|      struct va_input *iptr;
  449|  2.86M|      FormatType type;
  450|  2.86M|      unsigned int flags = 0;
  451|  2.86M|      int width = 0;
  452|  2.86M|      int precision = 0;
  453|  2.86M|      int param = -1;
  454|  2.86M|      int rc;
  455|  2.86M|      fmt++;
  456|  2.86M|      outlen = (size_t)(fmt - start - 1);
  457|  2.86M|      if(*fmt == '%') {
  ------------------
  |  Branch (457:10): [True: 317k, False: 2.54M]
  ------------------
  458|       |        /* this means a %% that should be output only as %. Create an output
  459|       |           segment. */
  460|   317k|        if(outlen) {
  ------------------
  |  Branch (460:12): [True: 1.06k, False: 315k]
  ------------------
  461|  1.06k|          optr = &out[ocount++];
  462|  1.06k|          if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|  1.06k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (462:14): [True: 0, False: 1.06k]
  ------------------
  463|      0|            return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  464|  1.06k|          optr->input = 0;
  465|  1.06k|          optr->flags = FLAGS_SUBSTR;
  466|  1.06k|          optr->start = start;
  467|  1.06k|          optr->outlen = outlen;
  468|  1.06k|        }
  469|   317k|        start = fmt;
  470|   317k|        fmt++;
  471|   317k|        continue; /* while */
  472|   317k|      }
  473|       |
  474|  2.54M|      if(use_dollar != DOLLAR_NOPE) {
  ------------------
  |  Branch (474:10): [True: 1.43M, False: 1.10M]
  ------------------
  475|  1.43M|        param = dollarstring(fmt, &fmt);
  476|  1.43M|        if(param < 0) {
  ------------------
  |  Branch (476:12): [True: 1.43M, False: 5]
  ------------------
  477|  1.43M|          if(use_dollar == DOLLAR_USE)
  ------------------
  |  Branch (477:14): [True: 0, False: 1.43M]
  ------------------
  478|       |            /* illegal combo */
  479|      0|            return PFMT_DOLLAR;
  ------------------
  |  |  160|      0|#define PFMT_DOLLAR      1 /* bad dollar for main param */
  ------------------
  480|       |
  481|       |          /* we got no positional, get the next arg */
  482|  1.43M|          param = -1;
  483|  1.43M|          use_dollar = DOLLAR_NOPE;
  484|  1.43M|        }
  485|      5|        else
  486|      5|          use_dollar = DOLLAR_USE;
  487|  1.43M|      }
  488|       |
  489|  2.54M|      rc = parse_flags(&fmt, &flags, use_dollar, &precision, &width);
  490|  2.54M|      if(rc)
  ------------------
  |  Branch (490:10): [True: 0, False: 2.54M]
  ------------------
  491|      0|        return rc;
  492|       |
  493|  2.54M|      if(parse_conversion(*fmt, &flags, &type))
  ------------------
  |  Branch (493:10): [True: 0, False: 2.54M]
  ------------------
  494|      0|        continue;
  495|       |
  496|  2.54M|      if(flags & FLAGS_WIDTHPARAM) {
  ------------------
  |  Branch (496:10): [True: 0, False: 2.54M]
  ------------------
  497|      0|        if(width < 0)
  ------------------
  |  Branch (497:12): [True: 0, False: 0]
  ------------------
  498|      0|          width = param_num++;
  499|      0|        else {
  500|       |          /* if this identifies a parameter already used, this is illegal */
  501|      0|          if(is_arg_used(usedinput, width))
  ------------------
  |  |  148|      0|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  |  |  ------------------
  |  |  |  Branch (148:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  502|      0|            return PFMT_WIDTHARG;
  ------------------
  |  |  168|      0|#define PFMT_WIDTHARG    9 /* attempted to use same arg twice, for width */
  ------------------
  503|      0|        }
  504|      0|        if(width >= MAX_PARAMETERS)
  ------------------
  |  |   33|      0|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (504:12): [True: 0, False: 0]
  ------------------
  505|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  506|      0|        if(width >= max_param)
  ------------------
  |  Branch (506:12): [True: 0, False: 0]
  ------------------
  507|      0|          max_param = width;
  508|       |
  509|      0|        in[width].type = MTYPE_WIDTH;
  510|       |        /* mark as used */
  511|      0|        mark_arg_used(usedinput, width);
  ------------------
  |  |  149|      0|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  512|      0|      }
  513|       |
  514|  2.54M|      if(flags & FLAGS_PRECPARAM) {
  ------------------
  |  Branch (514:10): [True: 37.8k, False: 2.50M]
  ------------------
  515|  37.8k|        if(precision < 0)
  ------------------
  |  Branch (515:12): [True: 37.8k, False: 0]
  ------------------
  516|  37.8k|          precision = param_num++;
  517|      0|        else {
  518|       |          /* if this identifies a parameter already used, this is illegal */
  519|      0|          if(is_arg_used(usedinput, precision))
  ------------------
  |  |  148|      0|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  |  |  ------------------
  |  |  |  Branch (148:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  520|      0|            return PFMT_PRECARG;
  ------------------
  |  |  169|      0|#define PFMT_PRECARG    10 /* attempted to use same arg twice, for prec */
  ------------------
  521|      0|        }
  522|  37.8k|        if(precision >= MAX_PARAMETERS)
  ------------------
  |  |   33|  37.8k|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (522:12): [True: 0, False: 37.8k]
  ------------------
  523|      0|          return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  524|  37.8k|        if(precision >= max_param)
  ------------------
  |  Branch (524:12): [True: 37.8k, False: 0]
  ------------------
  525|  37.8k|          max_param = precision;
  526|       |
  527|  37.8k|        in[precision].type = MTYPE_PRECISION;
  528|  37.8k|        mark_arg_used(usedinput, precision);
  ------------------
  |  |  149|  37.8k|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  529|  37.8k|      }
  530|       |
  531|       |      /* Handle the specifier */
  532|  2.54M|      if(param < 0)
  ------------------
  |  Branch (532:10): [True: 2.54M, False: 20]
  ------------------
  533|  2.54M|        param = param_num++;
  534|  2.54M|      if(param >= MAX_PARAMETERS)
  ------------------
  |  |   33|  2.54M|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (534:10): [True: 0, False: 2.54M]
  ------------------
  535|      0|        return PFMT_MANYARGS;
  ------------------
  |  |  163|      0|#define PFMT_MANYARGS    4 /* too many input arguments used */
  ------------------
  536|  2.54M|      if(param >= max_param)
  ------------------
  |  Branch (536:10): [True: 2.54M, False: 23]
  ------------------
  537|  2.54M|        max_param = param;
  538|       |
  539|  2.54M|      iptr = &in[param];
  540|  2.54M|      iptr->type = type;
  541|       |
  542|       |      /* mark this input as used */
  543|  2.54M|      mark_arg_used(usedinput, param);
  ------------------
  |  |  149|  2.54M|#define mark_arg_used(x, y) ((x)[(y) / 8] |= (unsigned char)(1 << ((y) & 7)))
  ------------------
  544|       |
  545|  2.54M|      fmt++;
  546|  2.54M|      optr = &out[ocount++];
  547|  2.54M|      if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|  2.54M|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (547:10): [True: 0, False: 2.54M]
  ------------------
  548|      0|        return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  549|  2.54M|      optr->input = (unsigned int)param;
  550|  2.54M|      optr->flags = flags;
  551|  2.54M|      optr->width = width;
  552|  2.54M|      optr->precision = precision;
  553|  2.54M|      optr->start = start;
  554|  2.54M|      optr->outlen = outlen;
  555|  2.54M|      start = fmt;
  556|  2.54M|    }
  557|  2.35M|    else
  558|  2.35M|      fmt++;
  559|  5.21M|  }
  560|       |
  561|       |  /* is there a trailing piece */
  562|  1.43M|  outlen = (size_t)(fmt - start);
  563|  1.43M|  if(outlen) {
  ------------------
  |  Branch (563:6): [True: 134k, False: 1.30M]
  ------------------
  564|   134k|    optr = &out[ocount++];
  565|   134k|    if(ocount > MAX_SEGMENTS)
  ------------------
  |  |   34|   134k|#define MAX_SEGMENTS   128 /* number of output segments */
  ------------------
  |  Branch (565:8): [True: 0, False: 134k]
  ------------------
  566|      0|      return PFMT_MANYSEGS;
  ------------------
  |  |  170|      0|#define PFMT_MANYSEGS   11 /* maxed out output segments */
  ------------------
  567|   134k|    optr->input = 0;
  568|   134k|    optr->flags = FLAGS_SUBSTR;
  569|   134k|    optr->start = start;
  570|   134k|    optr->outlen = outlen;
  571|   134k|  }
  572|       |
  573|       |  /* Read the arg list parameters into our data list */
  574|  4.02M|  for(i = 0; i < max_param + 1; i++) {
  ------------------
  |  Branch (574:14): [True: 2.58M, False: 1.43M]
  ------------------
  575|  2.58M|    struct va_input *iptr = &in[i];
  576|  2.58M|    if(!is_arg_used(usedinput, i))
  ------------------
  |  |  148|  2.58M|#define is_arg_used(x, y)   ((x)[(y) / 8] & (1 << ((y) & 7)))
  ------------------
  |  Branch (576:8): [True: 0, False: 2.58M]
  ------------------
  577|       |      /* bad input */
  578|      0|      return PFMT_INPUTGAP;
  ------------------
  |  |  167|      0|#define PFMT_INPUTGAP    8 /* gap in arguments */
  ------------------
  579|       |
  580|       |    /* based on the type, read the correct argument */
  581|  2.58M|    switch(iptr->type) {
  582|  1.22M|    case MTYPE_STRING:
  ------------------
  |  Branch (582:5): [True: 1.22M, False: 1.36M]
  ------------------
  583|  1.22M|      iptr->val.str = va_arg(arglist, const char *);
  584|  1.22M|      break;
  585|       |
  586|      0|    case MTYPE_INTPTR:
  ------------------
  |  Branch (586:5): [True: 0, False: 2.58M]
  ------------------
  587|      0|    case MTYPE_PTR:
  ------------------
  |  Branch (587:5): [True: 0, False: 2.58M]
  ------------------
  588|      0|      iptr->val.ptr = va_arg(arglist, void *);
  589|      0|      break;
  590|       |
  591|      0|    case MTYPE_LONGLONGU:
  ------------------
  |  Branch (591:5): [True: 0, False: 2.58M]
  ------------------
  592|      0|      iptr->val.numu = va_arg(arglist, uint64_t);
  593|      0|      break;
  594|       |
  595|      0|    case MTYPE_LONGLONG:
  ------------------
  |  Branch (595:5): [True: 0, False: 2.58M]
  ------------------
  596|      0|      iptr->val.nums = va_arg(arglist, int64_t);
  597|      0|      break;
  598|       |
  599|      0|    case MTYPE_LONGU:
  ------------------
  |  Branch (599:5): [True: 0, False: 2.58M]
  ------------------
  600|      0|      iptr->val.numu = va_arg(arglist, unsigned long);
  601|      0|      break;
  602|       |
  603|  27.9k|    case MTYPE_LONG:
  ------------------
  |  Branch (603:5): [True: 27.9k, False: 2.55M]
  ------------------
  604|  27.9k|      iptr->val.nums = va_arg(arglist, long);
  605|  27.9k|      break;
  606|       |
  607|  1.28M|    case MTYPE_INTU:
  ------------------
  |  Branch (607:5): [True: 1.28M, False: 1.29M]
  ------------------
  608|  1.28M|      iptr->val.numu = va_arg(arglist, unsigned int);
  609|  1.28M|      break;
  610|       |
  611|  7.22k|    case MTYPE_INT:
  ------------------
  |  Branch (611:5): [True: 7.22k, False: 2.57M]
  ------------------
  612|  7.22k|    case MTYPE_WIDTH:
  ------------------
  |  Branch (612:5): [True: 0, False: 2.58M]
  ------------------
  613|  45.1k|    case MTYPE_PRECISION:
  ------------------
  |  Branch (613:5): [True: 37.8k, False: 2.54M]
  ------------------
  614|  45.1k|      iptr->val.nums = va_arg(arglist, int);
  615|  45.1k|      break;
  616|       |
  617|      0|    case MTYPE_DOUBLE:
  ------------------
  |  Branch (617:5): [True: 0, False: 2.58M]
  ------------------
  618|      0|      iptr->val.dnum = va_arg(arglist, double);
  619|      0|      break;
  620|       |
  621|      0|    default:
  ------------------
  |  Branch (621:5): [True: 0, False: 2.58M]
  ------------------
  622|      0|      DEBUGASSERT(NULL); /* unexpected */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (622:7): [True: 0, False: 0]
  |  Branch (622:7): [True: 0, False: 0]
  ------------------
  623|      0|      break;
  624|  2.58M|    }
  625|  2.58M|  }
  626|  1.43M|  *ipieces = max_param + 1;
  627|  1.43M|  *opieces = ocount;
  628|       |
  629|  1.43M|  return PFMT_OK;
  ------------------
  |  |  159|  1.43M|#define PFMT_OK          0
  ------------------
  630|  1.43M|}
mprintf.c:dollarstring:
  139|  1.43M|{
  140|  1.43M|  curl_off_t num;
  141|  1.43M|  if(curlx_str_number(&p, &num, MAX_PARAMETERS) ||
  ------------------
  |  |   33|  1.43M|#define MAX_PARAMETERS 128 /* number of input arguments */
  ------------------
  |  Branch (141:6): [True: 1.06M, False: 372k]
  ------------------
  142|   372k|     curlx_str_single(&p, '$') || !num)
  ------------------
  |  Branch (142:6): [True: 372k, False: 0]
  |  Branch (142:35): [True: 0, False: 0]
  ------------------
  143|  1.43M|    return -1;
  144|  18.4E|  *end = p;
  145|  18.4E|  return (int)num - 1;
  146|  1.43M|}
mprintf.c:parse_flags:
  174|  2.54M|{
  175|  2.54M|  const char *fmt = *fmtp;
  176|  2.54M|  bool loopit = TRUE;
  ------------------
  |  | 1055|  2.54M|#define TRUE true
  ------------------
  177|  2.54M|  unsigned int flags = 0;
  178|  2.54M|  int width = 0;
  179|  2.54M|  int precision = 0;
  180|       |
  181|       |  /* Handle the flags */
  182|  2.98M|  do {
  183|  2.98M|    switch(*fmt++) {
  184|      0|    case ' ':
  ------------------
  |  Branch (184:5): [True: 0, False: 2.98M]
  ------------------
  185|      0|      flags |= FLAGS_SPACE;
  186|      0|      break;
  187|      0|    case '+':
  ------------------
  |  Branch (187:5): [True: 0, False: 2.98M]
  ------------------
  188|      0|      flags |= FLAGS_SHOWSIGN;
  189|      0|      break;
  190|      0|    case '-':
  ------------------
  |  Branch (190:5): [True: 0, False: 2.98M]
  ------------------
  191|      0|      flags |= FLAGS_LEFT;
  192|      0|      flags &= ~(unsigned int)FLAGS_PAD_NIL;
  193|      0|      break;
  194|      0|    case '#':
  ------------------
  |  Branch (194:5): [True: 0, False: 2.98M]
  ------------------
  195|      0|      flags |= FLAGS_ALT;
  196|      0|      break;
  197|  37.8k|    case '.':
  ------------------
  |  Branch (197:5): [True: 37.8k, False: 2.94M]
  ------------------
  198|  37.8k|      if('*' == *fmt) {
  ------------------
  |  Branch (198:10): [True: 37.8k, False: 0]
  ------------------
  199|       |        /* The precision is picked from a specified parameter */
  200|  37.8k|        flags |= FLAGS_PRECPARAM;
  201|  37.8k|        fmt++;
  202|       |
  203|  37.8k|        if(use_dollar == DOLLAR_USE) {
  ------------------
  |  Branch (203:12): [True: 0, False: 37.8k]
  ------------------
  204|      0|          precision = dollarstring(fmt, &fmt);
  205|      0|          if(precision < 0)
  ------------------
  |  Branch (205:14): [True: 0, False: 0]
  ------------------
  206|       |            /* illegal combo */
  207|      0|            return PFMT_DOLLARPREC;
  ------------------
  |  |  162|      0|#define PFMT_DOLLARPREC  3 /* bad dollar use for precision */
  ------------------
  208|      0|        }
  209|  37.8k|        else
  210|       |          /* get it from the next argument */
  211|  37.8k|          precision = -1;
  212|  37.8k|      }
  213|      0|      else {
  214|      0|        bool is_neg;
  215|      0|        curl_off_t num;
  216|      0|        flags |= FLAGS_PREC;
  217|      0|        is_neg = ('-' == *fmt);
  218|      0|        if(is_neg)
  ------------------
  |  Branch (218:12): [True: 0, False: 0]
  ------------------
  219|      0|          fmt++;
  220|      0|        if(curlx_str_number(&fmt, &num, INT_MAX))
  ------------------
  |  Branch (220:12): [True: 0, False: 0]
  ------------------
  221|      0|          return PFMT_PREC;
  ------------------
  |  |  164|      0|#define PFMT_PREC        5 /* precision overflow */
  ------------------
  222|      0|        precision = (int)num;
  223|      0|        if(is_neg)
  ------------------
  |  Branch (223:12): [True: 0, False: 0]
  ------------------
  224|      0|          precision = -precision;
  225|      0|      }
  226|  37.8k|      if((flags & (FLAGS_PREC | FLAGS_PRECPARAM)) ==
  ------------------
  |  Branch (226:10): [True: 0, False: 37.8k]
  ------------------
  227|  37.8k|         (FLAGS_PREC | FLAGS_PRECPARAM))
  228|       |        /* it is not permitted to use both kinds of precision for the same
  229|       |           argument */
  230|      0|        return PFMT_PRECMIX;
  ------------------
  |  |  165|      0|#define PFMT_PRECMIX     6 /* bad mix of precision specifiers */
  ------------------
  231|  37.8k|      break;
  232|  37.8k|    case 'h':
  ------------------
  |  Branch (232:5): [True: 0, False: 2.98M]
  ------------------
  233|      0|      flags |= FLAGS_SHORT;
  234|      0|      break;
  235|       |#ifdef _WIN32
  236|       |    case 'I':
  237|       |      /* Non-ANSI integer extensions I32 I64 */
  238|       |      if((fmt[0] == '3') && (fmt[1] == '2')) {
  239|       |        flags |= FLAGS_LONG;
  240|       |        fmt += 2;
  241|       |      }
  242|       |      else if((fmt[0] == '6') && (fmt[1] == '4')) {
  243|       |        flags |= FLAGS_LONGLONG;
  244|       |        fmt += 2;
  245|       |      }
  246|       |      else {
  247|       |#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG)
  248|       |        flags |= FLAGS_LONGLONG;
  249|       |#else
  250|       |        flags |= FLAGS_LONG;
  251|       |#endif
  252|       |      }
  253|       |      break;
  254|       |#endif /* _WIN32 */
  255|  27.9k|    case 'l':
  ------------------
  |  Branch (255:5): [True: 27.9k, False: 2.95M]
  ------------------
  256|  27.9k|      if(flags & FLAGS_LONG)
  ------------------
  |  Branch (256:10): [True: 0, False: 27.9k]
  ------------------
  257|      0|        flags |= FLAGS_LONGLONG;
  258|  27.9k|      else
  259|  27.9k|        flags |= FLAGS_LONG;
  260|  27.9k|      break;
  261|      0|    case 'L':
  ------------------
  |  Branch (261:5): [True: 0, False: 2.98M]
  ------------------
  262|      0|      flags |= FLAGS_LONGDOUBLE;
  263|      0|      break;
  264|      0|    case 'q':
  ------------------
  |  Branch (264:5): [True: 0, False: 2.98M]
  ------------------
  265|      0|      flags |= FLAGS_LONGLONG;
  266|      0|      break;
  267|      0|    case 'z':
  ------------------
  |  Branch (267:5): [True: 0, False: 2.98M]
  ------------------
  268|       |      /* the code below generates a warning if -Wunreachable-code is
  269|       |         used */
  270|       |#if (SIZEOF_SIZE_T > SIZEOF_LONG)
  271|       |      flags |= FLAGS_LONGLONG;
  272|       |#else
  273|      0|      flags |= FLAGS_LONG;
  274|      0|#endif
  275|      0|      break;
  276|      0|    case 'O':
  ------------------
  |  Branch (276:5): [True: 0, False: 2.98M]
  ------------------
  277|       |#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG)
  278|       |      flags |= FLAGS_LONGLONG;
  279|       |#else
  280|      0|      flags |= FLAGS_LONG;
  281|      0|#endif
  282|      0|      break;
  283|   361k|    case '0':
  ------------------
  |  Branch (283:5): [True: 361k, False: 2.62M]
  ------------------
  284|   361k|      if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (284:10): [True: 361k, False: 0]
  ------------------
  285|   361k|        flags |= FLAGS_PAD_NIL;
  286|   361k|      FALLTHROUGH();
  ------------------
  |  |  821|   361k|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  287|   361k|    case '1':
  ------------------
  |  Branch (287:5): [True: 0, False: 2.98M]
  ------------------
  288|   362k|    case '2':
  ------------------
  |  Branch (288:5): [True: 462, False: 2.98M]
  ------------------
  289|   367k|    case '3':
  ------------------
  |  Branch (289:5): [True: 4.83k, False: 2.98M]
  ------------------
  290|   367k|    case '4':
  ------------------
  |  Branch (290:5): [True: 56, False: 2.98M]
  ------------------
  291|   367k|    case '5':
  ------------------
  |  Branch (291:5): [True: 0, False: 2.98M]
  ------------------
  292|   376k|    case '6':
  ------------------
  |  Branch (292:5): [True: 8.83k, False: 2.97M]
  ------------------
  293|   376k|    case '7':
  ------------------
  |  Branch (293:5): [True: 0, False: 2.98M]
  ------------------
  294|   376k|    case '8':
  ------------------
  |  Branch (294:5): [True: 0, False: 2.98M]
  ------------------
  295|   376k|    case '9': {
  ------------------
  |  Branch (295:5): [True: 0, False: 2.98M]
  ------------------
  296|   376k|      curl_off_t num;
  297|   376k|      flags |= FLAGS_WIDTH;
  298|   376k|      fmt--;
  299|   376k|      if(curlx_str_number(&fmt, &num, INT_MAX))
  ------------------
  |  Branch (299:10): [True: 0, False: 376k]
  ------------------
  300|      0|        return PFMT_WIDTH;
  ------------------
  |  |  166|      0|#define PFMT_WIDTH       7 /* width overflow */
  ------------------
  301|   376k|      width = (int)num;
  302|   376k|      break;
  303|   376k|    }
  304|      0|    case '*':  /* read width from argument list */
  ------------------
  |  Branch (304:5): [True: 0, False: 2.98M]
  ------------------
  305|      0|      flags |= FLAGS_WIDTHPARAM;
  306|      0|      if(use_dollar == DOLLAR_USE) {
  ------------------
  |  Branch (306:10): [True: 0, False: 0]
  ------------------
  307|      0|        width = dollarstring(fmt, &fmt);
  308|      0|        if(width < 0)
  ------------------
  |  Branch (308:12): [True: 0, False: 0]
  ------------------
  309|       |          /* illegal combo */
  310|      0|          return PFMT_DOLLARWIDTH;
  ------------------
  |  |  161|      0|#define PFMT_DOLLARWIDTH 2 /* bad dollar use for width */
  ------------------
  311|      0|      }
  312|      0|      else
  313|       |        /* pick from the next argument */
  314|      0|        width = -1;
  315|      0|      break;
  316|  2.54M|    default:
  ------------------
  |  Branch (316:5): [True: 2.54M, False: 441k]
  ------------------
  317|  2.54M|      loopit = FALSE;
  ------------------
  |  | 1058|  2.54M|#define FALSE false
  ------------------
  318|  2.54M|      fmt--;
  319|  2.54M|      break;
  320|  2.98M|    } /* switch */
  321|  2.98M|  } while(loopit); /* do */
  ------------------
  |  Branch (321:11): [True: 441k, False: 2.54M]
  ------------------
  322|  2.54M|  *flagsp = flags;
  323|  2.54M|  *precp = precision;
  324|  2.54M|  *widthp = width;
  325|  2.54M|  *fmtp = fmt;
  326|  2.54M|  return PFMT_OK;
  ------------------
  |  |  159|  2.54M|#define PFMT_OK          0
  ------------------
  327|  2.54M|}
mprintf.c:parse_conversion:
  331|  2.54M|{
  332|  2.54M|  unsigned int flags = *flagp;
  333|  2.54M|  FormatType type;
  334|  2.54M|  switch(f) {
  335|      0|  case 'S':
  ------------------
  |  Branch (335:3): [True: 0, False: 2.54M]
  ------------------
  336|      0|    flags |= FLAGS_ALT;
  337|      0|    type = MTYPE_STRING;
  338|      0|    break;
  339|  1.22M|  case 's':
  ------------------
  |  Branch (339:3): [True: 1.22M, False: 1.32M]
  ------------------
  340|  1.22M|    type = MTYPE_STRING;
  341|  1.22M|    break;
  342|      0|  case 'n':
  ------------------
  |  Branch (342:3): [True: 0, False: 2.54M]
  ------------------
  343|      0|    type = MTYPE_INTPTR;
  344|      0|    break;
  345|      0|  case 'p':
  ------------------
  |  Branch (345:3): [True: 0, False: 2.54M]
  ------------------
  346|      0|    type = MTYPE_PTR;
  347|      0|    break;
  348|  34.3k|  case 'd':
  ------------------
  |  Branch (348:3): [True: 34.3k, False: 2.51M]
  ------------------
  349|  34.5k|  case 'i':
  ------------------
  |  Branch (349:3): [True: 216, False: 2.54M]
  ------------------
  350|  34.5k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (350:8): [True: 0, False: 34.5k]
  ------------------
  351|      0|      type = MTYPE_LONGLONG;
  352|  34.5k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (352:13): [True: 27.9k, False: 6.61k]
  ------------------
  353|  27.9k|      type = MTYPE_LONG;
  354|  6.61k|    else
  355|  6.61k|      type = MTYPE_INT;
  356|  34.5k|    break;
  357|   927k|  case 'u':
  ------------------
  |  Branch (357:3): [True: 927k, False: 1.61M]
  ------------------
  358|   927k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (358:8): [True: 0, False: 927k]
  ------------------
  359|      0|      type = MTYPE_LONGLONGU;
  360|   927k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (360:13): [True: 0, False: 927k]
  ------------------
  361|      0|      type = MTYPE_LONGU;
  362|   927k|    else
  363|   927k|      type = MTYPE_INTU;
  364|   927k|    flags |= FLAGS_UNSIGNED;
  365|   927k|    break;
  366|      0|  case 'o':
  ------------------
  |  Branch (366:3): [True: 0, False: 2.54M]
  ------------------
  367|      0|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (367:8): [True: 0, False: 0]
  ------------------
  368|      0|      type = MTYPE_LONGLONGU;
  369|      0|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (369:13): [True: 0, False: 0]
  ------------------
  370|      0|      type = MTYPE_LONGU;
  371|      0|    else
  372|      0|      type = MTYPE_INTU;
  373|      0|    flags |= FLAGS_OCTAL | FLAGS_UNSIGNED;
  374|      0|    break;
  375|  45.0k|  case 'x':
  ------------------
  |  Branch (375:3): [True: 45.0k, False: 2.49M]
  ------------------
  376|  45.0k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (376:8): [True: 0, False: 45.0k]
  ------------------
  377|      0|      type = MTYPE_LONGLONGU;
  378|  45.0k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (378:13): [True: 0, False: 45.0k]
  ------------------
  379|      0|      type = MTYPE_LONGU;
  380|  45.0k|    else
  381|  45.0k|      type = MTYPE_INTU;
  382|  45.0k|    flags |= FLAGS_HEX | FLAGS_UNSIGNED;
  383|  45.0k|    break;
  384|   315k|  case 'X':
  ------------------
  |  Branch (384:3): [True: 315k, False: 2.22M]
  ------------------
  385|   315k|    if(flags & FLAGS_LONGLONG)
  ------------------
  |  Branch (385:8): [True: 0, False: 315k]
  ------------------
  386|      0|      type = MTYPE_LONGLONGU;
  387|   315k|    else if(flags & FLAGS_LONG)
  ------------------
  |  Branch (387:13): [True: 0, False: 315k]
  ------------------
  388|      0|      type = MTYPE_LONGU;
  389|   315k|    else
  390|   315k|      type = MTYPE_INTU;
  391|   315k|    flags |= FLAGS_HEX | FLAGS_UPPER | FLAGS_UNSIGNED;
  392|   315k|    break;
  393|    608|  case 'c':
  ------------------
  |  Branch (393:3): [True: 608, False: 2.54M]
  ------------------
  394|    608|    type = MTYPE_INT;
  395|    608|    flags |= FLAGS_CHAR;
  396|    608|    break;
  397|      0|  case 'f':
  ------------------
  |  Branch (397:3): [True: 0, False: 2.54M]
  ------------------
  398|      0|    type = MTYPE_DOUBLE;
  399|      0|    break;
  400|      0|  case 'e':
  ------------------
  |  Branch (400:3): [True: 0, False: 2.54M]
  ------------------
  401|      0|    type = MTYPE_DOUBLE;
  402|      0|    flags |= FLAGS_FLOATE;
  403|      0|    break;
  404|      0|  case 'E':
  ------------------
  |  Branch (404:3): [True: 0, False: 2.54M]
  ------------------
  405|      0|    type = MTYPE_DOUBLE;
  406|      0|    flags |= FLAGS_FLOATE | FLAGS_UPPER;
  407|      0|    break;
  408|      0|  case 'g':
  ------------------
  |  Branch (408:3): [True: 0, False: 2.54M]
  ------------------
  409|      0|    type = MTYPE_DOUBLE;
  410|      0|    flags |= FLAGS_FLOATG;
  411|      0|    break;
  412|      0|  case 'G':
  ------------------
  |  Branch (412:3): [True: 0, False: 2.54M]
  ------------------
  413|      0|    type = MTYPE_DOUBLE;
  414|      0|    flags |= FLAGS_FLOATG | FLAGS_UPPER;
  415|      0|    break;
  416|      0|  default:
  ------------------
  |  Branch (416:3): [True: 0, False: 2.54M]
  ------------------
  417|       |    /* invalid instruction, disregard and continue */
  418|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  419|  2.54M|  } /* switch */
  420|       |
  421|  2.54M|  *flagp |= flags;
  422|  2.54M|  *typep = type;
  423|       |  return FALSE;
  ------------------
  |  | 1058|  2.54M|#define FALSE false
  ------------------
  424|  2.54M|}
mprintf.c:out_number:
  738|  1.32M|{
  739|  1.32M|  const unsigned char *digits = Curl_ldigits;
  740|  1.32M|  int flags = p->flags;
  741|  1.32M|  int width = p->width;
  742|  1.32M|  int prec = p->prec;
  743|  1.32M|  bool is_alt = flags & FLAGS_ALT;
  744|  1.32M|  bool is_neg = FALSE;
  ------------------
  |  | 1058|  1.32M|#define FALSE false
  ------------------
  745|  1.32M|  int base = 10;
  746|       |
  747|       |  /* 'workend' points to the final buffer byte position, but with an extra
  748|       |     byte as margin to avoid the (FALSE?) warning Coverity gives us
  749|       |     otherwise */
  750|  1.32M|  char *workend = &work[BUFFSIZE - 2];
  ------------------
  |  |   31|  1.32M|#define BUFFSIZE 326 /* buffer for long-to-str and float-to-str calcs, should
  ------------------
  751|  1.32M|  char *w;
  752|       |
  753|  1.32M|  if(flags & FLAGS_CHAR) {
  ------------------
  |  Branch (753:6): [True: 608, False: 1.32M]
  ------------------
  754|       |    /* Character. */
  755|    608|    if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (755:8): [True: 608, False: 0]
  ------------------
  756|    608|      while(--width > 0)
  ------------------
  |  Branch (756:13): [True: 0, False: 608]
  ------------------
  757|      0|        OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  758|    608|    OUTCHAR((char)num);
  ------------------
  |  |   43|    608|  do {                                    \
  |  |   44|    608|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 608]
  |  |  ------------------
  |  |   45|    608|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|    608|    (*donep)++;                           \
  |  |   47|    608|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 608]
  |  |  ------------------
  ------------------
  759|    608|    if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (759:8): [True: 0, False: 608]
  ------------------
  760|      0|      while(--width > 0)
  ------------------
  |  Branch (760:13): [True: 0, False: 0]
  ------------------
  761|      0|        OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  762|    608|    return FALSE;
  ------------------
  |  | 1058|    608|#define FALSE false
  ------------------
  763|    608|  }
  764|  1.32M|  if(flags & FLAGS_OCTAL)
  ------------------
  |  Branch (764:6): [True: 0, False: 1.32M]
  ------------------
  765|       |    /* Octal unsigned integer */
  766|      0|    base = 8;
  767|       |
  768|  1.32M|  else if(flags & FLAGS_HEX) {
  ------------------
  |  Branch (768:11): [True: 360k, False: 961k]
  ------------------
  769|       |    /* Hexadecimal unsigned integer */
  770|   360k|    digits = (flags & FLAGS_UPPER) ? Curl_udigits : Curl_ldigits;
  ------------------
  |  Branch (770:14): [True: 315k, False: 45.0k]
  ------------------
  771|   360k|    base = 16;
  772|   360k|  }
  773|   961k|  else if(flags & FLAGS_UNSIGNED)
  ------------------
  |  Branch (773:11): [True: 927k, False: 34.5k]
  ------------------
  774|       |    /* Decimal unsigned integer */
  775|   927k|    ;
  776|       |
  777|  34.5k|  else {
  778|       |    /* Decimal integer. */
  779|  34.5k|    is_neg = (nums < 0);
  780|  34.5k|    if(is_neg) {
  ------------------
  |  Branch (780:8): [True: 0, False: 34.5k]
  ------------------
  781|       |      /* signed_num might fail to hold absolute negative minimum by 1 */
  782|      0|      int64_t signed_num; /* Used to convert negative in positive. */
  783|      0|      signed_num = nums + (int64_t)1;
  784|      0|      signed_num = -signed_num;
  785|      0|      num = (uint64_t)signed_num;
  786|      0|      num += (uint64_t)1;
  787|      0|    }
  788|  34.5k|  }
  789|       |
  790|       |  /* Supply a default precision if none was given. */
  791|  1.32M|  if(prec == -1)
  ------------------
  |  Branch (791:6): [True: 1.32M, False: 18.4E]
  ------------------
  792|  1.32M|    prec = 1;
  793|       |
  794|       |  /* Put the number in WORK. */
  795|  1.32M|  w = workend;
  796|  1.32M|  DEBUGASSERT(base <= 16);
  ------------------
  |  | 1081|  1.32M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (796:3): [True: 0, False: 1.32M]
  |  Branch (796:3): [True: 1.32M, False: 18.4E]
  ------------------
  797|  1.32M|  switch(base) {
  798|   961k|  case 10:
  ------------------
  |  Branch (798:3): [True: 961k, False: 360k]
  ------------------
  799|  2.91M|    while(num > 0) {
  ------------------
  |  Branch (799:11): [True: 1.95M, False: 961k]
  ------------------
  800|  1.95M|      *w-- = (char)('0' + (num % 10));
  801|  1.95M|      num /= 10;
  802|  1.95M|    }
  803|   961k|    break;
  804|   360k|  default:
  ------------------
  |  Branch (804:3): [True: 360k, False: 961k]
  ------------------
  805|  1.07M|    while(num > 0) {
  ------------------
  |  Branch (805:11): [True: 716k, False: 360k]
  ------------------
  806|   716k|      *w-- = digits[num % base];
  807|   716k|      num /= base;
  808|   716k|    }
  809|   360k|    break;
  810|  1.32M|  }
  811|  1.32M|  width -= (int)(workend - w);
  812|  1.32M|  prec -= (int)(workend - w);
  813|       |
  814|  1.32M|  if(is_alt && base == 8 && prec <= 0) {
  ------------------
  |  Branch (814:6): [True: 0, False: 1.32M]
  |  Branch (814:16): [True: 0, False: 0]
  |  Branch (814:29): [True: 0, False: 0]
  ------------------
  815|      0|    *w-- = '0';
  816|      0|    --width;
  817|      0|  }
  818|       |
  819|  1.32M|  if(prec > 0) {
  ------------------
  |  Branch (819:6): [True: 122k, False: 1.20M]
  ------------------
  820|   122k|    width -= prec;
  821|   244k|    while(prec-- > 0 && w >= work)
  ------------------
  |  Branch (821:11): [True: 122k, False: 122k]
  |  Branch (821:25): [True: 122k, False: 0]
  ------------------
  822|   122k|      *w-- = '0';
  823|   122k|  }
  824|       |
  825|  1.32M|  if(is_alt && base == 16)
  ------------------
  |  Branch (825:6): [True: 0, False: 1.32M]
  |  Branch (825:16): [True: 0, False: 0]
  ------------------
  826|      0|    width -= 2;
  827|       |
  828|  1.32M|  if(is_neg || (flags & FLAGS_SHOWSIGN) || (flags & FLAGS_SPACE))
  ------------------
  |  Branch (828:6): [True: 2, False: 1.32M]
  |  Branch (828:16): [True: 0, False: 1.32M]
  |  Branch (828:44): [True: 0, False: 1.32M]
  ------------------
  829|      0|    --width;
  830|       |
  831|  1.32M|  if(!(flags & FLAGS_LEFT) && !(flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (831:6): [True: 1.32M, False: 2]
  |  Branch (831:31): [True: 960k, False: 361k]
  ------------------
  832|  1.01M|    while(width-- > 0)
  ------------------
  |  Branch (832:11): [True: 51.6k, False: 960k]
  ------------------
  833|  51.6k|      OUTCHAR(' ');
  ------------------
  |  |   43|  51.6k|  do {                                    \
  |  |   44|  51.6k|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 51.6k]
  |  |  ------------------
  |  |   45|  51.6k|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|  51.6k|    (*donep)++;                           \
  |  |   47|  51.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 51.6k]
  |  |  ------------------
  ------------------
  834|       |
  835|  1.32M|  if(is_neg)
  ------------------
  |  Branch (835:6): [True: 0, False: 1.32M]
  ------------------
  836|      0|    OUTCHAR('-');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  837|  1.32M|  else if(flags & FLAGS_SHOWSIGN)
  ------------------
  |  Branch (837:11): [True: 0, False: 1.32M]
  ------------------
  838|      0|    OUTCHAR('+');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  839|  1.32M|  else if(flags & FLAGS_SPACE)
  ------------------
  |  Branch (839:11): [True: 0, False: 1.32M]
  ------------------
  840|      0|    OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  841|       |
  842|  1.32M|  if(is_alt && base == 16) {
  ------------------
  |  Branch (842:6): [True: 0, False: 1.32M]
  |  Branch (842:16): [True: 0, False: 0]
  ------------------
  843|      0|    OUTCHAR('0');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  844|      0|    if(flags & FLAGS_UPPER)
  ------------------
  |  Branch (844:8): [True: 0, False: 0]
  ------------------
  845|      0|      OUTCHAR('X');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  846|      0|    else
  847|      0|      OUTCHAR('x');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  848|      0|  }
  849|       |
  850|  1.32M|  if(!(flags & FLAGS_LEFT) && (flags & FLAGS_PAD_NIL))
  ------------------
  |  Branch (850:6): [True: 1.32M, False: 2]
  |  Branch (850:31): [True: 361k, False: 960k]
  ------------------
  851|   367k|    while(width-- > 0)
  ------------------
  |  Branch (851:11): [True: 5.54k, False: 361k]
  ------------------
  852|  5.54k|      OUTCHAR('0');
  ------------------
  |  |   43|  5.54k|  do {                                    \
  |  |   44|  5.54k|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 5.54k]
  |  |  ------------------
  |  |   45|  5.54k|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|  5.54k|    (*donep)++;                           \
  |  |   47|  5.54k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 5.54k]
  |  |  ------------------
  ------------------
  853|       |
  854|       |  /* Write the number. */
  855|  4.11M|  while(++w <= workend) {
  ------------------
  |  Branch (855:9): [True: 2.79M, False: 1.32M]
  ------------------
  856|  2.79M|    OUTCHAR(*w);
  ------------------
  |  |   43|  2.79M|  do {                                    \
  |  |   44|  2.79M|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 8, False: 2.79M]
  |  |  ------------------
  |  |   45|  2.79M|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      8|#define TRUE true
  |  |  ------------------
  |  |   46|  2.79M|    (*donep)++;                           \
  |  |   47|  2.79M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 2.79M]
  |  |  ------------------
  ------------------
  857|  2.79M|  }
  858|       |
  859|  1.32M|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (859:6): [True: 0, False: 1.32M]
  ------------------
  860|      0|    while(width-- > 0)
  ------------------
  |  Branch (860:11): [True: 0, False: 0]
  ------------------
  861|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  862|       |
  863|  1.32M|  return FALSE;
  ------------------
  |  | 1058|  1.32M|#define FALSE false
  ------------------
  864|  1.32M|}
mprintf.c:out_string:
  873|  1.22M|{
  874|  1.22M|  int flags = p->flags;
  875|  1.22M|  int width = p->width;
  876|  1.22M|  int prec = p->prec;
  877|  1.22M|  size_t len;
  878|       |
  879|  1.22M|  if(!str) {
  ------------------
  |  Branch (879:6): [True: 302, False: 1.22M]
  ------------------
  880|       |    /* Write null string if there is space. */
  881|    302|    if(prec == -1 || prec >= (int)sizeof(nilstr) - 1) {
  ------------------
  |  Branch (881:8): [True: 302, False: 0]
  |  Branch (881:22): [True: 0, False: 0]
  ------------------
  882|    302|      str = nilstr;
  883|    302|      len = sizeof(nilstr) - 1;
  884|       |      /* Disable quotes around (nil) */
  885|    302|      flags &= ~(unsigned int)FLAGS_ALT;
  886|    302|    }
  887|      0|    else {
  888|      0|      str = "";
  889|      0|      len = 0;
  890|      0|    }
  891|    302|  }
  892|  1.22M|  else if(prec != -1)
  ------------------
  |  Branch (892:11): [True: 37.8k, False: 1.18M]
  ------------------
  893|  37.8k|    len = (size_t)prec;
  894|  1.18M|  else if(*str == '\0')
  ------------------
  |  Branch (894:11): [True: 664k, False: 519k]
  ------------------
  895|   664k|    len = 0;
  896|   519k|  else
  897|   519k|    len = strlen(str);
  898|       |
  899|  1.22M|  width -= (len > INT_MAX) ? INT_MAX : (int)len;
  ------------------
  |  Branch (899:12): [True: 0, False: 1.22M]
  ------------------
  900|       |
  901|  1.22M|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (901:6): [True: 0, False: 1.22M]
  ------------------
  902|      0|    OUTCHAR('"');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  903|       |
  904|  1.22M|  if(!(flags & FLAGS_LEFT))
  ------------------
  |  Branch (904:6): [True: 1.22M, False: 0]
  ------------------
  905|  1.22M|    while(width-- > 0)
  ------------------
  |  Branch (905:11): [True: 0, False: 1.22M]
  ------------------
  906|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  907|       |
  908|  99.7M|  for(; len && *str; len--)
  ------------------
  |  Branch (908:9): [True: 98.5M, False: 1.22M]
  |  Branch (908:16): [True: 98.5M, False: 0]
  ------------------
  909|  98.5M|    OUTCHAR(*str++);
  ------------------
  |  |   43|  99.7M|  do {                                    \
  |  |   44|  98.5M|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 54, False: 98.5M]
  |  |  ------------------
  |  |   45|  98.5M|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|     54|#define TRUE true
  |  |  ------------------
  |  |   46|  98.5M|    (*donep)++;                           \
  |  |   47|  98.5M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 98.5M]
  |  |  ------------------
  ------------------
  910|  1.22M|  if(flags & FLAGS_LEFT)
  ------------------
  |  Branch (910:6): [True: 0, False: 1.22M]
  ------------------
  911|      0|    while(width-- > 0)
  ------------------
  |  Branch (911:11): [True: 0, False: 0]
  ------------------
  912|      0|      OUTCHAR(' ');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  913|       |
  914|  1.22M|  if(flags & FLAGS_ALT)
  ------------------
  |  Branch (914:6): [True: 0, False: 1.22M]
  ------------------
  915|      0|    OUTCHAR('"');
  ------------------
  |  |   43|      0|  do {                                    \
  |  |   44|      0|    if(stream((unsigned char)(x), userp)) \
  |  |  ------------------
  |  |  |  Branch (44:8): [True: 0, False: 0]
  |  |  ------------------
  |  |   45|      0|      return TRUE;                        \
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  |  |   46|      0|    (*donep)++;                           \
  |  |   47|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (47:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  916|       |
  917|  1.22M|  return FALSE;
  ------------------
  |  | 1058|  1.22M|#define FALSE false
  ------------------
  918|  1.22M|}
mprintf.c:addbyter:
 1093|  3.35M|{
 1094|  3.35M|  struct nsprintf *infop = f;
 1095|  3.35M|  if(infop->length < infop->max) {
  ------------------
  |  Branch (1095:6): [True: 3.35M, False: 25]
  ------------------
 1096|       |    /* only do this if we have not reached max length yet */
 1097|  3.35M|    *infop->buffer++ = (char)outc; /* store */
 1098|  3.35M|    infop->length++; /* we are now one byte larger */
 1099|  3.35M|    return 0;     /* fputc() returns like this on success */
 1100|  3.35M|  }
 1101|     25|  return 1;
 1102|  3.35M|}
mprintf.c:alloc_addbyter:
 1141|  98.2M|{
 1142|  98.2M|  struct asprintf *infop = f;
 1143|  98.2M|  CURLcode result = curlx_dyn_addn(infop->b, &outc, 1);
 1144|  98.2M|  if(result) {
  ------------------
  |  Branch (1144:6): [True: 41, False: 98.2M]
  ------------------
 1145|     41|    infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   29|     41|#define MERR_TOO_LARGE 2
  ------------------
                  infop->merr = result == CURLE_TOO_LARGE ? MERR_TOO_LARGE : MERR_MEM;
  ------------------
  |  |   28|     41|#define MERR_MEM       1
  ------------------
  |  Branch (1145:19): [True: 41, False: 0]
  ------------------
 1146|     41|    return 1; /* fail */
 1147|     41|  }
 1148|  98.2M|  return 0;
 1149|  98.2M|}
mprintf.c:fputc_wrapper:
 1214|  2.46M|{
 1215|  2.46M|  int out = outc;
 1216|  2.46M|  FILE *s = f;
 1217|  2.46M|  int rc = fputc(out, s);
 1218|       |  return rc == EOF;
 1219|  2.46M|}

Curl_multi_handle:
  232|  15.3k|{
  233|  15.3k|  struct Curl_multi *multi = curlx_calloc(1, sizeof(struct Curl_multi));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  234|       |
  235|  15.3k|  if(!multi)
  ------------------
  |  Branch (235:6): [True: 0, False: 15.3k]
  ------------------
  236|      0|    return NULL;
  237|       |
  238|  15.3k|  multi->magic = CURL_MULTI_HANDLE;
  ------------------
  |  |   75|  15.3k|#define CURL_MULTI_HANDLE 0x000bab1e
  ------------------
  239|       |
  240|  15.3k|  Curl_dnscache_init(&multi->dnscache, dnssize);
  241|  15.3k|  Curl_mntfy_init(multi);
  242|  15.3k|  Curl_multi_ev_init(multi, ev_hashsize);
  243|  15.3k|  Curl_uint32_tbl_init(&multi->xfers, NULL);
  244|  15.3k|  Curl_uint32_bset_init(&multi->process);
  245|  15.3k|  Curl_uint32_bset_init(&multi->dirty);
  246|  15.3k|  Curl_uint32_bset_init(&multi->pending);
  247|  15.3k|  Curl_uint32_bset_init(&multi->msgsent);
  248|  15.3k|  Curl_hash_init(&multi->proto_hash, 23,
  249|  15.3k|                 Curl_hash_str, curlx_str_key_compare, ph_freeentry);
  250|  15.3k|  Curl_llist_init(&multi->msglist, NULL);
  251|       |
  252|  15.3k|  multi->multiplexing = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  253|  15.3k|  multi->max_concurrent_streams = 100;
  254|  15.3k|  multi->last_timeout_ms = -1;
  255|  15.3k|#ifdef ENABLE_WAKEUP
  256|  15.3k|  multi->wakeup_pair[0] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  15.3k|#define CURL_SOCKET_BAD (-1)
  ------------------
  257|  15.3k|  multi->wakeup_pair[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  15.3k|#define CURL_SOCKET_BAD (-1)
  ------------------
  258|  15.3k|#endif
  259|       |
  260|  15.3k|  if(Curl_mntfy_resize(multi) ||
  ------------------
  |  Branch (260:6): [True: 0, False: 15.3k]
  ------------------
  261|  15.3k|     Curl_uint32_bset_resize(&multi->process, xfer_table_size) ||
  ------------------
  |  Branch (261:6): [True: 0, False: 15.3k]
  ------------------
  262|  15.3k|     Curl_uint32_bset_resize(&multi->pending, xfer_table_size) ||
  ------------------
  |  Branch (262:6): [True: 0, False: 15.3k]
  ------------------
  263|  15.3k|     Curl_uint32_bset_resize(&multi->dirty, xfer_table_size) ||
  ------------------
  |  Branch (263:6): [True: 0, False: 15.3k]
  ------------------
  264|  15.3k|     Curl_uint32_bset_resize(&multi->msgsent, xfer_table_size) ||
  ------------------
  |  Branch (264:6): [True: 0, False: 15.3k]
  ------------------
  265|  15.3k|     Curl_uint32_tbl_resize(&multi->xfers, xfer_table_size))
  ------------------
  |  Branch (265:6): [True: 0, False: 15.3k]
  ------------------
  266|      0|    goto error;
  267|       |
  268|  15.3k|  multi->admin = curl_easy_init();
  269|  15.3k|  if(!multi->admin)
  ------------------
  |  Branch (269:6): [True: 0, False: 15.3k]
  ------------------
  270|      0|    goto error;
  271|       |  /* Initialize admin handle to operate inside this multi */
  272|  15.3k|  multi->admin->multi = multi;
  273|  15.3k|  multi->admin->state.internal = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  274|  15.3k|  Curl_llist_init(&multi->admin->state.timeoutlist, NULL);
  275|       |
  276|  15.3k|#ifdef DEBUGBUILD
  277|  15.3k|  if(getenv("CURL_DEBUG"))
  ------------------
  |  Branch (277:6): [True: 0, False: 15.3k]
  ------------------
  278|      0|    multi->admin->set.verbose = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  279|  15.3k|#endif
  280|  15.3k|  Curl_uint32_tbl_add(&multi->xfers, multi->admin, &multi->admin->mid);
  281|  15.3k|  Curl_uint32_bset_add(&multi->process, multi->admin->mid);
  282|       |
  283|  15.3k|  if(Curl_cshutdn_init(&multi->cshutdn, multi))
  ------------------
  |  Branch (283:6): [True: 0, False: 15.3k]
  ------------------
  284|      0|    goto error;
  285|       |
  286|  15.3k|  Curl_cpool_init(&multi->cpool, multi->admin, NULL, chashsize);
  287|       |
  288|  15.3k|#ifdef USE_SSL
  289|  15.3k|  if(Curl_ssl_scache_create(sesssize, 2, &multi->ssl_scache))
  ------------------
  |  Branch (289:6): [True: 0, False: 15.3k]
  ------------------
  290|      0|    goto error;
  291|       |#else
  292|       |  (void)sesssize;
  293|       |#endif
  294|       |
  295|       |#ifdef USE_WINSOCK
  296|       |  multi->wsa_event = WSACreateEvent();
  297|       |  if(multi->wsa_event == WSA_INVALID_EVENT)
  298|       |    goto error;
  299|       |#endif
  300|  15.3k|#ifdef ENABLE_WAKEUP
  301|       |  /* When enabled, rely on this to work. We ignore this in previous
  302|       |   * versions, but that seems an unnecessary complication. */
  303|  15.3k|  if(Curl_wakeup_init(multi->wakeup_pair, TRUE) < 0)
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  |  Branch (303:6): [True: 0, False: 15.3k]
  ------------------
  304|      0|    goto error;
  305|  15.3k|#endif
  306|       |
  307|  15.3k|  if(Curl_probeipv6(multi))
  ------------------
  |  Branch (307:6): [True: 0, False: 15.3k]
  ------------------
  308|      0|    goto error;
  309|       |
  310|  15.3k|#ifdef USE_RESOLV_THREADED
  311|  15.3k|  if(xfer_table_size < CURL_XFER_TABLE_SIZE) { /* easy multi */
  ------------------
  |  |   52|  15.3k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  |  Branch (311:6): [True: 0, False: 15.3k]
  ------------------
  312|      0|    if(Curl_async_thrdd_multi_init(multi, 0, 2, 10))
  ------------------
  |  Branch (312:8): [True: 0, False: 0]
  ------------------
  313|      0|      goto error;
  314|      0|  }
  315|  15.3k|  else { /* real multi handle */
  316|  15.3k|    if(Curl_async_thrdd_multi_init(multi, 0, 20, 2000))
  ------------------
  |  Branch (316:8): [True: 0, False: 15.3k]
  ------------------
  317|      0|      goto error;
  318|  15.3k|  }
  319|  15.3k|#endif
  320|       |
  321|  15.3k|  return multi;
  322|       |
  323|      0|error:
  324|       |
  325|      0|#ifdef USE_RESOLV_THREADED
  326|      0|  Curl_async_thrdd_multi_destroy(multi, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  327|      0|#endif
  328|      0|  Curl_multi_ev_cleanup(multi);
  329|      0|  Curl_hash_destroy(&multi->proto_hash);
  330|      0|  Curl_dnscache_destroy(&multi->dnscache);
  331|      0|  Curl_cpool_destroy(&multi->cpool);
  332|      0|  Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
  333|      0|#ifdef USE_SSL
  334|      0|  Curl_ssl_scache_destroy(multi->ssl_scache);
  335|      0|#endif
  336|      0|  if(multi->admin) {
  ------------------
  |  Branch (336:6): [True: 0, False: 0]
  ------------------
  337|      0|    Curl_multi_ev_xfer_done(multi, multi->admin);
  338|      0|    multi->admin->multi = NULL;
  339|      0|    Curl_close(&multi->admin);
  340|      0|  }
  341|      0|  Curl_mntfy_cleanup(multi);
  342|       |
  343|      0|  Curl_uint32_bset_destroy(&multi->process);
  344|      0|  Curl_uint32_bset_destroy(&multi->dirty);
  345|      0|  Curl_uint32_bset_destroy(&multi->pending);
  346|      0|  Curl_uint32_bset_destroy(&multi->msgsent);
  347|      0|  Curl_uint32_tbl_destroy(&multi->xfers);
  348|      0|#ifdef ENABLE_WAKEUP
  349|      0|  Curl_wakeup_destroy(multi->wakeup_pair);
  350|      0|#endif
  351|       |
  352|      0|  curlx_free(multi);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  353|       |  return NULL;
  354|  15.3k|}
curl_multi_init:
  357|  15.3k|{
  358|  15.3k|  return Curl_multi_handle(CURL_XFER_TABLE_SIZE,
  ------------------
  |  |   52|  15.3k|#define CURL_XFER_TABLE_SIZE 512
  ------------------
  359|  15.3k|                           CURL_SOCKET_HASH_TABLE_SIZE,
  ------------------
  |  |   60|  15.3k|#define CURL_SOCKET_HASH_TABLE_SIZE 911
  ------------------
  360|  15.3k|                           CURL_CONNECTION_HASH_SIZE,
  ------------------
  |  |   64|  15.3k|#define CURL_CONNECTION_HASH_SIZE 97
  ------------------
  361|  15.3k|                           CURL_DNS_HASH_SIZE,
  ------------------
  |  |   68|  15.3k|#define CURL_DNS_HASH_SIZE 71
  ------------------
  362|  15.3k|                           CURL_TLS_SESSION_SIZE);
  ------------------
  |  |   72|  15.3k|#define CURL_TLS_SESSION_SIZE 25
  ------------------
  363|  15.3k|}
Curl_is_connecting:
  380|  2.49M|{
  381|  2.49M|  return data->mstate < MSTATE_DO;
  382|  2.49M|}
curl_multi_add_handle:
  455|  16.1k|{
  456|  16.1k|  CURLMcode mresult;
  457|  16.1k|  struct Curl_multi *multi = m;
  458|  16.1k|  struct Curl_easy *data = curl;
  459|       |
  460|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  461|  16.1k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  16.1k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  16.1k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  16.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 16.1k, False: 0]
  |  |  |  Branch (82:12): [True: 16.1k, False: 0]
  |  |  ------------------
  |  |   83|  16.1k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (461:6): [True: 0, False: 16.1k]
  |  Branch (461:7): [True: 0, False: 0]
  |  Branch (461:7): [True: 0, False: 0]
  ------------------
  462|      0|    return CURLM_BAD_HANDLE;
  463|       |
  464|       |  /* Verify that we got a somewhat good easy handle too */
  465|  16.1k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  16.1k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  16.1k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  16.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 16.1k, False: 0]
  |  |  |  Branch (136:12): [True: 16.1k, False: 0]
  |  |  ------------------
  |  |  137|  16.1k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (465:6): [True: 0, False: 16.1k]
  |  Branch (465:7): [True: 0, False: 0]
  |  Branch (465:7): [True: 0, False: 0]
  ------------------
  466|      0|    return CURLM_BAD_EASY_HANDLE;
  467|       |
  468|       |  /* Prevent users from adding same easy handle more than once and prevent
  469|       |     adding to more than one multi stack */
  470|  16.1k|  if(data->multi)
  ------------------
  |  Branch (470:6): [True: 0, False: 16.1k]
  ------------------
  471|      0|    return CURLM_ADDED_ALREADY;
  472|       |
  473|  16.1k|  if(multi->in_callback)
  ------------------
  |  Branch (473:6): [True: 0, False: 16.1k]
  ------------------
  474|      0|    return CURLM_RECURSIVE_API_CALL;
  475|       |
  476|  16.1k|  if(multi->dead) {
  ------------------
  |  Branch (476:6): [True: 0, False: 16.1k]
  ------------------
  477|       |    /* a "dead" handle cannot get added transfers while any existing easy
  478|       |       handles are still alive - but if there are none alive anymore, it is
  479|       |       fine to start over and unmark the "deadness" of this handle.
  480|       |       This means only the admin handle MUST be present. */
  481|      0|    if((Curl_uint32_tbl_count(&multi->xfers) != 1) ||
  ------------------
  |  Branch (481:8): [True: 0, False: 0]
  ------------------
  482|      0|       !Curl_uint32_tbl_contains(&multi->xfers, 0))
  ------------------
  |  Branch (482:8): [True: 0, False: 0]
  ------------------
  483|      0|      return CURLM_ABORTED_BY_CALLBACK;
  484|      0|    multi->dead = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  485|      0|    Curl_uint32_bset_clear(&multi->process);
  486|      0|    Curl_uint32_bset_clear(&multi->dirty);
  487|      0|    Curl_uint32_bset_clear(&multi->pending);
  488|      0|    Curl_uint32_bset_clear(&multi->msgsent);
  489|      0|  }
  490|       |
  491|  16.1k|  if(data->multi_easy) {
  ------------------
  |  Branch (491:6): [True: 0, False: 16.1k]
  ------------------
  492|       |    /* if this easy handle was previously used for curl_easy_perform(), there
  493|       |       is a private multi handle here that we can kill */
  494|      0|    curl_multi_cleanup(data->multi_easy);
  495|      0|    data->multi_easy = NULL;
  496|      0|  }
  497|       |
  498|       |  /* Insert the easy into the multi->xfers table, assigning it a `mid`. */
  499|  16.1k|  if(multi_xfers_add(multi, data))
  ------------------
  |  Branch (499:6): [True: 0, False: 16.1k]
  ------------------
  500|      0|    return CURLM_OUT_OF_MEMORY;
  501|       |
  502|       |  /* Initialize timeout list for this handle */
  503|  16.1k|  Curl_llist_init(&data->state.timeoutlist, NULL);
  504|       |
  505|       |  /*
  506|       |   * No failure allowed in this function beyond this point. No modification of
  507|       |   * easy nor multi handle allowed before this except for potential multi's
  508|       |   * connection pool growing which will not be undone in this function no
  509|       |   * matter what.
  510|       |   */
  511|  16.1k|  if(data->set.errorbuffer)
  ------------------
  |  Branch (511:6): [True: 0, False: 16.1k]
  ------------------
  512|      0|    data->set.errorbuffer[0] = 0;
  513|       |
  514|  16.1k|  data->state.os_errno = 0;
  515|       |
  516|       |  /* make the Curl_easy refer back to this multi handle - before Curl_expire()
  517|       |     is called. */
  518|  16.1k|  data->multi = multi;
  519|       |
  520|       |  /* set the easy handle */
  521|  16.1k|  multistate(data, MSTATE_INIT);
  ------------------
  |  |  200|  16.1k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
  522|       |
  523|       |#ifdef USE_LIBPSL
  524|       |  /* Do the same for PSL. */
  525|       |  if(data->share && (data->share->specifier & (1 << CURL_LOCK_DATA_PSL)))
  526|       |    data->psl = &data->share->psl;
  527|       |  else
  528|       |    data->psl = &multi->psl;
  529|       |#endif
  530|       |
  531|       |  /* add the easy handle to the process set */
  532|  16.1k|  Curl_uint32_bset_add(&multi->process, data->mid);
  533|  16.1k|  ++multi->xfers_alive;
  534|  16.1k|  ++multi->xfers_total_ever;
  535|       |
  536|  16.1k|  Curl_cpool_xfer_init(data);
  537|  16.1k|  multi_warn_debug(multi, data);
  538|       |
  539|       |  /* Make sure the new handle will run */
  540|  16.1k|  Curl_multi_mark_dirty(data);
  541|       |
  542|       |  /* Necessary in event based processing, where dirty handles trigger
  543|       |   * a timeout callback invocation. */
  544|  16.1k|  mresult = Curl_update_timer(multi);
  545|  16.1k|  if(mresult) {
  ------------------
  |  Branch (545:6): [True: 0, False: 16.1k]
  ------------------
  546|      0|    data->multi = NULL; /* not anymore */
  547|      0|    Curl_uint32_tbl_remove(&multi->xfers, data->mid);
  548|      0|    data->mid = UINT32_MAX;
  549|      0|    return mresult;
  550|      0|  }
  551|       |
  552|       |  /* The admin handle only ever has default timeouts set. To improve the
  553|       |     state somewhat we clone the timeouts from each added handle so that the
  554|       |     admin handle always has the same timeouts as the most recently added
  555|       |     easy handle. */
  556|  16.1k|  multi->admin->set.timeout = data->set.timeout;
  557|  16.1k|  multi->admin->set.server_response_timeout =
  558|  16.1k|    data->set.server_response_timeout;
  559|  16.1k|  multi->admin->set.no_signal = data->set.no_signal;
  560|       |
  561|  16.1k|  mresult = multi_assess_wakeup(multi);
  562|  16.1k|  if(mresult) {
  ------------------
  |  Branch (562:6): [True: 0, False: 16.1k]
  ------------------
  563|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  564|      0|    return mresult;
  565|      0|  }
  566|       |
  567|  16.1k|  CURL_TRC_M(data, "added to multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  16.1k|  do {                                   \
  |  |  149|  16.1k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  16.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  16.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  32.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 16.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 16.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  32.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  16.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  16.1k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  16.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  568|  16.1k|             data->mid, Curl_multi_xfers_running(multi),
  569|  16.1k|             Curl_uint32_tbl_count(&multi->xfers));
  570|  16.1k|  return CURLM_OK;
  571|  16.1k|}
curl_multi_remove_handle:
  777|  16.1k|{
  778|  16.1k|  struct Curl_multi *multi = m;
  779|  16.1k|  struct Curl_easy *data = curl;
  780|  16.1k|  bool premature;
  781|  16.1k|  struct Curl_llist_node *e;
  782|  16.1k|  CURLMcode mresult;
  783|  16.1k|  uint32_t mid;
  784|       |
  785|       |  /* First, make some basic checks that the CURLM handle is a good handle */
  786|  16.1k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|  16.1k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  16.1k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  16.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 16.1k, False: 0]
  |  |  |  Branch (82:12): [True: 16.1k, False: 0]
  |  |  ------------------
  |  |   83|  16.1k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (786:6): [True: 0, False: 16.1k]
  |  Branch (786:7): [True: 0, False: 0]
  |  Branch (786:7): [True: 0, False: 0]
  ------------------
  787|      0|    return CURLM_BAD_HANDLE;
  788|       |
  789|       |  /* Verify that we got a somewhat good easy handle too */
  790|  16.1k|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  16.1k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  16.1k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  16.1k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 16.1k, False: 0]
  |  |  |  Branch (136:12): [True: 16.1k, False: 0]
  |  |  ------------------
  |  |  137|  16.1k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (790:6): [True: 0, False: 16.1k]
  |  Branch (790:7): [True: 0, False: 0]
  |  Branch (790:7): [True: 0, False: 0]
  ------------------
  791|      0|    return CURLM_BAD_EASY_HANDLE;
  792|       |
  793|       |  /* Prevent users from trying to remove same easy handle more than once */
  794|  16.1k|  if(!data->multi)
  ------------------
  |  Branch (794:6): [True: 0, False: 16.1k]
  ------------------
  795|      0|    return CURLM_OK; /* it is already removed so let's say it is fine! */
  796|       |
  797|       |  /* Prevent users from trying to remove an easy handle from the wrong multi */
  798|  16.1k|  if(data->multi != multi)
  ------------------
  |  Branch (798:6): [True: 0, False: 16.1k]
  ------------------
  799|      0|    return CURLM_BAD_EASY_HANDLE;
  800|       |
  801|  16.1k|  if(data->mid == UINT32_MAX) {
  ------------------
  |  Branch (801:6): [True: 0, False: 16.1k]
  ------------------
  802|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (802:5): [Folded, False: 0]
  |  Branch (802:5): [Folded, False: 0]
  ------------------
  803|      0|    return CURLM_INTERNAL_ERROR;
  804|      0|  }
  805|  16.1k|  if(Curl_uint32_tbl_get(&multi->xfers, data->mid) != data) {
  ------------------
  |  Branch (805:6): [True: 0, False: 16.1k]
  ------------------
  806|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (806:5): [Folded, False: 0]
  |  Branch (806:5): [Folded, False: 0]
  ------------------
  807|      0|    return CURLM_INTERNAL_ERROR;
  808|      0|  }
  809|       |
  810|  16.1k|  if(multi->in_callback)
  ------------------
  |  Branch (810:6): [True: 0, False: 16.1k]
  ------------------
  811|      0|    return CURLM_RECURSIVE_API_CALL;
  812|       |
  813|  16.1k|  premature = (data->mstate < MSTATE_COMPLETED);
  814|       |
  815|       |  /* If the 'state' is not INIT or COMPLETED, we might need to do something
  816|       |     nice to put the easy_handle in a good known state when this returns. */
  817|  16.1k|  if(data->conn &&
  ------------------
  |  Branch (817:6): [True: 410, False: 15.6k]
  ------------------
  818|    410|     data->mstate > MSTATE_DO &&
  ------------------
  |  Branch (818:6): [True: 150, False: 260]
  ------------------
  819|    150|     data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (819:6): [True: 150, False: 0]
  ------------------
  820|       |    /* Set connection owner so that the DONE function closes it. We can
  821|       |       safely do this here since connection is killed. */
  822|    150|    streamclose(data->conn, "Removed with partial response");
  ------------------
  |  |  102|    150|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|    150|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  823|    150|  }
  824|       |
  825|  16.1k|  if(data->conn) {
  ------------------
  |  Branch (825:6): [True: 410, False: 15.6k]
  ------------------
  826|       |    /* multi_done() clears the association between the easy handle and the
  827|       |       connection.
  828|       |
  829|       |       Note that this ignores the return code because there is
  830|       |       nothing really useful to do with it anyway! */
  831|    410|    (void)multi_done(data, data->result, premature);
  832|    410|  }
  833|       |
  834|       |  /* The timer must be shut down before data->multi is set to NULL, else the
  835|       |     timenode will remain in the splay tree after curl_easy_cleanup is
  836|       |     called. Do it after multi_done() in case that sets another time! */
  837|  16.1k|  Curl_expire_clear(data);
  838|       |
  839|       |  /* If in `msgsent`, it was deducted from `multi->xfers_alive` already. */
  840|  16.1k|  if(!Curl_uint32_bset_contains(&multi->msgsent, data->mid))
  ------------------
  |  Branch (840:6): [True: 514, False: 15.5k]
  ------------------
  841|    514|    --multi->xfers_alive;
  842|       |
  843|  16.1k|  Curl_wildcard_dtor(&data->wildcard);
  844|       |
  845|  16.1k|  data->mstate = MSTATE_COMPLETED;
  846|       |
  847|       |  /* Remove the association between the connection and the handle */
  848|  16.1k|  Curl_detach_connection(data);
  849|       |
  850|       |  /* Tell event handling that this transfer is definitely going away */
  851|  16.1k|  Curl_multi_ev_xfer_done(multi, data);
  852|       |
  853|  16.1k|  if(data->set.connect_only && !data->multi_easy) {
  ------------------
  |  Branch (853:6): [True: 56, False: 16.0k]
  |  Branch (853:32): [True: 56, False: 0]
  ------------------
  854|       |    /* This removes a handle that was part the multi interface that used
  855|       |       CONNECT_ONLY, that connection is now left alive but since this handle
  856|       |       has bits.close set nothing can use that transfer anymore and it is
  857|       |       forbidden from reuse. This easy handle cannot find the connection
  858|       |       anymore once removed from the multi handle
  859|       |
  860|       |       Better close the connection here, at once.
  861|       |    */
  862|     56|    struct connectdata *c;
  863|     56|    curl_socket_t s;
  864|     56|    s = Curl_getconnectinfo(data, &c);
  865|     56|    if((s != CURL_SOCKET_BAD) && c) {
  ------------------
  |  |  145|     56|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (865:8): [True: 49, False: 7]
  |  Branch (865:34): [True: 49, False: 0]
  ------------------
  866|     49|      Curl_conn_terminate(data, c, TRUE);
  ------------------
  |  | 1055|     49|#define TRUE true
  ------------------
  867|     49|    }
  868|     56|  }
  869|       |
  870|  16.1k|  if(data->state.lastconnect_id != -1) {
  ------------------
  |  Branch (870:6): [True: 2.52k, False: 13.5k]
  ------------------
  871|       |    /* Mark any connect-only connection for closure */
  872|  2.52k|    Curl_cpool_do_by_id(data, data->state.lastconnect_id,
  873|  2.52k|                        close_connect_only, NULL);
  874|  2.52k|  }
  875|       |
  876|       |#ifdef USE_LIBPSL
  877|       |  /* Remove the PSL association. */
  878|       |  if(data->psl == &multi->psl)
  879|       |    data->psl = NULL;
  880|       |#endif
  881|       |
  882|       |  /* make sure there is no pending message in the queue sent from this easy
  883|       |     handle */
  884|  16.1k|  for(e = Curl_llist_head(&multi->msglist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (884:45): [True: 15.0k, False: 1.04k]
  ------------------
  885|  15.0k|    struct Curl_message *msg = Curl_node_elem(e);
  886|       |
  887|  15.0k|    if(msg->extmsg.easy_handle == data) {
  ------------------
  |  Branch (887:8): [True: 15.0k, False: 0]
  ------------------
  888|  15.0k|      Curl_node_remove(e);
  889|       |      /* there can only be one from this specific handle */
  890|  15.0k|      break;
  891|  15.0k|    }
  892|  15.0k|  }
  893|       |
  894|       |  /* clear the association to this multi handle */
  895|  16.1k|  mid = data->mid;
  896|  16.1k|  DEBUGASSERT(Curl_uint32_tbl_contains(&multi->xfers, mid));
  ------------------
  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (896:3): [True: 0, False: 16.1k]
  |  Branch (896:3): [True: 16.1k, False: 0]
  ------------------
  897|  16.1k|  Curl_uint32_tbl_remove(&multi->xfers, mid);
  898|  16.1k|  Curl_uint32_bset_remove(&multi->process, mid);
  899|  16.1k|  Curl_uint32_bset_remove(&multi->dirty, mid);
  900|  16.1k|  Curl_uint32_bset_remove(&multi->pending, mid);
  901|  16.1k|  Curl_uint32_bset_remove(&multi->msgsent, mid);
  902|  16.1k|  data->multi = NULL;
  903|  16.1k|  data->mid = UINT32_MAX;
  904|  16.1k|  data->master_mid = UINT32_MAX;
  905|       |
  906|       |  /* NOTE NOTE NOTE
  907|       |     We do not touch the easy handle here! */
  908|  16.1k|  process_pending_handles(multi);
  909|       |
  910|  16.1k|  mresult = Curl_update_timer(multi);
  911|  16.1k|  if(mresult)
  ------------------
  |  Branch (911:6): [True: 0, False: 16.1k]
  ------------------
  912|      0|    return mresult;
  913|       |
  914|  16.1k|  mresult = multi_assess_wakeup(multi);
  915|  16.1k|  if(mresult) {
  ------------------
  |  Branch (915:6): [True: 0, False: 16.1k]
  ------------------
  916|      0|    failf(data, "error enabling wakeup listening: %d", mresult);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  917|      0|    return mresult;
  918|      0|  }
  919|       |
  920|  16.1k|  CURL_TRC_M(data, "removed from multi, mid=%u, running=%u, total=%u",
  ------------------
  |  |  148|  16.1k|  do {                                   \
  |  |  149|  16.1k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  16.1k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  16.1k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  32.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 16.1k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 16.1k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  32.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  16.1k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  16.1k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  16.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  921|  16.1k|             mid, Curl_multi_xfers_running(multi),
  922|  16.1k|             Curl_uint32_tbl_count(&multi->xfers));
  923|  16.1k|  return CURLM_OK;
  924|  16.1k|}
Curl_multiplex_wanted:
  928|    660|{
  929|    660|  return multi && multi->multiplexing;
  ------------------
  |  Branch (929:10): [True: 660, False: 0]
  |  Branch (929:19): [True: 660, False: 0]
  ------------------
  930|    660|}
Curl_detach_connection:
  939|   112k|{
  940|   112k|  struct connectdata *conn = data->conn;
  941|   112k|  if(conn) {
  ------------------
  |  Branch (941:6): [True: 47.1k, False: 64.9k]
  ------------------
  942|       |    /* this should never happen, prevent underflow */
  943|  47.1k|    DEBUGASSERT(conn->attached_xfers);
  ------------------
  |  | 1081|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (943:5): [True: 0, False: 47.1k]
  |  Branch (943:5): [True: 47.1k, False: 0]
  ------------------
  944|  47.1k|    if(conn->attached_xfers) {
  ------------------
  |  Branch (944:8): [True: 47.1k, False: 0]
  ------------------
  945|  47.1k|      conn->attached_xfers--;
  946|  47.1k|      if(!conn->attached_xfers)
  ------------------
  |  Branch (946:10): [True: 47.1k, False: 0]
  ------------------
  947|  47.1k|        conn->attached_multi = NULL;
  948|  47.1k|    }
  949|  47.1k|  }
  950|   112k|  data->conn = NULL;
  951|   112k|}
Curl_attach_connection:
  960|  47.1k|{
  961|  47.1k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (961:3): [True: 0, False: 47.1k]
  |  Branch (961:3): [True: 47.1k, False: 0]
  ------------------
  962|  47.1k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (962:3): [True: 0, False: 47.1k]
  |  Branch (962:3): [True: 47.1k, False: 0]
  ------------------
  963|  47.1k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (963:3): [True: 0, False: 47.1k]
  |  Branch (963:3): [True: 47.1k, False: 0]
  ------------------
  964|  47.1k|  DEBUGASSERT(conn->attached_xfers < UINT32_MAX);
  ------------------
  |  | 1081|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (964:3): [True: 0, False: 47.1k]
  |  Branch (964:3): [True: 47.1k, False: 0]
  ------------------
  965|  47.1k|  data->conn = conn;
  966|  47.1k|  conn->attached_xfers++;
  967|       |  /* all attached transfers must be from the same multi */
  968|  47.1k|  if(!conn->attached_multi)
  ------------------
  |  Branch (968:6): [True: 47.1k, False: 0]
  ------------------
  969|  47.1k|    conn->attached_multi = data->multi;
  970|  47.1k|  DEBUGASSERT(conn->attached_multi == data->multi);
  ------------------
  |  | 1081|  47.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (970:3): [True: 0, False: 47.1k]
  |  Branch (970:3): [True: 47.1k, False: 0]
  ------------------
  971|       |
  972|  47.1k|  if(conn->scheme && conn->scheme->run->attach)
  ------------------
  |  Branch (972:6): [True: 47.1k, False: 0]
  |  Branch (972:22): [True: 0, False: 47.1k]
  ------------------
  973|      0|    conn->scheme->run->attach(data, conn);
  974|  47.1k|}
Curl_multi_pollset:
 1134|  1.72M|{
 1135|  1.72M|  CURLcode result = CURLE_OK;
 1136|       |
 1137|  1.72M|  Curl_pollset_reset(ps);
 1138|  1.72M|#ifdef ENABLE_WAKEUP
 1139|       |  /* The admin handle always listens on the wakeup socket when there
 1140|       |   * are transfers alive. */
 1141|  1.72M|  if(data->multi && (data == data->multi->admin) &&
  ------------------
  |  Branch (1141:6): [True: 1.72M, False: 0]
  |  Branch (1141:21): [True: 684k, False: 1.03M]
  ------------------
 1142|   684k|     data->multi->xfers_alive) {
  ------------------
  |  Branch (1142:6): [True: 684k, False: 0]
  ------------------
 1143|   684k|    result = Curl_pollset_add_in(data, ps, data->multi->wakeup_pair[0]);
  ------------------
  |  |  162|   684k|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|   684k|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1144|   684k|  }
 1145|  1.72M|#endif
 1146|       |  /* If the transfer has no connection, this is fine. Happens when
 1147|       |     called via curl_multi_remove_handle() => Curl_multi_ev_assess() =>
 1148|       |     Curl_multi_pollset(). */
 1149|  1.72M|  if(!result && data->conn) {
  ------------------
  |  Branch (1149:6): [True: 1.72M, False: 0]
  |  Branch (1149:17): [True: 1.03M, False: 684k]
  ------------------
 1150|  1.03M|    switch(data->mstate) {
 1151|      0|    case MSTATE_INIT:
  ------------------
  |  Branch (1151:5): [True: 0, False: 1.03M]
  ------------------
 1152|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (1152:5): [True: 0, False: 1.03M]
  ------------------
 1153|      0|    case MSTATE_SETUP:
  ------------------
  |  Branch (1153:5): [True: 0, False: 1.03M]
  ------------------
 1154|      0|    case MSTATE_CONNECT:
  ------------------
  |  Branch (1154:5): [True: 0, False: 1.03M]
  ------------------
 1155|       |      /* nothing to poll for yet */
 1156|      0|      break;
 1157|       |
 1158|   847k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (1158:5): [True: 847k, False: 192k]
  ------------------
 1159|   847k|      if(data->conn && !data->conn->bits.dns_resolved)
  ------------------
  |  Branch (1159:10): [True: 847k, False: 0]
  |  Branch (1159:24): [True: 221k, False: 625k]
  ------------------
 1160|   221k|        result = Curl_resolv_pollset(data, ps);
 1161|   847k|      if(!result)
  ------------------
  |  Branch (1161:10): [True: 847k, False: 0]
  ------------------
 1162|   847k|        result = mstate_connecting_pollset(data, ps);
 1163|   847k|      break;
 1164|       |
 1165|      0|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (1165:5): [True: 0, False: 1.03M]
  ------------------
 1166|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (1166:5): [True: 0, False: 1.03M]
  ------------------
 1167|      0|      result = mstate_protocol_pollset(data, ps);
 1168|      0|      break;
 1169|       |
 1170|      0|    case MSTATE_DO:
  ------------------
  |  Branch (1170:5): [True: 0, False: 1.03M]
  ------------------
 1171|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (1171:5): [True: 0, False: 1.03M]
  ------------------
 1172|      0|      result = mstate_do_pollset(data, ps);
 1173|      0|      break;
 1174|       |
 1175|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (1175:5): [True: 0, False: 1.03M]
  ------------------
 1176|      0|      result = mstate_domore_pollset(data, ps);
 1177|      0|      break;
 1178|       |
 1179|      0|    case MSTATE_DID: /* same as PERFORMING in regard to polling */
  ------------------
  |  Branch (1179:5): [True: 0, False: 1.03M]
  ------------------
 1180|   191k|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (1180:5): [True: 191k, False: 847k]
  ------------------
 1181|   191k|      result = mstate_perform_pollset(data, ps);
 1182|   191k|      break;
 1183|       |
 1184|    118|    case MSTATE_RATELIMITING:
  ------------------
  |  Branch (1184:5): [True: 118, False: 1.03M]
  ------------------
 1185|       |      /* we need to let time pass, ignore socket(s) */
 1186|    118|      break;
 1187|       |
 1188|      0|    case MSTATE_DONE:
  ------------------
  |  Branch (1188:5): [True: 0, False: 1.03M]
  ------------------
 1189|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (1189:5): [True: 0, False: 1.03M]
  ------------------
 1190|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (1190:5): [True: 0, False: 1.03M]
  ------------------
 1191|       |      /* nothing more to poll for */
 1192|      0|      break;
 1193|       |
 1194|      0|    default:
  ------------------
  |  Branch (1194:5): [True: 0, False: 1.03M]
  ------------------
 1195|      0|      failf(data, "multi_getsock: unexpected multi state %d", data->mstate);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1196|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1196:7): [Folded, False: 0]
  |  Branch (1196:7): [Folded, False: 0]
  ------------------
 1197|      0|      break;
 1198|  1.03M|    }
 1199|  1.03M|  }
 1200|       |
 1201|  1.72M|  if(result) {
  ------------------
  |  Branch (1201:6): [True: 0, False: 1.72M]
  ------------------
 1202|      0|    if(result == CURLE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1202:8): [True: 0, False: 0]
  ------------------
 1203|      0|      return CURLM_OUT_OF_MEMORY;
 1204|      0|    failf(data, "error determining pollset: %d", result);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1205|      0|    return CURLM_INTERNAL_ERROR;
 1206|      0|  }
 1207|       |
 1208|  1.72M|#ifdef CURLVERBOSE
 1209|  1.72M|  if(CURL_TRC_M_is_verbose(data)) {
  ------------------
  |  |  135|  1.72M|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  ------------------
  |  |  |  |  326|  1.72M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.44M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.72M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.72M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.44M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.72M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1210|      0|    size_t timeout_count = Curl_llist_count(&data->state.timeoutlist);
 1211|      0|    switch(ps->n) {
 1212|      0|    case 0:
  ------------------
  |  Branch (1212:5): [True: 0, False: 0]
  ------------------
 1213|      0|      CURL_TRC_M(data, "pollset[], timeouts=%zu, paused %d/%d (r/w)",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1214|      0|                 timeout_count,
 1215|      0|                 Curl_xfer_send_is_paused(data),
 1216|      0|                 Curl_xfer_recv_is_paused(data));
 1217|      0|      break;
 1218|      0|    case 1:
  ------------------
  |  Branch (1218:5): [True: 0, False: 0]
  ------------------
 1219|      0|      CURL_TRC_M(data, "pollset[fd=%" FMT_SOCKET_T " %s%s], timeouts=%zu",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1220|      0|                 ps->sockets[0],
 1221|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1222|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1223|      0|                 timeout_count);
 1224|      0|      break;
 1225|      0|    case 2:
  ------------------
  |  Branch (1225:5): [True: 0, False: 0]
  ------------------
 1226|      0|      CURL_TRC_M(data, "pollset[fd=%" FMT_SOCKET_T " %s%s, "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1227|      0|                 "fd=%" FMT_SOCKET_T " %s%s], timeouts=%zu",
 1228|      0|                 ps->sockets[0],
 1229|      0|                 (ps->actions[0] & CURL_POLL_IN) ? "IN" : "",
 1230|      0|                 (ps->actions[0] & CURL_POLL_OUT) ? "OUT" : "",
 1231|      0|                 ps->sockets[1],
 1232|      0|                 (ps->actions[1] & CURL_POLL_IN) ? "IN" : "",
 1233|      0|                 (ps->actions[1] & CURL_POLL_OUT) ? "OUT" : "",
 1234|      0|                 timeout_count);
 1235|      0|      break;
 1236|      0|    default:
  ------------------
  |  Branch (1236:5): [True: 0, False: 0]
  ------------------
 1237|      0|      CURL_TRC_M(data, "pollset[fds=%u], timeouts=%zu", ps->n, timeout_count);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1238|      0|      break;
 1239|      0|    }
 1240|      0|    CURL_TRC_EASY_TIMERS(data);
  ------------------
  |  |  330|      0|  do {                                  \
  |  |  331|      0|    if(CURL_TRC_TIMER_is_verbose(data)) \
  |  |  ------------------
  |  |  |  |  139|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  332|      0|      Curl_trc_easy_timers(data);       \
  |  |  333|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (333:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1241|      0|  }
 1242|  1.72M|#endif
 1243|       |
 1244|  1.72M|  return CURLM_OK;
 1245|  1.72M|}
curl_multi_fdset:
 1250|   684k|{
 1251|       |  /* Scan through all the easy handles to get the file descriptors set.
 1252|       |     Some easy handles may not have connected to the remote host yet,
 1253|       |     and then we must make sure that is done. */
 1254|   684k|  int this_max_fd = -1;
 1255|   684k|  struct Curl_multi *multi = m;
 1256|   684k|  struct easy_pollset ps;
 1257|   684k|  unsigned int i;
 1258|   684k|  uint32_t mid;
 1259|   684k|  (void)exc_fd_set;
 1260|       |
 1261|   684k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|   684k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|   684k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|   684k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 684k, False: 0]
  |  |  |  Branch (82:12): [True: 684k, False: 0]
  |  |  ------------------
  |  |   83|   684k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1261:6): [True: 0, False: 684k]
  |  Branch (1261:7): [True: 0, False: 0]
  |  Branch (1261:7): [True: 0, False: 0]
  ------------------
 1262|      0|    return CURLM_BAD_HANDLE;
 1263|       |
 1264|   684k|  if(multi->in_callback)
  ------------------
  |  Branch (1264:6): [True: 0, False: 684k]
  ------------------
 1265|      0|    return CURLM_RECURSIVE_API_CALL;
 1266|       |
 1267|   684k|  Curl_pollset_init(&ps);
 1268|   684k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (1268:6): [True: 684k, False: 0]
  ------------------
 1269|  1.72M|    do {
 1270|  1.72M|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 1271|       |
 1272|  1.72M|      if(!data) {
  ------------------
  |  Branch (1272:10): [True: 0, False: 1.72M]
  ------------------
 1273|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1273:9): [Folded, False: 0]
  |  Branch (1273:9): [Folded, False: 0]
  ------------------
 1274|      0|        continue;
 1275|      0|      }
 1276|       |
 1277|  1.72M|      Curl_multi_pollset(data, &ps);
 1278|  3.22M|      for(i = 0; i < ps.n; i++) {
  ------------------
  |  Branch (1278:18): [True: 1.50M, False: 1.72M]
  ------------------
 1279|  1.50M|        if(!FDSET_SOCK(ps.sockets[i]))
  ------------------
  |  |  101|  1.50M|#define FDSET_SOCK(s) ((s) < FD_SETSIZE)
  ------------------
  |  Branch (1279:12): [True: 0, False: 1.50M]
  ------------------
 1280|       |          /* pretend it does not exist */
 1281|      0|          continue;
 1282|  1.50M|        if(ps.actions[i] & CURL_POLL_IN)
  ------------------
  |  |  283|  1.50M|#define CURL_POLL_IN     1
  ------------------
  |  Branch (1282:12): [True: 1.36M, False: 133k]
  ------------------
 1283|  1.50M|          FD_SET(ps.sockets[i], read_fd_set);
 1284|  1.50M|        if(ps.actions[i] & CURL_POLL_OUT)
  ------------------
  |  |  284|  1.50M|#define CURL_POLL_OUT    2
  ------------------
  |  Branch (1284:12): [True: 133k, False: 1.36M]
  ------------------
 1285|  1.50M|          FD_SET(ps.sockets[i], write_fd_set);
 1286|  1.50M|        if((int)ps.sockets[i] > this_max_fd)
  ------------------
  |  Branch (1286:12): [True: 1.50M, False: 0]
  ------------------
 1287|  1.50M|          this_max_fd = (int)ps.sockets[i];
 1288|  1.50M|      }
 1289|  1.72M|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (1289:13): [True: 1.03M, False: 684k]
  ------------------
 1290|   684k|  }
 1291|       |
 1292|   684k|  Curl_cshutdn_setfds(&multi->cshutdn, multi->admin,
 1293|   684k|                      read_fd_set, write_fd_set, &this_max_fd);
 1294|       |
 1295|   684k|  *max_fd = this_max_fd;
 1296|   684k|  Curl_pollset_cleanup(&ps);
 1297|       |
 1298|   684k|  return CURLM_OK;
 1299|   684k|}
curl_multi_wakeup:
 1675|    621|{
 1676|       |  /* this function is usually called from another thread,
 1677|       |     it has to be careful only to access parts of the
 1678|       |     Curl_multi struct that are constant */
 1679|    621|  struct Curl_multi *multi = m;
 1680|    621|  CURLMcode mresult = CURLM_WAKEUP_FAILURE;
 1681|       |
 1682|       |  /* GOOD_MULTI_HANDLE can be safely called */
 1683|    621|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|    621|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|    621|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|    621|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 621, False: 0]
  |  |  |  Branch (82:12): [True: 621, False: 0]
  |  |  ------------------
  |  |   83|    621|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (1683:6): [True: 0, False: 621]
  |  Branch (1683:7): [True: 0, False: 0]
  |  Branch (1683:7): [True: 0, False: 0]
  ------------------
 1684|      0|    return CURLM_BAD_HANDLE;
 1685|       |
 1686|    621|#ifdef ENABLE_WAKEUP
 1687|       |  /* the wakeup_pair variable is only written during init and cleanup,
 1688|       |     making it safe to access from another thread after the init part
 1689|       |     and before cleanup */
 1690|    621|  if(!Curl_wakeup_signal(multi->wakeup_pair))
  ------------------
  |  Branch (1690:6): [True: 621, False: 0]
  ------------------
 1691|    621|    mresult = CURLM_OK;
 1692|    621|#endif
 1693|       |#ifdef USE_WINSOCK
 1694|       |  if(WSASetEvent(multi->wsa_event))
 1695|       |    mresult = CURLM_OK;
 1696|       |#endif
 1697|    621|  return mresult;
 1698|    621|}
Curl_multi_connchanged:
 1728|  11.0k|{
 1729|       |  multi->recheckstate = TRUE;
  ------------------
  |  | 1055|  11.0k|#define TRUE true
  ------------------
 1730|  11.0k|}
curl_multi_perform:
 2937|   699k|{
 2938|   699k|  struct Curl_multi *multi = m;
 2939|       |
 2940|   699k|  if(!GOOD_MULTI_HANDLE(multi))
  ------------------
  |  |   82|   699k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|   699k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|   699k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:5): [True: 699k, False: 0]
  |  |  |  Branch (82:12): [True: 699k, False: 0]
  |  |  ------------------
  |  |   83|   699k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2940:6): [True: 0, False: 699k]
  |  Branch (2940:7): [True: 0, False: 0]
  |  Branch (2940:7): [True: 0, False: 0]
  ------------------
 2941|      0|    return CURLM_BAD_HANDLE;
 2942|       |
 2943|   699k|  return multi_perform(multi, running_handles);
 2944|   699k|}
curl_multi_cleanup:
 2947|  15.3k|{
 2948|  15.3k|  struct Curl_multi *multi = m;
 2949|  15.3k|  if(GOOD_MULTI_HANDLE(multi)) {
  ------------------
  |  |   82|  15.3k|  (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  |   75|  15.3k|#define CURL_MULTI_HANDLE 0x000bab1e
  |  |  ------------------
  |  |                 (((x) && (x)->magic == CURL_MULTI_HANDLE) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  15.3k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (82:3): [True: 15.3k, False: 0]
  |  |  |  Branch (82:5): [True: 15.3k, False: 0]
  |  |  |  Branch (82:12): [True: 15.3k, False: 0]
  |  |  ------------------
  |  |   83|  15.3k|  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                 (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2949:6): [True: 0, False: 0]
  |  Branch (2949:6): [True: 0, False: 0]
  ------------------
 2950|  15.3k|    void *entry;
 2951|  15.3k|    uint32_t mid;
 2952|  15.3k|    if(multi->in_callback)
  ------------------
  |  Branch (2952:8): [True: 0, False: 15.3k]
  ------------------
 2953|      0|      return CURLM_RECURSIVE_API_CALL;
 2954|  15.3k|    if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2954:8): [True: 0, False: 15.3k]
  ------------------
 2955|      0|      return CURLM_RECURSIVE_API_CALL;
 2956|       |
 2957|       |    /* First remove all remaining easy handles,
 2958|       |     * close internal ones. admin handle is special */
 2959|  15.3k|    if(Curl_uint32_tbl_first(&multi->xfers, &mid, &entry)) {
  ------------------
  |  Branch (2959:8): [True: 15.3k, False: 0]
  ------------------
 2960|  15.3k|      do {
 2961|  15.3k|        struct Curl_easy *data = entry;
 2962|  15.3k|        if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  15.3k|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  15.3k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  15.3k|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 15.3k, False: 0]
  |  |  |  Branch (136:12): [True: 15.3k, False: 0]
  |  |  ------------------
  |  |  137|  15.3k|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2962:12): [True: 0, False: 15.3k]
  |  Branch (2962:13): [True: 0, False: 0]
  |  Branch (2962:13): [True: 0, False: 0]
  ------------------
 2963|      0|          return CURLM_BAD_HANDLE;
 2964|       |
 2965|  15.3k|#ifdef DEBUGBUILD
 2966|  15.3k|        if(mid != data->mid) {
  ------------------
  |  Branch (2966:12): [True: 0, False: 15.3k]
  ------------------
 2967|      0|          CURL_TRC_M(data, "multi_cleanup: still present with mid=%u, "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2968|      0|                     "but unexpected data->mid=%u\n", mid, data->mid);
 2969|      0|          DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2969:11): [Folded, False: 0]
  |  Branch (2969:11): [Folded, False: 0]
  ------------------
 2970|      0|        }
 2971|  15.3k|#endif
 2972|       |
 2973|  15.3k|        if(data == multi->admin)
  ------------------
  |  Branch (2973:12): [True: 15.3k, False: 0]
  ------------------
 2974|  15.3k|          continue;
 2975|       |
 2976|      0|        if(!data->state.done && data->conn)
  ------------------
  |  Branch (2976:12): [True: 0, False: 0]
  |  Branch (2976:33): [True: 0, False: 0]
  ------------------
 2977|       |          /* if DONE was never called for this handle */
 2978|      0|          (void)multi_done(data, CURLE_OK, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2979|       |
 2980|      0|        data->multi = NULL; /* clear the association */
 2981|      0|        Curl_uint32_tbl_remove(&multi->xfers, mid);
 2982|      0|        data->mid = UINT32_MAX;
 2983|       |
 2984|       |#ifdef USE_LIBPSL
 2985|       |        if(data->psl == &multi->psl)
 2986|       |          data->psl = NULL;
 2987|       |#endif
 2988|      0|        if(data->state.internal)
  ------------------
  |  Branch (2988:12): [True: 0, False: 0]
  ------------------
 2989|      0|          Curl_close(&data);
 2990|  15.3k|      } while(Curl_uint32_tbl_next(&multi->xfers, mid, &mid, &entry));
  ------------------
  |  Branch (2990:15): [True: 0, False: 15.3k]
  ------------------
 2991|  15.3k|    }
 2992|       |
 2993|  15.3k|#ifdef USE_RESOLV_THREADED
 2994|  15.3k|    Curl_async_thrdd_multi_destroy(multi, !multi->quick_exit);
 2995|  15.3k|#endif
 2996|  15.3k|    Curl_cpool_destroy(&multi->cpool);
 2997|  15.3k|    Curl_cshutdn_destroy(&multi->cshutdn, multi->admin);
 2998|  15.3k|    if(multi->admin) {
  ------------------
  |  Branch (2998:8): [True: 15.3k, False: 0]
  ------------------
 2999|  15.3k|      CURL_TRC_M(multi->admin, "multi_cleanup, closing admin handle, done");
  ------------------
  |  |  148|  15.3k|  do {                                   \
  |  |  149|  15.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  15.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  15.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  30.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  30.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  15.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  15.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 3000|  15.3k|      multi->admin->multi = NULL;
 3001|  15.3k|      Curl_uint32_tbl_remove(&multi->xfers, multi->admin->mid);
 3002|  15.3k|      Curl_close(&multi->admin);
 3003|  15.3k|    }
 3004|       |
 3005|  15.3k|    multi->magic = 0; /* not good anymore */
 3006|       |
 3007|  15.3k|    Curl_multi_ev_cleanup(multi);
 3008|  15.3k|    Curl_hash_destroy(&multi->proto_hash);
 3009|  15.3k|    Curl_dnscache_destroy(&multi->dnscache);
 3010|  15.3k|    Curl_psl_destroy(&multi->psl);
 3011|  15.3k|#ifdef USE_SSL
 3012|  15.3k|    Curl_ssl_scache_destroy(multi->ssl_scache);
 3013|  15.3k|#endif
 3014|       |
 3015|       |#ifdef USE_WINSOCK
 3016|       |    WSACloseEvent(multi->wsa_event);
 3017|       |#endif
 3018|  15.3k|#ifdef ENABLE_WAKEUP
 3019|  15.3k|  Curl_wakeup_destroy(multi->wakeup_pair);
 3020|  15.3k|#endif
 3021|       |
 3022|  15.3k|    multi_xfer_bufs_free(multi);
 3023|  15.3k|    Curl_mntfy_cleanup(multi);
 3024|  15.3k|#ifdef DEBUGBUILD
 3025|  15.3k|    if(Curl_uint32_tbl_count(&multi->xfers)) {
  ------------------
  |  Branch (3025:8): [True: 0, False: 15.3k]
  ------------------
 3026|      0|      multi_xfer_tbl_dump(multi);
 3027|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3027:7): [Folded, False: 0]
  |  Branch (3027:7): [Folded, False: 0]
  ------------------
 3028|      0|    }
 3029|  15.3k|#endif
 3030|  15.3k|    Curl_uint32_bset_destroy(&multi->process);
 3031|  15.3k|    Curl_uint32_bset_destroy(&multi->dirty);
 3032|  15.3k|    Curl_uint32_bset_destroy(&multi->pending);
 3033|  15.3k|    Curl_uint32_bset_destroy(&multi->msgsent);
 3034|  15.3k|    Curl_uint32_tbl_destroy(&multi->xfers);
 3035|  15.3k|    curlx_free(multi);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 3036|       |
 3037|  15.3k|    return CURLM_OK;
 3038|  15.3k|  }
 3039|      0|  return CURLM_BAD_HANDLE;
 3040|  15.3k|}
Curl_multi_will_close:
 3081|  10.2k|{
 3082|  10.2k|  if(data) {
  ------------------
  |  Branch (3082:6): [True: 10.2k, False: 0]
  ------------------
 3083|  10.2k|    struct Curl_multi *multi = data->multi;
 3084|  10.2k|    if(multi) {
  ------------------
  |  Branch (3084:8): [True: 10.2k, False: 0]
  ------------------
 3085|  10.2k|      CURL_TRC_M(data, "Curl_multi_will_close fd=%" FMT_SOCKET_T, s);
  ------------------
  |  |  148|  10.2k|  do {                                   \
  |  |  149|  10.2k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  10.2k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.2k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.5k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.5k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.2k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  10.2k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
 3086|  10.2k|      Curl_multi_ev_socket_done(multi, data, s);
 3087|  10.2k|    }
 3088|  10.2k|  }
 3089|  10.2k|}
Curl_update_timer:
 3566|   732k|{
 3567|   732k|  struct curltime expire_ts;
 3568|   732k|  long timeout_ms;
 3569|   732k|  int rc;
 3570|   732k|  bool set_value = FALSE;
  ------------------
  |  | 1058|   732k|#define FALSE false
  ------------------
 3571|       |
 3572|   732k|  if(!multi->timer_cb || multi->dead)
  ------------------
  |  Branch (3572:6): [True: 732k, False: 0]
  |  Branch (3572:26): [True: 0, False: 0]
  ------------------
 3573|   732k|    return CURLM_OK;
 3574|      0|  multi_timeout(multi, &expire_ts, &timeout_ms);
 3575|       |
 3576|      0|  if(timeout_ms < 0 && multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3576:6): [True: 0, False: 0]
  |  Branch (3576:24): [True: 0, False: 0]
  ------------------
 3577|       |    /* nothing to do */
 3578|      0|  }
 3579|      0|  else if(timeout_ms < 0) {
  ------------------
  |  Branch (3579:11): [True: 0, False: 0]
  ------------------
 3580|       |    /* there is no timeout now but there was one previously */
 3581|      0|    CURL_TRC_M(multi->admin, "[TIMER] clear");
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3582|      0|    timeout_ms = -1; /* normalize */
 3583|      0|    set_value = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3584|      0|  }
 3585|      0|  else if(multi->last_timeout_ms < 0) {
  ------------------
  |  Branch (3585:11): [True: 0, False: 0]
  ------------------
 3586|      0|    CURL_TRC_M(multi->admin, "[TIMER] set %ldms, none before", timeout_ms);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3587|      0|    set_value = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3588|      0|  }
 3589|      0|  else if(curlx_ptimediff_us(&multi->last_expire_ts, &expire_ts)) {
  ------------------
  |  Branch (3589:11): [True: 0, False: 0]
  ------------------
 3590|       |    /* We had a timeout before and have one now, the absolute timestamp
 3591|       |     * differs. The relative timeout_ms may be the same, but the starting
 3592|       |     * point differs. Let the application restart its timer. */
 3593|      0|    CURL_TRC_M(multi->admin, "[TIMER] set %ldms, replace previous",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3594|      0|               timeout_ms);
 3595|      0|    set_value = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3596|      0|  }
 3597|      0|  else {
 3598|       |    /* We have same expire time as previously. Our relative 'timeout_ms'
 3599|       |     * may be different now, but the application has the timer running
 3600|       |     * and we do not to tell it to start this again. */
 3601|      0|  }
 3602|       |
 3603|      0|  if(set_value) {
  ------------------
  |  Branch (3603:6): [True: 0, False: 0]
  ------------------
 3604|      0|    multi->last_expire_ts = expire_ts;
 3605|      0|    multi->last_timeout_ms = timeout_ms;
 3606|      0|    set_in_callback(multi, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3607|      0|    rc = multi->timer_cb(multi, timeout_ms, multi->timer_userp);
 3608|      0|    set_in_callback(multi, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3609|      0|    if(rc == -1) {
  ------------------
  |  Branch (3609:8): [True: 0, False: 0]
  ------------------
 3610|      0|      multi->dead = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3611|      0|      return CURLM_ABORTED_BY_CALLBACK;
 3612|      0|    }
 3613|      0|  }
 3614|      0|  return CURLM_OK;
 3615|      0|}
Curl_expire_ex:
 3681|   772k|{
 3682|   772k|  struct Curl_multi *multi = data->multi;
 3683|   772k|  struct curltime *curr_expire = &data->state.expiretime;
 3684|   772k|  struct curltime set;
 3685|       |
 3686|       |  /* this is only interesting while there is still an associated multi struct
 3687|       |     remaining! */
 3688|   772k|  if(!multi)
  ------------------
  |  Branch (3688:6): [True: 0, False: 772k]
  ------------------
 3689|      0|    return;
 3690|       |
 3691|   772k|  DEBUGASSERT(id < EXPIRE_LAST);
  ------------------
  |  | 1081|   772k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3691:3): [True: 0, False: 772k]
  |  Branch (3691:3): [True: 772k, False: 0]
  ------------------
 3692|       |
 3693|   772k|  set = *Curl_pgrs_now(data);
 3694|   772k|  set.tv_sec += (time_t)(milli / 1000); /* may be a 64 to 32-bit conversion */
 3695|   772k|  set.tv_usec += (int)(milli % 1000) * 1000;
 3696|       |
 3697|   772k|  if(set.tv_usec >= 1000000) {
  ------------------
  |  Branch (3697:6): [True: 438k, False: 334k]
  ------------------
 3698|   438k|    set.tv_sec++;
 3699|   438k|    set.tv_usec -= 1000000;
 3700|   438k|  }
 3701|       |
 3702|       |  /* Remove any timer with the same id */
 3703|   772k|  multi_deltimeout(data, id);
 3704|       |
 3705|       |  /* Add it to the timer list. It must stay in the list until it has expired
 3706|       |     in case we need to recompute the minimum timer later. */
 3707|   772k|  multi_addtimeout(data, &set, id);
 3708|       |
 3709|   772k|  if(curr_expire->tv_sec || curr_expire->tv_usec) {
  ------------------
  |  Branch (3709:6): [True: 760k, False: 12.4k]
  |  Branch (3709:29): [True: 0, False: 12.4k]
  ------------------
 3710|       |    /* This means that the struct is added as a node in the splay tree.
 3711|       |       Compare if the new time is earlier, and only remove-old/add-new if it
 3712|       |       is. */
 3713|   760k|    timediff_t diff = curlx_ptimediff_ms(&set, curr_expire);
 3714|   760k|    int rc;
 3715|       |
 3716|   760k|    if(diff > 0) {
  ------------------
  |  Branch (3716:8): [True: 393k, False: 366k]
  ------------------
 3717|       |      /* The current splay tree entry is sooner than this new expiry time.
 3718|       |         We do not need to update our splay tree entry. */
 3719|   393k|      return;
 3720|   393k|    }
 3721|       |
 3722|       |    /* Since this is an updated time, we must remove the previous entry from
 3723|       |       the splay tree first and then re-add the new value */
 3724|   366k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3725|   366k|                          &multi->timetree);
 3726|   366k|    if(rc)
  ------------------
  |  Branch (3726:8): [True: 0, False: 366k]
  ------------------
 3727|      0|      infof(data, "Internal error removing splay node = %d", rc);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3728|   366k|  }
 3729|       |
 3730|       |  /* Indicate that we are in the splay tree and insert the new timer expiry
 3731|       |     value since it is our local minimum. */
 3732|   379k|  *curr_expire = set;
 3733|   379k|  Curl_splayset(&data->state.timenode, data);
 3734|   379k|  multi->timetree = Curl_splayinsert(curr_expire, multi->timetree,
 3735|   379k|                                     &data->state.timenode);
 3736|   379k|}
Curl_expire:
 3750|   772k|{
 3751|   772k|  Curl_expire_ex(data, milli, id);
 3752|   772k|}
Curl_expire_done:
 3761|  10.4k|{
 3762|       |  /* remove the timer, if there */
 3763|  10.4k|  multi_deltimeout(data, id);
 3764|  10.4k|  CURL_TRC_TIMER(data, id, "cleared");
  ------------------
  |  |  173|  10.4k|  do {                                        \
  |  |  174|  10.4k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|  10.4k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  10.4k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  20.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 10.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  20.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  10.4k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|  10.4k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|  10.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 10.4k]
  |  |  ------------------
  ------------------
 3765|  10.4k|}
Curl_expire_clear:
 3773|  64.9k|{
 3774|  64.9k|  struct Curl_multi *multi = data->multi;
 3775|  64.9k|  struct curltime *nowp = &data->state.expiretime;
 3776|       |
 3777|       |  /* this is only interesting while there is still an associated multi struct
 3778|       |     remaining! */
 3779|  64.9k|  if(!multi)
  ------------------
  |  Branch (3779:6): [True: 33.2k, False: 31.6k]
  ------------------
 3780|  33.2k|    return;
 3781|       |
 3782|  31.6k|  if(nowp->tv_sec || nowp->tv_usec) {
  ------------------
  |  Branch (3782:6): [True: 12.4k, False: 19.2k]
  |  Branch (3782:22): [True: 0, False: 19.2k]
  ------------------
 3783|       |    /* Since this is an cleared time, we must remove the previous entry from
 3784|       |       the splay tree */
 3785|  12.4k|    struct Curl_llist *list = &data->state.timeoutlist;
 3786|  12.4k|    int rc;
 3787|       |
 3788|  12.4k|    rc = Curl_splayremove(multi->timetree, &data->state.timenode,
 3789|  12.4k|                          &multi->timetree);
 3790|  12.4k|    if(rc)
  ------------------
  |  Branch (3790:8): [True: 0, False: 12.4k]
  ------------------
 3791|      0|      infof(data, "Internal error clearing splay node = %d", rc);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3792|       |
 3793|       |    /* clear the timeout list too */
 3794|  12.4k|    Curl_llist_destroy(list, NULL);
 3795|       |
 3796|  12.4k|    if(data->id >= 0)
  ------------------
  |  Branch (3796:8): [True: 12.4k, False: 0]
  ------------------
 3797|  12.4k|      CURL_TRC_M(data, "[TIMEOUT] all cleared");
  ------------------
  |  |  148|  12.4k|  do {                                   \
  |  |  149|  12.4k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  12.4k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  12.4k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  24.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 12.4k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 12.4k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  24.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  12.4k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  12.4k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  12.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
 3798|  12.4k|    nowp->tv_sec = 0;
 3799|  12.4k|    nowp->tv_usec = 0;
 3800|  12.4k|  }
 3801|  31.6k|}
Curl_set_in_callback:
 3877|  3.05M|{
 3878|  3.05M|  if(data && data->multi)
  ------------------
  |  Branch (3878:6): [True: 3.05M, False: 0]
  |  Branch (3878:14): [True: 3.05M, False: 0]
  ------------------
 3879|  3.05M|    data->multi->in_callback = value;
 3880|  3.05M|}
Curl_multi_xfer_buf_borrow:
 3958|   209k|{
 3959|   209k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   209k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3959:3): [True: 0, False: 209k]
  |  Branch (3959:3): [True: 209k, False: 0]
  ------------------
 3960|   209k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|   209k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3960:3): [True: 0, False: 209k]
  |  Branch (3960:3): [True: 209k, False: 0]
  ------------------
 3961|   209k|  *pbuf = NULL;
 3962|   209k|  *pbuflen = 0;
 3963|   209k|  if(!data->multi) {
  ------------------
  |  Branch (3963:6): [True: 0, False: 209k]
  ------------------
 3964|      0|    failf(data, "transfer has no multi handle");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3965|      0|    return CURLE_FAILED_INIT;
 3966|      0|  }
 3967|   209k|  if(!data->set.buffer_size) {
  ------------------
  |  Branch (3967:6): [True: 0, False: 209k]
  ------------------
 3968|      0|    failf(data, "transfer buffer size is 0");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3969|      0|    return CURLE_FAILED_INIT;
 3970|      0|  }
 3971|   209k|  if(data->multi->xfer_buf_borrowed) {
  ------------------
  |  Branch (3971:6): [True: 0, False: 209k]
  ------------------
 3972|      0|    failf(data, "attempt to borrow xfer_buf when already borrowed");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3973|      0|    return CURLE_AGAIN;
 3974|      0|  }
 3975|       |
 3976|   209k|  if(data->multi->xfer_buf &&
  ------------------
  |  Branch (3976:6): [True: 202k, False: 6.87k]
  ------------------
 3977|   202k|     data->set.buffer_size > data->multi->xfer_buf_len) {
  ------------------
  |  Branch (3977:6): [True: 0, False: 202k]
  ------------------
 3978|       |    /* not large enough, get a new one */
 3979|      0|    curlx_safefree(data->multi->xfer_buf);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3980|      0|    data->multi->xfer_buf_len = 0;
 3981|      0|  }
 3982|       |
 3983|   209k|  if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (3983:6): [True: 6.87k, False: 202k]
  ------------------
 3984|  6.87k|    data->multi->xfer_buf = curlx_malloc(curlx_uitouz(data->set.buffer_size));
  ------------------
  |  | 1478|  6.87k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 3985|  6.87k|    if(!data->multi->xfer_buf) {
  ------------------
  |  Branch (3985:8): [True: 0, False: 6.87k]
  ------------------
 3986|      0|      failf(data, "could not allocate xfer_buf of %u bytes",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3987|      0|            data->set.buffer_size);
 3988|      0|      return CURLE_OUT_OF_MEMORY;
 3989|      0|    }
 3990|  6.87k|    data->multi->xfer_buf_len = data->set.buffer_size;
 3991|  6.87k|  }
 3992|       |
 3993|   209k|  data->multi->xfer_buf_borrowed = TRUE;
  ------------------
  |  | 1055|   209k|#define TRUE true
  ------------------
 3994|   209k|  *pbuf = data->multi->xfer_buf;
 3995|   209k|  *pbuflen = data->multi->xfer_buf_len;
 3996|   209k|  return CURLE_OK;
 3997|   209k|}
Curl_multi_xfer_buf_release:
 4000|   209k|{
 4001|   209k|  (void)buf;
 4002|   209k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|   209k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4002:3): [True: 0, False: 209k]
  |  Branch (4002:3): [True: 209k, False: 0]
  ------------------
 4003|   209k|  DEBUGASSERT(data->multi);
  ------------------
  |  | 1081|   209k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4003:3): [True: 0, False: 209k]
  |  Branch (4003:3): [True: 209k, False: 0]
  ------------------
 4004|   209k|  DEBUGASSERT(!buf || data->multi->xfer_buf == buf);
  ------------------
  |  | 1081|   209k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4004:3): [True: 209k, False: 0]
  |  Branch (4004:3): [True: 0, False: 0]
  |  Branch (4004:3): [True: 0, False: 209k]
  |  Branch (4004:3): [True: 209k, False: 0]
  ------------------
 4005|   209k|  data->multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
 4006|   209k|}
Curl_multi_get_easy:
 4121|  3.48M|{
 4122|  3.48M|  struct Curl_easy *data = Curl_uint32_tbl_get(&multi->xfers, mid);
 4123|  3.48M|  if(GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  3.48M|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  3.48M|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  3.48M|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:3): [True: 3.48M, False: 0]
  |  |  |  Branch (136:5): [True: 3.48M, False: 0]
  |  |  |  Branch (136:12): [True: 3.48M, False: 0]
  |  |  ------------------
  |  |  137|  3.48M|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (4123:6): [True: 0, False: 0]
  |  Branch (4123:6): [True: 0, False: 0]
  ------------------
 4124|  3.48M|    return data;
 4125|      0|  CURL_TRC_M(multi->admin, "invalid easy handle in xfer table for mid=%u",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4126|      0|             mid);
 4127|      0|  Curl_uint32_tbl_remove(&multi->xfers, mid);
 4128|       |  return NULL;
 4129|  3.48M|}
Curl_multi_xfers_running:
 4132|   711k|{
 4133|   711k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|   711k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4133:3): [True: 0, False: 711k]
  |  Branch (4133:3): [True: 711k, False: 0]
  ------------------
 4134|   711k|  if(!multi)
  ------------------
  |  Branch (4134:6): [True: 0, False: 711k]
  ------------------
 4135|      0|    return 0;
 4136|   711k|  return multi->xfers_alive;
 4137|   711k|}
Curl_multi_mark_dirty:
 4140|   205k|{
 4141|   205k|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4141:6): [True: 205k, False: 0]
  |  Branch (4141:21): [True: 205k, False: 0]
  ------------------
 4142|   205k|    Curl_uint32_bset_add(&data->multi->dirty, data->mid);
 4143|   205k|}
Curl_multi_clear_dirty:
 4146|    118|{
 4147|    118|  if(data->multi && data->mid != UINT32_MAX)
  ------------------
  |  Branch (4147:6): [True: 118, False: 0]
  |  Branch (4147:21): [True: 118, False: 0]
  ------------------
 4148|    118|    Curl_uint32_bset_remove(&data->multi->dirty, data->mid);
 4149|    118|}
multi.c:multi_xfers_add:
  397|  16.1k|{
  398|  16.1k|  uint32_t capacity = Curl_uint32_tbl_capacity(&multi->xfers);
  399|  16.1k|  uint32_t new_size = 0;
  400|       |  /* Prepare to make this into a CURLMOPT_MAX_TRANSFERS, because some
  401|       |   * applications may want to prevent a run-away of their memory use. */
  402|       |  /* UINT_MAX is our "invalid" id, do not let the table grow up to that. */
  403|  16.1k|  const uint32_t max_capacity = UINT_MAX - 1;
  404|       |
  405|  16.1k|  if(capacity < max_capacity) {
  ------------------
  |  Branch (405:6): [True: 16.1k, False: 0]
  ------------------
  406|       |    /* We want `multi->xfers` to have "sufficient" free rows, so that we do
  407|       |     * not have to reuse the `mid` from a removed easy right away.
  408|       |     * Since uint_tbl and uint_bset are memory efficient,
  409|       |     * regard less than 25% free as insufficient.
  410|       |     * (for low capacities, e.g. multi_easy, 4 or less). */
  411|  16.1k|    uint32_t used = Curl_uint32_tbl_count(&multi->xfers);
  412|  16.1k|    uint32_t unused = capacity - used;
  413|  16.1k|    uint32_t min_unused = CURLMAX(capacity >> 2, 4);
  ------------------
  |  | 1286|  16.1k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 16.1k, False: 0]
  |  |  ------------------
  ------------------
  414|  16.1k|    if(unused <= min_unused) {
  ------------------
  |  Branch (414:8): [True: 0, False: 16.1k]
  ------------------
  415|       |      /* Make sure the uint arithmetic here works on the corner
  416|       |       * cases where we are close to max_capacity or UINT_MAX */
  417|      0|      if((min_unused >= max_capacity) ||
  ------------------
  |  Branch (417:10): [True: 0, False: 0]
  ------------------
  418|      0|         ((max_capacity - min_unused) <= capacity) ||
  ------------------
  |  Branch (418:10): [True: 0, False: 0]
  ------------------
  419|      0|         ((UINT_MAX - min_unused - 63) <= capacity)) {
  ------------------
  |  Branch (419:10): [True: 0, False: 0]
  ------------------
  420|      0|        new_size = max_capacity; /* can not be larger than this */
  421|      0|      }
  422|      0|      else {
  423|       |        /* make it a 64 multiple, since our bitsets grow by that and
  424|       |         * small (easy_multi) grows to at least 64 on first resize. */
  425|      0|        new_size = (((used + min_unused) + 63) / 64) * 64;
  426|      0|      }
  427|      0|    }
  428|  16.1k|  }
  429|       |
  430|  16.1k|  if(new_size > capacity) {
  ------------------
  |  Branch (430:6): [True: 0, False: 16.1k]
  ------------------
  431|       |    /* Grow the bitsets first. Should one fail, we do not need
  432|       |     * to downsize the already resized ones. The sets continue
  433|       |     * to work properly when larger than the table, but not
  434|       |     * the other way around. */
  435|      0|    CURL_TRC_M(data, "increasing xfer table size to %u", new_size);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  436|      0|    if(Curl_uint32_bset_resize(&multi->process, new_size) ||
  ------------------
  |  Branch (436:8): [True: 0, False: 0]
  ------------------
  437|      0|       Curl_uint32_bset_resize(&multi->dirty, new_size) ||
  ------------------
  |  Branch (437:8): [True: 0, False: 0]
  ------------------
  438|      0|       Curl_uint32_bset_resize(&multi->pending, new_size) ||
  ------------------
  |  Branch (438:8): [True: 0, False: 0]
  ------------------
  439|      0|       Curl_uint32_bset_resize(&multi->msgsent, new_size) ||
  ------------------
  |  Branch (439:8): [True: 0, False: 0]
  ------------------
  440|      0|       Curl_uint32_tbl_resize(&multi->xfers, new_size))
  ------------------
  |  Branch (440:8): [True: 0, False: 0]
  ------------------
  441|      0|      return CURLM_OUT_OF_MEMORY;
  442|      0|  }
  443|       |
  444|       |  /* Insert the easy into the table now */
  445|  16.1k|  if(!Curl_uint32_tbl_add(&multi->xfers, data, &data->mid)) {
  ------------------
  |  Branch (445:6): [True: 0, False: 16.1k]
  ------------------
  446|       |    /* MUST only happen when table is full */
  447|      0|    DEBUGASSERT(Curl_uint32_tbl_capacity(&multi->xfers) <=
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (447:5): [True: 0, False: 0]
  |  Branch (447:5): [True: 0, False: 0]
  ------------------
  448|      0|                Curl_uint32_tbl_count(&multi->xfers));
  449|      0|    return CURLM_OUT_OF_MEMORY;
  450|      0|  }
  451|  16.1k|  return CURLM_OK;
  452|  16.1k|}
multi.c:mstate:
  135|   188k|{
  136|   188k|  CURLMstate oldstate = data->mstate;
  137|   188k|  static const init_multistate_func finit[MSTATE_LAST] = {
  138|   188k|    NULL,              /* INIT */
  139|   188k|    NULL,              /* PENDING */
  140|   188k|    NULL,              /* SETUP */
  141|   188k|    Curl_init_CONNECT, /* CONNECT */
  142|   188k|    NULL,              /* CONNECTING */
  143|   188k|    NULL,              /* PROTOCONNECT */
  144|   188k|    NULL,              /* PROTOCONNECTING */
  145|   188k|    NULL,              /* DO */
  146|   188k|    NULL,              /* DOING */
  147|   188k|    NULL,              /* DOING_MORE */
  148|   188k|    before_perform,    /* DID */
  149|   188k|    NULL,              /* PERFORMING */
  150|   188k|    NULL,              /* RATELIMITING */
  151|   188k|    NULL,              /* DONE */
  152|   188k|    init_completed,    /* COMPLETED */
  153|       |    NULL               /* MSGSENT */
  154|   188k|  };
  155|       |
  156|   188k|  if(oldstate == state)
  ------------------
  |  Branch (156:6): [True: 16.1k, False: 172k]
  ------------------
  157|       |    /* do not bother when the new state is the same as the old state */
  158|  16.1k|    return;
  159|       |
  160|   172k|#ifdef DEBUGBUILD
  161|   172k|  NOVERBOSE((void)lineno);
  ------------------
  |  | 1619|   172k|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|   172k|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 172k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|   172k|  CURL_TRC_M(data, "-> [%s] (line %d)", CURL_MSTATE_NAME(state), lineno);
  ------------------
  |  |  148|   172k|  do {                                   \
  |  |  149|   172k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|   172k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   172k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   345k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 172k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 172k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   345k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   172k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|   172k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|   172k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 172k]
  |  |  ------------------
  ------------------
  163|       |#else
  164|       |  CURL_TRC_M(data, "-> [%s]", CURL_MSTATE_NAME(state));
  165|       |#endif
  166|       |
  167|       |  /* really switching state */
  168|   172k|  data->mstate = state;
  169|   172k|  switch(state) {
  170|  4.10k|  case MSTATE_DONE:
  ------------------
  |  Branch (170:3): [True: 4.10k, False: 168k]
  ------------------
  171|  4.10k|    CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  4.10k|  do {                                                \
  |  |   52|  4.10k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 4.10k, False: 0]
  |  |  |  Branch (52:15): [True: 4.10k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 4.10k]
  |  |  ------------------
  |  |   53|  4.10k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  4.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 4.10k]
  |  |  ------------------
  ------------------
  172|  4.10k|    break;
  173|  15.5k|  case MSTATE_COMPLETED:
  ------------------
  |  Branch (173:3): [True: 15.5k, False: 157k]
  ------------------
  174|       |    /* we sometimes directly jump to COMPLETED, trigger also a notification
  175|       |     * in that case. */
  176|  15.5k|    if(oldstate < MSTATE_DONE)
  ------------------
  |  Branch (176:8): [True: 11.4k, False: 4.10k]
  ------------------
  177|  11.4k|      CURLM_NTFY(data, CURLMNOTIFY_EASY_DONE);
  ------------------
  |  |   51|  11.4k|  do {                                                \
  |  |   52|  11.4k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 11.4k, False: 0]
  |  |  |  Branch (52:15): [True: 11.4k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 11.4k]
  |  |  ------------------
  |  |   53|  11.4k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  11.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 11.4k]
  |  |  ------------------
  ------------------
  178|       |    /* changing to COMPLETED means it is in process and needs to go */
  179|  15.5k|    DEBUGASSERT(Curl_uint32_bset_contains(&data->multi->process, data->mid));
  ------------------
  |  | 1081|  15.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:5): [True: 0, False: 15.5k]
  |  Branch (179:5): [True: 15.5k, False: 0]
  ------------------
  180|  15.5k|    Curl_uint32_bset_remove(&data->multi->process, data->mid);
  181|  15.5k|    Curl_uint32_bset_remove(&data->multi->pending, data->mid); /* to be sure */
  182|       |
  183|  15.5k|    if(Curl_uint32_bset_empty(&data->multi->process)) {
  ------------------
  |  Branch (183:8): [True: 0, False: 15.5k]
  ------------------
  184|       |      /* free the transfer buffer when we have no more active transfers */
  185|      0|      multi_xfer_bufs_free(data->multi);
  186|      0|    }
  187|  15.5k|    break;
  188|   153k|  default:
  ------------------
  |  Branch (188:3): [True: 153k, False: 19.6k]
  ------------------
  189|   153k|    break;
  190|   172k|  }
  191|       |
  192|       |  /* if this state has an init-function, run it */
  193|   172k|  if(finit[state])
  ------------------
  |  Branch (193:6): [True: 56.2k, False: 116k]
  ------------------
  194|  56.2k|    finit[state](data);
  195|   172k|}
multi.c:before_perform:
  114|  17.3k|{
  115|       |  data->req.chunk = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
  116|  17.3k|  Curl_pgrsTime(data, TIMER_PRETRANSFER);
  117|  17.3k|}
multi.c:init_completed:
  120|  15.5k|{
  121|       |  /* this is a completed transfer */
  122|       |
  123|       |  /* Important: reset the conn pointer so that we do not point to memory
  124|       |     that could be freed anytime */
  125|  15.5k|  Curl_detach_connection(data);
  126|  15.5k|  Curl_expire_clear(data); /* stop all timers */
  127|  15.5k|}
multi.c:multi_warn_debug:
  367|  1.77M|{
  368|  1.77M|  if(!multi->warned) {
  ------------------
  |  Branch (368:6): [True: 15.3k, False: 1.75M]
  ------------------
  369|  15.3k|    infof(data, "!!! WARNING !!!");
  ------------------
  |  |  143|  15.3k|  do {                               \
  |  |  144|  15.3k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  15.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  ------------------
  |  |  |  |  320|  15.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  15.3k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  370|  15.3k|    infof(data, "This is a debug build of libcurl, "
  ------------------
  |  |  143|  15.3k|  do {                               \
  |  |  144|  15.3k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  15.3k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 15.3k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 15.3k]
  |  |  |  |  ------------------
  |  |  |  |  320|  15.3k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  15.3k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
  371|  15.3k|                "do not use in production.");
  372|       |    multi->warned = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  373|  15.3k|  }
  374|  1.77M|}
multi.c:multi_assess_wakeup:
  385|  47.2k|{
  386|  47.2k|#ifdef ENABLE_WAKEUP
  387|  47.2k|  if(multi->socket_cb)
  ------------------
  |  Branch (387:6): [True: 0, False: 47.2k]
  ------------------
  388|      0|    return Curl_multi_ev_assess_xfer(multi, multi->admin);
  389|       |#else
  390|       |  (void)multi;
  391|       |#endif
  392|  47.2k|  return CURLM_OK;
  393|  47.2k|}
multi.c:multi_done:
  690|  21.3k|{
  691|  21.3k|  CURLcode result;
  692|  21.3k|  struct connectdata *conn = data->conn;
  693|       |
  694|  21.3k|  CURL_TRC_M(data, "multi_done: status: %d prem: %d done: %d",
  ------------------
  |  |  148|  21.3k|  do {                                   \
  |  |  149|  21.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  21.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  21.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  42.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 21.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 21.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  42.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  21.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  21.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  21.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  695|  21.3k|             (int)status, (int)premature, data->state.done);
  696|       |
  697|  21.3k|  if(data->state.done)
  ------------------
  |  Branch (697:6): [True: 0, False: 21.3k]
  ------------------
  698|       |    /* Stop if multi_done() has already been called */
  699|      0|    return CURLE_OK;
  700|       |
  701|       |  /* Shut down any ongoing async resolver operation. */
  702|  21.3k|  Curl_resolv_shutdown_all(data);
  703|       |
  704|       |  /* Cleanup possible redirect junk */
  705|  21.3k|  curlx_safefree(data->req.newurl);
  ------------------
  |  | 1327|  21.3k|  do {                      \
  |  | 1328|  21.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  21.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  21.3k|    (ptr) = NULL;           \
  |  | 1330|  21.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  706|  21.3k|  curlx_safefree(data->req.location);
  ------------------
  |  | 1327|  21.3k|  do {                      \
  |  | 1328|  21.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  21.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  21.3k|    (ptr) = NULL;           \
  |  | 1330|  21.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  707|       |
  708|  21.3k|  switch(status) {
  709|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (709:3): [True: 0, False: 21.3k]
  ------------------
  710|      2|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (710:3): [True: 2, False: 21.2k]
  ------------------
  711|     25|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (711:3): [True: 23, False: 21.2k]
  ------------------
  712|       |    /* When we are aborted due to a callback return code it has to be counted
  713|       |       as premature as there is trouble ahead if we do not. We have many
  714|       |       callbacks and protocols work differently, we could potentially do this
  715|       |       more fine-grained in the future. */
  716|     25|    premature = TRUE;
  ------------------
  |  | 1055|     25|#define TRUE true
  ------------------
  717|     25|    FALLTHROUGH();
  ------------------
  |  |  821|     25|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  718|  21.3k|  default:
  ------------------
  |  Branch (718:3): [True: 21.2k, False: 25]
  ------------------
  719|  21.3k|    break;
  720|  21.3k|  }
  721|       |
  722|       |  /* this calls the protocol-specific function pointer previously set */
  723|  21.3k|  if(conn && conn->scheme->run->done && (data->mstate >= MSTATE_PROTOCONNECT))
  ------------------
  |  Branch (723:6): [True: 21.3k, False: 0]
  |  Branch (723:14): [True: 21.3k, False: 0]
  |  Branch (723:41): [True: 17.3k, False: 3.92k]
  ------------------
  724|  17.3k|    result = conn->scheme->run->done(data, status, premature);
  725|  3.92k|  else
  726|  3.92k|    result = status;
  727|       |
  728|  21.3k|  if(data->mstate > MSTATE_CONNECTING &&
  ------------------
  |  Branch (728:6): [True: 17.3k, False: 3.92k]
  ------------------
  729|  17.3k|     (result != CURLE_ABORTED_BY_CALLBACK)) {
  ------------------
  |  Branch (729:6): [True: 17.3k, False: 0]
  ------------------
  730|       |    /* avoid this if
  731|       |     * - the transfer has not connected
  732|       |     * - we already aborted by callback to avoid this calling another callback
  733|       |     */
  734|  17.3k|    int rc = Curl_pgrsDone(data);
  735|  17.3k|    if(!result && rc)
  ------------------
  |  Branch (735:8): [True: 42, False: 17.3k]
  |  Branch (735:19): [True: 0, False: 42]
  ------------------
  736|      0|      result = CURLE_ABORTED_BY_CALLBACK;
  737|  17.3k|  }
  738|       |
  739|       |  /* Make sure that transfer client writes are really done now. */
  740|  21.3k|  result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
  741|       |
  742|       |  /* Inform connection filters that this transfer is done */
  743|  21.3k|  if(conn)
  ------------------
  |  Branch (743:6): [True: 21.3k, False: 0]
  ------------------
  744|  21.3k|    Curl_conn_ev_data_done(data, premature);
  745|       |
  746|  21.3k|  process_pending_handles(data->multi); /* connection / multiplex */
  747|       |
  748|  21.3k|  if(!result)
  ------------------
  |  Branch (748:6): [True: 302, False: 20.9k]
  ------------------
  749|    302|    result = Curl_req_done(&data->req, data, premature);
  750|       |
  751|  21.3k|  if(conn) {
  ------------------
  |  Branch (751:6): [True: 21.3k, False: 0]
  ------------------
  752|       |    /* Under the potential connection pool's share lock, decide what to
  753|       |     * do with the transfer's connection. */
  754|  21.3k|    struct multi_done_ctx mdctx;
  755|       |
  756|  21.3k|    memset(&mdctx, 0, sizeof(mdctx));
  757|  21.3k|    mdctx.premature = premature;
  758|  21.3k|    Curl_cpool_do_locked(data, data->conn, multi_done_locked, &mdctx);
  759|  21.3k|  }
  760|       |
  761|       |  /* flush the netrc cache */
  762|  21.3k|  Curl_netrc_cleanup(&data->state.netrc);
  763|  21.3k|  return result;
  764|  21.3k|}
multi.c:multi_done_locked:
  637|  21.3k|{
  638|  21.3k|  struct multi_done_ctx *mdctx = userdata;
  639|       |
  640|  21.3k|  Curl_detach_connection(data);
  641|       |
  642|  21.3k|  CURL_TRC_M(data, "multi_done_locked, in use=%u", conn->attached_xfers);
  ------------------
  |  |  148|  21.3k|  do {                                   \
  |  |  149|  21.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  21.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  21.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  42.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 21.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 21.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  42.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  21.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  21.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  21.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 21.3k]
  |  |  ------------------
  ------------------
  643|  21.3k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  346|  21.3k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 21.3k]
  |  |  ------------------
  ------------------
  644|       |    /* Stop if still used. */
  645|      0|    CURL_TRC_M(data, "Connection still in use %u, no more multi_done now!",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  646|      0|               conn->attached_xfers);
  647|      0|    return;
  648|      0|  }
  649|       |
  650|  21.3k|  data->state.done = TRUE; /* called now! */
  ------------------
  |  | 1055|  21.3k|#define TRUE true
  ------------------
  651|  21.3k|  data->state.recent_conn_id = conn->connection_id;
  652|       |
  653|  21.3k|  Curl_dnscache_prune(data);
  654|       |
  655|  21.3k|  if(multi_conn_should_close(conn, data, (bool)mdctx->premature)) {
  ------------------
  |  Branch (655:6): [True: 9.48k, False: 11.8k]
  ------------------
  656|  9.48k|    CURL_TRC_M(data, "multi_done, terminating conn #%" FMT_OFF_T " to %s, "
  ------------------
  |  |  148|  9.48k|  do {                                   \
  |  |  149|  9.48k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  9.48k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  9.48k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  18.9k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 9.48k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 9.48k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  18.9k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  9.48k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  9.48k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  9.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 9.48k]
  |  |  ------------------
  ------------------
  657|  9.48k|               "forbid=%d, close=%d, premature=%d, conn_multiplex=%d",
  658|  9.48k|               conn->connection_id, conn->destination,
  659|  9.48k|               data->set.reuse_forbid, conn->bits.close, mdctx->premature,
  660|  9.48k|               Curl_conn_is_multiplex(conn, FIRSTSOCKET));
  661|  9.48k|    connclose(conn, "disconnecting");
  ------------------
  |  |  103|  9.48k|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|  9.48k|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  662|  9.48k|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  663|  9.48k|  }
  664|  11.8k|  else if(!Curl_conn_get_max_concurrent(data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|  11.8k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (664:11): [True: 0, False: 11.8k]
  ------------------
  665|      0|    CURL_TRC_M(data, "multi_done, conn #%" FMT_OFF_T " to %s was shutdown"
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  666|      0|               " by server, not reusing", conn->connection_id,
  667|      0|               conn->destination);
  668|      0|    connclose(conn, "server shutdown");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  669|      0|    Curl_conn_terminate(data, conn, (bool)mdctx->premature);
  670|      0|  }
  671|  11.8k|  else {
  672|       |    /* the connection is no longer in use by any transfer */
  673|  11.8k|    if(Curl_cpool_conn_now_idle(data, conn)) {
  ------------------
  |  Branch (673:8): [True: 11.8k, False: 0]
  ------------------
  674|       |      /* connection kept in the cpool */
  675|  11.8k|      data->state.lastconnect_id = conn->connection_id;
  676|  11.8k|      infof(data, "Connection #%" FMT_OFF_T " to host %s left intact",
  ------------------
  |  |  143|  11.8k|  do {                               \
  |  |  144|  11.8k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  11.8k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 11.8k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.8k]
  |  |  |  |  ------------------
  |  |  |  |  320|  11.8k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  11.8k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  11.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 11.8k]
  |  |  ------------------
  ------------------
  677|  11.8k|            conn->connection_id, conn->destination);
  678|  11.8k|    }
  679|      0|    else {
  680|       |      /* connection was removed from the cpool and destroyed. */
  681|      0|      data->state.lastconnect_id = -1;
  682|      0|    }
  683|  11.8k|  }
  684|  21.3k|}
multi.c:multi_conn_should_close:
  596|  21.3k|{
  597|       |  /* if conn->bits.close is TRUE, it means that the connection should be
  598|       |     closed in spite of everything else. */
  599|  21.3k|  if(conn->bits.close)
  ------------------
  |  Branch (599:6): [True: 5.50k, False: 15.7k]
  ------------------
  600|  5.50k|    return TRUE;
  ------------------
  |  | 1055|  5.50k|#define TRUE true
  ------------------
  601|       |
  602|       |  /* if data->set.reuse_forbid is TRUE, it means the libcurl client has
  603|       |     forced us to close this connection. This is ignored for requests taking
  604|       |     place in a NTLM/NEGOTIATE authentication handshake. */
  605|  15.7k|  if(data->set.reuse_forbid
  ------------------
  |  Branch (605:6): [True: 77, False: 15.7k]
  ------------------
  606|       |#ifdef USE_NTLM
  607|       |     && !(conn->http_ntlm_state == NTLMSTATE_TYPE2 ||
  608|       |          conn->proxy_ntlm_state == NTLMSTATE_TYPE2)
  609|       |#endif
  610|       |#ifdef USE_SPNEGO
  611|       |     && !(conn->http_negotiate_state == GSS_AUTHRECV ||
  612|       |          conn->proxy_negotiate_state == GSS_AUTHRECV)
  613|       |#endif
  614|  15.7k|    )
  615|     77|    return TRUE;
  ------------------
  |  | 1055|     77|#define TRUE true
  ------------------
  616|       |
  617|       |  /* Unless this connection is for a "connect-only" transfer, it
  618|       |   * needs to be closed if the protocol handler does not support reuse. */
  619|  15.7k|  if(!data->set.connect_only && conn->scheme &&
  ------------------
  |  Branch (619:6): [True: 15.6k, False: 61]
  |  Branch (619:33): [True: 15.6k, False: 0]
  ------------------
  620|  15.6k|     !(conn->scheme->flags & PROTOPT_CONN_REUSE))
  ------------------
  |  |  238|  15.6k|#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
  ------------------
  |  Branch (620:6): [True: 0, False: 15.6k]
  ------------------
  621|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  622|       |
  623|       |  /* if premature is TRUE, it means this connection was said to be DONE before
  624|       |     the entire request operation is complete and thus we cannot know in what
  625|       |     state it is for reusing, so we are forced to close it. In a perfect world
  626|       |     we can add code that keep track of if we really must close it here or not,
  627|       |     but currently we have no such detail knowledge. */
  628|  15.7k|  if(premature && !Curl_conn_is_multiplex(conn, FIRSTSOCKET))
  ------------------
  |  |  303|  3.90k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (628:6): [True: 3.90k, False: 11.8k]
  |  Branch (628:19): [True: 3.90k, False: 0]
  ------------------
  629|  3.90k|    return TRUE;
  ------------------
  |  | 1055|  3.90k|#define TRUE true
  ------------------
  630|       |
  631|  11.8k|  return FALSE;
  ------------------
  |  | 1058|  11.8k|#define FALSE false
  ------------------
  632|  15.7k|}
multi.c:close_connect_only:
  769|  1.47k|{
  770|  1.47k|  (void)userdata;
  771|  1.47k|  (void)data;
  772|  1.47k|  if(conn->bits.connect_only)
  ------------------
  |  Branch (772:6): [True: 0, False: 1.47k]
  ------------------
  773|      0|    connclose(conn, "Removing connect-only easy handle");
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  774|  1.47k|}
multi.c:mstate_connecting_pollset:
 1024|   847k|{
 1025|   847k|  struct connectdata *conn = data->conn;
 1026|   847k|  curl_socket_t sockfd;
 1027|   847k|  CURLcode result = CURLE_OK;
 1028|       |
 1029|   847k|  if(Curl_xfer_recv_is_paused(data))
  ------------------
  |  Branch (1029:6): [True: 0, False: 847k]
  ------------------
 1030|      0|    return CURLE_OK;
 1031|       |  /* If a socket is set, receiving is default. If the socket
 1032|       |   * has not been determined yet (eyeballing), always ask the
 1033|       |   * connection filters for what to monitor. */
 1034|   847k|  sockfd = Curl_conn_get_first_socket(data);
 1035|   847k|  if(sockfd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   847k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (1035:6): [True: 491k, False: 355k]
  ------------------
 1036|   491k|    result = Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
  ------------------
  |  |  283|   491k|#define CURL_POLL_IN     1
  ------------------
 1037|   491k|    if(!result)
  ------------------
  |  Branch (1037:8): [True: 491k, False: 0]
  ------------------
 1038|   491k|      result = multi_adjust_pollset(data, ps);
 1039|   491k|  }
 1040|   847k|  if(!result)
  ------------------
  |  Branch (1040:6): [True: 847k, False: 0]
  ------------------
 1041|   847k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1042|   847k|  return result;
 1043|   847k|}
multi.c:multi_adjust_pollset:
  979|   683k|{
  980|   683k|  CURLcode result = CURLE_OK;
  981|       |
  982|   683k|  if(ps->n) {
  ------------------
  |  Branch (982:6): [True: 683k, False: 0]
  ------------------
  983|   683k|    const struct curltime *pnow = Curl_pgrs_now(data);
  984|   683k|    bool send_blocked, recv_blocked;
  985|       |
  986|   683k|    recv_blocked = (Curl_rlimit_avail(&data->progress.dl.rlimit, pnow) <= 0);
  987|   683k|    send_blocked = (Curl_rlimit_avail(&data->progress.ul.rlimit, pnow) <= 0);
  988|   683k|    if(send_blocked || recv_blocked) {
  ------------------
  |  Branch (988:8): [True: 0, False: 683k]
  |  Branch (988:24): [True: 0, False: 683k]
  ------------------
  989|      0|      int i;
  990|      0|      for(i = 0; i <= SECONDARYSOCKET; ++i) {
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (990:18): [True: 0, False: 0]
  ------------------
  991|      0|        curl_socket_t sock = data->conn->sock[i];
  992|      0|        if(sock == CURL_SOCKET_BAD)
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (992:12): [True: 0, False: 0]
  ------------------
  993|      0|          continue;
  994|      0|        if(recv_blocked && Curl_pollset_want_recv(data, ps, sock)) {
  ------------------
  |  Branch (994:12): [True: 0, False: 0]
  |  Branch (994:28): [True: 0, False: 0]
  ------------------
  995|      0|          result = Curl_pollset_remove_in(data, ps, sock);
  ------------------
  |  |  164|      0|  Curl_pollset_change(data, ps, sock, 0, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  996|      0|          if(result)
  ------------------
  |  Branch (996:14): [True: 0, False: 0]
  ------------------
  997|      0|            break;
  998|      0|        }
  999|      0|        if(send_blocked && Curl_pollset_want_send(data, ps, sock)) {
  ------------------
  |  Branch (999:12): [True: 0, False: 0]
  |  Branch (999:28): [True: 0, False: 0]
  ------------------
 1000|      0|          result = Curl_pollset_remove_out(data, ps, sock);
  ------------------
  |  |  168|      0|  Curl_pollset_change(data, ps, sock, 0, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1001|      0|          if(result)
  ------------------
  |  Branch (1001:14): [True: 0, False: 0]
  ------------------
 1002|      0|            break;
 1003|      0|        }
 1004|      0|      }
 1005|      0|    }
 1006|       |
 1007|       |    /* Not blocked and wanting to receive. If there is data pending
 1008|       |     * in the connection filters, make transfer run again. */
 1009|   683k|    if(!recv_blocked &&
  ------------------
  |  Branch (1009:8): [True: 683k, False: 0]
  ------------------
 1010|   683k|       ((Curl_pollset_want_recv(data, ps, data->conn->sock[FIRSTSOCKET]) &&
  ------------------
  |  |  303|   683k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1010:10): [True: 191k, False: 491k]
  ------------------
 1011|   191k|         Curl_conn_data_pending(data, FIRSTSOCKET)) ||
  ------------------
  |  |  303|   191k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (1011:10): [True: 0, False: 191k]
  ------------------
 1012|   683k|        (Curl_pollset_want_recv(data, ps, data->conn->sock[SECONDARYSOCKET]) &&
  ------------------
  |  |  304|   683k|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1012:10): [True: 0, False: 683k]
  ------------------
 1013|      0|         Curl_conn_data_pending(data, SECONDARYSOCKET)))) {
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  |  Branch (1013:10): [True: 0, False: 0]
  ------------------
 1014|      0|      CURL_TRC_M(data, "pollset[] has POLLIN, but there is still "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1015|      0|                 "buffered input -> mark as dirty");
 1016|      0|      Curl_multi_mark_dirty(data);
 1017|      0|    }
 1018|   683k|  }
 1019|   683k|  return result;
 1020|   683k|}
multi.c:mstate_perform_pollset:
 1107|   191k|{
 1108|   191k|  struct connectdata *conn = data->conn;
 1109|   191k|  CURLcode result = CURLE_OK;
 1110|       |
 1111|   191k|  if(conn->scheme->run->perform_pollset)
  ------------------
  |  Branch (1111:6): [True: 191k, False: 0]
  ------------------
 1112|   191k|    result = conn->scheme->run->perform_pollset(data, ps);
 1113|      0|  else {
 1114|       |    /* Default is to obey the request flags for send/recv */
 1115|      0|    if(Curl_req_want_recv(data) && CONN_SOCK_IDX_VALID(conn->recv_idx)) {
  ------------------
  |  |  382|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 0, False: 0]
  |  |  |  Branch (382:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1115:8): [True: 0, False: 0]
  ------------------
 1116|      0|      result = Curl_pollset_add_in(data, ps, conn->sock[conn->recv_idx]);
  ------------------
  |  |  162|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, 0)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1117|      0|    }
 1118|      0|    if(!result && Curl_req_want_send(data) &&
  ------------------
  |  Branch (1118:8): [True: 0, False: 0]
  |  Branch (1118:19): [True: 0, False: 0]
  ------------------
 1119|      0|       CONN_SOCK_IDX_VALID(conn->send_idx)) {
  ------------------
  |  |  382|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 0, False: 0]
  |  |  |  Branch (382:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1120|      0|      result = Curl_pollset_add_out(data, ps, conn->sock[conn->send_idx]);
  ------------------
  |  |  166|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, 0)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1121|      0|    }
 1122|      0|  }
 1123|   191k|  if(!result)
  ------------------
  |  Branch (1123:6): [True: 191k, False: 0]
  ------------------
 1124|   191k|    result = multi_adjust_pollset(data, ps);
 1125|   191k|  if(!result)
  ------------------
  |  Branch (1125:6): [True: 191k, False: 0]
  ------------------
 1126|   191k|    result = Curl_conn_adjust_pollset(data, conn, ps);
 1127|   191k|  return result;
 1128|   191k|}
multi.c:multi_perform:
 2856|   699k|{
 2857|   699k|  CURLMcode returncode = CURLM_OK;
 2858|   699k|  struct curltime start = *multi_now(multi);
 2859|   699k|  uint32_t mid;
 2860|   699k|  struct Curl_sigpipe_ctx sigpipe_ctx;
 2861|       |
 2862|   699k|  if(multi->in_callback)
  ------------------
  |  Branch (2862:6): [True: 0, False: 699k]
  ------------------
 2863|      0|    return CURLM_RECURSIVE_API_CALL;
 2864|       |
 2865|   699k|  if(multi->in_ntfy_callback)
  ------------------
  |  Branch (2865:6): [True: 0, False: 699k]
  ------------------
 2866|      0|    return CURLM_RECURSIVE_API_CALL;
 2867|       |
 2868|   699k|  sigpipe_init(&sigpipe_ctx);
 2869|       |
 2870|   699k|  if(Curl_uint32_bset_first(&multi->process, &mid)) {
  ------------------
  |  Branch (2870:6): [True: 699k, False: 0]
  ------------------
 2871|   699k|    CURL_TRC_M(multi->admin, "multi_perform(running=%u)",
  ------------------
  |  |  148|   699k|  do {                                   \
  |  |  149|   699k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|   699k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   699k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.39M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 699k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 699k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.39M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   699k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|   699k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|   699k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 699k]
  |  |  ------------------
  ------------------
 2872|   699k|               Curl_multi_xfers_running(multi));
 2873|  1.75M|    do {
 2874|  1.75M|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 2875|  1.75M|      CURLMcode mresult;
 2876|  1.75M|      if(!data) {
  ------------------
  |  Branch (2876:10): [True: 0, False: 1.75M]
  ------------------
 2877|      0|        DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2877:9): [Folded, False: 0]
  |  Branch (2877:9): [Folded, False: 0]
  ------------------
 2878|      0|        Curl_uint32_bset_remove(&multi->process, mid);
 2879|      0|        Curl_uint32_bset_remove(&multi->dirty, mid);
 2880|      0|        continue;
 2881|      0|      }
 2882|  1.75M|      mresult = multi_runsingle(multi, data, &sigpipe_ctx);
 2883|  1.75M|      if(mresult)
  ------------------
  |  Branch (2883:10): [True: 0, False: 1.75M]
  ------------------
 2884|      0|        returncode = mresult;
 2885|  1.75M|    } while(Curl_uint32_bset_next(&multi->process, mid, &mid));
  ------------------
  |  Branch (2885:13): [True: 1.05M, False: 699k]
  ------------------
 2886|   699k|  }
 2887|   699k|  sigpipe_restore(&sigpipe_ctx);
 2888|       |
 2889|   699k|  if(multi_ischanged(multi, TRUE))
  ------------------
  |  | 1055|   699k|#define TRUE true
  ------------------
  |  Branch (2889:6): [True: 8.75k, False: 691k]
  ------------------
 2890|  8.75k|    process_pending_handles(multi);
 2891|       |
 2892|   699k|  if(!returncode && CURL_MNTFY_HAS_ENTRIES(multi))
  ------------------
  |  |   56|   699k|#define CURL_MNTFY_HAS_ENTRIES(m)       ((m)->ntfy.has_entries)
  |  |  ------------------
  |  |  |  Branch (56:41): [True: 0, False: 699k]
  |  |  ------------------
  ------------------
  |  Branch (2892:6): [True: 699k, False: 0]
  ------------------
 2893|      0|    returncode = Curl_mntfy_dispatch_all(multi);
 2894|       |
 2895|       |  /*
 2896|       |   * Remove all expired timers from the splay since handles are dealt
 2897|       |   * with unconditionally by this function and curl_multi_timeout() requires
 2898|       |   * that already passed/handled expire times are removed from the splay.
 2899|       |   *
 2900|       |   * It is important that the 'now' value is set at the entry of this function
 2901|       |   * and not for the current time as it may have ticked a little while since
 2902|       |   * then and then we risk this loop to remove timers that actually have not
 2903|       |   * been handled!
 2904|       |   */
 2905|   699k|  if(multi->timetree) {
  ------------------
  |  Branch (2905:6): [True: 684k, False: 15.0k]
  ------------------
 2906|   684k|    struct Curl_tree *t = NULL;
 2907|   684k|    do {
 2908|   684k|      multi->timetree = Curl_splaygetbest(&start, multi->timetree, &t);
 2909|   684k|      if(t) {
  ------------------
  |  Branch (2909:10): [True: 20, False: 684k]
  ------------------
 2910|       |        /* the removed may have another timeout in queue */
 2911|     20|        struct Curl_easy *data = Curl_splayget(t);
 2912|     20|        (void)add_next_timeout(&start, multi, data);
 2913|     20|        if(data->mstate == MSTATE_PENDING) {
  ------------------
  |  Branch (2913:12): [True: 0, False: 20]
  ------------------
 2914|      0|          bool stream_unused;
 2915|      0|          CURLcode result_unused;
 2916|      0|          if(multi_handle_timeout(data, &stream_unused, &result_unused)) {
  ------------------
  |  Branch (2916:14): [True: 0, False: 0]
  ------------------
 2917|      0|            infof(data, "PENDING handle timeout");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2918|      0|            move_pending_to_connect(multi, data);
 2919|      0|          }
 2920|      0|        }
 2921|     20|      }
 2922|   684k|    } while(t);
  ------------------
  |  Branch (2922:13): [True: 20, False: 684k]
  ------------------
 2923|   684k|  }
 2924|       |
 2925|   699k|  if(running_handles) {
  ------------------
  |  Branch (2925:6): [True: 699k, False: 0]
  ------------------
 2926|   699k|    unsigned int running = Curl_multi_xfers_running(multi);
 2927|   699k|    *running_handles = (running < INT_MAX) ? (int)running : INT_MAX;
  ------------------
  |  Branch (2927:24): [True: 699k, False: 0]
  ------------------
 2928|   699k|  }
 2929|       |
 2930|   699k|  if(CURLM_OK >= returncode)
  ------------------
  |  Branch (2930:6): [True: 699k, False: 0]
  ------------------
 2931|   699k|    returncode = Curl_update_timer(multi);
 2932|       |
 2933|   699k|  return returncode;
 2934|   699k|}
multi.c:multi_now:
  104|   699k|{
  105|   699k|  curlx_pnow(&multi->now);
  106|   699k|  return &multi->now;
  107|   699k|}
multi.c:multi_runsingle:
 2687|  1.75M|{
 2688|  1.75M|  CURLMcode mresult;
 2689|  1.75M|  CURLcode result = CURLE_OK;
 2690|       |
 2691|  1.75M|  if(!GOOD_EASY_HANDLE(data))
  ------------------
  |  |  136|  1.75M|  (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  |  130|  1.75M|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  |  |  ------------------
  |  |                 (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
  |  |  ------------------
  |  |  |  | 1055|  1.75M|#define TRUE true
  |  |  ------------------
  |  |  |  Branch (136:5): [True: 1.75M, False: 0]
  |  |  |  Branch (136:12): [True: 1.75M, False: 0]
  |  |  ------------------
  |  |  137|  1.75M|   (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |                  (DEBUGASSERT(!(x)), FALSE))
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  ------------------
  |  Branch (2691:6): [True: 0, False: 1.75M]
  |  Branch (2691:7): [True: 0, False: 0]
  |  Branch (2691:7): [True: 0, False: 0]
  ------------------
 2692|      0|    return CURLM_BAD_EASY_HANDLE;
 2693|       |
 2694|  1.75M|  if(multi->dead) {
  ------------------
  |  Branch (2694:6): [True: 0, False: 1.75M]
  ------------------
 2695|       |    /* a multi-level callback returned error before, meaning every individual
 2696|       |     transfer now has failed */
 2697|      0|    result = CURLE_ABORTED_BY_CALLBACK;
 2698|      0|    multi_posttransfer(data);
 2699|      0|    multi_done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2700|      0|    multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2701|      0|  }
 2702|       |
 2703|  1.75M|  multi_warn_debug(multi, data);
 2704|       |
 2705|       |  /* transfer runs now, clear the dirty bit. This may be set
 2706|       |   * again during processing, triggering a re-run later. */
 2707|  1.75M|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2708|       |
 2709|  1.75M|  if(data == multi->admin) {
  ------------------
  |  Branch (2709:6): [True: 699k, False: 1.05M]
  ------------------
 2710|   699k|#ifdef ENABLE_WAKEUP
 2711|       |    /* Consume any pending wakeup signals before processing.
 2712|       |     * This is necessary for event based processing. See #21547 */
 2713|   699k|    (void)Curl_wakeup_consume(multi->wakeup_pair, TRUE);
  ------------------
  |  | 1055|   699k|#define TRUE true
  ------------------
 2714|   699k|#endif
 2715|   699k|#ifdef USE_RESOLV_THREADED
 2716|   699k|    Curl_async_thrdd_multi_process(multi);
 2717|   699k|#endif
 2718|   699k|    Curl_cshutdn_perform(&multi->cshutdn, multi->admin, sigpipe_ctx);
 2719|   699k|    return CURLM_OK;
 2720|   699k|  }
 2721|       |
 2722|  1.05M|  sigpipe_apply(data, sigpipe_ctx);
 2723|  1.19M|  do {
 2724|       |    /* A "stream" here is a logical stream if the protocol can handle that
 2725|       |       (HTTP/2), or the full connection for older protocols */
 2726|  1.19M|    bool stream_error = FALSE;
  ------------------
  |  | 1058|  1.19M|#define FALSE false
  ------------------
 2727|  1.19M|    mresult = CURLM_OK;
 2728|       |
 2729|  1.19M|    if(multi_ischanged(multi, TRUE)) {
  ------------------
  |  | 1055|  1.19M|#define TRUE true
  ------------------
  |  Branch (2729:8): [True: 320, False: 1.19M]
  ------------------
 2730|    320|      CURL_TRC_M(data, "multi changed, check CONNECT_PEND queue");
  ------------------
  |  |  148|    320|  do {                                   \
  |  |  149|    320|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    320|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    320|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    640|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 320, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 320]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    640|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    320|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    320|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    320|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 320]
  |  |  ------------------
  ------------------
 2731|    320|      process_pending_handles(multi); /* multiplexed */
 2732|    320|    }
 2733|       |
 2734|  1.19M|    if(data->mstate > MSTATE_CONNECT &&
  ------------------
  |  Branch (2734:8): [True: 1.13M, False: 62.4k]
  ------------------
 2735|  1.13M|       data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2735:8): [True: 1.13M, False: 0]
  ------------------
 2736|       |      /* Make sure we set the connection's current owner */
 2737|  1.13M|      DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  1.13M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2737:7): [True: 0, False: 1.13M]
  |  Branch (2737:7): [True: 1.13M, False: 0]
  ------------------
 2738|  1.13M|      if(!data->conn)
  ------------------
  |  Branch (2738:10): [True: 0, False: 1.13M]
  ------------------
 2739|      0|        return CURLM_INTERNAL_ERROR;
 2740|  1.13M|    }
 2741|       |
 2742|       |    /* Wait for the connect state as only then is the start time stored, but
 2743|       |       we must not check already completed handles */
 2744|  1.19M|    if((data->mstate >= MSTATE_CONNECT) && (data->mstate < MSTATE_COMPLETED) &&
  ------------------
  |  Branch (2744:8): [True: 1.15M, False: 39.2k]
  |  Branch (2744:44): [True: 1.15M, False: 0]
  ------------------
 2745|  1.15M|       multi_handle_timeout(data, &stream_error, &result))
  ------------------
  |  Branch (2745:8): [True: 27, False: 1.15M]
  ------------------
 2746|       |      /* Skip the statemachine and go directly to error handling section. */
 2747|     27|      goto statemachine_end;
 2748|       |
 2749|  1.19M|    switch(data->mstate) {
 2750|  16.1k|    case MSTATE_INIT:
  ------------------
  |  Branch (2750:5): [True: 16.1k, False: 1.18M]
  ------------------
 2751|       |      /* Transitional state. init this transfer. A handle never comes back to
 2752|       |         this state. */
 2753|  16.1k|      mresult = multistate_init(data, &result);
 2754|  16.1k|      break;
 2755|       |
 2756|  23.1k|    case MSTATE_SETUP:
  ------------------
  |  Branch (2756:5): [True: 23.1k, False: 1.17M]
  ------------------
 2757|       |      /* Transitional state. Setup things for a new transfer. The handle
 2758|       |         can come back to this state on a redirect. */
 2759|  23.1k|      mresult = multistate_setup(data);
 2760|  23.1k|      break;
 2761|       |
 2762|  23.2k|    case MSTATE_CONNECT:
  ------------------
  |  Branch (2762:5): [True: 23.2k, False: 1.17M]
  ------------------
 2763|  23.2k|      mresult = multistate_connect(multi, data, &result);
 2764|  23.2k|      break;
 2765|       |
 2766|   868k|    case MSTATE_CONNECTING:
  ------------------
  |  Branch (2766:5): [True: 868k, False: 327k]
  ------------------
 2767|       |      /* awaiting a completion of an asynch TCP connect */
 2768|   868k|      mresult = multistate_connecting(data, &stream_error, &result);
 2769|   868k|      break;
 2770|       |
 2771|  17.3k|    case MSTATE_PROTOCONNECT:
  ------------------
  |  Branch (2771:5): [True: 17.3k, False: 1.17M]
  ------------------
 2772|  17.3k|      mresult = multistate_protoconnect(data, &stream_error, &result);
 2773|  17.3k|      break;
 2774|       |
 2775|      0|    case MSTATE_PROTOCONNECTING:
  ------------------
  |  Branch (2775:5): [True: 0, False: 1.19M]
  ------------------
 2776|       |      /* protocol-specific connect phase */
 2777|      0|      mresult = multistate_protoconnecting(data, &stream_error, &result);
 2778|      0|      break;
 2779|       |
 2780|  17.3k|    case MSTATE_DO:
  ------------------
  |  Branch (2780:5): [True: 17.3k, False: 1.17M]
  ------------------
 2781|  17.3k|      mresult = multistate_do(data, &stream_error, &result);
 2782|  17.3k|      break;
 2783|       |
 2784|      0|    case MSTATE_DOING:
  ------------------
  |  Branch (2784:5): [True: 0, False: 1.19M]
  ------------------
 2785|       |      /* we continue DOING until the DO phase is complete */
 2786|      0|      mresult = multistate_doing(data, &stream_error, &result);
 2787|      0|      break;
 2788|       |
 2789|      0|    case MSTATE_DOING_MORE:
  ------------------
  |  Branch (2789:5): [True: 0, False: 1.19M]
  ------------------
 2790|       |      /*
 2791|       |       * When we are connected, DOING MORE and then go DID
 2792|       |       */
 2793|      0|      mresult = multistate_doing_more(data, &stream_error, &result);
 2794|      0|      break;
 2795|       |
 2796|  17.3k|    case MSTATE_DID:
  ------------------
  |  Branch (2796:5): [True: 17.3k, False: 1.17M]
  ------------------
 2797|  17.3k|      mresult = multistate_did(multi, data);
 2798|  17.3k|      break;
 2799|       |
 2800|     70|    case MSTATE_RATELIMITING: /* limit-rate exceeded in either direction */
  ------------------
  |  Branch (2800:5): [True: 70, False: 1.19M]
  ------------------
 2801|     70|      mresult = multistate_ratelimiting(data, &result);
 2802|     70|      break;
 2803|       |
 2804|   209k|    case MSTATE_PERFORMING:
  ------------------
  |  Branch (2804:5): [True: 209k, False: 987k]
  ------------------
 2805|   209k|      mresult = multistate_performing(data, &stream_error, &result);
 2806|   209k|      break;
 2807|       |
 2808|  4.09k|    case MSTATE_DONE:
  ------------------
  |  Branch (2808:5): [True: 4.09k, False: 1.19M]
  ------------------
 2809|  4.09k|      mresult = multistate_done(data, &result);
 2810|  4.09k|      break;
 2811|       |
 2812|      0|    case MSTATE_COMPLETED:
  ------------------
  |  Branch (2812:5): [True: 0, False: 1.19M]
  ------------------
 2813|      0|      break;
 2814|       |
 2815|      0|    case MSTATE_PENDING:
  ------------------
  |  Branch (2815:5): [True: 0, False: 1.19M]
  ------------------
 2816|      0|    case MSTATE_MSGSENT:
  ------------------
  |  Branch (2816:5): [True: 0, False: 1.19M]
  ------------------
 2817|       |      /* handles in these states should NOT be in this list */
 2818|      0|      break;
 2819|       |
 2820|      0|    default:
  ------------------
  |  Branch (2820:5): [True: 0, False: 1.19M]
  ------------------
 2821|      0|      return CURLM_INTERNAL_ERROR;
 2822|  1.19M|    }
 2823|       |
 2824|  1.19M|    if(data->mstate >= MSTATE_CONNECT &&
  ------------------
  |  Branch (2824:8): [True: 1.16M, False: 27.0k]
  ------------------
 2825|  1.16M|       data->mstate < MSTATE_DO &&
  ------------------
  |  Branch (2825:8): [True: 914k, False: 254k]
  ------------------
 2826|   914k|       mresult != CURLM_CALL_MULTI_PERFORM &&
  ------------------
  |  Branch (2826:8): [True: 853k, False: 61.8k]
  ------------------
 2827|   853k|       !multi_ischanged(multi, FALSE)) {
  ------------------
  |  | 1058|   853k|#define FALSE false
  ------------------
  |  Branch (2827:8): [True: 849k, False: 3.64k]
  ------------------
 2828|       |      /* We now handle stream timeouts if and only if this will be the last
 2829|       |       * loop iteration. We only check this on the last iteration to ensure
 2830|       |       * that if we know we have additional work to do immediately
 2831|       |       * (i.e. CURLM_CALL_MULTI_PERFORM == TRUE) then we should do that before
 2832|       |       * declaring the connection timed out as we may almost have a completed
 2833|       |       * connection. */
 2834|   849k|      multi_handle_timeout(data, &stream_error, &result);
 2835|   849k|    }
 2836|       |
 2837|  1.19M|statemachine_end:
 2838|       |
 2839|  1.19M|    result = is_finished(multi, data, stream_error, result);
 2840|  1.19M|    if(result)
  ------------------
  |  Branch (2840:8): [True: 15.5k, False: 1.18M]
  ------------------
 2841|  15.5k|      mresult = CURLM_CALL_MULTI_PERFORM;
 2842|       |
 2843|  1.19M|    if(MSTATE_COMPLETED == data->mstate) {
  ------------------
  |  Branch (2843:8): [True: 15.5k, False: 1.18M]
  ------------------
 2844|  15.5k|      handle_completed(multi, data, result);
 2845|  15.5k|      return CURLM_OK;
 2846|  15.5k|    }
 2847|  1.19M|  } while((mresult == CURLM_CALL_MULTI_PERFORM) ||
  ------------------
  |  Branch (2847:11): [True: 141k, False: 1.03M]
  ------------------
 2848|  1.03M|          multi_ischanged(multi, FALSE));
  ------------------
  |  | 1058|  1.03M|#define FALSE false
  ------------------
  |  Branch (2848:11): [True: 0, False: 1.03M]
  ------------------
 2849|       |
 2850|  1.03M|  data->result = result;
 2851|  1.03M|  return mresult;
 2852|  1.05M|}
multi.c:multi_posttransfer:
 1931|  22.5k|{
 1932|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
 1933|       |  /* restore the signal handler for SIGPIPE before we get back */
 1934|       |  if(!data->set.no_signal)
 1935|       |    signal(SIGPIPE, data->state.prev_signal);
 1936|       |#else
 1937|  22.5k|  (void)data;
 1938|  22.5k|#endif
 1939|  22.5k|}
multi.c:multistate_init:
 2457|  16.1k|{
 2458|  16.1k|  *result = Curl_pretransfer(data);
 2459|  16.1k|  if(*result)
  ------------------
  |  Branch (2459:6): [True: 3.64k, False: 12.4k]
  ------------------
 2460|  3.64k|    return CURLM_OK;
 2461|       |
 2462|       |  /* after init, go SETUP */
 2463|  12.4k|  multistate(data, MSTATE_SETUP);
  ------------------
  |  |  200|  12.4k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2464|  12.4k|  Curl_pgrsTime(data, TIMER_STARTOP);
 2465|  12.4k|  return CURLM_CALL_MULTI_PERFORM;
 2466|  16.1k|}
multi.c:multistate_setup:
 2469|  23.1k|{
 2470|  23.1k|  Curl_pgrsTime(data, TIMER_STARTSINGLE);
 2471|  23.1k|  if(data->set.timeout)
  ------------------
  |  Branch (2471:6): [True: 23.1k, False: 0]
  ------------------
 2472|  23.1k|    Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT);
 2473|  23.1k|  if(data->set.connecttimeout)
  ------------------
  |  Branch (2473:6): [True: 1.28k, False: 21.8k]
  ------------------
 2474|       |    /* Since a connection might go to pending and back to CONNECT several
 2475|       |       times before it actually takes off, we need to set the timeout once
 2476|       |       in SETUP before we enter CONNECT the first time. */
 2477|  1.28k|    Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT);
 2478|       |
 2479|  23.1k|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  200|  23.1k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2480|  23.1k|  return CURLM_CALL_MULTI_PERFORM;
 2481|  23.1k|}
multi.c:multistate_connect:
 2311|  23.2k|{
 2312|       |  /* Connect. We want to get a connection identifier filled in. This state can
 2313|       |     be entered from SETUP and from PENDING. */
 2314|  23.2k|  bool connected;
 2315|  23.2k|  CURLMcode mresult = CURLM_OK;
 2316|  23.2k|  CURLcode result = Curl_connect(data, &connected);
 2317|  23.2k|  if(result == CURLE_NO_CONNECTION_AVAILABLE) {
  ------------------
  |  Branch (2317:6): [True: 238, False: 23.0k]
  ------------------
 2318|       |    /* There was no connection available. We will go to the pending state and
 2319|       |       wait for an available connection. */
 2320|    238|    multistate(data, MSTATE_PENDING);
  ------------------
  |  |  200|    238|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2321|       |    /* move from process to pending set */
 2322|    238|    Curl_uint32_bset_remove(&multi->process, data->mid);
 2323|    238|    Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2324|    238|    Curl_uint32_bset_add(&multi->pending, data->mid);
 2325|    238|    *resultp = CURLE_OK;
 2326|    238|    return mresult;
 2327|    238|  }
 2328|  23.0k|  else
 2329|  23.0k|    process_pending_handles(data->multi);
 2330|       |
 2331|  23.0k|  if(!result) {
  ------------------
  |  Branch (2331:6): [True: 21.3k, False: 1.72k]
  ------------------
 2332|       |    /* after the connect has been sent off, go WAITCONNECT unless the
 2333|       |       protocol connect is already done and we can go directly to WAITDO or
 2334|       |       DO! */
 2335|  21.3k|    mresult = CURLM_CALL_MULTI_PERFORM;
 2336|       |
 2337|  21.3k|    if(connected) {
  ------------------
  |  Branch (2337:8): [True: 0, False: 21.3k]
  ------------------
 2338|      0|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2338:10): [True: 0, False: 0]
  ------------------
 2339|      0|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2339:10): [True: 0, False: 0]
  ------------------
 2340|       |        /* new connection, can multiplex, wake pending handles */
 2341|      0|        process_pending_handles(data->multi);
 2342|      0|      }
 2343|      0|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2344|      0|    }
 2345|  21.3k|    else {
 2346|  21.3k|      multistate(data, MSTATE_CONNECTING);
  ------------------
  |  |  200|  21.3k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2347|  21.3k|    }
 2348|  21.3k|  }
 2349|  23.0k|  *resultp = result;
 2350|  23.0k|  return mresult;
 2351|  23.2k|}
multi.c:multistate_connecting:
 2486|   868k|{
 2487|   868k|  bool connected;
 2488|       |
 2489|   868k|  if(!data->conn) {
  ------------------
  |  Branch (2489:6): [True: 0, False: 868k]
  ------------------
 2490|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2490:5): [Folded, False: 0]
  |  Branch (2490:5): [Folded, False: 0]
  ------------------
 2491|      0|    *result = CURLE_FAILED_INIT;
 2492|      0|    return CURLM_OK;
 2493|      0|  }
 2494|   868k|  if(!Curl_xfer_recv_is_paused(data)) {
  ------------------
  |  Branch (2494:6): [True: 868k, False: 0]
  ------------------
 2495|   868k|    *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  |  303|   868k|#define FIRSTSOCKET     0
  ------------------
                  *result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &connected);
  ------------------
  |  | 1058|   868k|#define FALSE false
  ------------------
 2496|   868k|    if(connected && !(*result)) {
  ------------------
  |  Branch (2496:8): [True: 17.3k, False: 851k]
  |  Branch (2496:21): [True: 17.3k, False: 0]
  ------------------
 2497|  17.3k|      if(!data->conn->bits.reuse &&
  ------------------
  |  Branch (2497:10): [True: 7.10k, False: 10.2k]
  ------------------
 2498|  7.10k|         Curl_conn_is_multiplex(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|  7.10k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2498:10): [True: 0, False: 7.10k]
  ------------------
 2499|       |        /* new connection, can multiplex, wake pending handles */
 2500|      0|        process_pending_handles(data->multi);
 2501|      0|      }
 2502|  17.3k|      multistate(data, MSTATE_PROTOCONNECT);
  ------------------
  |  |  200|  17.3k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2503|  17.3k|      return CURLM_CALL_MULTI_PERFORM;
 2504|  17.3k|    }
 2505|   851k|    else if(*result) {
  ------------------
  |  Branch (2505:13): [True: 3.64k, False: 847k]
  ------------------
 2506|       |      /* failure detected */
 2507|  3.64k|      CURL_TRC_M(data, "connect failed -> %d", *result);
  ------------------
  |  |  148|  3.64k|  do {                                   \
  |  |  149|  3.64k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  3.64k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  3.64k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  7.28k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 3.64k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3.64k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  7.28k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  3.64k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  3.64k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  3.64k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
 2508|  3.64k|      multi_posttransfer(data);
 2509|  3.64k|      multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|  3.64k|#define TRUE true
  ------------------
 2510|  3.64k|      *stream_error = TRUE;
  ------------------
  |  | 1055|  3.64k|#define TRUE true
  ------------------
 2511|  3.64k|      return CURLM_OK;
 2512|  3.64k|    }
 2513|   868k|  }
 2514|   847k|  return CURLM_OK;
 2515|   868k|}
multi.c:multistate_protoconnect:
 2520|  17.3k|{
 2521|  17.3k|  bool protocol_connected = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
 2522|       |
 2523|  17.3k|  if(!(*result) && data->conn->bits.reuse) {
  ------------------
  |  Branch (2523:6): [True: 17.3k, False: 0]
  |  Branch (2523:20): [True: 10.2k, False: 7.10k]
  ------------------
 2524|       |    /* ftp seems to hang when protoconnect on reused connection since we
 2525|       |     * handle PROTOCONNECT in general inside the filters, it seems wrong to
 2526|       |     * restart this on a reused connection.
 2527|       |     */
 2528|  10.2k|    multistate(data, MSTATE_DO);
  ------------------
  |  |  200|  10.2k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2529|  10.2k|    return CURLM_CALL_MULTI_PERFORM;
 2530|  10.2k|  }
 2531|  7.10k|  if(!(*result))
  ------------------
  |  Branch (2531:6): [True: 7.10k, False: 0]
  ------------------
 2532|  7.10k|    *result = protocol_connect(data, &protocol_connected);
 2533|  7.10k|  if(!(*result) && !protocol_connected) {
  ------------------
  |  Branch (2533:6): [True: 7.10k, False: 0]
  |  Branch (2533:20): [True: 0, False: 7.10k]
  ------------------
 2534|       |    /* switch to waiting state */
 2535|      0|    multistate(data, MSTATE_PROTOCONNECTING);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2536|      0|    return CURLM_CALL_MULTI_PERFORM;
 2537|      0|  }
 2538|  7.10k|  else if(!(*result)) {
  ------------------
  |  Branch (2538:11): [True: 7.10k, False: 0]
  ------------------
 2539|       |    /* protocol connect has completed, go WAITDO or DO */
 2540|  7.10k|    multistate(data, MSTATE_DO);
  ------------------
  |  |  200|  7.10k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2541|  7.10k|    return CURLM_CALL_MULTI_PERFORM;
 2542|  7.10k|  }
 2543|       |
 2544|       |  /* failure detected */
 2545|      0|  multi_posttransfer(data);
 2546|      0|  multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2547|       |  *stream_error = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2548|      0|  return CURLM_OK;
 2549|  7.10k|}
multi.c:protocol_connect:
 1896|  7.10k|{
 1897|  7.10k|  struct connectdata *conn = data->conn;
 1898|  7.10k|  CURLcode result = CURLE_OK;
 1899|       |
 1900|  7.10k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  7.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1900:3): [True: 0, False: 7.10k]
  |  Branch (1900:3): [True: 7.10k, False: 0]
  ------------------
 1901|  7.10k|  DEBUGASSERT(protocol_done);
  ------------------
  |  | 1081|  7.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1901:3): [True: 0, False: 7.10k]
  |  Branch (1901:3): [True: 7.10k, False: 0]
  ------------------
 1902|  7.10k|  DEBUGASSERT(Curl_conn_is_connected(conn, FIRSTSOCKET));
  ------------------
  |  | 1081|  7.10k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1902:3): [True: 0, False: 7.10k]
  |  Branch (1902:3): [True: 7.10k, False: 0]
  ------------------
 1903|       |
 1904|  7.10k|  *protocol_done = FALSE;
  ------------------
  |  | 1058|  7.10k|#define FALSE false
  ------------------
 1905|  7.10k|  if(!conn->bits.protoconnstart) {
  ------------------
  |  Branch (1905:6): [True: 7.10k, False: 0]
  ------------------
 1906|  7.10k|    if(conn->scheme->run->connect_it) {
  ------------------
  |  Branch (1906:8): [True: 7.10k, False: 0]
  ------------------
 1907|       |      /* Call the protocol-specific connect function */
 1908|  7.10k|      result = conn->scheme->run->connect_it(data, protocol_done);
 1909|  7.10k|      if(result)
  ------------------
  |  Branch (1909:10): [True: 0, False: 7.10k]
  ------------------
 1910|      0|        return result;
 1911|  7.10k|    }
 1912|  7.10k|    conn->bits.protoconnstart = TRUE;
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
 1913|  7.10k|  }
 1914|       |
 1915|       |  /* Unless this protocol does not have any protocol-connect callback, as
 1916|       |     then we know we are done. */
 1917|  7.10k|  if(!conn->scheme->run->connecting)
  ------------------
  |  Branch (1917:6): [True: 7.10k, False: 0]
  ------------------
 1918|  7.10k|    *protocol_done = TRUE;
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
 1919|  7.10k|  return CURLE_OK;
 1920|  7.10k|}
multi.c:multistate_do:
 2149|  17.3k|{
 2150|  17.3k|  CURLMcode mresult = CURLM_OK;
 2151|  17.3k|  CURLcode result = CURLE_OK;
 2152|  17.3k|  if(data->set.fprereq) {
  ------------------
  |  Branch (2152:6): [True: 0, False: 17.3k]
  ------------------
 2153|      0|    int prereq_rc;
 2154|       |
 2155|       |    /* call the prerequest callback function */
 2156|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2157|      0|    prereq_rc = data->set.fprereq(data->set.prereq_userp,
 2158|      0|                                  data->info.primary.remote_ip,
 2159|      0|                                  data->info.primary.local_ip,
 2160|      0|                                  data->info.primary.remote_port,
 2161|      0|                                  data->info.primary.local_port);
 2162|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2163|      0|    if(prereq_rc != CURL_PREREQFUNC_OK) {
  ------------------
  |  |  506|      0|#define CURL_PREREQFUNC_OK 0
  ------------------
  |  Branch (2163:8): [True: 0, False: 0]
  ------------------
 2164|      0|      failf(data, "operation aborted by pre-request callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2165|       |      /* failure in pre-request callback - do not do any other processing */
 2166|      0|      result = CURLE_ABORTED_BY_CALLBACK;
 2167|      0|      multi_posttransfer(data);
 2168|      0|      multi_done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2169|      0|      *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2170|      0|      goto end;
 2171|      0|    }
 2172|      0|  }
 2173|       |
 2174|  17.3k|  if(data->set.connect_only && !data->set.connect_only_ws) {
  ------------------
  |  Branch (2174:6): [True: 64, False: 17.3k]
  |  Branch (2174:32): [True: 1, False: 63]
  ------------------
 2175|      1|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  200|      1|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2176|      1|    mresult = CURLM_CALL_MULTI_PERFORM;
 2177|      1|  }
 2178|  17.3k|  else {
 2179|  17.3k|    bool dophase_done = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
 2180|       |    /* Perform the protocol's DO action */
 2181|  17.3k|    result = multi_do(data, &dophase_done);
 2182|       |
 2183|       |    /* When multi_do() returns failure, data->conn might be NULL! */
 2184|       |
 2185|  17.3k|    if(!result) {
  ------------------
  |  Branch (2185:8): [True: 17.3k, False: 61]
  ------------------
 2186|  17.3k|      if(!dophase_done) {
  ------------------
  |  Branch (2186:10): [True: 0, False: 17.3k]
  ------------------
 2187|      0|#ifndef CURL_DISABLE_FTP
 2188|       |        /* some steps needed for wildcard matching */
 2189|      0|        if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2189:12): [True: 0, False: 0]
  ------------------
 2190|      0|          struct WildcardData *wc = data->wildcard;
 2191|      0|          if(wc->state == CURLWC_DONE || wc->state == CURLWC_SKIP) {
  ------------------
  |  Branch (2191:14): [True: 0, False: 0]
  |  Branch (2191:42): [True: 0, False: 0]
  ------------------
 2192|       |            /* skip some states if it is important */
 2193|      0|            multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2194|       |
 2195|       |            /* if there is no connection left, skip the DONE state */
 2196|      0|            multistate(data, data->conn ? MSTATE_DONE : MSTATE_COMPLETED);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (200:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2197|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2198|      0|            goto end;
 2199|      0|          }
 2200|      0|        }
 2201|      0|#endif
 2202|       |        /* DO was not completed in one function call, we must continue
 2203|       |           DOING... */
 2204|      0|        multistate(data, MSTATE_DOING);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2205|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2206|      0|      }
 2207|       |
 2208|       |      /* after DO, go DO_DONE... or DO_MORE */
 2209|  17.3k|      else if(data->conn->bits.do_more) {
  ------------------
  |  Branch (2209:15): [True: 0, False: 17.3k]
  ------------------
 2210|       |        /* we are supposed to do more, but we need to sit down, relax and wait
 2211|       |           a little while first */
 2212|      0|        multistate(data, MSTATE_DOING_MORE);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2213|      0|        mresult = CURLM_CALL_MULTI_PERFORM;
 2214|      0|      }
 2215|  17.3k|      else {
 2216|       |        /* we are done with the DO, now DID */
 2217|  17.3k|        multistate(data, MSTATE_DID);
  ------------------
  |  |  200|  17.3k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2218|  17.3k|        mresult = CURLM_CALL_MULTI_PERFORM;
 2219|  17.3k|      }
 2220|  17.3k|    }
 2221|     61|    else if((result == CURLE_SEND_ERROR) &&
  ------------------
  |  Branch (2221:13): [True: 0, False: 61]
  ------------------
 2222|      0|            data->conn->bits.reuse) {
  ------------------
  |  Branch (2222:13): [True: 0, False: 0]
  ------------------
 2223|       |      /*
 2224|       |       * In this situation, a connection that we were trying to use may have
 2225|       |       * unexpectedly died. If possible, send the connection back to the
 2226|       |       * CONNECT phase so we can try again.
 2227|       |       */
 2228|      0|      const struct Curl_scheme *handler = data->conn->scheme;
 2229|      0|      char *newurl = NULL;
 2230|      0|      followtype follow = FOLLOW_NONE;
 2231|      0|      CURLcode drc;
 2232|       |
 2233|      0|      drc = Curl_retry_request(data, &newurl);
 2234|      0|      if(drc) {
  ------------------
  |  Branch (2234:10): [True: 0, False: 0]
  ------------------
 2235|       |        /* a failure here pretty much implies an out of memory */
 2236|      0|        result = drc;
 2237|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2238|      0|      }
 2239|       |
 2240|      0|      multi_posttransfer(data);
 2241|      0|      drc = multi_done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2242|       |
 2243|       |      /* When set to retry the connection, we must go back to the CONNECT
 2244|       |       * state */
 2245|      0|      if(newurl) {
  ------------------
  |  Branch (2245:10): [True: 0, False: 0]
  ------------------
 2246|      0|        if(!drc || (drc == CURLE_SEND_ERROR)) {
  ------------------
  |  Branch (2246:12): [True: 0, False: 0]
  |  Branch (2246:20): [True: 0, False: 0]
  ------------------
 2247|      0|          follow = FOLLOW_RETRY;
 2248|      0|          drc = multi_follow(data, handler, newurl, follow);
 2249|      0|          if(!drc) {
  ------------------
  |  Branch (2249:14): [True: 0, False: 0]
  ------------------
 2250|      0|            multistate(data, MSTATE_SETUP);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2251|      0|            mresult = CURLM_CALL_MULTI_PERFORM;
 2252|      0|            result = CURLE_OK;
 2253|      0|          }
 2254|      0|          else {
 2255|       |            /* Follow failed */
 2256|      0|            result = drc;
 2257|      0|          }
 2258|      0|        }
 2259|      0|        else {
 2260|       |          /* done did not return OK or SEND_ERROR */
 2261|      0|          result = drc;
 2262|      0|        }
 2263|      0|      }
 2264|      0|      else {
 2265|       |        /* Have error handler disconnect conn if we cannot retry */
 2266|      0|        *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2267|      0|      }
 2268|      0|      curlx_free(newurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2269|      0|    }
 2270|     61|    else {
 2271|       |      /* failure detected */
 2272|     61|      multi_posttransfer(data);
 2273|     61|      if(data->conn)
  ------------------
  |  Branch (2273:10): [True: 61, False: 0]
  ------------------
 2274|     61|        multi_done(data, result, FALSE);
  ------------------
  |  | 1058|     61|#define FALSE false
  ------------------
 2275|     61|      *stream_errorp = TRUE;
  ------------------
  |  | 1055|     61|#define TRUE true
  ------------------
 2276|     61|    }
 2277|  17.3k|  }
 2278|  17.3k|end:
 2279|  17.3k|  *resultp = result;
 2280|  17.3k|  return mresult;
 2281|  17.3k|}
multi.c:multi_do:
 1762|  17.3k|{
 1763|  17.3k|  CURLcode result = CURLE_OK;
 1764|  17.3k|  struct connectdata *conn = data->conn;
 1765|       |
 1766|  17.3k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1766:3): [True: 0, False: 17.3k]
  |  Branch (1766:3): [True: 17.3k, False: 0]
  ------------------
 1767|  17.3k|  DEBUGASSERT(conn->scheme);
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1767:3): [True: 0, False: 17.3k]
  |  Branch (1767:3): [True: 17.3k, False: 0]
  ------------------
 1768|       |
 1769|  17.3k|  if(conn->scheme->run->do_it)
  ------------------
  |  Branch (1769:6): [True: 17.3k, False: 0]
  ------------------
 1770|  17.3k|    result = conn->scheme->run->do_it(data, done);
 1771|       |
 1772|  17.3k|  return result;
 1773|  17.3k|}
multi.c:multi_follow:
 1951|  10.8k|{
 1952|  10.8k|  if(handler && handler->run->follow)
  ------------------
  |  Branch (1952:6): [True: 10.8k, False: 0]
  |  Branch (1952:17): [True: 10.8k, False: 0]
  ------------------
 1953|  10.8k|    return handler->run->follow(data, newurl, type);
 1954|       |
 1955|      0|  if(type == FOLLOW_RETRY)
  ------------------
  |  Branch (1955:6): [True: 0, False: 0]
  ------------------
 1956|       |    /* Retries are generic and do not require protocol-specific redirect
 1957|       |       handling. */
 1958|      0|    return CURLE_OK;
 1959|       |
 1960|      0|  return CURLE_TOO_MANY_REDIRECTS;
 1961|      0|}
multi.c:multistate_did:
 2632|  17.3k|{
 2633|  17.3k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2633:3): [True: 0, False: 17.3k]
  |  Branch (2633:3): [True: 17.3k, False: 0]
  ------------------
 2634|  17.3k|  if(data->conn->bits.multiplex)
  ------------------
  |  Branch (2634:6): [True: 0, False: 17.3k]
  ------------------
 2635|       |    /* Check if we can move pending requests to send pipe */
 2636|      0|    process_pending_handles(multi); /* multiplexed */
 2637|       |
 2638|       |  /* Only perform the transfer if there is a good socket to work with.
 2639|       |     Having both BAD is a signal to skip immediately to DONE */
 2640|  17.3k|  if(CONN_SOCK_IDX_VALID(data->conn->recv_idx) ||
  ------------------
  |  |  382|  34.6k|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 17.3k, False: 0]
  |  |  |  Branch (382:50): [True: 17.3k, False: 0]
  |  |  ------------------
  ------------------
 2641|      0|     CONN_SOCK_IDX_VALID(data->conn->send_idx))
  ------------------
  |  |  382|      0|#define CONN_SOCK_IDX_VALID(i)    (((i) >= 0) && ((i) < 2))
  |  |  ------------------
  |  |  |  Branch (382:36): [True: 0, False: 0]
  |  |  |  Branch (382:50): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2642|  17.3k|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  200|  17.3k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2643|      0|  else {
 2644|      0|#ifndef CURL_DISABLE_FTP
 2645|      0|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (2645:8): [True: 0, False: 0]
  ------------------
 2646|      0|       ((data->conn->scheme->flags & PROTOPT_WILDCARD) == 0)) {
  ------------------
  |  |  231|      0|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (2646:8): [True: 0, False: 0]
  ------------------
 2647|      0|      data->wildcard->state = CURLWC_DONE;
 2648|      0|    }
 2649|      0|#endif
 2650|      0|    multistate(data, MSTATE_DONE);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2651|      0|  }
 2652|  17.3k|  return CURLM_CALL_MULTI_PERFORM;
 2653|  17.3k|}
multi.c:multistate_ratelimiting:
 2285|     70|{
 2286|     70|  CURLcode result = CURLE_OK;
 2287|     70|  CURLMcode mresult = CURLM_OK;
 2288|     70|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|     70|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2288:3): [True: 0, False: 70]
  |  Branch (2288:3): [True: 70, False: 0]
  ------------------
 2289|       |  /* if both rates are within spec, resume transfer */
 2290|     70|  result = Curl_pgrsCheck(data);
 2291|       |
 2292|     70|  if(result) {
  ------------------
  |  Branch (2292:6): [True: 0, False: 70]
  ------------------
 2293|      0|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|      0|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2293:8): [True: 0, False: 0]
  ------------------
 2294|      0|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2294:8): [True: 0, False: 0]
  ------------------
 2295|      0|      streamclose(data->conn, "Transfer returned error");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2296|       |
 2297|      0|    multi_posttransfer(data);
 2298|      0|    multi_done(data, result, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2299|      0|  }
 2300|     70|  else {
 2301|     70|    if(!mspeed_check(data))
  ------------------
  |  Branch (2301:8): [True: 8, False: 62]
  ------------------
 2302|      8|      mresult = CURLM_CALL_MULTI_PERFORM;
 2303|     70|  }
 2304|     70|  *resultp = result;
 2305|     70|  return mresult;
 2306|     70|}
multi.c:mspeed_check:
 1964|   401k|{
 1965|   401k|  if(Curl_rlimit_active(&data->progress.dl.rlimit) ||
  ------------------
  |  Branch (1965:6): [True: 390k, False: 10.9k]
  ------------------
 1966|   390k|     Curl_rlimit_active(&data->progress.ul.rlimit)) {
  ------------------
  |  Branch (1966:6): [True: 238, False: 10.7k]
  ------------------
 1967|       |    /* check if our send/recv limits require idle waits */
 1968|   390k|    const struct curltime *pnow = Curl_pgrs_now(data);
 1969|   390k|    timediff_t recv_ms, send_ms;
 1970|       |
 1971|   390k|    send_ms = Curl_rlimit_wait_ms(&data->progress.ul.rlimit, pnow);
 1972|   390k|    recv_ms = Curl_rlimit_wait_ms(&data->progress.dl.rlimit, pnow);
 1973|       |
 1974|   390k|    if(send_ms || recv_ms) {
  ------------------
  |  Branch (1974:8): [True: 34, False: 390k]
  |  Branch (1974:19): [True: 84, False: 390k]
  ------------------
 1975|    118|      if(data->mstate != MSTATE_RATELIMITING) {
  ------------------
  |  Branch (1975:10): [True: 56, False: 62]
  ------------------
 1976|     56|        multistate(data, MSTATE_RATELIMITING);
  ------------------
  |  |  200|     56|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 1977|     56|      }
 1978|    118|      Curl_expire(data, CURLMAX(send_ms, recv_ms), EXPIRE_TOOFAST);
  ------------------
  |  | 1286|    118|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 34, False: 84]
  |  |  ------------------
  ------------------
 1979|    118|      Curl_multi_clear_dirty(data);
 1980|    118|      CURL_TRC_M(data, "[RLIMIT] waiting %" FMT_TIMEDIFF_T "ms",
  ------------------
  |  |  148|    118|  do {                                   \
  |  |  149|    118|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    118|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    118|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|    236|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 118, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 118]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|    236|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    118|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    118|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (150:28): [True: 0, False: 0]
  |  |  ------------------
  |  |  151|    118|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 118]
  |  |  ------------------
  ------------------
 1981|    118|                 CURLMAX(send_ms, recv_ms));
 1982|    118|      return CURLE_AGAIN;
 1983|    118|    }
 1984|   390k|    else {
 1985|       |      /* when will the rate limits increase next? The transfer needs
 1986|       |       * to run again at that time or it may stall. */
 1987|   390k|      send_ms = Curl_rlimit_next_step_ms(&data->progress.ul.rlimit, pnow);
 1988|   390k|      recv_ms = Curl_rlimit_next_step_ms(&data->progress.dl.rlimit, pnow);
 1989|   390k|      if(send_ms || recv_ms) {
  ------------------
  |  Branch (1989:10): [True: 347k, False: 42.6k]
  |  Branch (1989:21): [True: 42.6k, False: 0]
  ------------------
 1990|   390k|        timediff_t next_ms = CURLMIN(send_ms, recv_ms);
  ------------------
  |  | 1287|   390k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 45.0k, False: 345k]
  |  |  ------------------
  ------------------
 1991|   390k|        if(!next_ms)
  ------------------
  |  Branch (1991:12): [True: 42.8k, False: 347k]
  ------------------
 1992|  42.8k|          next_ms = CURLMAX(send_ms, recv_ms);
  ------------------
  |  | 1286|  42.8k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 204, False: 42.6k]
  |  |  ------------------
  ------------------
 1993|   390k|        Curl_expire(data, next_ms, EXPIRE_TOOFAST);
 1994|   390k|        CURL_TRC_M(data, "[RLIMIT] next token update in %" FMT_TIMEDIFF_T "ms",
  ------------------
  |  |  148|   390k|  do {                                   \
  |  |  149|   390k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|   390k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   390k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   780k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 390k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 390k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   780k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   390k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|   390k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|   390k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 390k]
  |  |  ------------------
  ------------------
 1995|   390k|                   next_ms);
 1996|   390k|      }
 1997|   390k|    }
 1998|   390k|  }
 1999|       |
 2000|   401k|  if(data->mstate != MSTATE_PERFORMING) {
  ------------------
  |  Branch (2000:6): [True: 8, False: 400k]
  ------------------
 2001|      8|    CURL_TRC_M(data, "[RLIMIT] wait over, continue");
  ------------------
  |  |  148|      8|  do {                                   \
  |  |  149|      8|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      8|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      8|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|     16|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 8]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|     16|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      8|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      8|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      8|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 8]
  |  |  ------------------
  ------------------
 2002|      8|    multistate(data, MSTATE_PERFORMING);
  ------------------
  |  |  200|      8|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2003|      8|  }
 2004|   401k|  return CURLE_OK;
 2005|   401k|}
multi.c:multistate_performing:
 2010|   209k|{
 2011|   209k|  char *newurl = NULL;
 2012|   209k|  bool retry = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
 2013|   209k|  CURLMcode mresult = CURLM_OK;
 2014|   209k|  CURLcode result = *resultp = CURLE_OK;
 2015|   209k|  *stream_errorp = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
 2016|       |
 2017|   209k|  if(mspeed_check(data) == CURLE_AGAIN)
  ------------------
  |  Branch (2017:6): [True: 12, False: 209k]
  ------------------
 2018|     12|    return CURLM_OK;
 2019|       |
 2020|       |  /* read/write data if it is ready to do so */
 2021|   209k|  result = Curl_sendrecv(data);
 2022|       |
 2023|   209k|  if(data->req.done || (result == CURLE_RECV_ERROR)) {
  ------------------
  |  Branch (2023:6): [True: 14.8k, False: 194k]
  |  Branch (2023:24): [True: 6, False: 194k]
  ------------------
 2024|       |    /* If CURLE_RECV_ERROR happens early enough, we assume it was a race
 2025|       |     * condition and the server closed the reused connection exactly when we
 2026|       |     * wanted to use it, so figure out if that is indeed the case.
 2027|       |     */
 2028|  14.8k|    CURLcode ret = Curl_retry_request(data, &newurl);
 2029|  14.8k|    if(!ret)
  ------------------
  |  Branch (2029:8): [True: 14.8k, False: 0]
  ------------------
 2030|  14.8k|      retry = !!newurl;
 2031|      0|    else if(!result)
  ------------------
  |  Branch (2031:13): [True: 0, False: 0]
  ------------------
 2032|      0|      result = ret;
 2033|       |
 2034|  14.8k|    if(retry) {
  ------------------
  |  Branch (2034:8): [True: 0, False: 14.8k]
  ------------------
 2035|       |      /* if we are to retry, set the result to OK and consider the
 2036|       |         request as done */
 2037|      0|      result = CURLE_OK;
 2038|      0|      data->req.done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2039|      0|    }
 2040|  14.8k|  }
 2041|   194k|#ifndef CURL_DISABLE_HTTP
 2042|   194k|  else if((result == CURLE_HTTP2_STREAM) &&
  ------------------
  |  Branch (2042:11): [True: 0, False: 194k]
  ------------------
 2043|      0|          Curl_h2_http_1_1_error(data)) {
  ------------------
  |  Branch (2043:11): [True: 0, False: 0]
  ------------------
 2044|      0|    CURLcode ret = Curl_retry_request(data, &newurl);
 2045|       |
 2046|      0|    if(!ret) {
  ------------------
  |  Branch (2046:8): [True: 0, False: 0]
  ------------------
 2047|      0|      infof(data, "Downgrades to HTTP/1.1");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2048|      0|      streamclose(data->conn, "Disconnect HTTP/2 for HTTP/1");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2049|      0|      data->state.http_neg.wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2050|      0|      data->state.http_neg.allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2051|       |      /* clear the error message bit too as we ignore the one we got */
 2052|      0|      data->state.errorbuf = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2053|      0|      if(!newurl)
  ------------------
  |  Branch (2053:10): [True: 0, False: 0]
  ------------------
 2054|       |        /* typically for HTTP_1_1_REQUIRED error on first flight */
 2055|      0|        newurl = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
 2056|      0|      if(!newurl) {
  ------------------
  |  Branch (2056:10): [True: 0, False: 0]
  ------------------
 2057|      0|        result = CURLE_OUT_OF_MEMORY;
 2058|      0|      }
 2059|      0|      else {
 2060|       |        /* if we are to retry, set the result to OK and consider the request
 2061|       |          as done */
 2062|      0|        retry = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2063|      0|        result = CURLE_OK;
 2064|      0|        data->req.done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2065|      0|      }
 2066|      0|    }
 2067|      0|    else
 2068|      0|      result = ret;
 2069|      0|  }
 2070|   209k|#endif
 2071|       |
 2072|   209k|  if(result) {
  ------------------
  |  Branch (2072:6): [True: 2.36k, False: 206k]
  ------------------
 2073|       |    /*
 2074|       |     * The transfer phase returned error, we mark the connection to get closed
 2075|       |     * to prevent being reused. This is because we cannot possibly know if the
 2076|       |     * connection is in a good shape or not now. Unless it is a protocol which
 2077|       |     * uses two "channels" like FTP, as then the error happened in the data
 2078|       |     * connection.
 2079|       |     */
 2080|       |
 2081|  2.36k|    if(!(data->conn->scheme->flags & PROTOPT_DUAL) &&
  ------------------
  |  |  208|  2.36k|#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
  ------------------
  |  Branch (2081:8): [True: 2.36k, False: 0]
  ------------------
 2082|  2.36k|       result != CURLE_HTTP2_STREAM)
  ------------------
  |  Branch (2082:8): [True: 2.36k, False: 0]
  ------------------
 2083|  2.36k|      streamclose(data->conn, "Transfer returned error");
  ------------------
  |  |  102|  2.36k|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|  2.36k|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2084|       |
 2085|  2.36k|    multi_posttransfer(data);
 2086|  2.36k|    multi_done(data, result, TRUE);
  ------------------
  |  | 1055|  2.36k|#define TRUE true
  ------------------
 2087|  2.36k|  }
 2088|   206k|  else if(data->req.done && !Curl_cwriter_is_paused(data)) {
  ------------------
  |  Branch (2088:11): [True: 14.8k, False: 191k]
  |  Branch (2088:29): [True: 14.8k, False: 0]
  ------------------
 2089|  14.8k|    const struct Curl_scheme *handler = data->conn->scheme;
 2090|       |
 2091|       |    /* call this even if the readwrite function returned error */
 2092|  14.8k|    multi_posttransfer(data);
 2093|       |
 2094|       |    /* When we follow redirects or is set to retry the connection, we must to
 2095|       |       go back to the CONNECT state */
 2096|  14.8k|    if(data->req.newurl || retry) {
  ------------------
  |  Branch (2096:8): [True: 10.7k, False: 4.10k]
  |  Branch (2096:28): [True: 0, False: 4.10k]
  ------------------
 2097|  10.7k|      followtype follow = FOLLOW_NONE;
 2098|  10.7k|      if(!retry) {
  ------------------
  |  Branch (2098:10): [True: 10.7k, False: 0]
  ------------------
 2099|       |        /* if the URL is a follow-location and not a retried request then
 2100|       |           figure out the URL here */
 2101|  10.7k|        curlx_free(newurl);
  ------------------
  |  | 1483|  10.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2102|  10.7k|        newurl = data->req.newurl;
 2103|  10.7k|        data->req.newurl = NULL;
 2104|  10.7k|        follow = FOLLOW_REDIR;
 2105|  10.7k|      }
 2106|      0|      else
 2107|      0|        follow = FOLLOW_RETRY;
 2108|  10.7k|      (void)multi_done(data, CURLE_OK, FALSE);
  ------------------
  |  | 1058|  10.7k|#define FALSE false
  ------------------
 2109|       |      /* multi_done() might return CURLE_GOT_NOTHING */
 2110|  10.7k|      result = multi_follow(data, handler, newurl, follow);
 2111|  10.7k|      if(!result) {
  ------------------
  |  Branch (2111:10): [True: 10.6k, False: 20]
  ------------------
 2112|  10.6k|        multistate(data, MSTATE_SETUP);
  ------------------
  |  |  200|  10.6k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2113|  10.6k|        mresult = CURLM_CALL_MULTI_PERFORM;
 2114|  10.6k|      }
 2115|  10.7k|    }
 2116|  4.10k|    else {
 2117|       |      /* after the transfer is done, go DONE */
 2118|       |
 2119|       |      /* but first check to see if we got a location info even though we are
 2120|       |         not following redirects */
 2121|  4.10k|      if(data->req.location) {
  ------------------
  |  Branch (2121:10): [True: 138, False: 3.96k]
  ------------------
 2122|    138|        curlx_free(newurl);
  ------------------
  |  | 1483|    138|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2123|    138|        newurl = data->req.location;
 2124|    138|        data->req.location = NULL;
 2125|    138|        result = multi_follow(data, handler, newurl, FOLLOW_FAKE);
 2126|    138|        if(result) {
  ------------------
  |  Branch (2126:12): [True: 0, False: 138]
  ------------------
 2127|      0|          *stream_errorp = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2128|      0|          result = multi_done(data, result, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2129|      0|        }
 2130|    138|      }
 2131|       |
 2132|  4.10k|      if(!result) {
  ------------------
  |  Branch (2132:10): [True: 4.10k, False: 0]
  ------------------
 2133|  4.10k|        multistate(data, MSTATE_DONE);
  ------------------
  |  |  200|  4.10k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2134|  4.10k|        mresult = CURLM_CALL_MULTI_PERFORM;
 2135|  4.10k|      }
 2136|  4.10k|    }
 2137|  14.8k|  }
 2138|   191k|  else { /* not errored, not done */
 2139|   191k|    mspeed_check(data);
 2140|   191k|  }
 2141|   209k|  curlx_free(newurl);
  ------------------
  |  | 1483|   209k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2142|   209k|  *resultp = result;
 2143|   209k|  return mresult;
 2144|   209k|}
multi.c:multistate_done:
 2656|  4.09k|{
 2657|  4.09k|  if(data->conn) {
  ------------------
  |  Branch (2657:6): [True: 4.09k, False: 0]
  ------------------
 2658|  4.09k|    CURLcode result;
 2659|       |
 2660|       |    /* post-transfer command */
 2661|  4.09k|    result = multi_done(data, *presult, FALSE);
  ------------------
  |  | 1058|  4.09k|#define FALSE false
  ------------------
 2662|       |
 2663|       |    /* allow a previously set error code take precedence */
 2664|  4.09k|    if(!(*presult))
  ------------------
  |  Branch (2664:8): [True: 4.09k, False: 0]
  ------------------
 2665|  4.09k|      *presult = result;
 2666|  4.09k|  }
 2667|       |
 2668|  4.09k|#ifndef CURL_DISABLE_FTP
 2669|  4.09k|  if(data->state.wildcardmatch) {
  ------------------
  |  Branch (2669:6): [True: 0, False: 4.09k]
  ------------------
 2670|      0|    if(data->wildcard->state != CURLWC_DONE) {
  ------------------
  |  Branch (2670:8): [True: 0, False: 0]
  ------------------
 2671|       |      /* if a wildcard is set and we are not ending -> lets start again
 2672|       |         with MSTATE_INIT */
 2673|      0|      multistate(data, MSTATE_INIT);
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2674|      0|      return CURLM_CALL_MULTI_PERFORM;
 2675|      0|    }
 2676|      0|  }
 2677|  4.09k|#endif
 2678|       |  /* after we have DONE what we are supposed to do, go COMPLETED, and
 2679|       |     it does not matter what the multi_done() returned! */
 2680|  4.09k|  multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  200|  4.09k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2681|  4.09k|  return CURLM_CALL_MULTI_PERFORM;
 2682|  4.09k|}
multi.c:is_finished:
 2358|  1.19M|{
 2359|  1.19M|  if(data->mstate < MSTATE_COMPLETED) {
  ------------------
  |  Branch (2359:6): [True: 1.19M, False: 4.09k]
  ------------------
 2360|  1.19M|    if(result) {
  ------------------
  |  Branch (2360:8): [True: 11.4k, False: 1.18M]
  ------------------
 2361|       |      /*
 2362|       |       * If an error was returned, and we are not in completed state now,
 2363|       |       * then we go to completed and consider this transfer aborted.
 2364|       |       */
 2365|       |
 2366|       |      /* No attempt to disconnect connections must be made before this -
 2367|       |         connection detach and termination happens only here */
 2368|       |
 2369|       |      /* Check if we can move pending requests to send pipe */
 2370|  11.4k|      process_pending_handles(multi); /* connection */
 2371|       |
 2372|  11.4k|      if(data->conn) {
  ------------------
  |  Branch (2372:10): [True: 0, False: 11.4k]
  ------------------
 2373|      0|        if(stream_error) {
  ------------------
  |  Branch (2373:12): [True: 0, False: 0]
  ------------------
 2374|       |          /* Do not attempt to send data over a connection that timed out */
 2375|      0|          bool dead_connection = result == CURLE_OPERATION_TIMEDOUT;
 2376|      0|          struct connectdata *conn = data->conn;
 2377|       |
 2378|       |          /* This is where we make sure that the conn pointer is reset.
 2379|       |             We do not have to do this in every case block above where a
 2380|       |             failure is detected */
 2381|      0|          Curl_detach_connection(data);
 2382|      0|          Curl_conn_terminate(data, conn, dead_connection);
 2383|      0|        }
 2384|      0|      }
 2385|  11.4k|      else if(data->mstate == MSTATE_CONNECT) {
  ------------------
  |  Branch (2385:15): [True: 1.72k, False: 9.76k]
  ------------------
 2386|       |        /* Curl_connect() failed */
 2387|  1.72k|        multi_posttransfer(data);
 2388|  1.72k|        Curl_pgrsUpdate_nometer(data);
 2389|  1.72k|      }
 2390|       |
 2391|  11.4k|      multistate(data, MSTATE_COMPLETED);
  ------------------
  |  |  200|  11.4k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2392|  11.4k|      return result;
 2393|  11.4k|    }
 2394|       |    /* if there is still a connection to use, call the progress function */
 2395|  1.18M|    else if(data->conn && Curl_conn_is_connected(data->conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|  1.13M|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2395:13): [True: 1.13M, False: 46.5k]
  |  Branch (2395:27): [True: 275k, False: 858k]
  ------------------
 2396|   275k|      result = Curl_pgrsUpdate(data);
 2397|   275k|      if(result) {
  ------------------
  |  Branch (2397:10): [True: 0, False: 275k]
  ------------------
 2398|       |        /* aborted due to progress callback return code must close the
 2399|       |           connection */
 2400|      0|        streamclose(data->conn, "Aborted by callback");
  ------------------
  |  |  102|      0|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      0|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 2401|       |
 2402|       |        /* if not yet in DONE state, go there, otherwise COMPLETED */
 2403|      0|        multistate(data, (data->mstate < MSTATE_DONE) ?
  ------------------
  |  |  200|      0|#define multistate(x, y) mstate(x, y, __LINE__)
  |  |  ------------------
  |  |  |  Branch (200:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2404|      0|                   MSTATE_DONE : MSTATE_COMPLETED);
 2405|      0|        return result;
 2406|      0|      }
 2407|   275k|    }
 2408|  1.19M|  }
 2409|  1.18M|  return result;
 2410|  1.19M|}
multi.c:handle_completed:
 2415|  15.5k|{
 2416|  15.5k|  if(data->master_mid != UINT32_MAX) {
  ------------------
  |  Branch (2416:6): [True: 528, False: 15.0k]
  ------------------
 2417|       |    /* A sub transfer, not for msgsent to application */
 2418|    528|    struct Curl_easy *mdata;
 2419|       |
 2420|    528|    CURL_TRC_M(data, "sub xfer done for master %u", data->master_mid);
  ------------------
  |  |  148|    528|  do {                                   \
  |  |  149|    528|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|    528|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|    528|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.05k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 528, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 528]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.05k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|    528|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|    528|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|    528|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 528]
  |  |  ------------------
  ------------------
 2421|    528|    mdata = Curl_multi_get_easy(multi, data->master_mid);
 2422|    528|    if(mdata) {
  ------------------
  |  Branch (2422:8): [True: 528, False: 0]
  ------------------
 2423|    528|      if(mdata->sub_xfer_done)
  ------------------
  |  Branch (2423:10): [True: 528, False: 0]
  ------------------
 2424|    528|        mdata->sub_xfer_done(mdata, data, result);
 2425|      0|      else
 2426|      0|        CURL_TRC_M(data, "master easy %u without sub_xfer_done callback.",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2427|    528|                   data->master_mid);
 2428|    528|    }
 2429|      0|    else {
 2430|      0|      CURL_TRC_M(data, "master easy %u already gone.", data->master_mid);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2431|      0|    }
 2432|    528|  }
 2433|  15.0k|  else {
 2434|       |    /* now fill in the Curl_message with this info */
 2435|  15.0k|    struct Curl_message *msg = &data->msg;
 2436|       |
 2437|  15.0k|    msg->extmsg.msg = CURLMSG_DONE;
 2438|  15.0k|    msg->extmsg.easy_handle = data;
 2439|  15.0k|    msg->extmsg.data.result = result;
 2440|       |
 2441|  15.0k|    multi_addmsg(multi, msg);
 2442|  15.0k|    DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  15.0k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2442:5): [True: 0, False: 15.0k]
  |  Branch (2442:5): [True: 15.0k, False: 0]
  ------------------
 2443|  15.0k|  }
 2444|  15.5k|  multistate(data, MSTATE_MSGSENT);
  ------------------
  |  |  200|  15.5k|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 2445|       |
 2446|       |  /* remove from the other sets, add to msgsent */
 2447|  15.5k|  Curl_uint32_bset_remove(&multi->process, data->mid);
 2448|  15.5k|  Curl_uint32_bset_remove(&multi->dirty, data->mid);
 2449|  15.5k|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 2450|  15.5k|  Curl_uint32_bset_add(&multi->msgsent, data->mid);
 2451|  15.5k|  --multi->xfers_alive;
 2452|  15.5k|  if(!multi->xfers_alive)
  ------------------
  |  Branch (2452:6): [True: 15.0k, False: 528]
  ------------------
 2453|  15.0k|    multi_assess_wakeup(multi);
 2454|  15.5k|}
multi.c:multi_addmsg:
  221|  15.0k|{
  222|  15.0k|  if(!Curl_llist_count(&multi->msglist))
  ------------------
  |  Branch (222:6): [True: 15.0k, False: 0]
  ------------------
  223|  15.0k|    CURLM_NTFY(multi->admin, CURLMNOTIFY_INFO_READ);
  ------------------
  |  |   51|  15.0k|  do {                                                \
  |  |   52|  15.0k|    if((d) && (d)->multi && (d)->multi->ntfy.ntfy_cb) \
  |  |  ------------------
  |  |  |  Branch (52:8): [True: 15.0k, False: 0]
  |  |  |  Branch (52:15): [True: 15.0k, False: 0]
  |  |  |  Branch (52:29): [True: 0, False: 15.0k]
  |  |  ------------------
  |  |   53|  15.0k|      Curl_mntfy_add((d), (t));                       \
  |  |   54|  15.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (54:11): [Folded, False: 15.0k]
  |  |  ------------------
  ------------------
  224|  15.0k|  Curl_llist_append(&multi->msglist, msg, &msg->list);
  225|  15.0k|}
multi.c:multi_ischanged:
 1709|  3.78M|{
 1710|  3.78M|  bool retval = FALSE;
  ------------------
  |  | 1058|  3.78M|#define FALSE false
  ------------------
 1711|  3.78M|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  3.78M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1711:3): [True: 0, False: 3.78M]
  |  Branch (1711:3): [True: 3.78M, False: 0]
  ------------------
 1712|  3.78M|  if(multi) {
  ------------------
  |  Branch (1712:6): [True: 3.78M, False: 0]
  ------------------
 1713|  3.78M|    retval = (bool)multi->recheckstate;
 1714|  3.78M|    if(clear)
  ------------------
  |  Branch (1714:8): [True: 1.89M, False: 1.89M]
  ------------------
 1715|  1.89M|      multi->recheckstate = FALSE;
  ------------------
  |  | 1058|  1.89M|#define FALSE false
  ------------------
 1716|  3.78M|  }
 1717|  3.78M|  return retval;
 1718|  3.78M|}
multi.c:add_next_timeout:
 3106|     20|{
 3107|     20|  struct curltime *tv = &d->state.expiretime;
 3108|     20|  struct Curl_llist *list = &d->state.timeoutlist;
 3109|     20|  struct Curl_llist_node *e;
 3110|       |
 3111|       |  /* move over the timeout list for this specific handle and remove all
 3112|       |     timeouts that are now passed tense and store the next pending
 3113|       |     timeout in *tv */
 3114|     26|  for(e = Curl_llist_head(list); e;) {
  ------------------
  |  Branch (3114:34): [True: 26, False: 0]
  ------------------
 3115|     26|    struct Curl_llist_node *n = Curl_node_next(e);
 3116|     26|    struct time_node *node = Curl_node_elem(e);
 3117|     26|    timediff_t diff = curlx_ptimediff_us(&node->time, pnow);
 3118|     26|    if(diff <= 0)
  ------------------
  |  Branch (3118:8): [True: 6, False: 20]
  ------------------
 3119|       |      /* remove outdated entry */
 3120|      6|      Curl_node_remove(e);
 3121|     20|    else
 3122|       |      /* the list is sorted so get out on the first mismatch */
 3123|     20|      break;
 3124|      6|    e = n;
 3125|      6|  }
 3126|     20|  e = Curl_llist_head(list);
 3127|     20|  if(!e) {
  ------------------
  |  Branch (3127:6): [True: 0, False: 20]
  ------------------
 3128|       |    /* clear the expire times within the handles that we remove from the
 3129|       |       splay tree */
 3130|      0|    tv->tv_sec = 0;
 3131|      0|    tv->tv_usec = 0;
 3132|      0|  }
 3133|     20|  else {
 3134|     20|    struct time_node *node = Curl_node_elem(e);
 3135|       |    /* copy the first entry to 'tv' */
 3136|     20|    memcpy(tv, &node->time, sizeof(*tv));
 3137|       |
 3138|       |    /* Insert this node again into the splay. Keep the timer in the list in
 3139|       |       case we need to recompute future timers. */
 3140|     20|    multi->timetree = Curl_splayinsert(tv, multi->timetree,
 3141|     20|                                       &d->state.timenode);
 3142|     20|  }
 3143|     20|  return CURLM_OK;
 3144|     20|}
multi.c:multi_handle_timeout:
 1803|  2.00M|{
 1804|  2.00M|  timediff_t timeout_ms;
 1805|       |
 1806|  2.00M|  timeout_ms = Curl_timeleft_ms(data);
 1807|  2.00M|  if(timeout_ms < 0) {
  ------------------
  |  Branch (1807:6): [True: 31, False: 2.00M]
  ------------------
 1808|       |    /* Handle timed out */
 1809|     31|    struct curltime since;
 1810|     31|    if(Curl_is_connecting(data))
  ------------------
  |  Branch (1810:8): [True: 26, False: 5]
  ------------------
 1811|     26|      since = data->progress.t_startsingle;
 1812|      5|    else
 1813|      5|      since = data->progress.t_startop;
 1814|     31|    if(data->mstate == MSTATE_CONNECTING)
  ------------------
  |  Branch (1814:8): [True: 26, False: 5]
  ------------------
 1815|     26|      failf(data, "%s timed out after %" FMT_TIMEDIFF_T " milliseconds",
  ------------------
  |  |   62|     26|#define failf Curl_failf
  ------------------
 1816|     26|            data->conn->bits.dns_resolved ? "Connection" : "Resolving",
  ------------------
  |  Branch (1816:13): [True: 13, False: 13]
  ------------------
 1817|     26|            curlx_ptimediff_ms(Curl_pgrs_now(data), &since));
 1818|      5|    else {
 1819|      5|      struct SingleRequest *k = &data->req;
 1820|      5|      if(k->size != -1) {
  ------------------
  |  Branch (1820:10): [True: 5, False: 0]
  ------------------
 1821|      5|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
 1822|      5|              " milliseconds with %" FMT_OFF_T " out of %"
 1823|      5|              FMT_OFF_T " bytes received",
 1824|      5|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1825|      5|              k->bytecount, k->size);
 1826|      5|      }
 1827|      0|      else {
 1828|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1829|      0|              " milliseconds with %" FMT_OFF_T " bytes received",
 1830|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data), &since),
 1831|      0|              k->bytecount);
 1832|      0|      }
 1833|      5|    }
 1834|     31|    *result = CURLE_OPERATION_TIMEDOUT;
 1835|     31|    if(data->conn) {
  ------------------
  |  Branch (1835:8): [True: 31, False: 0]
  ------------------
 1836|       |      /* Force connection closed if the connection has indeed been used */
 1837|     31|      if(data->mstate > MSTATE_DO) {
  ------------------
  |  Branch (1837:10): [True: 5, False: 26]
  ------------------
 1838|      5|        streamclose(data->conn, "Disconnect due to timeout");
  ------------------
  |  |  102|      5|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|      5|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
 1839|      5|        *stream_error = TRUE;
  ------------------
  |  | 1055|      5|#define TRUE true
  ------------------
 1840|      5|      }
 1841|     31|      (void)multi_done(data, *result, TRUE);
  ------------------
  |  | 1055|     31|#define TRUE true
  ------------------
 1842|     31|    }
 1843|     31|    return TRUE;
  ------------------
  |  | 1055|     31|#define TRUE true
  ------------------
 1844|     31|  }
 1845|       |
 1846|  2.00M|  return FALSE;
  ------------------
  |  | 1058|  2.00M|#define FALSE false
  ------------------
 1847|  2.00M|}
multi.c:move_pending_to_connect:
 3815|    238|{
 3816|    238|  DEBUGASSERT(data->mstate == MSTATE_PENDING);
  ------------------
  |  | 1081|    238|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3816:3): [True: 0, False: 238]
  |  Branch (3816:3): [True: 238, False: 0]
  ------------------
 3817|       |
 3818|       |  /* Remove this node from the pending set, add into process set */
 3819|    238|  Curl_uint32_bset_remove(&multi->pending, data->mid);
 3820|    238|  Curl_uint32_bset_add(&multi->process, data->mid);
 3821|       |
 3822|    238|  multistate(data, MSTATE_CONNECT);
  ------------------
  |  |  200|    238|#define multistate(x, y) mstate(x, y, __LINE__)
  ------------------
 3823|    238|  Curl_multi_mark_dirty(data); /* make it run */
 3824|    238|}
multi.c:multi_deltimeout:
 3623|   783k|{
 3624|   783k|  struct Curl_llist_node *e;
 3625|   783k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3626|       |  /* find and remove the specific node from the list */
 3627|  1.54M|  for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3627:41): [True: 1.52M, False: 24.9k]
  ------------------
 3628|  1.52M|    struct time_node *n = Curl_node_elem(e);
 3629|  1.52M|    if(n->eid == eid) {
  ------------------
  |  Branch (3629:8): [True: 758k, False: 762k]
  ------------------
 3630|   758k|      Curl_node_remove(e);
 3631|   758k|      return;
 3632|   758k|    }
 3633|  1.52M|  }
 3634|   783k|}
multi.c:multi_addtimeout:
 3646|   772k|{
 3647|   772k|  struct Curl_llist_node *e;
 3648|   772k|  struct time_node *node;
 3649|   772k|  struct Curl_llist_node *prev = NULL;
 3650|   772k|  size_t n;
 3651|   772k|  struct Curl_llist *timeoutlist = &data->state.timeoutlist;
 3652|       |
 3653|   772k|  node = &data->state.expires[eid];
 3654|       |
 3655|       |  /* copy the timestamp and id */
 3656|   772k|  memcpy(&node->time, stamp, sizeof(*stamp));
 3657|   772k|  node->eid = eid; /* also marks it as in use */
 3658|       |
 3659|   772k|  n = Curl_llist_count(timeoutlist);
 3660|   772k|  if(n) {
  ------------------
  |  Branch (3660:6): [True: 759k, False: 13.2k]
  ------------------
 3661|       |    /* find the correct spot in the list */
 3662|  1.51M|    for(e = Curl_llist_head(timeoutlist); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (3662:43): [True: 775k, False: 736k]
  ------------------
 3663|   775k|      struct time_node *check = Curl_node_elem(e);
 3664|   775k|      timediff_t diff = curlx_ptimediff_ms(&check->time, &node->time);
 3665|   775k|      if(diff > 0)
  ------------------
  |  Branch (3665:10): [True: 23.2k, False: 752k]
  ------------------
 3666|  23.2k|        break;
 3667|   752k|      prev = e;
 3668|   752k|    }
 3669|   759k|  }
 3670|       |  /* else
 3671|       |     this is the first timeout on the list */
 3672|       |
 3673|   772k|  Curl_llist_insert_next(timeoutlist, prev, node, &node->list);
 3674|   772k|  CURL_TRC_TIMER(data, eid, "set for %" FMT_TIMEDIFF_T "ns",
  ------------------
  |  |  173|   772k|  do {                                        \
  |  |  174|   772k|    if(CURL_TRC_TIMER_is_verbose(data))       \
  |  |  ------------------
  |  |  |  |  139|   772k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   772k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  1.54M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 772k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 772k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  1.54M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   772k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  175|   772k|      Curl_trc_timer(data, tid, __VA_ARGS__); \
  |  |  176|   772k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (176:11): [Folded, False: 772k]
  |  |  ------------------
  ------------------
 3675|   772k|                 curlx_ptimediff_us(&node->time, Curl_pgrs_now(data)));
 3676|   772k|  return CURLM_OK;
 3677|   772k|}
multi.c:process_pending_handles:
 3841|  80.9k|{
 3842|  80.9k|  uint32_t mid = multi->last_pending_mid;
 3843|       |
 3844|  80.9k|  if(mid) {
  ------------------
  |  Branch (3844:6): [True: 238, False: 80.7k]
  ------------------
 3845|    238|    while(Curl_uint32_bset_next(&multi->pending, mid, &mid)) {
  ------------------
  |  Branch (3845:11): [True: 0, False: 238]
  ------------------
 3846|      0|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3847|      0|      if(data) {
  ------------------
  |  Branch (3847:10): [True: 0, False: 0]
  ------------------
 3848|      0|        move_pending_to_connect(multi, data);
 3849|      0|        multi->last_pending_mid = mid;
 3850|      0|        return;
 3851|      0|      }
 3852|       |      /* transfer no longer known, should not happen */
 3853|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3854|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3854:7): [Folded, False: 0]
  |  Branch (3854:7): [Folded, False: 0]
  ------------------
 3855|      0|    }
 3856|       |    /* found no pending transfers with `mid` larger than `last_pending_mid`.
 3857|       |     * Start at the beginning of the pending set again. */
 3858|    238|    multi->last_pending_mid = 0;
 3859|    238|  }
 3860|       |
 3861|  80.9k|  if(Curl_uint32_bset_first(&multi->pending, &mid)) {
  ------------------
  |  Branch (3861:6): [True: 238, False: 80.7k]
  ------------------
 3862|    238|    do {
 3863|    238|      struct Curl_easy *data = Curl_multi_get_easy(multi, mid);
 3864|    238|      if(data) {
  ------------------
  |  Branch (3864:10): [True: 238, False: 0]
  ------------------
 3865|    238|        move_pending_to_connect(multi, data);
 3866|    238|        multi->last_pending_mid = mid;
 3867|    238|        return;
 3868|    238|      }
 3869|       |      /* transfer no longer known, should not happen */
 3870|      0|      Curl_uint32_bset_remove(&multi->pending, mid);
 3871|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3871:7): [Folded, False: 0]
  |  Branch (3871:7): [Folded, False: 0]
  ------------------
 3872|      0|    } while(Curl_uint32_bset_next(&multi->pending, mid, &mid));
  ------------------
  |  Branch (3872:13): [True: 0, False: 0]
  ------------------
 3873|    238|  }
 3874|  80.9k|}
multi.c:multi_xfer_bufs_free:
 4106|  15.3k|{
 4107|  15.3k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4107:3): [True: 0, False: 15.3k]
  |  Branch (4107:3): [True: 15.3k, False: 0]
  ------------------
 4108|  15.3k|  curlx_safefree(multi->xfer_buf);
  ------------------
  |  | 1327|  15.3k|  do {                      \
  |  | 1328|  15.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.3k|    (ptr) = NULL;           \
  |  | 1330|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 4109|  15.3k|  multi->xfer_buf_len = 0;
 4110|  15.3k|  multi->xfer_buf_borrowed = FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
 4111|  15.3k|  curlx_safefree(multi->xfer_ulbuf);
  ------------------
  |  | 1327|  15.3k|  do {                      \
  |  | 1328|  15.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.3k|    (ptr) = NULL;           \
  |  | 1330|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 4112|  15.3k|  multi->xfer_ulbuf_len = 0;
 4113|  15.3k|  multi->xfer_ulbuf_borrowed = FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
 4114|  15.3k|  curlx_safefree(multi->xfer_sockbuf);
  ------------------
  |  | 1327|  15.3k|  do {                      \
  |  | 1328|  15.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  15.3k|    (ptr) = NULL;           \
  |  | 1330|  15.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 15.3k]
  |  |  ------------------
  ------------------
 4115|  15.3k|  multi->xfer_sockbuf_len = 0;
 4116|       |  multi->xfer_sockbuf_borrowed = FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
 4117|  15.3k|}

Curl_multi_ev_socket_done:
  617|  10.2k|{
  618|  10.2k|  mev_forget_socket(multi, data, s, "socket done");
  619|  10.2k|}
Curl_multi_ev_xfer_done:
  623|  16.1k|{
  624|  16.1k|  DEBUGASSERT(!data->conn); /* transfer should have been detached */
  ------------------
  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (624:3): [True: 0, False: 16.1k]
  |  Branch (624:3): [True: 16.1k, False: 0]
  ------------------
  625|  16.1k|  (void)mev_assess(multi, data, NULL);
  626|  16.1k|  Curl_meta_remove(data, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  16.1k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  627|  16.1k|}
Curl_multi_ev_conn_done:
  632|  11.0k|{
  633|  11.0k|  (void)mev_assess(multi, data, conn);
  634|  11.0k|  Curl_conn_meta_remove(conn, CURL_META_MEV_POLLSET);
  ------------------
  |  |   34|  11.0k|#define CURL_META_MEV_POLLSET   "meta:mev:ps"
  ------------------
  635|  11.0k|}
Curl_multi_ev_init:
  638|  15.3k|{
  639|  15.3k|  Curl_hash_init(&multi->ev.sh_entries, hashsize, mev_sh_entry_hash,
  640|  15.3k|                 mev_sh_entry_compare, mev_sh_entry_dtor);
  641|  15.3k|}
Curl_multi_ev_cleanup:
  644|  15.3k|{
  645|  15.3k|  Curl_hash_destroy(&multi->ev.sh_entries);
  646|  15.3k|}
multi_ev.c:mev_assess:
  499|  27.1k|{
  500|  27.1k|  struct easy_pollset ps, *last_ps;
  501|  27.1k|  CURLMcode mresult = CURLM_OK;
  502|       |
  503|  27.1k|  if(!multi || !multi->socket_cb)
  ------------------
  |  Branch (503:6): [True: 0, False: 27.1k]
  |  Branch (503:16): [True: 27.1k, False: 0]
  ------------------
  504|  27.1k|    return CURLM_OK;
  505|       |
  506|      0|  Curl_pollset_init(&ps);
  507|      0|  if(conn) {
  ------------------
  |  Branch (507:6): [True: 0, False: 0]
  ------------------
  508|      0|    CURLcode result = Curl_conn_adjust_pollset(data, conn, &ps);
  509|      0|    if(result) {
  ------------------
  |  Branch (509:8): [True: 0, False: 0]
  ------------------
  510|      0|      mresult = (result == CURLE_OUT_OF_MEMORY) ?
  ------------------
  |  Branch (510:17): [True: 0, False: 0]
  ------------------
  511|      0|        CURLM_OUT_OF_MEMORY : CURLM_INTERNAL_ERROR;
  512|      0|      goto out;
  513|      0|    }
  514|      0|  }
  515|      0|  else
  516|      0|    Curl_multi_pollset(data, &ps);
  517|      0|  last_ps = mev_get_last_pollset(data, conn);
  518|       |
  519|      0|  if(!last_ps && ps.n) {
  ------------------
  |  Branch (519:6): [True: 0, False: 0]
  |  Branch (519:18): [True: 0, False: 0]
  ------------------
  520|      0|    if(conn)
  ------------------
  |  Branch (520:8): [True: 0, False: 0]
  ------------------
  521|      0|      last_ps = mev_add_new_conn_pollset(conn);
  522|      0|    else
  523|      0|      last_ps = mev_add_new_xfer_pollset(data);
  524|      0|    if(!last_ps) {
  ------------------
  |  Branch (524:8): [True: 0, False: 0]
  ------------------
  525|      0|      mresult = CURLM_OUT_OF_MEMORY;
  526|      0|      goto out;
  527|      0|    }
  528|      0|  }
  529|       |
  530|      0|  if(last_ps)
  ------------------
  |  Branch (530:6): [True: 0, False: 0]
  ------------------
  531|      0|    mresult = mev_pollset_diff(multi, data, conn, &ps, last_ps);
  532|      0|  else
  533|      0|    DEBUGASSERT(!ps.n);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (533:5): [True: 0, False: 0]
  |  Branch (533:5): [True: 0, False: 0]
  ------------------
  534|      0|out:
  535|      0|  Curl_pollset_cleanup(&ps);
  536|      0|  return mresult;
  537|      0|}
multi_ev.c:mev_sh_entry_get:
   94|  10.2k|{
   95|  10.2k|  if(s != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|  10.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (95:6): [True: 10.2k, False: 0]
  ------------------
   96|       |    /* only look for proper sockets */
   97|  10.2k|    return Curl_hash_pick(sh, (char *)&s, sizeof(curl_socket_t));
   98|  10.2k|  }
   99|      0|  return NULL;
  100|  10.2k|}
multi_ev.c:mev_forget_socket:
  201|  10.2k|{
  202|  10.2k|  struct mev_sh_entry *entry = mev_sh_entry_get(&multi->ev.sh_entries, s);
  203|  10.2k|  int rc = 0;
  204|       |
  205|  10.2k|  if(!entry) /* we never knew or already forgot about this socket */
  ------------------
  |  Branch (205:6): [True: 10.2k, False: 0]
  ------------------
  206|  10.2k|    return CURLM_OK;
  207|       |
  208|       |  /* We managed this socket before, tell the socket callback to forget it. */
  209|      0|  if(entry->announced && multi->socket_cb) {
  ------------------
  |  Branch (209:6): [True: 0, False: 0]
  |  Branch (209:26): [True: 0, False: 0]
  ------------------
  210|      0|    NOVERBOSE((void)cause);
  ------------------
  |  | 1619|      0|#define NOVERBOSE(x) Curl_nop_stmt
  |  |  ------------------
  |  |  |  | 1180|      0|#define Curl_nop_stmt do {} while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1180:35): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|      0|    CURL_TRC_M(data, "ev %s, call(fd=%" FMT_SOCKET_T ", ev=REMOVE)", cause, s);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  212|      0|    mev_in_callback(multi, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  213|      0|    rc = multi->socket_cb(data, s, CURL_POLL_REMOVE,
  ------------------
  |  |  286|      0|#define CURL_POLL_REMOVE 4
  ------------------
  214|      0|                          multi->socket_userp, entry->user_data);
  215|      0|    mev_in_callback(multi, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  216|      0|    entry->announced = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  217|      0|  }
  218|       |
  219|      0|  mev_sh_entry_kill(multi, s);
  220|      0|  if(rc == -1) {
  ------------------
  |  Branch (220:6): [True: 0, False: 0]
  ------------------
  221|      0|    multi->dead = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  222|      0|    return CURLM_ABORTED_BY_CALLBACK;
  223|      0|  }
  224|      0|  return CURLM_OK;
  225|      0|}

Curl_mntfy_init:
  125|  15.3k|{
  126|  15.3k|  memset(&multi->ntfy, 0, sizeof(multi->ntfy));
  127|  15.3k|  Curl_uint32_bset_init(&multi->ntfy.enabled);
  128|  15.3k|}
Curl_mntfy_resize:
  131|  15.3k|{
  132|  15.3k|  if(Curl_uint32_bset_resize(&multi->ntfy.enabled, CURLMNOTIFY_EASY_DONE + 1))
  ------------------
  |  |  540|  15.3k|#define CURLMNOTIFY_EASY_DONE    1
  ------------------
  |  Branch (132:6): [True: 0, False: 15.3k]
  ------------------
  133|      0|    return CURLM_OUT_OF_MEMORY;
  134|  15.3k|  return CURLM_OK;
  135|  15.3k|}
Curl_mntfy_cleanup:
  138|  15.3k|{
  139|  15.3k|  while(multi->ntfy.head) {
  ------------------
  |  Branch (139:9): [True: 0, False: 15.3k]
  ------------------
  140|      0|    struct mntfy_chunk *chunk = multi->ntfy.head;
  141|      0|    multi->ntfy.head = chunk->next;
  142|      0|    mnfty_chunk_destroy(chunk);
  143|      0|  }
  144|       |  multi->ntfy.tail = NULL;
  145|  15.3k|  Curl_uint32_bset_destroy(&multi->ntfy.enabled);
  146|  15.3k|}

Curl_netrc_scan:
  572|  1.43k|{
  573|  1.43k|  NETRCcode retcode = NETRC_OK;
  574|  1.43k|  char *filealloc = NULL;
  575|       |
  576|  1.43k|  CURL_TRC_M(data, "[NETRC] scanning '%s' for host '%s' user '%s'",
  ------------------
  |  |  148|  1.43k|  do {                                   \
  |  |  149|  1.43k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  1.43k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  1.43k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  2.87k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 1.43k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.43k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  2.87k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  1.43k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  1.43k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  1.43k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 1.43k]
  |  |  ------------------
  ------------------
  577|  1.43k|             netrcfile, hostname, user);
  578|  1.43k|  Curl_creds_unlink(pcreds);
  579|  1.43k|  if(!netrcfile) {
  ------------------
  |  Branch (579:6): [True: 0, False: 1.43k]
  ------------------
  580|      0|    char *home = NULL;
  581|      0|    char *homea = NULL;
  582|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  583|      0|    char pwbuf[1024];
  584|      0|#endif
  585|      0|    filealloc = curl_getenv("NETRC");
  586|      0|    if(!filealloc) {
  ------------------
  |  Branch (586:8): [True: 0, False: 0]
  ------------------
  587|      0|      homea = curl_getenv("HOME"); /* portable environment reader */
  588|      0|      if(homea) {
  ------------------
  |  Branch (588:10): [True: 0, False: 0]
  ------------------
  589|      0|        home = homea;
  590|      0|#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
  591|      0|      }
  592|      0|      else {
  593|      0|        struct passwd pw, *pw_res;
  594|      0|        if(!getpwuid_r(geteuid(), &pw, pwbuf, sizeof(pwbuf), &pw_res) &&
  ------------------
  |  Branch (594:12): [True: 0, False: 0]
  ------------------
  595|      0|           pw_res) {
  ------------------
  |  Branch (595:12): [True: 0, False: 0]
  ------------------
  596|      0|          home = pw.pw_dir;
  597|      0|        }
  598|       |#elif defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
  599|       |      }
  600|       |      else {
  601|       |        struct passwd *pw;
  602|       |        pw = getpwuid(geteuid());
  603|       |        if(pw) {
  604|       |          home = pw->pw_dir;
  605|       |        }
  606|       |#elif defined(_WIN32)
  607|       |      }
  608|       |      else {
  609|       |        homea = curl_getenv("USERPROFILE");
  610|       |        if(homea) {
  611|       |          home = homea;
  612|       |        }
  613|       |#endif
  614|      0|      }
  615|       |
  616|      0|      if(!home)
  ------------------
  |  Branch (616:10): [True: 0, False: 0]
  ------------------
  617|      0|        return NETRC_FILE_MISSING; /* no home directory found (or possibly out
  618|       |                                      of memory) */
  619|       |
  620|      0|      filealloc = curl_maprintf("%s%s.netrc", home, DIR_CHAR);
  ------------------
  |  |  679|      0|#  define DIR_CHAR      "/"
  ------------------
  621|      0|      if(!filealloc) {
  ------------------
  |  Branch (621:10): [True: 0, False: 0]
  ------------------
  622|      0|        curlx_free(homea);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  623|      0|        retcode = NETRC_OUT_OF_MEMORY;
  624|      0|        goto out;
  625|      0|      }
  626|      0|    }
  627|      0|    retcode = netrc_scan_file(
  628|      0|      data, store, hostname, user, filealloc, pcreds);
  629|      0|    curlx_free(filealloc);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  630|       |#ifdef _WIN32
  631|       |    if(retcode == NETRC_FILE_MISSING) {
  632|       |      /* fallback to the old-style "_netrc" file */
  633|       |      filealloc = curl_maprintf("%s%s_netrc", home, DIR_CHAR);
  634|       |      if(!filealloc) {
  635|       |        curlx_free(homea);
  636|       |        return NETRC_OUT_OF_MEMORY;
  637|       |      }
  638|       |      retcode = netrc_scan_file(
  639|       |        data, store, hostname, user, filealloc, pcreds);
  640|       |      curlx_free(filealloc);
  641|       |    }
  642|       |#endif
  643|      0|    curlx_free(homea);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  644|      0|  }
  645|  1.43k|  else
  646|  1.43k|    retcode = netrc_scan_file(
  647|  1.43k|      data, store, hostname, user, netrcfile, pcreds);
  648|       |
  649|  1.43k|out:
  650|  1.43k|  if(retcode)
  ------------------
  |  Branch (650:6): [True: 1.43k, False: 0]
  ------------------
  651|  1.43k|    Curl_creds_unlink(pcreds);
  652|  1.43k|  return retcode;
  653|  1.43k|}
Curl_netrc_init:
  656|  33.2k|{
  657|  33.2k|  curlx_dyn_init(&store->filebuf, MAX_NETRC_FILE);
  ------------------
  |  |   77|  33.2k|#define MAX_NETRC_FILE  (128 * 1024)
  ------------------
  658|       |  store->loaded = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  659|  33.2k|}
Curl_netrc_cleanup:
  661|  54.5k|{
  662|  54.5k|  curlx_dyn_free(&store->filebuf);
  663|       |  store->loaded = FALSE;
  ------------------
  |  | 1058|  54.5k|#define FALSE false
  ------------------
  664|  54.5k|}
netrc.c:netrc_scan_file:
  545|  1.43k|{
  546|  1.43k|  struct dynbuf *filebuf = &store->filebuf;
  547|       |
  548|  1.43k|  if(!store->loaded) {
  ------------------
  |  Branch (548:6): [True: 1.43k, False: 0]
  ------------------
  549|  1.43k|    NETRCcode ret = file2memory(netrcfile, filebuf);
  550|  1.43k|    if(ret) {
  ------------------
  |  Branch (550:8): [True: 0, False: 1.43k]
  ------------------
  551|      0|      CURL_TRC_M(data, "[NETRC] could not load '%s'", netrcfile);
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  552|      0|      return ret;
  553|      0|    }
  554|  1.43k|    store->loaded = TRUE;
  ------------------
  |  | 1055|  1.43k|#define TRUE true
  ------------------
  555|  1.43k|  }
  556|       |
  557|  1.43k|  return netrc_scan(data, curlx_dyn_ptr(filebuf), hostname, user, pcreds);
  558|  1.43k|}
netrc.c:file2memory:
  502|  1.43k|{
  503|  1.43k|  NETRCcode ret = NETRC_FILE_MISSING; /* if it cannot open the file */
  504|  1.43k|  FILE *file = curlx_fopen(filename, FOPEN_READTEXT);
  ------------------
  |  |   74|  1.43k|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
  505|       |
  506|  1.43k|  if(file) {
  ------------------
  |  Branch (506:6): [True: 1.43k, False: 0]
  ------------------
  507|  1.43k|    curlx_struct_stat stat;
  ------------------
  |  |   63|  1.43k|#define curlx_struct_stat       struct stat
  ------------------
  508|  1.43k|    if((curlx_fstat(fileno(file), &stat) == -1) || !S_ISDIR(stat.st_mode)) {
  ------------------
  |  |   62|  1.43k|#define curlx_fstat             fstat
  ------------------
  |  Branch (508:8): [True: 0, False: 1.43k]
  |  Branch (508:52): [True: 1.43k, False: 0]
  ------------------
  509|  1.43k|      CURLcode result = CURLE_OK;
  510|  1.43k|      bool eof;
  511|  1.43k|      struct dynbuf linebuf;
  512|  1.43k|      curlx_dyn_init(&linebuf, MAX_NETRC_LINE);
  ------------------
  |  |   76|  1.43k|#define MAX_NETRC_LINE  16384
  ------------------
  513|  1.43k|      ret = NETRC_OK;
  514|  1.43k|      do {
  515|  1.43k|        const char *line;
  516|       |        /* Curl_get_line always returns lines ending with a newline */
  517|  1.43k|        result = Curl_get_line(&linebuf, file, &eof);
  518|  1.43k|        if(!result) {
  ------------------
  |  Branch (518:12): [True: 1.43k, False: 0]
  ------------------
  519|  1.43k|          line = curlx_dyn_ptr(&linebuf);
  520|       |          /* skip comments on load */
  521|  1.43k|          curlx_str_passblanks(&line);
  522|  1.43k|          if(*line == '#')
  ------------------
  |  Branch (522:14): [True: 0, False: 1.43k]
  ------------------
  523|      0|            continue;
  524|  1.43k|          result = curlx_dyn_add(filebuf, line);
  525|  1.43k|        }
  526|  1.43k|        if(result) {
  ------------------
  |  Branch (526:12): [True: 0, False: 1.43k]
  ------------------
  527|      0|          curlx_dyn_free(filebuf);
  528|      0|          ret = curl2netrc(result);
  ------------------
  |  |   84|      0|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 0]
  |  |  |  Branch (84:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   85|      0|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  529|      0|          break;
  530|      0|        }
  531|  1.43k|      } while(!eof);
  ------------------
  |  Branch (531:15): [True: 0, False: 1.43k]
  ------------------
  532|  1.43k|      curlx_dyn_free(&linebuf);
  533|  1.43k|    }
  534|  1.43k|    curlx_fclose(file);
  ------------------
  |  |   79|  1.43k|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
  535|  1.43k|  }
  536|  1.43k|  return ret;
  537|  1.43k|}
netrc.c:netrc_scan:
  426|  1.43k|{
  427|  1.43k|  struct netrc_scanner sc;
  428|  1.43k|  NETRCcode rc = NETRC_OK;
  429|       |
  430|  1.43k|  Curl_creds_unlink(pcreds);
  431|  1.43k|  netrc_scan_init(&sc, data, content, hostname, user);
  432|       |
  433|  1.43k|  while(!rc && !sc.found) {
  ------------------
  |  Branch (433:9): [True: 1.43k, False: 0]
  |  Branch (433:16): [True: 1.43k, False: 0]
  ------------------
  434|  1.43k|    rc = netrc_lexer_next(&sc.lexer, FALSE);
  ------------------
  |  | 1058|  1.43k|#define FALSE false
  ------------------
  435|  1.43k|    if(!rc) {
  ------------------
  |  Branch (435:8): [True: 1.43k, False: 0]
  ------------------
  436|       |      /* Does this token end any previous entry? */
  437|  1.43k|      switch(sc.lexer.token) {
  438|  1.43k|      case NETRC_TOK_EOF:
  ------------------
  |  Branch (438:7): [True: 1.43k, False: 0]
  ------------------
  439|  1.43k|      case NETRC_TOK_MACHINE:
  ------------------
  |  Branch (439:7): [True: 0, False: 1.43k]
  ------------------
  440|  1.43k|      case NETRC_TOK_DEFAULT:
  ------------------
  |  Branch (440:7): [True: 0, False: 1.43k]
  ------------------
  441|  1.43k|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (441:7): [True: 0, False: 1.43k]
  ------------------
  442|  1.43k|        rc = netrc_scan_end_entry(&sc);
  443|  1.43k|        if(rc || sc.found)
  ------------------
  |  Branch (443:12): [True: 0, False: 1.43k]
  |  Branch (443:18): [True: 0, False: 1.43k]
  ------------------
  444|      0|          goto out;
  445|  1.43k|        break;
  446|  1.43k|      default:
  ------------------
  |  Branch (446:7): [True: 0, False: 1.43k]
  ------------------
  447|      0|        break;
  448|  1.43k|      }
  449|       |
  450|  1.43k|      switch(sc.lexer.token) {
  451|  1.43k|      case NETRC_TOK_EOF:
  ------------------
  |  Branch (451:7): [True: 1.43k, False: 0]
  ------------------
  452|  1.43k|        goto out;
  453|      0|      case NETRC_TOK_MACHINE:
  ------------------
  |  Branch (453:7): [True: 0, False: 1.43k]
  ------------------
  454|      0|        rc = netrc_lexer_next(&sc.lexer, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  455|      0|        if(!rc) {
  ------------------
  |  Branch (455:12): [True: 0, False: 0]
  ------------------
  456|      0|          if(sc.lexer.token == NETRC_TOK_LITERAL) {
  ------------------
  |  Branch (456:14): [True: 0, False: 0]
  ------------------
  457|      0|            sc.matches_host = curl_strequal(
  458|      0|              sc.hostname, curlx_dyn_ptr(&sc.lexer.literal));
  459|      0|          }
  460|      0|          else {
  461|      0|            sc.matches_host = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  462|      0|            netrc_lexer_push(&sc.lexer);
  463|      0|          }
  464|      0|        }
  465|      0|        break;
  466|      0|      case NETRC_TOK_DEFAULT:
  ------------------
  |  Branch (466:7): [True: 0, False: 1.43k]
  ------------------
  467|      0|        sc.matches_host = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  468|      0|        break;
  469|      0|      case NETRC_TOK_ACCOUNT:
  ------------------
  |  Branch (469:7): [True: 0, False: 1.43k]
  ------------------
  470|      0|        rc = netrc_scan_literal(&sc, NULL); /* ignore, not used */
  471|      0|        break;
  472|      0|      case NETRC_TOK_LOGIN:
  ------------------
  |  Branch (472:7): [True: 0, False: 1.43k]
  ------------------
  473|      0|        rc = netrc_scan_literal(&sc, &sc.login);
  474|      0|        break;
  475|      0|      case NETRC_TOK_PASSWD:
  ------------------
  |  Branch (475:7): [True: 0, False: 1.43k]
  ------------------
  476|      0|        rc = netrc_scan_literal(&sc, &sc.passwd);
  477|      0|        break;
  478|      0|      case NETRC_TOK_MACDEF:
  ------------------
  |  Branch (478:7): [True: 0, False: 1.43k]
  ------------------
  479|      0|        netrc_skip_to_empty_line(&sc.lexer);
  480|      0|        break;
  481|      0|      case NETRC_TOK_LITERAL:
  ------------------
  |  Branch (481:7): [True: 0, False: 1.43k]
  ------------------
  482|      0|      case NETRC_TOK_JUNK:
  ------------------
  |  Branch (482:7): [True: 0, False: 1.43k]
  ------------------
  483|      0|      default:
  ------------------
  |  Branch (483:7): [True: 0, False: 1.43k]
  ------------------
  484|       |        /* skip this */
  485|      0|        break;
  486|  1.43k|      }
  487|  1.43k|    }
  488|  1.43k|  }
  489|       |
  490|  1.43k|out:
  491|  1.43k|  if(!rc) {
  ------------------
  |  Branch (491:6): [True: 1.43k, False: 0]
  ------------------
  492|  1.43k|    if(sc.creds)
  ------------------
  |  Branch (492:8): [True: 0, False: 1.43k]
  ------------------
  493|      0|      Curl_creds_link(pcreds, sc.creds);
  494|  1.43k|    else
  495|  1.43k|      rc = NETRC_NO_MATCH;
  496|  1.43k|  }
  497|  1.43k|  netrc_scan_cleanup(&sc);
  498|  1.43k|  return rc;
  499|  1.43k|}
netrc.c:netrc_scan_init:
  343|  1.43k|{
  344|  1.43k|  memset(sc, 0, sizeof(*sc));
  345|  1.43k|  netrc_lexer_init(&sc->lexer, data, content);
  346|  1.43k|  sc->hostname = hostname;
  347|  1.43k|  sc->user = (user && user[0]) ? user : NULL;
  ------------------
  |  Branch (347:15): [True: 1.43k, False: 0]
  |  Branch (347:23): [True: 23, False: 1.41k]
  ------------------
  348|  1.43k|  netrc_scan_reset(sc);
  349|  1.43k|}
netrc.c:netrc_lexer_init:
  139|  1.43k|{
  140|  1.43k|  curlx_dyn_init(&lexer->literal, MAX_NETRC_TOKEN);
  ------------------
  |  |   78|  1.43k|#define MAX_NETRC_TOKEN 4096
  ------------------
  141|  1.43k|  lexer->data = data;
  142|  1.43k|  lexer->content = lexer->pos = content;
  143|  1.43k|}
netrc.c:netrc_scan_reset:
  332|  4.30k|{
  333|  4.30k|  curlx_safefree(sc->login);
  ------------------
  |  | 1327|  4.30k|  do {                      \
  |  | 1328|  4.30k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.30k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.30k|    (ptr) = NULL;           \
  |  | 1330|  4.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.30k]
  |  |  ------------------
  ------------------
  334|  4.30k|  curlx_safefree(sc->passwd);
  ------------------
  |  | 1327|  4.30k|  do {                      \
  |  | 1328|  4.30k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.30k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.30k|    (ptr) = NULL;           \
  |  | 1330|  4.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.30k]
  |  |  ------------------
  ------------------
  335|       |  sc->matches_host = FALSE;
  ------------------
  |  | 1058|  4.30k|#define FALSE false
  ------------------
  336|  4.30k|}
netrc.c:netrc_lexer_next:
  248|  1.43k|{
  249|  1.43k|  const char *s = lexer->pos, *start;
  250|  1.43k|  NETRCcode rc = NETRC_OK;
  251|  1.43k|  size_t slen;
  252|  1.43k|  CURLcode result;
  253|       |
  254|  1.43k|  if(lexer->pushed) {
  ------------------
  |  Branch (254:6): [True: 0, False: 1.43k]
  ------------------
  255|      0|    lexer->pushed = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  256|      0|    goto out;
  257|      0|  }
  258|       |
  259|  1.43k|  curlx_dyn_reset(&lexer->literal);
  260|  1.43k|  netrc_skip_blanks(lexer);
  261|  1.43k|  s = lexer->pos;
  262|       |
  263|  1.43k|  switch(*s) {
  264|  1.43k|  case 0:
  ------------------
  |  Branch (264:3): [True: 1.43k, False: 0]
  ------------------
  265|  1.43k|    lexer->token = NETRC_TOK_EOF;
  266|  1.43k|    break;
  267|      0|  case '\"':
  ------------------
  |  Branch (267:3): [True: 0, False: 1.43k]
  ------------------
  268|      0|    rc = netrc_lexer_quoted(lexer);
  269|      0|    lexer->token = NETRC_TOK_LITERAL;
  270|      0|    s = lexer->pos;
  271|      0|    break;
  272|      0|  default:
  ------------------
  |  Branch (272:3): [True: 0, False: 1.43k]
  ------------------
  273|       |    /* unquoted token */
  274|      0|    start = s;
  275|      0|    while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  while(*s && !ISBLANK(*s) && !ISNEWLINE(*s))
  ------------------
  |  |   50|      0|#define ISNEWLINE(x)    (((x) == '\n') || (x) == '\r')
  |  |  ------------------
  |  |  |  Branch (50:26): [True: 0, False: 0]
  |  |  |  Branch (50:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (275:11): [True: 0, False: 0]
  ------------------
  276|      0|      ++s;
  277|      0|    slen = s - start;
  278|      0|    if(!slen) {
  ------------------
  |  Branch (278:8): [True: 0, False: 0]
  ------------------
  279|      0|      rc = NETRC_SYNTAX_ERROR;
  280|      0|    }
  281|      0|    if(want_literal) {
  ------------------
  |  Branch (281:8): [True: 0, False: 0]
  ------------------
  282|      0|      lexer->token = NETRC_TOK_LITERAL;
  283|      0|      result = curlx_dyn_addn(&lexer->literal, start, slen);
  284|      0|      rc = curl2netrc(result);
  ------------------
  |  |   84|      0|  ((!(r)) ? NETRC_OK : (((r) == CURLE_OUT_OF_MEMORY) ? \
  |  |  ------------------
  |  |  |  Branch (84:4): [True: 0, False: 0]
  |  |  |  Branch (84:25): [True: 0, False: 0]
  |  |  ------------------
  |  |   85|      0|   NETRC_OUT_OF_MEMORY : NETRC_SYNTAX_ERROR))
  ------------------
  285|      0|    }
  286|      0|    else if((slen == 7) && curl_strnequal(start, "machine", slen)) {
  ------------------
  |  Branch (286:13): [True: 0, False: 0]
  |  Branch (286:28): [True: 0, False: 0]
  ------------------
  287|      0|      lexer->token = NETRC_TOK_MACHINE;
  288|      0|    }
  289|      0|    else if((slen == 7) && curl_strnequal(start, "default", slen)) {
  ------------------
  |  Branch (289:13): [True: 0, False: 0]
  |  Branch (289:28): [True: 0, False: 0]
  ------------------
  290|      0|      lexer->token = NETRC_TOK_DEFAULT;
  291|      0|    }
  292|      0|    else if((slen == 7) && curl_strnequal(start, "account", slen)) {
  ------------------
  |  Branch (292:13): [True: 0, False: 0]
  |  Branch (292:28): [True: 0, False: 0]
  ------------------
  293|      0|      lexer->token = NETRC_TOK_ACCOUNT;
  294|      0|    }
  295|      0|    else if((slen == 5) && curl_strnequal(start, "login", slen)) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  |  Branch (295:28): [True: 0, False: 0]
  ------------------
  296|      0|      lexer->token = NETRC_TOK_LOGIN;
  297|      0|    }
  298|      0|    else if((slen == 8) && curl_strnequal(start, "password", slen)) {
  ------------------
  |  Branch (298:13): [True: 0, False: 0]
  |  Branch (298:28): [True: 0, False: 0]
  ------------------
  299|      0|      lexer->token = NETRC_TOK_PASSWD;
  300|      0|    }
  301|      0|    else if((slen == 6) && curl_strnequal(start, "macdef", slen)) {
  ------------------
  |  Branch (301:13): [True: 0, False: 0]
  |  Branch (301:28): [True: 0, False: 0]
  ------------------
  302|      0|      lexer->token = NETRC_TOK_MACDEF;
  303|      0|    }
  304|      0|    else {
  305|      0|      lexer->token = NETRC_TOK_JUNK;
  306|      0|    }
  307|      0|    break;
  308|  1.43k|  }
  309|       |
  310|  1.43k|out:
  311|       |#if NETRC_DEBUG
  312|       |  CURL_TRC_M(lexer->data, "[NETRC] token %s '%s', rc=%d",
  313|       |             netrc_tokenstr(lexer->token),
  314|       |             curlx_dyn_ptr(&lexer->literal), rc);
  315|       |#endif
  316|  1.43k|  lexer->pos = s;
  317|  1.43k|  return rc;
  318|  1.43k|}
netrc.c:netrc_skip_blanks:
  153|  1.43k|{
  154|  1.43k|  const char *s = lexer->pos;
  155|  2.87k|  while(*s) {
  ------------------
  |  Branch (155:9): [True: 1.43k, False: 1.43k]
  ------------------
  156|  1.43k|    curlx_str_passblanks(&s);
  157|  1.43k|    while(*s == '\r')
  ------------------
  |  Branch (157:11): [True: 0, False: 1.43k]
  ------------------
  158|      0|      ++s;
  159|  1.43k|    if(*s == '\n') {
  ------------------
  |  Branch (159:8): [True: 1.43k, False: 0]
  ------------------
  160|  1.43k|      ++s;
  161|  1.43k|    }
  162|      0|    else
  163|      0|      break;
  164|  1.43k|  }
  165|  1.43k|  lexer->pos = s;
  166|  1.43k|}
netrc.c:netrc_scan_end_entry:
  380|  1.43k|{
  381|  1.43k|  NETRCcode rc = NETRC_OK;
  382|       |#if NETRC_DEBUG
  383|       |  CURL_TRC_M(sc->lexer.data,
  384|       |             "[NETRC] entry matches_host=%d, login='%s', passwd='%s'",
  385|       |             sc->matches_host, sc->login, sc->passwd);
  386|       |#endif
  387|  1.43k|  if(sc->matches_host) {
  ------------------
  |  Branch (387:6): [True: 0, False: 1.43k]
  ------------------
  388|      0|    if(sc->login) {
  ------------------
  |  Branch (388:8): [True: 0, False: 0]
  ------------------
  389|      0|      if(sc->user) {
  ------------------
  |  Branch (389:10): [True: 0, False: 0]
  ------------------
  390|      0|        if(Curl_timestrcmp(sc->user, sc->login))
  ------------------
  |  Branch (390:12): [True: 0, False: 0]
  ------------------
  391|      0|          goto out;
  392|       |        /* We look for a specific user,
  393|       |         * entry is only interesting with password */
  394|      0|        sc->found = !!sc->passwd;
  395|      0|      }
  396|      0|      else {
  397|      0|        sc->found = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  398|      0|      }
  399|      0|    }
  400|      0|    else if(sc->passwd) {
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|       |      /* found a passwd that applies to any user */
  402|      0|      sc->found = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  403|      0|    }
  404|      0|    else {
  405|       |      /* entry has nothing interesting */
  406|      0|    }
  407|      0|    if(sc->found) {
  ------------------
  |  Branch (407:8): [True: 0, False: 0]
  ------------------
  408|       |#if NETRC_DEBUG
  409|       |      CURL_TRC_M(sc->lexer.data, "[NETRC] entry match found");
  410|       |#endif
  411|      0|      if(Curl_creds_create(sc->user ? sc->user : sc->login, sc->passwd,
  ------------------
  |  Branch (411:10): [True: 0, False: 0]
  |  Branch (411:28): [True: 0, False: 0]
  ------------------
  412|      0|                           NULL, NULL, NULL, CREDS_NETRC, &sc->creds))
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
  413|      0|        rc = NETRC_OUT_OF_MEMORY;
  414|      0|    }
  415|      0|  }
  416|  1.43k|out:
  417|  1.43k|  netrc_scan_reset(sc);
  418|  1.43k|  return rc;
  419|  1.43k|}
netrc.c:netrc_scan_cleanup:
  352|  1.43k|{
  353|  1.43k|  netrc_scan_reset(sc);
  354|  1.43k|  sc->hostname = NULL;
  355|       |  sc->user = NULL;
  356|  1.43k|  Curl_creds_unlink(&sc->creds);
  357|  1.43k|  netrc_lexer_cleanup(&sc->lexer);
  358|  1.43k|}
netrc.c:netrc_lexer_cleanup:
  146|  1.43k|{
  147|  1.43k|  lexer->content = lexer->pos = NULL;
  148|       |  lexer->data = NULL;
  149|  1.43k|  curlx_dyn_free(&lexer->literal);
  150|  1.43k|}

cidr4_match:
   52|  1.31k|{
   53|  1.31k|  unsigned int address = 0;
   54|  1.31k|  unsigned int check = 0;
   55|       |
   56|  1.31k|  if(bits > 32)
  ------------------
  |  Branch (56:6): [True: 87, False: 1.22k]
  ------------------
   57|       |    /* strange input */
   58|     87|    return FALSE;
  ------------------
  |  | 1058|     87|#define FALSE false
  ------------------
   59|       |
   60|  1.22k|  if(curlx_inet_pton(AF_INET, ipv4, &address) != 1)
  ------------------
  |  |   43|  1.22k|  inet_pton(x, y, z)
  ------------------
  |  Branch (60:6): [True: 0, False: 1.22k]
  ------------------
   61|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
   62|  1.22k|  if(curlx_inet_pton(AF_INET, network, &check) != 1)
  ------------------
  |  |   43|  1.22k|  inet_pton(x, y, z)
  ------------------
  |  Branch (62:6): [True: 1.04k, False: 181]
  ------------------
   63|  1.04k|    return FALSE;
  ------------------
  |  | 1058|  1.04k|#define FALSE false
  ------------------
   64|       |
   65|    181|  if(bits && (bits != 32)) {
  ------------------
  |  Branch (65:6): [True: 111, False: 70]
  |  Branch (65:14): [True: 37, False: 74]
  ------------------
   66|     37|    unsigned int mask = 0xffffffff << (32 - bits);
   67|     37|    unsigned int haddr = htonl(address);
   68|     37|    unsigned int hcheck = htonl(check);
   69|       |#if 0
   70|       |    curl_mfprintf(stderr, "Host %s (%x) network %s (%x) "
   71|       |                  "bits %u mask %x => %x\n",
   72|       |                  ipv4, haddr, network, hcheck, bits, mask,
   73|       |                  (haddr ^ hcheck) & mask);
   74|       |#endif
   75|     37|    if((haddr ^ hcheck) & mask)
  ------------------
  |  Branch (75:8): [True: 21, False: 16]
  ------------------
   76|     21|      return FALSE;
  ------------------
  |  | 1058|     21|#define FALSE false
  ------------------
   77|     16|    return TRUE;
  ------------------
  |  | 1055|     16|#define TRUE true
  ------------------
   78|     37|  }
   79|    144|  return address == check;
   80|    181|}
cidr6_match:
   87|    253|{
   88|    253|#ifdef USE_IPV6
   89|    253|  unsigned int bytes;
   90|    253|  unsigned int rest;
   91|    253|  unsigned char address[16];
   92|    253|  unsigned char check[16];
   93|       |
   94|    253|  if(!bits)
  ------------------
  |  Branch (94:6): [True: 224, False: 29]
  ------------------
   95|    224|    bits = 128;
   96|       |
   97|    253|  bytes = bits / 8;
   98|    253|  rest = bits & 0x07;
   99|    253|  if((bytes > 16) || ((bytes == 16) && rest))
  ------------------
  |  Branch (99:6): [True: 0, False: 253]
  |  Branch (99:23): [True: 224, False: 29]
  |  Branch (99:40): [True: 0, False: 224]
  ------------------
  100|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  101|    253|  if(curlx_inet_pton(AF_INET6, ipv6, address) != 1)
  ------------------
  |  |   43|    253|  inet_pton(x, y, z)
  ------------------
  |  Branch (101:6): [True: 0, False: 253]
  ------------------
  102|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  103|    253|  if(curlx_inet_pton(AF_INET6, network, check) != 1)
  ------------------
  |  |   43|    253|  inet_pton(x, y, z)
  ------------------
  |  Branch (103:6): [True: 185, False: 68]
  ------------------
  104|    185|    return FALSE;
  ------------------
  |  | 1058|    185|#define FALSE false
  ------------------
  105|     68|  if(bytes && memcmp(address, check, bytes))
  ------------------
  |  Branch (105:6): [True: 58, False: 10]
  |  Branch (105:15): [True: 45, False: 13]
  ------------------
  106|     45|    return FALSE;
  ------------------
  |  | 1058|     45|#define FALSE false
  ------------------
  107|     23|  if(rest && ((address[bytes] ^ check[bytes]) & (0xff << (8 - rest))))
  ------------------
  |  Branch (107:6): [True: 18, False: 5]
  |  Branch (107:14): [True: 17, False: 1]
  ------------------
  108|     17|    return FALSE;
  ------------------
  |  | 1058|     17|#define FALSE false
  ------------------
  109|       |
  110|      6|  return TRUE;
  ------------------
  |  | 1055|      6|#define TRUE true
  ------------------
  111|       |#else
  112|       |  (void)ipv6;
  113|       |  (void)network;
  114|       |  (void)bits;
  115|       |  return FALSE;
  116|       |#endif
  117|     23|}
Curl_check_noproxy:
  190|  17.5k|{
  191|       |  /*
  192|       |   * If we do not have a hostname at all, like for example with a FILE
  193|       |   * transfer, we have nothing to interrogate the noproxy list with.
  194|       |   */
  195|  17.5k|  if(!name || name[0] == '\0')
  ------------------
  |  Branch (195:6): [True: 0, False: 17.5k]
  |  Branch (195:15): [True: 0, False: 17.5k]
  ------------------
  196|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  197|       |
  198|       |  /* no_proxy=domain1.dom,host.domain2.dom
  199|       |   *   (a comma-separated list of hosts which should
  200|       |   *   not be proxied, or an asterisk to override
  201|       |   *   all proxy variables)
  202|       |   */
  203|  17.5k|  if(no_proxy && no_proxy[0]) {
  ------------------
  |  Branch (203:6): [True: 963, False: 16.5k]
  |  Branch (203:18): [True: 724, False: 239]
  ------------------
  204|    724|    const char *p = no_proxy;
  205|    724|    size_t namelen;
  206|    724|    char address[16];
  207|    724|    enum nametype type = TYPE_HOST;
  208|    724|    if(!strcmp("*", no_proxy))
  ------------------
  |  Branch (208:8): [True: 13, False: 711]
  ------------------
  209|     13|      return TRUE;
  ------------------
  |  | 1055|     13|#define TRUE true
  ------------------
  210|       |
  211|       |    /* NO_PROXY was specified and it was not only an asterisk */
  212|       |
  213|       |    /* Check if name is an IP address; if not, assume it being a hostname. */
  214|    711|    namelen = strlen(name);
  215|    711|    if(curlx_inet_pton(AF_INET, name, &address) == 1)
  ------------------
  |  |   43|    711|  inet_pton(x, y, z)
  ------------------
  |  Branch (215:8): [True: 398, False: 313]
  ------------------
  216|    398|      type = TYPE_IPV4;
  217|    313|#ifdef USE_IPV6
  218|    313|    else if(curlx_inet_pton(AF_INET6, name, &address) == 1)
  ------------------
  |  |   43|    313|  inet_pton(x, y, z)
  ------------------
  |  Branch (218:13): [True: 33, False: 280]
  ------------------
  219|     33|      type = TYPE_IPV6;
  220|    280|#endif
  221|    280|    else {
  222|       |      /* ignore trailing dots in the hostname */
  223|    280|      if(name[namelen - 1] == '.')
  ------------------
  |  Branch (223:10): [True: 90, False: 190]
  ------------------
  224|     90|        namelen--;
  225|    280|    }
  226|       |
  227|  3.29k|    while(*p) {
  ------------------
  |  Branch (227:11): [True: 3.19k, False: 101]
  ------------------
  228|  3.19k|      const char *token;
  229|  3.19k|      size_t tokenlen = 0;
  230|       |
  231|       |      /* pass blanks */
  232|  3.19k|      curlx_str_passblanks(&p);
  233|       |
  234|  3.19k|      token = p;
  235|       |      /* pass over the pattern */
  236|  22.7k|      while(*p && !ISBLANK(*p) && (*p != ',')) {
  ------------------
  |  |   45|  45.0k|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 155, False: 22.1k]
  |  |  |  Branch (45:38): [True: 68, False: 22.0k]
  |  |  ------------------
  ------------------
  |  Branch (236:13): [True: 22.2k, False: 518]
  |  Branch (236:35): [True: 19.6k, False: 2.45k]
  ------------------
  237|  19.6k|        p++;
  238|  19.6k|        tokenlen++;
  239|  19.6k|      }
  240|       |
  241|  3.19k|      if(tokenlen) {
  ------------------
  |  Branch (241:10): [True: 3.08k, False: 112]
  ------------------
  242|  3.08k|        bool match = FALSE;
  ------------------
  |  | 1058|  3.08k|#define FALSE false
  ------------------
  243|  3.08k|        if(type == TYPE_HOST)
  ------------------
  |  Branch (243:12): [True: 1.28k, False: 1.79k]
  ------------------
  244|  1.28k|          match = match_host(token, tokenlen, name, namelen);
  245|  1.79k|        else
  246|  1.79k|          match = match_ip(type, token, tokenlen, name);
  247|       |
  248|  3.08k|        if(match)
  ------------------
  |  Branch (248:12): [True: 28, False: 3.05k]
  ------------------
  249|     28|          return TRUE;
  ------------------
  |  | 1055|     28|#define TRUE true
  ------------------
  250|  3.08k|      }
  251|       |
  252|       |      /* pass blanks after pattern */
  253|  3.16k|      curlx_str_passblanks(&p);
  254|       |      /* if not a comma, this ends the loop */
  255|  3.16k|      if(*p != ',')
  ------------------
  |  Branch (255:10): [True: 582, False: 2.58k]
  ------------------
  256|    582|        break;
  257|       |      /* pass any number of commas */
  258|  5.76k|      while(*p == ',')
  ------------------
  |  Branch (258:13): [True: 3.18k, False: 2.58k]
  ------------------
  259|  3.18k|        p++;
  260|  2.58k|    } /* while(*p) */
  261|    711|  } /* NO_PROXY was specified and it was not only an asterisk */
  262|       |
  263|  17.5k|  return FALSE;
  ------------------
  |  | 1058|  17.5k|#define FALSE false
  ------------------
  264|  17.5k|}
noproxy.c:match_host:
  127|  1.28k|{
  128|  1.28k|  bool match = FALSE;
  ------------------
  |  | 1058|  1.28k|#define FALSE false
  ------------------
  129|       |
  130|       |  /* ignore trailing dots in the token to check */
  131|  1.28k|  if(token[tokenlen - 1] == '.')
  ------------------
  |  Branch (131:6): [True: 170, False: 1.11k]
  ------------------
  132|    170|    tokenlen--;
  133|       |
  134|  1.28k|  if(tokenlen && (*token == '.')) {
  ------------------
  |  Branch (134:6): [True: 1.18k, False: 100]
  |  Branch (134:18): [True: 126, False: 1.06k]
  ------------------
  135|       |    /* ignore leading token dot as well */
  136|    126|    token++;
  137|    126|    tokenlen--;
  138|    126|  }
  139|       |  /* A: example.com matches 'example.com'
  140|       |     B: www.example.com matches 'example.com'
  141|       |     C: nonexample.com DOES NOT match 'example.com'
  142|       |  */
  143|  1.28k|  if(tokenlen == namelen)
  ------------------
  |  Branch (143:6): [True: 188, False: 1.09k]
  ------------------
  144|       |    /* case A, exact match */
  145|    188|    match = curl_strnequal(token, name, namelen);
  146|  1.09k|  else if(tokenlen < namelen) {
  ------------------
  |  Branch (146:11): [True: 554, False: 544]
  ------------------
  147|       |    /* case B, tailmatch domain */
  148|    554|    match = (name[namelen - tokenlen - 1] == '.') &&
  ------------------
  |  Branch (148:13): [True: 98, False: 456]
  ------------------
  149|     98|            curl_strnequal(token, name + (namelen - tokenlen), tokenlen);
  ------------------
  |  Branch (149:13): [True: 0, False: 98]
  ------------------
  150|    554|  }
  151|       |  /* case C passes through, not a match */
  152|  1.28k|  return match;
  153|  1.28k|}
noproxy.c:match_ip:
  157|  1.79k|{
  158|  1.79k|  char *slash;
  159|  1.79k|  unsigned int bits = 0;
  160|  1.79k|  char checkip[128];
  161|  1.79k|  if(tokenlen >= sizeof(checkip))
  ------------------
  |  Branch (161:6): [True: 10, False: 1.78k]
  ------------------
  162|       |    /* this cannot match */
  163|     10|    return FALSE;
  ------------------
  |  | 1058|     10|#define FALSE false
  ------------------
  164|       |  /* copy the check name to a temp buffer */
  165|  1.78k|  memcpy(checkip, token, tokenlen);
  166|  1.78k|  checkip[tokenlen] = 0;
  167|       |
  168|  1.78k|  slash = strchr(checkip, '/');
  169|       |  /* if the slash is part of this token, use it */
  170|  1.78k|  if(slash) {
  ------------------
  |  Branch (170:6): [True: 471, False: 1.31k]
  ------------------
  171|    471|    curl_off_t value;
  172|    471|    const char *p = &slash[1];
  173|    471|    if(curlx_str_number(&p, &value, 128) || *p)
  ------------------
  |  Branch (173:8): [True: 143, False: 328]
  |  Branch (173:45): [True: 76, False: 252]
  ------------------
  174|    219|      return FALSE;
  ------------------
  |  | 1058|    219|#define FALSE false
  ------------------
  175|       |    /* a too large value is rejected in the cidr function below */
  176|    252|    bits = (unsigned int)value;
  177|    252|    *slash = 0; /* null-terminate there */
  178|    252|  }
  179|  1.56k|  if(type == TYPE_IPV6)
  ------------------
  |  Branch (179:6): [True: 253, False: 1.31k]
  ------------------
  180|    253|    return cidr6_match(name, checkip, bits);
  181|  1.31k|  else
  182|  1.31k|    return cidr4_match(name, checkip, bits);
  183|  1.56k|}

Curl_getdate_capped:
  606|  25.0k|{
  607|  25.0k|  int rc = parsedate(p, tp);
  608|  25.0k|  return (rc == PARSEDATE_FAIL);
  ------------------
  |  |   97|  25.0k|#define PARSEDATE_FAIL   (-1)
  ------------------
  609|  25.0k|}
parsedate.c:parsedate:
  543|  25.0k|{
  544|  25.0k|  curl_off_t seconds = 0;
  545|  25.0k|  enum assume dignext = DATE_MDAY;
  546|  25.0k|  const char *indate = date; /* save the original pointer */
  547|  25.0k|  int part = 0; /* max 6 parts */
  548|  25.0k|  int rc = 0;
  549|  25.0k|  struct when w;
  550|  25.0k|  initwhen(&w);
  551|       |
  552|  85.6k|  while(*date && (part < 6)) {
  ------------------
  |  Branch (552:9): [True: 76.9k, False: 8.74k]
  |  Branch (552:18): [True: 76.8k, False: 79]
  ------------------
  553|  76.8k|    skip(&date);
  554|       |
  555|  76.8k|    if(ISALPHA(*date))
  ------------------
  |  |   38|  76.8k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   153k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 10.2k, False: 66.5k]
  |  |  |  |  |  Branch (43:38): [True: 10.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  66.5k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 19.6k, False: 46.8k]
  |  |  |  |  |  Branch (42:38): [True: 19.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|  29.9k|      rc = datestring(&date, &w);
  557|  46.8k|    else if(ISDIGIT(*date))
  ------------------
  |  |   44|  46.8k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 40.7k, False: 6.13k]
  |  |  |  Branch (44:38): [True: 40.7k, False: 0]
  |  |  ------------------
  ------------------
  558|  40.7k|      rc = datenum(indate, &date, &w, &dignext);
  559|  76.8k|    if(rc)
  ------------------
  |  Branch (559:8): [True: 16.2k, False: 60.6k]
  ------------------
  560|  16.2k|      return rc;
  561|       |
  562|  60.6k|    part++;
  563|  60.6k|  }
  564|       |
  565|  8.82k|  rc = datecheck(&w);
  566|  8.82k|  if(rc)
  ------------------
  |  Branch (566:6): [True: 5.23k, False: 3.58k]
  ------------------
  567|  5.23k|    return rc;
  568|       |
  569|  3.58k|  seconds = time2epoch(&w); /* get number of seconds */
  570|  3.58k|  tzadjust(&seconds, &w); /* handle the time zone offset */
  571|  3.58k|  rc = mktimet(seconds, output); /* squeeze seconds into a time_t */
  572|       |
  573|  3.58k|  return rc;
  574|  8.82k|}
parsedate.c:initwhen:
  360|  25.0k|{
  361|  25.0k|  w->wday = w->mon = w->mday = w->hour = w->min = w->sec = w->year = w->tzoff =
  362|  25.0k|    -1;
  363|  25.0k|}
parsedate.c:skip:
  256|  76.8k|{
  257|       |  /* skip everything that are not letters or digits */
  258|   196k|  while(**date && !ISALNUM(**date))
  ------------------
  |  |   41|   190k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|   380k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 93.5k, False: 96.8k]
  |  |  |  |  |  Branch (44:38): [True: 40.7k, False: 52.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   340k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 18.9k, False: 130k]
  |  |  |  |  |  Branch (43:38): [True: 10.2k, False: 8.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|   139k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 30.7k, False: 108k]
  |  |  |  |  |  Branch (42:38): [True: 19.6k, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (258:9): [True: 190k, False: 6.13k]
  ------------------
  259|   119k|    (*date)++;
  260|  76.8k|}
parsedate.c:datestring:
  366|  29.9k|{
  367|       |  /* a name coming up */
  368|  29.9k|  size_t len = 0;
  369|  29.9k|  const char *p = *datep;
  370|  29.9k|  bool found = FALSE;
  ------------------
  |  | 1058|  29.9k|#define FALSE false
  ------------------
  371|   105k|  while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |   38|   210k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   210k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 49.4k, False: 56.0k]
  |  |  |  |  |  Branch (43:38): [True: 48.3k, False: 1.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  57.1k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 29.0k, False: 28.0k]
  |  |  |  |  |  Branch (42:38): [True: 27.2k, False: 1.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                while(ISALPHA(*p) && (len < NAME_LEN)) {
  ------------------
  |  |  357|  75.6k|#define NAME_LEN 12
  ------------------
  |  Branch (371:24): [True: 75.5k, False: 65]
  ------------------
  372|  75.5k|    p++;
  373|  75.5k|    len++;
  374|  75.5k|  }
  375|       |
  376|  29.9k|  if(len != NAME_LEN) {
  ------------------
  |  |  357|  29.9k|#define NAME_LEN 12
  ------------------
  |  Branch (376:6): [True: 29.8k, False: 99]
  ------------------
  377|  29.8k|    if(w->wday == -1) {
  ------------------
  |  Branch (377:8): [True: 25.5k, False: 4.30k]
  ------------------
  378|  25.5k|      w->wday = checkday(*datep, len);
  379|  25.5k|      if(w->wday != -1)
  ------------------
  |  Branch (379:10): [True: 3.40k, False: 22.1k]
  ------------------
  380|  3.40k|        found = TRUE;
  ------------------
  |  | 1055|  3.40k|#define TRUE true
  ------------------
  381|  25.5k|    }
  382|  29.8k|    if(!found && (w->mon == -1)) {
  ------------------
  |  Branch (382:8): [True: 26.4k, False: 3.40k]
  |  Branch (382:18): [True: 21.7k, False: 4.72k]
  ------------------
  383|  21.7k|      w->mon = checkmonth(*datep, len);
  384|  21.7k|      if(w->mon != -1)
  ------------------
  |  Branch (384:10): [True: 9.70k, False: 12.0k]
  ------------------
  385|  9.70k|        found = TRUE;
  ------------------
  |  | 1055|  9.70k|#define TRUE true
  ------------------
  386|  21.7k|    }
  387|       |
  388|  29.8k|    if(!found && (w->tzoff == -1)) {
  ------------------
  |  Branch (388:8): [True: 16.7k, False: 13.1k]
  |  Branch (388:18): [True: 14.5k, False: 2.23k]
  ------------------
  389|       |      /* this must be a time zone string */
  390|  14.5k|      w->tzoff = checktz(*datep, len);
  391|  14.5k|      if(w->tzoff != -1)
  ------------------
  |  Branch (391:10): [True: 4.28k, False: 10.2k]
  ------------------
  392|  4.28k|        found = TRUE;
  ------------------
  |  | 1055|  4.28k|#define TRUE true
  ------------------
  393|  14.5k|    }
  394|  29.8k|  }
  395|  29.9k|  if(!found)
  ------------------
  |  Branch (395:6): [True: 12.5k, False: 17.3k]
  ------------------
  396|  12.5k|    return PARSEDATE_FAIL; /* bad string */
  ------------------
  |  |   97|  12.5k|#define PARSEDATE_FAIL   (-1)
  ------------------
  397|       |
  398|  17.3k|  *datep += len;
  399|  17.3k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  17.3k|#define PARSEDATE_OK     0
  ------------------
  400|  29.9k|}
parsedate.c:checkday:
  199|  25.5k|{
  200|  25.5k|  int i;
  201|  25.5k|  const char * const *what;
  202|  25.5k|  if(len > 3)
  ------------------
  |  Branch (202:6): [True: 2.73k, False: 22.8k]
  ------------------
  203|  2.73k|    what = &weekday[0];
  204|  22.8k|  else if(len == 3)
  ------------------
  |  Branch (204:11): [True: 13.6k, False: 9.12k]
  ------------------
  205|  13.6k|    what = &Curl_wkday[0];
  206|  9.12k|  else
  207|  9.12k|    return -1; /* too short */
  208|   120k|  for(i = 0; i < 7; i++) {
  ------------------
  |  Branch (208:14): [True: 107k, False: 13.0k]
  ------------------
  209|   107k|    size_t ilen = strlen(what[0]);
  210|   107k|    if((ilen == len) &&
  ------------------
  |  Branch (210:8): [True: 90.2k, False: 16.8k]
  ------------------
  211|  90.2k|       curl_strnequal(check, what[0], len))
  ------------------
  |  Branch (211:8): [True: 3.40k, False: 86.8k]
  ------------------
  212|  3.40k|      return i;
  213|   103k|    what++;
  214|   103k|  }
  215|  13.0k|  return -1;
  216|  16.4k|}
parsedate.c:checkmonth:
  219|  21.7k|{
  220|  21.7k|  int i;
  221|  21.7k|  const char * const *what = &Curl_month[0];
  222|  21.7k|  if(len != 3)
  ------------------
  |  Branch (222:6): [True: 10.6k, False: 11.0k]
  ------------------
  223|  10.6k|    return -1; /* not a month */
  224|       |
  225|   103k|  for(i = 0; i < 12; i++) {
  ------------------
  |  Branch (225:14): [True: 102k, False: 1.39k]
  ------------------
  226|   102k|    if(curl_strnequal(check, what[0], 3))
  ------------------
  |  Branch (226:8): [True: 9.70k, False: 92.5k]
  ------------------
  227|  9.70k|      return i;
  228|  92.5k|    what++;
  229|  92.5k|  }
  230|  1.39k|  return -1; /* return the offset or -1, no real offset is -1 */
  231|  11.0k|}
parsedate.c:checktz:
  243|  14.5k|{
  244|  14.5k|  if(len <= 4) {
  ------------------
  |  Branch (244:6): [True: 12.1k, False: 2.30k]
  ------------------
  245|  12.1k|    const struct tzinfo *what;
  246|  12.1k|    struct tzinfo find;
  247|  12.1k|    curlx_strcopy(find.name, sizeof(find.name), check, len);
  248|  12.1k|    what = bsearch(&find, tz, CURL_ARRAYSIZE(tz), sizeof(tz[0]), tzcompare);
  ------------------
  |  | 1294|  12.1k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  249|  12.1k|    if(what)
  ------------------
  |  Branch (249:8): [True: 4.28k, False: 7.91k]
  ------------------
  250|  4.28k|      return what->offset * 60;
  251|  12.1k|  }
  252|  10.2k|  return -1;
  253|  14.5k|}
parsedate.c:tzcompare:
  234|  69.9k|{
  235|  69.9k|  const struct tzinfo *tz1 = m1;
  236|  69.9k|  const struct tzinfo *tz2 = m2;
  237|  69.9k|  return strcmp(tz1->name, tz2->name);
  238|  69.9k|}
parsedate.c:datenum:
  404|  40.7k|{
  405|       |  /* a digit */
  406|  40.7k|  unsigned int val;
  407|  40.7k|  char *end;
  408|  40.7k|  const char *date = *datep;
  409|  40.7k|  enum assume dignext = *dignextp;
  410|       |
  411|  40.7k|  if((w->sec == -1) && match_time(date, w, &end)) {
  ------------------
  |  Branch (411:6): [True: 37.6k, False: 3.13k]
  |  Branch (411:24): [True: 5.94k, False: 31.6k]
  ------------------
  412|       |    /* time stamp */
  413|  5.94k|    date = end;
  414|  5.94k|  }
  415|  34.7k|  else {
  416|  34.7k|    bool found = FALSE;
  ------------------
  |  | 1058|  34.7k|#define FALSE false
  ------------------
  417|  34.7k|    curl_off_t lval;
  418|  34.7k|    int num_digits = 0;
  419|  34.7k|    const char *p = *datep;
  420|  34.7k|    if(curlx_str_number(&p, &lval, 99999999))
  ------------------
  |  Branch (420:8): [True: 265, False: 34.5k]
  ------------------
  421|    265|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|    265|#define PARSEDATE_FAIL   (-1)
  ------------------
  422|       |
  423|       |    /* we know num_digits cannot be larger than 8 */
  424|  34.5k|    num_digits = (int)(p - *datep);
  425|  34.5k|    val = (unsigned int)lval;
  426|       |
  427|  34.5k|    if((w->tzoff == -1) &&
  ------------------
  |  Branch (427:8): [True: 31.5k, False: 2.96k]
  ------------------
  428|  31.5k|       (num_digits == 4) &&
  ------------------
  |  Branch (428:8): [True: 5.20k, False: 26.3k]
  ------------------
  429|  5.20k|       (val <= 1400) &&
  ------------------
  |  Branch (429:8): [True: 1.19k, False: 4.00k]
  ------------------
  430|  1.19k|       (indate < date) &&
  ------------------
  |  Branch (430:8): [True: 909, False: 287]
  ------------------
  431|    909|       (date[-1] == '+' || date[-1] == '-')) {
  ------------------
  |  Branch (431:9): [True: 135, False: 774]
  |  Branch (431:28): [True: 366, False: 408]
  ------------------
  432|       |      /* four digits and a value less than or equal to 1400 (to take into
  433|       |         account all sorts of funny time zone diffs) and it is preceded
  434|       |         with a plus or minus. This is a time zone indication. 1400 is
  435|       |         picked since +1300 is frequently used and +1400 is mentioned as
  436|       |         an edge number in the document "ISO C 200X Proposal: Timezone
  437|       |         Functions" at http://david.tribble.com/text/c0xtimezone.html If
  438|       |         anyone has a more authoritative source for the exact maximum time
  439|       |         zone offsets, please speak up! */
  440|    501|      found = TRUE;
  ------------------
  |  | 1055|    501|#define TRUE true
  ------------------
  441|    501|      w->tzoff = ((val / 100 * 60) + (val % 100)) * 60;
  442|       |
  443|       |      /* the + and - prefix indicates the local time compared to GMT,
  444|       |         this we need their reversed math to get what we want */
  445|    501|      w->tzoff = date[-1] == '+' ? -w->tzoff : w->tzoff;
  ------------------
  |  Branch (445:18): [True: 135, False: 366]
  ------------------
  446|    501|    }
  447|       |
  448|  34.0k|    else if((num_digits == 8) && (w->year == -1) &&
  ------------------
  |  Branch (448:13): [True: 1.20k, False: 32.8k]
  |  Branch (448:34): [True: 1.05k, False: 149]
  ------------------
  449|  1.05k|            (w->mon == -1) && (w->mday == -1)) {
  ------------------
  |  Branch (449:13): [True: 792, False: 259]
  |  Branch (449:31): [True: 702, False: 90]
  ------------------
  450|       |      /* 8 digits, no year, month or day yet. This is YYYYMMDD */
  451|    702|      found = TRUE;
  ------------------
  |  | 1055|    702|#define TRUE true
  ------------------
  452|    702|      w->year = val / 10000;
  453|    702|      w->mon = ((val % 10000) / 100) - 1; /* month is 0 - 11 */
  454|    702|      w->mday = val % 100;
  455|    702|    }
  456|       |
  457|  34.5k|    if(!found && (dignext == DATE_MDAY) && (w->mday == -1)) {
  ------------------
  |  Branch (457:8): [True: 33.3k, False: 1.20k]
  |  Branch (457:18): [True: 20.8k, False: 12.4k]
  |  Branch (457:44): [True: 20.7k, False: 139]
  ------------------
  458|  20.7k|      if((val > 0) && (val < 32)) {
  ------------------
  |  Branch (458:10): [True: 17.7k, False: 3.00k]
  |  Branch (458:23): [True: 15.2k, False: 2.49k]
  ------------------
  459|  15.2k|        w->mday = val;
  460|  15.2k|        found = TRUE;
  ------------------
  |  | 1055|  15.2k|#define TRUE true
  ------------------
  461|  15.2k|      }
  462|  20.7k|      dignext = DATE_YEAR;
  463|  20.7k|    }
  464|       |
  465|  34.5k|    if(!found && (dignext == DATE_YEAR) && (w->year == -1)) {
  ------------------
  |  Branch (465:8): [True: 18.0k, False: 16.4k]
  |  Branch (465:18): [True: 17.9k, False: 139]
  |  Branch (465:44): [True: 14.6k, False: 3.24k]
  ------------------
  466|  14.6k|      w->year = val;
  467|  14.6k|      found = TRUE;
  ------------------
  |  | 1055|  14.6k|#define TRUE true
  ------------------
  468|  14.6k|      if(w->year < 100) {
  ------------------
  |  Branch (468:10): [True: 8.64k, False: 6.04k]
  ------------------
  469|  8.64k|        if(w->year > 70)
  ------------------
  |  Branch (469:12): [True: 722, False: 7.92k]
  ------------------
  470|    722|          w->year += 1900;
  471|  7.92k|        else
  472|  7.92k|          w->year += 2000;
  473|  8.64k|      }
  474|  14.6k|      if(w->mday == -1)
  ------------------
  |  Branch (474:10): [True: 4.83k, False: 9.85k]
  ------------------
  475|  4.83k|        dignext = DATE_MDAY;
  476|  14.6k|    }
  477|       |
  478|  34.5k|    if(!found)
  ------------------
  |  Branch (478:8): [True: 3.38k, False: 31.1k]
  ------------------
  479|  3.38k|      return PARSEDATE_FAIL;
  ------------------
  |  |   97|  3.38k|#define PARSEDATE_FAIL   (-1)
  ------------------
  480|       |
  481|  31.1k|    date = p;
  482|  31.1k|  }
  483|  37.0k|  *datep = date;
  484|  37.0k|  *dignextp = dignext;
  485|  37.0k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  37.0k|#define PARSEDATE_OK     0
  ------------------
  486|  40.7k|}
parsedate.c:match_time:
  316|  37.6k|{
  317|  37.6k|  const char *p;
  318|  37.6k|  int hh, mm, ss = 0;
  319|  37.6k|  hh = oneortwodigit(date, &p);
  320|  37.6k|  if((hh < 24) && (*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  9.15k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 8.66k, False: 486]
  |  |  |  Branch (44:38): [True: 7.61k, False: 1.05k]
  |  |  ------------------
  ------------------
  |  Branch (320:6): [True: 29.9k, False: 7.61k]
  |  Branch (320:19): [True: 9.15k, False: 20.8k]
  ------------------
  321|  7.61k|    mm = oneortwodigit(&p[1], &p);
  322|  7.61k|    if(mm < 60) {
  ------------------
  |  Branch (322:8): [True: 6.67k, False: 945]
  ------------------
  323|  6.67k|      if((*p == ':') && ISDIGIT(p[1])) {
  ------------------
  |  |   44|  2.89k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 2.37k, False: 518]
  |  |  |  Branch (44:38): [True: 2.19k, False: 185]
  |  |  ------------------
  ------------------
  |  Branch (323:10): [True: 2.89k, False: 3.77k]
  ------------------
  324|  2.19k|        ss = oneortwodigit(&p[1], &p);
  325|  2.19k|        if(ss <= 60) {
  ------------------
  |  Branch (325:12): [True: 1.46k, False: 723]
  ------------------
  326|       |          /* valid HH:MM:SS */
  327|  1.46k|          goto match;
  328|  1.46k|        }
  329|  2.19k|      }
  330|  4.48k|      else {
  331|       |        /* valid HH:MM */
  332|  4.48k|        goto match;
  333|  4.48k|      }
  334|  6.67k|    }
  335|  7.61k|  }
  336|  31.6k|  return FALSE; /* not a time string */
  ------------------
  |  | 1058|  31.6k|#define FALSE false
  ------------------
  337|  5.94k|match:
  338|  5.94k|  w->hour = hh;
  339|  5.94k|  w->min = mm;
  340|  5.94k|  w->sec = ss;
  341|  5.94k|  *endp = (char *)CURL_UNCONST(p);
  ------------------
  |  |  866|  5.94k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  342|       |  return TRUE;
  ------------------
  |  | 1055|  5.94k|#define TRUE true
  ------------------
  343|  37.6k|}
parsedate.c:oneortwodigit:
  304|  47.4k|{
  305|  47.4k|  int num = date[0] - '0';
  306|  47.4k|  if(ISDIGIT(date[1])) {
  ------------------
  |  |   44|  47.4k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 40.5k, False: 6.87k]
  |  |  |  Branch (44:38): [True: 25.3k, False: 15.1k]
  |  |  ------------------
  ------------------
  307|  25.3k|    *endp = &date[2];
  308|  25.3k|    return (num * 10) + (date[1] - '0');
  309|  25.3k|  }
  310|  22.0k|  *endp = &date[1];
  311|  22.0k|  return num;
  312|  47.4k|}
parsedate.c:datecheck:
  489|  8.82k|{
  490|  8.82k|  if(w->sec == -1)
  ------------------
  |  Branch (490:6): [True: 4.35k, False: 4.46k]
  ------------------
  491|  4.35k|    w->sec = w->min = w->hour = 0; /* no time, make it zero */
  492|       |
  493|  8.82k|  if((w->mday == -1) || (w->mon == -1) || (w->year == -1))
  ------------------
  |  Branch (493:6): [True: 2.19k, False: 6.62k]
  |  Branch (493:25): [True: 1.45k, False: 5.16k]
  |  Branch (493:43): [True: 436, False: 4.73k]
  ------------------
  494|       |    /* lacks vital info, fail */
  495|  4.09k|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|  4.09k|#define PARSEDATE_FAIL   (-1)
  ------------------
  496|       |
  497|       |  /* The Gregorian calendar was introduced 1582 */
  498|  4.73k|  else if(w->year < 1583)
  ------------------
  |  Branch (498:11): [True: 850, False: 3.88k]
  ------------------
  499|    850|    return PARSEDATE_FAIL;
  ------------------
  |  |   97|    850|#define PARSEDATE_FAIL   (-1)
  ------------------
  500|       |
  501|  3.88k|  else if((w->mday > 31) || (w->mon > 11) || (w->hour > 23) ||
  ------------------
  |  Branch (501:11): [True: 212, False: 3.66k]
  |  Branch (501:29): [True: 79, False: 3.58k]
  |  Branch (501:46): [True: 0, False: 3.58k]
  ------------------
  502|  3.58k|          (w->min > 59) || (w->sec > 60))
  ------------------
  |  Branch (502:11): [True: 0, False: 3.58k]
  |  Branch (502:28): [True: 0, False: 3.58k]
  ------------------
  503|    291|    return PARSEDATE_FAIL; /* clearly an illegal date */
  ------------------
  |  |   97|    291|#define PARSEDATE_FAIL   (-1)
  ------------------
  504|       |
  505|  3.58k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  3.58k|#define PARSEDATE_OK     0
  ------------------
  506|  8.82k|}
parsedate.c:time2epoch:
  288|  3.58k|{
  289|  3.58k|  static const int cumulative_days[12] = {
  290|  3.58k|    0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
  291|  3.58k|  };
  292|  3.58k|  int y = w->year - (w->mon <= 1);
  293|  3.58k|  int leap_days = (y / 4) - (y / 100) + (y / 400) - LEAP_DAYS_BEFORE_1969;
  ------------------
  |  |  281|  3.58k|#define LEAP_DAYS_BEFORE_1969 477
  ------------------
  294|  3.58k|  curl_off_t days = (curl_off_t)(w->year - 1970) * 365 + leap_days +
  295|  3.58k|    cumulative_days[w->mon] + w->mday - 1;
  296|       |
  297|  3.58k|  return (((days * 24 + w->hour) * 60 + w->min) * 60) + w->sec;
  298|  3.58k|}
parsedate.c:tzadjust:
  509|  3.58k|{
  510|  3.58k|  if(w->tzoff == -1) /* unknown tz means no offset */
  ------------------
  |  Branch (510:6): [True: 3.23k, False: 356]
  ------------------
  511|  3.23k|    w->tzoff = 0;
  512|       |
  513|       |  /* Add the time zone diff between local time zone and GMT. */
  514|  3.58k|  if((w->tzoff > 0) && (*tp > (curl_off_t)(CURL_OFF_T_MAX - w->tzoff)))
  ------------------
  |  |  594|    181|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (514:6): [True: 181, False: 3.40k]
  |  Branch (514:24): [True: 0, False: 181]
  ------------------
  515|      0|    *tp = CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  516|  3.58k|  else
  517|  3.58k|    *tp += w->tzoff;
  518|       |  /* this needs no minimum check since we require a year > 1582 */
  519|  3.58k|}
parsedate.c:mktimet:
  522|  3.58k|{
  523|       |#if SIZEOF_TIME_T < 5
  524|       |  if(seconds > TIME_T_MAX) {
  525|       |    *output = TIME_T_MAX;
  526|       |    return PARSEDATE_LATER;
  527|       |  }
  528|       |  else if(seconds < TIME_T_MIN) {
  529|       |    *output = TIME_T_MIN;
  530|       |    return PARSEDATE_SOONER;
  531|       |  }
  532|       |#elif defined(HAVE_TIME_T_UNSIGNED)
  533|       |  if(seconds < 0) {
  534|       |    *output = 0;
  535|       |    return PARSEDATE_SOONER;
  536|       |  }
  537|       |#endif
  538|  3.58k|  *output = (time_t)seconds;
  539|  3.58k|  return PARSEDATE_OK;
  ------------------
  |  |   96|  3.58k|#define PARSEDATE_OK     0
  ------------------
  540|  3.58k|}

Curl_peer_uds_create:
  262|  4.01k|{
  263|  4.01k|  struct peer_parse pp;
  264|  4.01k|  size_t pathlen = path ? strlen(path) : 0;
  ------------------
  |  Branch (264:20): [True: 4.01k, False: 0]
  ------------------
  265|  4.01k|  CURLcode result = CURLE_OK;
  266|       |
  267|  4.01k|  Curl_peer_unlink(ppeer);
  268|  4.01k|  memset(&pp, 0, sizeof(pp));
  269|  4.01k|  if(!scheme)
  ------------------
  |  Branch (269:6): [True: 0, False: 4.01k]
  ------------------
  270|      0|    return CURLE_FAILED_INIT;
  271|  4.01k|  if(!pathlen)
  ------------------
  |  Branch (271:6): [True: 1, False: 4.01k]
  ------------------
  272|      1|    return CURLE_FAILED_INIT;
  273|       |
  274|  4.01k|  pp.scheme = scheme;
  275|  4.01k|  pp.host_user.str = pp.host.str = path;
  276|  4.01k|  pp.host_user.len = pp.host.len = pathlen;
  277|  4.01k|  pp.unix_socket = TRUE;
  ------------------
  |  | 1055|  4.01k|#define TRUE true
  ------------------
  278|  4.01k|  pp.abstract_uds = abstract_unix_socket;
  279|       |
  280|  4.01k|  result = peer_create(&pp, ppeer);
  281|  4.01k|  peer_parse_clear(&pp);
  282|  4.01k|  return result;
  283|  4.01k|}
Curl_peer_link:
  287|  79.4k|{
  288|  79.4k|  if(*pdest != src) {
  ------------------
  |  Branch (288:6): [True: 58.8k, False: 20.5k]
  ------------------
  289|  58.8k|    Curl_peer_unlink(pdest);
  290|  58.8k|    *pdest = src;
  291|  58.8k|    if(src) {
  ------------------
  |  Branch (291:8): [True: 58.8k, False: 0]
  ------------------
  292|  58.8k|      DEBUGASSERT(src->refcount < UINT32_MAX);
  ------------------
  |  | 1081|  58.8k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (292:7): [True: 0, False: 58.8k]
  |  Branch (292:7): [True: 58.8k, False: 0]
  ------------------
  293|  58.8k|      src->refcount++;
  294|  58.8k|    }
  295|  58.8k|  }
  296|  79.4k|}
Curl_peer_unlink:
  299|   338k|{
  300|   338k|  if(*ppeer) {
  ------------------
  |  Branch (300:6): [True: 105k, False: 232k]
  ------------------
  301|   105k|    struct Curl_peer *peer = *ppeer;
  302|       |
  303|   105k|    DEBUGASSERT(peer->refcount);
  ------------------
  |  | 1081|   105k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (303:5): [True: 0, False: 105k]
  |  Branch (303:5): [True: 105k, False: 0]
  ------------------
  304|   105k|    *ppeer = NULL;
  305|   105k|    if(peer->refcount)
  ------------------
  |  Branch (305:8): [True: 105k, False: 0]
  ------------------
  306|   105k|      peer->refcount--;
  307|   105k|    if(!peer->refcount) {
  ------------------
  |  Branch (307:8): [True: 46.7k, False: 58.8k]
  ------------------
  308|  46.7k|      curlx_free(peer);
  ------------------
  |  | 1483|  46.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  309|  46.7k|    }
  310|   105k|  }
  311|   338k|}
Curl_peer_equal:
  314|  29.7k|{
  315|  29.7k|  return (p1 == p2) ||
  ------------------
  |  Branch (315:10): [True: 1.55k, False: 28.2k]
  ------------------
  316|  28.2k|         (p1 && p2 &&
  ------------------
  |  Branch (316:11): [True: 28.2k, False: 0]
  |  Branch (316:17): [True: 27.5k, False: 660]
  ------------------
  317|  27.5k|          (p1->scheme == p2->scheme) &&
  ------------------
  |  Branch (317:11): [True: 27.5k, False: 0]
  ------------------
  318|  27.5k|          Curl_peer_same_destination(p1, p2));
  ------------------
  |  Branch (318:11): [True: 6.59k, False: 20.9k]
  ------------------
  319|  29.7k|}
Curl_peer_same_destination:
  334|  48.6k|{
  335|  48.6k|  return (p1 == p2) ||
  ------------------
  |  Branch (335:10): [True: 245, False: 48.4k]
  ------------------
  336|  48.4k|         (p1 && p2 &&
  ------------------
  |  Branch (336:11): [True: 48.4k, False: 0]
  |  Branch (336:17): [True: 48.4k, False: 0]
  ------------------
  337|  48.4k|          (p1->port == p2->port) &&
  ------------------
  |  Branch (337:11): [True: 44.3k, False: 4.05k]
  ------------------
  338|  44.3k|          peer_same_hostname(p1, p2) &&
  ------------------
  |  Branch (338:11): [True: 27.4k, False: 16.9k]
  ------------------
  339|  27.4k|          (p1->scopeid == p2->scopeid) &&
  ------------------
  |  Branch (339:11): [True: 27.4k, False: 2]
  ------------------
  340|  27.4k|          (p1->scopeid || curl_strequal(p1->zoneid, p2->zoneid)));
  ------------------
  |  Branch (340:12): [True: 2.47k, False: 24.9k]
  |  Branch (340:27): [True: 24.9k, False: 0]
  ------------------
  341|  48.6k|}
Curl_peer_from_url:
  348|  22.4k|{
  349|  22.4k|  struct peer_parse pp;
  350|  22.4k|  char *zoneid = NULL;
  351|  22.4k|  CURLUcode uc;
  352|  22.4k|  CURLcode result;
  353|       |
  354|  22.4k|  Curl_peer_unlink(ppeer);
  355|  22.4k|  memset(&pp, 0, sizeof(pp));
  356|       |
  357|  22.4k|  curlx_safefree(up->scheme);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  358|  22.4k|  uc = curl_url_get(uh, CURLUPART_SCHEME, &up->scheme, 0);
  359|  22.4k|  if(uc)
  ------------------
  |  Branch (359:6): [True: 0, False: 22.4k]
  ------------------
  360|      0|    return Curl_uc_to_curlcode(uc);
  361|  22.4k|  pp.scheme = Curl_get_scheme(up->scheme);
  362|  22.4k|  if(!pp.scheme) {
  ------------------
  |  Branch (362:6): [True: 52, False: 22.4k]
  ------------------
  363|     52|    failf(data, "Protocol \"%s\" not supported%s", up->scheme,
  ------------------
  |  |   62|     52|#define failf Curl_failf
  ------------------
  364|     52|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (364:11): [True: 0, False: 52]
  ------------------
  365|     52|    result = CURLE_UNSUPPORTED_PROTOCOL;
  366|     52|    goto out;
  367|     52|  }
  368|       |
  369|  22.4k|  curlx_safefree(up->hostname);
  ------------------
  |  | 1327|  22.4k|  do {                      \
  |  | 1328|  22.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.4k|    (ptr) = NULL;           \
  |  | 1330|  22.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.4k]
  |  |  ------------------
  ------------------
  370|  22.4k|  uc = curl_url_get(uh, CURLUPART_HOST, &up->hostname, 0);
  371|  22.4k|  if(uc) {
  ------------------
  |  Branch (371:6): [True: 36, False: 22.4k]
  ------------------
  372|     36|    if((uc == CURLUE_NO_HOST) && (pp.scheme->flags & PROTOPT_NONETWORK))
  ------------------
  |  |  215|     36|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (372:8): [True: 36, False: 0]
  |  Branch (372:34): [True: 36, False: 0]
  ------------------
  373|     36|      ; /* acceptable */
  374|      0|    else {
  375|      0|      result = CURLE_OUT_OF_MEMORY;
  376|      0|      goto out;
  377|      0|    }
  378|     36|  }
  379|  22.4k|  else if(strlen(up->hostname) > MAX_URL_LEN) {
  ------------------
  |  |   29|  22.4k|#define MAX_URL_LEN 0xffff
  ------------------
  |  Branch (379:11): [True: 1, False: 22.4k]
  ------------------
  380|      1|    failf(data, "Too long hostname (maximum is %d)", MAX_URL_LEN);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
                  failf(data, "Too long hostname (maximum is %d)", MAX_URL_LEN);
  ------------------
  |  |   29|      1|#define MAX_URL_LEN 0xffff
  ------------------
  381|      1|    result = CURLE_URL_MALFORMAT;
  382|      1|    goto out;
  383|      1|  }
  384|       |
  385|  22.4k|  pp.host_user.str = up->hostname ? up->hostname : "";
  ------------------
  |  Branch (385:22): [True: 22.4k, False: 36]
  ------------------
  386|  22.4k|  pp.host_user.len = strlen(pp.host_user.str);
  387|  22.4k|  if(pp.host_user.len) {
  ------------------
  |  Branch (387:6): [True: 22.4k, False: 36]
  ------------------
  388|  22.4k|    result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1058|  22.4k|#define FALSE false
  ------------------
  389|  22.4k|    if(result)
  ------------------
  |  Branch (389:8): [True: 131, False: 22.2k]
  ------------------
  390|    131|      goto out;
  391|  22.4k|  }
  392|     36|  else
  393|     36|    pp.host = pp.host_user;
  394|       |
  395|  22.3k|  curlx_safefree(up->port);
  ------------------
  |  | 1327|  22.3k|  do {                      \
  |  | 1328|  22.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  22.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  22.3k|    (ptr) = NULL;           \
  |  | 1330|  22.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 22.3k]
  |  |  ------------------
  ------------------
  396|  22.3k|  if(port_override) {
  ------------------
  |  Branch (396:6): [True: 1.09k, False: 21.2k]
  ------------------
  397|       |    /* if set, we use this instead of the port possibly given in the URL */
  398|  1.09k|    char portbuf[16];
  399|  1.09k|    curl_msnprintf(portbuf, sizeof(portbuf), "%d", port_override);
  400|  1.09k|    uc = curl_url_set(uh, CURLUPART_PORT, portbuf, 0);
  401|  1.09k|    if(uc) {
  ------------------
  |  Branch (401:8): [True: 0, False: 1.09k]
  ------------------
  402|      0|      result = CURLE_OUT_OF_MEMORY;
  403|      0|      goto out;
  404|      0|    }
  405|  1.09k|    else
  406|  1.09k|      pp.port = port_override;
  407|  1.09k|  }
  408|  21.2k|  else {
  409|  21.2k|    uc = curl_url_get(uh, CURLUPART_PORT, &up->port, CURLU_DEFAULT_PORT);
  ------------------
  |  |   84|  21.2k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  410|  21.2k|    if(uc) {
  ------------------
  |  Branch (410:8): [True: 0, False: 21.2k]
  ------------------
  411|      0|      if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (411:10): [True: 0, False: 0]
  ------------------
  412|      0|        result = CURLE_OUT_OF_MEMORY;
  413|      0|        goto out;
  414|      0|      }
  415|      0|      else if(!(pp.scheme->flags & PROTOPT_NONETWORK)) {
  ------------------
  |  |  215|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (415:15): [True: 0, False: 0]
  ------------------
  416|      0|        result = CURLE_URL_MALFORMAT;
  417|      0|        goto out;
  418|      0|      }
  419|       |      /* no port ok when not a network scheme */
  420|      0|    }
  421|  21.2k|    else {
  422|  21.2k|      const char *p = up->port;
  423|  21.2k|      curl_off_t offt;
  424|  21.2k|      if(curlx_str_number(&p, &offt, 0xffff))
  ------------------
  |  Branch (424:10): [True: 0, False: 21.2k]
  ------------------
  425|      0|        return CURLE_URL_MALFORMAT;
  426|  21.2k|      pp.port = (uint16_t)offt;
  427|  21.2k|    }
  428|  21.2k|  }
  429|       |
  430|  22.3k|  if(scopeid_override)
  ------------------
  |  Branch (430:6): [True: 1.03k, False: 21.2k]
  ------------------
  431|       |    /* Override any scope id from an url zone. */
  432|  1.03k|    pp.scopeid = scopeid_override;
  433|  21.2k|  else {
  434|  21.2k|    if(curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0) ==
  ------------------
  |  Branch (434:8): [True: 0, False: 21.2k]
  ------------------
  435|  21.2k|       CURLUE_OUT_OF_MEMORY) {
  436|      0|      result = CURLE_OUT_OF_MEMORY;
  437|      0|      goto out;
  438|      0|    }
  439|  21.2k|    if(zoneid) {
  ------------------
  |  Branch (439:8): [True: 68, False: 21.2k]
  ------------------
  440|     68|      pp.zoneid.str = zoneid;
  441|     68|      pp.zoneid.len = strlen(zoneid);
  442|     68|    }
  443|  21.2k|  }
  444|       |
  445|  22.3k|  result = peer_create(&pp, ppeer);
  446|  22.3k|  if(result)
  ------------------
  |  Branch (446:6): [True: 0, False: 22.3k]
  ------------------
  447|      0|    failf(data, "Error %d creating peer for %s:%u",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  448|      0|          result, pp.host_user.str, pp.port);
  449|       |
  450|  22.4k|out:
  451|  22.4k|  peer_parse_clear(&pp);
  452|  22.4k|  curlx_free(zoneid);
  ------------------
  |  | 1483|  22.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  453|  22.4k|  return result;
  454|  22.3k|}
Curl_peer_from_connect_to:
  462|  16.8k|{
  463|  16.8k|  struct peer_parse pp;
  464|  16.8k|  const char *portstr = NULL;
  465|  16.8k|  CURLcode result;
  466|       |
  467|  16.8k|  Curl_peer_unlink(ppeer);
  468|  16.8k|  memset(&pp, 0, sizeof(pp));
  469|  16.8k|  if(!connect_to || !*connect_to)
  ------------------
  |  Branch (469:6): [True: 0, False: 16.8k]
  |  Branch (469:21): [True: 0, False: 16.8k]
  ------------------
  470|      0|    return CURLE_FAILED_INIT;
  471|       |
  472|  16.8k|  pp.scheme = dest->scheme;
  473|       |
  474|       |  /* detect and extract RFC6874-style IPv6-addresses */
  475|  16.8k|  if(connect_to[0] == '[') {
  ------------------
  |  Branch (475:6): [True: 0, False: 16.8k]
  ------------------
  476|      0|    const char *s = strchr(connect_to + 1, ']');
  477|      0|    if(!s) {
  ------------------
  |  Branch (477:8): [True: 0, False: 0]
  ------------------
  478|      0|      failf(data, "Invalid IPv6 address format in '%s'", connect_to);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  479|      0|      result = CURLE_SETOPT_OPTION_SYNTAX;
  480|      0|      goto out;
  481|      0|    }
  482|      0|    portstr = strchr(s, ':');
  483|      0|    pp.host_user.str = connect_to;
  484|      0|    pp.host_user.len = s - pp.host_user.str + 1;
  485|      0|    pp.ipv6 = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  486|      0|  }
  487|  16.8k|  else {
  488|  16.8k|    portstr = strchr(connect_to, ':');
  489|  16.8k|    pp.host_user.str = connect_to;
  490|  16.8k|    pp.host_user.len = portstr ?
  ------------------
  |  Branch (490:24): [True: 16.8k, False: 0]
  ------------------
  491|  16.8k|      (size_t)(portstr - connect_to) : strlen(connect_to);
  492|  16.8k|  }
  493|       |
  494|  16.8k|  if(!pp.host_user.len) { /* no hostname found, only port switch */
  ------------------
  |  Branch (494:6): [True: 0, False: 16.8k]
  ------------------
  495|      0|    pp.host_user.str = dest->user_hostname;
  496|      0|    pp.host_user.len = strlen(dest->user_hostname);
  497|      0|  }
  498|       |
  499|  16.8k|  result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1058|  16.8k|#define FALSE false
  ------------------
  500|  16.8k|  if(result)
  ------------------
  |  Branch (500:6): [True: 0, False: 16.8k]
  ------------------
  501|      0|    goto out;
  502|       |
  503|  16.8k|  if(portstr && portstr[1]) {
  ------------------
  |  Branch (503:6): [True: 16.8k, False: 0]
  |  Branch (503:17): [True: 0, False: 16.8k]
  ------------------
  504|      0|    const char *p = portstr + 1;
  505|      0|    curl_off_t portparse;
  506|      0|    if(curlx_str_number(&p, &portparse, 0xffff)) {
  ------------------
  |  Branch (506:8): [True: 0, False: 0]
  ------------------
  507|      0|      failf(data, "No valid port number in '%s'", connect_to);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  508|      0|      result = CURLE_SETOPT_OPTION_SYNTAX;
  509|      0|      goto out;
  510|      0|    }
  511|      0|    pp.port = (uint16_t)portparse; /* we know it will fit */
  512|      0|  }
  513|  16.8k|  else
  514|  16.8k|    pp.port = dest->port;
  515|       |
  516|       |#ifndef USE_IPV6
  517|       |  if(pp.ipv6) {
  518|       |    failf(data, "Use of IPv6 in *_CONNECT_TO without IPv6 support built-in");
  519|       |    result = CURLE_NOT_BUILT_IN;
  520|       |    goto out;
  521|       |  }
  522|       |#endif
  523|       |
  524|  16.8k|  result = peer_create(&pp, ppeer);
  525|  16.8k|  CURL_TRC_M(data, "connect-to peer_create2 -> %d", result);
  ------------------
  |  |  148|  16.8k|  do {                                   \
  |  |  149|  16.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  16.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  16.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  33.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 16.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 16.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  33.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  16.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  16.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  16.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 16.8k]
  |  |  ------------------
  ------------------
  526|       |
  527|  16.8k|out:
  528|  16.8k|  CURL_TRC_M(data, "parse connect_to peer: %s -> %d", connect_to, result);
  ------------------
  |  |  148|  16.8k|  do {                                   \
  |  |  149|  16.8k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  16.8k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  16.8k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  33.7k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 16.8k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 16.8k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  33.7k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  16.8k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  16.8k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  16.8k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 16.8k]
  |  |  ------------------
  ------------------
  529|  16.8k|  peer_parse_clear(&pp);
  530|  16.8k|  return result;
  531|  16.8k|}
Curl_scheme_to_proxytype:
  542|      5|{
  543|      5|  if(!scheme)
  ------------------
  |  Branch (543:6): [True: 0, False: 5]
  ------------------
  544|      0|    return CURLE_OK;
  545|       |
  546|      5|  if(curl_strequal("https", scheme)) {
  ------------------
  |  Branch (546:6): [True: 0, False: 5]
  ------------------
  547|      0|    if(*proxytype != CURLPROXY_HTTPS2 && *proxytype != CURLPROXY_HTTPS3)
  ------------------
  |  |  796|      0|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
                  if(*proxytype != CURLPROXY_HTTPS2 && *proxytype != CURLPROXY_HTTPS3)
  ------------------
  |  |  805|      0|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (547:8): [True: 0, False: 0]
  |  Branch (547:42): [True: 0, False: 0]
  ------------------
  548|      0|      *proxytype = CURLPROXY_HTTPS;
  ------------------
  |  |  794|      0|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  549|      0|  }
  550|      5|  else if(curl_strequal("socks5h", scheme))
  ------------------
  |  Branch (550:11): [True: 0, False: 5]
  ------------------
  551|      0|    *proxytype = CURLPROXY_SOCKS5_HOSTNAME;
  ------------------
  |  |  802|      0|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  552|      5|  else if(curl_strequal("socks5", scheme))
  ------------------
  |  Branch (552:11): [True: 0, False: 5]
  ------------------
  553|      0|    *proxytype = CURLPROXY_SOCKS5;
  ------------------
  |  |  800|      0|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  554|      5|  else if(curl_strequal("socks4a", scheme))
  ------------------
  |  Branch (554:11): [True: 0, False: 5]
  ------------------
  555|      0|    *proxytype = CURLPROXY_SOCKS4A;
  ------------------
  |  |  801|      0|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  556|      5|  else if(curl_strequal("socks4", scheme) || curl_strequal("socks", scheme))
  ------------------
  |  Branch (556:11): [True: 0, False: 5]
  |  Branch (556:46): [True: 0, False: 5]
  ------------------
  557|      0|    *proxytype = CURLPROXY_SOCKS4;
  ------------------
  |  |  798|      0|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  558|      5|  else if(curl_strequal("http", scheme)) {
  ------------------
  |  Branch (558:11): [True: 4, False: 1]
  ------------------
  559|      4|    if(*proxytype != CURLPROXY_HTTP_1_0)
  ------------------
  |  |  792|      4|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (559:8): [True: 4, False: 0]
  ------------------
  560|      4|      *proxytype = CURLPROXY_HTTP;
  ------------------
  |  |  790|      4|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  561|      4|  }
  562|      1|  else {
  563|       |    /* Any other xxx:// reject! */
  564|      1|    failf(data, "Unsupported proxy scheme for \'%s\'", url);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  565|      1|    return CURLE_COULDNT_CONNECT;
  566|      1|  }
  567|      4|  return CURLE_OK;
  568|      5|}
Curl_peer_from_proxy_url:
  576|  3.56k|{
  577|  3.56k|  struct peer_parse pp;
  578|  3.56k|  char *scheme = NULL;
  579|  3.56k|  char *portptr = NULL;
  580|  3.56k|#ifdef USE_UNIX_SOCKETS
  581|  3.56k|  bool is_socks = FALSE;
  ------------------
  |  | 1058|  3.56k|#define FALSE false
  ------------------
  582|  3.56k|#endif
  583|  3.56k|  CURLUcode uc;
  584|  3.56k|  CURLcode result = CURLE_OK;
  585|       |
  586|  3.56k|  Curl_peer_unlink(ppeer);
  587|  3.56k|  memset(&pp, 0, sizeof(pp));
  588|  3.56k|  pp.port = CURL_DEFAULT_PROXY_PORT;
  ------------------
  |  |   70|  3.56k|#define CURL_DEFAULT_PROXY_PORT 1080 /* default proxy port unless specified */
  ------------------
  589|  3.56k|  uc = curl_url_get(uh, CURLUPART_SCHEME, &scheme,
  590|  3.56k|                    CURLU_NON_SUPPORT_SCHEME | CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |   90|  3.56k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
                                  CURLU_NON_SUPPORT_SCHEME | CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  3.56k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  591|  3.56k|  if(uc) {
  ------------------
  |  Branch (591:6): [True: 3.56k, False: 2]
  ------------------
  592|  3.56k|    if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (592:8): [True: 0, False: 3.56k]
  ------------------
  593|      0|      result = CURLE_OUT_OF_MEMORY;
  594|      0|      goto out;
  595|      0|    }
  596|       |    /* url came without scheme, the passed `proxytype` determines it */
  597|  3.56k|    switch(proxytype) {
  598|    974|    case CURLPROXY_HTTP:
  ------------------
  |  |  790|    974|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (598:5): [True: 974, False: 2.59k]
  ------------------
  599|    975|    case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|    975|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (599:5): [True: 1, False: 3.56k]
  ------------------
  600|    975|      pp.scheme = &Curl_scheme_http;
  601|    975|      break;
  602|    832|    case CURLPROXY_HTTPS:
  ------------------
  |  |  794|    832|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  |  Branch (602:5): [True: 832, False: 2.73k]
  ------------------
  603|  2.12k|    case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|  2.12k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (603:5): [True: 1.29k, False: 2.26k]
  ------------------
  604|  2.12k|    case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|  2.12k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (604:5): [True: 0, False: 3.56k]
  ------------------
  605|  2.12k|      pp.scheme = &Curl_scheme_https;
  606|  2.12k|      break;
  607|    425|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    425|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (607:5): [True: 425, False: 3.13k]
  ------------------
  608|    425|      pp.scheme = &Curl_scheme_socks4;
  609|    425|      break;
  610|     10|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|     10|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (610:5): [True: 10, False: 3.55k]
  ------------------
  611|     10|      pp.scheme = &Curl_scheme_socks4a;
  612|     10|      break;
  613|     12|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     12|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (613:5): [True: 12, False: 3.55k]
  ------------------
  614|     12|      pp.scheme = &Curl_scheme_socks5;
  615|     12|      break;
  616|     15|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     15|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (616:5): [True: 15, False: 3.54k]
  ------------------
  617|     15|      pp.scheme = &Curl_scheme_socks5h;
  618|     15|      break;
  619|      0|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 3.56k]
  ------------------
  620|      0|      failf(data, "Unsupported proxy type %u for \'%s\'", proxytype, url);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  621|      0|      result = CURLE_COULDNT_RESOLVE_PROXY;
  622|      0|      goto out;
  623|  3.56k|    }
  624|  3.56k|  }
  625|      2|  else {
  626|      2|    pp.scheme = Curl_get_scheme(scheme);
  627|      2|    result = Curl_scheme_to_proxytype(data, scheme, &proxytype, url);
  628|      2|    if(result)
  ------------------
  |  Branch (628:8): [True: 0, False: 2]
  ------------------
  629|      0|      goto out;
  630|      2|  }
  631|  3.56k|  DEBUGASSERT(pp.scheme);
  ------------------
  |  | 1081|  3.56k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (631:3): [True: 0, False: 3.56k]
  |  Branch (631:3): [True: 3.56k, False: 0]
  ------------------
  632|       |
  633|  3.56k|  if(IS_HTTPS_PROXY(proxytype) &&
  ------------------
  |  |   80|  7.13k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  3.56k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (80:4): [True: 832, False: 2.73k]
  |  |  ------------------
  |  |   81|  3.56k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  2.73k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (81:4): [True: 1.29k, False: 1.43k]
  |  |  ------------------
  |  |   82|  7.13k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|  1.43k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 0, False: 1.43k]
  |  |  ------------------
  ------------------
  634|  2.12k|     !Curl_ssl_supports(data, SSLSUPP_HTTPS_PROXY)) {
  ------------------
  |  |   39|  2.12k|#define SSLSUPP_HTTPS_PROXY  (1 << 4) /* supports access via HTTPS proxies */
  ------------------
  |  Branch (634:6): [True: 0, False: 2.12k]
  ------------------
  635|      0|    failf(data, "Unsupported proxy \'%s\', libcurl is built without the "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  636|      0|          "HTTPS-proxy support.", url);
  637|      0|    result = CURLE_NOT_BUILT_IN;
  638|      0|    goto out;
  639|      0|  }
  640|       |
  641|  3.56k|  switch(pp.scheme->family) {
  642|    462|  case CURLPROTO_SOCKS:
  ------------------
  |  |   66|    462|#define CURLPROTO_SOCKS  (1LL << 33)
  ------------------
  |  Branch (642:3): [True: 462, False: 3.10k]
  ------------------
  643|    462|#ifdef USE_UNIX_SOCKETS
  644|    462|    is_socks = TRUE;
  ------------------
  |  | 1055|    462|#define TRUE true
  ------------------
  645|    462|#endif
  646|    462|    break;
  647|  3.10k|  case CURLPROTO_HTTP:
  ------------------
  |  | 1078|  3.10k|#define CURLPROTO_HTTP    (1L << 0)
  ------------------
  |  Branch (647:3): [True: 3.10k, False: 462]
  ------------------
  648|  3.10k|    break;
  649|      0|  default:
  ------------------
  |  Branch (649:3): [True: 0, False: 3.56k]
  ------------------
  650|      0|    failf(data, "Unsupported proxy protocol for \'%s\'", url);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  651|      0|    result = CURLE_COULDNT_CONNECT;
  652|      0|    goto out;
  653|  3.56k|  }
  654|       |
  655|  3.56k|  uc = curl_url_get(uh, CURLUPART_PORT, &portptr, CURLU_NO_DEFAULT_PORT);
  ------------------
  |  |   85|  3.56k|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  656|  3.56k|  if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (656:6): [True: 0, False: 3.56k]
  ------------------
  657|      0|    result = CURLE_OUT_OF_MEMORY;
  658|      0|    goto out;
  659|      0|  }
  660|  3.56k|  if(portptr) {
  ------------------
  |  Branch (660:6): [True: 1.00k, False: 2.55k]
  ------------------
  661|  1.00k|    curl_off_t num;
  662|  1.00k|    const char *p = portptr;
  663|  1.00k|    if(!curlx_str_number(&p, &num, UINT16_MAX))
  ------------------
  |  Branch (663:8): [True: 1.00k, False: 0]
  ------------------
  664|  1.00k|      pp.port = (uint16_t)num;
  665|       |    /* Should we not error out when the port number is invalid? */
  666|  1.00k|    curlx_free(portptr);
  ------------------
  |  | 1483|  1.00k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  667|  1.00k|  }
  668|  2.55k|  else {
  669|       |    /* No port in url, take the set one or the scheme's default */
  670|  2.55k|    if(data->set.proxyport)
  ------------------
  |  Branch (670:8): [True: 5, False: 2.55k]
  ------------------
  671|      5|      pp.port = data->set.proxyport;
  672|  2.55k|    else
  673|  2.55k|      pp.port = pp.scheme->defport;
  674|  2.55k|  }
  675|       |
  676|       |  /* now, clone the proxy hostname */
  677|  3.56k|  uc = curl_url_get(uh, CURLUPART_HOST, &pp.tmp_host_user, CURLU_URLDECODE);
  ------------------
  |  |   93|  3.56k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  678|  3.56k|  if(uc) {
  ------------------
  |  Branch (678:6): [True: 0, False: 3.56k]
  ------------------
  679|      0|    result = CURLE_OUT_OF_MEMORY;
  680|      0|    goto out;
  681|      0|  }
  682|  3.56k|  pp.host_user.str = pp.tmp_host_user;
  683|  3.56k|  pp.host_user.len = strlen(pp.tmp_host_user);
  684|       |
  685|  3.56k|#ifdef USE_UNIX_SOCKETS
  686|  3.56k|  if(is_socks && curl_strequal(UNIX_SOCKET_PREFIX, pp.tmp_host_user)) {
  ------------------
  |  |  536|    462|#define UNIX_SOCKET_PREFIX "localhost"
  ------------------
  |  Branch (686:6): [True: 462, False: 3.10k]
  |  Branch (686:18): [True: 22, False: 440]
  ------------------
  687|     22|    uc = curl_url_get(uh, CURLUPART_PATH, &pp.tmp_host, CURLU_URLDECODE);
  ------------------
  |  |   93|     22|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  688|     22|    if(uc) {
  ------------------
  |  Branch (688:8): [True: 0, False: 22]
  ------------------
  689|      0|      result = CURLE_OUT_OF_MEMORY;
  690|      0|      goto out;
  691|      0|    }
  692|       |    /* path will be "/", if no path was found */
  693|     22|    if(strcmp("/", pp.tmp_host)) {
  ------------------
  |  Branch (693:8): [True: 4, False: 18]
  ------------------
  694|      4|      pp.host.str = pp.tmp_host;
  695|      4|      pp.host.len = strlen(pp.tmp_host);
  696|      4|      pp.unix_socket = TRUE;
  ------------------
  |  | 1055|      4|#define TRUE true
  ------------------
  697|      4|    }
  698|     18|    else {
  699|     18|      pp.host = pp.host_user;
  700|     18|    }
  701|     22|  }
  702|  3.56k|#endif /* USE_UNIX_SOCKETS */
  703|       |
  704|  3.56k|  if(!pp.host.len) {
  ------------------
  |  Branch (704:6): [True: 3.54k, False: 22]
  ------------------
  705|  3.54k|    result = peer_parse_host(data, &pp, FALSE);
  ------------------
  |  | 1058|  3.54k|#define FALSE false
  ------------------
  706|  3.54k|    if(result)
  ------------------
  |  Branch (706:8): [True: 4, False: 3.54k]
  ------------------
  707|      4|      goto out;
  708|  3.54k|  }
  709|       |
  710|  3.56k|  uc = curl_url_get(uh, CURLUPART_ZONEID, &pp.tmp_zoneid, 0);
  711|  3.56k|  if(uc == CURLUE_OUT_OF_MEMORY) {
  ------------------
  |  Branch (711:6): [True: 0, False: 3.56k]
  ------------------
  712|      0|    result = CURLE_OUT_OF_MEMORY;
  713|      0|    goto out;
  714|      0|  }
  715|  3.56k|  if(pp.tmp_zoneid) {
  ------------------
  |  Branch (715:6): [True: 6, False: 3.55k]
  ------------------
  716|      6|    pp.zoneid.str = pp.tmp_zoneid;
  717|      6|    pp.zoneid.len = strlen(pp.tmp_zoneid);
  718|      6|  }
  719|       |
  720|  3.56k|  *pproxytype = proxytype;
  721|  3.56k|  result = peer_create(&pp, ppeer);
  722|       |
  723|  3.56k|out:
  724|  3.56k|  peer_parse_clear(&pp);
  725|  3.56k|  curlx_free(scheme);
  ------------------
  |  | 1483|  3.56k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  726|  3.56k|#ifdef DEBUGBUILD
  727|  3.56k|  if(!result)
  ------------------
  |  Branch (727:6): [True: 3.56k, False: 4]
  ------------------
  728|  3.56k|    DEBUGASSERT(*ppeer);
  ------------------
  |  | 1081|  3.56k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (728:5): [True: 0, False: 3.56k]
  |  Branch (728:5): [True: 3.56k, False: 0]
  ------------------
  729|  3.56k|#endif
  730|  3.56k|  return result;
  731|  3.56k|}
peer.c:peer_parse_host:
  185|  42.8k|{
  186|  42.8k|  if(!pp || !pp->host_user.str || !pp->host_user.len)
  ------------------
  |  Branch (186:6): [True: 0, False: 42.8k]
  |  Branch (186:13): [True: 0, False: 42.8k]
  |  Branch (186:35): [True: 0, False: 42.8k]
  ------------------
  187|      0|    return CURLE_FAILED_INIT;
  188|       |
  189|  42.8k|  if(pp->host_user.str[0] == '[') {
  ------------------
  |  Branch (189:6): [True: 113, False: 42.7k]
  ------------------
  190|    113|    const char *s = pp->host_user.str + 1;
  191|    113|    struct Curl_str tmp;
  192|    113|    if(curlx_str_until(&s, &tmp, pp->host_user.len - 1, ']'))
  ------------------
  |  Branch (192:8): [True: 0, False: 113]
  ------------------
  193|      0|      return CURLE_URL_MALFORMAT;
  194|       |
  195|    113|    if(!Curl_looks_like_ipv6(tmp.str, tmp.len, TRUE,
  ------------------
  |  | 1055|    113|#define TRUE true
  ------------------
  |  Branch (195:8): [True: 0, False: 113]
  ------------------
  196|    113|                             &pp->host, &pp->zoneid)) {
  197|      0|      failf(data, "Invalid IPv6 address format in '%.*s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  198|      0|            (int)pp->host_user.len, pp->host_user.str);
  199|      0|      return CURLE_URL_MALFORMAT;
  200|      0|    }
  201|    113|    pp->ipv6 = TRUE;
  ------------------
  |  | 1055|    113|#define TRUE true
  ------------------
  202|    113|  }
  203|  42.7k|  else {
  204|  42.7k|#ifdef USE_IDN
  205|  42.7k|    if(!Curl_is_ASCII_str(&pp->host_user)) {
  ------------------
  |  Branch (205:8): [True: 135, False: 42.5k]
  ------------------
  206|    135|      CURLcode result;
  207|    135|      if(!pp->tmp_host_user) {
  ------------------
  |  Branch (207:10): [True: 131, False: 4]
  ------------------
  208|       |        /* need a null-terminated string for IDN */
  209|    131|        pp->tmp_host_user = curlx_memdup0(pp->host_user.str,
  210|    131|                                          pp->host_user.len);
  211|    131|        if(!pp->tmp_host_user)
  ------------------
  |  Branch (211:12): [True: 0, False: 131]
  ------------------
  212|      0|          return CURLE_OUT_OF_MEMORY;
  213|    131|      }
  214|    135|      result = Curl_idn_decode(pp->tmp_host_user, &pp->tmp_host);
  215|    135|      if(result)
  ------------------
  |  Branch (215:10): [True: 135, False: 0]
  ------------------
  216|    135|        return result;
  217|      0|      pp->host.str = pp->tmp_host;
  218|      0|      pp->host.len = strlen(pp->host.str);
  219|      0|    }
  220|  42.5k|    else
  221|  42.5k|#endif
  222|  42.5k|    if(scan_for_ipv6 &&
  ------------------
  |  Branch (222:8): [True: 0, False: 42.5k]
  ------------------
  223|      0|       Curl_looks_like_ipv6(pp->host_user.str, pp->host_user.len, TRUE,
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  |  Branch (223:8): [True: 0, False: 0]
  ------------------
  224|      0|                            &pp->host, &pp->zoneid)) {
  225|      0|      pp->ipv6 = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  226|      0|    }
  227|  42.5k|    else
  228|  42.5k|      pp->host = pp->host_user;
  229|  42.7k|  }
  230|  42.7k|  return CURLE_OK;
  231|  42.8k|}
peer.c:peer_create:
  104|  46.7k|{
  105|  46.7k|  struct Curl_peer *peer = NULL;
  106|  46.7k|  CURLcode result = CURLE_OK;
  107|  46.7k|  size_t zone_alen = 0, host_alen = 0;
  108|       |
  109|  46.7k|  if(!pp || !pp->scheme)
  ------------------
  |  Branch (109:6): [True: 0, False: 46.7k]
  |  Branch (109:13): [True: 0, False: 46.7k]
  ------------------
  110|      0|    return CURLE_FAILED_INIT;
  111|  46.7k|  if(!pp->host.len && !(pp->scheme->flags & PROTOPT_NONETWORK))
  ------------------
  |  |  215|     36|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (111:6): [True: 36, False: 46.7k]
  |  Branch (111:23): [True: 0, False: 36]
  ------------------
  112|      0|    return CURLE_FAILED_INIT;
  113|       |
  114|  46.7k|  if((pp->host.str != pp->host_user.str) ||
  ------------------
  |  Branch (114:6): [True: 117, False: 46.6k]
  ------------------
  115|  46.6k|     (pp->host.len != pp->host_user.len)) {
  ------------------
  |  Branch (115:6): [True: 0, False: 46.6k]
  ------------------
  116|    117|    host_alen = pp->host.len + 1;
  117|    117|  }
  118|  46.7k|  zone_alen = pp->zoneid.len ? (pp->zoneid.len + 1) : 0;
  ------------------
  |  Branch (118:15): [True: 74, False: 46.7k]
  ------------------
  119|       |
  120|       |  /* null-terminator already part of struct */
  121|  46.7k|  peer = curlx_calloc(1, sizeof(*peer) +
  ------------------
  |  | 1480|  46.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  122|  46.7k|                         pp->host_user.len + host_alen + zone_alen);
  123|  46.7k|  if(!peer) {
  ------------------
  |  Branch (123:6): [True: 0, False: 46.7k]
  ------------------
  124|      0|    result = CURLE_OUT_OF_MEMORY;
  125|      0|    goto out;
  126|      0|  }
  127|       |
  128|  46.7k|  peer->refcount = 1;
  129|  46.7k|  peer->scheme = pp->scheme;
  130|  46.7k|  peer->hostname = peer->user_hostname;
  131|  46.7k|  peer->port = pp->port;
  132|  46.7k|  peer->scopeid = pp->scopeid;
  133|  46.7k|  peer->ipv6 = pp->ipv6;
  134|  46.7k|  peer->unix_socket = pp->unix_socket;
  135|  46.7k|  peer->abstract_uds = pp->abstract_uds;
  136|       |
  137|  46.7k|  if(pp->host_user.len)
  ------------------
  |  Branch (137:6): [True: 46.7k, False: 36]
  ------------------
  138|  46.7k|    memcpy(peer->user_hostname, pp->host_user.str, pp->host_user.len);
  139|       |
  140|  46.7k|  if(host_alen) {
  ------------------
  |  Branch (140:6): [True: 117, False: 46.6k]
  ------------------
  141|    117|    peer->hostname = peer->user_hostname + pp->host_user.len + 1;
  142|    117|    memcpy(peer->hostname, pp->host.str, pp->host.len);
  143|    117|  }
  144|       |
  145|  46.7k|  if(zone_alen) {
  ------------------
  |  Branch (145:6): [True: 74, False: 46.7k]
  ------------------
  146|     74|    peer->zoneid = peer->user_hostname + pp->host_user.len + 1 + host_alen;
  147|     74|    memcpy(peer->zoneid, pp->zoneid.str, pp->zoneid.len);
  148|     74|#ifdef USE_IPV6
  149|       |    /* Determine scope_id if not already provided */
  150|     74|    if(!peer->scopeid) {
  ------------------
  |  Branch (150:8): [True: 74, False: 0]
  ------------------
  151|     74|      const char *p = peer->zoneid;
  152|     74|      curl_off_t scope;
  153|     74|      if(!curlx_str_number(&p, &scope, UINT_MAX)) {
  ------------------
  |  Branch (153:10): [True: 34, False: 40]
  ------------------
  154|       |        /* A plain number, use it directly as a scope id. */
  155|     34|        peer->scopeid = (uint32_t)scope;
  156|     34|      }
  157|     40|#ifdef HAVE_IF_NAMETOINDEX
  158|     40|      else {
  159|       |        /* Zone identifier is not numeric */
  160|     40|        unsigned int idx = 0;
  161|     40|        idx = if_nametoindex(peer->zoneid);
  162|     40|        if(idx) {
  ------------------
  |  Branch (162:12): [True: 1, False: 39]
  ------------------
  163|      1|          peer->scopeid = (uint32_t)idx;
  164|      1|        }
  165|     39|        else {
  166|       |          /* Do we want to return an error here? */
  167|     39|        }
  168|     40|      }
  169|     74|#endif /* HAVE_IF_NAMETOINDEX */
  170|     74|    }
  171|     74|#endif /* USE_IPV6 */
  172|     74|  }
  173|       |
  174|  46.7k|out:
  175|  46.7k|  if(!result)
  ------------------
  |  Branch (175:6): [True: 46.7k, False: 0]
  ------------------
  176|  46.7k|    *ppeer = peer;
  177|      0|  else
  178|      0|    Curl_peer_unlink(&peer);
  179|  46.7k|  return result;
  180|  46.7k|}
peer.c:peer_parse_clear:
   95|  46.9k|{
   96|  46.9k|  curlx_free(pp->tmp_host_user);
  ------------------
  |  | 1483|  46.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   97|  46.9k|  curlx_free(pp->tmp_host);
  ------------------
  |  | 1483|  46.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   98|  46.9k|  curlx_free(pp->tmp_zoneid);
  ------------------
  |  | 1483|  46.9k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   99|  46.9k|  memset(pp, 0, sizeof(*pp));
  100|  46.9k|}
peer.c:peer_same_hostname:
  322|  44.3k|{
  323|       |  /* UNIX domain socket paths must be compared case-sensitive,
  324|       |   * as many filesystem are like that. */
  325|  44.3k|  return (p1->unix_socket == p2->unix_socket) &&
  ------------------
  |  Branch (325:10): [True: 44.3k, False: 1]
  ------------------
  326|  44.3k|         (p1->abstract_uds == p2->abstract_uds) &&
  ------------------
  |  Branch (326:10): [True: 44.3k, False: 0]
  ------------------
  327|  44.3k|         (p1->ipv6 == p2->ipv6) &&
  ------------------
  |  Branch (327:10): [True: 44.3k, False: 50]
  ------------------
  328|  44.3k|         (p1->unix_socket ?
  ------------------
  |  Branch (328:10): [True: 27.4k, False: 16.8k]
  |  Branch (328:11): [True: 3.61k, False: 40.6k]
  ------------------
  329|  3.61k|          !strcmp(p1->hostname, p2->hostname) :
  330|  44.3k|          curl_strequal(p1->hostname, p2->hostname));
  331|  44.3k|}

time2str:
   40|  4.65k|{
   41|  4.65k|  curl_off_t h;
   42|  4.65k|  if(seconds <= 0) {
  ------------------
  |  Branch (42:6): [True: 4.15k, False: 494]
  ------------------
   43|  4.15k|    curlx_strcopy(r, rsize, STRCONST("       "));
  ------------------
  |  | 1292|  4.15k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   44|  4.15k|    return;
   45|  4.15k|  }
   46|    494|  h = seconds / 3600;
   47|    494|  if(h <= 99) {
  ------------------
  |  Branch (47:6): [True: 108, False: 386]
  ------------------
   48|    108|    curl_off_t m = (seconds - (h * 3600)) / 60;
   49|    108|    if(h <= 9) {
  ------------------
  |  Branch (49:8): [True: 78, False: 30]
  ------------------
   50|     78|      curl_off_t s = (seconds - (h * 3600)) - (m * 60);
   51|     78|      if(h)
  ------------------
  |  Branch (51:10): [True: 40, False: 38]
  ------------------
   52|     40|        curl_msnprintf(r, rsize, "%" FMT_OFF_T ":%02" FMT_OFF_T ":"
   53|     40|                       "%02" FMT_OFF_T, h, m, s);
  ------------------
  |  |  598|     40|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|     40|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
   54|     38|      else
   55|     38|        curl_msnprintf(r, rsize, "  %02" FMT_OFF_T ":%02" FMT_OFF_T, m, s);
  ------------------
  |  |  598|     38|#define FMT_OFF_T  CURL_FORMAT_CURL_OFF_T
  |  |  ------------------
  |  |  |  |  341|     38|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  |  |  ------------------
  ------------------
   56|     78|    }
   57|     30|    else
   58|     30|      curl_msnprintf(r, rsize, "%" FMT_OFF_T "h %02" FMT_OFF_T "m", h, m);
   59|    108|  }
   60|    386|  else {
   61|    386|    curl_off_t d = seconds / 86400;
   62|    386|    h = (seconds - (d * 86400)) / 3600;
   63|    386|    if(d <= 99)
  ------------------
  |  Branch (63:8): [True: 38, False: 348]
  ------------------
   64|     38|      curl_msnprintf(r, rsize, "%2" FMT_OFF_T "d %02" FMT_OFF_T "h", d, h);
   65|    348|    else if(d <= 999)
  ------------------
  |  Branch (65:13): [True: 26, False: 322]
  ------------------
   66|     26|      curl_msnprintf(r, rsize, "%6" FMT_OFF_T "d", d);
   67|    322|    else { /* more than 999 days */
   68|    322|      curl_off_t m = d / 30;
   69|    322|      if(m <= 999)
  ------------------
  |  Branch (69:10): [True: 48, False: 274]
  ------------------
   70|     48|        curl_msnprintf(r, rsize, "%6" FMT_OFF_T "m", m);
   71|    274|      else { /* more than 999 months */
   72|    274|        curl_off_t y = d / 365;
   73|    274|        if(y <= 99999)
  ------------------
  |  Branch (73:12): [True: 68, False: 206]
  ------------------
   74|     68|          curl_msnprintf(r, rsize, "%6" FMT_OFF_T "y", y);
   75|    206|        else
   76|    206|          curlx_strcopy(r, rsize, STRCONST(">99999y"));
  ------------------
  |  | 1292|    206|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
   77|    274|      }
   78|    322|    }
   79|    386|  }
   80|    494|}
max6out:
   90|  9.30k|{
   91|       |  /* a signed 64-bit value is 8192 petabytes maximum, shown as
   92|       |     8.0E (exabytes)*/
   93|  9.30k|  if(bytes < 100000)
  ------------------
  |  Branch (93:6): [True: 8.69k, False: 608]
  ------------------
   94|  8.69k|    curl_msnprintf(max6, mlen, "%6" CURL_FORMAT_CURL_OFF_T, bytes);
  ------------------
  |  |  341|  8.69k|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
   95|    608|  else {
   96|    608|    const char unit[] = { 'k', 'M', 'G', 'T', 'P', 'E', 0 };
   97|    608|    int k = 0;
   98|    608|    curl_off_t nbytes;
   99|    608|    curl_off_t rest;
  100|  2.56k|    do {
  101|  2.56k|      nbytes = bytes / 1024;
  102|  2.56k|      if(nbytes < 1000)
  ------------------
  |  Branch (102:10): [True: 608, False: 1.95k]
  ------------------
  103|    608|        break;
  104|  1.95k|      bytes = nbytes;
  105|  1.95k|      k++;
  106|  1.95k|      DEBUGASSERT(unit[k]);
  ------------------
  |  | 1081|  1.95k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (106:7): [True: 0, False: 1.95k]
  |  Branch (106:7): [True: 1.95k, False: 0]
  ------------------
  107|  1.95k|    } while(unit[k]);
  ------------------
  |  Branch (107:13): [True: 1.95k, False: 0]
  ------------------
  108|    608|    rest = bytes % 1024;
  109|    608|    if(nbytes <= 99)
  ------------------
  |  Branch (109:8): [True: 424, False: 184]
  ------------------
  110|       |      /* xx.yyU */
  111|    424|      curl_msnprintf(max6, mlen, "%2" CURL_FORMAT_CURL_OFF_T
  112|    424|                     ".%02" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  113|    424|                     rest * 100 / 1024, unit[k]);
  114|    184|    else
  115|       |      /* xxx.yU */
  116|    184|      curl_msnprintf(max6, mlen, "%3" CURL_FORMAT_CURL_OFF_T
  117|    184|                     ".%" CURL_FORMAT_CURL_OFF_T "%c", nbytes,
  118|    184|                     rest * 10 / 1024, unit[k]);
  119|    608|  }
  120|  9.30k|  return max6;
  121|  9.30k|}
pgrs_speedcheck:
  136|   207k|{
  137|   207k|  if(!data->set.low_speed_time || !data->set.low_speed_limit ||
  ------------------
  |  Branch (137:6): [True: 206k, False: 314]
  |  Branch (137:35): [True: 114, False: 200]
  ------------------
  138|    200|     Curl_xfer_recv_is_paused(data) || Curl_xfer_send_is_paused(data))
  ------------------
  |  Branch (138:6): [True: 0, False: 200]
  |  Branch (138:40): [True: 0, False: 200]
  ------------------
  139|       |    /* A paused transfer is not qualified for speed checks */
  140|   207k|    return CURLE_OK;
  141|       |
  142|    200|  if(data->progress.current_speed >= 0) {
  ------------------
  |  Branch (142:6): [True: 200, False: 0]
  ------------------
  143|    200|    if(data->progress.current_speed < data->set.low_speed_limit) {
  ------------------
  |  Branch (143:8): [True: 200, False: 0]
  ------------------
  144|    200|      if(!data->state.keeps_speed.tv_sec)
  ------------------
  |  Branch (144:10): [True: 39, False: 161]
  ------------------
  145|       |        /* under the limit at this moment */
  146|     39|        data->state.keeps_speed = *pnow;
  147|    161|      else {
  148|       |        /* how long has it been under the limit */
  149|    161|        timediff_t howlong =
  150|    161|          curlx_ptimediff_ms(pnow, &data->state.keeps_speed);
  151|       |
  152|    161|        if(howlong >= data->set.low_speed_time * 1000) {
  ------------------
  |  Branch (152:12): [True: 0, False: 161]
  ------------------
  153|       |          /* too long */
  154|      0|          failf(data, "Operation too slow. Less than %" FMT_OFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  155|      0|                " bytes/sec transferred the last %u seconds",
  156|      0|                data->set.low_speed_limit, data->set.low_speed_time);
  157|      0|          return CURLE_OPERATION_TIMEDOUT;
  158|      0|        }
  159|    161|      }
  160|    200|    }
  161|      0|    else
  162|       |      /* faster right now */
  163|      0|      data->state.keeps_speed.tv_sec = 0;
  164|    200|  }
  165|       |
  166|       |  /* since low speed limit is enabled, set the expire timer to make this
  167|       |     connection's speed get checked again in a second */
  168|    200|  Curl_expire(data, 1000, EXPIRE_SPEEDCHECK);
  169|       |
  170|    200|  return CURLE_OK;
  171|    200|}
Curl_pgrs_now:
  174|  12.3M|{
  175|  12.3M|  struct curltime *pnow = data->multi ?
  ------------------
  |  Branch (175:27): [True: 12.3M, False: 2.04k]
  ------------------
  176|  12.3M|                          &data->multi->now : &data->progress.now;
  177|  12.3M|  curlx_pnow(pnow);
  178|  12.3M|  return pnow;
  179|  12.3M|}
Curl_pgrsDone:
  194|  17.3k|{
  195|  17.3k|  int rc;
  196|  17.3k|  data->progress.lastshow = 0;
  197|  17.3k|  rc = Curl_pgrsUpdate(data); /* the final (forced) update */
  198|  17.3k|  if(rc)
  ------------------
  |  Branch (198:6): [True: 0, False: 17.3k]
  ------------------
  199|      0|    return rc;
  200|       |
  201|  17.3k|  if(!data->progress.hide && !data->progress.callback)
  ------------------
  |  Branch (201:6): [True: 515, False: 16.8k]
  |  Branch (201:30): [True: 515, False: 0]
  ------------------
  202|       |    /* only output if we do not use a progress callback and we are not
  203|       |     * hidden */
  204|    515|    curl_mfprintf(data->set.err, "\n");
  205|       |
  206|  17.3k|  return 0;
  207|  17.3k|}
Curl_pgrsReset:
  210|  21.3k|{
  211|  21.3k|  Curl_pgrsSetUploadCounter(data, 0);
  212|  21.3k|  data->progress.dl.cur_size = 0;
  213|  21.3k|  Curl_pgrsSetUploadSize(data, -1);
  214|  21.3k|  Curl_pgrsSetDownloadSize(data, -1);
  215|  21.3k|  data->progress.speeder_c = 0; /* reset speed records */
  216|  21.3k|  data->progress.deliver = 0;
  217|  21.3k|  pgrs_speedinit(data);
  218|  21.3k|}
Curl_pgrsResetTransferSizes:
  222|  23.1k|{
  223|  23.1k|  Curl_pgrsSetDownloadSize(data, -1);
  224|  23.1k|  Curl_pgrsSetUploadSize(data, -1);
  225|  23.1k|}
Curl_pgrsTimeWas:
  248|   137k|{
  249|   137k|  timediff_t *delta = NULL;
  250|       |
  251|   137k|  switch(timer) {
  252|      0|  default:
  ------------------
  |  Branch (252:3): [True: 0, False: 137k]
  ------------------
  253|      0|  case TIMER_NONE:
  ------------------
  |  Branch (253:3): [True: 0, False: 137k]
  ------------------
  254|       |    /* mistake filter */
  255|      0|    break;
  256|  12.4k|  case TIMER_STARTOP:
  ------------------
  |  Branch (256:3): [True: 12.4k, False: 124k]
  ------------------
  257|       |    /* This is set at the start of a transfer */
  258|  12.4k|    data->progress.t_startop = timestamp;
  259|  12.4k|    data->progress.t_startqueue = timestamp;
  260|  12.4k|    data->progress.t_postqueue = 0;
  261|  12.4k|    break;
  262|  23.1k|  case TIMER_STARTSINGLE:
  ------------------
  |  Branch (262:3): [True: 23.1k, False: 114k]
  ------------------
  263|       |    /* This is set at the start of each single transfer */
  264|  23.1k|    data->progress.t_startsingle = timestamp;
  265|  23.1k|    data->progress.is_t_startransfer_set = FALSE;
  ------------------
  |  | 1058|  23.1k|#define FALSE false
  ------------------
  266|  23.1k|    break;
  267|  21.3k|  case TIMER_POSTQUEUE:
  ------------------
  |  Branch (267:3): [True: 21.3k, False: 115k]
  ------------------
  268|       |    /* Queue time is accumulative from all involved redirects */
  269|  21.3k|    data->progress.t_postqueue +=
  270|  21.3k|      curlx_ptimediff_us(&timestamp, &data->progress.t_startqueue);
  271|  21.3k|    break;
  272|      0|  case TIMER_STARTACCEPT:
  ------------------
  |  Branch (272:3): [True: 0, False: 137k]
  ------------------
  273|      0|    data->progress.t_acceptdata = timestamp;
  274|      0|    break;
  275|  10.3k|  case TIMER_NAMELOOKUP:
  ------------------
  |  Branch (275:3): [True: 10.3k, False: 126k]
  ------------------
  276|  10.3k|    delta = &data->progress.t_nslookup;
  277|  10.3k|    break;
  278|  10.0k|  case TIMER_CONNECT:
  ------------------
  |  Branch (278:3): [True: 10.0k, False: 127k]
  ------------------
  279|  10.0k|    delta = &data->progress.t_connect;
  280|  10.0k|    break;
  281|      0|  case TIMER_APPCONNECT:
  ------------------
  |  Branch (281:3): [True: 0, False: 137k]
  ------------------
  282|      0|    delta = &data->progress.t_appconnect;
  283|      0|    break;
  284|  17.3k|  case TIMER_PRETRANSFER:
  ------------------
  |  Branch (284:3): [True: 17.3k, False: 119k]
  ------------------
  285|  17.3k|    delta = &data->progress.t_pretransfer;
  286|  17.3k|    break;
  287|  14.7k|  case TIMER_STARTTRANSFER:
  ------------------
  |  Branch (287:3): [True: 14.7k, False: 122k]
  ------------------
  288|  14.7k|    delta = &data->progress.t_starttransfer;
  289|       |    /* prevent updating t_starttransfer unless:
  290|       |     *   1. this is the first time we are setting t_starttransfer
  291|       |     *   2. a redirect has occurred since the last time t_starttransfer was set
  292|       |     * This prevents repeated invocations of the function from incorrectly
  293|       |     * changing the t_starttransfer time.
  294|       |     */
  295|  14.7k|    if(data->progress.is_t_startransfer_set) {
  ------------------
  |  Branch (295:8): [True: 0, False: 14.7k]
  ------------------
  296|      0|      return;
  297|      0|    }
  298|  14.7k|    else {
  299|  14.7k|      data->progress.is_t_startransfer_set = TRUE;
  ------------------
  |  | 1055|  14.7k|#define TRUE true
  ------------------
  300|  14.7k|      break;
  301|  14.7k|    }
  302|  17.2k|  case TIMER_POSTRANSFER:
  ------------------
  |  Branch (302:3): [True: 17.2k, False: 119k]
  ------------------
  303|  17.2k|    delta = &data->progress.t_posttransfer;
  304|  17.2k|    break;
  305|  10.6k|  case TIMER_REDIRECT:
  ------------------
  |  Branch (305:3): [True: 10.6k, False: 126k]
  ------------------
  306|  10.6k|    data->progress.t_redirect = curlx_ptimediff_us(&timestamp,
  307|  10.6k|                                                   &data->progress.start);
  308|  10.6k|    data->progress.t_startqueue = timestamp;
  309|  10.6k|    break;
  310|   137k|  }
  311|   137k|  if(delta) {
  ------------------
  |  Branch (311:6): [True: 69.6k, False: 67.5k]
  ------------------
  312|  69.6k|    timediff_t us = curlx_ptimediff_us(&timestamp,
  313|  69.6k|                                       &data->progress.t_startsingle);
  314|  69.6k|    if(us < 1)
  ------------------
  |  Branch (314:8): [True: 0, False: 69.6k]
  ------------------
  315|      0|      us = 1; /* make sure at least one microsecond passed */
  316|  69.6k|    *delta += us;
  317|  69.6k|  }
  318|   137k|}
Curl_pgrsTime:
  327|   127k|{
  328|   127k|  Curl_pgrsTimeWas(data, timer, *Curl_pgrs_now(data));
  329|   127k|}
Curl_pgrsStartNow:
  332|  12.4k|{
  333|  12.4k|  struct Progress *p = &data->progress;
  334|       |
  335|  12.4k|  p->speeder_c = 0; /* reset the progress meter display */
  336|  12.4k|  p->start = *Curl_pgrs_now(data);
  337|  12.4k|  p->is_t_startransfer_set = FALSE;
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  338|  12.4k|  p->dl.cur_size = 0;
  339|  12.4k|  p->ul.cur_size = 0;
  340|       |  /* the sizes are unknown at start */
  341|  12.4k|  p->dl_size_known = FALSE;
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  342|       |  p->ul_size_known = FALSE;
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  343|  12.4k|}
Curl_pgrs_deliver_check:
  348|  1.50M|{
  349|  1.50M|  if(data->set.max_filesize &&
  ------------------
  |  Branch (349:6): [True: 515, False: 1.50M]
  ------------------
  350|    515|     ((curl_off_t)delta > data->set.max_filesize - data->progress.deliver)) {
  ------------------
  |  Branch (350:6): [True: 3, False: 512]
  ------------------
  351|      3|    failf(data, "Would have exceeded max file size");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  352|      3|    return CURLE_FILESIZE_EXCEEDED;
  353|      3|  }
  354|  1.50M|  return CURLE_OK;
  355|  1.50M|}
Curl_pgrs_deliver_inc:
  360|  1.50M|{
  361|  1.50M|  data->progress.deliver += delta;
  362|  1.50M|}
Curl_pgrs_download_inc:
  365|  1.50M|{
  366|  1.50M|  if(delta) {
  ------------------
  |  Branch (366:6): [True: 1.50M, False: 0]
  ------------------
  367|  1.50M|    data->progress.dl.cur_size += delta;
  368|  1.50M|    Curl_rlimit_drain(&data->progress.dl.rlimit, delta, Curl_pgrs_now(data));
  369|  1.50M|  }
  370|  1.50M|}
Curl_pgrs_upload_inc:
  373|  1.10k|{
  374|  1.10k|  if(delta) {
  ------------------
  |  Branch (374:6): [True: 1.10k, False: 0]
  ------------------
  375|  1.10k|    data->progress.ul.cur_size += delta;
  376|  1.10k|    Curl_rlimit_drain(&data->progress.ul.rlimit, delta, Curl_pgrs_now(data));
  377|  1.10k|  }
  378|  1.10k|}
Curl_pgrsSetUploadCounter:
  384|  22.3k|{
  385|  22.3k|  data->progress.ul.cur_size = size;
  386|  22.3k|}
Curl_pgrsSetDownloadSize:
  389|  49.8k|{
  390|  49.8k|  if(size >= 0) {
  ------------------
  |  Branch (390:6): [True: 5.40k, False: 44.4k]
  ------------------
  391|  5.40k|    data->progress.dl.total_size = size;
  392|  5.40k|    data->progress.dl_size_known = TRUE;
  ------------------
  |  | 1055|  5.40k|#define TRUE true
  ------------------
  393|  5.40k|  }
  394|  44.4k|  else {
  395|  44.4k|    data->progress.dl.total_size = 0;
  396|       |    data->progress.dl_size_known = FALSE;
  ------------------
  |  | 1058|  44.4k|#define FALSE false
  ------------------
  397|  44.4k|  }
  398|  49.8k|}
Curl_pgrsSetUploadSize:
  401|  44.4k|{
  402|  44.4k|  if(size >= 0) {
  ------------------
  |  Branch (402:6): [True: 0, False: 44.4k]
  ------------------
  403|      0|    data->progress.ul.total_size = size;
  404|      0|    data->progress.ul_size_known = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  405|      0|  }
  406|  44.4k|  else {
  407|  44.4k|    data->progress.ul.total_size = 0;
  408|       |    data->progress.ul_size_known = FALSE;
  ------------------
  |  | 1058|  44.4k|#define FALSE false
  ------------------
  409|  44.4k|  }
  410|  44.4k|}
Curl_pgrsUpdate:
  685|  2.23M|{
  686|  2.23M|  return pgrs_update(data, Curl_pgrs_now(data));
  687|  2.23M|}
Curl_pgrsCheck:
  690|   207k|{
  691|   207k|  CURLcode result;
  692|       |
  693|   207k|  result = pgrs_update(data, Curl_pgrs_now(data));
  694|   207k|  if(!result && !data->req.done)
  ------------------
  |  Branch (694:6): [True: 207k, False: 0]
  |  Branch (694:17): [True: 207k, False: 0]
  ------------------
  695|   207k|    result = pgrs_speedcheck(data, Curl_pgrs_now(data));
  696|   207k|  return result;
  697|   207k|}
Curl_pgrsUpdate_nometer:
  703|  1.72k|{
  704|  1.72k|  (void)progress_calc(data, Curl_pgrs_now(data));
  705|  1.72k|}
progress.c:pgrs_speedinit:
  125|  21.3k|{
  126|  21.3k|  memset(&data->state.keeps_speed, 0, sizeof(struct curltime));
  127|  21.3k|}
progress.c:pgrs_update:
  679|  2.44M|{
  680|       |  bool showprogress = progress_calc(data, pnow);
  681|  2.44M|  return pgrsupdate(data, showprogress);
  682|  2.44M|}
progress.c:pgrsupdate:
  632|  2.44M|{
  633|  2.44M|  if(!data->progress.hide) {
  ------------------
  |  Branch (633:6): [True: 5.04k, False: 2.44M]
  ------------------
  634|  5.04k|    int rc;
  635|  5.04k|    if(data->set.fxferinfo) {
  ------------------
  |  Branch (635:8): [True: 0, False: 5.04k]
  ------------------
  636|       |      /* There is a callback set, call that */
  637|      0|      Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  638|      0|      rc = data->set.fxferinfo(data->set.progress_client,
  639|      0|                               data->progress.dl.total_size,
  640|      0|                               data->progress.dl.cur_size,
  641|      0|                               data->progress.ul.total_size,
  642|      0|                               data->progress.ul.cur_size);
  643|      0|      Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  644|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (644:10): [True: 0, False: 0]
  ------------------
  645|      0|        if(rc) {
  ------------------
  |  Branch (645:12): [True: 0, False: 0]
  ------------------
  646|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  647|      0|          return CURLE_ABORTED_BY_CALLBACK;
  648|      0|        }
  649|      0|        return CURLE_OK;
  650|      0|      }
  651|      0|    }
  652|  5.04k|    else if(data->set.fprogress) {
  ------------------
  |  Branch (652:13): [True: 0, False: 5.04k]
  ------------------
  653|       |      /* The older deprecated callback is set, call that */
  654|      0|      Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  655|      0|      rc = data->set.fprogress(data->set.progress_client,
  656|      0|                               (double)data->progress.dl.total_size,
  657|      0|                               (double)data->progress.dl.cur_size,
  658|      0|                               (double)data->progress.ul.total_size,
  659|      0|                               (double)data->progress.ul.cur_size);
  660|      0|      Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  661|      0|      if(rc != CURL_PROGRESSFUNC_CONTINUE) {
  ------------------
  |  |  234|      0|#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
  ------------------
  |  Branch (661:10): [True: 0, False: 0]
  ------------------
  662|      0|        if(rc) {
  ------------------
  |  Branch (662:12): [True: 0, False: 0]
  ------------------
  663|      0|          failf(data, "Callback aborted");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  664|      0|          return CURLE_ABORTED_BY_CALLBACK;
  665|      0|        }
  666|      0|        return CURLE_OK;
  667|      0|      }
  668|      0|    }
  669|       |
  670|  5.04k|    if(showprogress)
  ------------------
  |  Branch (670:8): [True: 1.55k, False: 3.49k]
  ------------------
  671|  1.55k|      progress_meter(data);
  672|  5.04k|  }
  673|       |
  674|  2.44M|  return CURLE_OK;
  675|  2.44M|}
progress.c:progress_meter:
  538|  1.55k|{
  539|  1.55k|  struct Progress *p = &data->progress;
  540|  1.55k|  char max6[6][7];
  541|  1.55k|  struct pgrs_estimate dl_estm;
  542|  1.55k|  struct pgrs_estimate ul_estm;
  543|  1.55k|  struct pgrs_estimate total_estm;
  544|  1.55k|  curl_off_t total_cur_size;
  545|  1.55k|  curl_off_t total_expected_size;
  546|  1.55k|  curl_off_t dl_size;
  547|  1.55k|  char time_left[8];
  548|  1.55k|  char time_total[8];
  549|  1.55k|  char time_spent[8];
  550|  1.55k|  curl_off_t cur_secs = (curl_off_t)p->timespent / 1000000; /* seconds */
  551|       |
  552|  1.55k|  if(!p->headers_out) {
  ------------------
  |  Branch (552:6): [True: 354, False: 1.19k]
  ------------------
  553|    354|    if(data->state.resume_from) {
  ------------------
  |  Branch (553:8): [True: 64, False: 290]
  ------------------
  554|     64|      curl_mfprintf(data->set.err,
  555|     64|                    "** Resuming transfer from byte position %" FMT_OFF_T "\n",
  556|     64|                    data->state.resume_from);
  557|     64|    }
  558|    354|    curl_mfprintf(data->set.err,
  559|    354|                  "  %% Total    %% Received %% Xferd  Average Speed  "
  560|    354|                  "Time    Time    Time   Current\n"
  561|    354|                  "                                 Dload  Upload  "
  562|    354|                  "Total   Spent   Left   Speed\n");
  563|    354|    p->headers_out = TRUE; /* headers are shown */
  ------------------
  |  | 1055|    354|#define TRUE true
  ------------------
  564|    354|  }
  565|       |
  566|       |  /* Figure out the estimated time of arrival for upload and download */
  567|  1.55k|  pgrs_estimates(&p->ul, (bool)p->ul_size_known, &ul_estm);
  568|  1.55k|  pgrs_estimates(&p->dl, (bool)p->dl_size_known, &dl_estm);
  569|       |
  570|       |  /* Since both happen at the same time, total expected duration is max. */
  571|  1.55k|  total_estm.secs = CURLMAX(ul_estm.secs, dl_estm.secs);
  ------------------
  |  | 1286|  1.55k|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 1.55k]
  |  |  ------------------
  ------------------
  572|       |  /* create the three time strings */
  573|  1.55k|  time2str(time_left, sizeof(time_left),
  574|  1.55k|           total_estm.secs > 0 ? (total_estm.secs - cur_secs) : 0);
  ------------------
  |  Branch (574:12): [True: 247, False: 1.30k]
  ------------------
  575|  1.55k|  time2str(time_total, sizeof(time_total), total_estm.secs);
  576|  1.55k|  time2str(time_spent, sizeof(time_spent), cur_secs);
  577|       |
  578|       |  /* Get the total amount of data expected to get transferred */
  579|  1.55k|  total_expected_size = p->ul_size_known ? p->ul.total_size : p->ul.cur_size;
  ------------------
  |  Branch (579:25): [True: 0, False: 1.55k]
  ------------------
  580|       |
  581|  1.55k|  dl_size = p->dl_size_known ? p->dl.total_size : p->dl.cur_size;
  ------------------
  |  Branch (581:13): [True: 700, False: 850]
  ------------------
  582|       |
  583|       |  /* integer overflow check */
  584|  1.55k|  if((CURL_OFF_T_MAX - total_expected_size) < dl_size)
  ------------------
  |  |  594|  1.55k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (584:6): [True: 3, False: 1.54k]
  ------------------
  585|      3|    total_expected_size = CURL_OFF_T_MAX; /* capped */
  ------------------
  |  |  594|      3|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  586|  1.54k|  else
  587|  1.54k|    total_expected_size += dl_size;
  588|       |
  589|       |  /* We have transferred this much so far */
  590|  1.55k|  total_cur_size = p->dl.cur_size + p->ul.cur_size;
  591|       |
  592|       |  /* Get the percentage of data transferred so far */
  593|  1.55k|  total_estm.percent = pgrs_est_percent(total_expected_size, total_cur_size);
  594|       |
  595|  1.55k|  curl_mfprintf(data->set.err,
  596|  1.55k|                "\r"
  597|  1.55k|                "%3" FMT_OFF_T " %s "
  598|  1.55k|                "%3" FMT_OFF_T " %s "
  599|  1.55k|                "%3" FMT_OFF_T " %s %s %s %s %s %s %s",
  600|  1.55k|                total_estm.percent, /* 3 letters */    /* total % */
  601|  1.55k|                max6out(total_expected_size, max6[2],
  602|  1.55k|                        sizeof(max6[2])),              /* total size */
  603|  1.55k|                dl_estm.percent, /* 3 letters */       /* rcvd % */
  604|  1.55k|                max6out(p->dl.cur_size, max6[0],
  605|  1.55k|                        sizeof(max6[0])),              /* rcvd size */
  606|  1.55k|                ul_estm.percent, /* 3 letters */       /* xfer % */
  607|  1.55k|                max6out(p->ul.cur_size, max6[1],
  608|  1.55k|                        sizeof(max6[1])),              /* xfer size */
  609|  1.55k|                max6out(p->dl.speed, max6[3],
  610|  1.55k|                        sizeof(max6[3])),              /* avrg dl speed */
  611|  1.55k|                max6out(p->ul.speed, max6[4],
  612|  1.55k|                        sizeof(max6[4])),              /* avrg ul speed */
  613|  1.55k|                time_total,    /* 7 letters */         /* total time */
  614|  1.55k|                time_spent,    /* 7 letters */         /* time spent */
  615|  1.55k|                time_left,     /* 7 letters */         /* time left */
  616|  1.55k|                max6out(p->current_speed, max6[5],
  617|  1.55k|                        sizeof(max6[5]))               /* current speed */
  618|  1.55k|    );
  619|       |
  620|       |  /* we flush the output stream to make it appear as soon as possible */
  621|  1.55k|  fflush(data->set.err);
  622|  1.55k|}
progress.c:pgrs_estimates:
  528|  3.10k|{
  529|  3.10k|  est->secs = 0;
  530|  3.10k|  est->percent = 0;
  531|  3.10k|  if(total_known && (d->speed > 0)) {
  ------------------
  |  Branch (531:6): [True: 700, False: 2.40k]
  |  Branch (531:21): [True: 266, False: 434]
  ------------------
  532|    266|    est->secs = d->total_size / d->speed;
  533|    266|    est->percent = pgrs_est_percent(d->total_size, d->cur_size);
  534|    266|  }
  535|  3.10k|}
progress.c:pgrs_est_percent:
  517|  1.81k|{
  518|  1.81k|  if(total > 10000)
  ------------------
  |  Branch (518:6): [True: 773, False: 1.04k]
  ------------------
  519|    773|    return cur / (total / 100);
  520|  1.04k|  else if(total > 0)
  ------------------
  |  Branch (520:11): [True: 153, False: 890]
  ------------------
  521|    153|    return (cur * 100) / total;
  522|    890|  return 0;
  523|  1.81k|}
progress.c:progress_calc:
  434|  2.44M|{
  435|  2.44M|  struct Progress * const p = &data->progress;
  436|  2.44M|  int i_next, i_oldest, i_latest;
  437|  2.44M|  timediff_t duration_us;
  438|  2.44M|  curl_off_t amount;
  439|       |
  440|       |  /* The time spent so far (from the start) in microseconds */
  441|  2.44M|  p->timespent = curlx_ptimediff_us(pnow, &p->start);
  442|  2.44M|  p->dl.speed = trspeed(p->dl.cur_size, p->timespent);
  443|  2.44M|  p->ul.speed = trspeed(p->ul.cur_size, p->timespent);
  444|       |
  445|  2.44M|  if(!p->speeder_c) { /* no previous record exists */
  ------------------
  |  Branch (445:6): [True: 19.6k, False: 2.42M]
  ------------------
  446|  19.6k|    p->speed_amount[0] = p->dl.cur_size + p->ul.cur_size;
  447|  19.6k|    p->speed_time[0] = *pnow;
  448|  19.6k|    p->speeder_c++;
  449|       |    /* use the overall average at the start */
  450|  19.6k|    p->current_speed = p->ul.speed + p->dl.speed;
  451|  19.6k|    p->lastshow = pnow->tv_sec;
  452|  19.6k|    return TRUE;
  ------------------
  |  | 1055|  19.6k|#define TRUE true
  ------------------
  453|  19.6k|  }
  454|       |  /* We have at least one record now. Where to put the next and
  455|       |   * where is the latest one? */
  456|  2.42M|  i_next = p->speeder_c % CURL_SPEED_RECORDS;
  ------------------
  |  |  542|  2.42M|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  457|  2.42M|  i_latest = (i_next > 0) ? (i_next - 1) : (CURL_SPEED_RECORDS - 1);
  ------------------
  |  |  542|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (457:14): [True: 2.42M, False: 0]
  ------------------
  458|       |
  459|       |  /* Make a new record only when some time has passed.
  460|       |   * Too frequent calls otherwise ruin the history. */
  461|  2.42M|  if(curlx_ptimediff_ms(pnow, &p->speed_time[i_latest]) >= 1000) {
  ------------------
  |  Branch (461:6): [True: 0, False: 2.42M]
  ------------------
  462|      0|    p->speeder_c++;
  463|      0|    i_latest = i_next;
  464|      0|    p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  465|      0|    p->speed_time[i_latest] = *pnow;
  466|      0|  }
  467|  2.42M|  else if(data->req.done) {
  ------------------
  |  Branch (467:11): [True: 33.6k, False: 2.39M]
  ------------------
  468|       |    /* When a transfer is done, and we did not have a current speed
  469|       |     * already, update the last record. Otherwise, stay at the speed
  470|       |     * we have. The last chunk of data, when rate limiting, would increase
  471|       |     * reported speed since it no longer measures a full second. */
  472|  33.6k|    if(!p->current_speed) {
  ------------------
  |  Branch (472:8): [True: 33.6k, False: 0]
  ------------------
  473|  33.6k|      p->speed_amount[i_latest] = p->dl.cur_size + p->ul.cur_size;
  474|  33.6k|      p->speed_time[i_latest] = *pnow;
  475|  33.6k|    }
  476|  33.6k|  }
  477|  2.39M|  else {
  478|       |    /* transfer ongoing, wait for more time to pass. */
  479|  2.39M|    return FALSE;
  ------------------
  |  | 1058|  2.39M|#define FALSE false
  ------------------
  480|  2.39M|  }
  481|       |
  482|  33.6k|  i_oldest = (p->speeder_c < CURL_SPEED_RECORDS) ? 0 :
  ------------------
  |  |  542|  33.6k|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  |  Branch (482:14): [True: 33.6k, False: 0]
  ------------------
  483|  33.6k|             ((i_latest + 1) % CURL_SPEED_RECORDS);
  ------------------
  |  |  542|      0|#define CURL_SPEED_RECORDS (5 + 1) /* 6 entries for 5 seconds */
  ------------------
  484|       |
  485|       |  /* How much we transferred between oldest and current records */
  486|  33.6k|  amount = p->speed_amount[i_latest] - p->speed_amount[i_oldest];
  487|       |  /* How long this took */
  488|  33.6k|  duration_us = curlx_ptimediff_us(&p->speed_time[i_latest],
  489|  33.6k|                                   &p->speed_time[i_oldest]);
  490|  33.6k|  if(duration_us <= 0)
  ------------------
  |  Branch (490:6): [True: 33.6k, False: 0]
  ------------------
  491|  33.6k|    duration_us = 1;
  492|       |
  493|  33.6k|  if(amount > (CURL_OFF_T_MAX / 1000000)) {
  ------------------
  |  |  594|  33.6k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (493:6): [True: 0, False: 33.6k]
  ------------------
  494|       |    /* the 'amount' value is bigger than would fit in 64 bits if
  495|       |       multiplied with 1000000, so we use the double math for this */
  496|      0|    p->current_speed =
  497|      0|      (curl_off_t)(((double)amount * 1000000.0) / (double)duration_us);
  498|      0|  }
  499|  33.6k|  else {
  500|  33.6k|    p->current_speed = amount * 1000000 / duration_us;
  501|  33.6k|  }
  502|       |
  503|  33.6k|  if((p->lastshow == pnow->tv_sec) && !data->req.done)
  ------------------
  |  Branch (503:6): [True: 18.8k, False: 14.8k]
  |  Branch (503:39): [True: 0, False: 18.8k]
  ------------------
  504|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  505|  33.6k|  p->lastshow = pnow->tv_sec;
  506|       |  return TRUE;
  ------------------
  |  | 1055|  33.6k|#define TRUE true
  ------------------
  507|  33.6k|}
progress.c:trspeed:
  420|  4.89M|{
  421|  4.89M|  if(us < 1)
  ------------------
  |  Branch (421:6): [True: 0, False: 4.89M]
  ------------------
  422|      0|    return size * 1000000;
  423|  4.89M|  else if(size < CURL_OFF_T_MAX / 1000000)
  ------------------
  |  |  594|  4.89M|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  |  Branch (423:11): [True: 4.89M, False: 0]
  ------------------
  424|  4.89M|    return (size * 1000000) / us;
  425|      0|  else if(us >= 1000000)
  ------------------
  |  Branch (425:11): [True: 0, False: 0]
  ------------------
  426|      0|    return size / (us / 1000000);
  427|      0|  else
  428|      0|    return CURL_OFF_T_MAX;
  ------------------
  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  ------------------
  429|  4.89M|}

Curl_getn_scheme:
  469|   164k|{
  470|       |  /* table generated by schemetable.c:
  471|       |     1. gcc schemetable.c && ./a.out
  472|       |     2. check how small the table gets
  473|       |     3. tweak the hash algorithm, then rerun from 1
  474|       |     4. when the table is good enough
  475|       |     5. copy the table into this source code
  476|       |     6. make sure this function uses the same hash function that worked for
  477|       |     schemetable.c
  478|       |     */
  479|   164k|  static const struct Curl_scheme * const all_schemes[59] = { NULL,
  480|   164k|    &Curl_scheme_pop3, NULL,
  481|   164k|    &Curl_scheme_smtps,
  482|   164k|    &Curl_scheme_socks,
  483|   164k|    &Curl_scheme_socks4,
  484|   164k|    &Curl_scheme_socks5, NULL, NULL,
  485|   164k|    &Curl_scheme_gophers,
  486|   164k|    &Curl_scheme_ws,
  487|   164k|    &Curl_scheme_sftp,
  488|   164k|    &Curl_scheme_socks4a,
  489|   164k|    &Curl_scheme_scp,
  490|   164k|    &Curl_scheme_rtsp,
  491|   164k|    &Curl_scheme_dict, NULL, NULL,
  492|   164k|    &Curl_scheme_gopher, NULL, NULL, NULL,
  493|   164k|    &Curl_scheme_wss, NULL,
  494|   164k|    &Curl_scheme_smb, NULL,
  495|   164k|    &Curl_scheme_ldap,
  496|   164k|    &Curl_scheme_ldaps,
  497|   164k|    &Curl_scheme_imap, NULL, NULL, NULL,
  498|   164k|    &Curl_scheme_imaps,
  499|   164k|    &Curl_scheme_https,
  500|   164k|    &Curl_scheme_tftp,
  501|   164k|    &Curl_scheme_telnet, NULL, NULL, NULL,
  502|   164k|    &Curl_scheme_file,
  503|   164k|    &Curl_scheme_smtp, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  504|   164k|    &Curl_scheme_ftp,
  505|   164k|    &Curl_scheme_mqtt, NULL,
  506|   164k|    &Curl_scheme_socks5h,
  507|   164k|    &Curl_scheme_http,
  508|   164k|    &Curl_scheme_pop3s, NULL,
  509|   164k|    &Curl_scheme_mqtts, NULL,
  510|   164k|    &Curl_scheme_smbs,
  511|   164k|    &Curl_scheme_ftps,
  512|   164k|  };
  513|       |
  514|   164k|  if(len && (len <= 7)) {
  ------------------
  |  Branch (514:6): [True: 164k, False: 0]
  |  Branch (514:13): [True: 164k, False: 41]
  ------------------
  515|   164k|    const char *s = scheme;
  516|   164k|    size_t l = len;
  517|   164k|    const struct Curl_scheme *h;
  518|   164k|    unsigned int c = 443;
  519|   823k|    while(l) {
  ------------------
  |  Branch (519:11): [True: 659k, False: 164k]
  ------------------
  520|   659k|      c <<= 5;
  521|   659k|      c += (unsigned int)Curl_raw_tolower(*s);
  522|   659k|      s++;
  523|   659k|      l--;
  524|   659k|    }
  525|       |
  526|   164k|    h = all_schemes[c % 59];
  527|   164k|    if(h && curl_strnequal(scheme, h->name, len) && !h->name[len])
  ------------------
  |  Branch (527:8): [True: 164k, False: 61]
  |  Branch (527:13): [True: 163k, False: 123]
  |  Branch (527:53): [True: 163k, False: 23]
  ------------------
  528|   163k|      return h;
  529|   164k|  }
  530|    248|  return NULL;
  531|   164k|}
Curl_get_scheme:
  534|   148k|{
  535|   148k|  return Curl_getn_scheme(scheme, strlen(scheme));
  536|   148k|}

Curl_rand_bytes:
  160|    151|{
  161|    151|  CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT;
  162|       |#ifndef DEBUGBUILD
  163|       |  const bool env_override = FALSE;
  164|       |#endif
  165|       |
  166|    151|  DEBUGASSERT(num);
  ------------------
  |  | 1081|    151|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 151]
  |  Branch (166:3): [True: 151, False: 0]
  ------------------
  167|       |
  168|    586|  while(num) {
  ------------------
  |  Branch (168:9): [True: 435, False: 151]
  ------------------
  169|    435|    unsigned int r;
  170|    435|    size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int);
  ------------------
  |  Branch (170:19): [True: 0, False: 435]
  ------------------
  171|       |
  172|    435|    result = randit(data, &r, env_override);
  173|    435|    if(result)
  ------------------
  |  Branch (173:8): [True: 0, False: 435]
  ------------------
  174|      0|      return result;
  175|       |
  176|  2.17k|    while(left) {
  ------------------
  |  Branch (176:11): [True: 1.74k, False: 435]
  ------------------
  177|  1.74k|      *rnd++ = (unsigned char)(r & 0xFF);
  178|  1.74k|      r >>= 8;
  179|  1.74k|      --num;
  180|  1.74k|      --left;
  181|  1.74k|    }
  182|    435|  }
  183|       |
  184|    151|  return result;
  185|    151|}
Curl_rand_alnum:
  225|    353|{
  226|    353|  CURLcode result = CURLE_OK;
  227|    353|  const unsigned int alnumspace = sizeof(alnum) - 1;
  228|    353|  unsigned int r;
  229|    353|  DEBUGASSERT(num > 1);
  ------------------
  |  | 1081|    353|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (229:3): [True: 0, False: 353]
  |  Branch (229:3): [True: 353, False: 0]
  ------------------
  230|       |
  231|    353|  num--; /* save one for null-termination */
  232|       |
  233|  8.11k|  while(num) {
  ------------------
  |  Branch (233:9): [True: 7.76k, False: 353]
  ------------------
  234|  7.76k|    do {
  235|  7.76k|      result = randit(data, &r, TRUE);
  ------------------
  |  | 1055|  7.76k|#define TRUE true
  ------------------
  236|  7.76k|      if(result)
  ------------------
  |  Branch (236:10): [True: 0, False: 7.76k]
  ------------------
  237|      0|        return result;
  238|  7.76k|    } while(r >= (UINT_MAX - UINT_MAX % alnumspace));
  ------------------
  |  Branch (238:13): [True: 0, False: 7.76k]
  ------------------
  239|       |
  240|  7.76k|    *rnd++ = (unsigned char)alnum[r % alnumspace];
  241|  7.76k|    num--;
  242|  7.76k|  }
  243|    353|  *rnd = 0;
  244|       |
  245|    353|  return result;
  246|    353|}
rand.c:randit:
  105|  8.20k|{
  106|  8.20k|#ifdef DEBUGBUILD
  107|  8.20k|  if(env_override) {
  ------------------
  |  Branch (107:6): [True: 8.20k, False: 0]
  ------------------
  108|  8.20k|    char *force_entropy = getenv("CURL_ENTROPY");
  109|  8.20k|    if(force_entropy) {
  ------------------
  |  Branch (109:8): [True: 0, False: 8.20k]
  ------------------
  110|      0|      static unsigned int randseed;
  111|      0|      static bool seeded = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  112|       |
  113|      0|      if(!seeded) {
  ------------------
  |  Branch (113:10): [True: 0, False: 0]
  ------------------
  114|      0|        unsigned int seed = 0;
  115|      0|        size_t elen = strlen(force_entropy);
  116|      0|        size_t clen = sizeof(seed);
  117|      0|        size_t min = elen < clen ? elen : clen;
  ------------------
  |  Branch (117:22): [True: 0, False: 0]
  ------------------
  118|      0|        memcpy((char *)&seed, force_entropy, min);
  119|      0|        randseed = ntohl(seed);
  120|      0|        seeded = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  121|      0|      }
  122|      0|      else
  123|      0|        randseed++;
  124|      0|      *rnd = randseed;
  125|      0|      return CURLE_OK;
  126|      0|    }
  127|  8.20k|  }
  128|       |#else
  129|       |  (void)env_override;
  130|       |#endif
  131|       |
  132|       |  /* data may be NULL! */
  133|  8.20k|#ifdef USE_SSL
  134|  8.20k|  return Curl_ssl_random(data, (unsigned char *)rnd, sizeof(*rnd));
  135|       |#else
  136|       |  return weak_random(data, (unsigned char *)rnd, sizeof(*rnd));
  137|       |#endif
  138|  8.20k|}

Curl_rlimit_init:
  156|  2.04k|{
  157|  2.04k|  DEBUGASSERT(rate_per_sec >= 0);
  ------------------
  |  | 1081|  2.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (157:3): [True: 0, False: 2.04k]
  |  Branch (157:3): [True: 2.04k, False: 0]
  ------------------
  158|  2.04k|  DEBUGASSERT(burst_per_sec >= rate_per_sec || !burst_per_sec);
  ------------------
  |  | 1081|  2.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (158:3): [True: 2.04k, False: 0]
  |  Branch (158:3): [True: 0, False: 0]
  |  Branch (158:3): [True: 2.04k, False: 0]
  |  Branch (158:3): [True: 0, False: 0]
  ------------------
  159|  2.04k|  DEBUGASSERT(pts);
  ------------------
  |  | 1081|  2.04k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (159:3): [True: 0, False: 2.04k]
  |  Branch (159:3): [True: 2.04k, False: 0]
  ------------------
  160|  2.04k|  r->rate_per_step = r->rate_per_sec = rate_per_sec;
  161|  2.04k|  r->burst_per_step = r->burst_per_sec = burst_per_sec;
  162|  2.04k|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|  2.04k|#define CURL_US_PER_SEC         1000000
  ------------------
  163|  2.04k|  r->spare_us = 0;
  164|  2.04k|  r->tokens = r->rate_per_step;
  165|  2.04k|  r->ts = *pts;
  166|       |  r->blocked = FALSE;
  ------------------
  |  | 1058|  2.04k|#define FALSE false
  ------------------
  167|  2.04k|}
Curl_rlimit_start:
  171|  2.87k|{
  172|       |  /* A start always resets the values to initial defaults, then
  173|       |   * fine tunes the intervals for the total_tokens expected. */
  174|  2.87k|  r->rate_per_step = r->rate_per_sec;
  175|  2.87k|  r->burst_per_step = r->burst_per_sec;
  176|  2.87k|  r->step_us = CURL_US_PER_SEC;
  ------------------
  |  |   29|  2.87k|#define CURL_US_PER_SEC         1000000
  ------------------
  177|  2.87k|  r->spare_us = 0;
  178|  2.87k|  r->tokens = r->rate_per_step;
  179|  2.87k|  r->ts = *pts;
  180|  2.87k|  rlimit_tune_steps(r, total_tokens);
  181|  2.87k|}
Curl_rlimit_active:
  189|  2.54M|{
  190|  2.54M|  return (r->rate_per_step > 0) || r->blocked;
  ------------------
  |  Branch (190:10): [True: 2.50M, False: 35.5k]
  |  Branch (190:36): [True: 0, False: 35.5k]
  ------------------
  191|  2.54M|}
Curl_rlimit_is_blocked:
  194|  2.32M|{
  195|  2.32M|  return (bool)r->blocked;
  196|  2.32M|}
Curl_rlimit_avail:
  200|  3.48M|{
  201|  3.48M|  if(r->blocked)
  ------------------
  |  Branch (201:6): [True: 0, False: 3.48M]
  ------------------
  202|      0|    return 0;
  203|  3.48M|  else if(r->rate_per_step) {
  ------------------
  |  Branch (203:11): [True: 2.47M, False: 1.00M]
  ------------------
  204|  2.47M|    rlimit_update(r, pts);
  205|  2.47M|    return r->tokens;
  206|  2.47M|  }
  207|  1.00M|  else
  208|  1.00M|    return INT64_MAX;
  209|  3.48M|}
Curl_rlimit_drain:
  214|  1.50M|{
  215|  1.50M|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (215:6): [True: 0, False: 1.50M]
  |  Branch (215:20): [True: 1.48M, False: 14.3k]
  ------------------
  216|  1.48M|    return;
  217|       |
  218|  14.3k|  rlimit_update(r, pts);
  219|  14.3k|#if 8 <= SIZEOF_SIZE_T
  220|  14.3k|  if(tokens > INT64_MAX) {
  ------------------
  |  Branch (220:6): [True: 0, False: 14.3k]
  ------------------
  221|      0|    r->tokens = INT64_MAX;
  222|      0|  }
  223|  14.3k|  else
  224|  14.3k|#endif
  225|  14.3k|  {
  226|  14.3k|    int64_t val = (int64_t)tokens;
  227|  14.3k|    if((INT64_MIN + val) < r->tokens)
  ------------------
  |  Branch (227:8): [True: 14.3k, False: 0]
  ------------------
  228|  14.3k|      r->tokens -= val;
  229|      0|    else
  230|      0|      r->tokens = INT64_MIN;
  231|  14.3k|  }
  232|  14.3k|}
Curl_rlimit_wait_ms:
  236|   780k|{
  237|   780k|  timediff_t wait_us, elapsed_us;
  238|       |
  239|   780k|  if(r->blocked || !r->rate_per_step)
  ------------------
  |  Branch (239:6): [True: 0, False: 780k]
  |  Branch (239:20): [True: 42.9k, False: 737k]
  ------------------
  240|  42.9k|    return 0;
  241|   737k|  rlimit_update(r, pts);
  242|   737k|  if(r->tokens > 0)
  ------------------
  |  Branch (242:6): [True: 737k, False: 118]
  ------------------
  243|   737k|    return 0;
  244|       |
  245|       |  /* How much time will it take tokens to become positive again?
  246|       |   * Deduct `spare_us` and check against already elapsed time */
  247|    118|  wait_us = r->step_us - r->spare_us;
  248|    118|  if(r->tokens < 0) {
  ------------------
  |  Branch (248:6): [True: 58, False: 60]
  ------------------
  249|     58|    curl_off_t debt_pct = ((-r->tokens) * 100 / r->rate_per_step);
  250|     58|    if(debt_pct)
  ------------------
  |  Branch (250:8): [True: 52, False: 6]
  ------------------
  251|     52|      wait_us += (r->step_us * debt_pct / 100);
  252|     58|  }
  253|       |
  254|    118|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
  255|    118|  if(elapsed_us >= wait_us)
  ------------------
  |  Branch (255:6): [True: 0, False: 118]
  ------------------
  256|      0|    return 0;
  257|    118|  wait_us -= elapsed_us;
  258|    118|  return (wait_us + 999) / 1000; /* in milliseconds */
  259|    118|}
Curl_rlimit_next_step_ms:
  263|   780k|{
  264|   780k|  if(!r->blocked && r->rate_per_step) {
  ------------------
  |  Branch (264:6): [True: 780k, False: 0]
  |  Branch (264:21): [True: 737k, False: 42.8k]
  ------------------
  265|   737k|    timediff_t elapsed_us, next_us;
  266|       |
  267|   737k|    elapsed_us = curlx_ptimediff_us(pts, &r->ts) + r->spare_us;
  268|   737k|    if(r->step_us > elapsed_us) {
  ------------------
  |  Branch (268:8): [True: 737k, False: 0]
  ------------------
  269|   737k|      next_us = r->step_us - elapsed_us;
  270|   737k|      return (next_us + 999) / 1000; /* in milliseconds */
  271|   737k|    }
  272|   737k|  }
  273|  42.8k|  return 0;
  274|   780k|}
Curl_rlimit_block:
  279|  46.5k|{
  280|  46.5k|  if(!activate == !r->blocked)
  ------------------
  |  Branch (280:6): [True: 46.5k, False: 0]
  ------------------
  281|  46.5k|    return;
  282|       |
  283|      0|  r->ts = *pts;
  284|      0|  r->blocked = activate;
  285|      0|  if(!r->blocked) {
  ------------------
  |  Branch (285:6): [True: 0, False: 0]
  ------------------
  286|       |    /* Start rate limiting fresh. The amount of time this was blocked
  287|       |     * does not generate extra tokens. */
  288|      0|    Curl_rlimit_start(r, pts, -1);
  289|      0|  }
  290|      0|  else {
  291|      0|    r->tokens = 0;
  292|      0|  }
  293|      0|}
ratelimit.c:rlimit_tune_steps:
   79|  2.87k|{
   80|  2.87k|  int64_t tokens_last, tokens_main, msteps;
   81|       |
   82|       |  /* Tune the ratelimit at the start *if* we know how many tokens
   83|       |   * are expected to be consumed in total.
   84|       |   * The reason for tuning is that rlimit provides tokens to be consumed
   85|       |   * per "step" which starts out to be a second. The tokens may be consumed
   86|       |   * in full at the beginning of a step. The remainder of the second will
   87|       |   * have no tokens available, effectively blocking the consumption and
   88|       |   * so keeping the "step average" in line.
   89|       |   * This works will up to the last step. When no more tokens are needed,
   90|       |   * no wait will happen and the last step would be too fast. This is
   91|       |   * especially noticeable when only a few steps are needed.
   92|       |   *
   93|       |   * Example: downloading 1.5kb with a ratelimit of 1k could be done in
   94|       |   * roughly 1 second (1k in the first second and the 0.5 at the start of
   95|       |   * the second one).
   96|       |   *
   97|       |   * The tuning tries to make the last step small, using only
   98|       |   * 1 percent of the total tokens (at least 1). The rest of the tokens
   99|       |   * are to be consumed in the steps before by adjusting the duration of
  100|       |   * the step and the amount of tokens it provides. */
  101|  2.87k|  if(!r->rate_per_step ||
  ------------------
  |  Branch (101:6): [True: 2.26k, False: 610]
  ------------------
  102|    610|     (tokens_total <= 1) ||
  ------------------
  |  Branch (102:6): [True: 337, False: 273]
  ------------------
  103|    273|     (tokens_total > (INT64_MAX / 1000)))
  ------------------
  |  Branch (103:6): [True: 65, False: 208]
  ------------------
  104|  2.67k|    return;
  105|       |
  106|       |  /* Calculate tokens for the last step and the ones before. */
  107|    208|  tokens_last = tokens_total / 100;
  108|    208|  if(!tokens_last) /* less than 100 total, use 1 */
  ------------------
  |  Branch (108:6): [True: 23, False: 185]
  ------------------
  109|     23|    tokens_last = 1;
  110|    185|  else if(tokens_last > CURL_RLIMIT_MIN_RATE)
  ------------------
  |  |   30|    185|#define CURL_RLIMIT_MIN_RATE    (4 * 1024)  /* minimum step rate */
  ------------------
  |  Branch (110:11): [True: 147, False: 38]
  ------------------
  111|    147|    tokens_last = CURL_RLIMIT_MIN_RATE;
  ------------------
  |  |   30|    147|#define CURL_RLIMIT_MIN_RATE    (4 * 1024)  /* minimum step rate */
  ------------------
  112|    208|  DEBUGASSERT(tokens_last);
  ------------------
  |  | 1081|    208|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:3): [True: 0, False: 208]
  |  Branch (112:3): [True: 208, False: 0]
  ------------------
  113|    208|  tokens_main = tokens_total - tokens_last;
  114|    208|  DEBUGASSERT(tokens_main);
  ------------------
  |  | 1081|    208|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (114:3): [True: 0, False: 208]
  |  Branch (114:3): [True: 208, False: 0]
  ------------------
  115|       |
  116|       |  /* how many milli-steps will it take to consume those, give the
  117|       |  * original rate limit per second? */
  118|    208|  DEBUGASSERT(r->step_us == CURL_US_PER_SEC);
  ------------------
  |  | 1081|    208|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (118:3): [True: 0, False: 208]
  |  Branch (118:3): [True: 208, False: 0]
  ------------------
  119|       |
  120|    208|  msteps = (tokens_main * 1000 / r->rate_per_step);
  121|    208|  if(msteps < CURL_RLIMIT_STEP_MIN_MS) {
  ------------------
  |  |   31|    208|#define CURL_RLIMIT_STEP_MIN_MS 2  /* minimum step duration */
  ------------------
  |  Branch (121:6): [True: 9, False: 199]
  ------------------
  122|       |    /* Steps this small will not work. Do not tune. */
  123|      9|    return;
  124|      9|  }
  125|    199|  else if(msteps < 1000) {
  ------------------
  |  Branch (125:11): [True: 38, False: 161]
  ------------------
  126|       |    /* It needs less than one step to provide the needed tokens.
  127|       |     * Make it exactly that long and with exactly those tokens. */
  128|     38|    r->step_us = (timediff_t)msteps * 1000;
  129|     38|    r->rate_per_step = tokens_main;
  130|     38|    r->tokens = r->rate_per_step;
  131|     38|  }
  132|    161|  else {
  133|       |    /* More than 1 step. Spread the remainder milli steps and
  134|       |     * the tokens they need to provide across all steps. If integer
  135|       |     * arithmetic can do it. */
  136|    161|    curl_off_t ms_unaccounted = (msteps % 1000);
  137|    161|    curl_off_t mstep_inc = (ms_unaccounted / (msteps / 1000));
  138|    161|    if(mstep_inc) {
  ------------------
  |  Branch (138:8): [True: 39, False: 122]
  ------------------
  139|     39|      curl_off_t rate_inc = ((r->rate_per_step * mstep_inc) / 1000);
  140|     39|      if(rate_inc) {
  ------------------
  |  Branch (140:10): [True: 33, False: 6]
  ------------------
  141|     33|        r->step_us = CURL_US_PER_SEC + ((timediff_t)mstep_inc * 1000);
  ------------------
  |  |   29|     33|#define CURL_US_PER_SEC         1000000
  ------------------
  142|     33|        r->rate_per_step += rate_inc;
  143|     33|        r->tokens = r->rate_per_step;
  144|     33|      }
  145|     39|    }
  146|    161|  }
  147|       |
  148|    199|  if(r->burst_per_step)
  ------------------
  |  Branch (148:6): [True: 199, False: 0]
  ------------------
  149|    199|    r->burst_per_step = r->rate_per_step;
  150|    199|}
ratelimit.c:rlimit_update:
   35|  3.23M|{
   36|  3.23M|  timediff_t elapsed_us, elapsed_steps;
   37|  3.23M|  int64_t token_gain;
   38|       |
   39|  3.23M|  DEBUGASSERT(r->rate_per_step);
  ------------------
  |  | 1081|  3.23M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (39:3): [True: 0, False: 3.23M]
  |  Branch (39:3): [True: 3.23M, False: 0]
  ------------------
   40|  3.23M|  if((r->ts.tv_sec == pts->tv_sec) && (r->ts.tv_usec == pts->tv_usec))
  ------------------
  |  Branch (40:6): [True: 3.17M, False: 56.8k]
  |  Branch (40:39): [True: 279, False: 3.17M]
  ------------------
   41|    279|    return;
   42|       |
   43|  3.23M|  elapsed_us = curlx_ptimediff_us(pts, &r->ts);
   44|  3.23M|  if(elapsed_us < 0) { /* not going back in time */
  ------------------
  |  Branch (44:6): [True: 0, False: 3.23M]
  ------------------
   45|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (45:5): [Folded, False: 0]
  |  Branch (45:5): [Folded, False: 0]
  ------------------
   46|      0|    return;
   47|      0|  }
   48|       |
   49|  3.23M|  elapsed_us += r->spare_us;
   50|  3.23M|  if(elapsed_us < r->step_us)
  ------------------
  |  Branch (50:6): [True: 3.23M, False: 21]
  ------------------
   51|  3.23M|    return;
   52|       |
   53|       |  /* we do the update */
   54|     21|  r->ts = *pts;
   55|     21|  elapsed_steps = elapsed_us / r->step_us;
   56|     21|  r->spare_us = elapsed_us % r->step_us;
   57|       |
   58|       |  /* How many tokens did we gain since the last update? */
   59|     21|  if(r->rate_per_step > (INT64_MAX / elapsed_steps))
  ------------------
  |  Branch (59:6): [True: 0, False: 21]
  ------------------
   60|      0|    token_gain = INT64_MAX;
   61|     21|  else {
   62|     21|    token_gain = r->rate_per_step * elapsed_steps;
   63|     21|  }
   64|       |
   65|     21|  if((INT64_MAX - token_gain) > r->tokens)
  ------------------
  |  Branch (65:6): [True: 21, False: 0]
  ------------------
   66|     21|    r->tokens += token_gain;
   67|      0|  else
   68|      0|    r->tokens = INT64_MAX;
   69|       |
   70|       |  /* Limit the token again by the burst rate (if set), so we
   71|       |   * do not suddenly have a huge number of tokens after inactivity. */
   72|     21|  if(r->burst_per_step && (r->tokens > r->burst_per_step)) {
  ------------------
  |  Branch (72:6): [True: 21, False: 0]
  |  Branch (72:27): [True: 20, False: 1]
  ------------------
   73|     20|    r->tokens = r->burst_per_step;
   74|     20|  }
   75|     21|}

Curl_req_init:
   39|  33.2k|{
   40|  33.2k|  memset(req, 0, sizeof(*req));
   41|  33.2k|}
Curl_req_soft_reset:
   45|  32.0k|{
   46|  32.0k|  CURLcode result;
   47|       |
   48|  32.0k|  req->done = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   49|  32.0k|  req->upload_done = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   50|  32.0k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   51|  32.0k|  req->download_done = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   52|  32.0k|  req->eos_written = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   53|  32.0k|  req->eos_read = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   54|  32.0k|  req->eos_sent = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   55|  32.0k|  req->ignorebody = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   56|  32.0k|  req->shutdown = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   57|  32.0k|  req->bytecount = 0;
   58|  32.0k|  req->writebytecount = 0;
   59|  32.0k|  req->header = FALSE;
  ------------------
  |  | 1058|  32.0k|#define FALSE false
  ------------------
   60|  32.0k|  req->headerline = 0;
   61|  32.0k|  req->headerbytecount = 0;
   62|  32.0k|  req->allheadercount = 0;
   63|  32.0k|  req->deductheadercount = 0;
   64|  32.0k|  req->httpversion_sent = 0;
   65|  32.0k|  req->httpversion = 0;
   66|  32.0k|  req->sendbuf_hds_len = 0;
   67|       |
   68|  32.0k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1327|  32.0k|  do {                      \
  |  | 1328|  32.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  32.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  32.0k|    (ptr) = NULL;           \
  |  | 1330|  32.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 32.0k]
  |  |  ------------------
  ------------------
   69|  32.0k|#ifndef CURL_DISABLE_PROXY
   70|  32.0k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1327|  32.0k|  do {                      \
  |  | 1328|  32.0k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  32.0k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  32.0k|    (ptr) = NULL;           \
  |  | 1330|  32.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 32.0k]
  |  |  ------------------
  ------------------
   71|  32.0k|#endif
   72|       |
   73|  32.0k|  result = Curl_client_start(data);
   74|  32.0k|  if(result)
  ------------------
  |  Branch (74:6): [True: 3, False: 32.0k]
  ------------------
   75|      3|    return result;
   76|       |
   77|  32.0k|  if(!req->sendbuf_init) {
  ------------------
  |  Branch (77:6): [True: 10.8k, False: 21.2k]
  ------------------
   78|  10.8k|    Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   79|  10.8k|                    BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|  10.8k|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   80|  10.8k|    req->sendbuf_init = TRUE;
  ------------------
  |  | 1055|  10.8k|#define TRUE true
  ------------------
   81|  10.8k|  }
   82|  21.2k|  else {
   83|  21.2k|    Curl_bufq_reset(&req->sendbuf);
   84|  21.2k|    if(data->set.upload_buffer_size != req->sendbuf.chunk_size) {
  ------------------
  |  Branch (84:8): [True: 0, False: 21.2k]
  ------------------
   85|      0|      Curl_bufq_free(&req->sendbuf);
   86|      0|      Curl_bufq_init2(&req->sendbuf, data->set.upload_buffer_size, 1,
   87|      0|                      BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|      0|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
   88|      0|    }
   89|  21.2k|  }
   90|       |
   91|  32.0k|  return CURLE_OK;
   92|  32.0k|}
Curl_req_start:
   96|  21.3k|{
   97|  21.3k|  req->start = *Curl_pgrs_now(data);
   98|  21.3k|  return Curl_req_soft_reset(req, data);
   99|  21.3k|}
Curl_req_done:
  105|    302|{
  106|    302|  (void)req;
  107|    302|  if(!aborted)
  ------------------
  |  Branch (107:6): [True: 40, False: 262]
  ------------------
  108|     40|    (void)req_flush(data);
  109|    302|  Curl_client_reset(data);
  110|    302|  return CURLE_OK;
  111|    302|}
Curl_req_hard_reset:
  114|  23.2k|{
  115|  23.2k|  struct curltime t0 = { 0, 0 };
  116|       |
  117|  23.2k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  118|  23.2k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  119|  23.2k|#ifndef CURL_DISABLE_PROXY
  120|  23.2k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  121|  23.2k|#endif
  122|  23.2k|#ifndef CURL_DISABLE_COOKIES
  123|  23.2k|  curlx_safefree(req->cookiehost);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  124|  23.2k|#endif
  125|  23.2k|  Curl_client_reset(data);
  126|  23.2k|  if(req->sendbuf_init)
  ------------------
  |  Branch (126:6): [True: 10.6k, False: 12.5k]
  ------------------
  127|  10.6k|    Curl_bufq_reset(&req->sendbuf);
  128|       |
  129|       |  /* clear any resolve data */
  130|  23.2k|  Curl_resolv_destroy_all(data);
  131|       |  /* Can no longer memset() this struct as we need to keep some state */
  132|  23.2k|  req->size = -1;
  133|  23.2k|  req->maxdownload = -1;
  134|  23.2k|  req->bytecount = 0;
  135|  23.2k|  req->writebytecount = 0;
  136|  23.2k|  req->start = t0;
  137|  23.2k|  req->headerbytecount = 0;
  138|  23.2k|  req->allheadercount = 0;
  139|  23.2k|  req->deductheadercount = 0;
  140|  23.2k|  req->headerline = 0;
  141|  23.2k|  req->offset = 0;
  142|  23.2k|  req->httpcode = 0;
  143|  23.2k|  req->io_flags = 0;
  144|  23.2k|  req->upgr101 = UPGR101_NONE;
  145|  23.2k|  req->sendbuf_hds_len = 0;
  146|  23.2k|  req->timeofdoc = 0;
  147|  23.2k|  req->location = NULL;
  148|  23.2k|  req->newurl = NULL;
  149|  23.2k|#ifndef CURL_DISABLE_COOKIES
  150|  23.2k|  req->setcookies = 0;
  151|  23.2k|#endif
  152|  23.2k|  req->header = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  153|  23.2k|  req->content_range = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  154|  23.2k|  req->download_done = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  155|  23.2k|  req->eos_written = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  156|  23.2k|  req->eos_read = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  157|  23.2k|  req->eos_sent = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  158|  23.2k|  req->rewind_read = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  159|  23.2k|  req->upload_done = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  160|  23.2k|  req->upload_aborted = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  161|  23.2k|  req->ignorebody = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  162|  23.2k|  req->http_bodyless = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  163|  23.2k|  req->chunk = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  164|  23.2k|  req->resp_trailer = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  165|  23.2k|  req->ignore_cl = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  166|  23.2k|  req->upload_chunky = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  167|  23.2k|  req->no_body = data->set.opt_no_body;
  168|  23.2k|  req->authneg = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  169|  23.2k|  req->shutdown = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  170|       |  /* Unpause all directions */
  171|  23.2k|  Curl_rlimit_block(&data->progress.dl.rlimit, FALSE, &t0);
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  172|       |  Curl_rlimit_block(&data->progress.ul.rlimit, FALSE, &t0);
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
  173|  23.2k|}
Curl_req_free:
  176|  33.2k|{
  177|  33.2k|  curlx_safefree(req->newurl);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  178|  33.2k|  curlx_safefree(req->hd_auth);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  179|  33.2k|#ifndef CURL_DISABLE_PROXY
  180|  33.2k|  curlx_safefree(req->hd_proxy_auth);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  181|  33.2k|#endif
  182|  33.2k|  if(req->sendbuf_init)
  ------------------
  |  Branch (182:6): [True: 10.8k, False: 22.4k]
  ------------------
  183|  10.8k|    Curl_bufq_free(&req->sendbuf);
  184|  33.2k|  Curl_client_cleanup(data);
  185|  33.2k|}
Curl_req_send:
  382|  17.2k|{
  383|  17.2k|  CURLcode result;
  384|  17.2k|  const char *buf;
  385|  17.2k|  size_t blen, nwritten;
  386|       |
  387|  17.2k|  if(!data || !data->conn)
  ------------------
  |  Branch (387:6): [True: 0, False: 17.2k]
  |  Branch (387:15): [True: 0, False: 17.2k]
  ------------------
  388|      0|    return CURLE_FAILED_INIT;
  389|       |
  390|  17.2k|  data->req.httpversion_sent = httpversion;
  391|  17.2k|  buf = curlx_dyn_ptr(req);
  392|  17.2k|  blen = curlx_dyn_len(req);
  393|       |  /* if the sendbuf is empty and the request without body and
  394|       |   * the length to send fits info a sendbuf chunk, we send it directly.
  395|       |   * If `blen` is larger then `chunk_size`, we can not. Because we
  396|       |   * might have to retry a blocked send later from sendbuf and that
  397|       |   * would result in retry sends with a shrunken length. That is trouble. */
  398|  17.2k|  if(Curl_bufq_is_empty(&data->req.sendbuf) &&
  ------------------
  |  Branch (398:6): [True: 17.2k, False: 0]
  ------------------
  399|  17.2k|     !Curl_creader_total_length(data) &&
  ------------------
  |  Branch (399:6): [True: 16.2k, False: 1.07k]
  ------------------
  400|  16.2k|     (blen <= data->req.sendbuf.chunk_size)) {
  ------------------
  |  Branch (400:6): [True: 16.1k, False: 110]
  ------------------
  401|  16.1k|    data->req.eos_read = TRUE;
  ------------------
  |  | 1055|  16.1k|#define TRUE true
  ------------------
  402|  16.1k|    result = xfer_send(data, buf, blen, blen, &nwritten);
  403|  16.1k|    if(result)
  ------------------
  |  Branch (403:8): [True: 0, False: 16.1k]
  ------------------
  404|      0|      return result;
  405|  16.1k|    buf += nwritten;
  406|  16.1k|    blen -= nwritten;
  407|  16.1k|    if(!blen) {
  ------------------
  |  Branch (407:8): [True: 16.0k, False: 11]
  ------------------
  408|  16.0k|      result = req_set_upload_done(data);
  409|  16.0k|      if(result)
  ------------------
  |  Branch (409:10): [True: 0, False: 16.0k]
  ------------------
  410|      0|        return result;
  411|  16.0k|    }
  412|  16.1k|  }
  413|       |
  414|  17.2k|  if(blen) {
  ------------------
  |  Branch (414:6): [True: 1.19k, False: 16.0k]
  ------------------
  415|       |    /* Either we have a request body, or we could not send the complete
  416|       |     * request in one go. Buffer the remainder and try to add as much
  417|       |     * body bytes as room is left in the buffer. Then flush. */
  418|  1.19k|    result = req_send_buffer_add(data, buf, blen, blen);
  419|  1.19k|    if(result)
  ------------------
  |  Branch (419:8): [True: 0, False: 1.19k]
  ------------------
  420|      0|      return result;
  421|       |
  422|  1.19k|    return Curl_req_send_more(data);
  423|  1.19k|  }
  424|  16.0k|  return CURLE_OK;
  425|  17.2k|}
Curl_req_sendbuf_empty:
  428|   401k|{
  429|   401k|  return !data->req.sendbuf_init || Curl_bufq_is_empty(&data->req.sendbuf);
  ------------------
  |  Branch (429:10): [True: 0, False: 401k]
  |  Branch (429:37): [True: 401k, False: 0]
  ------------------
  430|   401k|}
Curl_req_want_send:
  433|   401k|{
  434|       |  /* Not done and upload not blocked and either one of
  435|       |   * - REQ_IO_SEND
  436|       |   * - request has buffered data to send
  437|       |   * - connection has pending data to send */
  438|   401k|  return !data->req.done &&
  ------------------
  |  Branch (438:10): [True: 401k, False: 0]
  ------------------
  439|   401k|         !Curl_rlimit_is_blocked(&data->progress.ul.rlimit) &&
  ------------------
  |  Branch (439:10): [True: 401k, False: 0]
  ------------------
  440|   401k|         (CURL_REQ_WANT_SEND(data) ||
  ------------------
  |  |   39|   803k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|   401k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 253, False: 401k]
  |  |  ------------------
  ------------------
  441|   401k|          !Curl_req_sendbuf_empty(data) ||
  ------------------
  |  Branch (441:11): [True: 0, False: 401k]
  ------------------
  442|   401k|          Curl_xfer_needs_flush(data));
  ------------------
  |  Branch (442:11): [True: 0, False: 401k]
  ------------------
  443|   401k|}
Curl_req_done_sending:
  454|  3.05k|{
  455|  3.05k|  return data->req.upload_done && !Curl_req_want_send(data);
  ------------------
  |  Branch (455:10): [True: 2.62k, False: 426]
  |  Branch (455:35): [True: 2.62k, False: 0]
  ------------------
  456|  3.05k|}
Curl_req_send_more:
  459|  1.40k|{
  460|  1.40k|  CURLcode result;
  461|       |
  462|       |  /* Fill our send buffer if more from client can be read. */
  463|  1.40k|  if(!data->req.upload_aborted &&
  ------------------
  |  Branch (463:6): [True: 1.40k, False: 0]
  ------------------
  464|  1.40k|     !data->req.eos_read &&
  ------------------
  |  Branch (464:6): [True: 1.37k, False: 32]
  ------------------
  465|  1.37k|     !Curl_xfer_send_is_paused(data) &&
  ------------------
  |  Branch (465:6): [True: 1.37k, False: 0]
  ------------------
  466|  1.37k|     !Curl_bufq_is_full(&data->req.sendbuf)) {
  ------------------
  |  Branch (466:6): [True: 1.20k, False: 165]
  ------------------
  467|  1.20k|    size_t nread;
  468|  1.20k|    result = Curl_bufq_sipn(&data->req.sendbuf, 0,
  469|  1.20k|                            add_from_client, data, &nread);
  470|  1.20k|    if(result && result != CURLE_AGAIN)
  ------------------
  |  Branch (470:8): [True: 2, False: 1.20k]
  |  Branch (470:18): [True: 2, False: 0]
  ------------------
  471|      2|      return result;
  472|  1.20k|  }
  473|       |
  474|  1.40k|  result = req_flush(data);
  475|  1.40k|  if(result == CURLE_AGAIN)
  ------------------
  |  Branch (475:6): [True: 50, False: 1.35k]
  ------------------
  476|     50|    result = CURLE_OK;
  477|       |
  478|  1.40k|  return result;
  479|  1.40k|}
Curl_req_abort_sending:
  482|     27|{
  483|     27|  if(!data->req.upload_done) {
  ------------------
  |  Branch (483:6): [True: 27, False: 0]
  ------------------
  484|     27|    Curl_bufq_reset(&data->req.sendbuf);
  485|     27|    data->req.upload_aborted = TRUE;
  ------------------
  |  | 1055|     27|#define TRUE true
  ------------------
  486|     27|    CURL_REQ_CLEAR_SEND(data);
  ------------------
  |  |   47|     27|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|     27|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  487|     27|    return req_set_upload_done(data);
  488|     27|  }
  489|      0|  return CURLE_OK;
  490|     27|}
Curl_req_stop_send_recv:
  493|  4.37k|{
  494|       |  /* stop receiving and ALL sending as well, including PAUSE and HOLD.
  495|       |   * We might still be paused on receive client writes though, so
  496|       |   * keep those bits around. */
  497|  4.37k|  CURLcode result = CURLE_OK;
  498|  4.37k|  if(CURL_REQ_WANT_SEND(data))
  ------------------
  |  |   39|  4.37k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  4.37k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 22, False: 4.35k]
  |  |  ------------------
  ------------------
  499|     22|    result = Curl_req_abort_sending(data);
  500|  4.37k|  CURL_REQ_CLEAR_IO(data);
  ------------------
  |  |   51|  4.37k|  ((d)->req.io_flags &= (uint8_t)~(REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|  4.37k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |                 ((d)->req.io_flags &= (uint8_t)~(REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   36|  4.37k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  501|  4.37k|  return result;
  502|  4.37k|}
request.c:req_flush:
  299|  1.44k|{
  300|  1.44k|  CURLcode result;
  301|       |
  302|  1.44k|  if(!data || !data->conn)
  ------------------
  |  Branch (302:6): [True: 0, False: 1.44k]
  |  Branch (302:15): [True: 0, False: 1.44k]
  ------------------
  303|      0|    return CURLE_FAILED_INIT;
  304|       |
  305|  1.44k|  if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (305:6): [True: 1.30k, False: 135]
  ------------------
  306|  1.30k|    result = req_send_buffer_flush(data);
  307|  1.30k|    if(result)
  ------------------
  |  Branch (307:8): [True: 0, False: 1.30k]
  ------------------
  308|      0|      return result;
  309|  1.30k|    if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
  ------------------
  |  Branch (309:8): [True: 50, False: 1.25k]
  ------------------
  310|     50|      DEBUGF(infof(data, "Curl_req_flush(len=%zu) -> EAGAIN",
  ------------------
  |  | 1067|    350|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 50, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 50]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 50]
  |  |  ------------------
  ------------------
  311|     50|                   Curl_bufq_len(&data->req.sendbuf)));
  312|     50|      return CURLE_AGAIN;
  313|     50|    }
  314|  1.30k|  }
  315|    135|  else if(Curl_xfer_needs_flush(data)) {
  ------------------
  |  Branch (315:11): [True: 0, False: 135]
  ------------------
  316|      0|    DEBUGF(infof(data, "Curl_req_flush(), xfer send_pending"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  317|      0|    return Curl_xfer_flush(data);
  318|      0|  }
  319|       |
  320|  1.39k|  if(data->req.eos_read && !data->req.eos_sent) {
  ------------------
  |  Branch (320:6): [True: 1.16k, False: 230]
  |  Branch (320:28): [True: 95, False: 1.06k]
  ------------------
  321|     95|    char tmp = 0;
  322|     95|    size_t nwritten;
  323|     95|    result = xfer_send(data, &tmp, 0, 0, &nwritten);
  324|     95|    if(result)
  ------------------
  |  Branch (324:8): [True: 0, False: 95]
  ------------------
  325|      0|      return result;
  326|     95|    DEBUGASSERT(data->req.eos_sent);
  ------------------
  |  | 1081|     95|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (326:5): [True: 0, False: 95]
  |  Branch (326:5): [True: 95, False: 0]
  ------------------
  327|     95|  }
  328|       |
  329|  1.39k|  if(!data->req.upload_done && data->req.eos_read && data->req.eos_sent) {
  ------------------
  |  Branch (329:6): [True: 1.36k, False: 26]
  |  Branch (329:32): [True: 1.13k, False: 230]
  |  Branch (329:54): [True: 1.13k, False: 0]
  ------------------
  330|  1.13k|    DEBUGASSERT(Curl_bufq_is_empty(&data->req.sendbuf));
  ------------------
  |  | 1081|  1.13k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:5): [True: 0, False: 1.13k]
  |  Branch (330:5): [True: 1.13k, False: 0]
  ------------------
  331|  1.13k|    if(data->req.shutdown) {
  ------------------
  |  Branch (331:8): [True: 0, False: 1.13k]
  ------------------
  332|      0|      bool done;
  333|      0|      result = Curl_xfer_send_shutdown(data, &done);
  334|      0|      if(result && data->req.shutdown_err_ignore) {
  ------------------
  |  Branch (334:10): [True: 0, False: 0]
  |  Branch (334:20): [True: 0, False: 0]
  ------------------
  335|      0|        infof(data, "Shutdown send direction error: %d. Broken server? "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  336|      0|              "Proceeding as if everything is ok.", result);
  337|      0|        result = CURLE_OK;
  338|      0|        done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  339|      0|      }
  340|       |
  341|      0|      if(result)
  ------------------
  |  Branch (341:10): [True: 0, False: 0]
  ------------------
  342|      0|        return result;
  343|      0|      if(!done)
  ------------------
  |  Branch (343:10): [True: 0, False: 0]
  ------------------
  344|      0|        return CURLE_AGAIN;
  345|      0|    }
  346|  1.13k|    return req_set_upload_done(data);
  347|  1.13k|  }
  348|    256|  return CURLE_OK;
  349|  1.39k|}
request.c:req_send_buffer_flush:
  245|  1.30k|{
  246|  1.30k|  CURLcode result = CURLE_OK;
  247|  1.30k|  const unsigned char *buf;
  248|  1.30k|  size_t blen;
  249|       |
  250|  2.73k|  while(Curl_bufq_peek(&data->req.sendbuf, &buf, &blen)) {
  ------------------
  |  Branch (250:9): [True: 1.48k, False: 1.25k]
  ------------------
  251|  1.48k|    size_t nwritten, hds_len = CURLMIN(data->req.sendbuf_hds_len, blen);
  ------------------
  |  | 1287|  1.48k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 1.10k, False: 372]
  |  |  ------------------
  ------------------
  252|  1.48k|    result = xfer_send(data, (const char *)buf, blen, hds_len, &nwritten);
  253|  1.48k|    if(result)
  ------------------
  |  Branch (253:8): [True: 0, False: 1.48k]
  ------------------
  254|      0|      break;
  255|       |
  256|  1.48k|    Curl_bufq_skip(&data->req.sendbuf, nwritten);
  257|  1.48k|    if(hds_len) {
  ------------------
  |  Branch (257:8): [True: 1.39k, False: 81]
  ------------------
  258|  1.39k|      data->req.sendbuf_hds_len -= CURLMIN(hds_len, nwritten);
  ------------------
  |  | 1287|  1.39k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 1.02k, False: 373]
  |  |  ------------------
  ------------------
  259|  1.39k|    }
  260|       |    /* leave if we could not send all. Maybe network blocking or
  261|       |     * speed limits on transfer */
  262|  1.48k|    if(nwritten < blen)
  ------------------
  |  Branch (262:8): [True: 50, False: 1.43k]
  ------------------
  263|     50|      break;
  264|  1.48k|  }
  265|  1.30k|  return result;
  266|  1.30k|}
request.c:xfer_send:
  190|  17.6k|{
  191|  17.6k|  CURLcode result = CURLE_OK;
  192|  17.6k|  bool eos = FALSE;
  ------------------
  |  | 1058|  17.6k|#define FALSE false
  ------------------
  193|       |
  194|  17.6k|  *pnwritten = 0;
  195|  17.6k|  DEBUGASSERT(hds_len <= blen);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (195:3): [True: 0, False: 17.6k]
  |  Branch (195:3): [True: 17.6k, False: 0]
  ------------------
  196|  17.6k|#ifdef DEBUGBUILD
  197|  17.6k|  {
  198|       |    /* Allow debug builds to override this logic to force short initial
  199|       |       sends */
  200|  17.6k|    size_t body_len = blen - hds_len;
  201|  17.6k|    if(body_len) {
  ------------------
  |  Branch (201:8): [True: 1.10k, False: 16.5k]
  ------------------
  202|  1.10k|      const char *p = getenv("CURL_SMALLREQSEND");
  203|  1.10k|      if(p) {
  ------------------
  |  Branch (203:10): [True: 0, False: 1.10k]
  ------------------
  204|      0|        curl_off_t body_small;
  205|      0|        if(!curlx_str_number(&p, &body_small, body_len))
  ------------------
  |  Branch (205:12): [True: 0, False: 0]
  ------------------
  206|      0|          blen = hds_len + (size_t)body_small;
  207|      0|      }
  208|  1.10k|    }
  209|  17.6k|  }
  210|  17.6k|#endif
  211|       |  /* Make sure this does not send more body bytes than what the max send
  212|       |     speed says. The headers do not count to the max speed. */
  213|  17.6k|  if(data->set.max_send_speed) {
  ------------------
  |  Branch (213:6): [True: 1.45k, False: 16.2k]
  ------------------
  214|  1.45k|    size_t body_bytes = blen - hds_len;
  215|  1.45k|    if((curl_off_t)body_bytes > data->set.max_send_speed)
  ------------------
  |  Branch (215:8): [True: 0, False: 1.45k]
  ------------------
  216|      0|      blen = hds_len + (size_t)data->set.max_send_speed;
  217|  1.45k|  }
  218|       |
  219|  17.6k|  if(data->req.eos_read &&
  ------------------
  |  Branch (219:6): [True: 17.2k, False: 400]
  ------------------
  220|  17.2k|    (Curl_bufq_is_empty(&data->req.sendbuf) ||
  ------------------
  |  Branch (220:6): [True: 16.2k, False: 1.08k]
  ------------------
  221|  17.2k|     Curl_bufq_len(&data->req.sendbuf) == blen)) {
  ------------------
  |  Branch (221:6): [True: 1.08k, False: 0]
  ------------------
  222|  17.2k|    DEBUGF(infof(data, "sending last upload chunk of %zu bytes", blen));
  ------------------
  |  | 1067|   120k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 17.2k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 17.2k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 17.2k]
  |  |  ------------------
  ------------------
  223|  17.2k|    eos = TRUE;
  ------------------
  |  | 1055|  17.2k|#define TRUE true
  ------------------
  224|  17.2k|  }
  225|  17.6k|  result = Curl_xfer_send(data, buf, blen, eos, pnwritten);
  226|  17.6k|  if(!result) {
  ------------------
  |  Branch (226:6): [True: 17.6k, False: 0]
  ------------------
  227|  17.6k|    if(eos && (blen == *pnwritten))
  ------------------
  |  Branch (227:8): [True: 17.2k, False: 400]
  |  Branch (227:15): [True: 17.2k, False: 48]
  ------------------
  228|  17.2k|      data->req.eos_sent = TRUE;
  ------------------
  |  | 1055|  17.2k|#define TRUE true
  ------------------
  229|  17.6k|    if(*pnwritten) {
  ------------------
  |  Branch (229:8): [True: 17.5k, False: 156]
  ------------------
  230|  17.5k|      if(hds_len)
  ------------------
  |  Branch (230:10): [True: 17.4k, False: 81]
  ------------------
  231|  17.4k|        Curl_debug(data, CURLINFO_HEADER_OUT, buf,
  232|  17.4k|                   CURLMIN(hds_len, *pnwritten));
  ------------------
  |  | 1287|  17.4k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 1.02k, False: 16.4k]
  |  |  ------------------
  ------------------
  233|  17.5k|      if(*pnwritten > hds_len) {
  ------------------
  |  Branch (233:10): [True: 1.10k, False: 16.4k]
  ------------------
  234|  1.10k|        size_t body_len = *pnwritten - hds_len;
  235|  1.10k|        Curl_debug(data, CURLINFO_DATA_OUT, buf + hds_len, body_len);
  236|  1.10k|        data->req.writebytecount += body_len;
  237|  1.10k|        Curl_pgrs_upload_inc(data, body_len);
  238|  1.10k|      }
  239|  17.5k|    }
  240|  17.6k|  }
  241|  17.6k|  return result;
  242|  17.6k|}
request.c:req_set_upload_done:
  269|  17.2k|{
  270|  17.2k|  DEBUGASSERT(!data->req.upload_done);
  ------------------
  |  | 1081|  17.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:3): [True: 0, False: 17.2k]
  |  Branch (270:3): [True: 17.2k, False: 0]
  ------------------
  271|  17.2k|  data->req.upload_done = TRUE;
  ------------------
  |  | 1055|  17.2k|#define TRUE true
  ------------------
  272|  17.2k|  CURL_REQ_CLEAR_SEND(data);
  ------------------
  |  |   47|  17.2k|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  17.2k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  273|       |
  274|  17.2k|  Curl_pgrsTime(data, TIMER_POSTRANSFER);
  275|  17.2k|  Curl_creader_done(data, data->req.upload_aborted);
  276|       |
  277|  17.2k|  if(data->req.upload_aborted) {
  ------------------
  |  Branch (277:6): [True: 27, False: 17.2k]
  ------------------
  278|     27|    Curl_bufq_reset(&data->req.sendbuf);
  279|     27|    if(data->req.writebytecount)
  ------------------
  |  Branch (279:8): [True: 13, False: 14]
  ------------------
  280|     13|      infof(data, "abort upload after having sent %" FMT_OFF_T " bytes",
  ------------------
  |  |  143|     13|  do {                               \
  |  |  144|     13|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     13|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 13, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  320|     13|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     13|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     13|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 13]
  |  |  ------------------
  ------------------
  281|     27|            data->req.writebytecount);
  282|     14|    else
  283|     14|      infof(data, "abort upload");
  ------------------
  |  |  143|     14|  do {                               \
  |  |  144|     14|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     14|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 14, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  320|     14|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     14|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     14|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 14]
  |  |  ------------------
  ------------------
  284|     27|  }
  285|  17.2k|  else if(data->req.writebytecount)
  ------------------
  |  Branch (285:11): [True: 1.04k, False: 16.1k]
  ------------------
  286|  1.04k|    infof(data, "upload completely sent off: %" FMT_OFF_T " bytes",
  ------------------
  |  |  143|  1.04k|  do {                               \
  |  |  144|  1.04k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.04k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.04k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.04k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.04k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.04k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.04k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.04k]
  |  |  ------------------
  ------------------
  287|  17.2k|          data->req.writebytecount);
  288|  16.1k|  else if(!data->req.download_done) {
  ------------------
  |  Branch (288:11): [True: 16.1k, False: 69]
  ------------------
  289|  16.1k|    DEBUGASSERT(Curl_bufq_is_empty(&data->req.sendbuf));
  ------------------
  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:5): [True: 0, False: 16.1k]
  |  Branch (289:5): [True: 16.1k, False: 0]
  ------------------
  290|  16.1k|    infof(data, Curl_creader_total_length(data) ?
  ------------------
  |  |  143|  16.1k|  do {                               \
  |  |  144|  16.1k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  16.1k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 16.1k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 16.1k]
  |  |  |  |  ------------------
  |  |  |  |  320|  16.1k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  16.1k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  16.1k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 16.1k]
  |  |  ------------------
  ------------------
  291|  16.1k|          "We are completely uploaded and fine" :
  292|  16.1k|          "Request completely sent off");
  293|  16.1k|  }
  294|       |
  295|  17.2k|  return Curl_xfer_send_close(data);
  296|  17.2k|}
request.c:req_send_buffer_add:
  368|  1.19k|{
  369|  1.19k|  CURLcode result = CURLE_OK;
  370|  1.19k|  size_t n;
  371|  1.19k|  result = Curl_bufq_cwrite(&data->req.sendbuf, buf, blen, &n);
  372|  1.19k|  if(result)
  ------------------
  |  Branch (372:6): [True: 0, False: 1.19k]
  ------------------
  373|      0|    return result;
  374|       |  /* We rely on a SOFTLIMIT on sendbuf, so it can take all data in */
  375|  1.19k|  DEBUGASSERT(n == blen);
  ------------------
  |  | 1081|  1.19k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:3): [True: 0, False: 1.19k]
  |  Branch (375:3): [True: 1.19k, False: 0]
  ------------------
  376|  1.19k|  data->req.sendbuf_hds_len += hds_len;
  377|  1.19k|  return CURLE_OK;
  378|  1.19k|}
request.c:add_from_client:
  354|  1.20k|{
  355|  1.20k|  struct Curl_easy *data = reader_ctx;
  356|  1.20k|  CURLcode result;
  357|  1.20k|  bool eos;
  358|       |
  359|  1.20k|  result = Curl_client_read(data, (char *)buf, buflen, pnread, &eos);
  360|  1.20k|  if(!result && eos)
  ------------------
  |  Branch (360:6): [True: 1.20k, False: 2]
  |  Branch (360:17): [True: 1.14k, False: 64]
  ------------------
  361|  1.14k|    data->req.eos_read = TRUE;
  ------------------
  |  | 1055|  1.14k|#define TRUE true
  ------------------
  362|  1.20k|  return result;
  363|  1.20k|}

Curl_rtsp_parseheader:
  966|   162k|{
  967|   162k|  if(checkprefix("CSeq:", header)) {
  ------------------
  |  |   33|   162k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|   162k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1.00k, False: 161k]
  |  |  ------------------
  ------------------
  968|  1.00k|    curl_off_t CSeq = 0;
  969|  1.00k|    struct RTSP *rtsp = Curl_meta_get(data, CURL_META_RTSP_EASY);
  ------------------
  |  |   46|  1.00k|#define CURL_META_RTSP_EASY   "meta:proto:rtsp:easy"
  ------------------
  970|  1.00k|    const char *p = &header[5];
  971|  1.00k|    if(!rtsp)
  ------------------
  |  Branch (971:8): [True: 0, False: 1.00k]
  ------------------
  972|      0|      return CURLE_FAILED_INIT;
  973|  1.00k|    curlx_str_passblanks(&p);
  974|  1.00k|    if(curlx_str_number(&p, &CSeq, UINT_MAX)) {
  ------------------
  |  Branch (974:8): [True: 1, False: 1.00k]
  ------------------
  975|      1|      failf(data, "Unable to read the CSeq header: [%s]", header);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  976|      1|      return CURLE_RTSP_CSEQ_ERROR;
  977|      1|    }
  978|  1.00k|    data->state.rtsp_CSeq_recv = rtsp->CSeq_recv = (uint32_t)CSeq;
  979|  1.00k|  }
  980|   161k|  else if(checkprefix("Session:", header)) {
  ------------------
  |  |   33|   161k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|   161k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 430, False: 161k]
  |  |  ------------------
  ------------------
  981|    430|    const char *start, *end;
  982|    430|    size_t idlen;
  983|       |
  984|       |    /* Find the first non-space letter */
  985|    430|    start = header + 8;
  986|    430|    curlx_str_passblanks(&start);
  987|       |
  988|    430|    if(!*start) {
  ------------------
  |  Branch (988:8): [True: 0, False: 430]
  ------------------
  989|      0|      failf(data, "Got a blank Session ID");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  990|      0|      return CURLE_RTSP_SESSION_ERROR;
  991|      0|    }
  992|       |
  993|       |    /* Find the end of Session ID
  994|       |     *
  995|       |     * Allow any non whitespace content, up to the field separator or end of
  996|       |     * line. RFC 2326 is not 100% clear on the session ID and for example
  997|       |     * gstreamer does URL-encoded session ID's not covered by the standard.
  998|       |     */
  999|    430|    end = start;
 1000|  10.0k|    while((*end > ' ') && (*end != ';'))
  ------------------
  |  Branch (1000:11): [True: 9.67k, False: 410]
  |  Branch (1000:27): [True: 9.65k, False: 20]
  ------------------
 1001|  9.65k|      end++;
 1002|    430|    idlen = end - start;
 1003|       |
 1004|    430|    if(data->set.str[STRING_RTSP_SESSION_ID]) {
  ------------------
  |  Branch (1004:8): [True: 333, False: 97]
  ------------------
 1005|       |
 1006|       |      /* If the Session ID is set, then compare */
 1007|    333|      if(strlen(data->set.str[STRING_RTSP_SESSION_ID]) != idlen ||
  ------------------
  |  Branch (1007:10): [True: 7, False: 326]
  ------------------
 1008|    326|         strncmp(start, data->set.str[STRING_RTSP_SESSION_ID], idlen)) {
  ------------------
  |  Branch (1008:10): [True: 67, False: 259]
  ------------------
 1009|     74|        failf(data, "Got RTSP Session ID Line [%s], but wanted ID [%s]",
  ------------------
  |  |   62|     74|#define failf Curl_failf
  ------------------
 1010|     74|              start, data->set.str[STRING_RTSP_SESSION_ID]);
 1011|     74|        return CURLE_RTSP_SESSION_ERROR;
 1012|     74|      }
 1013|    333|    }
 1014|     97|    else {
 1015|       |      /* If the Session ID is not set, and we find it in a response, then set
 1016|       |       * it.
 1017|       |       */
 1018|       |
 1019|       |      /* Copy the id substring into a new buffer */
 1020|     97|      data->set.str[STRING_RTSP_SESSION_ID] = curlx_memdup0(start, idlen);
 1021|     97|      if(!data->set.str[STRING_RTSP_SESSION_ID])
  ------------------
  |  Branch (1021:10): [True: 0, False: 97]
  ------------------
 1022|      0|        return CURLE_OUT_OF_MEMORY;
 1023|     97|    }
 1024|    430|  }
 1025|   161k|  else if(checkprefix("Transport:", header)) {
  ------------------
  |  |   33|   161k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|   161k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 161k]
  |  |  ------------------
  ------------------
 1026|      0|    CURLcode result;
 1027|      0|    result = rtsp_parse_transport(data, header + 10);
 1028|      0|    if(result)
  ------------------
  |  Branch (1028:8): [True: 0, False: 0]
  ------------------
 1029|      0|      return result;
 1030|      0|  }
 1031|   162k|  return CURLE_OK;
 1032|   162k|}
rtsp.c:rtsp_setup_connection:
  107|  20.8k|{
  108|  20.8k|  struct rtsp_conn *rtspc;
  109|  20.8k|  struct RTSP *rtsp;
  110|       |
  111|  20.8k|  rtspc = curlx_calloc(1, sizeof(*rtspc));
  ------------------
  |  | 1480|  20.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  112|  20.8k|  if(!rtspc)
  ------------------
  |  Branch (112:6): [True: 0, False: 20.8k]
  ------------------
  113|      0|    return CURLE_OUT_OF_MEMORY;
  114|  20.8k|  curlx_dyn_init(&rtspc->buf, MAX_RTP_BUFFERSIZE);
  ------------------
  |  |   86|  20.8k|#define MAX_RTP_BUFFERSIZE 1000000 /* arbitrary */
  ------------------
  115|  20.8k|  if(Curl_conn_meta_set(conn, CURL_META_RTSP_CONN, rtspc, rtsp_conn_dtor))
  ------------------
  |  |   48|  20.8k|#define CURL_META_RTSP_CONN   "meta:proto:rtsp:conn"
  ------------------
  |  Branch (115:6): [True: 0, False: 20.8k]
  ------------------
  116|      0|    return CURLE_OUT_OF_MEMORY;
  117|       |
  118|  20.8k|  rtsp = curlx_calloc(1, sizeof(struct RTSP));
  ------------------
  |  | 1480|  20.8k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  119|  20.8k|  if(!rtsp ||
  ------------------
  |  Branch (119:6): [True: 0, False: 20.8k]
  ------------------
  120|  20.8k|     Curl_meta_set(data, CURL_META_RTSP_EASY, rtsp, rtsp_easy_dtor))
  ------------------
  |  |   46|  20.8k|#define CURL_META_RTSP_EASY   "meta:proto:rtsp:easy"
  ------------------
  |  Branch (120:6): [True: 0, False: 20.8k]
  ------------------
  121|      0|    return CURLE_OUT_OF_MEMORY;
  122|       |
  123|  20.8k|  return CURLE_OK;
  124|  20.8k|}
rtsp.c:rtsp_conn_dtor:
   97|  20.8k|{
   98|  20.8k|  struct rtsp_conn *rtspc = entry;
   99|  20.8k|  (void)key;
  100|  20.8k|  (void)klen;
  101|  20.8k|  curlx_dyn_free(&rtspc->buf);
  102|  20.8k|  curlx_free(rtspc);
  ------------------
  |  | 1483|  20.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  103|  20.8k|}
rtsp.c:rtsp_easy_dtor:
   89|  20.8k|{
   90|  20.8k|  struct RTSP *rtsp = entry;
   91|  20.8k|  (void)key;
   92|  20.8k|  (void)klen;
   93|  20.8k|  curlx_free(rtsp);
  ------------------
  |  | 1483|  20.8k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   94|  20.8k|}
rtsp.c:rtsp_do:
  274|  17.3k|{
  275|  17.3k|  struct connectdata *conn = data->conn;
  276|  17.3k|  CURLcode result = CURLE_OK;
  277|  17.3k|  const Curl_RtspReq rtspreq = data->set.rtspreq;
  278|  17.3k|  struct RTSP *rtsp = Curl_meta_get(data, CURL_META_RTSP_EASY);
  ------------------
  |  |   46|  17.3k|#define CURL_META_RTSP_EASY   "meta:proto:rtsp:easy"
  ------------------
  279|  17.3k|  struct dynbuf req_buffer;
  280|  17.3k|  const unsigned char httpversion = 11; /* RTSP is close to HTTP/1.1, sort
  281|       |                                           of... */
  282|  17.3k|  const char *p_request = NULL;
  283|  17.3k|  const char *p_session_id = NULL;
  284|  17.3k|  const char *p_accept = NULL;
  285|  17.3k|  const char *p_accept_encoding = NULL;
  286|  17.3k|  const char *p_range = NULL;
  287|  17.3k|  const char *p_referrer = NULL;
  288|  17.3k|  const char *p_stream_uri = NULL;
  289|  17.3k|  const char *p_transport = NULL;
  290|  17.3k|  const char *p_uagent = NULL;
  291|  17.3k|  const char *p_hd_proxy_auth = NULL;
  292|  17.3k|  const char *p_hd_auth = NULL;
  293|       |
  294|  17.3k|  *done = TRUE;
  ------------------
  |  | 1055|  17.3k|#define TRUE true
  ------------------
  295|  17.3k|  if(!rtsp)
  ------------------
  |  Branch (295:6): [True: 0, False: 17.3k]
  ------------------
  296|      0|    return CURLE_FAILED_INIT;
  297|       |
  298|       |  /* Initialize a dynamic send buffer */
  299|  17.3k|  curlx_dyn_init(&req_buffer, DYN_RTSP_REQ_HEADER);
  ------------------
  |  |   71|  17.3k|#define DYN_RTSP_REQ_HEADER (64 * 1024)
  ------------------
  300|       |
  301|  17.3k|  rtsp->CSeq_sent = data->state.rtsp_next_client_CSeq;
  302|  17.3k|  rtsp->CSeq_recv = 0;
  303|       |
  304|       |  /* Setup the 'p_request' pointer to the proper p_request string
  305|       |   * Since all RTSP requests are included here, there is no need to
  306|       |   * support custom requests like HTTP.
  307|       |   **/
  308|  17.3k|  data->req.no_body = TRUE; /* most requests do not contain a body */
  ------------------
  |  | 1055|  17.3k|#define TRUE true
  ------------------
  309|  17.3k|  switch(rtspreq) {
  310|      0|  default:
  ------------------
  |  Branch (310:3): [True: 0, False: 17.3k]
  ------------------
  311|      0|    failf(data, "Got invalid RTSP request");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  312|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  313|  10.9k|  case RTSPREQ_OPTIONS:
  ------------------
  |  Branch (313:3): [True: 10.9k, False: 6.45k]
  ------------------
  314|  10.9k|    p_request = "OPTIONS";
  315|  10.9k|    break;
  316|  2.54k|  case RTSPREQ_DESCRIBE:
  ------------------
  |  Branch (316:3): [True: 2.54k, False: 14.8k]
  ------------------
  317|  2.54k|    p_request = "DESCRIBE";
  318|  2.54k|    data->req.no_body = FALSE;
  ------------------
  |  | 1058|  2.54k|#define FALSE false
  ------------------
  319|  2.54k|    break;
  320|  1.06k|  case RTSPREQ_ANNOUNCE:
  ------------------
  |  Branch (320:3): [True: 1.06k, False: 16.3k]
  ------------------
  321|  1.06k|    p_request = "ANNOUNCE";
  322|  1.06k|    break;
  323|    168|  case RTSPREQ_SETUP:
  ------------------
  |  Branch (323:3): [True: 168, False: 17.2k]
  ------------------
  324|    168|    p_request = "SETUP";
  325|    168|    break;
  326|  1.65k|  case RTSPREQ_PLAY:
  ------------------
  |  Branch (326:3): [True: 1.65k, False: 15.7k]
  ------------------
  327|  1.65k|    p_request = "PLAY";
  328|  1.65k|    break;
  329|    312|  case RTSPREQ_PAUSE:
  ------------------
  |  Branch (329:3): [True: 312, False: 17.0k]
  ------------------
  330|    312|    p_request = "PAUSE";
  331|    312|    break;
  332|     77|  case RTSPREQ_TEARDOWN:
  ------------------
  |  Branch (332:3): [True: 77, False: 17.2k]
  ------------------
  333|     77|    p_request = "TEARDOWN";
  334|     77|    break;
  335|    156|  case RTSPREQ_GET_PARAMETER:
  ------------------
  |  Branch (335:3): [True: 156, False: 17.2k]
  ------------------
  336|       |    /* GET_PARAMETER's no_body status is determined later */
  337|    156|    p_request = "GET_PARAMETER";
  338|    156|    data->req.no_body = FALSE;
  ------------------
  |  | 1058|    156|#define FALSE false
  ------------------
  339|    156|    break;
  340|    367|  case RTSPREQ_SET_PARAMETER:
  ------------------
  |  Branch (340:3): [True: 367, False: 17.0k]
  ------------------
  341|    367|    p_request = "SET_PARAMETER";
  342|    367|    break;
  343|     91|  case RTSPREQ_RECORD:
  ------------------
  |  Branch (343:3): [True: 91, False: 17.2k]
  ------------------
  344|     91|    p_request = "RECORD";
  345|     91|    break;
  346|     18|  case RTSPREQ_RECEIVE:
  ------------------
  |  Branch (346:3): [True: 18, False: 17.3k]
  ------------------
  347|     18|    p_request = "";
  348|       |    /* Treat interleaved RTP as body */
  349|     18|    data->req.no_body = FALSE;
  ------------------
  |  | 1058|     18|#define FALSE false
  ------------------
  350|     18|    break;
  351|      0|  case RTSPREQ_LAST:
  ------------------
  |  Branch (351:3): [True: 0, False: 17.3k]
  ------------------
  352|      0|    failf(data, "Got invalid RTSP request: RTSPREQ_LAST");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  353|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  354|  17.3k|  }
  355|       |
  356|  17.3k|  if(rtspreq == RTSPREQ_RECEIVE) {
  ------------------
  |  Branch (356:6): [True: 18, False: 17.3k]
  ------------------
  357|     18|    Curl_xfer_setup_recv(data, FIRSTSOCKET, -1);
  ------------------
  |  |  303|     18|#define FIRSTSOCKET     0
  ------------------
  358|     18|    goto out;
  359|     18|  }
  360|       |
  361|  17.3k|  p_session_id = data->set.str[STRING_RTSP_SESSION_ID];
  362|  17.3k|  if(!p_session_id &&
  ------------------
  |  Branch (362:6): [True: 16.5k, False: 844]
  ------------------
  363|  16.5k|     (rtspreq & ~(Curl_RtspReq)(RTSPREQ_OPTIONS |
  ------------------
  |  Branch (363:6): [True: 3, False: 16.5k]
  ------------------
  364|  16.5k|                                RTSPREQ_DESCRIBE |
  365|  16.5k|                                RTSPREQ_SETUP))) {
  366|      3|    failf(data, "Refusing to issue an RTSP request [%s] without a session ID.",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  367|      3|          p_request);
  368|      3|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  369|      3|    goto out;
  370|      3|  }
  371|       |
  372|       |  /* Stream URI. Default to server '*' if not specified */
  373|  17.3k|  if(data->set.str[STRING_RTSP_STREAM_URI]) {
  ------------------
  |  Branch (373:6): [True: 392, False: 16.9k]
  ------------------
  374|    392|    p_stream_uri = data->set.str[STRING_RTSP_STREAM_URI];
  375|    392|  }
  376|  16.9k|  else {
  377|  16.9k|    p_stream_uri = "*";
  378|  16.9k|  }
  379|       |
  380|       |  /* Transport Header for SETUP requests */
  381|  17.3k|  p_transport = Curl_checkheaders(data, STRCONST("Transport"));
  ------------------
  |  | 1292|  17.3k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  382|  17.3k|  if(rtspreq == RTSPREQ_SETUP && !p_transport) {
  ------------------
  |  Branch (382:6): [True: 168, False: 17.1k]
  |  Branch (382:34): [True: 168, False: 0]
  ------------------
  383|       |    /* New Transport: setting? */
  384|    168|    if(data->set.str[STRING_RTSP_TRANSPORT]) {
  ------------------
  |  Branch (384:8): [True: 165, False: 3]
  ------------------
  385|    165|      curlx_free(data->state.aptr.rtsp_transport);
  ------------------
  |  | 1483|    165|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  386|    165|      data->state.aptr.rtsp_transport =
  387|    165|        curl_maprintf("Transport: %s\r\n",
  388|    165|                      data->set.str[STRING_RTSP_TRANSPORT]);
  389|    165|      if(!data->state.aptr.rtsp_transport)
  ------------------
  |  Branch (389:10): [True: 0, False: 165]
  ------------------
  390|      0|        return CURLE_OUT_OF_MEMORY;
  391|    165|    }
  392|      3|    else {
  393|      3|      failf(data,
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  394|      3|            "Refusing to issue an RTSP SETUP without a Transport: header.");
  395|      3|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  396|      3|      goto out;
  397|      3|    }
  398|       |
  399|    165|    p_transport = data->state.aptr.rtsp_transport;
  400|    165|  }
  401|       |
  402|       |  /* Accept Headers for DESCRIBE requests */
  403|  17.3k|  if(rtspreq == RTSPREQ_DESCRIBE) {
  ------------------
  |  Branch (403:6): [True: 2.54k, False: 14.8k]
  ------------------
  404|       |    /* Accept Header */
  405|  2.54k|    p_accept = Curl_checkheaders(data, STRCONST("Accept")) ?
  ------------------
  |  | 1292|  2.54k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (405:16): [True: 0, False: 2.54k]
  ------------------
  406|  2.54k|      NULL : "Accept: application/sdp\r\n";
  407|       |
  408|       |    /* Accept-Encoding header */
  409|  2.54k|    if(!Curl_checkheaders(data, STRCONST("Accept-Encoding")) &&
  ------------------
  |  | 1292|  2.54k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (409:8): [True: 2.54k, False: 0]
  ------------------
  410|  2.54k|       data->set.str[STRING_ENCODING]) {
  ------------------
  |  Branch (410:8): [True: 1.29k, False: 1.24k]
  ------------------
  411|  1.29k|      curlx_free(data->state.aptr.accept_encoding);
  ------------------
  |  | 1483|  1.29k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  412|  1.29k|      data->state.aptr.accept_encoding =
  413|  1.29k|        curl_maprintf("Accept-Encoding: %s\r\n",
  414|  1.29k|                      data->set.str[STRING_ENCODING]);
  415|       |
  416|  1.29k|      if(!data->state.aptr.accept_encoding) {
  ------------------
  |  Branch (416:10): [True: 0, False: 1.29k]
  ------------------
  417|      0|        result = CURLE_OUT_OF_MEMORY;
  418|      0|        goto out;
  419|      0|      }
  420|  1.29k|      p_accept_encoding = data->state.aptr.accept_encoding;
  421|  1.29k|    }
  422|  2.54k|  }
  423|       |
  424|       |  /* The User-Agent string might have been allocated already, because
  425|       |     it might have been used in the proxy connect, but if we have got a header
  426|       |     with the user-agent string specified, we erase the previously made string
  427|       |     here. */
  428|  17.3k|  if(Curl_checkheaders(data, STRCONST("User-Agent")) &&
  ------------------
  |  | 1292|  17.3k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (428:6): [True: 0, False: 17.3k]
  ------------------
  429|      0|     data->state.aptr.uagent) {
  ------------------
  |  Branch (429:6): [True: 0, False: 0]
  ------------------
  430|      0|    curlx_safefree(data->state.aptr.uagent);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  431|      0|  }
  432|  17.3k|  else if(!Curl_checkheaders(data, STRCONST("User-Agent")) &&
  ------------------
  |  | 1292|  17.3k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (432:11): [True: 17.3k, False: 0]
  ------------------
  433|  17.3k|          data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (433:11): [True: 2.05k, False: 15.2k]
  ------------------
  434|  2.05k|    p_uagent = data->state.aptr.uagent;
  435|  2.05k|  }
  436|       |
  437|       |  /* setup the authentication headers */
  438|  17.3k|  result = Curl_http_output_auth(data, conn, p_request, HTTPREQ_GET,
  439|  17.3k|                                 p_stream_uri, NULL, FALSE);
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
  440|  17.3k|  if(result)
  ------------------
  |  Branch (440:6): [True: 15, False: 17.3k]
  ------------------
  441|     15|    goto out;
  442|       |
  443|  17.3k|#ifndef CURL_DISABLE_PROXY
  444|  17.3k|  p_hd_proxy_auth = data->req.hd_proxy_auth;
  445|  17.3k|#endif
  446|  17.3k|  p_hd_auth = data->req.hd_auth;
  447|       |
  448|       |  /* Referrer */
  449|  17.3k|  curlx_safefree(data->state.aptr.ref);
  ------------------
  |  | 1327|  17.3k|  do {                      \
  |  | 1328|  17.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  17.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  17.3k|    (ptr) = NULL;           \
  |  | 1330|  17.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 17.3k]
  |  |  ------------------
  ------------------
  450|  17.3k|  if(Curl_bufref_ptr(&data->state.referer) &&
  ------------------
  |  Branch (450:6): [True: 4.81k, False: 12.5k]
  ------------------
  451|  4.81k|     !Curl_checkheaders(data, STRCONST("Referer")))
  ------------------
  |  | 1292|  4.81k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (451:6): [True: 4.81k, False: 0]
  ------------------
  452|  4.81k|    data->state.aptr.ref =
  453|  4.81k|      curl_maprintf("Referer: %s\r\n", Curl_bufref_ptr(&data->state.referer));
  454|       |
  455|  17.3k|  p_referrer = data->state.aptr.ref;
  456|       |
  457|       |  /*
  458|       |   * Range Header
  459|       |   * Only applies to PLAY, PAUSE, RECORD
  460|       |   *
  461|       |   * Go ahead and use the Range stuff supplied for HTTP
  462|       |   */
  463|  17.3k|  if(data->state.use_range &&
  ------------------
  |  Branch (463:6): [True: 943, False: 16.3k]
  ------------------
  464|    943|     (rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) {
  ------------------
  |  Branch (464:6): [True: 943, False: 0]
  ------------------
  465|       |
  466|       |    /* Check to see if there is a range set in the custom headers */
  467|    943|    if(!Curl_checkheaders(data, STRCONST("Range")) && data->state.range) {
  ------------------
  |  | 1292|    943|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (467:8): [True: 943, False: 0]
  |  Branch (467:55): [True: 943, False: 0]
  ------------------
  468|    943|      curlx_free(data->state.aptr.rangeline);
  ------------------
  |  | 1483|    943|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  469|    943|      data->state.aptr.rangeline = curl_maprintf("Range: %s\r\n",
  470|    943|                                                 data->state.range);
  471|    943|      p_range = data->state.aptr.rangeline;
  472|    943|    }
  473|    943|  }
  474|       |
  475|       |  /*
  476|       |   * Sanity check the custom headers
  477|       |   */
  478|  17.3k|  if(Curl_checkheaders(data, STRCONST("CSeq"))) {
  ------------------
  |  | 1292|  17.3k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (478:6): [True: 0, False: 17.3k]
  ------------------
  479|      0|    failf(data, "CSeq cannot be set as a custom header.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  480|      0|    result = CURLE_RTSP_CSEQ_ERROR;
  481|      0|    goto out;
  482|      0|  }
  483|  17.3k|  if(Curl_checkheaders(data, STRCONST("Session"))) {
  ------------------
  |  | 1292|  17.3k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (483:6): [True: 0, False: 17.3k]
  ------------------
  484|      0|    failf(data, "Session ID cannot be set as a custom header.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  485|      0|    result = CURLE_BAD_FUNCTION_ARGUMENT;
  486|      0|    goto out;
  487|      0|  }
  488|       |
  489|  17.3k|  result =
  490|  17.3k|    curlx_dyn_addf(&req_buffer,
  491|  17.3k|                   "%s %s RTSP/1.0\r\n" /* Request Stream-URI RTSP/1.0 */
  492|  17.3k|                   "CSeq: %u\r\n", /* CSeq */
  493|  17.3k|                   p_request, p_stream_uri, rtsp->CSeq_sent);
  494|  17.3k|  if(result)
  ------------------
  |  Branch (494:6): [True: 0, False: 17.3k]
  ------------------
  495|      0|    goto out;
  496|       |
  497|       |  /*
  498|       |   * Rather than do a normal alloc line, keep the session_id unformatted
  499|       |   * to make comparison easier
  500|       |   */
  501|  17.3k|  if(p_session_id) {
  ------------------
  |  Branch (501:6): [True: 844, False: 16.4k]
  ------------------
  502|    844|    result = curlx_dyn_addf(&req_buffer, "Session: %s\r\n", p_session_id);
  503|    844|    if(result)
  ------------------
  |  Branch (503:8): [True: 0, False: 844]
  ------------------
  504|      0|      goto out;
  505|    844|  }
  506|       |
  507|       |  /*
  508|       |   * Shared HTTP-like options
  509|       |   */
  510|  17.3k|  result = curlx_dyn_addf(&req_buffer,
  511|  17.3k|                          "%s" /* transport */
  512|  17.3k|                          "%s" /* accept */
  513|  17.3k|                          "%s" /* accept-encoding */
  514|  17.3k|                          "%s" /* range */
  515|  17.3k|                          "%s" /* referrer */
  516|  17.3k|                          "%s" /* user-agent */
  517|  17.3k|                          "%s" /* hd_proxy_auth */
  518|  17.3k|                          "%s" /* hd_auth */
  519|  17.3k|                          ,
  520|  17.3k|                          p_transport ? p_transport : "",
  ------------------
  |  Branch (520:27): [True: 165, False: 17.1k]
  ------------------
  521|  17.3k|                          p_accept ? p_accept : "",
  ------------------
  |  Branch (521:27): [True: 2.54k, False: 14.7k]
  ------------------
  522|  17.3k|                          p_accept_encoding ? p_accept_encoding : "",
  ------------------
  |  Branch (522:27): [True: 1.29k, False: 16.0k]
  ------------------
  523|  17.3k|                          p_range ? p_range : "",
  ------------------
  |  Branch (523:27): [True: 943, False: 16.3k]
  ------------------
  524|  17.3k|                          p_referrer ? p_referrer : "",
  ------------------
  |  Branch (524:27): [True: 4.81k, False: 12.5k]
  ------------------
  525|  17.3k|                          p_uagent ? p_uagent : "",
  ------------------
  |  Branch (525:27): [True: 2.05k, False: 15.2k]
  ------------------
  526|  17.3k|                          p_hd_proxy_auth ? p_hd_proxy_auth : "",
  ------------------
  |  Branch (526:27): [True: 0, False: 17.3k]
  ------------------
  527|  17.3k|                          p_hd_auth ? p_hd_auth : "");
  ------------------
  |  Branch (527:27): [True: 7.39k, False: 9.93k]
  ------------------
  528|       |
  529|  17.3k|  if(result)
  ------------------
  |  Branch (529:6): [True: 22, False: 17.3k]
  ------------------
  530|     22|    goto out;
  531|       |
  532|  17.3k|  if((rtspreq == RTSPREQ_SETUP) || (rtspreq == RTSPREQ_DESCRIBE)) {
  ------------------
  |  Branch (532:6): [True: 165, False: 17.1k]
  |  Branch (532:36): [True: 2.54k, False: 14.6k]
  ------------------
  533|  2.70k|    result = Curl_add_timecondition(data, &req_buffer);
  534|  2.70k|    if(result)
  ------------------
  |  Branch (534:8): [True: 0, False: 2.70k]
  ------------------
  535|      0|      goto out;
  536|  2.70k|  }
  537|       |
  538|  17.3k|  result = Curl_add_custom_headers(data, FALSE, httpversion, &req_buffer);
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
  539|  17.3k|  if(result)
  ------------------
  |  Branch (539:6): [True: 10, False: 17.3k]
  ------------------
  540|     10|    goto out;
  541|       |
  542|  17.3k|  result = rtsp_setup_body(data, rtspreq, &req_buffer);
  543|  17.3k|  if(result)
  ------------------
  |  Branch (543:6): [True: 5, False: 17.2k]
  ------------------
  544|      5|    goto out;
  545|       |
  546|       |  /* Finish the request buffer */
  547|  17.2k|  result = curlx_dyn_addn(&req_buffer, STRCONST("\r\n"));
  ------------------
  |  | 1292|  17.2k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  548|  17.2k|  if(result)
  ------------------
  |  Branch (548:6): [True: 1, False: 17.2k]
  ------------------
  549|      1|    goto out;
  550|       |
  551|  17.2k|  Curl_xfer_setup_sendrecv(data, FIRSTSOCKET, -1);
  ------------------
  |  |  303|  17.2k|#define FIRSTSOCKET     0
  ------------------
  552|       |
  553|       |  /* issue the request */
  554|  17.2k|  result = Curl_req_send(data, &req_buffer, httpversion);
  555|  17.2k|  if(result) {
  ------------------
  |  Branch (555:6): [True: 2, False: 17.2k]
  ------------------
  556|      2|    failf(data, "Failed sending RTSP request");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  557|      2|    goto out;
  558|      2|  }
  559|       |
  560|       |  /* Increment the CSeq on success */
  561|  17.2k|  data->state.rtsp_next_client_CSeq++;
  562|       |
  563|  17.2k|  if(data->req.writebytecount) {
  ------------------
  |  Branch (563:6): [True: 1.02k, False: 16.2k]
  ------------------
  564|       |    /* if a request-body has been sent off, we make sure this progress is
  565|       |       noted properly */
  566|  1.02k|    Curl_pgrsSetUploadCounter(data, data->req.writebytecount);
  567|  1.02k|    result = Curl_pgrsUpdate(data);
  568|  1.02k|  }
  569|  17.3k|out:
  570|  17.3k|  curlx_dyn_free(&req_buffer);
  571|  17.3k|  return result;
  572|  17.2k|}
rtsp.c:rtsp_setup_body:
  200|  17.3k|{
  201|  17.3k|  CURLcode result;
  202|  17.3k|  if(rtspreq == RTSPREQ_ANNOUNCE ||
  ------------------
  |  Branch (202:6): [True: 1.05k, False: 16.2k]
  ------------------
  203|  16.2k|     rtspreq == RTSPREQ_SET_PARAMETER ||
  ------------------
  |  Branch (203:6): [True: 366, False: 15.8k]
  ------------------
  204|  15.8k|     rtspreq == RTSPREQ_GET_PARAMETER) {
  ------------------
  |  Branch (204:6): [True: 152, False: 15.7k]
  ------------------
  205|  1.57k|    curl_off_t req_clen; /* request content length */
  206|       |
  207|  1.57k|    if(data->state.upload) {
  ------------------
  |  Branch (207:8): [True: 178, False: 1.39k]
  ------------------
  208|    178|      req_clen = data->state.infilesize;
  209|    178|      data->state.httpreq = HTTPREQ_PUT;
  210|    178|      result = Curl_creader_set_fread(data, req_clen);
  211|    178|      if(result)
  ------------------
  |  Branch (211:10): [True: 0, False: 178]
  ------------------
  212|      0|        return result;
  213|    178|    }
  214|  1.39k|    else {
  215|  1.39k|      if(data->set.postfields) {
  ------------------
  |  Branch (215:10): [True: 1.00k, False: 389]
  ------------------
  216|  1.00k|        size_t plen = (data->set.postfieldsize >= 0) ?
  ------------------
  |  Branch (216:23): [True: 0, False: 1.00k]
  ------------------
  217|  1.00k|          (size_t)data->set.postfieldsize : strlen(data->set.postfields);
  218|  1.00k|        req_clen = (curl_off_t)plen;
  219|  1.00k|        result = Curl_creader_set_buf(data, data->set.postfields, plen);
  220|  1.00k|      }
  221|    389|      else if(data->state.infilesize >= 0) {
  ------------------
  |  Branch (221:15): [True: 241, False: 148]
  ------------------
  222|    241|        req_clen = data->state.infilesize;
  223|    241|        result = Curl_creader_set_fread(data, req_clen);
  224|    241|      }
  225|    148|      else {
  226|    148|        req_clen = 0;
  227|    148|        result = Curl_creader_set_null(data);
  228|    148|      }
  229|  1.39k|      if(result)
  ------------------
  |  Branch (229:10): [True: 0, False: 1.39k]
  ------------------
  230|      0|        return result;
  231|  1.39k|    }
  232|       |
  233|  1.57k|    if(req_clen > 0) {
  ------------------
  |  Branch (233:8): [True: 1.08k, False: 487]
  ------------------
  234|       |      /* As stated in the http comments, it is probably not wise to
  235|       |       * actually set a custom Content-Length in the headers */
  236|  1.08k|      if(!Curl_checkheaders(data, STRCONST("Content-Length"))) {
  ------------------
  |  | 1292|  1.08k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (236:10): [True: 1.08k, False: 1]
  ------------------
  237|  1.08k|        result = curlx_dyn_addf(reqp, "Content-Length: %" FMT_OFF_T "\r\n",
  238|  1.08k|                                req_clen);
  239|  1.08k|        if(result)
  ------------------
  |  Branch (239:12): [True: 2, False: 1.08k]
  ------------------
  240|      2|          return result;
  241|  1.08k|      }
  242|       |
  243|  1.08k|      if(rtspreq == RTSPREQ_SET_PARAMETER ||
  ------------------
  |  Branch (243:10): [True: 313, False: 769]
  ------------------
  244|    769|         rtspreq == RTSPREQ_GET_PARAMETER) {
  ------------------
  |  Branch (244:10): [True: 117, False: 652]
  ------------------
  245|    430|        if(!Curl_checkheaders(data, STRCONST("Content-Type"))) {
  ------------------
  |  | 1292|    430|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (245:12): [True: 430, False: 0]
  ------------------
  246|    430|          result = curlx_dyn_addn(reqp, STRCONST("Content-Type: "
  ------------------
  |  | 1292|    430|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  247|    430|                                                 "text/parameters\r\n"));
  248|    430|          if(result)
  ------------------
  |  Branch (248:14): [True: 2, False: 428]
  ------------------
  249|      2|            return result;
  250|    430|        }
  251|    430|      }
  252|       |
  253|  1.08k|      if(rtspreq == RTSPREQ_ANNOUNCE) {
  ------------------
  |  Branch (253:10): [True: 652, False: 428]
  ------------------
  254|    652|        if(!Curl_checkheaders(data, STRCONST("Content-Type"))) {
  ------------------
  |  | 1292|    652|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  |  Branch (254:12): [True: 652, False: 0]
  ------------------
  255|    652|          result = curlx_dyn_addn(reqp, STRCONST("Content-Type: "
  ------------------
  |  | 1292|    652|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
  256|    652|                                                 "application/sdp\r\n"));
  257|    652|          if(result)
  ------------------
  |  Branch (257:14): [True: 1, False: 651]
  ------------------
  258|      1|            return result;
  259|    652|        }
  260|    652|      }
  261|  1.08k|    }
  262|    487|    else if(rtspreq == RTSPREQ_GET_PARAMETER) {
  ------------------
  |  Branch (262:13): [True: 33, False: 454]
  ------------------
  263|       |      /* Check for an empty GET_PARAMETER (heartbeat) request */
  264|     33|      data->state.httpreq = HTTPREQ_HEAD;
  265|     33|      data->req.no_body = TRUE;
  ------------------
  |  | 1055|     33|#define TRUE true
  ------------------
  266|     33|    }
  267|  1.57k|  }
  268|  15.7k|  else
  269|  15.7k|    result = Curl_creader_set_null(data);
  270|  17.2k|  return result;
  271|  17.3k|}
rtsp.c:rtsp_done:
  159|  17.3k|{
  160|  17.3k|  struct rtsp_conn *rtspc =
  161|  17.3k|    Curl_conn_meta_get(data->conn, CURL_META_RTSP_CONN);
  ------------------
  |  |   48|  17.3k|#define CURL_META_RTSP_CONN   "meta:proto:rtsp:conn"
  ------------------
  162|  17.3k|  struct RTSP *rtsp = Curl_meta_get(data, CURL_META_RTSP_EASY);
  ------------------
  |  |   46|  17.3k|#define CURL_META_RTSP_EASY   "meta:proto:rtsp:easy"
  ------------------
  163|  17.3k|  CURLcode result;
  164|       |
  165|  17.3k|  if(!rtspc || !rtsp)
  ------------------
  |  Branch (165:6): [True: 0, False: 17.3k]
  |  Branch (165:16): [True: 0, False: 17.3k]
  ------------------
  166|      0|    return CURLE_FAILED_INIT;
  167|       |
  168|       |  /* Bypass HTTP empty-reply checks on receive */
  169|  17.3k|  if(data->set.rtspreq == RTSPREQ_RECEIVE)
  ------------------
  |  Branch (169:6): [True: 18, False: 17.3k]
  ------------------
  170|     18|    premature = TRUE;
  ------------------
  |  | 1055|     18|#define TRUE true
  ------------------
  171|       |
  172|  17.3k|  result = Curl_http_done(data, status, premature);
  173|       |
  174|  17.3k|  if(!status && !result) {
  ------------------
  |  Branch (174:6): [True: 14.9k, False: 2.42k]
  |  Branch (174:17): [True: 12.5k, False: 2.42k]
  ------------------
  175|       |    /* Check the sequence numbers */
  176|  12.5k|    uint32_t CSeq_sent = rtsp->CSeq_sent;
  177|  12.5k|    uint32_t CSeq_recv = rtsp->CSeq_recv;
  178|  12.5k|    if((data->set.rtspreq != RTSPREQ_RECEIVE) && (CSeq_sent != CSeq_recv)) {
  ------------------
  |  Branch (178:8): [True: 12.5k, False: 18]
  |  Branch (178:50): [True: 12.4k, False: 27]
  ------------------
  179|  12.4k|      failf(data,
  ------------------
  |  |   62|  12.4k|#define failf Curl_failf
  ------------------
  180|  12.4k|            "The CSeq of this request %u did not match the response %u",
  181|  12.4k|            CSeq_sent, CSeq_recv);
  182|  12.4k|      return CURLE_RTSP_CSEQ_ERROR;
  183|  12.4k|    }
  184|     45|    if(data->set.rtspreq == RTSPREQ_RECEIVE && (rtspc->rtp_channel == -1)) {
  ------------------
  |  Branch (184:8): [True: 18, False: 27]
  |  Branch (184:48): [True: 18, False: 0]
  ------------------
  185|     18|      infof(data, "Got an RTP Receive with a CSeq of %u", CSeq_recv);
  ------------------
  |  |  143|     18|  do {                               \
  |  |  144|     18|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     18|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 18, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  320|     18|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     18|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     18|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 18]
  |  |  ------------------
  ------------------
  186|     18|    }
  187|     45|    if(data->set.rtspreq == RTSPREQ_RECEIVE &&
  ------------------
  |  Branch (187:8): [True: 18, False: 27]
  ------------------
  188|     18|       data->req.eos_written) {
  ------------------
  |  Branch (188:8): [True: 3, False: 15]
  ------------------
  189|      3|      failf(data, "Server prematurely closed the RTSP connection.");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  190|      3|      return CURLE_RECV_ERROR;
  191|      3|    }
  192|     45|  }
  193|       |
  194|  4.89k|  return result;
  195|  17.3k|}
rtsp.c:rtsp_connect:
  139|  7.10k|{
  140|  7.10k|  struct rtsp_conn *rtspc =
  141|  7.10k|    Curl_conn_meta_get(data->conn, CURL_META_RTSP_CONN);
  ------------------
  |  |   48|  7.10k|#define CURL_META_RTSP_CONN   "meta:proto:rtsp:conn"
  ------------------
  142|       |
  143|  7.10k|  if(!rtspc)
  ------------------
  |  Branch (143:6): [True: 0, False: 7.10k]
  ------------------
  144|      0|    return CURLE_FAILED_INIT;
  145|       |
  146|       |  /* Initialize the CSeq if not already done */
  147|  7.10k|  if(data->state.rtsp_next_client_CSeq == 0)
  ------------------
  |  Branch (147:6): [True: 6.88k, False: 222]
  ------------------
  148|  6.88k|    data->state.rtsp_next_client_CSeq = 1;
  149|  7.10k|  if(data->state.rtsp_next_server_CSeq == 0)
  ------------------
  |  Branch (149:6): [True: 6.90k, False: 200]
  ------------------
  150|  6.90k|    data->state.rtsp_next_server_CSeq = 1;
  151|       |
  152|  7.10k|  rtspc->rtp_channel = -1;
  153|       |  *done = TRUE;
  ------------------
  |  | 1055|  7.10k|#define TRUE true
  ------------------
  154|  7.10k|  return CURLE_OK;
  155|  7.10k|}
rtsp.c:rtsp_rtp_write_resp:
  829|  2.12M|{
  830|  2.12M|  struct rtsp_conn *rtspc =
  831|  2.12M|    Curl_conn_meta_get(data->conn, CURL_META_RTSP_CONN);
  ------------------
  |  |   48|  2.12M|#define CURL_META_RTSP_CONN   "meta:proto:rtsp:conn"
  ------------------
  832|  2.12M|  CURLcode result = CURLE_OK;
  833|  2.12M|  size_t consumed = 0;
  834|       |
  835|  2.12M|  if(!rtspc)
  ------------------
  |  Branch (835:6): [True: 0, False: 2.12M]
  ------------------
  836|      0|    return CURLE_FAILED_INIT;
  837|       |
  838|  2.12M|  if(!data->req.header)
  ------------------
  |  Branch (838:6): [True: 1.91k, False: 2.12M]
  ------------------
  839|  1.91k|    rtspc->in_header = FALSE;
  ------------------
  |  | 1058|  1.91k|#define FALSE false
  ------------------
  840|  2.12M|  if(!blen) {
  ------------------
  |  Branch (840:6): [True: 4.37k, False: 2.12M]
  ------------------
  841|  4.37k|    goto out;
  842|  4.37k|  }
  843|       |
  844|  2.12M|  DEBUGF(infof(data, "rtsp_rtp_write_resp(len=%zu, in_header=%d, eos=%d)",
  ------------------
  |  | 1067|  14.8M|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 2.12M, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 2.12M]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 2.12M]
  |  |  ------------------
  ------------------
  845|  2.12M|               blen, rtspc->in_header, is_eos));
  846|       |
  847|       |  /* If header parsing is not ongoing, extract RTP messages */
  848|  2.12M|  if(!rtspc->in_header) {
  ------------------
  |  Branch (848:6): [True: 83.1k, False: 2.03M]
  ------------------
  849|  83.1k|    result = rtsp_filter_rtp(data, rtspc, buf, blen, &consumed);
  850|  83.1k|    if(result)
  ------------------
  |  Branch (850:8): [True: 3, False: 83.1k]
  ------------------
  851|      3|      goto out;
  852|  83.1k|    buf += consumed;
  853|  83.1k|    blen -= consumed;
  854|       |    /* either we consumed all or are at the start of header parsing */
  855|  83.1k|    if(blen && !data->req.header)
  ------------------
  |  Branch (855:8): [True: 14.8k, False: 68.3k]
  |  Branch (855:16): [True: 1, False: 14.8k]
  ------------------
  856|      1|      DEBUGF(infof(data, "RTSP: %zu bytes, possibly excess in response body",
  ------------------
  |  | 1067|  83.1k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 1, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 1]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 1]
  |  |  ------------------
  ------------------
  857|  83.1k|                   blen));
  858|  83.1k|  }
  859|       |
  860|       |  /* we want to parse headers, do so */
  861|  2.12M|  if(data->req.header && blen) {
  ------------------
  |  Branch (861:6): [True: 2.12M, False: 1.35k]
  |  Branch (861:26): [True: 2.05M, False: 66.9k]
  ------------------
  862|  2.05M|    rtspc->in_header = TRUE;
  ------------------
  |  | 1055|  2.05M|#define TRUE true
  ------------------
  863|  2.05M|    result = Curl_http_write_resp_hds(data, buf, blen, &consumed);
  864|  2.05M|    if(result)
  ------------------
  |  Branch (864:8): [True: 1.43k, False: 2.05M]
  ------------------
  865|  1.43k|      goto out;
  866|       |
  867|  2.05M|    buf += consumed;
  868|  2.05M|    blen -= consumed;
  869|       |
  870|  2.05M|    if(!data->req.header)
  ------------------
  |  Branch (870:8): [True: 11.9k, False: 2.04M]
  ------------------
  871|  11.9k|      rtspc->in_header = FALSE;
  ------------------
  |  | 1058|  11.9k|#define FALSE false
  ------------------
  872|       |
  873|  2.05M|    if(!rtspc->in_header) {
  ------------------
  |  Branch (873:8): [True: 11.9k, False: 2.04M]
  ------------------
  874|       |      /* If header parsing is done, extract interleaved RTP messages */
  875|  11.9k|      if(data->req.size <= -1) {
  ------------------
  |  Branch (875:10): [True: 6.57k, False: 5.40k]
  ------------------
  876|       |        /* Respect section 4.4 of rfc2326: If the Content-Length header is
  877|       |           absent, a length 0 must be assumed. */
  878|  6.57k|        data->req.size = 0;
  879|  6.57k|        data->req.download_done = TRUE;
  ------------------
  |  | 1055|  6.57k|#define TRUE true
  ------------------
  880|  6.57k|      }
  881|  11.9k|      result = rtsp_filter_rtp(data, rtspc, buf, blen, &consumed);
  882|  11.9k|      if(result)
  ------------------
  |  Branch (882:10): [True: 442, False: 11.5k]
  ------------------
  883|    442|        goto out;
  884|  11.5k|      buf += consumed;
  885|  11.5k|      blen -= consumed;
  886|  11.5k|    }
  887|  2.05M|  }
  888|       |
  889|  2.12M|  if(rtspc->state != RTP_PARSE_SKIP)
  ------------------
  |  Branch (889:6): [True: 2.57k, False: 2.11M]
  ------------------
  890|  2.57k|    data->req.done = FALSE;
  ------------------
  |  | 1058|  2.57k|#define FALSE false
  ------------------
  891|       |  /* we SHOULD have consumed all bytes, unless the response is borked.
  892|       |   * In which case we write out the left over bytes, letting the client
  893|       |   * writer deal with it (it will report EXCESS and fail the transfer). */
  894|  2.12M|  DEBUGF(infof(data, "rtsp_rtp_write_resp(len=%zu, in_header=%d, done=%d, "
  ------------------
  |  | 1067|  14.8M|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 2.12M, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 2.12M]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 2.12M]
  |  |  ------------------
  ------------------
  895|  2.12M|               "rtspc->state=%d, req.size=%" FMT_OFF_T ")",
  896|  2.12M|               blen, rtspc->in_header, data->req.done, rtspc->state,
  897|  2.12M|               data->req.size));
  898|  2.12M|  if(!result && (is_eos || blen)) {
  ------------------
  |  Branch (898:6): [True: 2.12M, False: 0]
  |  Branch (898:18): [True: 0, False: 2.12M]
  |  Branch (898:28): [True: 206, False: 2.12M]
  ------------------
  899|    206|    result = Curl_client_write(data, CLIENTWRITE_BODY |
  ------------------
  |  |   42|    206|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  900|    206|                               (is_eos ? CLIENTWRITE_EOS : 0), buf, blen);
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (900:33): [True: 0, False: 206]
  ------------------
  901|    206|  }
  902|       |
  903|  2.12M|out:
  904|  2.12M|  if((data->set.rtspreq == RTSPREQ_RECEIVE) &&
  ------------------
  |  Branch (904:6): [True: 375, False: 2.12M]
  ------------------
  905|    375|     (rtspc->state == RTP_PARSE_SKIP)) {
  ------------------
  |  Branch (905:6): [True: 15, False: 360]
  ------------------
  906|       |    /* In special mode RECEIVE, we process one chunk of network
  907|       |     * data, so we stop the transfer here, if we have no incomplete
  908|       |     * RTP message pending. */
  909|       |    data->req.download_done = TRUE;
  ------------------
  |  | 1055|     15|#define TRUE true
  ------------------
  910|     15|  }
  911|  2.12M|  return result;
  912|  2.12M|}
rtsp.c:rtsp_filter_rtp:
  645|  95.1k|{
  646|  95.1k|  CURLcode result = CURLE_OK;
  647|  95.1k|  size_t skip_len = 0;
  648|       |
  649|  95.1k|  *pconsumed = 0;
  650|  5.02M|  while(blen) {
  ------------------
  |  Branch (650:9): [True: 4.94M, False: 79.8k]
  ------------------
  651|  4.94M|    bool in_body = (data->req.headerline && !rtspc->in_header) &&
  ------------------
  |  Branch (651:21): [True: 3.15M, False: 1.79M]
  |  Branch (651:45): [True: 3.15M, False: 0]
  ------------------
  652|  3.15M|                   (data->req.size >= 0) &&
  ------------------
  |  Branch (652:20): [True: 3.15M, False: 0]
  ------------------
  653|  3.15M|                   (data->req.bytecount < data->req.size);
  ------------------
  |  Branch (653:20): [True: 3.00M, False: 146k]
  ------------------
  654|  4.94M|    switch(rtspc->state) {
  655|       |
  656|  2.51M|    case RTP_PARSE_SKIP: {
  ------------------
  |  Branch (656:5): [True: 2.51M, False: 2.42M]
  ------------------
  657|  2.51M|      DEBUGASSERT(curlx_dyn_len(&rtspc->buf) == 0);
  ------------------
  |  | 1081|  2.51M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (657:7): [True: 0, False: 2.51M]
  |  Branch (657:7): [True: 2.51M, False: 0]
  ------------------
  658|  14.0M|      while(blen && buf[0] != '$') {
  ------------------
  |  Branch (658:13): [True: 13.9M, False: 75.5k]
  |  Branch (658:21): [True: 11.5M, False: 2.42M]
  ------------------
  659|  11.5M|        if(!in_body && buf[0] == 'R' &&
  ------------------
  |  Branch (659:12): [True: 8.81M, False: 2.68M]
  |  Branch (659:24): [True: 50.1k, False: 8.76M]
  ------------------
  660|  50.1k|           data->set.rtspreq != RTSPREQ_RECEIVE) {
  ------------------
  |  Branch (660:12): [True: 50.1k, False: 71]
  ------------------
  661|  50.1k|          if(strncmp(buf, "RTSP/", (blen < 5) ? blen : 5) == 0) {
  ------------------
  |  Branch (661:14): [True: 15.0k, False: 35.0k]
  |  Branch (661:36): [True: 3.30k, False: 46.8k]
  ------------------
  662|       |            /* This could be the next response, no consume and return */
  663|  15.0k|            if(*pconsumed) {
  ------------------
  |  Branch (663:16): [True: 12.4k, False: 2.57k]
  ------------------
  664|  12.4k|              DEBUGF(infof(data, "RTP rtsp_filter_rtp[SKIP] RTSP/ prefix, "
  ------------------
  |  | 1067|  87.2k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 12.4k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 12.4k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  665|  12.4k|                           "skipping %zu bytes of junk", *pconsumed));
  666|  12.4k|            }
  667|  15.0k|            rtspc->state = RTP_PARSE_SKIP;
  668|  15.0k|            rtspc->in_header = TRUE;
  ------------------
  |  | 1055|  15.0k|#define TRUE true
  ------------------
  669|  15.0k|            goto out;
  670|  15.0k|          }
  671|  50.1k|        }
  672|       |        /* junk/BODY, consume without buffering */
  673|  11.4M|        *pconsumed += 1;
  674|  11.4M|        ++buf;
  675|  11.4M|        --blen;
  676|  11.4M|        ++skip_len;
  677|  11.4M|      }
  678|  2.50M|      if(blen && buf[0] == '$') {
  ------------------
  |  Branch (678:10): [True: 2.42M, False: 75.5k]
  |  Branch (678:18): [True: 2.42M, False: 0]
  ------------------
  679|       |        /* possible start of an RTP message, buffer */
  680|  2.42M|        if(skip_len) {
  ------------------
  |  Branch (680:12): [True: 2.42M, False: 2.45k]
  ------------------
  681|       |          /* end of junk/BODY bytes, flush */
  682|  2.42M|          result = rtp_write_body_junk(data, rtspc, buf - skip_len, skip_len);
  683|  2.42M|          skip_len = 0;
  684|  2.42M|          if(result)
  ------------------
  |  Branch (684:14): [True: 197, False: 2.42M]
  ------------------
  685|    197|            goto out;
  686|  2.42M|        }
  687|  2.42M|        if(curlx_dyn_addn(&rtspc->buf, buf, 1)) {
  ------------------
  |  Branch (687:12): [True: 0, False: 2.42M]
  ------------------
  688|      0|          result = CURLE_OUT_OF_MEMORY;
  689|      0|          goto out;
  690|      0|        }
  691|  2.42M|        *pconsumed += 1;
  692|  2.42M|        ++buf;
  693|  2.42M|        --blen;
  694|  2.42M|        rtspc->state = RTP_PARSE_CHANNEL;
  695|  2.42M|      }
  696|  2.50M|      break;
  697|  2.50M|    }
  698|       |
  699|  2.50M|    case RTP_PARSE_CHANNEL: {
  ------------------
  |  Branch (699:5): [True: 2.42M, False: 2.51M]
  ------------------
  700|  2.42M|      int idx = ((unsigned char)buf[0]) / 8;
  701|  2.42M|      int off = ((unsigned char)buf[0]) % 8;
  702|  2.42M|      DEBUGASSERT(curlx_dyn_len(&rtspc->buf) == 1);
  ------------------
  |  | 1081|  2.42M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (702:7): [True: 0, False: 2.42M]
  |  Branch (702:7): [True: 2.42M, False: 0]
  ------------------
  703|  2.42M|      if(!(data->state.rtp_channel_mask[idx] & (1 << off))) {
  ------------------
  |  Branch (703:10): [True: 2.42M, False: 0]
  ------------------
  704|       |        /* invalid channel number, junk or BODY data */
  705|  2.42M|        rtspc->state = RTP_PARSE_SKIP;
  706|  2.42M|        DEBUGASSERT(skip_len == 0);
  ------------------
  |  | 1081|  2.42M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (706:9): [True: 0, False: 2.42M]
  |  Branch (706:9): [True: 2.42M, False: 0]
  ------------------
  707|       |        /* we do not consume this byte, it is BODY data */
  708|  2.42M|        DEBUGF(infof(data, "RTSP: invalid RTP channel %d, skipping", idx));
  ------------------
  |  | 1067|  17.0M|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 2.42M, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 2.42M]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 2.42M]
  |  |  ------------------
  ------------------
  709|  2.42M|        if(*pconsumed == 0) {
  ------------------
  |  Branch (709:12): [True: 2.48k, False: 2.42M]
  ------------------
  710|       |          /* We did not consume the initial '$' in our buffer, but had
  711|       |           * it from an earlier call. We cannot un-consume it and have
  712|       |           * to write it directly as BODY data */
  713|  2.48k|          result = rtp_write_body_junk(data, rtspc,
  714|  2.48k|                                       curlx_dyn_ptr(&rtspc->buf), 1);
  715|  2.48k|          if(result)
  ------------------
  |  Branch (715:14): [True: 1, False: 2.48k]
  ------------------
  716|      1|            goto out;
  717|  2.48k|        }
  718|  2.42M|        else {
  719|       |          /* count the '$' as skip and continue */
  720|  2.42M|          skip_len = 1;
  721|  2.42M|        }
  722|  2.42M|        curlx_dyn_free(&rtspc->buf);
  723|  2.42M|        break;
  724|  2.42M|      }
  725|       |      /* a valid channel, so we expect this to be a real RTP message */
  726|      0|      rtspc->rtp_channel = (unsigned char)buf[0];
  727|      0|      if(curlx_dyn_addn(&rtspc->buf, buf, 1)) {
  ------------------
  |  Branch (727:10): [True: 0, False: 0]
  ------------------
  728|      0|        result = CURLE_OUT_OF_MEMORY;
  729|      0|        goto out;
  730|      0|      }
  731|      0|      *pconsumed += 1;
  732|      0|      ++buf;
  733|      0|      --blen;
  734|      0|      rtspc->state = RTP_PARSE_LEN;
  735|      0|      break;
  736|      0|    }
  737|       |
  738|      0|    case RTP_PARSE_LEN: {
  ------------------
  |  Branch (738:5): [True: 0, False: 4.94M]
  ------------------
  739|      0|      size_t rtp_len = curlx_dyn_len(&rtspc->buf);
  740|      0|      const char *rtp_buf;
  741|      0|      DEBUGASSERT(rtp_len >= 2 && rtp_len < 4);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (741:7): [True: 0, False: 0]
  |  Branch (741:7): [True: 0, False: 0]
  |  Branch (741:7): [True: 0, False: 0]
  |  Branch (741:7): [True: 0, False: 0]
  ------------------
  742|      0|      if(curlx_dyn_addn(&rtspc->buf, buf, 1)) {
  ------------------
  |  Branch (742:10): [True: 0, False: 0]
  ------------------
  743|      0|        result = CURLE_OUT_OF_MEMORY;
  744|      0|        goto out;
  745|      0|      }
  746|      0|      *pconsumed += 1;
  747|      0|      ++buf;
  748|      0|      --blen;
  749|      0|      if(rtp_len == 2)
  ------------------
  |  Branch (749:10): [True: 0, False: 0]
  ------------------
  750|      0|        break;
  751|      0|      rtp_buf = curlx_dyn_ptr(&rtspc->buf);
  752|      0|      rtspc->rtp_len = RTP_PKT_LENGTH(rtp_buf) + 4;
  ------------------
  |  |   73|      0|#define RTP_PKT_LENGTH(p) ((((unsigned int)((unsigned char)((p)[2]))) << 8) | \
  |  |   74|      0|                            ((unsigned int)((unsigned char)((p)[3]))))
  ------------------
  753|      0|      if(rtspc->rtp_len == 4) {
  ------------------
  |  Branch (753:10): [True: 0, False: 0]
  ------------------
  754|       |        /* zero-length payload, the 4-byte header is the complete RTP
  755|       |           message. Dispatch immediately without entering RTP_PARSE_DATA. */
  756|      0|        DEBUGF(infof(data, "RTP write channel %d rtp_len %zu (no payload)",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  757|      0|                     rtspc->rtp_channel, rtspc->rtp_len));
  758|      0|        result = rtp_client_write(data, rtp_buf, rtspc->rtp_len);
  759|      0|        curlx_dyn_free(&rtspc->buf);
  760|      0|        rtspc->state = RTP_PARSE_SKIP;
  761|      0|        if(result)
  ------------------
  |  Branch (761:12): [True: 0, False: 0]
  ------------------
  762|      0|          goto out;
  763|      0|        break;
  764|      0|      }
  765|      0|      rtspc->state = RTP_PARSE_DATA;
  766|      0|      break;
  767|      0|    }
  768|       |
  769|      0|    case RTP_PARSE_DATA: {
  ------------------
  |  Branch (769:5): [True: 0, False: 4.94M]
  ------------------
  770|      0|      size_t rtp_len = curlx_dyn_len(&rtspc->buf);
  771|      0|      size_t needed;
  772|      0|      DEBUGASSERT(rtp_len < rtspc->rtp_len);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (772:7): [True: 0, False: 0]
  |  Branch (772:7): [True: 0, False: 0]
  ------------------
  773|      0|      needed = rtspc->rtp_len - rtp_len;
  774|      0|      if(needed <= blen) {
  ------------------
  |  Branch (774:10): [True: 0, False: 0]
  ------------------
  775|      0|        if(curlx_dyn_addn(&rtspc->buf, buf, needed)) {
  ------------------
  |  Branch (775:12): [True: 0, False: 0]
  ------------------
  776|      0|          result = CURLE_OUT_OF_MEMORY;
  777|      0|          goto out;
  778|      0|        }
  779|      0|        *pconsumed += needed;
  780|      0|        buf += needed;
  781|      0|        blen -= needed;
  782|       |        /* complete RTP message in buffer */
  783|      0|        DEBUGF(infof(data, "RTP write channel %d rtp_len %zu",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  784|      0|                     rtspc->rtp_channel, rtspc->rtp_len));
  785|      0|        result = rtp_client_write(data, curlx_dyn_ptr(&rtspc->buf),
  786|      0|                                  rtspc->rtp_len);
  787|      0|        curlx_dyn_free(&rtspc->buf);
  788|      0|        rtspc->state = RTP_PARSE_SKIP;
  789|      0|        if(result)
  ------------------
  |  Branch (789:12): [True: 0, False: 0]
  ------------------
  790|      0|          goto out;
  791|      0|      }
  792|      0|      else {
  793|      0|        if(curlx_dyn_addn(&rtspc->buf, buf, blen)) {
  ------------------
  |  Branch (793:12): [True: 0, False: 0]
  ------------------
  794|      0|          result = CURLE_OUT_OF_MEMORY;
  795|      0|          goto out;
  796|      0|        }
  797|      0|        *pconsumed += blen;
  798|      0|        buf += blen;
  799|      0|        blen = 0;
  800|      0|      }
  801|      0|      break;
  802|      0|    }
  803|       |
  804|      0|    default:
  ------------------
  |  Branch (804:5): [True: 0, False: 4.94M]
  ------------------
  805|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (805:7): [Folded, False: 0]
  |  Branch (805:7): [Folded, False: 0]
  ------------------
  806|      0|      return CURLE_RECV_ERROR;
  807|  4.94M|    }
  808|  4.94M|  }
  809|  95.1k|out:
  810|  95.1k|  if(!result && skip_len)
  ------------------
  |  Branch (810:6): [True: 94.9k, False: 198]
  |  Branch (810:17): [True: 88.0k, False: 6.86k]
  ------------------
  811|  88.0k|    result = rtp_write_body_junk(data, rtspc, buf - skip_len, skip_len);
  812|  95.1k|  return result;
  813|  95.1k|}
rtsp.c:rtp_write_body_junk:
  581|  2.51M|{
  582|  2.51M|  curl_off_t body_remain;
  583|  2.51M|  bool in_body;
  584|       |
  585|  2.51M|  in_body = (data->req.headerline && !rtspc->in_header) &&
  ------------------
  |  Branch (585:14): [True: 1.58M, False: 934k]
  |  Branch (585:38): [True: 1.58M, False: 178]
  ------------------
  586|  1.58M|            (data->req.size >= 0) &&
  ------------------
  |  Branch (586:13): [True: 1.58M, False: 0]
  ------------------
  587|  1.58M|            (data->req.bytecount < data->req.size);
  ------------------
  |  Branch (587:13): [True: 1.50M, False: 77.2k]
  ------------------
  588|  2.51M|  body_remain = in_body ? (data->req.size - data->req.bytecount) : 0;
  ------------------
  |  Branch (588:17): [True: 1.50M, False: 1.01M]
  ------------------
  589|  2.51M|  DEBUGASSERT(body_remain >= 0);
  ------------------
  |  | 1081|  2.51M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (589:3): [True: 0, False: 2.51M]
  |  Branch (589:3): [True: 2.51M, False: 0]
  ------------------
  590|  2.51M|  if(body_remain) {
  ------------------
  |  Branch (590:6): [True: 1.50M, False: 1.01M]
  ------------------
  591|  1.50M|    if((curl_off_t)blen > body_remain)
  ------------------
  |  Branch (591:8): [True: 336, False: 1.50M]
  ------------------
  592|    336|      blen = (size_t)body_remain;
  593|  1.50M|    return Curl_client_write(data, CLIENTWRITE_BODY, buf, blen);
  ------------------
  |  |   42|  1.50M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  594|  1.50M|  }
  595|  1.01M|  return CURLE_OK;
  596|  2.51M|}
rtsp.c:rtsp_conn_is_dead:
  131|  10.2k|{
  132|  10.2k|  bool input_pending;
  133|       |  /* Contrary to default handling, this protocol allows pending
  134|       |   * input on an unused connection. */
  135|  10.2k|  return !Curl_conn_is_alive(data, conn, &input_pending);
  136|  10.2k|}

Curl_socket_check:
  124|   133k|{
  125|   133k|  struct pollfd pfd[3];
  126|   133k|  int num;
  127|   133k|  int r;
  128|       |
  129|   133k|  if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  ------------------
                if((readfd0 == CURL_SOCKET_BAD) && (readfd1 == CURL_SOCKET_BAD) &&
  ------------------
  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (129:6): [True: 133k, False: 0]
  |  Branch (129:38): [True: 133k, False: 0]
  ------------------
  130|   133k|     (writefd == CURL_SOCKET_BAD)) {
  ------------------
  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (130:6): [True: 0, False: 133k]
  ------------------
  131|       |    /* no sockets, wait */
  132|      0|    return curlx_wait_ms(timeout_ms);
  133|      0|  }
  134|       |
  135|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  136|       |     time in this function does not need to be measured. This happens
  137|       |     when function is called with a zero timeout or a negative timeout
  138|       |     value indicating a blocking call should be performed. */
  139|       |
  140|   133k|  num = 0;
  141|   133k|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (141:6): [True: 0, False: 133k]
  ------------------
  142|      0|    pfd[num].fd = readfd0;
  143|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  144|      0|    pfd[num].revents = 0;
  145|      0|    num++;
  146|      0|  }
  147|   133k|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (147:6): [True: 0, False: 133k]
  ------------------
  148|      0|    pfd[num].fd = readfd1;
  149|      0|    pfd[num].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
  150|      0|    pfd[num].revents = 0;
  151|      0|    num++;
  152|      0|  }
  153|   133k|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   133k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (153:6): [True: 133k, False: 0]
  ------------------
  154|   133k|    pfd[num].fd = writefd;
  155|   133k|    pfd[num].events = POLLWRNORM | POLLOUT | POLLPRI;
  156|   133k|    pfd[num].revents = 0;
  157|   133k|    num++;
  158|   133k|  }
  159|       |
  160|   133k|  r = Curl_poll(pfd, (unsigned int)num, timeout_ms);
  161|   133k|  if(r <= 0)
  ------------------
  |  Branch (161:6): [True: 133k, False: 19]
  ------------------
  162|   133k|    return r;
  163|       |
  164|     19|  r = 0;
  165|     19|  num = 0;
  166|     19|  if(readfd0 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     19|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (166:6): [True: 0, False: 19]
  ------------------
  167|      0|    if(pfd[num].revents & (POLLRDNORM | POLLIN | POLLERR | POLLHUP))
  ------------------
  |  Branch (167:8): [True: 0, False: 0]
  ------------------
  168|      0|      r |= CURL_CSELECT_IN;
  ------------------
  |  |  290|      0|#define CURL_CSELECT_IN   0x01
  ------------------
  169|      0|    if(pfd[num].revents & (POLLPRI | POLLNVAL))
  ------------------
  |  Branch (169:8): [True: 0, False: 0]
  ------------------
  170|      0|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  171|      0|    num++;
  172|      0|  }
  173|     19|  if(readfd1 != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     19|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (173:6): [True: 0, False: 19]
  ------------------
  174|      0|    if(pfd[num].revents & (POLLRDNORM | POLLIN | POLLERR | POLLHUP))
  ------------------
  |  Branch (174:8): [True: 0, False: 0]
  ------------------
  175|      0|      r |= CURL_CSELECT_IN2;
  ------------------
  |  |   70|      0|#define CURL_CSELECT_IN2 (CURL_CSELECT_ERR << 1)
  |  |  ------------------
  |  |  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  |  |  ------------------
  ------------------
  176|      0|    if(pfd[num].revents & (POLLPRI | POLLNVAL))
  ------------------
  |  Branch (176:8): [True: 0, False: 0]
  ------------------
  177|      0|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|      0|#define CURL_CSELECT_ERR  0x04
  ------------------
  178|      0|    num++;
  179|      0|  }
  180|     19|  if(writefd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|     19|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (180:6): [True: 19, False: 0]
  ------------------
  181|     19|    if(pfd[num].revents & (POLLWRNORM | POLLOUT))
  ------------------
  |  Branch (181:8): [True: 19, False: 0]
  ------------------
  182|     19|      r |= CURL_CSELECT_OUT;
  ------------------
  |  |  291|     19|#define CURL_CSELECT_OUT  0x02
  ------------------
  183|     19|    if(pfd[num].revents & (POLLERR | POLLHUP | POLLPRI | POLLNVAL))
  ------------------
  |  Branch (183:8): [True: 19, False: 0]
  ------------------
  184|     19|      r |= CURL_CSELECT_ERR;
  ------------------
  |  |  292|     19|#define CURL_CSELECT_ERR  0x04
  ------------------
  185|     19|  }
  186|       |
  187|     19|  return r;
  188|   133k|}
Curl_poll:
  204|   144k|{
  205|   144k|#ifdef HAVE_POLL
  206|   144k|  int pending_ms;
  207|       |#else
  208|       |  fd_set fds_read;
  209|       |  fd_set fds_write;
  210|       |  fd_set fds_err;
  211|       |  curl_socket_t maxfd;
  212|       |#endif
  213|   144k|  bool fds_none = TRUE;
  ------------------
  |  | 1055|   144k|#define TRUE true
  ------------------
  214|   144k|  unsigned int i;
  215|   144k|  int r;
  216|       |
  217|   144k|  if(ufds) {
  ------------------
  |  Branch (217:6): [True: 144k, False: 0]
  ------------------
  218|   144k|    for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (218:16): [True: 144k, False: 0]
  ------------------
  219|   144k|      if(ufds[i].fd != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|   144k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (219:10): [True: 144k, False: 0]
  ------------------
  220|   144k|        fds_none = FALSE;
  ------------------
  |  | 1058|   144k|#define FALSE false
  ------------------
  221|   144k|        break;
  222|   144k|      }
  223|   144k|    }
  224|   144k|  }
  225|   144k|  if(fds_none) {
  ------------------
  |  Branch (225:6): [True: 0, False: 144k]
  ------------------
  226|       |    /* no sockets, wait */
  227|      0|    return curlx_wait_ms(timeout_ms);
  228|      0|  }
  229|       |
  230|       |  /* Avoid initial timestamp, avoid curlx_now() call, when elapsed
  231|       |     time in this function does not need to be measured. This happens
  232|       |     when function is called with a zero timeout or a negative timeout
  233|       |     value indicating a blocking call should be performed. */
  234|       |
  235|   144k|#ifdef HAVE_POLL
  236|       |
  237|       |  /* prevent overflow, timeout_ms is typecast to int. */
  238|   144k|#if TIMEDIFF_T_MAX > INT_MAX
  239|   144k|  if(timeout_ms > INT_MAX)
  ------------------
  |  Branch (239:6): [True: 0, False: 144k]
  ------------------
  240|      0|    timeout_ms = INT_MAX;
  241|   144k|#endif
  242|   144k|  if(timeout_ms > 0)
  ------------------
  |  Branch (242:6): [True: 0, False: 144k]
  ------------------
  243|      0|    pending_ms = (int)timeout_ms;
  244|   144k|  else if(timeout_ms < 0)
  ------------------
  |  Branch (244:11): [True: 0, False: 144k]
  ------------------
  245|      0|    pending_ms = -1;
  246|   144k|  else
  247|   144k|    pending_ms = 0;
  248|   144k|  r = poll(ufds, nfds, pending_ms);
  249|   144k|  if(r <= 0) {
  ------------------
  |  Branch (249:6): [True: 133k, False: 10.2k]
  ------------------
  250|   133k|    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
                  if((r == -1) && (SOCKERRNO == SOCKEINTR))
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (250:8): [True: 0, False: 133k]
  |  Branch (250:21): [True: 0, False: 0]
  ------------------
  251|       |      /* make EINTR from select or poll not a "lethal" error */
  252|      0|      r = 0;
  253|   133k|    return r;
  254|   133k|  }
  255|       |
  256|  20.5k|  for(i = 0; i < nfds; i++) {
  ------------------
  |  Branch (256:14): [True: 10.2k, False: 10.2k]
  ------------------
  257|  10.2k|    if(ufds[i].fd == CURL_SOCKET_BAD)
  ------------------
  |  |  145|  10.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (257:8): [True: 0, False: 10.2k]
  ------------------
  258|      0|      continue;
  259|  10.2k|    if(ufds[i].revents & POLLHUP)
  ------------------
  |  Branch (259:8): [True: 19, False: 10.2k]
  ------------------
  260|     19|      ufds[i].revents |= POLLIN;
  261|  10.2k|    if(ufds[i].revents & POLLERR)
  ------------------
  |  Branch (261:8): [True: 19, False: 10.2k]
  ------------------
  262|     19|      ufds[i].revents |= POLLIN | POLLOUT;
  263|  10.2k|  }
  264|       |
  265|       |#else /* !HAVE_POLL */
  266|       |
  267|       |  FD_ZERO(&fds_read);
  268|       |  FD_ZERO(&fds_write);
  269|       |  FD_ZERO(&fds_err);
  270|       |  maxfd = (curl_socket_t)-1;
  271|       |
  272|       |  for(i = 0; i < nfds; i++) {
  273|       |    ufds[i].revents = 0;
  274|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  275|       |      continue;
  276|       |    VERIFY_SOCK(ufds[i].fd);
  277|       |    if(ufds[i].events & (POLLIN | POLLOUT | POLLPRI |
  278|       |                         POLLRDNORM | POLLWRNORM | POLLRDBAND)) {
  279|       |      if(ufds[i].fd > maxfd)
  280|       |        maxfd = ufds[i].fd;
  281|       |      if(ufds[i].events & (POLLRDNORM | POLLIN))
  282|       |        FD_SET(ufds[i].fd, &fds_read);
  283|       |      if(ufds[i].events & (POLLWRNORM | POLLOUT))
  284|       |        FD_SET(ufds[i].fd, &fds_write);
  285|       |      if(ufds[i].events & (POLLRDBAND | POLLPRI))
  286|       |        FD_SET(ufds[i].fd, &fds_err);
  287|       |    }
  288|       |  }
  289|       |
  290|       |  /*
  291|       |     Note also that Winsock ignores the first argument, so we do not worry
  292|       |     about the fact that maxfd is computed incorrectly with Winsock (since
  293|       |     curl_socket_t is unsigned in such cases and thus -1 is the largest
  294|       |     value).
  295|       |  */
  296|       |  r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
  297|       |  if(r <= 0) {
  298|       |    if((r == -1) && (SOCKERRNO == SOCKEINTR))
  299|       |      /* make EINTR from select or poll not a "lethal" error */
  300|       |      r = 0;
  301|       |    return r;
  302|       |  }
  303|       |
  304|       |  r = 0;
  305|       |  for(i = 0; i < nfds; i++) {
  306|       |    ufds[i].revents = 0;
  307|       |    if(ufds[i].fd == CURL_SOCKET_BAD)
  308|       |      continue;
  309|       |    if(FD_ISSET(ufds[i].fd, &fds_read)) {
  310|       |      if(ufds[i].events & POLLRDNORM)
  311|       |        ufds[i].revents |= POLLRDNORM;
  312|       |      if(ufds[i].events & POLLIN)
  313|       |        ufds[i].revents |= POLLIN;
  314|       |    }
  315|       |    if(FD_ISSET(ufds[i].fd, &fds_write)) {
  316|       |      if(ufds[i].events & POLLWRNORM)
  317|       |        ufds[i].revents |= POLLWRNORM;
  318|       |      if(ufds[i].events & POLLOUT)
  319|       |        ufds[i].revents |= POLLOUT;
  320|       |    }
  321|       |    if(FD_ISSET(ufds[i].fd, &fds_err)) {
  322|       |      if(ufds[i].events & POLLRDBAND)
  323|       |        ufds[i].revents |= POLLRDBAND;
  324|       |      if(ufds[i].events & POLLPRI)
  325|       |        ufds[i].revents |= POLLPRI;
  326|       |    }
  327|       |    if(ufds[i].revents)
  328|       |      r++;
  329|       |  }
  330|       |
  331|       |#endif /* HAVE_POLL */
  332|       |
  333|  10.2k|  return r;
  334|   144k|}
Curl_pollfds_init:
  339|   858k|{
  340|   858k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1081|   858k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (340:3): [True: 0, False: 858k]
  |  Branch (340:3): [True: 858k, False: 0]
  ------------------
  341|   858k|  memset(cpfds, 0, sizeof(*cpfds));
  342|   858k|  if(static_pfds && static_count) {
  ------------------
  |  Branch (342:6): [True: 858k, False: 0]
  |  Branch (342:21): [True: 858k, False: 0]
  ------------------
  343|   858k|    cpfds->pfds = static_pfds;
  344|   858k|    cpfds->count = static_count;
  345|   858k|  }
  346|   858k|}
Curl_pollfds_cleanup:
  354|   858k|{
  355|   858k|  DEBUGASSERT(cpfds);
  ------------------
  |  | 1081|   858k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (355:3): [True: 0, False: 858k]
  |  Branch (355:3): [True: 858k, False: 0]
  ------------------
  356|   858k|  if(cpfds->allocated_pfds) {
  ------------------
  |  Branch (356:6): [True: 0, False: 858k]
  ------------------
  357|      0|    curlx_free(cpfds->pfds);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  358|      0|  }
  359|   858k|  memset(cpfds, 0, sizeof(*cpfds));
  360|   858k|}
Curl_pollset_reset:
  488|  4.81M|{
  489|  4.81M|  unsigned int i;
  490|  4.81M|  ps->n = 0;
  491|  4.81M|#ifdef DEBUGBUILD
  492|  4.81M|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1081|  4.81M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (492:3): [True: 0, False: 4.81M]
  |  Branch (492:3): [True: 4.81M, False: 0]
  ------------------
  493|  4.81M|#endif
  494|  4.81M|  DEBUGASSERT(ps->count);
  ------------------
  |  | 1081|  4.81M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (494:3): [True: 0, False: 4.81M]
  |  Branch (494:3): [True: 4.81M, False: 0]
  ------------------
  495|  14.4M|  for(i = 0; i < ps->count; i++)
  ------------------
  |  Branch (495:14): [True: 9.62M, False: 4.81M]
  ------------------
  496|  9.62M|    ps->sockets[i] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  14.4M|#define CURL_SOCKET_BAD (-1)
  ------------------
  497|  4.81M|  memset(ps->actions, 0, ps->count * sizeof(ps->actions[0]));
  498|  4.81M|}
Curl_pollset_init:
  501|  1.54M|{
  502|  1.54M|#ifdef DEBUGBUILD
  503|  1.54M|  ps->init = CURL_EASY_POLLSET_MAGIC;
  ------------------
  |  |  131|  1.54M|#define CURL_EASY_POLLSET_MAGIC  0x7a657370
  ------------------
  504|  1.54M|#endif
  505|  1.54M|  ps->sockets = ps->def_sockets;
  506|  1.54M|  ps->actions = ps->def_actions;
  507|  1.54M|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1294|  1.54M|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  508|  1.54M|  ps->n = 0;
  509|  1.54M|  Curl_pollset_reset(ps);
  510|  1.54M|}
Curl_pollset_cleanup:
  521|  1.54M|{
  522|  1.54M|#ifdef DEBUGBUILD
  523|  1.54M|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1081|  1.54M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (523:3): [True: 0, False: 1.54M]
  |  Branch (523:3): [True: 1.54M, False: 0]
  ------------------
  524|  1.54M|#endif
  525|  1.54M|  if(ps->sockets != ps->def_sockets) {
  ------------------
  |  Branch (525:6): [True: 0, False: 1.54M]
  ------------------
  526|      0|    curlx_free(ps->sockets);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  527|      0|    ps->sockets = ps->def_sockets;
  528|      0|  }
  529|  1.54M|  if(ps->actions != ps->def_actions) {
  ------------------
  |  Branch (529:6): [True: 0, False: 1.54M]
  ------------------
  530|      0|    curlx_free(ps->actions);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  531|      0|    ps->actions = ps->def_actions;
  532|      0|  }
  533|  1.54M|  ps->count = CURL_ARRAYSIZE(ps->def_sockets);
  ------------------
  |  | 1294|  1.54M|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  534|  1.54M|  Curl_pollset_reset(ps);
  535|  1.54M|}
Curl_pollset_change:
  564|  1.99M|{
  565|  1.99M|  unsigned int i;
  566|       |
  567|  1.99M|#ifdef DEBUGBUILD
  568|  1.99M|  DEBUGASSERT(ps->init == CURL_EASY_POLLSET_MAGIC);
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (568:3): [True: 0, False: 1.99M]
  |  Branch (568:3): [True: 1.99M, False: 0]
  ------------------
  569|  1.99M|#endif
  570|       |
  571|  1.99M|  DEBUGASSERT(VALID_SOCK(sock));
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (571:3): [True: 0, False: 1.99M]
  |  Branch (571:3): [True: 1.99M, False: 0]
  ------------------
  572|  1.99M|  if(!VALID_SOCK(sock))
  ------------------
  |  |   98|  1.99M|#define VALID_SOCK(s) ((s) >= 0)
  ------------------
  |  Branch (572:6): [True: 0, False: 1.99M]
  ------------------
  573|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  574|       |
  575|  1.99M|  DEBUGASSERT(add_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (575:3): [True: 0, False: 1.99M]
  |  Branch (575:3): [True: 1.99M, False: 0]
  ------------------
  576|  1.99M|  DEBUGASSERT(remove_flags <= (CURL_POLL_IN | CURL_POLL_OUT));
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 1.99M]
  |  Branch (576:3): [True: 1.99M, False: 0]
  ------------------
  577|  1.99M|  DEBUGASSERT((add_flags & remove_flags) == 0); /* no overlap */
  ------------------
  |  | 1081|  1.99M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (577:3): [True: 0, False: 1.99M]
  |  Branch (577:3): [True: 1.99M, False: 0]
  ------------------
  578|  1.99M|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (578:14): [True: 492k, False: 1.50M]
  ------------------
  579|   492k|    if(ps->sockets[i] == sock) {
  ------------------
  |  Branch (579:8): [True: 492k, False: 0]
  ------------------
  580|   492k|      ps->actions[i] &= (unsigned char)(~remove_flags);
  581|   492k|      ps->actions[i] |= (unsigned char)add_flags;
  582|       |      /* all gone? remove socket */
  583|   492k|      if(!ps->actions[i]) {
  ------------------
  |  Branch (583:10): [True: 0, False: 492k]
  ------------------
  584|      0|        if((i + 1) < ps->n) {
  ------------------
  |  Branch (584:12): [True: 0, False: 0]
  ------------------
  585|      0|          memmove(&ps->sockets[i], &ps->sockets[i + 1],
  586|      0|                  (ps->n - (i + 1)) * sizeof(ps->sockets[0]));
  587|      0|          memmove(&ps->actions[i], &ps->actions[i + 1],
  588|      0|                  (ps->n - (i + 1)) * sizeof(ps->actions[0]));
  589|      0|        }
  590|      0|        --ps->n;
  591|      0|      }
  592|   492k|      return CURLE_OK;
  593|   492k|    }
  594|   492k|  }
  595|       |  /* not present */
  596|  1.50M|  if(add_flags) {
  ------------------
  |  Branch (596:6): [True: 1.50M, False: 0]
  ------------------
  597|  1.50M|    if(i >= ps->count) { /* need to grow */
  ------------------
  |  Branch (597:8): [True: 0, False: 1.50M]
  ------------------
  598|      0|      unsigned int new_count = CURLMAX(ps->count * 2, 8);
  ------------------
  |  | 1286|      0|#define CURLMAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1286:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  599|      0|      curl_socket_t *nsockets;
  600|      0|      unsigned char *nactions;
  601|       |
  602|      0|      CURL_TRC_M(data, "growing pollset capacity from %u to %u",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  603|      0|                 ps->count, new_count);
  604|      0|      if(new_count <= ps->count)
  ------------------
  |  Branch (604:10): [True: 0, False: 0]
  ------------------
  605|      0|        return CURLE_OUT_OF_MEMORY;
  606|      0|      nsockets = curlx_calloc(new_count, sizeof(nsockets[0]));
  ------------------
  |  | 1480|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  607|      0|      if(!nsockets)
  ------------------
  |  Branch (607:10): [True: 0, False: 0]
  ------------------
  608|      0|        return CURLE_OUT_OF_MEMORY;
  609|      0|      nactions = curlx_calloc(new_count, sizeof(nactions[0]));
  ------------------
  |  | 1480|      0|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  610|      0|      if(!nactions) {
  ------------------
  |  Branch (610:10): [True: 0, False: 0]
  ------------------
  611|      0|        curlx_free(nsockets);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  612|      0|        return CURLE_OUT_OF_MEMORY;
  613|      0|      }
  614|      0|      memcpy(nsockets, ps->sockets, ps->count * sizeof(ps->sockets[0]));
  615|      0|      memcpy(nactions, ps->actions, ps->count * sizeof(ps->actions[0]));
  616|      0|      if(ps->sockets != ps->def_sockets)
  ------------------
  |  Branch (616:10): [True: 0, False: 0]
  ------------------
  617|      0|        curlx_free(ps->sockets);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  618|      0|      ps->sockets = nsockets;
  619|      0|      if(ps->actions != ps->def_actions)
  ------------------
  |  Branch (619:10): [True: 0, False: 0]
  ------------------
  620|      0|        curlx_free(ps->actions);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  621|      0|      ps->actions = nactions;
  622|      0|      ps->count = new_count;
  623|      0|    }
  624|  1.50M|    DEBUGASSERT(i < ps->count);
  ------------------
  |  | 1081|  1.50M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (624:5): [True: 0, False: 1.50M]
  |  Branch (624:5): [True: 1.50M, False: 0]
  ------------------
  625|  1.50M|    if(i < ps->count) {
  ------------------
  |  Branch (625:8): [True: 1.50M, False: 0]
  ------------------
  626|  1.50M|      ps->sockets[i] = sock;
  627|  1.50M|      ps->actions[i] = (unsigned char)add_flags;
  628|  1.50M|      ps->n = i + 1;
  629|  1.50M|    }
  630|  1.50M|  }
  631|  1.50M|  return CURLE_OK;
  632|  1.50M|}
Curl_pollset_want_recv:
  712|  1.36M|{
  713|  1.36M|  unsigned int i;
  714|  1.36M|  (void)data;
  715|  2.54M|  for(i = 0; i < ps->n; ++i) {
  ------------------
  |  Branch (715:14): [True: 1.36M, False: 1.17M]
  ------------------
  716|  1.36M|    if((ps->sockets[i] == sock) && (ps->actions[i] & CURL_POLL_IN))
  ------------------
  |  |  283|   191k|#define CURL_POLL_IN     1
  ------------------
  |  Branch (716:8): [True: 191k, False: 1.17M]
  |  Branch (716:36): [True: 191k, False: 26]
  ------------------
  717|   191k|      return TRUE;
  ------------------
  |  | 1055|   191k|#define TRUE true
  ------------------
  718|  1.36M|  }
  719|  1.17M|  return FALSE;
  ------------------
  |  | 1058|  1.17M|#define FALSE false
  ------------------
  720|  1.36M|}

Curl_client_cleanup:
   71|  33.2k|{
   72|  33.2k|  cl_reset_reader(data);
   73|  33.2k|  cl_reset_writer(data);
   74|       |
   75|  33.2k|  data->req.bytecount = 0;
   76|  33.2k|  data->req.headerline = 0;
   77|  33.2k|}
Curl_client_reset:
   80|  23.6k|{
   81|  23.6k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (81:6): [True: 3, False: 23.6k]
  ------------------
   82|       |    /* already requested */
   83|      3|    CURL_TRC_READ(data, "client_reset, will rewind reader");
  ------------------
  |  |  163|      3|  do {                                                    \
  |  |  164|      3|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|      3|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      3|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      3|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
   84|      3|  }
   85|  23.6k|  else {
   86|  23.6k|    CURL_TRC_READ(data, "client_reset, clear readers");
  ------------------
  |  |  163|  23.6k|  do {                                                    \
  |  |  164|  23.6k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|  23.6k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  47.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 23.6k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 23.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  47.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  23.6k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  23.6k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  23.6k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 23.6k]
  |  |  ------------------
  ------------------
   87|  23.6k|    cl_reset_reader(data);
   88|  23.6k|  }
   89|  23.6k|  cl_reset_writer(data);
   90|       |
   91|  23.6k|  data->req.bytecount = 0;
   92|  23.6k|  data->req.headerline = 0;
   93|  23.6k|}
Curl_client_start:
   96|  32.0k|{
   97|  32.0k|  if(data->req.rewind_read) {
  ------------------
  |  Branch (97:6): [True: 733, False: 31.3k]
  ------------------
   98|    733|    struct Curl_creader *r = data->req.reader_stack;
   99|    733|    CURLcode result = CURLE_OK;
  100|       |
  101|    733|    CURL_TRC_READ(data, "client start, rewind readers");
  ------------------
  |  |  163|    733|  do {                                                    \
  |  |  164|    733|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|    733|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.46k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 733, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 733]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.46k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    733|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    733|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    733|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 733]
  |  |  ------------------
  ------------------
  102|  1.64k|    while(r) {
  ------------------
  |  Branch (102:11): [True: 916, False: 730]
  ------------------
  103|    916|      result = r->crt->cntrl(data, r, CURL_CRCNTRL_REWIND);
  104|    916|      if(result) {
  ------------------
  |  Branch (104:10): [True: 3, False: 913]
  ------------------
  105|      3|        failf(data, "rewind of client reader '%s' failed: %d",
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  106|      3|              r->crt->name, result);
  107|      3|        return result;
  108|      3|      }
  109|    913|      r = r->next;
  110|    913|    }
  111|    730|    data->req.rewind_read = FALSE;
  ------------------
  |  | 1058|    730|#define FALSE false
  ------------------
  112|    730|    cl_reset_reader(data);
  113|    730|  }
  114|  32.0k|  return CURLE_OK;
  115|  32.0k|}
Curl_creader_will_rewind:
  118|  23.9k|{
  119|  23.9k|  return (bool)data->req.rewind_read;
  120|  23.9k|}
Curl_creader_set_rewind:
  123|  1.92k|{
  124|  1.92k|  data->req.rewind_read = !!enable;
  125|  1.92k|}
Curl_cwriter_write:
  131|  7.00M|{
  132|  7.00M|  if(!writer)
  ------------------
  |  Branch (132:6): [True: 0, False: 7.00M]
  ------------------
  133|      0|    return CURLE_WRITE_ERROR;
  134|  7.00M|  return writer->cwt->do_write(data, writer, type, buf, nbytes);
  135|  7.00M|}
Curl_cwriter_def_init:
  139|  31.9k|{
  140|  31.9k|  (void)data;
  141|  31.9k|  (void)writer;
  142|  31.9k|  return CURLE_OK;
  143|  31.9k|}
Curl_cwriter_def_write:
  148|  1.44k|{
  149|  1.44k|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  150|  1.44k|}
Curl_cwriter_def_close:
  154|  31.9k|{
  155|  31.9k|  (void)data;
  156|  31.9k|  (void)writer;
  157|  31.9k|}
Curl_client_write:
  377|  1.71M|{
  378|  1.71M|  CURLcode result;
  379|       |
  380|       |  /* it is one of those, at least */
  381|  1.71M|  DEBUGASSERT(type &
  ------------------
  |  | 1081|  1.71M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (381:3): [True: 0, False: 1.71M]
  |  Branch (381:3): [True: 1.71M, False: 0]
  ------------------
  382|  1.71M|              (CLIENTWRITE_BODY | CLIENTWRITE_HEADER | CLIENTWRITE_INFO));
  383|       |  /* BODY is only BODY (with optional EOS) */
  384|  1.71M|  DEBUGASSERT(!(type & CLIENTWRITE_BODY) ||
  ------------------
  |  | 1081|  1.71M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (384:3): [True: 1.71M, False: 0]
  |  Branch (384:3): [True: 0, False: 0]
  |  Branch (384:3): [True: 212k, False: 1.50M]
  |  Branch (384:3): [True: 1.50M, False: 0]
  ------------------
  385|  1.71M|              ((type & ~(CLIENTWRITE_BODY | CLIENTWRITE_EOS)) == 0));
  386|       |  /* INFO is only INFO (with optional EOS) */
  387|  1.71M|  DEBUGASSERT(!(type & CLIENTWRITE_INFO) ||
  ------------------
  |  | 1081|  1.71M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (387:3): [True: 1.71M, False: 0]
  |  Branch (387:3): [True: 0, False: 0]
  |  Branch (387:3): [True: 1.71M, False: 0]
  |  Branch (387:3): [True: 0, False: 0]
  ------------------
  388|  1.71M|              ((type & ~(CLIENTWRITE_INFO | CLIENTWRITE_EOS)) == 0));
  389|       |
  390|  1.71M|  if(!data->req.writer_stack) {
  ------------------
  |  Branch (390:6): [True: 15.3k, False: 1.70M]
  ------------------
  391|  15.3k|    result = do_init_writer_stack(data);
  392|  15.3k|    if(result)
  ------------------
  |  Branch (392:8): [True: 0, False: 15.3k]
  ------------------
  393|      0|      return result;
  394|  15.3k|    DEBUGASSERT(data->req.writer_stack);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (394:5): [True: 0, False: 15.3k]
  |  Branch (394:5): [True: 15.3k, False: 0]
  ------------------
  395|  15.3k|  }
  396|       |
  397|  1.71M|  result = Curl_cwriter_write(data, data->req.writer_stack, type, buf, len);
  398|  1.71M|  CURL_TRC_WRITE(data, "client_write(type=%x, len=%zu) -> %d",
  ------------------
  |  |  158|  1.71M|  do {                                                     \
  |  |  159|  1.71M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.71M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.43M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.71M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.71M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.43M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.71M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.71M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.71M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.71M]
  |  |  ------------------
  ------------------
  399|  1.71M|                 type, len, result);
  400|  1.71M|  return result;
  401|  1.71M|}
Curl_cwriter_create:
  408|  66.3k|{
  409|  66.3k|  struct Curl_cwriter *writer = NULL;
  410|  66.3k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  411|  66.3k|  void *p;
  412|       |
  413|  66.3k|  DEBUGASSERT(cwt->cwriter_size >= sizeof(struct Curl_cwriter));
  ------------------
  |  | 1081|  66.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (413:3): [True: 0, False: 66.3k]
  |  Branch (413:3): [True: 66.3k, False: 0]
  ------------------
  414|  66.3k|  p = curlx_calloc(1, cwt->cwriter_size);
  ------------------
  |  | 1480|  66.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  415|  66.3k|  if(!p)
  ------------------
  |  Branch (415:6): [True: 0, False: 66.3k]
  ------------------
  416|      0|    goto out;
  417|       |
  418|  66.3k|  writer = (struct Curl_cwriter *)p;
  419|  66.3k|  writer->cwt = cwt;
  420|  66.3k|  writer->ctx = p;
  421|  66.3k|  writer->phase = phase;
  422|  66.3k|  result = cwt->do_init(data, writer);
  423|       |
  424|  66.3k|out:
  425|  66.3k|  *pwriter = result ? NULL : writer;
  ------------------
  |  Branch (425:14): [True: 0, False: 66.3k]
  ------------------
  426|  66.3k|  if(result)
  ------------------
  |  Branch (426:6): [True: 0, False: 66.3k]
  ------------------
  427|      0|    curlx_free(writer);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  428|  66.3k|  return result;
  429|  66.3k|}
Curl_cwriter_count:
  441|  3.07k|{
  442|  3.07k|  struct Curl_cwriter *w;
  443|  3.07k|  size_t n = 0;
  444|       |
  445|  17.1k|  for(w = data->req.writer_stack; w; w = w->next) {
  ------------------
  |  Branch (445:35): [True: 14.1k, False: 3.07k]
  ------------------
  446|  14.1k|    if(w->phase == phase)
  ------------------
  |  Branch (446:8): [True: 1.80k, False: 12.3k]
  ------------------
  447|  1.80k|      ++n;
  448|  14.1k|  }
  449|  3.07k|  return n;
  450|  3.07k|}
Curl_cwriter_add:
  454|  50.5k|{
  455|  50.5k|  CURLcode result;
  456|  50.5k|  struct Curl_cwriter **anchor = &data->req.writer_stack;
  457|       |
  458|  50.5k|  if(!*anchor) {
  ------------------
  |  Branch (458:6): [True: 422, False: 50.1k]
  ------------------
  459|    422|    result = do_init_writer_stack(data);
  460|    422|    if(result)
  ------------------
  |  Branch (460:8): [True: 0, False: 422]
  ------------------
  461|      0|      return result;
  462|    422|  }
  463|       |
  464|       |  /* Insert the writer as first in its phase.
  465|       |   * Skip existing writers of lower phases. */
  466|  58.8k|  while(*anchor && (*anchor)->phase < writer->phase)
  ------------------
  |  Branch (466:9): [True: 58.8k, False: 0]
  |  Branch (466:20): [True: 8.29k, False: 50.5k]
  ------------------
  467|  8.29k|    anchor = &((*anchor)->next);
  468|  50.5k|  writer->next = *anchor;
  469|  50.5k|  *anchor = writer;
  470|  50.5k|  return CURLE_OK;
  471|  50.5k|}
Curl_cwriter_get_by_name:
  475|    466|{
  476|    466|  struct Curl_cwriter *writer;
  477|    694|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (477:40): [True: 230, False: 464]
  ------------------
  478|    230|    if(!strcmp(name, writer->cwt->name))
  ------------------
  |  Branch (478:8): [True: 2, False: 228]
  ------------------
  479|      2|      return writer;
  480|    230|  }
  481|    464|  return NULL;
  482|    466|}
Curl_cwriter_get_by_type:
  486|  1.75M|{
  487|  1.75M|  struct Curl_cwriter *writer;
  488|  7.12M|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (488:40): [True: 7.11M, False: 8.43k]
  ------------------
  489|  7.11M|    if(writer->cwt == cwt)
  ------------------
  |  Branch (489:8): [True: 1.74M, False: 5.37M]
  ------------------
  490|  1.74M|      return writer;
  491|  7.11M|  }
  492|  8.43k|  return NULL;
  493|  1.75M|}
Curl_cwriter_is_content_decoding:
  496|  1.71M|{
  497|  1.71M|  struct Curl_cwriter *writer;
  498|  8.46M|  for(writer = data->req.writer_stack; writer; writer = writer->next) {
  ------------------
  |  Branch (498:40): [True: 6.86M, False: 1.59M]
  ------------------
  499|  6.86M|    if(writer->phase == CURL_CW_CONTENT_DECODE)
  ------------------
  |  Branch (499:8): [True: 114k, False: 6.75M]
  ------------------
  500|   114k|      return TRUE;
  ------------------
  |  | 1055|   114k|#define TRUE true
  ------------------
  501|  6.86M|  }
  502|  1.59M|  return FALSE;
  ------------------
  |  | 1058|  1.59M|#define FALSE false
  ------------------
  503|  1.71M|}
Curl_cwriter_is_paused:
  506|  1.71M|{
  507|  1.71M|  return Curl_cw_out_is_paused(data);
  508|  1.71M|}
Curl_creader_read:
  518|  1.52k|{
  519|  1.52k|  *nread = 0;
  520|  1.52k|  *eos = FALSE;
  ------------------
  |  | 1058|  1.52k|#define FALSE false
  ------------------
  521|  1.52k|  if(!reader)
  ------------------
  |  Branch (521:6): [True: 0, False: 1.52k]
  ------------------
  522|      0|    return CURLE_READ_ERROR;
  523|  1.52k|  return reader->crt->do_read(data, reader, buf, blen, nread, eos);
  524|  1.52k|}
Curl_creader_def_init:
  537|  17.7k|{
  538|  17.7k|  (void)data;
  539|  17.7k|  (void)reader;
  540|  17.7k|  return CURLE_OK;
  541|  17.7k|}
Curl_creader_def_close:
  545|  18.1k|{
  546|  18.1k|  (void)data;
  547|  18.1k|  (void)reader;
  548|  18.1k|}
Curl_creader_def_needs_rewind:
  567|  10.0k|{
  568|  10.0k|  (void)data;
  569|  10.0k|  (void)reader;
  570|       |  return FALSE;
  ------------------
  |  | 1058|  10.0k|#define FALSE false
  ------------------
  571|  10.0k|}
Curl_creader_def_cntrl:
  593|    183|{
  594|    183|  (void)data;
  595|    183|  (void)reader;
  596|    183|  (void)opcode;
  597|    183|  return CURLE_OK;
  598|    183|}
Curl_creader_def_done:
  610|  17.5k|{
  611|  17.5k|  (void)data;
  612|  17.5k|  (void)reader;
  613|  17.5k|  (void)premature;
  614|  17.5k|}
Curl_creader_create:
  926|  18.4k|{
  927|  18.4k|  struct Curl_creader *reader = NULL;
  928|  18.4k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  929|  18.4k|  void *p;
  930|       |
  931|  18.4k|  DEBUGASSERT(crt->creader_size >= sizeof(struct Curl_creader));
  ------------------
  |  | 1081|  18.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (931:3): [True: 0, False: 18.4k]
  |  Branch (931:3): [True: 18.4k, False: 0]
  ------------------
  932|  18.4k|  p = curlx_calloc(1, crt->creader_size);
  ------------------
  |  | 1480|  18.4k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  933|  18.4k|  if(!p)
  ------------------
  |  Branch (933:6): [True: 0, False: 18.4k]
  ------------------
  934|      0|    goto out;
  935|       |
  936|  18.4k|  reader = (struct Curl_creader *)p;
  937|  18.4k|  reader->crt = crt;
  938|  18.4k|  reader->ctx = p;
  939|  18.4k|  reader->phase = phase;
  940|  18.4k|  result = crt->do_init(data, reader);
  941|       |
  942|  18.4k|out:
  943|  18.4k|  *preader = result ? NULL : reader;
  ------------------
  |  Branch (943:14): [True: 0, False: 18.4k]
  ------------------
  944|  18.4k|  if(result)
  ------------------
  |  Branch (944:6): [True: 0, False: 18.4k]
  ------------------
  945|      0|    curlx_free(reader);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  946|  18.4k|  return result;
  947|  18.4k|}
Curl_creader_set_fread:
 1127|    419|{
 1128|    419|  CURLcode result;
 1129|    419|  struct Curl_creader *r;
 1130|    419|  struct cr_in_ctx *ctx;
 1131|       |
 1132|    419|  result = Curl_creader_create(&r, data, &cr_in, CURL_CR_CLIENT);
 1133|    419|  if(result || !r)
  ------------------
  |  Branch (1133:6): [True: 0, False: 419]
  |  Branch (1133:16): [True: 0, False: 419]
  ------------------
 1134|      0|    goto out;
 1135|    419|  ctx = r->ctx;
 1136|    419|  ctx->total_len = len;
 1137|       |
 1138|    419|  cl_reset_reader(data);
 1139|    419|  result = do_init_reader_stack(data, r);
 1140|    419|out:
 1141|    419|  CURL_TRC_READ(data, "add fread reader, len=%" FMT_OFF_T " -> %d",
  ------------------
  |  |  163|    419|  do {                                                    \
  |  |  164|    419|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|    419|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    838|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 419, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 419]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    838|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    419|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    419|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    419|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 419]
  |  |  ------------------
  ------------------
 1142|    419|                len, result);
 1143|    419|  return result;
 1144|    419|}
Curl_creader_add:
 1148|    306|{
 1149|    306|  CURLcode result;
 1150|    306|  struct Curl_creader **anchor = &data->req.reader_stack;
 1151|       |
 1152|    306|  if(!*anchor) {
  ------------------
  |  Branch (1152:6): [True: 0, False: 306]
  ------------------
 1153|      0|    result = Curl_creader_set_fread(data, data->state.infilesize);
 1154|      0|    if(result)
  ------------------
  |  Branch (1154:8): [True: 0, False: 0]
  ------------------
 1155|      0|      return result;
 1156|      0|  }
 1157|       |
 1158|       |  /* Insert the writer as first in its phase.
 1159|       |   * Skip existing readers of lower phases. */
 1160|    306|  while(*anchor && (*anchor)->phase < reader->phase)
  ------------------
  |  Branch (1160:9): [True: 306, False: 0]
  |  Branch (1160:20): [True: 0, False: 306]
  ------------------
 1161|      0|    anchor = &((*anchor)->next);
 1162|    306|  reader->next = *anchor;
 1163|    306|  *anchor = reader;
 1164|    306|  return CURLE_OK;
 1165|    306|}
Curl_client_read:
 1184|  1.20k|{
 1185|  1.20k|  CURLcode result;
 1186|       |
 1187|  1.20k|  DEBUGASSERT(buf);
  ------------------
  |  | 1081|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1187:3): [True: 0, False: 1.20k]
  |  Branch (1187:3): [True: 1.20k, False: 0]
  ------------------
 1188|  1.20k|  DEBUGASSERT(blen);
  ------------------
  |  | 1081|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1188:3): [True: 0, False: 1.20k]
  |  Branch (1188:3): [True: 1.20k, False: 0]
  ------------------
 1189|  1.20k|  DEBUGASSERT(nread);
  ------------------
  |  | 1081|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1189:3): [True: 0, False: 1.20k]
  |  Branch (1189:3): [True: 1.20k, False: 0]
  ------------------
 1190|  1.20k|  DEBUGASSERT(eos);
  ------------------
  |  | 1081|  1.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1190:3): [True: 0, False: 1.20k]
  |  Branch (1190:3): [True: 1.20k, False: 0]
  ------------------
 1191|  1.20k|  *nread = 0;
 1192|       |
 1193|  1.20k|  if(!data->req.reader_stack) {
  ------------------
  |  Branch (1193:6): [True: 0, False: 1.20k]
  ------------------
 1194|      0|    result = Curl_creader_set_fread(data, data->state.infilesize);
 1195|      0|    if(result)
  ------------------
  |  Branch (1195:8): [True: 0, False: 0]
  ------------------
 1196|      0|      return result;
 1197|      0|    DEBUGASSERT(data->req.reader_stack);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1197:5): [True: 0, False: 0]
  |  Branch (1197:5): [True: 0, False: 0]
  ------------------
 1198|      0|  }
 1199|  1.20k|  if(!data->req.reader_started) {
  ------------------
  |  Branch (1199:6): [True: 1.17k, False: 39]
  ------------------
 1200|  1.17k|    Curl_rlimit_start(&data->progress.ul.rlimit, Curl_pgrs_now(data), -1);
 1201|  1.17k|    data->req.reader_started = TRUE;
  ------------------
  |  | 1055|  1.17k|#define TRUE true
  ------------------
 1202|  1.17k|  }
 1203|       |
 1204|  1.20k|  if(Curl_rlimit_active(&data->progress.ul.rlimit)) {
  ------------------
  |  Branch (1204:6): [True: 245, False: 964]
  ------------------
 1205|    245|    curl_off_t ul_avail = Curl_rlimit_avail(&data->progress.ul.rlimit,
 1206|    245|                                            Curl_pgrs_now(data));
 1207|    245|    if(ul_avail <= 0) {
  ------------------
  |  Branch (1207:8): [True: 0, False: 245]
  ------------------
 1208|      0|      result = CURLE_OK;
 1209|      0|      *eos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1210|      0|      goto out;
 1211|      0|    }
 1212|    245|    if(ul_avail < (curl_off_t)blen)
  ------------------
  |  Branch (1212:8): [True: 57, False: 188]
  ------------------
 1213|     57|      blen = (size_t)ul_avail;
 1214|    245|  }
 1215|  1.20k|  result = Curl_creader_read(data, data->req.reader_stack, buf, blen,
 1216|  1.20k|                             nread, eos);
 1217|       |
 1218|  1.20k|out:
 1219|  1.20k|  CURL_TRC_READ(data, "client_read(len=%zu) -> %d, nread=%zu, eos=%d",
  ------------------
  |  |  163|  1.20k|  do {                                                    \
  |  |  164|  1.20k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|  1.20k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.41k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.20k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.20k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.41k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.20k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  1.20k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  1.20k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 1.20k]
  |  |  ------------------
  ------------------
 1220|  1.20k|                blen, result, *nread, *eos);
 1221|  1.20k|  return result;
 1222|  1.20k|}
Curl_creader_needs_rewind:
 1225|  10.9k|{
 1226|  10.9k|  struct Curl_creader *reader = data->req.reader_stack;
 1227|  21.2k|  while(reader) {
  ------------------
  |  Branch (1227:9): [True: 11.1k, False: 10.1k]
  ------------------
 1228|  11.1k|    if(reader->crt->needs_rewind(data, reader)) {
  ------------------
  |  Branch (1228:8): [True: 743, False: 10.3k]
  ------------------
 1229|    743|      CURL_TRC_READ(data, "client reader needs rewind before next request");
  ------------------
  |  |  163|    743|  do {                                                    \
  |  |  164|    743|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|    743|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.48k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 743, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 743]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.48k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    743|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    743|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    743|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 743]
  |  |  ------------------
  ------------------
 1230|    743|      return TRUE;
  ------------------
  |  | 1055|    743|#define TRUE true
  ------------------
 1231|    743|    }
 1232|  10.3k|    reader = reader->next;
 1233|  10.3k|  }
 1234|  10.1k|  return FALSE;
  ------------------
  |  | 1058|  10.1k|#define FALSE false
  ------------------
 1235|  10.9k|}
Curl_creader_set_null:
 1275|  16.7k|{
 1276|  16.7k|  struct Curl_creader *r;
 1277|  16.7k|  CURLcode result;
 1278|       |
 1279|  16.7k|  result = Curl_creader_create(&r, data, &cr_null, CURL_CR_CLIENT);
 1280|  16.7k|  if(result)
  ------------------
  |  Branch (1280:6): [True: 0, False: 16.7k]
  ------------------
 1281|      0|    return result;
 1282|       |
 1283|  16.7k|  cl_reset_reader(data);
 1284|  16.7k|  return do_init_reader_stack(data, r);
 1285|  16.7k|}
Curl_creader_set_buf:
 1390|  1.00k|{
 1391|  1.00k|  CURLcode result;
 1392|  1.00k|  struct Curl_creader *r;
 1393|  1.00k|  struct cr_buf_ctx *ctx;
 1394|       |
 1395|  1.00k|  result = Curl_creader_create(&r, data, &cr_buf, CURL_CR_CLIENT);
 1396|  1.00k|  if(result)
  ------------------
  |  Branch (1396:6): [True: 0, False: 1.00k]
  ------------------
 1397|      0|    goto out;
 1398|  1.00k|  ctx = r->ctx;
 1399|  1.00k|  ctx->buf = buf;
 1400|  1.00k|  ctx->blen = blen;
 1401|  1.00k|  ctx->index = 0;
 1402|       |
 1403|  1.00k|  cl_reset_reader(data);
 1404|  1.00k|  result = do_init_reader_stack(data, r);
 1405|  1.00k|out:
 1406|  1.00k|  CURL_TRC_READ(data, "add buf reader, len=%zu -> %d", blen, result);
  ------------------
  |  |  163|  1.00k|  do {                                                    \
  |  |  164|  1.00k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|  1.00k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.00k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.00k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.00k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.00k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|  1.00k|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|  1.00k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 1.00k]
  |  |  ------------------
  ------------------
 1407|  1.00k|  return result;
 1408|  1.00k|}
Curl_creader_total_length:
 1411|  28.2k|{
 1412|  28.2k|  struct Curl_creader *r = data->req.reader_stack;
 1413|  28.2k|  return r ? r->crt->total_length(data, r) : -1;
  ------------------
  |  Branch (1413:10): [True: 28.2k, False: 0]
  ------------------
 1414|  28.2k|}
Curl_creader_done:
 1460|  17.2k|{
 1461|  17.2k|  struct Curl_creader *reader = data->req.reader_stack;
 1462|  34.8k|  while(reader) {
  ------------------
  |  Branch (1462:9): [True: 17.5k, False: 17.2k]
  ------------------
 1463|  17.5k|    reader->crt->done(data, reader, premature);
 1464|  17.5k|    reader = reader->next;
 1465|  17.5k|  }
 1466|  17.2k|}
Curl_creader_get_by_type:
 1470|  2.02k|{
 1471|  2.02k|  struct Curl_creader *r;
 1472|  4.19k|  for(r = data->req.reader_stack; r; r = r->next) {
  ------------------
  |  Branch (1472:35): [True: 2.16k, False: 2.02k]
  ------------------
 1473|  2.16k|    if(r->crt == crt)
  ------------------
  |  Branch (1473:8): [True: 0, False: 2.16k]
  ------------------
 1474|      0|      return r;
 1475|  2.16k|  }
 1476|  2.02k|  return NULL;
 1477|  2.02k|}
sendf.c:cl_reset_reader:
   59|  75.7k|{
   60|  75.7k|  struct Curl_creader *reader = data->req.reader_stack;
   61|  75.7k|  data->req.reader_started = FALSE;
  ------------------
  |  | 1058|  75.7k|#define FALSE false
  ------------------
   62|  94.1k|  while(reader) {
  ------------------
  |  Branch (62:9): [True: 18.4k, False: 75.7k]
  ------------------
   63|  18.4k|    data->req.reader_stack = reader->next;
   64|  18.4k|    reader->crt->do_close(data, reader);
   65|  18.4k|    curlx_free(reader);
  ------------------
  |  | 1483|  18.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   66|  18.4k|    reader = data->req.reader_stack;
   67|  18.4k|  }
   68|  75.7k|}
sendf.c:cl_reset_writer:
   48|  56.8k|{
   49|  56.8k|  struct Curl_cwriter *writer = data->req.writer_stack;
   50|   123k|  while(writer) {
  ------------------
  |  Branch (50:9): [True: 66.3k, False: 56.8k]
  ------------------
   51|  66.3k|    data->req.writer_stack = writer->next;
   52|  66.3k|    writer->cwt->do_close(data, writer);
   53|  66.3k|    curlx_free(writer);
  ------------------
  |  | 1483|  66.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   54|  66.3k|    writer = data->req.writer_stack;
   55|  66.3k|  }
   56|  56.8k|}
sendf.c:do_init_writer_stack:
  326|  15.7k|{
  327|  15.7k|  struct Curl_cwriter *writer;
  328|  15.7k|  CURLcode result;
  329|       |
  330|  15.7k|  DEBUGASSERT(!data->req.writer_stack);
  ------------------
  |  | 1081|  15.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (330:3): [True: 0, False: 15.7k]
  |  Branch (330:3): [True: 15.7k, False: 0]
  ------------------
  331|  15.7k|  result = Curl_cwriter_create(&data->req.writer_stack,
  332|  15.7k|                               data, &Curl_cwt_out, CURL_CW_CLIENT);
  333|  15.7k|  if(result)
  ------------------
  |  Branch (333:6): [True: 0, False: 15.7k]
  ------------------
  334|      0|    return result;
  335|       |
  336|       |  /* This places the "pause" writer behind the "download" writer that
  337|       |   * is added below. Meaning the "download" can do checks on content length
  338|       |   * and other things *before* write outs are buffered for paused transfers. */
  339|  15.7k|  result = Curl_cwriter_create(&writer, data, &Curl_cwt_pause,
  340|  15.7k|                               CURL_CW_PROTOCOL);
  341|  15.7k|  if(!result) {
  ------------------
  |  Branch (341:6): [True: 15.7k, False: 0]
  ------------------
  342|  15.7k|    result = Curl_cwriter_add(data, writer);
  343|  15.7k|    if(result)
  ------------------
  |  Branch (343:8): [True: 0, False: 15.7k]
  ------------------
  344|      0|      Curl_cwriter_free(data, writer);
  345|  15.7k|  }
  346|  15.7k|  if(result)
  ------------------
  |  Branch (346:6): [True: 0, False: 15.7k]
  ------------------
  347|      0|    return result;
  348|       |
  349|  15.7k|  result = Curl_cwriter_create(&writer, data, &cw_download, CURL_CW_PROTOCOL);
  350|  15.7k|  if(!result) {
  ------------------
  |  Branch (350:6): [True: 15.7k, False: 0]
  ------------------
  351|  15.7k|    result = Curl_cwriter_add(data, writer);
  352|  15.7k|    if(result)
  ------------------
  |  Branch (352:8): [True: 0, False: 15.7k]
  ------------------
  353|      0|      Curl_cwriter_free(data, writer);
  354|  15.7k|  }
  355|  15.7k|  if(result)
  ------------------
  |  Branch (355:6): [True: 0, False: 15.7k]
  ------------------
  356|      0|    return result;
  357|       |
  358|  15.7k|  result = Curl_cwriter_create(&writer, data, &cw_raw, CURL_CW_RAW);
  359|  15.7k|  if(!result) {
  ------------------
  |  Branch (359:6): [True: 15.7k, False: 0]
  ------------------
  360|  15.7k|    result = Curl_cwriter_add(data, writer);
  361|  15.7k|    if(result)
  ------------------
  |  Branch (361:8): [True: 0, False: 15.7k]
  ------------------
  362|      0|      Curl_cwriter_free(data, writer);
  363|  15.7k|  }
  364|  15.7k|  if(result)
  ------------------
  |  Branch (364:6): [True: 0, False: 15.7k]
  ------------------
  365|      0|    return result;
  366|       |
  367|  15.7k|  return result;
  368|  15.7k|}
sendf.c:cw_download_write:
  179|  1.71M|{
  180|  1.71M|  struct cw_download_ctx *ctx = writer->ctx;
  181|  1.71M|  CURLcode result;
  182|  1.71M|  size_t nwrite, excess_len = 0;
  183|  1.71M|  bool is_connect = !!(type & CLIENTWRITE_CONNECT);
  ------------------
  |  |   46|  1.71M|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  184|       |
  185|  1.71M|  if(!ctx->started_response &&
  ------------------
  |  Branch (185:6): [True: 46.4k, False: 1.67M]
  ------------------
  186|  46.4k|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   43|  46.4k|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   46|  46.4k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (186:6): [True: 14.7k, False: 31.6k]
  ------------------
  187|  14.7k|    Curl_pgrsTime(data, TIMER_STARTTRANSFER);
  188|  14.7k|    ctx->started_response = TRUE;
  ------------------
  |  | 1055|  14.7k|#define TRUE true
  ------------------
  189|  14.7k|  }
  190|       |
  191|  1.71M|  if(!(type & CLIENTWRITE_BODY)) {
  ------------------
  |  |   42|  1.71M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (191:6): [True: 212k, False: 1.50M]
  ------------------
  192|   212k|    if(is_connect && data->set.suppress_connect_headers)
  ------------------
  |  Branch (192:8): [True: 31.8k, False: 180k]
  |  Branch (192:22): [True: 1.02k, False: 30.7k]
  ------------------
  193|  1.02k|      return CURLE_OK;
  194|   211k|    result = Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  195|   211k|    CURL_TRC_WRITE(data, "download_write header(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|   211k|  do {                                                     \
  |  |  159|   211k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|   211k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|   423k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 211k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 211k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|   423k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|   211k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|   211k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|   211k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 211k]
  |  |  ------------------
  ------------------
  196|   211k|                   type, nbytes, result);
  197|   211k|    return result;
  198|   212k|  }
  199|       |
  200|  1.50M|  if(!ctx->started_body &&
  ------------------
  |  Branch (200:6): [True: 1.70k, False: 1.50M]
  ------------------
  201|  1.70k|     !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   43|  1.70k|#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
  ------------------
                   !(type & (CLIENTWRITE_INFO | CLIENTWRITE_CONNECT))) {
  ------------------
  |  |   46|  1.70k|#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
  ------------------
  |  Branch (201:6): [True: 1.70k, False: 0]
  ------------------
  202|  1.70k|    Curl_rlimit_start(&data->progress.dl.rlimit, Curl_pgrs_now(data),
  203|  1.70k|                      data->req.size);
  204|  1.70k|    ctx->started_body = TRUE;
  ------------------
  |  | 1055|  1.70k|#define TRUE true
  ------------------
  205|  1.70k|  }
  206|       |
  207|       |  /* Here, we deal with REAL BODY bytes. All filtering and transfer
  208|       |   * encodings have been applied and only the true content, e.g. BODY,
  209|       |   * bytes are passed here.
  210|       |   * This allows us to check sizes, update stats, etc. independent
  211|       |   * from the protocol in play. */
  212|       |
  213|  1.50M|  if(data->req.no_body && nbytes > 0) {
  ------------------
  |  Branch (213:6): [True: 4.33k, False: 1.50M]
  |  Branch (213:27): [True: 4.33k, False: 0]
  ------------------
  214|       |    /* BODY arrives although we want none, bail out */
  215|  4.33k|    streamclose(data->conn, "ignoring body");
  ------------------
  |  |  102|  4.33k|#define streamclose(x, y) Curl_conncontrol(x, CONNCTRL_STREAM, y)
  |  |  ------------------
  |  |  |  |   92|  4.33k|#define CONNCTRL_STREAM     2
  |  |  ------------------
  ------------------
  216|  4.33k|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu), "
  ------------------
  |  |  158|  4.33k|  do {                                                     \
  |  |  159|  4.33k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  4.33k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  8.67k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 4.33k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 4.33k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  8.67k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  4.33k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  4.33k|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  4.33k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 4.33k]
  |  |  ------------------
  ------------------
  217|  4.33k|                   "did not want a BODY", type, nbytes);
  218|  4.33k|    data->req.download_done = TRUE;
  ------------------
  |  | 1055|  4.33k|#define TRUE true
  ------------------
  219|  4.33k|    if(data->info.header_size)
  ------------------
  |  Branch (219:8): [True: 4.33k, False: 1]
  ------------------
  220|       |      /* if headers have been received, this is fine */
  221|  4.33k|      return CURLE_OK;
  222|      1|    return CURLE_WEIRD_SERVER_REPLY;
  223|  4.33k|  }
  224|       |
  225|       |  /* Determine if we see any bytes in excess to what is allowed.
  226|       |   * We write the allowed bytes and handle excess further below.
  227|       |   * This gives deterministic BODY writes on varying buffer receive
  228|       |   * lengths. */
  229|  1.50M|  nwrite = nbytes;
  230|  1.50M|  if(data->req.maxdownload != -1) {
  ------------------
  |  Branch (230:6): [True: 1.50M, False: 58]
  ------------------
  231|  1.50M|    size_t wmax = get_max_body_write_len(data, data->req.maxdownload);
  232|  1.50M|    if(nwrite > wmax) {
  ------------------
  |  Branch (232:8): [True: 24, False: 1.50M]
  ------------------
  233|     24|      excess_len = nbytes - wmax;
  234|     24|      nwrite = wmax;
  235|     24|    }
  236|       |
  237|  1.50M|    if(nwrite == wmax) {
  ------------------
  |  Branch (237:8): [True: 110, False: 1.50M]
  ------------------
  238|    110|      data->req.download_done = TRUE;
  ------------------
  |  | 1055|    110|#define TRUE true
  ------------------
  239|    110|    }
  240|       |
  241|  1.50M|    if((type & CLIENTWRITE_EOS) && !data->req.no_body &&
  ------------------
  |  |   49|  1.50M|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (241:8): [True: 0, False: 1.50M]
  |  Branch (241:36): [True: 0, False: 0]
  ------------------
  242|      0|       (data->req.size > data->req.bytecount)) {
  ------------------
  |  Branch (242:8): [True: 0, False: 0]
  ------------------
  243|      0|      failf(data, "end of response with %" FMT_OFF_T " bytes missing",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  244|      0|            data->req.size - data->req.bytecount);
  245|      0|      return CURLE_PARTIAL_FILE;
  246|      0|    }
  247|  1.50M|  }
  248|       |
  249|       |  /* Error on too large filesize is handled below, after writing
  250|       |   * the permitted bytes */
  251|  1.50M|  if(data->set.max_filesize && !data->req.ignorebody) {
  ------------------
  |  Branch (251:6): [True: 875, False: 1.50M]
  |  Branch (251:32): [True: 510, False: 365]
  ------------------
  252|    510|    size_t wmax = get_max_body_write_len(data, data->set.max_filesize);
  253|    510|    if(nwrite > wmax) {
  ------------------
  |  Branch (253:8): [True: 1, False: 509]
  ------------------
  254|      1|      nwrite = wmax;
  255|      1|    }
  256|    510|  }
  257|       |
  258|  1.50M|  if(!data->req.ignorebody && (nwrite || (type & CLIENTWRITE_EOS))) {
  ------------------
  |  |   49|     14|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  |  Branch (258:6): [True: 1.48M, False: 14.1k]
  |  Branch (258:32): [True: 1.48M, False: 14]
  |  Branch (258:42): [True: 0, False: 14]
  ------------------
  259|  1.48M|    result = Curl_cwriter_write(data, writer->next, type, buf, nwrite);
  260|  1.48M|    CURL_TRC_WRITE(data, "download_write body(type=%x, blen=%zu) -> %d",
  ------------------
  |  |  158|  1.48M|  do {                                                     \
  |  |  159|  1.48M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  1.48M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.97M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.48M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.48M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.97M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.48M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  1.48M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  1.48M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 1.48M]
  |  |  ------------------
  ------------------
  261|  1.48M|                   type, nbytes, result);
  262|  1.48M|    if(result)
  ------------------
  |  Branch (262:8): [True: 449, False: 1.48M]
  ------------------
  263|    449|      return result;
  264|  1.48M|  }
  265|       |
  266|       |  /* Update stats, write and report progress */
  267|  1.50M|  if(nwrite) {
  ------------------
  |  Branch (267:6): [True: 1.50M, False: 24]
  ------------------
  268|  1.50M|    data->req.bytecount += nwrite;
  269|  1.50M|    Curl_pgrs_download_inc(data, nwrite);
  270|  1.50M|  }
  271|       |
  272|  1.50M|  if(excess_len) {
  ------------------
  |  Branch (272:6): [True: 24, False: 1.50M]
  ------------------
  273|     24|    if(!data->req.ignorebody) {
  ------------------
  |  Branch (273:8): [True: 14, False: 10]
  ------------------
  274|     14|      infof(data,
  ------------------
  |  |  143|     14|  do {                               \
  |  |  144|     14|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     14|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 14, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  320|     14|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     14|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     14|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 14]
  |  |  ------------------
  ------------------
  275|     14|            "Excess found writing body:"
  276|     14|            " excess = %zu"
  277|     14|            ", size = %" FMT_OFF_T
  278|     14|            ", maxdownload = %" FMT_OFF_T
  279|     14|            ", bytecount = %" FMT_OFF_T,
  280|     14|            excess_len, data->req.size, data->req.maxdownload,
  281|     14|            data->req.bytecount);
  282|     14|      connclose(data->conn, "excess found in a read");
  ------------------
  |  |  103|     14|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|     14|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  283|     14|    }
  284|     24|  }
  285|  1.50M|  else if((nwrite < nbytes) && !data->req.ignorebody) {
  ------------------
  |  Branch (285:11): [True: 1, False: 1.50M]
  |  Branch (285:32): [True: 1, False: 0]
  ------------------
  286|      1|    failf(data, "Exceeded the maximum allowed file size "
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  287|      1|          "(%" FMT_OFF_T ") with %" FMT_OFF_T " bytes",
  288|      1|          data->set.max_filesize, data->req.bytecount);
  289|      1|    return CURLE_FILESIZE_EXCEEDED;
  290|      1|  }
  291|       |
  292|  1.50M|  return CURLE_OK;
  293|  1.50M|}
sendf.c:get_max_body_write_len:
  160|  1.50M|{
  161|  1.50M|  if(limit != -1) {
  ------------------
  |  Branch (161:6): [True: 1.50M, False: 0]
  ------------------
  162|       |    /* How much more are we allowed to write? */
  163|  1.50M|    return curlx_sotouz_range(limit - data->req.bytecount, 0, SIZE_MAX);
  164|  1.50M|  }
  165|      0|  return SIZE_MAX;
  166|  1.50M|}
sendf.c:cw_raw_write:
  309|  1.71M|{
  310|  1.71M|  if(type & CLIENTWRITE_BODY && data->set.verbose && !data->req.ignorebody) {
  ------------------
  |  |   42|  3.43M|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  |  Branch (310:6): [True: 1.50M, False: 212k]
  |  Branch (310:33): [True: 0, False: 1.50M]
  |  Branch (310:54): [True: 0, False: 0]
  ------------------
  311|      0|    Curl_debug(data, CURLINFO_DATA_IN, buf, nbytes);
  312|      0|  }
  313|  1.71M|  return Curl_cwriter_write(data, writer->next, type, buf, nbytes);
  314|  1.71M|}
sendf.c:cr_in_init:
  630|    419|{
  631|    419|  struct cr_in_ctx *ctx = reader->ctx;
  632|    419|  ctx->read_cb = data->state.fread_func;
  633|    419|  ctx->cb_user_data = data->state.in;
  634|    419|  ctx->total_len = -1;
  635|    419|  ctx->read_len = 0;
  636|    419|  return CURLE_OK;
  637|    419|}
sendf.c:cr_in_read:
  644|    192|{
  645|    192|  struct cr_in_ctx *ctx = reader->ctx;
  646|    192|  CURLcode result = CURLE_OK;
  647|    192|  size_t nread;
  648|       |
  649|    192|  ctx->is_paused = FALSE;
  ------------------
  |  | 1058|    192|#define FALSE false
  ------------------
  650|       |
  651|       |  /* Once we have errored, we will return the same error forever */
  652|    192|  if(ctx->errored) {
  ------------------
  |  Branch (652:6): [True: 0, False: 192]
  ------------------
  653|      0|    *pnread = 0;
  654|      0|    *peos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  655|      0|    return ctx->error_result;
  656|      0|  }
  657|    192|  if(ctx->seen_eos) {
  ------------------
  |  Branch (657:6): [True: 0, False: 192]
  ------------------
  658|      0|    *pnread = 0;
  659|      0|    *peos = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  660|      0|    return CURLE_OK;
  661|      0|  }
  662|       |  /* respect length limitations */
  663|    192|  if(ctx->total_len >= 0) {
  ------------------
  |  Branch (663:6): [True: 192, False: 0]
  ------------------
  664|    192|    blen = curlx_sotouz_range(ctx->total_len - ctx->read_len, 0, blen);
  665|    192|  }
  666|    192|  nread = 0;
  667|    192|  if(ctx->read_cb && blen) {
  ------------------
  |  Branch (667:6): [True: 192, False: 0]
  |  Branch (667:22): [True: 158, False: 34]
  ------------------
  668|    158|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|    158|#define TRUE true
  ------------------
  669|    158|    nread = ctx->read_cb(buf, 1, blen, ctx->cb_user_data);
  670|    158|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|    158|#define FALSE false
  ------------------
  671|    158|    ctx->has_used_cb = TRUE;
  ------------------
  |  | 1055|    158|#define TRUE true
  ------------------
  672|    158|  }
  673|       |
  674|    192|  switch(nread) {
  675|     36|  case 0:
  ------------------
  |  Branch (675:3): [True: 36, False: 156]
  ------------------
  676|     36|    if((ctx->total_len >= 0) && (ctx->read_len < ctx->total_len)) {
  ------------------
  |  Branch (676:8): [True: 36, False: 0]
  |  Branch (676:33): [True: 2, False: 34]
  ------------------
  677|      2|      failf(data, "client read function EOF fail, "
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  678|      2|            "only %" FMT_OFF_T "/%" FMT_OFF_T " of needed bytes read",
  679|      2|            ctx->read_len, ctx->total_len);
  680|      2|      result = CURLE_READ_ERROR;
  681|      2|      break;
  682|      2|    }
  683|     34|    *pnread = 0;
  684|     34|    *peos = TRUE;
  ------------------
  |  | 1055|     34|#define TRUE true
  ------------------
  685|     34|    ctx->seen_eos = TRUE;
  ------------------
  |  | 1055|     34|#define TRUE true
  ------------------
  686|     34|    break;
  687|       |
  688|      0|  case CURL_READFUNC_ABORT:
  ------------------
  |  |  390|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  |  Branch (688:3): [True: 0, False: 192]
  ------------------
  689|      0|    failf(data, "operation aborted by callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  690|      0|    *pnread = 0;
  691|      0|    *peos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  692|      0|    ctx->errored = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  693|      0|    ctx->error_result = CURLE_ABORTED_BY_CALLBACK;
  694|      0|    result = CURLE_ABORTED_BY_CALLBACK;
  695|      0|    break;
  696|       |
  697|      0|  case CURL_READFUNC_PAUSE:
  ------------------
  |  |  393|      0|#define CURL_READFUNC_PAUSE 0x10000001
  ------------------
  |  Branch (697:3): [True: 0, False: 192]
  ------------------
  698|      0|    if(data->conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|      0|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (698:8): [True: 0, False: 0]
  ------------------
  699|       |      /* protocols that work without network cannot be paused. This is
  700|       |         actually only file:// now, and it cannot pause since the transfer
  701|       |         is not done using the "normal" procedure. */
  702|      0|      failf(data, "Read callback asked for PAUSE when not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  703|      0|      result = CURLE_READ_ERROR;
  704|      0|      break;
  705|      0|    }
  706|       |    /* CURL_READFUNC_PAUSE pauses read callbacks that feed socket writes */
  707|      0|    CURL_TRC_READ(data, "cr_in_read, callback returned CURL_READFUNC_PAUSE");
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  708|      0|    ctx->is_paused = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  709|      0|    *pnread = 0;
  710|      0|    *peos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  711|      0|    result = Curl_xfer_pause_send(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  712|      0|    break; /* nothing was read */
  713|       |
  714|    156|  default:
  ------------------
  |  Branch (714:3): [True: 156, False: 36]
  ------------------
  715|    156|    if(nread > blen) {
  ------------------
  |  Branch (715:8): [True: 0, False: 156]
  ------------------
  716|       |      /* the read function returned a too large value */
  717|      0|      failf(data, "read function returned funny value");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  718|      0|      *pnread = 0;
  719|      0|      *peos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  720|      0|      ctx->errored = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  721|      0|      ctx->error_result = CURLE_READ_ERROR;
  722|      0|      result = CURLE_READ_ERROR;
  723|      0|      break;
  724|      0|    }
  725|    156|    ctx->read_len += nread;
  726|    156|    if(ctx->total_len >= 0)
  ------------------
  |  Branch (726:8): [True: 156, False: 0]
  ------------------
  727|    156|      ctx->seen_eos = (ctx->read_len >= ctx->total_len);
  728|    156|    *pnread = nread;
  729|    156|    *peos = (bool)ctx->seen_eos;
  730|    156|    break;
  731|    192|  }
  732|    192|  CURL_TRC_READ(data, "cr_in_read(len=%zu, total=%" FMT_OFF_T
  ------------------
  |  |  163|    192|  do {                                                    \
  |  |  164|    192|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|    192|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    384|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 192, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 192]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    384|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    192|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    192|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    192|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 192]
  |  |  ------------------
  ------------------
  733|    192|                ", read=%" FMT_OFF_T ") -> %d, nread=%zu, eos=%d",
  734|    192|                blen, ctx->total_len, ctx->read_len, result,
  735|    192|                *pnread, *peos);
  736|    192|  return result;
  737|    192|}
sendf.c:cr_in_needs_rewind:
  741|    235|{
  742|    235|  struct cr_in_ctx *ctx = reader->ctx;
  743|    235|  (void)data;
  744|    235|  return (bool)ctx->has_used_cb;
  745|    235|}
sendf.c:cr_in_total_length:
  749|  1.02k|{
  750|  1.02k|  struct cr_in_ctx *ctx = reader->ctx;
  751|  1.02k|  (void)data;
  752|  1.02k|  return ctx->total_len;
  753|  1.02k|}
sendf.c:cr_in_cntrl:
  882|      3|{
  883|      3|  struct cr_in_ctx *ctx = reader->ctx;
  884|       |
  885|      3|  switch(opcode) {
  886|      3|  case CURL_CRCNTRL_REWIND:
  ------------------
  |  Branch (886:3): [True: 3, False: 0]
  ------------------
  887|      3|    return cr_in_rewind(data, reader);
  888|      0|  case CURL_CRCNTRL_UNPAUSE:
  ------------------
  |  Branch (888:3): [True: 0, False: 3]
  ------------------
  889|      0|    ctx->is_paused = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  890|      0|    break;
  891|      0|  case CURL_CRCNTRL_CLEAR_EOS:
  ------------------
  |  Branch (891:3): [True: 0, False: 3]
  ------------------
  892|      0|    ctx->seen_eos = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  893|      0|    break;
  894|      0|  default:
  ------------------
  |  Branch (894:3): [True: 0, False: 3]
  ------------------
  895|      0|    break;
  896|      3|  }
  897|      0|  return CURLE_OK;
  898|      3|}
sendf.c:cr_in_rewind:
  820|      3|{
  821|      3|  struct cr_in_ctx *ctx = reader->ctx;
  822|       |
  823|       |  /* If we never invoked the callback, there is noting to rewind */
  824|      3|  if(!ctx->has_used_cb)
  ------------------
  |  Branch (824:6): [True: 0, False: 3]
  ------------------
  825|      0|    return CURLE_OK;
  826|       |
  827|      3|  if(data->set.seek_func) {
  ------------------
  |  Branch (827:6): [True: 0, False: 3]
  ------------------
  828|      0|    int err;
  829|       |
  830|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  831|      0|    err = (data->set.seek_func)(data->set.seek_client, 0, SEEK_SET);
  832|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  833|      0|    CURL_TRC_READ(data, "cr_in, rewind via set.seek_func -> %d", err);
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  834|      0|    if(err) {
  ------------------
  |  Branch (834:8): [True: 0, False: 0]
  ------------------
  835|      0|      failf(data, "seek callback returned error %d", err);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  836|      0|      return CURLE_SEND_FAIL_REWIND;
  837|      0|    }
  838|      0|  }
  839|      3|  else if(data->set.ioctl_func) {
  ------------------
  |  Branch (839:11): [True: 0, False: 3]
  ------------------
  840|      0|    curlioerr err;
  841|       |
  842|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  843|      0|    err = (data->set.ioctl_func)(data, CURLIOCMD_RESTARTREAD,
  844|      0|                                 data->set.ioctl_client);
  845|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  846|      0|    CURL_TRC_READ(data, "cr_in, rewind via set.ioctl_func -> %d", (int)err);
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  847|      0|    if(err) {
  ------------------
  |  Branch (847:8): [True: 0, False: 0]
  ------------------
  848|      0|      failf(data, "ioctl callback returned error %d", (int)err);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  849|      0|      return CURLE_SEND_FAIL_REWIND;
  850|      0|    }
  851|      0|  }
  852|      3|  else {
  853|       |    /* If no CURLOPT_READFUNCTION is used, we know that we operate on a
  854|       |       given FILE * stream and we can actually attempt to rewind that
  855|       |       ourselves with fseek() */
  856|      3|#if defined(__clang__) && __clang_major__ >= 16
  857|      3|#pragma clang diagnostic push
  858|      3|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  859|      3|#endif
  860|      3|    if(data->state.fread_func == (curl_read_callback)fread) {
  ------------------
  |  Branch (860:8): [True: 0, False: 3]
  ------------------
  861|      0|#if defined(__clang__) && __clang_major__ >= 16
  862|      0|#pragma clang diagnostic pop
  863|      0|#endif
  864|      0|      int err = fseek(data->state.in, 0, SEEK_SET);
  865|      0|      CURL_TRC_READ(data, "cr_in, rewind via fseek -> %d(%d)",
  ------------------
  |  |  163|      0|  do {                                                    \
  |  |  164|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|      0|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  866|      0|                    (int)err, (int)errno);
  867|      0|      if(err != -1)
  ------------------
  |  Branch (867:10): [True: 0, False: 0]
  ------------------
  868|       |        /* successful rewind */
  869|      0|        return CURLE_OK;
  870|      0|    }
  871|       |
  872|       |    /* no callback set or failure above, makes us fail at once */
  873|      3|    failf(data, "necessary data rewind was not possible");
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
  874|      3|    return CURLE_SEND_FAIL_REWIND;
  875|      3|  }
  876|      0|  return CURLE_OK;
  877|      3|}
sendf.c:do_init_reader_stack:
 1100|  18.1k|{
 1101|  18.1k|  CURLcode result = CURLE_OK;
 1102|  18.1k|  curl_off_t clen;
 1103|       |
 1104|  18.1k|  DEBUGASSERT(r);
  ------------------
  |  | 1081|  18.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1104:3): [True: 0, False: 18.1k]
  |  Branch (1104:3): [True: 18.1k, False: 0]
  ------------------
 1105|  18.1k|  DEBUGASSERT(r->crt);
  ------------------
  |  | 1081|  18.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1105:3): [True: 0, False: 18.1k]
  |  Branch (1105:3): [True: 18.1k, False: 0]
  ------------------
 1106|  18.1k|  DEBUGASSERT(r->phase == CURL_CR_CLIENT);
  ------------------
  |  | 1081|  18.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1106:3): [True: 0, False: 18.1k]
  |  Branch (1106:3): [True: 18.1k, False: 0]
  ------------------
 1107|  18.1k|  DEBUGASSERT(!data->req.reader_stack);
  ------------------
  |  | 1081|  18.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1107:3): [True: 0, False: 18.1k]
  |  Branch (1107:3): [True: 18.1k, False: 0]
  ------------------
 1108|       |
 1109|  18.1k|  data->req.reader_stack = r;
 1110|  18.1k|  clen = r->crt->total_length(data, r);
 1111|       |  /* if we do not have 0 length init, and crlf conversion is wanted,
 1112|       |   * add the reader for it */
 1113|  18.1k|  if(clen && (data->set.crlf
  ------------------
  |  Branch (1113:6): [True: 1.08k, False: 17.0k]
  |  Branch (1113:15): [True: 0, False: 1.08k]
  ------------------
 1114|  1.08k|#ifdef CURL_PREFER_LF_LINEENDS
 1115|  1.08k|     || data->state.prefer_ascii
  ------------------
  |  Branch (1115:9): [True: 306, False: 778]
  ------------------
 1116|  1.08k|#endif
 1117|  1.08k|    )) {
 1118|    306|    result = cr_lc_add(data);
 1119|    306|    if(result)
  ------------------
  |  Branch (1119:8): [True: 0, False: 306]
  ------------------
 1120|      0|      return result;
 1121|    306|  }
 1122|       |
 1123|  18.1k|  return result;
 1124|  18.1k|}
sendf.c:cr_lc_add:
 1085|    306|{
 1086|    306|  struct Curl_creader *reader = NULL;
 1087|    306|  CURLcode result;
 1088|       |
 1089|    306|  result = Curl_creader_create(&reader, data, &cr_lc, CURL_CR_CONTENT_ENCODE);
 1090|    306|  if(!result)
  ------------------
  |  Branch (1090:6): [True: 306, False: 0]
  ------------------
 1091|    306|    result = Curl_creader_add(data, reader);
 1092|       |
 1093|    306|  if(result && reader)
  ------------------
  |  Branch (1093:6): [True: 0, False: 306]
  |  Branch (1093:16): [True: 0, False: 0]
  ------------------
 1094|      0|    Curl_creader_free(data, reader);
 1095|    306|  return result;
 1096|    306|}
sendf.c:cr_lc_init:
  966|    306|{
  967|    306|  struct cr_lc_ctx *ctx = reader->ctx;
  968|    306|  (void)data;
  969|    306|  Curl_bufq_init2(&ctx->buf, (16 * 1024), 1, BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|    306|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
  970|    306|  return CURLE_OK;
  971|    306|}
sendf.c:cr_lc_read:
  985|    331|{
  986|    331|  struct cr_lc_ctx *ctx = reader->ctx;
  987|    331|  CURLcode result;
  988|    331|  size_t nread, i, start, n;
  989|    331|  bool eos;
  990|       |
  991|    331|  if(ctx->eos) {
  ------------------
  |  Branch (991:6): [True: 0, False: 331]
  ------------------
  992|      0|    *pnread = 0;
  993|      0|    *peos = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  994|      0|    return CURLE_OK;
  995|      0|  }
  996|       |
  997|    331|  if(Curl_bufq_is_empty(&ctx->buf)) {
  ------------------
  |  Branch (997:6): [True: 316, False: 15]
  ------------------
  998|    316|    if(ctx->read_eos) {
  ------------------
  |  Branch (998:8): [True: 0, False: 316]
  ------------------
  999|      0|      ctx->eos = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1000|      0|      *pnread = 0;
 1001|      0|      *peos = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1002|      0|      return CURLE_OK;
 1003|      0|    }
 1004|       |    /* Still getting data form the next reader, ctx->buf is empty */
 1005|    316|    result = Curl_creader_read(data, reader->next, buf, blen, &nread, &eos);
 1006|    316|    if(result)
  ------------------
  |  Branch (1006:8): [True: 1, False: 315]
  ------------------
 1007|      1|      return result;
 1008|    315|    ctx->read_eos = eos;
 1009|       |
 1010|    315|    if(!nread || !memchr(buf, '\n', nread)) {
  ------------------
  |  Branch (1010:8): [True: 0, False: 315]
  |  Branch (1010:18): [True: 114, False: 201]
  ------------------
 1011|       |      /* nothing to convert, return this right away */
 1012|    114|      if(nread)
  ------------------
  |  Branch (1012:10): [True: 114, False: 0]
  ------------------
 1013|    114|        ctx->prev_cr = (buf[nread - 1] == '\r');
 1014|    114|      if(ctx->read_eos)
  ------------------
  |  Branch (1014:10): [True: 104, False: 10]
  ------------------
 1015|    104|        ctx->eos = TRUE;
  ------------------
  |  | 1055|    104|#define TRUE true
  ------------------
 1016|    114|      *pnread = nread;
 1017|    114|      *peos = (bool)ctx->eos;
 1018|    114|      goto out;
 1019|    114|    }
 1020|       |
 1021|       |    /* at least one \n might need conversion to '\r\n', place into ctx->buf */
 1022|   895k|    for(i = start = 0; i < nread; ++i) {
  ------------------
  |  Branch (1022:24): [True: 895k, False: 201]
  ------------------
 1023|       |      /* if this byte is not an LF character, or if the preceding character is
 1024|       |         a CR (meaning this already is a CRLF pair), go to next */
 1025|   895k|      if((buf[i] != '\n') || ctx->prev_cr) {
  ------------------
  |  Branch (1025:10): [True: 245k, False: 650k]
  |  Branch (1025:30): [True: 1.29k, False: 649k]
  ------------------
 1026|   246k|        ctx->prev_cr = (buf[i] == '\r');
 1027|   246k|        continue;
 1028|   246k|      }
 1029|   649k|      ctx->prev_cr = FALSE;
  ------------------
  |  | 1058|   649k|#define FALSE false
  ------------------
 1030|       |      /* on a soft limit bufq, we do not need to check length */
 1031|   649k|      result = Curl_bufq_cwrite(&ctx->buf, buf + start, i - start, &n);
 1032|   649k|      if(!result)
  ------------------
  |  Branch (1032:10): [True: 649k, False: 0]
  ------------------
 1033|   649k|        result = Curl_bufq_cwrite(&ctx->buf, STRCONST("\r\n"), &n);
  ------------------
  |  | 1292|   649k|#define STRCONST(x) x, sizeof(x) - 1
  ------------------
 1034|   649k|      if(result)
  ------------------
  |  Branch (1034:10): [True: 0, False: 649k]
  ------------------
 1035|      0|        return result;
 1036|   649k|      start = i + 1;
 1037|   649k|    }
 1038|       |
 1039|    201|    if(start < i) { /* leftover */
  ------------------
  |  Branch (1039:8): [True: 146, False: 55]
  ------------------
 1040|    146|      result = Curl_bufq_cwrite(&ctx->buf, buf + start, i - start, &n);
 1041|    146|      if(result)
  ------------------
  |  Branch (1041:10): [True: 0, False: 146]
  ------------------
 1042|      0|        return result;
 1043|    146|    }
 1044|    201|  }
 1045|       |
 1046|    216|  DEBUGASSERT(!Curl_bufq_is_empty(&ctx->buf));
  ------------------
  |  | 1081|    216|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1046:3): [True: 0, False: 216]
  |  Branch (1046:3): [True: 216, False: 0]
  ------------------
 1047|    216|  *peos = FALSE;
  ------------------
  |  | 1058|    216|#define FALSE false
  ------------------
 1048|    216|  result = Curl_bufq_cread(&ctx->buf, buf, blen, pnread);
 1049|    216|  if(!result && ctx->read_eos && Curl_bufq_is_empty(&ctx->buf)) {
  ------------------
  |  Branch (1049:6): [True: 216, False: 0]
  |  Branch (1049:17): [True: 195, False: 21]
  |  Branch (1049:34): [True: 186, False: 9]
  ------------------
 1050|       |    /* no more data, read all, done. */
 1051|    186|    ctx->eos = TRUE;
  ------------------
  |  | 1055|    186|#define TRUE true
  ------------------
 1052|    186|    *peos = TRUE;
  ------------------
  |  | 1055|    186|#define TRUE true
  ------------------
 1053|    186|  }
 1054|       |
 1055|    330|out:
 1056|    330|  CURL_TRC_READ(data, "cr_lc_read(len=%zu) -> %d, nread=%zu, eos=%d",
  ------------------
  |  |  163|    330|  do {                                                    \
  |  |  164|    330|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|    330|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    660|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 330, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 330]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    660|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    330|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    330|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    330|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 330]
  |  |  ------------------
  ------------------
 1057|    330|                blen, result, *pnread, *peos);
 1058|    330|  return result;
 1059|    216|}
sendf.c:cr_lc_close:
  974|    306|{
  975|    306|  struct cr_lc_ctx *ctx = reader->ctx;
  976|    306|  (void)data;
  977|    306|  Curl_bufq_free(&ctx->buf);
  978|    306|}
sendf.c:cr_lc_total_length:
 1063|    491|{
 1064|       |  /* this reader changes length depending on input */
 1065|    491|  (void)data;
 1066|    491|  (void)reader;
 1067|    491|  return -1;
 1068|    491|}
sendf.c:cr_null_read:
 1241|     32|{
 1242|     32|  (void)data;
 1243|     32|  (void)reader;
 1244|     32|  (void)buf;
 1245|     32|  (void)blen;
 1246|     32|  *pnread = 0;
 1247|       |  *peos = TRUE;
  ------------------
  |  | 1055|     32|#define TRUE true
  ------------------
 1248|     32|  return CURLE_OK;
 1249|     32|}
sendf.c:cr_null_total_length:
 1253|  42.4k|{
 1254|       |  /* this reader changes length depending on input */
 1255|  42.4k|  (void)data;
 1256|  42.4k|  (void)reader;
 1257|  42.4k|  return 0;
 1258|  42.4k|}
sendf.c:cr_buf_read:
 1298|    970|{
 1299|    970|  struct cr_buf_ctx *ctx = reader->ctx;
 1300|    970|  size_t nread = ctx->blen - ctx->index;
 1301|       |
 1302|    970|  if(!nread || !ctx->buf) {
  ------------------
  |  Branch (1302:6): [True: 33, False: 937]
  |  Branch (1302:16): [True: 0, False: 937]
  ------------------
 1303|     33|    *pnread = 0;
 1304|     33|    *peos = TRUE;
  ------------------
  |  | 1055|     33|#define TRUE true
  ------------------
 1305|     33|  }
 1306|    937|  else {
 1307|    937|    if(nread > blen)
  ------------------
  |  Branch (1307:8): [True: 27, False: 910]
  ------------------
 1308|     27|      nread = blen;
 1309|    937|    memcpy(buf, ctx->buf + ctx->index, nread);
 1310|    937|    *pnread = nread;
 1311|    937|    ctx->index += nread;
 1312|    937|    *peos = (ctx->index == ctx->blen);
 1313|    937|  }
 1314|    970|  CURL_TRC_READ(data, "cr_buf_read(len=%zu) -> 0, nread=%zu, eos=%d",
  ------------------
  |  |  163|    970|  do {                                                    \
  |  |  164|    970|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
  |  |  ------------------
  |  |  |  |  326|    970|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.94k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 970, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 970]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.94k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|    970|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  165|    970|      Curl_trc_read(data, __VA_ARGS__);                   \
  |  |  166|    970|  } while(0)
  |  |  ------------------
  |  |  |  Branch (166:11): [Folded, False: 970]
  |  |  ------------------
  ------------------
 1315|    970|                blen, *pnread, *peos);
 1316|    970|  return CURLE_OK;
 1317|    970|}
sendf.c:cr_buf_needs_rewind:
 1321|    843|{
 1322|    843|  struct cr_buf_ctx *ctx = reader->ctx;
 1323|    843|  (void)data;
 1324|    843|  return ctx->index > 0;
 1325|    843|}
sendf.c:cr_buf_total_length:
 1345|  2.40k|{
 1346|  2.40k|  struct cr_buf_ctx *ctx = reader->ctx;
 1347|  2.40k|  (void)data;
 1348|  2.40k|  return (curl_off_t)ctx->blen;
 1349|  2.40k|}
sendf.c:cr_buf_cntrl:
 1330|    730|{
 1331|    730|  struct cr_buf_ctx *ctx = reader->ctx;
 1332|    730|  (void)data;
 1333|    730|  switch(opcode) {
 1334|    730|  case CURL_CRCNTRL_REWIND:
  ------------------
  |  Branch (1334:3): [True: 730, False: 0]
  ------------------
 1335|    730|    ctx->index = 0;
 1336|    730|    break;
 1337|      0|  default:
  ------------------
  |  Branch (1337:3): [True: 0, False: 730]
  ------------------
 1338|      0|    break;
 1339|    730|  }
 1340|    730|  return CURLE_OK;
 1341|    730|}

Curl_setstropt:
   83|   147k|{
   84|       |  /* Release the previous storage at `charp' and replace by a dynamic storage
   85|       |     copy of `s'. Return CURLE_OK or CURLE_OUT_OF_MEMORY. */
   86|       |
   87|   147k|  curlx_safefree(*charp);
  ------------------
  |  | 1327|   147k|  do {                      \
  |  | 1328|   147k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   147k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   147k|    (ptr) = NULL;           \
  |  | 1330|   147k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 147k]
  |  |  ------------------
  ------------------
   88|       |
   89|   147k|  if(s) {
  ------------------
  |  Branch (89:6): [True: 147k, False: 0]
  ------------------
   90|   147k|    if(strlen(s) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|   147k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (90:8): [True: 0, False: 147k]
  ------------------
   91|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
   92|       |
   93|   147k|    *charp = curlx_strdup(s);
  ------------------
  |  | 1477|   147k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   94|   147k|    if(!*charp)
  ------------------
  |  Branch (94:8): [True: 0, False: 147k]
  ------------------
   95|      0|      return CURLE_OUT_OF_MEMORY;
   96|   147k|  }
   97|       |
   98|   147k|  return CURLE_OK;
   99|   147k|}
Curl_setopt_SSLVERSION:
  317|  66.5k|{
  318|       |  /*
  319|       |   * Set explicit SSL version to try to connect with, as some SSL
  320|       |   * implementations are lame.
  321|       |   */
  322|  66.5k|  {
  323|  66.5k|    long version, version_max;
  324|  66.5k|    struct ssl_primary_config *primary = &data->set.ssl.primary;
  325|  66.5k|#ifndef CURL_DISABLE_PROXY
  326|  66.5k|    if(option != CURLOPT_SSLVERSION)
  ------------------
  |  Branch (326:8): [True: 33.2k, False: 33.2k]
  ------------------
  327|  33.2k|      primary = &data->set.proxy_ssl.primary;
  328|       |#else
  329|       |    if(option) {}
  330|       |#endif
  331|  66.5k|    version = C_SSLVERSION_VALUE(arg);
  ------------------
  |  |  194|  66.5k|#define C_SSLVERSION_VALUE(x)     ((x) & 0xffff)
  ------------------
  332|  66.5k|    version_max = (long)C_SSLVERSION_MAX_VALUE(arg);
  ------------------
  |  |  195|  66.5k|#define C_SSLVERSION_MAX_VALUE(x) ((unsigned long)(x) & 0xffff0000)
  ------------------
  333|       |
  334|  66.5k|    if(version < CURL_SSLVERSION_DEFAULT ||
  ------------------
  |  | 2368|   133k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (334:8): [True: 0, False: 66.5k]
  ------------------
  335|  66.5k|       version == CURL_SSLVERSION_SSLv2 ||
  ------------------
  |  | 2370|   133k|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (335:8): [True: 1, False: 66.5k]
  ------------------
  336|  66.5k|       version == CURL_SSLVERSION_SSLv3 ||
  ------------------
  |  | 2371|   133k|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (336:8): [True: 1, False: 66.5k]
  ------------------
  337|  66.5k|       version >= CURL_SSLVERSION_LAST ||
  ------------------
  |  | 2377|   133k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (337:8): [True: 21, False: 66.4k]
  ------------------
  338|  66.4k|       version_max < CURL_SSLVERSION_MAX_NONE ||
  ------------------
  |  | 2379|   132k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (338:8): [True: 0, False: 66.4k]
  ------------------
  339|  66.4k|       version_max >= CURL_SSLVERSION_MAX_LAST)
  ------------------
  |  | 2387|  66.4k|#define CURL_SSLVERSION_MAX_LAST    (CURL_SSLVERSION_LAST    << 16)
  |  |  ------------------
  |  |  |  | 2377|  66.4k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  |  |  ------------------
  ------------------
  |  Branch (339:8): [True: 4, False: 66.4k]
  ------------------
  340|     27|      return CURLE_BAD_FUNCTION_ARGUMENT;
  341|  66.4k|    if(version == CURL_SSLVERSION_DEFAULT)
  ------------------
  |  | 2368|  66.4k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  |  Branch (341:8): [True: 66.4k, False: 29]
  ------------------
  342|  66.4k|      version = CURL_SSLVERSION_TLSv1_2;
  ------------------
  |  | 2374|  66.4k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  343|       |
  344|  66.4k|    primary->version = (unsigned char)version;
  345|  66.4k|    primary->version_max = (unsigned int)version_max;
  346|  66.4k|  }
  347|      0|  return CURLE_OK;
  348|  66.5k|}
Curl_vsetopt:
 2896|   323k|{
 2897|   323k|  if(option < CURLOPTTYPE_OBJECTPOINT)
  ------------------
  |  | 1114|   323k|#define CURLOPTTYPE_OBJECTPOINT   10000
  ------------------
  |  Branch (2897:6): [True: 52.7k, False: 271k]
  ------------------
 2898|  52.7k|    return setopt_long(data, option, va_arg(param, long));
 2899|   271k|  else if(option < CURLOPTTYPE_FUNCTIONPOINT) {
  ------------------
  |  | 1115|   271k|#define CURLOPTTYPE_FUNCTIONPOINT 20000
  ------------------
  |  Branch (2899:11): [True: 206k, False: 64.8k]
  ------------------
 2900|       |    /* unfortunately, different pointer types cannot be identified any other
 2901|       |       way than being listed explicitly */
 2902|   206k|    switch(option) {
 2903|  1.71k|    case CURLOPT_HTTPHEADER:
  ------------------
  |  Branch (2903:5): [True: 1.71k, False: 204k]
  ------------------
 2904|  1.71k|    case CURLOPT_QUOTE:
  ------------------
  |  Branch (2904:5): [True: 0, False: 206k]
  ------------------
 2905|  1.71k|    case CURLOPT_POSTQUOTE:
  ------------------
  |  Branch (2905:5): [True: 0, False: 206k]
  ------------------
 2906|  1.71k|    case CURLOPT_TELNETOPTIONS:
  ------------------
  |  Branch (2906:5): [True: 0, False: 206k]
  ------------------
 2907|  1.71k|    case CURLOPT_PREQUOTE:
  ------------------
  |  Branch (2907:5): [True: 0, False: 206k]
  ------------------
 2908|  1.71k|    case CURLOPT_HTTP200ALIASES:
  ------------------
  |  Branch (2908:5): [True: 0, False: 206k]
  ------------------
 2909|  1.76k|    case CURLOPT_MAIL_RCPT:
  ------------------
  |  Branch (2909:5): [True: 46, False: 206k]
  ------------------
 2910|  1.76k|    case CURLOPT_RESOLVE:
  ------------------
  |  Branch (2910:5): [True: 0, False: 206k]
  ------------------
 2911|  1.76k|    case CURLOPT_PROXYHEADER:
  ------------------
  |  Branch (2911:5): [True: 0, False: 206k]
  ------------------
 2912|  17.1k|    case CURLOPT_CONNECT_TO:
  ------------------
  |  Branch (2912:5): [True: 15.3k, False: 190k]
  ------------------
 2913|  17.1k|      return setopt_slist(data, option, va_arg(param, struct curl_slist *));
 2914|    241|    case CURLOPT_HTTPPOST:         /* curl_httppost * */
  ------------------
  |  Branch (2914:5): [True: 241, False: 206k]
  ------------------
 2915|    575|    case CURLOPT_MIMEPOST:         /* curl_mime * */
  ------------------
  |  Branch (2915:5): [True: 334, False: 206k]
  ------------------
 2916|    575|    case CURLOPT_STDERR:           /* FILE * */
  ------------------
  |  Branch (2916:5): [True: 0, False: 206k]
  ------------------
 2917|  1.32k|    case CURLOPT_SHARE:            /* CURLSH * */
  ------------------
  |  Branch (2917:5): [True: 751, False: 205k]
  ------------------
 2918|  1.32k|    case CURLOPT_STREAM_DEPENDS:   /* CURL * */
  ------------------
  |  Branch (2918:5): [True: 0, False: 206k]
  ------------------
 2919|  1.32k|    case CURLOPT_STREAM_DEPENDS_E: /* CURL * */
  ------------------
  |  Branch (2919:5): [True: 0, False: 206k]
  ------------------
 2920|  1.32k|    case CURLOPT_CURLU:            /* CURLU * */
  ------------------
  |  Branch (2920:5): [True: 0, False: 206k]
  ------------------
 2921|  1.32k|      return setopt_pointers(data, option, param);
 2922|   187k|    default:
  ------------------
  |  Branch (2922:5): [True: 187k, False: 18.4k]
  ------------------
 2923|   187k|      break;
 2924|   206k|    }
 2925|       |    /* the char pointer options */
 2926|   187k|    return setopt_cptr(data, option, va_arg(param, char *));
 2927|   206k|  }
 2928|  64.8k|  else if(option < CURLOPTTYPE_OFF_T)
  ------------------
  |  | 1116|  64.8k|#define CURLOPTTYPE_OFF_T         30000
  ------------------
  |  Branch (2928:11): [True: 62.1k, False: 2.71k]
  ------------------
 2929|  62.1k|    return setopt_func(data, option, param);
 2930|  2.71k|  else if(option < CURLOPTTYPE_BLOB)
  ------------------
  |  | 1117|  2.71k|#define CURLOPTTYPE_BLOB          40000
  ------------------
  |  Branch (2930:11): [True: 2.71k, False: 0]
  ------------------
 2931|  2.71k|    return setopt_offt(data, option, va_arg(param, curl_off_t));
 2932|      0|  return setopt_blob(data, option, va_arg(param, struct curl_blob *));
 2933|   323k|}
curl_easy_setopt:
 2945|   323k|{
 2946|   323k|  va_list arg;
 2947|   323k|  CURLcode result;
 2948|   323k|  struct Curl_easy *data = curl;
 2949|       |
 2950|   323k|  if(!data)
  ------------------
  |  Branch (2950:6): [True: 0, False: 323k]
  ------------------
 2951|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
 2952|       |
 2953|   323k|  va_start(arg, option);
 2954|       |
 2955|   323k|  result = Curl_vsetopt(data, option, arg);
 2956|       |
 2957|   323k|  va_end(arg);
 2958|   323k|  if(result == CURLE_BAD_FUNCTION_ARGUMENT)
  ------------------
  |  Branch (2958:6): [True: 586, False: 323k]
  ------------------
 2959|    586|    failf(data, "setopt 0x%x got bad argument", option);
  ------------------
  |  |   62|    586|#define failf Curl_failf
  ------------------
 2960|   323k|  return result;
 2961|   323k|}
setopt.c:setopt_long:
 1317|  52.7k|{
 1318|  52.7k|  typedef CURLcode (*setoptfunc)(struct Curl_easy *data,
 1319|  52.7k|                                 CURLoption option, long arg);
 1320|  52.7k|  static const setoptfunc setopt_call[] = {
 1321|  52.7k|    setopt_long_bool,
 1322|  52.7k|    setopt_long_net,
 1323|  52.7k|    setopt_long_http,
 1324|  52.7k|    setopt_long_proxy,
 1325|  52.7k|    setopt_long_ssl,
 1326|  52.7k|    setopt_long_proto,
 1327|  52.7k|    setopt_long_misc
 1328|  52.7k|  };
 1329|  52.7k|  size_t i;
 1330|       |
 1331|   131k|  for(i = 0; i < CURL_ARRAYSIZE(setopt_call); i++) {
  ------------------
  |  | 1294|   131k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (1331:14): [True: 131k, False: 8]
  ------------------
 1332|   131k|    CURLcode result = setopt_call[i](data, option, arg);
 1333|   131k|    if(result != CURLE_UNKNOWN_OPTION)
  ------------------
  |  Branch (1333:8): [True: 52.7k, False: 78.9k]
  ------------------
 1334|  52.7k|      return result;
 1335|   131k|  }
 1336|      8|  return CURLE_UNKNOWN_OPTION;
 1337|  52.7k|}
setopt.c:setopt_long_bool:
  420|  52.7k|{
  421|  52.7k|  bool enabled = !!arg;
  422|  52.7k|  int ok = 1;
  423|  52.7k|  struct UserDefined *s = &data->set;
  424|  52.7k|  switch(option) {
  425|     43|  case CURLOPT_FORBID_REUSE:
  ------------------
  |  Branch (425:3): [True: 43, False: 52.6k]
  ------------------
  426|       |    /*
  427|       |     * When this transfer is done, it must not be left to be reused by a
  428|       |     * subsequent transfer but shall be closed immediately.
  429|       |     */
  430|     43|    s->reuse_forbid = enabled;
  431|     43|    break;
  432|     13|  case CURLOPT_FRESH_CONNECT:
  ------------------
  |  Branch (432:3): [True: 13, False: 52.7k]
  ------------------
  433|       |    /*
  434|       |     * This transfer shall not use a previously cached connection but
  435|       |     * should be made with a fresh new connect!
  436|       |     */
  437|     13|    s->reuse_fresh = enabled;
  438|     13|    break;
  439|      0|  case CURLOPT_VERBOSE:
  ------------------
  |  Branch (439:3): [True: 0, False: 52.7k]
  ------------------
  440|       |    /*
  441|       |     * Verbose means infof() calls that give a lot of information about
  442|       |     * the connection and transfer procedures as well as internal choices.
  443|       |     */
  444|      0|    s->verbose = enabled;
  445|      0|    break;
  446|     34|  case CURLOPT_HEADER:
  ------------------
  |  Branch (446:3): [True: 34, False: 52.7k]
  ------------------
  447|       |    /*
  448|       |     * Set to include the header in the general data output stream.
  449|       |     */
  450|     34|    s->include_header = enabled;
  451|     34|    break;
  452|    388|  case CURLOPT_NOPROGRESS:
  ------------------
  |  Branch (452:3): [True: 388, False: 52.3k]
  ------------------
  453|       |    /*
  454|       |     * Shut off the internal supported progress meter
  455|       |     */
  456|    388|    data->progress.hide = enabled;
  457|    388|    break;
  458|    186|  case CURLOPT_NOBODY:
  ------------------
  |  Branch (458:3): [True: 186, False: 52.5k]
  ------------------
  459|       |    /*
  460|       |     * Do not include the body part in the output data stream.
  461|       |     */
  462|    186|    s->opt_no_body = enabled;
  463|    186|#ifndef CURL_DISABLE_HTTP
  464|    186|    if(s->opt_no_body)
  ------------------
  |  Branch (464:8): [True: 183, False: 3]
  ------------------
  465|       |      /* in HTTP lingo, no body means using the HEAD request... */
  466|    183|      s->method = HTTPREQ_HEAD;
  467|      3|    else if(s->method == HTTPREQ_HEAD)
  ------------------
  |  Branch (467:13): [True: 0, False: 3]
  ------------------
  468|      0|      s->method = HTTPREQ_GET;
  469|    186|#endif
  470|    186|    break;
  471|     58|  case CURLOPT_FAILONERROR:
  ------------------
  |  Branch (471:3): [True: 58, False: 52.6k]
  ------------------
  472|       |    /*
  473|       |     * Do not output the >=400 error code HTML-page, but instead only
  474|       |     * return error.
  475|       |     */
  476|     58|    s->http_fail_on_error = enabled;
  477|     58|    break;
  478|     16|  case CURLOPT_KEEP_SENDING_ON_ERROR:
  ------------------
  |  Branch (478:3): [True: 16, False: 52.7k]
  ------------------
  479|     16|    s->http_keep_sending_on_error = enabled;
  480|     16|    break;
  481|    275|  case CURLOPT_UPLOAD:
  ------------------
  |  Branch (481:3): [True: 275, False: 52.4k]
  ------------------
  482|    275|  case CURLOPT_PUT:
  ------------------
  |  Branch (482:3): [True: 0, False: 52.7k]
  ------------------
  483|       |    /*
  484|       |     * We want to send data to the remote host. If this is HTTP, that equals
  485|       |     * using the PUT request.
  486|       |     */
  487|    275|    if(enabled) {
  ------------------
  |  Branch (487:8): [True: 275, False: 0]
  ------------------
  488|       |      /* If this is HTTP, PUT is what's needed to "upload" */
  489|    275|      s->method = HTTPREQ_PUT;
  490|    275|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1058|    275|#define FALSE false
  ------------------
  491|    275|    }
  492|      0|    else
  493|       |      /* In HTTP, the opposite of upload is GET (unless NOBODY is true as
  494|       |         then this can be changed to HEAD later on) */
  495|      0|      s->method = HTTPREQ_GET;
  496|    275|    break;
  497|     23|  case CURLOPT_FILETIME:
  ------------------
  |  Branch (497:3): [True: 23, False: 52.7k]
  ------------------
  498|       |    /*
  499|       |     * Try to get the file time of the remote document. The time will
  500|       |     * later (possibly) become available using curl_easy_getinfo().
  501|       |     */
  502|     23|    s->get_filetime = enabled;
  503|     23|    break;
  504|      0|#ifndef CURL_DISABLE_HTTP
  505|      7|  case CURLOPT_HTTP09_ALLOWED:
  ------------------
  |  Branch (505:3): [True: 7, False: 52.7k]
  ------------------
  506|      7|    s->http09_allowed = enabled;
  507|      7|    break;
  508|      0|#ifndef CURL_DISABLE_COOKIES
  509|      3|  case CURLOPT_COOKIESESSION:
  ------------------
  |  Branch (509:3): [True: 3, False: 52.7k]
  ------------------
  510|       |    /*
  511|       |     * Set this option to TRUE to start a new "cookie session". It will
  512|       |     * prevent the forthcoming read-cookies-from-file actions to accept
  513|       |     * cookies that are marked as being session cookies, as they belong to a
  514|       |     * previous session.
  515|       |     */
  516|      3|    s->cookiesession = enabled;
  517|      3|    break;
  518|      0|#endif
  519|    265|  case CURLOPT_AUTOREFERER:
  ------------------
  |  Branch (519:3): [True: 265, False: 52.4k]
  ------------------
  520|       |    /*
  521|       |     * Switch on automatic referer that gets set if curl follows locations.
  522|       |     */
  523|    265|    s->http_auto_referer = enabled;
  524|    265|    break;
  525|     23|  case CURLOPT_TRANSFER_ENCODING:
  ------------------
  |  Branch (525:3): [True: 23, False: 52.7k]
  ------------------
  526|     23|    s->http_transfer_encoding = enabled;
  527|     23|    break;
  528|    265|  case CURLOPT_UNRESTRICTED_AUTH:
  ------------------
  |  Branch (528:3): [True: 265, False: 52.4k]
  ------------------
  529|       |    /*
  530|       |     * Send authentication (user+password) when following locations, even when
  531|       |     * hostname changed.
  532|       |     */
  533|    265|    s->allow_auth_to_other_hosts = enabled;
  534|    265|    break;
  535|     13|  case CURLOPT_HTTP_TRANSFER_DECODING:
  ------------------
  |  Branch (535:3): [True: 13, False: 52.7k]
  ------------------
  536|       |    /*
  537|       |     * disable libcurl transfer encoding is used
  538|       |     */
  539|     13|    s->http_te_skip = !enabled; /* reversed */
  540|     13|    break;
  541|      8|  case CURLOPT_HTTP_CONTENT_DECODING:
  ------------------
  |  Branch (541:3): [True: 8, False: 52.7k]
  ------------------
  542|       |    /*
  543|       |     * raw data passed to the application when content encoding is used
  544|       |     */
  545|      8|    s->http_ce_skip = !enabled; /* reversed */
  546|      8|    break;
  547|      4|  case CURLOPT_HTTPGET:
  ------------------
  |  Branch (547:3): [True: 4, False: 52.7k]
  ------------------
  548|       |    /*
  549|       |     * Set to force us do HTTP GET
  550|       |     */
  551|      4|    if(enabled) {
  ------------------
  |  Branch (551:8): [True: 2, False: 2]
  ------------------
  552|      2|      s->method = HTTPREQ_GET;
  553|      2|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
  554|      2|    }
  555|      4|    break;
  556|     28|  case CURLOPT_POST:
  ------------------
  |  Branch (556:3): [True: 28, False: 52.7k]
  ------------------
  557|       |    /* Does this option serve a purpose anymore? Yes it does, when
  558|       |       CURLOPT_POSTFIELDS is not used and the POST data is read off the
  559|       |       callback! */
  560|     28|    if(enabled) {
  ------------------
  |  Branch (560:8): [True: 26, False: 2]
  ------------------
  561|     26|      s->method = HTTPREQ_POST;
  562|     26|      s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1058|     26|#define FALSE false
  ------------------
  563|     26|    }
  564|      2|    else
  565|      2|      s->method = HTTPREQ_GET;
  566|     28|    break;
  567|      0|#endif /* !CURL_DISABLE_HTTP */
  568|      0|#ifndef CURL_DISABLE_PROXY
  569|      6|  case CURLOPT_HTTPPROXYTUNNEL:
  ------------------
  |  Branch (569:3): [True: 6, False: 52.7k]
  ------------------
  570|       |    /*
  571|       |     * Tunnel operations through the proxy instead of normal proxy use
  572|       |     */
  573|      6|    s->tunnel_thru_httpproxy = enabled;
  574|      6|    break;
  575|     24|  case CURLOPT_HAPROXYPROTOCOL:
  ------------------
  |  Branch (575:3): [True: 24, False: 52.7k]
  ------------------
  576|       |    /*
  577|       |     * Set to send the HAProxy Proxy Protocol header
  578|       |     */
  579|     24|    s->haproxyprotocol = enabled;
  580|     24|    break;
  581|     10|  case CURLOPT_PROXY_SSL_VERIFYPEER:
  ------------------
  |  Branch (581:3): [True: 10, False: 52.7k]
  ------------------
  582|       |    /*
  583|       |     * Enable peer SSL verifying for proxy.
  584|       |     */
  585|     10|    s->proxy_ssl.primary.verifypeer = enabled;
  586|       |
  587|       |    /* Update the current connection proxy_ssl_config. */
  588|     10|    Curl_ssl_conn_config_update(data, TRUE);
  ------------------
  |  | 1055|     10|#define TRUE true
  ------------------
  589|     10|    break;
  590|    263|  case CURLOPT_PROXY_SSL_VERIFYHOST:
  ------------------
  |  Branch (590:3): [True: 263, False: 52.4k]
  ------------------
  591|       |    /*
  592|       |     * Enable verification of the hostname in the peer certificate for proxy
  593|       |     */
  594|    263|    s->proxy_ssl.primary.verifyhost = enabled;
  595|    263|    ok = 2;
  596|       |    /* Update the current connection proxy_ssl_config. */
  597|    263|    Curl_ssl_conn_config_update(data, TRUE);
  ------------------
  |  | 1055|    263|#define TRUE true
  ------------------
  598|    263|    break;
  599|      4|  case CURLOPT_PROXY_TRANSFER_MODE:
  ------------------
  |  Branch (599:3): [True: 4, False: 52.7k]
  ------------------
  600|       |    /*
  601|       |     * set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy
  602|       |     */
  603|      4|    s->proxy_transfer_mode = enabled;
  604|      4|    break;
  605|      0|#endif /* !CURL_DISABLE_PROXY */
  606|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  607|       |  case CURLOPT_SOCKS5_GSSAPI_NEC:
  608|       |    /*
  609|       |     * Set flag for NEC SOCKS5 support
  610|       |     */
  611|       |    s->socks5_gssapi_nec = enabled;
  612|       |    break;
  613|       |#endif
  614|      0|#ifdef CURL_LIST_ONLY_PROTOCOL
  615|      3|  case CURLOPT_DIRLISTONLY:
  ------------------
  |  Branch (615:3): [True: 3, False: 52.7k]
  ------------------
  616|       |    /*
  617|       |     * An option that changes the command to one that asks for a list only, no
  618|       |     * file info details. Used for FTP, POP3 and SFTP.
  619|       |     */
  620|      3|    s->list_only = enabled;
  621|      3|    break;
  622|      0|#endif
  623|      3|  case CURLOPT_APPEND:
  ------------------
  |  Branch (623:3): [True: 3, False: 52.7k]
  ------------------
  624|       |    /*
  625|       |     * We want to upload and append to an existing file. Used for FTP and
  626|       |     * SFTP.
  627|       |     */
  628|      3|    s->remote_append = enabled;
  629|      3|    break;
  630|      0|#ifndef CURL_DISABLE_FTP
  631|      5|  case CURLOPT_FTP_USE_EPRT:
  ------------------
  |  Branch (631:3): [True: 5, False: 52.7k]
  ------------------
  632|      5|    s->ftp_use_eprt = enabled;
  633|      5|    break;
  634|      3|  case CURLOPT_FTP_USE_EPSV:
  ------------------
  |  Branch (634:3): [True: 3, False: 52.7k]
  ------------------
  635|      3|    s->ftp_use_epsv = enabled;
  636|      3|    break;
  637|     23|  case CURLOPT_FTP_USE_PRET:
  ------------------
  |  Branch (637:3): [True: 23, False: 52.7k]
  ------------------
  638|     23|    s->ftp_use_pret = enabled;
  639|     23|    break;
  640|      3|  case CURLOPT_FTP_SKIP_PASV_IP:
  ------------------
  |  Branch (640:3): [True: 3, False: 52.7k]
  ------------------
  641|       |    /*
  642|       |     * Enable or disable FTP_SKIP_PASV_IP, which will disable/enable the
  643|       |     * bypass of the IP address in PASV responses.
  644|       |     */
  645|      3|    s->ftp_skip_ip = enabled;
  646|      3|    break;
  647|      7|  case CURLOPT_WILDCARDMATCH:
  ------------------
  |  Branch (647:3): [True: 7, False: 52.7k]
  ------------------
  648|      7|    s->wildcard_enabled = enabled;
  649|      7|    break;
  650|      0|#endif
  651|      0|  case CURLOPT_CRLF:
  ------------------
  |  Branch (651:3): [True: 0, False: 52.7k]
  ------------------
  652|       |    /*
  653|       |     * Kludgy option to enable CRLF conversions. Subject for removal.
  654|       |     */
  655|      0|    s->crlf = enabled;
  656|      0|    break;
  657|      0|#ifndef CURL_DISABLE_TFTP
  658|      6|  case CURLOPT_TFTP_NO_OPTIONS:
  ------------------
  |  Branch (658:3): [True: 6, False: 52.7k]
  ------------------
  659|       |    /*
  660|       |     * Option that prevents libcurl from sending TFTP option requests to the
  661|       |     * server.
  662|       |     */
  663|      6|    s->tftp_no_options = enabled;
  664|      6|    break;
  665|      0|#endif /* !CURL_DISABLE_TFTP */
  666|    419|  case CURLOPT_TRANSFERTEXT:
  ------------------
  |  Branch (666:3): [True: 419, False: 52.3k]
  ------------------
  667|       |    /*
  668|       |     * This option was previously named 'FTPASCII'. Renamed to work with
  669|       |     * more protocols than merely FTP.
  670|       |     *
  671|       |     * Transfer using ASCII (instead of BINARY).
  672|       |     */
  673|    419|    s->prefer_ascii = enabled;
  674|    419|    break;
  675|    756|  case CURLOPT_SSL_VERIFYPEER:
  ------------------
  |  Branch (675:3): [True: 756, False: 51.9k]
  ------------------
  676|       |    /*
  677|       |     * Enable peer SSL verifying.
  678|       |     */
  679|    756|    s->ssl.primary.verifypeer = enabled;
  680|       |
  681|       |    /* Update the current connection ssl_config. */
  682|    756|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1058|    756|#define FALSE false
  ------------------
  683|    756|    break;
  684|      0|#ifndef CURL_DISABLE_DOH
  685|     18|  case CURLOPT_DOH_SSL_VERIFYPEER:
  ------------------
  |  Branch (685:3): [True: 18, False: 52.7k]
  ------------------
  686|       |    /*
  687|       |     * Enable peer SSL verifying for DoH.
  688|       |     */
  689|     18|    s->doh_verifypeer = enabled;
  690|     18|    break;
  691|      3|  case CURLOPT_DOH_SSL_VERIFYHOST:
  ------------------
  |  Branch (691:3): [True: 3, False: 52.7k]
  ------------------
  692|       |    /*
  693|       |     * Enable verification of the hostname in the peer certificate for DoH
  694|       |     */
  695|      3|    s->doh_verifyhost = enabled;
  696|      3|    ok = 2;
  697|      3|    break;
  698|      5|  case CURLOPT_DOH_SSL_VERIFYSTATUS:
  ------------------
  |  Branch (698:3): [True: 5, False: 52.7k]
  ------------------
  699|       |    /*
  700|       |     * Enable certificate status verifying for DoH.
  701|       |     */
  702|      5|    if(!Curl_ssl_cert_status_request())
  ------------------
  |  Branch (702:8): [True: 0, False: 5]
  ------------------
  703|      0|      return CURLE_NOT_BUILT_IN;
  704|       |
  705|      5|    s->doh_verifystatus = enabled;
  706|      5|    ok = 2;
  707|      5|    break;
  708|      0|#endif /* !CURL_DISABLE_DOH */
  709|    757|  case CURLOPT_SSL_VERIFYHOST:
  ------------------
  |  Branch (709:3): [True: 757, False: 51.9k]
  ------------------
  710|       |    /*
  711|       |     * Enable verification of the hostname in the peer certificate
  712|       |     */
  713|       |
  714|       |    /* Obviously people are not reading documentation and too many thought
  715|       |       this argument took a boolean when it was not and misused it.
  716|       |       Treat 1 and 2 the same */
  717|    757|    s->ssl.primary.verifyhost = enabled;
  718|    757|    ok = 2;
  719|       |
  720|       |    /* Update the current connection ssl_config. */
  721|    757|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1058|    757|#define FALSE false
  ------------------
  722|    757|    break;
  723|    763|  case CURLOPT_SSL_VERIFYSTATUS:
  ------------------
  |  Branch (723:3): [True: 763, False: 51.9k]
  ------------------
  724|       |    /*
  725|       |     * Enable certificate status verifying.
  726|       |     */
  727|    763|    if(!Curl_ssl_cert_status_request())
  ------------------
  |  Branch (727:8): [True: 0, False: 763]
  ------------------
  728|      0|      return CURLE_NOT_BUILT_IN;
  729|       |
  730|    763|    s->ssl.primary.verifystatus = enabled;
  731|       |
  732|       |    /* Update the current connection ssl_config. */
  733|    763|    Curl_ssl_conn_config_update(data, FALSE);
  ------------------
  |  | 1058|    763|#define FALSE false
  ------------------
  734|    763|    break;
  735|      7|  case CURLOPT_CERTINFO:
  ------------------
  |  Branch (735:3): [True: 7, False: 52.7k]
  ------------------
  736|      7|#ifdef USE_SSL
  737|      7|    if(Curl_ssl_supports(data, SSLSUPP_CERTINFO))
  ------------------
  |  |   36|      7|#define SSLSUPP_CERTINFO     (1 << 1) /* supports CURLOPT_CERTINFO */
  ------------------
  |  Branch (737:8): [True: 7, False: 0]
  ------------------
  738|      7|      s->ssl.certinfo = enabled;
  739|      0|    else
  740|      0|#endif
  741|      0|      return CURLE_NOT_BUILT_IN;
  742|      7|    break;
  743|     22|  case CURLOPT_NOSIGNAL:
  ------------------
  |  Branch (743:3): [True: 22, False: 52.7k]
  ------------------
  744|       |    /*
  745|       |     * The application asks not to set any signal() or alarm() handlers,
  746|       |     * even when using a timeout.
  747|       |     */
  748|     22|    s->no_signal = enabled;
  749|     22|    break;
  750|      6|  case CURLOPT_TCP_NODELAY:
  ------------------
  |  Branch (750:3): [True: 6, False: 52.7k]
  ------------------
  751|       |    /*
  752|       |     * Enable or disable TCP_NODELAY, which will disable/enable the Nagle
  753|       |     * algorithm
  754|       |     */
  755|      6|    s->tcp_nodelay = enabled;
  756|      6|    break;
  757|     11|  case CURLOPT_IGNORE_CONTENT_LENGTH:
  ------------------
  |  Branch (757:3): [True: 11, False: 52.7k]
  ------------------
  758|     11|    s->ignorecl = enabled;
  759|     11|    break;
  760|      4|  case CURLOPT_SSL_SESSIONID_CACHE:
  ------------------
  |  Branch (760:3): [True: 4, False: 52.7k]
  ------------------
  761|      4|    s->ssl.primary.cache_session = enabled;
  762|      4|#ifndef CURL_DISABLE_PROXY
  763|      4|    s->proxy_ssl.primary.cache_session = s->ssl.primary.cache_session;
  764|      4|#endif
  765|      4|    break;
  766|       |#ifdef USE_SSH
  767|       |  case CURLOPT_SSH_COMPRESSION:
  768|       |    s->ssh_compression = enabled;
  769|       |    break;
  770|       |#endif /* !USE_SSH */
  771|      0|#ifndef CURL_DISABLE_SMTP
  772|      3|  case CURLOPT_MAIL_RCPT_ALLOWFAILS:
  ------------------
  |  Branch (772:3): [True: 3, False: 52.7k]
  ------------------
  773|       |    /* allow RCPT TO command to fail for some recipients */
  774|      3|    s->mail_rcpt_allowfails = enabled;
  775|      3|    break;
  776|      0|#endif /* !CURL_DISABLE_SMTP */
  777|     91|  case CURLOPT_SASL_IR:
  ------------------
  |  Branch (777:3): [True: 91, False: 52.6k]
  ------------------
  778|       |    /* Enable/disable SASL initial response */
  779|     91|    s->sasl_ir = enabled;
  780|     91|    break;
  781|     49|  case CURLOPT_TCP_KEEPALIVE:
  ------------------
  |  Branch (781:3): [True: 49, False: 52.6k]
  ------------------
  782|     49|    s->tcp_keepalive = enabled;
  783|     49|    break;
  784|      3|  case CURLOPT_TCP_FASTOPEN:
  ------------------
  |  Branch (784:3): [True: 3, False: 52.7k]
  ------------------
  785|      3|#if defined(CONNECT_DATA_IDEMPOTENT) || defined(MSG_FASTOPEN) || \
  786|      3|  defined(TCP_FASTOPEN_CONNECT)
  787|      3|    s->tcp_fastopen = enabled;
  788|      3|    break;
  789|       |#else
  790|       |    return CURLE_NOT_BUILT_IN;
  791|       |#endif
  792|      4|  case CURLOPT_SSL_ENABLE_ALPN:
  ------------------
  |  Branch (792:3): [True: 4, False: 52.7k]
  ------------------
  793|      4|    s->ssl_enable_alpn = enabled;
  794|      4|    break;
  795|    344|  case CURLOPT_PATH_AS_IS:
  ------------------
  |  Branch (795:3): [True: 344, False: 52.3k]
  ------------------
  796|    344|    s->path_as_is = enabled;
  797|    344|    break;
  798|    754|  case CURLOPT_PIPEWAIT:
  ------------------
  |  Branch (798:3): [True: 754, False: 51.9k]
  ------------------
  799|    754|    s->pipewait = enabled;
  800|    754|    break;
  801|     12|  case CURLOPT_SUPPRESS_CONNECT_HEADERS:
  ------------------
  |  Branch (801:3): [True: 12, False: 52.7k]
  ------------------
  802|     12|    s->suppress_connect_headers = enabled;
  803|     12|    break;
  804|      0|#ifndef CURL_DISABLE_SHUFFLE_DNS
  805|     13|  case CURLOPT_DNS_SHUFFLE_ADDRESSES:
  ------------------
  |  Branch (805:3): [True: 13, False: 52.7k]
  ------------------
  806|     13|    s->dns_shuffle_addresses = enabled;
  807|     13|    break;
  808|      0|#endif
  809|      4|  case CURLOPT_DISALLOW_USERNAME_IN_URL:
  ------------------
  |  Branch (809:3): [True: 4, False: 52.7k]
  ------------------
  810|      4|    s->disallow_username_in_url = enabled;
  811|      4|    break;
  812|      4|  case CURLOPT_QUICK_EXIT:
  ------------------
  |  Branch (812:3): [True: 4, False: 52.7k]
  ------------------
  813|      4|    s->quick_exit = enabled;
  814|      4|    break;
  815|  46.6k|  default:
  ------------------
  |  Branch (815:3): [True: 46.6k, False: 6.06k]
  ------------------
  816|  46.6k|    return CURLE_UNKNOWN_OPTION;
  817|  52.7k|  }
  818|  6.06k|  if((arg > ok) || (arg < 0))
  ------------------
  |  Branch (818:6): [True: 2.33k, False: 3.72k]
  |  Branch (818:20): [True: 0, False: 3.72k]
  ------------------
  819|       |    /* reserve other values for future use */
  820|  2.33k|    infof(data, "boolean setopt(%d) got unsupported argument %ld,"
  ------------------
  |  |  143|  2.33k|  do {                               \
  |  |  144|  2.33k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  2.33k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2.33k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.33k]
  |  |  |  |  ------------------
  |  |  |  |  320|  2.33k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  2.33k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  2.33k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2.33k]
  |  |  ------------------
  ------------------
  821|  6.06k|          " treated as %d", option, arg, enabled);
  822|       |
  823|  6.06k|  return CURLE_OK;
  824|  52.7k|}
setopt.c:setopt_long_net:
  839|  46.6k|{
  840|  46.6k|  CURLcode result = CURLE_OK;
  841|  46.6k|  struct UserDefined *s = &data->set;
  842|       |
  843|  46.6k|  switch(option) {
  844|    132|  case CURLOPT_DNS_CACHE_TIMEOUT:
  ------------------
  |  Branch (844:3): [True: 132, False: 46.5k]
  ------------------
  845|    132|    if(arg != -1)
  ------------------
  |  Branch (845:8): [True: 132, False: 0]
  ------------------
  846|    132|      return setopt_set_timeout_sec(&s->dns_cache_timeout_ms, arg);
  847|      0|    s->dns_cache_timeout_ms = -1;
  848|      0|    break;
  849|     60|  case CURLOPT_MAXCONNECTS:
  ------------------
  |  Branch (849:3): [True: 60, False: 46.6k]
  ------------------
  850|     60|    result = value_range(&arg, 1, 1, INT_MAX);
  851|     60|    if(!result)
  ------------------
  |  Branch (851:8): [True: 59, False: 1]
  ------------------
  852|     59|      s->maxconnects = (uint32_t)arg;
  853|     60|    break;
  854|  15.3k|  case CURLOPT_SERVER_RESPONSE_TIMEOUT:
  ------------------
  |  Branch (854:3): [True: 15.3k, False: 31.3k]
  ------------------
  855|  15.3k|    return setopt_set_timeout_sec(&s->server_response_timeout, arg);
  856|     30|  case CURLOPT_SERVER_RESPONSE_TIMEOUT_MS:
  ------------------
  |  Branch (856:3): [True: 30, False: 46.6k]
  ------------------
  857|     30|    return setopt_set_timeout_ms(&s->server_response_timeout, arg);
  858|     65|  case CURLOPT_LOW_SPEED_LIMIT:
  ------------------
  |  Branch (858:3): [True: 65, False: 46.6k]
  ------------------
  859|     65|    if(arg < 0)
  ------------------
  |  Branch (859:8): [True: 0, False: 65]
  ------------------
  860|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  861|     65|    else
  862|     65|      s->low_speed_limit = arg;
  863|     65|    break;
  864|    104|  case CURLOPT_LOW_SPEED_TIME:
  ------------------
  |  Branch (864:3): [True: 104, False: 46.5k]
  ------------------
  865|    104|    result = value_range(&arg, 0, 0, USHRT_MAX);
  866|    104|    if(!result)
  ------------------
  |  Branch (866:8): [True: 104, False: 0]
  ------------------
  867|    104|      s->low_speed_time = (uint16_t)arg;
  868|    104|    break;
  869|    106|  case CURLOPT_PORT:
  ------------------
  |  Branch (869:3): [True: 106, False: 46.5k]
  ------------------
  870|    106|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (870:8): [True: 0, False: 106]
  |  Branch (870:21): [True: 29, False: 77]
  ------------------
  871|     29|      return CURLE_BAD_FUNCTION_ARGUMENT;
  872|     77|    s->use_port = (unsigned short)arg;
  873|     77|    break;
  874|      0|  case CURLOPT_TIMEOUT:
  ------------------
  |  Branch (874:3): [True: 0, False: 46.6k]
  ------------------
  875|      0|    return setopt_set_timeout_sec(&s->timeout, arg);
  876|  16.1k|  case CURLOPT_TIMEOUT_MS:
  ------------------
  |  Branch (876:3): [True: 16.1k, False: 30.5k]
  ------------------
  877|  16.1k|    return setopt_set_timeout_ms(&s->timeout, arg);
  878|    152|  case CURLOPT_CONNECTTIMEOUT:
  ------------------
  |  Branch (878:3): [True: 152, False: 46.5k]
  ------------------
  879|    152|    return setopt_set_timeout_sec(&s->connecttimeout, arg);
  880|    146|  case CURLOPT_CONNECTTIMEOUT_MS:
  ------------------
  |  Branch (880:3): [True: 146, False: 46.5k]
  ------------------
  881|    146|    return setopt_set_timeout_ms(&s->connecttimeout, arg);
  882|      0|#ifndef CURL_DISABLE_BINDLOCAL
  883|    121|  case CURLOPT_LOCALPORT:
  ------------------
  |  Branch (883:3): [True: 121, False: 46.5k]
  ------------------
  884|    121|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (884:8): [True: 0, False: 121]
  |  Branch (884:21): [True: 30, False: 91]
  ------------------
  885|     30|      return CURLE_BAD_FUNCTION_ARGUMENT;
  886|     91|    s->localport = curlx_sltous(arg);
  887|     91|    break;
  888|     59|  case CURLOPT_LOCALPORTRANGE:
  ------------------
  |  Branch (888:3): [True: 59, False: 46.6k]
  ------------------
  889|     59|    if((arg < 0) || (arg > 65535))
  ------------------
  |  Branch (889:8): [True: 0, False: 59]
  |  Branch (889:21): [True: 30, False: 29]
  ------------------
  890|     30|      return CURLE_BAD_FUNCTION_ARGUMENT;
  891|     29|    s->localportrange = curlx_sltous(arg);
  892|     29|    break;
  893|      0|#endif
  894|    488|  case CURLOPT_BUFFERSIZE:
  ------------------
  |  Branch (894:3): [True: 488, False: 46.1k]
  ------------------
  895|    488|    result = value_range(&arg, 0, READBUFFER_MIN, READBUFFER_MAX);
  ------------------
  |  |  116|    488|#define READBUFFER_MIN  1024
  ------------------
                  result = value_range(&arg, 0, READBUFFER_MIN, READBUFFER_MAX);
  ------------------
  |  |  115|    488|#define READBUFFER_MAX  CURL_MAX_READ_SIZE
  |  |  ------------------
  |  |  |  |  255|    488|#define CURL_MAX_READ_SIZE (10 * 1024 * 1024)
  |  |  ------------------
  ------------------
  896|    488|    if(!result)
  ------------------
  |  Branch (896:8): [True: 488, False: 0]
  ------------------
  897|    488|      s->buffer_size = (unsigned int)arg;
  898|    488|    break;
  899|    201|  case CURLOPT_UPLOAD_BUFFERSIZE:
  ------------------
  |  Branch (899:3): [True: 201, False: 46.4k]
  ------------------
  900|    201|    result = value_range(&arg, 0, UPLOADBUFFER_MIN, UPLOADBUFFER_MAX);
  ------------------
  |  |  128|    201|#define UPLOADBUFFER_MIN     CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|    201|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
                  result = value_range(&arg, 0, UPLOADBUFFER_MIN, UPLOADBUFFER_MAX);
  ------------------
  |  |  127|    201|#define UPLOADBUFFER_MAX     (2 * 1024 * 1024)
  ------------------
  901|    201|    if(!result)
  ------------------
  |  Branch (901:8): [True: 201, False: 0]
  ------------------
  902|    201|      s->upload_buffer_size = (unsigned int)arg;
  903|    201|    break;
  904|    118|  case CURLOPT_MAXFILESIZE:
  ------------------
  |  Branch (904:3): [True: 118, False: 46.5k]
  ------------------
  905|    118|    if(arg < 0)
  ------------------
  |  Branch (905:8): [True: 0, False: 118]
  ------------------
  906|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  907|    118|    else
  908|    118|      s->max_filesize = arg;
  909|    118|    break;
  910|     56|  case CURLOPT_IPRESOLVE:
  ------------------
  |  Branch (910:3): [True: 56, False: 46.6k]
  ------------------
  911|     56|    if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
  ------------------
  |  | 2303|     56|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
                  if((arg < CURL_IPRESOLVE_WHATEVER) || (arg > CURL_IPRESOLVE_V6))
  ------------------
  |  | 2306|     56|#define CURL_IPRESOLVE_V6       2L /* uses only IPv6 addresses/connections */
  ------------------
  |  Branch (911:8): [True: 0, False: 56]
  |  Branch (911:43): [True: 26, False: 30]
  ------------------
  912|     26|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  913|     30|    else
  914|     30|      s->ipver = (unsigned char)arg;
  915|     56|    break;
  916|     85|  case CURLOPT_CONNECT_ONLY:
  ------------------
  |  Branch (916:3): [True: 85, False: 46.5k]
  ------------------
  917|     85|    if(arg < 0 || arg > 2)
  ------------------
  |  Branch (917:8): [True: 0, False: 85]
  |  Branch (917:19): [True: 27, False: 58]
  ------------------
  918|     27|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  919|     58|    else {
  920|     58|      s->connect_only = !!arg;
  921|     58|      s->connect_only_ws = (arg == 2);
  922|     58|    }
  923|     85|    break;
  924|      0|#ifdef USE_IPV6
  925|    195|  case CURLOPT_ADDRESS_SCOPE:
  ------------------
  |  Branch (925:3): [True: 195, False: 46.4k]
  ------------------
  926|    195|#if SIZEOF_LONG > 4
  927|    195|    if((unsigned long)arg > UINT_MAX)
  ------------------
  |  Branch (927:8): [True: 0, False: 195]
  ------------------
  928|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  929|    195|    else
  930|    195|#endif
  931|    195|    s->scope_id = (unsigned int)arg;
  932|    195|    break;
  933|      0|#endif
  934|     94|  case CURLOPT_TCP_KEEPIDLE:
  ------------------
  |  Branch (934:3): [True: 94, False: 46.5k]
  ------------------
  935|     94|    result = value_range(&arg, 0, 0, INT_MAX);
  936|     94|    if(!result)
  ------------------
  |  Branch (936:8): [True: 94, False: 0]
  ------------------
  937|     94|      s->tcp_keepidle = (int)arg;
  938|     94|    break;
  939|     92|  case CURLOPT_TCP_KEEPINTVL:
  ------------------
  |  Branch (939:3): [True: 92, False: 46.5k]
  ------------------
  940|     92|    result = value_range(&arg, 0, 0, INT_MAX);
  941|     92|    if(!result)
  ------------------
  |  Branch (941:8): [True: 92, False: 0]
  ------------------
  942|     92|      s->tcp_keepintvl = (int)arg;
  943|     92|    break;
  944|     52|  case CURLOPT_TCP_KEEPCNT:
  ------------------
  |  Branch (944:3): [True: 52, False: 46.6k]
  ------------------
  945|     52|    result = value_range(&arg, 0, 0, INT_MAX);
  946|     52|    if(!result)
  ------------------
  |  Branch (946:8): [True: 52, False: 0]
  ------------------
  947|     52|      s->tcp_keepcnt = (int)arg;
  948|     52|    break;
  949|     32|  case CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS:
  ------------------
  |  Branch (949:3): [True: 32, False: 46.6k]
  ------------------
  950|     32|    return setopt_set_timeout_ms(&s->happy_eyeballs_timeout, arg);
  951|     30|  case CURLOPT_UPKEEP_INTERVAL_MS:
  ------------------
  |  Branch (951:3): [True: 30, False: 46.6k]
  ------------------
  952|     30|    return setopt_set_timeout_ms(&s->upkeep_interval_ms, arg);
  953|     52|  case CURLOPT_MAXAGE_CONN:
  ------------------
  |  Branch (953:3): [True: 52, False: 46.6k]
  ------------------
  954|     52|    return setopt_set_timeout_sec(&s->conn_max_idle_ms, arg);
  955|     64|  case CURLOPT_MAXLIFETIME_CONN:
  ------------------
  |  Branch (955:3): [True: 64, False: 46.6k]
  ------------------
  956|     64|    return setopt_set_timeout_sec(&s->conn_max_age_ms, arg);
  957|      0|  case CURLOPT_DNS_USE_GLOBAL_CACHE:
  ------------------
  |  Branch (957:3): [True: 0, False: 46.6k]
  ------------------
  958|       |    /* deprecated */
  959|      0|    break;
  960|  12.6k|  default:
  ------------------
  |  Branch (960:3): [True: 12.6k, False: 33.9k]
  ------------------
  961|  12.6k|    return CURLE_UNKNOWN_OPTION;
  962|  46.6k|  }
  963|  1.80k|  return result;
  964|  46.6k|}
setopt.c:setopt_set_timeout_sec:
   55|  15.7k|{
   56|  15.7k|  if(secs < 0)
  ------------------
  |  Branch (56:6): [True: 0, False: 15.7k]
  ------------------
   57|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   58|  15.7k|#if LONG_MAX > (TIMEDIFF_T_MAX / 1000)
   59|  15.7k|  if(secs > (TIMEDIFF_T_MAX / 1000)) {
  ------------------
  |  |   33|  15.7k|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|  15.7k|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
  |  Branch (59:6): [True: 0, False: 15.7k]
  ------------------
   60|      0|    *ptimeout_ms = TIMEDIFF_T_MAX;
  ------------------
  |  |   33|      0|#define TIMEDIFF_T_MAX CURL_OFF_T_MAX
  |  |  ------------------
  |  |  |  |  594|      0|#  define CURL_OFF_T_MAX 0x7FFFFFFFFFFFFFFF
  |  |  ------------------
  ------------------
   61|      0|    return CURLE_OK;
   62|      0|  }
   63|  15.7k|#endif
   64|  15.7k|  *ptimeout_ms = (timediff_t)secs * 1000;
   65|  15.7k|  return CURLE_OK;
   66|  15.7k|}
setopt.c:value_range:
  827|  1.75k|{
  828|  1.75k|  if(*value < below_error)
  ------------------
  |  Branch (828:6): [True: 1, False: 1.75k]
  ------------------
  829|      1|    return CURLE_BAD_FUNCTION_ARGUMENT;
  830|  1.75k|  else if(*value < min)
  ------------------
  |  Branch (830:11): [True: 446, False: 1.30k]
  ------------------
  831|    446|    *value = min;
  832|  1.30k|  else if(*value > max)
  ------------------
  |  Branch (832:11): [True: 574, False: 731]
  ------------------
  833|    574|    *value = max;
  834|  1.75k|  return CURLE_OK;
  835|  1.75k|}
setopt.c:setopt_set_timeout_ms:
   69|  16.3k|{
   70|  16.3k|  if(ms < 0)
  ------------------
  |  Branch (70:6): [True: 0, False: 16.3k]
  ------------------
   71|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   72|       |#if LONG_MAX > TIMEDIFF_T_MAX
   73|       |  if(ms > TIMEDIFF_T_MAX) {
   74|       |    *ptimeout_ms = TIMEDIFF_T_MAX;
   75|       |    return CURLE_OK;
   76|       |  }
   77|       |#endif
   78|  16.3k|  *ptimeout_ms = (timediff_t)ms;
   79|  16.3k|  return CURLE_OK;
   80|  16.3k|}
setopt.c:setopt_long_http:
 1076|  12.6k|{
 1077|  12.6k|#ifndef CURL_DISABLE_HTTP
 1078|  12.6k|  CURLcode result = CURLE_OK;
 1079|  12.6k|  struct UserDefined *s = &data->set;
 1080|       |
 1081|  12.6k|  switch(option) {
 1082|  1.73k|  case CURLOPT_FOLLOWLOCATION:
  ------------------
  |  Branch (1082:3): [True: 1.73k, False: 10.9k]
  ------------------
 1083|  1.73k|    if((unsigned long)arg > 3)
  ------------------
  |  Branch (1083:8): [True: 12, False: 1.72k]
  ------------------
 1084|     12|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1085|  1.72k|    else
 1086|  1.72k|      s->http_follow_mode = (unsigned char)arg;
 1087|  1.73k|    break;
 1088|    212|  case CURLOPT_MAXREDIRS:
  ------------------
  |  Branch (1088:3): [True: 212, False: 12.4k]
  ------------------
 1089|    212|    result = value_range(&arg, -1, -1, 0x7fff);
 1090|    212|    if(!result)
  ------------------
  |  Branch (1090:8): [True: 212, False: 0]
  ------------------
 1091|    212|      s->maxredirs = (short)arg;
 1092|    212|    break;
 1093|     55|  case CURLOPT_POSTREDIR:
  ------------------
  |  Branch (1093:3): [True: 55, False: 12.6k]
  ------------------
 1094|     55|    if(arg < CURL_REDIR_GET_ALL)
  ------------------
  |  | 2403|     55|#define CURL_REDIR_GET_ALL  0L
  ------------------
  |  Branch (1094:8): [True: 0, False: 55]
  ------------------
 1095|      0|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1096|     55|    else {
 1097|     55|      s->post301 = !!(arg & CURL_REDIR_POST_301);
  ------------------
  |  | 2404|     55|#define CURL_REDIR_POST_301 1L
  ------------------
 1098|     55|      s->post302 = !!(arg & CURL_REDIR_POST_302);
  ------------------
  |  | 2405|     55|#define CURL_REDIR_POST_302 2L
  ------------------
 1099|     55|      s->post303 = !!(arg & CURL_REDIR_POST_303);
  ------------------
  |  | 2406|     55|#define CURL_REDIR_POST_303 4L
  ------------------
 1100|     55|    }
 1101|     55|    break;
 1102|    165|  case CURLOPT_HEADEROPT:
  ------------------
  |  Branch (1102:3): [True: 165, False: 12.5k]
  ------------------
 1103|    165|    s->sep_headers = !!(arg & CURLHEADER_SEPARATE);
  ------------------
  |  | 1031|    165|#define CURLHEADER_SEPARATE (1L << 0)
  ------------------
 1104|    165|    break;
 1105|  1.12k|  case CURLOPT_HTTPAUTH:
  ------------------
  |  Branch (1105:3): [True: 1.12k, False: 11.5k]
  ------------------
 1106|  1.12k|    return httpauth(data, FALSE, (unsigned long)arg);
  ------------------
  |  | 1058|  1.12k|#define FALSE false
  ------------------
 1107|    799|  case CURLOPT_HTTP_VERSION:
  ------------------
  |  Branch (1107:3): [True: 799, False: 11.8k]
  ------------------
 1108|    799|    return setopt_HTTP_VERSION(data, arg);
 1109|    108|  case CURLOPT_EXPECT_100_TIMEOUT_MS:
  ------------------
  |  Branch (1109:3): [True: 108, False: 12.5k]
  ------------------
 1110|    108|    result = value_range(&arg, 0, 0, 0xffff);
 1111|    108|    if(!result)
  ------------------
  |  Branch (1111:8): [True: 108, False: 0]
  ------------------
 1112|    108|      s->expect_100_timeout = (unsigned short)arg;
 1113|    108|    break;
 1114|    353|  case CURLOPT_STREAM_WEIGHT:
  ------------------
  |  Branch (1114:3): [True: 353, False: 12.3k]
  ------------------
 1115|    353|#if defined(USE_HTTP2) || defined(USE_HTTP3)
 1116|    353|    if((arg >= 1) && (arg <= 256))
  ------------------
  |  Branch (1116:8): [True: 352, False: 1]
  |  Branch (1116:22): [True: 9, False: 343]
  ------------------
 1117|      9|      s->priority.weight = (int)arg;
 1118|    353|    break;
 1119|       |#else
 1120|       |    result = CURLE_NOT_BUILT_IN;
 1121|       |    break;
 1122|       |#endif
 1123|  8.13k|  default:
  ------------------
  |  Branch (1123:3): [True: 8.13k, False: 4.55k]
  ------------------
 1124|  8.13k|    return CURLE_UNKNOWN_OPTION;
 1125|  12.6k|  }
 1126|  2.63k|  return result;
 1127|       |#else
 1128|       |  (void)data;
 1129|       |  (void)option;
 1130|       |  (void)arg;
 1131|       |  return CURLE_UNKNOWN_OPTION;
 1132|       |#endif
 1133|  12.6k|}
setopt.c:httpauth:
  239|  1.25k|{
  240|  1.25k|  if(auth != CURLAUTH_NONE) {
  ------------------
  |  |  830|  1.25k|#define CURLAUTH_NONE         ((unsigned long)0)
  ------------------
  |  Branch (240:6): [True: 1.23k, False: 20]
  ------------------
  241|  1.23k|    int bitcheck = 0;
  242|  1.23k|    bool authbits = FALSE;
  ------------------
  |  | 1058|  1.23k|#define FALSE false
  ------------------
  243|  1.23k|    if(auth & CURLAUTH_DIGEST_IE) {
  ------------------
  |  |  839|  1.23k|#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
  ------------------
  |  Branch (243:8): [True: 326, False: 908]
  ------------------
  244|    326|      auth |= CURLAUTH_DIGEST; /* set standard digest bit */
  ------------------
  |  |  832|    326|#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
  ------------------
  245|    326|      auth &= ~CURLAUTH_DIGEST_IE; /* drop the legacy bit */
  ------------------
  |  |  839|    326|#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
  ------------------
  246|    326|    }
  247|       |
  248|       |    /* switch off bits we cannot support */
  249|  1.23k|#ifndef USE_NTLM
  250|  1.23k|    auth &= ~CURLAUTH_NTLM; /* no NTLM support */
  ------------------
  |  |  838|  1.23k|#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
  ------------------
  251|  1.23k|#endif
  252|  1.23k|#ifndef USE_SPNEGO
  253|  1.23k|    auth &= ~CURLAUTH_NEGOTIATE; /* no Negotiate (SPNEGO) auth without GSS-API
  ------------------
  |  |  833|  1.23k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  ------------------
  254|       |                                    or SSPI */
  255|  1.23k|#endif
  256|       |
  257|       |    /* check if any auth bit lower than CURLAUTH_ONLY is still set */
  258|  5.63k|    while(bitcheck < 31) {
  ------------------
  |  Branch (258:11): [True: 5.63k, False: 3]
  ------------------
  259|  5.63k|      if(auth & (1UL << bitcheck++)) {
  ------------------
  |  Branch (259:10): [True: 1.23k, False: 4.40k]
  ------------------
  260|  1.23k|        authbits = TRUE;
  ------------------
  |  | 1055|  1.23k|#define TRUE true
  ------------------
  261|  1.23k|        break;
  262|  1.23k|      }
  263|  5.63k|    }
  264|  1.23k|    if(!authbits)
  ------------------
  |  Branch (264:8): [True: 3, False: 1.23k]
  ------------------
  265|      3|      return CURLE_NOT_BUILT_IN; /* no supported types left! */
  266|  1.23k|  }
  267|  1.25k|  if(proxy)
  ------------------
  |  Branch (267:6): [True: 132, False: 1.11k]
  ------------------
  268|    132|    data->set.proxyauth = (uint32_t)auth;
  269|  1.11k|  else
  270|  1.11k|    data->set.httpauth = (uint32_t)auth;
  271|  1.25k|  return CURLE_OK;
  272|  1.25k|}
setopt.c:setopt_HTTP_VERSION:
  277|    799|{
  278|       |  /*
  279|       |   * This sets a requested HTTP version to be used. The value is one of
  280|       |   * the listed enums in curl/curl.h.
  281|       |   */
  282|    799|  switch(arg) {
  283|      2|  case CURL_HTTP_VERSION_NONE:
  ------------------
  |  | 2312|      2|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (283:3): [True: 2, False: 797]
  ------------------
  284|       |    /* accepted */
  285|      2|    break;
  286|      2|  case CURL_HTTP_VERSION_1_0:
  ------------------
  |  | 2315|      2|#define CURL_HTTP_VERSION_1_0   1L /* please use HTTP 1.0 in the request */
  ------------------
  |  Branch (286:3): [True: 2, False: 797]
  ------------------
  287|      3|  case CURL_HTTP_VERSION_1_1:
  ------------------
  |  | 2316|      3|#define CURL_HTTP_VERSION_1_1   2L /* please use HTTP 1.1 in the request */
  ------------------
  |  Branch (287:3): [True: 1, False: 798]
  ------------------
  288|       |    /* accepted */
  289|      3|    break;
  290|      0|#ifdef USE_HTTP2
  291|      1|  case CURL_HTTP_VERSION_2_0:
  ------------------
  |  | 2317|      1|#define CURL_HTTP_VERSION_2_0   3L /* please use HTTP 2 in the request */
  ------------------
  |  Branch (291:3): [True: 1, False: 798]
  ------------------
  292|    754|  case CURL_HTTP_VERSION_2TLS:
  ------------------
  |  | 2318|    754|#define CURL_HTTP_VERSION_2TLS  4L /* use version 2 for HTTPS, version 1.1 for
  ------------------
  |  Branch (292:3): [True: 753, False: 46]
  ------------------
  293|    756|  case CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:
  ------------------
  |  | 2320|    756|#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
  ------------------
  |  Branch (293:3): [True: 2, False: 797]
  ------------------
  294|       |    /* accepted */
  295|    756|    break;
  296|      0|#endif
  297|       |#ifdef USE_HTTP3
  298|       |  case CURL_HTTP_VERSION_3:
  299|       |  case CURL_HTTP_VERSION_3ONLY:
  300|       |    /* accepted */
  301|       |    break;
  302|       |#endif
  303|     38|  default:
  ------------------
  |  Branch (303:3): [True: 38, False: 761]
  ------------------
  304|       |    /* not accepted */
  305|     38|    if(arg < CURL_HTTP_VERSION_NONE)
  ------------------
  |  | 2312|     38|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  |  Branch (305:8): [True: 0, False: 38]
  ------------------
  306|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  307|     38|    return CURLE_UNSUPPORTED_PROTOCOL;
  308|    799|  }
  309|    761|  data->set.httpwant = (unsigned char)arg;
  310|    761|  return CURLE_OK;
  311|    799|}
setopt.c:setopt_long_proxy:
 1031|  8.13k|{
 1032|  8.13k|  struct UserDefined *s = &data->set;
 1033|       |
 1034|  8.13k|  switch(option) {
 1035|     60|  case CURLOPT_PROXYPORT:
  ------------------
  |  Branch (1035:3): [True: 60, False: 8.07k]
  ------------------
 1036|     60|    if((arg < 0) || (arg > UINT16_MAX))
  ------------------
  |  Branch (1036:8): [True: 0, False: 60]
  |  Branch (1036:21): [True: 25, False: 35]
  ------------------
 1037|     25|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1038|     35|    if(arg != s->proxyport)
  ------------------
  |  Branch (1038:8): [True: 33, False: 2]
  ------------------
 1039|     33|      changeproxy(data);
 1040|     35|    s->proxyport = (uint16_t)arg;
 1041|     35|    break;
 1042|    133|  case CURLOPT_PROXYAUTH:
  ------------------
  |  Branch (1042:3): [True: 133, False: 8.00k]
  ------------------
 1043|    133|    return httpauth(data, TRUE, (unsigned long)arg);
  ------------------
  |  | 1055|    133|#define TRUE true
  ------------------
 1044|  2.24k|  case CURLOPT_PROXYTYPE:
  ------------------
  |  Branch (1044:3): [True: 2.24k, False: 5.89k]
  ------------------
 1045|  2.24k|    if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_HTTPS3))
  ------------------
  |  |  790|  2.24k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
                  if((arg < CURLPROXY_HTTP) || (arg > CURLPROXY_HTTPS3))
  ------------------
  |  |  805|  2.24k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1045:8): [True: 0, False: 2.24k]
  |  Branch (1045:34): [True: 30, False: 2.21k]
  ------------------
 1046|     30|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1047|  2.21k|#ifndef USE_PROXY_HTTP3
 1048|  2.21k|    if(arg == CURLPROXY_HTTPS3)
  ------------------
  |  |  805|  2.21k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1048:8): [True: 0, False: 2.21k]
  ------------------
 1049|      0|      return CURLE_NOT_BUILT_IN;
 1050|  2.21k|#endif
 1051|  2.21k|    s->proxytype = (unsigned char)arg;
 1052|  2.21k|    break;
 1053|     13|  case CURLOPT_SOCKS5_AUTH:
  ------------------
  |  Branch (1053:3): [True: 13, False: 8.12k]
  ------------------
 1054|     13|    if(arg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  831|     13|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                  if(arg & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  837|     13|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     13|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (1054:8): [True: 11, False: 2]
  ------------------
 1055|     11|      return CURLE_NOT_BUILT_IN;
 1056|      2|    s->socks5auth = (unsigned char)arg;
 1057|      2|    break;
 1058|  5.69k|  default:
  ------------------
  |  Branch (1058:3): [True: 5.69k, False: 2.44k]
  ------------------
 1059|  5.69k|    return CURLE_UNKNOWN_OPTION;
 1060|  8.13k|  }
 1061|  2.24k|  return CURLE_OK;
 1062|  8.13k|}
setopt.c:changeproxy:
 1024|  3.22k|{
 1025|  3.22k|  Curl_auth_digest_cleanup(&data->state.proxydigest);
 1026|  3.22k|  memset(&data->state.authproxy, 0, sizeof(data->state.authproxy));
 1027|  3.22k|}
setopt.c:setopt_long_ssl:
  968|  5.69k|{
  969|  5.69k|#ifdef USE_SSL
  970|  5.69k|  CURLcode result = CURLE_OK;
  971|  5.69k|  struct UserDefined *s = &data->set;
  972|  5.69k|  switch(option) {
  973|     93|  case CURLOPT_CA_CACHE_TIMEOUT:
  ------------------
  |  Branch (973:3): [True: 93, False: 5.59k]
  ------------------
  974|     93|    if(Curl_ssl_supports(data, SSLSUPP_CA_CACHE)) {
  ------------------
  |  |   43|     93|#define SSLSUPP_CA_CACHE     (1 << 8)
  ------------------
  |  Branch (974:8): [True: 93, False: 0]
  ------------------
  975|     93|      result = value_range(&arg, -1, -1, INT_MAX);
  976|     93|      if(!result)
  ------------------
  |  Branch (976:10): [True: 93, False: 0]
  ------------------
  977|     93|        s->general_ssl.ca_cache_timeout = (int)arg;
  978|     93|    }
  979|      0|    else
  980|      0|      result = CURLE_NOT_BUILT_IN;
  981|     93|    break;
  982|     27|  case CURLOPT_SSLVERSION:
  ------------------
  |  Branch (982:3): [True: 27, False: 5.66k]
  ------------------
  983|     27|#ifndef CURL_DISABLE_PROXY
  984|     61|  case CURLOPT_PROXY_SSLVERSION:
  ------------------
  |  Branch (984:3): [True: 34, False: 5.65k]
  ------------------
  985|     61|#endif
  986|     61|    return Curl_setopt_SSLVERSION(data, option, arg);
  987|      1|  case CURLOPT_SSL_FALSESTART:
  ------------------
  |  Branch (987:3): [True: 1, False: 5.68k]
  ------------------
  988|      1|    result = CURLE_NOT_BUILT_IN;
  989|      1|    break;
  990|     47|  case CURLOPT_USE_SSL:
  ------------------
  |  Branch (990:3): [True: 47, False: 5.64k]
  ------------------
  991|     47|    if((arg < CURLUSESSL_NONE) || (arg >= CURLUSESSL_LAST))
  ------------------
  |  |  924|     47|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
  |  Branch (991:8): [True: 0, False: 47]
  |  Branch (991:35): [True: 30, False: 17]
  ------------------
  992|     30|      result = CURLE_BAD_FUNCTION_ARGUMENT;
  993|     17|    else
  994|     17|      s->use_ssl = (unsigned char)arg;
  995|     47|    break;
  996|    755|  case CURLOPT_SSL_OPTIONS:
  ------------------
  |  Branch (996:3): [True: 755, False: 4.93k]
  ------------------
  997|    755|    set_ssl_options(&s->ssl, &s->ssl.primary, arg);
  998|    755|    break;
  999|      0|#ifndef CURL_DISABLE_PROXY
 1000|      6|  case CURLOPT_PROXY_SSL_OPTIONS:
  ------------------
  |  Branch (1000:3): [True: 6, False: 5.68k]
  ------------------
 1001|      6|    set_ssl_options(&s->proxy_ssl, &s->proxy_ssl.primary, arg);
 1002|      6|    break;
 1003|      0|#endif
 1004|      0|  case CURLOPT_SSL_ENABLE_NPN:
  ------------------
  |  Branch (1004:3): [True: 0, False: 5.69k]
  ------------------
 1005|      0|    break;
 1006|      6|  case CURLOPT_SSLENGINE_DEFAULT:
  ------------------
  |  Branch (1006:3): [True: 6, False: 5.68k]
  ------------------
 1007|      6|    curlx_safefree(s->str[STRING_SSL_ENGINE]);
  ------------------
  |  | 1327|      6|  do {                      \
  |  | 1328|      6|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      6|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      6|    (ptr) = NULL;           \
  |  | 1330|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
 1008|      6|    result = Curl_ssl_set_engine_default(data);
 1009|      6|    break;
 1010|  4.72k|  default:
  ------------------
  |  Branch (1010:3): [True: 4.72k, False: 969]
  ------------------
 1011|  4.72k|    return CURLE_UNKNOWN_OPTION;
 1012|  5.69k|  }
 1013|    908|  return result;
 1014|       |#else  /* USE_SSL */
 1015|       |  (void)data;
 1016|       |  (void)option;
 1017|       |  (void)arg;
 1018|       |  return CURLE_UNKNOWN_OPTION;
 1019|       |#endif /* !USE_SSL */
 1020|  5.69k|}
setopt.c:set_ssl_options:
  406|    761|{
  407|    761|  config->ssl_options = (unsigned char)(arg & 0xff);
  408|    761|  ssl->enable_beast = !!(arg & CURLSSLOPT_ALLOW_BEAST);
  ------------------
  |  |  940|    761|#define CURLSSLOPT_ALLOW_BEAST (1L << 0)
  ------------------
  409|    761|  ssl->no_revoke = !!(arg & CURLSSLOPT_NO_REVOKE);
  ------------------
  |  |  944|    761|#define CURLSSLOPT_NO_REVOKE (1L << 1)
  ------------------
  410|    761|  ssl->no_partialchain = !!(arg & CURLSSLOPT_NO_PARTIALCHAIN);
  ------------------
  |  |  948|    761|#define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
  ------------------
  411|    761|  ssl->revoke_best_effort = !!(arg & CURLSSLOPT_REVOKE_BEST_EFFORT);
  ------------------
  |  |  953|    761|#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
  ------------------
  412|    761|  ssl->native_ca_store = !!(arg & CURLSSLOPT_NATIVE_CA);
  ------------------
  |  |  957|    761|#define CURLSSLOPT_NATIVE_CA (1L << 4)
  ------------------
  413|    761|  ssl->auto_client_cert = !!(arg & CURLSSLOPT_AUTO_CLIENT_CERT);
  ------------------
  |  |  961|    761|#define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
  ------------------
  414|    761|  ssl->earlydata = !!(arg & CURLSSLOPT_EARLYDATA);
  ------------------
  |  |  964|    761|#define CURLSSLOPT_EARLYDATA (1L << 6)
  ------------------
  415|    761|}
setopt.c:setopt_long_proto:
 1137|  4.72k|{
 1138|  4.72k|  CURLcode result = CURLE_OK;
 1139|  4.72k|  struct UserDefined *s = &data->set;
 1140|       |
 1141|  4.72k|  switch(option) {
 1142|      0|#ifndef CURL_DISABLE_TFTP
 1143|     59|  case CURLOPT_TFTP_BLKSIZE:
  ------------------
  |  Branch (1143:3): [True: 59, False: 4.66k]
  ------------------
 1144|     59|    result = value_range(&arg, 0, TFTP_BLKSIZE_MIN, TFTP_BLKSIZE_MAX);
  ------------------
  |  |   30|     59|#define TFTP_BLKSIZE_MIN 8
  ------------------
                  result = value_range(&arg, 0, TFTP_BLKSIZE_MIN, TFTP_BLKSIZE_MAX);
  ------------------
  |  |   31|     59|#define TFTP_BLKSIZE_MAX 65464
  ------------------
 1145|     59|    if(!result)
  ------------------
  |  Branch (1145:8): [True: 59, False: 0]
  ------------------
 1146|     59|      s->tftp_blksize = (unsigned short)arg;
 1147|     59|    break;
 1148|      0|#endif
 1149|      0|#ifndef CURL_DISABLE_NETRC
 1150|    220|  case CURLOPT_NETRC:
  ------------------
  |  Branch (1150:3): [True: 220, False: 4.50k]
  ------------------
 1151|    220|    if((arg < CURL_NETRC_IGNORED) || (arg >= CURL_NETRC_LAST))
  ------------------
  |  | 2355|    220|#define CURL_NETRC_IGNORED  0L /* The .netrc is never read.
  ------------------
  |  Branch (1151:8): [True: 0, False: 220]
  |  Branch (1151:38): [True: 34, False: 186]
  ------------------
 1152|     34|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1153|    186|    else
 1154|    186|      s->use_netrc = (unsigned char)arg;
 1155|    220|    break;
 1156|      0|#endif
 1157|      0|#ifndef CURL_DISABLE_FTP
 1158|     34|  case CURLOPT_FTP_FILEMETHOD:
  ------------------
  |  Branch (1158:3): [True: 34, False: 4.68k]
  ------------------
 1159|     34|    if((arg < CURLFTPMETHOD_DEFAULT) || (arg >= CURLFTPMETHOD_LAST))
  ------------------
  |  | 1019|     34|#define CURLFTPMETHOD_DEFAULT   0L /* let libcurl pick */
  ------------------
  |  Branch (1159:8): [True: 0, False: 34]
  |  Branch (1159:41): [True: 32, False: 2]
  ------------------
 1160|     32|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1161|      2|    else
 1162|      2|      s->ftp_filemethod = (unsigned char)arg;
 1163|     34|    break;
 1164|     33|  case CURLOPT_FTP_SSL_CCC:
  ------------------
  |  Branch (1164:3): [True: 33, False: 4.68k]
  ------------------
 1165|     33|    if((arg < CURLFTPSSL_CCC_NONE) || (arg >= CURLFTPSSL_CCC_LAST))
  ------------------
  |  |  989|     33|#define CURLFTPSSL_CCC_NONE    0L /* do not send CCC */
  ------------------
  |  Branch (1165:8): [True: 0, False: 33]
  |  Branch (1165:39): [True: 31, False: 2]
  ------------------
 1166|     31|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1167|      2|    else
 1168|      2|      s->ftp_ccc = (unsigned char)arg;
 1169|     33|    break;
 1170|     40|  case CURLOPT_FTPSSLAUTH:
  ------------------
  |  Branch (1170:3): [True: 40, False: 4.68k]
  ------------------
 1171|     40|    if((arg < CURLFTPAUTH_DEFAULT) || (arg >= CURLFTPAUTH_LAST))
  ------------------
  |  |  998|     40|#define CURLFTPAUTH_DEFAULT 0L /* let libcurl decide */
  ------------------
  |  Branch (1171:8): [True: 0, False: 40]
  |  Branch (1171:39): [True: 36, False: 4]
  ------------------
 1172|     36|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1173|      4|    else
 1174|      4|      s->ftpsslauth = (unsigned char)arg;
 1175|     40|    break;
 1176|     22|  case CURLOPT_ACCEPTTIMEOUT_MS:
  ------------------
  |  Branch (1176:3): [True: 22, False: 4.69k]
  ------------------
 1177|     22|    return setopt_set_timeout_ms(&s->accepttimeout, arg);
 1178|      0|#endif
 1179|      0|#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
 1180|     37|  case CURLOPT_FTP_CREATE_MISSING_DIRS:
  ------------------
  |  Branch (1180:3): [True: 37, False: 4.68k]
  ------------------
 1181|     37|    if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
  ------------------
  |  | 1007|     37|#define CURLFTP_CREATE_DIR_NONE  0L /* do NOT create missing dirs! */
  ------------------
                  if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
  ------------------
  |  | 1011|     37|#define CURLFTP_CREATE_DIR_RETRY 2L /* (FTP only) if CWD fails, try MKD and
  ------------------
  |  Branch (1181:8): [True: 0, False: 37]
  |  Branch (1181:43): [True: 35, False: 2]
  ------------------
 1182|     35|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1183|      2|    else
 1184|      2|      s->ftp_create_missing_dirs = (unsigned char)arg;
 1185|     37|    break;
 1186|     51|  case CURLOPT_NEW_FILE_PERMS:
  ------------------
  |  Branch (1186:3): [True: 51, False: 4.67k]
  ------------------
 1187|     51|    if((arg < 0) || (arg > 0777))
  ------------------
  |  Branch (1187:8): [True: 0, False: 51]
  |  Branch (1187:21): [True: 35, False: 16]
  ------------------
 1188|     35|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1189|     16|    else
 1190|     16|      s->new_file_perms = (unsigned int)arg;
 1191|     51|    break;
 1192|      0|#endif
 1193|      0|#ifndef CURL_DISABLE_RTSP
 1194|  2.27k|  case CURLOPT_RTSP_REQUEST:
  ------------------
  |  Branch (1194:3): [True: 2.27k, False: 2.44k]
  ------------------
 1195|  2.27k|    return setopt_RTSP_REQUEST(data, arg);
 1196|    106|  case CURLOPT_RTSP_CLIENT_CSEQ:
  ------------------
  |  Branch (1196:3): [True: 106, False: 4.61k]
  ------------------
 1197|    106|    result = value_range(&arg, 0, 0, INT_MAX);
 1198|    106|    if(!result)
  ------------------
  |  Branch (1198:8): [True: 106, False: 0]
  ------------------
 1199|    106|      data->state.rtsp_next_client_CSeq = (uint32_t)arg;
 1200|    106|    break;
 1201|     83|  case CURLOPT_RTSP_SERVER_CSEQ:
  ------------------
  |  Branch (1201:3): [True: 83, False: 4.63k]
  ------------------
 1202|     83|    result = value_range(&arg, 0, 0, INT_MAX);
 1203|     83|    if(!result)
  ------------------
  |  Branch (1203:8): [True: 83, False: 0]
  ------------------
 1204|     83|      data->state.rtsp_next_server_CSeq = (uint32_t)arg;
 1205|     83|    break;
 1206|      0|#endif
 1207|       |#ifdef USE_SSH
 1208|       |  case CURLOPT_SSH_AUTH_TYPES:
 1209|       |    s->ssh_auth_types = (uint32_t)arg;
 1210|       |    break;
 1211|       |  case CURLOPT_NEW_DIRECTORY_PERMS:
 1212|       |    if((arg < 0) || (arg > 0777))
 1213|       |      result = CURLE_BAD_FUNCTION_ARGUMENT;
 1214|       |    else
 1215|       |      s->new_directory_perms = (unsigned int)arg;
 1216|       |    break;
 1217|       |#endif
 1218|    751|  case CURLOPT_PROTOCOLS:
  ------------------
  |  Branch (1218:3): [True: 751, False: 3.97k]
  ------------------
 1219|    751|    s->allowed_protocols = (curl_prot_t)arg;
 1220|    751|    break;
 1221|      0|  case CURLOPT_REDIR_PROTOCOLS:
  ------------------
  |  Branch (1221:3): [True: 0, False: 4.72k]
  ------------------
 1222|      0|    s->redir_protocols = (curl_prot_t)arg;
 1223|      0|    break;
 1224|      0|#ifndef CURL_DISABLE_WEBSOCKETS
 1225|      8|  case CURLOPT_WS_OPTIONS:
  ------------------
  |  Branch (1225:3): [True: 8, False: 4.71k]
  ------------------
 1226|      8|    s->ws_raw_mode = (bool)(arg & CURLWS_RAW_MODE);
  ------------------
  |  |   89|      8|#define CURLWS_RAW_MODE   (1L << 0)
  ------------------
 1227|      8|    s->ws_no_auto_pong = (bool)(arg & CURLWS_NOAUTOPONG);
  ------------------
  |  |   90|      8|#define CURLWS_NOAUTOPONG (1L << 1)
  ------------------
 1228|      8|    break;
 1229|      0|#endif
 1230|    998|  default:
  ------------------
  |  Branch (1230:3): [True: 998, False: 3.72k]
  ------------------
 1231|    998|    return CURLE_UNKNOWN_OPTION;
 1232|  4.72k|  }
 1233|  1.42k|  return result;
 1234|  4.72k|}
setopt.c:setopt_RTSP_REQUEST:
  353|  2.27k|{
  354|       |  /*
  355|       |   * Set the RTSP request method (OPTIONS, SETUP, PLAY, etc...) Would this be
  356|       |   * better if the RTSPREQ_* were moved into here?
  357|       |   */
  358|  2.27k|  Curl_RtspReq rtspreq = RTSPREQ_NONE;
  359|  2.27k|  switch(arg) {
  360|      0|  case CURL_RTSPREQ_OPTIONS:
  ------------------
  |  | 2341|      0|#define CURL_RTSPREQ_OPTIONS       1L
  ------------------
  |  Branch (360:3): [True: 0, False: 2.27k]
  ------------------
  361|      0|    rtspreq = RTSPREQ_OPTIONS;
  362|      0|    break;
  363|  1.58k|  case CURL_RTSPREQ_DESCRIBE:
  ------------------
  |  | 2342|  1.58k|#define CURL_RTSPREQ_DESCRIBE      2L
  ------------------
  |  Branch (363:3): [True: 1.58k, False: 692]
  ------------------
  364|  1.58k|    rtspreq = RTSPREQ_DESCRIBE;
  365|  1.58k|    break;
  366|    250|  case CURL_RTSPREQ_ANNOUNCE:
  ------------------
  |  | 2343|    250|#define CURL_RTSPREQ_ANNOUNCE      3L
  ------------------
  |  Branch (366:3): [True: 250, False: 2.02k]
  ------------------
  367|    250|    rtspreq = RTSPREQ_ANNOUNCE;
  368|    250|    break;
  369|     13|  case CURL_RTSPREQ_SETUP:
  ------------------
  |  | 2344|     13|#define CURL_RTSPREQ_SETUP         4L
  ------------------
  |  Branch (369:3): [True: 13, False: 2.26k]
  ------------------
  370|     13|    rtspreq = RTSPREQ_SETUP;
  371|     13|    break;
  372|    164|  case CURL_RTSPREQ_PLAY:
  ------------------
  |  | 2345|    164|#define CURL_RTSPREQ_PLAY          5L
  ------------------
  |  Branch (372:3): [True: 164, False: 2.11k]
  ------------------
  373|    164|    rtspreq = RTSPREQ_PLAY;
  374|    164|    break;
  375|     31|  case CURL_RTSPREQ_PAUSE:
  ------------------
  |  | 2346|     31|#define CURL_RTSPREQ_PAUSE         6L
  ------------------
  |  Branch (375:3): [True: 31, False: 2.24k]
  ------------------
  376|     31|    rtspreq = RTSPREQ_PAUSE;
  377|     31|    break;
  378|     10|  case CURL_RTSPREQ_TEARDOWN:
  ------------------
  |  | 2347|     10|#define CURL_RTSPREQ_TEARDOWN      7L
  ------------------
  |  Branch (378:3): [True: 10, False: 2.26k]
  ------------------
  379|     10|    rtspreq = RTSPREQ_TEARDOWN;
  380|     10|    break;
  381|    120|  case CURL_RTSPREQ_GET_PARAMETER:
  ------------------
  |  | 2348|    120|#define CURL_RTSPREQ_GET_PARAMETER 8L
  ------------------
  |  Branch (381:3): [True: 120, False: 2.15k]
  ------------------
  382|    120|    rtspreq = RTSPREQ_GET_PARAMETER;
  383|    120|    break;
  384|     49|  case CURL_RTSPREQ_SET_PARAMETER:
  ------------------
  |  | 2349|     49|#define CURL_RTSPREQ_SET_PARAMETER 9L
  ------------------
  |  Branch (384:3): [True: 49, False: 2.23k]
  ------------------
  385|     49|    rtspreq = RTSPREQ_SET_PARAMETER;
  386|     49|    break;
  387|      8|  case CURL_RTSPREQ_RECORD:
  ------------------
  |  | 2350|      8|#define CURL_RTSPREQ_RECORD        10L
  ------------------
  |  Branch (387:3): [True: 8, False: 2.27k]
  ------------------
  388|      8|    rtspreq = RTSPREQ_RECORD;
  389|      8|    break;
  390|     19|  case CURL_RTSPREQ_RECEIVE:
  ------------------
  |  | 2351|     19|#define CURL_RTSPREQ_RECEIVE       11L
  ------------------
  |  Branch (390:3): [True: 19, False: 2.26k]
  ------------------
  391|     19|    rtspreq = RTSPREQ_RECEIVE;
  392|     19|    break;
  393|     28|  default:
  ------------------
  |  Branch (393:3): [True: 28, False: 2.25k]
  ------------------
  394|     28|    return CURLE_BAD_FUNCTION_ARGUMENT;
  395|  2.27k|  }
  396|       |
  397|  2.25k|  data->set.rtspreq = rtspreq;
  398|  2.25k|  return CURLE_OK;
  399|  2.27k|}
setopt.c:setopt_long_misc:
 1238|    998|{
 1239|    998|  struct UserDefined *s = &data->set;
 1240|       |
 1241|    998|  switch(option) {
 1242|     87|  case CURLOPT_TIMECONDITION:
  ------------------
  |  Branch (1242:3): [True: 87, False: 911]
  ------------------
 1243|     87|    if((arg < CURL_TIMECOND_NONE) || (arg >= CURL_TIMECOND_LAST))
  ------------------
  |  | 2410|     87|#define CURL_TIMECOND_NONE         0L
  ------------------
  |  Branch (1243:8): [True: 0, False: 87]
  |  Branch (1243:38): [True: 37, False: 50]
  ------------------
 1244|     37|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1245|     50|    s->timecondition = (unsigned char)arg;
 1246|     50|    break;
 1247|      5|  case CURLOPT_TIMEVALUE:
  ------------------
  |  Branch (1247:3): [True: 5, False: 993]
  ------------------
 1248|      5|    s->timevalue = (time_t)arg;
 1249|      5|    break;
 1250|    751|  case CURLOPT_POSTFIELDSIZE:
  ------------------
  |  Branch (1250:3): [True: 751, False: 247]
  ------------------
 1251|    751|    if(arg < -1)
  ------------------
  |  Branch (1251:8): [True: 0, False: 751]
  ------------------
 1252|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1253|    751|    if(s->postfieldsize < arg &&
  ------------------
  |  Branch (1253:8): [True: 751, False: 0]
  ------------------
 1254|    751|       s->postfields == s->str[STRING_COPYPOSTFIELDS]) {
  ------------------
  |  Branch (1254:8): [True: 0, False: 751]
  ------------------
 1255|      0|      curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1256|      0|      s->postfields = NULL;
 1257|      0|    }
 1258|    751|    s->postfieldsize = arg;
 1259|    751|    break;
 1260|      0|  case CURLOPT_INFILESIZE:
  ------------------
  |  Branch (1260:3): [True: 0, False: 998]
  ------------------
 1261|      0|    if(arg < -1)
  ------------------
  |  Branch (1261:8): [True: 0, False: 0]
  ------------------
 1262|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1263|      0|    s->filesize = arg;
 1264|      0|    break;
 1265|     98|  case CURLOPT_RESUME_FROM:
  ------------------
  |  Branch (1265:3): [True: 98, False: 900]
  ------------------
 1266|     98|    if(arg < -1)
  ------------------
  |  Branch (1266:8): [True: 0, False: 98]
  ------------------
 1267|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1268|     98|    s->set_resume_from = arg;
 1269|     98|    break;
 1270|      0|  case CURLOPT_UPLOAD_FLAGS:
  ------------------
  |  Branch (1270:3): [True: 0, False: 998]
  ------------------
 1271|      0|    s->upload_flags = (unsigned char)arg;
 1272|      0|    break;
 1273|      0|#ifndef CURL_DISABLE_MIME
 1274|      5|  case CURLOPT_MIME_OPTIONS:
  ------------------
  |  Branch (1274:3): [True: 5, False: 993]
  ------------------
 1275|      5|    s->mime_formescape = !!(arg & CURLMIMEOPT_FORMESCAPE);
  ------------------
  |  | 2435|      5|#define CURLMIMEOPT_FORMESCAPE (1L << 0) /* Use backslash-escaping for forms */
  ------------------
 1276|      5|    break;
 1277|      0|#endif
 1278|      0|#ifndef CURL_DISABLE_HSTS
 1279|      6|  case CURLOPT_HSTS_CTRL:
  ------------------
  |  Branch (1279:3): [True: 6, False: 992]
  ------------------
 1280|      6|    if(arg & CURLHSTS_ENABLE) {
  ------------------
  |  | 1073|      6|#define CURLHSTS_ENABLE       (1L << 0)
  ------------------
  |  Branch (1280:8): [True: 4, False: 2]
  ------------------
 1281|      4|      if(!data->hsts) {
  ------------------
  |  Branch (1281:10): [True: 4, False: 0]
  ------------------
 1282|      4|        data->hsts = Curl_hsts_init();
 1283|      4|        if(!data->hsts)
  ------------------
  |  Branch (1283:12): [True: 0, False: 4]
  ------------------
 1284|      0|          return CURLE_OUT_OF_MEMORY;
 1285|      4|      }
 1286|      4|    }
 1287|      2|    else if(!data->share || !data->share->hsts) {
  ------------------
  |  Branch (1287:13): [True: 2, False: 0]
  |  Branch (1287:29): [True: 0, False: 0]
  ------------------
 1288|       |      /* throw away the HSTS cache unless shared */
 1289|      2|      Curl_hsts_cleanup(&data->hsts);
 1290|       |      /* flush all the entries */
 1291|      2|      curl_slist_free_all(data->state.hstslist);
 1292|      2|      data->state.hstslist = NULL;
 1293|      2|    }
 1294|      0|    else
 1295|       |      /* detach from shared HSTS cache without freeing it */
 1296|      0|      data->hsts = NULL;
 1297|      6|    break;
 1298|      6|#endif
 1299|      6|#ifndef CURL_DISABLE_ALTSVC
 1300|     38|  case CURLOPT_ALTSVC_CTRL:
  ------------------
  |  Branch (1300:3): [True: 38, False: 960]
  ------------------
 1301|     38|    return Curl_altsvc_ctrl(data, arg);
 1302|      0|#endif
 1303|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1304|       |  case CURLOPT_GSSAPI_DELEGATION:
 1305|       |    s->gssapi_delegation = (unsigned char)arg &
 1306|       |      (CURLGSSAPI_DELEGATION_POLICY_FLAG | CURLGSSAPI_DELEGATION_FLAG);
 1307|       |    break;
 1308|       |#endif
 1309|      8|  default:
  ------------------
  |  Branch (1309:3): [True: 8, False: 990]
  ------------------
 1310|      8|    return CURLE_UNKNOWN_OPTION;
 1311|    998|  }
 1312|    915|  return CURLE_OK;
 1313|    998|}
setopt.c:setopt_slist:
 1341|  17.1k|{
 1342|  17.1k|  CURLcode result = CURLE_OK;
 1343|  17.1k|  struct UserDefined *s = &data->set;
 1344|  17.1k|  switch(option) {
 1345|      0|#ifndef CURL_DISABLE_PROXY
 1346|      0|  case CURLOPT_PROXYHEADER:
  ------------------
  |  Branch (1346:3): [True: 0, False: 17.1k]
  ------------------
 1347|       |    /*
 1348|       |     * Set a list with proxy headers to use (or replace internals with)
 1349|       |     *
 1350|       |     * Since CURLOPT_HTTPHEADER was the only way to set HTTP headers for a
 1351|       |     * long time we remain doing it this way until CURLOPT_PROXYHEADER is
 1352|       |     * used. As soon as this option has been used, if set to anything but
 1353|       |     * NULL, custom headers for proxies are only picked from this list.
 1354|       |     *
 1355|       |     * Set this option to NULL to restore the previous behavior.
 1356|       |     */
 1357|      0|    s->proxyheaders = slist;
 1358|      0|    break;
 1359|      0|#endif
 1360|      0|#ifndef CURL_DISABLE_HTTP
 1361|      0|  case CURLOPT_HTTP200ALIASES:
  ------------------
  |  Branch (1361:3): [True: 0, False: 17.1k]
  ------------------
 1362|       |    /*
 1363|       |     * Set a list of aliases for HTTP 200 in response header
 1364|       |     */
 1365|      0|    s->http200aliases = slist;
 1366|      0|    break;
 1367|      0|#endif
 1368|      0|#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
 1369|      0|  case CURLOPT_POSTQUOTE:
  ------------------
  |  Branch (1369:3): [True: 0, False: 17.1k]
  ------------------
 1370|       |    /*
 1371|       |     * List of RAW FTP commands to use after a transfer
 1372|       |     */
 1373|      0|    s->postquote = slist;
 1374|      0|    break;
 1375|      0|  case CURLOPT_PREQUOTE:
  ------------------
  |  Branch (1375:3): [True: 0, False: 17.1k]
  ------------------
 1376|       |    /*
 1377|       |     * List of RAW FTP commands to use prior to RETR (Wesley Laxton)
 1378|       |     */
 1379|      0|    s->prequote = slist;
 1380|      0|    break;
 1381|      0|  case CURLOPT_QUOTE:
  ------------------
  |  Branch (1381:3): [True: 0, False: 17.1k]
  ------------------
 1382|       |    /*
 1383|       |     * List of RAW FTP commands to use before a transfer
 1384|       |     */
 1385|      0|    s->quote = slist;
 1386|      0|    break;
 1387|      0|#endif
 1388|      0|  case CURLOPT_RESOLVE:
  ------------------
  |  Branch (1388:3): [True: 0, False: 17.1k]
  ------------------
 1389|       |    /*
 1390|       |     * List of HOST:PORT:[addresses] strings to populate the DNS cache with
 1391|       |     * Entries added this way will remain in the cache until explicitly
 1392|       |     * removed or the handle is cleaned up.
 1393|       |     *
 1394|       |     * Prefix the HOST with plus sign (+) to have the entry expire like
 1395|       |     * automatically added entries.
 1396|       |     *
 1397|       |     * Prefix the HOST with dash (-) to _remove_ the entry from the cache.
 1398|       |     *
 1399|       |     * This API can remove any entry from the DNS cache, but only entries
 1400|       |     * that are not actually in use right now will be pruned immediately.
 1401|       |     */
 1402|      0|    s->resolve = slist;
 1403|      0|    data->state.resolve = s->resolve;
 1404|      0|    break;
 1405|      0|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_MIME)
 1406|  1.71k|  case CURLOPT_HTTPHEADER:
  ------------------
  |  Branch (1406:3): [True: 1.71k, False: 15.3k]
  ------------------
 1407|       |    /*
 1408|       |     * Set a list with HTTP headers to use (or replace internals with)
 1409|       |     */
 1410|  1.71k|    s->headers = slist;
 1411|  1.71k|    break;
 1412|      0|#endif
 1413|      0|#ifndef CURL_DISABLE_TELNET
 1414|      0|  case CURLOPT_TELNETOPTIONS:
  ------------------
  |  Branch (1414:3): [True: 0, False: 17.1k]
  ------------------
 1415|       |    /*
 1416|       |     * Set a linked list of telnet options
 1417|       |     */
 1418|      0|    s->telnet_options = slist;
 1419|      0|    break;
 1420|      0|#endif
 1421|      0|#ifndef CURL_DISABLE_SMTP
 1422|     46|  case CURLOPT_MAIL_RCPT:
  ------------------
  |  Branch (1422:3): [True: 46, False: 17.0k]
  ------------------
 1423|       |    /* Set the list of mail recipients */
 1424|     46|    s->mail_rcpt = slist;
 1425|     46|    break;
 1426|      0|#endif
 1427|  15.3k|  case CURLOPT_CONNECT_TO:
  ------------------
  |  Branch (1427:3): [True: 15.3k, False: 1.76k]
  ------------------
 1428|  15.3k|    s->connect_to = slist;
 1429|  15.3k|    break;
 1430|      0|  default:
  ------------------
  |  Branch (1430:3): [True: 0, False: 17.1k]
  ------------------
 1431|      0|    return CURLE_UNKNOWN_OPTION;
 1432|  17.1k|  }
 1433|  17.1k|  return result;
 1434|  17.1k|}
setopt.c:setopt_pointers:
 1471|  1.32k|{
 1472|  1.32k|  CURLcode result = CURLE_OK;
 1473|  1.32k|  struct UserDefined *s = &data->set;
 1474|  1.32k|  switch(option) {
 1475|      0|  case CURLOPT_CURLU:
  ------------------
  |  Branch (1475:3): [True: 0, False: 1.32k]
  ------------------
 1476|       |    /*
 1477|       |     * pass CURLU to set URL
 1478|       |     */
 1479|      0|    Curl_bufref_free(&data->state.url);
 1480|      0|    curlx_safefree(s->str[STRING_SET_URL]);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1481|      0|    s->uh = va_arg(param, CURLU *);
 1482|      0|    break;
 1483|      0|#ifndef CURL_DISABLE_HTTP
 1484|      0|#ifndef CURL_DISABLE_FORM_API
 1485|    241|  case CURLOPT_HTTPPOST:
  ------------------
  |  Branch (1485:3): [True: 241, False: 1.08k]
  ------------------
 1486|       |    /*
 1487|       |     * Set to make us do HTTP POST. Legacy API-style.
 1488|       |     */
 1489|    241|    s->httppost = va_arg(param, struct curl_httppost *);
 1490|    241|    s->method = HTTPREQ_POST_FORM;
 1491|    241|    s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1058|    241|#define FALSE false
  ------------------
 1492|    241|    Curl_mime_cleanpart(data->state.formp);
 1493|    241|    curlx_safefree(data->state.formp);
  ------------------
  |  | 1327|    241|  do {                      \
  |  | 1328|    241|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    241|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    241|    (ptr) = NULL;           \
  |  | 1330|    241|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 241]
  |  |  ------------------
  ------------------
 1494|    241|    data->state.mimepost = NULL;
 1495|    241|    break;
 1496|      0|#endif /* !CURL_DISABLE_FORM_API */
 1497|      0|#endif /* !CURL_DISABLE_HTTP */
 1498|      0|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) ||       \
 1499|      0|  !defined(CURL_DISABLE_IMAP)
 1500|      0|#ifndef CURL_DISABLE_MIME
 1501|    334|  case CURLOPT_MIMEPOST:
  ------------------
  |  Branch (1501:3): [True: 334, False: 992]
  ------------------
 1502|    334|    result = setopt_mimepost(data, va_arg(param, curl_mime *));
 1503|    334|    break;
 1504|      0|#endif /* !CURL_DISABLE_MIME */
 1505|      0|#endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */
 1506|      0|  case CURLOPT_STDERR:
  ------------------
  |  Branch (1506:3): [True: 0, False: 1.32k]
  ------------------
 1507|       |    /*
 1508|       |     * Set to a FILE * that should receive all error writes. This
 1509|       |     * defaults to stderr for normal operations.
 1510|       |     */
 1511|      0|    s->err = va_arg(param, FILE *);
 1512|      0|    if(!s->err)
  ------------------
  |  Branch (1512:8): [True: 0, False: 0]
  ------------------
 1513|      0|      s->err = stderr;
 1514|      0|    break;
 1515|    751|  case CURLOPT_SHARE: {
  ------------------
  |  Branch (1515:3): [True: 751, False: 575]
  ------------------
 1516|    751|    struct Curl_share *set = va_arg(param, struct Curl_share *);
 1517|       |
 1518|       |    /* disconnect from old share, if any and possible */
 1519|    751|    result = Curl_share_easy_unlink(data);
 1520|    751|    if(result)
  ------------------
  |  Branch (1520:8): [True: 0, False: 751]
  ------------------
 1521|      0|      return result;
 1522|       |
 1523|       |    /* use new share if it set */
 1524|    751|    if(GOOD_SHARE_HANDLE(set)) {
  ------------------
  |  |   38|    751|#define GOOD_SHARE_HANDLE(x) ((x) && (x)->magic == CURL_GOOD_SHARE)
  |  |  ------------------
  |  |  |  |   37|      0|#define CURL_GOOD_SHARE 0x7e117a1e
  |  |  ------------------
  |  |  |  Branch (38:31): [True: 0, False: 751]
  |  |  |  Branch (38:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1525|      0|      result = Curl_share_easy_link(data, set);
 1526|      0|      if(result)
  ------------------
  |  Branch (1526:10): [True: 0, False: 0]
  ------------------
 1527|      0|        return result;
 1528|      0|    }
 1529|    751|    break;
 1530|    751|  }
 1531|       |
 1532|    751|#ifdef USE_HTTP2
 1533|    751|  case CURLOPT_STREAM_DEPENDS:
  ------------------
  |  Branch (1533:3): [True: 0, False: 1.32k]
  ------------------
 1534|      0|  case CURLOPT_STREAM_DEPENDS_E:
  ------------------
  |  Branch (1534:3): [True: 0, False: 1.32k]
  ------------------
 1535|       |    /* not doing stream dependencies any longer, but accept options
 1536|       |     * for backward compatibility */
 1537|      0|    break;
 1538|      0|#endif
 1539|       |
 1540|      0|  default:
  ------------------
  |  Branch (1540:3): [True: 0, False: 1.32k]
  ------------------
 1541|      0|    return CURLE_UNKNOWN_OPTION;
 1542|  1.32k|  }
 1543|  1.32k|  return result;
 1544|  1.32k|}
setopt.c:setopt_mimepost:
 1440|    334|{
 1441|       |  /*
 1442|       |   * Set to make us do MIME POST
 1443|       |   */
 1444|    334|  CURLcode result;
 1445|    334|  struct UserDefined *s = &data->set;
 1446|    334|  if(!s->mimepostp) {
  ------------------
  |  Branch (1446:6): [True: 334, False: 0]
  ------------------
 1447|    334|    s->mimepostp = curlx_malloc(sizeof(*s->mimepostp));
  ------------------
  |  | 1478|    334|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
 1448|    334|    if(!s->mimepostp)
  ------------------
  |  Branch (1448:8): [True: 0, False: 334]
  ------------------
 1449|      0|      return CURLE_OUT_OF_MEMORY;
 1450|    334|    Curl_mime_initpart(s->mimepostp);
 1451|    334|  }
 1452|       |
 1453|    334|  result = Curl_mime_set_subparts(s->mimepostp, mimep, FALSE);
  ------------------
  |  | 1058|    334|#define FALSE false
  ------------------
 1454|    334|  if(!result) {
  ------------------
  |  Branch (1454:6): [True: 334, False: 0]
  ------------------
 1455|    334|    s->method = HTTPREQ_POST_MIME;
 1456|    334|    s->opt_no_body = FALSE; /* this is implied */
  ------------------
  |  | 1058|    334|#define FALSE false
  ------------------
 1457|    334|#ifndef CURL_DISABLE_FORM_API
 1458|    334|    Curl_mime_cleanpart(data->state.formp);
 1459|    334|    curlx_safefree(data->state.formp);
  ------------------
  |  | 1327|    334|  do {                      \
  |  | 1328|    334|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    334|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    334|    (ptr) = NULL;           \
  |  | 1330|    334|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 334]
  |  |  ------------------
  ------------------
 1460|       |    data->state.mimepost = NULL;
 1461|    334|#endif
 1462|    334|  }
 1463|    334|  return result;
 1464|    334|}
setopt.c:setopt_cptr:
 1903|   187k|{
 1904|   187k|  CURLcode result;
 1905|   187k|  struct UserDefined *s = &data->set;
 1906|   187k|#ifndef CURL_DISABLE_PROXY
 1907|   187k|  result = setopt_cptr_proxy(data, option, ptr);
 1908|   187k|  if(result != CURLE_UNKNOWN_OPTION)
  ------------------
  |  Branch (1908:6): [True: 6.34k, False: 181k]
  ------------------
 1909|  6.34k|    return result;
 1910|   181k|#endif
 1911|   181k|  result = CURLE_OK;
 1912|       |
 1913|   181k|  switch(option) {
 1914|    764|  case CURLOPT_CAINFO:
  ------------------
  |  Branch (1914:3): [True: 764, False: 180k]
  ------------------
 1915|       |    /*
 1916|       |     * Set CA info for SSL connection. Specify filename of the CA certificate
 1917|       |     */
 1918|    764|    s->ssl.custom_cafile = TRUE;
  ------------------
  |  | 1055|    764|#define TRUE true
  ------------------
 1919|    764|    return Curl_setstropt(&s->str[STRING_SSL_CAFILE], ptr);
 1920|    764|  case CURLOPT_CAPATH:
  ------------------
  |  Branch (1920:3): [True: 764, False: 180k]
  ------------------
 1921|       |    /*
 1922|       |     * Set CA path info for SSL connection. Specify directory name of the CA
 1923|       |     * certificates which have been prepared using openssl c_rehash utility.
 1924|       |     */
 1925|    764|#ifdef USE_SSL
 1926|    764|    if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) {
  ------------------
  |  |   35|    764|#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
  ------------------
  |  Branch (1926:8): [True: 764, False: 0]
  ------------------
 1927|       |      /* This does not work on Windows. */
 1928|    764|      s->ssl.custom_capath = TRUE;
  ------------------
  |  | 1055|    764|#define TRUE true
  ------------------
 1929|    764|      return Curl_setstropt(&s->str[STRING_SSL_CAPATH], ptr);
 1930|    764|    }
 1931|      0|#endif
 1932|      0|    return CURLE_NOT_BUILT_IN;
 1933|  16.1k|  case CURLOPT_CRLFILE:
  ------------------
  |  Branch (1933:3): [True: 16.1k, False: 165k]
  ------------------
 1934|       |    /*
 1935|       |     * Set CRL file info for SSL connection. Specify filename of the CRL
 1936|       |     * to check certificates revocation
 1937|       |     */
 1938|  16.1k|    if(Curl_ssl_supports(data, SSLSUPP_CRLFILE))
  ------------------
  |  |   48|  16.1k|#define SSLSUPP_CRLFILE      (1 << 13) /* supports CURLOPT_CRLFILE */
  ------------------
  |  Branch (1938:8): [True: 16.1k, False: 0]
  ------------------
 1939|  16.1k|      return Curl_setstropt(&s->str[STRING_SSL_CRLFILE], ptr);
 1940|      0|    return CURLE_NOT_BUILT_IN;
 1941|     30|  case CURLOPT_SSL_CIPHER_LIST:
  ------------------
  |  Branch (1941:3): [True: 30, False: 181k]
  ------------------
 1942|     30|    if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST))
  ------------------
  |  |   44|     30|#define SSLSUPP_CIPHER_LIST  (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */
  ------------------
  |  Branch (1942:8): [True: 30, False: 0]
  ------------------
 1943|       |      /* set a list of cipher we want to use in the SSL connection */
 1944|     30|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER_LIST], ptr);
 1945|      0|    else
 1946|      0|      return CURLE_NOT_BUILT_IN;
 1947|     14|  case CURLOPT_TLS13_CIPHERS:
  ------------------
  |  Branch (1947:3): [True: 14, False: 181k]
  ------------------
 1948|     14|    if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES)) {
  ------------------
  |  |   40|     14|#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
  ------------------
  |  Branch (1948:8): [True: 14, False: 0]
  ------------------
 1949|       |      /* set preferred list of TLS 1.3 cipher suites */
 1950|     14|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER13_LIST], ptr);
 1951|     14|    }
 1952|      0|    else
 1953|      0|      return CURLE_NOT_BUILT_IN;
 1954|      0|  case CURLOPT_RANDOM_FILE:
  ------------------
  |  Branch (1954:3): [True: 0, False: 181k]
  ------------------
 1955|      0|    break;
 1956|      0|  case CURLOPT_EGDSOCKET:
  ------------------
  |  Branch (1956:3): [True: 0, False: 181k]
  ------------------
 1957|      0|    break;
 1958|      2|  case CURLOPT_REQUEST_TARGET:
  ------------------
  |  Branch (1958:3): [True: 2, False: 181k]
  ------------------
 1959|      2|    return Curl_setstropt(&s->str[STRING_TARGET], ptr);
 1960|      0|#ifndef CURL_DISABLE_NETRC
 1961|  15.3k|  case CURLOPT_NETRC_FILE:
  ------------------
  |  Branch (1961:3): [True: 15.3k, False: 166k]
  ------------------
 1962|       |    /*
 1963|       |     * Use this file instead of the $HOME/.netrc file
 1964|       |     */
 1965|  15.3k|    return Curl_setstropt(&s->str[STRING_NETRC_FILE], ptr);
 1966|      0|#endif
 1967|       |
 1968|      0|#if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_MQTT)
 1969|      0|  case CURLOPT_COPYPOSTFIELDS:
  ------------------
  |  Branch (1969:3): [True: 0, False: 181k]
  ------------------
 1970|      0|    return setopt_copypostfields(ptr, s);
 1971|       |
 1972|  1.06k|  case CURLOPT_POSTFIELDS:
  ------------------
  |  Branch (1972:3): [True: 1.06k, False: 180k]
  ------------------
 1973|       |    /*
 1974|       |     * Like above, but use static data instead of copying it.
 1975|       |     */
 1976|  1.06k|    s->postfields = ptr;
 1977|       |    /* Release old copied data. */
 1978|  1.06k|    curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1327|  1.06k|  do {                      \
  |  | 1328|  1.06k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.06k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.06k|    (ptr) = NULL;           \
  |  | 1330|  1.06k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.06k]
  |  |  ------------------
  ------------------
 1979|  1.06k|    s->method = HTTPREQ_POST;
 1980|  1.06k|    break;
 1981|      0|#endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_MQTT */
 1982|       |
 1983|      0|#ifndef CURL_DISABLE_HTTP
 1984|      0|  case CURLOPT_TRAILERDATA:
  ------------------
  |  Branch (1984:3): [True: 0, False: 181k]
  ------------------
 1985|      0|    s->trailer_data = ptr;
 1986|      0|    break;
 1987|  1.48k|  case CURLOPT_ACCEPT_ENCODING:
  ------------------
  |  Branch (1987:3): [True: 1.48k, False: 180k]
  ------------------
 1988|       |    /*
 1989|       |     * String to use at the value of Accept-Encoding header.
 1990|       |     *
 1991|       |     * If the encoding is set to "" we use an Accept-Encoding header that
 1992|       |     * encompasses all the encodings we support.
 1993|       |     * If the encoding is set to NULL we do not send an Accept-Encoding header
 1994|       |     * and ignore an received Content-Encoding header.
 1995|       |     *
 1996|       |     */
 1997|  1.48k|    if(ptr && !*ptr) {
  ------------------
  |  Branch (1997:8): [True: 1.48k, False: 0]
  |  Branch (1997:15): [True: 337, False: 1.14k]
  ------------------
 1998|    337|      ptr = Curl_get_content_encodings();
 1999|    337|      if(ptr) {
  ------------------
  |  Branch (1999:10): [True: 337, False: 0]
  ------------------
 2000|    337|        curlx_free(s->str[STRING_ENCODING]);
  ------------------
  |  | 1483|    337|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2001|    337|        s->str[STRING_ENCODING] = ptr;
 2002|    337|      }
 2003|      0|      else
 2004|      0|        result = CURLE_OUT_OF_MEMORY;
 2005|    337|      return result;
 2006|    337|    }
 2007|  1.14k|    return Curl_setstropt(&s->str[STRING_ENCODING], ptr);
 2008|       |
 2009|      0|#ifndef CURL_DISABLE_AWS
 2010|    670|  case CURLOPT_AWS_SIGV4:
  ------------------
  |  Branch (2010:3): [True: 670, False: 180k]
  ------------------
 2011|       |    /*
 2012|       |     * String that is merged to some authentication
 2013|       |     * parameters are used by the algorithm.
 2014|       |     */
 2015|    670|    result = Curl_setstropt(&s->str[STRING_AWS_SIGV4], ptr);
 2016|       |    /*
 2017|       |     * Basic been set by default it need to be unset here
 2018|       |     */
 2019|    670|    if(s->str[STRING_AWS_SIGV4])
  ------------------
  |  Branch (2019:8): [True: 670, False: 0]
  ------------------
 2020|    670|      s->httpauth = CURLAUTH_AWS_SIGV4;
  ------------------
  |  |  845|    670|#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
  ------------------
 2021|    670|    break;
 2022|      0|#endif
 2023|     29|  case CURLOPT_REFERER:
  ------------------
  |  Branch (2023:3): [True: 29, False: 181k]
  ------------------
 2024|       |    /*
 2025|       |     * String to set in the HTTP Referer: field.
 2026|       |     */
 2027|     29|    result = Curl_setstropt(&s->str[STRING_SET_REFERER], ptr);
 2028|     29|    break;
 2029|       |
 2030|    130|  case CURLOPT_USERAGENT:
  ------------------
  |  Branch (2030:3): [True: 130, False: 181k]
  ------------------
 2031|       |    /*
 2032|       |     * String to use in the HTTP User-Agent field
 2033|       |     */
 2034|    130|    return Curl_setstropt(&s->str[STRING_USERAGENT], ptr);
 2035|       |
 2036|      0|#ifndef CURL_DISABLE_COOKIES
 2037|     12|  case CURLOPT_COOKIE:
  ------------------
  |  Branch (2037:3): [True: 12, False: 181k]
  ------------------
 2038|       |    /*
 2039|       |     * Cookie string to send to the remote server in the request.
 2040|       |     */
 2041|     12|    return Curl_setstropt(&s->str[STRING_COOKIE], ptr);
 2042|       |
 2043|  15.3k|  case CURLOPT_COOKIEFILE:
  ------------------
  |  Branch (2043:3): [True: 15.3k, False: 166k]
  ------------------
 2044|  15.3k|    return cookiefile(data, ptr);
 2045|       |
 2046|  15.3k|  case CURLOPT_COOKIEJAR:
  ------------------
  |  Branch (2046:3): [True: 15.3k, False: 166k]
  ------------------
 2047|       |    /*
 2048|       |     * Set cookie filename to dump all cookies to when we are done.
 2049|       |     */
 2050|  15.3k|    result = Curl_setstropt(&s->str[STRING_COOKIEJAR], ptr);
 2051|  15.3k|    if(!result) {
  ------------------
  |  Branch (2051:8): [True: 15.3k, False: 0]
  ------------------
 2052|       |      /*
 2053|       |       * Activate the cookie parser. This may or may not already
 2054|       |       * have been made.
 2055|       |       */
 2056|  15.3k|      if(!data->cookies)
  ------------------
  |  Branch (2056:10): [True: 13.7k, False: 1.61k]
  ------------------
 2057|  13.7k|        data->cookies = Curl_cookie_init();
 2058|  15.3k|      if(!data->cookies)
  ------------------
  |  Branch (2058:10): [True: 0, False: 15.3k]
  ------------------
 2059|      0|        result = CURLE_OUT_OF_MEMORY;
 2060|  15.3k|      else
 2061|  15.3k|        data->state.cookie_engine = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
 2062|  15.3k|    }
 2063|  15.3k|    break;
 2064|       |
 2065|  1.68k|  case CURLOPT_COOKIELIST:
  ------------------
  |  Branch (2065:3): [True: 1.68k, False: 179k]
  ------------------
 2066|  1.68k|    return cookielist(data, ptr);
 2067|      0|#endif /* !CURL_DISABLE_COOKIES */
 2068|       |
 2069|      0|#endif /* !CURL_DISABLE_HTTP */
 2070|       |
 2071|     94|  case CURLOPT_CUSTOMREQUEST:
  ------------------
  |  Branch (2071:3): [True: 94, False: 181k]
  ------------------
 2072|       |    /*
 2073|       |     * Set a custom string to use as request
 2074|       |     */
 2075|     94|    return Curl_setstropt(&s->str[STRING_CUSTOMREQUEST], ptr);
 2076|       |
 2077|       |    /* we do not set s->method = HTTPREQ_CUSTOM; here, we continue as if we
 2078|       |       were using the already set type and this changes the actual request
 2079|       |       keyword */
 2080|     30|  case CURLOPT_SERVICE_NAME:
  ------------------
  |  Branch (2080:3): [True: 30, False: 181k]
  ------------------
 2081|       |    /*
 2082|       |     * Set authentication service name for DIGEST-MD5, Kerberos 5 and SPNEGO
 2083|       |     */
 2084|     30|    return Curl_setstropt(&s->str[STRING_SERVICE_NAME], ptr);
 2085|       |
 2086|      0|  case CURLOPT_HEADERDATA:
  ------------------
  |  Branch (2086:3): [True: 0, False: 181k]
  ------------------
 2087|       |    /*
 2088|       |     * Custom pointer to pass the header write callback function
 2089|       |     */
 2090|      0|    s->writeheader = ptr;
 2091|      0|    break;
 2092|  15.3k|  case CURLOPT_READDATA:
  ------------------
  |  Branch (2092:3): [True: 15.3k, False: 166k]
  ------------------
 2093|       |    /*
 2094|       |     * FILE pointer to read the file to be uploaded from. Or possibly used as
 2095|       |     * argument to the read callback.
 2096|       |     */
 2097|  15.3k|    s->in_set = ptr;
 2098|  15.3k|    break;
 2099|  16.1k|  case CURLOPT_WRITEDATA:
  ------------------
  |  Branch (2099:3): [True: 16.1k, False: 165k]
  ------------------
 2100|       |    /*
 2101|       |     * FILE pointer to write to. Or possibly used as argument to the write
 2102|       |     * callback.
 2103|       |     */
 2104|  16.1k|    s->out = ptr;
 2105|  16.1k|    break;
 2106|      0|  case CURLOPT_DEBUGDATA:
  ------------------
  |  Branch (2106:3): [True: 0, False: 181k]
  ------------------
 2107|       |    /*
 2108|       |     * Set to a void * that should receive all error writes. This
 2109|       |     * defaults to CURLOPT_STDERR for normal operations.
 2110|       |     */
 2111|      0|    s->debugdata = ptr;
 2112|      0|    break;
 2113|      0|  case CURLOPT_PROGRESSDATA:
  ------------------
  |  | 1343|      0|#define CURLOPT_PROGRESSDATA CURLOPT_XFERINFODATA
  ------------------
  |  Branch (2113:3): [True: 0, False: 181k]
  ------------------
 2114|       |    /*
 2115|       |     * Custom client data to pass to the progress callback
 2116|       |     */
 2117|      0|    s->progress_client = ptr;
 2118|      0|    break;
 2119|      0|  case CURLOPT_SEEKDATA:
  ------------------
  |  Branch (2119:3): [True: 0, False: 181k]
  ------------------
 2120|       |    /*
 2121|       |     * Seek control callback. Might be NULL.
 2122|       |     */
 2123|      0|    s->seek_client = ptr;
 2124|      0|    break;
 2125|      0|  case CURLOPT_IOCTLDATA:
  ------------------
  |  Branch (2125:3): [True: 0, False: 181k]
  ------------------
 2126|       |    /*
 2127|       |     * I/O control data pointer. Might be NULL.
 2128|       |     */
 2129|      0|    s->ioctl_client = ptr;
 2130|      0|    break;
 2131|      0|  case CURLOPT_SSL_CTX_DATA:
  ------------------
  |  Branch (2131:3): [True: 0, False: 181k]
  ------------------
 2132|       |    /*
 2133|       |     * Set an SSL_CTX callback parameter pointer
 2134|       |     */
 2135|      0|#ifdef USE_SSL
 2136|      0|    if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) {
  ------------------
  |  |   38|      0|#define SSLSUPP_SSL_CTX      (1 << 3) /* supports CURLOPT_SSL_CTX */
  ------------------
  |  Branch (2136:8): [True: 0, False: 0]
  ------------------
 2137|      0|      s->ssl.fsslctxp = ptr;
 2138|      0|      break;
 2139|      0|    }
 2140|      0|    else
 2141|      0|#endif
 2142|      0|      return CURLE_NOT_BUILT_IN;
 2143|      0|  case CURLOPT_SOCKOPTDATA:
  ------------------
  |  Branch (2143:3): [True: 0, False: 181k]
  ------------------
 2144|       |    /*
 2145|       |     * socket callback data pointer. Might be NULL.
 2146|       |     */
 2147|      0|    s->sockopt_client = ptr;
 2148|      0|    break;
 2149|  15.3k|  case CURLOPT_OPENSOCKETDATA:
  ------------------
  |  Branch (2149:3): [True: 15.3k, False: 166k]
  ------------------
 2150|       |    /*
 2151|       |     * socket callback data pointer. Might be NULL.
 2152|       |     */
 2153|  15.3k|    s->opensocket_client = ptr;
 2154|  15.3k|    break;
 2155|      0|  case CURLOPT_RESOLVER_START_DATA:
  ------------------
  |  Branch (2155:3): [True: 0, False: 181k]
  ------------------
 2156|       |    /*
 2157|       |     * resolver start callback data pointer. Might be NULL.
 2158|       |     */
 2159|      0|    s->resolver_start_client = ptr;
 2160|      0|    break;
 2161|      0|  case CURLOPT_CLOSESOCKETDATA:
  ------------------
  |  Branch (2161:3): [True: 0, False: 181k]
  ------------------
 2162|       |    /*
 2163|       |     * socket callback data pointer. Might be NULL.
 2164|       |     */
 2165|      0|    s->closesocket_client = ptr;
 2166|      0|    break;
 2167|      0|  case CURLOPT_PREREQDATA:
  ------------------
  |  Branch (2167:3): [True: 0, False: 181k]
  ------------------
 2168|      0|    s->prereq_userp = ptr;
 2169|      0|    break;
 2170|      0|  case CURLOPT_ERRORBUFFER:
  ------------------
  |  Branch (2170:3): [True: 0, False: 181k]
  ------------------
 2171|       |    /*
 2172|       |     * Error buffer provided by the caller to get the human readable error
 2173|       |     * string in.
 2174|       |     */
 2175|      0|    s->errorbuffer = ptr;
 2176|      0|    break;
 2177|       |
 2178|      0|#ifndef CURL_DISABLE_FTP
 2179|      2|  case CURLOPT_FTPPORT:
  ------------------
  |  Branch (2179:3): [True: 2, False: 181k]
  ------------------
 2180|       |    /*
 2181|       |     * Use FTP PORT, this also specifies which IP address to use
 2182|       |     */
 2183|      2|    result = Curl_setstropt(&s->str[STRING_FTPPORT], ptr);
 2184|      2|    s->ftp_use_port = !!(s->str[STRING_FTPPORT]);
 2185|      2|    break;
 2186|       |
 2187|      2|  case CURLOPT_FTP_ACCOUNT:
  ------------------
  |  Branch (2187:3): [True: 2, False: 181k]
  ------------------
 2188|      2|    return Curl_setstropt(&s->str[STRING_FTP_ACCOUNT], ptr);
 2189|       |
 2190|     10|  case CURLOPT_FTP_ALTERNATIVE_TO_USER:
  ------------------
  |  Branch (2190:3): [True: 10, False: 181k]
  ------------------
 2191|     10|    return Curl_setstropt(&s->str[STRING_FTP_ALTERNATIVE_TO_USER], ptr);
 2192|       |
 2193|      3|  case CURLOPT_KRBLEVEL:
  ------------------
  |  Branch (2193:3): [True: 3, False: 181k]
  ------------------
 2194|      3|    return CURLE_NOT_BUILT_IN; /* removed in 8.17.0 */
 2195|      0|  case CURLOPT_CHUNK_DATA:
  ------------------
  |  Branch (2195:3): [True: 0, False: 181k]
  ------------------
 2196|      0|    s->wildcardptr = ptr;
 2197|      0|    break;
 2198|      0|  case CURLOPT_FNMATCH_DATA:
  ------------------
  |  Branch (2198:3): [True: 0, False: 181k]
  ------------------
 2199|      0|    s->fnmatch_data = ptr;
 2200|      0|    break;
 2201|      0|#endif
 2202|  12.4k|  case CURLOPT_URL:
  ------------------
  |  Branch (2202:3): [True: 12.4k, False: 169k]
  ------------------
 2203|       |    /*
 2204|       |     * The URL to fetch.
 2205|       |     */
 2206|  12.4k|    result = Curl_setstropt(&s->str[STRING_SET_URL], ptr);
 2207|  12.4k|    Curl_bufref_set(&data->state.url, s->str[STRING_SET_URL], 0, NULL);
 2208|  12.4k|    break;
 2209|       |
 2210|    210|  case CURLOPT_USERPWD:
  ------------------
  |  Branch (2210:3): [True: 210, False: 181k]
  ------------------
 2211|       |    /*
 2212|       |     * user:password to use in the operation
 2213|       |     */
 2214|    210|    return setstropt_userpwd(ptr, &s->str[STRING_USERNAME],
 2215|    210|                             &s->str[STRING_PASSWORD]);
 2216|       |
 2217|    192|  case CURLOPT_USERNAME:
  ------------------
  |  Branch (2217:3): [True: 192, False: 181k]
  ------------------
 2218|       |    /*
 2219|       |     * authentication username to use in the operation
 2220|       |     */
 2221|    192|    return Curl_setstropt(&s->str[STRING_USERNAME], ptr);
 2222|       |
 2223|    649|  case CURLOPT_PASSWORD:
  ------------------
  |  Branch (2223:3): [True: 649, False: 180k]
  ------------------
 2224|       |    /*
 2225|       |     * authentication password to use in the operation
 2226|       |     */
 2227|    649|    return Curl_setstropt(&s->str[STRING_PASSWORD], ptr);
 2228|       |
 2229|    133|  case CURLOPT_LOGIN_OPTIONS:
  ------------------
  |  Branch (2229:3): [True: 133, False: 181k]
  ------------------
 2230|       |    /*
 2231|       |     * authentication options to use in the operation
 2232|       |     */
 2233|    133|    return Curl_setstropt(&s->str[STRING_OPTIONS], ptr);
 2234|       |
 2235|    531|  case CURLOPT_XOAUTH2_BEARER:
  ------------------
  |  Branch (2235:3): [True: 531, False: 181k]
  ------------------
 2236|       |    /*
 2237|       |     * OAuth 2.0 bearer token to use in the operation
 2238|       |     */
 2239|    531|    return Curl_setstropt(&s->str[STRING_BEARER], ptr);
 2240|    109|  case CURLOPT_RANGE:
  ------------------
  |  Branch (2240:3): [True: 109, False: 181k]
  ------------------
 2241|       |    /*
 2242|       |     * What range of the file you want to transfer
 2243|       |     */
 2244|    109|    return Curl_setstropt(&s->str[STRING_SET_RANGE], ptr);
 2245|      5|  case CURLOPT_SSLCERT:
  ------------------
  |  Branch (2245:3): [True: 5, False: 181k]
  ------------------
 2246|       |    /*
 2247|       |     * String that holds filename of the SSL certificate to use
 2248|       |     */
 2249|      5|    return Curl_setstropt(&s->str[STRING_CERT], ptr);
 2250|      6|  case CURLOPT_SSLCERTTYPE:
  ------------------
  |  Branch (2250:3): [True: 6, False: 181k]
  ------------------
 2251|       |    /*
 2252|       |     * String that holds file type of the SSL certificate to use
 2253|       |     */
 2254|      6|    return Curl_setstropt(&s->str[STRING_CERT_TYPE], ptr);
 2255|     27|  case CURLOPT_SSLKEY:
  ------------------
  |  Branch (2255:3): [True: 27, False: 181k]
  ------------------
 2256|       |    /*
 2257|       |     * String that holds filename of the SSL key to use
 2258|       |     */
 2259|     27|    return Curl_setstropt(&s->str[STRING_KEY], ptr);
 2260|      4|  case CURLOPT_SSLKEYTYPE:
  ------------------
  |  Branch (2260:3): [True: 4, False: 181k]
  ------------------
 2261|       |    /*
 2262|       |     * String that holds file type of the SSL key to use
 2263|       |     */
 2264|      4|    return Curl_setstropt(&s->str[STRING_KEY_TYPE], ptr);
 2265|      5|  case CURLOPT_KEYPASSWD:
  ------------------
  |  Branch (2265:3): [True: 5, False: 181k]
  ------------------
 2266|       |    /*
 2267|       |     * String that holds the SSL or SSH private key password.
 2268|       |     */
 2269|      5|    return Curl_setstropt(&s->str[STRING_KEY_PASSWD], ptr);
 2270|    738|  case CURLOPT_SSLENGINE:
  ------------------
  |  Branch (2270:3): [True: 738, False: 180k]
  ------------------
 2271|       |    /*
 2272|       |     * String that holds the SSL crypto engine.
 2273|       |     */
 2274|    738|    if(ptr && ptr[0]) {
  ------------------
  |  Branch (2274:8): [True: 738, False: 0]
  |  Branch (2274:15): [True: 732, False: 6]
  ------------------
 2275|    732|      result = Curl_setstropt(&s->str[STRING_SSL_ENGINE], ptr);
 2276|    732|      if(!result) {
  ------------------
  |  Branch (2276:10): [True: 732, False: 0]
  ------------------
 2277|    732|        result = Curl_ssl_set_engine(data, ptr);
 2278|    732|      }
 2279|    732|    }
 2280|    738|    break;
 2281|    262|  case CURLOPT_INTERFACE:
  ------------------
  |  Branch (2281:3): [True: 262, False: 181k]
  ------------------
 2282|       |    /*
 2283|       |     * Set what interface or address/hostname to bind the socket to when
 2284|       |     * performing an operation and thus what from-IP your connection will use.
 2285|       |     */
 2286|    262|    return setstropt_interface(ptr,
 2287|    262|                               &s->str[STRING_DEVICE],
 2288|    262|                               &s->str[STRING_INTERFACE],
 2289|    262|                               &s->str[STRING_BINDHOST]);
 2290|      5|  case CURLOPT_ISSUERCERT:
  ------------------
  |  Branch (2290:3): [True: 5, False: 181k]
  ------------------
 2291|       |    /*
 2292|       |     * Set Issuer certificate file
 2293|       |     * to check certificates issuer
 2294|       |     */
 2295|      5|    if(Curl_ssl_supports(data, SSLSUPP_ISSUERCERT))
  ------------------
  |  |   46|      5|#define SSLSUPP_ISSUERCERT   (1 << 11) /* supports CURLOPT_ISSUERCERT */
  ------------------
  |  Branch (2295:8): [True: 5, False: 0]
  ------------------
 2296|      5|      return Curl_setstropt(&s->str[STRING_SSL_ISSUERCERT], ptr);
 2297|      0|    return CURLE_NOT_BUILT_IN;
 2298|      0|  case CURLOPT_PRIVATE:
  ------------------
  |  Branch (2298:3): [True: 0, False: 181k]
  ------------------
 2299|       |    /*
 2300|       |     * Set private data pointer.
 2301|       |     */
 2302|      0|    s->private_data = ptr;
 2303|      0|    break;
 2304|      0|#ifdef USE_SSL
 2305|     58|  case CURLOPT_SSL_EC_CURVES:
  ------------------
  |  Branch (2305:3): [True: 58, False: 181k]
  ------------------
 2306|       |    /*
 2307|       |     * Set accepted curves in SSL connection setup.
 2308|       |     * Specify colon-delimited list of curve algorithm names.
 2309|       |     */
 2310|     58|    if(Curl_ssl_supports(data, SSLSUPP_SSL_EC_CURVES))
  ------------------
  |  |   47|     58|#define SSLSUPP_SSL_EC_CURVES (1 << 12) /* supports CURLOPT_SSL_EC_CURVES */
  ------------------
  |  Branch (2310:8): [True: 58, False: 0]
  ------------------
 2311|     58|      return Curl_setstropt(&s->str[STRING_SSL_EC_CURVES], ptr);
 2312|      0|    return CURLE_NOT_BUILT_IN;
 2313|      0|  case CURLOPT_SSL_SIGNATURE_ALGORITHMS:
  ------------------
  |  Branch (2313:3): [True: 0, False: 181k]
  ------------------
 2314|       |    /*
 2315|       |     * Set accepted signature algorithms.
 2316|       |     * Specify colon-delimited list of signature scheme names.
 2317|       |     */
 2318|      0|    if(Curl_ssl_supports(data, SSLSUPP_SIGNATURE_ALGORITHMS))
  ------------------
  |  |   45|      0|#define SSLSUPP_SIGNATURE_ALGORITHMS (1 << 10) /* supports TLS sigalgs */
  ------------------
  |  Branch (2318:8): [True: 0, False: 0]
  ------------------
 2319|      0|      return Curl_setstropt(&s->str[STRING_SSL_SIGNATURE_ALGORITHMS], ptr);
 2320|      0|    return CURLE_NOT_BUILT_IN;
 2321|      8|  case CURLOPT_PINNEDPUBLICKEY:
  ------------------
  |  Branch (2321:3): [True: 8, False: 181k]
  ------------------
 2322|       |    /*
 2323|       |     * Set pinned public key for SSL connection.
 2324|       |     * Specify filename of the public key in DER format.
 2325|       |     */
 2326|      8|    if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY))
  ------------------
  |  |   37|      8|#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
  ------------------
  |  Branch (2326:8): [True: 8, False: 0]
  ------------------
 2327|      8|      return Curl_setstropt(&s->str[STRING_SSL_PINNEDPUBLICKEY], ptr);
 2328|      0|    return CURLE_NOT_BUILT_IN;
 2329|      0|#endif
 2330|       |#ifdef USE_SSH
 2331|       |  case CURLOPT_SSH_PUBLIC_KEYFILE:
 2332|       |    /*
 2333|       |     * Use this file instead of the $HOME/.ssh/id_dsa.pub file
 2334|       |     */
 2335|       |    return Curl_setstropt(&s->str[STRING_SSH_PUBLIC_KEY], ptr);
 2336|       |  case CURLOPT_SSH_PRIVATE_KEYFILE:
 2337|       |    /*
 2338|       |     * Use this file instead of the $HOME/.ssh/id_dsa file
 2339|       |     */
 2340|       |    return Curl_setstropt(&s->str[STRING_SSH_PRIVATE_KEY], ptr);
 2341|       |  case CURLOPT_SSH_KEYDATA:
 2342|       |    /*
 2343|       |     * Custom client data to pass to the SSH keyfunc callback
 2344|       |     */
 2345|       |    s->ssh_keyfunc_userp = ptr;
 2346|       |    break;
 2347|       |#if defined(USE_LIBSSH2) || defined(USE_LIBSSH)
 2348|       |  case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
 2349|       |    /*
 2350|       |     * Option to allow for the MD5 of the host public key to be checked
 2351|       |     * for validation purposes.
 2352|       |     */
 2353|       |    return Curl_setstropt(&s->str[STRING_SSH_HOST_PUBLIC_KEY_MD5], ptr);
 2354|       |  case CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256:
 2355|       |    /*
 2356|       |     * Option to allow for the SHA256 of the host public key to be checked
 2357|       |     * for validation purposes.
 2358|       |     */
 2359|       |    return Curl_setstropt(&s->str[STRING_SSH_HOST_PUBLIC_KEY_SHA256], ptr);
 2360|       |  case CURLOPT_SSH_KNOWNHOSTS:
 2361|       |    /*
 2362|       |     * Store the filename to read known hosts from.
 2363|       |     */
 2364|       |    return Curl_setstropt(&s->str[STRING_SSH_KNOWNHOSTS], ptr);
 2365|       |#endif
 2366|       |#ifdef USE_LIBSSH2
 2367|       |  case CURLOPT_SSH_HOSTKEYDATA:
 2368|       |    /*
 2369|       |     * Custom client data to pass to the SSH keyfunc callback
 2370|       |     */
 2371|       |    s->ssh_hostkeyfunc_userp = ptr;
 2372|       |    break;
 2373|       |#endif /* USE_LIBSSH2 */
 2374|       |#endif /* USE_SSH */
 2375|  15.3k|  case CURLOPT_PROTOCOLS_STR:
  ------------------
  |  Branch (2375:3): [True: 15.3k, False: 166k]
  ------------------
 2376|  15.3k|    if(ptr) {
  ------------------
  |  Branch (2376:8): [True: 15.3k, False: 0]
  ------------------
 2377|  15.3k|      curl_prot_t protos;
 2378|  15.3k|      result = protocol2num(ptr, &protos);
 2379|  15.3k|      if(!result)
  ------------------
  |  Branch (2379:10): [True: 15.3k, False: 0]
  ------------------
 2380|  15.3k|        s->allowed_protocols = protos;
 2381|  15.3k|    }
 2382|      0|    else
 2383|       |      /* make a NULL argument reset to default */
 2384|      0|      s->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|      0|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
 2385|  15.3k|    break;
 2386|  1.47k|  case CURLOPT_REDIR_PROTOCOLS_STR:
  ------------------
  |  Branch (2386:3): [True: 1.47k, False: 180k]
  ------------------
 2387|  1.47k|    if(ptr) {
  ------------------
  |  Branch (2387:8): [True: 1.47k, False: 0]
  ------------------
 2388|  1.47k|      curl_prot_t protos;
 2389|  1.47k|      result = protocol2num(ptr, &protos);
 2390|  1.47k|      if(!result)
  ------------------
  |  Branch (2390:10): [True: 1.45k, False: 28]
  ------------------
 2391|  1.45k|        s->redir_protocols = protos;
 2392|  1.47k|    }
 2393|      0|    else
 2394|       |      /* make a NULL argument reset to default */
 2395|      0|      s->redir_protocols = (curl_prot_t)CURLPROTO_REDIR;
  ------------------
  |  |   71|      0|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1078|      0|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1079|      0|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1080|      0|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|      0|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|      0|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
 2396|  1.47k|    break;
 2397|  1.35k|  case CURLOPT_DEFAULT_PROTOCOL:
  ------------------
  |  Branch (2397:3): [True: 1.35k, False: 180k]
  ------------------
 2398|       |    /* Set the protocol to use when the URL does not include any protocol */
 2399|  1.35k|    return Curl_setstropt(&s->str[STRING_DEFAULT_PROTOCOL], ptr);
 2400|      0|#ifndef CURL_DISABLE_SMTP
 2401|     12|  case CURLOPT_MAIL_FROM:
  ------------------
  |  Branch (2401:3): [True: 12, False: 181k]
  ------------------
 2402|       |    /* Set the SMTP mail originator */
 2403|     12|    return Curl_setstropt(&s->str[STRING_MAIL_FROM], ptr);
 2404|      9|  case CURLOPT_MAIL_AUTH:
  ------------------
  |  Branch (2404:3): [True: 9, False: 181k]
  ------------------
 2405|       |    /* Set the SMTP auth originator */
 2406|      9|    return Curl_setstropt(&s->str[STRING_MAIL_AUTH], ptr);
 2407|      0|#endif
 2408|     86|  case CURLOPT_SASL_AUTHZID:
  ------------------
  |  Branch (2408:3): [True: 86, False: 181k]
  ------------------
 2409|       |    /* Authorization identity (identity to act as) */
 2410|     86|    return Curl_setstropt(&s->str[STRING_SASL_AUTHZID], ptr);
 2411|      0|#ifndef CURL_DISABLE_RTSP
 2412|    203|  case CURLOPT_RTSP_SESSION_ID:
  ------------------
  |  Branch (2412:3): [True: 203, False: 181k]
  ------------------
 2413|       |    /*
 2414|       |     * Set the RTSP Session ID manually. Useful if the application is
 2415|       |     * resuming a previously established RTSP session
 2416|       |     */
 2417|    203|    return Curl_setstropt(&s->str[STRING_RTSP_SESSION_ID], ptr);
 2418|     88|  case CURLOPT_RTSP_STREAM_URI:
  ------------------
  |  Branch (2418:3): [True: 88, False: 181k]
  ------------------
 2419|       |    /*
 2420|       |     * Set the Stream URI for the RTSP request. Unless the request is
 2421|       |     * for generic server options, the application will need to set this.
 2422|       |     */
 2423|     88|    return Curl_setstropt(&s->str[STRING_RTSP_STREAM_URI], ptr);
 2424|     35|  case CURLOPT_RTSP_TRANSPORT:
  ------------------
  |  Branch (2424:3): [True: 35, False: 181k]
  ------------------
 2425|       |    /*
 2426|       |     * The content of the Transport: header for the RTSP request
 2427|       |     */
 2428|     35|    return Curl_setstropt(&s->str[STRING_RTSP_TRANSPORT], ptr);
 2429|      0|  case CURLOPT_INTERLEAVEDATA:
  ------------------
  |  Branch (2429:3): [True: 0, False: 181k]
  ------------------
 2430|      0|    s->rtp_out = ptr;
 2431|      0|    break;
 2432|      0|#endif /* !CURL_DISABLE_RTSP */
 2433|      0|#ifdef USE_TLS_SRP
 2434|     15|  case CURLOPT_TLSAUTH_USERNAME:
  ------------------
  |  Branch (2434:3): [True: 15, False: 181k]
  ------------------
 2435|     15|    return Curl_setstropt(&s->str[STRING_TLSAUTH_USERNAME], ptr);
 2436|     17|  case CURLOPT_TLSAUTH_PASSWORD:
  ------------------
  |  Branch (2436:3): [True: 17, False: 181k]
  ------------------
 2437|     17|    return Curl_setstropt(&s->str[STRING_TLSAUTH_PASSWORD], ptr);
 2438|      3|  case CURLOPT_TLSAUTH_TYPE:
  ------------------
  |  Branch (2438:3): [True: 3, False: 181k]
  ------------------
 2439|      3|    if(ptr && !curl_strequal(ptr, "SRP"))
  ------------------
  |  Branch (2439:8): [True: 3, False: 0]
  |  Branch (2439:15): [True: 1, False: 2]
  ------------------
 2440|      1|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 2441|      3|    break;
 2442|      0|#ifndef CURL_DISABLE_PROXY
 2443|     80|  case CURLOPT_PROXY_TLSAUTH_USERNAME:
  ------------------
  |  Branch (2443:3): [True: 80, False: 181k]
  ------------------
 2444|     80|    return Curl_setstropt(&s->str[STRING_TLSAUTH_USERNAME_PROXY], ptr);
 2445|     17|  case CURLOPT_PROXY_TLSAUTH_PASSWORD:
  ------------------
  |  Branch (2445:3): [True: 17, False: 181k]
  ------------------
 2446|     17|    return Curl_setstropt(&s->str[STRING_TLSAUTH_PASSWORD_PROXY], ptr);
 2447|      4|  case CURLOPT_PROXY_TLSAUTH_TYPE:
  ------------------
  |  Branch (2447:3): [True: 4, False: 181k]
  ------------------
 2448|      4|    if(ptr && !curl_strequal(ptr, "SRP"))
  ------------------
  |  Branch (2448:8): [True: 4, False: 0]
  |  Branch (2448:15): [True: 2, False: 2]
  ------------------
 2449|      2|      result = CURLE_BAD_FUNCTION_ARGUMENT;
 2450|      4|    break;
 2451|      0|#endif
 2452|      0|#endif
 2453|       |#ifdef USE_RESOLV_ARES
 2454|       |  case CURLOPT_DNS_SERVERS:
 2455|       |    return Curl_setstropt(&s->str[STRING_DNS_SERVERS], ptr);
 2456|       |
 2457|       |  case CURLOPT_DNS_INTERFACE:
 2458|       |    return Curl_setstropt(&s->str[STRING_DNS_INTERFACE], ptr);
 2459|       |
 2460|       |  case CURLOPT_DNS_LOCAL_IP4:
 2461|       |    return Curl_setstropt(&s->str[STRING_DNS_LOCAL_IP4], ptr);
 2462|       |
 2463|       |  case CURLOPT_DNS_LOCAL_IP6:
 2464|       |    return Curl_setstropt(&s->str[STRING_DNS_LOCAL_IP6], ptr);
 2465|       |
 2466|       |#endif
 2467|      0|#ifdef USE_UNIX_SOCKETS
 2468|     33|  case CURLOPT_UNIX_SOCKET_PATH:
  ------------------
  |  Branch (2468:3): [True: 33, False: 181k]
  ------------------
 2469|     33|    s->abstract_unix_socket = FALSE;
  ------------------
  |  | 1058|     33|#define FALSE false
  ------------------
 2470|     33|    return Curl_setstropt(&s->str[STRING_UNIX_SOCKET_PATH], ptr);
 2471|       |
 2472|    431|  case CURLOPT_ABSTRACT_UNIX_SOCKET:
  ------------------
  |  Branch (2472:3): [True: 431, False: 181k]
  ------------------
 2473|    431|    s->abstract_unix_socket = TRUE;
  ------------------
  |  | 1055|    431|#define TRUE true
  ------------------
 2474|    431|    return Curl_setstropt(&s->str[STRING_UNIX_SOCKET_PATH], ptr);
 2475|       |
 2476|      0|#endif
 2477|       |
 2478|      0|#ifndef CURL_DISABLE_DOH
 2479|    482|  case CURLOPT_DOH_URL:
  ------------------
  |  Branch (2479:3): [True: 482, False: 181k]
  ------------------
 2480|    482|    result = Curl_setstropt(&s->str[STRING_DOH], ptr);
 2481|    482|    s->doh = !!(s->str[STRING_DOH]);
 2482|    482|    break;
 2483|      0|#endif
 2484|      0|#ifndef CURL_DISABLE_HSTS
 2485|      0|  case CURLOPT_HSTSREADDATA:
  ------------------
  |  Branch (2485:3): [True: 0, False: 181k]
  ------------------
 2486|      0|    s->hsts_read_userp = ptr;
 2487|      0|    break;
 2488|      0|  case CURLOPT_HSTSWRITEDATA:
  ------------------
  |  Branch (2488:3): [True: 0, False: 181k]
  ------------------
 2489|      0|    s->hsts_write_userp = ptr;
 2490|      0|    break;
 2491|  15.3k|  case CURLOPT_HSTS: {
  ------------------
  |  Branch (2491:3): [True: 15.3k, False: 166k]
  ------------------
 2492|  15.3k|    struct curl_slist *h;
 2493|  15.3k|    if(!data->hsts) {
  ------------------
  |  Branch (2493:8): [True: 15.3k, False: 1]
  ------------------
 2494|  15.3k|      data->hsts = Curl_hsts_init();
 2495|  15.3k|      if(!data->hsts)
  ------------------
  |  Branch (2495:10): [True: 0, False: 15.3k]
  ------------------
 2496|      0|        return CURLE_OUT_OF_MEMORY;
 2497|  15.3k|    }
 2498|  15.3k|    if(ptr) {
  ------------------
  |  Branch (2498:8): [True: 15.3k, False: 0]
  ------------------
 2499|  15.3k|      result = Curl_setstropt(&s->str[STRING_HSTS], ptr);
 2500|  15.3k|      if(result)
  ------------------
  |  Branch (2500:10): [True: 0, False: 15.3k]
  ------------------
 2501|      0|        return result;
 2502|       |      /* this needs to build a list of filenames to read from, so that it can
 2503|       |         read them later, as we might get a shared HSTS handle to load them
 2504|       |         into */
 2505|  15.3k|      h = curl_slist_append(data->state.hstslist, ptr);
 2506|  15.3k|      if(!h) {
  ------------------
  |  Branch (2506:10): [True: 0, False: 15.3k]
  ------------------
 2507|      0|        curl_slist_free_all(data->state.hstslist);
 2508|      0|        data->state.hstslist = NULL;
 2509|      0|        return CURLE_OUT_OF_MEMORY;
 2510|      0|      }
 2511|  15.3k|      data->state.hstslist = h; /* store the list for later use */
 2512|  15.3k|    }
 2513|      0|    else {
 2514|       |      /* clear the list of HSTS files */
 2515|      0|      curl_slist_free_all(data->state.hstslist);
 2516|      0|      data->state.hstslist = NULL;
 2517|      0|      if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (2517:10): [True: 0, False: 0]
  |  Branch (2517:26): [True: 0, False: 0]
  ------------------
 2518|       |        /* throw away the HSTS cache unless shared */
 2519|      0|        Curl_hsts_cleanup(&data->hsts);
 2520|      0|    }
 2521|  15.3k|    break;
 2522|  15.3k|  }
 2523|  15.3k|#endif /* !CURL_DISABLE_HSTS */
 2524|  15.3k|#ifndef CURL_DISABLE_ALTSVC
 2525|  15.3k|  case CURLOPT_ALTSVC:
  ------------------
  |  Branch (2525:3): [True: 15.3k, False: 166k]
  ------------------
 2526|  15.3k|    if(!data->asi) {
  ------------------
  |  Branch (2526:8): [True: 15.3k, False: 32]
  ------------------
 2527|  15.3k|      data->asi = Curl_altsvc_init();
 2528|  15.3k|      if(!data->asi)
  ------------------
  |  Branch (2528:10): [True: 0, False: 15.3k]
  ------------------
 2529|      0|        return CURLE_OUT_OF_MEMORY;
 2530|  15.3k|    }
 2531|  15.3k|    result = Curl_setstropt(&s->str[STRING_ALTSVC], ptr);
 2532|  15.3k|    if(result)
  ------------------
  |  Branch (2532:8): [True: 0, False: 15.3k]
  ------------------
 2533|      0|      break;
 2534|  15.3k|    if(ptr)
  ------------------
  |  Branch (2534:8): [True: 15.3k, False: 0]
  ------------------
 2535|  15.3k|      return Curl_altsvc_load(data->asi, ptr);
 2536|      0|    break;
 2537|      0|#endif /* !CURL_DISABLE_ALTSVC */
 2538|      1|  case CURLOPT_ECH:
  ------------------
  |  Branch (2538:3): [True: 1, False: 181k]
  ------------------
 2539|      1|    return setopt_ech(data, ptr);
  ------------------
  |  | 1898|      1|#define setopt_ech(x,y) CURLE_NOT_BUILT_IN
  ------------------
 2540|     12|  default:
  ------------------
  |  Branch (2540:3): [True: 12, False: 181k]
  ------------------
 2541|     12|    return CURLE_UNKNOWN_OPTION;
 2542|   181k|  }
 2543|   109k|  return result;
 2544|   181k|}
setopt.c:setopt_cptr_proxy:
 1652|   187k|{
 1653|   187k|  CURLcode result = CURLE_OK;
 1654|   187k|  struct UserDefined *s = &data->set;
 1655|   187k|  switch(option) {
 1656|    181|  case CURLOPT_PROXYUSERPWD: {
  ------------------
  |  Branch (1656:3): [True: 181, False: 187k]
  ------------------
 1657|       |    /*
 1658|       |     * user:password needed to use the proxy
 1659|       |     */
 1660|    181|    char *u = NULL;
 1661|    181|    char *p = NULL;
 1662|    181|    result = setstropt_userpwd(ptr, &u, &p);
 1663|       |
 1664|       |    /* URL decode the components */
 1665|    181|    if(!result) {
  ------------------
  |  Branch (1665:8): [True: 181, False: 0]
  ------------------
 1666|    181|      curlx_safefree(s->str[STRING_PROXYUSERNAME]);
  ------------------
  |  | 1327|    181|  do {                      \
  |  | 1328|    181|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    181|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    181|    (ptr) = NULL;           \
  |  | 1330|    181|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 181]
  |  |  ------------------
  ------------------
 1667|    181|      curlx_safefree(s->str[STRING_PROXYPASSWORD]);
  ------------------
  |  | 1327|    181|  do {                      \
  |  | 1328|    181|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    181|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    181|    (ptr) = NULL;           \
  |  | 1330|    181|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 181]
  |  |  ------------------
  ------------------
 1668|    181|      if(u)
  ------------------
  |  Branch (1668:10): [True: 181, False: 0]
  ------------------
 1669|    181|        result = Curl_urldecode(u, 0, &s->str[STRING_PROXYUSERNAME], NULL,
 1670|    181|                                REJECT_ZERO);
 1671|    181|    }
 1672|    181|    if(!result && p)
  ------------------
  |  Branch (1672:8): [True: 179, False: 2]
  |  Branch (1672:19): [True: 29, False: 150]
  ------------------
 1673|     29|      result = Curl_urldecode(p, 0, &s->str[STRING_PROXYPASSWORD], NULL,
 1674|     29|                              REJECT_ZERO);
 1675|    181|    curlx_free(u);
  ------------------
  |  | 1483|    181|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1676|    181|    curlx_free(p);
  ------------------
  |  | 1483|    181|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1677|    181|    break;
 1678|      0|  }
 1679|     17|  case CURLOPT_PROXYUSERNAME:
  ------------------
  |  Branch (1679:3): [True: 17, False: 187k]
  ------------------
 1680|       |    /*
 1681|       |     * authentication username to use in the operation
 1682|       |     */
 1683|     17|    return Curl_setstropt(&s->str[STRING_PROXYUSERNAME], ptr);
 1684|       |
 1685|     21|  case CURLOPT_PROXYPASSWORD:
  ------------------
  |  Branch (1685:3): [True: 21, False: 187k]
  ------------------
 1686|       |    /*
 1687|       |     * authentication password to use in the operation
 1688|       |     */
 1689|     21|    return Curl_setstropt(&s->str[STRING_PROXYPASSWORD], ptr);
 1690|       |
 1691|    277|  case CURLOPT_NOPROXY:
  ------------------
  |  Branch (1691:3): [True: 277, False: 187k]
  ------------------
 1692|       |    /*
 1693|       |     * proxy exception list
 1694|       |     */
 1695|    277|    return Curl_setstropt(&s->str[STRING_NOPROXY], ptr);
 1696|     44|  case CURLOPT_PROXY_SSLCERT:
  ------------------
  |  Branch (1696:3): [True: 44, False: 187k]
  ------------------
 1697|       |    /*
 1698|       |     * String that holds filename of the SSL certificate to use for proxy
 1699|       |     */
 1700|     44|    return Curl_setstropt(&s->str[STRING_CERT_PROXY], ptr);
 1701|     60|  case CURLOPT_PROXY_SSLCERTTYPE:
  ------------------
  |  Branch (1701:3): [True: 60, False: 187k]
  ------------------
 1702|       |    /*
 1703|       |     * String that holds file type of the SSL certificate to use for proxy
 1704|       |     */
 1705|     60|    return Curl_setstropt(&s->str[STRING_CERT_TYPE_PROXY], ptr);
 1706|     27|  case CURLOPT_PROXY_SSLKEY:
  ------------------
  |  Branch (1706:3): [True: 27, False: 187k]
  ------------------
 1707|       |    /*
 1708|       |     * String that holds filename of the SSL key to use for proxy
 1709|       |     */
 1710|     27|    return Curl_setstropt(&s->str[STRING_KEY_PROXY], ptr);
 1711|     44|  case CURLOPT_PROXY_KEYPASSWD:
  ------------------
  |  Branch (1711:3): [True: 44, False: 187k]
  ------------------
 1712|       |    /*
 1713|       |     * String that holds the SSL private key password for proxy.
 1714|       |     */
 1715|     44|    return Curl_setstropt(&s->str[STRING_KEY_PASSWD_PROXY], ptr);
 1716|     22|  case CURLOPT_PROXY_SSLKEYTYPE:
  ------------------
  |  Branch (1716:3): [True: 22, False: 187k]
  ------------------
 1717|       |    /*
 1718|       |     * String that holds file type of the SSL key to use for proxy
 1719|       |     */
 1720|     22|    return Curl_setstropt(&s->str[STRING_KEY_TYPE_PROXY], ptr);
 1721|    850|  case CURLOPT_PROXY_SSL_CIPHER_LIST:
  ------------------
  |  Branch (1721:3): [True: 850, False: 187k]
  ------------------
 1722|    850|    if(Curl_ssl_supports(data, SSLSUPP_CIPHER_LIST)) {
  ------------------
  |  |   44|    850|#define SSLSUPP_CIPHER_LIST  (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */
  ------------------
  |  Branch (1722:8): [True: 850, False: 0]
  ------------------
 1723|       |      /* set a list of cipher we want to use in the SSL connection for proxy */
 1724|    850|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER_LIST_PROXY], ptr);
 1725|    850|    }
 1726|      0|    else
 1727|      0|      return CURLE_NOT_BUILT_IN;
 1728|    183|  case CURLOPT_PROXY_TLS13_CIPHERS:
  ------------------
  |  Branch (1728:3): [True: 183, False: 187k]
  ------------------
 1729|    183|    if(Curl_ssl_supports(data, SSLSUPP_TLS13_CIPHERSUITES))
  ------------------
  |  |   40|    183|#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
  ------------------
  |  Branch (1729:8): [True: 183, False: 0]
  ------------------
 1730|       |      /* set preferred list of TLS 1.3 cipher suites for proxy */
 1731|    183|      return Curl_setstropt(&s->str[STRING_SSL_CIPHER13_LIST_PROXY], ptr);
 1732|      0|    else
 1733|      0|      return CURLE_NOT_BUILT_IN;
 1734|  3.19k|  case CURLOPT_PROXY:
  ------------------
  |  Branch (1734:3): [True: 3.19k, False: 184k]
  ------------------
 1735|       |    /*
 1736|       |     * Set proxy server:port to use as proxy.
 1737|       |     *
 1738|       |     * If the proxy is set to "" (and CURLOPT_PRE_PROXY is set to "" or NULL)
 1739|       |     * we explicitly say that we do not want to use a proxy (even though there
 1740|       |     * might be environment variables saying so).
 1741|       |     *
 1742|       |     * Setting it to NULL, means no proxy but allows the environment variables
 1743|       |     * to decide for us (if CURLOPT_PRE_PROXY setting it to NULL).
 1744|       |     */
 1745|  3.19k|    return setproxy(data, ptr);
 1746|    500|  case CURLOPT_PRE_PROXY:
  ------------------
  |  Branch (1746:3): [True: 500, False: 187k]
  ------------------
 1747|       |    /*
 1748|       |     * Set proxy server:port to use as SOCKS proxy.
 1749|       |     *
 1750|       |     * If the proxy is set to "" or NULL we explicitly say that we do not want
 1751|       |     * to use the socks proxy.
 1752|       |     */
 1753|    500|    return Curl_setstropt(&s->str[STRING_PRE_PROXY], ptr);
 1754|      0|  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
  ------------------
  |  Branch (1754:3): [True: 0, False: 187k]
  ------------------
 1755|     92|  case CURLOPT_PROXY_SERVICE_NAME:
  ------------------
  |  Branch (1755:3): [True: 92, False: 187k]
  ------------------
 1756|       |    /*
 1757|       |     * Set proxy authentication service name for Kerberos 5 and SPNEGO
 1758|       |     */
 1759|     92|    return Curl_setstropt(&s->str[STRING_PROXY_SERVICE_NAME], ptr);
 1760|     80|  case CURLOPT_PROXY_PINNEDPUBLICKEY:
  ------------------
  |  Branch (1760:3): [True: 80, False: 187k]
  ------------------
 1761|       |    /*
 1762|       |     * Set pinned public key for SSL connection.
 1763|       |     * Specify filename of the public key in DER format.
 1764|       |     */
 1765|     80|#ifdef USE_SSL
 1766|     80|    if(Curl_ssl_supports(data, SSLSUPP_PINNEDPUBKEY))
  ------------------
  |  |   37|     80|#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
  ------------------
  |  Branch (1766:8): [True: 80, False: 0]
  ------------------
 1767|     80|      return Curl_setstropt(&s->str[STRING_SSL_PINNEDPUBLICKEY_PROXY], ptr);
 1768|      0|#endif
 1769|      0|    return CURLE_NOT_BUILT_IN;
 1770|       |
 1771|    296|  case CURLOPT_HAPROXY_CLIENT_IP:
  ------------------
  |  Branch (1771:3): [True: 296, False: 187k]
  ------------------
 1772|       |    /*
 1773|       |     * Set the client IP to send through HAProxy PROXY protocol
 1774|       |     */
 1775|    296|    result = Curl_setstropt(&s->str[STRING_HAPROXY_CLIENT_IP], ptr);
 1776|       |
 1777|       |    /* enable the HAProxy protocol if an IP is provided */
 1778|    296|    s->haproxyprotocol = !!s->str[STRING_HAPROXY_CLIENT_IP];
 1779|    296|    break;
 1780|    149|  case CURLOPT_PROXY_CAINFO:
  ------------------
  |  Branch (1780:3): [True: 149, False: 187k]
  ------------------
 1781|       |    /*
 1782|       |     * Set CA info SSL connection for proxy. Specify filename of the
 1783|       |     * CA certificate
 1784|       |     */
 1785|    149|    s->proxy_ssl.custom_cafile = TRUE;
  ------------------
  |  | 1055|    149|#define TRUE true
  ------------------
 1786|    149|    return Curl_setstropt(&s->str[STRING_SSL_CAFILE_PROXY], ptr);
 1787|     57|  case CURLOPT_PROXY_CRLFILE:
  ------------------
  |  Branch (1787:3): [True: 57, False: 187k]
  ------------------
 1788|       |    /*
 1789|       |     * Set CRL file info for SSL connection for proxy. Specify filename of the
 1790|       |     * CRL to check certificates revocation
 1791|       |     */
 1792|     57|    if(Curl_ssl_supports(data, SSLSUPP_CRLFILE))
  ------------------
  |  |   48|     57|#define SSLSUPP_CRLFILE      (1 << 13) /* supports CURLOPT_CRLFILE */
  ------------------
  |  Branch (1792:8): [True: 57, False: 0]
  ------------------
 1793|     57|      return Curl_setstropt(&s->str[STRING_SSL_CRLFILE_PROXY], ptr);
 1794|      0|    return CURLE_NOT_BUILT_IN;
 1795|     66|  case CURLOPT_PROXY_ISSUERCERT:
  ------------------
  |  Branch (1795:3): [True: 66, False: 187k]
  ------------------
 1796|       |    /*
 1797|       |     * Set Issuer certificate file to check certificates issuer
 1798|       |     */
 1799|     66|    if(Curl_ssl_supports(data, SSLSUPP_ISSUERCERT))
  ------------------
  |  |   46|     66|#define SSLSUPP_ISSUERCERT   (1 << 11) /* supports CURLOPT_ISSUERCERT */
  ------------------
  |  Branch (1799:8): [True: 66, False: 0]
  ------------------
 1800|     66|      return Curl_setstropt(&s->str[STRING_SSL_ISSUERCERT_PROXY], ptr);
 1801|      0|    return CURLE_NOT_BUILT_IN;
 1802|    188|  case CURLOPT_PROXY_CAPATH:
  ------------------
  |  Branch (1802:3): [True: 188, False: 187k]
  ------------------
 1803|       |    /*
 1804|       |     * Set CA path info for SSL connection proxy. Specify directory name of the
 1805|       |     * CA certificates which have been prepared using openssl c_rehash utility.
 1806|       |     */
 1807|    188|#ifdef USE_SSL
 1808|    188|    if(Curl_ssl_supports(data, SSLSUPP_CA_PATH)) {
  ------------------
  |  |   35|    188|#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
  ------------------
  |  Branch (1808:8): [True: 188, False: 0]
  ------------------
 1809|       |      /* This does not work on Windows. */
 1810|    188|      s->proxy_ssl.custom_capath = TRUE;
  ------------------
  |  | 1055|    188|#define TRUE true
  ------------------
 1811|    188|      return Curl_setstropt(&s->str[STRING_SSL_CAPATH_PROXY], ptr);
 1812|    188|    }
 1813|      0|#endif
 1814|      0|    return CURLE_NOT_BUILT_IN;
 1815|   181k|  default:
  ------------------
  |  Branch (1815:3): [True: 181k, False: 6.34k]
  ------------------
 1816|   181k|    return CURLE_UNKNOWN_OPTION;
 1817|   187k|  }
 1818|    477|  return result;
 1819|   187k|}
setopt.c:setproxy:
 1640|  3.19k|{
 1641|  3.19k|  if((data->set.str[STRING_PROXY] && proxy) &&
  ------------------
  |  Branch (1641:7): [True: 0, False: 3.19k]
  |  Branch (1641:38): [True: 0, False: 0]
  ------------------
 1642|       |     /* there was one set, is this a new one? */
 1643|      0|     !strcmp(data->set.str[STRING_PROXY], proxy))
  ------------------
  |  Branch (1643:6): [True: 0, False: 0]
  ------------------
 1644|      0|    return CURLE_OK; /* same one as before */
 1645|       |
 1646|  3.19k|  changeproxy(data);
 1647|  3.19k|  return Curl_setstropt(&data->set.str[STRING_PROXY], proxy);
 1648|  3.19k|}
setopt.c:cookiefile:
 1601|  15.3k|{
 1602|       |  /*
 1603|       |   * Set cookie file to read and parse. Can be used multiple times.
 1604|       |   */
 1605|  15.3k|  if(ptr) {
  ------------------
  |  Branch (1605:6): [True: 15.3k, False: 0]
  ------------------
 1606|  15.3k|    struct curl_slist *cl;
 1607|       |    /* general protection against mistakes and abuse */
 1608|  15.3k|    if(strlen(ptr) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  15.3k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1608:8): [True: 0, False: 15.3k]
  ------------------
 1609|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1610|       |    /* append the cookie filename to the list of filenames, and deal with
 1611|       |       them later */
 1612|  15.3k|    cl = curl_slist_append(data->state.cookielist, ptr);
 1613|  15.3k|    if(!cl) {
  ------------------
  |  Branch (1613:8): [True: 0, False: 15.3k]
  ------------------
 1614|      0|      curl_slist_free_all(data->state.cookielist);
 1615|      0|      data->state.cookielist = NULL;
 1616|      0|      return CURLE_OUT_OF_MEMORY;
 1617|      0|    }
 1618|  15.3k|    data->state.cookielist = cl; /* store the list for later use */
 1619|  15.3k|  }
 1620|      0|  else {
 1621|       |    /* clear the list of cookie files */
 1622|      0|    curl_slist_free_all(data->state.cookielist);
 1623|      0|    data->state.cookielist = NULL;
 1624|       |
 1625|      0|    if(!data->share || !data->share->cookies) {
  ------------------
  |  Branch (1625:8): [True: 0, False: 0]
  |  Branch (1625:24): [True: 0, False: 0]
  ------------------
 1626|       |      /* throw away all existing cookies if this is not a shared cookie
 1627|       |         container */
 1628|      0|      Curl_cookie_clearall(data->cookies);
 1629|      0|      Curl_cookie_cleanup(data->cookies);
 1630|      0|    }
 1631|       |    /* disable the cookie engine */
 1632|      0|    data->cookies = NULL;
 1633|      0|  }
 1634|  15.3k|  return CURLE_OK;
 1635|  15.3k|}
setopt.c:cookielist:
 1548|  1.68k|{
 1549|  1.68k|  CURLcode result = CURLE_OK;
 1550|  1.68k|  if(!ptr)
  ------------------
  |  Branch (1550:6): [True: 0, False: 1.68k]
  ------------------
 1551|      0|    return CURLE_OK;
 1552|       |
 1553|  1.68k|  if(curl_strequal(ptr, "ALL")) {
  ------------------
  |  Branch (1553:6): [True: 2, False: 1.68k]
  ------------------
 1554|       |    /* clear all cookies */
 1555|      2|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1556|      2|    Curl_cookie_clearall(data->cookies);
 1557|      2|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1558|      2|  }
 1559|  1.68k|  else if(curl_strequal(ptr, "SESS")) {
  ------------------
  |  Branch (1559:11): [True: 1, False: 1.68k]
  ------------------
 1560|       |    /* clear session cookies */
 1561|      1|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1562|      1|    Curl_cookie_clearsess(data->cookies);
 1563|      1|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1564|      1|  }
 1565|  1.68k|  else if(curl_strequal(ptr, "FLUSH")) {
  ------------------
  |  Branch (1565:11): [True: 2, False: 1.67k]
  ------------------
 1566|       |    /* flush cookies to file, takes care of the locking */
 1567|      2|    Curl_flush_cookies(data, FALSE);
  ------------------
  |  | 1058|      2|#define FALSE false
  ------------------
 1568|      2|  }
 1569|  1.67k|  else if(curl_strequal(ptr, "RELOAD")) {
  ------------------
  |  Branch (1569:11): [True: 2, False: 1.67k]
  ------------------
 1570|       |    /* reload cookies from file */
 1571|      2|    return Curl_cookie_loadfiles(data);
 1572|      2|  }
 1573|  1.67k|  else {
 1574|  1.67k|    if(!data->cookies) {
  ------------------
  |  Branch (1574:8): [True: 1.67k, False: 0]
  ------------------
 1575|       |      /* if cookie engine was not running, activate it */
 1576|  1.67k|      data->cookies = Curl_cookie_init();
 1577|  1.67k|      if(!data->cookies)
  ------------------
  |  Branch (1577:10): [True: 0, False: 1.67k]
  ------------------
 1578|      0|        return CURLE_OUT_OF_MEMORY;
 1579|  1.67k|      data->state.cookie_engine = TRUE;
  ------------------
  |  | 1055|  1.67k|#define TRUE true
  ------------------
 1580|  1.67k|    }
 1581|       |
 1582|       |    /* general protection against mistakes and abuse */
 1583|  1.67k|    if(strlen(ptr) > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  1.67k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1583:8): [True: 0, False: 1.67k]
  ------------------
 1584|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1585|       |
 1586|  1.67k|    Curl_share_lock(data, CURL_LOCK_DATA_COOKIE, CURL_LOCK_ACCESS_SINGLE);
 1587|  1.67k|    if(checkprefix("Set-Cookie:", ptr))
  ------------------
  |  |   33|  1.67k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  1.67k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1.14k, False: 536]
  |  |  ------------------
  ------------------
 1588|       |      /* HTTP Header format line */
 1589|  1.14k|      result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11,
  ------------------
  |  | 1055|  1.14k|#define TRUE true
  ------------------
                    result = Curl_cookie_add(data, data->cookies, TRUE, FALSE, ptr + 11,
  ------------------
  |  | 1058|  1.14k|#define FALSE false
  ------------------
 1590|  1.14k|                               NULL, NULL, TRUE);
  ------------------
  |  | 1055|  1.14k|#define TRUE true
  ------------------
 1591|    536|    else
 1592|       |      /* Netscape format line */
 1593|    536|      result = Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL,
  ------------------
  |  | 1058|    536|#define FALSE false
  ------------------
                    result = Curl_cookie_add(data, data->cookies, FALSE, FALSE, ptr, NULL,
  ------------------
  |  | 1058|    536|#define FALSE false
  ------------------
 1594|    536|                               NULL, TRUE);
  ------------------
  |  | 1055|    536|#define TRUE true
  ------------------
 1595|  1.67k|    Curl_share_unlock(data, CURL_LOCK_DATA_COOKIE);
 1596|  1.67k|  }
 1597|  1.68k|  return result;
 1598|  1.68k|}
setopt.c:setstropt_userpwd:
  134|    391|{
  135|    391|  char *user = NULL;
  136|    391|  char *passwd = NULL;
  137|       |
  138|    391|  DEBUGASSERT(userp);
  ------------------
  |  | 1081|    391|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (138:3): [True: 0, False: 391]
  |  Branch (138:3): [True: 391, False: 0]
  ------------------
  139|    391|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1081|    391|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (139:3): [True: 0, False: 391]
  |  Branch (139:3): [True: 391, False: 0]
  ------------------
  140|       |
  141|       |  /* Parse the login details if specified. If not, then we treat NULL as a
  142|       |     hint to clear the existing data */
  143|    391|  if(option) {
  ------------------
  |  Branch (143:6): [True: 391, False: 0]
  ------------------
  144|    391|    size_t len = strlen(option);
  145|    391|    CURLcode result;
  146|    391|    if(len > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|    391|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (146:8): [True: 0, False: 391]
  ------------------
  147|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
  148|       |
  149|    391|    result = Curl_parse_login_details(option, len, &user, &passwd, NULL);
  150|    391|    if(result)
  ------------------
  |  Branch (150:8): [True: 0, False: 391]
  ------------------
  151|      0|      return result;
  152|    391|  }
  153|       |
  154|    391|  curlx_free(*userp);
  ------------------
  |  | 1483|    391|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  155|    391|  *userp = user;
  156|       |
  157|    391|  curlx_free(*passwdp);
  ------------------
  |  | 1483|    391|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  158|    391|  *passwdp = passwd;
  159|       |
  160|    391|  return CURLE_OK;
  161|    391|}
setopt.c:setstropt_interface:
  165|    262|{
  166|    262|  char *dev = NULL;
  167|    262|  char *iface = NULL;
  168|    262|  char *host = NULL;
  169|    262|  CURLcode result;
  170|       |
  171|    262|  DEBUGASSERT(devp);
  ------------------
  |  | 1081|    262|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (171:3): [True: 0, False: 262]
  |  Branch (171:3): [True: 262, False: 0]
  ------------------
  172|    262|  DEBUGASSERT(ifacep);
  ------------------
  |  | 1081|    262|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (172:3): [True: 0, False: 262]
  |  Branch (172:3): [True: 262, False: 0]
  ------------------
  173|    262|  DEBUGASSERT(hostp);
  ------------------
  |  | 1081|    262|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (173:3): [True: 0, False: 262]
  |  Branch (173:3): [True: 262, False: 0]
  ------------------
  174|       |
  175|    262|  if(option) {
  ------------------
  |  Branch (175:6): [True: 262, False: 0]
  ------------------
  176|       |    /* Parse the interface details if set, otherwise clear them all */
  177|    262|    result = Curl_parse_interface(option, &dev, &iface, &host);
  178|    262|    if(result)
  ------------------
  |  Branch (178:8): [True: 6, False: 256]
  ------------------
  179|      6|      return result;
  180|    262|  }
  181|    256|  curlx_free(*devp);
  ------------------
  |  | 1483|    256|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  182|    256|  *devp = dev;
  183|       |
  184|    256|  curlx_free(*ifacep);
  ------------------
  |  | 1483|    256|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  185|    256|  *ifacep = iface;
  186|       |
  187|    256|  curlx_free(*hostp);
  ------------------
  |  | 1483|    256|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  188|    256|  *hostp = host;
  189|       |
  190|    256|  return CURLE_OK;
  191|    262|}
setopt.c:protocol2num:
  199|  16.8k|{
  200|       |  /*
  201|       |   * We are asked to cherry-pick protocols, so play it safe and disallow all
  202|       |   * protocols to start with, and re-add the wanted ones back in.
  203|       |   */
  204|  16.8k|  *val = 0;
  205|       |
  206|  16.8k|  if(!str)
  ------------------
  |  Branch (206:6): [True: 0, False: 16.8k]
  ------------------
  207|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  208|       |
  209|  16.8k|  if(curl_strequal(str, "all")) {
  ------------------
  |  Branch (209:6): [True: 1.44k, False: 15.3k]
  ------------------
  210|  1.44k|    *val = ~(curl_prot_t)0;
  211|  1.44k|    return CURLE_OK;
  212|  1.44k|  }
  213|       |
  214|  15.6k|  do {
  215|  15.6k|    const char *token = str;
  216|  15.6k|    size_t tlen;
  217|       |
  218|  15.6k|    str = strchr(str, ',');
  219|  15.6k|    tlen = str ? (size_t)(str - token) : strlen(token);
  ------------------
  |  Branch (219:12): [True: 315, False: 15.3k]
  ------------------
  220|  15.6k|    if(tlen) {
  ------------------
  |  Branch (220:8): [True: 15.4k, False: 251]
  ------------------
  221|  15.4k|      const struct Curl_scheme *h = Curl_getn_scheme(token, tlen);
  222|       |
  223|  15.4k|      if(!h || !h->run)
  ------------------
  |  Branch (223:10): [True: 16, False: 15.4k]
  |  Branch (223:16): [True: 1, False: 15.4k]
  ------------------
  224|     17|        return CURLE_UNSUPPORTED_PROTOCOL;
  225|       |
  226|  15.4k|      *val |= h->protocol;
  227|  15.4k|    }
  228|  15.6k|  } while(str && str++);
  ------------------
  |  Branch (228:11): [True: 313, False: 15.3k]
  |  Branch (228:18): [True: 313, False: 0]
  ------------------
  229|       |
  230|  15.3k|  if(!*val)
  ------------------
  |  Branch (230:6): [True: 11, False: 15.3k]
  ------------------
  231|       |    /* no protocol listed */
  232|     11|    return CURLE_BAD_FUNCTION_ARGUMENT;
  233|  15.3k|  return CURLE_OK;
  234|  15.3k|}
setopt.c:setopt_func:
 2548|  62.1k|{
 2549|  62.1k|  struct UserDefined *s = &data->set;
 2550|  62.1k|  switch(option) {
 2551|      0|  case CURLOPT_PROGRESSFUNCTION:
  ------------------
  |  Branch (2551:3): [True: 0, False: 62.1k]
  ------------------
 2552|       |    /*
 2553|       |     * Progress callback function
 2554|       |     */
 2555|      0|    s->fprogress = va_arg(param, curl_progress_callback);
 2556|      0|    if(s->fprogress)
  ------------------
  |  Branch (2556:8): [True: 0, False: 0]
  ------------------
 2557|      0|      data->progress.callback = TRUE; /* no longer internal */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2558|      0|    else
 2559|      0|      data->progress.callback = FALSE; /* NULL enforces internal */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2560|      0|    break;
 2561|       |
 2562|      0|  case CURLOPT_XFERINFOFUNCTION:
  ------------------
  |  Branch (2562:3): [True: 0, False: 62.1k]
  ------------------
 2563|       |    /*
 2564|       |     * Transfer info callback function
 2565|       |     */
 2566|      0|    s->fxferinfo = va_arg(param, curl_xferinfo_callback);
 2567|      0|    if(s->fxferinfo)
  ------------------
  |  Branch (2567:8): [True: 0, False: 0]
  ------------------
 2568|      0|      data->progress.callback = TRUE; /* no longer internal */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2569|      0|    else
 2570|      0|      data->progress.callback = FALSE; /* NULL enforces internal */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2571|       |
 2572|      0|    break;
 2573|      0|  case CURLOPT_DEBUGFUNCTION:
  ------------------
  |  Branch (2573:3): [True: 0, False: 62.1k]
  ------------------
 2574|       |    /*
 2575|       |     * stderr write callback.
 2576|       |     */
 2577|      0|    s->fdebug = va_arg(param, curl_debug_callback);
 2578|       |    /*
 2579|       |     * if the callback provided is NULL, it will use the default callback
 2580|       |     */
 2581|      0|    break;
 2582|      0|  case CURLOPT_HEADERFUNCTION:
  ------------------
  |  Branch (2582:3): [True: 0, False: 62.1k]
  ------------------
 2583|       |    /*
 2584|       |     * Set header write callback
 2585|       |     */
 2586|      0|    s->fwrite_header = va_arg(param, curl_write_callback);
 2587|      0|    break;
 2588|  16.1k|  case CURLOPT_WRITEFUNCTION:
  ------------------
  |  Branch (2588:3): [True: 16.1k, False: 46.0k]
  ------------------
 2589|       |    /*
 2590|       |     * Set data write callback
 2591|       |     */
 2592|  16.1k|    s->fwrite_func = va_arg(param, curl_write_callback);
 2593|  16.1k|    if(!s->fwrite_func)
  ------------------
  |  Branch (2593:8): [True: 0, False: 16.1k]
  ------------------
 2594|      0|#if defined(__clang__) && __clang_major__ >= 16
 2595|      0|#pragma clang diagnostic push
 2596|      0|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
 2597|      0|#endif
 2598|       |      /* When set to NULL, reset to our internal default function */
 2599|      0|      s->fwrite_func = (curl_write_callback)fwrite;
 2600|  16.1k|#if defined(__clang__) && __clang_major__ >= 16
 2601|  16.1k|#pragma clang diagnostic pop
 2602|  16.1k|#endif
 2603|  16.1k|    break;
 2604|  15.3k|  case CURLOPT_READFUNCTION:
  ------------------
  |  Branch (2604:3): [True: 15.3k, False: 46.7k]
  ------------------
 2605|       |    /*
 2606|       |     * Read data callback
 2607|       |     */
 2608|  15.3k|    s->fread_func_set = va_arg(param, curl_read_callback);
 2609|  15.3k|    if(!s->fread_func_set) {
  ------------------
  |  Branch (2609:8): [True: 0, False: 15.3k]
  ------------------
 2610|      0|      s->is_fread_set = 0;
 2611|      0|#if defined(__clang__) && __clang_major__ >= 16
 2612|      0|#pragma clang diagnostic push
 2613|      0|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
 2614|      0|#endif
 2615|       |      /* When set to NULL, reset to our internal default function */
 2616|      0|      s->fread_func_set = (curl_read_callback)fread;
 2617|      0|#if defined(__clang__) && __clang_major__ >= 16
 2618|      0|#pragma clang diagnostic pop
 2619|      0|#endif
 2620|      0|    }
 2621|  15.3k|    else
 2622|  15.3k|      s->is_fread_set = 1;
 2623|  15.3k|    break;
 2624|      0|  case CURLOPT_SEEKFUNCTION:
  ------------------
  |  Branch (2624:3): [True: 0, False: 62.1k]
  ------------------
 2625|       |    /*
 2626|       |     * Seek callback. Might be NULL.
 2627|       |     */
 2628|      0|    s->seek_func = va_arg(param, curl_seek_callback);
 2629|      0|    break;
 2630|      0|  case CURLOPT_IOCTLFUNCTION:
  ------------------
  |  Branch (2630:3): [True: 0, False: 62.1k]
  ------------------
 2631|       |    /*
 2632|       |     * I/O control callback. Might be NULL.
 2633|       |     */
 2634|      0|    s->ioctl_func = va_arg(param, curl_ioctl_callback);
 2635|      0|    break;
 2636|      0|  case CURLOPT_SSL_CTX_FUNCTION:
  ------------------
  |  Branch (2636:3): [True: 0, False: 62.1k]
  ------------------
 2637|       |    /*
 2638|       |     * Set an SSL_CTX callback
 2639|       |     */
 2640|      0|#ifdef USE_SSL
 2641|      0|    if(Curl_ssl_supports(data, SSLSUPP_SSL_CTX)) {
  ------------------
  |  |   38|      0|#define SSLSUPP_SSL_CTX      (1 << 3) /* supports CURLOPT_SSL_CTX */
  ------------------
  |  Branch (2641:8): [True: 0, False: 0]
  ------------------
 2642|      0|      s->ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback);
 2643|      0|      break;
 2644|      0|    }
 2645|      0|    else
 2646|      0|#endif
 2647|      0|      return CURLE_NOT_BUILT_IN;
 2648|       |
 2649|  15.3k|  case CURLOPT_SOCKOPTFUNCTION:
  ------------------
  |  Branch (2649:3): [True: 15.3k, False: 46.7k]
  ------------------
 2650|       |    /*
 2651|       |     * socket callback function: called after socket() but before connect()
 2652|       |     */
 2653|  15.3k|    s->fsockopt = va_arg(param, curl_sockopt_callback);
 2654|  15.3k|    break;
 2655|       |
 2656|  15.3k|  case CURLOPT_OPENSOCKETFUNCTION:
  ------------------
  |  Branch (2656:3): [True: 15.3k, False: 46.7k]
  ------------------
 2657|       |    /*
 2658|       |     * open/create socket callback function: called instead of socket(),
 2659|       |     * before connect()
 2660|       |     */
 2661|  15.3k|    s->fopensocket = va_arg(param, curl_opensocket_callback);
 2662|  15.3k|    break;
 2663|       |
 2664|      0|  case CURLOPT_CLOSESOCKETFUNCTION:
  ------------------
  |  Branch (2664:3): [True: 0, False: 62.1k]
  ------------------
 2665|       |    /*
 2666|       |     * close socket callback function: called instead of close()
 2667|       |     * when shutting down a connection
 2668|       |     */
 2669|      0|    s->fclosesocket = va_arg(param, curl_closesocket_callback);
 2670|      0|    break;
 2671|       |
 2672|      0|  case CURLOPT_RESOLVER_START_FUNCTION:
  ------------------
  |  Branch (2672:3): [True: 0, False: 62.1k]
  ------------------
 2673|       |    /*
 2674|       |     * resolver start callback function: called before a new resolver request
 2675|       |     * is started
 2676|       |     */
 2677|      0|    s->resolver_start = va_arg(param, curl_resolver_start_callback);
 2678|      0|    break;
 2679|       |
 2680|       |#ifdef USE_SSH
 2681|       |#ifdef USE_LIBSSH2
 2682|       |  case CURLOPT_SSH_HOSTKEYFUNCTION:
 2683|       |    /* the callback to check the hostkey without the knownhost file */
 2684|       |    s->ssh_hostkeyfunc = va_arg(param, curl_sshhostkeycallback);
 2685|       |    break;
 2686|       |#endif
 2687|       |
 2688|       |  case CURLOPT_SSH_KEYFUNCTION:
 2689|       |    /* setting to NULL is fine since the ssh.c functions themselves will
 2690|       |       then revert to use the internal default */
 2691|       |    s->ssh_keyfunc = va_arg(param, curl_sshkeycallback);
 2692|       |    break;
 2693|       |
 2694|       |#endif /* USE_SSH */
 2695|       |
 2696|      0|#ifndef CURL_DISABLE_RTSP
 2697|      0|  case CURLOPT_INTERLEAVEFUNCTION:
  ------------------
  |  Branch (2697:3): [True: 0, False: 62.1k]
  ------------------
 2698|       |    /* Set the user defined RTP write function */
 2699|      0|    s->fwrite_rtp = va_arg(param, curl_write_callback);
 2700|      0|    break;
 2701|      0|#endif
 2702|      0|#ifndef CURL_DISABLE_FTP
 2703|      0|  case CURLOPT_CHUNK_BGN_FUNCTION:
  ------------------
  |  Branch (2703:3): [True: 0, False: 62.1k]
  ------------------
 2704|      0|    s->chunk_bgn = va_arg(param, curl_chunk_bgn_callback);
 2705|      0|    break;
 2706|      0|  case CURLOPT_CHUNK_END_FUNCTION:
  ------------------
  |  Branch (2706:3): [True: 0, False: 62.1k]
  ------------------
 2707|      0|    s->chunk_end = va_arg(param, curl_chunk_end_callback);
 2708|      0|    break;
 2709|      0|  case CURLOPT_FNMATCH_FUNCTION:
  ------------------
  |  Branch (2709:3): [True: 0, False: 62.1k]
  ------------------
 2710|      0|    s->fnmatch = va_arg(param, curl_fnmatch_callback);
 2711|      0|    break;
 2712|      0|#endif
 2713|      0|#ifndef CURL_DISABLE_HTTP
 2714|      0|  case CURLOPT_TRAILERFUNCTION:
  ------------------
  |  Branch (2714:3): [True: 0, False: 62.1k]
  ------------------
 2715|      0|    s->trailer_callback = va_arg(param, curl_trailer_callback);
 2716|      0|    break;
 2717|      0|#endif
 2718|      0|#ifndef CURL_DISABLE_HSTS
 2719|      0|  case CURLOPT_HSTSREADFUNCTION:
  ------------------
  |  Branch (2719:3): [True: 0, False: 62.1k]
  ------------------
 2720|      0|    s->hsts_read = va_arg(param, curl_hstsread_callback);
 2721|      0|    break;
 2722|      0|  case CURLOPT_HSTSWRITEFUNCTION:
  ------------------
  |  Branch (2722:3): [True: 0, False: 62.1k]
  ------------------
 2723|      0|    s->hsts_write = va_arg(param, curl_hstswrite_callback);
 2724|      0|    break;
 2725|      0|#endif
 2726|      0|  case CURLOPT_PREREQFUNCTION:
  ------------------
  |  Branch (2726:3): [True: 0, False: 62.1k]
  ------------------
 2727|      0|    s->fprereq = va_arg(param, curl_prereq_callback);
 2728|      0|    break;
 2729|      0|  default:
  ------------------
  |  Branch (2729:3): [True: 0, False: 62.1k]
  ------------------
 2730|      0|    return CURLE_UNKNOWN_OPTION;
 2731|  62.1k|  }
 2732|  62.1k|  return CURLE_OK;
 2733|  62.1k|}
setopt.c:setopt_offt:
 2737|  2.71k|{
 2738|  2.71k|  struct UserDefined *s = &data->set;
 2739|  2.71k|  switch(option) {
 2740|      5|  case CURLOPT_TIMEVALUE_LARGE:
  ------------------
  |  Branch (2740:3): [True: 5, False: 2.71k]
  ------------------
 2741|       |    /*
 2742|       |     * This is the value to compare with the remote document with the
 2743|       |     * method set with CURLOPT_TIMECONDITION
 2744|       |     */
 2745|      5|    s->timevalue = (time_t)offt;
 2746|      5|    break;
 2747|       |
 2748|       |    /* MQTT "borrows" some of the HTTP options */
 2749|      0|  case CURLOPT_POSTFIELDSIZE_LARGE:
  ------------------
  |  Branch (2749:3): [True: 0, False: 2.71k]
  ------------------
 2750|       |    /*
 2751|       |     * The size of the POSTFIELD data to prevent libcurl to do strlen() to
 2752|       |     * figure it out. Enables binary posts.
 2753|       |     */
 2754|      0|    if(offt < -1)
  ------------------
  |  Branch (2754:8): [True: 0, False: 0]
  ------------------
 2755|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2756|       |
 2757|      0|    if(s->postfieldsize < offt &&
  ------------------
  |  Branch (2757:8): [True: 0, False: 0]
  ------------------
 2758|      0|       s->postfields == s->str[STRING_COPYPOSTFIELDS]) {
  ------------------
  |  Branch (2758:8): [True: 0, False: 0]
  ------------------
 2759|       |      /* Previous CURLOPT_COPYPOSTFIELDS is no longer valid. */
 2760|      0|      curlx_safefree(s->str[STRING_COPYPOSTFIELDS]);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2761|      0|      s->postfields = NULL;
 2762|      0|    }
 2763|      0|    s->postfieldsize = offt;
 2764|      0|    break;
 2765|    275|  case CURLOPT_INFILESIZE_LARGE:
  ------------------
  |  Branch (2765:3): [True: 275, False: 2.44k]
  ------------------
 2766|       |    /*
 2767|       |     * If known, this should inform curl about the file size of the
 2768|       |     * to-be-uploaded file.
 2769|       |     */
 2770|    275|    if(offt < -1)
  ------------------
  |  Branch (2770:8): [True: 0, False: 275]
  ------------------
 2771|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2772|    275|    s->filesize = offt;
 2773|    275|    break;
 2774|    325|  case CURLOPT_MAX_SEND_SPEED_LARGE:
  ------------------
  |  Branch (2774:3): [True: 325, False: 2.39k]
  ------------------
 2775|       |    /*
 2776|       |     * When transfer uploads are faster then CURLOPT_MAX_SEND_SPEED_LARGE
 2777|       |     * bytes per second the transfer is throttled..
 2778|       |     */
 2779|    325|    if(offt < 0)
  ------------------
  |  Branch (2779:8): [True: 0, False: 325]
  ------------------
 2780|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2781|    325|    s->max_send_speed = offt;
 2782|    325|    Curl_rlimit_init(&data->progress.ul.rlimit, offt, offt,
 2783|    325|                     Curl_pgrs_now(data));
 2784|    325|    break;
 2785|  1.71k|  case CURLOPT_MAX_RECV_SPEED_LARGE:
  ------------------
  |  Branch (2785:3): [True: 1.71k, False: 1.00k]
  ------------------
 2786|       |    /*
 2787|       |     * When receiving data faster than CURLOPT_MAX_RECV_SPEED_LARGE bytes per
 2788|       |     * second the transfer is throttled..
 2789|       |     */
 2790|  1.71k|    if(offt < 0)
  ------------------
  |  Branch (2790:8): [True: 0, False: 1.71k]
  ------------------
 2791|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2792|  1.71k|    s->max_recv_speed = offt;
 2793|  1.71k|    Curl_rlimit_init(&data->progress.dl.rlimit, offt, offt,
 2794|  1.71k|                     Curl_pgrs_now(data));
 2795|  1.71k|    break;
 2796|    311|  case CURLOPT_RESUME_FROM_LARGE:
  ------------------
  |  Branch (2796:3): [True: 311, False: 2.40k]
  ------------------
 2797|       |    /*
 2798|       |     * Resume transfer at the given file position
 2799|       |     */
 2800|    311|    if(offt < -1)
  ------------------
  |  Branch (2800:8): [True: 0, False: 311]
  ------------------
 2801|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2802|    311|    s->set_resume_from = offt;
 2803|    311|    break;
 2804|     87|  case CURLOPT_MAXFILESIZE_LARGE:
  ------------------
  |  Branch (2804:3): [True: 87, False: 2.63k]
  ------------------
 2805|       |    /*
 2806|       |     * Set the maximum size of a file to download.
 2807|       |     */
 2808|     87|    if(offt < 0)
  ------------------
  |  Branch (2808:8): [True: 0, False: 87]
  ------------------
 2809|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 2810|     87|    s->max_filesize = offt;
 2811|     87|    break;
 2812|       |
 2813|      0|  default:
  ------------------
  |  Branch (2813:3): [True: 0, False: 2.71k]
  ------------------
 2814|      0|    return CURLE_UNKNOWN_OPTION;
 2815|  2.71k|  }
 2816|  2.71k|  return CURLE_OK;
 2817|  2.71k|}

Curl_sha256it:
  487|  5.36k|{
  488|  5.36k|  CURLcode result;
  489|  5.36k|  my_sha256_ctx ctx;
  490|       |
  491|  5.36k|  result = my_sha256_init(&ctx);
  492|  5.36k|  if(!result) {
  ------------------
  |  Branch (492:6): [True: 5.36k, False: 0]
  ------------------
  493|  5.36k|    do {
  494|  5.36k|      unsigned int ilen = (unsigned int)CURLMIN(len, UINT_MAX);
  ------------------
  |  | 1287|  5.36k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 5.36k, False: 0]
  |  |  ------------------
  ------------------
  495|  5.36k|      my_sha256_update(&ctx, input, ilen);
  496|  5.36k|      len -= ilen;
  497|  5.36k|      input += ilen;
  498|  5.36k|    } while(len);
  ------------------
  |  Branch (498:13): [True: 0, False: 5.36k]
  ------------------
  499|  5.36k|    my_sha256_final(output, &ctx);
  500|  5.36k|  }
  501|  5.36k|  return result;
  502|  5.36k|}
sha256.c:my_sha256_init:
   62|  32.2k|{
   63|  32.2k|  my_sha256_ctx *ctx = (my_sha256_ctx *)in;
   64|  32.2k|  ctx->openssl_ctx = EVP_MD_CTX_create();
   65|  32.2k|  if(!ctx->openssl_ctx)
  ------------------
  |  Branch (65:6): [True: 0, False: 32.2k]
  ------------------
   66|      0|    return CURLE_OUT_OF_MEMORY;
   67|       |
   68|  32.2k|  if(!EVP_DigestInit_ex(ctx->openssl_ctx, EVP_sha256(), NULL)) {
  ------------------
  |  Branch (68:6): [True: 0, False: 32.2k]
  ------------------
   69|      0|    EVP_MD_CTX_destroy(ctx->openssl_ctx);
   70|      0|    return CURLE_FAILED_INIT;
   71|      0|  }
   72|  32.2k|  return CURLE_OK;
   73|  32.2k|}
sha256.c:my_sha256_update:
   78|  1.74M|{
   79|  1.74M|  my_sha256_ctx *ctx = (my_sha256_ctx *)in;
   80|  1.74M|  EVP_DigestUpdate(ctx->openssl_ctx, data, length);
   81|  1.74M|}
sha256.c:my_sha256_final:
   84|  32.2k|{
   85|  32.2k|  my_sha256_ctx *ctx = (my_sha256_ctx *)in;
   86|  32.2k|  EVP_DigestFinal_ex(ctx->openssl_ctx, digest, NULL);
   87|       |  EVP_MD_CTX_destroy(ctx->openssl_ctx);
   88|  32.2k|}

easy.c:sigpipe_ignore:
   49|  17.1k|{
   50|       |  /* get a local copy of no_signal because the Curl_easy might not be
   51|       |     around when we restore */
   52|  17.1k|  ig->no_signal = data->set.no_signal;
   53|  17.1k|  if(!data->set.no_signal) {
  ------------------
  |  Branch (53:6): [True: 17.1k, False: 15]
  ------------------
   54|  17.1k|    struct sigaction action;
   55|       |    /* first, extract the existing situation */
   56|  17.1k|    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
   57|  17.1k|    action = ig->old_pipe_act;
   58|       |    /* ignore this signal */
   59|  17.1k|    action.sa_handler = SIG_IGN;
   60|  17.1k|#ifdef SA_SIGINFO
   61|       |    /* clear SA_SIGINFO flag since we are using sa_handler */
   62|  17.1k|    action.sa_flags &= ~SA_SIGINFO;
   63|  17.1k|#endif
   64|  17.1k|    sigaction(SIGPIPE, &action, NULL);
   65|  17.1k|  }
   66|  17.1k|}
easy.c:sigpipe_restore:
   74|  17.1k|{
   75|  17.1k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 17.1k, False: 15]
  ------------------
   76|       |    /* restore the outside state */
   77|  17.1k|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  17.1k|}
multi.c:sigpipe_init:
   37|   699k|{
   38|   699k|  memset(ig, 0, sizeof(*ig));
   39|       |  ig->no_signal = TRUE;
  ------------------
  |  | 1055|   699k|#define TRUE true
  ------------------
   40|   699k|}
multi.c:sigpipe_apply:
   82|  1.05M|{
   83|  1.05M|  if(data && (data->set.no_signal != ig->no_signal)) {
  ------------------
  |  Branch (83:6): [True: 1.05M, False: 0]
  |  Branch (83:14): [True: 480k, False: 574k]
  ------------------
   84|   480k|    sigpipe_restore(ig);
   85|   480k|    sigpipe_ignore(data, ig);
   86|   480k|  }
   87|  1.05M|}
multi.c:sigpipe_ignore:
   49|   480k|{
   50|       |  /* get a local copy of no_signal because the Curl_easy might not be
   51|       |     around when we restore */
   52|   480k|  ig->no_signal = data->set.no_signal;
   53|   480k|  if(!data->set.no_signal) {
  ------------------
  |  Branch (53:6): [True: 480k, False: 0]
  ------------------
   54|   480k|    struct sigaction action;
   55|       |    /* first, extract the existing situation */
   56|   480k|    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
   57|   480k|    action = ig->old_pipe_act;
   58|       |    /* ignore this signal */
   59|   480k|    action.sa_handler = SIG_IGN;
   60|   480k|#ifdef SA_SIGINFO
   61|       |    /* clear SA_SIGINFO flag since we are using sa_handler */
   62|   480k|    action.sa_flags &= ~SA_SIGINFO;
   63|   480k|#endif
   64|   480k|    sigaction(SIGPIPE, &action, NULL);
   65|   480k|  }
   66|   480k|}
multi.c:sigpipe_restore:
   74|  1.18M|{
   75|  1.18M|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 480k, False: 699k]
  ------------------
   76|       |    /* restore the outside state */
   77|   480k|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  1.18M|}
conncache.c:sigpipe_init:
   37|  15.3k|{
   38|  15.3k|  memset(ig, 0, sizeof(*ig));
   39|       |  ig->no_signal = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
   40|  15.3k|}
conncache.c:sigpipe_apply:
   82|  1.48k|{
   83|  1.48k|  if(data && (data->set.no_signal != ig->no_signal)) {
  ------------------
  |  Branch (83:6): [True: 1.48k, False: 0]
  |  Branch (83:14): [True: 1.48k, False: 1]
  ------------------
   84|  1.48k|    sigpipe_restore(ig);
   85|  1.48k|    sigpipe_ignore(data, ig);
   86|  1.48k|  }
   87|  1.48k|}
conncache.c:sigpipe_ignore:
   49|  1.48k|{
   50|       |  /* get a local copy of no_signal because the Curl_easy might not be
   51|       |     around when we restore */
   52|  1.48k|  ig->no_signal = data->set.no_signal;
   53|  1.48k|  if(!data->set.no_signal) {
  ------------------
  |  Branch (53:6): [True: 1.48k, False: 0]
  ------------------
   54|  1.48k|    struct sigaction action;
   55|       |    /* first, extract the existing situation */
   56|  1.48k|    sigaction(SIGPIPE, NULL, &ig->old_pipe_act);
   57|  1.48k|    action = ig->old_pipe_act;
   58|       |    /* ignore this signal */
   59|  1.48k|    action.sa_handler = SIG_IGN;
   60|  1.48k|#ifdef SA_SIGINFO
   61|       |    /* clear SA_SIGINFO flag since we are using sa_handler */
   62|  1.48k|    action.sa_flags &= ~SA_SIGINFO;
   63|  1.48k|#endif
   64|  1.48k|    sigaction(SIGPIPE, &action, NULL);
   65|  1.48k|  }
   66|  1.48k|}
conncache.c:sigpipe_restore:
   74|  16.8k|{
   75|  16.8k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 1.48k, False: 15.3k]
  ------------------
   76|       |    /* restore the outside state */
   77|  1.48k|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  16.8k|}
cshutdn.c:sigpipe_init:
   37|  15.3k|{
   38|  15.3k|  memset(ig, 0, sizeof(*ig));
   39|       |  ig->no_signal = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
   40|  15.3k|}
cshutdn.c:sigpipe_restore:
   74|  15.3k|{
   75|  15.3k|  if(!ig->no_signal)
  ------------------
  |  Branch (75:6): [True: 0, False: 15.3k]
  ------------------
   76|       |    /* restore the outside state */
   77|      0|    sigaction(SIGPIPE, &ig->old_pipe_act, NULL);
   78|  15.3k|}

Curl_slist_append_nodup:
   56|  78.3k|{
   57|  78.3k|  struct curl_slist *last;
   58|  78.3k|  struct curl_slist *new_item;
   59|       |
   60|  78.3k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  78.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (60:3): [True: 0, False: 78.3k]
  |  Branch (60:3): [True: 78.3k, False: 0]
  ------------------
   61|       |
   62|  78.3k|  new_item = curlx_malloc(sizeof(struct curl_slist));
  ------------------
  |  | 1478|  78.3k|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
   63|  78.3k|  if(!new_item)
  ------------------
  |  Branch (63:6): [True: 0, False: 78.3k]
  ------------------
   64|      0|    return NULL;
   65|       |
   66|  78.3k|  new_item->next = NULL;
   67|  78.3k|  new_item->data = CURL_UNCONST(data);
  ------------------
  |  |  866|  78.3k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
   68|       |
   69|       |  /* if this is the first item, then new_item *is* the list */
   70|  78.3k|  if(!list)
  ------------------
  |  Branch (70:6): [True: 50.4k, False: 27.8k]
  ------------------
   71|  50.4k|    return new_item;
   72|       |
   73|  27.8k|  last = slist_get_last(list);
   74|  27.8k|  last->next = new_item;
   75|  27.8k|  return list;
   76|  78.3k|}
curl_slist_append:
   86|  69.2k|{
   87|  69.2k|  char *dupdata = curlx_strdup(data);
  ------------------
  |  | 1477|  69.2k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
   88|       |
   89|  69.2k|  if(!dupdata)
  ------------------
  |  Branch (89:6): [True: 0, False: 69.2k]
  ------------------
   90|      0|    return NULL;
   91|       |
   92|  69.2k|  list = Curl_slist_append_nodup(list, dupdata);
   93|  69.2k|  if(!list)
  ------------------
  |  Branch (93:6): [True: 0, False: 69.2k]
  ------------------
   94|      0|    curlx_free(dupdata);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   95|       |
   96|  69.2k|  return list;
   97|  69.2k|}
curl_slist_free_all:
  125|  89.5k|{
  126|  89.5k|  struct curl_slist *next;
  127|  89.5k|  struct curl_slist *item;
  128|       |
  129|  89.5k|  if(!list)
  ------------------
  |  Branch (129:6): [True: 39.0k, False: 50.4k]
  ------------------
  130|  39.0k|    return;
  131|       |
  132|  50.4k|  item = list;
  133|  74.3k|  do {
  134|  74.3k|    next = item->next;
  135|  74.3k|    curlx_safefree(item->data);
  ------------------
  |  | 1327|  74.3k|  do {                      \
  |  | 1328|  74.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  74.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  74.3k|    (ptr) = NULL;           \
  |  | 1330|  74.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 74.3k]
  |  |  ------------------
  ------------------
  136|  74.3k|    curlx_free(item);
  ------------------
  |  | 1483|  74.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  137|  74.3k|    item = next;
  138|  74.3k|  } while(next);
  ------------------
  |  Branch (138:11): [True: 23.9k, False: 50.4k]
  ------------------
  139|  50.4k|}
slist.c:slist_get_last:
   30|  27.8k|{
   31|  27.8k|  struct curl_slist *item;
   32|       |
   33|       |  /* if caller passed us a NULL, return now */
   34|  27.8k|  if(!list)
  ------------------
  |  Branch (34:6): [True: 0, False: 27.8k]
  ------------------
   35|      0|    return NULL;
   36|       |
   37|       |  /* loop through to find the last item */
   38|  27.8k|  item = list;
   39|  9.80M|  while(item->next) {
  ------------------
  |  Branch (39:9): [True: 9.77M, False: 27.8k]
  ------------------
   40|  9.77M|    item = item->next;
   41|  9.77M|  }
   42|  27.8k|  return item;
   43|  27.8k|}

Curl_wakeup_init:
  284|  15.3k|{
  285|  15.3k|#ifdef USE_EVENTFD
  286|  15.3k|  return wakeup_eventfd(socks, nonblocking);
  287|       |#elif defined(HAVE_PIPE)
  288|       |  return wakeup_pipe(socks, nonblocking);
  289|       |#elif defined(HAVE_SOCKETPAIR)
  290|       |  return wakeup_socketpair(socks, nonblocking);
  291|       |#else
  292|       |  return wakeup_inet(socks, nonblocking);
  293|       |#endif
  294|  15.3k|}
Curl_wakeup_signal:
  311|    621|{
  312|    621|  int err = 0;
  313|    621|#ifdef USE_EVENTFD
  314|    621|  const uint64_t buf[1] = { 1 };
  315|       |#else
  316|       |  const char buf[1] = { 1 };
  317|       |#endif
  318|       |
  319|    621|  while(1) {
  ------------------
  |  Branch (319:9): [True: 621, Folded]
  ------------------
  320|    621|    err = 0;
  321|    621|    if(wakeup_write(socks[1], buf, sizeof(buf)) < 0) {
  ------------------
  |  |  298|    621|#define wakeup_write        write
  ------------------
  |  Branch (321:8): [True: 0, False: 621]
  ------------------
  322|      0|      err = SOCKERRNO;
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  323|       |#ifdef USE_WINSOCK
  324|       |      if(err == SOCKEWOULDBLOCK)
  325|       |        err = 0; /* wakeup is already ongoing */
  326|       |#else
  327|      0|      if(SOCKEINTR == err)
  ------------------
  |  | 1129|      0|#define SOCKEINTR         EINTR
  ------------------
  |  Branch (327:10): [True: 0, False: 0]
  ------------------
  328|      0|        continue;
  329|      0|      if((err == SOCKEWOULDBLOCK) || (err == EAGAIN))
  ------------------
  |  | 1137|      0|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
  |  Branch (329:10): [True: 0, False: 0]
  |  Branch (329:38): [True: 0, False: 0]
  ------------------
  330|      0|        err = 0; /* wakeup is already ongoing */
  331|      0|#endif
  332|      0|    }
  333|    621|    break;
  334|    621|  }
  335|    621|  return err;
  336|    621|}
Curl_wakeup_consume:
  339|   699k|{
  340|   699k|  char buf[64];
  341|   699k|  ssize_t rc;
  342|   699k|  CURLcode result = CURLE_OK;
  343|       |
  344|   700k|  do {
  345|   700k|    rc = wakeup_read(socks[0], buf, sizeof(buf));
  ------------------
  |  |  299|   700k|#define wakeup_read         read
  ------------------
  346|   700k|    if(!rc)
  ------------------
  |  Branch (346:8): [True: 0, False: 700k]
  ------------------
  347|      0|      break;
  348|   700k|    else if(rc < 0) {
  ------------------
  |  Branch (348:13): [True: 699k, False: 429]
  ------------------
  349|       |#ifdef USE_WINSOCK
  350|       |      if(SOCKERRNO == SOCKEWOULDBLOCK)
  351|       |        break;
  352|       |#else
  353|   699k|      if(SOCKEINTR == SOCKERRNO)
  ------------------
  |  | 1129|   699k|#define SOCKEINTR         EINTR
  ------------------
                    if(SOCKEINTR == SOCKERRNO)
  ------------------
  |  | 1095|   699k|#define SOCKERRNO         errno
  ------------------
  |  Branch (353:10): [True: 0, False: 699k]
  ------------------
  354|      0|        continue;
  355|   699k|      if((SOCKERRNO == SOCKEWOULDBLOCK) || (SOCKERRNO == EAGAIN))
  ------------------
  |  | 1095|   699k|#define SOCKERRNO         errno
  ------------------
                    if((SOCKERRNO == SOCKEWOULDBLOCK) || (SOCKERRNO == EAGAIN))
  ------------------
  |  | 1137|   699k|#define SOCKEWOULDBLOCK   EWOULDBLOCK
  ------------------
                    if((SOCKERRNO == SOCKEWOULDBLOCK) || (SOCKERRNO == EAGAIN))
  ------------------
  |  | 1095|      0|#define SOCKERRNO         errno
  ------------------
  |  Branch (355:10): [True: 699k, False: 0]
  |  Branch (355:44): [True: 0, False: 0]
  ------------------
  356|   699k|        break;
  357|      0|#endif
  358|      0|      result = CURLE_READ_ERROR;
  359|      0|      break;
  360|   699k|    }
  361|   700k|  } while(all);
  ------------------
  |  Branch (361:11): [True: 429, False: 0]
  ------------------
  362|   699k|  return result;
  363|   699k|}
Curl_wakeup_destroy:
  366|  15.3k|{
  367|       |#ifndef USE_EVENTFD
  368|       |  if(socks[1] != CURL_SOCKET_BAD)
  369|       |    wakeup_close(socks[1]);
  370|       |#endif
  371|  15.3k|  if(socks[0] != CURL_SOCKET_BAD)
  ------------------
  |  |  145|  15.3k|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (371:6): [True: 15.3k, False: 0]
  ------------------
  372|  15.3k|    wakeup_close(socks[0]);
  ------------------
  |  |  300|  15.3k|#define wakeup_close        close
  ------------------
  373|  15.3k|  socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|  15.3k|#define CURL_SOCKET_BAD (-1)
  ------------------
  374|  15.3k|}
socketpair.c:wakeup_eventfd:
   39|  15.3k|{
   40|  15.3k|  int efd = eventfd(0, nonblocking ? EFD_CLOEXEC | EFD_NONBLOCK : EFD_CLOEXEC);
  ------------------
  |  Branch (40:24): [True: 15.3k, False: 0]
  ------------------
   41|  15.3k|  if(efd == -1) {
  ------------------
  |  Branch (41:6): [True: 0, False: 15.3k]
  ------------------
   42|      0|    socks[0] = socks[1] = CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   43|      0|    return -1;
   44|      0|  }
   45|  15.3k|  socks[0] = socks[1] = efd;
   46|  15.3k|  return 0;
   47|  15.3k|}

Curl_cf_socks_proxy_insert_after:
 1360|    154|{
 1361|    154|  struct Curl_cfilter *cf;
 1362|    154|  struct socks_ctx *ctx;
 1363|    154|  CURLcode result;
 1364|       |
 1365|    154|  if(!dest)
  ------------------
  |  Branch (1365:6): [True: 0, False: 154]
  ------------------
 1366|      0|    return CURLE_FAILED_INIT;
 1367|       |
 1368|    154|  switch(proxy_type) {
 1369|     12|  case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     12|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1369:3): [True: 12, False: 142]
  ------------------
 1370|     25|  case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     25|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1370:3): [True: 13, False: 141]
  ------------------
 1371|    145|  case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    145|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1371:3): [True: 120, False: 34]
  ------------------
 1372|    154|  case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    154|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1372:3): [True: 9, False: 145]
  ------------------
 1373|    154|    break; /* all supported */
 1374|      0|  default:
  ------------------
  |  Branch (1374:3): [True: 0, False: 154]
  ------------------
 1375|      0|    failf(data, "unknown proxytype %d option given", proxy_type);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1376|      0|    return CURLE_COULDNT_CONNECT;
 1377|    154|  }
 1378|       |
 1379|       |  /* NUL byte already part of struct size */
 1380|    154|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|    154|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1381|    154|  if(!ctx) {
  ------------------
  |  Branch (1381:6): [True: 0, False: 154]
  ------------------
 1382|      0|    return CURLE_OUT_OF_MEMORY;
 1383|      0|  }
 1384|       |
 1385|    154|  Curl_peer_link(&ctx->dest, dest);
 1386|    154|  ctx->ip_version = ip_version;
 1387|    154|  ctx->proxy_type = proxy_type;
 1388|    154|  Curl_creds_link(&ctx->creds, creds);
 1389|    154|  Curl_bufq_init2(&ctx->iobuf, SOCKS_CHUNK_SIZE, SOCKS_CHUNKS,
  ------------------
  |  |   94|    154|#define SOCKS_CHUNK_SIZE    1024
  ------------------
                Curl_bufq_init2(&ctx->iobuf, SOCKS_CHUNK_SIZE, SOCKS_CHUNKS,
  ------------------
  |  |   95|    154|#define SOCKS_CHUNKS        1
  ------------------
 1390|    154|                  BUFQ_OPT_SOFT_LIMIT);
  ------------------
  |  |  111|    154|#define BUFQ_OPT_SOFT_LIMIT  (1 << 0)
  ------------------
 1391|       |
 1392|    154|  result = Curl_cf_create(&cf, &Curl_cft_socks_proxy, ctx);
 1393|    154|  if(!result)
  ------------------
  |  Branch (1393:6): [True: 154, False: 0]
  ------------------
 1394|    154|    Curl_conn_cf_insert_after(cf_at, cf);
 1395|      0|  else
 1396|      0|    socks_proxy_ctx_free(ctx);
 1397|    154|  return result;
 1398|    154|}
socks.c:socks_proxy_cf_destroy:
 1302|    154|{
 1303|    154|  (void)data;
 1304|    154|  socks_proxy_ctx_free(cf->ctx);
 1305|       |  cf->ctx = NULL;
 1306|    154|}
socks.c:socks_proxy_cf_connect:
 1200|   491k|{
 1201|   491k|  struct socks_ctx *ctx = cf->ctx;
 1202|   491k|  CURLproxycode pxresult = CURLPX_OK;
 1203|   491k|  CURLcode result;
 1204|       |
 1205|   491k|  if(cf->connected) {
  ------------------
  |  Branch (1205:6): [True: 12, False: 491k]
  ------------------
 1206|     12|    *done = TRUE;
  ------------------
  |  | 1055|     12|#define TRUE true
  ------------------
 1207|     12|    return CURLE_OK;
 1208|     12|  }
 1209|       |
 1210|   491k|  result = cf->next->cft->do_connect(cf->next, data, done);
 1211|   491k|  if(result || !*done)
  ------------------
  |  Branch (1211:6): [True: 34, False: 491k]
  |  Branch (1211:16): [True: 490k, False: 222]
  ------------------
 1212|   490k|    return result;
 1213|       |
 1214|    222|  switch(ctx->proxy_type) {
 1215|     24|  case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     24|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1215:3): [True: 24, False: 198]
  ------------------
 1216|     46|  case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     46|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1216:3): [True: 22, False: 200]
  ------------------
 1217|     46|    pxresult = socks5_connect(cf, ctx, data);
 1218|     46|    break;
 1219|       |
 1220|    161|  case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    161|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1220:3): [True: 161, False: 61]
  ------------------
 1221|    176|  case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    176|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1221:3): [True: 15, False: 207]
  ------------------
 1222|    176|    pxresult = socks4_connect(cf, ctx, data);
 1223|    176|    break;
 1224|       |
 1225|      0|  default:
  ------------------
  |  Branch (1225:3): [True: 0, False: 222]
  ------------------
 1226|      0|    DEBUGASSERT(0); /* should not come here, checked it at creation time */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1226:5): [Folded, False: 0]
  |  Branch (1226:5): [Folded, False: 0]
  ------------------
 1227|      0|    result = CURLE_COULDNT_CONNECT;
 1228|      0|    goto out;
 1229|    222|  }
 1230|       |
 1231|    222|  if(pxresult) {
  ------------------
  |  Branch (1231:6): [True: 76, False: 146]
  ------------------
 1232|     76|    result = CURLE_PROXY;
 1233|     76|    data->info.pxcode = pxresult;
 1234|     76|    goto out;
 1235|     76|  }
 1236|    146|  else if(ctx->state != SOCKS_ST_SUCCESS)
  ------------------
  |  Branch (1236:11): [True: 117, False: 29]
  ------------------
 1237|    117|    goto out;
 1238|       |
 1239|     29|#ifdef CURLVERBOSE
 1240|     29|  if(Curl_trc_is_verbose(data)) {
  ------------------
  |  |  319|     29|  ((data) && (data)->set.verbose &&                        \
  |  |  ------------------
  |  |  |  Branch (319:4): [True: 29, False: 0]
  |  |  |  Branch (319:14): [True: 0, False: 29]
  |  |  ------------------
  |  |  320|     29|   (!(data)->state.feat ||                                 \
  |  |  ------------------
  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  ------------------
  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1241|      0|    struct ip_quadruple ipquad;
 1242|      0|    bool is_ipv6;
 1243|      0|    if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad))
  ------------------
  |  Branch (1243:8): [True: 0, False: 0]
  ------------------
 1244|      0|      infof(data, "Opened %sSOCKS connection from %s port %d to %s port %d "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1245|      0|            "(via %s port %u)",
 1246|      0|            (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "",
 1247|      0|            ipquad.local_ip, ipquad.local_port,
 1248|      0|            ctx->dest->hostname, ctx->dest->port,
 1249|      0|            ipquad.remote_ip, ipquad.remote_port);
 1250|      0|    else
 1251|      0|      infof(data, "Opened %sSOCKS connection",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1252|      0|            (cf->sockindex == SECONDARYSOCKET) ? "2nd " : "");
 1253|      0|  }
 1254|     29|#endif
 1255|     29|  cf->connected = TRUE;
  ------------------
  |  | 1055|     29|#define TRUE true
  ------------------
 1256|       |
 1257|    222|out:
 1258|    222|  *done = (bool)cf->connected;
 1259|    222|  if(*done || result)
  ------------------
  |  Branch (1259:6): [True: 29, False: 193]
  |  Branch (1259:15): [True: 76, False: 117]
  ------------------
 1260|    105|    Curl_creds_unlink(&ctx->creds);
 1261|    222|  return result;
 1262|     29|}
socks.c:socks5_connect:
 1032|     46|{
 1033|     46|  CURLproxycode presult;
 1034|     46|  bool done;
 1035|       |
 1036|     69|process_state:
 1037|     69|  switch(sx->state) {
 1038|     25|  case SOCKS_ST_INIT:
  ------------------
  |  Branch (1038:3): [True: 25, False: 44]
  ------------------
 1039|     25|    sx->version = 5;
 1040|     25|    sx->resolve_local = (sx->proxy_type == CURLPROXY_SOCKS5);
  ------------------
  |  |  800|     25|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
 1041|     25|    sxstate(sx, cf, data, SOCKS5_ST_START);
  ------------------
  |  |  162|     25|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1042|     25|    FALLTHROUGH();
  ------------------
  |  |  821|     25|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1043|       |
 1044|     25|  case SOCKS5_ST_START:
  ------------------
  |  Branch (1044:3): [True: 0, False: 69]
  ------------------
 1045|     25|    CURL_TRC_CF(data, cf, "SOCKS5: connecting to %s:%u",
  ------------------
  |  |  153|     25|  do {                                          \
  |  |  154|     25|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     25|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     50|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 25, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     50|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     25|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     25|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     25|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 25]
  |  |  ------------------
  ------------------
 1046|     25|                sx->dest->hostname, sx->dest->port);
 1047|     25|    presult = socks5_req0_init(cf, sx, data);
 1048|     25|    if(presult)
  ------------------
  |  Branch (1048:8): [True: 0, False: 25]
  ------------------
 1049|      0|      return socks_failed(sx, cf, data, presult);
 1050|     25|    sxstate(sx, cf, data, SOCKS5_ST_REQ0_SEND);
  ------------------
  |  |  162|     25|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1051|     25|    FALLTHROUGH();
  ------------------
  |  |  821|     25|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1052|       |
 1053|     25|  case SOCKS5_ST_REQ0_SEND:
  ------------------
  |  Branch (1053:3): [True: 0, False: 69]
  ------------------
 1054|     25|    presult = socks_flush(sx, cf, data, &done);
 1055|     25|    if(presult)
  ------------------
  |  Branch (1055:8): [True: 0, False: 25]
  ------------------
 1056|      0|      return socks_failed(sx, cf, data, presult);
 1057|     25|    else if(!done)
  ------------------
  |  Branch (1057:13): [True: 0, False: 25]
  ------------------
 1058|      0|      return CURLPX_OK;
 1059|       |    /* done sending! */
 1060|     25|    sxstate(sx, cf, data, SOCKS5_ST_RESP0_RECV);
  ------------------
  |  |  162|     25|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1061|     25|    FALLTHROUGH();
  ------------------
  |  |  821|     25|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1062|       |
 1063|     45|  case SOCKS5_ST_RESP0_RECV:
  ------------------
  |  Branch (1063:3): [True: 20, False: 49]
  ------------------
 1064|     45|    presult = socks_recv(sx, cf, data, 2, &done);
 1065|     45|    if(presult)
  ------------------
  |  Branch (1065:8): [True: 3, False: 42]
  ------------------
 1066|      3|      return socks_failed(sx, cf, data, presult);
 1067|     42|    else if(!done)
  ------------------
  |  Branch (1067:13): [True: 22, False: 20]
  ------------------
 1068|     22|      return CURLPX_OK;
 1069|     20|    presult = socks5_check_resp0(sx, cf, data);
 1070|     20|    if(presult)
  ------------------
  |  Branch (1070:8): [True: 3, False: 17]
  ------------------
 1071|      3|      return socks_failed(sx, cf, data, presult);
 1072|       |    /* socks5_check_resp0() sets next socks state */
 1073|     17|    goto process_state;
 1074|       |
 1075|     17|  case SOCKS5_ST_GSSAPI_INIT: {
  ------------------
  |  Branch (1075:3): [True: 1, False: 68]
  ------------------
 1076|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1077|       |    /* GSSAPI stuff done non-blocking */
 1078|       |    CURLcode result = Curl_SOCKS5_gssapi_negotiate(cf, data, sx->creds);
 1079|       |    if(result) {
 1080|       |      failf(data, "Unable to negotiate SOCKS5 GSS-API context.");
 1081|       |      return CURLPX_GSSAPI;
 1082|       |    }
 1083|       |    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
 1084|       |    goto process_state;
 1085|       |#else
 1086|      1|    failf(data, "SOCKS5 GSSAPI per-message authentication is not supported.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1087|      1|    return socks_failed(sx, cf, data, CURLPX_GSSAPI_PERMSG);
 1088|     20|#endif
 1089|     20|  }
 1090|       |
 1091|     14|  case SOCKS5_ST_AUTH_INIT:
  ------------------
  |  Branch (1091:3): [True: 14, False: 55]
  ------------------
 1092|     14|    presult = socks5_auth_init(cf, sx, data);
 1093|     14|    if(presult)
  ------------------
  |  Branch (1093:8): [True: 2, False: 12]
  ------------------
 1094|      2|      return socks_failed(sx, cf, data, presult);
 1095|     12|    sxstate(sx, cf, data, SOCKS5_ST_AUTH_SEND);
  ------------------
  |  |  162|     12|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1096|     12|    FALLTHROUGH();
  ------------------
  |  |  821|     12|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1097|       |
 1098|     12|  case SOCKS5_ST_AUTH_SEND:
  ------------------
  |  Branch (1098:3): [True: 0, False: 69]
  ------------------
 1099|     12|    presult = socks_flush(sx, cf, data, &done);
 1100|     12|    if(presult)
  ------------------
  |  Branch (1100:8): [True: 0, False: 12]
  ------------------
 1101|      0|      return socks_failed(sx, cf, data, presult);
 1102|     12|    else if(!done)
  ------------------
  |  Branch (1102:13): [True: 0, False: 12]
  ------------------
 1103|      0|      return CURLPX_OK;
 1104|     12|    sxstate(sx, cf, data, SOCKS5_ST_AUTH_RECV);
  ------------------
  |  |  162|     12|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1105|     12|    FALLTHROUGH();
  ------------------
  |  |  821|     12|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1106|       |
 1107|     12|  case SOCKS5_ST_AUTH_RECV:
  ------------------
  |  Branch (1107:3): [True: 0, False: 69]
  ------------------
 1108|     12|    presult = socks_recv(sx, cf, data, 2, &done);
 1109|     12|    if(presult)
  ------------------
  |  Branch (1109:8): [True: 0, False: 12]
  ------------------
 1110|      0|      return socks_failed(sx, cf, data, presult);
 1111|     12|    else if(!done)
  ------------------
  |  Branch (1111:13): [True: 0, False: 12]
  ------------------
 1112|      0|      return CURLPX_OK;
 1113|     12|    presult = socks5_check_auth_resp(sx, cf, data);
 1114|     12|    if(presult)
  ------------------
  |  Branch (1114:8): [True: 5, False: 7]
  ------------------
 1115|      5|      return socks_failed(sx, cf, data, presult);
 1116|       |    /* Everything is good so far, user was authenticated! */
 1117|      7|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
  ------------------
  |  |  162|      7|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1118|      7|    FALLTHROUGH();
  ------------------
  |  |  821|      7|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1119|       |
 1120|      9|  case SOCKS5_ST_REQ1_INIT:
  ------------------
  |  Branch (1120:3): [True: 2, False: 67]
  ------------------
 1121|      9|    presult = socks5_req1_init(sx, cf, data);
 1122|      9|    if(presult)
  ------------------
  |  Branch (1122:8): [True: 0, False: 9]
  ------------------
 1123|      0|      return socks_failed(sx, cf, data, presult);
 1124|      9|    if(!sx->resolve_local) {
  ------------------
  |  Branch (1124:8): [True: 6, False: 3]
  ------------------
 1125|       |      /* we do not resolve, request is complete */
 1126|      6|      sxstate(sx, cf, data, SOCKS5_ST_REQ1_SEND);
  ------------------
  |  |  162|      6|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1127|      6|      goto process_state;
 1128|      6|    }
 1129|      3|    sx->start_resolving = TRUE;
  ------------------
  |  | 1055|      3|#define TRUE true
  ------------------
 1130|      3|    sxstate(sx, cf, data, SOCKS5_ST_RESOLVING);
  ------------------
  |  |  162|      3|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1131|      3|    FALLTHROUGH();
  ------------------
  |  |  821|      3|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1132|       |
 1133|      3|  case SOCKS5_ST_RESOLVING:
  ------------------
  |  Branch (1133:3): [True: 0, False: 69]
  ------------------
 1134|      3|    presult = socks5_resolving(sx, cf, data, &done);
 1135|      3|    if(presult)
  ------------------
  |  Branch (1135:8): [True: 0, False: 3]
  ------------------
 1136|      0|      return socks_failed(sx, cf, data, presult);
 1137|      3|    if(!done)
  ------------------
  |  Branch (1137:8): [True: 0, False: 3]
  ------------------
 1138|      0|      return CURLPX_OK;
 1139|      3|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_SEND);
  ------------------
  |  |  162|      3|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1140|      3|    FALLTHROUGH();
  ------------------
  |  |  821|      3|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1141|       |
 1142|      9|  case SOCKS5_ST_REQ1_SEND:
  ------------------
  |  Branch (1142:3): [True: 6, False: 63]
  ------------------
 1143|      9|    presult = socks_flush(sx, cf, data, &done);
 1144|      9|    if(presult)
  ------------------
  |  Branch (1144:8): [True: 0, False: 9]
  ------------------
 1145|      0|      return socks_failed(sx, cf, data, presult);
 1146|      9|    else if(!done)
  ------------------
  |  Branch (1146:13): [True: 0, False: 9]
  ------------------
 1147|      0|      return CURLPX_OK;
 1148|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1149|       |    if(cf->conn->socks5_gssapi_enctype) {
 1150|       |      failf(data, "SOCKS5 GSS-API protection not yet implemented.");
 1151|       |      return CURLPX_GSSAPI_PROTECTION;
 1152|       |    }
 1153|       |#endif
 1154|      9|    sxstate(sx, cf, data, SOCKS5_ST_RESP1_RECV);
  ------------------
  |  |  162|      9|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1155|      9|    FALLTHROUGH();
  ------------------
  |  |  821|      9|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1156|       |
 1157|     10|  case SOCKS5_ST_RESP1_RECV:
  ------------------
  |  Branch (1157:3): [True: 1, False: 68]
  ------------------
 1158|     10|    presult = socks5_recv_resp1(sx, cf, data, &done);
 1159|     10|    if(presult)
  ------------------
  |  Branch (1159:8): [True: 7, False: 3]
  ------------------
 1160|      7|      return socks_failed(sx, cf, data, presult);
 1161|      3|    if(!done)
  ------------------
  |  Branch (1161:8): [True: 1, False: 2]
  ------------------
 1162|      1|      return CURLPX_OK;
 1163|      2|    CURL_TRC_CF(data, cf, "SOCKS5 request granted.");
  ------------------
  |  |  153|      2|  do {                                          \
  |  |  154|      2|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      2|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      2|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      2|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1164|      2|    sxstate(sx, cf, data, SOCKS_ST_SUCCESS);
  ------------------
  |  |  162|      2|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
 1165|      2|    FALLTHROUGH();
  ------------------
  |  |  821|      2|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
 1166|       |
 1167|      2|  case SOCKS_ST_SUCCESS:
  ------------------
  |  Branch (1167:3): [True: 0, False: 69]
  ------------------
 1168|      2|    return CURLPX_OK;
 1169|       |
 1170|      0|  case SOCKS_ST_FAILED:
  ------------------
  |  Branch (1170:3): [True: 0, False: 69]
  ------------------
 1171|      0|    DEBUGASSERT(sx->presult);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1171:5): [True: 0, False: 0]
  |  Branch (1171:5): [True: 0, False: 0]
  ------------------
 1172|      0|    return sx->presult;
 1173|       |
 1174|      0|  default:
  ------------------
  |  Branch (1174:3): [True: 0, False: 69]
  ------------------
 1175|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1175:5): [Folded, False: 0]
  |  Branch (1175:5): [Folded, False: 0]
  ------------------
 1176|      0|    return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
 1177|     69|  }
 1178|     69|}
socks.c:socksstate:
  176|    668|{
  177|    668|  enum socks_state_t oldstate = sx->state;
  178|       |
  179|    668|  if(oldstate == state)
  ------------------
  |  Branch (179:6): [True: 12, False: 656]
  ------------------
  180|       |    /* do not bother when the new state is the same as the old state */
  181|     12|    return;
  182|       |
  183|    656|  sx->state = state;
  184|       |
  185|    656|#if defined(DEBUGBUILD) && defined(CURLVERBOSE)
  186|    656|  CURL_TRC_CF(data, cf, "[%s] -> [%s] (line %d)",
  ------------------
  |  |  153|    656|  do {                                          \
  |  |  154|    656|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    656|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  1.31k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 656, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 656]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  1.31k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    656|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    656|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    656|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 656]
  |  |  ------------------
  ------------------
  187|    656|              cf_socks_statename[oldstate],
  188|    656|              cf_socks_statename[sx->state], lineno);
  189|       |#else
  190|       |  (void)cf;
  191|       |  (void)data;
  192|       |#endif
  193|    656|}
socks.c:socks5_req0_init:
  584|     25|{
  585|     25|  const unsigned char auth = data->set.socks5auth;
  586|     25|  unsigned char req[5]; /* version + len + 3 possible auth methods */
  587|     25|  unsigned char nauths;
  588|     25|  size_t req_len, nwritten;
  589|     25|  CURLcode result;
  590|       |
  591|     25|  (void)cf;
  592|       |  /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
  593|     25|  if(!sx->resolve_local && strlen(sx->dest->hostname) > 255) {
  ------------------
  |  Branch (593:6): [True: 13, False: 12]
  |  Branch (593:28): [True: 0, False: 13]
  ------------------
  594|      0|    failf(data, "SOCKS5: the destination hostname is too long to be "
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  595|      0|          "resolved remotely by the proxy.");
  596|      0|    return CURLPX_LONG_HOSTNAME;
  597|      0|  }
  598|       |
  599|     25|  if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  831|     25|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
  ------------------
  |  |  837|     25|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|     25|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (599:6): [True: 0, False: 25]
  ------------------
  600|      0|    infof(data, "warning: unsupported value passed to "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  601|     25|          "CURLOPT_SOCKS5_AUTH: %u", auth);
  602|     25|  if(!(auth & CURLAUTH_BASIC))
  ------------------
  |  |  831|     25|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (602:6): [True: 0, False: 25]
  ------------------
  603|       |    /* disable username/password auth */
  604|      0|    Curl_creds_unlink(&sx->creds);
  605|       |
  606|     25|  req[0] = 5;   /* version */
  607|     25|  nauths = 1;
  608|     25|  req[1 + nauths] = 0;   /* 1. no authentication */
  609|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  610|       |  if(auth & CURLAUTH_GSSAPI) {
  611|       |    ++nauths;
  612|       |    req[1 + nauths] = 1; /* GSS-API */
  613|       |  }
  614|       |#endif
  615|     25|  if(sx->creds) {
  ------------------
  |  Branch (615:6): [True: 15, False: 10]
  ------------------
  616|     15|    ++nauths;
  617|     15|    req[1 + nauths] = 2; /* username/password */
  618|     15|  }
  619|     25|  req[1] = nauths;
  620|     25|  req_len = 2 + nauths;
  621|       |
  622|     25|  result = Curl_bufq_write(&sx->iobuf, req, req_len, &nwritten);
  623|     25|  if(result || (nwritten != req_len))
  ------------------
  |  Branch (623:6): [True: 0, False: 25]
  |  Branch (623:16): [True: 0, False: 25]
  ------------------
  624|      0|    return CURLPX_SEND_REQUEST;
  625|     25|  return CURLPX_OK;
  626|     25|}
socks.c:socks_failed:
  199|     76|{
  200|     76|  sxstate(sx, cf, data, SOCKS_ST_FAILED);
  ------------------
  |  |  162|     76|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  201|     76|  sx->presult = presult;
  202|     76|  return presult;
  203|     76|}
socks.c:socks_flush:
  209|    126|{
  210|    126|  CURLcode result;
  211|    126|  size_t nwritten;
  212|       |
  213|    126|  *done = FALSE;
  ------------------
  |  | 1058|    126|#define FALSE false
  ------------------
  214|    252|  while(!Curl_bufq_is_empty(&sx->iobuf)) {
  ------------------
  |  Branch (214:9): [True: 126, False: 126]
  ------------------
  215|    126|    result = Curl_cf_send_bufq(cf->next, data, &sx->iobuf, NULL, 0,
  216|    126|                               &nwritten);
  217|    126|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (217:8): [True: 0, False: 126]
  ------------------
  218|      0|      return CURLPX_OK;
  219|    126|    else if(result) {
  ------------------
  |  Branch (219:13): [True: 0, False: 126]
  ------------------
  220|      0|      failf(data, "Failed to send SOCKS request: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  221|      0|            curl_easy_strerror(result));
  222|      0|      return socks_failed(sx, cf, data, CURLPX_SEND_CONNECT);
  223|      0|    }
  224|    126|  }
  225|    126|  *done = TRUE;
  ------------------
  |  | 1055|    126|#define TRUE true
  ------------------
  226|    126|  return CURLPX_OK;
  227|    126|}
socks.c:socks_recv:
  234|    193|{
  235|    193|  CURLcode result;
  236|    193|  size_t nread;
  237|       |
  238|    193|  *done = FALSE;
  ------------------
  |  | 1058|    193|#define FALSE false
  ------------------
  239|    278|  while(Curl_bufq_len(&sx->iobuf) < min_bytes) {
  ------------------
  |  Branch (239:9): [True: 205, False: 73]
  ------------------
  240|    205|    result = Curl_cf_recv_bufq(cf->next, data, &sx->iobuf,
  241|    205|                               min_bytes - Curl_bufq_len(&sx->iobuf),
  242|    205|                               &nread);
  243|    205|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (243:8): [True: 67, False: 138]
  ------------------
  244|     67|      return CURLPX_OK;
  245|    138|    else if(result) {
  ------------------
  |  Branch (245:13): [True: 0, False: 138]
  ------------------
  246|      0|      failf(data, "Failed to receive SOCKS response: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  247|      0|            curl_easy_strerror(result));
  248|      0|      return CURLPX_RECV_CONNECT;
  249|      0|    }
  250|    138|    else if(!nread) { /* EOF */
  ------------------
  |  Branch (250:13): [True: 53, False: 85]
  ------------------
  251|     53|      if(Curl_bufq_len(&sx->iobuf) < min_bytes) {
  ------------------
  |  Branch (251:10): [True: 53, False: 0]
  ------------------
  252|     53|        failf(data, "Failed to receive SOCKS response, "
  ------------------
  |  |   62|     53|#define failf Curl_failf
  ------------------
  253|     53|              "proxy closed connection");
  254|     53|        return CURLPX_RECV_CONNECT;
  255|     53|      }
  256|      0|      break;
  257|     53|    }
  258|    205|  }
  259|     73|  *done = TRUE;
  ------------------
  |  | 1055|     73|#define TRUE true
  ------------------
  260|     73|  return CURLPX_OK;
  261|    193|}
socks.c:socks5_check_resp0:
  631|     20|{
  632|     20|  const unsigned char *resp;
  633|     20|  unsigned char auth_mode;
  634|     20|  size_t rlen;
  635|       |
  636|     20|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 2) {
  ------------------
  |  Branch (636:6): [True: 0, False: 20]
  |  Branch (636:51): [True: 0, False: 20]
  ------------------
  637|      0|    failf(data, "SOCKS5 initial reply is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  638|      0|    return CURLPX_RECV_CONNECT;
  639|      0|  }
  640|       |
  641|     20|  if(resp[0] != 5) {
  ------------------
  |  Branch (641:6): [True: 1, False: 19]
  ------------------
  642|      1|    failf(data, "Received invalid version in initial SOCKS5 response.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  643|      1|    return CURLPX_BAD_VERSION;
  644|      1|  }
  645|       |
  646|     19|  auth_mode = resp[1];
  647|     19|  Curl_bufq_skip(&sx->iobuf, 2);
  648|       |
  649|     19|  switch(auth_mode) {
  650|      2|  case 0:
  ------------------
  |  Branch (650:3): [True: 2, False: 17]
  ------------------
  651|       |    /* DONE! No authentication needed. Send request. */
  652|      2|    sxstate(sx, cf, data, SOCKS5_ST_REQ1_INIT);
  ------------------
  |  |  162|      2|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  653|      2|    return CURLPX_OK;
  654|      1|  case 1:
  ------------------
  |  Branch (654:3): [True: 1, False: 18]
  ------------------
  655|      1|    if(data->set.socks5auth & CURLAUTH_GSSAPI) {
  ------------------
  |  |  837|      1|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|      1|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  |  Branch (655:8): [True: 1, False: 0]
  ------------------
  656|      1|      sxstate(sx, cf, data, SOCKS5_ST_GSSAPI_INIT);
  ------------------
  |  |  162|      1|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  657|      1|      return CURLPX_OK;
  658|      1|    }
  659|      0|    failf(data, "SOCKS5 GSSAPI per-message authentication is not enabled.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  660|      0|    return CURLPX_GSSAPI_PERMSG;
  661|     14|  case 2:
  ------------------
  |  Branch (661:3): [True: 14, False: 5]
  ------------------
  662|       |    /* regular name + password authentication */
  663|     14|    if(data->set.socks5auth & CURLAUTH_BASIC) {
  ------------------
  |  |  831|     14|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  |  Branch (663:8): [True: 14, False: 0]
  ------------------
  664|     14|      sxstate(sx, cf, data, SOCKS5_ST_AUTH_INIT);
  ------------------
  |  |  162|     14|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  665|     14|      return CURLPX_OK;
  666|     14|    }
  667|      0|    failf(data, "BASIC authentication proposed but not enabled.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  668|      0|    return CURLPX_NO_AUTH;
  669|      1|  case 255:
  ------------------
  |  Branch (669:3): [True: 1, False: 18]
  ------------------
  670|      1|    failf(data, "No authentication method was acceptable.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  671|      1|    return CURLPX_NO_AUTH;
  672|      1|  default:
  ------------------
  |  Branch (672:3): [True: 1, False: 18]
  ------------------
  673|      1|    failf(data, "Unknown SOCKS5 mode attempted to be used by server.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  674|      1|    return CURLPX_UNKNOWN_MODE;
  675|     19|  }
  676|     19|}
socks.c:socks5_auth_init:
  681|     14|{
  682|       |  /* Needs username and password */
  683|     14|  size_t ulen = 0, plen = 0, nwritten;
  684|     14|  unsigned char buf[2];
  685|     14|  CURLcode result;
  686|       |
  687|     14|  if(sx->creds) {
  ------------------
  |  Branch (687:6): [True: 13, False: 1]
  ------------------
  688|     13|    ulen = strlen(sx->creds->user);
  689|     13|    plen = strlen(sx->creds->passwd);
  690|       |    /* the lengths must fit in a single byte */
  691|     13|    if(ulen > 255) {
  ------------------
  |  Branch (691:8): [True: 1, False: 12]
  ------------------
  692|      1|      failf(data, "Excessive username length for proxy auth");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  693|      1|      return CURLPX_LONG_USER;
  694|      1|    }
  695|     12|    if(plen > 255) {
  ------------------
  |  Branch (695:8): [True: 1, False: 11]
  ------------------
  696|      1|      failf(data, "Excessive password length for proxy auth");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  697|      1|      return CURLPX_LONG_PASSWD;
  698|      1|    }
  699|     12|  }
  700|       |
  701|       |  /*   username/password request looks like
  702|       |   * +----+------+----------+------+----------+
  703|       |   * |VER | ULEN |  UNAME   | PLEN |  PASSWD  |
  704|       |   * +----+------+----------+------+----------+
  705|       |   * | 1  |  1   | 1 to 255 |  1   | 1 to 255 |
  706|       |   * +----+------+----------+------+----------+
  707|       |   */
  708|     12|  buf[0] = 1;    /* username/pw subnegotiation version */
  709|     12|  buf[1] = (unsigned char)ulen;
  710|     12|  result = Curl_bufq_write(&sx->iobuf, buf, 2, &nwritten);
  711|     12|  if(result || (nwritten != 2))
  ------------------
  |  Branch (711:6): [True: 0, False: 12]
  |  Branch (711:16): [True: 0, False: 12]
  ------------------
  712|      0|    return CURLPX_SEND_REQUEST;
  713|     12|  if(ulen) {
  ------------------
  |  Branch (713:6): [True: 9, False: 3]
  ------------------
  714|      9|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->user, ulen, &nwritten);
  715|      9|    if(result || (nwritten != ulen))
  ------------------
  |  Branch (715:8): [True: 0, False: 9]
  |  Branch (715:18): [True: 0, False: 9]
  ------------------
  716|      0|      return CURLPX_SEND_REQUEST;
  717|      9|  }
  718|     12|  buf[0] = (unsigned char)plen;
  719|     12|  result = Curl_bufq_write(&sx->iobuf, buf, 1, &nwritten);
  720|     12|  if(result || (nwritten != 1))
  ------------------
  |  Branch (720:6): [True: 0, False: 12]
  |  Branch (720:16): [True: 0, False: 12]
  ------------------
  721|      0|    return CURLPX_SEND_REQUEST;
  722|     12|  if(plen) {
  ------------------
  |  Branch (722:6): [True: 9, False: 3]
  ------------------
  723|      9|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->passwd, plen, &nwritten);
  724|      9|    if(result || (nwritten != plen))
  ------------------
  |  Branch (724:8): [True: 0, False: 9]
  |  Branch (724:18): [True: 0, False: 9]
  ------------------
  725|      0|      return CURLPX_SEND_REQUEST;
  726|      9|  }
  727|     12|  sxstate(sx, cf, data, SOCKS5_ST_AUTH_SEND);
  ------------------
  |  |  162|     12|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  728|     12|  return CURLPX_OK;
  729|     12|}
socks.c:socks5_check_auth_resp:
  734|     12|{
  735|     12|  const unsigned char *resp;
  736|     12|  unsigned char auth_status;
  737|     12|  size_t rlen;
  738|       |
  739|     12|  (void)cf;
  740|     12|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 2) {
  ------------------
  |  Branch (740:6): [True: 0, False: 12]
  |  Branch (740:51): [True: 0, False: 12]
  ------------------
  741|      0|    failf(data, "SOCKS5 sub-negotiation response incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  742|      0|    return CURLPX_RECV_CONNECT;
  743|      0|  }
  744|       |
  745|       |  /* ignore the first (VER) byte */
  746|     12|  auth_status = resp[1];
  747|     12|  if(auth_status) {
  ------------------
  |  Branch (747:6): [True: 5, False: 7]
  ------------------
  748|      5|    failf(data, "User was rejected by the SOCKS5 server (%d %d).",
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
  749|      5|          resp[0], resp[1]);
  750|      5|    return CURLPX_USER_REJECTED;
  751|      5|  }
  752|      7|  Curl_bufq_skip(&sx->iobuf, 2);
  753|      7|  return CURLPX_OK;
  754|     12|}
socks.c:socks5_req1_init:
  759|      9|{
  760|      9|  unsigned char req[5];
  761|      9|  unsigned char ipbuf[16];
  762|      9|  const unsigned char *destination;
  763|      9|  unsigned char desttype, destlen, hdlen;
  764|      9|  size_t nwritten;
  765|      9|  CURLcode result;
  766|       |
  767|      9|  req[0] = 5; /* version (SOCKS5) */
  768|      9|  req[1] = 1; /* connect */
  769|      9|  req[2] = 0; /* must be zero */
  770|      9|  if(sx->resolve_local) {
  ------------------
  |  Branch (770:6): [True: 3, False: 6]
  ------------------
  771|       |    /* rest of request is added after resolving */
  772|      3|    result = Curl_bufq_write(&sx->iobuf, req, 3, &nwritten);
  773|      3|    if(result || (nwritten != 3))
  ------------------
  |  Branch (773:8): [True: 0, False: 3]
  |  Branch (773:18): [True: 0, False: 3]
  ------------------
  774|      0|      return CURLPX_SEND_REQUEST;
  775|      3|    return CURLPX_OK;
  776|      3|  }
  777|       |
  778|       |  /* remote resolving, send what type+addr/string to resolve */
  779|      6|#ifdef USE_IPV6
  780|      6|  if(strchr(sx->dest->hostname, ':')) {
  ------------------
  |  Branch (780:6): [True: 0, False: 6]
  ------------------
  781|      0|    desttype = 4;
  782|      0|    destination = ipbuf;
  783|      0|    destlen = 16;
  784|      0|    if(curlx_inet_pton(AF_INET6, sx->dest->hostname, ipbuf) != 1)
  ------------------
  |  |   43|      0|  inet_pton(x, y, z)
  ------------------
  |  Branch (784:8): [True: 0, False: 0]
  ------------------
  785|      0|      return CURLPX_BAD_ADDRESS_TYPE;
  786|      0|  }
  787|      6|  else
  788|      6|#endif
  789|      6|  if(curlx_inet_pton(AF_INET, sx->dest->hostname, ipbuf) == 1) {
  ------------------
  |  |   43|      6|  inet_pton(x, y, z)
  ------------------
  |  Branch (789:6): [True: 6, False: 0]
  ------------------
  790|      6|    desttype = 1;
  791|      6|    destination = ipbuf;
  792|      6|    destlen = 4;
  793|      6|  }
  794|      0|  else {
  795|      0|    const size_t hostname_len = strlen(sx->dest->hostname);
  796|       |    /* socks5_req0_init() already rejects hostnames longer than 255 bytes, so
  797|       |       this cast to unsigned char is safe. Assert to guard against future
  798|       |       refactoring that might remove or reorder that earlier check. */
  799|      0|    DEBUGASSERT(hostname_len <= 255);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (799:5): [True: 0, False: 0]
  |  Branch (799:5): [True: 0, False: 0]
  ------------------
  800|      0|    desttype = 3;
  801|      0|    destination = (const unsigned char *)sx->dest->hostname;
  802|      0|    destlen = (unsigned char)hostname_len; /* one byte length */
  803|      0|  }
  804|       |
  805|      6|  req[3] = desttype;
  806|      6|  req[4] = destlen;
  807|      6|  hdlen = (desttype == 3) ? 5 : 4; /* no length byte for ip addresses */
  ------------------
  |  Branch (807:11): [True: 0, False: 6]
  ------------------
  808|      6|  result = Curl_bufq_write(&sx->iobuf, req, hdlen, &nwritten);
  809|      6|  if(result || (nwritten != hdlen))
  ------------------
  |  Branch (809:6): [True: 0, False: 6]
  |  Branch (809:16): [True: 0, False: 6]
  ------------------
  810|      0|    return CURLPX_SEND_REQUEST;
  811|      6|  result = Curl_bufq_write(&sx->iobuf, destination, destlen, &nwritten);
  812|      6|  if(result || (nwritten != destlen))
  ------------------
  |  Branch (812:6): [True: 0, False: 6]
  |  Branch (812:16): [True: 0, False: 6]
  ------------------
  813|      0|    return CURLPX_SEND_REQUEST;
  814|       |  /* PORT MSB+LSB */
  815|      6|  req[0] = (unsigned char)((sx->dest->port >> 8) & 0xff);
  816|      6|  req[1] = (unsigned char)(sx->dest->port & 0xff);
  817|      6|  result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
  818|      6|  if(result || (nwritten != 2))
  ------------------
  |  Branch (818:6): [True: 0, False: 6]
  |  Branch (818:16): [True: 0, False: 6]
  ------------------
  819|      0|    return CURLPX_SEND_REQUEST;
  820|      6|  CURL_TRC_CF(data, cf, "SOCKS5 connect to %s:%u (remotely resolved)",
  ------------------
  |  |  153|      6|  do {                                          \
  |  |  154|      6|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      6|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     12|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 6, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     12|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      6|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      6|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      6|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 6]
  |  |  ------------------
  ------------------
  821|      6|              sx->dest->hostname, sx->dest->port);
  822|      6|  return CURLPX_OK;
  823|      6|}
socks.c:socks5_resolving:
  829|      3|{
  830|      3|  const struct Curl_addrinfo *ai = NULL;
  831|      3|  char dest[MAX_IPADR_LEN];  /* printable address */
  832|      3|  const unsigned char *destination = NULL;
  833|      3|  unsigned char desttype = 1, destlen = 4;
  834|      3|  unsigned char req[2];
  835|      3|  CURLcode result;
  836|      3|  CURLproxycode presult = CURLPX_OK;
  837|      3|  size_t nwritten;
  838|      3|  bool dns_done;
  839|       |
  840|      3|  *done = FALSE;
  ------------------
  |  | 1058|      3|#define FALSE false
  ------------------
  841|      3|  if(sx->start_resolving) {
  ------------------
  |  Branch (841:6): [True: 3, False: 0]
  ------------------
  842|       |    /* need to resolve hostname to add destination address */
  843|      3|    sx->start_resolving = FALSE;
  ------------------
  |  | 1058|      3|#define FALSE false
  ------------------
  844|      3|    result = Curl_cf_dns_insert_after(
  845|      3|      cf, data, Curl_resolv_dns_queries(data, sx->ip_version),
  846|      3|      sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  |  307|      3|#define TRNSPRT_TCP  3
  ------------------
                    sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  | 1055|      3|#define TRUE true
  ------------------
  847|      3|    if(result) {
  ------------------
  |  Branch (847:8): [True: 0, False: 3]
  ------------------
  848|      0|      failf(data, "unable to create DNS filter for socks");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  849|      0|      return CURLPX_UNKNOWN_FAIL;
  850|      0|    }
  851|      3|  }
  852|       |
  853|       |  /* resolve the hostname by connecting the DNS filter */
  854|      3|  result = Curl_conn_cf_connect(cf->next, data, &dns_done);
  855|      3|  if(result) {
  ------------------
  |  Branch (855:6): [True: 0, False: 3]
  ------------------
  856|      0|    failf(data, "Failed to resolve \"%s\" for SOCKS5 connect.",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  857|      0|          sx->dest->hostname);
  858|      0|    return CURLPX_RESOLVE_HOST;
  859|      0|  }
  860|      3|  else if(!dns_done)
  ------------------
  |  Branch (860:11): [True: 0, False: 3]
  ------------------
  861|      0|    return CURLPX_OK;
  862|       |
  863|      3|#ifdef USE_IPV6
  864|      3|  if(data->set.ipver != CURL_IPRESOLVE_V4)
  ------------------
  |  | 2305|      3|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  |  Branch (864:6): [True: 3, False: 0]
  ------------------
  865|      3|    ai = Curl_cf_dns_get_ai(cf->next, data, AF_INET6, 0);
  866|      3|#endif
  867|      3|  if(!ai)
  ------------------
  |  Branch (867:6): [True: 3, False: 0]
  ------------------
  868|      3|    ai = Curl_cf_dns_get_ai(cf->next, data, AF_INET, 0);
  869|       |
  870|      3|  if(!ai) {
  ------------------
  |  Branch (870:6): [True: 0, False: 3]
  ------------------
  871|      0|    failf(data, "Failed to resolve \"%s\" for SOCKS5 connect.",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  872|      0|          sx->dest->hostname);
  873|      0|    presult = CURLPX_RESOLVE_HOST;
  874|      0|    goto out;
  875|      0|  }
  876|       |
  877|      3|  Curl_printable_address(ai, dest, sizeof(dest));
  878|       |
  879|      3|  if(ai->ai_family == AF_INET) {
  ------------------
  |  Branch (879:6): [True: 3, False: 0]
  ------------------
  880|      3|    struct sockaddr_in *saddr_in;
  881|      3|    desttype = 1; /* ATYP: IPv4 = 1 */
  882|      3|    destlen = 4;
  883|      3|    saddr_in = (struct sockaddr_in *)(void *)ai->ai_addr;
  884|      3|    destination = (const unsigned char *)&saddr_in->sin_addr.s_addr;
  885|      3|    CURL_TRC_CF(data, cf, "SOCKS5 connect to %s:%u (locally resolved)",
  ------------------
  |  |  153|      3|  do {                                          \
  |  |  154|      3|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      3|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      6|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      6|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      3|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      3|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  886|      3|                dest, sx->dest->port);
  887|      3|  }
  888|      0|#ifdef USE_IPV6
  889|      0|  else if(ai->ai_family == AF_INET6) {
  ------------------
  |  Branch (889:11): [True: 0, False: 0]
  ------------------
  890|      0|    struct sockaddr_in6 *saddr_in6;
  891|      0|    desttype = 4; /* ATYP: IPv6 = 4 */
  892|      0|    destlen = 16;
  893|      0|    saddr_in6 = (struct sockaddr_in6 *)(void *)ai->ai_addr;
  894|      0|    destination = (const unsigned char *)&saddr_in6->sin6_addr.s6_addr;
  895|      0|    CURL_TRC_CF(data, cf, "SOCKS5 connect to [%s]:%u (locally resolved)",
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  896|      0|                dest, sx->dest->port);
  897|      0|  }
  898|      3|#endif
  899|       |
  900|      3|  if(!destination) {
  ------------------
  |  Branch (900:6): [True: 0, False: 3]
  ------------------
  901|      0|    failf(data, "SOCKS5 connection to %s not supported", dest);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  902|      0|    presult = CURLPX_RESOLVE_HOST;
  903|      0|    goto out;
  904|      0|  }
  905|       |
  906|      3|  req[0] = desttype;
  907|      3|  result = Curl_bufq_write(&sx->iobuf, req, 1, &nwritten);
  908|      3|  if(result || (nwritten != 1)) {
  ------------------
  |  Branch (908:6): [True: 0, False: 3]
  |  Branch (908:16): [True: 0, False: 3]
  ------------------
  909|      0|    presult = CURLPX_SEND_REQUEST;
  910|      0|    goto out;
  911|      0|  }
  912|      3|  result = Curl_bufq_write(&sx->iobuf, destination, destlen, &nwritten);
  913|      3|  if(result || (nwritten != destlen)) {
  ------------------
  |  Branch (913:6): [True: 0, False: 3]
  |  Branch (913:16): [True: 0, False: 3]
  ------------------
  914|      0|    presult = CURLPX_SEND_REQUEST;
  915|      0|    goto out;
  916|      0|  }
  917|       |  /* PORT MSB+LSB */
  918|      3|  req[0] = (unsigned char)((sx->dest->port >> 8) & 0xffU);
  919|      3|  req[1] = (unsigned char)(sx->dest->port & 0xffU);
  920|      3|  result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
  921|      3|  if(result || (nwritten != 2)) {
  ------------------
  |  Branch (921:6): [True: 0, False: 3]
  |  Branch (921:16): [True: 0, False: 3]
  ------------------
  922|      0|    presult = CURLPX_SEND_REQUEST;
  923|      0|    goto out;
  924|      0|  }
  925|       |
  926|      3|out:
  927|      3|  *done = (presult == CURLPX_OK);
  928|      3|  return presult;
  929|      3|}
socks.c:socks5_recv_resp1:
  935|     10|{
  936|     10|  const unsigned char *resp;
  937|     10|  size_t rlen, resp_len = 8; /* minimum response length */
  938|     10|  CURLproxycode presult;
  939|       |
  940|     10|  presult = socks_recv(sx, cf, data, resp_len, done);
  941|     10|  if(presult)
  ------------------
  |  Branch (941:6): [True: 1, False: 9]
  ------------------
  942|      1|    return presult;
  943|      9|  else if(!*done)
  ------------------
  |  Branch (943:11): [True: 0, False: 9]
  ------------------
  944|      0|    return CURLPX_OK;
  945|       |
  946|      9|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < resp_len) {
  ------------------
  |  Branch (946:6): [True: 0, False: 9]
  |  Branch (946:51): [True: 0, False: 9]
  ------------------
  947|      0|    failf(data, "SOCKS5 response is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  948|      0|    return CURLPX_RECV_CONNECT;
  949|      0|  }
  950|       |
  951|       |  /* Response packet includes BND.ADDR is variable length parameter by RFC
  952|       |     1928, so the response packet MUST be read until the end to avoid errors
  953|       |     at subsequent protocol level.
  954|       |
  955|       |     +----+-----+-------+------+----------+----------+
  956|       |     |VER | REP |  RSV  | ATYP | BND.ADDR | BND.PORT |
  957|       |     +----+-----+-------+------+----------+----------+
  958|       |     | 1  |  1  | 0x00  |  1   | Variable |    2     |
  959|       |     +----+-----+-------+------+----------+----------+
  960|       |
  961|       |     ATYP:
  962|       |     o IPv4 address: 0x01, BND.ADDR = 4 byte
  963|       |     o domain name:  0x03, BND.ADDR = [ 1 byte length, string ]
  964|       |     o IPv6 address: 0x04, BND.ADDR = 16 byte
  965|       |  */
  966|      9|  if(resp[0] != 5) { /* version */
  ------------------
  |  Branch (966:6): [True: 1, False: 8]
  ------------------
  967|      1|    failf(data, "SOCKS5 reply has wrong version, version should be 5.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  968|      1|    return CURLPX_BAD_VERSION;
  969|      1|  }
  970|      8|  else if(resp[1]) { /* Anything besides 0 is an error */
  ------------------
  |  Branch (970:11): [True: 2, False: 6]
  ------------------
  971|      2|    CURLproxycode rc = CURLPX_REPLY_UNASSIGNED;
  972|      2|    int code = resp[1];
  973|      2|    failf(data, "cannot complete SOCKS5 connection to %s. (%d)",
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  974|      2|          sx->dest->hostname, code);
  975|      2|    if(code < 9) {
  ------------------
  |  Branch (975:8): [True: 1, False: 1]
  ------------------
  976|       |      /* RFC 1928 section 6 lists: */
  977|      1|      static const CURLproxycode lookup[] = {
  978|      1|        CURLPX_OK,
  979|      1|        CURLPX_REPLY_GENERAL_SERVER_FAILURE,
  980|      1|        CURLPX_REPLY_NOT_ALLOWED,
  981|      1|        CURLPX_REPLY_NETWORK_UNREACHABLE,
  982|      1|        CURLPX_REPLY_HOST_UNREACHABLE,
  983|      1|        CURLPX_REPLY_CONNECTION_REFUSED,
  984|      1|        CURLPX_REPLY_TTL_EXPIRED,
  985|      1|        CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
  986|      1|        CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
  987|      1|      };
  988|      1|      rc = lookup[code];
  989|      1|    }
  990|      2|    return rc;
  991|      2|  }
  992|       |
  993|       |  /* Calculate real packet size */
  994|      6|  switch(resp[3]) {
  995|      1|  case 1: /* IPv4 */
  ------------------
  |  Branch (995:3): [True: 1, False: 5]
  ------------------
  996|      1|    resp_len = 4 + 4 + 2;
  997|      1|    break;
  998|      3|  case 3: /* domain name */
  ------------------
  |  Branch (998:3): [True: 3, False: 3]
  ------------------
  999|      3|    resp_len = 4 + 1 + resp[4] + 2; /* header, var length, var bytes, port */
 1000|      3|    break;
 1001|      1|  case 4: /* IPv6 */
  ------------------
  |  Branch (1001:3): [True: 1, False: 5]
  ------------------
 1002|      1|    resp_len = 4 + 16 + 2;
 1003|      1|    break;
 1004|      1|  default:
  ------------------
  |  Branch (1004:3): [True: 1, False: 5]
  ------------------
 1005|      1|    failf(data, "SOCKS5 reply has wrong address type.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1006|      1|    return CURLPX_BAD_ADDRESS_TYPE;
 1007|      6|  }
 1008|       |
 1009|       |  /* receive the rest of the response */
 1010|      5|  presult = socks_recv(sx, cf, data, resp_len, done);
 1011|      5|  if(presult)
  ------------------
  |  Branch (1011:6): [True: 2, False: 3]
  ------------------
 1012|      2|    return presult;
 1013|      3|  else if(!*done)
  ------------------
  |  Branch (1013:11): [True: 1, False: 2]
  ------------------
 1014|      1|    return CURLPX_OK;
 1015|       |
 1016|      2|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < resp_len) {
  ------------------
  |  Branch (1016:6): [True: 0, False: 2]
  |  Branch (1016:51): [True: 0, False: 2]
  ------------------
 1017|      0|    failf(data, "SOCKS5 response is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1018|      0|    return CURLPX_RECV_CONNECT;
 1019|      0|  }
 1020|       |  /* got it all */
 1021|      2|  *done = TRUE;
  ------------------
  |  | 1055|      2|#define TRUE true
  ------------------
 1022|      2|  return CURLPX_OK;
 1023|      2|}
socks.c:socks4_connect:
  464|    176|{
  465|    176|  size_t nwritten;
  466|    176|  CURLproxycode presult;
  467|    176|  CURLcode result;
  468|    176|  bool done;
  469|       |
  470|    184|process_state:
  471|    184|  switch(sx->state) {
  472|    129|  case SOCKS_ST_INIT:
  ------------------
  |  Branch (472:3): [True: 129, False: 55]
  ------------------
  473|    129|    sx->version = 4;
  474|    129|    sxstate(sx, cf, data, SOCKS4_ST_START);
  ------------------
  |  |  162|    129|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  475|    129|    FALLTHROUGH();
  ------------------
  |  |  821|    129|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  476|       |
  477|    129|  case SOCKS4_ST_START:
  ------------------
  |  Branch (477:3): [True: 0, False: 184]
  ------------------
  478|    129|    Curl_bufq_reset(&sx->iobuf);
  479|    129|    sx->start_resolving = FALSE;
  ------------------
  |  | 1058|    129|#define FALSE false
  ------------------
  480|    129|    sx->socks4a = (sx->proxy_type == CURLPROXY_SOCKS4A);
  ------------------
  |  |  801|    129|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  481|    129|    sx->resolve_local = !sx->socks4a;
  482|    129|    sx->presult = CURLPX_OK;
  483|       |
  484|       |    /* SOCKS4 can only do IPv4, insist! */
  485|    129|    sx->ip_version = CURL_IPRESOLVE_V4;
  ------------------
  |  | 2305|    129|#define CURL_IPRESOLVE_V4       1L /* uses only IPv4 addresses/connections */
  ------------------
  486|    129|    CURL_TRC_CF(data, cf, "SOCKS4%s connecting to %s:%u",
  ------------------
  |  |  153|    129|  do {                                          \
  |  |  154|    129|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    129|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    258|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 129, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 129]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    258|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    129|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    129|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|    129|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 129]
  |  |  ------------------
  ------------------
  487|    129|                sx->socks4a ? "a" : "",
  488|    129|                sx->dest->hostname, sx->dest->port);
  489|       |
  490|       |    /*
  491|       |     * Compose socks4 request
  492|       |     *
  493|       |     * Request format
  494|       |     *
  495|       |     *     +----+----+----+----+----+----+----+----+----+----+....+----+
  496|       |     *     | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|
  497|       |     *     +----+----+----+----+----+----+----+----+----+----+....+----+
  498|       |     * # of bytes:  1    1      2              4           variable       1
  499|       |     */
  500|    129|    presult = socks4_req_add_hd(sx, data);
  501|    129|    if(presult)
  ------------------
  |  Branch (501:8): [True: 0, False: 129]
  ------------------
  502|      0|      return socks_failed(sx, cf, data, presult);
  503|       |
  504|       |    /* DNS resolve only for SOCKS4, not SOCKS4a */
  505|    129|    if(!sx->resolve_local) {
  ------------------
  |  Branch (505:8): [True: 9, False: 120]
  ------------------
  506|       |      /* socks4a, not resolving locally, sends the hostname.
  507|       |       * add an invalid address + user + hostname */
  508|      9|      unsigned char buf[4] = { 0, 0, 0, 1 };
  509|      9|      size_t hlen = strlen(sx->dest->hostname) + 1; /* including NUL */
  510|       |
  511|      9|      if(hlen > 255) {
  ------------------
  |  Branch (511:10): [True: 0, False: 9]
  ------------------
  512|      0|        failf(data, "SOCKS4: too long hostname");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  513|      0|        return socks_failed(sx, cf, data, CURLPX_LONG_HOSTNAME);
  514|      0|      }
  515|      9|      result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
  516|      9|      if(result || (nwritten != 4))
  ------------------
  |  Branch (516:10): [True: 0, False: 9]
  |  Branch (516:20): [True: 0, False: 9]
  ------------------
  517|      0|        return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  518|      9|      presult = socks4_req_add_user(sx, data);
  519|      9|      if(presult)
  ------------------
  |  Branch (519:10): [True: 1, False: 8]
  ------------------
  520|      1|        return socks_failed(sx, cf, data, presult);
  521|      8|      result = Curl_bufq_cwrite(&sx->iobuf, sx->dest->hostname, hlen,
  522|      8|                                &nwritten);
  523|      8|      if(result || (nwritten != hlen))
  ------------------
  |  Branch (523:10): [True: 0, False: 8]
  |  Branch (523:20): [True: 0, False: 8]
  ------------------
  524|      0|        return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  525|       |      /* request complete */
  526|      8|      sxstate(sx, cf, data, SOCKS4_ST_SEND);
  ------------------
  |  |  162|      8|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  527|      8|      goto process_state;
  528|      8|    }
  529|    120|    sx->start_resolving = TRUE;
  ------------------
  |  | 1055|    120|#define TRUE true
  ------------------
  530|    120|    sxstate(sx, cf, data, SOCKS4_ST_RESOLVING);
  ------------------
  |  |  162|    120|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  531|    120|    FALLTHROUGH();
  ------------------
  |  |  821|    120|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  532|       |
  533|    124|  case SOCKS4_ST_RESOLVING:
  ------------------
  |  Branch (533:3): [True: 4, False: 180]
  ------------------
  534|    124|    presult = socks4_resolving(sx, cf, data, &done);
  535|    124|    if(presult)
  ------------------
  |  Branch (535:8): [True: 1, False: 123]
  ------------------
  536|      1|      return socks_failed(sx, cf, data, presult);
  537|    123|    if(!done)
  ------------------
  |  Branch (537:8): [True: 50, False: 73]
  ------------------
  538|     50|      return CURLPX_OK;
  539|       |    /* append user */
  540|     73|    presult = socks4_req_add_user(sx, data);
  541|     73|    if(presult)
  ------------------
  |  Branch (541:8): [True: 1, False: 72]
  ------------------
  542|      1|      return socks_failed(sx, cf, data, presult);
  543|     72|    sxstate(sx, cf, data, SOCKS4_ST_SEND);
  ------------------
  |  |  162|     72|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  544|     72|    FALLTHROUGH();
  ------------------
  |  |  821|     72|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  545|       |
  546|     80|  case SOCKS4_ST_SEND:
  ------------------
  |  Branch (546:3): [True: 8, False: 176]
  ------------------
  547|     80|    presult = socks_flush(sx, cf, data, &done);
  548|     80|    if(presult)
  ------------------
  |  Branch (548:8): [True: 0, False: 80]
  ------------------
  549|      0|      return socks_failed(sx, cf, data, presult);
  550|     80|    else if(!done)
  ------------------
  |  Branch (550:13): [True: 0, False: 80]
  ------------------
  551|      0|      return CURLPX_OK;
  552|     80|    sxstate(sx, cf, data, SOCKS4_ST_RECV);
  ------------------
  |  |  162|     80|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  553|     80|    FALLTHROUGH();
  ------------------
  |  |  821|     80|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  554|       |
  555|    121|  case SOCKS4_ST_RECV:
  ------------------
  |  Branch (555:3): [True: 41, False: 143]
  ------------------
  556|       |    /* Receive 8 byte response */
  557|    121|    presult = socks_recv(sx, cf, data, 8, &done);
  558|    121|    if(presult)
  ------------------
  |  Branch (558:8): [True: 47, False: 74]
  ------------------
  559|     47|      return socks_failed(sx, cf, data, presult);
  560|     74|    else if(!done)
  ------------------
  |  Branch (560:13): [True: 44, False: 30]
  ------------------
  561|     44|      return CURLPX_OK;
  562|     30|    presult = socks4_check_resp(sx, cf, data);
  563|     30|    if(presult)
  ------------------
  |  Branch (563:8): [True: 5, False: 25]
  ------------------
  564|      5|      return socks_failed(sx, cf, data, presult);
  565|     25|    sxstate(sx, cf, data, SOCKS_ST_SUCCESS);
  ------------------
  |  |  162|     25|#define sxstate(x, c, d, y) socksstate(x, c, d, y, __LINE__)
  ------------------
  566|     25|    FALLTHROUGH();
  ------------------
  |  |  821|     25|#  define FALLTHROUGH()  __attribute__((fallthrough))
  ------------------
  567|       |
  568|     27|  case SOCKS_ST_SUCCESS:
  ------------------
  |  Branch (568:3): [True: 2, False: 182]
  ------------------
  569|     27|    return CURLPX_OK;
  570|       |
  571|      0|  case SOCKS_ST_FAILED:
  ------------------
  |  Branch (571:3): [True: 0, False: 184]
  ------------------
  572|      0|    DEBUGASSERT(sx->presult);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (572:5): [True: 0, False: 0]
  |  Branch (572:5): [True: 0, False: 0]
  ------------------
  573|      0|    return sx->presult;
  574|       |
  575|      0|  default:
  ------------------
  |  Branch (575:3): [True: 0, False: 184]
  ------------------
  576|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:5): [Folded, False: 0]
  |  Branch (576:5): [Folded, False: 0]
  ------------------
  577|      0|    return socks_failed(sx, cf, data, CURLPX_SEND_REQUEST);
  578|    184|  }
  579|    184|}
socks.c:socks4_req_add_hd:
  265|    129|{
  266|    129|  unsigned char buf[4];
  267|    129|  size_t nwritten;
  268|    129|  CURLcode result;
  269|       |
  270|    129|  (void)data;
  271|    129|  buf[0] = 4; /* version (SOCKS4) */
  272|    129|  buf[1] = 1; /* connect */
  273|    129|  buf[2] = (unsigned char)((sx->dest->port >> 8) & 0xffU); /* MSB */
  274|    129|  buf[3] = (unsigned char)(sx->dest->port & 0xffU);        /* LSB */
  275|       |
  276|    129|  result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
  277|    129|  if(result || (nwritten != 4))
  ------------------
  |  Branch (277:6): [True: 0, False: 129]
  |  Branch (277:16): [True: 0, False: 129]
  ------------------
  278|      0|    return CURLPX_SEND_REQUEST;
  279|    129|  return CURLPX_OK;
  280|    129|}
socks.c:socks4_req_add_user:
  284|     82|{
  285|     82|  CURLcode result;
  286|     82|  size_t nwritten;
  287|       |
  288|     82|  if(sx->creds) {
  ------------------
  |  Branch (288:6): [True: 36, False: 46]
  ------------------
  289|     36|    size_t plen = strlen(sx->creds->user);
  290|     36|    if(plen > 255) {
  ------------------
  |  Branch (290:8): [True: 2, False: 34]
  ------------------
  291|       |      /* there is no real size limit to this field in the protocol, but
  292|       |         SOCKS5 limits the proxy user field to 255 bytes and it seems likely
  293|       |         that a longer field is either a mistake or malicious input */
  294|      2|      failf(data, "Too long SOCKS proxy username");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
  295|      2|      return CURLPX_LONG_USER;
  296|      2|    }
  297|       |    /* add proxy name WITH trailing zero */
  298|     34|    result = Curl_bufq_cwrite(&sx->iobuf, sx->creds->user, plen + 1,
  299|     34|                              &nwritten);
  300|     34|    if(result || (nwritten != (plen + 1)))
  ------------------
  |  Branch (300:8): [True: 0, False: 34]
  |  Branch (300:18): [True: 0, False: 34]
  ------------------
  301|      0|      return CURLPX_SEND_REQUEST;
  302|     34|  }
  303|     46|  else {
  304|       |    /* empty username */
  305|     46|    unsigned char b = 0;
  306|     46|    result = Curl_bufq_write(&sx->iobuf, &b, 1, &nwritten);
  307|     46|    if(result || (nwritten != 1))
  ------------------
  |  Branch (307:8): [True: 0, False: 46]
  |  Branch (307:18): [True: 0, False: 46]
  ------------------
  308|      0|      return CURLPX_SEND_REQUEST;
  309|     46|  }
  310|     80|  return CURLPX_OK;
  311|     82|}
socks.c:socks4_resolving:
  317|    124|{
  318|    124|  const struct Curl_addrinfo *ai = NULL;
  319|    124|  CURLcode result;
  320|    124|  size_t nwritten;
  321|    124|  bool dns_done;
  322|       |
  323|    124|  *done = FALSE;
  ------------------
  |  | 1058|    124|#define FALSE false
  ------------------
  324|    124|  if(sx->start_resolving) {
  ------------------
  |  Branch (324:6): [True: 120, False: 4]
  ------------------
  325|       |    /* need to resolve hostname to add destination address */
  326|    120|    sx->start_resolving = FALSE;
  ------------------
  |  | 1058|    120|#define FALSE false
  ------------------
  327|    120|    result = Curl_cf_dns_insert_after(
  328|    120|      cf, data, Curl_resolv_dns_queries(data, sx->ip_version),
  329|    120|      sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  |  307|    120|#define TRNSPRT_TCP  3
  ------------------
                    sx->dest, TRNSPRT_TCP, TRUE);
  ------------------
  |  | 1055|    120|#define TRUE true
  ------------------
  330|    120|    if(result) {
  ------------------
  |  Branch (330:8): [True: 0, False: 120]
  ------------------
  331|      0|      failf(data, "unable to create DNS filter for socks");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  332|      0|      return CURLPX_UNKNOWN_FAIL;
  333|      0|    }
  334|    120|  }
  335|       |
  336|       |  /* resolve the hostname by connecting the DNS filter */
  337|    124|  result = Curl_conn_cf_connect(cf->next, data, &dns_done);
  338|    124|  if(result) {
  ------------------
  |  Branch (338:6): [True: 1, False: 123]
  ------------------
  339|      1|    failf(data, "Failed to resolve \"%s\" for SOCKS4 connect.",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  340|      1|          sx->dest->hostname);
  341|      1|    return CURLPX_RESOLVE_HOST;
  342|      1|  }
  343|    123|  else if(!dns_done)
  ------------------
  |  Branch (343:11): [True: 50, False: 73]
  ------------------
  344|     50|    return CURLPX_OK;
  345|       |
  346|     73|  ai = Curl_cf_dns_get_ai(cf->next, data, AF_INET, 0);
  347|     73|  if(ai) {
  ------------------
  |  Branch (347:6): [True: 73, False: 0]
  ------------------
  348|     73|    struct sockaddr_in *saddr_in;
  349|     73|    char ipbuf[64];
  350|       |
  351|     73|    Curl_printable_address(ai, ipbuf, sizeof(ipbuf));
  352|     73|    CURL_TRC_CF(data, cf, "SOCKS4 connect to IPv4 %s (locally resolved)",
  ------------------
  |  |  153|     73|  do {                                          \
  |  |  154|     73|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     73|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    146|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 73, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 73]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    146|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     73|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     73|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     73|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 73]
  |  |  ------------------
  ------------------
  353|     73|                ipbuf);
  354|       |
  355|     73|    saddr_in = (struct sockaddr_in *)(void *)ai->ai_addr;
  356|     73|    result = Curl_bufq_write(&sx->iobuf,
  357|     73|                             (unsigned char *)&saddr_in->sin_addr.s_addr, 4,
  358|     73|                             &nwritten);
  359|       |
  360|     73|    if(result || (nwritten != 4))
  ------------------
  |  Branch (360:8): [True: 0, False: 73]
  |  Branch (360:18): [True: 0, False: 73]
  ------------------
  361|      0|      return CURLPX_SEND_REQUEST;
  362|     73|  }
  363|      0|  else {
  364|       |    /* No ipv4 address resolved */
  365|      0|    failf(data, "SOCKS4 connection to %s not supported", sx->dest->hostname);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  366|      0|    return CURLPX_RESOLVE_HOST;
  367|      0|  }
  368|       |
  369|     73|  *done = TRUE;
  ------------------
  |  | 1055|     73|#define TRUE true
  ------------------
  370|     73|  return CURLPX_OK;
  371|     73|}
socks.c:socks4_check_resp:
  376|     30|{
  377|     30|  const unsigned char *resp;
  378|     30|  size_t rlen;
  379|       |
  380|     30|  if(!Curl_bufq_peek(&sx->iobuf, &resp, &rlen) || rlen < 8) {
  ------------------
  |  Branch (380:6): [True: 0, False: 30]
  |  Branch (380:51): [True: 0, False: 30]
  ------------------
  381|      0|    failf(data, "SOCKS4 reply is incomplete.");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  382|      0|    return CURLPX_RECV_CONNECT;
  383|      0|  }
  384|       |
  385|     30|  DEBUGASSERT(rlen == 8);
  ------------------
  |  | 1081|     30|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (385:3): [True: 0, False: 30]
  |  Branch (385:3): [True: 30, False: 0]
  ------------------
  386|       |  /*
  387|       |   * Response format
  388|       |   *
  389|       |   *     +----+----+----+----+----+----+----+----+
  390|       |   *     | VN | CD | DSTPORT |      DSTIP        |
  391|       |   *     +----+----+----+----+----+----+----+----+
  392|       |   * # of bytes:  1    1      2              4
  393|       |   *
  394|       |   * VN is the version of the reply code and should be 0. CD is the result
  395|       |   * code with one of the following values:
  396|       |   *
  397|       |   * 90: request granted
  398|       |   * 91: request rejected or failed
  399|       |   * 92: request rejected because SOCKS server cannot connect to
  400|       |   *     identd on the client
  401|       |   * 93: request rejected because the client program and identd
  402|       |   *     report different user-ids
  403|       |   */
  404|       |
  405|       |  /* wrong version ? */
  406|     30|  if(resp[0]) {
  ------------------
  |  Branch (406:6): [True: 1, False: 29]
  ------------------
  407|      1|    failf(data, "SOCKS4 reply has wrong version, version should be 0.");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  408|      1|    return CURLPX_BAD_VERSION;
  409|      1|  }
  410|       |
  411|       |  /* Result */
  412|     29|  switch(resp[1]) {
  413|     25|  case 90:
  ------------------
  |  Branch (413:3): [True: 25, False: 4]
  ------------------
  414|     25|    CURL_TRC_CF(data, cf, "SOCKS4%s request granted.", sx->socks4a ? "a" : "");
  ------------------
  |  |  153|     25|  do {                                          \
  |  |  154|     25|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     25|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|     50|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 25, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|     50|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     25|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     25|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (155:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  156|     25|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 25]
  |  |  ------------------
  ------------------
  415|     25|    Curl_bufq_skip(&sx->iobuf, 8);
  416|     25|    return CURLPX_OK;
  417|      1|  case 91:
  ------------------
  |  Branch (417:3): [True: 1, False: 28]
  ------------------
  418|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  419|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  420|      1|          ", request rejected or failed.",
  421|      1|          resp[4], resp[5], resp[6], resp[7],
  422|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  423|      1|    return CURLPX_REQUEST_FAILED;
  424|      1|  case 92:
  ------------------
  |  Branch (424:3): [True: 1, False: 28]
  ------------------
  425|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  426|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  427|      1|          ", request rejected because SOCKS server cannot connect to "
  428|      1|          "identd on the client.",
  429|      1|          resp[4], resp[5], resp[6], resp[7],
  430|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  431|      1|    return CURLPX_IDENTD;
  432|      1|  case 93:
  ------------------
  |  Branch (432:3): [True: 1, False: 28]
  ------------------
  433|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  434|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  435|      1|          ", request rejected because the client program and identd "
  436|      1|          "report different user-ids.",
  437|      1|          resp[4], resp[5], resp[6], resp[7],
  438|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  439|      1|    return CURLPX_IDENTD_DIFFER;
  440|      1|  default:
  ------------------
  |  Branch (440:3): [True: 1, False: 28]
  ------------------
  441|      1|    failf(data,
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  442|      1|          "[SOCKS] cannot complete SOCKS4 connection to %u.%u.%u.%u:%u. (%u)"
  443|      1|          ", Unknown.",
  444|      1|          resp[4], resp[5], resp[6], resp[7],
  445|      1|          (unsigned int)((resp[2] << 8) | resp[3]), resp[1]);
  446|      1|    return CURLPX_UNKNOWN_FAIL;
  447|     29|  }
  448|     29|}
socks.c:socks_proxy_cf_close:
 1294|    156|{
 1295|    156|  cf->connected = FALSE;
  ------------------
  |  | 1058|    156|#define FALSE false
  ------------------
 1296|    156|  if(cf->next)
  ------------------
  |  Branch (1296:6): [True: 156, False: 0]
  ------------------
 1297|    156|    cf->next->cft->do_close(cf->next, data);
 1298|    156|}
socks.c:socks_cf_adjust_pollset:
 1267|    877|{
 1268|    877|  struct socks_ctx *sx = cf->ctx;
 1269|    877|  CURLcode result = CURLE_OK;
 1270|       |
 1271|    877|  if(!cf->connected && sx) {
  ------------------
  |  Branch (1271:6): [True: 67, False: 810]
  |  Branch (1271:24): [True: 67, False: 0]
  ------------------
 1272|       |    /* If we are not connected, the filter below is and has nothing
 1273|       |     * to wait on, we determine what to wait for. */
 1274|     67|    curl_socket_t sock = Curl_conn_cf_get_socket(cf, data);
 1275|     67|    switch(sx->state) {
 1276|      0|    case SOCKS4_ST_SEND:
  ------------------
  |  Branch (1276:5): [True: 0, False: 67]
  ------------------
 1277|      0|    case SOCKS5_ST_REQ0_SEND:
  ------------------
  |  Branch (1277:5): [True: 0, False: 67]
  ------------------
 1278|      0|    case SOCKS5_ST_AUTH_SEND:
  ------------------
  |  Branch (1278:5): [True: 0, False: 67]
  ------------------
 1279|      0|    case SOCKS5_ST_REQ1_SEND:
  ------------------
  |  Branch (1279:5): [True: 0, False: 67]
  ------------------
 1280|      0|      CURL_TRC_CF(data, cf, "adjust pollset out (%d)", sx->state);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1281|      0|      result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
 1282|      0|      break;
 1283|     67|    default:
  ------------------
  |  Branch (1283:5): [True: 67, False: 0]
  ------------------
 1284|     67|      CURL_TRC_CF(data, cf, "adjust pollset in (%d)", sx->state);
  ------------------
  |  |  153|     67|  do {                                          \
  |  |  154|     67|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|     67|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    134|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 67, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    134|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|     67|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|     67|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|     67|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 67]
  |  |  ------------------
  ------------------
 1285|     67|      result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|     67|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|     67|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|     67|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
 1286|     67|      break;
 1287|     67|    }
 1288|     67|  }
 1289|    877|  return result;
 1290|    877|}
socks.c:socks_cf_query:
 1311|   983k|{
 1312|   983k|  struct socks_ctx *sx = cf->ctx;
 1313|       |
 1314|   983k|  switch(query) {
 1315|      0|  case CF_QUERY_HOST_PORT:
  ------------------
  |  |  177|      0|#define CF_QUERY_HOST_PORT         11  /* port       const char * */
  ------------------
  |  Branch (1315:3): [True: 0, False: 983k]
  ------------------
 1316|      0|    if(sx) {
  ------------------
  |  Branch (1316:8): [True: 0, False: 0]
  ------------------
 1317|      0|      *pres1 = sx->dest->port;
 1318|      0|      *((const char **)pres2) = sx->dest->hostname;
 1319|      0|      return CURLE_OK;
 1320|      0|    }
 1321|      0|    break;
 1322|      3|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      3|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1322:3): [True: 3, False: 983k]
  ------------------
 1323|      3|    const char **palpn = pres2;
 1324|      3|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      3|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1324:5): [True: 0, False: 3]
  |  Branch (1324:5): [True: 3, False: 0]
  ------------------
 1325|      3|    *palpn = NULL;
 1326|      3|    return CURLE_OK;
 1327|      3|  }
 1328|   983k|  default:
  ------------------
  |  Branch (1328:3): [True: 983k, False: 3]
  ------------------
 1329|   983k|    break;
 1330|   983k|  }
 1331|   983k|  return cf->next ?
  ------------------
  |  Branch (1331:10): [True: 983k, False: 0]
  ------------------
 1332|   983k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1333|   983k|    CURLE_UNKNOWN_OPTION;
 1334|   983k|}
socks.c:socks_proxy_ctx_free:
 1181|    154|{
 1182|    154|  if(ctx) {
  ------------------
  |  Branch (1182:6): [True: 154, False: 0]
  ------------------
 1183|    154|    Curl_peer_unlink(&ctx->dest);
 1184|    154|    Curl_creds_unlink(&ctx->creds);
 1185|    154|    Curl_bufq_free(&ctx->iobuf);
 1186|    154|    curlx_free(ctx);
  ------------------
  |  | 1483|    154|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1187|    154|  }
 1188|    154|}

Curl_splay:
   43|  1.47M|{
   44|  1.47M|  struct Curl_tree N, *l, *r, *y;
   45|       |
   46|  1.47M|  if(!t)
  ------------------
  |  Branch (46:6): [True: 0, False: 1.47M]
  ------------------
   47|      0|    return NULL;
   48|  1.47M|  N.smaller = N.larger = NULL;
   49|  1.47M|  l = r = &N;
   50|       |
   51|  1.67M|  for(;;) {
   52|  1.67M|    timediff_t comp = splay_compare(pkey, &t->key);
  ------------------
  |  |   35|  1.67M|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
   53|  1.67M|    if(comp < 0) {
  ------------------
  |  Branch (53:8): [True: 713k, False: 960k]
  ------------------
   54|   713k|      if(!t->smaller)
  ------------------
  |  Branch (54:10): [True: 519k, False: 193k]
  ------------------
   55|   519k|        break;
   56|   193k|      if(splay_compare(pkey, &t->smaller->key) < 0) {
  ------------------
  |  |   35|   193k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (56:10): [True: 193k, False: 4]
  ------------------
   57|   193k|        y = t->smaller;                           /* rotate smaller */
   58|   193k|        t->smaller = y->larger;
   59|   193k|        y->larger = t;
   60|   193k|        t = y;
   61|   193k|        if(!t->smaller)
  ------------------
  |  Branch (61:12): [True: 192k, False: 437]
  ------------------
   62|   192k|          break;
   63|   193k|      }
   64|    441|      r->smaller = t;                               /* link smaller */
   65|    441|      r = t;
   66|    441|      t = t->smaller;
   67|    441|    }
   68|   960k|    else if(comp > 0) {
  ------------------
  |  Branch (68:13): [True: 581k, False: 379k]
  ------------------
   69|   581k|      if(!t->larger)
  ------------------
  |  Branch (69:10): [True: 387k, False: 193k]
  ------------------
   70|   387k|        break;
   71|   193k|      if(splay_compare(pkey, &t->larger->key) > 0) {
  ------------------
  |  |   35|   193k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (71:10): [True: 405, False: 193k]
  ------------------
   72|    405|        y = t->larger;                          /* rotate larger */
   73|    405|        t->larger = y->smaller;
   74|    405|        y->smaller = t;
   75|    405|        t = y;
   76|    405|        if(!t->larger)
  ------------------
  |  Branch (76:12): [True: 206, False: 199]
  ------------------
   77|    206|          break;
   78|    405|      }
   79|   193k|      l->larger = t;                              /* link larger */
   80|   193k|      l = t;
   81|   193k|      t = t->larger;
   82|   193k|    }
   83|   379k|    else
   84|   379k|      break;
   85|  1.67M|  }
   86|       |
   87|  1.47M|  l->larger = t->smaller;                                /* assemble */
   88|  1.47M|  r->smaller = t->larger;
   89|  1.47M|  t->smaller = N.larger;
   90|  1.47M|  t->larger = N.smaller;
   91|       |
   92|  1.47M|  return t;
   93|  1.47M|}
Curl_splayinsert:
  107|   379k|{
  108|   379k|  DEBUGASSERT(node);
  ------------------
  |  | 1081|   379k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (108:3): [True: 0, False: 379k]
  |  Branch (108:3): [True: 379k, False: 0]
  ------------------
  109|       |
  110|   379k|  if(t) {
  ------------------
  |  Branch (110:6): [True: 221k, False: 157k]
  ------------------
  111|   221k|    t = Curl_splay(pkey, t);
  112|   221k|    DEBUGASSERT(t);
  ------------------
  |  | 1081|   221k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (112:5): [True: 0, False: 221k]
  |  Branch (112:5): [True: 221k, False: 0]
  ------------------
  113|   221k|    if(splay_compare(pkey, &t->key) == 0) {
  ------------------
  |  |   35|   221k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (113:8): [True: 41, False: 221k]
  ------------------
  114|       |      /* There already exists a node in the tree with the same key. Build a
  115|       |         doubly-linked circular list of nodes. We add the new 'node' struct to
  116|       |         the end of this list. */
  117|       |
  118|     41|      node->key = SPLAY_SUBNODE; /* identify this node as a subnode */
  119|     41|      node->samen = t;
  120|     41|      node->samep = t->samep;
  121|     41|      t->samep->samen = node;
  122|     41|      t->samep = node;
  123|       |
  124|     41|      return t; /* the root node always stays the same */
  125|     41|    }
  126|   221k|  }
  127|       |
  128|   379k|  if(!t) {
  ------------------
  |  Branch (128:6): [True: 157k, False: 221k]
  ------------------
  129|   157k|    node->smaller = node->larger = NULL;
  130|   157k|  }
  131|   221k|  else if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|   221k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (131:11): [True: 27.7k, False: 193k]
  ------------------
  132|  27.7k|    node->smaller = t->smaller;
  133|  27.7k|    node->larger = t;
  134|  27.7k|    t->smaller = NULL;
  135|  27.7k|  }
  136|   193k|  else {
  137|   193k|    node->larger = t->larger;
  138|   193k|    node->smaller = t;
  139|   193k|    t->larger = NULL;
  140|   193k|  }
  141|   379k|  node->key = *pkey;
  142|       |
  143|       |  /* no identical nodes (yet), we are the only one in the list of nodes */
  144|   379k|  node->samen = node;
  145|   379k|  node->samep = node;
  146|   379k|  return node;
  147|   379k|}
Curl_splaygetbest:
  155|   684k|{
  156|   684k|  static const struct curltime tv_zero = { 0, 0 };
  157|   684k|  struct Curl_tree *x;
  158|       |
  159|   684k|  if(!t) {
  ------------------
  |  Branch (159:6): [True: 0, False: 684k]
  ------------------
  160|      0|    *removed = NULL; /* none removed since there was no root */
  161|      0|    return NULL;
  162|      0|  }
  163|       |
  164|       |  /* find smallest */
  165|   684k|  t = Curl_splay(&tv_zero, t);
  166|   684k|  DEBUGASSERT(t);
  ------------------
  |  | 1081|   684k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (166:3): [True: 0, False: 684k]
  |  Branch (166:3): [True: 684k, False: 0]
  ------------------
  167|   684k|  if(splay_compare(pkey, &t->key) < 0) {
  ------------------
  |  |   35|   684k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (167:6): [True: 684k, False: 20]
  ------------------
  168|       |    /* even the smallest is too big */
  169|   684k|    *removed = NULL;
  170|   684k|    return t;
  171|   684k|  }
  172|       |
  173|       |  /* FIRST! Check if there is a list with identical keys */
  174|     20|  x = t->samen;
  175|     20|  if(x != t) {
  ------------------
  |  Branch (175:6): [True: 0, False: 20]
  ------------------
  176|       |    /* there is, pick one from the list */
  177|       |
  178|       |    /* 'x' is the new root node */
  179|       |
  180|      0|    x->key = t->key;
  181|      0|    x->larger = t->larger;
  182|      0|    x->smaller = t->smaller;
  183|      0|    x->samep = t->samep;
  184|      0|    t->samep->samen = x;
  185|       |
  186|      0|    *removed = t;
  187|      0|    return x; /* new root */
  188|      0|  }
  189|       |
  190|       |  /* we splayed the tree to the smallest element, there is no smaller */
  191|     20|  x = t->larger;
  192|     20|  *removed = t;
  193|       |
  194|     20|  return x;
  195|     20|}
Curl_splayremove:
  211|   379k|{
  212|   379k|  struct Curl_tree *x;
  213|       |
  214|   379k|  if(!t)
  ------------------
  |  Branch (214:6): [True: 0, False: 379k]
  ------------------
  215|      0|    return 1;
  216|       |
  217|   379k|  DEBUGASSERT(removenode);
  ------------------
  |  | 1081|   379k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:3): [True: 0, False: 379k]
  |  Branch (217:3): [True: 379k, False: 0]
  ------------------
  218|       |
  219|   379k|  if(splay_compare(&SPLAY_SUBNODE, &removenode->key) == 0) {
  ------------------
  |  |   35|   379k|#define splay_compare(i, j) curlx_ptimediff_us(i, j)
  ------------------
  |  Branch (219:6): [True: 41, False: 379k]
  ------------------
  220|       |    /* It is a subnode within a 'same' linked list and thus we can unlink it
  221|       |       easily. */
  222|     41|    DEBUGASSERT(removenode->samen != removenode);
  ------------------
  |  | 1081|     41|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (222:5): [True: 0, False: 41]
  |  Branch (222:5): [True: 41, False: 0]
  ------------------
  223|     41|    if(removenode->samen == removenode)
  ------------------
  |  Branch (223:8): [True: 0, False: 41]
  ------------------
  224|       |      /* A non-subnode should never be set to SPLAY_SUBNODE */
  225|      0|      return 3;
  226|       |
  227|     41|    removenode->samep->samen = removenode->samen;
  228|     41|    removenode->samen->samep = removenode->samep;
  229|       |
  230|       |    /* Ensures that double-remove gets caught. */
  231|     41|    removenode->samen = removenode;
  232|       |
  233|     41|    *newroot = t; /* return the same root */
  234|     41|    return 0;
  235|     41|  }
  236|       |
  237|   379k|  t = Curl_splay(&removenode->key, t);
  238|   379k|  DEBUGASSERT(t);
  ------------------
  |  | 1081|   379k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (238:3): [True: 0, False: 379k]
  |  Branch (238:3): [True: 379k, False: 0]
  ------------------
  239|       |
  240|       |  /* First make sure that we got the same root node as the one we want
  241|       |     to remove, as otherwise we might be trying to remove a node that
  242|       |     is not actually in the tree.
  243|       |
  244|       |     We cannot compare the keys here as a double remove in quick
  245|       |     succession of a node with key != SPLAY_SUBNODE && same != NULL
  246|       |     could return the same key but a different node. */
  247|   379k|  DEBUGASSERT(t == removenode);
  ------------------
  |  | 1081|   379k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (247:3): [True: 0, False: 379k]
  |  Branch (247:3): [True: 379k, False: 0]
  ------------------
  248|   379k|  if(t != removenode)
  ------------------
  |  Branch (248:6): [True: 0, False: 379k]
  ------------------
  249|      0|    return 2;
  250|       |
  251|       |  /* Check if there is a list with identical sizes, as then we are trying to
  252|       |     remove the root node of a list of nodes with identical keys. */
  253|   379k|  x = t->samen;
  254|   379k|  if(x != t) {
  ------------------
  |  Branch (254:6): [True: 0, False: 379k]
  ------------------
  255|       |    /* 'x' is the new root node, we make it use the root node's
  256|       |       smaller/larger links */
  257|       |
  258|      0|    x->key = t->key;
  259|      0|    x->larger = t->larger;
  260|      0|    x->smaller = t->smaller;
  261|      0|    x->samep = t->samep;
  262|      0|    t->samep->samen = x;
  263|      0|  }
  264|   379k|  else {
  265|       |    /* Remove the root node */
  266|   379k|    if(!t->smaller)
  ------------------
  |  Branch (266:8): [True: 185k, False: 193k]
  ------------------
  267|   185k|      x = t->larger;
  268|   193k|    else {
  269|   193k|      x = Curl_splay(&removenode->key, t->smaller);
  270|   193k|      DEBUGASSERT(x);
  ------------------
  |  | 1081|   193k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (270:7): [True: 0, False: 193k]
  |  Branch (270:7): [True: 193k, False: 0]
  ------------------
  271|   193k|      x->larger = t->larger;
  272|   193k|    }
  273|   379k|  }
  274|       |
  275|   379k|  *newroot = x; /* store new root pointer */
  276|       |
  277|   379k|  return 0;
  278|   379k|}
Curl_splayset:
  282|   379k|{
  283|   379k|  DEBUGASSERT(node);
  ------------------
  |  | 1081|   379k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (283:3): [True: 0, False: 379k]
  |  Branch (283:3): [True: 379k, False: 0]
  ------------------
  284|   379k|  node->ptr = payload;
  285|   379k|}
Curl_splayget:
  288|     20|{
  289|     20|  DEBUGASSERT(node);
  ------------------
  |  | 1081|     20|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (289:3): [True: 0, False: 20]
  |  Branch (289:3): [True: 20, False: 0]
  ------------------
  290|     20|  return node->ptr;
  291|     20|}

Curl_raw_toupper:
   75|   131M|{
   76|   131M|  return (char)touppermap[(unsigned char)in];
   77|   131M|}
Curl_raw_tolower:
   82|  5.28M|{
   83|  5.28M|  return (char)tolowermap[(unsigned char)in];
   84|  5.28M|}
Curl_strntoupper:
   92|  20.2k|{
   93|  20.2k|  if(n < 1)
  ------------------
  |  Branch (93:6): [True: 0, False: 20.2k]
  ------------------
   94|      0|    return;
   95|       |
   96|   189k|  do {
   97|   189k|    *dest++ = Curl_raw_toupper(*src);
   98|   189k|  } while(*src++ && --n);
  ------------------
  |  Branch (98:11): [True: 177k, False: 12.1k]
  |  Branch (98:21): [True: 169k, False: 8.04k]
  ------------------
   99|  20.2k|}
Curl_strntolower:
  107|   821k|{
  108|   821k|  if(n < 1)
  ------------------
  |  Branch (108:6): [True: 1.17k, False: 820k]
  ------------------
  109|  1.17k|    return;
  110|       |
  111|  4.63M|  do {
  112|  4.63M|    *dest++ = Curl_raw_tolower(*src);
  113|  4.63M|  } while(*src++ && --n);
  ------------------
  |  Branch (113:11): [True: 4.63M, False: 0]
  |  Branch (113:21): [True: 3.80M, False: 820k]
  ------------------
  114|   820k|}
Curl_safecmp:
  120|  3.51k|{
  121|  3.51k|  if(a && b)
  ------------------
  |  Branch (121:6): [True: 204, False: 3.30k]
  |  Branch (121:11): [True: 204, False: 0]
  ------------------
  122|    204|    return !strcmp(a, b);
  123|  3.30k|  return !a && !b;
  ------------------
  |  Branch (123:10): [True: 3.30k, False: 0]
  |  Branch (123:16): [True: 235, False: 3.07k]
  ------------------
  124|  3.51k|}
Curl_timestrcmp:
  131|  40.0k|{
  132|  40.0k|  int match = 0;
  133|  40.0k|  int i = 0;
  134|       |
  135|  40.0k|  if(a && b) {
  ------------------
  |  Branch (135:6): [True: 39.9k, False: 160]
  |  Branch (135:11): [True: 39.9k, False: 0]
  ------------------
  136|  90.1k|    while(1) {
  ------------------
  |  Branch (136:11): [True: 90.1k, Folded]
  ------------------
  137|  90.1k|      match |= a[i] ^ b[i];
  138|  90.1k|      if(!a[i] || !b[i])
  ------------------
  |  Branch (138:10): [True: 39.8k, False: 50.2k]
  |  Branch (138:19): [True: 11, False: 50.2k]
  ------------------
  139|  39.9k|        break;
  140|  50.2k|      i++;
  141|  50.2k|    }
  142|  39.9k|  }
  143|    160|  else
  144|    160|    return a || b;
  ------------------
  |  Branch (144:12): [True: 0, False: 160]
  |  Branch (144:17): [True: 0, False: 160]
  ------------------
  145|  39.9k|  return match;
  146|  40.0k|}

curl_strequal:
   77|  58.0M|{
   78|  58.0M|  if(s1 && s2)
  ------------------
  |  Branch (78:6): [True: 58.0M, False: 35.1k]
  |  Branch (78:12): [True: 58.0M, False: 1]
  ------------------
   79|       |    /* both pointers point to something then compare them */
   80|  58.0M|    return casecompare(s1, s2);
   81|       |
   82|       |  /* if both pointers are NULL then treat them as equal */
   83|  35.1k|  return NULL == s1 && NULL == s2;
  ------------------
  |  Branch (83:10): [True: 35.1k, False: 1]
  |  Branch (83:24): [True: 35.0k, False: 54]
  ------------------
   84|  58.0M|}
curl_strnequal:
   88|  2.29M|{
   89|  2.29M|  if(s1 && s2)
  ------------------
  |  Branch (89:6): [True: 2.29M, False: 0]
  |  Branch (89:12): [True: 2.29M, False: 0]
  ------------------
   90|       |    /* both pointers point to something then compare them */
   91|  2.29M|    return ncasecompare(s1, s2, n);
   92|       |
   93|       |  /* if both pointers are NULL then treat them as equal if max is non-zero */
   94|      0|  return NULL == s1 && NULL == s2 && n;
  ------------------
  |  Branch (94:10): [True: 0, False: 0]
  |  Branch (94:24): [True: 0, False: 0]
  |  Branch (94:38): [True: 0, False: 0]
  ------------------
   95|  2.29M|}
strequal.c:casecompare:
   36|  58.0M|{
   37|  59.5M|  while(*first) {
  ------------------
  |  Branch (37:9): [True: 59.3M, False: 145k]
  ------------------
   38|  59.3M|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (38:8): [True: 57.8M, False: 1.47M]
  ------------------
   39|       |      /* get out of the loop as soon as they do not match */
   40|  57.8M|      return 0;
   41|  1.47M|    first++;
   42|  1.47M|    second++;
   43|  1.47M|  }
   44|       |  /* If we are here either the strings are the same or the length is different.
   45|       |     We can test if the "current" character is non-zero for one and zero
   46|       |     for the other. Note that the characters may not be exactly the same even
   47|       |     if they match, we only want to compare zero-ness. */
   48|   145k|  return !*first == !*second;
   49|  58.0M|}
strequal.c:ncasecompare:
   52|  2.29M|{
   53|  6.65M|  while(*first && max) {
  ------------------
  |  Branch (53:9): [True: 6.13M, False: 517k]
  |  Branch (53:19): [True: 6.01M, False: 118k]
  ------------------
   54|  6.01M|    if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second))
  ------------------
  |  Branch (54:8): [True: 1.66M, False: 4.35M]
  ------------------
   55|  1.66M|      return 0;
   56|  4.35M|    max--;
   57|  4.35M|    first++;
   58|  4.35M|    second++;
   59|  4.35M|  }
   60|   636k|  if(max == 0)
  ------------------
  |  Branch (60:6): [True: 625k, False: 11.5k]
  ------------------
   61|   625k|    return 1; /* they are equal this far */
   62|       |
   63|  11.5k|  return Curl_raw_toupper(*first) == Curl_raw_toupper(*second);
   64|   636k|}

curl_easy_strerror:
   35|    187|{
   36|    187|#ifdef CURLVERBOSE
   37|    187|  switch(error) {
   38|      0|  case CURLE_OK:
  ------------------
  |  Branch (38:3): [True: 0, False: 187]
  ------------------
   39|      0|    return "No error";
   40|       |
   41|      0|  case CURLE_UNSUPPORTED_PROTOCOL:
  ------------------
  |  Branch (41:3): [True: 0, False: 187]
  ------------------
   42|      0|    return "Unsupported protocol";
   43|       |
   44|      0|  case CURLE_FAILED_INIT:
  ------------------
  |  Branch (44:3): [True: 0, False: 187]
  ------------------
   45|      0|    return "Failed initialization";
   46|       |
   47|      0|  case CURLE_URL_MALFORMAT:
  ------------------
  |  Branch (47:3): [True: 0, False: 187]
  ------------------
   48|      0|    return "URL using bad/illegal format or missing URL";
   49|       |
   50|      0|  case CURLE_NOT_BUILT_IN:
  ------------------
  |  Branch (50:3): [True: 0, False: 187]
  ------------------
   51|      0|    return "A requested feature, protocol or option was not found built-in in"
   52|      0|           " this libcurl due to a build-time decision.";
   53|       |
   54|      0|  case CURLE_COULDNT_RESOLVE_PROXY:
  ------------------
  |  Branch (54:3): [True: 0, False: 187]
  ------------------
   55|      0|    return "Could not resolve proxy name";
   56|       |
   57|      0|  case CURLE_COULDNT_RESOLVE_HOST:
  ------------------
  |  Branch (57:3): [True: 0, False: 187]
  ------------------
   58|      0|    return "Could not resolve hostname";
   59|       |
   60|     77|  case CURLE_COULDNT_CONNECT:
  ------------------
  |  Branch (60:3): [True: 77, False: 110]
  ------------------
   61|     77|    return "Could not connect to server";
   62|       |
   63|      0|  case CURLE_WEIRD_SERVER_REPLY:
  ------------------
  |  Branch (63:3): [True: 0, False: 187]
  ------------------
   64|      0|    return "Weird server reply";
   65|       |
   66|      0|  case CURLE_REMOTE_ACCESS_DENIED:
  ------------------
  |  Branch (66:3): [True: 0, False: 187]
  ------------------
   67|      0|    return "Access denied to remote resource";
   68|       |
   69|      0|  case CURLE_FTP_ACCEPT_FAILED:
  ------------------
  |  Branch (69:3): [True: 0, False: 187]
  ------------------
   70|      0|    return "FTP: The server failed to connect to data port";
   71|       |
   72|      0|  case CURLE_FTP_ACCEPT_TIMEOUT:
  ------------------
  |  Branch (72:3): [True: 0, False: 187]
  ------------------
   73|      0|    return "FTP: Accepting server connect has timed out";
   74|       |
   75|      0|  case CURLE_FTP_PRET_FAILED:
  ------------------
  |  Branch (75:3): [True: 0, False: 187]
  ------------------
   76|      0|    return "FTP: The server did not accept the PRET command.";
   77|       |
   78|      0|  case CURLE_FTP_WEIRD_PASS_REPLY:
  ------------------
  |  Branch (78:3): [True: 0, False: 187]
  ------------------
   79|      0|    return "FTP: unknown PASS reply";
   80|       |
   81|      0|  case CURLE_FTP_WEIRD_PASV_REPLY:
  ------------------
  |  Branch (81:3): [True: 0, False: 187]
  ------------------
   82|      0|    return "FTP: unknown PASV reply";
   83|       |
   84|      0|  case CURLE_FTP_WEIRD_227_FORMAT:
  ------------------
  |  Branch (84:3): [True: 0, False: 187]
  ------------------
   85|      0|    return "FTP: unknown 227 response format";
   86|       |
   87|      0|  case CURLE_FTP_CANT_GET_HOST:
  ------------------
  |  Branch (87:3): [True: 0, False: 187]
  ------------------
   88|      0|    return "FTP: cannot figure out the host in the PASV response";
   89|       |
   90|      0|  case CURLE_HTTP2:
  ------------------
  |  Branch (90:3): [True: 0, False: 187]
  ------------------
   91|      0|    return "Error in the HTTP2 framing layer";
   92|       |
   93|      0|  case CURLE_FTP_COULDNT_SET_TYPE:
  ------------------
  |  Branch (93:3): [True: 0, False: 187]
  ------------------
   94|      0|    return "FTP: could not set file type";
   95|       |
   96|      0|  case CURLE_PARTIAL_FILE:
  ------------------
  |  Branch (96:3): [True: 0, False: 187]
  ------------------
   97|      0|    return "Transferred a partial file";
   98|       |
   99|      0|  case CURLE_FTP_COULDNT_RETR_FILE:
  ------------------
  |  Branch (99:3): [True: 0, False: 187]
  ------------------
  100|      0|    return "FTP: could not retrieve (RETR failed) the specified file";
  101|       |
  102|      0|  case CURLE_QUOTE_ERROR:
  ------------------
  |  Branch (102:3): [True: 0, False: 187]
  ------------------
  103|      0|    return "Quote command returned error";
  104|       |
  105|      0|  case CURLE_HTTP_RETURNED_ERROR:
  ------------------
  |  Branch (105:3): [True: 0, False: 187]
  ------------------
  106|      0|    return "HTTP response code said error";
  107|       |
  108|      0|  case CURLE_WRITE_ERROR:
  ------------------
  |  Branch (108:3): [True: 0, False: 187]
  ------------------
  109|      0|    return "Failed writing received data to disk/application";
  110|       |
  111|      0|  case CURLE_UPLOAD_FAILED:
  ------------------
  |  Branch (111:3): [True: 0, False: 187]
  ------------------
  112|      0|    return "Upload failed (at start/before it took off)";
  113|       |
  114|      0|  case CURLE_READ_ERROR:
  ------------------
  |  Branch (114:3): [True: 0, False: 187]
  ------------------
  115|      0|    return "Failed to open/read local data from file/application";
  116|       |
  117|      0|  case CURLE_OUT_OF_MEMORY:
  ------------------
  |  Branch (117:3): [True: 0, False: 187]
  ------------------
  118|      0|    return "Out of memory";
  119|       |
  120|      0|  case CURLE_OPERATION_TIMEDOUT:
  ------------------
  |  Branch (120:3): [True: 0, False: 187]
  ------------------
  121|      0|    return "Timeout was reached";
  122|       |
  123|      0|  case CURLE_FTP_PORT_FAILED:
  ------------------
  |  Branch (123:3): [True: 0, False: 187]
  ------------------
  124|      0|    return "FTP: command PORT failed";
  125|       |
  126|      0|  case CURLE_FTP_COULDNT_USE_REST:
  ------------------
  |  Branch (126:3): [True: 0, False: 187]
  ------------------
  127|      0|    return "FTP: command REST failed";
  128|       |
  129|      0|  case CURLE_RANGE_ERROR:
  ------------------
  |  Branch (129:3): [True: 0, False: 187]
  ------------------
  130|      0|    return "Requested range was not delivered by the server";
  131|       |
  132|      0|  case CURLE_SSL_CONNECT_ERROR:
  ------------------
  |  Branch (132:3): [True: 0, False: 187]
  ------------------
  133|      0|    return "SSL connect error";
  134|       |
  135|      0|  case CURLE_BAD_DOWNLOAD_RESUME:
  ------------------
  |  Branch (135:3): [True: 0, False: 187]
  ------------------
  136|      0|    return "Could not resume download";
  137|       |
  138|      0|  case CURLE_FILE_COULDNT_READ_FILE:
  ------------------
  |  Branch (138:3): [True: 0, False: 187]
  ------------------
  139|      0|    return "Could not read a file:// file";
  140|       |
  141|      0|  case CURLE_LDAP_CANNOT_BIND:
  ------------------
  |  Branch (141:3): [True: 0, False: 187]
  ------------------
  142|      0|    return "LDAP: cannot bind";
  143|       |
  144|      0|  case CURLE_LDAP_SEARCH_FAILED:
  ------------------
  |  Branch (144:3): [True: 0, False: 187]
  ------------------
  145|      0|    return "LDAP: search failed";
  146|       |
  147|      0|  case CURLE_ABORTED_BY_CALLBACK:
  ------------------
  |  Branch (147:3): [True: 0, False: 187]
  ------------------
  148|      0|    return "Operation was aborted by an application callback";
  149|       |
  150|      2|  case CURLE_BAD_FUNCTION_ARGUMENT:
  ------------------
  |  Branch (150:3): [True: 2, False: 185]
  ------------------
  151|      2|    return "A libcurl function was given a bad argument";
  152|       |
  153|    108|  case CURLE_INTERFACE_FAILED:
  ------------------
  |  Branch (153:3): [True: 108, False: 79]
  ------------------
  154|    108|    return "Failed binding local connection end";
  155|       |
  156|      0|  case CURLE_TOO_MANY_REDIRECTS:
  ------------------
  |  Branch (156:3): [True: 0, False: 187]
  ------------------
  157|      0|    return "Number of redirects hit maximum amount";
  158|       |
  159|      0|  case CURLE_UNKNOWN_OPTION:
  ------------------
  |  Branch (159:3): [True: 0, False: 187]
  ------------------
  160|      0|    return "An unknown option was passed in to libcurl";
  161|       |
  162|      0|  case CURLE_SETOPT_OPTION_SYNTAX:
  ------------------
  |  Branch (162:3): [True: 0, False: 187]
  ------------------
  163|      0|    return "Malformed option provided in a setopt";
  164|       |
  165|      0|  case CURLE_GOT_NOTHING:
  ------------------
  |  Branch (165:3): [True: 0, False: 187]
  ------------------
  166|      0|    return "Server returned nothing (no headers, no data)";
  167|       |
  168|      0|  case CURLE_SSL_ENGINE_NOTFOUND:
  ------------------
  |  Branch (168:3): [True: 0, False: 187]
  ------------------
  169|      0|    return "SSL crypto engine not found";
  170|       |
  171|      0|  case CURLE_SSL_ENGINE_SETFAILED:
  ------------------
  |  Branch (171:3): [True: 0, False: 187]
  ------------------
  172|      0|    return "Can not set SSL crypto engine as default";
  173|       |
  174|      0|  case CURLE_SSL_ENGINE_INITFAILED:
  ------------------
  |  Branch (174:3): [True: 0, False: 187]
  ------------------
  175|      0|    return "Failed to initialize SSL crypto engine";
  176|       |
  177|      0|  case CURLE_SEND_ERROR:
  ------------------
  |  Branch (177:3): [True: 0, False: 187]
  ------------------
  178|      0|    return "Failed sending data to the peer";
  179|       |
  180|      0|  case CURLE_RECV_ERROR:
  ------------------
  |  Branch (180:3): [True: 0, False: 187]
  ------------------
  181|      0|    return "Failure when receiving data from the peer";
  182|       |
  183|      0|  case CURLE_SSL_CERTPROBLEM:
  ------------------
  |  Branch (183:3): [True: 0, False: 187]
  ------------------
  184|      0|    return "Problem with the local SSL certificate";
  185|       |
  186|      0|  case CURLE_SSL_CIPHER:
  ------------------
  |  Branch (186:3): [True: 0, False: 187]
  ------------------
  187|      0|    return "Could not use specified SSL cipher";
  188|       |
  189|      0|  case CURLE_PEER_FAILED_VERIFICATION:
  ------------------
  |  Branch (189:3): [True: 0, False: 187]
  ------------------
  190|      0|    return "SSL peer certificate or SSH remote key was not OK";
  191|       |
  192|      0|  case CURLE_SSL_CACERT_BADFILE:
  ------------------
  |  Branch (192:3): [True: 0, False: 187]
  ------------------
  193|      0|    return "Problem with the SSL CA cert (path? access rights?)";
  194|       |
  195|      0|  case CURLE_BAD_CONTENT_ENCODING:
  ------------------
  |  Branch (195:3): [True: 0, False: 187]
  ------------------
  196|      0|    return "Unrecognized or bad HTTP Content or Transfer-Encoding";
  197|       |
  198|      0|  case CURLE_FILESIZE_EXCEEDED:
  ------------------
  |  Branch (198:3): [True: 0, False: 187]
  ------------------
  199|      0|    return "Maximum file size exceeded";
  200|       |
  201|      0|  case CURLE_USE_SSL_FAILED:
  ------------------
  |  Branch (201:3): [True: 0, False: 187]
  ------------------
  202|      0|    return "Requested SSL level failed";
  203|       |
  204|      0|  case CURLE_SSL_SHUTDOWN_FAILED:
  ------------------
  |  Branch (204:3): [True: 0, False: 187]
  ------------------
  205|      0|    return "Failed to shut down the SSL connection";
  206|       |
  207|      0|  case CURLE_SSL_CRL_BADFILE:
  ------------------
  |  Branch (207:3): [True: 0, False: 187]
  ------------------
  208|      0|    return "Failed to load CRL file (path? access rights?, format?)";
  209|       |
  210|      0|  case CURLE_SSL_ISSUER_ERROR:
  ------------------
  |  Branch (210:3): [True: 0, False: 187]
  ------------------
  211|      0|    return "Issuer check against peer certificate failed";
  212|       |
  213|      0|  case CURLE_SEND_FAIL_REWIND:
  ------------------
  |  Branch (213:3): [True: 0, False: 187]
  ------------------
  214|      0|    return "Send failed since rewinding of the data stream failed";
  215|       |
  216|      0|  case CURLE_LOGIN_DENIED:
  ------------------
  |  Branch (216:3): [True: 0, False: 187]
  ------------------
  217|      0|    return "Login denied";
  218|       |
  219|      0|  case CURLE_TFTP_NOTFOUND:
  ------------------
  |  Branch (219:3): [True: 0, False: 187]
  ------------------
  220|      0|    return "TFTP: File Not Found";
  221|       |
  222|      0|  case CURLE_TFTP_PERM:
  ------------------
  |  Branch (222:3): [True: 0, False: 187]
  ------------------
  223|      0|    return "TFTP: Access Violation";
  224|       |
  225|      0|  case CURLE_REMOTE_DISK_FULL:
  ------------------
  |  Branch (225:3): [True: 0, False: 187]
  ------------------
  226|      0|    return "Disk full or allocation exceeded";
  227|       |
  228|      0|  case CURLE_TFTP_ILLEGAL:
  ------------------
  |  Branch (228:3): [True: 0, False: 187]
  ------------------
  229|      0|    return "TFTP: Illegal operation";
  230|       |
  231|      0|  case CURLE_TFTP_UNKNOWNID:
  ------------------
  |  Branch (231:3): [True: 0, False: 187]
  ------------------
  232|      0|    return "TFTP: Unknown transfer ID";
  233|       |
  234|      0|  case CURLE_REMOTE_FILE_EXISTS:
  ------------------
  |  Branch (234:3): [True: 0, False: 187]
  ------------------
  235|      0|    return "Remote file already exists";
  236|       |
  237|      0|  case CURLE_TFTP_NOSUCHUSER:
  ------------------
  |  Branch (237:3): [True: 0, False: 187]
  ------------------
  238|      0|    return "TFTP: No such user";
  239|       |
  240|      0|  case CURLE_REMOTE_FILE_NOT_FOUND:
  ------------------
  |  Branch (240:3): [True: 0, False: 187]
  ------------------
  241|      0|    return "Remote file not found";
  242|       |
  243|      0|  case CURLE_SSH:
  ------------------
  |  Branch (243:3): [True: 0, False: 187]
  ------------------
  244|      0|    return "Error in the SSH layer";
  245|       |
  246|      0|  case CURLE_AGAIN:
  ------------------
  |  Branch (246:3): [True: 0, False: 187]
  ------------------
  247|      0|    return "Socket not ready for send/recv";
  248|       |
  249|      0|  case CURLE_RTSP_CSEQ_ERROR:
  ------------------
  |  Branch (249:3): [True: 0, False: 187]
  ------------------
  250|      0|    return "RTSP CSeq mismatch or invalid CSeq";
  251|       |
  252|      0|  case CURLE_RTSP_SESSION_ERROR:
  ------------------
  |  Branch (252:3): [True: 0, False: 187]
  ------------------
  253|      0|    return "RTSP session error";
  254|       |
  255|      0|  case CURLE_FTP_BAD_FILE_LIST:
  ------------------
  |  Branch (255:3): [True: 0, False: 187]
  ------------------
  256|      0|    return "Unable to parse FTP file list";
  257|       |
  258|      0|  case CURLE_CHUNK_FAILED:
  ------------------
  |  Branch (258:3): [True: 0, False: 187]
  ------------------
  259|      0|    return "Chunk callback failed";
  260|       |
  261|      0|  case CURLE_NO_CONNECTION_AVAILABLE:
  ------------------
  |  Branch (261:3): [True: 0, False: 187]
  ------------------
  262|      0|    return "The max connection limit is reached";
  263|       |
  264|      0|  case CURLE_SSL_PINNEDPUBKEYNOTMATCH:
  ------------------
  |  Branch (264:3): [True: 0, False: 187]
  ------------------
  265|      0|    return "SSL public key does not match pinned public key";
  266|       |
  267|      0|  case CURLE_SSL_INVALIDCERTSTATUS:
  ------------------
  |  Branch (267:3): [True: 0, False: 187]
  ------------------
  268|      0|    return "SSL server certificate status verification FAILED";
  269|       |
  270|      0|  case CURLE_HTTP2_STREAM:
  ------------------
  |  Branch (270:3): [True: 0, False: 187]
  ------------------
  271|      0|    return "Stream error in the HTTP/2 framing layer";
  272|       |
  273|      0|  case CURLE_RECURSIVE_API_CALL:
  ------------------
  |  Branch (273:3): [True: 0, False: 187]
  ------------------
  274|      0|    return "API function called from within callback";
  275|       |
  276|      0|  case CURLE_AUTH_ERROR:
  ------------------
  |  Branch (276:3): [True: 0, False: 187]
  ------------------
  277|      0|    return "An authentication function returned an error";
  278|       |
  279|      0|  case CURLE_HTTP3:
  ------------------
  |  Branch (279:3): [True: 0, False: 187]
  ------------------
  280|      0|    return "HTTP/3 error";
  281|       |
  282|      0|  case CURLE_QUIC_CONNECT_ERROR:
  ------------------
  |  Branch (282:3): [True: 0, False: 187]
  ------------------
  283|      0|    return "QUIC connection error";
  284|       |
  285|      0|  case CURLE_PROXY:
  ------------------
  |  Branch (285:3): [True: 0, False: 187]
  ------------------
  286|      0|    return "proxy handshake error";
  287|       |
  288|      0|  case CURLE_SSL_CLIENTCERT:
  ------------------
  |  Branch (288:3): [True: 0, False: 187]
  ------------------
  289|      0|    return "SSL Client Certificate required";
  290|       |
  291|      0|  case CURLE_UNRECOVERABLE_POLL:
  ------------------
  |  Branch (291:3): [True: 0, False: 187]
  ------------------
  292|      0|    return "Unrecoverable error in select/poll";
  293|       |
  294|      0|  case CURLE_TOO_LARGE:
  ------------------
  |  Branch (294:3): [True: 0, False: 187]
  ------------------
  295|      0|    return "A value or data field grew larger than allowed";
  296|       |
  297|      0|  case CURLE_ECH_REQUIRED:
  ------------------
  |  Branch (297:3): [True: 0, False: 187]
  ------------------
  298|      0|    return "ECH attempted but failed";
  299|       |
  300|       |    /* error codes not used by current libcurl */
  301|      0|  default:
  ------------------
  |  Branch (301:3): [True: 0, False: 187]
  ------------------
  302|      0|    break;
  303|    187|  }
  304|       |  /*
  305|       |   * By using a switch, gcc -Wall will complain about enum values
  306|       |   * which do not appear, helping keep this function up-to-date.
  307|       |   * By using gcc -Wall -Werror, you cannot forget.
  308|       |   *
  309|       |   * A table would not have the same benefit. Most compilers will generate
  310|       |   * code similar to a table in any case, so there is little performance gain
  311|       |   * from a table. Something is broken for the user's application, anyways, so
  312|       |   * does it matter how fast it _does not_ work?
  313|       |   *
  314|       |   * The line number for the error will be near this comment, which is why it
  315|       |   * is here, and not at the start of the switch.
  316|       |   */
  317|      0|  return "Unknown error";
  318|       |#else
  319|       |  if(!error)
  320|       |    return "No error";
  321|       |  else
  322|       |    return "Error";
  323|       |#endif
  324|    187|}
curl_url_strerror:
  421|    782|{
  422|    782|#ifdef CURLVERBOSE
  423|    782|  switch(error) {
  ------------------
  |  Branch (423:10): [True: 782, False: 0]
  ------------------
  424|      0|  case CURLUE_OK:
  ------------------
  |  Branch (424:3): [True: 0, False: 782]
  ------------------
  425|      0|    return "No error";
  426|       |
  427|      0|  case CURLUE_BAD_HANDLE:
  ------------------
  |  Branch (427:3): [True: 0, False: 782]
  ------------------
  428|      0|    return "An invalid CURLU pointer was passed as argument";
  429|       |
  430|      0|  case CURLUE_BAD_PARTPOINTER:
  ------------------
  |  Branch (430:3): [True: 0, False: 782]
  ------------------
  431|      0|    return "An invalid 'part' argument was passed as argument";
  432|       |
  433|    283|  case CURLUE_MALFORMED_INPUT:
  ------------------
  |  Branch (433:3): [True: 283, False: 499]
  ------------------
  434|    283|    return "Malformed input to a URL function";
  435|       |
  436|     80|  case CURLUE_BAD_PORT_NUMBER:
  ------------------
  |  Branch (436:3): [True: 80, False: 702]
  ------------------
  437|     80|    return "Port number was not a decimal number between 0 and 65535";
  438|       |
  439|      1|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (439:3): [True: 1, False: 781]
  ------------------
  440|      1|    return "Unsupported URL scheme";
  441|       |
  442|      0|  case CURLUE_URLDECODE:
  ------------------
  |  Branch (442:3): [True: 0, False: 782]
  ------------------
  443|      0|    return "URL decode error, most likely because of rubbish in the input";
  444|       |
  445|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (445:3): [True: 0, False: 782]
  ------------------
  446|      0|    return "A memory function failed";
  447|       |
  448|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (448:3): [True: 1, False: 781]
  ------------------
  449|      1|    return "Credentials was passed in the URL when prohibited";
  450|       |
  451|      0|  case CURLUE_UNKNOWN_PART:
  ------------------
  |  Branch (451:3): [True: 0, False: 782]
  ------------------
  452|      0|    return "An unknown part ID was passed to a URL API function";
  453|       |
  454|      0|  case CURLUE_NO_SCHEME:
  ------------------
  |  Branch (454:3): [True: 0, False: 782]
  ------------------
  455|      0|    return "No scheme part in the URL";
  456|       |
  457|      0|  case CURLUE_NO_USER:
  ------------------
  |  Branch (457:3): [True: 0, False: 782]
  ------------------
  458|      0|    return "No user part in the URL";
  459|       |
  460|      0|  case CURLUE_NO_PASSWORD:
  ------------------
  |  Branch (460:3): [True: 0, False: 782]
  ------------------
  461|      0|    return "No password part in the URL";
  462|       |
  463|      0|  case CURLUE_NO_OPTIONS:
  ------------------
  |  Branch (463:3): [True: 0, False: 782]
  ------------------
  464|      0|    return "No options part in the URL";
  465|       |
  466|     63|  case CURLUE_NO_HOST:
  ------------------
  |  Branch (466:3): [True: 63, False: 719]
  ------------------
  467|     63|    return "No host part in the URL";
  468|       |
  469|      0|  case CURLUE_NO_PORT:
  ------------------
  |  Branch (469:3): [True: 0, False: 782]
  ------------------
  470|      0|    return "No port part in the URL";
  471|       |
  472|      0|  case CURLUE_NO_QUERY:
  ------------------
  |  Branch (472:3): [True: 0, False: 782]
  ------------------
  473|      0|    return "No query part in the URL";
  474|       |
  475|      0|  case CURLUE_NO_FRAGMENT:
  ------------------
  |  Branch (475:3): [True: 0, False: 782]
  ------------------
  476|      0|    return "No fragment part in the URL";
  477|       |
  478|      0|  case CURLUE_NO_ZONEID:
  ------------------
  |  Branch (478:3): [True: 0, False: 782]
  ------------------
  479|      0|    return "No zoneid part in the URL";
  480|       |
  481|      0|  case CURLUE_BAD_LOGIN:
  ------------------
  |  Branch (481:3): [True: 0, False: 782]
  ------------------
  482|      0|    return "Bad login part";
  483|       |
  484|     58|  case CURLUE_BAD_IPV6:
  ------------------
  |  Branch (484:3): [True: 58, False: 724]
  ------------------
  485|     58|    return "Bad IPv6 address";
  486|       |
  487|    237|  case CURLUE_BAD_HOSTNAME:
  ------------------
  |  Branch (487:3): [True: 237, False: 545]
  ------------------
  488|    237|    return "Bad hostname";
  489|       |
  490|     55|  case CURLUE_BAD_FILE_URL:
  ------------------
  |  Branch (490:3): [True: 55, False: 727]
  ------------------
  491|     55|    return "Bad file:// URL";
  492|       |
  493|      4|  case CURLUE_BAD_SLASHES:
  ------------------
  |  Branch (493:3): [True: 4, False: 778]
  ------------------
  494|      4|    return "Unsupported number of slashes following scheme";
  495|       |
  496|      0|  case CURLUE_BAD_SCHEME:
  ------------------
  |  Branch (496:3): [True: 0, False: 782]
  ------------------
  497|      0|    return "Bad scheme";
  498|       |
  499|      0|  case CURLUE_BAD_PATH:
  ------------------
  |  Branch (499:3): [True: 0, False: 782]
  ------------------
  500|      0|    return "Bad path";
  501|       |
  502|      0|  case CURLUE_BAD_FRAGMENT:
  ------------------
  |  Branch (502:3): [True: 0, False: 782]
  ------------------
  503|      0|    return "Bad fragment";
  504|       |
  505|      0|  case CURLUE_BAD_QUERY:
  ------------------
  |  Branch (505:3): [True: 0, False: 782]
  ------------------
  506|      0|    return "Bad query";
  507|       |
  508|      0|  case CURLUE_BAD_PASSWORD:
  ------------------
  |  Branch (508:3): [True: 0, False: 782]
  ------------------
  509|      0|    return "Bad password";
  510|       |
  511|      0|  case CURLUE_BAD_USER:
  ------------------
  |  Branch (511:3): [True: 0, False: 782]
  ------------------
  512|      0|    return "Bad user";
  513|       |
  514|      0|  case CURLUE_LACKS_IDN:
  ------------------
  |  Branch (514:3): [True: 0, False: 782]
  ------------------
  515|      0|    return "libcurl lacks IDN support";
  516|       |
  517|      0|  case CURLUE_TOO_LARGE:
  ------------------
  |  Branch (517:3): [True: 0, False: 782]
  ------------------
  518|      0|    return "A value or data field is larger than allowed";
  519|       |
  520|      0|  case CURLUE_LAST:
  ------------------
  |  Branch (520:3): [True: 0, False: 782]
  ------------------
  521|      0|    break;
  522|    782|  }
  523|       |
  524|      0|  return "CURLUcode unknown";
  525|       |#else
  526|       |  if(error == CURLUE_OK)
  527|       |    return "No error";
  528|       |  else
  529|       |    return "Error";
  530|       |#endif
  531|    782|}

Curl_thrdpool_set_props:
  272|  15.3k|{
  273|  15.3k|  CURLcode result = CURLE_OK;
  274|  15.3k|  size_t running;
  275|       |
  276|  15.3k|  if(!max_threads || (min_threads > max_threads))
  ------------------
  |  Branch (276:6): [True: 0, False: 15.3k]
  |  Branch (276:22): [True: 0, False: 15.3k]
  ------------------
  277|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  278|       |
  279|  15.3k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|  15.3k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  280|  15.3k|  tpool->min_threads = min_threads;
  281|  15.3k|  tpool->max_threads = max_threads;
  282|  15.3k|  tpool->idle_time_ms = idle_time_ms;
  283|  15.3k|  running = Curl_llist_count(&tpool->slots);
  284|  15.3k|  if(tpool->min_threads > running) {
  ------------------
  |  Branch (284:6): [True: 0, False: 15.3k]
  ------------------
  285|      0|    result = thrdpool_signal(tpool, tpool->min_threads - (uint32_t)running);
  286|      0|  }
  287|  15.3k|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|  15.3k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  288|       |
  289|  15.3k|  return result;
  290|  15.3k|}
Curl_thrdpool_create:
  301|  15.3k|{
  302|  15.3k|  struct curl_thrdpool *tpool;
  303|  15.3k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  304|       |
  305|  15.3k|  tpool = curlx_calloc(1, sizeof(*tpool));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  306|  15.3k|  if(!tpool)
  ------------------
  |  Branch (306:6): [True: 0, False: 15.3k]
  ------------------
  307|      0|    goto out;
  308|  15.3k|  tpool->refcount = 1;
  309|       |
  310|  15.3k|  Curl_mutex_init(&tpool->lock);
  ------------------
  |  |   35|  15.3k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  311|  15.3k|  Curl_cond_init(&tpool->await);
  ------------------
  |  |   40|  15.3k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  312|  15.3k|  Curl_llist_init(&tpool->slots, NULL);
  313|  15.3k|  Curl_llist_init(&tpool->zombies, NULL);
  314|  15.3k|  tpool->fn_take = fn_take;
  315|  15.3k|  tpool->fn_process = fn_process;
  316|  15.3k|  tpool->fn_return = fn_return;
  317|  15.3k|  tpool->fn_user_data = user_data;
  318|       |
  319|  15.3k|  tpool->name = curlx_strdup(name);
  ------------------
  |  | 1477|  15.3k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  320|  15.3k|  if(!tpool->name)
  ------------------
  |  Branch (320:6): [True: 0, False: 15.3k]
  ------------------
  321|      0|    goto out;
  322|       |
  323|  15.3k|  result = Curl_thrdpool_set_props(tpool, min_threads, max_threads,
  324|  15.3k|                                   idle_time_ms);
  325|       |
  326|  15.3k|out:
  327|  15.3k|  if(result && tpool) {
  ------------------
  |  Branch (327:6): [True: 0, False: 15.3k]
  |  Branch (327:16): [True: 0, False: 0]
  ------------------
  328|      0|    tpool->aborted = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  329|      0|    thrdpool_unlink(tpool, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  330|       |    tpool = NULL;
  331|      0|  }
  332|  15.3k|  *ptpool = tpool;
  333|  15.3k|  return result;
  334|  15.3k|}
Curl_thrdpool_destroy:
  337|  15.3k|{
  338|  15.3k|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|  15.3k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  339|       |
  340|  15.3k|  tpool->aborted = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  341|       |
  342|  15.9k|  while(join && Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (342:9): [True: 15.9k, False: 0]
  |  Branch (342:17): [True: 630, False: 15.3k]
  ------------------
  343|    630|    thrdpool_wake_all(tpool);
  344|    630|    Curl_cond_wait(&tpool->await, &tpool->lock);
  345|    630|  }
  346|       |
  347|  15.3k|  thrdpool_join_zombies(tpool);
  348|       |
  349|       |  /* detach all still running threads */
  350|  15.3k|  if(Curl_llist_count(&tpool->slots)) {
  ------------------
  |  Branch (350:6): [True: 0, False: 15.3k]
  ------------------
  351|      0|    struct Curl_llist_node *e;
  352|      0|    for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (352:45): [True: 0, False: 0]
  ------------------
  353|      0|      struct thrdslot *tslot = Curl_node_elem(e);
  354|      0|      if(tslot->thread != curl_thread_t_null)
  ------------------
  |  |   34|      0|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (354:10): [True: 0, False: 0]
  ------------------
  355|      0|        Curl_thread_destroy(&tslot->thread);
  356|      0|    }
  357|      0|    tpool->detached = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  358|      0|  }
  359|       |
  360|  15.3k|  if(!thrdpool_unlink(tpool, TRUE)) {
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  |  Branch (360:6): [True: 0, False: 15.3k]
  ------------------
  361|       |    /* tpool not destroyed */
  362|      0|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  363|      0|  }
  364|  15.3k|}
Curl_thrdpool_signal:
  367|    790|{
  368|    790|  CURLcode result;
  369|       |
  370|    790|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    790|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  371|    790|  result = thrdpool_signal(tpool, nthreads);
  372|    790|  Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    790|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  373|    790|  return result;
  374|    790|}
thrdpool.c:thrdpool_signal:
  237|    790|{
  238|    790|  struct Curl_llist_node *e, *n;
  239|    790|  CURLcode result = CURLE_OK;
  240|       |
  241|    790|  DEBUGASSERT(!tpool->aborted);
  ------------------
  |  | 1081|    790|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (241:3): [True: 0, False: 790]
  |  Branch (241:3): [True: 790, False: 0]
  ------------------
  242|    790|  thrdpool_join_zombies(tpool);
  243|       |
  244|  1.14k|  for(e = Curl_llist_head(&tpool->slots); e && nthreads; e = n) {
  ------------------
  |  Branch (244:43): [True: 366, False: 780]
  |  Branch (244:48): [True: 356, False: 10]
  ------------------
  245|    356|    struct thrdslot *tslot = Curl_node_elem(e);
  246|    356|    n = Curl_node_next(e);
  247|    356|    if(tslot->idle) {
  ------------------
  |  Branch (247:8): [True: 22, False: 334]
  ------------------
  248|     22|      Curl_cond_signal(&tslot->await);
  249|     22|      --nthreads;
  250|     22|    }
  251|    334|    else if(!tslot->starttime.tv_sec && !tslot->starttime.tv_usec) {
  ------------------
  |  Branch (251:13): [True: 333, False: 1]
  |  Branch (251:41): [True: 333, False: 0]
  ------------------
  252|       |      /* starting thread, queries for work soon. */
  253|    333|      --nthreads;
  254|    333|    }
  255|    356|  }
  256|       |
  257|  1.55k|  while(nthreads && !result &&
  ------------------
  |  Branch (257:9): [True: 768, False: 790]
  |  Branch (257:21): [True: 768, False: 0]
  ------------------
  258|    768|        Curl_llist_count(&tpool->slots) < tpool->max_threads) {
  ------------------
  |  Branch (258:9): [True: 768, False: 0]
  ------------------
  259|    768|    result = thrdslot_start(tpool);
  260|    768|    if(result)
  ------------------
  |  Branch (260:8): [True: 0, False: 768]
  ------------------
  261|      0|      break;
  262|    768|    --nthreads;
  263|    768|  }
  264|       |
  265|    790|  return result;
  266|    790|}
thrdpool.c:thrdslot_start:
  155|    768|{
  156|    768|  struct thrdslot *tslot;
  157|    768|  CURLcode result = CURLE_OUT_OF_MEMORY;
  158|       |
  159|    768|  tslot = curlx_calloc(1, sizeof(*tslot));
  ------------------
  |  | 1480|    768|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  160|    768|  if(!tslot)
  ------------------
  |  Branch (160:6): [True: 0, False: 768]
  ------------------
  161|      0|    goto out;
  162|    768|  tslot->id = tpool->next_id++;
  163|    768|  tslot->tpool = tpool;
  164|    768|  tslot->thread = curl_thread_t_null;
  ------------------
  |  |   34|    768|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  165|    768|  Curl_cond_init(&tslot->await);
  ------------------
  |  |   40|    768|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  166|       |
  167|    768|  tpool->refcount++;
  168|    768|  tslot->running = TRUE;
  ------------------
  |  | 1055|    768|#define TRUE true
  ------------------
  169|    768|  tslot->thread = Curl_thread_create(thrdslot_run, tslot);
  170|    768|  if(tslot->thread == curl_thread_t_null) { /* never started */
  ------------------
  |  |   34|    768|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (170:6): [True: 0, False: 768]
  ------------------
  171|      0|    tslot->running = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  172|      0|    thrdpool_unlink(tpool, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  173|      0|    result = CURLE_FAILED_INIT;
  174|      0|    goto out;
  175|      0|  }
  176|       |
  177|    768|  Curl_llist_append(&tpool->slots, tslot, &tslot->node);
  178|    768|  tslot = NULL;
  179|    768|  result = CURLE_OK;
  180|       |
  181|    768|out:
  182|    768|  if(tslot)
  ------------------
  |  Branch (182:6): [True: 0, False: 768]
  ------------------
  183|      0|    thrdslot_destroy(tslot);
  184|    768|  return result;
  185|    768|}
thrdpool.c:thrdslot_run:
   94|    768|{
   95|    768|  struct thrdslot *tslot = arg;
   96|    768|  struct curl_thrdpool *tpool = tslot->tpool;
   97|    768|  void *item;
   98|       |
   99|    768|  Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    768|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  100|    768|  DEBUGASSERT(Curl_node_llist(&tslot->node) == &tpool->slots);
  ------------------
  |  | 1081|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (100:3): [True: 0, False: 768]
  |  Branch (100:3): [True: 768, False: 0]
  ------------------
  101|  1.38k|  for(;;) {
  102|  2.17k|    while(!tpool->aborted) {
  ------------------
  |  Branch (102:11): [True: 1.41k, False: 768]
  ------------------
  103|  1.41k|      tslot->work_description = NULL;
  104|  1.41k|      tslot->work_timeout_ms = 0;
  105|  1.41k|      item = tpool->fn_take(tpool->fn_user_data, &tslot->work_description,
  106|  1.41k|                            &tslot->work_timeout_ms);
  107|  1.41k|      if(!item)
  ------------------
  |  Branch (107:10): [True: 621, False: 790]
  ------------------
  108|    621|        break;
  109|    790|      tslot->starttime = curlx_now();
  110|    790|      tslot->idle = FALSE;
  ------------------
  |  | 1058|    790|#define FALSE false
  ------------------
  111|    790|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    790|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  112|       |
  113|    790|      tpool->fn_process(item);
  114|       |
  115|    790|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    790|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  116|    790|      tslot->work_description = NULL;
  117|    790|      tpool->fn_return(item, tpool->aborted ? NULL : tpool->fn_user_data);
  ------------------
  |  Branch (117:30): [True: 169, False: 621]
  ------------------
  118|    790|    }
  119|       |
  120|  1.38k|    if(tpool->aborted ||
  ------------------
  |  Branch (120:8): [True: 768, False: 621]
  ------------------
  121|    621|       (Curl_llist_count(&tpool->slots) > tpool->max_threads))
  ------------------
  |  Branch (121:8): [True: 0, False: 621]
  ------------------
  122|    768|      goto out;
  123|       |
  124|    621|    tslot->idle = TRUE;
  ------------------
  |  | 1055|    621|#define TRUE true
  ------------------
  125|    621|    tslot->starttime = curlx_now();
  126|    621|    thrdpool_join_zombies(tpool);
  127|    621|    Curl_cond_signal(&tpool->await);
  128|       |    /* Only wait with idle timeout when we are above the minimum
  129|       |     * number of threads. Otherwise short idle timeouts will keep
  130|       |     * on activating threads that have no means to shut down. */
  131|    621|    if((tpool->idle_time_ms > 0) &&
  ------------------
  |  Branch (131:8): [True: 621, False: 0]
  ------------------
  132|    621|       (Curl_llist_count(&tpool->slots) > tpool->min_threads)) {
  ------------------
  |  Branch (132:8): [True: 621, False: 0]
  ------------------
  133|    621|      CURLcode result = Curl_cond_timedwait(&tslot->await, &tpool->lock,
  134|    621|                                            tpool->idle_time_ms);
  135|    621|      if((result == CURLE_OPERATION_TIMEDOUT) &&
  ------------------
  |  Branch (135:10): [True: 0, False: 621]
  ------------------
  136|      0|         (Curl_llist_count(&tpool->slots) > tpool->min_threads)) {
  ------------------
  |  Branch (136:10): [True: 0, False: 0]
  ------------------
  137|      0|        goto out;
  138|      0|      }
  139|    621|    }
  140|      0|    else {
  141|      0|      Curl_cond_wait(&tslot->await, &tpool->lock);
  142|      0|    }
  143|    621|  }
  144|       |
  145|    768|out:
  146|    768|  thrdslot_done(tslot);
  147|    768|  if(!thrdpool_unlink(tslot->tpool, TRUE)) {
  ------------------
  |  | 1055|    768|#define TRUE true
  ------------------
  |  Branch (147:6): [True: 768, False: 0]
  ------------------
  148|       |    /* tpool not destroyed */
  149|    768|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    768|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  150|    768|  }
  151|    768|  return 0;
  152|    768|}
thrdpool.c:thrdslot_done:
   83|    768|{
   84|    768|  struct curl_thrdpool *tpool = tslot->tpool;
   85|       |
   86|    768|  DEBUGASSERT(Curl_node_llist(&tslot->node) == &tpool->slots);
  ------------------
  |  | 1081|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (86:3): [True: 0, False: 768]
  |  Branch (86:3): [True: 768, False: 0]
  ------------------
   87|    768|  Curl_node_remove(&tslot->node);
   88|       |  tslot->running = FALSE;
  ------------------
  |  | 1058|    768|#define FALSE false
  ------------------
   89|    768|  Curl_llist_append(&tpool->zombies, tslot, &tslot->node);
   90|    768|  Curl_cond_signal(&tpool->await);
   91|    768|}
thrdpool.c:thrdslot_destroy:
   75|    768|{
   76|    768|  DEBUGASSERT(tslot->thread == curl_thread_t_null);
  ------------------
  |  | 1081|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (76:3): [True: 0, False: 768]
  |  Branch (76:3): [True: 768, False: 0]
  ------------------
   77|    768|  DEBUGASSERT(!tslot->running);
  ------------------
  |  | 1081|    768|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (77:3): [True: 0, False: 768]
  |  Branch (77:3): [True: 768, False: 0]
  ------------------
   78|    768|  Curl_cond_destroy(&tslot->await);
  ------------------
  |  |   41|    768|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
   79|    768|  curlx_free(tslot);
  ------------------
  |  | 1483|    768|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|    768|}
thrdpool.c:thrdpool_unlink:
  216|  16.1k|{
  217|  16.1k|  DEBUGASSERT(tpool->refcount);
  ------------------
  |  | 1081|  16.1k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (217:3): [True: 0, False: 16.1k]
  |  Branch (217:3): [True: 16.1k, False: 0]
  ------------------
  218|  16.1k|  if(tpool->refcount)
  ------------------
  |  Branch (218:6): [True: 16.1k, False: 0]
  ------------------
  219|  16.1k|    tpool->refcount--;
  220|  16.1k|  if(tpool->refcount)
  ------------------
  |  Branch (220:6): [True: 768, False: 15.3k]
  ------------------
  221|    768|    return FALSE;
  ------------------
  |  | 1058|    768|#define FALSE false
  ------------------
  222|       |
  223|       |  /* no more references, free */
  224|  15.3k|  DEBUGASSERT(tpool->aborted);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (224:3): [True: 0, False: 15.3k]
  |  Branch (224:3): [True: 15.3k, False: 0]
  ------------------
  225|  15.3k|  thrdpool_join_zombies(tpool);
  226|  15.3k|  if(locked)
  ------------------
  |  Branch (226:6): [True: 15.3k, False: 0]
  ------------------
  227|  15.3k|    Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|  15.3k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  228|  15.3k|  curlx_free(tpool->name);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  229|  15.3k|  Curl_cond_destroy(&tpool->await);
  ------------------
  |  |   41|  15.3k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  230|  15.3k|  Curl_mutex_destroy(&tpool->lock);
  ------------------
  |  |   38|  15.3k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  231|  15.3k|  curlx_free(tpool);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  232|       |  return TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  233|  15.3k|}
thrdpool.c:thrdpool_wake_all:
  188|    630|{
  189|    630|  struct Curl_llist_node *e;
  190|  1.59k|  for(e = Curl_llist_head(&tpool->slots); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (190:43): [True: 964, False: 630]
  ------------------
  191|    964|    struct thrdslot *tslot = Curl_node_elem(e);
  192|    964|    Curl_cond_signal(&tslot->await);
  193|    964|  }
  194|    630|}
thrdpool.c:thrdpool_join_zombies:
  197|  32.1k|{
  198|  32.1k|  struct Curl_llist_node *e;
  199|       |
  200|  32.8k|  for(e = Curl_llist_head(&tpool->zombies); e;
  ------------------
  |  Branch (200:45): [True: 768, False: 32.1k]
  ------------------
  201|  32.1k|      e = Curl_llist_head(&tpool->zombies)) {
  202|    768|    struct thrdslot *tslot = Curl_node_elem(e);
  203|       |
  204|    768|    Curl_node_remove(&tslot->node);
  205|    768|    if(tslot->thread != curl_thread_t_null) {
  ------------------
  |  |   34|    768|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  |  Branch (205:8): [True: 768, False: 0]
  ------------------
  206|    768|      Curl_mutex_release(&tpool->lock);
  ------------------
  |  |   37|    768|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  207|    768|      Curl_thread_join(&tslot->thread);
  208|    768|      Curl_mutex_acquire(&tpool->lock);
  ------------------
  |  |   36|    768|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  209|    768|      tslot->thread = curl_thread_t_null;
  ------------------
  |  |   34|    768|#  define curl_thread_t_null     (pthread_t *)0
  ------------------
  210|    768|    }
  211|    768|    thrdslot_destroy(tslot);
  212|    768|  }
  213|  32.1k|}

Curl_thrdq_create:
  209|  15.3k|{
  210|  15.3k|  struct curl_thrdq *tqueue;
  211|  15.3k|  CURLcode result = CURLE_OUT_OF_MEMORY;
  212|       |
  213|  15.3k|  tqueue = curlx_calloc(1, sizeof(*tqueue));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  214|  15.3k|  if(!tqueue)
  ------------------
  |  Branch (214:6): [True: 0, False: 15.3k]
  ------------------
  215|      0|    goto out;
  216|       |
  217|  15.3k|  Curl_mutex_init(&tqueue->lock);
  ------------------
  |  |   35|  15.3k|#  define Curl_mutex_init(m)     pthread_mutex_init(m, NULL)
  ------------------
  218|  15.3k|  Curl_cond_init(&tqueue->await);
  ------------------
  |  |   40|  15.3k|#  define Curl_cond_init(c)      pthread_cond_init(c, NULL)
  ------------------
  219|  15.3k|  Curl_llist_init(&tqueue->sendq, thrdq_item_list_dtor);
  220|  15.3k|  Curl_llist_init(&tqueue->recvq, thrdq_item_list_dtor);
  221|  15.3k|  tqueue->fn_free = fn_free;
  222|  15.3k|  tqueue->fn_process = fn_process;
  223|  15.3k|  tqueue->fn_event = fn_event;
  224|  15.3k|  tqueue->fn_user_data = user_data;
  225|  15.3k|  tqueue->send_max_len = max_len;
  226|       |
  227|  15.3k|  tqueue->name = curlx_strdup(name);
  ------------------
  |  | 1477|  15.3k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  228|  15.3k|  if(!tqueue->name)
  ------------------
  |  Branch (228:6): [True: 0, False: 15.3k]
  ------------------
  229|      0|    goto out;
  230|       |
  231|  15.3k|  result = Curl_thrdpool_create(&tqueue->tpool, name,
  232|  15.3k|                                min_threads, max_threads, idle_time_ms,
  233|  15.3k|                                thrdq_tpool_take,
  234|  15.3k|                                thrdq_tpool_process,
  235|  15.3k|                                thrdq_tpool_return,
  236|  15.3k|                                tqueue);
  237|       |
  238|  15.3k|out:
  239|  15.3k|  if(result && tqueue) {
  ------------------
  |  Branch (239:6): [True: 0, False: 15.3k]
  |  Branch (239:16): [True: 0, False: 0]
  ------------------
  240|      0|    tqueue->aborted = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  241|      0|    thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
                  thrdq_unlink(tqueue, FALSE, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  242|       |    tqueue = NULL;
  243|      0|  }
  244|  15.3k|  *ptqueue = tqueue;
  245|  15.3k|  return result;
  246|  15.3k|}
Curl_thrdq_destroy:
  249|  15.3k|{
  250|  15.3k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  15.3k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  251|  15.3k|  DEBUGASSERT(!tqueue->aborted);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (251:3): [True: 0, False: 15.3k]
  |  Branch (251:3): [True: 15.3k, False: 0]
  ------------------
  252|  15.3k|  tqueue->aborted = TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  253|       |  thrdq_unlink(tqueue, TRUE, join);
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  254|  15.3k|}
Curl_thrdq_send:
  258|    790|{
  259|    790|  CURLcode result = CURLE_AGAIN;
  260|    790|  size_t signals = 0;
  261|       |
  262|    790|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    790|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  263|    790|  if(tqueue->aborted) {
  ------------------
  |  Branch (263:6): [True: 0, False: 790]
  ------------------
  264|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (264:5): [Folded, False: 0]
  |  Branch (264:5): [Folded, False: 0]
  ------------------
  265|      0|    result = CURLE_SEND_ERROR;
  266|      0|    goto out;
  267|      0|  }
  268|    790|  if(timeout_ms < 0) {
  ------------------
  |  Branch (268:6): [True: 0, False: 790]
  ------------------
  269|      0|    result = CURLE_OPERATION_TIMEDOUT;
  270|      0|    goto out;
  271|      0|  }
  272|       |
  273|    790|  if(!tqueue->send_max_len ||
  ------------------
  |  Branch (273:6): [True: 790, False: 0]
  ------------------
  274|    790|     (Curl_llist_count(&tqueue->sendq) < tqueue->send_max_len)) {
  ------------------
  |  Branch (274:6): [True: 0, False: 0]
  ------------------
  275|    790|    struct thrdq_item *qitem = thrdq_item_create(tqueue, item, description,
  276|    790|                                                 timeout_ms);
  277|    790|    if(!qitem) {
  ------------------
  |  Branch (277:8): [True: 0, False: 790]
  ------------------
  278|      0|      result = CURLE_OUT_OF_MEMORY;
  279|      0|      goto out;
  280|      0|    }
  281|    790|    item = NULL;
  282|    790|    Curl_llist_append(&tqueue->sendq, qitem, &qitem->node);
  283|    790|    signals = Curl_llist_count(&tqueue->sendq);
  284|    790|    result = CURLE_OK;
  285|    790|  }
  286|       |
  287|    790|out:
  288|    790|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    790|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  289|       |  /* Signal thread pool unlocked to avoid deadlocks. Since we added
  290|       |   * item to the queue already, it might have been taken for processing
  291|       |   * already. Any error in signalling the pool cannot be reported to
  292|       |   * the caller since it needs to give up ownership of item. */
  293|    790|  if(!result && signals)
  ------------------
  |  Branch (293:6): [True: 790, False: 0]
  |  Branch (293:17): [True: 790, False: 0]
  ------------------
  294|    790|    (void)Curl_thrdpool_signal(tqueue->tpool, (uint32_t)signals);
  295|    790|  return result;
  296|    790|}
Curl_thrdq_recv:
  299|  1.62M|{
  300|  1.62M|  CURLcode result = CURLE_AGAIN;
  301|  1.62M|  struct Curl_llist_node *e;
  302|       |
  303|  1.62M|  *pitem = NULL;
  304|  1.62M|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  1.62M|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  305|  1.62M|  if(tqueue->aborted) {
  ------------------
  |  Branch (305:6): [True: 0, False: 1.62M]
  ------------------
  306|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (306:5): [Folded, False: 0]
  |  Branch (306:5): [Folded, False: 0]
  ------------------
  307|      0|    result = CURLE_RECV_ERROR;
  308|      0|    goto out;
  309|      0|  }
  310|       |
  311|  1.62M|  e = Curl_llist_head(&tqueue->recvq);
  312|  1.62M|  if(e) {
  ------------------
  |  Branch (312:6): [True: 621, False: 1.62M]
  ------------------
  313|    621|    struct thrdq_item *qitem = Curl_node_take_elem(e);
  314|    621|    *pitem = qitem->item;
  315|    621|    qitem->item = NULL;
  316|    621|    thrdq_item_destroy(qitem);
  317|    621|    result = CURLE_OK;
  318|    621|  }
  319|  1.62M|out:
  320|  1.62M|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  1.62M|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  321|  1.62M|  return result;
  322|  1.62M|}
Curl_thrdq_clear:
  342|    102|{
  343|    102|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    102|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  344|    102|  if(tqueue->aborted) {
  ------------------
  |  Branch (344:6): [True: 0, False: 102]
  ------------------
  345|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (345:5): [Folded, False: 0]
  |  Branch (345:5): [Folded, False: 0]
  ------------------
  346|      0|    goto out;
  347|      0|  }
  348|    102|  thrdq_llist_clean_matches(&tqueue->sendq, fn_match, match_data);
  349|    102|  thrdq_llist_clean_matches(&tqueue->recvq, fn_match, match_data);
  350|    102|out:
  351|    102|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    102|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  352|    102|}
Curl_thrdq_trace:
  389|  1.64M|{
  390|  1.64M|  struct curl_trc_feat *feat = &Curl_trc_feat_threads;
  391|  1.64M|  if(Curl_trc_ft_is_verbose(data, feat)) {
  ------------------
  |  |  326|  1.64M|  (Curl_trc_is_verbose(data) &&          \
  |  |  ------------------
  |  |  |  |  319|  3.28M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.64M, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.64M]
  |  |  |  |  ------------------
  |  |  |  |  320|  3.28M|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  327|  1.64M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  ------------------
  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  ------------------
  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  392|      0|    struct Curl_llist_node *e;
  393|      0|    struct thrdq_item *qitem;
  394|       |
  395|      0|    Curl_thrdpool_trace(tqueue->tpool, data);
  396|      0|    Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|      0|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  397|      0|    if(!Curl_llist_count(&tqueue->sendq) &&
  ------------------
  |  Branch (397:8): [True: 0, False: 0]
  ------------------
  398|      0|       !Curl_llist_count(&tqueue->recvq)) {
  ------------------
  |  Branch (398:8): [True: 0, False: 0]
  ------------------
  399|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] empty", tqueue->name);
  400|      0|    }
  401|      0|    for(e = Curl_llist_head(&tqueue->sendq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (401:46): [True: 0, False: 0]
  ------------------
  402|      0|      qitem = Curl_node_elem(e);
  403|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] in: %s",
  404|      0|                          tqueue->name, qitem->description);
  405|      0|    }
  406|      0|    for(e = Curl_llist_head(&tqueue->recvq); e; e = Curl_node_next(e)) {
  ------------------
  |  Branch (406:46): [True: 0, False: 0]
  ------------------
  407|      0|      qitem = Curl_node_elem(e);
  408|      0|      Curl_trc_feat_infof(data, feat, "[TQUEUE-%s] out: %s",
  409|      0|                          tqueue->name, qitem->description);
  410|      0|    }
  411|      0|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|      0|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  412|      0|  }
  413|  1.64M|}
thrdqueue.c:thrdq_tpool_take:
  100|  1.41k|{
  101|  1.41k|  struct curl_thrdq *tqueue = user_data;
  102|  1.41k|  struct thrdq_item *qitem = NULL;
  103|  1.41k|  struct Curl_llist_node *e;
  104|  1.41k|  Curl_thrdq_ev_cb *fn_event = NULL;
  105|  1.41k|  void *fn_user_data = NULL;
  106|       |
  107|  1.41k|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  1.41k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  108|  1.41k|  *pdescription = NULL;
  109|  1.41k|  *ptimeout_ms = 0;
  110|  1.41k|  if(!tqueue->aborted) {
  ------------------
  |  Branch (110:6): [True: 1.41k, False: 0]
  ------------------
  111|  1.41k|    e = Curl_llist_head(&tqueue->sendq);
  112|  1.41k|    if(e) {
  ------------------
  |  Branch (112:8): [True: 790, False: 621]
  ------------------
  113|    790|      struct curltime now = curlx_now();
  114|    790|      timediff_t timeout_ms;
  115|    790|      while(e) {
  ------------------
  |  Branch (115:13): [True: 790, False: 0]
  ------------------
  116|    790|        qitem = Curl_node_take_elem(e);
  117|    790|        timeout_ms = (!qitem->timeout_ms) ? 0 :
  ------------------
  |  Branch (117:22): [True: 97, False: 693]
  ------------------
  118|    790|          (qitem->timeout_ms - curlx_ptimediff_ms(&now, &qitem->start));
  119|    790|        if(timeout_ms < 0) {
  ------------------
  |  Branch (119:12): [True: 0, False: 790]
  ------------------
  120|       |          /* timed out while queued, place on receive queue */
  121|      0|          Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  122|      0|          fn_event = tqueue->fn_event;
  123|      0|          fn_user_data = tqueue->fn_user_data;
  124|      0|          qitem = NULL;
  125|      0|          e = Curl_llist_head(&tqueue->sendq);
  126|      0|          continue;
  127|      0|        }
  128|    790|        else {
  129|    790|          *pdescription = qitem->description;
  130|    790|          *ptimeout_ms = timeout_ms;
  131|    790|          break;
  132|    790|        }
  133|    790|      }
  134|    790|    }
  135|  1.41k|  }
  136|  1.41k|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  1.41k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  137|       |  /* avoiding deadlocks */
  138|  1.41k|  if(fn_event)
  ------------------
  |  Branch (138:6): [True: 0, False: 1.41k]
  ------------------
  139|      0|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  140|  1.41k|  return qitem;
  141|  1.41k|}
thrdqueue.c:thrdq_tpool_process:
  172|    790|{
  173|    790|  struct thrdq_item *qitem = item;
  174|    790|  qitem->fn_process(qitem->item);
  175|    790|}
thrdqueue.c:thrdq_tpool_return:
  144|    790|{
  145|    790|  struct curl_thrdq *tqueue = user_data;
  146|    790|  struct thrdq_item *qitem = item;
  147|    790|  Curl_thrdq_ev_cb *fn_event = NULL;
  148|    790|  void *fn_user_data = NULL;
  149|       |
  150|    790|  if(!tqueue) {
  ------------------
  |  Branch (150:6): [True: 169, False: 621]
  ------------------
  151|    169|    thrdq_item_destroy(item);
  152|    169|    return;
  153|    169|  }
  154|       |
  155|    621|  Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|    621|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  156|    621|  if(tqueue->aborted) {
  ------------------
  |  Branch (156:6): [True: 0, False: 621]
  ------------------
  157|      0|    thrdq_item_destroy(qitem);
  158|      0|  }
  159|    621|  else {
  160|    621|    DEBUGASSERT(!Curl_node_llist(&qitem->node));
  ------------------
  |  | 1081|    621|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (160:5): [True: 0, False: 621]
  |  Branch (160:5): [True: 621, False: 0]
  ------------------
  161|    621|    Curl_llist_append(&tqueue->recvq, qitem, &qitem->node);
  162|    621|    fn_event = tqueue->fn_event;
  163|    621|    fn_user_data = tqueue->fn_user_data;
  164|    621|  }
  165|    621|  Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|    621|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  166|       |  /* avoiding deadlocks */
  167|    621|  if(fn_event)
  ------------------
  |  Branch (167:6): [True: 621, False: 0]
  ------------------
  168|    621|    fn_event(tqueue, CURL_THRDQ_EV_ITEM_DONE, fn_user_data);
  169|    621|}
thrdqueue.c:thrdq_unlink:
  178|  15.3k|{
  179|  15.3k|  DEBUGASSERT(tqueue->aborted);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (179:3): [True: 0, False: 15.3k]
  |  Branch (179:3): [True: 15.3k, False: 0]
  ------------------
  180|  15.3k|  if(tqueue->tpool) {
  ------------------
  |  Branch (180:6): [True: 15.3k, False: 0]
  ------------------
  181|  15.3k|    if(locked)
  ------------------
  |  Branch (181:8): [True: 15.3k, False: 0]
  ------------------
  182|  15.3k|      Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  15.3k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  183|  15.3k|    Curl_thrdpool_destroy(tqueue->tpool, join);
  184|  15.3k|    tqueue->tpool = NULL;
  185|  15.3k|    if(locked)
  ------------------
  |  Branch (185:8): [True: 15.3k, False: 0]
  ------------------
  186|  15.3k|      Curl_mutex_acquire(&tqueue->lock);
  ------------------
  |  |   36|  15.3k|#  define Curl_mutex_acquire(m)  pthread_mutex_lock(m)
  ------------------
  187|  15.3k|  }
  188|       |
  189|  15.3k|  Curl_llist_destroy(&tqueue->sendq, NULL);
  190|  15.3k|  Curl_llist_destroy(&tqueue->recvq, NULL);
  191|  15.3k|  curlx_free(tqueue->name);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  192|  15.3k|  Curl_cond_destroy(&tqueue->await);
  ------------------
  |  |   41|  15.3k|#  define Curl_cond_destroy(c)   pthread_cond_destroy(c)
  ------------------
  193|  15.3k|  if(locked)
  ------------------
  |  Branch (193:6): [True: 15.3k, False: 0]
  ------------------
  194|  15.3k|    Curl_mutex_release(&tqueue->lock);
  ------------------
  |  |   37|  15.3k|#  define Curl_mutex_release(m)  pthread_mutex_unlock(m)
  ------------------
  195|  15.3k|  Curl_mutex_destroy(&tqueue->lock);
  ------------------
  |  |   38|  15.3k|#  define Curl_mutex_destroy(m)  pthread_mutex_destroy(m)
  ------------------
  196|  15.3k|  curlx_free(tqueue);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  197|  15.3k|}
thrdqueue.c:thrdq_item_create:
   68|    790|{
   69|    790|  struct thrdq_item *qitem;
   70|       |
   71|    790|  qitem = curlx_calloc(1, sizeof(*qitem));
  ------------------
  |  | 1480|    790|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   72|    790|  if(!qitem)
  ------------------
  |  Branch (72:6): [True: 0, False: 790]
  ------------------
   73|      0|    return NULL;
   74|    790|  qitem->item = item;
   75|    790|  qitem->description = description;
   76|    790|  qitem->fn_free = tqueue->fn_free;
   77|    790|  qitem->fn_process = tqueue->fn_process;
   78|    790|  if(timeout_ms) {
  ------------------
  |  Branch (78:6): [True: 693, False: 97]
  ------------------
   79|    693|    qitem->start = curlx_now();
   80|    693|    qitem->timeout_ms = timeout_ms;
   81|    693|  }
   82|    790|  return qitem;
   83|    790|}
thrdqueue.c:thrdq_item_destroy:
   86|    790|{
   87|    790|  if(qitem->item)
  ------------------
  |  Branch (87:6): [True: 169, False: 621]
  ------------------
   88|    169|    qitem->fn_free(qitem->item);
   89|    790|  curlx_free(qitem);
  ------------------
  |  | 1483|    790|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   90|    790|}
thrdqueue.c:thrdq_llist_clean_matches:
  327|    204|{
  328|    204|  struct Curl_llist_node *e, *n;
  329|    204|  struct thrdq_item *qitem;
  330|       |
  331|    204|  for(e = Curl_llist_head(llist); e; e = n) {
  ------------------
  |  Branch (331:35): [True: 0, False: 204]
  ------------------
  332|      0|    n = Curl_node_next(e);
  333|      0|    qitem = Curl_node_elem(e);
  334|      0|    if(fn_match(qitem->item, match_data))
  ------------------
  |  Branch (334:8): [True: 0, False: 0]
  ------------------
  335|      0|      Curl_node_remove(e);
  336|      0|  }
  337|    204|}

Curl_checkheaders:
   88|   117k|{
   89|   117k|  struct curl_slist *head;
   90|   117k|  DEBUGASSERT(thislen);
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (90:3): [True: 0, False: 117k]
  |  Branch (90:3): [True: 117k, False: 0]
  ------------------
   91|   117k|  DEBUGASSERT(thisheader[thislen - 1] != ':');
  ------------------
  |  | 1081|   117k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 0, False: 117k]
  |  Branch (91:3): [True: 117k, False: 0]
  ------------------
   92|       |
   93|   285k|  for(head = data->set.headers; head; head = head->next) {
  ------------------
  |  Branch (93:33): [True: 168k, False: 117k]
  ------------------
   94|   168k|    if(curl_strnequal(head->data, thisheader, thislen) &&
  ------------------
  |  Branch (94:8): [True: 280, False: 168k]
  ------------------
   95|    280|       Curl_headersep(head->data[thislen]))
  ------------------
  |  |   26|    280|#define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
  |  |  ------------------
  |  |  |  Branch (26:29): [True: 196, False: 84]
  |  |  |  Branch (26:45): [True: 5, False: 79]
  |  |  ------------------
  ------------------
   96|    201|      return head->data;
   97|   168k|  }
   98|       |
   99|   117k|  return NULL;
  100|   117k|}
Curl_meets_timecondition:
  122|     78|{
  123|     78|  if((timeofdoc == 0) || (data->set.timevalue == 0))
  ------------------
  |  Branch (123:6): [True: 78, False: 0]
  |  Branch (123:26): [True: 0, False: 0]
  ------------------
  124|     78|    return TRUE;
  ------------------
  |  | 1055|     78|#define TRUE true
  ------------------
  125|       |
  126|      0|  switch(data->set.timecondition) {
  127|      0|  case CURL_TIMECOND_IFMODSINCE:
  ------------------
  |  | 2411|      0|#define CURL_TIMECOND_IFMODSINCE   1L
  ------------------
  |  Branch (127:3): [True: 0, False: 0]
  ------------------
  128|      0|  default:
  ------------------
  |  Branch (128:3): [True: 0, False: 0]
  ------------------
  129|      0|    if(timeofdoc <= data->set.timevalue) {
  ------------------
  |  Branch (129:8): [True: 0, False: 0]
  ------------------
  130|      0|      infof(data, "The requested document is not new enough");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  131|      0|      data->info.timecond = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  132|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  133|      0|    }
  134|      0|    break;
  135|      0|  case CURL_TIMECOND_IFUNMODSINCE:
  ------------------
  |  | 2412|      0|#define CURL_TIMECOND_IFUNMODSINCE 2L
  ------------------
  |  Branch (135:3): [True: 0, False: 0]
  ------------------
  136|      0|    if(timeofdoc >= data->set.timevalue) {
  ------------------
  |  Branch (136:8): [True: 0, False: 0]
  ------------------
  137|      0|      infof(data, "The requested document is not old enough");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  138|      0|      data->info.timecond = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  139|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  140|      0|    }
  141|      0|    break;
  142|      0|  }
  143|       |
  144|      0|  return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  145|      0|}
Curl_sendrecv:
  357|   209k|{
  358|   209k|  struct SingleRequest *k = &data->req;
  359|   209k|  CURLcode result = CURLE_OK;
  360|       |
  361|   209k|  if(Curl_xfer_is_blocked(data)) {
  ------------------
  |  Branch (361:6): [True: 0, False: 209k]
  ------------------
  362|      0|    result = CURLE_OK;
  363|      0|    goto out;
  364|      0|  }
  365|       |
  366|       |  /* We go ahead and do a read if we have a readable socket or if the stream
  367|       |     was rewound (in which case we have data in a buffer) */
  368|   209k|  if(CURL_REQ_WANT_RECV(data)) {
  ------------------
  |  |   40|   209k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|   209k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 209k, False: 13]
  |  |  ------------------
  ------------------
  369|   209k|    result = sendrecv_dl(data, k);
  370|   209k|    if(result || data->req.done)
  ------------------
  |  Branch (370:8): [True: 1.89k, False: 207k]
  |  Branch (370:18): [True: 19, False: 207k]
  ------------------
  371|  1.91k|      goto out;
  372|   209k|  }
  373|       |
  374|       |  /* If we still have writing to do, we check if we have a writable socket. */
  375|   207k|  if(Curl_req_want_send(data)) {
  ------------------
  |  Branch (375:6): [True: 207, False: 206k]
  ------------------
  376|    207|    result = sendrecv_ul(data);
  377|    207|    if(result)
  ------------------
  |  Branch (377:8): [True: 0, False: 207]
  ------------------
  378|      0|      goto out;
  379|    207|  }
  380|       |
  381|   207k|  result = Curl_pgrsCheck(data);
  382|   207k|  if(result)
  ------------------
  |  Branch (382:6): [True: 0, False: 207k]
  ------------------
  383|      0|    goto out;
  384|       |
  385|   207k|  if(CURL_REQ_WANT_IO(data)) {
  ------------------
  |  |   42|   207k|  ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|   207k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |                 ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   36|   207k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (42:3): [True: 191k, False: 15.2k]
  |  |  ------------------
  ------------------
  386|   191k|    if(Curl_timeleft_ms(data) < 0) {
  ------------------
  |  Branch (386:8): [True: 4, False: 191k]
  ------------------
  387|      4|      if(k->size != -1) {
  ------------------
  |  Branch (387:10): [True: 0, False: 4]
  ------------------
  388|      0|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  389|      0|              " milliseconds with %" FMT_OFF_T " out of %"
  390|      0|              FMT_OFF_T " bytes received",
  391|      0|              curlx_ptimediff_ms(Curl_pgrs_now(data),
  392|      0|                                 &data->progress.t_startsingle),
  393|      0|              k->bytecount, k->size);
  394|      0|      }
  395|      4|      else {
  396|      4|        failf(data, "Operation timed out after %" FMT_TIMEDIFF_T
  ------------------
  |  |   62|      4|#define failf Curl_failf
  ------------------
  397|      4|              " milliseconds with %" FMT_OFF_T " bytes received",
  398|      4|              curlx_ptimediff_ms(Curl_pgrs_now(data),
  399|      4|                                 &data->progress.t_startsingle),
  400|      4|              k->bytecount);
  401|      4|      }
  402|      4|      result = CURLE_OPERATION_TIMEDOUT;
  403|      4|      goto out;
  404|      4|    }
  405|   191k|  }
  406|  15.2k|  else {
  407|       |    /*
  408|       |     * The transfer has been performed. Make some general checks before
  409|       |     * returning.
  410|       |     */
  411|  15.2k|    if(!(data->req.no_body) && (k->size != -1) &&
  ------------------
  |  Branch (411:8): [True: 1.92k, False: 13.3k]
  |  Branch (411:32): [True: 1.73k, False: 197]
  ------------------
  412|  1.73k|       (k->bytecount != k->size) && !k->newurl) {
  ------------------
  |  Branch (412:8): [True: 620, False: 1.11k]
  |  Branch (412:37): [True: 462, False: 158]
  ------------------
  413|    462|      failf(data, "transfer closed with %" FMT_OFF_T
  ------------------
  |  |   62|    462|#define failf Curl_failf
  ------------------
  414|    462|            " bytes remaining to read", k->size - k->bytecount);
  415|    462|      result = CURLE_PARTIAL_FILE;
  416|    462|      goto out;
  417|    462|    }
  418|  15.2k|  }
  419|       |
  420|       |  /* If there is nothing more to send/recv, the request is done */
  421|   206k|  if(!CURL_REQ_WANT_IO(data))
  ------------------
  |  |   42|   206k|  ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   35|   206k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |                 ((d)->req.io_flags & (REQ_IO_RECV | REQ_IO_SEND))
  |  |  ------------------
  |  |  |  |   36|   206k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  |  Branch (421:6): [True: 14.7k, False: 191k]
  ------------------
  422|  14.7k|    data->req.done = TRUE;
  ------------------
  |  | 1055|  14.7k|#define TRUE true
  ------------------
  423|       |
  424|   206k|  result = Curl_pgrsUpdate(data);
  425|       |
  426|   209k|out:
  427|   209k|  if(result)
  ------------------
  |  Branch (427:6): [True: 2.36k, False: 206k]
  ------------------
  428|  2.36k|    DEBUGF(infof(data, "Curl_sendrecv() -> %d", result));
  ------------------
  |  | 1067|   225k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 2.36k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 2.36k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 2.36k]
  |  |  ------------------
  ------------------
  429|   209k|  return result;
  430|   206k|}
Curl_init_CONNECT:
  435|  23.3k|{
  436|  23.3k|  data->state.fread_func = data->set.fread_func_set;
  437|  23.3k|  data->state.in = data->set.in_set;
  438|  23.3k|  data->state.upload = (data->state.httpreq == HTTPREQ_PUT);
  439|  23.3k|}
Curl_pretransfer:
  447|  16.1k|{
  448|  16.1k|  CURLcode result = CURLE_OK;
  449|       |
  450|       |  /* Reset the retry count at the start of each request.
  451|       |   * If the retry count is not reset, when the connection drops,
  452|       |   * it will not enter the retry mechanism on CONN_MAX_RETRIES + 1 attempts
  453|       |   * and will immediately throw
  454|       |   * "Connection died, tried CONN_MAX_RETRIES times before giving up".
  455|       |   * By resetting it here, we ensure each new request starts fresh. */
  456|  16.1k|  data->state.retrycount = 0;
  457|       |
  458|  16.1k|  if(!data->set.str[STRING_SET_URL] && !data->set.uh) {
  ------------------
  |  Branch (458:6): [True: 3.63k, False: 12.4k]
  |  Branch (458:40): [True: 3.63k, False: 0]
  ------------------
  459|       |    /* we cannot do anything without URL */
  460|  3.63k|    failf(data, "No URL set");
  ------------------
  |  |   62|  3.63k|#define failf Curl_failf
  ------------------
  461|  3.63k|    return CURLE_URL_MALFORMAT;
  462|  3.63k|  }
  463|       |
  464|       |  /* CURLOPT_CURLU overrides CURLOPT_URL and the contents of the CURLU handle
  465|       |     is allowed to be changed by the user between transfers */
  466|  12.4k|  if(data->set.uh) {
  ------------------
  |  Branch (466:6): [True: 0, False: 12.4k]
  ------------------
  467|      0|    CURLUcode uc;
  468|      0|    curlx_free(data->set.str[STRING_SET_URL]);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  469|      0|    uc = curl_url_get(data->set.uh,
  470|      0|                      CURLUPART_URL, &data->set.str[STRING_SET_URL], 0);
  471|      0|    if(uc) {
  ------------------
  |  Branch (471:8): [True: 0, False: 0]
  ------------------
  472|       |      /* clear the pointer to not point to freed memory anymore */
  473|      0|      Curl_bufref_set(&data->state.url, NULL, 0, NULL);
  474|      0|      failf(data, "No URL set");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  475|      0|      return CURLE_URL_MALFORMAT;
  476|      0|    }
  477|      0|  }
  478|       |
  479|  12.4k|  Curl_bufref_set(&data->state.url, data->set.str[STRING_SET_URL], 0, NULL);
  480|       |
  481|  12.4k|  if(data->set.postfields && data->set.set_resume_from) {
  ------------------
  |  Branch (481:6): [True: 1.05k, False: 11.4k]
  |  Branch (481:30): [True: 18, False: 1.04k]
  ------------------
  482|       |    /* we cannot */
  483|     18|    failf(data, "cannot mix POSTFIELDS with RESUME_FROM");
  ------------------
  |  |   62|     18|#define failf Curl_failf
  ------------------
  484|     18|    return CURLE_BAD_FUNCTION_ARGUMENT;
  485|     18|  }
  486|       |
  487|  12.4k|  data->state.prefer_ascii = data->set.prefer_ascii;
  488|  12.4k|#ifdef CURL_LIST_ONLY_PROTOCOL
  489|  12.4k|  data->state.list_only = data->set.list_only;
  490|  12.4k|#endif
  491|  12.4k|  data->state.httpreq = data->set.method;
  492|       |
  493|       |  /* initial transfer request coming up, forget the initial origin
  494|       |   * from a previous perform() on this handle. */
  495|  12.4k|  Curl_peer_unlink(&data->state.initial_origin);
  496|  12.4k|  data->state.requests = 0;
  497|  12.4k|  data->state.followlocation = 0; /* reset the location-follow counter */
  498|  12.4k|  data->state.this_is_a_follow = FALSE; /* reset this */
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  499|  12.4k|  data->state.http_ignorecustom = FALSE; /* use custom HTTP method */
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  500|  12.4k|  data->state.errorbuf = FALSE; /* no error has occurred */
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  501|  12.4k|#ifndef CURL_DISABLE_HTTP
  502|  12.4k|  Curl_http_neg_init(data, &data->state.http_neg);
  503|  12.4k|#endif
  504|  12.4k|  data->state.authproblem = FALSE;
  ------------------
  |  | 1058|  12.4k|#define FALSE false
  ------------------
  505|  12.4k|  data->state.authhost.want = data->set.httpauth;
  506|  12.4k|  data->state.authproxy.want = data->set.proxyauth;
  507|  12.4k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1327|  12.4k|  do {                      \
  |  | 1328|  12.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  12.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  12.4k|    (ptr) = NULL;           \
  |  | 1330|  12.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 12.4k]
  |  |  ------------------
  ------------------
  508|  12.4k|  Curl_data_priority_clear_state(data);
  509|  12.4k|  if(data->set.http_auto_referer)
  ------------------
  |  Branch (509:6): [True: 260, False: 12.1k]
  ------------------
  510|    260|    Curl_bufref_free(&data->state.referer);
  511|  12.4k|  if(data->set.str[STRING_SET_REFERER])
  ------------------
  |  Branch (511:6): [True: 27, False: 12.4k]
  ------------------
  512|     27|    Curl_bufref_set(&data->state.referer, data->set.str[STRING_SET_REFERER],
  513|     27|                    0, NULL);
  514|  12.4k|  else
  515|  12.4k|    Curl_bufref_free(&data->state.referer);
  516|       |
  517|  12.4k|  if(data->state.httpreq == HTTPREQ_PUT)
  ------------------
  |  Branch (517:6): [True: 207, False: 12.2k]
  ------------------
  518|    207|    data->state.infilesize = data->set.filesize;
  519|  12.2k|  else if((data->state.httpreq != HTTPREQ_GET) &&
  ------------------
  |  Branch (519:11): [True: 1.48k, False: 10.7k]
  ------------------
  520|  1.48k|          (data->state.httpreq != HTTPREQ_HEAD)) {
  ------------------
  |  Branch (520:11): [True: 1.34k, False: 144]
  ------------------
  521|  1.34k|    data->state.infilesize = data->set.postfieldsize;
  522|  1.34k|    if(data->set.postfields && (data->state.infilesize == -1))
  ------------------
  |  Branch (522:8): [True: 997, False: 348]
  |  Branch (522:32): [True: 246, False: 751]
  ------------------
  523|    246|      data->state.infilesize = (curl_off_t)strlen(data->set.postfields);
  524|  1.34k|  }
  525|  10.9k|  else
  526|  10.9k|    data->state.infilesize = 0;
  527|       |
  528|       |  /* If there is a list of cookie files to read, do it now! */
  529|  12.4k|  result = Curl_cookie_loadfiles(data);
  530|  12.4k|  if(!result)
  ------------------
  |  Branch (530:6): [True: 12.4k, False: 0]
  ------------------
  531|  12.4k|    Curl_cookie_run(data); /* activate */
  532|       |
  533|       |  /* If there is a list of host pairs to deal with */
  534|  12.4k|  if(!result && data->state.resolve)
  ------------------
  |  Branch (534:6): [True: 12.4k, False: 0]
  |  Branch (534:17): [True: 0, False: 12.4k]
  ------------------
  535|      0|    result = Curl_loadhostpairs(data);
  536|       |
  537|  12.4k|  if(!result)
  ------------------
  |  Branch (537:6): [True: 12.4k, False: 0]
  ------------------
  538|       |    /* If there is a list of hsts files to read */
  539|  12.4k|    result = Curl_hsts_loadfiles(data);
  540|       |
  541|  12.4k|  if(!result) {
  ------------------
  |  Branch (541:6): [True: 12.4k, False: 0]
  ------------------
  542|       |    /* Allow data->set.use_port to set which port to use. This needs to be
  543|       |     * disabled for example when we follow Location: headers to URLs using
  544|       |     * different ports! */
  545|  12.4k|    data->state.allow_port = TRUE;
  ------------------
  |  | 1055|  12.4k|#define TRUE true
  ------------------
  546|       |
  547|       |#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL)
  548|       |    /*************************************************************
  549|       |     * Tell signal handler to ignore SIGPIPE
  550|       |     *************************************************************/
  551|       |    if(!data->set.no_signal)
  552|       |      data->state.prev_signal = signal(SIGPIPE, SIG_IGN);
  553|       |#endif
  554|       |
  555|  12.4k|    Curl_initinfo(data); /* reset session-specific information "variables" */
  556|  12.4k|    Curl_pgrsResetTransferSizes(data);
  557|  12.4k|    Curl_pgrsStartNow(data);
  558|       |
  559|       |    /* In case the handle is reused and an authentication method was picked
  560|       |       in the session we need to make sure we only use the one(s) we now
  561|       |       consider to be fine */
  562|  12.4k|    data->state.authhost.picked &= data->state.authhost.want;
  563|  12.4k|    data->state.authproxy.picked &= data->state.authproxy.want;
  564|       |
  565|  12.4k|#ifndef CURL_DISABLE_FTP
  566|  12.4k|    data->state.wildcardmatch = data->set.wildcard_enabled;
  567|  12.4k|    if(data->state.wildcardmatch) {
  ------------------
  |  Branch (567:8): [True: 4, False: 12.4k]
  ------------------
  568|      4|      struct WildcardData *wc;
  569|      4|      if(!data->wildcard) {
  ------------------
  |  Branch (569:10): [True: 4, False: 0]
  ------------------
  570|      4|        data->wildcard = curlx_calloc(1, sizeof(struct WildcardData));
  ------------------
  |  | 1480|      4|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  571|      4|        if(!data->wildcard)
  ------------------
  |  Branch (571:12): [True: 0, False: 4]
  ------------------
  572|      0|          return CURLE_OUT_OF_MEMORY;
  573|      4|      }
  574|      4|      wc = data->wildcard;
  575|      4|      if(wc->state < CURLWC_INIT) {
  ------------------
  |  Branch (575:10): [True: 4, False: 0]
  ------------------
  576|      4|        if(wc->ftpwc)
  ------------------
  |  Branch (576:12): [True: 0, False: 4]
  ------------------
  577|      0|          wc->dtor(wc->ftpwc);
  578|      4|        curlx_safefree(wc->pattern);
  ------------------
  |  | 1327|      4|  do {                      \
  |  | 1328|      4|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      4|    (ptr) = NULL;           \
  |  | 1330|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  579|      4|        curlx_safefree(wc->path);
  ------------------
  |  | 1327|      4|  do {                      \
  |  | 1328|      4|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      4|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      4|    (ptr) = NULL;           \
  |  | 1330|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
  580|      4|        Curl_wildcard_init(wc); /* init wildcard structures */
  581|      4|      }
  582|      4|    }
  583|  12.4k|#endif
  584|  12.4k|    result = Curl_hsts_loadcb(data, data->hsts);
  585|  12.4k|  }
  586|       |
  587|       |  /*
  588|       |   * Set user-agent. Used for HTTP, but since we can attempt to tunnel
  589|       |   * anything through an HTTP proxy we cannot limit this based on protocol.
  590|       |   */
  591|  12.4k|  if(!result && data->set.str[STRING_USERAGENT]) {
  ------------------
  |  Branch (591:6): [True: 12.4k, False: 0]
  |  Branch (591:17): [True: 125, False: 12.3k]
  ------------------
  592|    125|    curlx_free(data->state.aptr.uagent);
  ------------------
  |  | 1483|    125|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  593|    125|    data->state.aptr.uagent =
  594|    125|      curl_maprintf("User-Agent: %s\r\n", data->set.str[STRING_USERAGENT]);
  595|    125|    if(!data->state.aptr.uagent)
  ------------------
  |  Branch (595:8): [True: 0, False: 125]
  ------------------
  596|      0|      return CURLE_OUT_OF_MEMORY;
  597|    125|  }
  598|       |
  599|  12.4k|  data->req.headerbytecount = 0;
  600|  12.4k|  Curl_headers_cleanup(data);
  601|  12.4k|  return result;
  602|  12.4k|}
Curl_retry_request:
  608|  14.8k|{
  609|  14.8k|  struct connectdata *conn = data->conn;
  610|  14.8k|  bool retry = FALSE;
  ------------------
  |  | 1058|  14.8k|#define FALSE false
  ------------------
  611|  14.8k|  *url = NULL;
  612|       |
  613|       |  /* if we are talking upload, we cannot do the checks below, unless the
  614|       |     protocol is HTTP as when uploading over HTTP we will still get a
  615|       |     response */
  616|  14.8k|  if(data->state.upload &&
  ------------------
  |  Branch (616:6): [True: 628, False: 14.1k]
  ------------------
  617|    628|     !(conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_RTSP)))
  ------------------
  |  |   84|    628|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|    628|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|    628|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|    628|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|    628|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|    628|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
                   !(conn->scheme->protocol & (PROTO_FAMILY_HTTP | CURLPROTO_RTSP)))
  ------------------
  |  | 1096|    628|#define CURLPROTO_RTSP    (1L << 18)
  ------------------
  |  Branch (617:6): [True: 0, False: 628]
  ------------------
  618|      0|    return CURLE_OK;
  619|       |
  620|  14.8k|  if(conn->bits.reuse &&
  ------------------
  |  Branch (620:6): [True: 9.84k, False: 4.96k]
  ------------------
  621|  9.84k|     (data->req.bytecount + data->req.headerbytecount == 0) &&
  ------------------
  |  Branch (621:6): [True: 545, False: 9.29k]
  ------------------
  622|    545|     ((!data->req.no_body && !data->req.done) ||
  ------------------
  |  Branch (622:8): [True: 53, False: 492]
  |  Branch (622:30): [True: 0, False: 53]
  ------------------
  623|    545|      (conn->scheme->protocol & PROTO_FAMILY_HTTP))
  ------------------
  |  |   84|    545|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|    545|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|    545|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|    545|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|    545|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|    545|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (623:7): [True: 0, False: 545]
  ------------------
  624|      0|#ifndef CURL_DISABLE_RTSP
  625|      0|     && (data->set.rtspreq != RTSPREQ_RECEIVE)
  ------------------
  |  Branch (625:9): [True: 0, False: 0]
  ------------------
  626|  14.8k|#endif
  627|  14.8k|    )
  628|       |    /* We got no data, we attempted to reuse a connection. For HTTP this
  629|       |       can be a retry so we try again regardless if we expected a body.
  630|       |       For other protocols we only try again only if we expected a body.
  631|       |
  632|       |       This might happen if the connection was left alive when we were
  633|       |       done using it before, but that was closed when we wanted to read from
  634|       |       it again. Bad luck. Retry the same request on a fresh connect! */
  635|      0|    retry = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  636|  14.8k|  else if(data->state.refused_stream &&
  ------------------
  |  Branch (636:11): [True: 0, False: 14.8k]
  ------------------
  637|      0|          (data->req.bytecount + data->req.headerbytecount == 0)) {
  ------------------
  |  Branch (637:11): [True: 0, False: 0]
  ------------------
  638|       |    /* This was sent on a refused stream, safe to rerun. A refused stream
  639|       |       error can typically only happen on HTTP/2 level if the stream is safe
  640|       |       to issue again, but the nghttp2 API can deliver the message to other
  641|       |       streams as well, which is why this adds the check the data counters
  642|       |       too. */
  643|      0|    infof(data, "REFUSED_STREAM, retrying a fresh connect");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  644|      0|    data->state.refused_stream = FALSE; /* clear again */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  645|      0|    retry = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  646|      0|  }
  647|  14.8k|  if(retry) {
  ------------------
  |  Branch (647:6): [True: 0, False: 14.8k]
  ------------------
  648|      0|#define CONN_MAX_RETRIES 5
  649|      0|    if(data->state.retrycount++ >= CONN_MAX_RETRIES) {
  ------------------
  |  |  648|      0|#define CONN_MAX_RETRIES 5
  ------------------
  |  Branch (649:8): [True: 0, False: 0]
  ------------------
  650|      0|      failf(data, "Connection died, tried %d times before giving up",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  651|      0|            CONN_MAX_RETRIES);
  ------------------
  |  |  648|      0|#define CONN_MAX_RETRIES 5
  ------------------
  652|      0|      data->state.retrycount = 0;
  653|      0|      return CURLE_SEND_ERROR;
  654|      0|    }
  655|      0|    infof(data, "Connection died, retrying a fresh connect (retry count: %d)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  656|      0|          data->state.retrycount);
  657|      0|    *url = Curl_bufref_dup(&data->state.url);
  ------------------
  |  |   49|      0|#define Curl_bufref_dup(x) curlx_strdup(Curl_bufref_ptr(x))
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  ------------------
  658|      0|    if(!*url)
  ------------------
  |  Branch (658:8): [True: 0, False: 0]
  ------------------
  659|      0|      return CURLE_OUT_OF_MEMORY;
  660|       |
  661|      0|    connclose(conn, "retry"); /* close this connection */
  ------------------
  |  |  103|      0|#define connclose(x, y)   Curl_conncontrol(x, CONNCTRL_CONNECTION, y)
  |  |  ------------------
  |  |  |  |   91|      0|#define CONNCTRL_CONNECTION 1
  |  |  ------------------
  ------------------
  662|      0|    conn->bits.retry = TRUE; /* mark this as a connection we are about to
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  663|       |                                retry. Marking it this way should prevent i.e
  664|       |                                HTTP transfers to return error because nothing
  665|       |                                has been transferred! */
  666|      0|    Curl_creader_set_rewind(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  667|      0|  }
  668|  14.8k|  return CURLE_OK;
  669|  14.8k|}
Curl_xfer_setup_sendrecv:
  724|  17.2k|{
  725|  17.2k|  xfer_setup(data, sockindex, sockindex, recv_size);
  726|  17.2k|}
Curl_xfer_setup_recv:
  737|     18|{
  738|     18|  xfer_setup(data, -1, sockindex, recv_size);
  739|     18|}
Curl_xfer_write_resp:
  755|  2.12M|{
  756|  2.12M|  CURLcode result = CURLE_OK;
  757|       |
  758|  2.12M|  if(data->conn->scheme->run->write_resp) {
  ------------------
  |  Branch (758:6): [True: 2.12M, False: 0]
  ------------------
  759|       |    /* protocol handlers offering this function take full responsibility
  760|       |     * for writing all received download data to the client. */
  761|  2.12M|    result = data->conn->scheme->run->write_resp(data, buf, blen, is_eos);
  762|  2.12M|  }
  763|      0|  else {
  764|       |    /* No special handling by protocol handler, write all received data
  765|       |     * as BODY to the client. */
  766|      0|    if(blen || is_eos) {
  ------------------
  |  Branch (766:8): [True: 0, False: 0]
  |  Branch (766:16): [True: 0, False: 0]
  ------------------
  767|      0|      int cwtype = CLIENTWRITE_BODY;
  ------------------
  |  |   42|      0|#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
  ------------------
  768|      0|      if(is_eos)
  ------------------
  |  Branch (768:10): [True: 0, False: 0]
  ------------------
  769|      0|        cwtype |= CLIENTWRITE_EOS;
  ------------------
  |  |   49|      0|#define CLIENTWRITE_EOS     (1 << 7) /* End Of transfer download Stream */
  ------------------
  770|      0|      result = Curl_client_write(data, cwtype, buf, blen);
  771|      0|    }
  772|      0|  }
  773|       |
  774|  2.12M|  if(!result && is_eos) {
  ------------------
  |  Branch (774:6): [True: 2.12M, False: 1.89k]
  |  Branch (774:17): [True: 4.37k, False: 2.12M]
  ------------------
  775|       |    /* If we wrote the EOS, we are definitely done */
  776|  4.37k|    data->req.eos_written = TRUE;
  ------------------
  |  | 1055|  4.37k|#define TRUE true
  ------------------
  777|  4.37k|    data->req.download_done = TRUE;
  ------------------
  |  | 1055|  4.37k|#define TRUE true
  ------------------
  778|  4.37k|  }
  779|  2.12M|  CURL_TRC_WRITE(data, "xfer_write_resp(len=%zu, eos=%d) -> %d",
  ------------------
  |  |  158|  2.12M|  do {                                                     \
  |  |  159|  2.12M|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
  |  |  ------------------
  |  |  |  |  326|  2.12M|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.25M|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.12M, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.12M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.25M|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  2.12M|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  160|  2.12M|      Curl_trc_write(data, __VA_ARGS__);                   \
  |  |  161|  2.12M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (161:11): [Folded, False: 2.12M]
  |  |  ------------------
  ------------------
  780|  2.12M|                 blen, is_eos, result);
  781|  2.12M|  return result;
  782|  2.12M|}
Curl_xfer_write_done:
  803|  21.3k|{
  804|  21.3k|  (void)premature;
  805|  21.3k|  return Curl_cw_out_done(data);
  806|  21.3k|}
Curl_xfer_needs_flush:
  809|   401k|{
  810|   401k|  return Curl_conn_needs_flush(data, data->conn->send_idx);
  811|   401k|}
Curl_xfer_send:
  821|  17.6k|{
  822|  17.6k|  CURLcode result;
  823|       |
  824|  17.6k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (824:3): [True: 0, False: 17.6k]
  |  Branch (824:3): [True: 17.6k, False: 0]
  ------------------
  825|  17.6k|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  17.6k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (825:3): [True: 0, False: 17.6k]
  |  Branch (825:3): [True: 17.6k, False: 0]
  ------------------
  826|       |
  827|  17.6k|  result = Curl_conn_send(data, data->conn->send_idx,
  828|  17.6k|                          buf, blen, eos, pnwritten);
  829|  17.6k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (829:6): [True: 61, False: 17.6k]
  ------------------
  830|     61|    result = CURLE_OK;
  831|     61|    *pnwritten = 0;
  832|     61|  }
  833|  17.6k|  else if(!result && *pnwritten)
  ------------------
  |  Branch (833:11): [True: 17.6k, False: 0]
  |  Branch (833:22): [True: 17.5k, False: 95]
  ------------------
  834|  17.5k|    data->info.request_size += *pnwritten;
  835|       |
  836|  17.6k|  DEBUGF(infof(data, "Curl_xfer_send(len=%zu, eos=%d) -> %d, %zu",
  ------------------
  |  | 1067|   123k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 17.6k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 17.6k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 17.6k]
  |  |  ------------------
  ------------------
  837|  17.6k|               blen, eos, result, *pnwritten));
  838|  17.6k|  return result;
  839|  17.6k|}
Curl_xfer_recv:
  844|  2.12M|{
  845|  2.12M|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  2.12M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (845:3): [True: 0, False: 2.12M]
  |  Branch (845:3): [True: 2.12M, False: 0]
  ------------------
  846|  2.12M|  DEBUGASSERT(data->conn);
  ------------------
  |  | 1081|  2.12M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (846:3): [True: 0, False: 2.12M]
  |  Branch (846:3): [True: 2.12M, False: 0]
  ------------------
  847|  2.12M|  DEBUGASSERT(data->set.buffer_size > 0);
  ------------------
  |  | 1081|  2.12M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (847:3): [True: 0, False: 2.12M]
  |  Branch (847:3): [True: 2.12M, False: 0]
  ------------------
  848|       |
  849|  2.12M|  if(curlx_uitouz(data->set.buffer_size) < blen)
  ------------------
  |  Branch (849:6): [True: 0, False: 2.12M]
  ------------------
  850|      0|    blen = curlx_uitouz(data->set.buffer_size);
  851|  2.12M|  return Curl_conn_recv(data, data->conn->recv_idx, buf, blen, pnrcvd);
  852|  2.12M|}
Curl_xfer_send_close:
  855|  17.2k|{
  856|  17.2k|  Curl_conn_ev_data_done_send(data);
  857|  17.2k|  return CURLE_OK;
  858|  17.2k|}
Curl_xfer_is_blocked:
  861|   209k|{
  862|   209k|  bool want_send = CURL_REQ_WANT_SEND(data);
  ------------------
  |  |   39|   209k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|   209k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  863|   209k|  bool want_recv = CURL_REQ_WANT_RECV(data);
  ------------------
  |  |   40|   209k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|   209k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  864|   209k|  if(!want_send)
  ------------------
  |  Branch (864:6): [True: 208k, False: 242]
  ------------------
  865|   208k|    return want_recv && Curl_xfer_recv_is_paused(data);
  ------------------
  |  Branch (865:12): [True: 208k, False: 0]
  |  Branch (865:25): [True: 0, False: 208k]
  ------------------
  866|    242|  else if(!want_recv)
  ------------------
  |  Branch (866:11): [True: 13, False: 229]
  ------------------
  867|     13|    return want_send && Curl_xfer_send_is_paused(data);
  ------------------
  |  Branch (867:12): [True: 13, False: 0]
  |  Branch (867:25): [True: 0, False: 13]
  ------------------
  868|    229|  else
  869|    229|    return Curl_xfer_recv_is_paused(data) && Curl_xfer_send_is_paused(data);
  ------------------
  |  Branch (869:12): [True: 0, False: 229]
  |  Branch (869:46): [True: 0, False: 0]
  ------------------
  870|   209k|}
Curl_xfer_send_is_paused:
  873|  1.58k|{
  874|  1.58k|  return Curl_rlimit_is_blocked(&data->progress.ul.rlimit);
  875|  1.58k|}
Curl_xfer_recv_is_paused:
  878|  1.92M|{
  879|  1.92M|  return Curl_rlimit_is_blocked(&data->progress.dl.rlimit);
  880|  1.92M|}
Curl_xfer_is_secure:
  904|  20.3k|{
  905|  20.3k|  const struct Curl_scheme *scheme = NULL;
  906|       |
  907|  20.3k|  if(data->conn) {
  ------------------
  |  Branch (907:6): [True: 20.3k, False: 0]
  ------------------
  908|  20.3k|    scheme = data->conn->scheme;
  909|       |    /* if we are connected, but not use SSL, the transfer is not secure.
  910|       |     * This covers an insecure http:// proxy that is not tunneling.
  911|       |     * We enforce tunneling for such cases, but better be sure here. */
  912|  20.3k|    if(Curl_conn_is_connected(data->conn, FIRSTSOCKET) &&
  ------------------
  |  |  303|  20.3k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (912:8): [True: 20.3k, False: 0]
  ------------------
  913|  20.3k|       !Curl_conn_is_ssl(data->conn, FIRSTSOCKET))
  ------------------
  |  |  303|  20.3k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (913:8): [True: 20.3k, False: 0]
  ------------------
  914|  20.3k|      return FALSE;
  ------------------
  |  | 1058|  20.3k|#define FALSE false
  ------------------
  915|  20.3k|  }
  916|      0|  else if(data->info.conn_scheme) { /* was connected once */
  ------------------
  |  Branch (916:11): [True: 0, False: 0]
  ------------------
  917|      0|    scheme = Curl_get_scheme(data->info.conn_scheme);
  918|      0|  }
  919|      0|  else { /* never connected (yet?) */
  920|      0|    DEBUGASSERT(0); /* not implemented, would need to parse URL */
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (920:5): [Folded, False: 0]
  |  Branch (920:5): [Folded, False: 0]
  ------------------
  921|      0|  }
  922|      0|  return scheme ? (scheme->flags & PROTOPT_SSL) : FALSE;
  ------------------
  |  |  207|      0|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
                return scheme ? (scheme->flags & PROTOPT_SSL) : FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  |  Branch (922:10): [True: 0, False: 0]
  ------------------
  923|  20.3k|}
transfer.c:sendrecv_dl:
  223|   209k|{
  224|   209k|  struct connectdata *conn = data->conn;
  225|   209k|  CURLcode result = CURLE_OK;
  226|   209k|  char *buf, *xfer_buf;
  227|   209k|  size_t blen, xfer_blen;
  228|   209k|  int maxloops = 10;
  229|   209k|  bool is_multiplex = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
  230|   209k|  bool rcvd_eagain = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
  231|   209k|  bool is_eos = FALSE, rate_limited = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
                bool is_eos = FALSE, rate_limited = FALSE;
  ------------------
  |  | 1058|   209k|#define FALSE false
  ------------------
  232|       |
  233|   209k|  result = Curl_multi_xfer_buf_borrow(data, &xfer_buf, &xfer_blen);
  234|   209k|  if(result)
  ------------------
  |  Branch (234:6): [True: 0, False: 209k]
  ------------------
  235|      0|    goto out;
  236|       |
  237|       |  /* This is where we loop until we have read everything there is to
  238|       |     read or we get a CURLE_AGAIN */
  239|  2.12M|  do {
  240|  2.12M|    size_t bytestoread;
  241|       |
  242|  2.12M|    if(!is_multiplex) {
  ------------------
  |  Branch (242:8): [True: 2.12M, False: 0]
  ------------------
  243|       |      /* Multiplexed connection have inherent handling of EOF and we do not
  244|       |       * have to carefully restrict the amount we try to read.
  245|       |       * Multiplexed changes only in one direction. */
  246|  2.12M|      is_multiplex = Curl_conn_is_multiplex(conn, FIRSTSOCKET);
  ------------------
  |  |  303|  2.12M|#define FIRSTSOCKET     0
  ------------------
  247|  2.12M|    }
  248|       |
  249|  2.12M|    buf = xfer_buf;
  250|  2.12M|    bytestoread = xfer_blen;
  251|       |
  252|  2.12M|    if(bytestoread && Curl_rlimit_active(&data->progress.dl.rlimit)) {
  ------------------
  |  Branch (252:8): [True: 2.12M, False: 0]
  |  Branch (252:23): [True: 2.11M, False: 12.8k]
  ------------------
  253|  2.11M|      curl_off_t dl_avail = Curl_rlimit_avail(&data->progress.dl.rlimit,
  254|  2.11M|                                              Curl_pgrs_now(data));
  255|       |#if 0
  256|       |      DEBUGF(infof(data, "dl_rlimit, available=%" FMT_OFF_T, dl_avail));
  257|       |#endif
  258|       |      /* In case of rate limited downloads: if this loop already got data and
  259|       |       * less than 16k is left in the limit, break out. We want to stutter a
  260|       |       * bit to keep in the limit, but too small receives will cost cpu
  261|       |       * unnecessarily. */
  262|  2.11M|      if(dl_avail <= 0) {
  ------------------
  |  Branch (262:10): [True: 36, False: 2.11M]
  ------------------
  263|     36|        rate_limited = TRUE;
  ------------------
  |  | 1055|     36|#define TRUE true
  ------------------
  264|     36|        break;
  265|     36|      }
  266|  2.11M|      if(dl_avail < (curl_off_t)bytestoread)
  ------------------
  |  Branch (266:10): [True: 2.11M, False: 895]
  ------------------
  267|  2.11M|        bytestoread = (size_t)dl_avail;
  268|  2.11M|    }
  269|       |
  270|  2.12M|    rcvd_eagain = FALSE;
  ------------------
  |  | 1058|  2.12M|#define FALSE false
  ------------------
  271|  2.12M|    result = xfer_recv_resp(data, buf, bytestoread, is_multiplex, &blen);
  272|  2.12M|    if(result) {
  ------------------
  |  Branch (272:8): [True: 3.24k, False: 2.12M]
  ------------------
  273|  3.24k|      if(result != CURLE_AGAIN)
  ------------------
  |  Branch (273:10): [True: 0, False: 3.24k]
  ------------------
  274|      0|        goto out; /* real error */
  275|  3.24k|      rcvd_eagain = TRUE;
  ------------------
  |  | 1055|  3.24k|#define TRUE true
  ------------------
  276|  3.24k|      result = CURLE_OK;
  277|  3.24k|      if(data->req.download_done && data->req.no_body &&
  ------------------
  |  Branch (277:10): [True: 0, False: 3.24k]
  |  Branch (277:37): [True: 0, False: 0]
  ------------------
  278|      0|         !data->req.resp_trailer) {
  ------------------
  |  Branch (278:10): [True: 0, False: 0]
  ------------------
  279|      0|        DEBUGF(infof(data, "EAGAIN, download done, no trailer announced, "
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  280|      0|                     "not waiting for EOS"));
  281|      0|        blen = 0;
  282|       |        /* continue as if we received the EOS */
  283|      0|      }
  284|  3.24k|      else
  285|  3.24k|        break; /* get out of loop */
  286|  3.24k|    }
  287|       |
  288|       |    /* We only get a 0-length receive at the end of the response */
  289|  2.12M|    is_eos = (blen == 0);
  290|       |
  291|  2.12M|    if(!blen) {
  ------------------
  |  Branch (291:8): [True: 4.37k, False: 2.12M]
  ------------------
  292|  4.37k|      result = Curl_req_stop_send_recv(data);
  293|  4.37k|      if(result)
  ------------------
  |  Branch (293:10): [True: 0, False: 4.37k]
  ------------------
  294|      0|        goto out;
  295|  4.37k|      if(k->eos_written) /* already did write this to client, leave */
  ------------------
  |  Branch (295:10): [True: 0, False: 4.37k]
  ------------------
  296|      0|        break;
  297|  4.37k|    }
  298|       |
  299|  2.12M|    result = Curl_xfer_write_resp(data, buf, blen, is_eos);
  300|  2.12M|    if(result || data->req.done)
  ------------------
  |  Branch (300:8): [True: 1.89k, False: 2.12M]
  |  Branch (300:18): [True: 19, False: 2.12M]
  ------------------
  301|  1.91k|      goto out;
  302|       |
  303|       |    /* if we are done, we stop receiving. On multiplexed connections,
  304|       |     * we should read the EOS. Which may arrive as meta data after
  305|       |     * the bytes. Not taking it in might lead to RST of streams. */
  306|  2.12M|    if((!is_multiplex && data->req.download_done) || is_eos) {
  ------------------
  |  Branch (306:9): [True: 2.12M, False: 0]
  |  Branch (306:26): [True: 15.2k, False: 2.10M]
  |  Branch (306:54): [True: 0, False: 2.10M]
  ------------------
  307|  15.2k|      CURL_REQ_CLEAR_RECV(data);
  ------------------
  |  |   49|  15.2k|  ((d)->req.io_flags &= (uint8_t)~REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  15.2k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  308|  15.2k|    }
  309|       |    /* if we stopped receiving, leave the loop */
  310|  2.12M|    if(!CURL_REQ_WANT_RECV(data))
  ------------------
  |  |   40|  2.12M|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  2.12M|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  |  Branch (310:8): [True: 15.2k, False: 2.10M]
  ------------------
  311|  15.2k|      break;
  312|       |
  313|  2.12M|  } while(maxloops--);
  ------------------
  |  Branch (313:11): [True: 1.92M, False: 188k]
  ------------------
  314|       |
  315|   207k|  if(!is_eos && !rate_limited && CURL_REQ_WANT_RECV(data) &&
  ------------------
  |  |   40|   409k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|   202k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  |  |  |  Branch (40:32): [True: 191k, False: 10.8k]
  |  |  ------------------
  ------------------
  |  Branch (315:6): [True: 202k, False: 4.37k]
  |  Branch (315:17): [True: 202k, False: 36]
  ------------------
  316|   191k|     (!rcvd_eagain || data_pending(data, rcvd_eagain))) {
  ------------------
  |  Branch (316:7): [True: 188k, False: 3.24k]
  |  Branch (316:23): [True: 0, False: 3.24k]
  ------------------
  317|       |    /* Did not read until EAGAIN/EOS or there is still data pending
  318|       |     * in buffers. Mark as read-again via simulated SELECT results. */
  319|   188k|    Curl_multi_mark_dirty(data);
  320|   188k|    CURL_TRC_M(data, "sendrecv_dl() no EAGAIN/pending data, mark as dirty");
  ------------------
  |  |  148|   188k|  do {                                   \
  |  |  149|   188k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|   188k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|   188k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|   377k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 188k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 188k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|   377k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|   188k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|   188k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|   188k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 188k]
  |  |  ------------------
  ------------------
  321|   188k|  }
  322|       |
  323|   207k|  if(!CURL_REQ_WANT_RECV(data) && CURL_REQ_WANT_SEND(data) &&
  ------------------
  |  |   40|   414k|#define CURL_REQ_WANT_RECV(d)  ((d)->req.io_flags & REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|   207k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
                if(!CURL_REQ_WANT_RECV(data) && CURL_REQ_WANT_SEND(data) &&
  ------------------
  |  |   39|   222k|#define CURL_REQ_WANT_SEND(d)  ((d)->req.io_flags & REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  15.2k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  |  |  |  Branch (39:32): [True: 124, False: 15.1k]
  |  |  ------------------
  ------------------
  |  Branch (323:6): [True: 15.2k, False: 191k]
  ------------------
  324|    124|     (conn->bits.close || is_multiplex)) {
  ------------------
  |  Branch (324:7): [True: 3, False: 121]
  |  Branch (324:27): [True: 0, False: 121]
  ------------------
  325|       |    /* When we have read the entire thing and the close bit is set, the server
  326|       |       may now close the connection. If there is now any kind of sending going
  327|       |       on from our side, we need to stop that immediately. */
  328|      3|    infof(data, "we are done reading and this is set to close, stop send");
  ------------------
  |  |  143|      3|  do {                               \
  |  |  144|      3|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      3|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 3, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  320|      3|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      3|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      3|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 3]
  |  |  ------------------
  ------------------
  329|      3|    Curl_req_abort_sending(data);
  330|      3|  }
  331|       |
  332|   209k|out:
  333|   209k|  Curl_multi_xfer_buf_release(data, xfer_buf);
  334|   209k|  if(result)
  ------------------
  |  Branch (334:6): [True: 1.89k, False: 207k]
  ------------------
  335|  1.89k|    DEBUGF(infof(data, "sendrecv_dl() -> %d", result));
  ------------------
  |  | 1067|   222k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 1.89k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 1.89k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 1.89k]
  |  |  ------------------
  ------------------
  336|   209k|  return result;
  337|   207k|}
transfer.c:xfer_recv_resp:
  180|  2.12M|{
  181|  2.12M|  CURLcode result;
  182|       |
  183|  2.12M|  DEBUGASSERT(blen > 0);
  ------------------
  |  | 1081|  2.12M|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (183:3): [True: 0, False: 2.12M]
  |  Branch (183:3): [True: 2.12M, False: 0]
  ------------------
  184|  2.12M|  *pnread = 0;
  185|       |  /* If we are reading BODY data and the connection does NOT handle EOF
  186|       |   * and we know the size of the BODY data, limit the read amount */
  187|  2.12M|  if(!eos_reliable && !data->req.header && data->req.size != -1) {
  ------------------
  |  Branch (187:6): [True: 2.12M, False: 0]
  |  Branch (187:23): [True: 2.04k, False: 2.12M]
  |  Branch (187:44): [True: 2.04k, False: 0]
  ------------------
  188|  2.04k|    blen = curlx_sotouz_range(data->req.size - data->req.bytecount, 0, blen);
  189|  2.04k|  }
  190|  2.12M|  else if(xfer_recv_shutdown_started(data)) {
  ------------------
  |  Branch (190:11): [True: 0, False: 2.12M]
  ------------------
  191|       |    /* we already received everything. Do not try more. */
  192|      0|    blen = 0;
  193|      0|  }
  194|       |
  195|  2.12M|  if(blen) {
  ------------------
  |  Branch (195:6): [True: 2.12M, False: 1]
  ------------------
  196|  2.12M|    result = Curl_xfer_recv(data, buf, blen, pnread);
  197|  2.12M|    if(result)
  ------------------
  |  Branch (197:8): [True: 3.24k, False: 2.12M]
  ------------------
  198|  3.24k|      return result;
  199|  2.12M|  }
  200|       |
  201|  2.12M|  if(*pnread == 0) {
  ------------------
  |  Branch (201:6): [True: 4.37k, False: 2.12M]
  ------------------
  202|  4.37k|    if(data->req.shutdown) {
  ------------------
  |  Branch (202:8): [True: 0, False: 4.37k]
  ------------------
  203|      0|      bool done;
  204|      0|      result = xfer_recv_shutdown(data, &done);
  205|      0|      if(result)
  ------------------
  |  Branch (205:10): [True: 0, False: 0]
  ------------------
  206|      0|        return result;
  207|      0|      if(!done) {
  ------------------
  |  Branch (207:10): [True: 0, False: 0]
  ------------------
  208|      0|        return CURLE_AGAIN;
  209|      0|      }
  210|      0|    }
  211|  4.37k|    DEBUGF(infof(data, "sendrecv_dl: we are done"));
  ------------------
  |  | 1067|  30.6k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 4.37k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 4.37k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 4.37k]
  |  |  ------------------
  ------------------
  212|  4.37k|  }
  213|  2.12M|  return CURLE_OK;
  214|  2.12M|}
transfer.c:xfer_recv_shutdown_started:
  155|  2.12M|{
  156|  2.12M|  if(!data || !data->conn)
  ------------------
  |  Branch (156:6): [True: 0, False: 2.12M]
  |  Branch (156:15): [True: 0, False: 2.12M]
  ------------------
  157|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  158|  2.12M|  return Curl_shutdown_started(data, data->conn->recv_idx);
  159|  2.12M|}
transfer.c:data_pending:
  104|  3.24k|{
  105|  3.24k|  struct connectdata *conn = data->conn;
  106|       |
  107|  3.24k|  if(conn->scheme->protocol & PROTO_FAMILY_FTP)
  ------------------
  |  |   86|  3.24k|#define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1080|  3.24k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|  3.24k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  |  Branch (107:6): [True: 0, False: 3.24k]
  ------------------
  108|      0|    return Curl_conn_data_pending(data, SECONDARYSOCKET);
  ------------------
  |  |  304|      0|#define SECONDARYSOCKET 1
  ------------------
  109|       |
  110|       |  /* in the case of libssh2, we can never be really sure that we have emptied
  111|       |     its internal buffers so we MUST always try until we get EAGAIN back */
  112|  3.24k|  return (!rcvd_eagain &&
  ------------------
  |  Branch (112:11): [True: 0, False: 3.24k]
  ------------------
  113|      0|          conn->scheme->protocol & (CURLPROTO_SCP | CURLPROTO_SFTP)) ||
  ------------------
  |  | 1082|      0|#define CURLPROTO_SCP     (1L << 4)
  ------------------
                        conn->scheme->protocol & (CURLPROTO_SCP | CURLPROTO_SFTP)) ||
  ------------------
  |  | 1083|      0|#define CURLPROTO_SFTP    (1L << 5)
  ------------------
  |  Branch (113:11): [True: 0, False: 0]
  ------------------
  114|  3.24k|         Curl_conn_data_pending(data, FIRSTSOCKET);
  ------------------
  |  |  303|  3.24k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (114:10): [True: 0, False: 3.24k]
  ------------------
  115|  3.24k|}
transfer.c:sendrecv_ul:
  343|    207|{
  344|       |  /* We should not get here when the sending is already done. */
  345|    207|  DEBUGASSERT(!Curl_req_done_sending(data));
  ------------------
  |  | 1081|    207|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (345:3): [True: 0, False: 207]
  |  Branch (345:3): [True: 207, False: 0]
  ------------------
  346|       |
  347|    207|  if(!Curl_req_done_sending(data))
  ------------------
  |  Branch (347:6): [True: 207, False: 0]
  ------------------
  348|    207|    return Curl_req_send_more(data);
  349|      0|  return CURLE_OK;
  350|    207|}
transfer.c:xfer_setup:
  677|  17.3k|{
  678|  17.3k|  struct SingleRequest *k = &data->req;
  679|  17.3k|  struct connectdata *conn = data->conn;
  680|       |
  681|  17.3k|  DEBUGASSERT(conn != NULL);
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (681:3): [True: 0, False: 17.3k]
  |  Branch (681:3): [True: 17.3k, False: 0]
  ------------------
  682|       |  /* indexes are in range */
  683|  17.3k|  DEBUGASSERT((send_idx <= 1) && (send_idx >= -1));
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (683:3): [True: 0, False: 17.3k]
  |  Branch (683:3): [True: 0, False: 0]
  |  Branch (683:3): [True: 17.3k, False: 0]
  |  Branch (683:3): [True: 17.3k, False: 0]
  ------------------
  684|  17.3k|  DEBUGASSERT((recv_idx <= 1) && (recv_idx >= -1));
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (684:3): [True: 0, False: 17.3k]
  |  Branch (684:3): [True: 0, False: 0]
  |  Branch (684:3): [True: 17.3k, False: 0]
  |  Branch (684:3): [True: 17.3k, False: 0]
  ------------------
  685|       |  /* if request wants to send, switching off the send direction is wrong */
  686|  17.3k|  DEBUGASSERT((send_idx >= 0) || !Curl_req_want_send(data));
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (686:3): [True: 17.3k, False: 0]
  |  Branch (686:3): [True: 0, False: 0]
  |  Branch (686:3): [True: 17.2k, False: 18]
  |  Branch (686:3): [True: 18, False: 0]
  ------------------
  687|       |
  688|  17.3k|  conn->send_idx = send_idx;
  689|  17.3k|  conn->recv_idx = recv_idx;
  690|       |
  691|       |  /* without receiving, there should be not recv_size */
  692|  17.3k|  DEBUGASSERT((conn->recv_idx >= 0) || (recv_size == -1));
  ------------------
  |  | 1081|  17.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (692:3): [True: 17.3k, False: 0]
  |  Branch (692:3): [True: 0, False: 0]
  |  Branch (692:3): [True: 17.3k, False: 0]
  |  Branch (692:3): [True: 0, False: 0]
  ------------------
  693|  17.3k|  k->size = recv_size;
  694|  17.3k|  k->header = !!conn->scheme->run->write_resp_hd;
  695|       |  /* by default, we do not shutdown at the end of the transfer */
  696|  17.3k|  k->shutdown = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
  697|  17.3k|  k->shutdown_err_ignore = FALSE;
  ------------------
  |  | 1058|  17.3k|#define FALSE false
  ------------------
  698|       |
  699|       |  /* The code sequence below is placed in this function because all necessary
  700|       |     input is not always known in do_complete() as this function may be called
  701|       |     after that */
  702|  17.3k|  if(!k->header && (recv_size > 0))
  ------------------
  |  Branch (702:6): [True: 0, False: 17.3k]
  |  Branch (702:20): [True: 0, False: 0]
  ------------------
  703|      0|    Curl_pgrsSetDownloadSize(data, recv_size);
  704|       |
  705|       |  /* we want header and/or body, if neither then do not do this! */
  706|  17.3k|  if(conn->scheme->run->write_resp_hd || !data->req.no_body) {
  ------------------
  |  Branch (706:6): [True: 17.3k, False: 0]
  |  Branch (706:42): [True: 0, False: 0]
  ------------------
  707|  17.3k|    if(conn->recv_idx != -1)
  ------------------
  |  Branch (707:8): [True: 17.3k, False: 0]
  ------------------
  708|  17.3k|      CURL_REQ_SET_RECV(data);
  ------------------
  |  |   45|  17.3k|#define CURL_REQ_SET_RECV(d)   ((d)->req.io_flags |= REQ_IO_RECV)
  |  |  ------------------
  |  |  |  |   35|  17.3k|#define REQ_IO_RECV       (1 << 0) /* there is or may be data to read */
  |  |  ------------------
  ------------------
  709|  17.3k|    if(conn->send_idx != -1)
  ------------------
  |  Branch (709:8): [True: 17.2k, False: 18]
  ------------------
  710|  17.2k|      CURL_REQ_SET_SEND(data);
  ------------------
  |  |   44|  17.2k|#define CURL_REQ_SET_SEND(d)   ((d)->req.io_flags |= REQ_IO_SEND)
  |  |  ------------------
  |  |  |  |   36|  17.2k|#define REQ_IO_SEND       (1 << 1) /* there is or may be data to write */
  |  |  ------------------
  ------------------
  711|  17.3k|  }
  712|  17.3k|  CURL_TRC_M(data, "xfer_setup: recv_idx=%d, send_idx=%d",
  ------------------
  |  |  148|  17.3k|  do {                                   \
  |  |  149|  17.3k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  17.3k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  17.3k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  34.6k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 17.3k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 17.3k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  34.6k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  17.3k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  17.3k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  17.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 17.3k]
  |  |  ------------------
  ------------------
  713|  17.3k|             conn->recv_idx, conn->send_idx);
  714|  17.3k|}

Curl_uint32_bset_init:
   33|  76.7k|{
   34|  76.7k|  memset(bset, 0, sizeof(*bset));
   35|  76.7k|#ifdef DEBUGBUILD
   36|  76.7k|  bset->init = CURL_UINT32_BSET_MAGIC;
  ------------------
  |  |   29|  76.7k|#define CURL_UINT32_BSET_MAGIC  0x62757473
  ------------------
   37|  76.7k|#endif
   38|  76.7k|}
Curl_uint32_bset_resize:
   41|  76.7k|{
   42|  76.7k|  uint32_t nslots = (nmax < (UINT32_MAX - 63)) ?
  ------------------
  |  Branch (42:21): [True: 76.7k, False: 0]
  ------------------
   43|  76.7k|                    ((nmax + 63) / 64) : (UINT32_MAX / 64);
   44|       |
   45|  76.7k|  DEBUGASSERT(bset->init == CURL_UINT32_BSET_MAGIC);
  ------------------
  |  | 1081|  76.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (45:3): [True: 0, False: 76.7k]
  |  Branch (45:3): [True: 76.7k, False: 0]
  ------------------
   46|  76.7k|  if(nslots != bset->nslots) {
  ------------------
  |  Branch (46:6): [True: 76.7k, False: 0]
  ------------------
   47|  76.7k|    uint64_t *slots = curlx_calloc(nslots, sizeof(uint64_t));
  ------------------
  |  | 1480|  76.7k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   48|  76.7k|    if(!slots)
  ------------------
  |  Branch (48:8): [True: 0, False: 76.7k]
  ------------------
   49|      0|      return CURLE_OUT_OF_MEMORY;
   50|       |
   51|  76.7k|    if(bset->slots) {
  ------------------
  |  Branch (51:8): [True: 0, False: 76.7k]
  ------------------
   52|      0|      memcpy(slots, bset->slots,
   53|      0|             (CURLMIN(nslots, bset->nslots) * sizeof(uint64_t)));
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   54|      0|      curlx_free(bset->slots);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   55|      0|    }
   56|  76.7k|    bset->slots = slots;
   57|  76.7k|    bset->nslots = nslots;
   58|  76.7k|    bset->first_slot_used = 0;
   59|  76.7k|  }
   60|  76.7k|  return CURLE_OK;
   61|  76.7k|}
Curl_uint32_bset_destroy:
   64|  76.7k|{
   65|  76.7k|  DEBUGASSERT(bset->init == CURL_UINT32_BSET_MAGIC);
  ------------------
  |  | 1081|  76.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (65:3): [True: 0, False: 76.7k]
  |  Branch (65:3): [True: 76.7k, False: 0]
  ------------------
   66|  76.7k|  curlx_free(bset->slots);
  ------------------
  |  | 1483|  76.7k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   67|  76.7k|  memset(bset, 0, sizeof(*bset));
   68|  76.7k|}
Curl_uint32_bset_empty:
   91|  15.5k|{
   92|  15.5k|  uint32_t i;
   93|  15.5k|  for(i = bset->first_slot_used; i < bset->nslots; ++i) {
  ------------------
  |  Branch (93:34): [True: 15.5k, False: 0]
  ------------------
   94|  15.5k|    if(bset->slots[i])
  ------------------
  |  Branch (94:8): [True: 15.5k, False: 0]
  ------------------
   95|  15.5k|      return FALSE;
  ------------------
  |  | 1058|  15.5k|#define FALSE false
  ------------------
   96|  15.5k|  }
   97|      0|  return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
   98|  15.5k|}
Curl_uint32_bset_add:
  109|   253k|{
  110|   253k|  uint32_t islot = i / 64;
  111|   253k|  if(islot >= bset->nslots)
  ------------------
  |  Branch (111:6): [True: 0, False: 253k]
  ------------------
  112|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  113|   253k|  bset->slots[islot] |= ((uint64_t)1 << (i % 64));
  114|   253k|  if(islot < bset->first_slot_used)
  ------------------
  |  Branch (114:6): [True: 238, False: 253k]
  ------------------
  115|    238|    bset->first_slot_used = islot;
  116|       |  return TRUE;
  ------------------
  |  | 1055|   253k|#define TRUE true
  ------------------
  117|   253k|}
Curl_uint32_bset_remove:
  120|  1.89M|{
  121|  1.89M|  size_t islot = i / 64;
  122|  1.89M|  if(islot < bset->nslots)
  ------------------
  |  Branch (122:6): [True: 1.89M, False: 0]
  ------------------
  123|  1.89M|    bset->slots[islot] &= ~((uint64_t)1 << (i % 64));
  124|  1.89M|}
Curl_uint32_bset_contains:
  127|  31.6k|{
  128|  31.6k|  uint32_t islot = i / 64;
  129|  31.6k|  if(islot >= bset->nslots)
  ------------------
  |  Branch (129:6): [True: 0, False: 31.6k]
  ------------------
  130|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  131|  31.6k|  return (bset->slots[islot] & ((uint64_t)1 << (i % 64))) != 0;
  132|  31.6k|}
Curl_uint32_bset_first:
  135|  1.46M|{
  136|  1.46M|  uint32_t i;
  137|  1.59M|  for(i = bset->first_slot_used; i < bset->nslots; ++i) {
  ------------------
  |  Branch (137:34): [True: 1.50M, False: 80.7k]
  ------------------
  138|  1.50M|    if(bset->slots[i]) {
  ------------------
  |  Branch (138:8): [True: 1.38M, False: 124k]
  ------------------
  139|  1.38M|      *pfirst = (i * 64) + CURL_CTZ64(bset->slots[i]);
  ------------------
  |  |  348|  1.38M|#      define CURL_CTZ64(x)            __builtin_ctzl(x)
  ------------------
  140|  1.38M|      bset->first_slot_used = i;
  141|  1.38M|      return TRUE;
  ------------------
  |  | 1055|  1.38M|#define TRUE true
  ------------------
  142|  1.38M|    }
  143|  1.50M|  }
  144|  80.7k|  bset->first_slot_used = *pfirst = UINT32_MAX;
  145|       |  return FALSE;
  ------------------
  |  | 1058|  80.7k|#define FALSE false
  ------------------
  146|  1.46M|}
Curl_uint32_bset_next:
  150|  3.47M|{
  151|  3.47M|  uint32_t islot;
  152|  3.47M|  uint64_t x;
  153|       |
  154|  3.47M|  ++last; /* look for number one higher than last */
  155|  3.47M|  islot = last / 64; /* the slot this would be in */
  156|  3.47M|  if(islot < bset->nslots) {
  ------------------
  |  Branch (156:6): [True: 3.47M, False: 0]
  ------------------
  157|       |    /* shift away the bits we already iterated in this slot */
  158|  3.47M|    x = (bset->slots[islot] >> (last % 64));
  159|  3.47M|    if(x) {
  ------------------
  |  Branch (159:8): [True: 2.09M, False: 1.38M]
  ------------------
  160|       |      /* more bits set, next is `last` + trailing 0s of the shifted slot */
  161|  2.09M|      *pnext = last + CURL_CTZ64(x);
  ------------------
  |  |  348|  2.09M|#      define CURL_CTZ64(x)            __builtin_ctzl(x)
  ------------------
  162|  2.09M|      return TRUE;
  ------------------
  |  | 1055|  2.09M|#define TRUE true
  ------------------
  163|  2.09M|    }
  164|       |    /* no more bits set in the last slot, scan forward */
  165|  11.0M|    for(islot = islot + 1; islot < bset->nslots; ++islot) {
  ------------------
  |  Branch (165:28): [True: 9.69M, False: 1.38M]
  ------------------
  166|  9.69M|      if(bset->slots[islot]) {
  ------------------
  |  Branch (166:10): [True: 0, False: 9.69M]
  ------------------
  167|      0|        *pnext = (islot * 64) + CURL_CTZ64(bset->slots[islot]);
  ------------------
  |  |  348|      0|#      define CURL_CTZ64(x)            __builtin_ctzl(x)
  ------------------
  168|      0|        return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  169|      0|      }
  170|  9.69M|    }
  171|  1.38M|  }
  172|  1.38M|  *pnext = UINT32_MAX; /* a value we cannot store */
  173|       |  return FALSE;
  ------------------
  |  | 1058|  1.38M|#define FALSE false
  ------------------
  174|  3.47M|}

Curl_uint32_tbl_init:
   34|  15.3k|{
   35|  15.3k|  memset(tbl, 0, sizeof(*tbl));
   36|  15.3k|  tbl->entry_dtor = entry_dtor;
   37|  15.3k|  tbl->last_key_added = UINT32_MAX;
   38|  15.3k|#ifdef DEBUGBUILD
   39|  15.3k|  tbl->init = CURL_UINT32_TBL_MAGIC;
  ------------------
  |  |   29|  15.3k|#define CURL_UINT32_TBL_MAGIC  0x62757473
  ------------------
   40|  15.3k|#endif
   41|  15.3k|}
Curl_uint32_tbl_resize:
   61|  15.3k|{
   62|       |  /* we use `tbl->nrows + 1` during iteration, want that to work */
   63|  15.3k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (63:3): [True: 0, False: 15.3k]
  |  Branch (63:3): [True: 15.3k, False: 0]
  ------------------
   64|  15.3k|  if(!nrows)
  ------------------
  |  Branch (64:6): [True: 0, False: 15.3k]
  ------------------
   65|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
   66|  15.3k|  if(nrows != tbl->nrows) {
  ------------------
  |  Branch (66:6): [True: 15.3k, False: 0]
  ------------------
   67|  15.3k|    void **rows = curlx_calloc(nrows, sizeof(void *));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
   68|  15.3k|    if(!rows)
  ------------------
  |  Branch (68:8): [True: 0, False: 15.3k]
  ------------------
   69|      0|      return CURLE_OUT_OF_MEMORY;
   70|  15.3k|    if(tbl->rows) {
  ------------------
  |  Branch (70:8): [True: 0, False: 15.3k]
  ------------------
   71|      0|      memcpy(rows, tbl->rows, (CURLMIN(nrows, tbl->nrows) * sizeof(void *)));
  ------------------
  |  | 1287|      0|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   72|      0|      if(nrows < tbl->nrows)
  ------------------
  |  Branch (72:10): [True: 0, False: 0]
  ------------------
   73|      0|        uint32_tbl_clear_rows(tbl, nrows, tbl->nrows);
   74|      0|      curlx_free(tbl->rows);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|      0|    }
   76|  15.3k|    tbl->rows = rows;
   77|  15.3k|    tbl->nrows = nrows;
   78|  15.3k|  }
   79|  15.3k|  return CURLE_OK;
   80|  15.3k|}
uint32_tbl_clear:
   88|  15.3k|{
   89|  15.3k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (89:3): [True: 0, False: 15.3k]
  |  Branch (89:3): [True: 15.3k, False: 0]
  ------------------
   90|  15.3k|  uint32_tbl_clear_rows(tbl, 0, tbl->nrows);
   91|  15.3k|  DEBUGASSERT(!tbl->nentries);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (91:3): [True: 0, False: 15.3k]
  |  Branch (91:3): [True: 15.3k, False: 0]
  ------------------
   92|  15.3k|  tbl->last_key_added = UINT32_MAX;
   93|  15.3k|}
Curl_uint32_tbl_destroy:
   96|  15.3k|{
   97|  15.3k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1081|  15.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (97:3): [True: 0, False: 15.3k]
  |  Branch (97:3): [True: 15.3k, False: 0]
  ------------------
   98|  15.3k|  uint32_tbl_clear(tbl);
   99|  15.3k|  curlx_free(tbl->rows);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  100|  15.3k|  memset(tbl, 0, sizeof(*tbl));
  101|  15.3k|}
Curl_uint32_tbl_capacity:
  104|  16.1k|{
  105|  16.1k|  return tbl->nrows;
  106|  16.1k|}
Curl_uint32_tbl_count:
  109|  31.4k|{
  110|  31.4k|  return tbl->nentries;
  111|  31.4k|}
Curl_uint32_tbl_get:
  114|  3.49M|{
  115|  3.49M|  return (key < tbl->nrows) ? tbl->rows[key] : NULL;
  ------------------
  |  Branch (115:10): [True: 3.49M, False: 0]
  ------------------
  116|  3.49M|}
Curl_uint32_tbl_add:
  119|  31.4k|{
  120|  31.4k|  uint32_t key, start_pos;
  121|       |
  122|  31.4k|  DEBUGASSERT(tbl->init == CURL_UINT32_TBL_MAGIC);
  ------------------
  |  | 1081|  31.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (122:3): [True: 0, False: 31.4k]
  |  Branch (122:3): [True: 31.4k, False: 0]
  ------------------
  123|  31.4k|  if(!entry || !pkey)
  ------------------
  |  Branch (123:6): [True: 0, False: 31.4k]
  |  Branch (123:16): [True: 0, False: 31.4k]
  ------------------
  124|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  125|  31.4k|  *pkey = UINT32_MAX;
  126|  31.4k|  if(tbl->nentries == tbl->nrows)  /* full */
  ------------------
  |  Branch (126:6): [True: 0, False: 31.4k]
  ------------------
  127|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  128|       |
  129|  31.4k|  start_pos = CURLMIN(tbl->last_key_added, tbl->nrows) + 1;
  ------------------
  |  | 1287|  31.4k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 16.1k, False: 15.3k]
  |  |  ------------------
  ------------------
  130|  31.4k|  for(key = start_pos; key < tbl->nrows; ++key) {
  ------------------
  |  Branch (130:24): [True: 16.1k, False: 15.3k]
  ------------------
  131|  16.1k|    if(!tbl->rows[key]) {
  ------------------
  |  Branch (131:8): [True: 16.1k, False: 0]
  ------------------
  132|  16.1k|      tbl->rows[key] = entry;
  133|  16.1k|      tbl->nentries++;
  134|  16.1k|      tbl->last_key_added = key;
  135|  16.1k|      *pkey = key;
  136|  16.1k|      return TRUE;
  ------------------
  |  | 1055|  16.1k|#define TRUE true
  ------------------
  137|  16.1k|    }
  138|  16.1k|  }
  139|       |  /* no free entry at or above tbl->maybe_next_key, wrap around */
  140|  15.3k|  for(key = 0; key < start_pos; ++key) {
  ------------------
  |  Branch (140:16): [True: 15.3k, False: 0]
  ------------------
  141|  15.3k|    if(!tbl->rows[key]) {
  ------------------
  |  Branch (141:8): [True: 15.3k, False: 0]
  ------------------
  142|  15.3k|      tbl->rows[key] = entry;
  143|  15.3k|      tbl->nentries++;
  144|  15.3k|      tbl->last_key_added = key;
  145|  15.3k|      *pkey = key;
  146|  15.3k|      return TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  147|  15.3k|    }
  148|  15.3k|  }
  149|       |  /* Did not find any free row? Should not happen */
  150|      0|  DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (150:3): [Folded, False: 0]
  |  Branch (150:3): [Folded, False: 0]
  ------------------
  151|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  152|      0|}
Curl_uint32_tbl_remove:
  155|  31.4k|{
  156|  31.4k|  uint32_tbl_clear_rows(tbl, key, key + 1);
  157|  31.4k|}
Curl_uint32_tbl_contains:
  160|  16.1k|{
  161|  16.1k|  return (key < tbl->nrows) ? !!tbl->rows[key] : FALSE;
  ------------------
  |  | 1058|  16.1k|#define FALSE false
  ------------------
  |  Branch (161:10): [True: 16.1k, False: 0]
  ------------------
  162|  16.1k|}
Curl_uint32_tbl_first:
  181|  15.3k|{
  182|  15.3k|  if(!pkey || !pentry)
  ------------------
  |  Branch (182:6): [True: 0, False: 15.3k]
  |  Branch (182:15): [True: 0, False: 15.3k]
  ------------------
  183|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  184|  15.3k|  if(tbl->nentries && uint32_tbl_next_at(tbl, 0, pkey, pentry))
  ------------------
  |  Branch (184:6): [True: 15.3k, False: 0]
  |  Branch (184:23): [True: 15.3k, False: 0]
  ------------------
  185|  15.3k|    return TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  186|      0|  DEBUGASSERT(!tbl->nentries);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (186:3): [True: 0, False: 0]
  |  Branch (186:3): [True: 0, False: 0]
  ------------------
  187|      0|  *pkey = UINT32_MAX;  /* always invalid */
  188|      0|  *pentry = NULL;
  189|       |  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  190|      0|}
Curl_uint32_tbl_next:
  194|  15.3k|{
  195|  15.3k|  if(!pkey || !pentry)
  ------------------
  |  Branch (195:6): [True: 0, False: 15.3k]
  |  Branch (195:15): [True: 0, False: 15.3k]
  ------------------
  196|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  197|  15.3k|  if(uint32_tbl_next_at(tbl, last_key + 1, pkey, pentry))
  ------------------
  |  Branch (197:6): [True: 0, False: 15.3k]
  ------------------
  198|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  199|  15.3k|  *pkey = UINT32_MAX;  /* always invalid */
  200|  15.3k|  *pentry = NULL;
  201|       |  return FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
  202|  15.3k|}
uint-table.c:uint32_tbl_clear_rows:
   46|  46.7k|{
   47|  46.7k|  uint32_t i, end;
   48|       |
   49|  46.7k|  end = CURLMIN(upto_excluding, tbl->nrows);
  ------------------
  |  | 1287|  46.7k|#define CURLMIN(x, y) ((x) < (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (1287:24): [True: 31.4k, False: 15.3k]
  |  |  ------------------
  ------------------
   50|  7.93M|  for(i = from; i < end; ++i) {
  ------------------
  |  Branch (50:17): [True: 7.89M, False: 46.7k]
  ------------------
   51|  7.89M|    if(tbl->rows[i]) {
  ------------------
  |  Branch (51:8): [True: 31.4k, False: 7.85M]
  ------------------
   52|  31.4k|      if(tbl->entry_dtor)
  ------------------
  |  Branch (52:10): [True: 0, False: 31.4k]
  ------------------
   53|      0|        tbl->entry_dtor(i, tbl->rows[i]);
   54|       |      tbl->rows[i] = NULL;
   55|  31.4k|      tbl->nentries--;
   56|  31.4k|    }
   57|  7.89M|  }
   58|  46.7k|}
uint-table.c:uint32_tbl_next_at:
  166|  30.6k|{
  167|  7.87M|  for(; key < tbl->nrows; ++key) {
  ------------------
  |  Branch (167:9): [True: 7.85M, False: 15.3k]
  ------------------
  168|  7.85M|    if(tbl->rows[key]) {
  ------------------
  |  Branch (168:8): [True: 15.3k, False: 7.84M]
  ------------------
  169|  15.3k|      *pkey = key;
  170|  15.3k|      *pentry = tbl->rows[key];
  171|  15.3k|      return TRUE;
  ------------------
  |  | 1055|  15.3k|#define TRUE true
  ------------------
  172|  15.3k|    }
  173|  7.85M|  }
  174|  15.3k|  *pkey = UINT32_MAX;  /* always invalid */
  175|  15.3k|  *pentry = NULL;
  176|       |  return FALSE;
  ------------------
  |  | 1058|  15.3k|#define FALSE false
  ------------------
  177|  30.6k|}

Curl_freeset:
  150|  33.2k|{
  151|       |  /* Free all dynamic strings stored in the data->set substructure. */
  152|  33.2k|  enum dupstring i;
  153|  33.2k|  enum dupblob j;
  154|       |
  155|  2.52M|  for(i = (enum dupstring)0; i < STRING_LAST; i++) {
  ------------------
  |  Branch (155:30): [True: 2.49M, False: 33.2k]
  ------------------
  156|  2.49M|    curlx_safefree(data->set.str[i]);
  ------------------
  |  | 1327|  2.49M|  do {                      \
  |  | 1328|  2.49M|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.49M|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.49M|    (ptr) = NULL;           \
  |  | 1330|  2.49M|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.49M]
  |  |  ------------------
  ------------------
  157|  2.49M|  }
  158|       |
  159|   298k|  for(j = (enum dupblob)0; j < BLOB_LAST; j++) {
  ------------------
  |  Branch (159:28): [True: 265k, False: 33.2k]
  ------------------
  160|   265k|    curlx_safefree(data->set.blobs[j]);
  ------------------
  |  | 1327|   265k|  do {                      \
  |  | 1328|   265k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   265k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   265k|    (ptr) = NULL;           \
  |  | 1330|   265k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 265k]
  |  |  ------------------
  ------------------
  161|   265k|  }
  162|       |
  163|  33.2k|  Curl_bufref_free(&data->state.referer);
  164|  33.2k|  Curl_bufref_free(&data->state.url);
  165|       |
  166|  33.2k|#if !defined(CURL_DISABLE_MIME) || !defined(CURL_DISABLE_FORM_API)
  167|  33.2k|  Curl_mime_cleanpart(data->set.mimepostp);
  168|  33.2k|  curlx_safefree(data->set.mimepostp);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  169|  33.2k|#endif
  170|       |
  171|  33.2k|#ifndef CURL_DISABLE_COOKIES
  172|  33.2k|  curl_slist_free_all(data->state.cookielist);
  173|       |  data->state.cookielist = NULL;
  174|  33.2k|#endif
  175|  33.2k|}
Curl_close:
  201|  33.2k|{
  202|  33.2k|  struct Curl_easy *data;
  203|       |
  204|  33.2k|  if(!datap || !*datap)
  ------------------
  |  Branch (204:6): [True: 0, False: 33.2k]
  |  Branch (204:16): [True: 9, False: 33.2k]
  ------------------
  205|      9|    return CURLE_OK;
  206|       |
  207|  33.2k|  data = *datap;
  208|  33.2k|  *datap = NULL;
  209|       |
  210|  33.2k|  if(!data->state.internal && data->multi) {
  ------------------
  |  Branch (210:6): [True: 17.1k, False: 16.1k]
  |  Branch (210:31): [True: 0, False: 17.1k]
  ------------------
  211|       |    /* This handle is still part of a multi handle, take care of this first
  212|       |       and detach this handle from there.
  213|       |       This detaches the connection. */
  214|      0|    curl_multi_remove_handle(data->multi, data);
  215|      0|  }
  216|  33.2k|  else {
  217|       |    /* Detach connection if any is left. This should not be normal, but can be
  218|       |       the case for example with CONNECT_ONLY + recv/send (test 556) */
  219|  33.2k|    Curl_detach_connection(data);
  220|  33.2k|    if(!data->state.internal && data->multi_easy) {
  ------------------
  |  Branch (220:8): [True: 17.1k, False: 16.1k]
  |  Branch (220:33): [True: 0, False: 17.1k]
  ------------------
  221|       |      /* when curl_easy_perform() is used, it creates its own multi handle to
  222|       |         use and this is the one */
  223|      0|      curl_multi_cleanup(data->multi_easy);
  224|      0|      data->multi_easy = NULL;
  225|      0|    }
  226|  33.2k|  }
  227|  33.2k|  DEBUGASSERT(!data->conn || data->state.internal);
  ------------------
  |  | 1081|  33.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (227:3): [True: 33.2k, False: 0]
  |  Branch (227:3): [True: 0, False: 0]
  |  Branch (227:3): [True: 33.2k, False: 0]
  |  Branch (227:3): [True: 0, False: 0]
  ------------------
  228|       |
  229|  33.2k|  Curl_expire_clear(data); /* shut off any timers left */
  230|       |
  231|  33.2k|  if(data->state.rangestringalloc)
  ------------------
  |  Branch (231:6): [True: 425, False: 32.7k]
  ------------------
  232|    425|    curlx_free(data->state.range);
  ------------------
  |  | 1483|    425|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  233|       |
  234|       |  /* release any resolve information this transfer kept */
  235|  33.2k|  Curl_resolv_destroy_all(data);
  236|       |
  237|  33.2k|  data->set.verbose = FALSE; /* no more calls to DEBUGFUNCTION */
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  238|  33.2k|  data->magic = 0; /* force a clear AFTER the possibly enforced removal from
  239|       |                    * the multi handle and async dns shutdown. The multi
  240|       |                    * handle might check the magic and so might any
  241|       |                    * DEBUGFUNCTION invoked for tracing */
  242|       |
  243|       |  /* freed here in case DONE was not called */
  244|  33.2k|  Curl_req_free(&data->req, data);
  245|       |
  246|       |  /* Close down all open SSL info and sessions */
  247|  33.2k|  Curl_ssl_close_all(data);
  248|  33.2k|  Curl_peer_unlink(&data->state.initial_origin);
  249|  33.2k|  Curl_ssl_free_certinfo(data);
  250|       |
  251|  33.2k|  Curl_bufref_free(&data->state.referer);
  252|       |
  253|  33.2k|  up_free(data);
  254|  33.2k|  curlx_dyn_free(&data->state.headerb);
  255|  33.2k|  Curl_flush_cookies(data, TRUE);
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  256|  33.2k|#ifndef CURL_DISABLE_ALTSVC
  257|  33.2k|  Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
  258|  33.2k|  Curl_altsvc_cleanup(&data->asi);
  259|  33.2k|#endif
  260|  33.2k|#ifndef CURL_DISABLE_HSTS
  261|  33.2k|  Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);
  262|  33.2k|  if(!data->share || !data->share->hsts)
  ------------------
  |  Branch (262:6): [True: 33.2k, False: 0]
  |  Branch (262:22): [True: 0, False: 0]
  ------------------
  263|  33.2k|    Curl_hsts_cleanup(&data->hsts);
  264|  33.2k|  curl_slist_free_all(data->state.hstslist); /* clean up list */
  265|  33.2k|#endif
  266|  33.2k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
  267|  33.2k|  Curl_http_auth_cleanup_digest(data);
  268|  33.2k|#endif
  269|  33.2k|  curlx_safefree(data->state.most_recent_ftp_entrypath);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  270|  33.2k|  curlx_safefree(data->info.contenttype);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  271|  33.2k|  curlx_safefree(data->info.wouldredirect);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  272|       |
  273|       |  /* No longer a dirty share, if it exists */
  274|  33.2k|  if(Curl_share_easy_unlink(data))
  ------------------
  |  Branch (274:6): [True: 0, False: 33.2k]
  ------------------
  275|  33.2k|    DEBUGASSERT(0);
  ------------------
  |  | 1081|  33.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (275:5): [Folded, False: 0]
  |  Branch (275:5): [Folded, False: 0]
  ------------------
  276|       |
  277|  33.2k|  Curl_hash_destroy(&data->meta_hash);
  278|  33.2k|  Curl_creds_unlink(&data->state.creds);
  279|  33.2k|  curlx_safefree(data->state.aptr.uagent);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  280|  33.2k|  curlx_safefree(data->state.aptr.accept_encoding);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  281|  33.2k|  curlx_safefree(data->state.aptr.rangeline);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  282|  33.2k|  curlx_safefree(data->state.aptr.ref);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  283|  33.2k|  curlx_safefree(data->state.aptr.host);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  284|  33.2k|#ifndef CURL_DISABLE_COOKIES
  285|  33.2k|  curlx_safefree(data->req.cookiehost);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  286|  33.2k|#endif
  287|  33.2k|#ifndef CURL_DISABLE_RTSP
  288|  33.2k|  curlx_safefree(data->state.aptr.rtsp_transport);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  289|  33.2k|#endif
  290|       |
  291|  33.2k|#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_FORM_API)
  292|  33.2k|  Curl_mime_cleanpart(data->state.formp);
  293|  33.2k|  curlx_safefree(data->state.formp);
  ------------------
  |  | 1327|  33.2k|  do {                      \
  |  | 1328|  33.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.2k|    (ptr) = NULL;           \
  |  | 1330|  33.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.2k]
  |  |  ------------------
  ------------------
  294|  33.2k|#endif
  295|       |
  296|       |  /* destruct wildcard structures if it is needed */
  297|  33.2k|  Curl_wildcard_dtor(&data->wildcard);
  298|  33.2k|  Curl_freeset(data);
  299|  33.2k|  Curl_headers_cleanup(data);
  300|  33.2k|  Curl_netrc_cleanup(&data->state.netrc);
  301|  33.2k|#ifndef CURL_DISABLE_DIGEST_AUTH
  302|  33.2k|  curlx_free(data->state.envproxy);
  ------------------
  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  303|  33.2k|#endif
  304|  33.2k|  curlx_free(data);
  ------------------
  |  | 1483|  33.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  305|  33.2k|  return CURLE_OK;
  306|  33.2k|}
Curl_init_userdefined:
  313|  33.2k|{
  314|  33.2k|  struct UserDefined *set = &data->set;
  315|       |
  316|  33.2k|  set->out = stdout;  /* default output to stdout */
  317|  33.2k|  set->in_set = stdin;  /* default input from stdin */
  318|  33.2k|  set->err = stderr;  /* default stderr to stderr */
  319|       |
  320|  33.2k|#if defined(__clang__) && __clang_major__ >= 16
  321|  33.2k|#pragma clang diagnostic push
  322|  33.2k|#pragma clang diagnostic ignored "-Wcast-function-type-strict"
  323|  33.2k|#endif
  324|       |  /* use fwrite as default function to store output */
  325|  33.2k|  set->fwrite_func = (curl_write_callback)fwrite;
  326|       |
  327|       |  /* use fread as default function to read input */
  328|  33.2k|  set->fread_func_set = (curl_read_callback)fread;
  329|  33.2k|#if defined(__clang__) && __clang_major__ >= 16
  330|  33.2k|#pragma clang diagnostic pop
  331|  33.2k|#endif
  332|  33.2k|  set->is_fread_set = 0;
  333|       |
  334|  33.2k|  set->seek_client = ZERO_NULL;
  ------------------
  |  | 1155|  33.2k|#define ZERO_NULL 0
  ------------------
  335|       |
  336|  33.2k|  set->filesize = -1;        /* we do not know the size */
  337|  33.2k|  set->postfieldsize = -1;   /* unknown size */
  338|  33.2k|  set->maxredirs = 30;       /* sensible default */
  339|       |
  340|  33.2k|  set->method = HTTPREQ_GET; /* Default HTTP request */
  341|  33.2k|#ifndef CURL_DISABLE_RTSP
  342|  33.2k|  set->rtspreq = RTSPREQ_OPTIONS; /* Default RTSP request */
  343|  33.2k|#endif
  344|  33.2k|#ifndef CURL_DISABLE_FTP
  345|  33.2k|  set->ftp_use_epsv = TRUE;   /* FTP defaults to EPSV operations */
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  346|  33.2k|  set->ftp_use_eprt = TRUE;   /* FTP defaults to EPRT operations */
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  347|  33.2k|  set->ftp_use_pret = FALSE;  /* mainly useful for drftpd servers */
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  348|  33.2k|  set->ftp_filemethod = FTPFILE_MULTICWD;
  349|  33.2k|  set->ftp_skip_ip = TRUE;    /* skip PASV IP by default */
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  350|  33.2k|#endif
  351|  33.2k|  set->dns_cache_timeout_ms = 60000; /* Timeout every 60 seconds by default */
  352|       |
  353|       |  /* Timeout every 24 hours by default */
  354|  33.2k|  set->general_ssl.ca_cache_timeout = 24 * 60 * 60;
  355|       |
  356|  33.2k|  set->httpauth = CURLAUTH_BASIC;  /* defaults to basic */
  ------------------
  |  |  831|  33.2k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  357|       |
  358|  33.2k|#ifndef CURL_DISABLE_PROXY
  359|  33.2k|  set->proxyport = 0;
  360|  33.2k|  set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
  ------------------
  |  |  790|  33.2k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  361|  33.2k|  set->proxyauth = CURLAUTH_BASIC; /* defaults to basic */
  ------------------
  |  |  831|  33.2k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
  362|       |  /* SOCKS5 proxy auth defaults to username/password + GSS-API */
  363|  33.2k|  set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  831|  33.2k|#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
  ------------------
                set->socks5auth = CURLAUTH_BASIC | CURLAUTH_GSSAPI;
  ------------------
  |  |  837|  33.2k|#define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
  |  |  ------------------
  |  |  |  |  833|  33.2k|#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
  |  |  ------------------
  ------------------
  364|  33.2k|#endif
  365|       |
  366|  33.2k|  Curl_ssl_easy_config_init(data);
  367|  33.2k|#ifndef CURL_DISABLE_DOH
  368|  33.2k|  set->doh_verifyhost = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  369|  33.2k|  set->doh_verifypeer = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  370|  33.2k|#endif
  371|       |#ifdef USE_SSH
  372|       |  /* defaults to any auth type */
  373|       |  set->ssh_auth_types = CURLSSH_AUTH_DEFAULT;
  374|       |  set->new_directory_perms = 0755; /* Default permissions */
  375|       |#endif
  376|       |
  377|  33.2k|  set->new_file_perms = 0644;    /* Default permissions */
  378|  33.2k|  set->allowed_protocols = (curl_prot_t)CURLPROTO_64ALL;
  ------------------
  |  |   68|  33.2k|#define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff)
  ------------------
  379|  33.2k|  set->redir_protocols = CURLPROTO_REDIR;
  ------------------
  |  |   71|  33.2k|#define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1078|  33.2k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1079|  33.2k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define CURLPROTO_REDIR (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FTP | \
  |  |  ------------------
  |  |  |  | 1080|  33.2k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |   72|  33.2k|                         CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|  33.2k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  380|       |
  381|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  382|       |  /*
  383|       |   * disallow unprotected protection negotiation NEC reference implementation
  384|       |   * seem not to follow rfc1961 section 4.3/4.4
  385|       |   */
  386|       |  set->socks5_gssapi_nec = FALSE;
  387|       |#endif
  388|       |
  389|       |  /* set default minimum TLS version */
  390|  33.2k|#ifdef USE_SSL
  391|  33.2k|  Curl_setopt_SSLVERSION(data, CURLOPT_SSLVERSION, CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2368|  33.2k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  392|  33.2k|#ifndef CURL_DISABLE_PROXY
  393|  33.2k|  Curl_setopt_SSLVERSION(data, CURLOPT_PROXY_SSLVERSION,
  394|  33.2k|                         CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 2368|  33.2k|#define CURL_SSLVERSION_DEFAULT 0L
  ------------------
  395|  33.2k|#endif
  396|  33.2k|#endif
  397|  33.2k|#ifndef CURL_DISABLE_FTP
  398|  33.2k|  set->wildcard_enabled = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  399|  33.2k|  set->chunk_bgn = ZERO_NULL;
  ------------------
  |  | 1155|  33.2k|#define ZERO_NULL 0
  ------------------
  400|  33.2k|  set->chunk_end = ZERO_NULL;
  ------------------
  |  | 1155|  33.2k|#define ZERO_NULL 0
  ------------------
  401|  33.2k|  set->fnmatch = ZERO_NULL;
  ------------------
  |  | 1155|  33.2k|#define ZERO_NULL 0
  ------------------
  402|  33.2k|#endif
  403|  33.2k|  set->tcp_keepalive = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  404|  33.2k|  set->tcp_keepintvl = 60;
  405|  33.2k|  set->tcp_keepidle = 60;
  406|  33.2k|  set->tcp_keepcnt = 9;
  407|  33.2k|  set->tcp_fastopen = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  408|  33.2k|  set->tcp_nodelay = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  409|  33.2k|  set->ssl_enable_alpn = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  410|  33.2k|  set->expect_100_timeout = 1000L; /* Wait for a second by default. */
  411|  33.2k|  set->sep_headers = TRUE; /* separated header lists by default */
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  412|  33.2k|  set->buffer_size = READBUFFER_SIZE;
  ------------------
  |  |  114|  33.2k|#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE
  |  |  ------------------
  |  |  |  |  265|  33.2k|#define CURL_MAX_WRITE_SIZE 16384
  |  |  ------------------
  ------------------
  413|  33.2k|  set->upload_buffer_size = UPLOADBUFFER_DEFAULT;
  ------------------
  |  |  126|  33.2k|#define UPLOADBUFFER_DEFAULT 65536
  ------------------
  414|  33.2k|  set->upload_flags = CURLULFLAG_SEEN;
  ------------------
  |  | 1044|  33.2k|#define CURLULFLAG_SEEN     (1L << 4)
  ------------------
  415|  33.2k|  set->happy_eyeballs_timeout = CURL_HET_DEFAULT;
  ------------------
  |  |  969|  33.2k|#define CURL_HET_DEFAULT 200L
  ------------------
  416|  33.2k|  set->upkeep_interval_ms = CURL_UPKEEP_INTERVAL_DEFAULT;
  ------------------
  |  |  972|  33.2k|#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
  ------------------
  417|  33.2k|  set->maxconnects = DEFAULT_CONNCACHE_SIZE; /* for easy handles */
  ------------------
  |  |   38|  33.2k|#define DEFAULT_CONNCACHE_SIZE 5
  ------------------
  418|  33.2k|  set->conn_max_idle_ms = 118 * 1000;
  419|  33.2k|  set->conn_max_age_ms = 24 * 3600 * 1000;
  420|  33.2k|  set->http09_allowed = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  421|  33.2k|  set->httpwant = CURL_HTTP_VERSION_NONE;
  ------------------
  |  | 2312|  33.2k|#define CURL_HTTP_VERSION_NONE  0L /* setting this means we do not care, and
  ------------------
  422|  33.2k|#if defined(USE_HTTP2) || defined(USE_HTTP3)
  423|  33.2k|  memset(&set->priority, 0, sizeof(set->priority));
  424|  33.2k|#endif
  425|  33.2k|  set->quick_exit = 0L;
  426|  33.2k|#ifndef CURL_DISABLE_WEBSOCKETS
  427|  33.2k|  set->ws_raw_mode = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  428|       |  set->ws_no_auto_pong = FALSE;
  ------------------
  |  | 1058|  33.2k|#define FALSE false
  ------------------
  429|  33.2k|#endif
  430|  33.2k|}
Curl_open:
  452|  33.2k|{
  453|  33.2k|  struct Curl_easy *data;
  454|       |
  455|       |  /* simple start-up: alloc the struct, init it with zeroes and return */
  456|  33.2k|  data = curlx_calloc(1, sizeof(struct Curl_easy));
  ------------------
  |  | 1480|  33.2k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  457|  33.2k|  if(!data) {
  ------------------
  |  Branch (457:6): [True: 0, False: 33.2k]
  ------------------
  458|       |    /* this is a serious error */
  459|      0|    DEBUGF(curl_mfprintf(stderr, "Error: calloc of Curl_easy failed\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
  460|      0|    return CURLE_OUT_OF_MEMORY;
  461|      0|  }
  462|       |
  463|  33.2k|  data->magic = CURLEASY_MAGIC_NUMBER;
  ------------------
  |  |  130|  33.2k|#define CURLEASY_MAGIC_NUMBER 0xc0dedbadU
  ------------------
  464|       |  /* most recent connection is not yet defined */
  465|  33.2k|  data->state.lastconnect_id = -1;
  466|  33.2k|  data->state.recent_conn_id = -1;
  467|       |  /* and not assigned an id yet */
  468|  33.2k|  data->id = -1;
  469|  33.2k|  data->mid = UINT32_MAX;
  470|  33.2k|  data->master_mid = UINT32_MAX;
  471|  33.2k|  data->progress.hide = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  472|  33.2k|  data->state.current_speed = -1; /* init to negative == impossible */
  473|       |
  474|  33.2k|  Curl_hash_init(&data->meta_hash, 23,
  475|  33.2k|                 Curl_hash_str, curlx_str_key_compare, easy_meta_freeentry);
  476|  33.2k|  curlx_dyn_init(&data->state.headerb, CURL_MAX_HTTP_HEADER);
  ------------------
  |  |  272|  33.2k|#define CURL_MAX_HTTP_HEADER (100 * 1024)
  ------------------
  477|  33.2k|  Curl_bufref_init(&data->state.url);
  478|  33.2k|  Curl_bufref_init(&data->state.referer);
  479|  33.2k|  Curl_req_init(&data->req);
  480|  33.2k|  Curl_initinfo(data);
  481|  33.2k|#ifndef CURL_DISABLE_HTTP
  482|  33.2k|  Curl_llist_init(&data->state.httphdrs, NULL);
  483|  33.2k|#endif
  484|  33.2k|  Curl_netrc_init(&data->state.netrc);
  485|  33.2k|  Curl_init_userdefined(data);
  486|       |
  487|  33.2k|  *curl = data;
  488|  33.2k|  return CURLE_OK;
  489|  33.2k|}
Curl_conn_free:
  492|  23.2k|{
  493|  23.2k|  size_t i;
  494|       |
  495|  23.2k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  23.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (495:3): [True: 0, False: 23.2k]
  |  Branch (495:3): [True: 23.2k, False: 0]
  ------------------
  496|       |
  497|  23.2k|  if(conn->scheme && conn->scheme->run->disconnect &&
  ------------------
  |  Branch (497:6): [True: 21.5k, False: 1.70k]
  |  Branch (497:22): [True: 0, False: 21.5k]
  ------------------
  498|      0|     !conn->bits.shutdown_handler)
  ------------------
  |  Branch (498:6): [True: 0, False: 0]
  ------------------
  499|      0|    conn->scheme->run->disconnect(data, conn, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  500|       |
  501|  69.7k|  for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
  ------------------
  |  | 1294|  69.7k|#define CURL_ARRAYSIZE(A) (sizeof(A) / sizeof((A)[0]))
  ------------------
  |  Branch (501:14): [True: 46.5k, False: 23.2k]
  ------------------
  502|  46.5k|    Curl_conn_cf_discard_all(data, conn, (int)i);
  503|  46.5k|  }
  504|       |
  505|  23.2k|#ifndef CURL_DISABLE_PROXY
  506|  23.2k|  Curl_peer_unlink(&conn->http_proxy.peer);
  507|  23.2k|  Curl_peer_unlink(&conn->socks_proxy.peer);
  508|  23.2k|  Curl_creds_unlink(&conn->http_proxy.creds);
  509|  23.2k|  Curl_creds_unlink(&conn->socks_proxy.creds);
  510|  23.2k|#endif
  511|  23.2k|  Curl_creds_unlink(&conn->creds);
  512|  23.2k|  curlx_safefree(conn->options);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  513|  23.2k|  curlx_safefree(conn->localdev);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  514|  23.2k|  Curl_ssl_conn_config_cleanup(conn);
  515|       |
  516|  23.2k|  curlx_safefree(conn->destination);
  ------------------
  |  | 1327|  23.2k|  do {                      \
  |  | 1328|  23.2k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  23.2k|    (ptr) = NULL;           \
  |  | 1330|  23.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
  517|  23.2k|  Curl_hash_destroy(&conn->meta_hash);
  518|  23.2k|  Curl_peer_unlink(&conn->origin);
  519|  23.2k|  Curl_peer_unlink(&conn->via_peer);
  520|  23.2k|  Curl_peer_unlink(&conn->origin2);
  521|  23.2k|  Curl_peer_unlink(&conn->via_peer2);
  522|       |
  523|  23.2k|  curlx_free(conn); /* free all the connection oriented data */
  ------------------
  |  | 1483|  23.2k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  524|  23.2k|}
Curl_conn_seems_dead:
  603|  10.2k|{
  604|  10.2k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 10.2k]
  |  Branch (604:3): [True: 10.2k, False: 0]
  ------------------
  605|  10.2k|  if(!CONN_INUSE(conn)) {
  ------------------
  |  |  346|  10.2k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  ------------------
  |  Branch (605:6): [True: 10.2k, False: 0]
  ------------------
  606|       |    /* The check for a dead socket makes sense only if the connection is not in
  607|       |       use */
  608|  10.2k|    bool dead;
  609|       |
  610|  10.2k|    if(conn_maxage(data, conn, *Curl_pgrs_now(data))) {
  ------------------
  |  Branch (610:8): [True: 0, False: 10.2k]
  ------------------
  611|       |      /* avoid check if already too old */
  612|      0|      dead = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  613|      0|    }
  614|  10.2k|    else if(conn->scheme->run->connection_is_dead) {
  ------------------
  |  Branch (614:13): [True: 10.2k, False: 0]
  ------------------
  615|       |      /* The protocol has a special method for checking the state of the
  616|       |         connection. Use it to check if the connection is dead. */
  617|       |      /* briefly attach the connection for the check */
  618|  10.2k|      Curl_attach_connection(data, conn);
  619|  10.2k|      dead = conn->scheme->run->connection_is_dead(data, conn);
  620|  10.2k|      Curl_detach_connection(data);
  621|  10.2k|    }
  622|      0|    else {
  623|      0|      bool input_pending = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  624|       |
  625|      0|      Curl_attach_connection(data, conn);
  626|      0|      dead = !Curl_conn_is_alive(data, conn, &input_pending);
  627|      0|      if(input_pending) {
  ------------------
  |  Branch (627:10): [True: 0, False: 0]
  ------------------
  628|       |        /* For reuse, we want a "clean" connection state. This includes
  629|       |         * that we expect - in general - no waiting input data. Input
  630|       |         * waiting might be a TLS Notify Close, for example. We reject
  631|       |         * that.
  632|       |         * For protocols where data from other end may arrive at
  633|       |         * any time (HTTP/2 PING for example), the protocol handler needs
  634|       |         * to install its own `connection_check` callback.
  635|       |         */
  636|      0|        DEBUGF(infof(data, "connection has input pending, not reusable"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  637|      0|        dead = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  638|      0|      }
  639|      0|      Curl_detach_connection(data);
  640|      0|    }
  641|       |
  642|  10.2k|    if(dead) {
  ------------------
  |  Branch (642:8): [True: 0, False: 10.2k]
  ------------------
  643|       |      /* remove connection from cpool */
  644|      0|      infof(data, "Connection %" FMT_OFF_T " seems to be dead",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  645|      0|            conn->connection_id);
  646|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  647|      0|    }
  648|  10.2k|  }
  649|  10.2k|  return FALSE;
  ------------------
  |  | 1058|  10.2k|#define FALSE false
  ------------------
  650|  10.2k|}
Curl_uc_to_curlcode:
 1373|    774|{
 1374|    774|  switch(uc) {
 1375|    772|  default:
  ------------------
  |  Branch (1375:3): [True: 772, False: 2]
  ------------------
 1376|    772|    return CURLE_URL_MALFORMAT;
 1377|      1|  case CURLUE_UNSUPPORTED_SCHEME:
  ------------------
  |  Branch (1377:3): [True: 1, False: 773]
  ------------------
 1378|      1|    return CURLE_UNSUPPORTED_PROTOCOL;
 1379|      0|  case CURLUE_OUT_OF_MEMORY:
  ------------------
  |  Branch (1379:3): [True: 0, False: 774]
  ------------------
 1380|      0|    return CURLE_OUT_OF_MEMORY;
 1381|      1|  case CURLUE_USER_NOT_ALLOWED:
  ------------------
  |  Branch (1381:3): [True: 1, False: 773]
  ------------------
 1382|      1|    return CURLE_LOGIN_DENIED;
 1383|    774|  }
 1384|    774|}
Curl_parse_login_details:
 2103|  8.54k|{
 2104|  8.54k|  char *ubuf = NULL;
 2105|  8.54k|  char *pbuf = NULL;
 2106|  8.54k|  const char *psep = NULL;
 2107|  8.54k|  const char *osep = NULL;
 2108|  8.54k|  size_t ulen;
 2109|  8.54k|  size_t plen;
 2110|  8.54k|  size_t olen;
 2111|       |
 2112|  8.54k|  DEBUGASSERT(userp);
  ------------------
  |  | 1081|  8.54k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2112:3): [True: 0, False: 8.54k]
  |  Branch (2112:3): [True: 8.54k, False: 0]
  ------------------
 2113|  8.54k|  DEBUGASSERT(passwdp);
  ------------------
  |  | 1081|  8.54k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2113:3): [True: 0, False: 8.54k]
  |  Branch (2113:3): [True: 8.54k, False: 0]
  ------------------
 2114|       |
 2115|       |  /* Attempt to find the password separator */
 2116|  8.54k|  psep = memchr(login, ':', len);
 2117|       |
 2118|       |  /* Attempt to find the options separator */
 2119|  8.54k|  if(optionsp)
  ------------------
  |  Branch (2119:6): [True: 4, False: 8.54k]
  ------------------
 2120|      4|    osep = memchr(login, ';', len);
 2121|       |
 2122|       |  /* Calculate the portion lengths */
 2123|  8.54k|  ulen = (psep ?
  ------------------
  |  Branch (2123:11): [True: 690, False: 7.85k]
  ------------------
 2124|    690|          (size_t)(osep && psep > osep ? osep - login : psep - login) :
  ------------------
  |  Branch (2124:20): [True: 2, False: 688]
  |  Branch (2124:28): [True: 1, False: 1]
  ------------------
 2125|  8.54k|          (osep ? (size_t)(osep - login) : len));
  ------------------
  |  Branch (2125:12): [True: 2, False: 7.85k]
  ------------------
 2126|  8.54k|  plen = (psep ?
  ------------------
  |  Branch (2126:11): [True: 690, False: 7.85k]
  ------------------
 2127|    690|          (osep && osep > psep ? (size_t)(osep - psep) :
  ------------------
  |  Branch (2127:12): [True: 2, False: 688]
  |  Branch (2127:20): [True: 1, False: 1]
  ------------------
 2128|  7.85k|           (size_t)(login + len - psep)) - 1 : 0);
 2129|  8.54k|  olen = (osep ?
  ------------------
  |  Branch (2129:11): [True: 4, False: 8.54k]
  ------------------
 2130|      4|          (psep && psep > osep ? (size_t)(psep - osep) :
  ------------------
  |  Branch (2130:12): [True: 2, False: 2]
  |  Branch (2130:20): [True: 1, False: 1]
  ------------------
 2131|  8.54k|           (size_t)(login + len - osep)) - 1 : 0);
 2132|       |
 2133|       |  /* Clone the user portion buffer, which can be zero length */
 2134|  8.54k|  ubuf = curlx_memdup0(login, ulen);
 2135|  8.54k|  if(!ubuf)
  ------------------
  |  Branch (2135:6): [True: 0, False: 8.54k]
  ------------------
 2136|      0|    goto error;
 2137|       |
 2138|       |  /* Clone the password portion buffer */
 2139|  8.54k|  if(psep) {
  ------------------
  |  Branch (2139:6): [True: 690, False: 7.85k]
  ------------------
 2140|    690|    pbuf = curlx_memdup0(&psep[1], plen);
 2141|    690|    if(!pbuf)
  ------------------
  |  Branch (2141:8): [True: 0, False: 690]
  ------------------
 2142|      0|      goto error;
 2143|    690|  }
 2144|       |
 2145|       |  /* Allocate the options portion buffer */
 2146|  8.54k|  if(optionsp) {
  ------------------
  |  Branch (2146:6): [True: 4, False: 8.54k]
  ------------------
 2147|      4|    char *obuf = NULL;
 2148|      4|    if(olen) {
  ------------------
  |  Branch (2148:8): [True: 2, False: 2]
  ------------------
 2149|      2|      obuf = curlx_memdup0(&osep[1], olen);
 2150|      2|      if(!obuf)
  ------------------
  |  Branch (2150:10): [True: 0, False: 2]
  ------------------
 2151|      0|        goto error;
 2152|      2|    }
 2153|      4|    *optionsp = obuf;
 2154|      4|  }
 2155|  8.54k|  *userp = ubuf;
 2156|  8.54k|  *passwdp = pbuf;
 2157|  8.54k|  return CURLE_OK;
 2158|      0|error:
 2159|      0|  curlx_free(ubuf);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2160|      0|  curlx_free(pbuf);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2161|      0|  return CURLE_OUT_OF_MEMORY;
 2162|  8.54k|}
Curl_connect:
 2935|  23.2k|{
 2936|  23.2k|  CURLcode result;
 2937|  23.2k|  struct connectdata *conn;
 2938|       |
 2939|  23.2k|  *pconnected = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
 2940|       |
 2941|       |  /* Set the request to virgin state based on transfer settings */
 2942|  23.2k|  Curl_req_hard_reset(&data->req, data);
 2943|       |
 2944|       |  /* Get or create a connection for the transfer. */
 2945|  23.2k|  result = url_find_or_create_conn(data);
 2946|  23.2k|  conn = data->conn;
 2947|       |
 2948|  23.2k|  if(result)
  ------------------
  |  Branch (2948:6): [True: 1.96k, False: 21.3k]
  ------------------
 2949|  1.96k|    goto out;
 2950|       |
 2951|  21.3k|  DEBUGASSERT(conn);
  ------------------
  |  | 1081|  21.3k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2951:3): [True: 0, False: 21.3k]
  |  Branch (2951:3): [True: 21.3k, False: 0]
  ------------------
 2952|  21.3k|  Curl_pgrsTime(data, TIMER_POSTQUEUE);
 2953|  21.3k|  if(conn->bits.reuse) {
  ------------------
  |  Branch (2953:6): [True: 10.2k, False: 11.0k]
  ------------------
 2954|  10.2k|    if(conn->attached_xfers > 1)
  ------------------
  |  Branch (2954:8): [True: 0, False: 10.2k]
  ------------------
 2955|       |      /* multiplexed */
 2956|      0|      *pconnected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2957|  10.2k|  }
 2958|  11.0k|  else if(conn->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  11.0k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2958:11): [True: 0, False: 11.0k]
  ------------------
 2959|      0|    Curl_pgrsTime(data, TIMER_NAMELOOKUP);
 2960|      0|    *pconnected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2961|      0|  }
 2962|  11.0k|  else {
 2963|  11.0k|    result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  303|  11.0k|#define FIRSTSOCKET     0
  ------------------
                  result = Curl_conn_setup(data, conn, FIRSTSOCKET, CURL_CF_SSL_DEFAULT);
  ------------------
  |  |  363|  11.0k|#define CURL_CF_SSL_DEFAULT  (-1)
  ------------------
 2964|  11.0k|    if(!result)
  ------------------
  |  Branch (2964:8): [True: 11.0k, False: 0]
  ------------------
 2965|  11.0k|      result = Curl_headers_init(data);
 2966|  11.0k|    CURL_TRC_M(data, "Curl_conn_setup() -> %d", result);
  ------------------
  |  |  148|  11.0k|  do {                                   \
  |  |  149|  11.0k|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|  11.0k|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|  11.0k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|  22.0k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 11.0k, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 11.0k]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|  22.0k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|  11.0k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|  11.0k|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|  11.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
 2967|  11.0k|  }
 2968|       |
 2969|  23.2k|out:
 2970|  23.2k|  if(result == CURLE_NO_CONNECTION_AVAILABLE)
  ------------------
  |  Branch (2970:6): [True: 238, False: 23.0k]
  ------------------
 2971|  23.2k|    DEBUGASSERT(!conn);
  ------------------
  |  | 1081|  23.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2971:5): [True: 0, False: 238]
  |  Branch (2971:5): [True: 238, False: 0]
  ------------------
 2972|       |
 2973|  23.2k|  if(result && conn) {
  ------------------
  |  Branch (2973:6): [True: 1.96k, False: 21.3k]
  |  Branch (2973:16): [True: 0, False: 1.96k]
  ------------------
 2974|       |    /* We are not allowed to return failure with memory left allocated in the
 2975|       |       connectdata struct, free those here */
 2976|      0|    Curl_detach_connection(data);
 2977|      0|    Curl_conn_terminate(data, conn, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2978|      0|  }
 2979|       |
 2980|  23.2k|  return result;
 2981|  23.2k|}
Curl_init_do:
 2994|  21.3k|{
 2995|  21.3k|  CURLcode result;
 2996|       |
 2997|  21.3k|  if(conn) {
  ------------------
  |  Branch (2997:6): [True: 21.3k, False: 0]
  ------------------
 2998|  21.3k|    conn->bits.do_more = FALSE; /* by default there is no curl_do_more() to
  ------------------
  |  | 1058|  21.3k|#define FALSE false
  ------------------
 2999|       |                                   use */
 3000|       |    /* if the protocol used does not support wildcards, switch it off */
 3001|  21.3k|    if(data->state.wildcardmatch &&
  ------------------
  |  Branch (3001:8): [True: 3, False: 21.2k]
  ------------------
 3002|      3|       !(conn->scheme->flags & PROTOPT_WILDCARD))
  ------------------
  |  |  231|      3|#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
  ------------------
  |  Branch (3002:8): [True: 3, False: 0]
  ------------------
 3003|      3|      data->state.wildcardmatch = FALSE;
  ------------------
  |  | 1058|      3|#define FALSE false
  ------------------
 3004|  21.3k|  }
 3005|       |
 3006|  21.3k|  data->state.done = FALSE; /* *_done() is not called yet */
  ------------------
  |  | 1058|  21.3k|#define FALSE false
  ------------------
 3007|       |
 3008|  21.3k|  data->req.no_body = data->set.opt_no_body;
 3009|  21.3k|  if(data->req.no_body)
  ------------------
  |  Branch (3009:6): [True: 1.71k, False: 19.5k]
  ------------------
 3010|       |    /* in HTTP lingo, no body means using the HEAD request... */
 3011|  1.71k|    data->state.httpreq = HTTPREQ_HEAD;
 3012|       |
 3013|  21.3k|  result = Curl_req_start(&data->req, data);
 3014|  21.3k|  if(!result) {
  ------------------
  |  Branch (3014:6): [True: 21.3k, False: 0]
  ------------------
 3015|  21.3k|    Curl_pgrsReset(data);
 3016|  21.3k|  }
 3017|  21.3k|  return result;
 3018|  21.3k|}
Curl_data_priority_clear_state:
 3023|  12.4k|{
 3024|  12.4k|  memset(&data->state.priority, 0, sizeof(data->state.priority));
 3025|  12.4k|}
Curl_conn_meta_set:
 3031|  20.8k|{
 3032|  20.8k|  if(!Curl_hash_add2(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1,
  ------------------
  |  |  866|  20.8k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (3032:6): [True: 0, False: 20.8k]
  ------------------
 3033|  20.8k|                     meta_data, meta_dtor)) {
 3034|      0|    meta_dtor(CURL_UNCONST(key), strlen(key) + 1, meta_data);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3035|      0|    return CURLE_OUT_OF_MEMORY;
 3036|      0|  }
 3037|  20.8k|  return CURLE_OK;
 3038|  20.8k|}
Curl_conn_meta_remove:
 3041|  11.0k|{
 3042|  11.0k|  Curl_hash_delete(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  11.0k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3043|  11.0k|}
Curl_conn_meta_get:
 3046|  2.15M|{
 3047|  2.15M|  return Curl_hash_pick(&conn->meta_hash, CURL_UNCONST(key), strlen(key) + 1);
  ------------------
  |  |  866|  2.15M|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3048|  2.15M|}
Curl_1st_fatal:
 3051|  33.4k|{
 3052|  33.4k|  if(r1 && (r1 != CURLE_AGAIN))
  ------------------
  |  Branch (3052:6): [True: 21.1k, False: 12.2k]
  |  Branch (3052:12): [True: 21.1k, False: 0]
  ------------------
 3053|  21.1k|    return r1;
 3054|  12.2k|  if(r2 && (r2 != CURLE_AGAIN))
  ------------------
  |  Branch (3054:6): [True: 0, False: 12.2k]
  |  Branch (3054:12): [True: 0, False: 0]
  ------------------
 3055|      0|    return r2;
 3056|  12.2k|  return r1;
 3057|  12.2k|}
url.c:up_free:
  179|  56.4k|{
  180|  56.4k|  struct urlpieces *up = &data->state.up;
  181|  56.4k|  curlx_safefree(up->scheme);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  182|  56.4k|  curlx_safefree(up->hostname);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  183|  56.4k|  curlx_safefree(up->port);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  184|  56.4k|  curlx_safefree(up->user);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  185|  56.4k|  curlx_safefree(up->password);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  186|  56.4k|  curlx_safefree(up->options);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  187|  56.4k|  curlx_safefree(up->path);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  188|  56.4k|  curlx_safefree(up->query);
  ------------------
  |  | 1327|  56.4k|  do {                      \
  |  | 1328|  56.4k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  56.4k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  56.4k|    (ptr) = NULL;           \
  |  | 1330|  56.4k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 56.4k]
  |  |  ------------------
  ------------------
  189|  56.4k|  curl_url_cleanup(data->state.uh);
  190|       |  data->state.uh = NULL;
  191|  56.4k|}
url.c:conn_maxage:
  571|  10.2k|{
  572|  10.2k|  timediff_t age_ms;
  573|       |
  574|  10.2k|  if(data->set.conn_max_idle_ms) {
  ------------------
  |  Branch (574:6): [True: 10.2k, False: 10]
  ------------------
  575|  10.2k|    age_ms = curlx_ptimediff_ms(&now, &conn->lastused);
  576|  10.2k|    if(age_ms > data->set.conn_max_idle_ms) {
  ------------------
  |  Branch (576:8): [True: 0, False: 10.2k]
  ------------------
  577|      0|      infof(data, "Too old connection (%" FMT_TIMEDIFF_T
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  578|      0|            " ms idle, max idle is %" FMT_TIMEDIFF_T " ms), disconnect it",
  579|      0|            age_ms, data->set.conn_max_idle_ms);
  580|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  581|      0|    }
  582|  10.2k|  }
  583|       |
  584|  10.2k|  if(data->set.conn_max_age_ms) {
  ------------------
  |  Branch (584:6): [True: 10.1k, False: 99]
  ------------------
  585|  10.1k|    age_ms = curlx_ptimediff_ms(&now, &conn->created);
  586|  10.1k|    if(age_ms > data->set.conn_max_age_ms) {
  ------------------
  |  Branch (586:8): [True: 0, False: 10.1k]
  ------------------
  587|      0|      infof(data,
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  588|      0|            "Too old connection (created %" FMT_TIMEDIFF_T
  589|      0|            " ms ago, max lifetime is %" FMT_TIMEDIFF_T " ms), disconnect it",
  590|      0|            age_ms, data->set.conn_max_age_ms);
  591|      0|      return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  592|      0|    }
  593|  10.1k|  }
  594|       |
  595|  10.2k|  return FALSE;
  ------------------
  |  | 1058|  10.2k|#define FALSE false
  ------------------
  596|  10.2k|}
url.c:url_find_or_create_conn:
 2736|  23.2k|{
 2737|  23.2k|  struct connectdata *needle = NULL;
 2738|  23.2k|  bool waitpipe = FALSE;
  ------------------
  |  | 1058|  23.2k|#define FALSE false
  ------------------
 2739|  23.2k|  CURLcode result;
 2740|       |
 2741|       |  /* create the template connection for transfer data. Use this needle to
 2742|       |   * find an existing connection or, if none exists, convert needle
 2743|       |   * to a full connection and attach it to data. */
 2744|  23.2k|  result = url_create_needle(data, &needle);
 2745|  23.2k|  if(result)
  ------------------
  |  Branch (2745:6): [True: 1.72k, False: 21.5k]
  ------------------
 2746|  1.72k|    goto out;
 2747|  21.5k|  DEBUGASSERT(needle);
  ------------------
  |  | 1081|  21.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2747:3): [True: 0, False: 21.5k]
  |  Branch (2747:3): [True: 21.5k, False: 0]
  ------------------
 2748|       |
 2749|       |  /***********************************************************************
 2750|       |   * file: is a special case in that it does not need a network connection
 2751|       |   ***********************************************************************/
 2752|  21.5k|#ifndef CURL_DISABLE_FILE
 2753|  21.5k|  if(needle->scheme->flags & PROTOPT_NONETWORK) {
  ------------------
  |  |  215|  21.5k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (2753:6): [True: 0, False: 21.5k]
  ------------------
 2754|      0|    bool done;
 2755|       |    /* this is supposed to be the connect function so we better at least check
 2756|       |       that the file is present here! */
 2757|      0|    DEBUGASSERT(needle->scheme->run->connect_it);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2757:5): [True: 0, False: 0]
  |  Branch (2757:5): [True: 0, False: 0]
  ------------------
 2758|      0|    data->info.conn_scheme = needle->scheme->name;
 2759|       |    /* conn_protocol can only provide "old" protocols */
 2760|      0|    data->info.conn_protocol = (needle->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|      0|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2761|      0|    result = needle->scheme->run->connect_it(data, &done);
 2762|      0|    if(result)
  ------------------
  |  Branch (2762:8): [True: 0, False: 0]
  ------------------
 2763|      0|      goto out;
 2764|       |
 2765|       |    /* Setup a "faked" transfer that will do nothing */
 2766|      0|    Curl_attach_connection(data, needle);
 2767|      0|    needle = NULL;
 2768|      0|    result = Curl_cpool_add(data, data->conn);
 2769|      0|    if(!result) {
  ------------------
  |  Branch (2769:8): [True: 0, False: 0]
  ------------------
 2770|       |      /* Setup whatever necessary for a resumed transfer */
 2771|      0|      result = setup_range(data);
 2772|      0|      if(!result) {
  ------------------
  |  Branch (2772:10): [True: 0, False: 0]
  ------------------
 2773|      0|        Curl_xfer_setup_nop(data);
 2774|      0|        result = Curl_init_do(data, data->conn);
 2775|      0|      }
 2776|      0|    }
 2777|       |
 2778|      0|    if(result) {
  ------------------
  |  Branch (2778:8): [True: 0, False: 0]
  ------------------
 2779|      0|      DEBUGASSERT(data->conn->scheme->run->done);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2779:7): [True: 0, False: 0]
  |  Branch (2779:7): [True: 0, False: 0]
  ------------------
 2780|       |      /* we ignore the return code for the protocol-specific DONE */
 2781|      0|      (void)data->conn->scheme->run->done(data, result, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2782|      0|    }
 2783|      0|    goto out;
 2784|      0|  }
 2785|  21.5k|#endif
 2786|       |
 2787|       |  /* Complete the easy's SSL configuration for connection cache matching */
 2788|  21.5k|  result = Curl_ssl_easy_config_complete(data);
 2789|  21.5k|  if(result)
  ------------------
  |  Branch (2789:6): [True: 0, False: 21.5k]
  ------------------
 2790|      0|    goto out;
 2791|       |
 2792|       |  /* Get rid of any dead connections so limit are easier kept. */
 2793|  21.5k|  Curl_cpool_prune_dead(data);
 2794|       |
 2795|       |  /*************************************************************
 2796|       |   * Reuse of existing connection is not allowed when
 2797|       |   * - connect_only is set or
 2798|       |   * - reuse_fresh is set and this is not a follow-up request
 2799|       |   *   (like with HTTP followlocation)
 2800|       |   *************************************************************/
 2801|  21.5k|  if((!data->set.reuse_fresh || data->state.followlocation) &&
  ------------------
  |  Branch (2801:7): [True: 21.4k, False: 63]
  |  Branch (2801:33): [True: 54, False: 9]
  ------------------
 2802|  21.5k|     !data->set.connect_only) {
  ------------------
  |  Branch (2802:6): [True: 21.4k, False: 67]
  ------------------
 2803|       |    /* Ok, try to find and attach an existing one */
 2804|  21.4k|    url_attach_existing(data, needle, &waitpipe);
 2805|  21.4k|  }
 2806|       |
 2807|  21.5k|  if(data->conn) {
  ------------------
  |  Branch (2807:6): [True: 10.2k, False: 11.2k]
  ------------------
 2808|       |    /* We attached an existing connection for this transfer. Copy
 2809|       |     * over transfer specific properties over from needle. */
 2810|  10.2k|    struct connectdata *conn = data->conn;
 2811|  10.2k|    VERBOSE(bool tls_upgraded = (!(needle->given->flags & PROTOPT_SSL) &&
  ------------------
  |  | 1618|  30.8k|#define VERBOSE(x) x
  |  |  ------------------
  |  |  |  Branch (1618:20): [True: 10.2k, False: 0]
  |  |  |  Branch (1618:20): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
 2812|  10.2k|                                 Curl_conn_is_ssl(conn, FIRSTSOCKET)));
 2813|       |
 2814|  10.2k|    conn->bits.reuse = TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
 2815|  10.2k|    url_conn_reuse_adjust(data, needle);
 2816|       |
 2817|  10.2k|#ifndef CURL_DISABLE_PROXY
 2818|  10.2k|    infof(data, "Reusing existing %s: connection%s with %s %s",
  ------------------
  |  |  143|  10.2k|  do {                               \
  |  |  144|  10.2k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  10.2k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 10.2k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 10.2k]
  |  |  |  |  ------------------
  |  |  |  |  320|  10.2k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  10.2k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  10.2k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 10.2k]
  |  |  ------------------
  ------------------
 2819|  10.2k|          conn->given->name,
 2820|  10.2k|          tls_upgraded ? " (upgraded to SSL)" : "",
 2821|  10.2k|          conn->bits.proxy ? "proxy" : "host",
 2822|  10.2k|          conn->socks_proxy.peer ? conn->socks_proxy.peer->user_hostname :
 2823|  10.2k|          conn->http_proxy.peer ? conn->http_proxy.peer->user_hostname :
 2824|  10.2k|          conn->origin->hostname);
 2825|       |#else
 2826|       |    infof(data, "Reusing existing %s: connection%s with host %s",
 2827|       |          conn->given->name,
 2828|       |          tls_upgraded ? " (upgraded to SSL)" : "",
 2829|       |          conn->origin->hostname);
 2830|       |#endif
 2831|  10.2k|  }
 2832|  11.2k|  else {
 2833|       |    /* We have decided that we want a new connection. We may not be able to do
 2834|       |       that if we have reached the limit of how many connections we are
 2835|       |       allowed to open. */
 2836|  11.2k|    DEBUGF(infof(data, "new connection, bits.close=%d", needle->bits.close));
  ------------------
  |  | 1067|  78.8k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 11.2k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 11.2k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 11.2k]
  |  |  ------------------
  ------------------
 2837|       |
 2838|  11.2k|    if(waitpipe) {
  ------------------
  |  Branch (2838:8): [True: 238, False: 11.0k]
  ------------------
 2839|       |      /* There is a connection that *might* become usable for multiplexing
 2840|       |         "soon", and we wait for that */
 2841|    238|      infof(data, "Waiting on connection to negotiate possible multiplexing.");
  ------------------
  |  |  143|    238|  do {                               \
  |  |  144|    238|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    238|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 238, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 238]
  |  |  |  |  ------------------
  |  |  |  |  320|    238|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    238|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    238|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 238]
  |  |  ------------------
  ------------------
 2842|    238|      result = CURLE_NO_CONNECTION_AVAILABLE;
 2843|    238|      goto out;
 2844|    238|    }
 2845|  11.0k|    else {
 2846|  11.0k|      switch(Curl_cpool_check_limits(data, needle)) {
 2847|      0|      case CPOOL_LIMIT_DEST:
  ------------------
  |  |   91|      0|#define CPOOL_LIMIT_DEST   1
  ------------------
  |  Branch (2847:7): [True: 0, False: 11.0k]
  ------------------
 2848|      0|        infof(data, "No more connections allowed to host");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2849|      0|        result = CURLE_NO_CONNECTION_AVAILABLE;
 2850|      0|        goto out;
 2851|      0|      case CPOOL_LIMIT_TOTAL:
  ------------------
  |  |   92|      0|#define CPOOL_LIMIT_TOTAL  2
  ------------------
  |  Branch (2851:7): [True: 0, False: 11.0k]
  ------------------
 2852|      0|        if(data->master_mid != UINT32_MAX)
  ------------------
  |  Branch (2852:12): [True: 0, False: 0]
  ------------------
 2853|      0|          CURL_TRC_M(data, "Allowing sub-requests (like DoH) to override "
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2854|      0|                     "max connection limit");
 2855|      0|        else {
 2856|      0|          infof(data, "No connections available, total of %zu reached.",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2857|      0|                data->multi->max_total_connections);
 2858|      0|          result = CURLE_NO_CONNECTION_AVAILABLE;
 2859|      0|          goto out;
 2860|      0|        }
 2861|      0|        break;
 2862|  11.0k|      default:
  ------------------
  |  Branch (2862:7): [True: 11.0k, False: 0]
  ------------------
 2863|  11.0k|        break;
 2864|  11.0k|      }
 2865|  11.0k|    }
 2866|       |
 2867|       |    /* Convert needle into a full connection by filling in all the
 2868|       |     * remaining parts like the cloned SSL configuration. */
 2869|  11.0k|    result = Curl_ssl_conn_config_init(data, needle);
 2870|  11.0k|    if(result) {
  ------------------
  |  Branch (2870:8): [True: 0, False: 11.0k]
  ------------------
 2871|      0|      DEBUGF(curl_mfprintf(stderr, "Error: init connection SSL config\n"));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  ------------------
 2872|      0|      goto out;
 2873|      0|    }
 2874|       |    /* attach it and no longer own it */
 2875|  11.0k|    Curl_attach_connection(data, needle);
 2876|  11.0k|    needle = NULL;
 2877|       |
 2878|  11.0k|    result = Curl_cpool_add(data, data->conn);
 2879|  11.0k|    if(result)
  ------------------
  |  Branch (2879:8): [True: 0, False: 11.0k]
  ------------------
 2880|      0|      goto out;
 2881|       |
 2882|       |#ifdef USE_NTLM
 2883|       |    /* If NTLM is requested in a part of this connection, make sure we do not
 2884|       |       assume the state is fine as this is a fresh connection and NTLM is
 2885|       |       connection based. */
 2886|       |    if((data->state.authhost.picked & CURLAUTH_NTLM) &&
 2887|       |       data->state.authhost.done) {
 2888|       |      infof(data, "NTLM picked AND auth done set, clear picked");
 2889|       |      data->state.authhost.picked = CURLAUTH_NONE;
 2890|       |      data->state.authhost.done = FALSE;
 2891|       |    }
 2892|       |
 2893|       |    if((data->state.authproxy.picked & CURLAUTH_NTLM) &&
 2894|       |       data->state.authproxy.done) {
 2895|       |      infof(data, "NTLM-proxy picked AND auth done set, clear picked");
 2896|       |      data->state.authproxy.picked = CURLAUTH_NONE;
 2897|       |      data->state.authproxy.done = FALSE;
 2898|       |    }
 2899|       |#endif
 2900|  11.0k|  }
 2901|       |
 2902|       |  /* Setup and init stuff before DO starts, in preparing for the transfer. */
 2903|  21.3k|  result = Curl_init_do(data, data->conn);
 2904|  21.3k|  if(result)
  ------------------
  |  Branch (2904:6): [True: 0, False: 21.3k]
  ------------------
 2905|      0|    goto out;
 2906|       |
 2907|       |  /* Setup whatever necessary for a resumed transfer */
 2908|  21.3k|  result = setup_range(data);
 2909|  21.3k|  if(result)
  ------------------
  |  Branch (2909:6): [True: 0, False: 21.3k]
  ------------------
 2910|      0|    goto out;
 2911|       |
 2912|       |  /* persist the scheme and handler the transfer is using */
 2913|  21.3k|  data->info.conn_scheme = data->conn->scheme->name;
 2914|       |  /* conn_protocol can only provide "old" protocols */
 2915|  21.3k|  data->info.conn_protocol = (data->conn->scheme->protocol) & CURLPROTO_MASK;
  ------------------
  |  |   79|  21.3k|#define CURLPROTO_MASK   0x3fffffff
  ------------------
 2916|  21.3k|  data->info.used_proxy =
 2917|       |#ifdef CURL_DISABLE_PROXY
 2918|       |    0
 2919|       |#else
 2920|  21.3k|    data->conn->bits.proxy
 2921|  21.3k|#endif
 2922|  21.3k|    ;
 2923|       |
 2924|       |  /* Lastly, inform connection filters that a new transfer is attached */
 2925|  21.3k|  result = Curl_conn_ev_data_setup(data);
 2926|       |
 2927|  23.2k|out:
 2928|  23.2k|  if(needle)
  ------------------
  |  Branch (2928:6): [True: 10.5k, False: 12.7k]
  ------------------
 2929|  10.5k|    Curl_conn_free(data, needle);
 2930|  23.2k|  DEBUGASSERT(result || data->conn);
  ------------------
  |  | 1081|  23.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2930:3): [True: 23.2k, False: 0]
  |  Branch (2930:3): [True: 0, False: 0]
  |  Branch (2930:3): [True: 1.96k, False: 21.3k]
  |  Branch (2930:3): [True: 21.3k, False: 0]
  ------------------
 2931|  23.2k|  return result;
 2932|  23.2k|}
url.c:url_create_needle:
 2575|  23.2k|{
 2576|  23.2k|  struct connectdata *needle = NULL;
 2577|  23.2k|  CURLcode result = CURLE_OK;
 2578|  23.2k|  bool network_scheme = TRUE; /* almost all are */
  ------------------
  |  | 1055|  23.2k|#define TRUE true
  ------------------
 2579|       |
 2580|       |  /*************************************************************
 2581|       |   * Check input data
 2582|       |   *************************************************************/
 2583|  23.2k|  if(!Curl_bufref_ptr(&data->state.url)) {
  ------------------
  |  Branch (2583:6): [True: 0, False: 23.2k]
  ------------------
 2584|      0|    result = CURLE_URL_MALFORMAT;
 2585|      0|    goto out;
 2586|      0|  }
 2587|       |
 2588|       |  /* First, split up the current URL in parts so that we can use the
 2589|       |     parts for checking against the already present connections. In order
 2590|       |     to not have to modify everything at once, we allocate a temporary
 2591|       |     connection data struct and fill in for comparison purposes. */
 2592|  23.2k|  needle = allocate_conn(data);
 2593|  23.2k|  if(!needle) {
  ------------------
  |  Branch (2593:6): [True: 0, False: 23.2k]
  ------------------
 2594|      0|    result = CURLE_OUT_OF_MEMORY;
 2595|      0|    goto out;
 2596|      0|  }
 2597|       |
 2598|       |  /* Do the unfailable inits first, before checks that may early return */
 2599|  23.2k|  Curl_hash_init(&needle->meta_hash, 23,
 2600|  23.2k|                 Curl_hash_str, curlx_str_key_compare, conn_meta_freeentry);
 2601|       |
 2602|       |  /*************************************************************
 2603|       |   * Determine `conn->origin` and propulate `data->state.up` and
 2604|       |   * other URL related properties.
 2605|       |   *************************************************************/
 2606|  23.2k|  result = parseurlandfillconn(data, needle);
 2607|  23.2k|  if(result)
  ------------------
  |  Branch (2607:6): [True: 1.70k, False: 21.5k]
  ------------------
 2608|  1.70k|    goto out;
 2609|  21.5k|  DEBUGASSERT(needle->origin);
  ------------------
  |  | 1081|  21.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2609:3): [True: 0, False: 21.5k]
  |  Branch (2609:3): [True: 21.5k, False: 0]
  ------------------
 2610|  21.5k|  network_scheme = !(needle->origin->scheme->flags & PROTOPT_NONETWORK);
  ------------------
  |  |  215|  21.5k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
 2611|       |
 2612|  21.5k|#ifdef USE_UNIX_SOCKETS
 2613|       |  /*************************************************************
 2614|       |   * Set UDS first. It overrides "via_peer" and proxy settings.
 2615|       |   *************************************************************/
 2616|  21.5k|  if(network_scheme && data->set.str[STRING_UNIX_SOCKET_PATH]) {
  ------------------
  |  Branch (2616:6): [True: 21.5k, False: 0]
  |  Branch (2616:24): [True: 4.01k, False: 17.5k]
  ------------------
 2617|  4.01k|    result = Curl_peer_uds_create(needle->origin->scheme,
 2618|  4.01k|                                  data->set.str[STRING_UNIX_SOCKET_PATH],
 2619|  4.01k|                                  (bool)data->set.abstract_unix_socket,
 2620|  4.01k|                                  &needle->via_peer);
 2621|  4.01k|    if(result)
  ------------------
  |  Branch (2621:8): [True: 1, False: 4.01k]
  ------------------
 2622|      1|      goto out;
 2623|  4.01k|  }
 2624|  21.5k|#endif /* USE_UNIX_SOCKETS */
 2625|       |
 2626|  21.5k|  if(network_scheme && !needle->via_peer) {
  ------------------
  |  Branch (2626:6): [True: 21.5k, False: 0]
  |  Branch (2626:24): [True: 17.5k, False: 4.01k]
  ------------------
 2627|       |    /*************************************************************
 2628|       |     * If the `via_peer` is not already set (via UDS above),
 2629|       |     * determine if we talk to `conn->origin` directly or use
 2630|       |     * `conn->via_peer` using "connect to" and "alt-svc" properties.
 2631|       |     *************************************************************/
 2632|  17.5k|    result = url_set_conn_peer(data, needle);
 2633|  17.5k|    if(result)
  ------------------
  |  Branch (2633:8): [True: 0, False: 17.5k]
  ------------------
 2634|      0|      goto out;
 2635|  17.5k|  }
 2636|       |
 2637|  21.5k|#ifndef CURL_DISABLE_PROXY
 2638|       |  /* Going via a unix socket ignores any proxy settings */
 2639|  21.5k|  if(needle->via_peer && needle->via_peer->unix_socket) {
  ------------------
  |  Branch (2639:6): [True: 20.9k, False: 660]
  |  Branch (2639:26): [True: 4.01k, False: 16.8k]
  ------------------
 2640|  4.01k|    needle->bits.socksproxy = FALSE;
  ------------------
  |  | 1058|  4.01k|#define FALSE false
  ------------------
 2641|  4.01k|    needle->bits.httpproxy = FALSE;
  ------------------
  |  | 1058|  4.01k|#define FALSE false
  ------------------
 2642|  4.01k|    needle->bits.proxy = FALSE;
  ------------------
  |  | 1058|  4.01k|#define FALSE false
  ------------------
 2643|  4.01k|  }
 2644|  17.5k|  else if(network_scheme) {
  ------------------
  |  Branch (2644:11): [True: 17.5k, False: 0]
  ------------------
 2645|  17.5k|    result = url_set_conn_proxies(data, needle);
 2646|  17.5k|    if(result)
  ------------------
  |  Branch (2646:8): [True: 21, False: 17.5k]
  ------------------
 2647|     21|      goto out;
 2648|       |
 2649|       |    /*************************************************************
 2650|       |     * If the protocol is using SSL and HTTP proxy is used, we set
 2651|       |     * the tunnel_proxy bit.
 2652|       |     *************************************************************/
 2653|  17.5k|    if((needle->given->flags & PROTOPT_SSL) && needle->bits.httpproxy)
  ------------------
  |  |  207|  17.5k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (2653:8): [True: 651, False: 16.8k]
  |  Branch (2653:48): [True: 0, False: 651]
  ------------------
 2654|      0|      needle->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2655|  17.5k|  }
 2656|  21.5k|#endif /* CURL_DISABLE_PROXY */
 2657|       |
 2658|       |  /* Check for overridden login details and set them accordingly so that
 2659|       |     they are known when protocol->setup_connection is called! */
 2660|  21.5k|  result = override_login(data, needle);
 2661|  21.5k|  if(result)
  ------------------
  |  Branch (2661:6): [True: 0, False: 21.5k]
  ------------------
 2662|      0|    goto out;
 2663|       |
 2664|  21.5k|  result = url_set_conn_login(data, needle); /* default credentials */
 2665|  21.5k|  if(result)
  ------------------
  |  Branch (2665:6): [True: 0, False: 21.5k]
  ------------------
 2666|      0|    goto out;
 2667|       |
 2668|       |  /*************************************************************
 2669|       |   * Check whether the host and the "connect to host" are equal.
 2670|       |   * Do this after the hostnames have been IDN-converted.
 2671|       |   *************************************************************/
 2672|  21.5k|  if(Curl_peer_equal(needle->origin, needle->via_peer)) {
  ------------------
  |  Branch (2672:6): [True: 18, False: 21.5k]
  ------------------
 2673|     18|    Curl_peer_unlink(&needle->via_peer);
 2674|     18|  }
 2675|       |
 2676|  21.5k|#ifndef CURL_DISABLE_PROXY
 2677|       |  /*************************************************************
 2678|       |   * If the "connect to" feature is used with an HTTP proxy,
 2679|       |   * we set the tunnel_proxy bit.
 2680|       |   *************************************************************/
 2681|  21.5k|  if(needle->via_peer && needle->bits.httpproxy)
  ------------------
  |  Branch (2681:6): [True: 20.8k, False: 678]
  |  Branch (2681:26): [True: 3.09k, False: 17.7k]
  ------------------
 2682|  3.09k|    needle->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|  3.09k|#define TRUE true
  ------------------
 2683|  21.5k|#endif
 2684|       |
 2685|       |  /*************************************************************
 2686|       |   * Setup internals depending on protocol. Needs to be done after
 2687|       |   * we figured out what/if proxy to use.
 2688|       |   *************************************************************/
 2689|  21.5k|  result = setup_connection_internals(data, needle);
 2690|  21.5k|  if(result)
  ------------------
  |  Branch (2690:6): [True: 0, False: 21.5k]
  ------------------
 2691|      0|    goto out;
 2692|       |
 2693|  21.5k|  if(needle->scheme->flags & PROTOPT_ALPN) {
  ------------------
  |  |  223|  21.5k|#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
  ------------------
  |  Branch (2693:6): [True: 651, False: 20.8k]
  ------------------
 2694|       |    /* The protocol wants it, so set the bits if enabled in the easy handle
 2695|       |       (default) */
 2696|    651|    if(data->set.ssl_enable_alpn)
  ------------------
  |  Branch (2696:8): [True: 651, False: 0]
  ------------------
 2697|    651|      needle->bits.tls_enable_alpn = TRUE;
  ------------------
  |  | 1055|    651|#define TRUE true
  ------------------
 2698|    651|  }
 2699|       |
 2700|  21.5k|  if(network_scheme) {
  ------------------
  |  Branch (2700:6): [True: 21.5k, False: 0]
  ------------------
 2701|       |    /* Setup callbacks for network connections */
 2702|  21.5k|    needle->recv[FIRSTSOCKET] = Curl_cf_recv;
  ------------------
  |  |  303|  21.5k|#define FIRSTSOCKET     0
  ------------------
 2703|  21.5k|    needle->send[FIRSTSOCKET] = Curl_cf_send;
  ------------------
  |  |  303|  21.5k|#define FIRSTSOCKET     0
  ------------------
 2704|  21.5k|    needle->recv[SECONDARYSOCKET] = Curl_cf_recv;
  ------------------
  |  |  304|  21.5k|#define SECONDARYSOCKET 1
  ------------------
 2705|  21.5k|    needle->send[SECONDARYSOCKET] = Curl_cf_send;
  ------------------
  |  |  304|  21.5k|#define SECONDARYSOCKET 1
  ------------------
 2706|  21.5k|    needle->bits.tcp_fastopen = data->set.tcp_fastopen;
 2707|  21.5k|#ifdef USE_UNIX_SOCKETS
 2708|  21.5k|    if(Curl_conn_get_first_peer(needle, FIRSTSOCKET)->unix_socket)
  ------------------
  |  |  303|  21.5k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (2708:8): [True: 4.01k, False: 17.5k]
  ------------------
 2709|  4.01k|      needle->transport_wanted = TRNSPRT_UNIX;
  ------------------
  |  |  310|  4.01k|#define TRNSPRT_UNIX 6
  ------------------
 2710|  21.5k|#endif
 2711|  21.5k|  }
 2712|       |
 2713|  23.2k|out:
 2714|  23.2k|  if(!result) {
  ------------------
  |  Branch (2714:6): [True: 21.5k, False: 1.72k]
  ------------------
 2715|  21.5k|    DEBUGASSERT(needle);
  ------------------
  |  | 1081|  21.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2715:5): [True: 0, False: 21.5k]
  |  Branch (2715:5): [True: 21.5k, False: 0]
  ------------------
 2716|  21.5k|    DEBUGASSERT(needle->origin);
  ------------------
  |  | 1081|  21.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2716:5): [True: 0, False: 21.5k]
  |  Branch (2716:5): [True: 21.5k, False: 0]
  ------------------
 2717|  21.5k|    *pneedle = needle;
 2718|  21.5k|  }
 2719|  1.72k|  else {
 2720|  1.72k|    *pneedle = NULL;
 2721|  1.72k|    if(needle)
  ------------------
  |  Branch (2721:8): [True: 1.72k, False: 0]
  ------------------
 2722|  1.72k|      Curl_conn_free(data, needle);
 2723|  1.72k|  }
 2724|  23.2k|  return result;
 2725|  23.2k|}
url.c:allocate_conn:
 1272|  23.2k|{
 1273|  23.2k|  struct connectdata *conn = curlx_calloc(1, sizeof(struct connectdata));
  ------------------
  |  | 1480|  23.2k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1274|  23.2k|  if(!conn)
  ------------------
  |  Branch (1274:6): [True: 0, False: 23.2k]
  ------------------
 1275|      0|    return NULL;
 1276|       |
 1277|       |  /* and we setup a few fields in case we end up actually using this struct */
 1278|       |
 1279|  23.2k|  conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  303|  23.2k|#define FIRSTSOCKET     0
  ------------------
                conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD;     /* no file descriptor */
  ------------------
  |  |  145|  23.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1280|  23.2k|  conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  304|  23.2k|#define SECONDARYSOCKET 1
  ------------------
                conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
  ------------------
  |  |  145|  23.2k|#define CURL_SOCKET_BAD (-1)
  ------------------
 1281|  23.2k|  conn->recv_idx = 0; /* default for receiving transfer data */
 1282|  23.2k|  conn->send_idx = 0; /* default for sending transfer data */
 1283|  23.2k|  conn->connection_id = -1;    /* no ID */
 1284|  23.2k|  conn->attached_xfers = 0;
 1285|       |
 1286|       |  /* Store creation time to help future close decision making */
 1287|  23.2k|  conn->created = *Curl_pgrs_now(data);
 1288|       |
 1289|       |  /* Store current time to give a baseline to keepalive connection times. */
 1290|  23.2k|  conn->keepalive = conn->created;
 1291|       |
 1292|  23.2k|#ifndef CURL_DISABLE_PROXY
 1293|  23.2k|  conn->http_proxy.proxytype = data->set.proxytype;
 1294|  23.2k|  conn->socks_proxy.proxytype = CURLPROXY_SOCKS4;
  ------------------
  |  |  798|  23.2k|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
 1295|       |
 1296|       |  /* note that these two proxy bits are set on what looks to be
 1297|       |     requested, they may be altered down the road */
 1298|  23.2k|  conn->bits.proxy = (data->set.str[STRING_PROXY] &&
  ------------------
  |  Branch (1298:23): [True: 4.53k, False: 18.7k]
  ------------------
 1299|  4.53k|                      *data->set.str[STRING_PROXY]);
  ------------------
  |  Branch (1299:23): [True: 3.58k, False: 951]
  ------------------
 1300|  23.2k|  conn->bits.httpproxy = (conn->bits.proxy &&
  ------------------
  |  Branch (1300:27): [True: 3.58k, False: 19.6k]
  ------------------
 1301|  3.58k|                          (conn->http_proxy.proxytype == CURLPROXY_HTTP ||
  ------------------
  |  |  790|  7.16k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (1301:28): [True: 1.41k, False: 2.17k]
  ------------------
 1302|  2.17k|                           conn->http_proxy.proxytype == CURLPROXY_HTTP_1_0 ||
  ------------------
  |  |  792|  5.75k|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (1302:28): [True: 2, False: 2.16k]
  ------------------
 1303|  2.16k|                           IS_HTTPS_PROXY(conn->http_proxy.proxytype)));
  ------------------
  |  |   80|  2.16k|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|  2.16k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (80:4): [True: 832, False: 1.33k]
  |  |  ------------------
  |  |   81|  2.16k|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|  1.33k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (81:4): [True: 1.29k, False: 40]
  |  |  ------------------
  |  |   82|  2.16k|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|     40|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 0, False: 40]
  |  |  ------------------
  ------------------
 1304|  23.2k|  conn->bits.socksproxy = (conn->bits.proxy && !conn->bits.httpproxy);
  ------------------
  |  Branch (1304:28): [True: 3.58k, False: 19.6k]
  |  Branch (1304:48): [True: 40, False: 3.54k]
  ------------------
 1305|       |
 1306|  23.2k|  if(data->set.str[STRING_PRE_PROXY] && *data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (1306:6): [True: 1.95k, False: 21.3k]
  |  Branch (1306:41): [True: 469, False: 1.48k]
  ------------------
 1307|    469|    conn->bits.proxy = TRUE;
  ------------------
  |  | 1055|    469|#define TRUE true
  ------------------
 1308|    469|    conn->bits.socksproxy = TRUE;
  ------------------
  |  | 1055|    469|#define TRUE true
  ------------------
 1309|    469|  }
 1310|       |
 1311|  23.2k|  conn->bits.tunnel_proxy = data->set.tunnel_thru_httpproxy;
 1312|  23.2k|#endif /* CURL_DISABLE_PROXY */
 1313|       |
 1314|  23.2k|#ifndef CURL_DISABLE_FTP
 1315|  23.2k|  conn->bits.ftp_use_epsv = data->set.ftp_use_epsv;
 1316|  23.2k|  conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
 1317|  23.2k|#endif
 1318|  23.2k|  conn->ip_version = data->set.ipver;
 1319|  23.2k|  conn->bits.connect_only = (bool)data->set.connect_only;
 1320|  23.2k|  conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
  ------------------
  |  |  307|  23.2k|#define TRNSPRT_TCP  3
  ------------------
 1321|       |
 1322|       |  /* Store the local bind parameters that will be used for this connection */
 1323|  23.2k|  if(data->set.str[STRING_DEVICE]) {
  ------------------
  |  Branch (1323:6): [True: 1.22k, False: 22.0k]
  ------------------
 1324|  1.22k|    conn->localdev = curlx_strdup(data->set.str[STRING_DEVICE]);
  ------------------
  |  | 1477|  1.22k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1325|  1.22k|    if(!conn->localdev)
  ------------------
  |  Branch (1325:8): [True: 0, False: 1.22k]
  ------------------
 1326|      0|      goto error;
 1327|  1.22k|  }
 1328|  23.2k|#ifndef CURL_DISABLE_BINDLOCAL
 1329|  23.2k|  conn->localportrange = data->set.localportrange;
 1330|  23.2k|  conn->localport = data->set.localport;
 1331|  23.2k|#endif
 1332|       |
 1333|       |  /* the close socket stuff needs to be copied to the connection struct as
 1334|       |     it may live on without (this specific) Curl_easy */
 1335|  23.2k|  conn->fclosesocket = data->set.fclosesocket;
 1336|  23.2k|  conn->closesocket_client = data->set.closesocket_client;
 1337|  23.2k|  conn->lastused = conn->created;
 1338|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
 1339|       |  conn->gssapi_delegation = data->set.gssapi_delegation;
 1340|       |#endif
 1341|  23.2k|  DEBUGF(infof(data, "alloc connection, bits.close=%d", conn->bits.close));
  ------------------
  |  | 1067|   162k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 23.2k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 23.2k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 23.2k]
  |  |  ------------------
  ------------------
 1342|  23.2k|  return conn;
 1343|      0|error:
 1344|       |
 1345|      0|  curlx_free(conn->localdev);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1346|      0|  curlx_free(conn);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1347|       |  return NULL;
 1348|  23.2k|}
url.c:parseurlandfillconn:
 1492|  23.2k|{
 1493|  23.2k|  CURLcode result = CURLE_OK;
 1494|  23.2k|  CURLU *uh;
 1495|  23.2k|  CURLUcode uc;
 1496|  23.2k|  bool use_set_uh = (data->set.uh && !data->state.this_is_a_follow);
  ------------------
  |  Branch (1496:22): [True: 0, False: 23.2k]
  |  Branch (1496:38): [True: 0, False: 0]
  ------------------
 1497|  23.2k|  uint16_t port_override = data->state.allow_port ? data->set.use_port : 0;
  ------------------
  |  Branch (1497:28): [True: 23.2k, False: 45]
  ------------------
 1498|  23.2k|  uint32_t scope_id = 0;
 1499|       |
 1500|  23.2k|  up_free(data); /* cleanup previous leftovers first */
 1501|       |
 1502|       |  /* parse the URL */
 1503|  23.2k|  if(use_set_uh)
  ------------------
  |  Branch (1503:6): [True: 0, False: 23.2k]
  ------------------
 1504|      0|    uh = data->state.uh = curl_url_dup(data->set.uh);
 1505|  23.2k|  else
 1506|  23.2k|    uh = data->state.uh = curl_url();
 1507|  23.2k|  if(!uh) {
  ------------------
  |  Branch (1507:6): [True: 0, False: 23.2k]
  ------------------
 1508|      0|    result = CURLE_OUT_OF_MEMORY;
 1509|      0|    goto out;
 1510|      0|  }
 1511|       |
 1512|       |  /* Calculate the *real* URL this transfer uses, applying defaults
 1513|       |   * where information is missing. */
 1514|  23.2k|  if(data->set.str[STRING_DEFAULT_PROTOCOL] &&
  ------------------
  |  Branch (1514:6): [True: 7.65k, False: 15.6k]
  ------------------
 1515|  7.65k|     !Curl_is_absolute_url(Curl_bufref_ptr(&data->state.url), NULL, 0, TRUE)) {
  ------------------
  |  | 1055|  7.65k|#define TRUE true
  ------------------
  |  Branch (1515:6): [True: 702, False: 6.95k]
  ------------------
 1516|    702|    char *url = curl_maprintf("%s://%s",
 1517|    702|                              data->set.str[STRING_DEFAULT_PROTOCOL],
 1518|    702|                              Curl_bufref_ptr(&data->state.url));
 1519|    702|    if(!url) {
  ------------------
  |  Branch (1519:8): [True: 0, False: 702]
  ------------------
 1520|      0|      result = CURLE_OUT_OF_MEMORY;
 1521|      0|      goto out;
 1522|      0|    }
 1523|    702|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1524|    702|  }
 1525|       |
 1526|  23.2k|  if(!use_set_uh) {
  ------------------
  |  Branch (1526:6): [True: 23.2k, False: 0]
  ------------------
 1527|  23.2k|    char *newurl;
 1528|  23.2k|    uc = curl_url_set(uh, CURLUPART_URL, Curl_bufref_ptr(&data->state.url),
 1529|  23.2k|                      (unsigned int)(CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  23.2k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1530|  23.2k|                       CURLU_NON_SUPPORT_SCHEME |
  ------------------
  |  |   90|  23.2k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
 1531|  23.2k|                       (data->set.disallow_username_in_url ?
  ------------------
  |  Branch (1531:25): [True: 1, False: 23.2k]
  ------------------
 1532|  23.2k|                        CURLU_DISALLOW_USER : 0) |
  ------------------
  |  |   92|      1|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
 1533|  23.2k|                       (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)));
  ------------------
  |  |   91|  4.69k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1533:25): [True: 4.69k, False: 18.5k]
  ------------------
 1534|  23.2k|    if(uc) {
  ------------------
  |  Branch (1534:8): [True: 767, False: 22.4k]
  ------------------
 1535|    767|      failf(data, "URL rejected: %s", curl_url_strerror(uc));
  ------------------
  |  |   62|    767|#define failf Curl_failf
  ------------------
 1536|    767|      result = Curl_uc_to_curlcode(uc);
 1537|    767|      goto out;
 1538|    767|    }
 1539|       |
 1540|       |    /* after it was parsed, get the generated normalized version */
 1541|  22.4k|    uc = curl_url_get(uh, CURLUPART_URL, &newurl, CURLU_GET_EMPTY);
  ------------------
  |  |  102|  22.4k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 1542|  22.4k|    if(uc) {
  ------------------
  |  Branch (1542:8): [True: 0, False: 22.4k]
  ------------------
 1543|      0|      result = Curl_uc_to_curlcode(uc);
 1544|      0|      goto out;
 1545|      0|    }
 1546|  22.4k|    Curl_bufref_set(&data->state.url, newurl, 0, curl_free);
 1547|  22.4k|  }
 1548|       |
 1549|  22.4k|#ifdef USE_IPV6
 1550|  22.4k|  scope_id = data->set.scope_id;
 1551|  22.4k|#endif
 1552|       |
 1553|       |  /* `uh` is now as the connection should use it, probably. */
 1554|  22.4k|  result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1555|  22.4k|                              &data->state.up, &conn->origin);
 1556|  22.4k|  if(result)
  ------------------
  |  Branch (1556:6): [True: 184, False: 22.3k]
  ------------------
 1557|    184|    goto out;
 1558|       |
 1559|  22.3k|  result = hsts_upgrade(data, conn, uh, port_override, scope_id);
 1560|  22.3k|  if(result)
  ------------------
  |  Branch (1560:6): [True: 0, False: 22.3k]
  ------------------
 1561|      0|    goto out;
 1562|       |
 1563|       |  /* now that the origin is fixed, check and set the connection scheme */
 1564|  22.3k|  result = url_set_conn_scheme(data, conn, conn->origin->scheme);
 1565|  22.3k|  if(result)
  ------------------
  |  Branch (1565:6): [True: 753, False: 21.5k]
  ------------------
 1566|    753|    goto out;
 1567|       |
 1568|       |  /* When the transfers initial_origin is not set, this is the initial
 1569|       |   * request. Remember this starting point. This is used to
 1570|       |   * select credentials. */
 1571|  21.5k|  if(!data->state.initial_origin)
  ------------------
  |  Branch (1571:6): [True: 10.9k, False: 10.6k]
  ------------------
 1572|  10.9k|    Curl_peer_link(&data->state.initial_origin, conn->origin);
 1573|       |
 1574|  21.5k|  result = url_set_data_creds(data, conn, uh);
 1575|  21.5k|  if(result)
  ------------------
  |  Branch (1575:6): [True: 1, False: 21.5k]
  ------------------
 1576|      1|    goto out;
 1577|       |
 1578|  21.5k|  uc = curl_url_get(uh, CURLUPART_OPTIONS, &data->state.up.options,
 1579|  21.5k|                    CURLU_URLDECODE);
  ------------------
  |  |   93|  21.5k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1580|  21.5k|  if(!uc) {
  ------------------
  |  Branch (1580:6): [True: 0, False: 21.5k]
  ------------------
 1581|      0|    conn->options = curlx_strdup(data->state.up.options);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1582|      0|    if(!conn->options) {
  ------------------
  |  Branch (1582:8): [True: 0, False: 0]
  ------------------
 1583|      0|      result = CURLE_OUT_OF_MEMORY;
 1584|      0|      goto out;
 1585|      0|    }
 1586|      0|  }
 1587|  21.5k|  else if(uc != CURLUE_NO_OPTIONS) {
  ------------------
  |  Branch (1587:11): [True: 0, False: 21.5k]
  ------------------
 1588|      0|    result = Curl_uc_to_curlcode(uc);
 1589|      0|    goto out;
 1590|      0|  }
 1591|       |
 1592|  21.5k|  uc = curl_url_get(uh, CURLUPART_PATH, &data->state.up.path, CURLU_URLENCODE);
  ------------------
  |  |   94|  21.5k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 1593|  21.5k|  if(uc) {
  ------------------
  |  Branch (1593:6): [True: 0, False: 21.5k]
  ------------------
 1594|      0|    result = Curl_uc_to_curlcode(uc);
 1595|      0|    goto out;
 1596|      0|  }
 1597|       |
 1598|  21.5k|  uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query,
 1599|  21.5k|                    CURLU_GET_EMPTY);
  ------------------
  |  |  102|  21.5k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
 1600|  21.5k|  if(uc && (uc != CURLUE_NO_QUERY)) {
  ------------------
  |  Branch (1600:6): [True: 15.6k, False: 5.95k]
  |  Branch (1600:12): [True: 0, False: 15.6k]
  ------------------
 1601|      0|    result = CURLE_OUT_OF_MEMORY;
 1602|      0|    goto out;
 1603|      0|  }
 1604|       |
 1605|  21.5k|#ifdef USE_IPV6
 1606|       |  /* Fill in the conn parts that do not use authority, yet. */
 1607|  21.5k|  conn->scope_id = conn->origin->scopeid;
 1608|  21.5k|#endif
 1609|       |
 1610|  21.5k|#ifdef CURLVERBOSE
 1611|  21.5k|  Curl_creds_trace(data, data->state.creds, "transfer credentials");
 1612|  21.5k|#endif
 1613|       |
 1614|  23.2k|out:
 1615|  23.2k|  return result;
 1616|  21.5k|}
url.c:hsts_upgrade:
 1392|  22.3k|{
 1393|       |  /* HSTS upgrade */
 1394|  22.3k|  if(data->hsts && (conn->origin->scheme == &Curl_scheme_http) &&
  ------------------
  |  Branch (1394:6): [True: 21.6k, False: 678]
  |  Branch (1394:20): [True: 506, False: 21.1k]
  ------------------
 1395|    506|     Curl_hsts_applies(data->hsts, conn->origin)) {
  ------------------
  |  Branch (1395:6): [True: 0, False: 506]
  ------------------
 1396|      0|    char *url;
 1397|      0|    CURLUcode uc;
 1398|      0|    CURLcode result;
 1399|       |
 1400|      0|    curlx_safefree(data->state.up.scheme);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1401|      0|    uc = curl_url_set(uh, CURLUPART_SCHEME, "https", 0);
 1402|      0|    if(uc)
  ------------------
  |  Branch (1402:8): [True: 0, False: 0]
  ------------------
 1403|      0|      return Curl_uc_to_curlcode(uc);
 1404|      0|    Curl_bufref_free(&data->state.url);
 1405|       |    /* after update, get the updated version */
 1406|      0|    uc = curl_url_get(uh, CURLUPART_URL, &url, 0);
 1407|      0|    if(uc)
  ------------------
  |  Branch (1407:8): [True: 0, False: 0]
  ------------------
 1408|      0|      return Curl_uc_to_curlcode(uc);
 1409|      0|    Curl_bufref_set(&data->state.url, url, 0, curl_free);
 1410|       |
 1411|      0|    result = Curl_peer_from_url(uh, data, port_override, scope_id,
 1412|      0|                                &data->state.up, &conn->origin);
 1413|      0|    if(result)
  ------------------
  |  Branch (1413:8): [True: 0, False: 0]
  ------------------
 1414|      0|      return result;
 1415|      0|    infof(data, "Switched from HTTP to HTTPS due to HSTS => %s", url);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1416|      0|  }
 1417|  22.3k|  return CURLE_OK;
 1418|  22.3k|}
url.c:url_set_conn_scheme:
 1353|  22.3k|{
 1354|       |  /* URL scheme is usable for connection when it is
 1355|       |   * - allowed
 1356|       |   * - not from a redirect or an allowed redirect protocol */
 1357|  22.3k|  if(scheme->run &&
  ------------------
  |  Branch (1357:6): [True: 22.3k, False: 3]
  ------------------
 1358|  22.3k|     (data->set.allowed_protocols & scheme->protocol) &&
  ------------------
  |  Branch (1358:6): [True: 21.7k, False: 551]
  ------------------
 1359|  21.7k|     (!data->state.this_is_a_follow ||
  ------------------
  |  Branch (1359:7): [True: 11.2k, False: 10.5k]
  ------------------
 1360|  21.5k|       (data->set.redir_protocols & scheme->protocol))) {
  ------------------
  |  Branch (1360:8): [True: 10.3k, False: 199]
  ------------------
 1361|  21.5k|    conn->scheme = conn->given = scheme;
 1362|  21.5k|    return CURLE_OK;
 1363|  21.5k|  }
 1364|    753|  if(scheme->flags & PROTOPT_NO_TRANSFER)
  ------------------
  |  |  239|    753|#define PROTOPT_NO_TRANSFER (1 << 17) /* this protocol is not for transfers */
  ------------------
  |  Branch (1364:6): [True: 0, False: 753]
  ------------------
 1365|      0|    failf(data, "Protocol \"%s\" is not for transfers", scheme->name);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1366|    753|  else
 1367|    753|    failf(data, "Protocol \"%s\" is disabled%s", scheme->name,
  ------------------
  |  |   62|    753|#define failf Curl_failf
  ------------------
 1368|    753|          data->state.this_is_a_follow ? " (in redirect)" : "");
  ------------------
  |  Branch (1368:11): [True: 199, False: 554]
  ------------------
 1369|    753|  return CURLE_UNSUPPORTED_PROTOCOL;
 1370|  22.3k|}
url.c:url_set_data_creds:
 1426|  21.5k|{
 1427|  21.5k|  CURLcode result = CURLE_OK;
 1428|       |
 1429|       |  /* We reset any existing credentials on the transfer. Then
 1430|       |   * set the CURLOPT_* credentials ONLY IF the origin is the initial one. */
 1431|  21.5k|  Curl_creds_unlink(&data->state.creds);
 1432|  21.5k|  if((data->set.str[STRING_USERNAME] ||
  ------------------
  |  Branch (1432:7): [True: 3.82k, False: 17.7k]
  ------------------
 1433|  17.7k|      data->set.str[STRING_PASSWORD] ||
  ------------------
  |  Branch (1433:7): [True: 3.98k, False: 13.7k]
  ------------------
 1434|  13.7k|      data->set.str[STRING_BEARER] ||
  ------------------
  |  Branch (1434:7): [True: 1.36k, False: 12.3k]
  ------------------
 1435|  12.3k|      data->set.str[STRING_SASL_AUTHZID] ||
  ------------------
  |  Branch (1435:7): [True: 93, False: 12.2k]
  ------------------
 1436|  12.2k|      data->set.str[STRING_SERVICE_NAME]) &&
  ------------------
  |  Branch (1436:7): [True: 38, False: 12.2k]
  ------------------
 1437|  9.30k|     Curl_auth_allowed_to_origin(data, conn->origin)) {
  ------------------
  |  Branch (1437:6): [True: 9.29k, False: 10]
  ------------------
 1438|  9.29k|    result = Curl_creds_create(data->set.str[STRING_USERNAME],
 1439|  9.29k|                               data->set.str[STRING_PASSWORD],
 1440|  9.29k|                               data->set.str[STRING_BEARER],
 1441|  9.29k|                               data->set.str[STRING_SASL_AUTHZID],
 1442|  9.29k|                               data->set.str[STRING_SERVICE_NAME],
 1443|  9.29k|                               CREDS_OPTION, &data->state.creds);
  ------------------
  |  |   31|  9.29k|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1444|  9.29k|    if(result)
  ------------------
  |  Branch (1444:8): [True: 0, False: 9.29k]
  ------------------
 1445|      0|      return result;
 1446|  9.29k|  }
 1447|       |
 1448|       |  /* Extract credentials from the URL only if there are none OR
 1449|       |   * if no CURLOPT_USER was set. */
 1450|  21.5k|  if(!data->state.creds || !Curl_creds_has_user(data->state.creds)) {
  ------------------
  |  |   71|  8.71k|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (71:43): [True: 8.71k, False: 0]
  |  |  |  Branch (71:50): [True: 2.44k, False: 6.27k]
  |  |  ------------------
  ------------------
  |  Branch (1450:6): [True: 12.8k, False: 8.71k]
  ------------------
 1451|  19.1k|    char *udecoded = NULL;
 1452|  19.1k|    char *pdecoded = NULL;
 1453|  19.1k|    CURLUcode uc;
 1454|       |
 1455|  19.1k|    uc = curl_url_get(uh, CURLUPART_USER, &data->state.up.user, 0);
 1456|  19.1k|    if(uc && (uc != CURLUE_NO_USER)) {
  ------------------
  |  Branch (1456:8): [True: 14.3k, False: 4.79k]
  |  Branch (1456:14): [True: 0, False: 14.3k]
  ------------------
 1457|      0|      result = Curl_uc_to_curlcode(uc);
 1458|      0|      goto out;
 1459|      0|    }
 1460|  19.1k|    uc = curl_url_get(uh, CURLUPART_PASSWORD, &data->state.up.password, 0);
 1461|  19.1k|    if(uc && (uc != CURLUE_NO_PASSWORD)) {
  ------------------
  |  Branch (1461:8): [True: 18.7k, False: 384]
  |  Branch (1461:14): [True: 0, False: 18.7k]
  ------------------
 1462|      0|      result = Curl_uc_to_curlcode(uc);
 1463|      0|      goto out;
 1464|      0|    }
 1465|  19.1k|    if(data->state.up.user) {
  ------------------
  |  Branch (1465:8): [True: 4.79k, False: 14.3k]
  ------------------
 1466|  4.79k|      result = Curl_urldecode(data->state.up.user, 0, &udecoded, NULL,
 1467|  4.79k|                              conn->scheme->flags&PROTOPT_USERPWDCTRL ?
  ------------------
  |  |  232|  4.79k|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1467:31): [True: 108, False: 4.68k]
  ------------------
 1468|  4.68k|                              REJECT_ZERO : REJECT_CTRL);
 1469|  4.79k|    }
 1470|  19.1k|    if(!result && data->state.up.password) {
  ------------------
  |  Branch (1470:8): [True: 19.1k, False: 1]
  |  Branch (1470:19): [True: 384, False: 18.7k]
  ------------------
 1471|    384|      result = Curl_urldecode(data->state.up.password, 0, &pdecoded, NULL,
 1472|    384|                              conn->scheme->flags&PROTOPT_USERPWDCTRL ?
  ------------------
  |  |  232|    384|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (1472:31): [True: 40, False: 344]
  ------------------
 1473|    344|                              REJECT_ZERO : REJECT_CTRL);
 1474|    384|    }
 1475|  19.1k|    if(!result)
  ------------------
  |  Branch (1475:8): [True: 19.1k, False: 1]
  ------------------
 1476|  19.1k|      result = Curl_creds_merge(udecoded, pdecoded, data->state.creds,
 1477|  19.1k|                                CREDS_URL, &data->state.creds);
  ------------------
  |  |   30|  19.1k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1478|  19.1k|out:
 1479|  19.1k|    curlx_free(udecoded);
  ------------------
  |  | 1483|  19.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1480|  19.1k|    curlx_free(pdecoded);
  ------------------
  |  | 1483|  19.1k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1481|  19.1k|    if(result)
  ------------------
  |  Branch (1481:8): [True: 1, False: 19.1k]
  ------------------
 1482|      1|      failf(data, "error extracting credentials from URL");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1483|  19.1k|  }
 1484|  21.5k|  return result;
 1485|  21.5k|}
url.c:url_set_conn_peer:
 2387|  17.5k|{
 2388|  17.5k|  CURLcode result = CURLE_OK;
 2389|  17.5k|  const struct Curl_peer *origin = conn->origin;
 2390|  17.5k|  struct Curl_peer *via_peer = NULL;
 2391|  17.5k|  struct curl_slist *conn_to_entry = data->set.connect_to;
 2392|       |
 2393|  17.5k|  DEBUGASSERT(!conn->via_peer);
  ------------------
  |  | 1081|  17.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2393:3): [True: 0, False: 17.5k]
  |  Branch (2393:3): [True: 17.5k, False: 0]
  ------------------
 2394|  17.5k|  Curl_peer_unlink(&conn->via_peer);
 2395|       |
 2396|  34.4k|  while(conn_to_entry && !via_peer) {
  ------------------
  |  Branch (2396:9): [True: 16.8k, False: 17.5k]
  |  Branch (2396:26): [True: 16.8k, False: 0]
  ------------------
 2397|  16.8k|    result = parse_connect_to_string(data, origin, conn_to_entry->data,
 2398|  16.8k|                                     &via_peer);
 2399|  16.8k|    if(result)
  ------------------
  |  Branch (2399:8): [True: 0, False: 16.8k]
  ------------------
 2400|      0|      return result;
 2401|  16.8k|    conn_to_entry = conn_to_entry->next;
 2402|  16.8k|  }
 2403|       |
 2404|  17.5k|#ifndef CURL_DISABLE_ALTSVC
 2405|  17.5k|  if(data->asi && !via_peer &&
  ------------------
  |  Branch (2405:6): [True: 16.8k, False: 660]
  |  Branch (2405:19): [True: 0, False: 16.8k]
  ------------------
 2406|      0|     ((conn->scheme->protocol == CURLPROTO_HTTPS) ||
  ------------------
  |  | 1079|      0|#define CURLPROTO_HTTPS   (1L << 1)
  ------------------
  |  Branch (2406:7): [True: 0, False: 0]
  ------------------
 2407|      0|#ifdef DEBUGBUILD
 2408|       |      /* allow debug builds to circumvent the HTTPS restriction */
 2409|      0|      getenv("CURL_ALTSVC_HTTP")
  ------------------
  |  Branch (2409:7): [True: 0, False: 0]
  ------------------
 2410|       |#else
 2411|       |      0
 2412|       |#endif
 2413|      0|       )) {
 2414|       |    /* no connect_to match, try alt-svc! */
 2415|      0|    enum alpnid srcalpnid = ALPN_none;
 2416|      0|    bool hit = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2417|      0|    struct altsvc *as = NULL;
 2418|      0|    int allowed_alpns = ALPN_none;
 2419|      0|    struct http_negotiation *neg = &data->state.http_neg;
 2420|      0|    bool same_dest = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2421|       |
 2422|      0|    DEBUGF(infof(data, "Alt-svc check wanted=%x, allowed=%x",
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2423|      0|                 neg->wanted, neg->allowed));
 2424|       |#ifdef USE_HTTP3
 2425|       |    if(neg->allowed & CURL_HTTP_V3x)
 2426|       |      allowed_alpns |= ALPN_h3;
 2427|       |#endif
 2428|      0|#ifdef USE_HTTP2
 2429|      0|    if(neg->allowed & CURL_HTTP_V2x)
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (2429:8): [True: 0, False: 0]
  ------------------
 2430|      0|      allowed_alpns |= ALPN_h2;
 2431|      0|#endif
 2432|      0|    if(neg->allowed & CURL_HTTP_V1x)
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (2432:8): [True: 0, False: 0]
  ------------------
 2433|      0|      allowed_alpns |= ALPN_h1;
 2434|      0|    allowed_alpns &= (int)data->asi->flags;
 2435|       |
 2436|      0|    DEBUGF(infof(data, "check Alt-Svc for host '%s'", origin->hostname));
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2437|       |#ifdef USE_HTTP3
 2438|       |    if(!hit && (neg->wanted & CURL_HTTP_V3x)) {
 2439|       |      srcalpnid = ALPN_h3;
 2440|       |      hit = Curl_altsvc_lookup(data->asi,
 2441|       |                               ALPN_h3, origin->hostname,
 2442|       |                               origin->port, /* from */
 2443|       |                               &as /* to */,
 2444|       |                               allowed_alpns, &same_dest);
 2445|       |    }
 2446|       |#endif
 2447|      0|#ifdef USE_HTTP2
 2448|      0|    if(!hit && (neg->wanted & CURL_HTTP_V2x) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (2448:8): [True: 0, False: 0]
  |  Branch (2448:16): [True: 0, False: 0]
  ------------------
 2449|      0|       !neg->h2_prior_knowledge) {
  ------------------
  |  Branch (2449:8): [True: 0, False: 0]
  ------------------
 2450|      0|      srcalpnid = ALPN_h2;
 2451|      0|      hit = Curl_altsvc_lookup(data->asi,
 2452|      0|                               ALPN_h2, origin->hostname,
 2453|      0|                               origin->port, /* from */
 2454|      0|                               &as /* to */,
 2455|      0|                               allowed_alpns, &same_dest);
 2456|      0|    }
 2457|      0|#endif
 2458|      0|    if(!hit && (neg->wanted & CURL_HTTP_V1x) &&
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (2458:8): [True: 0, False: 0]
  |  Branch (2458:16): [True: 0, False: 0]
  ------------------
 2459|      0|       !neg->only_10) {
  ------------------
  |  Branch (2459:8): [True: 0, False: 0]
  ------------------
 2460|      0|      srcalpnid = ALPN_h1;
 2461|      0|      hit = Curl_altsvc_lookup(data->asi,
 2462|      0|                               ALPN_h1, origin->hostname,
 2463|      0|                               origin->port, /* from */
 2464|      0|                               &as /* to */,
 2465|      0|                               allowed_alpns, &same_dest);
 2466|      0|    }
 2467|       |
 2468|      0|    if(hit && same_dest) {
  ------------------
  |  Branch (2468:8): [True: 0, False: 0]
  |  Branch (2468:15): [True: 0, False: 0]
  ------------------
 2469|       |      /* same destination, but more HTTPS version options */
 2470|      0|      switch(as->dst.alpnid) {
 2471|      0|      case ALPN_h1:
  ------------------
  |  Branch (2471:7): [True: 0, False: 0]
  ------------------
 2472|      0|        neg->wanted |= CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2473|      0|        neg->preferred = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2474|      0|        break;
 2475|      0|      case ALPN_h2:
  ------------------
  |  Branch (2475:7): [True: 0, False: 0]
  ------------------
 2476|      0|        neg->wanted |= CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2477|      0|        neg->preferred = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2478|      0|        break;
 2479|      0|      case ALPN_h3:
  ------------------
  |  Branch (2479:7): [True: 0, False: 0]
  ------------------
 2480|      0|        neg->wanted |= CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2481|      0|        neg->preferred = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2482|      0|        break;
 2483|      0|      default: /* should not be possible */
  ------------------
  |  Branch (2483:7): [True: 0, False: 0]
  ------------------
 2484|      0|        break;
 2485|      0|      }
 2486|      0|    }
 2487|      0|    else if(hit) {
  ------------------
  |  Branch (2487:13): [True: 0, False: 0]
  ------------------
 2488|      0|      result = Curl_peer_create(data, conn->origin->scheme,
 2489|      0|                                as->dst.host, as->dst.port,
 2490|      0|                                &via_peer);
 2491|      0|      if(result)
  ------------------
  |  Branch (2491:10): [True: 0, False: 0]
  ------------------
 2492|      0|        return result;
 2493|      0|      infof(data, "Alt-svc connecting from [%s]%s:%u to [%s]%s:%u",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2494|      0|            Curl_alpnid2str(srcalpnid), origin->hostname, origin->port,
 2495|      0|            Curl_alpnid2str(as->dst.alpnid),
 2496|      0|            via_peer->hostname, via_peer->port);
 2497|      0|      conn->bits.altused = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2498|      0|      if(srcalpnid != as->dst.alpnid) {
  ------------------
  |  Branch (2498:10): [True: 0, False: 0]
  ------------------
 2499|       |        /* protocol version switch */
 2500|      0|        switch(as->dst.alpnid) {
 2501|      0|        case ALPN_h1:
  ------------------
  |  Branch (2501:9): [True: 0, False: 0]
  ------------------
 2502|      0|          neg->wanted = neg->allowed = CURL_HTTP_V1x;
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 2503|      0|          neg->only_10 = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2504|      0|          break;
 2505|      0|        case ALPN_h2:
  ------------------
  |  Branch (2505:9): [True: 0, False: 0]
  ------------------
 2506|      0|          neg->wanted = neg->allowed = CURL_HTTP_V2x;
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 2507|      0|          break;
 2508|      0|        case ALPN_h3:
  ------------------
  |  Branch (2508:9): [True: 0, False: 0]
  ------------------
 2509|      0|          conn->transport_wanted = TRNSPRT_QUIC;
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
 2510|      0|          neg->wanted = neg->allowed = CURL_HTTP_V3x;
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
 2511|      0|          break;
 2512|      0|        default: /* should not be possible */
  ------------------
  |  Branch (2512:9): [True: 0, False: 0]
  ------------------
 2513|      0|          break;
 2514|      0|        }
 2515|      0|      }
 2516|      0|    }
 2517|      0|  }
 2518|  17.5k|#endif
 2519|       |
 2520|  17.5k|  if(via_peer)
  ------------------
  |  Branch (2520:6): [True: 16.8k, False: 660]
  ------------------
 2521|  16.8k|    conn->via_peer = via_peer;
 2522|       |
 2523|  17.5k|  return result;
 2524|  17.5k|}
url.c:parse_connect_to_string:
 2329|  16.8k|{
 2330|  16.8k|  CURLcode result = CURLE_OK;
 2331|  16.8k|  const char *ptr = conn_to_line;
 2332|  16.8k|  bool host_match = FALSE;
  ------------------
  |  | 1058|  16.8k|#define FALSE false
  ------------------
 2333|  16.8k|  bool port_match = FALSE;
  ------------------
  |  | 1058|  16.8k|#define FALSE false
  ------------------
 2334|       |
 2335|  16.8k|  *pvia_dest = NULL;
 2336|       |
 2337|  16.8k|  if(*ptr == ':') {
  ------------------
  |  Branch (2337:6): [True: 16.8k, False: 0]
  ------------------
 2338|       |    /* an empty hostname always matches */
 2339|  16.8k|    host_match = TRUE;
  ------------------
  |  | 1055|  16.8k|#define TRUE true
  ------------------
 2340|  16.8k|    ptr++;
 2341|  16.8k|  }
 2342|      0|  else {
 2343|       |    /* check whether the URL's hostname matches. Use the URL hostname
 2344|       |     * when it was an IPv6 address. Otherwise use the connection's hostname
 2345|       |     * that has IDN conversion. */
 2346|      0|    const char *hostname_to_match = (dest->user_hostname[0] == '[') ?
  ------------------
  |  Branch (2346:37): [True: 0, False: 0]
  ------------------
 2347|      0|      dest->user_hostname : dest->hostname;
 2348|      0|    size_t hlen = strlen(hostname_to_match);
 2349|      0|    host_match = curl_strnequal(ptr, hostname_to_match, hlen);
 2350|      0|    ptr += hlen;
 2351|       |
 2352|      0|    host_match = host_match && *ptr == ':';
  ------------------
  |  Branch (2352:18): [True: 0, False: 0]
  |  Branch (2352:32): [True: 0, False: 0]
  ------------------
 2353|      0|    ptr++;
 2354|      0|  }
 2355|       |
 2356|  16.8k|  if(host_match) {
  ------------------
  |  Branch (2356:6): [True: 16.8k, False: 0]
  ------------------
 2357|  16.8k|    if(*ptr == ':') {
  ------------------
  |  Branch (2357:8): [True: 16.8k, False: 0]
  ------------------
 2358|       |      /* an empty port always matches */
 2359|  16.8k|      port_match = TRUE;
  ------------------
  |  | 1055|  16.8k|#define TRUE true
  ------------------
 2360|  16.8k|      ptr++;
 2361|  16.8k|    }
 2362|      0|    else {
 2363|       |      /* check whether the URL's port matches */
 2364|      0|      const char *ptr_next = strchr(ptr, ':');
 2365|      0|      if(ptr_next) {
  ------------------
  |  Branch (2365:10): [True: 0, False: 0]
  ------------------
 2366|      0|        curl_off_t port_to_match;
 2367|      0|        if(!curlx_str_number(&ptr, &port_to_match, 0xffff) &&
  ------------------
  |  Branch (2367:12): [True: 0, False: 0]
  ------------------
 2368|      0|           ((uint16_t)port_to_match == dest->port)) {
  ------------------
  |  Branch (2368:12): [True: 0, False: 0]
  ------------------
 2369|      0|          port_match = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2370|      0|        }
 2371|      0|        ptr = ptr_next + 1;
 2372|      0|      }
 2373|      0|    }
 2374|  16.8k|  }
 2375|       |
 2376|  16.8k|  if(host_match && port_match && ptr && *ptr)
  ------------------
  |  Branch (2376:6): [True: 16.8k, False: 0]
  |  Branch (2376:20): [True: 16.8k, False: 0]
  |  Branch (2376:34): [True: 16.8k, False: 0]
  |  Branch (2376:41): [True: 16.8k, False: 0]
  ------------------
 2377|  16.8k|    result = Curl_peer_from_connect_to(data, dest, ptr, pvia_dest);
 2378|       |
 2379|  16.8k|  return result;
 2380|  16.8k|}
url.c:url_set_conn_proxies:
 1913|  17.5k|{
 1914|  17.5k|  char *proxy = NULL;
 1915|  17.5k|  char *pre_proxy = NULL;
 1916|  17.5k|  char *no_proxy = NULL;
 1917|  17.5k|  CURLcode result = CURLE_OK;
 1918|       |
 1919|       |  /*************************************************************
 1920|       |   * Detect what (if any) proxy to use
 1921|       |   *************************************************************/
 1922|  17.5k|  if(data->set.str[STRING_PROXY]) {
  ------------------
  |  Branch (1922:6): [True: 4.09k, False: 13.4k]
  ------------------
 1923|  4.09k|    proxy = curlx_strdup(data->set.str[STRING_PROXY]);
  ------------------
  |  | 1477|  4.09k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1924|       |    /* if global proxy is set, this is it */
 1925|  4.09k|    if(!proxy) {
  ------------------
  |  Branch (1925:8): [True: 0, False: 4.09k]
  ------------------
 1926|      0|      failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1927|      0|      result = CURLE_OUT_OF_MEMORY;
 1928|      0|      goto out;
 1929|      0|    }
 1930|  4.09k|  }
 1931|       |
 1932|  17.5k|  if(data->set.str[STRING_PRE_PROXY]) {
  ------------------
  |  Branch (1932:6): [True: 1.91k, False: 15.6k]
  ------------------
 1933|  1.91k|    pre_proxy = curlx_strdup(data->set.str[STRING_PRE_PROXY]);
  ------------------
  |  | 1477|  1.91k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1934|       |    /* if global socks proxy is set, this is it */
 1935|  1.91k|    if(!pre_proxy) {
  ------------------
  |  Branch (1935:8): [True: 0, False: 1.91k]
  ------------------
 1936|      0|      failf(data, "memory shortage");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1937|      0|      result = CURLE_OUT_OF_MEMORY;
 1938|      0|      goto out;
 1939|      0|    }
 1940|  1.91k|  }
 1941|       |
 1942|  17.5k|  if(!data->set.str[STRING_NOPROXY]) {
  ------------------
  |  Branch (1942:6): [True: 16.5k, False: 963]
  ------------------
 1943|  16.5k|    const char *p = "no_proxy";
 1944|  16.5k|    no_proxy = curl_getenv(p);
 1945|  16.5k|    if(!no_proxy) {
  ------------------
  |  Branch (1945:8): [True: 16.5k, False: 0]
  ------------------
 1946|  16.5k|      p = "NO_PROXY";
 1947|  16.5k|      no_proxy = curl_getenv(p);
 1948|  16.5k|    }
 1949|  16.5k|    if(no_proxy) {
  ------------------
  |  Branch (1949:8): [True: 0, False: 16.5k]
  ------------------
 1950|      0|      infof(data, "Uses proxy env variable %s == '%s'", p, no_proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1951|      0|    }
 1952|  16.5k|  }
 1953|       |
 1954|  17.5k|  if(Curl_check_noproxy(conn->origin->hostname, data->set.str[STRING_NOPROXY] ?
  ------------------
  |  Branch (1954:6): [True: 41, False: 17.5k]
  |  Branch (1954:49): [True: 963, False: 16.5k]
  ------------------
 1955|  16.5k|                        data->set.str[STRING_NOPROXY] : no_proxy)) {
 1956|     41|    curlx_safefree(proxy);
  ------------------
  |  | 1327|     41|  do {                      \
  |  | 1328|     41|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     41|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     41|    (ptr) = NULL;           \
  |  | 1330|     41|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 41]
  |  |  ------------------
  ------------------
 1957|     41|    curlx_safefree(pre_proxy);
  ------------------
  |  | 1327|     41|  do {                      \
  |  | 1328|     41|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|     41|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|     41|    (ptr) = NULL;           \
  |  | 1330|     41|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 41]
  |  |  ------------------
  ------------------
 1958|     41|  }
 1959|  17.5k|#ifndef CURL_DISABLE_HTTP
 1960|  17.5k|  else if(!proxy && !pre_proxy)
  ------------------
  |  Branch (1960:11): [True: 13.4k, False: 4.08k]
  |  Branch (1960:21): [True: 12.1k, False: 1.26k]
  ------------------
 1961|       |    /* if the host is not in the noproxy list, detect proxy. */
 1962|  12.1k|    proxy = url_detect_proxy(data, conn);
 1963|  17.5k|#endif /* CURL_DISABLE_HTTP */
 1964|  17.5k|  curlx_safefree(no_proxy);
  ------------------
  |  | 1327|  17.5k|  do {                      \
  |  | 1328|  17.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  17.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  17.5k|    (ptr) = NULL;           \
  |  | 1330|  17.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 17.5k]
  |  |  ------------------
  ------------------
 1965|       |
 1966|  17.5k|  if(proxy && (!*proxy || (conn->scheme->flags & PROTOPT_NONETWORK))) {
  ------------------
  |  |  215|  3.14k|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (1966:6): [True: 4.08k, False: 13.4k]
  |  Branch (1966:16): [True: 936, False: 3.14k]
  |  Branch (1966:27): [True: 0, False: 3.14k]
  ------------------
 1967|    936|    curlx_safefree(proxy);  /* Do not bother with an empty proxy string
  ------------------
  |  | 1327|    936|  do {                      \
  |  | 1328|    936|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|    936|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|    936|    (ptr) = NULL;           \
  |  | 1330|    936|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 936]
  |  |  ------------------
  ------------------
 1968|       |                               or if the protocol does not work with network */
 1969|    936|  }
 1970|  17.5k|  if(pre_proxy && (!*pre_proxy ||
  ------------------
  |  Branch (1970:6): [True: 1.91k, False: 15.6k]
  |  Branch (1970:20): [True: 1.48k, False: 432]
  ------------------
 1971|  1.48k|                    (conn->scheme->flags & PROTOPT_NONETWORK))) {
  ------------------
  |  |  215|    432|#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
  ------------------
  |  Branch (1971:21): [True: 0, False: 432]
  ------------------
 1972|  1.48k|    curlx_safefree(pre_proxy);  /* Do not bother with an empty socks proxy
  ------------------
  |  | 1327|  1.48k|  do {                      \
  |  | 1328|  1.48k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  1.48k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  1.48k|    (ptr) = NULL;           \
  |  | 1330|  1.48k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 1.48k]
  |  |  ------------------
  ------------------
 1973|       |                                   string or if the protocol does not work
 1974|       |                                   with network */
 1975|  1.48k|  }
 1976|       |
 1977|       |  /***********************************************************************
 1978|       |   * If this is supposed to use a proxy, we need to figure out the proxy host
 1979|       |   * name, proxy type and port number, so that we can reuse an existing
 1980|       |   * connection that may exist registered to the same proxy host.
 1981|       |   ***********************************************************************/
 1982|  17.5k|  if(proxy || pre_proxy) {
  ------------------
  |  Branch (1982:6): [True: 3.14k, False: 14.4k]
  |  Branch (1982:15): [True: 364, False: 14.0k]
  ------------------
 1983|  3.51k|    if(pre_proxy) {
  ------------------
  |  Branch (1983:8): [True: 432, False: 3.07k]
  ------------------
 1984|    432|      result = parse_proxy(data, pre_proxy, TRUE, &conn->socks_proxy);
  ------------------
  |  | 1055|    432|#define TRUE true
  ------------------
 1985|    432|      if(result)
  ------------------
  |  Branch (1985:10): [True: 13, False: 419]
  ------------------
 1986|     13|        goto out;
 1987|    432|    }
 1988|       |
 1989|  3.49k|    if(proxy) {
  ------------------
  |  Branch (1989:8): [True: 3.14k, False: 352]
  ------------------
 1990|  3.14k|      result = parse_proxy(data, proxy, FALSE, &conn->http_proxy);
  ------------------
  |  | 1058|  3.14k|#define FALSE false
  ------------------
 1991|  3.14k|      if(result)
  ------------------
  |  Branch (1991:10): [True: 5, False: 3.14k]
  ------------------
 1992|      5|        goto out;
 1993|  3.14k|      switch(conn->http_proxy.proxytype) {
 1994|      3|      case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|      3|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1994:7): [True: 3, False: 3.13k]
  ------------------
 1995|     13|      case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|     13|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1995:7): [True: 10, False: 3.13k]
  ------------------
 1996|     25|      case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|     25|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1996:7): [True: 12, False: 3.12k]
  ------------------
 1997|     40|      case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|     40|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1997:7): [True: 15, False: 3.12k]
  ------------------
 1998|       |        /* Whoops, it's not a HTTP proxy */
 1999|     40|        if(conn->socks_proxy.peer) {
  ------------------
  |  Branch (1999:12): [True: 3, False: 37]
  ------------------
 2000|       |          /* and we already have a SOCKS pre-proxy. Cannot have both */
 2001|      3|          failf(data, "Having a SOCKS pre-proxy and proxy is not "
  ------------------
  |  |   62|      3|#define failf Curl_failf
  ------------------
 2002|      3|                "supported with \'%s\'", proxy);
 2003|      3|          result = CURLE_COULDNT_RESOLVE_PROXY;
 2004|      3|          goto out;
 2005|      3|        }
 2006|       |        /* switch */
 2007|     37|        conn->socks_proxy = conn->http_proxy;
 2008|     37|        memset(&conn->http_proxy, 0, sizeof(conn->http_proxy));
 2009|     37|        break;
 2010|  3.10k|      default:
  ------------------
  |  Branch (2010:7): [True: 3.10k, False: 40]
  ------------------
 2011|  3.10k|        break;
 2012|  3.14k|      }
 2013|  3.14k|    }
 2014|       |
 2015|  3.48k|    if(conn->http_proxy.peer) {
  ------------------
  |  Branch (2015:8): [True: 3.10k, False: 389]
  ------------------
 2016|       |#ifdef CURL_DISABLE_HTTP
 2017|       |      /* asking for an HTTP proxy is a bit funny when HTTP is disabled... */
 2018|       |      result = CURLE_UNSUPPORTED_PROTOCOL;
 2019|       |      goto out;
 2020|       |#else
 2021|  3.10k|#ifndef CURL_DISABLE_DIGEST_AUTH
 2022|  3.10k|      if(!Curl_safecmp(data->state.envproxy, proxy)) {
  ------------------
  |  Branch (2022:10): [True: 3.07k, False: 26]
  ------------------
 2023|       |        /* proxy changed */
 2024|  3.07k|        Curl_auth_digest_cleanup(&data->state.proxydigest);
 2025|  3.07k|        curlx_free(data->state.envproxy);
  ------------------
  |  | 1483|  3.07k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2026|  3.07k|        data->state.envproxy = curlx_strdup(proxy);
  ------------------
  |  | 1477|  3.07k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 2027|  3.07k|      }
 2028|  3.10k|#endif
 2029|  3.10k|      if(conn->scheme->flags & PROTOPT_HTTP_PROXY_TUNNEL) {
  ------------------
  |  |  240|  3.10k|#define PROTOPT_HTTP_PROXY_TUNNEL (1 << 18) /* Using this protocol with a
  ------------------
  |  Branch (2029:10): [True: 0, False: 3.10k]
  ------------------
 2030|      0|        conn->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2031|      0|      }
 2032|  3.10k|      else if(!(conn->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  3.10k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  3.10k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  3.10k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  3.10k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  3.10k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  3.10k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (2032:15): [True: 3.10k, False: 0]
  ------------------
 2033|       |        /* force this connection's protocol to become HTTP if compatible */
 2034|  3.10k|        if((conn->scheme->flags & PROTOPT_PROXY_AS_HTTP) &&
  ------------------
  |  |  227|  3.10k|#define PROTOPT_PROXY_AS_HTTP (1 << 11) /* allow this non-HTTP scheme over a
  ------------------
  |  Branch (2034:12): [True: 0, False: 3.10k]
  ------------------
 2035|      0|           !conn->bits.tunnel_proxy)
  ------------------
  |  Branch (2035:12): [True: 0, False: 0]
  ------------------
 2036|      0|          conn->scheme = &Curl_scheme_http;
 2037|  3.10k|        else
 2038|       |          /* if not converting to HTTP over the proxy, enforce tunneling */
 2039|  3.10k|          conn->bits.tunnel_proxy = TRUE;
  ------------------
  |  | 1055|  3.10k|#define TRUE true
  ------------------
 2040|  3.10k|      }
 2041|  3.10k|#endif
 2042|  3.10k|    }
 2043|    389|    else
 2044|    389|      conn->bits.tunnel_proxy = FALSE; /* no tunneling if not HTTP */
  ------------------
  |  | 1058|    389|#define FALSE false
  ------------------
 2045|  3.48k|  }
 2046|       |
 2047|  17.5k|  conn->bits.socksproxy = !!conn->socks_proxy.peer;
 2048|  17.5k|  conn->bits.httpproxy = !!conn->http_proxy.peer;
 2049|  17.5k|  conn->bits.proxy = conn->bits.httpproxy || conn->bits.socksproxy;
  ------------------
  |  Branch (2049:22): [True: 3.10k, False: 14.4k]
  |  Branch (2049:46): [True: 389, False: 14.0k]
  ------------------
 2050|       |
 2051|  17.5k|  if(!conn->bits.proxy) {
  ------------------
  |  Branch (2051:6): [True: 14.0k, False: 3.48k]
  ------------------
 2052|       |    /* we are not using the proxy after all... */
 2053|  14.0k|    conn->bits.proxy = FALSE;
  ------------------
  |  | 1058|  14.0k|#define FALSE false
  ------------------
 2054|  14.0k|    conn->bits.httpproxy = FALSE;
  ------------------
  |  | 1058|  14.0k|#define FALSE false
  ------------------
 2055|  14.0k|    conn->bits.socksproxy = FALSE;
  ------------------
  |  | 1058|  14.0k|#define FALSE false
  ------------------
 2056|  14.0k|    conn->bits.tunnel_proxy = FALSE;
  ------------------
  |  | 1058|  14.0k|#define FALSE false
  ------------------
 2057|       |    /* CURLPROXY_HTTPS does not have its own flag in conn->bits, yet we need
 2058|       |       to signal that CURLPROXY_HTTPS is not used for this connection */
 2059|  14.0k|    conn->http_proxy.proxytype = CURLPROXY_HTTP;
  ------------------
  |  |  790|  14.0k|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
 2060|  14.0k|  }
 2061|       |
 2062|  17.5k|out:
 2063|       |
 2064|  17.5k|  curlx_free(pre_proxy);
  ------------------
  |  | 1483|  17.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2065|  17.5k|  curlx_free(proxy);
  ------------------
  |  | 1483|  17.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2066|  17.5k|  return result;
 2067|  17.5k|}
url.c:url_detect_proxy:
 1707|  12.1k|{
 1708|  12.1k|  char *proxy = NULL;
 1709|       |
 1710|       |  /* If proxy was not specified, we check for default proxy environment
 1711|       |   * variables, to enable i.e Lynx compliance:
 1712|       |   *
 1713|       |   * http_proxy=http://some.server.dom:port/
 1714|       |   * https_proxy=http://some.server.dom:port/
 1715|       |   * ftp_proxy=http://some.server.dom:port/
 1716|       |   * no_proxy=domain1.dom,host.domain2.dom
 1717|       |   *   (a comma-separated list of hosts which should
 1718|       |   *   not be proxied, or an asterisk to override
 1719|       |   *   all proxy variables)
 1720|       |   * all_proxy=http://some.server.dom:port/
 1721|       |   *   (seems to exist for the CERN www lib. Probably
 1722|       |   *   the first to check for.)
 1723|       |   *
 1724|       |   * For compatibility, the all-uppercase versions of these variables are
 1725|       |   * checked if the lowercase versions do not exist.
 1726|       |   */
 1727|  12.1k|  char proxy_env[20];
 1728|  12.1k|  const char *envp;
 1729|  12.1k|  VERBOSE(envp = proxy_env);
  ------------------
  |  | 1618|  12.1k|#define VERBOSE(x) x
  ------------------
 1730|       |
 1731|  12.1k|  curl_msnprintf(proxy_env, sizeof(proxy_env), "%s_proxy",
 1732|  12.1k|                 conn->scheme->name);
 1733|       |
 1734|       |  /* read the protocol proxy: */
 1735|  12.1k|  proxy = curl_getenv(proxy_env);
 1736|       |
 1737|       |  /*
 1738|       |   * We do not try the uppercase version of HTTP_PROXY because of
 1739|       |   * security reasons:
 1740|       |   *
 1741|       |   * When curl is used in a webserver application
 1742|       |   * environment (cgi or php), this environment variable can
 1743|       |   * be controlled by the web server user by setting the
 1744|       |   * http header 'Proxy:' to some value.
 1745|       |   *
 1746|       |   * This can cause 'internal' http/ftp requests to be
 1747|       |   * arbitrarily redirected by any external attacker.
 1748|       |   */
 1749|  12.1k|  if(!proxy && !curl_strequal("http_proxy", proxy_env)) {
  ------------------
  |  Branch (1749:6): [True: 12.1k, False: 0]
  |  Branch (1749:16): [True: 12.1k, False: 9]
  ------------------
 1750|       |    /* There was no lowercase variable, try the uppercase version: */
 1751|  12.1k|    Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env));
 1752|  12.1k|    proxy = curl_getenv(proxy_env);
 1753|  12.1k|  }
 1754|       |
 1755|  12.1k|  if(!proxy) {
  ------------------
  |  Branch (1755:6): [True: 12.1k, False: 0]
  ------------------
 1756|  12.1k|#ifndef CURL_DISABLE_WEBSOCKETS
 1757|       |    /* websocket proxy fallbacks */
 1758|  12.1k|    if(curl_strequal("ws_proxy", proxy_env)) {
  ------------------
  |  Branch (1758:8): [True: 0, False: 12.1k]
  ------------------
 1759|      0|      proxy = curl_getenv("http_proxy");
 1760|      0|    }
 1761|  12.1k|    else if(curl_strequal("wss_proxy", proxy_env)) {
  ------------------
  |  Branch (1761:13): [True: 0, False: 12.1k]
  ------------------
 1762|      0|      proxy = curl_getenv("https_proxy");
 1763|      0|      if(!proxy)
  ------------------
  |  Branch (1763:10): [True: 0, False: 0]
  ------------------
 1764|      0|        proxy = curl_getenv("HTTPS_PROXY");
 1765|      0|    }
 1766|  12.1k|    if(!proxy) {
  ------------------
  |  Branch (1766:8): [True: 12.1k, False: 0]
  ------------------
 1767|  12.1k|#endif
 1768|  12.1k|      envp = "all_proxy";
 1769|  12.1k|      proxy = curl_getenv(envp); /* default proxy to use */
 1770|  12.1k|      if(!proxy) {
  ------------------
  |  Branch (1770:10): [True: 12.1k, False: 0]
  ------------------
 1771|  12.1k|        envp = "ALL_PROXY";
 1772|  12.1k|        proxy = curl_getenv(envp);
 1773|  12.1k|      }
 1774|  12.1k|#ifndef CURL_DISABLE_WEBSOCKETS
 1775|  12.1k|    }
 1776|  12.1k|#endif
 1777|  12.1k|  }
 1778|  12.1k|  if(proxy)
  ------------------
  |  Branch (1778:6): [True: 0, False: 12.1k]
  ------------------
 1779|      0|    infof(data, "Uses proxy env variable %s == '%s'", envp, proxy);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1780|       |
 1781|  12.1k|  return proxy;
 1782|  12.1k|}
url.c:parse_proxy:
 1794|  3.57k|{
 1795|  3.57k|  char *proxyuser = NULL;
 1796|  3.57k|  char *proxypasswd = NULL;
 1797|  3.57k|  char *scheme = NULL;
 1798|  3.57k|  CURLcode result = CURLE_OK;
 1799|       |  /* Set the start proxy type for url scheme guessing */
 1800|  3.57k|  uint8_t proxytype = for_pre_proxy ? CURLPROXY_SOCKS4 : data->set.proxytype;
  ------------------
  |  |  798|    432|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1800:23): [True: 432, False: 3.14k]
  ------------------
 1801|  3.57k|  CURLU *uhp = curl_url();
 1802|  3.57k|  CURLUcode uc;
 1803|       |
 1804|  3.57k|  if(!uhp) {
  ------------------
  |  Branch (1804:6): [True: 0, False: 3.57k]
  ------------------
 1805|      0|    result = CURLE_OUT_OF_MEMORY;
 1806|      0|    goto error;
 1807|      0|  }
 1808|       |  /* When parsing the proxy, allowing non-supported schemes since we have
 1809|       |     these made up ones for proxies. Guess scheme for URLs without it. */
 1810|  3.57k|  uc = curl_url_set(uhp, CURLUPART_URL, proxy,
 1811|  3.57k|                    CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   90|  3.57k|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
                                  CURLU_NON_SUPPORT_SCHEME | CURLU_GUESS_SCHEME);
  ------------------
  |  |   96|  3.57k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1812|  3.57k|  if(!uc) {
  ------------------
  |  Branch (1812:6): [True: 3.56k, False: 10]
  ------------------
 1813|       |    /* parsed okay as a URL - only update proxytype when scheme was explicit */
 1814|  3.56k|    uc = curl_url_get(uhp, CURLUPART_SCHEME, &scheme, CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  3.56k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
 1815|  3.56k|    if(!uc) {
  ------------------
  |  Branch (1815:8): [True: 3, False: 3.56k]
  ------------------
 1816|      3|      result = Curl_scheme_to_proxytype(data, scheme, &proxytype, proxy);
 1817|      3|      if(result)
  ------------------
  |  Branch (1817:10): [True: 1, False: 2]
  ------------------
 1818|      1|        goto error;
 1819|      3|    }
 1820|  3.56k|    else if(uc != CURLUE_NO_SCHEME) {
  ------------------
  |  Branch (1820:13): [True: 0, False: 3.56k]
  ------------------
 1821|      0|      result = CURLE_OUT_OF_MEMORY;
 1822|      0|      goto error;
 1823|      0|    }
 1824|       |    /* else: no explicit scheme, keep the configured proxytype */
 1825|  3.56k|  }
 1826|     10|  else {
 1827|     10|    failf(data, "Unsupported proxy syntax in \'%s\': %s", proxy,
  ------------------
  |  |   62|     10|#define failf Curl_failf
  ------------------
 1828|     10|          curl_url_strerror(uc));
 1829|     10|    result = CURLE_COULDNT_RESOLVE_PROXY;
 1830|     10|    goto error;
 1831|     10|  }
 1832|       |
 1833|  3.56k|  result = Curl_peer_from_proxy_url(uhp, data, proxy, proxytype,
 1834|  3.56k|                                    &proxyinfo->peer, &proxytype);
 1835|  3.56k|  if(result)
  ------------------
  |  Branch (1835:6): [True: 4, False: 3.56k]
  ------------------
 1836|      4|    goto error;
 1837|       |
 1838|  3.56k|  switch(proxytype) {
 1839|    973|    case CURLPROXY_HTTP:
  ------------------
  |  |  790|    973|#define CURLPROXY_HTTP            0L /* added in 7.10, new in 7.19.4 default is
  ------------------
  |  Branch (1839:5): [True: 973, False: 2.58k]
  ------------------
 1840|    974|    case CURLPROXY_HTTP_1_0:
  ------------------
  |  |  792|    974|#define CURLPROXY_HTTP_1_0        1L /* force to use CONNECT HTTP/1.0
  ------------------
  |  Branch (1840:5): [True: 1, False: 3.56k]
  ------------------
 1841|  1.80k|    case CURLPROXY_HTTPS:
  ------------------
  |  |  794|  1.80k|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  ------------------
  |  Branch (1841:5): [True: 832, False: 2.73k]
  ------------------
 1842|  3.10k|    case CURLPROXY_HTTPS2:
  ------------------
  |  |  796|  3.10k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1842:5): [True: 1.29k, False: 2.26k]
  ------------------
 1843|  3.10k|    case CURLPROXY_HTTPS3:
  ------------------
  |  |  805|  3.10k|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  ------------------
  |  Branch (1843:5): [True: 0, False: 3.56k]
  ------------------
 1844|  3.10k|      if(for_pre_proxy) {
  ------------------
  |  Branch (1844:10): [True: 1, False: 3.10k]
  ------------------
 1845|      1|        failf(data, "Unsupported pre-proxy type for \'%s\'", proxy);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1846|      1|        result = CURLE_COULDNT_RESOLVE_PROXY;
 1847|      1|        goto error;
 1848|      1|      }
 1849|  3.10k|      break;
 1850|  3.10k|    case CURLPROXY_SOCKS4:
  ------------------
  |  |  798|    424|#define CURLPROXY_SOCKS4          4L /* support added in 7.15.2, enum existed
  ------------------
  |  Branch (1850:5): [True: 424, False: 3.13k]
  ------------------
 1851|    434|    case CURLPROXY_SOCKS4A:
  ------------------
  |  |  801|    434|#define CURLPROXY_SOCKS4A         6L /* added in 7.18.0 */
  ------------------
  |  Branch (1851:5): [True: 10, False: 3.55k]
  ------------------
 1852|    446|    case CURLPROXY_SOCKS5:
  ------------------
  |  |  800|    446|#define CURLPROXY_SOCKS5          5L /* added in 7.10 */
  ------------------
  |  Branch (1852:5): [True: 12, False: 3.55k]
  ------------------
 1853|    461|    case CURLPROXY_SOCKS5_HOSTNAME:
  ------------------
  |  |  802|    461|#define CURLPROXY_SOCKS5_HOSTNAME 7L /* Use the SOCKS5 protocol but pass along
  ------------------
  |  Branch (1853:5): [True: 15, False: 3.54k]
  ------------------
 1854|    461|      break;
 1855|      0|    default:
  ------------------
  |  Branch (1855:5): [True: 0, False: 3.56k]
  ------------------
 1856|      0|      failf(data, "Unsupported proxy type %u for \'%s\'", proxytype, proxy);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1857|      0|      result = CURLE_COULDNT_RESOLVE_PROXY;
 1858|      0|      goto error;
 1859|  3.56k|  }
 1860|       |
 1861|       |  /* Is there a username and password given in this proxy URL? */
 1862|  3.56k|  uc = curl_url_get(uhp, CURLUPART_USER, &proxyuser, CURLU_URLDECODE);
  ------------------
  |  |   93|  3.56k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1863|  3.56k|  if(uc && (uc != CURLUE_NO_USER)) {
  ------------------
  |  Branch (1863:6): [True: 2.31k, False: 1.25k]
  |  Branch (1863:12): [True: 1, False: 2.31k]
  ------------------
 1864|      1|    result = Curl_uc_to_curlcode(uc);
 1865|      1|    goto error;
 1866|      1|  }
 1867|  3.56k|  uc = curl_url_get(uhp, CURLUPART_PASSWORD, &proxypasswd, CURLU_URLDECODE);
  ------------------
  |  |   93|  3.56k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1868|  3.56k|  if(uc && (uc != CURLUE_NO_PASSWORD)) {
  ------------------
  |  Branch (1868:6): [True: 3.46k, False: 97]
  |  Branch (1868:12): [True: 1, False: 3.46k]
  ------------------
 1869|      1|    result = Curl_uc_to_curlcode(uc);
 1870|      1|    goto error;
 1871|      1|  }
 1872|       |
 1873|  3.55k|  if(proxyuser || proxypasswd) {
  ------------------
  |  Branch (1873:6): [True: 1.24k, False: 2.31k]
  |  Branch (1873:19): [True: 0, False: 2.31k]
  ------------------
 1874|  1.24k|    result = Curl_creds_create(proxyuser, proxypasswd, NULL, NULL,
 1875|  1.24k|                               data->set.str[STRING_PROXY_SERVICE_NAME],
 1876|  1.24k|                               CREDS_URL, &proxyinfo->creds);
  ------------------
  |  |   30|  1.24k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
 1877|  1.24k|    if(result)
  ------------------
  |  Branch (1877:8): [True: 0, False: 1.24k]
  ------------------
 1878|      0|      goto error;
 1879|  1.24k|  }
 1880|  2.31k|  else if(!for_pre_proxy &&
  ------------------
  |  Branch (1880:11): [True: 1.95k, False: 352]
  ------------------
 1881|  1.95k|          (data->set.str[STRING_PROXYUSERNAME] ||
  ------------------
  |  Branch (1881:12): [True: 29, False: 1.92k]
  ------------------
 1882|  1.92k|           data->set.str[STRING_PROXYPASSWORD] ||
  ------------------
  |  Branch (1882:12): [True: 8, False: 1.92k]
  ------------------
 1883|  1.92k|           data->set.str[STRING_PROXY_SERVICE_NAME])) {
  ------------------
  |  Branch (1883:12): [True: 10, False: 1.91k]
  ------------------
 1884|       |    /* No user/passwd in URL, if this is not a pre-proxy, the
 1885|       |     * CURLOPT_PROXY* settings apply. */
 1886|     47|    result = Curl_creds_create(data->set.str[STRING_PROXYUSERNAME],
 1887|     47|                               data->set.str[STRING_PROXYPASSWORD],
 1888|     47|                               NULL, NULL,
 1889|     47|                               data->set.str[STRING_PROXY_SERVICE_NAME],
 1890|     47|                               CREDS_OPTION, &proxyinfo->creds);
  ------------------
  |  |   31|     47|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
 1891|     47|  }
 1892|  2.26k|  else
 1893|  2.26k|    Curl_creds_unlink(&proxyinfo->creds);
 1894|       |
 1895|  3.55k|  proxyinfo->proxytype = proxytype;
 1896|       |
 1897|  3.57k|error:
 1898|  3.57k|  curlx_free(scheme);
  ------------------
  |  | 1483|  3.57k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1899|  3.57k|  curlx_free(proxyuser);
  ------------------
  |  | 1483|  3.57k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1900|  3.57k|  curlx_free(proxypasswd);
  ------------------
  |  | 1483|  3.57k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1901|  3.57k|  curl_url_cleanup(uhp);
 1902|  3.57k|#ifdef DEBUGBUILD
 1903|  3.57k|  if(!result) {
  ------------------
  |  Branch (1903:6): [True: 3.55k, False: 18]
  ------------------
 1904|  3.55k|    DEBUGASSERT(proxyinfo);
  ------------------
  |  | 1081|  3.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1904:5): [True: 0, False: 3.55k]
  |  Branch (1904:5): [True: 3.55k, False: 0]
  ------------------
 1905|  3.55k|    DEBUGASSERT(proxyinfo->peer);
  ------------------
  |  | 1081|  3.55k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1905:5): [True: 0, False: 3.55k]
  |  Branch (1905:5): [True: 3.55k, False: 0]
  ------------------
 1906|  3.55k|  }
 1907|  3.57k|#endif
 1908|  3.57k|  return result;
 1909|  3.57k|}
url.c:override_login:
 2185|  21.5k|{
 2186|  21.5k|  char **optionsp = &conn->options;
 2187|  21.5k|#ifndef CURL_DISABLE_NETRC
 2188|  21.5k|  struct Curl_creds *ncreds_out = NULL;
 2189|  21.5k|#endif
 2190|  21.5k|  CURLcode result = CURLE_OK;
 2191|       |
 2192|  21.5k|  if(data->set.str[STRING_OPTIONS]) {
  ------------------
  |  Branch (2192:6): [True: 1.74k, False: 19.7k]
  ------------------
 2193|  1.74k|    curlx_free(*optionsp);
  ------------------
  |  | 1483|  1.74k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2194|  1.74k|    *optionsp = curlx_strdup(data->set.str[STRING_OPTIONS]);
  ------------------
  |  | 1477|  1.74k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 2195|  1.74k|    if(!*optionsp) {
  ------------------
  |  Branch (2195:8): [True: 0, False: 1.74k]
  ------------------
 2196|      0|      result = CURLE_OUT_OF_MEMORY;
 2197|      0|      goto out;
 2198|      0|    }
 2199|  1.74k|  }
 2200|       |
 2201|  21.5k|#ifndef CURL_DISABLE_NETRC
 2202|  21.5k|  if(data->set.use_netrc) { /* not CURL_NETRC_IGNORED */
  ------------------
  |  Branch (2202:6): [True: 1.54k, False: 19.9k]
  ------------------
 2203|  1.54k|    struct Curl_creds *ncreds_in = NULL;
 2204|  1.54k|    bool scan_netrc = TRUE;
  ------------------
  |  | 1055|  1.54k|#define TRUE true
  ------------------
 2205|  1.54k|    NETRCcode ret;
 2206|  1.54k|    CURLUcode uc;
 2207|       |
 2208|  1.54k|    if(data->state.creds) {
  ------------------
  |  Branch (2208:8): [True: 1.30k, False: 242]
  ------------------
 2209|  1.30k|      switch(data->state.creds->source) {
 2210|    104|      case CREDS_OPTION:
  ------------------
  |  |   31|    104|#define CREDS_OPTION 2 /* username/passwd set with a CURLOPT_ */
  ------------------
  |  Branch (2210:7): [True: 104, False: 1.20k]
  ------------------
 2211|       |        /* we never override credentials set via CURLOPT_*, leave. */
 2212|    104|        scan_netrc = FALSE;
  ------------------
  |  | 1058|    104|#define FALSE false
  ------------------
 2213|    104|        break;
 2214|  1.20k|      case CREDS_URL: /* only apply when netrc is not required */
  ------------------
  |  |   30|  1.20k|#define CREDS_URL    1 /* username/passwd from URL */
  ------------------
  |  Branch (2214:7): [True: 1.20k, False: 104]
  ------------------
 2215|  1.20k|        if(data->set.use_netrc == CURL_NETRC_REQUIRED) {
  ------------------
  |  | 2359|  1.20k|#define CURL_NETRC_REQUIRED 2L /* A user:password in the URL is ignored.
  ------------------
  |  Branch (2215:12): [True: 1.06k, False: 135]
  ------------------
 2216|       |          /* We ignore password from URL */
 2217|  1.06k|          ncreds_in = data->state.creds;
 2218|  1.06k|        }
 2219|    135|        else if(!Curl_creds_has_user(data->state.creds) ||
  ------------------
  |  |   71|    270|#define Curl_creds_has_user(c)           ((c) && (c)->user[0])
  |  |  ------------------
  |  |  |  Branch (71:43): [True: 135, False: 0]
  |  |  |  Branch (71:50): [True: 30, False: 105]
  |  |  ------------------
  ------------------
 2220|    127|                !Curl_creds_has_passwd(data->state.creds)) {
  ------------------
  |  |   72|     30|#define Curl_creds_has_passwd(c)         ((c) && (c)->passwd[0])
  |  |  ------------------
  |  |  |  Branch (72:43): [True: 30, False: 0]
  |  |  |  Branch (72:50): [True: 8, False: 22]
  |  |  ------------------
  ------------------
 2221|       |          /* We use netrc to complete what is missing */
 2222|    127|          ncreds_in = data->state.creds;
 2223|    127|        }
 2224|      8|        else
 2225|      8|          scan_netrc = FALSE;
  ------------------
  |  | 1058|      8|#define FALSE false
  ------------------
 2226|  1.20k|        break;
 2227|      0|      default: /* ignore credentials from other sources */
  ------------------
  |  Branch (2227:7): [True: 0, False: 1.30k]
  ------------------
 2228|      0|        break;
 2229|  1.30k|      }
 2230|  1.30k|    }
 2231|       |
 2232|  1.54k|    if(!scan_netrc)
  ------------------
  |  Branch (2232:8): [True: 112, False: 1.43k]
  ------------------
 2233|    112|      goto out;
 2234|       |
 2235|  1.43k|    ret = Curl_netrc_scan(data, &data->state.netrc,
 2236|  1.43k|                          conn->origin->hostname,
 2237|  1.43k|                          Curl_creds_user(ncreds_in),
  ------------------
  |  |   75|  1.43k|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 1.19k, False: 242]
  |  |  ------------------
  ------------------
 2238|  1.43k|                          data->set.str[STRING_NETRC_FILE],
 2239|  1.43k|                          &ncreds_out);
 2240|  1.43k|    DEBUGASSERT(!ret || !ncreds_out);
  ------------------
  |  | 1081|  1.43k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2240:5): [True: 1.43k, False: 0]
  |  Branch (2240:5): [True: 0, False: 0]
  |  Branch (2240:5): [True: 0, False: 1.43k]
  |  Branch (2240:5): [True: 1.43k, False: 0]
  ------------------
 2241|  1.43k|    if(ret == NETRC_OUT_OF_MEMORY) {
  ------------------
  |  Branch (2241:8): [True: 0, False: 1.43k]
  ------------------
 2242|      0|      result = CURLE_OUT_OF_MEMORY;
 2243|      0|      goto out;
 2244|      0|    }
 2245|  1.43k|    else if(ret && ((ret == NETRC_NO_MATCH) ||
  ------------------
  |  Branch (2245:13): [True: 1.43k, False: 0]
  |  Branch (2245:21): [True: 1.43k, False: 0]
  ------------------
 2246|  1.43k|                    (data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
  ------------------
  |  | 2357|      0|#define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL is preferred
  ------------------
  |  Branch (2246:21): [True: 0, False: 0]
  ------------------
 2247|  1.43k|      infof(data, "Could not find host %s in the %s file; using defaults",
  ------------------
  |  |  143|  1.43k|  do {                               \
  |  |  144|  1.43k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.43k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.43k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.43k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.43k|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|  1.43k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.43k]
  |  |  ------------------
  ------------------
 2248|  1.43k|            conn->origin->hostname,
 2249|  1.43k|            (data->set.str[STRING_NETRC_FILE] ?
 2250|  1.43k|             data->set.str[STRING_NETRC_FILE] : ".netrc"));
 2251|  1.43k|    }
 2252|      0|    else if(ret) {
  ------------------
  |  Branch (2252:13): [True: 0, False: 0]
  ------------------
 2253|      0|      const char *m = Curl_netrc_strerror(ret);
 2254|      0|      failf(data, ".netrc error: %s", m);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2255|      0|      result = CURLE_READ_ERROR;
 2256|      0|      goto out;
 2257|      0|    }
 2258|      0|    else if(ncreds_out) {
  ------------------
  |  Branch (2258:13): [True: 0, False: 0]
  ------------------
 2259|      0|      if(!(conn->scheme->flags & PROTOPT_USERPWDCTRL)) {
  ------------------
  |  |  232|      0|#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
  ------------------
  |  Branch (2259:10): [True: 0, False: 0]
  ------------------
 2260|       |        /* if the protocol cannot handle control codes in credentials, make
 2261|       |           sure there are none */
 2262|      0|        if(str_has_ctrl(ncreds_out->user) ||
  ------------------
  |  Branch (2262:12): [True: 0, False: 0]
  ------------------
 2263|      0|           str_has_ctrl(ncreds_out->passwd)) {
  ------------------
  |  Branch (2263:12): [True: 0, False: 0]
  ------------------
 2264|      0|          failf(data, "control code detected in .netrc credentials");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 2265|      0|          result = CURLE_READ_ERROR;
 2266|      0|          goto out;
 2267|      0|        }
 2268|      0|      }
 2269|      0|      CURL_TRC_M(data, "netrc: using credentials for %s as %s",
  ------------------
  |  |  148|      0|  do {                                   \
  |  |  149|      0|    if(CURL_TRC_M_is_verbose(data))      \
  |  |  ------------------
  |  |  |  |  135|      0|  Curl_trc_ft_is_verbose(data, &Curl_trc_feat_multi)
  |  |  |  |  ------------------
  |  |  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  150|      0|      Curl_trc_multi(data, __VA_ARGS__); \
  |  |  151|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (151:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2270|      0|                 conn->origin->hostname, ncreds_out->user);
 2271|      0|      result = Curl_creds_merge(ncreds_out->user, ncreds_out->passwd,
 2272|      0|                                data->state.creds, CREDS_NETRC,
  ------------------
  |  |   32|      0|#define CREDS_NETRC  3 /* username/passwd found in netrc */
  ------------------
 2273|      0|                                &data->state.creds);
 2274|      0|      if(result)
  ------------------
  |  Branch (2274:10): [True: 0, False: 0]
  ------------------
 2275|      0|        goto out;
 2276|       |      /* for updated strings, we update them in the URL */
 2277|      0|      uc = curl_url_set(data->state.uh, CURLUPART_USER,
 2278|      0|                        Curl_creds_user(data->state.creds), CURLU_URLENCODE);
  ------------------
  |  |   75|      0|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                                      Curl_creds_user(data->state.creds), CURLU_URLENCODE);
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2279|      0|      if(!uc)
  ------------------
  |  Branch (2279:10): [True: 0, False: 0]
  ------------------
 2280|      0|        uc = curl_url_set(data->state.uh, CURLUPART_PASSWORD,
 2281|      0|                          Curl_creds_passwd(data->state.creds),
  ------------------
  |  |   76|      0|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2282|      0|                          CURLU_URLENCODE);
  ------------------
  |  |   94|      0|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
 2283|      0|      if(uc)
  ------------------
  |  Branch (2283:10): [True: 0, False: 0]
  ------------------
 2284|      0|        result = Curl_uc_to_curlcode(uc);
 2285|      0|    }
 2286|      0|    else
 2287|      0|      DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2287:7): [Folded, False: 0]
  |  Branch (2287:7): [Folded, False: 0]
  ------------------
 2288|  1.43k|  }
 2289|  21.4k|#endif
 2290|       |
 2291|  21.5k|out:
 2292|  21.5k|#ifndef CURL_DISABLE_NETRC
 2293|  21.5k|  Curl_creds_unlink(&ncreds_out);
 2294|  21.5k|#endif
 2295|  21.5k|  return result;
 2296|  21.5k|}
url.c:url_set_conn_login:
 2303|  21.5k|{
 2304|       |  /* If our protocol needs a password and we have none, use the defaults */
 2305|  21.5k|  if((conn->scheme->flags & PROTOPT_NEEDSPWD) && !conn->creds) {
  ------------------
  |  |  216|  21.5k|#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
  ------------------
  |  Branch (2305:6): [True: 0, False: 21.5k]
  |  Branch (2305:50): [True: 0, False: 0]
  ------------------
 2306|      0|    if(data->state.creds)
  ------------------
  |  Branch (2306:8): [True: 0, False: 0]
  ------------------
 2307|      0|      Curl_creds_link(&conn->creds, data->state.creds);
 2308|      0|    else
 2309|      0|      return Curl_creds_create(CURL_DEFAULT_USER, CURL_DEFAULT_PASSWORD,
  ------------------
  |  |   29|      0|#define CURL_DEFAULT_USER     "anonymous"
  ------------------
                    return Curl_creds_create(CURL_DEFAULT_USER, CURL_DEFAULT_PASSWORD,
  ------------------
  |  |   30|      0|#define CURL_DEFAULT_PASSWORD "ftp@example.com"
  ------------------
 2310|      0|                               NULL, NULL, NULL, CREDS_NONE, &conn->creds);
  ------------------
  |  |   29|      0|#define CREDS_NONE   0 /* used for default username/passwd */
  ------------------
 2311|      0|  }
 2312|  21.5k|  else if(!(conn->scheme->flags & PROTOPT_CREDSPERREQUEST)) {
  ------------------
  |  |  220|  21.5k|#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
  ------------------
  |  Branch (2312:11): [True: 20.8k, False: 660]
  ------------------
 2313|       |    /* for protocols that do not handle credentials per request,
 2314|       |     * the connection credentials are set by the initial transfer. */
 2315|  20.8k|    Curl_creds_link(&conn->creds, data->state.creds);
 2316|  20.8k|  }
 2317|       |
 2318|  21.5k|  return CURLE_OK;
 2319|  21.5k|}
url.c:setup_connection_internals:
 1660|  21.5k|{
 1661|  21.5k|  struct Curl_peer *peer = NULL;
 1662|  21.5k|  CURLcode result;
 1663|       |
 1664|  21.5k|  DEBUGF(infof(data, "setup connection, bits.close=%d", conn->bits.close));
  ------------------
  |  | 1067|   150k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 21.5k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 21.5k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
 1665|  21.5k|  if(conn->scheme->run->setup_connection) {
  ------------------
  |  Branch (1665:6): [True: 21.5k, False: 0]
  ------------------
 1666|  21.5k|    result = conn->scheme->run->setup_connection(data, conn);
 1667|  21.5k|    if(result)
  ------------------
  |  Branch (1667:8): [True: 0, False: 21.5k]
  ------------------
 1668|      0|      return result;
 1669|  21.5k|  }
 1670|  21.5k|  DEBUGF(infof(data, "setup connection, bits.close=%d", conn->bits.close));
  ------------------
  |  | 1067|   150k|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 21.5k, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 21.5k]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
 1671|       |
 1672|       |  /* Now create the destination name */
 1673|  21.5k|  peer = Curl_conn_get_destination(conn, FIRSTSOCKET);
  ------------------
  |  |  303|  21.5k|#define FIRSTSOCKET     0
  ------------------
 1674|  21.5k|  if(!peer)
  ------------------
  |  Branch (1674:6): [True: 0, False: 21.5k]
  ------------------
 1675|      0|    return CURLE_FAILED_INIT;
 1676|       |
 1677|       |  /* IPv6 addresses with a scope_id (0 is default == global) have a
 1678|       |   * printable representation with a '%<scope_id>' suffix. */
 1679|  21.5k|  if(peer->ipv6)
  ------------------
  |  Branch (1679:6): [True: 24, False: 21.5k]
  ------------------
 1680|     24|    if(peer->scopeid)
  ------------------
  |  Branch (1680:8): [True: 10, False: 14]
  ------------------
 1681|     10|      conn->destination = curl_maprintf("[%s%%%u]:%u",
 1682|     10|        peer->hostname, peer->scopeid, peer->port);
 1683|     14|    else
 1684|     14|      conn->destination = curl_maprintf("[%s]:%u",
 1685|     14|        peer->hostname, peer->port);
 1686|  21.5k|  else
 1687|  21.5k|    conn->destination = curl_maprintf("%s:%u", peer->hostname, peer->port);
 1688|  21.5k|  if(!conn->destination)
  ------------------
  |  Branch (1688:6): [True: 0, False: 21.5k]
  ------------------
 1689|      0|    return CURLE_OUT_OF_MEMORY;
 1690|       |
 1691|  21.5k|  Curl_strntolower(conn->destination, conn->destination,
 1692|  21.5k|                   strlen(conn->destination));
 1693|       |
 1694|  21.5k|  return CURLE_OK;
 1695|  21.5k|}
url.c:setup_range:
 1623|  21.3k|{
 1624|  21.3k|  struct UrlState *s = &data->state;
 1625|  21.3k|  s->resume_from = data->set.set_resume_from;
 1626|  21.3k|  if(s->resume_from || data->set.str[STRING_SET_RANGE]) {
  ------------------
  |  Branch (1626:6): [True: 501, False: 20.8k]
  |  Branch (1626:24): [True: 550, False: 20.2k]
  ------------------
 1627|  1.05k|    if(s->rangestringalloc)
  ------------------
  |  Branch (1627:8): [True: 626, False: 425]
  ------------------
 1628|    626|      curlx_free(s->range);
  ------------------
  |  | 1483|    626|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1629|       |
 1630|  1.05k|    if(s->resume_from)
  ------------------
  |  Branch (1630:8): [True: 501, False: 550]
  ------------------
 1631|    501|      s->range = curl_maprintf("%" FMT_OFF_T "-", s->resume_from);
 1632|    550|    else
 1633|    550|      s->range = curlx_strdup(data->set.str[STRING_SET_RANGE]);
  ------------------
  |  | 1477|    550|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1634|       |
 1635|  1.05k|    if(!s->range)
  ------------------
  |  Branch (1635:8): [True: 0, False: 1.05k]
  ------------------
 1636|      0|      return CURLE_OUT_OF_MEMORY;
 1637|       |
 1638|  1.05k|    s->rangestringalloc = TRUE;
  ------------------
  |  | 1055|  1.05k|#define TRUE true
  ------------------
 1639|       |
 1640|       |    /* tell ourselves to fetch this range */
 1641|  1.05k|    s->use_range = TRUE;        /* enable range download */
  ------------------
  |  | 1055|  1.05k|#define TRUE true
  ------------------
 1642|  1.05k|  }
 1643|  20.2k|  else
 1644|  20.2k|    s->use_range = FALSE; /* disable range download */
  ------------------
  |  | 1058|  20.2k|#define FALSE false
  ------------------
 1645|       |
 1646|  21.3k|  return CURLE_OK;
 1647|  21.3k|}
url.c:url_attach_existing:
 1221|  21.4k|{
 1222|  21.4k|  struct url_conn_match match;
 1223|  21.4k|  bool success;
 1224|       |
 1225|  21.4k|  DEBUGASSERT(!data->conn);
  ------------------
  |  | 1081|  21.4k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1225:3): [True: 0, False: 21.4k]
  |  Branch (1225:3): [True: 21.4k, False: 0]
  ------------------
 1226|  21.4k|  memset(&match, 0, sizeof(match));
 1227|  21.4k|  match.data = data;
 1228|  21.4k|  match.needle = needle;
 1229|  21.4k|  match.may_multiplex = xfer_may_multiplex(data, needle);
 1230|       |
 1231|       |#ifdef USE_NTLM
 1232|       |  match.want_ntlm_http =
 1233|       |    (data->state.authhost.want & CURLAUTH_NTLM) &&
 1234|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1235|       |#ifndef CURL_DISABLE_PROXY
 1236|       |  match.want_proxy_ntlm_http =
 1237|       |    needle->http_proxy.creds &&
 1238|       |    (data->state.authproxy.want & CURLAUTH_NTLM) &&
 1239|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1240|       |#endif
 1241|       |#endif
 1242|       |
 1243|       |#if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
 1244|       |  match.want_nego_http =
 1245|       |    (data->state.authhost.want & CURLAUTH_NEGOTIATE) &&
 1246|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1247|       |#ifndef CURL_DISABLE_PROXY
 1248|       |  match.want_proxy_nego_http =
 1249|       |    needle->http_proxy.creds &&
 1250|       |    (data->state.authproxy.want & CURLAUTH_NEGOTIATE) &&
 1251|       |    (needle->scheme->protocol & PROTO_FAMILY_HTTP);
 1252|       |#endif
 1253|       |#endif
 1254|  21.4k|  match.require_tls = data->set.use_ssl >= CURLUSESSL_CONTROL;
  ------------------
  |  |  926|  21.4k|#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
  ------------------
 1255|  21.4k|  match.may_tls = data->set.use_ssl > CURLUSESSL_NONE;
  ------------------
  |  |  924|  21.4k|#define CURLUSESSL_NONE    0L /* do not attempt to use SSL */
  ------------------
 1256|       |
 1257|       |  /* Find a connection in the pool that matches what "data + needle"
 1258|       |   * requires. If a suitable candidate is found, it is attached to "data". */
 1259|  21.4k|  success = Curl_cpool_find(data, needle->destination,
 1260|  21.4k|                            url_match_conn, url_match_result, &match);
 1261|       |
 1262|       |  /* wait_pipe is TRUE if we encounter a bundle that is undecided. There
 1263|       |   * is no matching connection then, yet. */
 1264|  21.4k|  *waitpipe = (bool)match.wait_pipe;
 1265|  21.4k|  return success;
 1266|  21.4k|}
url.c:xfer_may_multiplex:
  534|  21.4k|{
  535|  21.4k|#ifndef CURL_DISABLE_HTTP
  536|       |  /* If an HTTP protocol and multiplexing is enabled */
  537|  21.4k|  if((conn->scheme->protocol & PROTO_FAMILY_HTTP) &&
  ------------------
  |  |   84|  21.4k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  21.4k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  21.4k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  21.4k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  21.4k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  21.4k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (537:6): [True: 660, False: 20.8k]
  ------------------
  538|    660|     (!conn->bits.protoconnstart || !conn->bits.close)) {
  ------------------
  |  Branch (538:7): [True: 660, False: 0]
  |  Branch (538:37): [True: 0, False: 0]
  ------------------
  539|       |
  540|    660|    if(Curl_multiplex_wanted(data->multi) &&
  ------------------
  |  Branch (540:8): [True: 660, False: 0]
  ------------------
  541|    660|       (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   41|    660|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                     (data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)))
  ------------------
  |  |   42|    660|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (541:8): [True: 660, False: 0]
  ------------------
  542|       |      /* allows HTTP/2 or newer */
  543|    660|      return TRUE;
  ------------------
  |  | 1055|    660|#define TRUE true
  ------------------
  544|    660|  }
  545|       |#else
  546|       |  (void)data;
  547|       |  (void)conn;
  548|       |#endif
  549|  20.8k|  return FALSE;
  ------------------
  |  | 1058|  20.8k|#define FALSE false
  ------------------
  550|  21.4k|}
url.c:url_match_conn:
 1126|  10.5k|{
 1127|  10.5k|  struct url_conn_match *m = userdata;
 1128|       |  /* Check if `conn` can be used for transfer `m->data` */
 1129|       |
 1130|       |  /* general connect config setting match? */
 1131|  10.5k|  if(!url_match_connect_config(conn, m))
  ------------------
  |  Branch (1131:6): [True: 0, False: 10.5k]
  ------------------
 1132|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1133|       |
 1134|       |  /* match for destination and protocol? */
 1135|  10.5k|  if(!url_match_destination(conn, m))
  ------------------
  |  Branch (1135:6): [True: 15, False: 10.5k]
  ------------------
 1136|     15|    return FALSE;
  ------------------
  |  | 1058|     15|#define FALSE false
  ------------------
 1137|       |
 1138|  10.5k|  if(!url_match_fully_connected(conn, m))
  ------------------
  |  Branch (1138:6): [True: 238, False: 10.2k]
  ------------------
 1139|    238|    return FALSE;
  ------------------
  |  | 1058|    238|#define FALSE false
  ------------------
 1140|       |
 1141|  10.2k|  if(!url_match_multiplex_needs(conn, m))
  ------------------
  |  Branch (1141:6): [True: 0, False: 10.2k]
  ------------------
 1142|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1143|       |
 1144|  10.2k|  if(!url_match_proxy_use(conn, m))
  ------------------
  |  Branch (1144:6): [True: 0, False: 10.2k]
  ------------------
 1145|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1146|  10.2k|  if(!url_match_ssl_config(conn, m))
  ------------------
  |  Branch (1146:6): [True: 0, False: 10.2k]
  ------------------
 1147|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1148|       |
 1149|  10.2k|  if(!url_match_http_multiplex(conn, m))
  ------------------
  |  Branch (1149:6): [True: 0, False: 10.2k]
  ------------------
 1150|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1151|  10.2k|  else if(m->wait_pipe)
  ------------------
  |  Branch (1151:11): [True: 0, False: 10.2k]
  ------------------
 1152|       |    /* we decided to wait on PIPELINING */
 1153|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1154|       |
 1155|  10.2k|  if(!url_match_auth(conn, m))
  ------------------
  |  Branch (1155:6): [True: 20, False: 10.2k]
  ------------------
 1156|     20|    return FALSE;
  ------------------
  |  | 1058|     20|#define FALSE false
  ------------------
 1157|       |
 1158|  10.2k|  if(!url_match_proto_config(conn, m))
  ------------------
  |  Branch (1158:6): [True: 0, False: 10.2k]
  ------------------
 1159|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1160|       |
 1161|  10.2k|  if(!url_match_auth_ntlm(conn, m))
  ------------------
  |  | 1069|  10.2k|#define url_match_auth_ntlm(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1055|  10.2k|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1161:6): [True: 0, False: 10.2k]
  ------------------
 1162|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1163|  10.2k|  else if(m->force_reuse)
  ------------------
  |  Branch (1163:11): [True: 0, False: 10.2k]
  ------------------
 1164|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1165|       |
 1166|  10.2k|  if(!url_match_auth_nego(conn, m))
  ------------------
  |  | 1122|  10.2k|#define url_match_auth_nego(c, m) ((void)(c), (void)(m), TRUE)
  |  |  ------------------
  |  |  |  | 1055|  10.2k|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (1166:6): [True: 0, False: 10.2k]
  ------------------
 1167|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1168|  10.2k|  else if(m->force_reuse)
  ------------------
  |  Branch (1168:11): [True: 0, False: 10.2k]
  ------------------
 1169|      0|    return TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1170|       |
 1171|  10.2k|  if(!url_match_multiplex_limits(conn, m))
  ------------------
  |  Branch (1171:6): [True: 0, False: 10.2k]
  ------------------
 1172|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1173|       |
 1174|  10.2k|  if(!CONN_INUSE(conn) && Curl_conn_seems_dead(conn, m->data)) {
  ------------------
  |  |  346|  20.5k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  ------------------
  |  Branch (1174:6): [True: 10.2k, False: 0]
  |  Branch (1174:27): [True: 0, False: 10.2k]
  ------------------
 1175|       |    /* remove and disconnect. */
 1176|      0|    Curl_conn_terminate(m->data, conn, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1177|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1178|      0|  }
 1179|       |
 1180|       |  /* conn matches our needs. */
 1181|  10.2k|  m->found = conn;
 1182|       |  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
 1183|  10.2k|}
url.c:url_match_connect_config:
  692|  10.5k|{
  693|       |  /* connect-only or to-be-closed connections will not be reused */
  694|  10.5k|  if(conn->bits.connect_only || conn->bits.close || conn->bits.no_reuse)
  ------------------
  |  Branch (694:6): [True: 0, False: 10.5k]
  |  Branch (694:33): [True: 0, False: 10.5k]
  |  Branch (694:53): [True: 0, False: 10.5k]
  ------------------
  695|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  696|       |
  697|       |  /* ip_version must match */
  698|  10.5k|  if(m->data->set.ipver != CURL_IPRESOLVE_WHATEVER &&
  ------------------
  |  | 2303|  21.0k|#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
  ------------------
  |  Branch (698:6): [True: 46, False: 10.5k]
  ------------------
  699|     46|     m->data->set.ipver != conn->ip_version)
  ------------------
  |  Branch (699:6): [True: 0, False: 46]
  ------------------
  700|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  701|       |
  702|  10.5k|  if(m->needle->localdev || m->needle->localport) {
  ------------------
  |  Branch (702:6): [True: 1.08k, False: 9.46k]
  |  Branch (702:29): [True: 173, False: 9.29k]
  ------------------
  703|       |    /* If we are bound to a specific local end (IP+port), we must not reuse a
  704|       |       random other one, although if we did not ask for a particular one we
  705|       |       can reuse one that was bound.
  706|       |
  707|       |       This comparison is a bit rough and too strict. Since the input
  708|       |       parameters can be specified in numerous ways and still end up the same
  709|       |       it would take a lot of processing to make it really accurate. Instead,
  710|       |       this matching will assume that reuses of bound connections will most
  711|       |       likely also reuse the exact same binding parameters and missing out a
  712|       |       few edge cases should not hurt anyone much.
  713|       |    */
  714|  1.25k|    if((conn->localport != m->needle->localport) ||
  ------------------
  |  Branch (714:8): [True: 0, False: 1.25k]
  ------------------
  715|  1.25k|       (conn->localportrange != m->needle->localportrange) ||
  ------------------
  |  Branch (715:8): [True: 0, False: 1.25k]
  ------------------
  716|  1.25k|       (m->needle->localdev &&
  ------------------
  |  Branch (716:9): [True: 1.08k, False: 173]
  ------------------
  717|  1.08k|        (!conn->localdev || strcmp(conn->localdev, m->needle->localdev))))
  ------------------
  |  Branch (717:10): [True: 0, False: 1.08k]
  |  Branch (717:29): [True: 0, False: 1.08k]
  ------------------
  718|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  719|  1.25k|  }
  720|       |
  721|  10.5k|  if(!m->needle->via_peer != !conn->via_peer)
  ------------------
  |  Branch (721:6): [True: 0, False: 10.5k]
  ------------------
  722|       |    /* do not mix connections that use the "connect to host" feature and
  723|       |     * connections that do not use this feature */
  724|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  725|       |
  726|  10.5k|  return TRUE;
  ------------------
  |  | 1055|  10.5k|#define TRUE true
  ------------------
  727|  10.5k|}
url.c:url_match_destination:
  955|  10.5k|{
  956|       |  /* Different connect-to peers never match */
  957|  10.5k|  if(!Curl_peer_same_destination(m->needle->via_peer, conn->via_peer))
  ------------------
  |  Branch (957:6): [True: 0, False: 10.5k]
  ------------------
  958|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  959|       |
  960|  10.5k|#ifndef CURL_DISABLE_PROXY
  961|  10.5k|  if(m->needle->bits.httpproxy && !m->needle->bits.tunnel_proxy) {
  ------------------
  |  Branch (961:6): [True: 20, False: 10.5k]
  |  Branch (961:35): [True: 0, False: 20]
  ------------------
  962|       |    /* Talking to a non-tunneling HTTP proxy matches on proxy peers. */
  963|      0|    return Curl_peer_equal(m->needle->http_proxy.peer,
  964|      0|                           conn->http_proxy.peer);
  965|      0|  }
  966|  10.5k|#endif
  967|       |
  968|  10.5k|  if(m->needle->origin->scheme != conn->origin->scheme) {
  ------------------
  |  Branch (968:6): [True: 0, False: 10.5k]
  ------------------
  969|       |    /* `needle` and `conn` not having the same scheme.
  970|       |     * This is allowed for the same family *if* conn is using TLS.
  971|       |     * - IMAP+STARTTLS works for IMAPS.
  972|       |     * - IMAPS works for IMAP. */
  973|      0|    if(get_protocol_family(conn->origin->scheme) !=
  ------------------
  |  Branch (973:8): [True: 0, False: 0]
  ------------------
  974|      0|       m->needle->scheme->protocol) {
  975|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  976|      0|    }
  977|      0|    if(!url_match_ssl_use(conn, m)) {
  ------------------
  |  Branch (977:8): [True: 0, False: 0]
  ------------------
  978|      0|      DEBUGF(infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  979|      0|                   " has compatible protocol family, but no SSL, no match",
  980|      0|                   conn->connection_id));
  981|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  982|      0|    }
  983|      0|  }
  984|       |  /* Scheme mismatch is acceptable, just compare hostname/port */
  985|  10.5k|  return Curl_peer_same_destination(m->needle->origin, conn->origin);
  986|  10.5k|}
url.c:get_protocol_family:
  143|  10.2k|{
  144|  10.2k|  DEBUGASSERT(s);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (144:3): [True: 0, False: 10.2k]
  |  Branch (144:3): [True: 10.2k, False: 0]
  ------------------
  145|  10.2k|  DEBUGASSERT(s->family);
  ------------------
  |  | 1081|  10.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (145:3): [True: 0, False: 10.2k]
  |  Branch (145:3): [True: 10.2k, False: 0]
  ------------------
  146|  10.2k|  return s->family;
  147|  10.2k|}
url.c:url_match_fully_connected:
  731|  10.5k|{
  732|  10.5k|  if(!Curl_conn_is_connected(conn, FIRSTSOCKET) ||
  ------------------
  |  |  303|  10.5k|#define FIRSTSOCKET     0
  ------------------
  |  Branch (732:6): [True: 238, False: 10.2k]
  ------------------
  733|  10.2k|     conn->bits.upgrade_in_progress) {
  ------------------
  |  Branch (733:6): [True: 0, False: 10.2k]
  ------------------
  734|       |    /* Not yet connected, or a protocol upgrade is in progress. The later
  735|       |     * happens for HTTP/2 Upgrade: requests that need a response. */
  736|    238|    if(m->may_multiplex) {
  ------------------
  |  Branch (736:8): [True: 238, False: 0]
  ------------------
  737|    238|      m->seen_pending_conn = TRUE;
  ------------------
  |  | 1055|    238|#define TRUE true
  ------------------
  738|       |      /* Do not pick a connection that has not connected yet */
  739|    238|      infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  |  143|    238|  do {                               \
  |  |  144|    238|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    238|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 238, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 238]
  |  |  |  |  ------------------
  |  |  |  |  320|    238|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    238|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    238|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 238]
  |  |  ------------------
  ------------------
  740|    238|            " is not open enough, cannot reuse", conn->connection_id);
  741|    238|    }
  742|       |    /* Do not pick a connection that has not connected yet */
  743|    238|    return FALSE;
  ------------------
  |  | 1058|    238|#define FALSE false
  ------------------
  744|    238|  }
  745|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  746|  10.5k|}
url.c:url_match_multiplex_needs:
  761|  10.2k|{
  762|  10.2k|  if(CONN_INUSE(conn)) {
  ------------------
  |  |  346|  10.2k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
  763|      0|    if(!conn->bits.multiplex) {
  ------------------
  |  Branch (763:8): [True: 0, False: 0]
  ------------------
  764|       |      /* conn busy and conn cannot take more transfers */
  765|      0|      m->seen_single_use_conn = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  766|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  767|      0|    }
  768|      0|    m->seen_multiplex_conn = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  769|      0|    if(!m->may_multiplex || !url_match_multi(conn, m))
  ------------------
  |  Branch (769:8): [True: 0, False: 0]
  |  Branch (769:29): [True: 0, False: 0]
  ------------------
  770|       |      /* conn busy and transfer cannot be multiplexed */
  771|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  772|      0|  }
  773|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  774|  10.2k|}
url.c:url_match_proxy_use:
  824|  10.2k|{
  825|  10.2k|  if(m->needle->bits.httpproxy != conn->bits.httpproxy ||
  ------------------
  |  Branch (825:6): [True: 0, False: 10.2k]
  ------------------
  826|  10.2k|     m->needle->bits.socksproxy != conn->bits.socksproxy)
  ------------------
  |  Branch (826:6): [True: 0, False: 10.2k]
  ------------------
  827|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  828|       |
  829|  10.2k|  if(m->needle->bits.socksproxy &&
  ------------------
  |  Branch (829:6): [True: 0, False: 10.2k]
  ------------------
  830|      0|     !proxy_info_matches(&m->needle->socks_proxy, &conn->socks_proxy))
  ------------------
  |  Branch (830:6): [True: 0, False: 0]
  ------------------
  831|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  832|       |
  833|  10.2k|  if(m->needle->bits.httpproxy) {
  ------------------
  |  Branch (833:6): [True: 20, False: 10.2k]
  ------------------
  834|     20|    if(m->needle->bits.tunnel_proxy != conn->bits.tunnel_proxy)
  ------------------
  |  Branch (834:8): [True: 0, False: 20]
  ------------------
  835|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  836|       |
  837|     20|    if(!proxy_info_matches(&m->needle->http_proxy, &conn->http_proxy))
  ------------------
  |  Branch (837:8): [True: 0, False: 20]
  ------------------
  838|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  839|       |
  840|     20|    if(IS_HTTPS_PROXY(m->needle->http_proxy.proxytype)) {
  ------------------
  |  |   80|     20|  (((t) == CURLPROXY_HTTPS) ||  \
  |  |  ------------------
  |  |  |  |  794|     20|#define CURLPROXY_HTTPS           2L /* HTTPS but stick to HTTP/1
  |  |  ------------------
  |  |  |  Branch (80:4): [True: 0, False: 20]
  |  |  ------------------
  |  |   81|     20|   ((t) == CURLPROXY_HTTPS2) || \
  |  |  ------------------
  |  |  |  |  796|     20|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  |  |  ------------------
  |  |  |  Branch (81:4): [True: 0, False: 20]
  |  |  ------------------
  |  |   82|     20|   ((t) == CURLPROXY_HTTPS3))
  |  |  ------------------
  |  |  |  |  805|     20|#define CURLPROXY_HTTPS3          8L /* HTTPS and attempt HTTP/3
  |  |  ------------------
  |  |  |  Branch (82:4): [True: 0, False: 20]
  |  |  ------------------
  ------------------
  841|       |      /* https proxies come in different types, http/1.1, h2, ... */
  842|      0|      if(m->needle->http_proxy.proxytype != conn->http_proxy.proxytype)
  ------------------
  |  Branch (842:10): [True: 0, False: 0]
  ------------------
  843|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  844|       |      /* match SSL config to proxy */
  845|      0|      if(!Curl_ssl_conn_config_match(m->data, conn, TRUE)) {
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  |  Branch (845:10): [True: 0, False: 0]
  ------------------
  846|      0|        DEBUGF(infof(m->data,
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  847|      0|                     "Connection #%" FMT_OFF_T
  848|      0|                     " has different SSL proxy parameters, cannot reuse",
  849|      0|                     conn->connection_id));
  850|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  851|      0|      }
  852|       |      /* the SSL config to the server, which may apply here is checked
  853|       |       * further below */
  854|      0|    }
  855|     20|  }
  856|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  857|  10.2k|}
url.c:proxy_info_matches:
  555|     20|{
  556|     20|  if((data->proxytype == needle->proxytype) &&
  ------------------
  |  Branch (556:6): [True: 20, False: 0]
  ------------------
  557|     20|     Curl_peer_same_destination(data->peer, needle->peer) &&
  ------------------
  |  Branch (557:6): [True: 20, False: 0]
  ------------------
  558|     20|     Curl_creds_same(data->creds, needle->creds)) {
  ------------------
  |  Branch (558:6): [True: 20, False: 0]
  ------------------
  559|     20|    return TRUE;
  ------------------
  |  | 1055|     20|#define TRUE true
  ------------------
  560|     20|  }
  561|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  562|     20|}
url.c:url_match_ssl_config:
  990|  10.2k|{
  991|       |  /* If talking/upgrading to TLS, conn needs to use the same SSL options. */
  992|  10.2k|  if(((m->needle->scheme->flags & PROTOPT_SSL) || m->may_tls) &&
  ------------------
  |  |  207|  10.2k|#define PROTOPT_SSL (1 << 0)       /* uses SSL */
  ------------------
  |  Branch (992:7): [True: 0, False: 10.2k]
  |  Branch (992:51): [True: 59, False: 10.2k]
  ------------------
  993|     59|     !Curl_ssl_conn_config_match(m->data, conn, FALSE)) {
  ------------------
  |  | 1058|     59|#define FALSE false
  ------------------
  |  Branch (993:6): [True: 0, False: 59]
  ------------------
  994|      0|    DEBUGF(infof(m->data, "Connection #%" FMT_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  995|      0|                 " has different SSL parameters, cannot reuse",
  996|      0|                 conn->connection_id));
  997|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  998|      0|  }
  999|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
 1000|  10.2k|}
url.c:url_match_http_multiplex:
  865|  10.2k|{
  866|  10.2k|  if(m->may_multiplex &&
  ------------------
  |  Branch (866:6): [True: 0, False: 10.2k]
  ------------------
  867|      0|     (m->data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)) &&
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
                   (m->data->state.http_neg.allowed & (CURL_HTTP_V2x | CURL_HTTP_V3x)) &&
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (867:6): [True: 0, False: 0]
  ------------------
  868|      0|     (m->needle->scheme->protocol & CURLPROTO_HTTP) &&
  ------------------
  |  | 1078|      0|#define CURLPROTO_HTTP    (1L << 0)
  ------------------
  |  Branch (868:6): [True: 0, False: 0]
  ------------------
  869|      0|     !conn->httpversion_seen) {
  ------------------
  |  Branch (869:6): [True: 0, False: 0]
  ------------------
  870|      0|    if(m->data->set.pipewait) {
  ------------------
  |  Branch (870:8): [True: 0, False: 0]
  ------------------
  871|      0|      infof(m->data, "Server upgrade does not support multiplex yet, wait");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  872|      0|      m->found = NULL;
  873|      0|      m->wait_pipe = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  874|      0|      return TRUE; /* stop searching, we want to wait */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  875|      0|    }
  876|      0|    infof(m->data, "Server upgrade cannot be used");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  877|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  878|      0|  }
  879|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  880|  10.2k|}
url.c:url_match_auth:
  936|  10.2k|{
  937|  10.2k|  if(!Curl_creds_same(m->needle->creds, conn->creds)) {
  ------------------
  |  Branch (937:6): [True: 20, False: 10.2k]
  ------------------
  938|     20|    if(m->needle->creds)
  ------------------
  |  Branch (938:8): [True: 14, False: 6]
  ------------------
  939|     14|      return FALSE;
  ------------------
  |  | 1058|     14|#define FALSE false
  ------------------
  940|      6|    if(!Curl_creds_same(m->data->state.creds, conn->creds))
  ------------------
  |  Branch (940:8): [True: 6, False: 0]
  ------------------
  941|      6|      return FALSE;
  ------------------
  |  | 1058|      6|#define FALSE false
  ------------------
  942|      6|  }
  943|       |#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
  944|       |  /* GSS delegation differences do not actually affect every connection and
  945|       |     auth method, but this check takes precaution before efficiency */
  946|       |  if(m->needle->gssapi_delegation != conn->gssapi_delegation)
  947|       |    return FALSE;
  948|       |#endif
  949|       |
  950|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  951|  10.2k|}
url.c:url_match_proto_config:
  921|  10.2k|{
  922|  10.2k|  if(!url_match_http_version(conn, m))
  ------------------
  |  Branch (922:6): [True: 0, False: 10.2k]
  ------------------
  923|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  924|       |
  925|  10.2k|#ifndef CURL_DISABLE_FTP
  926|  10.2k|  else if(get_protocol_family(m->needle->scheme) & PROTO_FAMILY_FTP) {
  ------------------
  |  |   86|  10.2k|#define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1080|  10.2k|#define CURLPROTO_FTP     (1L << 2)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_FTP  (CURLPROTO_FTP | CURLPROTO_FTPS)
  |  |  ------------------
  |  |  |  | 1081|  10.2k|#define CURLPROTO_FTPS    (1L << 3)
  |  |  ------------------
  ------------------
  |  Branch (926:11): [True: 0, False: 10.2k]
  ------------------
  927|      0|    if(!ftp_conns_match(m->needle, conn))
  ------------------
  |  Branch (927:8): [True: 0, False: 0]
  ------------------
  928|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  929|      0|  }
  930|  10.2k|#endif
  931|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  932|  10.2k|}
url.c:url_match_http_version:
  884|  10.2k|{
  885|       |  /* If looking for HTTP and the HTTP versions allowed do not include
  886|       |   * the HTTP version of conn, continue looking. */
  887|  10.2k|  if((m->needle->scheme->protocol & PROTO_FAMILY_HTTP)) {
  ------------------
  |  |   84|  10.2k|#define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1078|  10.2k|#define CURLPROTO_HTTP    (1L << 0)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  | 1079|  10.2k|#define CURLPROTO_HTTPS   (1L << 1)
  |  |  ------------------
  |  |               #define PROTO_FAMILY_HTTP (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_WS | \
  |  |  ------------------
  |  |  |  |   63|  10.2k|#define CURLPROTO_WS     (1L << 30)
  |  |  ------------------
  |  |   85|  10.2k|                           CURLPROTO_WSS)
  |  |  ------------------
  |  |  |  |   64|  10.2k|#define CURLPROTO_WSS    ((curl_prot_t)1 << 31)
  |  |  ------------------
  ------------------
  |  Branch (887:6): [True: 0, False: 10.2k]
  ------------------
  888|      0|    switch(Curl_conn_http_version(m->data, conn)) {
  889|      0|    case 30:
  ------------------
  |  Branch (889:5): [True: 0, False: 0]
  ------------------
  890|      0|      if(!(m->data->state.http_neg.allowed & CURL_HTTP_V3x)) {
  ------------------
  |  |   42|      0|#define CURL_HTTP_V3x   (1 << 2)
  ------------------
  |  Branch (890:10): [True: 0, False: 0]
  ------------------
  891|      0|        DEBUGF(infof(m->data, "not reusing conn #%" CURL_FORMAT_CURL_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  892|      0|                     ", we do not want h3", conn->connection_id));
  893|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  894|      0|      }
  895|      0|      break;
  896|      0|    case 20:
  ------------------
  |  Branch (896:5): [True: 0, False: 0]
  ------------------
  897|      0|      if(!(m->data->state.http_neg.allowed & CURL_HTTP_V2x)) {
  ------------------
  |  |   41|      0|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (897:10): [True: 0, False: 0]
  ------------------
  898|      0|        DEBUGF(infof(m->data, "not reusing conn #%" CURL_FORMAT_CURL_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  899|      0|                     ", we do not want h2", conn->connection_id));
  900|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  901|      0|      }
  902|      0|      break;
  903|      0|    default:
  ------------------
  |  Branch (903:5): [True: 0, False: 0]
  ------------------
  904|      0|      if(!(m->data->state.http_neg.allowed & CURL_HTTP_V1x)) {
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (904:10): [True: 0, False: 0]
  ------------------
  905|      0|        DEBUGF(infof(m->data, "not reusing conn #%" CURL_FORMAT_CURL_OFF_T
  ------------------
  |  | 1067|      0|#define DEBUGF(x) x
  |  |  ------------------
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [True: 0, False: 0]
  |  |  |  Branch (1067:19): [Folded, False: 0]
  |  |  ------------------
  ------------------
  906|      0|                     ", we do not want h1", conn->connection_id));
  907|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  908|      0|      }
  909|      0|      break;
  910|      0|    }
  911|      0|  }
  912|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  913|  10.2k|}
url.c:url_match_multiplex_limits:
  778|  10.2k|{
  779|  10.2k|  if(CONN_INUSE(conn) && m->may_multiplex) {
  ------------------
  |  |  346|  20.5k|#define CONN_INUSE(c) (!!(c)->attached_xfers)
  |  |  ------------------
  |  |  |  Branch (346:23): [True: 0, False: 10.2k]
  |  |  ------------------
  ------------------
  |  Branch (779:26): [True: 0, False: 0]
  ------------------
  780|      0|    DEBUGASSERT(conn->bits.multiplex);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (780:5): [True: 0, False: 0]
  |  Branch (780:5): [True: 0, False: 0]
  ------------------
  781|       |    /* If multiplexed, make sure we do not go over concurrency limit */
  782|      0|    if(conn->attached_xfers >=
  ------------------
  |  Branch (782:8): [True: 0, False: 0]
  ------------------
  783|      0|            Curl_multi_max_concurrent_streams(m->data->multi)) {
  784|      0|      infof(m->data, "client side MAX_CONCURRENT_STREAMS reached"
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  785|      0|            ", skip (%u)", conn->attached_xfers);
  786|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  787|      0|    }
  788|      0|    if(conn->attached_xfers >=
  ------------------
  |  Branch (788:8): [True: 0, False: 0]
  ------------------
  789|      0|       Curl_conn_get_max_concurrent(m->data, conn, FIRSTSOCKET)) {
  ------------------
  |  |  303|      0|#define FIRSTSOCKET     0
  ------------------
  790|      0|      infof(m->data, "MAX_CONCURRENT_STREAMS reached, skip (%u)",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  791|      0|            conn->attached_xfers);
  792|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  793|      0|    }
  794|       |    /* When not multiplexed, we have a match here! */
  795|      0|    infof(m->data, "Multiplexed connection found");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  796|      0|  }
  797|  10.2k|  return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
  798|  10.2k|}
url.c:url_match_result:
 1186|  21.4k|{
 1187|  21.4k|  struct url_conn_match *match = userdata;
 1188|  21.4k|  if(match->found) {
  ------------------
  |  Branch (1188:6): [True: 10.2k, False: 11.1k]
  ------------------
 1189|       |    /* Attach it now while still under lock, so the connection does
 1190|       |     * no longer appear idle and can be reaped. */
 1191|  10.2k|    Curl_attach_connection(match->data, match->found);
 1192|  10.2k|    return TRUE;
  ------------------
  |  | 1055|  10.2k|#define TRUE true
  ------------------
 1193|  10.2k|  }
 1194|  11.1k|  else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
  ------------------
  |  Branch (1194:11): [True: 0, False: 11.1k]
  |  Branch (1194:42): [True: 0, False: 0]
  ------------------
 1195|       |    /* We have seen a single-use, existing connection to the destination and
 1196|       |     * no multiplexed one. It seems safe to assume that the server does
 1197|       |     * not support multiplexing. */
 1198|      0|    match->wait_pipe = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1199|      0|  }
 1200|  11.1k|  else if(match->seen_pending_conn && match->data->set.pipewait) {
  ------------------
  |  Branch (1200:11): [True: 238, False: 10.9k]
  |  Branch (1200:39): [True: 238, False: 0]
  ------------------
 1201|    238|    infof(match->data,
  ------------------
  |  |  143|    238|  do {                               \
  |  |  144|    238|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    238|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 238, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 238]
  |  |  |  |  ------------------
  |  |  |  |  320|    238|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    238|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    238|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 238]
  |  |  ------------------
  ------------------
 1202|    238|          "Found pending candidate for reuse and CURLOPT_PIPEWAIT is set");
 1203|    238|    match->wait_pipe = TRUE;
  ------------------
  |  | 1055|    238|#define TRUE true
  ------------------
 1204|    238|  }
 1205|  11.1k|  match->force_reuse = FALSE;
  ------------------
  |  | 1058|  11.1k|#define FALSE false
  ------------------
 1206|       |  return FALSE;
  ------------------
  |  | 1058|  11.1k|#define FALSE false
  ------------------
 1207|  21.4k|}
url.c:url_conn_reuse_adjust:
 2531|  10.2k|{
 2532|  10.2k|  struct connectdata *conn = data->conn;
 2533|       |
 2534|       |  /* get the user+password information from the needle since it may
 2535|       |   * be new for this request even when we reuse conn */
 2536|  10.2k|  if(needle->creds) {
  ------------------
  |  Branch (2536:6): [True: 7.95k, False: 2.31k]
  ------------------
 2537|       |    /* use the new username and password though */
 2538|  7.95k|    Curl_creds_link(&conn->creds, needle->creds);
 2539|  7.95k|  }
 2540|       |
 2541|  10.2k|#ifndef CURL_DISABLE_PROXY
 2542|       |  /* use the new proxy username and proxy password though */
 2543|  10.2k|  Curl_creds_link(&conn->http_proxy.creds, needle->http_proxy.creds);
 2544|  10.2k|  Curl_creds_link(&conn->socks_proxy.creds, needle->socks_proxy.creds);
 2545|  10.2k|#endif
 2546|       |
 2547|       |  /* Finding a connection for reuse in the cpool matches, among other
 2548|       |   * things on the "remote-relevant" hostname. This is not necessarily
 2549|       |   * the authority of the URL, e.g. conn->origin. For example:
 2550|       |   * - we use a proxy (not tunneling). we want to send all requests
 2551|       |   *   that use the same proxy on this connection.
 2552|       |   * - we have a "connect-to" setting that may redirect the hostname of
 2553|       |   *   a new request to the same remote endpoint of an existing conn.
 2554|       |   *   We want to reuse an existing conn to the remote endpoint.
 2555|       |   * Since connection reuse does not match on conn->origin necessarily, we
 2556|       |   * switch conn to needle's host settings.
 2557|       |   */
 2558|  10.2k|  Curl_peer_link(&conn->origin, needle->origin);
 2559|  10.2k|  Curl_peer_link(&conn->via_peer, needle->via_peer);
 2560|  10.2k|  Curl_peer_link(&conn->origin2, needle->origin2);
 2561|  10.2k|  Curl_peer_link(&conn->via_peer2, needle->via_peer2);
 2562|  10.2k|}

urlencode_str:
  129|  69.5k|{
  130|       |  /* we must add this with whitespace-replacing */
  131|  69.5k|  const unsigned char *iptr;
  132|  69.5k|  const unsigned char *host_sep = (const unsigned char *)url;
  133|  69.5k|  CURLcode result = CURLE_OK;
  134|       |
  135|  69.5k|  DEBUGASSERT((query >= QUERY_NO) && (query <= QUERY_YES));
  ------------------
  |  | 1081|  69.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (135:3): [True: 0, False: 69.5k]
  |  Branch (135:3): [True: 0, False: 0]
  |  Branch (135:3): [True: 69.5k, False: 0]
  |  Branch (135:3): [True: 69.5k, False: 0]
  ------------------
  136|       |
  137|  69.5k|  if(!relative) {
  ------------------
  |  Branch (137:6): [True: 14, False: 69.5k]
  ------------------
  138|     14|    size_t n;
  139|     14|    host_sep = (const unsigned char *)find_host_sep(url);
  140|       |
  141|       |    /* output the first piece as-is */
  142|     14|    n = (const char *)host_sep - url;
  143|     14|    result = curlx_dyn_addn(o, url, n);
  144|     14|    len -= n;
  145|     14|  }
  146|       |
  147|  37.2M|  for(iptr = host_sep; len && !result; iptr++, len--) {
  ------------------
  |  Branch (147:24): [True: 37.2M, False: 69.5k]
  |  Branch (147:31): [True: 37.2M, False: 0]
  ------------------
  148|  37.2M|    if(*iptr == ' ') {
  ------------------
  |  Branch (148:8): [True: 13.8k, False: 37.2M]
  ------------------
  149|  13.8k|      if(query != QUERY_YES)
  ------------------
  |  |   54|  13.8k|#define QUERY_YES     4
  ------------------
  |  Branch (149:10): [True: 4.64k, False: 9.18k]
  ------------------
  150|  4.64k|        result = curlx_dyn_addn(o, "%20", 3);
  151|  9.18k|      else
  152|  9.18k|        result = curlx_dyn_addn(o, "+", 1);
  153|  13.8k|    }
  154|  37.2M|    else if((*iptr < ' ') || (*iptr >= 0x7f)) {
  ------------------
  |  Branch (154:13): [True: 20.1k, False: 37.1M]
  |  Branch (154:30): [True: 1.27M, False: 35.9M]
  ------------------
  155|  1.29M|      unsigned char out[3] = { '%' };
  156|  1.29M|      Curl_hexbyte(&out[1], *iptr);
  157|  1.29M|      result = curlx_dyn_addn(o, out, 3);
  158|  1.29M|    }
  159|  35.9M|    else if(*iptr == '%' && (len >= 3) &&
  ------------------
  |  Branch (159:13): [True: 11.2M, False: 24.6M]
  |  Branch (159:29): [True: 11.2M, False: 15.8k]
  ------------------
  160|  11.2M|            ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  47.1M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  22.4M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 10.3M, False: 868k]
  |  |  |  |  |  Branch (44:38): [True: 9.17M, False: 1.17M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  13.2M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 25.5k, False: 2.01M]
  |  |  |  |  |  Branch (27:43): [True: 11.3k, False: 14.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|  2.02M|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 1.13M, False: 895k]
  |  |  |  |  |  Branch (28:43): [True: 1.11M, False: 20.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                          ISXDIGIT(iptr[1]) && ISXDIGIT(iptr[2]) &&
  ------------------
  |  |   39|  46.2M|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|  20.5M|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 10.2M, False: 24.7k]
  |  |  |  |  |  Branch (44:38): [True: 9.64M, False: 630k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|  10.9M|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 7.13k, False: 647k]
  |  |  |  |  |  Branch (27:43): [True: 3.43k, False: 3.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|   651k|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 614k, False: 36.4k]
  |  |  |  |  |  Branch (28:43): [True: 610k, False: 4.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  161|  10.2M|            (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  20.5M|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 2.49k, False: 10.2M]
  |  |  |  Branch (43:38): [True: 2.49k, False: 0]
  |  |  ------------------
  ------------------
                          (ISLOWER(iptr[1]) || ISLOWER(iptr[2]))) {
  ------------------
  |  |   43|  10.2M|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 1.20k, False: 10.2M]
  |  |  |  Branch (43:38): [True: 1.20k, False: 0]
  |  |  ------------------
  ------------------
  162|       |      /* uppercase it */
  163|  3.69k|      unsigned char hex = (unsigned char)((curlx_hexval(iptr[1]) << 4) |
  ------------------
  |  |  112|  3.69k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  164|  3.69k|                                          curlx_hexval(iptr[2]));
  ------------------
  |  |  112|  3.69k|#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
  ------------------
  165|  3.69k|      unsigned char out[3] = { '%' };
  166|  3.69k|      Curl_hexbyte(&out[1], hex);
  167|  3.69k|      result = curlx_dyn_addn(o, out, 3);
  168|  3.69k|      iptr += 2;
  169|  3.69k|      len -= 2;
  170|  3.69k|    }
  171|  35.9M|    else {
  172|  35.9M|      result = curlx_dyn_addn(o, iptr, 1);
  173|  35.9M|      if(*iptr == '?' && (query == QUERY_NOT_YET))
  ------------------
  |  |   53|  12.6k|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
  |  Branch (173:10): [True: 12.6k, False: 35.8M]
  |  Branch (173:26): [True: 3.21k, False: 9.45k]
  ------------------
  174|  3.21k|        query = QUERY_YES;
  ------------------
  |  |   54|  3.21k|#define QUERY_YES     4
  ------------------
  175|  35.9M|    }
  176|  37.2M|  }
  177|       |
  178|  69.5k|  if(result)
  ------------------
  |  Branch (178:6): [True: 0, False: 69.5k]
  ------------------
  179|      0|    return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  180|  69.5k|  return CURLUE_OK;
  181|  69.5k|}
Curl_is_absolute_url:
  193|   124k|{
  194|   124k|  size_t i = 0;
  195|   124k|  DEBUGASSERT(!buf || (buflen > MAX_SCHEME_LEN));
  ------------------
  |  | 1081|   124k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (195:3): [True: 124k, False: 0]
  |  Branch (195:3): [True: 0, False: 0]
  |  Branch (195:3): [True: 71.2k, False: 52.9k]
  |  Branch (195:3): [True: 52.9k, False: 0]
  ------------------
  196|   124k|  (void)buflen; /* only used in debug-builds */
  197|   124k|  if(buf)
  ------------------
  |  Branch (197:6): [True: 52.9k, False: 71.2k]
  ------------------
  198|  52.9k|    buf[0] = 0; /* always leave a defined value in buf */
  199|       |#ifdef _WIN32
  200|       |  if(guess_scheme && STARTS_WITH_DRIVE_PREFIX(url))
  201|       |    return 0;
  202|       |#endif
  203|   124k|  if(ISALPHA(url[0]))
  ------------------
  |  |   38|   124k|#define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   248k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 80.0k, False: 44.1k]
  |  |  |  |  |  Branch (43:38): [True: 79.8k, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALPHA(x)  (ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|  44.3k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 19.2k, False: 25.0k]
  |  |  |  |  |  Branch (42:38): [True: 18.2k, False: 992]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|   390k|    for(i = 1; i < MAX_SCHEME_LEN; ++i) {
  ------------------
  |  |   55|   390k|#define MAX_SCHEME_LEN 40
  ------------------
  |  Branch (204:16): [True: 390k, False: 59]
  ------------------
  205|   390k|      char s = url[i];
  206|   390k|      if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
  ------------------
  |  |   41|   778k|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   44|   778k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 385k, False: 4.07k]
  |  |  |  |  |  Branch (44:38): [True: 784, False: 384k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   43|   777k|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (43:22): [True: 254k, False: 133k]
  |  |  |  |  |  Branch (43:38): [True: 254k, False: 183]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  ------------------
  |  |  |  |   42|   133k|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (42:22): [True: 35.4k, False: 98.0k]
  |  |  |  |  |  Branch (42:38): [True: 35.1k, False: 334]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (206:10): [True: 389k, False: 1.16k]
  |  Branch (206:30): [True: 264, False: 98.1k]
  |  Branch (206:44): [True: 686, False: 97.4k]
  |  Branch (206:58): [True: 541, False: 96.9k]
  ------------------
  207|       |        /* RFC 3986 3.1 explains:
  208|       |           scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  209|       |        */
  210|   292k|      }
  211|  98.0k|      else {
  212|  98.0k|        break;
  213|  98.0k|      }
  214|   390k|    }
  215|   124k|  if(i && (url[i] == ':') && ((url[i + 1] == '/') || !guess_scheme)) {
  ------------------
  |  Branch (215:6): [True: 98.1k, False: 26.0k]
  |  Branch (215:11): [True: 93.8k, False: 4.24k]
  |  Branch (215:31): [True: 93.5k, False: 331]
  |  Branch (215:54): [True: 67, False: 264]
  ------------------
  216|       |    /* If this does not guess scheme, the scheme always ends with the colon so
  217|       |       that this also detects data: URLs etc. In guessing mode, data: could
  218|       |       be the hostname "data" with a specified port number. */
  219|       |
  220|       |    /* the length of the scheme is the name part only */
  221|  93.6k|    size_t len = i;
  222|  93.6k|    if(buf) {
  ------------------
  |  Branch (222:8): [True: 48.5k, False: 45.0k]
  ------------------
  223|  48.5k|      Curl_strntolower(buf, url, i);
  224|  48.5k|      buf[i] = 0;
  225|  48.5k|    }
  226|  93.6k|    return len;
  227|  93.6k|  }
  228|  30.5k|  return 0;
  229|   124k|}
Curl_junkscan:
  233|  52.9k|{
  234|  52.9k|  size_t n = strlen(url);
  235|  52.9k|  size_t i;
  236|  52.9k|  unsigned char control;
  237|  52.9k|  const unsigned char *p = (const unsigned char *)url;
  238|  52.9k|  if(n > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  52.9k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (238:6): [True: 0, False: 52.9k]
  ------------------
  239|      0|    return CURLUE_MALFORMED_INPUT;
  240|       |
  241|  52.9k|  control = allowspace ? 0x1f : 0x20;
  ------------------
  |  Branch (241:13): [True: 21.4k, False: 31.4k]
  ------------------
  242|  65.8M|  for(i = 0; i < n; i++) {
  ------------------
  |  Branch (242:14): [True: 65.7M, False: 52.9k]
  ------------------
  243|  65.7M|    if(p[i] <= control || p[i] == 127)
  ------------------
  |  Branch (243:8): [True: 29, False: 65.7M]
  |  Branch (243:27): [True: 9, False: 65.7M]
  ------------------
  244|     38|      return CURLUE_MALFORMED_INPUT;
  245|  65.7M|  }
  246|  52.9k|  *urllen = n;
  247|  52.9k|  return CURLUE_OK;
  248|  52.9k|}
parse_port:
  349|  52.7k|{
  350|  52.7k|  const char *portptr;
  351|  52.7k|  const char *hostname = curlx_dyn_ptr(host);
  352|       |  /*
  353|       |   * Find the end of an IPv6 address on the ']' ending bracket.
  354|       |   */
  355|  52.7k|  if(hostname[0] == '[') {
  ------------------
  |  Branch (355:6): [True: 150, False: 52.6k]
  ------------------
  356|    150|    portptr = strchr(hostname, ']');
  357|    150|    if(!portptr)
  ------------------
  |  Branch (357:8): [True: 4, False: 146]
  ------------------
  358|      4|      return CURLUE_BAD_IPV6;
  359|    146|    portptr++;
  360|       |    /* this is a RFC2732-style specified IP-address */
  361|    146|    if(*portptr) {
  ------------------
  |  Branch (361:8): [True: 12, False: 134]
  ------------------
  362|     12|      if(*portptr != ':')
  ------------------
  |  Branch (362:10): [True: 9, False: 3]
  ------------------
  363|      9|        return CURLUE_BAD_PORT_NUMBER;
  364|     12|    }
  365|    134|    else
  366|    134|      portptr = NULL;
  367|    146|  }
  368|  52.6k|  else
  369|  52.6k|    portptr = strchr(hostname, ':');
  370|       |
  371|  52.7k|  if(portptr) {
  ------------------
  |  Branch (371:6): [True: 5.43k, False: 47.3k]
  ------------------
  372|  5.43k|    curl_off_t port;
  373|  5.43k|    size_t keep = portptr - hostname;
  374|       |
  375|       |    /* Browser behavior adaptation. If there is a colon with no digits after,
  376|       |       cut off the name there which makes us ignore the colon and use the
  377|       |       default port. Firefox, Chrome and Safari all do that.
  378|       |
  379|       |       Do not do it if the URL has no scheme, to make something that looks like
  380|       |       a scheme not work!
  381|       |    */
  382|  5.43k|    curlx_dyn_setlen(host, keep);
  383|  5.43k|    portptr++;
  384|  5.43k|    if(!*portptr)
  ------------------
  |  Branch (384:8): [True: 216, False: 5.22k]
  ------------------
  385|    216|      return has_scheme ? CURLUE_OK : CURLUE_BAD_PORT_NUMBER;
  ------------------
  |  Branch (385:14): [True: 177, False: 39]
  ------------------
  386|       |
  387|  5.22k|    if(curlx_str_number(&portptr, &port, 0xffff) || *portptr)
  ------------------
  |  Branch (387:8): [True: 24, False: 5.19k]
  |  Branch (387:53): [True: 8, False: 5.18k]
  ------------------
  388|     32|      return CURLUE_BAD_PORT_NUMBER;
  389|       |
  390|  5.18k|    u->portnum = (unsigned short)port;
  391|       |    /* generate a new port number string to get rid of leading zeroes etc */
  392|  5.18k|    curlx_free(u->port);
  ------------------
  |  | 1483|  5.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  393|  5.18k|    u->port = curl_maprintf("%" CURL_FORMAT_CURL_OFF_T, port);
  ------------------
  |  |  341|  5.18k|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
  394|  5.18k|    if(!u->port)
  ------------------
  |  Branch (394:8): [True: 0, False: 5.18k]
  ------------------
  395|      0|      return CURLUE_OUT_OF_MEMORY;
  396|  5.18k|  }
  397|       |
  398|  52.5k|  return CURLUE_OK;
  399|  52.7k|}
ipv6_parse:
  410|    171|{
  411|    171|  size_t len;
  412|    171|  DEBUGASSERT(*hostname == '[');
  ------------------
  |  | 1081|    171|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (412:3): [True: 0, False: 171]
  |  Branch (412:3): [True: 171, False: 0]
  ------------------
  413|    171|  if(hlen < 4) /* '[::]' is the shortest possible valid string */
  ------------------
  |  Branch (413:6): [True: 5, False: 166]
  ------------------
  414|      5|    return CURLUE_BAD_IPV6;
  415|    166|  hostname++;
  416|    166|  hlen -= 2;
  417|       |
  418|       |  /* only valid IPv6 letters are ok */
  419|    166|  len = strspn(hostname, "0123456789abcdefABCDEF:.");
  420|       |
  421|    166|  if(hlen != len) {
  ------------------
  |  Branch (421:6): [True: 125, False: 41]
  ------------------
  422|    125|    hlen = len;
  423|    125|    if(hostname[len] == '%') {
  ------------------
  |  Branch (423:8): [True: 111, False: 14]
  ------------------
  424|       |      /* this could now be '%[zone id]' */
  425|    111|      char zoneid[16];
  426|    111|      int i = 0;
  427|    111|      char *h = &hostname[len + 1];
  428|       |      /* pass '25' if present and is a URL encoded percent sign */
  429|    111|      if(!strncmp(h, "25", 2) && h[2] && (h[2] != ']'))
  ------------------
  |  Branch (429:10): [True: 21, False: 90]
  |  Branch (429:34): [True: 18, False: 3]
  |  Branch (429:42): [True: 10, False: 8]
  ------------------
  430|     10|        h += 2;
  431|    777|      while(*h && (*h != ']') && (i < 15))
  ------------------
  |  Branch (431:13): [True: 763, False: 14]
  |  Branch (431:19): [True: 670, False: 93]
  |  Branch (431:34): [True: 666, False: 4]
  ------------------
  432|    666|        zoneid[i++] = *h++;
  433|    111|      if(!i || (']' != *h))
  ------------------
  |  Branch (433:10): [True: 3, False: 108]
  |  Branch (433:16): [True: 18, False: 90]
  ------------------
  434|     21|        return CURLUE_BAD_IPV6;
  435|     90|      zoneid[i] = 0;
  436|     90|      u->zoneid = curlx_strdup(zoneid);
  ------------------
  |  | 1477|     90|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  437|     90|      if(!u->zoneid)
  ------------------
  |  Branch (437:10): [True: 0, False: 90]
  ------------------
  438|      0|        return CURLUE_OUT_OF_MEMORY;
  439|     90|      hostname[len] = ']'; /* insert end bracket */
  440|     90|      hostname[len + 1] = 0; /* terminate the hostname */
  441|     90|    }
  442|     14|    else
  443|     14|      return CURLUE_BAD_IPV6;
  444|       |    /* hostname is fine */
  445|    125|  }
  446|       |
  447|       |  /* Normalize the IPv6 address */
  448|    131|  {
  449|    131|    char dest[16]; /* fits a binary IPv6 address */
  450|    131|    hostname[hlen] = 0; /* end the address there */
  451|    131|    if(curlx_inet_pton(AF_INET6, hostname, dest) != 1)
  ------------------
  |  |   43|    131|  inet_pton(x, y, z)
  ------------------
  |  Branch (451:8): [True: 14, False: 117]
  ------------------
  452|     14|      return CURLUE_BAD_IPV6;
  453|    117|    if(curlx_inet_ntop(AF_INET6, dest, hostname, hlen + 1)) {
  ------------------
  |  |   44|    117|  inet_ntop(af, src, buf, (curl_socklen_t)(size))
  |  |  ------------------
  |  |  |  Branch (44:3): [True: 94, False: 23]
  |  |  ------------------
  ------------------
  454|     94|      hlen = strlen(hostname); /* might be shorter now */
  455|     94|      hostname[hlen + 1] = 0;
  456|     94|    }
  457|    117|    hostname[hlen] = ']'; /* restore ending bracket */
  458|    117|  }
  459|      0|  return CURLUE_OK;
  460|    131|}
ipv4_normalize:
  509|  52.6k|{
  510|  52.6k|  bool done = FALSE;
  ------------------
  |  | 1058|  52.6k|#define FALSE false
  ------------------
  511|  52.6k|  int n = 0;
  512|  52.6k|  const char *c = curlx_dyn_ptr(host);
  513|  52.6k|  unsigned int parts[4] = { 0, 0, 0, 0 };
  514|  52.6k|  CURLcode result = CURLE_OK;
  515|       |
  516|  52.6k|  if(*c == '[')
  ------------------
  |  Branch (516:6): [True: 136, False: 52.5k]
  ------------------
  517|    136|    return HOST_IPV6;
  ------------------
  |  |   50|    136|#define HOST_IPV6    3
  ------------------
  518|       |
  519|   158k|  while(!done) {
  ------------------
  |  Branch (519:9): [True: 126k, False: 32.1k]
  ------------------
  520|   126k|    int rc;
  521|   126k|    curl_off_t l;
  522|   126k|    if(*c == '0') {
  ------------------
  |  Branch (522:8): [True: 78.4k, False: 48.0k]
  ------------------
  523|  78.4k|      if(c[1] == 'x') {
  ------------------
  |  Branch (523:10): [True: 343, False: 78.1k]
  ------------------
  524|    343|        c += 2; /* skip the prefix */
  525|    343|        rc = curlx_str_hex(&c, &l, UINT_MAX);
  526|    343|        if(rc)
  ------------------
  |  Branch (526:12): [True: 135, False: 208]
  ------------------
  527|    135|          return HOST_NAME;
  ------------------
  |  |   48|    135|#define HOST_NAME    1
  ------------------
  528|    343|      }
  529|  78.1k|      else
  530|  78.1k|        rc = curlx_str_octal(&c, &l, UINT_MAX);
  531|  78.4k|    }
  532|  48.0k|    else
  533|  48.0k|      rc = curlx_str_number(&c, &l, UINT_MAX);
  534|       |
  535|   126k|    if(rc) {
  ------------------
  |  Branch (535:8): [True: 9.05k, False: 117k]
  ------------------
  536|  9.05k|      if(!n || (rc != STRE_NO_NUM) || *c)
  ------------------
  |  |   36|    510|#define STRE_NO_NUM   8
  ------------------
  |  Branch (536:10): [True: 8.54k, False: 510]
  |  Branch (536:16): [True: 12, False: 498]
  |  Branch (536:39): [True: 49, False: 449]
  ------------------
  537|  8.60k|        return HOST_NAME;
  ------------------
  |  |   48|  8.60k|#define HOST_NAME    1
  ------------------
  538|    449|      n--;
  539|    449|    }
  540|   117k|    else
  541|   117k|      parts[n] = (unsigned int)l;
  542|       |
  543|   117k|    switch(*c) {
  544|  74.0k|    case '.':
  ------------------
  |  Branch (544:5): [True: 74.0k, False: 43.7k]
  ------------------
  545|  74.0k|      if(n == 3) {
  ------------------
  |  Branch (545:10): [True: 22, False: 74.0k]
  ------------------
  546|     22|        if(c[1])
  ------------------
  |  Branch (546:12): [True: 14, False: 8]
  ------------------
  547|       |          /* something follows this dot */
  548|     14|          return HOST_NAME;
  ------------------
  |  |   48|     14|#define HOST_NAME    1
  ------------------
  549|      8|        done = TRUE;
  ------------------
  |  | 1055|      8|#define TRUE true
  ------------------
  550|      8|      }
  551|  74.0k|      else {
  552|  74.0k|        n++;
  553|  74.0k|        c++;
  554|  74.0k|      }
  555|  74.0k|      break;
  556|       |
  557|  74.0k|    case '\0':
  ------------------
  |  Branch (557:5): [True: 32.1k, False: 85.6k]
  ------------------
  558|  32.1k|      done = TRUE;
  ------------------
  |  | 1055|  32.1k|#define TRUE true
  ------------------
  559|  32.1k|      break;
  560|       |
  561|  11.5k|    default:
  ------------------
  |  Branch (561:5): [True: 11.5k, False: 106k]
  ------------------
  562|  11.5k|      return HOST_NAME;
  ------------------
  |  |   48|  11.5k|#define HOST_NAME    1
  ------------------
  563|   117k|    }
  564|   117k|  }
  565|       |
  566|  32.1k|  switch(n) {
  ------------------
  |  Branch (566:10): [True: 32.1k, False: 0]
  ------------------
  567|  7.50k|  case 0: /* a -- 32 bits */
  ------------------
  |  Branch (567:3): [True: 7.50k, False: 24.6k]
  ------------------
  568|  7.50k|    curlx_dyn_reset(host);
  569|       |
  570|  7.50k|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  571|  7.50k|                            (parts[0] >> 24),
  572|  7.50k|                            ((parts[0] >> 16) & 0xff),
  573|  7.50k|                            ((parts[0] >> 8) & 0xff),
  574|  7.50k|                            (parts[0] & 0xff));
  575|  7.50k|    break;
  576|    254|  case 1: /* a.b -- 8.24 bits */
  ------------------
  |  Branch (576:3): [True: 254, False: 31.9k]
  ------------------
  577|    254|    if((parts[0] > 0xff) || (parts[1] > 0xffffff))
  ------------------
  |  Branch (577:8): [True: 47, False: 207]
  |  Branch (577:29): [True: 19, False: 188]
  ------------------
  578|     66|      return HOST_NAME;
  ------------------
  |  |   48|     66|#define HOST_NAME    1
  ------------------
  579|    188|    curlx_dyn_reset(host);
  580|    188|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  581|    188|                            (parts[0]),
  582|    188|                            ((parts[1] >> 16) & 0xff),
  583|    188|                            ((parts[1] >> 8) & 0xff),
  584|    188|                            (parts[1] & 0xff));
  585|    188|    break;
  586|    138|  case 2: /* a.b.c -- 8.8.16 bits */
  ------------------
  |  Branch (586:3): [True: 138, False: 32.0k]
  ------------------
  587|    138|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xffff))
  ------------------
  |  Branch (587:8): [True: 40, False: 98]
  |  Branch (587:29): [True: 49, False: 49]
  |  Branch (587:50): [True: 26, False: 23]
  ------------------
  588|    115|      return HOST_NAME;
  ------------------
  |  |   48|    115|#define HOST_NAME    1
  ------------------
  589|     23|    curlx_dyn_reset(host);
  590|     23|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  591|     23|                            (parts[0]),
  592|     23|                            (parts[1]),
  593|     23|                            ((parts[2] >> 8) & 0xff),
  594|     23|                            (parts[2] & 0xff));
  595|     23|    break;
  596|  24.2k|  case 3: /* a.b.c.d -- 8.8.8.8 bits */
  ------------------
  |  Branch (596:3): [True: 24.2k, False: 7.89k]
  ------------------
  597|  24.2k|    if((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff) ||
  ------------------
  |  Branch (597:8): [True: 51, False: 24.2k]
  |  Branch (597:29): [True: 46, False: 24.1k]
  |  Branch (597:50): [True: 41, False: 24.1k]
  ------------------
  598|  24.1k|       (parts[3] > 0xff))
  ------------------
  |  Branch (598:8): [True: 46, False: 24.1k]
  ------------------
  599|    184|      return HOST_NAME;
  ------------------
  |  |   48|    184|#define HOST_NAME    1
  ------------------
  600|  24.1k|    curlx_dyn_reset(host);
  601|  24.1k|    result = curlx_dyn_addf(host, "%u.%u.%u.%u",
  602|  24.1k|                            (parts[0]),
  603|  24.1k|                            (parts[1]),
  604|  24.1k|                            (parts[2]),
  605|  24.1k|                            (parts[3]));
  606|  24.1k|    break;
  607|  32.1k|  }
  608|  31.8k|  if(result)
  ------------------
  |  Branch (608:6): [True: 0, False: 31.8k]
  ------------------
  609|      0|    return HOST_ERROR;
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  610|  31.8k|  return HOST_IPV4;
  ------------------
  |  |   49|  31.8k|#define HOST_IPV4    2
  ------------------
  611|  31.8k|}
dedotdotify:
  754|  29.3k|{
  755|  29.3k|  struct dynbuf out;
  756|  29.3k|  CURLcode result = CURLE_OK;
  757|       |
  758|       |  /* variables for leading dot checks */
  759|  29.3k|  const char *dinput = input;
  760|  29.3k|  size_t dlen = clen;
  761|       |
  762|  29.3k|  *outp = NULL;
  763|       |  /* a single byte path cannot be cleaned up */
  764|  29.3k|  if(clen < 2)
  ------------------
  |  Branch (764:6): [True: 9, False: 29.3k]
  ------------------
  765|      9|    return 0;
  766|       |
  767|  29.3k|  curlx_dyn_init(&out, clen + 1);
  768|       |
  769|       |  /* if the input buffer begins with a prefix of "../" or "./", then remove
  770|       |     that prefix from the input buffer; otherwise, */
  771|  29.3k|  if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (771:6): [True: 0, False: 29.3k]
  ------------------
  772|      0|    if(ISSLASH(*dinput)) {
  ------------------
  |  |  735|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  773|       |      /* one dot followed by a slash */
  774|      0|      input = dinput + 1;
  775|      0|      clen = dlen - 1;
  776|      0|    }
  777|       |
  778|       |    /* if the input buffer consists only of "." or "..", then remove
  779|       |       that from the input buffer; otherwise, */
  780|      0|    else if(is_dot(&dinput, &dlen)) {
  ------------------
  |  Branch (780:13): [True: 0, False: 0]
  ------------------
  781|      0|      if(!dlen)
  ------------------
  |  Branch (781:10): [True: 0, False: 0]
  ------------------
  782|       |        /* .. [end] */
  783|      0|        goto end;
  784|      0|      else if(ISSLASH(*dinput)) {
  ------------------
  |  |  735|      0|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  785|       |        /* ../ */
  786|      0|        input = dinput + 1;
  787|      0|        clen = dlen - 1;
  788|      0|      }
  789|      0|    }
  790|      0|  }
  791|       |
  792|  37.7M|  while(clen && !result) { /* until end of path content */
  ------------------
  |  Branch (792:9): [True: 37.6M, False: 29.2k]
  |  Branch (792:17): [True: 37.6M, False: 0]
  ------------------
  793|  37.6M|    if(ISSLASH(*input)) {
  ------------------
  |  |  735|  37.6M|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 2.36M, False: 35.3M]
  |  |  ------------------
  ------------------
  794|  2.36M|      const char *p = &input[1];
  795|  2.36M|      size_t blen = clen - 1;
  796|       |      /* if the input buffer begins with a prefix of "/./" or "/.", where "."
  797|       |         is a complete path segment, then replace that prefix with "/" in the
  798|       |         input buffer; otherwise, */
  799|  2.36M|      if(is_dot(&p, &blen)) {
  ------------------
  |  Branch (799:10): [True: 74.1k, False: 2.28M]
  ------------------
  800|  74.1k|        if(!blen) { /* /. */
  ------------------
  |  Branch (800:12): [True: 57, False: 74.0k]
  ------------------
  801|     57|          result = curlx_dyn_addn(&out, "/", 1);
  802|     57|          break;
  803|     57|        }
  804|  74.0k|        else if(ISSLASH(*p)) { /* /./ */
  ------------------
  |  |  735|  74.0k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 1.89k, False: 72.1k]
  |  |  ------------------
  ------------------
  805|  1.89k|          input = p;
  806|  1.89k|          clen = blen;
  807|  1.89k|          continue;
  808|  1.89k|        }
  809|       |
  810|       |        /* if the input buffer begins with a prefix of "/../" or "/..", where
  811|       |           ".." is a complete path segment, then replace that prefix with "/"
  812|       |           in the input buffer and remove the last segment and its preceding
  813|       |           "/" (if any) from the output buffer; otherwise, */
  814|  72.1k|        else if(is_dot(&p, &blen) && (ISSLASH(*p) || !blen)) {
  ------------------
  |  |  735|  70.1k|#define ISSLASH(x) ((x) == '/')
  |  |  ------------------
  |  |  |  Branch (735:20): [True: 2.67k, False: 32.4k]
  |  |  ------------------
  ------------------
  |  Branch (814:17): [True: 35.0k, False: 37.0k]
  |  Branch (814:54): [True: 34, False: 32.3k]
  ------------------
  815|       |          /* remove the last segment from the output buffer */
  816|  2.71k|          size_t len = curlx_dyn_len(&out);
  817|  2.71k|          if(len) {
  ------------------
  |  Branch (817:14): [True: 2.25k, False: 456]
  ------------------
  818|  2.25k|            const char *ptr = curlx_dyn_ptr(&out);
  819|  2.25k|            const char *last = memrchr(ptr, '/', len);
  820|  2.25k|            if(last)
  ------------------
  |  Branch (820:16): [True: 2.25k, False: 0]
  ------------------
  821|       |              /* trim the output at the slash */
  822|  2.25k|              curlx_dyn_setlen(&out, last - ptr);
  823|  2.25k|          }
  824|       |
  825|  2.71k|          if(blen) { /* /../ */
  ------------------
  |  Branch (825:14): [True: 2.67k, False: 34]
  ------------------
  826|  2.67k|            input = p;
  827|  2.67k|            clen = blen;
  828|  2.67k|            continue;
  829|  2.67k|          }
  830|     34|          result = curlx_dyn_addn(&out, "/", 1);
  831|     34|          break;
  832|  2.71k|        }
  833|  74.1k|      }
  834|  2.36M|    }
  835|       |
  836|       |    /* move the first path segment in the input buffer to the end of the
  837|       |       output buffer, including the initial "/" character (if any) and any
  838|       |       subsequent characters up to, but not including, the next "/" character
  839|       |       or the end of the input buffer. */
  840|       |
  841|  37.6M|    result = curlx_dyn_addn(&out, input, 1);
  842|  37.6M|    input++;
  843|  37.6M|    clen--;
  844|  37.6M|  }
  845|  29.3k|end:
  846|  29.3k|  if(!result) {
  ------------------
  |  Branch (846:6): [True: 29.3k, False: 0]
  ------------------
  847|  29.3k|    if(curlx_dyn_len(&out))
  ------------------
  |  Branch (847:8): [True: 29.3k, False: 0]
  ------------------
  848|  29.3k|      *outp = curlx_dyn_ptr(&out);
  849|      0|    else {
  850|      0|      *outp = curlx_strdup("");
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  851|      0|      if(!*outp)
  ------------------
  |  Branch (851:10): [True: 0, False: 0]
  ------------------
  852|      0|        return 1;
  853|      0|    }
  854|  29.3k|  }
  855|  29.3k|  return result ? 1 : 0; /* success */
  ------------------
  |  Branch (855:10): [True: 0, False: 29.3k]
  ------------------
  856|  29.3k|}
parse_file:
  865|    107|{
  866|    107|  const char *path;
  867|    107|  size_t pathlen;
  868|       |
  869|    107|  *pathp = NULL;
  870|    107|  *pathlenp = 0;
  871|    107|  if(urllen <= 6)
  ------------------
  |  Branch (871:6): [True: 3, False: 104]
  ------------------
  872|       |    /* file:/ is not enough to actually be a complete file: URL */
  873|      3|    return CURLUE_BAD_FILE_URL;
  874|       |
  875|       |  /* path has been allocated large enough to hold this */
  876|    104|  path = &url[5];
  877|    104|  pathlen = urllen - 5;
  878|       |
  879|       |  /* RFC 8089: file-hier-part = ( "//" auth-path ) / local-path, where
  880|       |     local-path also starts with a "/". So reject anything that doesn't
  881|       |     start with at least one "/" */
  882|    104|  if(path[0] != '/')
  ------------------
  |  Branch (882:6): [True: 17, False: 87]
  ------------------
  883|     17|    return CURLUE_BAD_FILE_URL;
  884|       |
  885|       |  /* Extra handling URLs with an authority component (i.e. that start with
  886|       |   * "file://")
  887|       |   *
  888|       |   * We allow omitted hostname (e.g. file:/<path>) -- valid according to
  889|       |   * RFC 8089, but not the (current) WHAT-WG URL spec.
  890|       |   */
  891|     87|  if(path[1] == '/') {
  ------------------
  |  Branch (891:6): [True: 47, False: 40]
  ------------------
  892|       |    /* swallow the two slashes */
  893|     47|    const char *ptr = &path[2];
  894|       |
  895|       |    /*
  896|       |     * According to RFC 8089, a file: URL can be reliably dereferenced if:
  897|       |     *
  898|       |     *  o it has no/blank hostname, or
  899|       |     *
  900|       |     *  o the hostname matches "localhost" (case-insensitively), or
  901|       |     *
  902|       |     *  o the hostname is a FQDN that resolves to this machine, or
  903|       |     *
  904|       |     * For brevity, we only consider URLs with empty, "localhost", or
  905|       |     * "127.0.0.1" hostnames as local, otherwise as an UNC String.
  906|       |     *
  907|       |     * Additionally, there is an exception for URLs with a Windows drive
  908|       |     * letter in the authority (which was accidentally omitted from RFC 8089
  909|       |     * Appendix E, but believe me, it was meant to be there. --MK)
  910|       |     */
  911|     47|    if(ptr[0] != '/' && !STARTS_WITH_URL_DRIVE_PREFIX(ptr)) {
  ------------------
  |  |   49|     43|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 18, False: 25]
  |  |  |  Branch (49:25): [True: 15, False: 3]
  |  |  ------------------
  |  |   50|     43|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 19, False: 9]
  |  |  |  Branch (50:25): [True: 14, False: 5]
  |  |  ------------------
  |  |   51|     43|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 15, False: 14]
  |  |  |  Branch (51:24): [True: 3, False: 11]
  |  |  ------------------
  |  |   52|     43|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 15]
  |  |  |  Branch (52:24): [True: 3, False: 12]
  |  |  |  Branch (52:44): [True: 6, False: 6]
  |  |  ------------------
  ------------------
  |  Branch (911:8): [True: 43, False: 4]
  ------------------
  912|       |      /* the URL includes a hostname, it must match "localhost" or
  913|       |         "127.0.0.1" to be valid */
  914|     31|      if(checkprefix("localhost/", ptr) ||
  ------------------
  |  |   33|     62|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|     31|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 30]
  |  |  ------------------
  ------------------
  915|     30|         checkprefix("127.0.0.1/", ptr)) {
  ------------------
  |  |   33|     30|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|     30|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 0, False: 30]
  |  |  ------------------
  ------------------
  916|      1|        ptr += 9; /* now points to the slash after the host */
  917|      1|      }
  918|     30|      else
  919|       |        /* Invalid file://hostname/, expected localhost or 127.0.0.1 or
  920|       |           none */
  921|     30|        return CURLUE_BAD_FILE_URL;
  922|     31|    }
  923|       |
  924|     17|    path = ptr;
  925|     17|    pathlen = urllen - (ptr - url);
  926|     17|  }
  927|       |
  928|     57|#if !defined(_WIN32) && !defined(MSDOS) && !defined(__CYGWIN__)
  929|       |  /* Do not allow Windows drive letters when not in Windows.
  930|       |   * This catches both "file:/c:" and "file:c:" */
  931|     57|  if(('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) ||
  ------------------
  |  |   49|     45|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 8, False: 37]
  |  |  |  Branch (49:25): [True: 5, False: 3]
  |  |  ------------------
  |  |   50|     45|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 23, False: 17]
  |  |  |  Branch (50:25): [True: 19, False: 4]
  |  |  ------------------
  |  |   51|     45|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 12, False: 12]
  |  |  |  Branch (51:24): [True: 5, False: 7]
  |  |  ------------------
  |  |   52|     45|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 14]
  |  |  |  Branch (52:24): [True: 3, False: 11]
  |  |  |  Branch (52:44): [True: 3, False: 8]
  |  |  ------------------
  ------------------
  |  Branch (931:7): [True: 45, False: 12]
  ------------------
  932|     48|     STARTS_WITH_URL_DRIVE_PREFIX(path)) {
  ------------------
  |  |   49|     48|  ((('a' <= (str)[0] && (str)[0] <= 'z') ||                \
  |  |  ------------------
  |  |  |  Branch (49:6): [True: 8, False: 40]
  |  |  |  Branch (49:25): [True: 8, False: 0]
  |  |  ------------------
  |  |   50|     48|    ('A' <= (str)[0] && (str)[0] <= 'Z')) &&               \
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 4, False: 36]
  |  |  |  Branch (50:25): [True: 4, False: 0]
  |  |  ------------------
  |  |   51|     48|   ((str)[1] == ':' || (str)[1] == '|') &&                 \
  |  |  ------------------
  |  |  |  Branch (51:5): [True: 10, False: 2]
  |  |  |  Branch (51:24): [True: 2, False: 0]
  |  |  ------------------
  |  |   52|     48|   ((str)[2] == '/' || (str)[2] == '\\' || (str)[2] == 0))
  |  |  ------------------
  |  |  |  Branch (52:5): [True: 3, False: 9]
  |  |  |  Branch (52:24): [True: 3, False: 6]
  |  |  |  Branch (52:44): [True: 6, False: 0]
  |  |  ------------------
  ------------------
  933|       |    /* File drive letters are only accepted in MS-DOS/Windows */
  934|     21|    return CURLUE_BAD_FILE_URL;
  935|     21|  }
  936|       |#else
  937|       |  /* If the path starts with a slash and a drive letter, ditch the slash */
  938|       |  if('/' == path[0] && STARTS_WITH_URL_DRIVE_PREFIX(&path[1])) {
  939|       |    /* This cannot be done with strcpy, as the memory chunks overlap! */
  940|       |    path++;
  941|       |    pathlen--;
  942|       |  }
  943|       |#endif
  944|     36|  u->scheme = curlx_strdup("file");
  ------------------
  |  | 1477|     36|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  945|     36|  if(!u->scheme)
  ------------------
  |  Branch (945:6): [True: 0, False: 36]
  ------------------
  946|      0|    return CURLUE_OUT_OF_MEMORY;
  947|       |
  948|     36|  *pathp = path;
  949|     36|  *pathlenp = pathlen;
  950|     36|  return CURLUE_OK;
  951|     36|}
curl_url:
 1312|  42.3k|{
 1313|  42.3k|  return curlx_calloc(1, sizeof(struct Curl_URL));
  ------------------
  |  | 1480|  42.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1314|  42.3k|}
curl_url_cleanup:
 1317|  75.6k|{
 1318|  75.6k|  if(u) {
  ------------------
  |  Branch (1318:6): [True: 42.3k, False: 33.2k]
  ------------------
 1319|  42.3k|    free_urlhandle(u);
 1320|  42.3k|    curlx_free(u);
  ------------------
  |  | 1483|  42.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1321|  42.3k|  }
 1322|  75.6k|}
curl_url_get:
 1564|   268k|{
 1565|   268k|  const char *ptr;
 1566|   268k|  CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
 1567|   268k|  char portbuf[7];
 1568|   268k|  bool plusdecode = FALSE;
  ------------------
  |  | 1058|   268k|#define FALSE false
  ------------------
 1569|   268k|  if(!u)
  ------------------
  |  Branch (1569:6): [True: 0, False: 268k]
  ------------------
 1570|      0|    return CURLUE_BAD_HANDLE;
 1571|   268k|  if(!part)
  ------------------
  |  Branch (1571:6): [True: 0, False: 268k]
  ------------------
 1572|      0|    return CURLUE_BAD_PARTPOINTER;
 1573|   268k|  *part = NULL;
 1574|       |
 1575|   268k|  switch(what) {
 1576|  29.6k|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1576:3): [True: 29.6k, False: 238k]
  ------------------
 1577|  29.6k|    ptr = u->scheme;
 1578|  29.6k|    ifmissing = CURLUE_NO_SCHEME;
 1579|  29.6k|    flags &= ~U_CURLU_URLDECODE; /* never for schemes */
  ------------------
  |  |   63|  29.6k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  29.6k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1580|  29.6k|    if((flags & CURLU_NO_GUESS_SCHEME) && u->guessed_scheme)
  ------------------
  |  |  105|  29.6k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1580:8): [True: 7.13k, False: 22.4k]
  |  Branch (1580:43): [True: 7.12k, False: 5]
  ------------------
 1581|  7.12k|      return CURLUE_NO_SCHEME;
 1582|  22.5k|    break;
 1583|  22.6k|  case CURLUPART_USER:
  ------------------
  |  Branch (1583:3): [True: 22.6k, False: 245k]
  ------------------
 1584|  22.6k|    ptr = u->user;
 1585|  22.6k|    ifmissing = CURLUE_NO_USER;
 1586|  22.6k|    break;
 1587|  22.6k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1587:3): [True: 22.6k, False: 245k]
  ------------------
 1588|  22.6k|    ptr = u->password;
 1589|  22.6k|    ifmissing = CURLUE_NO_PASSWORD;
 1590|  22.6k|    break;
 1591|  21.5k|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1591:3): [True: 21.5k, False: 247k]
  ------------------
 1592|  21.5k|    ptr = u->options;
 1593|  21.5k|    ifmissing = CURLUE_NO_OPTIONS;
 1594|  21.5k|    break;
 1595|  26.0k|  case CURLUPART_HOST:
  ------------------
  |  Branch (1595:3): [True: 26.0k, False: 242k]
  ------------------
 1596|  26.0k|    ptr = u->host;
 1597|  26.0k|    ifmissing = CURLUE_NO_HOST;
 1598|  26.0k|    break;
 1599|  24.8k|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1599:3): [True: 24.8k, False: 243k]
  ------------------
 1600|  24.8k|    ptr = u->zoneid;
 1601|  24.8k|    ifmissing = CURLUE_NO_ZONEID;
 1602|  24.8k|    break;
 1603|  24.7k|  case CURLUPART_PORT:
  ------------------
  |  Branch (1603:3): [True: 24.7k, False: 243k]
  ------------------
 1604|  24.7k|    ptr = u->port;
 1605|  24.7k|    ifmissing = CURLUE_NO_PORT;
 1606|  24.7k|    flags &= ~U_CURLU_URLDECODE; /* never for port */
  ------------------
  |  |   63|  24.7k|#define U_CURLU_URLDECODE  (unsigned int)CURLU_URLDECODE
  |  |  ------------------
  |  |  |  |   93|  24.7k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  |  |  ------------------
  ------------------
 1607|  24.7k|    if(!ptr && (flags & CURLU_DEFAULT_PORT) && u->scheme) {
  ------------------
  |  |   84|  23.6k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1607:8): [True: 23.6k, False: 1.17k]
  |  Branch (1607:16): [True: 21.0k, False: 2.55k]
  |  Branch (1607:48): [True: 21.0k, False: 0]
  ------------------
 1608|       |      /* there is no stored port number, but asked to deliver
 1609|       |         a default one for the scheme */
 1610|  21.0k|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1611|  21.0k|      if(h) {
  ------------------
  |  Branch (1611:10): [True: 21.0k, False: 0]
  ------------------
 1612|  21.0k|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1613|  21.0k|        ptr = portbuf;
 1614|  21.0k|      }
 1615|  21.0k|    }
 1616|  3.73k|    else if(ptr && u->scheme) {
  ------------------
  |  Branch (1616:13): [True: 1.17k, False: 2.55k]
  |  Branch (1616:20): [True: 1.17k, False: 0]
  ------------------
 1617|       |      /* there is a stored port number, but ask to inhibit if
 1618|       |         it matches the default one for the scheme */
 1619|  1.17k|      const struct Curl_scheme *h = Curl_get_scheme(u->scheme);
 1620|  1.17k|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1620:10): [True: 1.17k, False: 0]
  |  Branch (1620:15): [True: 4, False: 1.16k]
  ------------------
 1621|      4|         (flags & CURLU_NO_DEFAULT_PORT))
  ------------------
  |  |   85|      4|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1621:10): [True: 1, False: 3]
  ------------------
 1622|      1|        ptr = NULL;
 1623|  1.17k|    }
 1624|  24.7k|    break;
 1625|  21.5k|  case CURLUPART_PATH:
  ------------------
  |  Branch (1625:3): [True: 21.5k, False: 247k]
  ------------------
 1626|  21.5k|    ptr = u->path;
 1627|  21.5k|    if(!ptr)
  ------------------
  |  Branch (1627:8): [True: 11.3k, False: 10.2k]
  ------------------
 1628|  11.3k|      ptr = "/";
 1629|  21.5k|    break;
 1630|  21.5k|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1630:3): [True: 21.5k, False: 247k]
  ------------------
 1631|  21.5k|    ptr = u->query;
 1632|  21.5k|    ifmissing = CURLUE_NO_QUERY;
 1633|  21.5k|    plusdecode = flags & CURLU_URLDECODE;
  ------------------
  |  |   93|  21.5k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
 1634|  21.5k|    if(ptr && !ptr[0] && !(flags & CURLU_GET_EMPTY))
  ------------------
  |  |  102|    410|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1634:8): [True: 5.95k, False: 15.6k]
  |  Branch (1634:15): [True: 410, False: 5.54k]
  |  Branch (1634:26): [True: 0, False: 410]
  ------------------
 1635|       |      /* there was a blank query and the user do not ask for it */
 1636|      0|      ptr = NULL;
 1637|  21.5k|    break;
 1638|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1638:3): [True: 0, False: 268k]
  ------------------
 1639|      0|    ptr = u->fragment;
 1640|      0|    ifmissing = CURLUE_NO_FRAGMENT;
 1641|      0|    if(!ptr && u->fragment_present && flags & CURLU_GET_EMPTY)
  ------------------
  |  |  102|      0|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1641:8): [True: 0, False: 0]
  |  Branch (1641:16): [True: 0, False: 0]
  |  Branch (1641:39): [True: 0, False: 0]
  ------------------
 1642|       |      /* there was a blank fragment and the user asks for it */
 1643|      0|      ptr = "";
 1644|      0|    break;
 1645|  53.2k|  case CURLUPART_URL:
  ------------------
  |  Branch (1645:3): [True: 53.2k, False: 215k]
  ------------------
 1646|  53.2k|    return urlget_url(u, part, flags);
 1647|      0|  default:
  ------------------
  |  Branch (1647:3): [True: 0, False: 268k]
  ------------------
 1648|      0|    ptr = NULL;
 1649|      0|    break;
 1650|   268k|  }
 1651|   208k|  if(ptr)
  ------------------
  |  Branch (1651:6): [True: 104k, False: 103k]
  ------------------
 1652|   104k|    return urlget_format(u, what, ptr, part, plusdecode, flags);
 1653|       |
 1654|   103k|  return ifmissing;
 1655|   208k|}
curl_url_set:
 1830|  68.5k|{
 1831|  68.5k|  char **storep = NULL;
 1832|  68.5k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|  68.5k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1832:20): [True: 21.4k, False: 47.0k]
  ------------------
 1833|  68.5k|  bool plusencode = FALSE;
  ------------------
  |  | 1058|  68.5k|#define FALSE false
  ------------------
 1834|  68.5k|  bool pathmode = FALSE;
  ------------------
  |  | 1058|  68.5k|#define FALSE false
  ------------------
 1835|  68.5k|  bool leadingslash = FALSE;
  ------------------
  |  | 1058|  68.5k|#define FALSE false
  ------------------
 1836|  68.5k|  bool appendquery = FALSE;
  ------------------
  |  | 1058|  68.5k|#define FALSE false
  ------------------
 1837|  68.5k|  bool equalsencode = FALSE;
  ------------------
  |  | 1058|  68.5k|#define FALSE false
  ------------------
 1838|  68.5k|  size_t nalloc;
 1839|       |
 1840|  68.5k|  if(!u)
  ------------------
  |  Branch (1840:6): [True: 0, False: 68.5k]
  ------------------
 1841|      0|    return CURLUE_BAD_HANDLE;
 1842|  68.5k|  if(!part)
  ------------------
  |  Branch (1842:6): [True: 14.2k, False: 54.3k]
  ------------------
 1843|       |    /* setting a part to NULL clears it */
 1844|  14.2k|    return urlset_clear(u, what);
 1845|       |
 1846|  54.3k|  nalloc = strlen(part);
 1847|  54.3k|  if(nalloc > CURL_MAX_INPUT_LENGTH)
  ------------------
  |  |   45|  54.3k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
  |  Branch (1847:6): [True: 0, False: 54.3k]
  ------------------
 1848|       |    /* excessive input length */
 1849|      0|    return CURLUE_MALFORMED_INPUT;
 1850|       |
 1851|  54.3k|  switch(what) {
 1852|      0|  case CURLUPART_SCHEME: {
  ------------------
  |  Branch (1852:3): [True: 0, False: 54.3k]
  ------------------
 1853|      0|    CURLUcode status = set_url_scheme(u, part, flags);
 1854|      0|    if(status)
  ------------------
  |  Branch (1854:8): [True: 0, False: 0]
  ------------------
 1855|      0|      return status;
 1856|      0|    storep = &u->scheme;
 1857|      0|    urlencode = FALSE; /* never */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1858|      0|    break;
 1859|      0|  }
 1860|      0|  case CURLUPART_USER:
  ------------------
  |  Branch (1860:3): [True: 0, False: 54.3k]
  ------------------
 1861|      0|    storep = &u->user;
 1862|      0|    break;
 1863|      0|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1863:3): [True: 0, False: 54.3k]
  ------------------
 1864|      0|    storep = &u->password;
 1865|      0|    break;
 1866|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1866:3): [True: 0, False: 54.3k]
  ------------------
 1867|      0|    storep = &u->options;
 1868|      0|    break;
 1869|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (1869:3): [True: 0, False: 54.3k]
  ------------------
 1870|      0|    storep = &u->host;
 1871|      0|    curlx_safefree(u->zoneid);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1872|      0|    break;
 1873|      0|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1873:3): [True: 0, False: 54.3k]
  ------------------
 1874|      0|    storep = &u->zoneid;
 1875|      0|    break;
 1876|  1.09k|  case CURLUPART_PORT:
  ------------------
  |  Branch (1876:3): [True: 1.09k, False: 53.2k]
  ------------------
 1877|  1.09k|    return set_url_port(u, part);
 1878|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (1878:3): [True: 0, False: 54.3k]
  ------------------
 1879|      0|    pathmode = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1880|      0|    leadingslash = TRUE; /* enforce */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1881|      0|    storep = &u->path;
 1882|      0|    break;
 1883|      0|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1883:3): [True: 0, False: 54.3k]
  ------------------
 1884|      0|    plusencode = urlencode;
 1885|      0|    appendquery = (flags & CURLU_APPENDQUERY) ? 1 : 0;
  ------------------
  |  |   95|      0|#define CURLU_APPENDQUERY (1 << 8)        /* append a form style part */
  ------------------
  |  Branch (1885:19): [True: 0, False: 0]
  ------------------
 1886|      0|    equalsencode = appendquery;
 1887|      0|    storep = &u->query;
 1888|      0|    u->query_present = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1889|      0|    break;
 1890|      0|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1890:3): [True: 0, False: 54.3k]
  ------------------
 1891|      0|    storep = &u->fragment;
 1892|      0|    u->fragment_present = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1893|      0|    break;
 1894|  53.2k|  case CURLUPART_URL:
  ------------------
  |  Branch (1894:3): [True: 53.2k, False: 1.09k]
  ------------------
 1895|  53.2k|    return set_url(u, part, nalloc, flags);
 1896|      0|  default:
  ------------------
  |  Branch (1896:3): [True: 0, False: 54.3k]
  ------------------
 1897|      0|    return CURLUE_UNKNOWN_PART;
 1898|  54.3k|  }
 1899|      0|  DEBUGASSERT(storep);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1899:3): [True: 0, False: 0]
  |  Branch (1899:3): [True: 0, False: 0]
  ------------------
 1900|      0|  {
 1901|      0|    const char *newp;
 1902|      0|    struct dynbuf enc;
 1903|      0|    curlx_dyn_init(&enc, (nalloc * 3) + 1 + leadingslash);
 1904|       |
 1905|      0|    if(leadingslash && (part[0] != '/')) {
  ------------------
  |  Branch (1905:8): [True: 0, False: 0]
  |  Branch (1905:24): [True: 0, False: 0]
  ------------------
 1906|      0|      CURLcode result = curlx_dyn_addn(&enc, "/", 1);
 1907|      0|      if(result)
  ------------------
  |  Branch (1907:10): [True: 0, False: 0]
  ------------------
 1908|      0|        return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1909|      0|    }
 1910|      0|    if(urlencode) {
  ------------------
  |  Branch (1910:8): [True: 0, False: 0]
  ------------------
 1911|      0|      const unsigned char *i;
 1912|       |
 1913|      0|      for(i = (const unsigned char *)part; *i; i++) {
  ------------------
  |  Branch (1913:44): [True: 0, False: 0]
  ------------------
 1914|      0|        CURLcode result;
 1915|      0|        if((*i == ' ') && plusencode) {
  ------------------
  |  Branch (1915:12): [True: 0, False: 0]
  |  Branch (1915:27): [True: 0, False: 0]
  ------------------
 1916|      0|          result = curlx_dyn_addn(&enc, "+", 1);
 1917|      0|          if(result)
  ------------------
  |  Branch (1917:14): [True: 0, False: 0]
  ------------------
 1918|      0|            return CURLUE_OUT_OF_MEMORY;
 1919|      0|        }
 1920|      0|        else if(ISUNRESERVED(*i) ||
  ------------------
  |  |   49|      0|#define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   41|      0|#define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ISALNUM(x)  (ISDIGIT(x) || ISLOWER(x) || ISUPPER(x))
  |  |  |  |  ------------------
  |  |  |  |  |  |   42|      0|#define ISUPPER(x)  (((x) >= 'A') && ((x) <= 'Z'))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (42:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (42:38): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISUNRESERVED(x) (ISALNUM(x) || ISURLPUNTCS(x))
  |  |  ------------------
  |  |  |  |   48|      0|  (((x) == '-') || ((x) == '.') || ((x) == '_') || ((x) == '~'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (48:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (48:20): [True: 0, False: 0]
  |  |  |  |  |  Branch (48:36): [True: 0, False: 0]
  |  |  |  |  |  Branch (48:52): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1921|      0|                (pathmode && allowed_in_path(*i)) ||
  ------------------
  |  Branch (1921:18): [True: 0, False: 0]
  |  Branch (1921:30): [True: 0, False: 0]
  ------------------
 1922|      0|                ((*i == '=') && equalsencode)) {
  ------------------
  |  Branch (1922:18): [True: 0, False: 0]
  |  Branch (1922:33): [True: 0, False: 0]
  ------------------
 1923|      0|          if((*i == '=') && equalsencode)
  ------------------
  |  Branch (1923:14): [True: 0, False: 0]
  |  Branch (1923:29): [True: 0, False: 0]
  ------------------
 1924|       |            /* only skip the first equals sign */
 1925|      0|            equalsencode = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1926|      0|          result = curlx_dyn_addn(&enc, i, 1);
 1927|      0|          if(result)
  ------------------
  |  Branch (1927:14): [True: 0, False: 0]
  ------------------
 1928|      0|            return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1929|      0|        }
 1930|      0|        else {
 1931|      0|          unsigned char out[3] = { '%' };
 1932|      0|          Curl_hexbyte(&out[1], *i);
 1933|      0|          result = curlx_dyn_addn(&enc, out, 3);
 1934|      0|          if(result)
  ------------------
  |  Branch (1934:14): [True: 0, False: 0]
  ------------------
 1935|      0|            return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1936|      0|        }
 1937|      0|      }
 1938|      0|    }
 1939|      0|    else {
 1940|      0|      char *p;
 1941|      0|      CURLcode result = curlx_dyn_add(&enc, part);
 1942|      0|      if(result)
  ------------------
  |  Branch (1942:10): [True: 0, False: 0]
  ------------------
 1943|      0|        return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1944|      0|      p = curlx_dyn_ptr(&enc);
 1945|      0|      while(*p) {
  ------------------
  |  Branch (1945:13): [True: 0, False: 0]
  ------------------
 1946|       |        /* make sure percent encoded are upper case */
 1947|      0|        if((*p == '%') && ISXDIGIT(p[1]) && ISXDIGIT(p[2]) &&
  ------------------
  |  |   39|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|      0|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (27:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|      0|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (28:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if((*p == '%') && ISXDIGIT(p[1]) && ISXDIGIT(p[2]) &&
  ------------------
  |  |   39|      0|#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   44|      0|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (44:22): [True: 0, False: 0]
  |  |  |  |  |  Branch (44:38): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   27|      0|#define ISLOWHEXALPHA(x) (((x) >= 'a') && ((x) <= 'f'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (27:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (27:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
  |  |  ------------------
  |  |  |  |   28|      0|#define ISUPHEXALPHA(x)  (((x) >= 'A') && ((x) <= 'F'))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (28:27): [True: 0, False: 0]
  |  |  |  |  |  Branch (28:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1947:12): [True: 0, False: 0]
  ------------------
 1948|      0|           (ISLOWER(p[1]) || ISLOWER(p[2]))) {
  ------------------
  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                         (ISLOWER(p[1]) || ISLOWER(p[2]))) {
  ------------------
  |  |   43|      0|#define ISLOWER(x)  (((x) >= 'a') && ((x) <= 'z'))
  |  |  ------------------
  |  |  |  Branch (43:22): [True: 0, False: 0]
  |  |  |  Branch (43:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1949|      0|          p[1] = Curl_raw_toupper(p[1]);
 1950|      0|          p[2] = Curl_raw_toupper(p[2]);
 1951|      0|          p += 3;
 1952|      0|        }
 1953|      0|        else
 1954|      0|          p++;
 1955|      0|      }
 1956|      0|    }
 1957|      0|    newp = curlx_dyn_ptr(&enc);
 1958|       |
 1959|      0|    if(appendquery && newp) {
  ------------------
  |  Branch (1959:8): [True: 0, False: 0]
  |  Branch (1959:23): [True: 0, False: 0]
  ------------------
 1960|       |      /* Append the 'newp' string onto the old query. Add a '&' separator if
 1961|       |         none is present at the end of the existing query already */
 1962|       |
 1963|      0|      size_t querylen = u->query ? strlen(u->query) : 0;
  ------------------
  |  Branch (1963:25): [True: 0, False: 0]
  ------------------
 1964|      0|      bool addamperand = querylen && (u->query[querylen - 1] != '&');
  ------------------
  |  Branch (1964:26): [True: 0, False: 0]
  |  Branch (1964:38): [True: 0, False: 0]
  ------------------
 1965|      0|      if(querylen) {
  ------------------
  |  Branch (1965:10): [True: 0, False: 0]
  ------------------
 1966|      0|        struct dynbuf qbuf;
 1967|      0|        curlx_dyn_init(&qbuf, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|      0|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1968|       |
 1969|      0|        if(curlx_dyn_addn(&qbuf, u->query, querylen)) /* add original query */
  ------------------
  |  Branch (1969:12): [True: 0, False: 0]
  ------------------
 1970|      0|          goto nomem;
 1971|       |
 1972|      0|        if(addamperand) {
  ------------------
  |  Branch (1972:12): [True: 0, False: 0]
  ------------------
 1973|      0|          if(curlx_dyn_addn(&qbuf, "&", 1))
  ------------------
  |  Branch (1973:14): [True: 0, False: 0]
  ------------------
 1974|      0|            goto nomem;
 1975|      0|        }
 1976|      0|        if(curlx_dyn_add(&qbuf, newp))
  ------------------
  |  Branch (1976:12): [True: 0, False: 0]
  ------------------
 1977|      0|          goto nomem;
 1978|      0|        curlx_dyn_free(&enc);
 1979|      0|        curlx_free(*storep);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1980|      0|        *storep = curlx_dyn_ptr(&qbuf);
 1981|      0|        return CURLUE_OK;
 1982|      0|nomem:
 1983|      0|        curlx_dyn_free(&enc);
 1984|      0|        return CURLUE_OUT_OF_MEMORY;
 1985|      0|      }
 1986|      0|    }
 1987|      0|    else if(what == CURLUPART_HOST) {
  ------------------
  |  Branch (1987:13): [True: 0, False: 0]
  ------------------
 1988|      0|      size_t n = curlx_dyn_len(&enc);
 1989|      0|      if(!n && (flags & CURLU_NO_AUTHORITY)) {
  ------------------
  |  |   97|      0|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1989:10): [True: 0, False: 0]
  |  Branch (1989:16): [True: 0, False: 0]
  ------------------
 1990|       |        /* Skip hostname check, it is allowed to be empty. */
 1991|      0|      }
 1992|      0|      else {
 1993|      0|        bool bad = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1994|      0|        if(!n)
  ------------------
  |  Branch (1994:12): [True: 0, False: 0]
  ------------------
 1995|      0|          bad = TRUE; /* empty hostname is not okay */
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1996|      0|        else if(!urlencode) {
  ------------------
  |  Branch (1996:17): [True: 0, False: 0]
  ------------------
 1997|       |          /* if the hostname part was not URL encoded here, it was set ready
 1998|       |             URL encoded so we need to decode it to check */
 1999|      0|          size_t dlen;
 2000|      0|          char *decoded = NULL;
 2001|      0|          CURLcode result =
 2002|      0|            Curl_urldecode(newp, n, &decoded, &dlen, REJECT_CTRL);
 2003|      0|          if(result || hostname_check(u, decoded, dlen))
  ------------------
  |  Branch (2003:14): [True: 0, False: 0]
  |  Branch (2003:24): [True: 0, False: 0]
  ------------------
 2004|      0|            bad = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2005|      0|          curlx_free(decoded);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2006|      0|        }
 2007|      0|        else if(hostname_check(u, (char *)CURL_UNCONST(newp), n))
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
  |  Branch (2007:17): [True: 0, False: 0]
  ------------------
 2008|      0|          bad = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 2009|      0|        if(bad) {
  ------------------
  |  Branch (2009:12): [True: 0, False: 0]
  ------------------
 2010|      0|          curlx_dyn_free(&enc);
 2011|      0|          return CURLUE_BAD_HOSTNAME;
 2012|      0|        }
 2013|      0|      }
 2014|      0|    }
 2015|       |
 2016|      0|    curlx_free(*storep);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 2017|      0|    *storep = (char *)CURL_UNCONST(newp);
  ------------------
  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 2018|      0|  }
 2019|      0|  return CURLUE_OK;
 2020|      0|}
Curl_url_same_origin:
 2023|  10.8k|{
 2024|  10.8k|  const struct Curl_scheme *s = NULL;
 2025|       |
 2026|       |  /* base must be an absolute URL */
 2027|  10.8k|  if(!base->scheme || !base->host)
  ------------------
  |  Branch (2027:6): [True: 0, False: 10.8k]
  |  Branch (2027:23): [True: 0, False: 10.8k]
  ------------------
 2028|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2029|  10.8k|  if(href->scheme && !curl_strequal(base->scheme, href->scheme))
  ------------------
  |  Branch (2029:6): [True: 10.8k, False: 0]
  |  Branch (2029:22): [True: 0, False: 10.8k]
  ------------------
 2030|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2031|  10.8k|  if(href->host) {
  ------------------
  |  Branch (2031:6): [True: 10.8k, False: 0]
  ------------------
 2032|  10.8k|    if(!curl_strequal(base->host, href->host))
  ------------------
  |  Branch (2032:8): [True: 22, False: 10.7k]
  ------------------
 2033|     22|      return FALSE;
  ------------------
  |  | 1058|     22|#define FALSE false
  ------------------
 2034|  10.7k|    if(!curl_strequal(base->zoneid ? base->zoneid : "",
  ------------------
  |  Branch (2034:8): [True: 0, False: 10.7k]
  |  Branch (2034:23): [True: 2, False: 10.7k]
  ------------------
 2035|  10.7k|                      href->zoneid ? href->zoneid : ""))
  ------------------
  |  Branch (2035:23): [True: 2, False: 10.7k]
  ------------------
 2036|      0|      return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2037|  10.7k|    if(!curl_strequal(base->port, href->port)) {
  ------------------
  |  Branch (2037:8): [True: 56, False: 10.7k]
  ------------------
 2038|       |      /* This may still match if only one has an explicit port
 2039|       |       * and it is the default for the scheme. */
 2040|     56|      if(base->port && href->port)
  ------------------
  |  Branch (2040:10): [True: 2, False: 54]
  |  Branch (2040:24): [True: 1, False: 1]
  ------------------
 2041|      1|        return FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
 2042|       |
 2043|     55|      s = Curl_get_scheme(base->scheme);
 2044|     55|      if(!s) /* Cannot match default port for unknown scheme */
  ------------------
  |  Branch (2044:10): [True: 0, False: 55]
  ------------------
 2045|      0|        return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2046|       |
 2047|       |      /* The port which is set must be the default one */
 2048|     55|      if((base->port && (base->portnum != s->defport)) ||
  ------------------
  |  Branch (2048:11): [True: 1, False: 54]
  |  Branch (2048:25): [True: 1, False: 0]
  ------------------
 2049|     54|         (href->port && (href->portnum != s->defport)))
  ------------------
  |  Branch (2049:11): [True: 54, False: 0]
  |  Branch (2049:25): [True: 54, False: 0]
  ------------------
 2050|     55|        return FALSE;
  ------------------
  |  | 1058|     55|#define FALSE false
  ------------------
 2051|     55|    }
 2052|  10.7k|  }
 2053|      0|  else if(href->port) /* no host in href, then there must be no port */
  ------------------
  |  Branch (2053:11): [True: 0, False: 0]
  ------------------
 2054|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 2055|  10.7k|  return TRUE;
  ------------------
  |  | 1055|  10.7k|#define TRUE true
  ------------------
 2056|  10.8k|}
urlapi.c:find_host_sep:
   87|     14|{
   88|       |  /* Find the start of the hostname */
   89|     14|  const char *sep = strstr(url, "//");
   90|     14|  if(!sep)
  ------------------
  |  Branch (90:6): [True: 13, False: 1]
  ------------------
   91|     13|    sep = url;
   92|      1|  else
   93|      1|    sep += 2;
   94|       |
   95|       |  /* Find first / or ? */
   96|    294|  while(*sep && *sep != '/' && *sep != '?')
  ------------------
  |  Branch (96:9): [True: 283, False: 11]
  |  Branch (96:17): [True: 280, False: 3]
  |  Branch (96:32): [True: 280, False: 0]
  ------------------
   97|    280|    sep++;
   98|       |
   99|     14|  return sep;
  100|     14|}
urlapi.c:parse_authority:
  645|  52.7k|{
  646|  52.7k|  size_t offset;
  647|  52.7k|  CURLUcode uc;
  648|  52.7k|  CURLcode result;
  649|       |
  650|       |  /*
  651|       |   * Parse the login details and strip them out of the hostname.
  652|       |   */
  653|  52.7k|  uc = parse_hostname_login(u, auth, authlen, flags, &offset);
  654|  52.7k|  if(uc)
  ------------------
  |  Branch (654:6): [True: 1, False: 52.7k]
  ------------------
  655|      1|    goto out;
  656|       |
  657|  52.7k|  result = curlx_dyn_addn(host, auth + offset, authlen - offset);
  658|  52.7k|  if(result) {
  ------------------
  |  Branch (658:6): [True: 0, False: 52.7k]
  ------------------
  659|      0|    uc = cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  660|      0|    goto out;
  661|      0|  }
  662|       |
  663|  52.7k|  uc = parse_port(u, host, has_scheme);
  664|  52.7k|  if(uc)
  ------------------
  |  Branch (664:6): [True: 84, False: 52.6k]
  ------------------
  665|     84|    goto out;
  666|       |
  667|  52.6k|  if(!curlx_dyn_len(host))
  ------------------
  |  Branch (667:6): [True: 20, False: 52.6k]
  ------------------
  668|     20|    return CURLUE_NO_HOST;
  669|       |
  670|  52.6k|  switch(ipv4_normalize(host)) {
  671|  31.8k|  case HOST_IPV4:
  ------------------
  |  |   49|  31.8k|#define HOST_IPV4    2
  ------------------
  |  Branch (671:3): [True: 31.8k, False: 20.8k]
  ------------------
  672|  31.8k|    break;
  673|    136|  case HOST_IPV6:
  ------------------
  |  |   50|    136|#define HOST_IPV6    3
  ------------------
  |  Branch (673:3): [True: 136, False: 52.5k]
  ------------------
  674|    136|    uc = ipv6_parse(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  675|    136|    break;
  676|  20.7k|  case HOST_NAME:
  ------------------
  |  |   48|  20.7k|#define HOST_NAME    1
  ------------------
  |  Branch (676:3): [True: 20.7k, False: 31.9k]
  ------------------
  677|  20.7k|    uc = urldecode_host(host);
  678|  20.7k|    if(!uc)
  ------------------
  |  Branch (678:8): [True: 20.7k, False: 5]
  ------------------
  679|  20.7k|      uc = hostname_check(u, curlx_dyn_ptr(host), curlx_dyn_len(host));
  680|  20.7k|    break;
  681|      0|  case HOST_ERROR:
  ------------------
  |  |   47|      0|#define HOST_ERROR   (-1) /* out of memory */
  ------------------
  |  Branch (681:3): [True: 0, False: 52.6k]
  ------------------
  682|      0|    uc = CURLUE_OUT_OF_MEMORY;
  683|      0|    break;
  684|      0|  default:
  ------------------
  |  Branch (684:3): [True: 0, False: 52.6k]
  ------------------
  685|      0|    uc = CURLUE_BAD_HOSTNAME; /* Bad IPv4 address even */
  686|      0|    break;
  687|  52.6k|  }
  688|       |
  689|  52.7k|out:
  690|  52.7k|  return uc;
  691|  52.6k|}
urlapi.c:parse_hostname_login:
  262|  52.7k|{
  263|  52.7k|  CURLUcode ures = CURLUE_OK;
  264|  52.7k|  CURLcode result;
  265|  52.7k|  char *userp = NULL;
  266|  52.7k|  char *passwdp = NULL;
  267|  52.7k|  char *optionsp = NULL;
  268|  52.7k|  const struct Curl_scheme *h = NULL;
  269|       |
  270|       |  /* At this point, we assume all the other special cases have been taken
  271|       |   * care of, so the host is at most
  272|       |   *
  273|       |   *   [user[:password][;options]]@]hostname
  274|       |   *
  275|       |   * We need somewhere to put the embedded details, so do that first.
  276|       |   */
  277|  52.7k|  const char *ptr;
  278|       |
  279|  52.7k|  DEBUGASSERT(login);
  ------------------
  |  | 1081|  52.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (279:3): [True: 0, False: 52.7k]
  |  Branch (279:3): [True: 52.7k, False: 0]
  ------------------
  280|       |
  281|  52.7k|  *offset = 0;
  282|  52.7k|  ptr = memchr(login, '@', len);
  283|  52.7k|  if(!ptr)
  ------------------
  |  Branch (283:6): [True: 44.6k, False: 8.15k]
  ------------------
  284|  44.6k|    goto out;
  285|       |
  286|       |  /* We will now try to extract the
  287|       |   * possible login information in a string like:
  288|       |   * ftp://user:password@ftp.site.example:8021/README */
  289|  8.15k|  ptr++;
  290|       |
  291|       |  /* if this is a known scheme, get some details */
  292|  8.15k|  if(u->scheme)
  ------------------
  |  Branch (292:6): [True: 6.87k, False: 1.27k]
  ------------------
  293|  6.87k|    h = Curl_get_scheme(u->scheme);
  294|       |
  295|       |  /* We could use the login information in the URL so extract it. Only parse
  296|       |     options if the handler says we should. Note that 'h' might be NULL! */
  297|  8.15k|  result = Curl_parse_login_details(login, ptr - login - 1,
  298|  8.15k|                                    &userp, &passwdp,
  299|  8.15k|                                    (h && (h->flags & PROTOPT_URLOPTIONS)) ?
  ------------------
  |  |  225|  6.83k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (299:38): [True: 6.83k, False: 1.31k]
  |  Branch (299:43): [True: 4, False: 6.83k]
  ------------------
  300|  8.15k|                                    &optionsp : NULL);
  301|  8.15k|  if(result) {
  ------------------
  |  Branch (301:6): [True: 0, False: 8.15k]
  ------------------
  302|       |    /* the only possible error from Curl_parse_login_details is out of
  303|       |       memory: */
  304|      0|    ures = CURLUE_OUT_OF_MEMORY;
  305|      0|    goto out;
  306|      0|  }
  307|       |
  308|  8.15k|  if(userp) {
  ------------------
  |  Branch (308:6): [True: 8.15k, False: 0]
  ------------------
  309|  8.15k|    if(flags & CURLU_DISALLOW_USER) {
  ------------------
  |  |   92|  8.15k|#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
  ------------------
  |  Branch (309:8): [True: 1, False: 8.15k]
  ------------------
  310|       |      /* Option DISALLOW_USER is set and URL contains username. */
  311|      1|      ures = CURLUE_USER_NOT_ALLOWED;
  312|      1|      goto out;
  313|      1|    }
  314|  8.15k|    curlx_free(u->user);
  ------------------
  |  | 1483|  8.15k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  315|  8.15k|    u->user = userp;
  316|  8.15k|  }
  317|       |
  318|  8.15k|  if(passwdp) {
  ------------------
  |  Branch (318:6): [True: 620, False: 7.53k]
  ------------------
  319|    620|    curlx_free(u->password);
  ------------------
  |  | 1483|    620|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  320|    620|    u->password = passwdp;
  321|    620|  }
  322|       |
  323|  8.15k|  if(optionsp) {
  ------------------
  |  Branch (323:6): [True: 2, False: 8.15k]
  ------------------
  324|      2|    curlx_free(u->options);
  ------------------
  |  | 1483|      2|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  325|      2|    u->options = optionsp;
  326|      2|  }
  327|       |
  328|       |  /* the hostname starts at this offset */
  329|  8.15k|  *offset = ptr - login;
  330|  8.15k|  return CURLUE_OK;
  331|       |
  332|  44.6k|out:
  333|       |
  334|  44.6k|  curlx_free(userp);
  ------------------
  |  | 1483|  44.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  335|  44.6k|  curlx_free(passwdp);
  ------------------
  |  | 1483|  44.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  336|  44.6k|  curlx_free(optionsp);
  ------------------
  |  | 1483|  44.6k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  337|  44.6k|  u->user = NULL;
  338|  44.6k|  u->password = NULL;
  339|  44.6k|  u->options = NULL;
  340|       |
  341|  44.6k|  return ures;
  342|  8.15k|}
urlapi.c:urldecode_host:
  615|  20.7k|{
  616|  20.7k|  const char *per;
  617|  20.7k|  const char *hostname = curlx_dyn_ptr(host);
  618|  20.7k|  per = strchr(hostname, '%');
  619|  20.7k|  if(!per)
  ------------------
  |  Branch (619:6): [True: 20.5k, False: 214]
  ------------------
  620|       |    /* nothing to decode */
  621|  20.5k|    return CURLUE_OK;
  622|    214|  else {
  623|       |    /* encoded */
  624|    214|    size_t dlen;
  625|    214|    char *decoded;
  626|    214|    CURLcode result = Curl_urldecode(hostname, 0, &decoded, &dlen,
  627|    214|                                     REJECT_CTRL);
  628|    214|    if(result)
  ------------------
  |  Branch (628:8): [True: 5, False: 209]
  ------------------
  629|      5|      return CURLUE_BAD_HOSTNAME;
  630|    209|    curlx_dyn_reset(host);
  631|    209|    result = curlx_dyn_addn(host, decoded, dlen);
  632|    209|    curlx_free(decoded);
  ------------------
  |  | 1483|    209|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  633|    209|    if(result)
  ------------------
  |  Branch (633:8): [True: 0, False: 209]
  ------------------
  634|      0|      return cc2cu(result);
  ------------------
  |  |  104|      0|  ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
  |  |  ------------------
  |  |  |  Branch (104:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  635|    209|  }
  636|       |
  637|    209|  return CURLUE_OK;
  638|  20.7k|}
urlapi.c:is_dot:
  719|  2.46M|{
  720|  2.46M|  const char *p = *str;
  721|  2.46M|  if(*p == '.') {
  ------------------
  |  Branch (721:6): [True: 31.6k, False: 2.43M]
  ------------------
  722|  31.6k|    (*str)++;
  723|  31.6k|    (*clen)--;
  724|  31.6k|    return TRUE;
  ------------------
  |  | 1055|  31.6k|#define TRUE true
  ------------------
  725|  31.6k|  }
  726|  2.43M|  else if((*clen >= 3) &&
  ------------------
  |  Branch (726:11): [True: 2.41M, False: 15.3k]
  ------------------
  727|  2.41M|          (p[0] == '%') && (p[1] == '2') && ((p[2] | 0x20) == 'e')) {
  ------------------
  |  Branch (727:11): [True: 153k, False: 2.26M]
  |  Branch (727:28): [True: 89.4k, False: 63.9k]
  |  Branch (727:45): [True: 77.5k, False: 11.8k]
  ------------------
  728|  77.5k|    *str += 3;
  729|  77.5k|    *clen -= 3;
  730|  77.5k|    return TRUE;
  ------------------
  |  | 1055|  77.5k|#define TRUE true
  ------------------
  731|  77.5k|  }
  732|  2.35M|  return FALSE;
  ------------------
  |  | 1058|  2.35M|#define FALSE false
  ------------------
  733|  2.46M|}
urlapi.c:free_urlhandle:
   69|  95.3k|{
   70|  95.3k|  curlx_free(u->scheme);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   71|  95.3k|  curlx_free(u->user);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   72|  95.3k|  curlx_free(u->password);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   73|  95.3k|  curlx_free(u->options);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   74|  95.3k|  curlx_free(u->host);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   75|  95.3k|  curlx_free(u->zoneid);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   76|  95.3k|  curlx_free(u->port);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   77|  95.3k|  curlx_free(u->path);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   78|  95.3k|  curlx_free(u->query);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   79|  95.3k|  curlx_free(u->fragment);
  ------------------
  |  | 1483|  95.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
   80|  95.3k|}
urlapi.c:urlget_url:
 1451|  53.2k|{
 1452|  53.2k|  char *url;
 1453|  53.2k|  char *allochost = NULL;
 1454|  53.2k|  const char *fragmentsep =
 1455|  53.2k|    (u->fragment || (u->fragment_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|  1.04k|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1455:6): [True: 12.9k, False: 40.3k]
  |  Branch (1455:22): [True: 1.04k, False: 39.2k]
  |  Branch (1455:45): [True: 525, False: 515]
  ------------------
 1456|  39.7k|    "#" : "";
 1457|  53.2k|  const char *querysep = ((u->query && u->query[0]) ||
  ------------------
  |  Branch (1457:28): [True: 14.7k, False: 38.5k]
  |  Branch (1457:40): [True: 14.2k, False: 493]
  ------------------
 1458|  39.0k|                          (u->query_present && flags & CURLU_GET_EMPTY)) ?
  ------------------
  |  |  102|    493|#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
  ------------------
  |  Branch (1458:28): [True: 493, False: 38.5k]
  |  Branch (1458:48): [True: 422, False: 71]
  ------------------
 1459|  38.6k|    "?" : "";
 1460|  53.2k|  char portbuf[7];
 1461|  53.2k|  if(u->scheme && curl_strequal("file", u->scheme)) {
  ------------------
  |  Branch (1461:6): [True: 48.6k, False: 4.62k]
  |  Branch (1461:19): [True: 36, False: 48.5k]
  ------------------
 1462|     36|    url = curl_maprintf("file://%s%s%s%s%s",
 1463|     36|                        u->path, querysep, u->query ? u->query : "",
  ------------------
  |  Branch (1463:44): [True: 10, False: 26]
  ------------------
 1464|     36|                        fragmentsep, u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1464:38): [True: 4, False: 32]
  ------------------
 1465|     36|  }
 1466|  53.2k|  else if(!u->host)
  ------------------
  |  Branch (1466:11): [True: 4.62k, False: 48.5k]
  ------------------
 1467|  4.62k|    return CURLUE_NO_HOST;
 1468|  48.5k|  else {
 1469|  48.5k|    const char *scheme;
 1470|  48.5k|    char *options = u->options;
 1471|  48.5k|    char *port = u->port;
 1472|  48.5k|    const struct Curl_scheme *h = NULL;
 1473|  48.5k|    char schemebuf[MAX_SCHEME_LEN + 5];
 1474|  48.5k|    if(u->scheme)
  ------------------
  |  Branch (1474:8): [True: 48.5k, False: 0]
  ------------------
 1475|  48.5k|      scheme = u->scheme;
 1476|      0|    else if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|      0|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (1476:13): [True: 0, False: 0]
  ------------------
 1477|      0|      scheme = DEFAULT_SCHEME;
  ------------------
  |  |   66|      0|#define DEFAULT_SCHEME "https"
  ------------------
 1478|      0|    else
 1479|      0|      return CURLUE_NO_SCHEME;
 1480|       |
 1481|  48.5k|    h = Curl_get_scheme(scheme);
 1482|  48.5k|    if(!port && (flags & CURLU_DEFAULT_PORT)) {
  ------------------
  |  |   84|  44.3k|#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
  ------------------
  |  Branch (1482:8): [True: 44.3k, False: 4.22k]
  |  Branch (1482:17): [True: 0, False: 44.3k]
  ------------------
 1483|       |      /* there is no stored port number, but asked to deliver
 1484|       |         a default one for the scheme */
 1485|      0|      if(h) {
  ------------------
  |  Branch (1485:10): [True: 0, False: 0]
  ------------------
 1486|      0|        curl_msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
 1487|      0|        port = portbuf;
 1488|      0|      }
 1489|      0|    }
 1490|  48.5k|    else if(port) {
  ------------------
  |  Branch (1490:13): [True: 4.22k, False: 44.3k]
  ------------------
 1491|       |      /* there is a stored port number, but asked to inhibit if it matches
 1492|       |         the default one for the scheme */
 1493|  4.22k|      if(h && (h->defport == u->portnum) &&
  ------------------
  |  Branch (1493:10): [True: 4.21k, False: 3]
  |  Branch (1493:15): [True: 5, False: 4.21k]
  ------------------
 1494|      5|         (flags & CURLU_NO_DEFAULT_PORT))
  ------------------
  |  |   85|      5|#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
  ------------------
  |  Branch (1494:10): [True: 0, False: 5]
  ------------------
 1495|      0|        port = NULL;
 1496|  4.22k|    }
 1497|       |
 1498|  48.5k|    if(h && !(h->flags & PROTOPT_URLOPTIONS))
  ------------------
  |  |  225|  48.5k|#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
  ------------------
  |  Branch (1498:8): [True: 48.5k, False: 52]
  |  Branch (1498:13): [True: 48.5k, False: 5]
  ------------------
 1499|  48.5k|      options = NULL;
 1500|       |
 1501|  48.5k|    if(u->host[0] == '[') {
  ------------------
  |  Branch (1501:8): [True: 100, False: 48.4k]
  ------------------
 1502|    100|      if(u->zoneid) {
  ------------------
  |  Branch (1502:10): [True: 72, False: 28]
  ------------------
 1503|       |        /* make it '[ host %25 zoneid ]' */
 1504|     72|        struct dynbuf enc;
 1505|     72|        size_t hostlen = strlen(u->host);
 1506|     72|        curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|     72|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1507|     72|        if(curlx_dyn_addf(&enc, "%.*s%%25%s]", (int)hostlen - 1, u->host,
  ------------------
  |  Branch (1507:12): [True: 0, False: 72]
  ------------------
 1508|     72|                          u->zoneid))
 1509|      0|          return CURLUE_OUT_OF_MEMORY;
 1510|     72|        allochost = curlx_dyn_ptr(&enc);
 1511|     72|      }
 1512|    100|    }
 1513|  48.4k|    else if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  48.4k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1513:13): [True: 10.4k, False: 38.0k]
  ------------------
 1514|  10.4k|      allochost = curl_easy_escape(NULL, u->host, 0);
 1515|  10.4k|      if(!allochost)
  ------------------
  |  Branch (1515:10): [True: 0, False: 10.4k]
  ------------------
 1516|      0|        return CURLUE_OUT_OF_MEMORY;
 1517|  10.4k|    }
 1518|  38.0k|    else if(flags & CURLU_PUNYCODE) {
  ------------------
  |  |  100|  38.0k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1518:13): [True: 0, False: 38.0k]
  ------------------
 1519|      0|      if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1519:10): [True: 0, False: 0]
  ------------------
 1520|      0|        CURLUcode ret = host_decode(u->host, &allochost);
 1521|      0|        if(ret)
  ------------------
  |  Branch (1521:12): [True: 0, False: 0]
  ------------------
 1522|      0|          return ret;
 1523|      0|      }
 1524|      0|    }
 1525|  38.0k|    else if(flags & CURLU_PUNY2IDN) {
  ------------------
  |  |  101|  38.0k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1525:13): [True: 0, False: 38.0k]
  ------------------
 1526|      0|      if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1526:10): [True: 0, False: 0]
  ------------------
 1527|      0|        CURLUcode ret = host_encode(u->host, &allochost);
 1528|      0|        if(ret)
  ------------------
  |  Branch (1528:12): [True: 0, False: 0]
  ------------------
 1529|      0|          return ret;
 1530|      0|      }
 1531|      0|    }
 1532|       |
 1533|  48.5k|    if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
  ------------------
  |  |  105|  48.5k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
  |  Branch (1533:8): [True: 48.5k, False: 0]
  |  Branch (1533:44): [True: 0, False: 0]
  ------------------
 1534|  48.5k|      curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
 1535|      0|    else
 1536|      0|      schemebuf[0] = 0;
 1537|       |
 1538|  48.5k|    url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
 1539|  48.5k|                        schemebuf,
 1540|  48.5k|                        u->user ? u->user : "",
  ------------------
  |  Branch (1540:25): [True: 6.76k, False: 41.8k]
  ------------------
 1541|  48.5k|                        u->password ? ":" : "",
  ------------------
  |  Branch (1541:25): [True: 507, False: 48.0k]
  ------------------
 1542|  48.5k|                        u->password ? u->password : "",
  ------------------
  |  Branch (1542:25): [True: 507, False: 48.0k]
  ------------------
 1543|  48.5k|                        options ? ";" : "",
  ------------------
  |  Branch (1543:25): [True: 1, False: 48.5k]
  ------------------
 1544|  48.5k|                        options ? options : "",
  ------------------
  |  Branch (1544:25): [True: 1, False: 48.5k]
  ------------------
 1545|  48.5k|                        (u->user || u->password || options) ? "@" : "",
  ------------------
  |  Branch (1545:26): [True: 6.76k, False: 41.8k]
  |  Branch (1545:37): [True: 0, False: 41.8k]
  |  Branch (1545:52): [True: 0, False: 41.8k]
  ------------------
 1546|  48.5k|                        allochost ? allochost : u->host,
  ------------------
  |  Branch (1546:25): [True: 10.5k, False: 38.0k]
  ------------------
 1547|  48.5k|                        port ? ":" : "",
  ------------------
  |  Branch (1547:25): [True: 4.22k, False: 44.3k]
  ------------------
 1548|  48.5k|                        port ? port : "",
  ------------------
  |  Branch (1548:25): [True: 4.22k, False: 44.3k]
  ------------------
 1549|  48.5k|                        u->path ? u->path : "/",
  ------------------
  |  Branch (1549:25): [True: 33.9k, False: 14.6k]
  ------------------
 1550|  48.5k|                        querysep,
 1551|  48.5k|                        u->query ? u->query : "",
  ------------------
  |  Branch (1551:25): [True: 14.6k, False: 33.8k]
  ------------------
 1552|  48.5k|                        fragmentsep,
 1553|  48.5k|                        u->fragment ? u->fragment : "");
  ------------------
  |  Branch (1553:25): [True: 12.9k, False: 35.6k]
  ------------------
 1554|  48.5k|    curlx_free(allochost);
  ------------------
  |  | 1483|  48.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1555|  48.5k|  }
 1556|  48.6k|  if(!url)
  ------------------
  |  Branch (1556:6): [True: 0, False: 48.6k]
  ------------------
 1557|      0|    return CURLUE_OUT_OF_MEMORY;
 1558|  48.6k|  *part = url;
 1559|  48.6k|  return CURLUE_OK;
 1560|  48.6k|}
urlapi.c:urlget_format:
 1383|   104k|{
 1384|   104k|  CURLUcode uc = CURLUE_OK;
 1385|   104k|  size_t partlen = strlen(ptr);
 1386|   104k|  bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
  ------------------
  |  |   93|   104k|#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
  ------------------
  |  Branch (1386:20): [True: 4.93k, False: 99.9k]
  ------------------
 1387|   104k|  bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
  ------------------
  |  |   94|   104k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1387:20): [True: 21.5k, False: 83.2k]
  ------------------
 1388|   104k|  bool punycode = (flags & CURLU_PUNYCODE) && (what == CURLUPART_HOST);
  ------------------
  |  |  100|   104k|#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
  ------------------
  |  Branch (1388:19): [True: 0, False: 104k]
  |  Branch (1388:47): [True: 0, False: 0]
  ------------------
 1389|   104k|  bool depunyfy = (flags & CURLU_PUNY2IDN) && (what == CURLUPART_HOST);
  ------------------
  |  |  101|   104k|#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
  ------------------
  |  Branch (1389:19): [True: 0, False: 104k]
  |  Branch (1389:47): [True: 0, False: 0]
  ------------------
 1390|   104k|  char *part = curlx_memdup0(ptr, partlen);
 1391|   104k|  *partp = NULL;
 1392|   104k|  if(!part)
  ------------------
  |  Branch (1392:6): [True: 0, False: 104k]
  ------------------
 1393|      0|    return CURLUE_OUT_OF_MEMORY;
 1394|   104k|  if(plusdecode) {
  ------------------
  |  Branch (1394:6): [True: 0, False: 104k]
  ------------------
 1395|       |    /* convert + to space */
 1396|      0|    char *plus = part;
 1397|      0|    size_t i = 0;
 1398|      0|    for(i = 0; i < partlen; ++plus, i++) {
  ------------------
  |  Branch (1398:16): [True: 0, False: 0]
  ------------------
 1399|      0|      if(*plus == '+')
  ------------------
  |  Branch (1399:10): [True: 0, False: 0]
  ------------------
 1400|      0|        *plus = ' ';
 1401|      0|    }
 1402|      0|  }
 1403|   104k|  if(urldecode) {
  ------------------
  |  Branch (1403:6): [True: 4.93k, False: 99.9k]
  ------------------
 1404|  4.93k|    char *decoded;
 1405|  4.93k|    size_t dlen;
 1406|       |    /* this unconditional rejection of control bytes is documented API
 1407|       |       behavior */
 1408|  4.93k|    CURLcode result = Curl_urldecode(part, partlen, &decoded, &dlen,
 1409|  4.93k|                                     REJECT_CTRL);
 1410|  4.93k|    curlx_free(part);
  ------------------
  |  | 1483|  4.93k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1411|  4.93k|    if(result)
  ------------------
  |  Branch (1411:8): [True: 2, False: 4.93k]
  ------------------
 1412|      2|      return CURLUE_URLDECODE;
 1413|  4.93k|    part = decoded;
 1414|  4.93k|    partlen = dlen;
 1415|  4.93k|  }
 1416|   104k|  if(urlencode) {
  ------------------
  |  Branch (1416:6): [True: 21.5k, False: 83.2k]
  ------------------
 1417|  21.5k|    struct dynbuf enc;
 1418|  21.5k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  21.5k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1419|  21.5k|    uc = urlencode_str(&enc, part, partlen, TRUE, what == CURLUPART_QUERY ?
  ------------------
  |  | 1055|  21.5k|#define TRUE true
  ------------------
  |  Branch (1419:51): [True: 0, False: 21.5k]
  ------------------
 1420|  21.5k|                       QUERY_YES : QUERY_NO);
  ------------------
  |  |   54|      0|#define QUERY_YES     4
  ------------------
                                     QUERY_YES : QUERY_NO);
  ------------------
  |  |   52|  43.1k|#define QUERY_NO      2
  ------------------
 1421|  21.5k|    curlx_free(part);
  ------------------
  |  | 1483|  21.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1422|  21.5k|    if(uc)
  ------------------
  |  Branch (1422:8): [True: 0, False: 21.5k]
  ------------------
 1423|      0|      return uc;
 1424|  21.5k|    part = curlx_dyn_ptr(&enc);
 1425|  21.5k|  }
 1426|  83.2k|  else if(punycode) {
  ------------------
  |  Branch (1426:11): [True: 0, False: 83.2k]
  ------------------
 1427|      0|    if(!Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1427:8): [True: 0, False: 0]
  ------------------
 1428|      0|      char *punyversion = NULL;
 1429|      0|      uc = host_decode(part, &punyversion);
 1430|      0|      curlx_free(part);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1431|      0|      if(uc)
  ------------------
  |  Branch (1431:10): [True: 0, False: 0]
  ------------------
 1432|      0|        return uc;
 1433|      0|      part = punyversion;
 1434|      0|    }
 1435|      0|  }
 1436|  83.2k|  else if(depunyfy) {
  ------------------
  |  Branch (1436:11): [True: 0, False: 83.2k]
  ------------------
 1437|      0|    if(Curl_is_ASCII_name(u->host)) {
  ------------------
  |  Branch (1437:8): [True: 0, False: 0]
  ------------------
 1438|      0|      char *unpunified = NULL;
 1439|      0|      uc = host_encode(part, &unpunified);
 1440|      0|      curlx_free(part);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1441|      0|      if(uc)
  ------------------
  |  Branch (1441:10): [True: 0, False: 0]
  ------------------
 1442|      0|        return uc;
 1443|      0|      part = unpunified;
 1444|      0|    }
 1445|      0|  }
 1446|   104k|  *partp = part;
 1447|   104k|  return CURLUE_OK;
 1448|   104k|}
urlapi.c:urlset_clear:
 1756|  14.2k|{
 1757|  14.2k|  switch(what) {
 1758|      0|  case CURLUPART_URL:
  ------------------
  |  Branch (1758:3): [True: 0, False: 14.2k]
  ------------------
 1759|      0|    free_urlhandle(u);
 1760|      0|    memset(u, 0, sizeof(struct Curl_URL));
 1761|      0|    break;
 1762|      0|  case CURLUPART_SCHEME:
  ------------------
  |  Branch (1762:3): [True: 0, False: 14.2k]
  ------------------
 1763|      0|    curlx_safefree(u->scheme);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1764|      0|    u->guessed_scheme = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1765|      0|    break;
 1766|  4.74k|  case CURLUPART_USER:
  ------------------
  |  Branch (1766:3): [True: 4.74k, False: 9.49k]
  ------------------
 1767|  4.74k|    curlx_safefree(u->user);
  ------------------
  |  | 1327|  4.74k|  do {                      \
  |  | 1328|  4.74k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.74k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.74k|    (ptr) = NULL;           \
  |  | 1330|  4.74k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.74k]
  |  |  ------------------
  ------------------
 1768|  4.74k|    break;
 1769|  4.74k|  case CURLUPART_PASSWORD:
  ------------------
  |  Branch (1769:3): [True: 4.74k, False: 9.49k]
  ------------------
 1770|  4.74k|    curlx_safefree(u->password);
  ------------------
  |  | 1327|  4.74k|  do {                      \
  |  | 1328|  4.74k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.74k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.74k|    (ptr) = NULL;           \
  |  | 1330|  4.74k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.74k]
  |  |  ------------------
  ------------------
 1771|  4.74k|    break;
 1772|      0|  case CURLUPART_OPTIONS:
  ------------------
  |  Branch (1772:3): [True: 0, False: 14.2k]
  ------------------
 1773|      0|    curlx_safefree(u->options);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1774|      0|    break;
 1775|      0|  case CURLUPART_HOST:
  ------------------
  |  Branch (1775:3): [True: 0, False: 14.2k]
  ------------------
 1776|      0|    curlx_safefree(u->host);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1777|      0|    break;
 1778|      0|  case CURLUPART_ZONEID:
  ------------------
  |  Branch (1778:3): [True: 0, False: 14.2k]
  ------------------
 1779|      0|    curlx_safefree(u->zoneid);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1780|      0|    break;
 1781|      0|  case CURLUPART_PORT:
  ------------------
  |  Branch (1781:3): [True: 0, False: 14.2k]
  ------------------
 1782|      0|    u->portnum = 0;
 1783|      0|    curlx_safefree(u->port);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1784|      0|    break;
 1785|      0|  case CURLUPART_PATH:
  ------------------
  |  Branch (1785:3): [True: 0, False: 14.2k]
  ------------------
 1786|      0|    curlx_safefree(u->path);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1787|      0|    break;
 1788|      0|  case CURLUPART_QUERY:
  ------------------
  |  Branch (1788:3): [True: 0, False: 14.2k]
  ------------------
 1789|      0|    curlx_safefree(u->query);
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1790|      0|    u->query_present = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1791|      0|    break;
 1792|  4.74k|  case CURLUPART_FRAGMENT:
  ------------------
  |  Branch (1792:3): [True: 4.74k, False: 9.49k]
  ------------------
 1793|  4.74k|    curlx_safefree(u->fragment);
  ------------------
  |  | 1327|  4.74k|  do {                      \
  |  | 1328|  4.74k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.74k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.74k|    (ptr) = NULL;           \
  |  | 1330|  4.74k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.74k]
  |  |  ------------------
  ------------------
 1794|  4.74k|    u->fragment_present = FALSE;
  ------------------
  |  | 1058|  4.74k|#define FALSE false
  ------------------
 1795|  4.74k|    break;
 1796|      0|  default:
  ------------------
  |  Branch (1796:3): [True: 0, False: 14.2k]
  ------------------
 1797|      0|    return CURLUE_UNKNOWN_PART;
 1798|  14.2k|  }
 1799|  14.2k|  return CURLUE_OK;
 1800|  14.2k|}
urlapi.c:set_url_port:
 1689|  1.09k|{
 1690|  1.09k|  char *tmp;
 1691|  1.09k|  curl_off_t port;
 1692|  1.09k|  if(!ISDIGIT(provided_port[0]))
  ------------------
  |  |   44|  1.09k|#define ISDIGIT(x)  (((x) >= '0') && ((x) <= '9'))
  |  |  ------------------
  |  |  |  Branch (44:22): [True: 1.09k, False: 0]
  |  |  |  Branch (44:38): [True: 1.09k, False: 0]
  |  |  ------------------
  ------------------
 1693|       |    /* not a number */
 1694|      0|    return CURLUE_BAD_PORT_NUMBER;
 1695|  1.09k|  if(curlx_str_number(&provided_port, &port, 0xffff) || *provided_port)
  ------------------
  |  Branch (1695:6): [True: 0, False: 1.09k]
  |  Branch (1695:57): [True: 0, False: 1.09k]
  ------------------
 1696|       |    /* weirdly provided number, not good! */
 1697|      0|    return CURLUE_BAD_PORT_NUMBER;
 1698|  1.09k|  tmp = curl_maprintf("%" CURL_FORMAT_CURL_OFF_T, port);
  ------------------
  |  |  341|  1.09k|#    define CURL_FORMAT_CURL_OFF_T     "ld"
  ------------------
 1699|  1.09k|  if(!tmp)
  ------------------
  |  Branch (1699:6): [True: 0, False: 1.09k]
  ------------------
 1700|      0|    return CURLUE_OUT_OF_MEMORY;
 1701|  1.09k|  curlx_free(u->port);
  ------------------
  |  | 1483|  1.09k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1702|  1.09k|  u->port = tmp;
 1703|  1.09k|  u->portnum = (unsigned short)port;
 1704|  1.09k|  return CURLUE_OK;
 1705|  1.09k|}
urlapi.c:set_url:
 1709|  53.2k|{
 1710|       |  /*
 1711|       |   * Allow a new URL to replace the existing (if any) contents.
 1712|       |   *
 1713|       |   * If the existing contents is enough for a URL, allow a relative URL to
 1714|       |   * replace it.
 1715|       |   */
 1716|  53.2k|  CURLUcode uc;
 1717|  53.2k|  char *oldurl = NULL;
 1718|       |
 1719|  53.2k|  if(!part_size) {
  ------------------
  |  Branch (1719:6): [True: 250, False: 52.9k]
  ------------------
 1720|       |    /* a blank URL is not a valid URL unless we already have a complete one
 1721|       |       and this is a redirect */
 1722|    250|    uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
 1723|    250|    if(!uc) {
  ------------------
  |  Branch (1723:8): [True: 0, False: 250]
  ------------------
 1724|       |      /* success, meaning the "" is a fine relative URL, but nothing
 1725|       |         changes */
 1726|      0|      curlx_free(oldurl);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1727|      0|      return CURLUE_OK;
 1728|      0|    }
 1729|    250|    if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1729:8): [True: 0, False: 250]
  ------------------
 1730|      0|      return uc;
 1731|    250|    return CURLUE_MALFORMED_INPUT;
 1732|    250|  }
 1733|       |
 1734|       |  /* if the new URL is absolute replace the existing with the new. */
 1735|  52.9k|  if(Curl_is_absolute_url(url, NULL, 0,
  ------------------
  |  Branch (1735:6): [True: 38.0k, False: 14.9k]
  ------------------
 1736|  52.9k|                          flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   96|  52.9k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
                                        flags & (CURLU_GUESS_SCHEME | CURLU_DEFAULT_SCHEME)))
  ------------------
  |  |   88|  52.9k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1737|  38.0k|    return parseurl_and_replace(url, u, flags);
 1738|       |
 1739|       |  /* if the old URL is incomplete (we cannot get an absolute URL in
 1740|       |     'oldurl'), replace the existing with the new.
 1741|       |     Always include "scheme://" to make the URL "complete" */
 1742|  14.9k|  uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags& ~CURLU_NO_GUESS_SCHEME);
  ------------------
  |  |  105|  14.9k|#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
  ------------------
 1743|  14.9k|  if(uc == CURLUE_OUT_OF_MEMORY)
  ------------------
  |  Branch (1743:6): [True: 0, False: 14.9k]
  ------------------
 1744|      0|    return uc;
 1745|  14.9k|  else if(uc)
  ------------------
  |  Branch (1745:11): [True: 4.37k, False: 10.5k]
  ------------------
 1746|  4.37k|    return parseurl_and_replace(url, u, flags);
 1747|       |
 1748|  10.5k|  DEBUGASSERT(oldurl); /* it is set here */
  ------------------
  |  | 1081|  10.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1748:3): [True: 0, False: 10.5k]
  |  Branch (1748:3): [True: 10.5k, False: 0]
  ------------------
 1749|       |  /* apply the relative part to create a new URL */
 1750|  10.5k|  uc = redirect_url(oldurl, url, u, flags);
 1751|  10.5k|  curlx_free(oldurl);
  ------------------
  |  | 1483|  10.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1752|  10.5k|  return uc;
 1753|  10.5k|}
urlapi.c:parseurl_and_replace:
 1218|  52.9k|{
 1219|  52.9k|  CURLUcode ures;
 1220|  52.9k|  CURLU tmpurl;
 1221|  52.9k|  memset(&tmpurl, 0, sizeof(tmpurl));
 1222|  52.9k|  ures = parseurl(url, &tmpurl, flags);
 1223|  52.9k|  if(!ures) {
  ------------------
  |  Branch (1223:6): [True: 52.4k, False: 562]
  ------------------
 1224|  52.4k|    free_urlhandle(u);
 1225|  52.4k|    *u = tmpurl;
 1226|  52.4k|  }
 1227|  52.9k|  return ures;
 1228|  52.9k|}
urlapi.c:parseurl:
 1127|  52.9k|{
 1128|  52.9k|  const char *path;
 1129|  52.9k|  size_t pathlen;
 1130|  52.9k|  char schemebuf[MAX_SCHEME_LEN + 1];
 1131|  52.9k|  size_t schemelen = 0;
 1132|  52.9k|  size_t urllen;
 1133|  52.9k|  CURLUcode ures = CURLUE_OK;
 1134|  52.9k|  struct dynbuf host;
 1135|  52.9k|  bool is_file = FALSE;
  ------------------
  |  | 1058|  52.9k|#define FALSE false
  ------------------
 1136|       |
 1137|  52.9k|  DEBUGASSERT(url);
  ------------------
  |  | 1081|  52.9k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1137:3): [True: 0, False: 52.9k]
  |  Branch (1137:3): [True: 52.9k, False: 0]
  ------------------
 1138|       |
 1139|  52.9k|  curlx_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  52.9k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1140|       |
 1141|  52.9k|  ures = Curl_junkscan(url, &urllen, !!(flags & CURLU_ALLOW_SPACE));
  ------------------
  |  |   99|  52.9k|#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
  ------------------
 1142|  52.9k|  if(ures)
  ------------------
  |  Branch (1142:6): [True: 38, False: 52.9k]
  ------------------
 1143|     38|    goto fail;
 1144|       |
 1145|  52.9k|  schemelen = Curl_is_absolute_url(url, schemebuf, sizeof(schemebuf),
 1146|  52.9k|                                   flags & (CURLU_GUESS_SCHEME |
  ------------------
  |  |   96|  52.9k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
 1147|  52.9k|                                            CURLU_DEFAULT_SCHEME));
  ------------------
  |  |   88|  52.9k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
 1148|       |
 1149|       |  /* handle the file: scheme */
 1150|  52.9k|  if(schemelen && !strcmp(schemebuf, "file")) {
  ------------------
  |  Branch (1150:6): [True: 48.5k, False: 4.35k]
  |  Branch (1150:19): [True: 107, False: 48.4k]
  ------------------
 1151|    107|    is_file = TRUE;
  ------------------
  |  | 1055|    107|#define TRUE true
  ------------------
 1152|    107|    ures = parse_file(url, urllen, u, &path, &pathlen);
 1153|    107|  }
 1154|  52.8k|  else {
 1155|  52.8k|    const char *hostp = NULL;
 1156|  52.8k|    size_t hostlen;
 1157|  52.8k|    ures = parse_scheme(url, u, schemebuf, schemelen, flags, &hostp);
 1158|  52.8k|    if(ures)
  ------------------
  |  Branch (1158:8): [True: 8, False: 52.8k]
  ------------------
 1159|      8|      goto fail;
 1160|       |
 1161|       |    /* find the end of the hostname + port number */
 1162|  52.8k|    hostlen = strcspn(hostp, "/?#");
 1163|  52.8k|    path = &hostp[hostlen];
 1164|       |
 1165|       |    /* this pathlen also contains the query and the fragment */
 1166|  52.8k|    pathlen = urllen - (path - url);
 1167|  52.8k|    if(hostlen) {
  ------------------
  |  Branch (1167:8): [True: 52.7k, False: 48]
  ------------------
 1168|  52.7k|      ures = parse_authority(u, hostp, hostlen, flags, &host,
 1169|  52.7k|                             u->scheme != NULL);
 1170|  52.7k|      if(!ures && (flags & CURLU_GUESS_SCHEME) && !u->scheme)
  ------------------
  |  |   96|  52.3k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (1170:10): [True: 52.3k, False: 397]
  |  Branch (1170:19): [True: 26.0k, False: 26.3k]
  |  Branch (1170:51): [True: 4.17k, False: 21.8k]
  ------------------
 1171|  4.17k|        ures = guess_scheme(u, &host);
 1172|  52.7k|    }
 1173|     48|    else if(flags & CURLU_NO_AUTHORITY) {
  ------------------
  |  |   97|     48|#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
  ------------------
  |  Branch (1173:13): [True: 0, False: 48]
  ------------------
 1174|       |      /* allowed to be empty. */
 1175|      0|      if(curlx_dyn_add(&host, ""))
  ------------------
  |  Branch (1175:10): [True: 0, False: 0]
  ------------------
 1176|      0|        ures = CURLUE_OUT_OF_MEMORY;
 1177|      0|    }
 1178|     48|    else
 1179|     48|      ures = CURLUE_NO_HOST;
 1180|  52.8k|  }
 1181|  52.9k|  if(!ures) {
  ------------------
  |  Branch (1181:6): [True: 52.4k, False: 516]
  ------------------
 1182|       |    /* The path might at this point contain a fragment and/or a query to
 1183|       |       handle */
 1184|  52.4k|    const char *fragment = strchr(path, '#');
 1185|  52.4k|    if(fragment) {
  ------------------
  |  Branch (1185:8): [True: 17.5k, False: 34.8k]
  ------------------
 1186|  17.5k|      size_t fraglen = pathlen - (fragment - path);
 1187|  17.5k|      ures = handle_fragment(u, fragment, fraglen, flags);
 1188|       |      /* after this, pathlen still contains the query */
 1189|  17.5k|      pathlen -= fraglen;
 1190|  17.5k|    }
 1191|  52.4k|  }
 1192|  52.9k|  if(!ures) {
  ------------------
  |  Branch (1192:6): [True: 52.4k, False: 516]
  ------------------
 1193|  52.4k|    const char *query = memchr(path, '?', pathlen);
 1194|  52.4k|    if(query) {
  ------------------
  |  Branch (1194:8): [True: 15.6k, False: 36.8k]
  ------------------
 1195|  15.6k|      size_t qlen = pathlen - (query - path);
 1196|  15.6k|      ures = handle_query(u, query, qlen, flags);
 1197|  15.6k|      pathlen -= qlen;
 1198|  15.6k|    }
 1199|  52.4k|  }
 1200|  52.9k|  if(!ures)
  ------------------
  |  Branch (1200:6): [True: 52.4k, False: 516]
  ------------------
 1201|       |    /* the fragment and query parts are trimmed off from the path */
 1202|  52.4k|    ures = handle_path(u, path, pathlen, flags, is_file);
 1203|  52.9k|  if(!ures) {
  ------------------
  |  Branch (1203:6): [True: 52.4k, False: 516]
  ------------------
 1204|  52.4k|    u->host = curlx_dyn_ptr(&host);
 1205|  52.4k|    return CURLUE_OK;
 1206|  52.4k|  }
 1207|    562|fail:
 1208|    562|  curlx_dyn_free(&host);
 1209|    562|  free_urlhandle(u);
 1210|    562|  return ures;
 1211|  52.9k|}
urlapi.c:parse_scheme:
  956|  52.8k|{
  957|       |  /* clear path */
  958|  52.8k|  const char *schemep = NULL;
  959|       |
  960|  52.8k|  if(schemelen) {
  ------------------
  |  Branch (960:6): [True: 48.4k, False: 4.35k]
  ------------------
  961|  48.4k|    int i = 0;
  962|  48.4k|    const char *p = &url[schemelen + 1];
  963|   135k|    while((*p == '/') && (i < 4)) {
  ------------------
  |  Branch (963:11): [True: 87.4k, False: 48.4k]
  |  Branch (963:26): [True: 87.4k, False: 0]
  ------------------
  964|  87.4k|      p++;
  965|  87.4k|      i++;
  966|  87.4k|    }
  967|       |
  968|  48.4k|    schemep = schemebuf;
  969|  48.4k|    if(!Curl_get_scheme(schemep) &&
  ------------------
  |  Branch (969:8): [True: 87, False: 48.3k]
  ------------------
  970|     87|       !(flags & CURLU_NON_SUPPORT_SCHEME))
  ------------------
  |  |   90|     87|#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
  ------------------
  |  Branch (970:8): [True: 1, False: 86]
  ------------------
  971|      1|      return CURLUE_UNSUPPORTED_SCHEME;
  972|       |
  973|  48.4k|    if((i < 1) || (i > 3))
  ------------------
  |  Branch (973:8): [True: 3, False: 48.4k]
  |  Branch (973:19): [True: 4, False: 48.4k]
  ------------------
  974|       |      /* less than one or more than three slashes */
  975|      7|      return CURLUE_BAD_SLASHES;
  976|       |
  977|  48.4k|    *hostpp = p; /* hostname starts here */
  978|  48.4k|  }
  979|  4.35k|  else {
  980|       |    /* no scheme! */
  981|       |
  982|  4.35k|    if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   88|  4.35k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
                  if(!(flags & (CURLU_DEFAULT_SCHEME | CURLU_GUESS_SCHEME)))
  ------------------
  |  |   96|  4.35k|#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
  ------------------
  |  Branch (982:8): [True: 0, False: 4.35k]
  ------------------
  983|      0|      return CURLUE_BAD_SCHEME;
  984|       |
  985|  4.35k|    if(flags & CURLU_DEFAULT_SCHEME)
  ------------------
  |  |   88|  4.35k|#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
  ------------------
  |  Branch (985:8): [True: 0, False: 4.35k]
  ------------------
  986|      0|      schemep = DEFAULT_SCHEME;
  ------------------
  |  |   66|      0|#define DEFAULT_SCHEME "https"
  ------------------
  987|       |
  988|       |    /*
  989|       |     * The URL was badly formatted, let's try without scheme specified.
  990|       |     */
  991|  4.35k|    *hostpp = url;
  992|  4.35k|  }
  993|       |
  994|  52.8k|  if(schemep) {
  ------------------
  |  Branch (994:6): [True: 48.4k, False: 4.35k]
  ------------------
  995|  48.4k|    u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1477|  48.4k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  996|  48.4k|    if(!u->scheme)
  ------------------
  |  Branch (996:8): [True: 0, False: 48.4k]
  ------------------
  997|      0|      return CURLUE_OUT_OF_MEMORY;
  998|  48.4k|  }
  999|  52.8k|  return CURLUE_OK;
 1000|  52.8k|}
urlapi.c:guess_scheme:
 1003|  4.17k|{
 1004|  4.17k|  const char *hostname = curlx_dyn_ptr(host);
 1005|  4.17k|  const char *schemep = NULL;
 1006|       |  /* legacy curl-style guess based on hostname */
 1007|  4.17k|  if(checkprefix("ftp.", hostname))
  ------------------
  |  |   33|  4.17k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  4.17k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 4.16k]
  |  |  ------------------
  ------------------
 1008|      1|    schemep = "ftp";
 1009|  4.16k|  else if(checkprefix("dict.", hostname))
  ------------------
  |  |   33|  4.16k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  4.16k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 4.16k]
  |  |  ------------------
  ------------------
 1010|      1|    schemep = "dict";
 1011|  4.16k|  else if(checkprefix("ldap.", hostname))
  ------------------
  |  |   33|  4.16k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  4.16k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 4.16k]
  |  |  ------------------
  ------------------
 1012|      1|    schemep = "ldap";
 1013|  4.16k|  else if(checkprefix("imap.", hostname))
  ------------------
  |  |   33|  4.16k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  4.16k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 4.16k]
  |  |  ------------------
  ------------------
 1014|      1|    schemep = "imap";
 1015|  4.16k|  else if(checkprefix("smtp.", hostname))
  ------------------
  |  |   33|  4.16k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  4.16k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 4.16k]
  |  |  ------------------
  ------------------
 1016|      1|    schemep = "smtp";
 1017|  4.16k|  else if(checkprefix("pop3.", hostname))
  ------------------
  |  |   33|  4.16k|#define checkprefix(a, b) curl_strnequal(b, STRCONST(a))
  |  |  ------------------
  |  |  |  | 1292|  4.16k|#define STRCONST(x) x, sizeof(x) - 1
  |  |  ------------------
  |  |  |  Branch (33:27): [True: 1, False: 4.16k]
  |  |  ------------------
  ------------------
 1018|      1|    schemep = "pop3";
 1019|  4.16k|  else
 1020|  4.16k|    schemep = "http";
 1021|       |
 1022|  4.17k|  u->scheme = curlx_strdup(schemep);
  ------------------
  |  | 1477|  4.17k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1023|  4.17k|  if(!u->scheme)
  ------------------
  |  Branch (1023:6): [True: 0, False: 4.17k]
  ------------------
 1024|      0|    return CURLUE_OUT_OF_MEMORY;
 1025|       |
 1026|  4.17k|  u->guessed_scheme = TRUE;
  ------------------
  |  | 1055|  4.17k|#define TRUE true
  ------------------
 1027|  4.17k|  return CURLUE_OK;
 1028|  4.17k|}
urlapi.c:handle_fragment:
 1032|  17.5k|{
 1033|  17.5k|  CURLUcode ures;
 1034|  17.5k|  u->fragment_present = TRUE;
  ------------------
  |  | 1055|  17.5k|#define TRUE true
  ------------------
 1035|  17.5k|  if(fraglen > 1) {
  ------------------
  |  Branch (1035:6): [True: 15.7k, False: 1.79k]
  ------------------
 1036|       |    /* skip the leading '#' in the copy but include the terminating null */
 1037|  15.7k|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  15.7k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1037:8): [True: 8.42k, False: 7.31k]
  ------------------
 1038|  8.42k|      struct dynbuf enc;
 1039|  8.42k|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  8.42k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1040|  8.42k|      ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  | 1055|  8.42k|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, fragment + 1, fraglen - 1, TRUE, QUERY_NO);
  ------------------
  |  |   52|  8.42k|#define QUERY_NO      2
  ------------------
 1041|  8.42k|      if(ures)
  ------------------
  |  Branch (1041:10): [True: 0, False: 8.42k]
  ------------------
 1042|      0|        return ures;
 1043|  8.42k|      u->fragment = curlx_dyn_ptr(&enc);
 1044|  8.42k|    }
 1045|  7.31k|    else {
 1046|  7.31k|      u->fragment = curlx_memdup0(fragment + 1, fraglen - 1);
 1047|  7.31k|      if(!u->fragment)
  ------------------
  |  Branch (1047:10): [True: 0, False: 7.31k]
  ------------------
 1048|      0|        return CURLUE_OUT_OF_MEMORY;
 1049|  7.31k|    }
 1050|  15.7k|  }
 1051|  17.5k|  return CURLUE_OK;
 1052|  17.5k|}
urlapi.c:handle_query:
 1056|  15.6k|{
 1057|  15.6k|  u->query_present = TRUE;
  ------------------
  |  | 1055|  15.6k|#define TRUE true
  ------------------
 1058|  15.6k|  if(qlen > 1) {
  ------------------
  |  Branch (1058:6): [True: 14.5k, False: 1.08k]
  ------------------
 1059|  14.5k|    if(flags & CURLU_URLENCODE) {
  ------------------
  |  |   94|  14.5k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1059:8): [True: 7.48k, False: 7.04k]
  ------------------
 1060|  7.48k|      struct dynbuf enc;
 1061|  7.48k|      CURLUcode ures;
 1062|  7.48k|      curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  7.48k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1063|       |      /* skip the leading question mark */
 1064|  7.48k|      ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  | 1055|  7.48k|#define TRUE true
  ------------------
                    ures = urlencode_str(&enc, query + 1, qlen - 1, TRUE, QUERY_YES);
  ------------------
  |  |   54|  7.48k|#define QUERY_YES     4
  ------------------
 1065|  7.48k|      if(ures)
  ------------------
  |  Branch (1065:10): [True: 0, False: 7.48k]
  ------------------
 1066|      0|        return ures;
 1067|  7.48k|      u->query = curlx_dyn_ptr(&enc);
 1068|  7.48k|    }
 1069|  7.04k|    else {
 1070|  7.04k|      u->query = curlx_memdup0(query + 1, qlen - 1);
 1071|  7.04k|      if(!u->query)
  ------------------
  |  Branch (1071:10): [True: 0, False: 7.04k]
  ------------------
 1072|      0|        return CURLUE_OUT_OF_MEMORY;
 1073|  7.04k|    }
 1074|  14.5k|  }
 1075|  1.08k|  else {
 1076|       |    /* single byte query */
 1077|  1.08k|    u->query = curlx_strdup("");
  ------------------
  |  | 1477|  1.08k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1078|  1.08k|    if(!u->query)
  ------------------
  |  Branch (1078:8): [True: 0, False: 1.08k]
  ------------------
 1079|      0|      return CURLUE_OUT_OF_MEMORY;
 1080|  1.08k|  }
 1081|  15.6k|  return CURLUE_OK;
 1082|  15.6k|}
urlapi.c:handle_path:
 1087|  52.4k|{
 1088|  52.4k|  CURLUcode ures;
 1089|  52.4k|  if(pathlen && (flags & CURLU_URLENCODE)) {
  ------------------
  |  |   94|  38.1k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1089:6): [True: 38.1k, False: 14.2k]
  |  Branch (1089:17): [True: 21.4k, False: 16.6k]
  ------------------
 1090|  21.4k|    struct dynbuf enc;
 1091|  21.4k|    curlx_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  21.4k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1092|  21.4k|    ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  | 1055|  21.4k|#define TRUE true
  ------------------
                  ures = urlencode_str(&enc, path, pathlen, TRUE, QUERY_NO);
  ------------------
  |  |   52|  21.4k|#define QUERY_NO      2
  ------------------
 1093|  21.4k|    if(ures)
  ------------------
  |  Branch (1093:8): [True: 0, False: 21.4k]
  ------------------
 1094|      0|      return ures;
 1095|  21.4k|    pathlen = curlx_dyn_len(&enc);
 1096|  21.4k|    path = u->path = curlx_dyn_ptr(&enc);
 1097|  21.4k|  }
 1098|       |
 1099|  52.4k|  if(pathlen >= (size_t)(1 + !is_file)) {
  ------------------
  |  Branch (1099:6): [True: 33.2k, False: 19.1k]
  ------------------
 1100|       |    /* paths for file:// scheme can be one byte, others need to be two */
 1101|  33.2k|    if(!u->path) {
  ------------------
  |  Branch (1101:8): [True: 14.8k, False: 18.3k]
  ------------------
 1102|  14.8k|      u->path = curlx_memdup0(path, pathlen);
 1103|  14.8k|      if(!u->path)
  ------------------
  |  Branch (1103:10): [True: 0, False: 14.8k]
  ------------------
 1104|      0|        return CURLUE_OUT_OF_MEMORY;
 1105|  14.8k|      path = u->path;
 1106|  14.8k|    }
 1107|  18.3k|    else if(flags & CURLU_URLENCODE)
  ------------------
  |  |   94|  18.3k|#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
  ------------------
  |  Branch (1107:13): [True: 18.3k, False: 0]
  ------------------
 1108|       |      /* it might have encoded more than the path so cut it */
 1109|  18.3k|      u->path[pathlen] = 0;
 1110|       |
 1111|  33.2k|    if(!(flags & CURLU_PATH_AS_IS)) {
  ------------------
  |  |   91|  33.2k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  ------------------
  |  Branch (1111:8): [True: 29.3k, False: 3.95k]
  ------------------
 1112|       |      /* remove ../ and ./ sequences according to RFC3986 */
 1113|  29.3k|      char *dedot;
 1114|  29.3k|      int err = dedotdotify(path, pathlen, &dedot);
 1115|  29.3k|      if(err)
  ------------------
  |  Branch (1115:10): [True: 0, False: 29.3k]
  ------------------
 1116|      0|        return CURLUE_OUT_OF_MEMORY;
 1117|  29.3k|      if(dedot) {
  ------------------
  |  Branch (1117:10): [True: 29.3k, False: 9]
  ------------------
 1118|  29.3k|        curlx_free(u->path);
  ------------------
  |  | 1483|  29.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1119|  29.3k|        u->path = dedot;
 1120|  29.3k|      }
 1121|  29.3k|    }
 1122|  33.2k|  }
 1123|  52.4k|  return CURLUE_OK;
 1124|  52.4k|}
urlapi.c:redirect_url:
 1235|  10.5k|{
 1236|  10.5k|  struct dynbuf urlbuf;
 1237|  10.5k|  bool host_changed = FALSE;
  ------------------
  |  | 1058|  10.5k|#define FALSE false
  ------------------
 1238|  10.5k|  const char *useurl = relurl;
 1239|  10.5k|  const char *cutoff = NULL;
 1240|  10.5k|  size_t prelen;
 1241|  10.5k|  CURLUcode uc;
 1242|       |  /* this can get here with a NULL u->scheme only if asked to use the default
 1243|       |     scheme, so allow fallback to that */
 1244|  10.5k|  const char *scheme = u->scheme ? u->scheme : DEFAULT_SCHEME;
  ------------------
  |  |   66|      0|#define DEFAULT_SCHEME "https"
  ------------------
  |  Branch (1244:24): [True: 10.5k, False: 0]
  ------------------
 1245|       |
 1246|       |  /* protsep points to the start of the hostname, after [scheme]:// */
 1247|  10.5k|  const char *protsep = base + strlen(scheme) + 3;
 1248|  10.5k|  DEBUGASSERT(base && relurl && u); /* all set here */
  ------------------
  |  | 1081|  10.5k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1248:3): [True: 0, False: 10.5k]
  |  Branch (1248:3): [True: 0, False: 0]
  |  Branch (1248:3): [True: 0, False: 0]
  |  Branch (1248:3): [True: 10.5k, False: 0]
  |  Branch (1248:3): [True: 10.5k, False: 0]
  |  Branch (1248:3): [True: 10.5k, False: 0]
  ------------------
 1249|  10.5k|  if(!base)
  ------------------
  |  Branch (1249:6): [True: 0, False: 10.5k]
  ------------------
 1250|      0|    return CURLUE_MALFORMED_INPUT; /* should never happen */
 1251|       |
 1252|       |  /* handle different relative URL types */
 1253|  10.5k|  switch(relurl[0]) {
 1254|    455|  case '/':
  ------------------
  |  Branch (1254:3): [True: 455, False: 10.1k]
  ------------------
 1255|    455|    if(relurl[1] == '/') {
  ------------------
  |  Branch (1255:8): [True: 14, False: 441]
  ------------------
 1256|       |      /* protocol-relative URL: //example.com/path */
 1257|     14|      cutoff = protsep;
 1258|     14|      useurl = &relurl[2];
 1259|     14|      host_changed = TRUE;
  ------------------
  |  | 1055|     14|#define TRUE true
  ------------------
 1260|     14|    }
 1261|    441|    else
 1262|       |      /* absolute /path */
 1263|    441|      cutoff = strchr(protsep, '/');
 1264|    455|    break;
 1265|       |
 1266|  3.20k|  case '#':
  ------------------
  |  Branch (1266:3): [True: 3.20k, False: 7.37k]
  ------------------
 1267|       |    /* fragment-only change */
 1268|  3.20k|    if(u->fragment)
  ------------------
  |  Branch (1268:8): [True: 2.86k, False: 342]
  ------------------
 1269|  2.86k|      cutoff = strchr(protsep, '#');
 1270|  3.20k|    break;
 1271|       |
 1272|  6.92k|  default:
  ------------------
  |  Branch (1272:3): [True: 6.92k, False: 3.66k]
  ------------------
 1273|       |    /* path or query-only change */
 1274|  6.92k|    if(u->query && u->query[0])
  ------------------
  |  Branch (1274:8): [True: 3.03k, False: 3.89k]
  |  Branch (1274:20): [True: 3.01k, False: 16]
  ------------------
 1275|       |      /* remove existing query */
 1276|  3.01k|      cutoff = strchr(protsep, '?');
 1277|  3.90k|    else if(u->fragment && u->fragment[0])
  ------------------
  |  Branch (1277:13): [True: 1.03k, False: 2.87k]
  |  Branch (1277:28): [True: 1.03k, False: 0]
  ------------------
 1278|       |      /* Remove existing fragment */
 1279|  1.03k|      cutoff = strchr(protsep, '#');
 1280|       |
 1281|  6.92k|    if(relurl[0] != '?') {
  ------------------
  |  Branch (1281:8): [True: 6.83k, False: 92]
  ------------------
 1282|       |      /* append a relative path after the last slash */
 1283|  6.83k|      cutoff = memrchr(protsep, '/',
 1284|  6.83k|                       cutoff ? (size_t)(cutoff - protsep) : strlen(protsep));
  ------------------
  |  Branch (1284:24): [True: 3.98k, False: 2.85k]
  ------------------
 1285|  6.83k|      if(cutoff)
  ------------------
  |  Branch (1285:10): [True: 6.83k, False: 0]
  ------------------
 1286|  6.83k|        cutoff++; /* truncate after last slash */
 1287|  6.83k|    }
 1288|  6.92k|    break;
 1289|  10.5k|  }
 1290|       |
 1291|  10.5k|  prelen = cutoff ? (size_t)(cutoff - base) : strlen(base);
  ------------------
  |  Branch (1291:12): [True: 10.2k, False: 365]
  ------------------
 1292|       |
 1293|       |  /* build new URL */
 1294|  10.5k|  curlx_dyn_init(&urlbuf, CURL_MAX_INPUT_LENGTH);
  ------------------
  |  |   45|  10.5k|#define CURL_MAX_INPUT_LENGTH 8000000
  ------------------
 1295|       |
 1296|  10.5k|  if(!curlx_dyn_addn(&urlbuf, base, prelen) &&
  ------------------
  |  Branch (1296:6): [True: 10.5k, False: 0]
  ------------------
 1297|  10.5k|     !urlencode_str(&urlbuf, useurl, strlen(useurl), !host_changed,
  ------------------
  |  Branch (1297:6): [True: 10.5k, False: 0]
  ------------------
 1298|  10.5k|                    QUERY_NOT_YET)) {
  ------------------
  |  |   53|  10.5k|#define QUERY_NOT_YET 3 /* allow to change to query */
  ------------------
 1299|  10.5k|    uc = parseurl_and_replace(curlx_dyn_ptr(&urlbuf), u,
 1300|  10.5k|                              flags & ~U_CURLU_PATH_AS_IS);
  ------------------
  |  |   64|  10.5k|#define U_CURLU_PATH_AS_IS (unsigned int)CURLU_PATH_AS_IS
  |  |  ------------------
  |  |  |  |   91|  10.5k|#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
  |  |  ------------------
  ------------------
 1301|  10.5k|  }
 1302|      0|  else
 1303|      0|    uc = CURLUE_OUT_OF_MEMORY;
 1304|       |
 1305|  10.5k|  curlx_dyn_free(&urlbuf);
 1306|  10.5k|  return uc;
 1307|  10.5k|}
urlapi.c:hostname_check:
  464|  20.7k|{
  465|  20.7k|  size_t len;
  466|  20.7k|  DEBUGASSERT(hostname);
  ------------------
  |  | 1081|  20.7k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (466:3): [True: 0, False: 20.7k]
  |  Branch (466:3): [True: 20.7k, False: 0]
  ------------------
  467|       |
  468|  20.7k|  if(!hlen)
  ------------------
  |  Branch (468:6): [True: 0, False: 20.7k]
  ------------------
  469|      0|    return CURLUE_NO_HOST;
  470|  20.7k|  else if(hostname[0] == '[')
  ------------------
  |  Branch (470:11): [True: 35, False: 20.6k]
  ------------------
  471|     35|    return ipv6_parse(u, hostname, hlen);
  472|  20.6k|  else {
  473|       |    /* letters from the second string are not ok */
  474|  20.6k|    len = strcspn(hostname, " \r\n\t/:#?!@{}[]\\$\'\"^`*<>=;,+&()%|");
  475|  20.6k|    if(hlen != len)
  ------------------
  |  Branch (475:8): [True: 216, False: 20.4k]
  ------------------
  476|       |      /* hostname with bad content */
  477|    216|      return CURLUE_BAD_HOSTNAME;
  478|  20.4k|    else if((hlen >= 2) &&
  ------------------
  |  Branch (478:13): [True: 17.5k, False: 2.93k]
  ------------------
  479|  17.5k|            (hostname[hlen - 1] == '.') && (hostname[hlen - 2] == '.'))
  ------------------
  |  Branch (479:13): [True: 7.11k, False: 10.4k]
  |  Branch (479:44): [True: 9, False: 7.10k]
  ------------------
  480|       |      /* more than one trailing dot is not allowed */
  481|      9|      return CURLUE_BAD_HOSTNAME;
  482|  20.4k|    else if((hlen == 1) && (hostname[0] == '.'))
  ------------------
  |  Branch (482:13): [True: 2.93k, False: 17.5k]
  |  Branch (482:28): [True: 8, False: 2.92k]
  ------------------
  483|       |      /* just a single dot is not allowed */
  484|      8|      return CURLUE_BAD_HOSTNAME;
  485|  20.6k|  }
  486|  20.4k|  return CURLUE_OK;
  487|  20.7k|}

Curl_auth_digest_get_pair:
   61|  8.28M|{
   62|  8.28M|  int c;
   63|  8.28M|  bool starts_with_quote = FALSE;
  ------------------
  |  | 1058|  8.28M|#define FALSE false
  ------------------
   64|  8.28M|  bool escape = FALSE;
  ------------------
  |  | 1058|  8.28M|#define FALSE false
  ------------------
   65|       |
   66|   623M|  for(c = DIGEST_MAX_VALUE_LENGTH - 1; (*str && (*str != '=') && c--);)
  ------------------
  |  |   30|  8.28M|#define DIGEST_MAX_VALUE_LENGTH           256
  ------------------
  |  Branch (66:41): [True: 623M, False: 25.5k]
  |  Branch (66:49): [True: 615M, False: 8.25M]
  |  Branch (66:66): [True: 615M, False: 3.72k]
  ------------------
   67|   615M|    *value++ = *str++;
   68|  8.28M|  *value = 0;
   69|       |
   70|  8.28M|  if('=' != *str++)
  ------------------
  |  Branch (70:6): [True: 29.3k, False: 8.25M]
  ------------------
   71|       |    /* eek, no match */
   72|  29.3k|    return FALSE;
  ------------------
  |  | 1058|  29.3k|#define FALSE false
  ------------------
   73|       |
   74|  8.25M|  if('\"' == *str) {
  ------------------
  |  Branch (74:6): [True: 1.51M, False: 6.73M]
  ------------------
   75|       |    /* This starts with a quote so it must end with one as well! */
   76|  1.51M|    str++;
   77|  1.51M|    starts_with_quote = TRUE;
  ------------------
  |  | 1055|  1.51M|#define TRUE true
  ------------------
   78|  1.51M|  }
   79|       |
   80|   453M|  for(c = DIGEST_MAX_CONTENT_LENGTH - 1; *str && c--; str++) {
  ------------------
  |  |   31|  8.25M|#define DIGEST_MAX_CONTENT_LENGTH         1024
  ------------------
  |  Branch (80:42): [True: 453M, False: 2.94k]
  |  Branch (80:50): [True: 445M, False: 8.25M]
  ------------------
   81|   445M|    if(!escape) {
  ------------------
  |  Branch (81:8): [True: 444M, False: 498k]
  ------------------
   82|   444M|      switch(*str) {
  ------------------
  |  Branch (82:14): [True: 48.5M, False: 396M]
  ------------------
   83|   502k|      case '\\':
  ------------------
  |  Branch (83:7): [True: 502k, False: 444M]
  ------------------
   84|   502k|        if(starts_with_quote) {
  ------------------
  |  Branch (84:12): [True: 499k, False: 3.63k]
  ------------------
   85|       |          /* the start of an escaped quote */
   86|   499k|          escape = TRUE;
  ------------------
  |  | 1055|   499k|#define TRUE true
  ------------------
   87|   499k|          continue;
   88|   499k|        }
   89|  3.63k|        break;
   90|       |
   91|  46.7M|      case ',':
  ------------------
  |  Branch (91:7): [True: 46.7M, False: 397M]
  ------------------
   92|  46.7M|        if(!starts_with_quote) {
  ------------------
  |  Branch (92:12): [True: 6.73M, False: 39.9M]
  ------------------
   93|       |          /* This signals the end of the content if we did not get a starting
   94|       |             quote and then we do "sloppy" parsing */
   95|  6.73M|          c = 0; /* the end */
   96|  6.73M|          continue;
   97|  6.73M|        }
   98|  39.9M|        break;
   99|       |
  100|  39.9M|      case '\r':
  ------------------
  |  Branch (100:7): [True: 0, False: 444M]
  ------------------
  101|      0|      case '\n':
  ------------------
  |  Branch (101:7): [True: 0, False: 444M]
  ------------------
  102|       |        /* end of string */
  103|      0|        if(starts_with_quote)
  ------------------
  |  Branch (103:12): [True: 0, False: 0]
  ------------------
  104|      0|          return FALSE; /* No closing quote */
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  105|      0|        c = 0;
  106|      0|        continue;
  107|       |
  108|  1.31M|      case '\"':
  ------------------
  |  Branch (108:7): [True: 1.31M, False: 443M]
  ------------------
  109|  1.31M|        if(starts_with_quote) {
  ------------------
  |  Branch (109:12): [True: 1.31M, False: 604]
  ------------------
  110|       |          /* end of string */
  111|  1.31M|          c = 0;
  112|  1.31M|          continue;
  113|  1.31M|        }
  114|    604|        else
  115|    604|          return FALSE;
  ------------------
  |  | 1058|    604|#define FALSE false
  ------------------
  116|   444M|      }
  117|   444M|    }
  118|       |
  119|   436M|    escape = FALSE;
  ------------------
  |  | 1058|   436M|#define FALSE false
  ------------------
  120|   436M|    *content++ = *str;
  121|   436M|  }
  122|  8.25M|  if(escape)
  ------------------
  |  Branch (122:6): [True: 534, False: 8.25M]
  ------------------
  123|    534|    return FALSE; /* No character after backslash */
  ------------------
  |  | 1058|    534|#define FALSE false
  ------------------
  124|       |
  125|  8.25M|  *content = 0;
  126|  8.25M|  *endptr = str;
  127|       |
  128|       |  return TRUE;
  ------------------
  |  | 1055|  8.25M|#define TRUE true
  ------------------
  129|  8.25M|}
Curl_auth_is_digest_supported:
  312|  39.6k|{
  313|       |  return TRUE;
  ------------------
  |  | 1055|  39.6k|#define TRUE true
  ------------------
  314|  39.6k|}
Curl_auth_decode_digest_http_message:
  516|  30.5k|{
  517|  30.5k|  bool before = FALSE; /* got a nonce before */
  ------------------
  |  | 1058|  30.5k|#define FALSE false
  ------------------
  518|       |
  519|       |  /* If we already have received a nonce, keep that in mind */
  520|  30.5k|  if(digest->nonce)
  ------------------
  |  Branch (520:6): [True: 2.00k, False: 28.5k]
  ------------------
  521|  2.00k|    before = TRUE;
  ------------------
  |  | 1055|  2.00k|#define TRUE true
  ------------------
  522|       |
  523|       |  /* Clean up any former leftovers and initialize to defaults */
  524|  30.5k|  Curl_auth_digest_cleanup(digest);
  525|       |
  526|  8.28M|  for(;;) {
  527|  8.28M|    char value[DIGEST_MAX_VALUE_LENGTH];
  528|  8.28M|    char content[DIGEST_MAX_CONTENT_LENGTH];
  529|       |
  530|       |    /* Pass all additional spaces here */
  531|  8.37M|    while(*chlg && ISBLANK(*chlg))
  ------------------
  |  |   45|  8.37M|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 2.46k, False: 8.36M]
  |  |  |  Branch (45:38): [True: 84.6k, False: 8.28M]
  |  |  ------------------
  ------------------
  |  Branch (531:11): [True: 8.37M, False: 2.90k]
  ------------------
  532|  87.1k|      chlg++;
  533|       |
  534|       |    /* Extract a value=content pair */
  535|  8.28M|    if(Curl_auth_digest_get_pair(chlg, value, content, &chlg)) {
  ------------------
  |  Branch (535:8): [True: 8.25M, False: 30.4k]
  ------------------
  536|  8.25M|      if(curl_strequal(value, "nonce")) {
  ------------------
  |  Branch (536:10): [True: 5.18k, False: 8.25M]
  ------------------
  537|  5.18k|        curlx_free(digest->nonce);
  ------------------
  |  | 1483|  5.18k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  538|  5.18k|        digest->nonce = curlx_strdup(content);
  ------------------
  |  | 1477|  5.18k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  539|  5.18k|        if(!digest->nonce)
  ------------------
  |  Branch (539:12): [True: 0, False: 5.18k]
  ------------------
  540|      0|          return CURLE_OUT_OF_MEMORY;
  541|  5.18k|      }
  542|  8.25M|      else if(curl_strequal(value, "stale")) {
  ------------------
  |  Branch (542:15): [True: 0, False: 8.25M]
  ------------------
  543|      0|        if(curl_strequal(content, "true")) {
  ------------------
  |  Branch (543:12): [True: 0, False: 0]
  ------------------
  544|      0|          digest->stale = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  545|      0|          digest->nc = 1; /* we make a new nonce now */
  546|      0|        }
  547|      0|      }
  548|  8.25M|      else if(curl_strequal(value, "realm")) {
  ------------------
  |  Branch (548:15): [True: 146, False: 8.25M]
  ------------------
  549|    146|        curlx_free(digest->realm);
  ------------------
  |  | 1483|    146|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  550|    146|        digest->realm = curlx_strdup(content);
  ------------------
  |  | 1477|    146|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  551|    146|        if(!digest->realm)
  ------------------
  |  Branch (551:12): [True: 0, False: 146]
  ------------------
  552|      0|          return CURLE_OUT_OF_MEMORY;
  553|    146|      }
  554|  8.25M|      else if(curl_strequal(value, "opaque")) {
  ------------------
  |  Branch (554:15): [True: 0, False: 8.25M]
  ------------------
  555|      0|        curlx_free(digest->opaque);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  556|      0|        digest->opaque = curlx_strdup(content);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  557|      0|        if(!digest->opaque)
  ------------------
  |  Branch (557:12): [True: 0, False: 0]
  ------------------
  558|      0|          return CURLE_OUT_OF_MEMORY;
  559|      0|      }
  560|  8.25M|      else if(curl_strequal(value, "qop")) {
  ------------------
  |  Branch (560:15): [True: 0, False: 8.25M]
  ------------------
  561|      0|        const char *token = content;
  562|      0|        struct Curl_str out;
  563|      0|        bool foundAuth = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  564|      0|        bool foundAuthInt = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  565|       |        /* Pass leading spaces */
  566|      0|        while(*token && ISBLANK(*token))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (566:15): [True: 0, False: 0]
  ------------------
  567|      0|          token++;
  568|      0|        while(!curlx_str_until(&token, &out, 32, ',')) {
  ------------------
  |  Branch (568:15): [True: 0, False: 0]
  ------------------
  569|      0|          if(curlx_str_casecompare(&out, DIGEST_QOP_VALUE_STRING_AUTH))
  ------------------
  |  |   54|      0|#define DIGEST_QOP_VALUE_STRING_AUTH      "auth"
  ------------------
  |  Branch (569:14): [True: 0, False: 0]
  ------------------
  570|      0|            foundAuth = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  571|      0|          else if(curlx_str_casecompare(&out,
  ------------------
  |  Branch (571:19): [True: 0, False: 0]
  ------------------
  572|      0|                                        DIGEST_QOP_VALUE_STRING_AUTH_INT))
  ------------------
  |  |   55|      0|#define DIGEST_QOP_VALUE_STRING_AUTH_INT  "auth-int"
  ------------------
  573|      0|            foundAuthInt = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  574|      0|          if(curlx_str_single(&token, ','))
  ------------------
  |  Branch (574:14): [True: 0, False: 0]
  ------------------
  575|      0|            break;
  576|      0|          while(*token && ISBLANK(*token))
  ------------------
  |  |   45|      0|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 0, False: 0]
  |  |  |  Branch (45:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (576:17): [True: 0, False: 0]
  ------------------
  577|      0|            token++;
  578|      0|        }
  579|       |
  580|       |        /* Select only auth or auth-int. Otherwise, ignore */
  581|      0|        if(foundAuth) {
  ------------------
  |  Branch (581:12): [True: 0, False: 0]
  ------------------
  582|      0|          curlx_free(digest->qop);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  583|      0|          digest->qop = curlx_strdup(DIGEST_QOP_VALUE_STRING_AUTH);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  584|      0|          if(!digest->qop)
  ------------------
  |  Branch (584:14): [True: 0, False: 0]
  ------------------
  585|      0|            return CURLE_OUT_OF_MEMORY;
  586|      0|        }
  587|      0|        else if(foundAuthInt) {
  ------------------
  |  Branch (587:17): [True: 0, False: 0]
  ------------------
  588|      0|          curlx_free(digest->qop);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  589|      0|          digest->qop = curlx_strdup(DIGEST_QOP_VALUE_STRING_AUTH_INT);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  590|      0|          if(!digest->qop)
  ------------------
  |  Branch (590:14): [True: 0, False: 0]
  ------------------
  591|      0|            return CURLE_OUT_OF_MEMORY;
  592|      0|        }
  593|      0|      }
  594|  8.25M|      else if(curl_strequal(value, "algorithm")) {
  ------------------
  |  Branch (594:15): [True: 77, False: 8.25M]
  ------------------
  595|     77|        curlx_free(digest->algorithm);
  ------------------
  |  | 1483|     77|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  596|     77|        digest->algorithm = curlx_strdup(content);
  ------------------
  |  | 1477|     77|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  597|     77|        if(!digest->algorithm)
  ------------------
  |  Branch (597:12): [True: 0, False: 77]
  ------------------
  598|      0|          return CURLE_OUT_OF_MEMORY;
  599|       |
  600|     77|        if(curl_strequal(content, "MD5-sess"))
  ------------------
  |  Branch (600:12): [True: 0, False: 77]
  ------------------
  601|      0|          digest->algo = ALGO_MD5SESS;
  ------------------
  |  |   44|      0|#define ALGO_MD5SESS (ALGO_MD5 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   43|      0|#define ALGO_MD5 0
  |  |  ------------------
  |  |               #define ALGO_MD5SESS (ALGO_MD5 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   41|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  602|     77|        else if(curl_strequal(content, "MD5"))
  ------------------
  |  Branch (602:17): [True: 0, False: 77]
  ------------------
  603|      0|          digest->algo = ALGO_MD5;
  ------------------
  |  |   43|      0|#define ALGO_MD5 0
  ------------------
  604|     77|        else if(curl_strequal(content, "SHA-256"))
  ------------------
  |  Branch (604:17): [True: 0, False: 77]
  ------------------
  605|      0|          digest->algo = ALGO_SHA256;
  ------------------
  |  |   45|      0|#define ALGO_SHA256 2
  ------------------
  606|     77|        else if(curl_strequal(content, "SHA-256-SESS"))
  ------------------
  |  Branch (606:17): [True: 0, False: 77]
  ------------------
  607|      0|          digest->algo = ALGO_SHA256SESS;
  ------------------
  |  |   46|      0|#define ALGO_SHA256SESS (ALGO_SHA256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   45|      0|#define ALGO_SHA256 2
  |  |  ------------------
  |  |               #define ALGO_SHA256SESS (ALGO_SHA256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   41|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  608|     77|        else if(curl_strequal(content, "SHA-512-256")) {
  ------------------
  |  Branch (608:17): [True: 0, False: 77]
  ------------------
  609|      0|#ifdef CURL_HAVE_SHA512_256
  610|      0|          digest->algo = ALGO_SHA512_256;
  ------------------
  |  |   47|      0|#define ALGO_SHA512_256 4
  ------------------
  611|       |#else /* !CURL_HAVE_SHA512_256 */
  612|       |          return CURLE_NOT_BUILT_IN;
  613|       |#endif /* CURL_HAVE_SHA512_256 */
  614|      0|        }
  615|     77|        else if(curl_strequal(content, "SHA-512-256-SESS")) {
  ------------------
  |  Branch (615:17): [True: 0, False: 77]
  ------------------
  616|      0|#ifdef CURL_HAVE_SHA512_256
  617|      0|          digest->algo = ALGO_SHA512_256SESS;
  ------------------
  |  |   48|      0|#define ALGO_SHA512_256SESS (ALGO_SHA512_256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   47|      0|#define ALGO_SHA512_256 4
  |  |  ------------------
  |  |               #define ALGO_SHA512_256SESS (ALGO_SHA512_256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   41|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  618|       |#else /* !CURL_HAVE_SHA512_256 */
  619|       |          return CURLE_NOT_BUILT_IN;
  620|       |#endif /* CURL_HAVE_SHA512_256 */
  621|      0|        }
  622|     77|        else
  623|     77|          return CURLE_BAD_CONTENT_ENCODING;
  624|     77|      }
  625|  8.25M|      else if(curl_strequal(value, "userhash")) {
  ------------------
  |  Branch (625:15): [True: 0, False: 8.25M]
  ------------------
  626|      0|        if(curl_strequal(content, "true")) {
  ------------------
  |  Branch (626:12): [True: 0, False: 0]
  ------------------
  627|      0|          digest->userhash = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  628|      0|        }
  629|      0|      }
  630|  8.25M|      else {
  631|       |        /* Unknown specifier, ignore it! */
  632|  8.25M|      }
  633|  8.25M|    }
  634|  30.4k|    else
  635|  30.4k|      break; /* We are done here */
  636|       |
  637|       |    /* Pass all additional spaces here */
  638|  8.28M|    while(*chlg && ISBLANK(*chlg))
  ------------------
  |  |   45|  8.27M|#define ISBLANK(x)  (((x) == ' ') || ((x) == '\t'))
  |  |  ------------------
  |  |  |  Branch (45:22): [True: 20.8k, False: 8.25M]
  |  |  |  Branch (45:38): [True: 4.39k, False: 8.25M]
  |  |  ------------------
  ------------------
  |  Branch (638:11): [True: 8.27M, False: 2.90k]
  ------------------
  639|  25.2k|      chlg++;
  640|       |
  641|       |    /* Allow the list to be comma-separated */
  642|  8.25M|    if(',' == *chlg)
  ------------------
  |  Branch (642:8): [True: 271k, False: 7.98M]
  ------------------
  643|   271k|      chlg++;
  644|  8.25M|  }
  645|       |
  646|       |  /* We had a nonce since before, and we got another one now without
  647|       |     'stale=true'. This means we provided bad credentials in the previous
  648|       |     request */
  649|  30.4k|  if(before && !digest->stale)
  ------------------
  |  Branch (649:6): [True: 2.00k, False: 28.4k]
  |  Branch (649:16): [True: 2.00k, False: 0]
  ------------------
  650|  2.00k|    return CURLE_BAD_CONTENT_ENCODING;
  651|       |
  652|       |  /* We got this header without a nonce, that is a bad Digest line! */
  653|  28.4k|  if(!digest->nonce)
  ------------------
  |  Branch (653:6): [True: 27.8k, False: 580]
  ------------------
  654|  27.8k|    return CURLE_BAD_CONTENT_ENCODING;
  655|       |
  656|       |  /* "<algo>-sess" protocol versions require "auth" or "auth-int" qop */
  657|    580|  if(!digest->qop && (digest->algo & SESSION_ALGO))
  ------------------
  |  |   41|    580|#define SESSION_ALGO 1 /* for algos with this bit set */
  ------------------
  |  Branch (657:6): [True: 580, False: 0]
  |  Branch (657:22): [True: 0, False: 580]
  ------------------
  658|      0|    return CURLE_BAD_CONTENT_ENCODING;
  659|       |
  660|    580|  return CURLE_OK;
  661|    580|}
Curl_auth_create_digest_http_message:
  997|    939|{
  998|    939|  if(digest->algo <= ALGO_MD5SESS)
  ------------------
  |  |   44|    939|#define ALGO_MD5SESS (ALGO_MD5 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   43|    939|#define ALGO_MD5 0
  |  |  ------------------
  |  |               #define ALGO_MD5SESS (ALGO_MD5 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   41|    939|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  |  Branch (998:6): [True: 939, False: 0]
  ------------------
  999|    939|    return auth_create_digest_http_message(data, creds,
 1000|    939|                                           request, uripath, digest,
 1001|    939|                                           outptr, outlen,
 1002|    939|                                           auth_digest_md5_to_ascii,
 1003|    939|                                           Curl_md5it);
 1004|       |
 1005|      0|  if(digest->algo <= ALGO_SHA256SESS)
  ------------------
  |  |   46|      0|#define ALGO_SHA256SESS (ALGO_SHA256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   45|      0|#define ALGO_SHA256 2
  |  |  ------------------
  |  |               #define ALGO_SHA256SESS (ALGO_SHA256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   41|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  |  Branch (1005:6): [True: 0, False: 0]
  ------------------
 1006|      0|    return auth_create_digest_http_message(data, creds,
 1007|      0|                                           request, uripath, digest,
 1008|      0|                                           outptr, outlen,
 1009|      0|                                           auth_digest_sha256_to_ascii,
 1010|      0|                                           Curl_sha256it);
 1011|      0|#ifdef CURL_HAVE_SHA512_256
 1012|      0|  if(digest->algo <= ALGO_SHA512_256SESS)
  ------------------
  |  |   48|      0|#define ALGO_SHA512_256SESS (ALGO_SHA512_256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   47|      0|#define ALGO_SHA512_256 4
  |  |  ------------------
  |  |               #define ALGO_SHA512_256SESS (ALGO_SHA512_256 | SESSION_ALGO)
  |  |  ------------------
  |  |  |  |   41|      0|#define SESSION_ALGO 1 /* for algos with this bit set */
  |  |  ------------------
  ------------------
  |  Branch (1012:6): [True: 0, False: 0]
  ------------------
 1013|      0|    return auth_create_digest_http_message(data, creds,
 1014|      0|                                           request, uripath, digest,
 1015|      0|                                           outptr, outlen,
 1016|      0|                                           auth_digest_sha256_to_ascii,
 1017|      0|                                           Curl_sha512_256it);
 1018|      0|#endif /* CURL_HAVE_SHA512_256 */
 1019|       |
 1020|       |  /* Should be unreachable */
 1021|      0|  return CURLE_BAD_CONTENT_ENCODING;
 1022|      0|}
Curl_auth_digest_cleanup:
 1035|   103k|{
 1036|   103k|  curlx_safefree(digest->nonce);
  ------------------
  |  | 1327|   103k|  do {                      \
  |  | 1328|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   103k|    (ptr) = NULL;           \
  |  | 1330|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1037|   103k|  curlx_safefree(digest->cnonce);
  ------------------
  |  | 1327|   103k|  do {                      \
  |  | 1328|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   103k|    (ptr) = NULL;           \
  |  | 1330|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1038|   103k|  curlx_safefree(digest->realm);
  ------------------
  |  | 1327|   103k|  do {                      \
  |  | 1328|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   103k|    (ptr) = NULL;           \
  |  | 1330|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1039|   103k|  curlx_safefree(digest->opaque);
  ------------------
  |  | 1327|   103k|  do {                      \
  |  | 1328|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   103k|    (ptr) = NULL;           \
  |  | 1330|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1040|   103k|  curlx_safefree(digest->qop);
  ------------------
  |  | 1327|   103k|  do {                      \
  |  | 1328|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   103k|    (ptr) = NULL;           \
  |  | 1330|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1041|   103k|  curlx_safefree(digest->algorithm);
  ------------------
  |  | 1327|   103k|  do {                      \
  |  | 1328|   103k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   103k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   103k|    (ptr) = NULL;           \
  |  | 1330|   103k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 103k]
  |  |  ------------------
  ------------------
 1042|       |
 1043|   103k|  digest->nc = 0;
 1044|   103k|  digest->algo = ALGO_MD5; /* default algorithm */
  ------------------
  |  |   43|   103k|#define ALGO_MD5 0
  ------------------
 1045|   103k|  digest->stale = FALSE;   /* default means normal, not stale */
  ------------------
  |  | 1058|   103k|#define FALSE false
  ------------------
 1046|       |  digest->userhash = FALSE;
  ------------------
  |  | 1058|   103k|#define FALSE false
  ------------------
 1047|   103k|}
digest.c:auth_digest_string_quoted:
  154|  3.03k|{
  155|  3.03k|  struct dynbuf out;
  156|  3.03k|  curlx_dyn_init(&out, 2048);
  157|  3.03k|  if(!*s) /* for zero length input, make sure we return an empty string */
  ------------------
  |  Branch (157:6): [True: 391, False: 2.64k]
  ------------------
  158|    391|    return curlx_strdup("");
  ------------------
  |  | 1477|    391|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  159|   124k|  while(*s) {
  ------------------
  |  Branch (159:9): [True: 122k, False: 2.64k]
  ------------------
  160|   122k|    CURLcode result;
  161|   122k|    if(*s == '"' || *s == '\\') {
  ------------------
  |  Branch (161:8): [True: 55, False: 121k]
  |  Branch (161:21): [True: 1.88k, False: 120k]
  ------------------
  162|  1.93k|      result = curlx_dyn_addn(&out, "\\", 1);
  163|  1.93k|      if(!result)
  ------------------
  |  Branch (163:10): [True: 1.93k, False: 0]
  ------------------
  164|  1.93k|        result = curlx_dyn_addn(&out, s, 1);
  165|  1.93k|    }
  166|   120k|    else
  167|   120k|      result = curlx_dyn_addn(&out, s, 1);
  168|   122k|    if(result)
  ------------------
  |  Branch (168:8): [True: 0, False: 122k]
  ------------------
  169|      0|      return NULL;
  170|   122k|    s++;
  171|   122k|  }
  172|  2.64k|  return curlx_dyn_ptr(&out);
  173|  2.64k|}
digest.c:auth_create_digest_http_message:
  691|    939|{
  692|    939|  CURLcode result;
  693|    939|  const char *userp = Curl_creds_user(creds);
  ------------------
  |  |   75|    939|#define Curl_creds_user(c)               ((c) ? (c)->user : "")
  |  |  ------------------
  |  |  |  Branch (75:43): [True: 939, False: 0]
  |  |  ------------------
  ------------------
  694|    939|  const char *passwdp = Curl_creds_passwd(creds);
  ------------------
  |  |   76|    939|#define Curl_creds_passwd(c)             ((c) ? (c)->passwd : "")
  |  |  ------------------
  |  |  |  Branch (76:43): [True: 939, False: 0]
  |  |  ------------------
  ------------------
  695|    939|  unsigned char hashbuf[32]; /* 32 bytes/256 bits */
  696|    939|  unsigned char request_digest[65];
  697|    939|  unsigned char ha1[65];    /* 64 digits and 1 zero byte */
  698|    939|  unsigned char ha2[65];    /* 64 digits and 1 zero byte */
  699|    939|  char userh[65];
  700|    939|  char *cnonce = NULL;
  701|    939|  size_t cnonce_sz = 0;
  702|    939|  char *userp_quoted = NULL;
  703|    939|  char *realm_quoted = NULL;
  704|    939|  char *nonce_quoted = NULL;
  705|    939|  char *hashthis = NULL;
  706|    939|  char *uri_quoted = NULL;
  707|    939|  struct dynbuf response;
  708|    939|  *outptr = NULL;
  709|       |
  710|    939|  curlx_dyn_init(&response, 4096); /* arbitrary max */
  711|       |
  712|    939|  memset(hashbuf, 0, sizeof(hashbuf));
  713|    939|  if(!digest->nc)
  ------------------
  |  Branch (713:6): [True: 133, False: 806]
  ------------------
  714|    133|    digest->nc = 1;
  715|       |
  716|    939|  if(!digest->cnonce) {
  ------------------
  |  Branch (716:6): [True: 133, False: 806]
  ------------------
  717|    133|    char cnoncebuf[12];
  718|    133|    result = Curl_rand_bytes(data,
  719|    133|#ifdef DEBUGBUILD
  720|    133|                             TRUE,
  ------------------
  |  | 1055|    133|#define TRUE true
  ------------------
  721|    133|#endif
  722|    133|                             (unsigned char *)cnoncebuf,
  723|    133|                             sizeof(cnoncebuf));
  724|    133|    if(!result)
  ------------------
  |  Branch (724:8): [True: 133, False: 0]
  ------------------
  725|    133|      result = curlx_base64_encode((uint8_t *)cnoncebuf, sizeof(cnoncebuf),
  726|    133|                                   &cnonce, &cnonce_sz);
  727|    133|    if(result)
  ------------------
  |  Branch (727:8): [True: 0, False: 133]
  ------------------
  728|      0|      goto oom;
  729|       |
  730|    133|    digest->cnonce = cnonce;
  731|    133|  }
  732|       |
  733|    939|  if(digest->userhash) {
  ------------------
  |  Branch (733:6): [True: 0, False: 939]
  ------------------
  734|      0|    char *hasht = curl_maprintf("%s:%s", userp,
  735|      0|                                digest->realm ? digest->realm : "");
  ------------------
  |  Branch (735:33): [True: 0, False: 0]
  ------------------
  736|      0|    if(!hasht) {
  ------------------
  |  Branch (736:8): [True: 0, False: 0]
  ------------------
  737|      0|      result = CURLE_OUT_OF_MEMORY;
  738|      0|      goto oom;
  739|      0|    }
  740|       |
  741|      0|    result = hash(hashbuf, (unsigned char *)hasht, strlen(hasht));
  742|      0|    curlx_free(hasht);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  743|      0|    if(result)
  ------------------
  |  Branch (743:8): [True: 0, False: 0]
  ------------------
  744|      0|      goto oom;
  745|      0|    convert_to_ascii(hashbuf, (unsigned char *)userh);
  746|      0|  }
  747|       |
  748|       |  /*
  749|       |    If the algorithm is "MD5" or unspecified (which then defaults to MD5):
  750|       |
  751|       |      A1 = unq(username-value) ":" unq(realm-value) ":" passwd
  752|       |
  753|       |    If the algorithm is "MD5-sess" then:
  754|       |
  755|       |      A1 = H(unq(username-value) ":" unq(realm-value) ":" passwd) ":"
  756|       |           unq(nonce-value) ":" unq(cnonce-value)
  757|       |  */
  758|       |
  759|    939|  hashthis = curl_maprintf("%s:%s:%s", userp, digest->realm ?
  ------------------
  |  Branch (759:47): [True: 215, False: 724]
  ------------------
  760|    724|                           digest->realm : "", passwdp);
  761|    939|  if(!hashthis) {
  ------------------
  |  Branch (761:6): [True: 0, False: 939]
  ------------------
  762|      0|    result = CURLE_OUT_OF_MEMORY;
  763|      0|    goto oom;
  764|      0|  }
  765|       |
  766|    939|  result = hash(hashbuf, (unsigned char *)hashthis, strlen(hashthis));
  767|    939|  curlx_free(hashthis);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  768|    939|  if(result)
  ------------------
  |  Branch (768:6): [True: 0, False: 939]
  ------------------
  769|      0|    goto oom;
  770|    939|  convert_to_ascii(hashbuf, ha1);
  771|       |
  772|    939|  if(digest->algo & SESSION_ALGO) {
  ------------------
  |  |   41|    939|#define SESSION_ALGO 1 /* for algos with this bit set */
  ------------------
  |  Branch (772:6): [True: 0, False: 939]
  ------------------
  773|       |    /* nonce and cnonce are OUTSIDE the hash */
  774|      0|    char *tmp = curl_maprintf("%s:%s:%s", ha1, digest->nonce, digest->cnonce);
  775|      0|    if(!tmp) {
  ------------------
  |  Branch (775:8): [True: 0, False: 0]
  ------------------
  776|      0|      result = CURLE_OUT_OF_MEMORY;
  777|      0|      goto oom;
  778|      0|    }
  779|       |
  780|      0|    result = hash(hashbuf, (unsigned char *)tmp, strlen(tmp));
  781|      0|    curlx_free(tmp);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  782|      0|    if(result)
  ------------------
  |  Branch (782:8): [True: 0, False: 0]
  ------------------
  783|      0|      goto oom;
  784|      0|    convert_to_ascii(hashbuf, ha1);
  785|      0|  }
  786|       |
  787|       |  /*
  788|       |    If the "qop" directive's value is "auth" or is unspecified, then A2 is:
  789|       |
  790|       |      A2 = Method ":" digest-uri-value
  791|       |
  792|       |    If the "qop" value is "auth-int", then A2 is:
  793|       |
  794|       |      A2 = Method ":" digest-uri-value ":" H(entity-body)
  795|       |
  796|       |    (The "Method" value is the HTTP request method as specified in section
  797|       |    5.1.1 of RFC 2616)
  798|       |  */
  799|       |
  800|    939|  uri_quoted = auth_digest_string_quoted((const char *)uripath);
  801|    939|  if(!uri_quoted) {
  ------------------
  |  Branch (801:6): [True: 0, False: 939]
  ------------------
  802|      0|    result = CURLE_OUT_OF_MEMORY;
  803|      0|    goto oom;
  804|      0|  }
  805|       |
  806|    939|  hashthis = curl_maprintf("%s:%s", request, uripath);
  807|    939|  if(!hashthis) {
  ------------------
  |  Branch (807:6): [True: 0, False: 939]
  ------------------
  808|      0|    result = CURLE_OUT_OF_MEMORY;
  809|      0|    goto oom;
  810|      0|  }
  811|       |
  812|    939|  if(digest->qop && curl_strequal(digest->qop, "auth-int")) {
  ------------------
  |  Branch (812:6): [True: 0, False: 939]
  |  Branch (812:21): [True: 0, False: 0]
  ------------------
  813|       |    /* We do not support auth-int for PUT or POST */
  814|      0|    char hashed[65];
  815|      0|    char *hashthis2;
  816|       |
  817|      0|    result = hash(hashbuf, (const unsigned char *)"", 0);
  818|      0|    if(result) {
  ------------------
  |  Branch (818:8): [True: 0, False: 0]
  ------------------
  819|      0|      curlx_free(hashthis);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  820|      0|      goto oom;
  821|      0|    }
  822|      0|    convert_to_ascii(hashbuf, (unsigned char *)hashed);
  823|       |
  824|      0|    hashthis2 = curl_maprintf("%s:%s", hashthis, hashed);
  825|      0|    curlx_free(hashthis);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  826|      0|    hashthis = hashthis2;
  827|      0|    if(!hashthis) {
  ------------------
  |  Branch (827:8): [True: 0, False: 0]
  ------------------
  828|      0|      result = CURLE_OUT_OF_MEMORY;
  829|      0|      goto oom;
  830|      0|    }
  831|      0|  }
  832|       |
  833|    939|  result = hash(hashbuf, (unsigned char *)hashthis, strlen(hashthis));
  834|    939|  curlx_free(hashthis);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  835|    939|  if(result)
  ------------------
  |  Branch (835:6): [True: 0, False: 939]
  ------------------
  836|      0|    goto oom;
  837|    939|  convert_to_ascii(hashbuf, ha2);
  838|       |
  839|    939|  if(digest->qop)
  ------------------
  |  Branch (839:6): [True: 0, False: 939]
  ------------------
  840|      0|    hashthis = curl_maprintf("%s:%s:%08x:%s:%s:%s", ha1, digest->nonce,
  841|      0|                             digest->nc, digest->cnonce, digest->qop, ha2);
  842|    939|  else
  843|    939|    hashthis = curl_maprintf("%s:%s:%s", ha1, digest->nonce, ha2);
  844|       |
  845|    939|  if(!hashthis) {
  ------------------
  |  Branch (845:6): [True: 0, False: 939]
  ------------------
  846|      0|    result = CURLE_OUT_OF_MEMORY;
  847|      0|    goto oom;
  848|      0|  }
  849|       |
  850|    939|  result = hash(hashbuf, (unsigned char *)hashthis, strlen(hashthis));
  851|    939|  curlx_free(hashthis);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  852|    939|  if(result)
  ------------------
  |  Branch (852:6): [True: 0, False: 939]
  ------------------
  853|      0|    goto oom;
  854|    939|  convert_to_ascii(hashbuf, request_digest);
  855|       |
  856|       |  /* For test case 64 (snooped from a Mozilla 1.3a request)
  857|       |
  858|       |     Authorization: Digest username="testuser", realm="testrealm", \
  859|       |     nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"
  860|       |
  861|       |     Digest parameters are all quoted strings. Username which is provided by
  862|       |     the user needs double quotes and backslashes within it escaped.
  863|       |     realm, nonce, and opaque needs backslashes as well as they were
  864|       |     de-escaped when copied from request header. cnonce is generated with
  865|       |     web-safe characters. uri is already percent encoded. nc is 8 hex
  866|       |     characters. algorithm and qop with standard values only contain web-safe
  867|       |     characters.
  868|       |  */
  869|    939|  userp_quoted = auth_digest_string_quoted(digest->userhash ? userh : userp);
  ------------------
  |  Branch (869:44): [True: 0, False: 939]
  ------------------
  870|    939|  if(!userp_quoted) {
  ------------------
  |  Branch (870:6): [True: 0, False: 939]
  ------------------
  871|      0|    result = CURLE_OUT_OF_MEMORY;
  872|      0|    goto oom;
  873|      0|  }
  874|    939|  if(digest->realm)
  ------------------
  |  Branch (874:6): [True: 215, False: 724]
  ------------------
  875|    215|    realm_quoted = auth_digest_string_quoted(digest->realm);
  876|    724|  else {
  877|    724|    realm_quoted = curlx_malloc(1);
  ------------------
  |  | 1478|    724|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  878|    724|    if(realm_quoted)
  ------------------
  |  Branch (878:8): [True: 724, False: 0]
  ------------------
  879|    724|      realm_quoted[0] = 0;
  880|    724|  }
  881|    939|  if(!realm_quoted) {
  ------------------
  |  Branch (881:6): [True: 0, False: 939]
  ------------------
  882|      0|    result = CURLE_OUT_OF_MEMORY;
  883|      0|    goto oom;
  884|      0|  }
  885|       |
  886|    939|  nonce_quoted = auth_digest_string_quoted(digest->nonce);
  887|    939|  if(!nonce_quoted) {
  ------------------
  |  Branch (887:6): [True: 0, False: 939]
  ------------------
  888|      0|    result = CURLE_OUT_OF_MEMORY;
  889|      0|    goto oom;
  890|      0|  }
  891|       |
  892|    939|  if(digest->qop) {
  ------------------
  |  Branch (892:6): [True: 0, False: 939]
  ------------------
  893|      0|    result = curlx_dyn_addf(&response, "username=\"%s\", "
  894|      0|                            "realm=\"%s\", "
  895|      0|                            "nonce=\"%s\", "
  896|      0|                            "uri=\"%s\", "
  897|      0|                            "cnonce=\"%s\", "
  898|      0|                            "nc=%08x, "
  899|      0|                            "qop=%s, "
  900|      0|                            "response=\"%s\"",
  901|      0|                            userp_quoted,
  902|      0|                            realm_quoted,
  903|      0|                            nonce_quoted,
  904|      0|                            uri_quoted,
  905|      0|                            digest->cnonce,
  906|      0|                            digest->nc,
  907|      0|                            digest->qop,
  908|      0|                            request_digest);
  909|       |
  910|       |    /* Increment nonce-count to use another nc value for the next request */
  911|      0|    digest->nc++;
  912|      0|  }
  913|    939|  else {
  914|    939|    result = curlx_dyn_addf(&response, "username=\"%s\", "
  915|    939|                            "realm=\"%s\", "
  916|    939|                            "nonce=\"%s\", "
  917|    939|                            "uri=\"%s\", "
  918|    939|                            "response=\"%s\"",
  919|    939|                            userp_quoted,
  920|    939|                            realm_quoted,
  921|    939|                            nonce_quoted,
  922|    939|                            uri_quoted,
  923|    939|                            request_digest);
  924|    939|  }
  925|    939|  if(result)
  ------------------
  |  Branch (925:6): [True: 0, False: 939]
  ------------------
  926|      0|    goto oom;
  927|       |
  928|       |  /* Add the optional fields */
  929|    939|  if(digest->opaque) {
  ------------------
  |  Branch (929:6): [True: 0, False: 939]
  ------------------
  930|       |    /* Append the opaque */
  931|      0|    char *opaque_quoted = auth_digest_string_quoted(digest->opaque);
  932|      0|    if(!opaque_quoted) {
  ------------------
  |  Branch (932:8): [True: 0, False: 0]
  ------------------
  933|      0|      result = CURLE_OUT_OF_MEMORY;
  934|      0|      goto oom;
  935|      0|    }
  936|      0|    result = curlx_dyn_addf(&response, ", opaque=\"%s\"", opaque_quoted);
  937|      0|    curlx_free(opaque_quoted);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  938|      0|    if(result)
  ------------------
  |  Branch (938:8): [True: 0, False: 0]
  ------------------
  939|      0|      goto oom;
  940|      0|  }
  941|       |
  942|    939|  if(digest->algorithm) {
  ------------------
  |  Branch (942:6): [True: 0, False: 939]
  ------------------
  943|       |    /* Append the algorithm */
  944|      0|    result = curlx_dyn_addf(&response, ", algorithm=%s", digest->algorithm);
  945|      0|    if(result)
  ------------------
  |  Branch (945:8): [True: 0, False: 0]
  ------------------
  946|      0|      goto oom;
  947|      0|  }
  948|       |
  949|    939|  if(digest->userhash) {
  ------------------
  |  Branch (949:6): [True: 0, False: 939]
  ------------------
  950|       |    /* Append the userhash */
  951|      0|    result = curlx_dyn_add(&response, ", userhash=true");
  952|      0|    if(result)
  ------------------
  |  Branch (952:8): [True: 0, False: 0]
  ------------------
  953|      0|      goto oom;
  954|      0|  }
  955|       |
  956|       |  /* Return the output */
  957|    939|  *outptr = curlx_dyn_ptr(&response);
  958|    939|  *outlen = curlx_dyn_len(&response);
  959|    939|  result = CURLE_OK;
  960|       |
  961|    939|oom:
  962|    939|  curlx_free(nonce_quoted);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  963|    939|  curlx_free(realm_quoted);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  964|    939|  curlx_free(uri_quoted);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  965|    939|  curlx_free(userp_quoted);
  ------------------
  |  | 1483|    939|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  966|    939|  if(result)
  ------------------
  |  Branch (966:6): [True: 0, False: 939]
  ------------------
  967|      0|    curlx_dyn_free(&response);
  968|    939|  return result;
  969|    939|}
digest.c:auth_digest_md5_to_ascii:
  136|  2.81k|{
  137|  2.81k|  int i;
  138|  47.8k|  for(i = 0; i < 16; i++)
  ------------------
  |  Branch (138:14): [True: 45.0k, False: 2.81k]
  ------------------
  139|  45.0k|    curl_msnprintf((char *)&dest[i * 2], 3, "%02x", source[i]);
  140|  2.81k|}

Curl_auth_allowed_to_host:
  141|  5.54k|{
  142|  5.54k|  return Curl_auth_allowed_to_origin(data, data->conn->origin);
  143|  5.54k|}
Curl_auth_allowed_to_origin:
  147|  14.8k|{
  148|  14.8k|  return data->set.allow_auth_to_other_hosts ||
  ------------------
  |  Branch (148:10): [True: 6.63k, False: 8.22k]
  ------------------
  149|  8.22k|         Curl_peer_equal(data->state.initial_origin, origin);
  ------------------
  |  Branch (149:10): [True: 8.13k, False: 92]
  ------------------
  150|  14.8k|}

Curl_tls_keylog_open:
   39|      1|{
   40|      1|  if(!keylog_file_fp) {
  ------------------
  |  Branch (40:6): [True: 1, False: 0]
  ------------------
   41|      1|    keylog_file_name = getenv("SSLKEYLOGFILE");
   42|      1|    if(keylog_file_name) {
  ------------------
  |  Branch (42:8): [True: 0, False: 1]
  ------------------
   43|      0|      keylog_file_fp = curlx_fopen(keylog_file_name, FOPEN_APPENDTEXT);
  ------------------
  |  |   74|      0|#define curlx_fopen(file, mode) curl_dbg_fopen(file, mode, __LINE__, __FILE__)
  ------------------
   44|      0|      if(keylog_file_fp) {
  ------------------
  |  Branch (44:10): [True: 0, False: 0]
  ------------------
   45|       |#ifdef _WIN32
   46|       |        if(setvbuf(keylog_file_fp, NULL, _IONBF, 0))
   47|       |#else
   48|      0|        if(setvbuf(keylog_file_fp, NULL, _IOLBF, 4096))
  ------------------
  |  Branch (48:12): [True: 0, False: 0]
  ------------------
   49|      0|#endif
   50|      0|        {
   51|      0|          curlx_fclose(keylog_file_fp);
  ------------------
  |  |   79|      0|#define curlx_fclose(file)      curl_dbg_fclose(file, __LINE__, __FILE__)
  ------------------
   52|       |          keylog_file_fp = NULL;
   53|      0|        }
   54|      0|      }
   55|      0|    }
   56|      1|  }
   57|      1|}
Curl_tls_keylog_enabled:
   68|  1.31k|{
   69|       |  return keylog_file_fp != NULL;
   70|  1.31k|}

Curl_ssl_setup_x509_store:
 3289|  1.38k|{
 3290|  1.38k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3291|  1.38k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3292|  1.38k|  CURLcode result = CURLE_OK;
 3293|  1.38k|  X509_STORE *cached_store;
 3294|  1.38k|  bool cache_criteria_met, is_empty;
 3295|       |
 3296|       |  /* Consider the X509 store cacheable if it comes exclusively from a CAfile,
 3297|       |     or no source is provided and we are falling back to OpenSSL's built-in
 3298|       |     default. */
 3299|  1.38k|  cache_criteria_met = (data->set.general_ssl.ca_cache_timeout != 0) &&
  ------------------
  |  Branch (3299:24): [True: 1.38k, False: 1]
  ------------------
 3300|  1.38k|    conn_config->verifypeer &&
  ------------------
  |  Branch (3300:5): [True: 1.37k, False: 4]
  ------------------
 3301|  1.37k|    !conn_config->CApath &&
  ------------------
  |  Branch (3301:5): [True: 0, False: 1.37k]
  ------------------
 3302|      0|    !conn_config->ca_info_blob &&
  ------------------
  |  Branch (3302:5): [True: 0, False: 0]
  ------------------
 3303|      0|    !ssl_config->primary.CRLfile &&
  ------------------
  |  Branch (3303:5): [True: 0, False: 0]
  ------------------
 3304|      0|    !ssl_config->native_ca_store;
  ------------------
  |  Branch (3304:5): [True: 0, False: 0]
  ------------------
 3305|       |
 3306|  1.38k|  ERR_set_mark();
 3307|       |
 3308|  1.38k|  cached_store = ossl_get_cached_x509_store(cf, data, &is_empty);
 3309|  1.38k|  if(cached_store && cache_criteria_met && X509_STORE_up_ref(cached_store)) {
  ------------------
  |  Branch (3309:6): [True: 0, False: 1.38k]
  |  Branch (3309:22): [True: 0, False: 0]
  |  Branch (3309:44): [True: 0, False: 0]
  ------------------
 3310|      0|    SSL_CTX_set_cert_store(octx->ssl_ctx, cached_store);
 3311|      0|    octx->store_is_empty = is_empty;
 3312|      0|  }
 3313|  1.38k|  else {
 3314|  1.38k|    X509_STORE *store = SSL_CTX_get_cert_store(octx->ssl_ctx);
 3315|       |
 3316|  1.38k|    result = ossl_populate_x509_store(cf, data, octx, store);
 3317|  1.38k|    if(result == CURLE_OK && cache_criteria_met) {
  ------------------
  |  Branch (3317:8): [True: 1.23k, False: 151]
  |  Branch (3317:30): [True: 0, False: 1.23k]
  ------------------
 3318|      0|      ossl_set_cached_x509_store(cf, data, store, (bool)octx->store_is_empty);
 3319|      0|    }
 3320|  1.38k|  }
 3321|       |
 3322|  1.38k|  ERR_pop_to_mark();
 3323|       |
 3324|  1.38k|  return result;
 3325|  1.38k|}
Curl_ossl_need_httpsrr:
 3557|  2.09k|{
 3558|  2.09k|  (void)data;
 3559|       |  return FALSE;
  ------------------
  |  | 1058|  2.09k|#define FALSE false
  ------------------
 3560|  2.09k|}
Curl_ossl_ctx_init:
 3671|  2.09k|{
 3672|  2.09k|  CURLcode result = CURLE_OK;
 3673|  2.09k|  const char *ciphers;
 3674|  2.09k|  const SSL_METHOD *req_method = NULL;
 3675|  2.09k|  ctx_option_t ctx_options = 0;
 3676|  2.09k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3677|  2.09k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3678|  2.09k|  char * const ssl_cert = ssl_config->primary.clientcert;
 3679|  2.09k|  const struct curl_blob *ssl_cert_blob = ssl_config->primary.cert_blob;
 3680|  2.09k|  const char * const ssl_cert_type = ssl_config->primary.cert_type;
 3681|  2.09k|  unsigned int ssl_version_min;
 3682|  2.09k|  char error_buffer[256];
 3683|       |
 3684|       |  /* Make funny stuff to get random input */
 3685|  2.09k|  result = ossl_seed(data);
 3686|  2.09k|  if(result)
  ------------------
  |  Branch (3686:6): [True: 0, False: 2.09k]
  ------------------
 3687|      0|    return result;
 3688|       |
 3689|  2.09k|  ssl_config->certverifyresult = !X509_V_OK;
 3690|       |
 3691|  2.09k|  result = ossl_init_method(cf, data, peer, &req_method, &ssl_version_min);
 3692|  2.09k|  if(result)
  ------------------
  |  Branch (3692:6): [True: 0, False: 2.09k]
  ------------------
 3693|      0|    return result;
 3694|  2.09k|  DEBUGASSERT(req_method);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3694:3): [True: 0, False: 2.09k]
  |  Branch (3694:3): [True: 2.09k, False: 0]
  ------------------
 3695|       |
 3696|  2.09k|  DEBUGASSERT(!octx->ssl_ctx);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3696:3): [True: 0, False: 2.09k]
  |  Branch (3696:3): [True: 2.09k, False: 0]
  ------------------
 3697|  2.09k|  octx->ssl_ctx =
 3698|  2.09k|#ifdef OPENSSL_HAS_PROVIDERS
 3699|  2.09k|    data->state.libctx ?
  ------------------
  |  Branch (3699:5): [True: 527, False: 1.56k]
  ------------------
 3700|    527|    SSL_CTX_new_ex(data->state.libctx, data->state.propq, req_method):
 3701|  2.09k|#endif
 3702|  2.09k|    SSL_CTX_new(req_method);
 3703|       |
 3704|  2.09k|  if(!octx->ssl_ctx) {
  ------------------
  |  Branch (3704:6): [True: 28, False: 2.06k]
  ------------------
 3705|     28|    failf(data, "SSL: could not create a context: %s",
  ------------------
  |  |   62|     28|#define failf Curl_failf
  ------------------
 3706|     28|          ossl_strerror(ERR_peek_error(), error_buffer, sizeof(error_buffer)));
 3707|     28|    return CURLE_OUT_OF_MEMORY;
 3708|     28|  }
 3709|       |
 3710|  2.06k|  if(cb_setup) {
  ------------------
  |  Branch (3710:6): [True: 0, False: 2.06k]
  ------------------
 3711|      0|    result = cb_setup(cf, data, cb_user_data);
 3712|      0|    if(result)
  ------------------
  |  Branch (3712:8): [True: 0, False: 0]
  ------------------
 3713|      0|      return result;
 3714|      0|  }
 3715|       |
 3716|  2.06k|  if(data->set.fdebug && data->set.verbose &&
  ------------------
  |  Branch (3716:6): [True: 0, False: 2.06k]
  |  Branch (3716:26): [True: 0, False: 0]
  ------------------
 3717|      0|     (peer->transport != TRNSPRT_QUIC)) {
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3717:6): [True: 0, False: 0]
  ------------------
 3718|       |    /* the SSL trace callback is only used for verbose logging;
 3719|       |     * QUIC connections use a different TLS record format that
 3720|       |     * ossl_trace cannot handle */
 3721|      0|    SSL_CTX_set_msg_callback(octx->ssl_ctx, ossl_trace);
 3722|      0|    SSL_CTX_set_msg_callback_arg(octx->ssl_ctx, cf);
 3723|      0|  }
 3724|       |
 3725|       |  /* OpenSSL contains code to work around lots of bugs and flaws in various
 3726|       |     SSL-implementations. SSL_CTX_set_options() is used to enabled those
 3727|       |     work-arounds. The man page for this option states that SSL_OP_ALL enables
 3728|       |     all the work-arounds and that "It is usually safe to use SSL_OP_ALL to
 3729|       |     enable the bug workaround options if compatibility with somewhat broken
 3730|       |     implementations is desired."
 3731|       |
 3732|       |     The "-no_ticket" option was introduced in OpenSSL 0.9.8j. it is a flag to
 3733|       |     disable "rfc4507bis session ticket support". rfc4507bis was later turned
 3734|       |     into the proper RFC5077: https://datatracker.ietf.org/doc/html/rfc5077
 3735|       |
 3736|       |     The enabled extension concerns the session management. I wonder how often
 3737|       |     libcurl stops a connection and then resumes a TLS session. Also, sending
 3738|       |     the session data is some overhead. I suggest that you use your proposed
 3739|       |     patch (which explicitly disables TICKET).
 3740|       |
 3741|       |     If someone writes an application with libcurl and OpenSSL who wants to
 3742|       |     enable the feature, one can do this in the SSL callback.
 3743|       |
 3744|       |     SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG option enabling allowed proper
 3745|       |     interoperability with web server Netscape Enterprise Server 2.0.1 which
 3746|       |     was released back in 1996.
 3747|       |
 3748|       |     Due to CVE-2010-4180, option SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG has
 3749|       |     become ineffective as of OpenSSL 0.9.8q and 1.0.0c. In order to mitigate
 3750|       |     CVE-2010-4180 when using previous OpenSSL versions we no longer enable
 3751|       |     this option regardless of OpenSSL version and SSL_OP_ALL definition.
 3752|       |
 3753|       |     OpenSSL added a work-around for an SSL 3.0/TLS 1.0 CBC vulnerability:
 3754|       |     https://web.archive.org/web/20240114184648/openssl.org/~bodo/tls-cbc.txt.
 3755|       |     In 0.9.6e they added a bit to SSL_OP_ALL that _disables_ that work-around
 3756|       |     despite the fact that SSL_OP_ALL is documented to do "rather harmless"
 3757|       |     workarounds. In order to keep the secure work-around, the
 3758|       |     SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set.
 3759|       |  */
 3760|       |
 3761|  2.06k|  ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET | SSL_OP_NO_COMPRESSION;
 3762|       |
 3763|       |  /* mitigate CVE-2010-4180 */
 3764|  2.06k|  ctx_options &= ~(ctx_option_t)SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;
 3765|       |
 3766|       |  /* unless the user explicitly asks to allow the protocol vulnerability we
 3767|       |     use the work-around */
 3768|  2.06k|  if(!ssl_config->enable_beast)
  ------------------
  |  Branch (3768:6): [True: 2.06k, False: 3]
  ------------------
 3769|  2.06k|    ctx_options &= ~(ctx_option_t)SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
 3770|       |
 3771|  2.06k|  DEBUGASSERT(ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1081|  2.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3771:3): [True: 0, False: 2.06k]
  |  Branch (3771:3): [True: 2.06k, False: 0]
  ------------------
 3772|  2.06k|  switch(ssl_version_min) {
 3773|      0|  case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2370|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3773:3): [True: 0, False: 2.06k]
  ------------------
 3774|      0|  case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2371|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3774:3): [True: 0, False: 2.06k]
  ------------------
 3775|      0|    return CURLE_NOT_BUILT_IN;
 3776|       |
 3777|       |    /* "--tlsv<x.y>" options mean TLS >= version <x.y> */
 3778|      4|  case CURL_SSLVERSION_TLSv1:   /* TLS >= version 1.0 */
  ------------------
  |  | 2369|      4|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3778:3): [True: 4, False: 2.06k]
  ------------------
 3779|      5|  case CURL_SSLVERSION_TLSv1_0: /* TLS >= version 1.0 */
  ------------------
  |  | 2372|      5|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3779:3): [True: 1, False: 2.06k]
  ------------------
 3780|     11|  case CURL_SSLVERSION_TLSv1_1: /* TLS >= version 1.1 */
  ------------------
  |  | 2373|     11|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3780:3): [True: 6, False: 2.05k]
  ------------------
 3781|  2.05k|  case CURL_SSLVERSION_TLSv1_2: /* TLS >= version 1.2 */
  ------------------
  |  | 2374|  2.05k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3781:3): [True: 2.04k, False: 19]
  ------------------
 3782|  2.06k|  case CURL_SSLVERSION_TLSv1_3: /* TLS >= version 1.3 */
  ------------------
  |  | 2375|  2.06k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3782:3): [True: 8, False: 2.05k]
  ------------------
 3783|       |    /* asking for any TLS version as the minimum, means no SSL versions
 3784|       |       allowed */
 3785|  2.06k|    ctx_options |= SSL_OP_NO_SSLv2;
 3786|  2.06k|    ctx_options |= SSL_OP_NO_SSLv3;
 3787|       |
 3788|  2.06k|    result = ossl_set_ssl_version_min_max(cf, octx->ssl_ctx, ssl_version_min);
 3789|  2.06k|    if(result)
  ------------------
  |  Branch (3789:8): [True: 0, False: 2.06k]
  ------------------
 3790|      0|      return result;
 3791|  2.06k|    break;
 3792|       |
 3793|  2.06k|  default:
  ------------------
  |  Branch (3793:3): [True: 0, False: 2.06k]
  ------------------
 3794|      0|    failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3795|      0|    return CURLE_SSL_CONNECT_ERROR;
 3796|  2.06k|  }
 3797|       |
 3798|  2.06k|  SSL_CTX_set_options(octx->ssl_ctx, ctx_options);
 3799|  2.06k|  SSL_CTX_set_read_ahead(octx->ssl_ctx, 1);
 3800|       |
 3801|       |  /* Max TLS1.2 record size 0x4000 + 0x800.
 3802|       |     OpenSSL supports processing "jumbo TLS record" (8 TLS records) in one go
 3803|       |     for some algorithms, so match that here.
 3804|       |     Experimentation shows that a slightly larger buffer is needed
 3805|       |     to avoid short reads.
 3806|       |
 3807|       |     However using a large buffer (8 packets) actually decreases performance.
 3808|       |     4 packets is better.
 3809|       |   */
 3810|  2.06k|#ifdef HAVE_SSL_CTX_SET_DEFAULT_READ_BUFFER_LEN
 3811|  2.06k|  SSL_CTX_set_default_read_buffer_len(octx->ssl_ctx, 0x401e * 4);
 3812|  2.06k|#endif
 3813|       |
 3814|       |  /* We do retry writes sometimes from another buffer address */
 3815|  2.06k|  SSL_CTX_set_mode(octx->ssl_ctx, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 3816|       |
 3817|  2.06k|  ciphers = conn_config->cipher_list;
 3818|  2.06k|  if(!ciphers && (peer->transport != TRNSPRT_QUIC))
  ------------------
  |  |  309|  1.22k|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3818:6): [True: 1.22k, False: 839]
  |  Branch (3818:18): [True: 1.22k, False: 0]
  ------------------
 3819|  1.22k|    ciphers = NULL;
 3820|  2.06k|  if(ciphers && (ssl_version_min < CURL_SSLVERSION_TLSv1_3)) {
  ------------------
  |  | 2375|    839|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3820:6): [True: 839, False: 1.22k]
  |  Branch (3820:17): [True: 837, False: 2]
  ------------------
 3821|    837|    if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, ciphers)) {
  ------------------
  |  Branch (3821:8): [True: 588, False: 249]
  ------------------
 3822|    588|      failf(data, "failed setting cipher list: %s", ciphers);
  ------------------
  |  |   62|    588|#define failf Curl_failf
  ------------------
 3823|    588|      return CURLE_SSL_CIPHER;
 3824|    588|    }
 3825|    249|    infof(data, "Cipher selection: %s", ciphers);
  ------------------
  |  |  143|    249|  do {                               \
  |  |  144|    249|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    249|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 249, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 249]
  |  |  |  |  ------------------
  |  |  |  |  320|    249|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    249|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    249|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 249]
  |  |  ------------------
  ------------------
 3826|    249|  }
 3827|       |
 3828|  1.47k|#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
 3829|  1.47k|  {
 3830|  1.47k|    const char *ciphers13 = conn_config->cipher_list13;
 3831|  1.47k|    if(ciphers13 &&
  ------------------
  |  Branch (3831:8): [True: 164, False: 1.31k]
  ------------------
 3832|    164|       (!conn_config->version_max ||
  ------------------
  |  Branch (3832:9): [True: 158, False: 6]
  ------------------
 3833|      6|        (conn_config->version_max == CURL_SSLVERSION_MAX_DEFAULT) ||
  ------------------
  |  | 2380|      6|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|      6|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3833:9): [True: 1, False: 5]
  ------------------
 3834|    161|        (conn_config->version_max >= CURL_SSLVERSION_MAX_TLSv1_3))) {
  ------------------
  |  | 2384|      5|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2375|      5|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3834:9): [True: 2, False: 3]
  ------------------
 3835|    161|      if(!SSL_CTX_set_ciphersuites(octx->ssl_ctx, ciphers13)) {
  ------------------
  |  Branch (3835:10): [True: 93, False: 68]
  ------------------
 3836|     93|        failf(data, "failed setting TLS 1.3 cipher suite: %s", ciphers13);
  ------------------
  |  |   62|     93|#define failf Curl_failf
  ------------------
 3837|     93|        return CURLE_SSL_CIPHER;
 3838|     93|      }
 3839|     68|      infof(data, "TLS 1.3 cipher selection: %s", ciphers13);
  ------------------
  |  |  143|     68|  do {                               \
  |  |  144|     68|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     68|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 68, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 68]
  |  |  |  |  ------------------
  |  |  |  |  320|     68|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     68|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     68|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 68]
  |  |  ------------------
  ------------------
 3840|     68|    }
 3841|  1.47k|  }
 3842|  1.38k|#endif
 3843|       |
 3844|  1.38k|  if(ssl_cert || ssl_cert_blob || ssl_cert_type) {
  ------------------
  |  Branch (3844:6): [True: 13, False: 1.37k]
  |  Branch (3844:18): [True: 0, False: 1.37k]
  |  Branch (3844:35): [True: 45, False: 1.32k]
  ------------------
 3845|     58|    result = client_cert(data, octx->ssl_ctx,
 3846|     58|                         ssl_cert, ssl_cert_blob, ssl_cert_type,
 3847|     58|                         ssl_config->primary.key, ssl_config->primary.key_blob,
 3848|     58|                         ssl_config->primary.key_type,
 3849|     58|                         ssl_config->primary.key_passwd);
 3850|     58|    if(result)
  ------------------
  |  Branch (3850:8): [True: 13, False: 45]
  ------------------
 3851|       |      /* failf() is already done in client_cert() */
 3852|     13|      return result;
 3853|     58|  }
 3854|       |
 3855|  1.37k|#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
 3856|       |  /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
 3857|  1.37k|  SSL_CTX_set_post_handshake_auth(octx->ssl_ctx, 1);
 3858|  1.37k|#endif
 3859|       |
 3860|  1.37k|  {
 3861|  1.37k|    const char *curves = conn_config->curves;
 3862|  1.37k|    if(curves) {
  ------------------
  |  Branch (3862:8): [True: 0, False: 1.37k]
  ------------------
 3863|       |#ifdef HAVE_BORINGSSL_LIKE
 3864|       |#define OSSL_CURVE_CAST(x) (x)
 3865|       |#else
 3866|      0|#define OSSL_CURVE_CAST(x) (char *)CURL_UNCONST(x)
 3867|      0|#endif
 3868|      0|      if(!SSL_CTX_set1_curves_list(octx->ssl_ctx, OSSL_CURVE_CAST(curves))) {
  ------------------
  |  Branch (3868:10): [True: 0, False: 0]
  ------------------
 3869|      0|        failf(data, "failed setting curves list: '%s'", curves);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3870|      0|        return CURLE_SSL_CIPHER;
 3871|      0|      }
 3872|      0|    }
 3873|  1.37k|  }
 3874|       |
 3875|  1.37k|#ifdef HAVE_SSL_CTX_SET1_SIGALGS
 3876|  1.37k|#define OSSL_SIGALG_CAST(x) OSSL_CURVE_CAST(x)
 3877|  1.37k|  {
 3878|  1.37k|    const char *signature_algorithms = conn_config->signature_algorithms;
 3879|  1.37k|    if(signature_algorithms) {
  ------------------
  |  Branch (3879:8): [True: 0, False: 1.37k]
  ------------------
 3880|      0|      if(!SSL_CTX_set1_sigalgs_list(octx->ssl_ctx,
  ------------------
  |  Branch (3880:10): [True: 0, False: 0]
  ------------------
 3881|      0|                                    OSSL_SIGALG_CAST(signature_algorithms))) {
 3882|      0|        failf(data, "failed setting signature algorithms: '%s'",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3883|      0|              signature_algorithms);
 3884|      0|        return CURLE_SSL_CIPHER;
 3885|      0|      }
 3886|      0|    }
 3887|  1.37k|  }
 3888|  1.37k|#endif
 3889|       |
 3890|  1.37k|#if defined(HAVE_OPENSSL_SRP) && defined(USE_TLS_SRP)
 3891|  1.37k|  if(ssl_config->primary.username && Curl_auth_allowed_to_host(data)) {
  ------------------
  |  Branch (3891:6): [True: 60, False: 1.31k]
  |  Branch (3891:38): [True: 60, False: 0]
  ------------------
 3892|     60|    char * const ssl_username = ssl_config->primary.username;
 3893|     60|    char * const ssl_password = ssl_config->primary.password;
 3894|     60|    infof(data, "Using TLS-SRP username: %s", ssl_username);
  ------------------
  |  |  143|     60|  do {                               \
  |  |  144|     60|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|     60|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 60, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 60]
  |  |  |  |  ------------------
  |  |  |  |  320|     60|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|     60|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|     60|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 60]
  |  |  ------------------
  ------------------
 3895|       |
 3896|     60|    if(!SSL_CTX_set_srp_username(octx->ssl_ctx, ssl_username)) {
  ------------------
  |  Branch (3896:8): [True: 2, False: 58]
  ------------------
 3897|      2|      failf(data, "Unable to set SRP username");
  ------------------
  |  |   62|      2|#define failf Curl_failf
  ------------------
 3898|      2|      return CURLE_BAD_FUNCTION_ARGUMENT;
 3899|      2|    }
 3900|     58|    if(!SSL_CTX_set_srp_password(octx->ssl_ctx, ssl_password)) {
  ------------------
  |  Branch (3900:8): [True: 53, False: 5]
  ------------------
 3901|     53|      failf(data, "failed setting SRP password");
  ------------------
  |  |   62|     53|#define failf Curl_failf
  ------------------
 3902|     53|      return CURLE_BAD_FUNCTION_ARGUMENT;
 3903|     53|    }
 3904|      5|    if(!conn_config->cipher_list) {
  ------------------
  |  Branch (3904:8): [True: 2, False: 3]
  ------------------
 3905|      2|      infof(data, "Setting cipher list SRP");
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 3906|       |
 3907|      2|      if(!SSL_CTX_set_cipher_list(octx->ssl_ctx, "SRP")) {
  ------------------
  |  Branch (3907:10): [True: 0, False: 2]
  ------------------
 3908|      0|        failf(data, "failed setting SRP cipher list");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3909|      0|        return CURLE_SSL_CIPHER;
 3910|      0|      }
 3911|      2|    }
 3912|      5|  }
 3913|  1.31k|#endif /* HAVE_OPENSSL_SRP && USE_TLS_SRP */
 3914|       |
 3915|       |  /* OpenSSL always tries to verify the peer. By setting the failure mode
 3916|       |   * to NONE, we allow the connect to complete, regardless of the outcome.
 3917|       |   * We then explicitly check the result and may try alternatives like
 3918|       |   * Apple's SecTrust for verification. */
 3919|  1.31k|  SSL_CTX_set_verify(octx->ssl_ctx, SSL_VERIFY_NONE, NULL);
 3920|       |
 3921|       |  /* Enable logging of secrets to the file specified in env SSLKEYLOGFILE. */
 3922|  1.31k|#if !defined(HAVE_KEYLOG_UPSTREAM) && defined(HAVE_KEYLOG_CALLBACK)
 3923|  1.31k|  if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (3923:6): [True: 0, False: 1.31k]
  ------------------
 3924|      0|    SSL_CTX_set_keylog_callback(octx->ssl_ctx, ossl_keylog_callback);
 3925|      0|  }
 3926|  1.31k|#endif
 3927|       |
 3928|  1.31k|  if(cb_new_session) {
  ------------------
  |  Branch (3928:6): [True: 1.31k, False: 0]
  ------------------
 3929|       |    /* Enable the session cache because it is a prerequisite for the
 3930|       |     * "new session" callback. Use the "external storage" mode to prevent
 3931|       |     * OpenSSL from creating an internal session cache.
 3932|       |     */
 3933|  1.31k|    SSL_CTX_set_session_cache_mode(octx->ssl_ctx,
 3934|  1.31k|                                   SSL_SESS_CACHE_CLIENT |
 3935|  1.31k|                                   SSL_SESS_CACHE_NO_INTERNAL);
 3936|  1.31k|    SSL_CTX_sess_set_new_cb(octx->ssl_ctx, cb_new_session);
 3937|  1.31k|  }
 3938|       |
 3939|       |  /* give application a chance to interfere with SSL set up. */
 3940|  1.31k|  if(data->set.ssl.fsslctx) {
  ------------------
  |  Branch (3940:6): [True: 0, False: 1.31k]
  ------------------
 3941|       |    /* When a user callback is installed to modify the SSL_CTX,
 3942|       |     * we need to do the full initialization before calling it.
 3943|       |     * See: #11800 */
 3944|      0|    if(!octx->x509_store_setup) {
  ------------------
  |  Branch (3944:8): [True: 0, False: 0]
  ------------------
 3945|      0|      result = Curl_ssl_setup_x509_store(cf, data, octx);
 3946|      0|      if(result)
  ------------------
  |  Branch (3946:10): [True: 0, False: 0]
  ------------------
 3947|      0|        return result;
 3948|      0|      octx->x509_store_setup = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3949|      0|    }
 3950|      0|    Curl_set_in_callback(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3951|      0|    result = (*data->set.ssl.fsslctx)(data, octx->ssl_ctx,
 3952|      0|                                      data->set.ssl.fsslctxp);
 3953|      0|    Curl_set_in_callback(data, FALSE);
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3954|      0|    if(result) {
  ------------------
  |  Branch (3954:8): [True: 0, False: 0]
  ------------------
 3955|      0|      failf(data, "error signaled by SSL ctx callback");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3956|      0|      return result;
 3957|      0|    }
 3958|      0|  }
 3959|       |
 3960|  1.31k|  return ossl_init_ssl(octx, cf, data, peer, alpns_requested,
 3961|  1.31k|                       ssl_user_data, sess_reuse_cb);
 3962|  1.31k|}
Curl_ossl_version:
 5408|  3.52k|{
 5409|       |#ifdef LIBRESSL_VERSION_NUMBER
 5410|       |  char *p;
 5411|       |  size_t count;
 5412|       |  const char *ver = OpenSSL_version(OPENSSL_VERSION);
 5413|       |  const char expected[] = OSSL_PACKAGE " "; /* ie "LibreSSL " */
 5414|       |  if(curl_strnequal(ver, expected, sizeof(expected) - 1)) {
 5415|       |    ver += sizeof(expected) - 1;
 5416|       |  }
 5417|       |  count = curl_msnprintf(buffer, size, "%s/%s", OSSL_PACKAGE, ver);
 5418|       |  for(p = buffer; *p; ++p) {
 5419|       |    if(ISBLANK(*p))
 5420|       |      *p = '_';
 5421|       |  }
 5422|       |  return count;
 5423|       |#elif defined(OPENSSL_IS_AWSLC)
 5424|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5425|       |                        OSSL_PACKAGE, AWSLC_VERSION_NUMBER_STRING);
 5426|       |#elif defined(OPENSSL_IS_BORINGSSL)
 5427|       |#ifdef CURL_BORINGSSL_VERSION
 5428|       |  return curl_msnprintf(buffer, size, "%s/%s",
 5429|       |                        OSSL_PACKAGE, CURL_BORINGSSL_VERSION);
 5430|       |#else
 5431|       |  return curl_msnprintf(buffer, size, OSSL_PACKAGE);
 5432|       |#endif
 5433|       |#else /* OpenSSL 3+ */
 5434|  3.52k|  return curl_msnprintf(buffer, size, "%s/%s",
 5435|  3.52k|                        OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
  ------------------
  |  |  163|  3.52k|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 5436|  3.52k|#endif
 5437|  3.52k|}
openssl.c:ossl_get_cached_x509_store:
 3211|  1.38k|{
 3212|  1.38k|  struct Curl_multi *multi = data->multi;
 3213|  1.38k|  struct ossl_x509_share *share;
 3214|  1.38k|  X509_STORE *store = NULL;
 3215|       |
 3216|  1.38k|  DEBUGASSERT(multi);
  ------------------
  |  | 1081|  1.38k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3216:3): [True: 0, False: 1.38k]
  |  Branch (3216:3): [True: 1.38k, False: 0]
  ------------------
 3217|  1.38k|  *pempty = TRUE;
  ------------------
  |  | 1055|  1.38k|#define TRUE true
  ------------------
 3218|  1.38k|  share = multi ? Curl_hash_pick(&multi->proto_hash,
  ------------------
  |  Branch (3218:11): [True: 1.38k, False: 0]
  ------------------
 3219|  1.38k|                                 CURL_UNCONST(MPROTO_OSSL_X509_KEY),
  ------------------
  |  |  866|  1.38k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  ------------------
 3220|  1.38k|                                 sizeof(MPROTO_OSSL_X509_KEY) - 1) : NULL;
  ------------------
  |  | 3156|  1.38k|#define MPROTO_OSSL_X509_KEY  "tls:ossl:x509:share"
  ------------------
 3221|  1.38k|  if(share && share->store &&
  ------------------
  |  Branch (3221:6): [True: 0, False: 1.38k]
  |  Branch (3221:15): [True: 0, False: 0]
  ------------------
 3222|      0|     !ossl_cached_x509_store_expired(data, share) &&
  ------------------
  |  Branch (3222:6): [True: 0, False: 0]
  ------------------
 3223|      0|     !ossl_cached_x509_store_different(cf, data, share)) {
  ------------------
  |  Branch (3223:6): [True: 0, False: 0]
  ------------------
 3224|      0|    store = share->store;
 3225|      0|    *pempty = (bool)share->store_is_empty;
 3226|      0|  }
 3227|       |
 3228|  1.38k|  return store;
 3229|  1.38k|}
openssl.c:ossl_populate_x509_store:
 3095|  1.38k|{
 3096|  1.38k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3097|  1.38k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3098|  1.38k|  CURLcode result = CURLE_OK;
 3099|  1.38k|  X509_LOOKUP *lookup = NULL;
 3100|  1.38k|  const char * const ssl_crlfile = ssl_config->primary.CRLfile;
 3101|  1.38k|  unsigned long x509flags = 0;
 3102|       |
 3103|  1.38k|  CURL_TRC_CF(data, cf, "configuring OpenSSL's x509 trust store");
  ------------------
  |  |  153|  1.38k|  do {                                          \
  |  |  154|  1.38k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.38k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.76k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.38k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.76k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.38k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.38k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.38k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.38k]
  |  |  ------------------
  ------------------
 3104|  1.38k|  if(!store)
  ------------------
  |  Branch (3104:6): [True: 0, False: 1.38k]
  ------------------
 3105|      0|    return CURLE_OUT_OF_MEMORY;
 3106|       |
 3107|  1.38k|  if(!conn_config->verifypeer) {
  ------------------
  |  Branch (3107:6): [True: 4, False: 1.37k]
  ------------------
 3108|      4|    infof(data, "SSL Trust: peer verification disabled");
  ------------------
  |  |  143|      4|  do {                               \
  |  |  144|      4|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      4|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 4, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  320|      4|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      4|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      4|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 4]
  |  |  ------------------
  ------------------
 3109|      4|    return CURLE_OK;
 3110|      4|  }
 3111|       |
 3112|  1.37k|  infof(data, "SSL Trust Anchors:");
  ------------------
  |  |  143|  1.37k|  do {                               \
  |  |  144|  1.37k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.37k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.37k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.37k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.37k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.37k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.37k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.37k]
  |  |  ------------------
  ------------------
 3113|  1.37k|  result = ossl_load_trust_anchors(cf, data, octx, store);
 3114|  1.37k|  if(result)
  ------------------
  |  Branch (3114:6): [True: 72, False: 1.30k]
  ------------------
 3115|     72|    return result;
 3116|       |
 3117|       |  /* Does not make sense to load a CRL file without peer verification */
 3118|  1.30k|  if(ssl_crlfile) {
  ------------------
  |  Branch (3118:6): [True: 79, False: 1.22k]
  ------------------
 3119|       |    /* tell OpenSSL where to find CRL file that is used to check certificate
 3120|       |     * revocation */
 3121|     79|    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
 3122|     79|    if(!lookup ||
  ------------------
  |  Branch (3122:8): [True: 0, False: 79]
  ------------------
 3123|     79|       (!X509_load_crl_file(lookup, ssl_crlfile, X509_FILETYPE_PEM))) {
  ------------------
  |  Branch (3123:8): [True: 79, False: 0]
  ------------------
 3124|     79|      failf(data, "error loading CRL file: %s", ssl_crlfile);
  ------------------
  |  |   62|     79|#define failf Curl_failf
  ------------------
 3125|     79|      return CURLE_SSL_CRL_BADFILE;
 3126|     79|    }
 3127|      0|    x509flags = X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL;
 3128|      0|    infof(data, " CRLfile: %s", ssl_crlfile);
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3129|      0|  }
 3130|       |
 3131|       |  /* Try building a chain using issuers in the trusted store first to avoid
 3132|       |     problems with server-sent legacy intermediates. Newer versions of
 3133|       |     OpenSSL do alternate chain checking by default but we do not know how to
 3134|       |     determine that in a reliable manner.
 3135|       |     https://web.archive.org/web/20190422050538/rt.openssl.org/Ticket/Display.html?id=3621
 3136|       |  */
 3137|  1.22k|  x509flags |= X509_V_FLAG_TRUSTED_FIRST;
 3138|       |
 3139|  1.22k|  if(!ssl_config->no_partialchain && !ssl_crlfile) {
  ------------------
  |  Branch (3139:6): [True: 1.22k, False: 1]
  |  Branch (3139:38): [True: 1.22k, False: 0]
  ------------------
 3140|       |    /* Have intermediate certificates in the trust store be treated as
 3141|       |       trust-anchors, in the same way as self-signed root CA certificates are.
 3142|       |       This allows users to verify servers using the intermediate cert only,
 3143|       |       instead of needing the whole chain.
 3144|       |
 3145|       |       Due to OpenSSL bug https://github.com/openssl/openssl/issues/5081 we
 3146|       |       cannot do partial chains with a CRL check.
 3147|       |    */
 3148|  1.22k|    x509flags |= X509_V_FLAG_PARTIAL_CHAIN;
 3149|  1.22k|  }
 3150|  1.22k|  (void)X509_STORE_set_flags(store, x509flags);
 3151|       |
 3152|  1.22k|  return result;
 3153|  1.30k|}
openssl.c:ossl_load_trust_anchors:
 2984|  1.37k|{
 2985|  1.37k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2986|  1.37k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 2987|  1.37k|  CURLcode result = CURLE_OK;
 2988|  1.37k|  const char * const ssl_cafile =
 2989|       |    /* CURLOPT_CAINFO_BLOB overrides CURLOPT_CAINFO */
 2990|  1.37k|    (conn_config->ca_info_blob ? NULL : conn_config->CAfile);
  ------------------
  |  Branch (2990:6): [True: 0, False: 1.37k]
  ------------------
 2991|  1.37k|  const char * const ssl_capath = conn_config->CApath;
 2992|  1.37k|  bool have_native_check = FALSE;
  ------------------
  |  | 1058|  1.37k|#define FALSE false
  ------------------
 2993|       |
 2994|  1.37k|  octx->store_is_empty = TRUE;
  ------------------
  |  | 1055|  1.37k|#define TRUE true
  ------------------
 2995|  1.37k|  if(ssl_config->native_ca_store) {
  ------------------
  |  Branch (2995:6): [True: 1, False: 1.37k]
  ------------------
 2996|       |#ifdef USE_WIN32_CRYPTO
 2997|       |    bool added = FALSE;
 2998|       |    result = ossl_windows_load_anchors(cf, data, store, &added);
 2999|       |    if(result)
 3000|       |      return result;
 3001|       |    if(added) {
 3002|       |      infof(data, "  Native: Windows System Stores ROOT+CA");
 3003|       |      octx->store_is_empty = FALSE;
 3004|       |    }
 3005|       |#elif defined(USE_APPLE_SECTRUST)
 3006|       |    infof(data, "  Native: Apple SecTrust");
 3007|       |    have_native_check = TRUE;
 3008|       |#endif
 3009|      1|  }
 3010|       |
 3011|  1.37k|  if(conn_config->ca_info_blob) {
  ------------------
  |  Branch (3011:6): [True: 0, False: 1.37k]
  ------------------
 3012|      0|    result = load_cacert_from_memory(store, conn_config->ca_info_blob);
 3013|      0|    if(result) {
  ------------------
  |  Branch (3013:8): [True: 0, False: 0]
  ------------------
 3014|      0|      failf(data, "error adding trust anchors from certificate blob: %d",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3015|      0|            result);
 3016|      0|      return result;
 3017|      0|    }
 3018|      0|    infof(data, "  CA Blob from configuration");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3019|      0|    octx->store_is_empty = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3020|      0|  }
 3021|       |
 3022|  1.37k|  if(ssl_cafile || ssl_capath) {
  ------------------
  |  Branch (3022:6): [True: 1.37k, False: 0]
  |  Branch (3022:20): [True: 0, False: 0]
  ------------------
 3023|  1.37k|#ifdef HAVE_OPENSSL3
 3024|       |    /* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
 3025|  1.37k|    if(ssl_cafile) {
  ------------------
  |  Branch (3025:8): [True: 1.37k, False: 0]
  ------------------
 3026|  1.37k|      if(!X509_STORE_load_file(store, ssl_cafile)) {
  ------------------
  |  Branch (3026:10): [True: 72, False: 1.30k]
  ------------------
 3027|     72|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3027:12): [True: 72, False: 0]
  |  Branch (3027:36): [True: 72, False: 0]
  ------------------
 3028|       |          /* Fail if we insist on successfully verifying the server. */
 3029|     72|          failf(data, "error adding trust anchors from file: %s", ssl_cafile);
  ------------------
  |  |   62|     72|#define failf Curl_failf
  ------------------
 3030|     72|          return CURLE_SSL_CACERT_BADFILE;
 3031|     72|        }
 3032|      0|        else
 3033|      0|          infof(data, "error setting certificate file, continuing anyway");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3034|     72|      }
 3035|  1.30k|      infof(data, "  CAfile: %s", ssl_cafile);
  ------------------
  |  |  143|  1.30k|  do {                               \
  |  |  144|  1.30k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.30k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.30k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.30k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.30k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.30k]
  |  |  ------------------
  ------------------
 3036|  1.30k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1058|  1.30k|#define FALSE false
  ------------------
 3037|  1.30k|    }
 3038|  1.30k|    if(ssl_capath) {
  ------------------
  |  Branch (3038:8): [True: 1.30k, False: 0]
  ------------------
 3039|  1.30k|      if(!X509_STORE_load_path(store, ssl_capath)) {
  ------------------
  |  Branch (3039:10): [True: 8, False: 1.29k]
  ------------------
 3040|      8|        if(octx->store_is_empty && !have_native_check) {
  ------------------
  |  Branch (3040:12): [True: 0, False: 8]
  |  Branch (3040:36): [True: 0, False: 0]
  ------------------
 3041|       |          /* Fail if we insist on successfully verifying the server. */
 3042|      0|          failf(data, "error adding trust anchors from path: %s", ssl_capath);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3043|      0|          return CURLE_SSL_CACERT_BADFILE;
 3044|      0|        }
 3045|      8|        else
 3046|      8|          infof(data, "error setting certificate path, continuing anyway");
  ------------------
  |  |  143|      8|  do {                               \
  |  |  144|      8|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      8|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 8, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  320|      8|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      8|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      8|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 8]
  |  |  ------------------
  ------------------
 3047|      8|      }
 3048|  1.30k|      infof(data, "  CApath: %s", ssl_capath);
  ------------------
  |  |  143|  1.30k|  do {                               \
  |  |  144|  1.30k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.30k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.30k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.30k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.30k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.30k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.30k]
  |  |  ------------------
  ------------------
 3049|  1.30k|      octx->store_is_empty = FALSE;
  ------------------
  |  | 1058|  1.30k|#define FALSE false
  ------------------
 3050|  1.30k|    }
 3051|       |#else
 3052|       |    /* tell OpenSSL where to find CA certificates that are used to verify the
 3053|       |       server's certificate. */
 3054|       |    if(!X509_STORE_load_locations(store, ssl_cafile, ssl_capath)) {
 3055|       |      if(octx->store_is_empty && !have_native_check) {
 3056|       |        /* Fail if we insist on successfully verifying the server. */
 3057|       |        failf(data, "error adding trust anchors from locations:"
 3058|       |              "  CAfile: %s CApath: %s",
 3059|       |              ssl_cafile ? ssl_cafile : "none",
 3060|       |              ssl_capath ? ssl_capath : "none");
 3061|       |        return CURLE_SSL_CACERT_BADFILE;
 3062|       |      }
 3063|       |      else {
 3064|       |        infof(data, "error setting certificate verify locations,"
 3065|       |              " continuing anyway");
 3066|       |      }
 3067|       |    }
 3068|       |    if(ssl_cafile)
 3069|       |      infof(data, "  CAfile: %s", ssl_cafile);
 3070|       |    if(ssl_capath)
 3071|       |      infof(data, "  CApath: %s", ssl_capath);
 3072|       |    octx->store_is_empty = FALSE;
 3073|       |#endif
 3074|  1.30k|  }
 3075|       |
 3076|       |#ifdef CURL_CA_FALLBACK
 3077|       |  if(octx->store_is_empty) {
 3078|       |    /* verifying the peer without any CA certificates does not
 3079|       |       work so use OpenSSL's built-in default as fallback */
 3080|       |    X509_STORE_set_default_paths(store);
 3081|       |    infof(data, "  OpenSSL default paths (fallback)");
 3082|       |    octx->store_is_empty = FALSE;
 3083|       |  }
 3084|       |#endif
 3085|  1.30k|  if(octx->store_is_empty && !have_native_check)
  ------------------
  |  Branch (3085:6): [True: 0, False: 1.30k]
  |  Branch (3085:30): [True: 0, False: 0]
  ------------------
 3086|      0|    infof(data, "  no trust anchors configured");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3087|       |
 3088|  1.30k|  return result;
 3089|  1.37k|}
openssl.c:ossl_seed:
  801|  10.2k|{
  802|       |  /* This might get called before it has been added to a multi handle */
  803|  10.2k|  if(data->multi && data->multi->ssl_seeded)
  ------------------
  |  Branch (803:6): [True: 2.52k, False: 7.76k]
  |  Branch (803:21): [True: 295, False: 2.23k]
  ------------------
  804|    295|    return CURLE_OK;
  805|       |
  806|  9.99k|  if(rand_enough()) {
  ------------------
  |  Branch (806:6): [True: 9.99k, False: 0]
  ------------------
  807|       |    /* OpenSSL 1.1.0+ should return here */
  808|  9.99k|    if(data->multi)
  ------------------
  |  Branch (808:8): [True: 2.23k, False: 7.76k]
  ------------------
  809|  2.23k|      data->multi->ssl_seeded = TRUE;
  ------------------
  |  | 1055|  2.23k|#define TRUE true
  ------------------
  810|  9.99k|    return CURLE_OK;
  811|  9.99k|  }
  812|      0|  failf(data, "Insufficient randomness");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  813|      0|  return CURLE_SSL_CONNECT_ERROR;
  814|  9.99k|}
openssl.c:rand_enough:
  796|  9.99k|{
  797|  9.99k|  return RAND_status() != 0;
  798|  9.99k|}
openssl.c:ossl_init_method:
 3613|  2.09k|{
 3614|  2.09k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 3615|       |
 3616|  2.09k|  *pmethod = NULL;
 3617|  2.09k|  *pssl_version_min = conn_config->version;
 3618|  2.09k|  DEBUGASSERT(conn_config->version != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (3618:3): [True: 0, False: 2.09k]
  |  Branch (3618:3): [True: 2.09k, False: 0]
  ------------------
 3619|  2.09k|  switch(peer->transport) {
 3620|  2.09k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  2.09k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (3620:3): [True: 2.09k, False: 0]
  ------------------
 3621|       |    /* check to see if we have been told to use an explicit SSL/TLS version */
 3622|  2.09k|    switch(*pssl_version_min) {
 3623|      4|    case CURL_SSLVERSION_TLSv1:
  ------------------
  |  | 2369|      4|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (3623:5): [True: 4, False: 2.08k]
  ------------------
 3624|      5|    case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2372|      5|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (3624:5): [True: 1, False: 2.09k]
  ------------------
 3625|     11|    case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2373|     11|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (3625:5): [True: 6, False: 2.08k]
  ------------------
 3626|  2.08k|    case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2374|  2.08k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (3626:5): [True: 2.07k, False: 19]
  ------------------
 3627|  2.09k|    case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2375|  2.09k|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (3627:5): [True: 8, False: 2.08k]
  ------------------
 3628|       |      /* it is handled later with the context options */
 3629|  2.09k|      *pmethod = TLS_client_method();
 3630|  2.09k|      break;
 3631|      0|    case CURL_SSLVERSION_SSLv2:
  ------------------
  |  | 2370|      0|#define CURL_SSLVERSION_SSLv2   2L
  ------------------
  |  Branch (3631:5): [True: 0, False: 2.09k]
  ------------------
 3632|      0|      failf(data, "No SSLv2 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3633|      0|      return CURLE_NOT_BUILT_IN;
 3634|      0|    case CURL_SSLVERSION_SSLv3:
  ------------------
  |  | 2371|      0|#define CURL_SSLVERSION_SSLv3   3L
  ------------------
  |  Branch (3634:5): [True: 0, False: 2.09k]
  ------------------
 3635|      0|      failf(data, "No SSLv3 support");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3636|      0|      return CURLE_NOT_BUILT_IN;
 3637|      0|    default:
  ------------------
  |  Branch (3637:5): [True: 0, False: 2.09k]
  ------------------
 3638|      0|      failf(data, "Unrecognized parameter passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3639|      0|      return CURLE_SSL_CONNECT_ERROR;
 3640|  2.09k|    }
 3641|  2.09k|    break;
 3642|  2.09k|  case TRNSPRT_QUIC:
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (3642:3): [True: 0, False: 2.09k]
  ------------------
 3643|      0|    *pssl_version_min = CURL_SSLVERSION_TLSv1_3;
  ------------------
  |  | 2375|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
 3644|      0|    if(conn_config->version_max &&
  ------------------
  |  Branch (3644:8): [True: 0, False: 0]
  ------------------
 3645|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_DEFAULT) &&
  ------------------
  |  | 2380|      0|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|      0|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (3645:8): [True: 0, False: 0]
  ------------------
 3646|      0|       (conn_config->version_max != CURL_SSLVERSION_MAX_TLSv1_3)) {
  ------------------
  |  | 2384|      0|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2375|      0|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (3646:8): [True: 0, False: 0]
  ------------------
 3647|      0|      failf(data, "QUIC needs at least TLS version 1.3");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3648|      0|      return CURLE_SSL_CONNECT_ERROR;
 3649|      0|    }
 3650|       |
 3651|      0|    *pmethod = TLS_method();
 3652|      0|    break;
 3653|      0|  default:
  ------------------
  |  Branch (3653:3): [True: 0, False: 2.09k]
  ------------------
 3654|      0|    failf(data, "unsupported transport %d in SSL init", peer->transport);
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3655|      0|    return CURLE_SSL_CONNECT_ERROR;
 3656|  2.09k|  }
 3657|       |
 3658|  2.09k|  return *pmethod ? CURLE_OK : CURLE_SSL_CONNECT_ERROR;
  ------------------
  |  Branch (3658:10): [True: 2.09k, False: 0]
  ------------------
 3659|  2.09k|}
openssl.c:ossl_strerror:
  749|  1.42k|{
  750|  1.42k|  size_t len;
  751|  1.42k|  DEBUGASSERT(size);
  ------------------
  |  | 1081|  1.42k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (751:3): [True: 0, False: 1.42k]
  |  Branch (751:3): [True: 1.42k, False: 0]
  ------------------
  752|  1.42k|  *buf = '\0';
  753|       |
  754|  1.42k|  len = Curl_ossl_version(buf, size);
  755|  1.42k|  DEBUGASSERT(len < (size - 2));
  ------------------
  |  | 1081|  1.42k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (755:3): [True: 0, False: 1.42k]
  |  Branch (755:3): [True: 1.42k, False: 0]
  ------------------
  756|  1.42k|  if(len < (size - 2)) {
  ------------------
  |  Branch (756:6): [True: 1.42k, False: 0]
  ------------------
  757|  1.42k|    buf += len;
  758|  1.42k|    size -= (len + 2);
  759|  1.42k|    *buf++ = ':';
  760|  1.42k|    *buf++ = ' ';
  761|  1.42k|    *buf = '\0';
  762|  1.42k|  }
  763|       |
  764|       |#ifdef HAVE_BORINGSSL_LIKE
  765|       |  ERR_error_string_n((uint32_t)error, buf, size);
  766|       |#else
  767|  1.42k|  ERR_error_string_n(error, buf, size);
  768|  1.42k|#endif
  769|       |
  770|  1.42k|  if(!*buf) {
  ------------------
  |  Branch (770:6): [True: 0, False: 1.42k]
  ------------------
  771|      0|    const char *msg = error ? "Unknown error" : "No error";
  ------------------
  |  Branch (771:23): [True: 0, False: 0]
  ------------------
  772|      0|    curlx_strcopy(buf, size, msg, strlen(msg));
  773|      0|  }
  774|       |
  775|  1.42k|  return buf;
  776|  1.42k|}
openssl.c:ossl_set_ssl_version_min_max:
 2567|  2.06k|{
 2568|  2.06k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
 2569|       |  /* first, TLS min version... */
 2570|  2.06k|  long curl_ssl_version_min = (long)ssl_version_min;
 2571|  2.06k|  long curl_ssl_version_max;
 2572|       |
 2573|       |  /* convert curl min SSL version option to OpenSSL constant */
 2574|       |#if defined(HAVE_BORINGSSL_LIKE) || defined(LIBRESSL_VERSION_NUMBER)
 2575|       |  uint16_t ossl_ssl_version_min = 0;
 2576|       |  uint16_t ossl_ssl_version_max = 0;
 2577|       |#else
 2578|  2.06k|  long ossl_ssl_version_min = 0;
 2579|  2.06k|  long ossl_ssl_version_max = 0;
 2580|  2.06k|#endif
 2581|       |  /* it cannot be default here */
 2582|  2.06k|  DEBUGASSERT(curl_ssl_version_min != CURL_SSLVERSION_DEFAULT);
  ------------------
  |  | 1081|  2.06k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (2582:3): [True: 0, False: 2.06k]
  |  Branch (2582:3): [True: 2.06k, False: 0]
  ------------------
 2583|  2.06k|  switch(curl_ssl_version_min) {
  ------------------
  |  Branch (2583:10): [True: 2.06k, False: 0]
  ------------------
 2584|      4|  case CURL_SSLVERSION_TLSv1: /* TLS 1.x */
  ------------------
  |  | 2369|      4|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  ------------------
  |  Branch (2584:3): [True: 4, False: 2.06k]
  ------------------
 2585|      5|  case CURL_SSLVERSION_TLSv1_0:
  ------------------
  |  | 2372|      5|#define CURL_SSLVERSION_TLSv1_0 4L
  ------------------
  |  Branch (2585:3): [True: 1, False: 2.06k]
  ------------------
 2586|      5|    ossl_ssl_version_min = TLS1_VERSION;
 2587|      5|    break;
 2588|      6|  case CURL_SSLVERSION_TLSv1_1:
  ------------------
  |  | 2373|      6|#define CURL_SSLVERSION_TLSv1_1 5L
  ------------------
  |  Branch (2588:3): [True: 6, False: 2.05k]
  ------------------
 2589|      6|    ossl_ssl_version_min = TLS1_1_VERSION;
 2590|      6|    break;
 2591|  2.04k|  case CURL_SSLVERSION_TLSv1_2:
  ------------------
  |  | 2374|  2.04k|#define CURL_SSLVERSION_TLSv1_2 6L
  ------------------
  |  Branch (2591:3): [True: 2.04k, False: 19]
  ------------------
 2592|  2.04k|    ossl_ssl_version_min = TLS1_2_VERSION;
 2593|  2.04k|    break;
 2594|      8|  case CURL_SSLVERSION_TLSv1_3:
  ------------------
  |  | 2375|      8|#define CURL_SSLVERSION_TLSv1_3 7L
  ------------------
  |  Branch (2594:3): [True: 8, False: 2.05k]
  ------------------
 2595|      8|    ossl_ssl_version_min = TLS1_3_VERSION;
 2596|      8|    break;
 2597|  2.06k|  }
 2598|       |
 2599|       |  /* ... then, TLS max version */
 2600|  2.06k|  curl_ssl_version_max = (long)conn_config->version_max;
 2601|       |
 2602|       |  /* convert curl max SSL version option to OpenSSL constant */
 2603|  2.06k|  switch(curl_ssl_version_max) {
 2604|      3|  case CURL_SSLVERSION_MAX_TLSv1_0:
  ------------------
  |  | 2381|      3|#define CURL_SSLVERSION_MAX_TLSv1_0 (CURL_SSLVERSION_TLSv1_0 << 16)
  |  |  ------------------
  |  |  |  | 2372|      3|#define CURL_SSLVERSION_TLSv1_0 4L
  |  |  ------------------
  ------------------
  |  Branch (2604:3): [True: 3, False: 2.06k]
  ------------------
 2605|      3|    ossl_ssl_version_max = TLS1_VERSION;
 2606|      3|    break;
 2607|      2|  case CURL_SSLVERSION_MAX_TLSv1_1:
  ------------------
  |  | 2382|      2|#define CURL_SSLVERSION_MAX_TLSv1_1 (CURL_SSLVERSION_TLSv1_1 << 16)
  |  |  ------------------
  |  |  |  | 2373|      2|#define CURL_SSLVERSION_TLSv1_1 5L
  |  |  ------------------
  ------------------
  |  Branch (2607:3): [True: 2, False: 2.06k]
  ------------------
 2608|      2|    ossl_ssl_version_max = TLS1_1_VERSION;
 2609|      2|    break;
 2610|      7|  case CURL_SSLVERSION_MAX_TLSv1_2:
  ------------------
  |  | 2383|      7|#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
  |  |  ------------------
  |  |  |  | 2374|      7|#define CURL_SSLVERSION_TLSv1_2 6L
  |  |  ------------------
  ------------------
  |  Branch (2610:3): [True: 7, False: 2.05k]
  ------------------
 2611|      7|    ossl_ssl_version_max = TLS1_2_VERSION;
 2612|      7|    break;
 2613|      4|  case CURL_SSLVERSION_MAX_TLSv1_3:
  ------------------
  |  | 2384|      4|#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
  |  |  ------------------
  |  |  |  | 2375|      4|#define CURL_SSLVERSION_TLSv1_3 7L
  |  |  ------------------
  ------------------
  |  Branch (2613:3): [True: 4, False: 2.06k]
  ------------------
 2614|      4|    ossl_ssl_version_max = TLS1_3_VERSION;
 2615|      4|    break;
 2616|  2.04k|  case CURL_SSLVERSION_MAX_NONE:  /* none selected */
  ------------------
  |  | 2379|  2.04k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (2616:3): [True: 2.04k, False: 19]
  ------------------
 2617|  2.04k|  case CURL_SSLVERSION_MAX_DEFAULT:  /* max selected */
  ------------------
  |  | 2380|  2.04k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|  2.04k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (2617:3): [True: 1, False: 2.06k]
  ------------------
 2618|  2.04k|  default:
  ------------------
  |  Branch (2618:3): [True: 2, False: 2.06k]
  ------------------
 2619|       |    /* SSL_CTX_set_max_proto_version states that: setting the maximum to 0
 2620|       |       enables protocol versions up to the highest version supported by
 2621|       |       the library */
 2622|  2.04k|    ossl_ssl_version_max = 0;
 2623|  2.04k|    break;
 2624|  2.06k|  }
 2625|       |
 2626|  2.06k|  if(!SSL_CTX_set_min_proto_version(ctx, ossl_ssl_version_min) ||
  ------------------
  |  Branch (2626:6): [True: 0, False: 2.06k]
  ------------------
 2627|  2.06k|     !SSL_CTX_set_max_proto_version(ctx, ossl_ssl_version_max))
  ------------------
  |  Branch (2627:6): [True: 0, False: 2.06k]
  ------------------
 2628|      0|    return CURLE_SSL_CONNECT_ERROR;
 2629|       |
 2630|  2.06k|  return CURLE_OK;
 2631|  2.06k|}
openssl.c:client_cert:
 1431|     58|{
 1432|     58|  char error_buffer[256];
 1433|     58|  bool check_privkey = TRUE;
  ------------------
  |  | 1055|     58|#define TRUE true
  ------------------
 1434|     58|  int file_type = ossl_do_file_type(cert_type);
 1435|       |
 1436|     58|  if(cert_file || cert_blob || (file_type == SSL_FILETYPE_ENGINE) ||
  ------------------
  |  |  817|     45|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1436:6): [True: 13, False: 45]
  |  Branch (1436:19): [True: 0, False: 45]
  |  Branch (1436:32): [True: 0, False: 45]
  ------------------
 1437|     45|     (file_type == SSL_FILETYPE_PROVIDER)) {
  ------------------
  |  |  823|     45|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1437:6): [True: 0, False: 45]
  ------------------
 1438|     13|    SSL *ssl;
 1439|     13|    X509 *x509;
 1440|     13|    bool pcks12_done = FALSE;
  ------------------
  |  | 1058|     13|#define FALSE false
  ------------------
 1441|     13|    int cert_use_result;
 1442|       |
 1443|     13|    if(key_passwd) {
  ------------------
  |  Branch (1443:8): [True: 1, False: 12]
  ------------------
 1444|       |      /* set the password in the callback userdata */
 1445|      1|      SSL_CTX_set_default_passwd_cb_userdata(ctx, key_passwd);
 1446|       |      /* Set passwd callback: */
 1447|      1|      SSL_CTX_set_default_passwd_cb(ctx, passwd_callback);
 1448|      1|    }
 1449|       |
 1450|     13|    switch(file_type) {
 1451|     12|    case SSL_FILETYPE_PEM:
  ------------------
  |  Branch (1451:5): [True: 12, False: 1]
  ------------------
 1452|       |      /* SSL_CTX_use_certificate_chain_file() only works on PEM files */
 1453|     12|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1453:25): [True: 0, False: 12]
  ------------------
 1454|      0|        use_certificate_chain_blob(ctx, cert_blob, key_passwd) :
 1455|     12|        SSL_CTX_use_certificate_chain_file(ctx, cert_file);
 1456|     12|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1456:10): [True: 12, False: 0]
  ------------------
 1457|     12|        failf(data,
  ------------------
  |  |   62|     12|#define failf Curl_failf
  ------------------
 1458|     12|              "could not load PEM client certificate from %s, " OSSL_PACKAGE
 1459|     12|              " error %s, "
 1460|     12|              "(no key found, wrong passphrase, or wrong file format?)",
 1461|     12|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1461:16): [True: 0, False: 12]
  ------------------
 1462|     12|              ossl_strerror(ERR_get_error(), error_buffer,
 1463|     12|                            sizeof(error_buffer)));
 1464|     12|        return CURLE_SSL_CERTPROBLEM;
 1465|     12|      }
 1466|      0|      break;
 1467|       |
 1468|      0|    case SSL_FILETYPE_ASN1:
  ------------------
  |  Branch (1468:5): [True: 0, False: 13]
  ------------------
 1469|       |      /* SSL_CTX_use_certificate_file() works with either PEM or ASN1, but
 1470|       |         we use the case above for PEM so this can only be performed with
 1471|       |         ASN1 files. */
 1472|       |
 1473|      0|      cert_use_result = cert_blob ?
  ------------------
  |  Branch (1473:25): [True: 0, False: 0]
  ------------------
 1474|      0|        use_certificate_blob(ctx, cert_blob, file_type, key_passwd) :
 1475|      0|      SSL_CTX_use_certificate_file(ctx, cert_file, file_type);
 1476|      0|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1476:10): [True: 0, False: 0]
  ------------------
 1477|      0|        failf(data,
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1478|      0|              "could not load ASN1 client certificate from %s, " OSSL_PACKAGE
 1479|      0|              " error %s, "
 1480|      0|              "(no key found, wrong passphrase, or wrong file format?)",
 1481|      0|              (cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
  ------------------
  |  Branch (1481:16): [True: 0, False: 0]
  ------------------
 1482|      0|              ossl_strerror(ERR_get_error(), error_buffer,
 1483|      0|                            sizeof(error_buffer)));
 1484|      0|        return CURLE_SSL_CERTPROBLEM;
 1485|      0|      }
 1486|      0|      break;
 1487|       |
 1488|      0|    case SSL_FILETYPE_ENGINE:
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1488:5): [True: 0, False: 13]
  ------------------
 1489|      0|      if(!cert_file || !engineload(data, ctx, cert_file))
  ------------------
  |  Branch (1489:10): [True: 0, False: 0]
  |  Branch (1489:24): [True: 0, False: 0]
  ------------------
 1490|      0|        return CURLE_SSL_CERTPROBLEM;
 1491|      0|      break;
 1492|       |
 1493|      0|    case SSL_FILETYPE_PROVIDER:
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1493:5): [True: 0, False: 13]
  ------------------
 1494|      0|      if(!cert_file || !providerload(data, ctx, cert_file))
  ------------------
  |  Branch (1494:10): [True: 0, False: 0]
  |  Branch (1494:24): [True: 0, False: 0]
  ------------------
 1495|      0|        return CURLE_SSL_CERTPROBLEM;
 1496|      0|      break;
 1497|       |
 1498|      0|    case SSL_FILETYPE_PKCS12:
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  |  Branch (1498:5): [True: 0, False: 13]
  ------------------
 1499|      0|      if(!pkcs12load(data, ctx, cert_blob, cert_file, key_passwd))
  ------------------
  |  Branch (1499:10): [True: 0, False: 0]
  ------------------
 1500|      0|        return CURLE_SSL_CERTPROBLEM;
 1501|      0|      pcks12_done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1502|      0|      break;
 1503|       |
 1504|      1|    default:
  ------------------
  |  Branch (1504:5): [True: 1, False: 12]
  ------------------
 1505|      1|      failf(data, "not supported file type '%s' for certificate", cert_type);
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 1506|      1|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1507|     13|    }
 1508|       |
 1509|      0|    if(!key_file && !key_blob) {
  ------------------
  |  Branch (1509:8): [True: 0, False: 0]
  |  Branch (1509:21): [True: 0, False: 0]
  ------------------
 1510|      0|      key_file = cert_file;
 1511|      0|      key_blob = cert_blob;
 1512|      0|    }
 1513|      0|    else
 1514|      0|      file_type = ossl_do_file_type(key_type);
 1515|       |
 1516|      0|    switch(file_type) {
 1517|      0|    case SSL_FILETYPE_PEM:
  ------------------
  |  Branch (1517:5): [True: 0, False: 0]
  ------------------
 1518|      0|    case SSL_FILETYPE_ASN1:
  ------------------
  |  Branch (1518:5): [True: 0, False: 0]
  ------------------
 1519|      0|      cert_use_result = key_blob ?
  ------------------
  |  Branch (1519:25): [True: 0, False: 0]
  ------------------
 1520|      0|        use_privatekey_blob(ctx, key_blob, file_type, key_passwd) :
 1521|      0|      SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type);
 1522|      0|      if(cert_use_result != 1) {
  ------------------
  |  Branch (1522:10): [True: 0, False: 0]
  ------------------
 1523|      0|        failf(data, "unable to set private key file: '%s' type %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1524|      0|              key_file ? key_file : "(memory blob)",
  ------------------
  |  Branch (1524:15): [True: 0, False: 0]
  ------------------
 1525|      0|              key_type ? key_type : "PEM");
  ------------------
  |  Branch (1525:15): [True: 0, False: 0]
  ------------------
 1526|      0|        return CURLE_BAD_FUNCTION_ARGUMENT;
 1527|      0|      }
 1528|      0|      break;
 1529|      0|    case SSL_FILETYPE_ENGINE:
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  |  Branch (1529:5): [True: 0, False: 0]
  ------------------
 1530|      0|      if(!enginecheck(data, ctx, key_file, key_passwd))
  ------------------
  |  Branch (1530:10): [True: 0, False: 0]
  ------------------
 1531|      0|        return CURLE_SSL_CERTPROBLEM;
 1532|      0|      break;
 1533|       |
 1534|      0|    case SSL_FILETYPE_PROVIDER:
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  |  Branch (1534:5): [True: 0, False: 0]
  ------------------
 1535|      0|      if(!providercheck(data, ctx, key_file))
  ------------------
  |  Branch (1535:10): [True: 0, False: 0]
  ------------------
 1536|      0|        return CURLE_SSL_CERTPROBLEM;
 1537|      0|      break;
 1538|       |
 1539|      0|    case SSL_FILETYPE_PKCS12:
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  |  Branch (1539:5): [True: 0, False: 0]
  ------------------
 1540|      0|      if(!pcks12_done) {
  ------------------
  |  Branch (1540:10): [True: 0, False: 0]
  ------------------
 1541|      0|        failf(data, "file type P12 for private key not supported");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1542|      0|        return CURLE_SSL_CERTPROBLEM;
 1543|      0|      }
 1544|      0|      break;
 1545|      0|    default:
  ------------------
  |  Branch (1545:5): [True: 0, False: 0]
  ------------------
 1546|      0|      failf(data, "not supported file type for private key");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1547|      0|      return CURLE_BAD_FUNCTION_ARGUMENT;
 1548|      0|    }
 1549|       |
 1550|      0|    ssl = SSL_new(ctx);
 1551|      0|    if(!ssl) {
  ------------------
  |  Branch (1551:8): [True: 0, False: 0]
  ------------------
 1552|      0|      failf(data, "unable to create an SSL structure");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1553|      0|      return CURLE_OUT_OF_MEMORY;
 1554|      0|    }
 1555|       |
 1556|      0|    x509 = SSL_get_certificate(ssl);
 1557|       |
 1558|      0|    if(x509) {
  ------------------
  |  Branch (1558:8): [True: 0, False: 0]
  ------------------
 1559|      0|      EVP_PKEY *pktmp = X509_get_pubkey(x509);
 1560|      0|      EVP_PKEY_copy_parameters(pktmp, SSL_get_privatekey(ssl));
 1561|      0|      EVP_PKEY_free(pktmp);
 1562|      0|    }
 1563|       |
 1564|      0|#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
 1565|      0|    {
 1566|       |      /* If RSA is used, do not check the private key if its flags indicate
 1567|       |       * it does not support it. */
 1568|      0|      EVP_PKEY *priv_key = SSL_get_privatekey(ssl);
 1569|      0|      if(EVP_PKEY_id(priv_key) == EVP_PKEY_RSA) {
  ------------------
  |  Branch (1569:10): [True: 0, False: 0]
  ------------------
 1570|      0|        RSA *rsa = EVP_PKEY_get1_RSA(priv_key);
 1571|      0|        if(RSA_flags(rsa) & RSA_METHOD_FLAG_NO_CHECK)
  ------------------
  |  Branch (1571:12): [True: 0, False: 0]
  ------------------
 1572|      0|          check_privkey = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1573|      0|        RSA_free(rsa); /* Decrement reference count */
 1574|      0|      }
 1575|      0|    }
 1576|      0|#endif
 1577|       |
 1578|      0|    SSL_free(ssl);
 1579|       |
 1580|       |    /* If we are using DSA, we can copy the parameters from
 1581|       |     * the private key */
 1582|       |
 1583|      0|    if(check_privkey == TRUE) {
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
  |  Branch (1583:8): [True: 0, False: 0]
  ------------------
 1584|       |      /* Now we know that a key and cert have been set against
 1585|       |       * the SSL context */
 1586|      0|      if(!SSL_CTX_check_private_key(ctx)) {
  ------------------
  |  Branch (1586:10): [True: 0, False: 0]
  ------------------
 1587|      0|        failf(data, "Private key does not match the certificate public key");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1588|      0|        return CURLE_SSL_CERTPROBLEM;
 1589|      0|      }
 1590|      0|    }
 1591|      0|  }
 1592|     45|  return CURLE_OK;
 1593|     58|}
openssl.c:ossl_do_file_type:
  826|     58|{
  827|     58|  if(!type || !type[0])
  ------------------
  |  Branch (827:6): [True: 12, False: 46]
  |  Branch (827:15): [True: 1, False: 45]
  ------------------
  828|     13|    return SSL_FILETYPE_PEM;
  829|     45|  if(curl_strequal(type, "PEM"))
  ------------------
  |  Branch (829:6): [True: 0, False: 45]
  ------------------
  830|      0|    return SSL_FILETYPE_PEM;
  831|     45|  if(curl_strequal(type, "DER"))
  ------------------
  |  Branch (831:6): [True: 0, False: 45]
  ------------------
  832|      0|    return SSL_FILETYPE_ASN1;
  833|     45|  if(curl_strequal(type, "PROV"))
  ------------------
  |  Branch (833:6): [True: 0, False: 45]
  ------------------
  834|      0|    return SSL_FILETYPE_PROVIDER;
  ------------------
  |  |  823|      0|#define SSL_FILETYPE_PROVIDER 44
  ------------------
  835|     45|  if(curl_strequal(type, "ENG"))
  ------------------
  |  Branch (835:6): [True: 0, False: 45]
  ------------------
  836|      0|    return SSL_FILETYPE_ENGINE;
  ------------------
  |  |  817|      0|#define SSL_FILETYPE_ENGINE 42
  ------------------
  837|     45|  if(curl_strequal(type, "P12"))
  ------------------
  |  Branch (837:6): [True: 0, False: 45]
  ------------------
  838|      0|    return SSL_FILETYPE_PKCS12;
  ------------------
  |  |  820|      0|#define SSL_FILETYPE_PKCS12 43
  ------------------
  839|     45|  return -1;
  840|     45|}
openssl.c:ossl_set_provider:
 1768|    724|{
 1769|    724|  char name[MAX_PROVIDER_LEN + 1];
 1770|    724|  struct Curl_str prov;
 1771|    724|  const char *propq = NULL;
 1772|       |
 1773|    724|  if(!iname) {
  ------------------
  |  Branch (1773:6): [True: 0, False: 724]
  ------------------
 1774|       |    /* clear and cleanup provider use */
 1775|      0|    ossl_provider_cleanup(data);
 1776|      0|    return CURLE_OK;
 1777|      0|  }
 1778|    724|  if(curlx_str_until(&iname, &prov, MAX_PROVIDER_LEN, ':'))
  ------------------
  |  | 1757|    724|#define MAX_PROVIDER_LEN 128 /* reasonable */
  ------------------
  |  Branch (1778:6): [True: 30, False: 694]
  ------------------
 1779|     30|    return CURLE_BAD_FUNCTION_ARGUMENT;
 1780|       |
 1781|    694|  if(!curlx_str_single(&iname, ':'))
  ------------------
  |  Branch (1781:6): [True: 556, False: 138]
  ------------------
 1782|       |    /* there was a colon, get the propq until the end of string */
 1783|    556|    propq = iname;
 1784|       |
 1785|       |  /* we need the name in a buffer, null-terminated */
 1786|    694|  memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   49|    694|#define curlx_str(x)    ((x)->str)
  ------------------
                memcpy(name, curlx_str(&prov), curlx_strlen(&prov));
  ------------------
  |  |   50|    694|#define curlx_strlen(x) ((x)->len)
  ------------------
 1787|    694|  name[curlx_strlen(&prov)] = 0;
  ------------------
  |  |   50|    694|#define curlx_strlen(x) ((x)->len)
  ------------------
 1788|       |
 1789|    694|  if(!data->state.libctx) {
  ------------------
  |  Branch (1789:6): [True: 694, False: 0]
  ------------------
 1790|    694|    OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
 1791|    694|    if(!libctx)
  ------------------
  |  Branch (1791:8): [True: 0, False: 694]
  ------------------
 1792|      0|      return CURLE_OUT_OF_MEMORY;
 1793|    694|    if(propq) {
  ------------------
  |  Branch (1793:8): [True: 556, False: 138]
  ------------------
 1794|    556|      data->state.propq = curlx_strdup(propq);
  ------------------
  |  | 1477|    556|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
 1795|    556|      if(!data->state.propq) {
  ------------------
  |  Branch (1795:10): [True: 0, False: 556]
  ------------------
 1796|      0|        OSSL_LIB_CTX_free(libctx);
 1797|      0|        return CURLE_OUT_OF_MEMORY;
 1798|      0|      }
 1799|    556|    }
 1800|    694|    data->state.libctx = libctx;
 1801|    694|  }
 1802|       |
 1803|    694|#ifndef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1804|       |  /* load the configuration file into the library context before checking the
 1805|       |   * provider availability */
 1806|    694|  if(!OSSL_LIB_CTX_load_config(data->state.libctx, NULL)) {
  ------------------
  |  Branch (1806:6): [True: 694, False: 0]
  ------------------
 1807|    694|    infof(data, "Failed to load default openssl config. Proceeding.");
  ------------------
  |  |  143|    694|  do {                               \
  |  |  144|    694|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|    694|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 694, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 694]
  |  |  |  |  ------------------
  |  |  |  |  320|    694|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|    694|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|    694|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 694]
  |  |  ------------------
  ------------------
 1808|    694|  }
 1809|    694|#endif
 1810|       |
 1811|    694|  if(OSSL_PROVIDER_available(data->state.libctx, name)) {
  ------------------
  |  Branch (1811:6): [True: 476, False: 218]
  ------------------
 1812|       |    /* already loaded through the configuration - no action needed */
 1813|    476|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1055|    476|#define TRUE true
  ------------------
 1814|    476|    return CURLE_OK;
 1815|    476|  }
 1816|       |
 1817|    218|  data->state.provider = OSSL_PROVIDER_try_load(data->state.libctx, name, 1);
 1818|    218|  if(!data->state.provider) {
  ------------------
  |  Branch (1818:6): [True: 155, False: 63]
  ------------------
 1819|    155|    char error_buffer[256];
 1820|    155|    failf(data, "Failed to initialize provider: %s",
  ------------------
  |  |   62|    155|#define failf Curl_failf
  ------------------
 1821|    155|          ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer)));
 1822|    155|    ossl_provider_cleanup(data);
 1823|    155|    return CURLE_SSL_ENGINE_NOTFOUND;
 1824|    155|  }
 1825|       |
 1826|       |  /* load the base provider as well */
 1827|     63|  data->state.baseprov = OSSL_PROVIDER_try_load(data->state.libctx, "base", 1);
 1828|     63|  if(!data->state.baseprov) {
  ------------------
  |  Branch (1828:6): [True: 0, False: 63]
  ------------------
 1829|      0|    ossl_provider_cleanup(data);
 1830|      0|    failf(data, "Failed to load base");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1831|      0|    return CURLE_SSL_ENGINE_NOTFOUND;
 1832|      0|  }
 1833|     63|  else
 1834|     63|    data->state.provider_loaded = TRUE;
  ------------------
  |  | 1055|     63|#define TRUE true
  ------------------
 1835|     63|  return CURLE_OK;
 1836|     63|}
openssl.c:ossl_provider_cleanup:
 1742|  33.3k|{
 1743|  33.3k|  if(data->state.baseprov) {
  ------------------
  |  Branch (1743:6): [True: 63, False: 33.3k]
  ------------------
 1744|     63|    OSSL_PROVIDER_unload(data->state.baseprov);
 1745|     63|    data->state.baseprov = NULL;
 1746|     63|  }
 1747|  33.3k|  if(data->state.provider) {
  ------------------
  |  Branch (1747:6): [True: 63, False: 33.3k]
  ------------------
 1748|     63|    OSSL_PROVIDER_unload(data->state.provider);
 1749|     63|    data->state.provider = NULL;
 1750|     63|  }
 1751|  33.3k|  OSSL_LIB_CTX_free(data->state.libctx);
 1752|  33.3k|  data->state.libctx = NULL;
 1753|  33.3k|  curlx_safefree(data->state.propq);
  ------------------
  |  | 1327|  33.3k|  do {                      \
  |  | 1328|  33.3k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  33.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  33.3k|    (ptr) = NULL;           \
  |  | 1330|  33.3k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 33.3k]
  |  |  ------------------
  ------------------
 1754|       |  data->state.provider_loaded = FALSE;
  ------------------
  |  | 1058|  33.3k|#define FALSE false
  ------------------
 1755|  33.3k|}
openssl.c:ossl_init_ssl:
 3570|  1.31k|{
 3571|       |  /* Let's make an SSL structure */
 3572|  1.31k|  if(octx->ssl)
  ------------------
  |  Branch (3572:6): [True: 0, False: 1.31k]
  ------------------
 3573|      0|    SSL_free(octx->ssl);
 3574|  1.31k|  octx->ssl = SSL_new(octx->ssl_ctx);
 3575|  1.31k|  if(!octx->ssl) {
  ------------------
  |  Branch (3575:6): [True: 0, False: 1.31k]
  ------------------
 3576|      0|    failf(data, "SSL: could not create a context (handle)");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3577|      0|    return CURLE_OUT_OF_MEMORY;
 3578|      0|  }
 3579|       |
 3580|  1.31k|  SSL_set_app_data(octx->ssl, ssl_user_data);
 3581|       |
 3582|  1.31k|#ifndef OPENSSL_NO_OCSP
 3583|  1.31k|  if(Curl_ssl_cf_get_primary_config(cf)->verifystatus)
  ------------------
  |  Branch (3583:6): [True: 0, False: 1.31k]
  ------------------
 3584|  1.31k|    SSL_set_tlsext_status_type(octx->ssl, TLSEXT_STATUSTYPE_ocsp);
 3585|  1.31k|#endif
 3586|       |
 3587|  1.31k|  SSL_set_connect_state(octx->ssl);
 3588|       |
 3589|  1.31k|  if(peer->sni) {
  ------------------
  |  Branch (3589:6): [True: 28, False: 1.28k]
  ------------------
 3590|     28|    if(!SSL_set_tlsext_host_name(octx->ssl, peer->sni)) {
  ------------------
  |  Branch (3590:8): [True: 0, False: 28]
  ------------------
 3591|      0|      failf(data, "Failed set SNI");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3592|      0|      return CURLE_SSL_CONNECT_ERROR;
 3593|      0|    }
 3594|     28|  }
 3595|       |
 3596|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 3597|       |  {
 3598|       |    CURLcode result = ossl_init_ech(octx, cf, data, peer);
 3599|       |    if(result)
 3600|       |      return result;
 3601|       |  }
 3602|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST */
 3603|       |
 3604|  1.31k|  return ossl_init_session_and_alpns(octx, cf, data, peer,
 3605|  1.31k|                                     alpns_requested, sess_reuse_cb);
 3606|  1.31k|}
openssl.c:ossl_init_session_and_alpns:
 3334|  1.31k|{
 3335|  1.31k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 3336|  1.31k|  struct ssl_primary_config *conn_cfg = Curl_ssl_cf_get_primary_config(cf);
 3337|  1.31k|  struct alpn_spec alpns;
 3338|  1.31k|  CURLcode result;
 3339|       |
 3340|  1.31k|  Curl_alpn_copy(&alpns, alpns_requested);
 3341|       |
 3342|  1.31k|  octx->reused_session = FALSE;
  ------------------
  |  | 1058|  1.31k|#define FALSE false
  ------------------
 3343|  1.31k|  if(Curl_ssl_scache_use(cf, data) && !conn_cfg->verifystatus) {
  ------------------
  |  Branch (3343:6): [True: 1.31k, False: 1]
  |  Branch (3343:39): [True: 1.31k, False: 0]
  ------------------
 3344|  1.31k|    struct Curl_ssl_session *scs = NULL;
 3345|       |
 3346|  1.31k|    result = Curl_ssl_scache_take(cf, data, peer->scache_key, &scs);
 3347|  1.31k|    if(!result && scs && scs->sdata && scs->sdata_len) {
  ------------------
  |  Branch (3347:8): [True: 1.31k, False: 0]
  |  Branch (3347:19): [True: 0, False: 1.31k]
  |  Branch (3347:26): [True: 0, False: 0]
  |  Branch (3347:40): [True: 0, False: 0]
  ------------------
 3348|      0|      const unsigned char *der_sessionid = scs->sdata;
 3349|      0|      size_t der_sessionid_size = scs->sdata_len;
 3350|      0|      SSL_SESSION *ssl_session = NULL;
 3351|       |
 3352|       |      /* If OpenSSL does not accept the session from the cache, this
 3353|       |       * is not an error. We continue without it. */
 3354|      0|      ssl_session = d2i_SSL_SESSION(NULL, &der_sessionid,
 3355|      0|                                    (long)der_sessionid_size);
 3356|      0|      if(ssl_session) {
  ------------------
  |  Branch (3356:10): [True: 0, False: 0]
  ------------------
 3357|      0|        if(!SSL_set_session(octx->ssl, ssl_session)) {
  ------------------
  |  Branch (3357:12): [True: 0, False: 0]
  ------------------
 3358|      0|          VERBOSE(char error_buffer[256]);
  ------------------
  |  | 1618|      0|#define VERBOSE(x) x
  ------------------
 3359|      0|          infof(data, "SSL: SSL_set_session not accepted, "
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3360|      0|                "continuing without: %s",
 3361|      0|                ossl_strerror(ERR_get_error(), error_buffer,
 3362|      0|                              sizeof(error_buffer)));
 3363|      0|        }
 3364|      0|        else {
 3365|      0|          if(conn_cfg->verifypeer &&
  ------------------
  |  Branch (3365:14): [True: 0, False: 0]
  ------------------
 3366|      0|             (SSL_get_verify_result(octx->ssl) != X509_V_OK)) {
  ------------------
  |  Branch (3366:14): [True: 0, False: 0]
  ------------------
 3367|       |            /* Session was from unverified connection, cannot reuse here */
 3368|      0|            SSL_set_session(octx->ssl, NULL);
 3369|      0|            infof(data, "SSL session not peer verified, not reusing");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3370|      0|          }
 3371|      0|          else {
 3372|      0|            infof(data, "SSL reusing session with ALPN '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  ------------------
  |  |  |  Branch (145:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3373|      0|                  scs->alpn ? scs->alpn : "-");
 3374|      0|            octx->reused_session = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 3375|      0|            infof(data, "SSL verify result: %lx",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3376|      0|                  SSL_get_verify_result(octx->ssl));
 3377|      0|#ifdef HAVE_OPENSSL_EARLYDATA
 3378|      0|            if(ssl_config->earlydata && scs->alpn &&
  ------------------
  |  Branch (3378:16): [True: 0, False: 0]
  |  Branch (3378:41): [True: 0, False: 0]
  ------------------
 3379|      0|               SSL_SESSION_get_max_early_data(ssl_session) &&
  ------------------
  |  Branch (3379:16): [True: 0, False: 0]
  ------------------
 3380|      0|               !cf->conn->bits.connect_only &&
  ------------------
  |  Branch (3380:16): [True: 0, False: 0]
  ------------------
 3381|      0|               (SSL_version(octx->ssl) == TLS1_3_VERSION)) {
  ------------------
  |  Branch (3381:16): [True: 0, False: 0]
  ------------------
 3382|      0|              bool do_early_data = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 3383|      0|              if(sess_reuse_cb) {
  ------------------
  |  Branch (3383:18): [True: 0, False: 0]
  ------------------
 3384|      0|                result = sess_reuse_cb(cf, data, &alpns, scs, &do_early_data);
 3385|      0|                if(result) {
  ------------------
  |  Branch (3385:20): [True: 0, False: 0]
  ------------------
 3386|      0|                  SSL_SESSION_free(ssl_session);
 3387|      0|                  return result;
 3388|      0|                }
 3389|      0|              }
 3390|      0|              if(do_early_data) {
  ------------------
  |  Branch (3390:18): [True: 0, False: 0]
  ------------------
 3391|       |                /* We only try the ALPN protocol the session used before,
 3392|       |                 * otherwise we might send early data for the wrong protocol */
 3393|      0|                Curl_alpn_restrict_to(&alpns, scs->alpn);
 3394|      0|              }
 3395|      0|            }
 3396|       |#else
 3397|       |            (void)ssl_config;
 3398|       |            (void)sess_reuse_cb;
 3399|       |#endif
 3400|      0|          }
 3401|      0|        }
 3402|      0|        SSL_SESSION_free(ssl_session);
 3403|      0|      }
 3404|      0|      else {
 3405|      0|        infof(data, "SSL session not accepted by OpenSSL, continuing without");
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 3406|      0|      }
 3407|      0|    }
 3408|  1.31k|    Curl_ssl_scache_return(cf, data, peer->scache_key, scs);
 3409|  1.31k|  }
 3410|       |
 3411|  1.31k|  if(alpns.count) {
  ------------------
  |  Branch (3411:6): [True: 1.31k, False: 1]
  ------------------
 3412|  1.31k|    struct alpn_proto_buf proto;
 3413|  1.31k|    memset(&proto, 0, sizeof(proto));
 3414|  1.31k|    result = Curl_alpn_to_proto_buf(&proto, &alpns);
 3415|  1.31k|    if(result) {
  ------------------
  |  Branch (3415:8): [True: 0, False: 1.31k]
  ------------------
 3416|      0|      failf(data, "Error determining ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3417|      0|      return CURLE_SSL_CONNECT_ERROR;
 3418|      0|    }
 3419|  1.31k|    if(SSL_set_alpn_protos(octx->ssl, proto.data, proto.len)) {
  ------------------
  |  Branch (3419:8): [True: 0, False: 1.31k]
  ------------------
 3420|      0|      failf(data, "Error setting ALPN");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 3421|      0|      return CURLE_SSL_CONNECT_ERROR;
 3422|      0|    }
 3423|  1.31k|  }
 3424|       |
 3425|  1.31k|  return CURLE_OK;
 3426|  1.31k|}
openssl.c:ossl_init:
 1626|      1|{
 1627|      1|  const uint64_t flags =
 1628|      1|#ifdef OPENSSL_INIT_ENGINE_ALL_BUILTIN
 1629|       |    /* not present in BoringSSL */
 1630|      1|    OPENSSL_INIT_ENGINE_ALL_BUILTIN |
 1631|      1|#endif
 1632|       |#ifdef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
 1633|       |    OPENSSL_INIT_NO_LOAD_CONFIG |
 1634|       |#else
 1635|      1|    OPENSSL_INIT_LOAD_CONFIG |
 1636|      1|#endif
 1637|      1|    0;
 1638|      1|  OPENSSL_init_ssl(flags, NULL);
 1639|       |
 1640|      1|#ifndef HAVE_KEYLOG_UPSTREAM
 1641|      1|  Curl_tls_keylog_open();
 1642|      1|#endif
 1643|       |
 1644|      1|  return 1;
 1645|      1|}
openssl.c:SSL_ERROR_to_str:
  709|      1|{
  710|      1|  switch(err) {
  711|      0|  case SSL_ERROR_NONE:
  ------------------
  |  Branch (711:3): [True: 0, False: 1]
  ------------------
  712|      0|    return "SSL_ERROR_NONE";
  713|      0|  case SSL_ERROR_SSL:
  ------------------
  |  Branch (713:3): [True: 0, False: 1]
  ------------------
  714|      0|    return "SSL_ERROR_SSL";
  715|      0|  case SSL_ERROR_WANT_READ:
  ------------------
  |  Branch (715:3): [True: 0, False: 1]
  ------------------
  716|      0|    return "SSL_ERROR_WANT_READ";
  717|      0|  case SSL_ERROR_WANT_WRITE:
  ------------------
  |  Branch (717:3): [True: 0, False: 1]
  ------------------
  718|      0|    return "SSL_ERROR_WANT_WRITE";
  719|      0|  case SSL_ERROR_WANT_X509_LOOKUP:
  ------------------
  |  Branch (719:3): [True: 0, False: 1]
  ------------------
  720|      0|    return "SSL_ERROR_WANT_X509_LOOKUP";
  721|      0|  case SSL_ERROR_SYSCALL:
  ------------------
  |  Branch (721:3): [True: 0, False: 1]
  ------------------
  722|      0|    return "SSL_ERROR_SYSCALL";
  723|      1|  case SSL_ERROR_ZERO_RETURN:
  ------------------
  |  Branch (723:3): [True: 1, False: 0]
  ------------------
  724|      1|    return "SSL_ERROR_ZERO_RETURN";
  725|      0|  case SSL_ERROR_WANT_CONNECT:
  ------------------
  |  Branch (725:3): [True: 0, False: 1]
  ------------------
  726|      0|    return "SSL_ERROR_WANT_CONNECT";
  727|      0|  case SSL_ERROR_WANT_ACCEPT:
  ------------------
  |  Branch (727:3): [True: 0, False: 1]
  ------------------
  728|      0|    return "SSL_ERROR_WANT_ACCEPT";
  729|      0|#ifdef SSL_ERROR_WANT_ASYNC  /* OpenSSL 1.1.0+, LibreSSL 3.6.0+ */
  730|      0|  case SSL_ERROR_WANT_ASYNC:
  ------------------
  |  Branch (730:3): [True: 0, False: 1]
  ------------------
  731|      0|    return "SSL_ERROR_WANT_ASYNC";
  732|      0|#endif
  733|      0|#ifdef SSL_ERROR_WANT_ASYNC_JOB  /* OpenSSL 1.1.0+, LibreSSL 3.6.0+ */
  734|      0|  case SSL_ERROR_WANT_ASYNC_JOB:
  ------------------
  |  Branch (734:3): [True: 0, False: 1]
  ------------------
  735|      0|    return "SSL_ERROR_WANT_ASYNC_JOB";
  736|      0|#endif
  737|      0|#ifdef SSL_ERROR_WANT_CLIENT_HELLO_CB  /* OpenSSL 1.1.1, LibreSSL 3.6.0+ */
  738|      0|  case SSL_ERROR_WANT_CLIENT_HELLO_CB:
  ------------------
  |  Branch (738:3): [True: 0, False: 1]
  ------------------
  739|      0|    return "SSL_ERROR_WANT_CLIENT_HELLO_CB";
  740|      0|#endif
  741|      0|  default:
  ------------------
  |  Branch (741:3): [True: 0, False: 1]
  ------------------
  742|      0|    return "SSL_ERROR unknown";
  743|      1|  }
  744|      1|}
openssl.c:ossl_random:
 5442|  8.20k|{
 5443|  8.20k|  int rc;
 5444|  8.20k|  if(data) {
  ------------------
  |  Branch (5444:6): [True: 8.20k, False: 0]
  ------------------
 5445|  8.20k|    if(ossl_seed(data)) /* Initiate the seed if not already done */
  ------------------
  |  Branch (5445:8): [True: 0, False: 8.20k]
  ------------------
 5446|      0|      return CURLE_FAILED_INIT; /* could not seed for some reason */
 5447|  8.20k|  }
 5448|      0|  else {
 5449|      0|    if(!rand_enough())
  ------------------
  |  Branch (5449:8): [True: 0, False: 0]
  ------------------
 5450|      0|      return CURLE_FAILED_INIT;
 5451|      0|  }
 5452|       |  /* RAND_bytes() returns 1 on success, 0 otherwise. */
 5453|  8.20k|  rc = RAND_bytes(entropy, (ossl_valsize_t)curlx_uztosi(length));
 5454|  8.20k|  return rc == 1 ? CURLE_OK : CURLE_FAILED_INIT;
  ------------------
  |  Branch (5454:10): [True: 8.20k, False: 0]
  ------------------
 5455|  8.20k|}
openssl.c:ossl_cert_status_request:
 5482|    768|{
 5483|    768|#ifndef OPENSSL_NO_OCSP
 5484|    768|  return TRUE;
  ------------------
  |  | 1055|    768|#define TRUE true
  ------------------
 5485|       |#else
 5486|       |  return FALSE;
 5487|       |#endif
 5488|    768|}
openssl.c:ossl_connect:
 4964|  2.33k|{
 4965|  2.33k|  CURLcode result = CURLE_OK;
 4966|  2.33k|  struct ssl_connect_data *connssl = cf->ctx;
 4967|       |
 4968|       |  /* check if the connection has already been established */
 4969|  2.33k|  if(ssl_connection_complete == connssl->state) {
  ------------------
  |  Branch (4969:6): [True: 0, False: 2.33k]
  ------------------
 4970|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4971|      0|    return CURLE_OK;
 4972|      0|  }
 4973|       |
 4974|  2.33k|  *done = FALSE;
  ------------------
  |  | 1058|  2.33k|#define FALSE false
  ------------------
 4975|  2.33k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  2.33k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4976|       |
 4977|  2.33k|  if(ssl_connect_1 == connssl->connecting_state) {
  ------------------
  |  Branch (4977:6): [True: 2.09k, False: 246]
  ------------------
 4978|  2.09k|    if(Curl_ossl_need_httpsrr(data) &&
  ------------------
  |  Branch (4978:8): [True: 0, False: 2.09k]
  ------------------
 4979|      0|       !Curl_conn_dns_resolved_https(data, cf->sockindex)) {
  ------------------
  |  |   66|      0|#define Curl_conn_dns_resolved_https(a, b)   TRUE
  |  |  ------------------
  |  |  |  | 1055|      0|#define TRUE true
  |  |  ------------------
  ------------------
  |  Branch (4979:8): [Folded, False: 0]
  ------------------
 4980|      0|      CURL_TRC_CF(data, cf, "need HTTPS-RR, delaying connect");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4981|      0|      return CURLE_OK;
 4982|      0|    }
 4983|  2.09k|    CURL_TRC_CF(data, cf, "ossl_connect, step1");
  ------------------
  |  |  153|  2.09k|  do {                                          \
  |  |  154|  2.09k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.09k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.18k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.09k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.18k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.09k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.09k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.09k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.09k]
  |  |  ------------------
  ------------------
 4984|  2.09k|    result = ossl_connect_step1(cf, data);
 4985|  2.09k|    if(result)
  ------------------
  |  Branch (4985:8): [True: 777, False: 1.31k]
  ------------------
 4986|    777|      goto out;
 4987|  2.09k|  }
 4988|       |
 4989|  1.56k|  if(ssl_connect_2 == connssl->connecting_state) {
  ------------------
  |  Branch (4989:6): [True: 1.56k, False: 0]
  ------------------
 4990|  1.56k|    CURL_TRC_CF(data, cf, "ossl_connect, step2");
  ------------------
  |  |  153|  1.56k|  do {                                          \
  |  |  154|  1.56k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.56k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.12k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.56k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.56k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.12k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.56k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.56k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.56k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.56k]
  |  |  ------------------
  ------------------
 4991|  1.56k|#ifdef HAVE_OPENSSL_EARLYDATA
 4992|  1.56k|    if(connssl->earlydata_state == ssl_earlydata_await) {
  ------------------
  |  Branch (4992:8): [True: 0, False: 1.56k]
  ------------------
 4993|      0|      goto out;
 4994|      0|    }
 4995|  1.56k|    else if(connssl->earlydata_state == ssl_earlydata_sending) {
  ------------------
  |  Branch (4995:13): [True: 0, False: 1.56k]
  ------------------
 4996|      0|      result = ossl_send_earlydata(cf, data);
 4997|      0|      if(result)
  ------------------
  |  Branch (4997:10): [True: 0, False: 0]
  ------------------
 4998|      0|        goto out;
 4999|      0|      connssl->earlydata_state = ssl_earlydata_sent;
 5000|      0|    }
 5001|  1.56k|#endif
 5002|  1.56k|    DEBUGASSERT((connssl->earlydata_state == ssl_earlydata_none) ||
  ------------------
  |  | 1081|  1.56k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5002:5): [True: 1.56k, False: 0]
  |  Branch (5002:5): [True: 0, False: 0]
  |  Branch (5002:5): [True: 1.56k, False: 0]
  |  Branch (5002:5): [True: 0, False: 0]
  ------------------
 5003|  1.56k|                (connssl->earlydata_state == ssl_earlydata_sent));
 5004|       |
 5005|  1.56k|    result = ossl_connect_step2(cf, data);
 5006|  1.56k|    if(result)
  ------------------
  |  Branch (5006:8): [True: 1.56k, False: 0]
  ------------------
 5007|  1.56k|      goto out;
 5008|  1.56k|  }
 5009|       |
 5010|      0|  if(ssl_connect_3 == connssl->connecting_state) {
  ------------------
  |  Branch (5010:6): [True: 0, False: 0]
  ------------------
 5011|      0|    CURL_TRC_CF(data, cf, "ossl_connect, step3");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5012|      0|    result = ossl_connect_step3(cf, data);
 5013|      0|    if(result)
  ------------------
  |  Branch (5013:8): [True: 0, False: 0]
  ------------------
 5014|      0|      goto out;
 5015|      0|    connssl->connecting_state = ssl_connect_done;
 5016|      0|#ifdef HAVE_OPENSSL_EARLYDATA
 5017|      0|    if(connssl->earlydata_state > ssl_earlydata_none) {
  ------------------
  |  Branch (5017:8): [True: 0, False: 0]
  ------------------
 5018|      0|      struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 5019|       |      /* We should be in this state by now */
 5020|      0|      DEBUGASSERT(connssl->earlydata_state == ssl_earlydata_sent);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (5020:7): [True: 0, False: 0]
  |  Branch (5020:7): [True: 0, False: 0]
  ------------------
 5021|      0|      connssl->earlydata_state =
 5022|      0|        (SSL_get_early_data_status(octx->ssl) == SSL_EARLY_DATA_ACCEPTED) ?
  ------------------
  |  Branch (5022:9): [True: 0, False: 0]
  ------------------
 5023|      0|        ssl_earlydata_accepted : ssl_earlydata_rejected;
 5024|      0|    }
 5025|      0|#endif
 5026|      0|  }
 5027|       |
 5028|      0|  if(ssl_connect_done == connssl->connecting_state) {
  ------------------
  |  Branch (5028:6): [True: 0, False: 0]
  ------------------
 5029|      0|    CURL_TRC_CF(data, cf, "ossl_connect, done");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 5030|      0|    connssl->state = ssl_connection_complete;
 5031|      0|  }
 5032|       |
 5033|  2.33k|out:
 5034|  2.33k|  if(result == CURLE_AGAIN) {
  ------------------
  |  Branch (5034:6): [True: 248, False: 2.09k]
  ------------------
 5035|    248|    *done = FALSE;
  ------------------
  |  | 1058|    248|#define FALSE false
  ------------------
 5036|    248|    return CURLE_OK;
 5037|    248|  }
 5038|  2.09k|  *done = ((connssl->state == ssl_connection_complete) ||
  ------------------
  |  Branch (5038:12): [True: 0, False: 2.09k]
  ------------------
 5039|  2.09k|           (connssl->state == ssl_connection_deferred));
  ------------------
  |  Branch (5039:12): [True: 0, False: 2.09k]
  ------------------
 5040|  2.09k|  return result;
 5041|  2.33k|}
openssl.c:ossl_connect_step1:
 4010|  2.09k|{
 4011|  2.09k|  struct ssl_connect_data *connssl = cf->ctx;
 4012|  2.09k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4013|  2.09k|  char tls_id[80];
 4014|  2.09k|  BIO *bio;
 4015|  2.09k|  CURLcode result;
 4016|       |
 4017|  2.09k|  DEBUGASSERT(ssl_connect_1 == connssl->connecting_state);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4017:3): [True: 0, False: 2.09k]
  |  Branch (4017:3): [True: 2.09k, False: 0]
  ------------------
 4018|  2.09k|  DEBUGASSERT(octx);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4018:3): [True: 0, False: 2.09k]
  |  Branch (4018:3): [True: 2.09k, False: 0]
  ------------------
 4019|       |
 4020|  2.09k|  if(!connssl->peer.dest) {
  ------------------
  |  Branch (4020:6): [True: 0, False: 2.09k]
  ------------------
 4021|      0|    Curl_ossl_version(tls_id, sizeof(tls_id));
 4022|      0|    result = Curl_ssl_peer_init(&connssl->peer, cf, tls_id, TRNSPRT_TCP);
  ------------------
  |  |  307|      0|#define TRNSPRT_TCP  3
  ------------------
 4023|      0|    if(result)
  ------------------
  |  Branch (4023:8): [True: 0, False: 0]
  ------------------
 4024|      0|      return result;
 4025|      0|  }
 4026|       |
 4027|  2.09k|  result = Curl_ossl_ctx_init(octx, cf, data, &connssl->peer,
 4028|  2.09k|                              connssl->alpn, NULL, NULL,
 4029|  2.09k|                              ossl_new_session_cb, cf,
 4030|  2.09k|                              ossl_on_session_reuse);
 4031|  2.09k|  if(result)
  ------------------
  |  Branch (4031:6): [True: 777, False: 1.31k]
  ------------------
 4032|    777|    return result;
 4033|       |
 4034|  1.31k|  octx->bio_method = ossl_bio_cf_method_create();
 4035|  1.31k|  if(!octx->bio_method)
  ------------------
  |  Branch (4035:6): [True: 0, False: 1.31k]
  ------------------
 4036|      0|    return CURLE_OUT_OF_MEMORY;
 4037|  1.31k|  bio = BIO_new(octx->bio_method);
 4038|  1.31k|  if(!bio)
  ------------------
  |  Branch (4038:6): [True: 0, False: 1.31k]
  ------------------
 4039|      0|    return CURLE_OUT_OF_MEMORY;
 4040|       |
 4041|  1.31k|  BIO_set_data(bio, cf);
 4042|  1.31k|#ifdef HAVE_SSL_SET0_WBIO
 4043|       |  /* with OpenSSL v1.1.1 we get an alternative to SSL_set_bio() that works
 4044|       |   * without backward compat quirks. Every call takes one reference, so we
 4045|       |   * up it and pass. SSL* then owns and frees it.
 4046|       |   * We check on the function in configure, since LibreSSL and friends
 4047|       |   * each have their own versions to add support for this. */
 4048|  1.31k|  BIO_up_ref(bio);
 4049|  1.31k|  SSL_set0_rbio(octx->ssl, bio);
 4050|  1.31k|  SSL_set0_wbio(octx->ssl, bio);
 4051|       |#else
 4052|       |  SSL_set_bio(octx->ssl, bio, bio);
 4053|       |#endif
 4054|       |
 4055|  1.31k|  if(connssl->alpn && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (4055:6): [True: 1.31k, False: 1]
  |  Branch (4055:23): [True: 1.31k, False: 0]
  ------------------
 4056|  1.31k|    struct alpn_proto_buf proto;
 4057|  1.31k|    memset(&proto, 0, sizeof(proto));
 4058|  1.31k|    Curl_alpn_to_proto_str(&proto, connssl->alpn);
 4059|  1.31k|    infof(data, VTLS_INFOF_ALPN_OFFER_1STR, proto.data);
  ------------------
  |  |  143|  1.31k|  do {                               \
  |  |  144|  1.31k|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|  1.31k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 1.31k, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |  320|  1.31k|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|  1.31k|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|  1.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 1.31k]
  |  |  ------------------
  ------------------
 4060|  1.31k|  }
 4061|       |
 4062|  1.31k|  connssl->connecting_state = ssl_connect_2;
 4063|  1.31k|  return CURLE_OK;
 4064|  1.31k|}
openssl.c:ossl_bio_cf_method_create:
  642|  1.31k|{
  643|  1.31k|  BIO_METHOD *m = BIO_meth_new(BIO_TYPE_MEM, "OpenSSL CF BIO");
  644|  1.31k|  if(m) {
  ------------------
  |  Branch (644:6): [True: 1.31k, False: 0]
  ------------------
  645|  1.31k|    BIO_meth_set_write(m, &ossl_bio_cf_out_write);
  646|  1.31k|    BIO_meth_set_read(m, &ossl_bio_cf_in_read);
  647|  1.31k|    BIO_meth_set_ctrl(m, &ossl_bio_cf_ctrl);
  648|  1.31k|    BIO_meth_set_create(m, &ossl_bio_cf_create);
  649|  1.31k|    BIO_meth_set_destroy(m, &ossl_bio_cf_destroy);
  650|  1.31k|  }
  651|  1.31k|  return m;
  652|  1.31k|}
openssl.c:ossl_bio_cf_out_write:
  568|  2.35k|{
  569|  2.35k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  570|  2.35k|  struct ssl_connect_data *connssl = cf->ctx;
  571|  2.35k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  572|  2.35k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  699|  2.35k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  213|  2.35k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (699:30): [True: 2.35k, False: 0]
  |  |  ------------------
  ------------------
  573|  2.35k|  size_t nwritten;
  574|  2.35k|  CURLcode result;
  575|       |
  576|  2.35k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  2.35k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (576:3): [True: 0, False: 2.35k]
  |  Branch (576:3): [True: 2.35k, False: 0]
  ------------------
  577|  2.35k|  if(blen < 0)
  ------------------
  |  Branch (577:6): [True: 0, False: 2.35k]
  ------------------
  578|      0|    return 0;
  579|       |
  580|  2.35k|  result = Curl_conn_cf_send(cf->next, data,
  581|  2.35k|                             (const uint8_t *)buf, (size_t)blen, FALSE,
  ------------------
  |  | 1058|  2.35k|#define FALSE false
  ------------------
  582|  2.35k|                             &nwritten);
  583|  2.35k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_out_write(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  2.35k|  do {                                          \
  |  |  154|  2.35k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.35k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.71k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.35k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.71k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.35k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.35k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.35k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.35k]
  |  |  ------------------
  ------------------
  584|  2.35k|              blen, result, nwritten);
  585|  2.35k|  BIO_clear_retry_flags(bio);
  586|  2.35k|  octx->io_result = result;
  587|  2.35k|  if(result) {
  ------------------
  |  Branch (587:6): [True: 0, False: 2.35k]
  ------------------
  588|      0|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (588:8): [True: 0, False: 0]
  ------------------
  589|      0|      BIO_set_retry_write(bio);
  590|      0|    return -1;
  591|      0|  }
  592|  2.35k|  return (int)nwritten;
  593|  2.35k|}
openssl.c:ossl_bio_cf_in_read:
  596|  1.87k|{
  597|  1.87k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  598|  1.87k|  struct ssl_connect_data *connssl = cf->ctx;
  599|  1.87k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
  600|  1.87k|  struct Curl_easy *data = CF_DATA_CURRENT(cf);
  ------------------
  |  |  699|  1.87k|#define CF_DATA_CURRENT(cf) ((cf) ? (CF_CTX_CALL_DATA(cf).data) : NULL)
  |  |  ------------------
  |  |  |  |  213|  1.87k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  |  Branch (699:30): [True: 1.87k, False: 0]
  |  |  ------------------
  ------------------
  601|  1.87k|  size_t nread;
  602|  1.87k|  CURLcode result, r2;
  603|       |
  604|  1.87k|  DEBUGASSERT(data);
  ------------------
  |  | 1081|  1.87k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (604:3): [True: 0, False: 1.87k]
  |  Branch (604:3): [True: 1.87k, False: 0]
  ------------------
  605|       |  /* OpenSSL catches this case, so should we. */
  606|  1.87k|  if(!buf)
  ------------------
  |  Branch (606:6): [True: 0, False: 1.87k]
  ------------------
  607|      0|    return 0;
  608|  1.87k|  if(blen < 0)
  ------------------
  |  Branch (608:6): [True: 0, False: 1.87k]
  ------------------
  609|      0|    return 0;
  610|       |
  611|  1.87k|  result = Curl_conn_cf_recv(cf->next, data, buf, (size_t)blen, &nread);
  612|  1.87k|  CURL_TRC_CF(data, cf, "ossl_bio_cf_in_read(len=%d) -> %d, %zu",
  ------------------
  |  |  153|  1.87k|  do {                                          \
  |  |  154|  1.87k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.87k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  3.74k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.87k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.87k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  3.74k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.87k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.87k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.87k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.87k]
  |  |  ------------------
  ------------------
  613|  1.87k|              blen, result, nread);
  614|  1.87k|  BIO_clear_retry_flags(bio);
  615|  1.87k|  octx->io_result = result;
  616|  1.87k|  if(result) {
  ------------------
  |  Branch (616:6): [True: 253, False: 1.61k]
  ------------------
  617|    253|    if(result == CURLE_AGAIN)
  ------------------
  |  Branch (617:8): [True: 253, False: 0]
  ------------------
  618|    253|      BIO_set_retry_read(bio);
  619|    253|  }
  620|  1.61k|  else {
  621|       |    /* feeding data to OpenSSL means SSL_read() might succeed */
  622|  1.61k|    connssl->input_pending = TRUE;
  ------------------
  |  | 1055|  1.61k|#define TRUE true
  ------------------
  623|  1.61k|    if(nread == 0)
  ------------------
  |  Branch (623:8): [True: 912, False: 706]
  ------------------
  624|    912|      connssl->peer_closed = TRUE;
  ------------------
  |  | 1055|    912|#define TRUE true
  ------------------
  625|  1.61k|  }
  626|       |
  627|       |  /* Before returning server replies to the SSL instance, we need
  628|       |   * to have setup the x509 store or verification fails. */
  629|  1.87k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (629:6): [True: 1.24k, False: 631]
  ------------------
  630|  1.24k|    r2 = Curl_ssl_setup_x509_store(cf, data, octx);
  631|  1.24k|    if(r2) {
  ------------------
  |  Branch (631:8): [True: 66, False: 1.17k]
  ------------------
  632|     66|      BIO_clear_retry_flags(bio);
  633|     66|      octx->io_result = r2;
  634|     66|      return -1;
  635|     66|    }
  636|  1.17k|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1055|  1.17k|#define TRUE true
  ------------------
  637|  1.17k|  }
  638|  1.80k|  return result ? -1 : (int)nread;
  ------------------
  |  Branch (638:10): [True: 248, False: 1.55k]
  ------------------
  639|  1.87k|}
openssl.c:ossl_bio_cf_ctrl:
  534|  5.90k|{
  535|  5.90k|  struct Curl_cfilter *cf = BIO_get_data(bio);
  536|  5.90k|  long ret = 1;
  537|       |
  538|  5.90k|  (void)cf;
  539|  5.90k|  (void)ptr;
  540|  5.90k|  switch(cmd) {
  541|      0|  case BIO_CTRL_GET_CLOSE:
  ------------------
  |  Branch (541:3): [True: 0, False: 5.90k]
  ------------------
  542|      0|    ret = (long)BIO_get_shutdown(bio);
  543|      0|    break;
  544|      0|  case BIO_CTRL_SET_CLOSE:
  ------------------
  |  Branch (544:3): [True: 0, False: 5.90k]
  ------------------
  545|      0|    BIO_set_shutdown(bio, (int)num);
  546|      0|    break;
  547|  2.35k|  case BIO_CTRL_FLUSH:
  ------------------
  |  Branch (547:3): [True: 2.35k, False: 3.55k]
  ------------------
  548|       |    /* we do no delayed writes, but if we ever would, this
  549|       |     * needs to trigger it. */
  550|  2.35k|    ret = 1;
  551|  2.35k|    break;
  552|      0|  case BIO_CTRL_DUP:
  ------------------
  |  Branch (552:3): [True: 0, False: 5.90k]
  ------------------
  553|      0|    ret = 1;
  554|      0|    break;
  555|    919|  case BIO_CTRL_EOF: {
  ------------------
  |  Branch (555:3): [True: 919, False: 4.98k]
  ------------------
  556|       |    /* EOF has been reached on input? */
  557|    919|    struct ssl_connect_data *connssl = cf->ctx;
  558|    919|    return connssl->peer_closed;
  559|      0|  }
  560|  2.63k|  default:
  ------------------
  |  Branch (560:3): [True: 2.63k, False: 3.27k]
  ------------------
  561|  2.63k|    ret = 0;
  562|  2.63k|    break;
  563|  5.90k|  }
  564|  4.98k|  return ret;
  565|  5.90k|}
openssl.c:ossl_bio_cf_create:
  519|  1.31k|{
  520|  1.31k|  BIO_set_shutdown(bio, 1);
  521|  1.31k|  BIO_set_init(bio, 1);
  522|       |  BIO_set_data(bio, NULL);
  523|  1.31k|  return 1;
  524|  1.31k|}
openssl.c:ossl_bio_cf_destroy:
  527|  1.31k|{
  528|  1.31k|  if(!bio)
  ------------------
  |  Branch (528:6): [True: 0, False: 1.31k]
  ------------------
  529|      0|    return 0;
  530|  1.31k|  return 1;
  531|  1.31k|}
openssl.c:ossl_connect_step2:
 4133|  1.56k|{
 4134|  1.56k|  int err;
 4135|  1.56k|  struct ssl_connect_data *connssl = cf->ctx;
 4136|  1.56k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 4137|  1.56k|  struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
 4138|  1.56k|  DEBUGASSERT(ssl_connect_2 == connssl->connecting_state);
  ------------------
  |  | 1081|  1.56k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4138:3): [True: 0, False: 1.56k]
  |  Branch (4138:3): [True: 1.56k, False: 0]
  ------------------
 4139|  1.56k|  DEBUGASSERT(octx);
  ------------------
  |  | 1081|  1.56k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (4139:3): [True: 0, False: 1.56k]
  |  Branch (4139:3): [True: 1.56k, False: 0]
  ------------------
 4140|       |
 4141|  1.56k|  connssl->io_need = CURL_SSL_IO_NEED_NONE;
  ------------------
  |  |  105|  1.56k|#define CURL_SSL_IO_NEED_NONE   0
  ------------------
 4142|  1.56k|  ERR_clear_error();
 4143|       |
 4144|  1.56k|  err = SSL_connect(octx->ssl);
 4145|       |
 4146|  1.56k|  if(!octx->x509_store_setup) {
  ------------------
  |  Branch (4146:6): [True: 142, False: 1.42k]
  ------------------
 4147|       |    /* After having send off the ClientHello, we prepare the x509
 4148|       |     * store to verify the coming certificate from the server */
 4149|    142|    CURLcode result = Curl_ssl_setup_x509_store(cf, data, octx);
 4150|    142|    if(result)
  ------------------
  |  Branch (4150:8): [True: 85, False: 57]
  ------------------
 4151|     85|      return result;
 4152|     57|    octx->x509_store_setup = TRUE;
  ------------------
  |  | 1055|     57|#define TRUE true
  ------------------
 4153|     57|  }
 4154|       |
 4155|       |#if !defined(HAVE_KEYLOG_UPSTREAM) && !defined(HAVE_KEYLOG_CALLBACK)
 4156|       |  /* If key logging is enabled, wait for the handshake to complete and then
 4157|       |   * proceed with logging secrets (for TLS 1.2 or older).
 4158|       |   */
 4159|       |  if(Curl_tls_keylog_enabled() && !octx->keylog_done)
 4160|       |    ossl_log_tls12_secret(octx->ssl, &octx->keylog_done);
 4161|       |#endif
 4162|       |
 4163|       |  /* 1  is fine
 4164|       |     0  is "not successful but was shut down controlled"
 4165|       |     <0 is "handshake was not successful, because a fatal error occurred" */
 4166|  1.47k|  if(err != 1) {
  ------------------
  |  Branch (4166:6): [True: 1.47k, False: 0]
  ------------------
 4167|  1.47k|    int detail = SSL_get_error(octx->ssl, err);
 4168|  1.47k|    CURL_TRC_CF(data, cf, "SSL_connect() -> err=%d, detail=%d", err, detail);
  ------------------
  |  |  153|  1.47k|  do {                                          \
  |  |  154|  1.47k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  1.47k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.95k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.47k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.95k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  1.47k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  1.47k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  1.47k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 1.47k]
  |  |  ------------------
  ------------------
 4169|       |
 4170|  1.47k|    if(SSL_ERROR_WANT_READ == detail) {
  ------------------
  |  Branch (4170:8): [True: 248, False: 1.22k]
  ------------------
 4171|    248|      CURL_TRC_CF(data, cf, "SSL_connect() -> want recv");
  ------------------
  |  |  153|    248|  do {                                          \
  |  |  154|    248|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    248|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    496|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 248, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 248]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    496|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    248|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    248|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
 4172|    248|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|    248|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4173|    248|      return CURLE_AGAIN;
 4174|    248|    }
 4175|  1.22k|    if(SSL_ERROR_WANT_WRITE == detail) {
  ------------------
  |  Branch (4175:8): [True: 0, False: 1.22k]
  ------------------
 4176|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want send");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4177|      0|      connssl->io_need = CURL_SSL_IO_NEED_SEND;
  ------------------
  |  |  107|      0|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
 4178|      0|      return CURLE_AGAIN;
 4179|      0|    }
 4180|  1.22k|#ifdef SSL_ERROR_WANT_ASYNC
 4181|  1.22k|    if(SSL_ERROR_WANT_ASYNC == detail) {
  ------------------
  |  Branch (4181:8): [True: 0, False: 1.22k]
  ------------------
 4182|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want async");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4183|      0|      connssl->io_need = CURL_SSL_IO_NEED_RECV;
  ------------------
  |  |  106|      0|#define CURL_SSL_IO_NEED_RECV   (1 << 0)
  ------------------
 4184|      0|      return CURLE_AGAIN;
 4185|      0|    }
 4186|  1.22k|#endif
 4187|  1.22k|#ifdef SSL_ERROR_WANT_RETRY_VERIFY
 4188|  1.22k|    if(SSL_ERROR_WANT_RETRY_VERIFY == detail) {
  ------------------
  |  Branch (4188:8): [True: 0, False: 1.22k]
  ------------------
 4189|      0|      CURL_TRC_CF(data, cf, "SSL_connect() -> want retry_verify");
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 4190|      0|      Curl_xfer_pause_recv(data, TRUE);
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 4191|      0|      return CURLE_AGAIN;
 4192|      0|    }
 4193|  1.22k|#endif
 4194|  1.22k|    else {
 4195|       |      /* untreated error */
 4196|  1.22k|      sslerr_t errdetail;
 4197|  1.22k|      char error_buffer[256] = "";
 4198|  1.22k|      CURLcode result;
 4199|  1.22k|      long lerr;
 4200|  1.22k|      int lib;
 4201|  1.22k|      int reason;
 4202|       |
 4203|       |      /* the connection failed, we are not waiting for anything else. */
 4204|  1.22k|      connssl->connecting_state = ssl_connect_2;
 4205|       |
 4206|       |      /* Get the earliest error code from the thread's error queue and remove
 4207|       |         the entry. */
 4208|  1.22k|      errdetail = ERR_get_error();
 4209|       |
 4210|       |      /* Extract which lib and reason */
 4211|  1.22k|      lib = ERR_GET_LIB(errdetail);
 4212|  1.22k|      reason = ERR_GET_REASON(errdetail);
 4213|       |
 4214|  1.22k|      if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4214:10): [True: 1.22k, False: 1]
  ------------------
 4215|  1.22k|         ((reason == SSL_R_CERTIFICATE_VERIFY_FAILED)
  ------------------
  |  Branch (4215:11): [True: 0, False: 1.22k]
  ------------------
 4216|       |/* Missing from OpenSSL 4+ OPENSSL_NO_DEPRECATED_3_0 builds */
 4217|  1.22k|#ifdef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
 4218|  1.22k|          || (reason == SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED)
  ------------------
  |  Branch (4218:14): [True: 1, False: 1.22k]
  ------------------
 4219|  1.22k|#endif
 4220|  1.22k|         )) {
 4221|      1|        result = CURLE_PEER_FAILED_VERIFICATION;
 4222|       |
 4223|      1|        lerr = SSL_get_verify_result(octx->ssl);
 4224|      1|        if(lerr != X509_V_OK) {
  ------------------
  |  Branch (4224:12): [True: 0, False: 1]
  ------------------
 4225|      0|          ssl_config->certverifyresult = lerr;
 4226|      0|          failf(data, "SSL certificate problem: %s",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 4227|      0|                X509_verify_cert_error_string(lerr));
 4228|      0|        }
 4229|      1|        else
 4230|      1|          failf(data, "%s", "SSL certificate verification failed");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4231|      1|      }
 4232|  1.22k|#ifdef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
 4233|       |      /* SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED is only available on
 4234|       |         OpenSSL version above v1.1.1, not AWS-LC, BoringSSL, or LibreSSL */
 4235|  1.22k|      else if((lib == ERR_LIB_SSL) &&
  ------------------
  |  Branch (4235:15): [True: 1.22k, False: 1]
  ------------------
 4236|  1.22k|              (reason == SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED)) {
  ------------------
  |  Branch (4236:15): [True: 1, False: 1.22k]
  ------------------
 4237|       |        /* If client certificate is required, communicate the
 4238|       |           error to client */
 4239|      1|        result = CURLE_SSL_CLIENTCERT;
 4240|      1|        failf(data, "TLS cert problem: %s",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
 4241|      1|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4242|      1|      }
 4243|  1.22k|#endif
 4244|       |#ifdef HAVE_SSL_SET1_ECH_CONFIG_LIST
 4245|       |      else if((lib == ERR_LIB_SSL) &&
 4246|       |#ifndef HAVE_BORINGSSL_LIKE
 4247|       |              (reason == SSL_R_ECH_REQUIRED)) {
 4248|       |#else
 4249|       |              (reason == SSL_R_ECH_REJECTED)) {
 4250|       |#endif /* HAVE_BORINGSSL_LIKE */
 4251|       |
 4252|       |        /* trace retry_configs if we got some */
 4253|       |        ossl_trace_ech_retry_configs(data, octx->ssl, reason);
 4254|       |
 4255|       |        result = CURLE_ECH_REQUIRED;
 4256|       |        failf(data, "ECH required: %s",
 4257|       |              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4258|       |      }
 4259|       |#endif
 4260|  1.22k|      else {
 4261|  1.22k|        result = CURLE_SSL_CONNECT_ERROR;
 4262|  1.22k|        failf(data, "TLS connect error: %s",
  ------------------
  |  |   62|  1.22k|#define failf Curl_failf
  ------------------
 4263|  1.22k|              ossl_strerror(errdetail, error_buffer, sizeof(error_buffer)));
 4264|  1.22k|      }
 4265|       |
 4266|       |      /* detail is already set to the SSL error above */
 4267|       |
 4268|       |      /* If we e.g. use SSLv2 request-method and the server does not like us
 4269|       |       * (RST connection, etc.), OpenSSL gives no explanation whatsoever and
 4270|       |       * the SO_ERROR is also lost.
 4271|       |       */
 4272|  1.22k|      if(result == CURLE_SSL_CONNECT_ERROR && errdetail == 0) {
  ------------------
  |  Branch (4272:10): [True: 1.22k, False: 2]
  |  Branch (4272:47): [True: 1, False: 1.22k]
  ------------------
 4273|      1|        char extramsg[80] = "";
 4274|      1|        int sockerr = SOCKERRNO;
  ------------------
  |  | 1095|      1|#define SOCKERRNO         errno
  ------------------
 4275|       |
 4276|      1|        if(sockerr && detail == SSL_ERROR_SYSCALL)
  ------------------
  |  Branch (4276:12): [True: 0, False: 1]
  |  Branch (4276:23): [True: 0, False: 0]
  ------------------
 4277|      0|          curlx_strerror(sockerr, extramsg, sizeof(extramsg));
 4278|      1|        failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%d ",
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
                      failf(data, OSSL_PACKAGE " SSL_connect: %s in connection to %s:%d ",
  ------------------
  |  |  163|      1|#define OSSL_PACKAGE "OpenSSL"
  ------------------
 4279|      1|              extramsg[0] ? extramsg : SSL_ERROR_to_str(detail),
  ------------------
  |  Branch (4279:15): [True: 0, False: 1]
  ------------------
 4280|      1|              connssl->peer.dest->hostname, connssl->peer.dest->port);
 4281|      1|      }
 4282|       |
 4283|  1.22k|      return result;
 4284|  1.22k|    }
 4285|  1.22k|  }
 4286|      0|  else {
 4287|       |    /* we connected fine, we are not waiting for anything else. */
 4288|      0|    connssl->connecting_state = ssl_connect_3;
 4289|      0|    Curl_ossl_report_handshake(data, octx);
 4290|       |
 4291|       |#if defined(HAVE_SSL_SET1_ECH_CONFIG_LIST) && !defined(HAVE_BORINGSSL_LIKE)
 4292|       |    if(CURLECH_ENABLED(data)) {
 4293|       |      char *inner = NULL, *outer = NULL;
 4294|       |      int rv;
 4295|       |      VERBOSE(const char *status);
 4296|       |
 4297|       |      rv = SSL_ech_get1_status(octx->ssl, &inner, &outer);
 4298|       |      switch(rv) {
 4299|       |      case SSL_ECH_STATUS_SUCCESS:
 4300|       |        VERBOSE(status = "succeeded");
 4301|       |        break;
 4302|       |      case SSL_ECH_STATUS_GREASE_ECH:
 4303|       |        VERBOSE(status = "sent GREASE, got retry-configs");
 4304|       |        break;
 4305|       |      case SSL_ECH_STATUS_GREASE:
 4306|       |        VERBOSE(status = "sent GREASE");
 4307|       |        break;
 4308|       |      case SSL_ECH_STATUS_NOT_TRIED:
 4309|       |        VERBOSE(status = "not attempted");
 4310|       |        break;
 4311|       |      case SSL_ECH_STATUS_NOT_CONFIGURED:
 4312|       |        VERBOSE(status = "not configured");
 4313|       |        break;
 4314|       |      case SSL_ECH_STATUS_BACKEND:
 4315|       |        VERBOSE(status = "backend (unexpected)");
 4316|       |        break;
 4317|       |      case SSL_ECH_STATUS_FAILED:
 4318|       |        VERBOSE(status = "failed");
 4319|       |        break;
 4320|       |      case SSL_ECH_STATUS_BAD_CALL:
 4321|       |        VERBOSE(status = "bad call (unexpected)");
 4322|       |        break;
 4323|       |      case SSL_ECH_STATUS_BAD_NAME: {
 4324|       |        struct ssl_primary_config *conn_config =
 4325|       |          Curl_ssl_cf_get_primary_config(cf);
 4326|       |        if(!conn_config->verifypeer && !conn_config->verifyhost &&
 4327|       |           inner && !strcmp(inner, connssl->peer.dest->hostname)) {
 4328|       |          VERBOSE(status = "bad name (tolerated without peer verification)");
 4329|       |          rv = SSL_ECH_STATUS_SUCCESS;
 4330|       |        }
 4331|       |        else {
 4332|       |          VERBOSE(status = "bad name (unexpected)");
 4333|       |        }
 4334|       |        break;
 4335|       |      }
 4336|       |      default:
 4337|       |        VERBOSE(status = "unexpected status");
 4338|       |        infof(data, "ECH: unexpected status %d", rv);
 4339|       |      }
 4340|       |      infof(data, "ECH: result: status is %s, inner is %s, outer is %s",
 4341|       |            (status ? status : "NULL"),
 4342|       |            (inner ? inner : "NULL"),
 4343|       |            (outer ? outer : "NULL"));
 4344|       |      OPENSSL_free(inner);
 4345|       |      OPENSSL_free(outer);
 4346|       |      if(rv == SSL_ECH_STATUS_GREASE_ECH) {
 4347|       |        /* trace retry_configs if we got some */
 4348|       |        ossl_trace_ech_retry_configs(data, octx->ssl, 0);
 4349|       |      }
 4350|       |      if(rv != SSL_ECH_STATUS_SUCCESS && (data->set.tls_ech == CURLECH_HARD)) {
 4351|       |        infof(data, "ECH: ech-hard failed");
 4352|       |        return CURLE_SSL_CONNECT_ERROR;
 4353|       |      }
 4354|       |    }
 4355|       |    else {
 4356|       |      infof(data, "ECH: result: status is not attempted");
 4357|       |    }
 4358|       |#endif /* HAVE_SSL_SET1_ECH_CONFIG_LIST && !HAVE_BORINGSSL_LIKE */
 4359|       |
 4360|       |    /* Sets data and len to negotiated protocol, len is 0 if no protocol was
 4361|       |     * negotiated
 4362|       |     */
 4363|      0|    if(connssl->alpn) {
  ------------------
  |  Branch (4363:8): [True: 0, False: 0]
  ------------------
 4364|      0|      const unsigned char *neg_protocol;
 4365|      0|      unsigned int len;
 4366|      0|      SSL_get0_alpn_selected(octx->ssl, &neg_protocol, &len);
 4367|       |
 4368|      0|      return Curl_alpn_set_negotiated(cf, data, connssl, neg_protocol, len);
 4369|      0|    }
 4370|       |
 4371|      0|    return CURLE_OK;
 4372|      0|  }
 4373|  1.47k|}
openssl.c:ossl_close:
 1961|  4.20k|{
 1962|  4.20k|  struct ssl_connect_data *connssl = cf->ctx;
 1963|  4.20k|  struct ossl_ctx *octx = (struct ossl_ctx *)connssl->backend;
 1964|       |
 1965|  4.20k|  (void)data;
 1966|  4.20k|  DEBUGASSERT(octx);
  ------------------
  |  | 1081|  4.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1966:3): [True: 0, False: 4.20k]
  |  Branch (1966:3): [True: 4.20k, False: 0]
  ------------------
 1967|       |
 1968|  4.20k|  connssl->input_pending = FALSE;
  ------------------
  |  | 1058|  4.20k|#define FALSE false
  ------------------
 1969|  4.20k|  if(octx->ssl) {
  ------------------
  |  Branch (1969:6): [True: 1.31k, False: 2.88k]
  ------------------
 1970|  1.31k|    SSL_free(octx->ssl);
 1971|  1.31k|    octx->ssl = NULL;
 1972|  1.31k|  }
 1973|  4.20k|  if(octx->ssl_ctx) {
  ------------------
  |  Branch (1973:6): [True: 2.06k, False: 2.13k]
  ------------------
 1974|  2.06k|    SSL_CTX_free(octx->ssl_ctx);
 1975|  2.06k|    octx->ssl_ctx = NULL;
 1976|  2.06k|    octx->x509_store_setup = FALSE;
  ------------------
  |  | 1058|  2.06k|#define FALSE false
  ------------------
 1977|  2.06k|  }
 1978|  4.20k|  if(octx->bio_method) {
  ------------------
  |  Branch (1978:6): [True: 1.31k, False: 2.88k]
  ------------------
 1979|  1.31k|    ossl_bio_cf_method_free(octx->bio_method);
 1980|       |    octx->bio_method = NULL;
 1981|  1.31k|  }
 1982|  4.20k|}
openssl.c:ossl_bio_cf_method_free:
  655|  1.31k|{
  656|  1.31k|  if(m)
  ------------------
  |  Branch (656:6): [True: 1.31k, False: 0]
  ------------------
  657|  1.31k|    BIO_meth_free(m);
  658|  1.31k|}
openssl.c:ossl_close_all:
 1989|  33.2k|{
 1990|  33.2k|#ifdef USE_OPENSSL_ENGINE
 1991|  33.2k|  if(data->state.engine) {
  ------------------
  |  Branch (1991:6): [True: 3, False: 33.2k]
  ------------------
 1992|      3|    ENGINE_finish(data->state.engine);
 1993|      3|    ENGINE_free(data->state.engine);
 1994|      3|    data->state.engine = NULL;
 1995|      3|  }
 1996|       |#else
 1997|       |  (void)data;
 1998|       |#endif
 1999|  33.2k|#ifdef OPENSSL_HAS_PROVIDERS
 2000|  33.2k|  ossl_provider_cleanup(data);
 2001|  33.2k|#endif
 2002|  33.2k|}
openssl.c:ossl_set_engine:
 1658|    732|{
 1659|    732|#ifdef USE_OPENSSL_ENGINE
 1660|    732|  CURLcode result = CURLE_SSL_ENGINE_NOTFOUND;
 1661|    732|  ENGINE *e = ENGINE_by_id(name);
 1662|       |
 1663|    732|  if(e) {
  ------------------
  |  Branch (1663:6): [True: 8, False: 724]
  ------------------
 1664|       |
 1665|      8|    if(data->state.engine) {
  ------------------
  |  Branch (1665:8): [True: 0, False: 8]
  ------------------
 1666|      0|      ENGINE_finish(data->state.engine);
 1667|      0|      ENGINE_free(data->state.engine);
 1668|      0|      data->state.engine = NULL;
 1669|      0|    }
 1670|      8|    if(!ENGINE_init(e)) {
  ------------------
  |  Branch (1670:8): [True: 5, False: 3]
  ------------------
 1671|      5|      char buf[256];
 1672|       |
 1673|      5|      ENGINE_free(e);
 1674|      5|      failf(data, "Failed to initialize SSL Engine '%s': %s",
  ------------------
  |  |   62|      5|#define failf Curl_failf
  ------------------
 1675|      5|            name, ossl_strerror(ERR_get_error(), buf, sizeof(buf)));
 1676|      5|      result = CURLE_SSL_ENGINE_INITFAILED;
 1677|      5|      e = NULL;
 1678|      5|    }
 1679|      3|    else {
 1680|      3|      result = CURLE_OK;
 1681|      3|    }
 1682|      8|    data->state.engine = e;
 1683|      8|    return result;
 1684|      8|  }
 1685|    724|#endif
 1686|    724|#ifdef OPENSSL_HAS_PROVIDERS
 1687|    724|  return ossl_set_provider(data, name);
 1688|       |#else
 1689|       |  (void)name;
 1690|       |  failf(data, "OpenSSL engine not found");
 1691|       |  return CURLE_SSL_ENGINE_NOTFOUND;
 1692|       |#endif
 1693|    732|}
openssl.c:ossl_set_engine_default:
 1698|      6|{
 1699|      6|#ifdef USE_OPENSSL_ENGINE
 1700|      6|  if(data->state.engine) {
  ------------------
  |  Branch (1700:6): [True: 2, False: 4]
  ------------------
 1701|      2|    if(ENGINE_set_default(data->state.engine, ENGINE_METHOD_ALL) > 0) {
  ------------------
  |  Branch (1701:8): [True: 2, False: 0]
  ------------------
 1702|      2|      infof(data, "set default crypto engine '%s'",
  ------------------
  |  |  143|      2|  do {                               \
  |  |  144|      2|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      2|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 2, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  320|      2|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      2|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      2|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1703|      2|            ENGINE_get_id(data->state.engine));
 1704|      2|    }
 1705|      0|    else {
 1706|      0|      failf(data, "set default crypto engine '%s' failed",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
 1707|      0|            ENGINE_get_id(data->state.engine));
 1708|      0|      return CURLE_SSL_ENGINE_SETFAILED;
 1709|      0|    }
 1710|      2|  }
 1711|       |#else
 1712|       |  (void)data;
 1713|       |#endif
 1714|      6|  return CURLE_OK;
 1715|      6|}

Curl_ssl_easy_config_init:
  181|  33.2k|{
  182|       |  /*
  183|       |   * libcurl 7.10 introduced SSL verification *by default*! This needs to be
  184|       |   * switched off unless wanted.
  185|       |   */
  186|  33.2k|  data->set.ssl.primary.verifypeer = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  187|  33.2k|  data->set.ssl.primary.verifyhost = TRUE;
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  188|       |  data->set.ssl.primary.cache_session = TRUE; /* caching by default */
  ------------------
  |  | 1055|  33.2k|#define TRUE true
  ------------------
  189|  33.2k|#ifndef CURL_DISABLE_PROXY
  190|  33.2k|  data->set.proxy_ssl = data->set.ssl;
  191|  33.2k|#endif
  192|  33.2k|}
Curl_ssl_conn_config_match:
  235|     59|{
  236|     59|#ifndef CURL_DISABLE_PROXY
  237|     59|  if(proxy)
  ------------------
  |  Branch (237:6): [True: 0, False: 59]
  ------------------
  238|      0|    return match_ssl_primary_config(data, &data->set.proxy_ssl.primary,
  239|      0|                                    &candidate->proxy_ssl_config);
  240|       |#else
  241|       |  (void)proxy;
  242|       |#endif
  243|     59|  return match_ssl_primary_config(data, &data->set.ssl.primary,
  244|     59|                                  &candidate->ssl_config);
  245|     59|}
Curl_ssl_easy_config_complete:
  311|  21.5k|{
  312|  21.5k|  struct ssl_config_data *sslc = &data->set.ssl;
  313|  21.5k|#if defined(CURL_CA_PATH) || defined(CURL_CA_BUNDLE)
  314|  21.5k|  struct UserDefined *set = &data->set;
  315|  21.5k|  CURLcode result;
  316|  21.5k|#endif
  317|       |
  318|  21.5k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (318:6): [True: 21.5k, False: 0]
  ------------------
  319|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  320|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  321|       |      sslc->native_ca_store = TRUE;
  322|       |#endif
  323|  21.5k|#ifdef CURL_CA_PATH
  324|  21.5k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH]) {
  ------------------
  |  Branch (324:8): [True: 20.6k, False: 938]
  |  Branch (324:32): [True: 10.3k, False: 10.2k]
  ------------------
  325|  10.3k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], CURL_CA_PATH);
  ------------------
  |  |   32|  10.3k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  326|  10.3k|      if(result)
  ------------------
  |  Branch (326:10): [True: 0, False: 10.3k]
  ------------------
  327|      0|        return result;
  328|  10.3k|    }
  329|  21.5k|#endif
  330|  21.5k|#ifdef CURL_CA_BUNDLE
  331|  21.5k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE]) {
  ------------------
  |  Branch (331:8): [True: 20.7k, False: 773]
  |  Branch (331:32): [True: 10.3k, False: 10.3k]
  ------------------
  332|  10.3k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], CURL_CA_BUNDLE);
  ------------------
  |  |   26|  10.3k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  333|  10.3k|      if(result)
  ------------------
  |  Branch (333:10): [True: 0, False: 10.3k]
  ------------------
  334|      0|        return result;
  335|  10.3k|    }
  336|  21.5k|#endif
  337|  21.5k|  }
  338|  21.5k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE];
  339|  21.5k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE];
  340|  21.5k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH];
  341|  21.5k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT];
  342|  21.5k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT];
  343|  21.5k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST];
  344|  21.5k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST];
  345|  21.5k|  sslc->primary.signature_algorithms =
  346|  21.5k|    data->set.str[STRING_SSL_SIGNATURE_ALGORITHMS];
  347|  21.5k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY];
  348|  21.5k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT];
  349|  21.5k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO];
  350|  21.5k|  sslc->primary.curves = data->set.str[STRING_SSL_EC_CURVES];
  351|  21.5k|#ifdef USE_TLS_SRP
  352|  21.5k|  sslc->primary.username = data->set.str[STRING_TLSAUTH_USERNAME];
  353|  21.5k|  sslc->primary.password = data->set.str[STRING_TLSAUTH_PASSWORD];
  354|  21.5k|#endif
  355|  21.5k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE];
  356|  21.5k|  sslc->primary.key = data->set.str[STRING_KEY];
  357|  21.5k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE];
  358|  21.5k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD];
  359|  21.5k|  sslc->primary.clientcert = data->set.str[STRING_CERT];
  360|  21.5k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY];
  361|       |
  362|  21.5k|#ifndef CURL_DISABLE_PROXY
  363|  21.5k|  sslc = &data->set.proxy_ssl;
  364|  21.5k|  if(Curl_ssl_backend() != CURLSSLBACKEND_SCHANNEL) {
  ------------------
  |  Branch (364:6): [True: 21.5k, False: 0]
  ------------------
  365|       |#if defined(USE_APPLE_SECTRUST) || defined(CURL_CA_NATIVE)
  366|       |    if(!sslc->custom_capath && !sslc->custom_cafile && !sslc->custom_cablob)
  367|       |      sslc->native_ca_store = TRUE;
  368|       |#endif
  369|  21.5k|#ifdef CURL_CA_PATH
  370|  21.5k|    if(!sslc->custom_capath && !set->str[STRING_SSL_CAPATH_PROXY]) {
  ------------------
  |  Branch (370:8): [True: 21.1k, False: 373]
  |  Branch (370:32): [True: 10.7k, False: 10.4k]
  ------------------
  371|  10.7k|      result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY],
  372|  10.7k|                              CURL_CA_PATH);
  ------------------
  |  |   32|  10.7k|#define CURL_CA_PATH "/etc/ssl/certs"
  ------------------
  373|  10.7k|      if(result)
  ------------------
  |  Branch (373:10): [True: 0, False: 10.7k]
  ------------------
  374|      0|        return result;
  375|  10.7k|    }
  376|  21.5k|#endif
  377|  21.5k|#ifdef CURL_CA_BUNDLE
  378|  21.5k|    if(!sslc->custom_cafile && !set->str[STRING_SSL_CAFILE_PROXY]) {
  ------------------
  |  Branch (378:8): [True: 19.8k, False: 1.67k]
  |  Branch (378:32): [True: 10.7k, False: 9.07k]
  ------------------
  379|  10.7k|      result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY],
  380|  10.7k|                              CURL_CA_BUNDLE);
  ------------------
  |  |   26|  10.7k|#define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
  ------------------
  381|  10.7k|      if(result)
  ------------------
  |  Branch (381:10): [True: 0, False: 10.7k]
  ------------------
  382|      0|        return result;
  383|  10.7k|    }
  384|  21.5k|#endif
  385|  21.5k|  }
  386|  21.5k|  sslc->primary.CAfile = data->set.str[STRING_SSL_CAFILE_PROXY];
  387|  21.5k|  sslc->primary.CApath = data->set.str[STRING_SSL_CAPATH_PROXY];
  388|  21.5k|  sslc->primary.cipher_list = data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
  389|  21.5k|  sslc->primary.cipher_list13 = data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
  390|  21.5k|  sslc->primary.pinned_key = data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY];
  391|  21.5k|  sslc->primary.cert_blob = data->set.blobs[BLOB_CERT_PROXY];
  392|  21.5k|  sslc->primary.ca_info_blob = data->set.blobs[BLOB_CAINFO_PROXY];
  393|  21.5k|  sslc->primary.issuercert = data->set.str[STRING_SSL_ISSUERCERT_PROXY];
  394|  21.5k|  sslc->primary.issuercert_blob = data->set.blobs[BLOB_SSL_ISSUERCERT_PROXY];
  395|  21.5k|  sslc->primary.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
  396|  21.5k|  sslc->primary.cert_type = data->set.str[STRING_CERT_TYPE_PROXY];
  397|  21.5k|  sslc->primary.key = data->set.str[STRING_KEY_PROXY];
  398|  21.5k|  sslc->primary.key_type = data->set.str[STRING_KEY_TYPE_PROXY];
  399|  21.5k|  sslc->primary.key_passwd = data->set.str[STRING_KEY_PASSWD_PROXY];
  400|  21.5k|  sslc->primary.clientcert = data->set.str[STRING_CERT_PROXY];
  401|  21.5k|  sslc->primary.key_blob = data->set.blobs[BLOB_KEY_PROXY];
  402|  21.5k|#ifdef USE_TLS_SRP
  403|  21.5k|  sslc->primary.username = data->set.str[STRING_TLSAUTH_USERNAME_PROXY];
  404|  21.5k|  sslc->primary.password = data->set.str[STRING_TLSAUTH_PASSWORD_PROXY];
  405|  21.5k|#endif
  406|  21.5k|#endif /* CURL_DISABLE_PROXY */
  407|       |
  408|  21.5k|  return CURLE_OK;
  409|  21.5k|}
Curl_ssl_conn_config_init:
  413|  11.0k|{
  414|       |  /* Clone "primary" SSL configurations from the easy handle to
  415|       |   * the connection. They are used for connection cache matching and
  416|       |   * probably outlive the easy handle */
  417|  11.0k|  if(!clone_ssl_primary_config(&data->set.ssl.primary, &conn->ssl_config))
  ------------------
  |  Branch (417:6): [True: 0, False: 11.0k]
  ------------------
  418|      0|    return CURLE_OUT_OF_MEMORY;
  419|  11.0k|#ifndef CURL_DISABLE_PROXY
  420|  11.0k|  if(!clone_ssl_primary_config(&data->set.proxy_ssl.primary,
  ------------------
  |  Branch (420:6): [True: 0, False: 11.0k]
  ------------------
  421|  11.0k|                               &conn->proxy_ssl_config))
  422|      0|    return CURLE_OUT_OF_MEMORY;
  423|  11.0k|#endif
  424|  11.0k|  return CURLE_OK;
  425|  11.0k|}
Curl_ssl_conn_config_cleanup:
  428|  23.2k|{
  429|  23.2k|  free_primary_ssl_config(&conn->ssl_config);
  430|  23.2k|#ifndef CURL_DISABLE_PROXY
  431|  23.2k|  free_primary_ssl_config(&conn->proxy_ssl_config);
  432|  23.2k|#endif
  433|  23.2k|}
Curl_ssl_conn_config_update:
  436|  2.54k|{
  437|       |  /* May be called on an easy that has no connection yet */
  438|  2.54k|  if(data->conn) {
  ------------------
  |  Branch (438:6): [True: 0, False: 2.54k]
  ------------------
  439|      0|    struct ssl_primary_config *src, *dest;
  440|      0|#ifndef CURL_DISABLE_PROXY
  441|      0|    src = for_proxy ? &data->set.proxy_ssl.primary : &data->set.ssl.primary;
  ------------------
  |  Branch (441:11): [True: 0, False: 0]
  ------------------
  442|      0|    dest = for_proxy ? &data->conn->proxy_ssl_config : &data->conn->ssl_config;
  ------------------
  |  Branch (442:12): [True: 0, False: 0]
  ------------------
  443|       |#else
  444|       |    (void)for_proxy;
  445|       |    src = &data->set.ssl.primary;
  446|       |    dest = &data->conn->ssl_config;
  447|       |#endif
  448|      0|    dest->verifyhost = src->verifyhost;
  449|      0|    dest->verifypeer = src->verifypeer;
  450|      0|    dest->verifystatus = src->verifystatus;
  451|      0|  }
  452|  2.54k|}
Curl_ssl_backend:
  459|  43.0k|{
  460|  43.0k|#ifdef USE_SSL
  461|  43.0k|  multissl_setup(NULL);
  462|  43.0k|  return Curl_ssl->info.id;
  463|       |#else
  464|       |  return CURLSSLBACKEND_NONE;
  465|       |#endif
  466|  43.0k|}
Curl_ssl_init:
  480|      1|{
  481|       |  /* make sure this is only done once */
  482|      1|  if(init_ssl)
  ------------------
  |  Branch (482:6): [True: 0, False: 1]
  ------------------
  483|      0|    return 1;
  484|      1|  init_ssl = TRUE; /* never again */
  ------------------
  |  | 1055|      1|#define TRUE true
  ------------------
  485|       |
  486|      1|  if(Curl_ssl->init)
  ------------------
  |  Branch (486:6): [True: 1, False: 0]
  ------------------
  487|      1|    return Curl_ssl->init();
  488|      0|  return 1;
  489|      1|}
Curl_ssl_close_all:
  555|  33.2k|{
  556|  33.2k|  if(Curl_ssl->close_all)
  ------------------
  |  Branch (556:6): [True: 33.2k, False: 0]
  ------------------
  557|  33.2k|    Curl_ssl->close_all(data);
  558|  33.2k|}
Curl_ssl_adjust_pollset:
  563|    248|{
  564|    248|  struct ssl_connect_data *connssl = cf->ctx;
  565|       |
  566|    248|  if(connssl->io_need) {
  ------------------
  |  Branch (566:6): [True: 248, False: 0]
  ------------------
  567|    248|    curl_socket_t sock = Curl_conn_cf_get_socket(cf->next, data);
  568|    248|    CURLcode result = CURLE_OK;
  569|    248|    if(sock != CURL_SOCKET_BAD) {
  ------------------
  |  |  145|    248|#define CURL_SOCKET_BAD (-1)
  ------------------
  |  Branch (569:8): [True: 248, False: 0]
  ------------------
  570|    248|      if(connssl->io_need & CURL_SSL_IO_NEED_SEND) {
  ------------------
  |  |  107|    248|#define CURL_SSL_IO_NEED_SEND   (1 << 1)
  ------------------
  |  Branch (570:10): [True: 0, False: 248]
  ------------------
  571|      0|        result = Curl_pollset_set_out_only(data, ps, sock);
  ------------------
  |  |  174|      0|  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  284|      0|#define CURL_POLL_OUT    2
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
  |  |  ------------------
  |  |  |  |  283|      0|#define CURL_POLL_IN     1
  |  |  ------------------
  ------------------
  572|      0|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLOUT fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  573|      0|                    sock);
  574|      0|      }
  575|    248|      else {
  576|    248|        result = Curl_pollset_set_in_only(data, ps, sock);
  ------------------
  |  |  172|    248|  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  283|    248|#define CURL_POLL_IN     1
  |  |  ------------------
  |  |                 Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
  |  |  ------------------
  |  |  |  |  284|    248|#define CURL_POLL_OUT    2
  |  |  ------------------
  ------------------
  577|    248|        CURL_TRC_CF(data, cf, "adjust_pollset, POLLIN fd=%" FMT_SOCKET_T,
  ------------------
  |  |  153|    248|  do {                                          \
  |  |  154|    248|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|    248|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|    496|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 248, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 248]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|    496|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|    248|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|    248|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
  578|    248|                    sock);
  579|    248|      }
  580|    248|    }
  581|    248|    return result;
  582|    248|  }
  583|      0|  return CURLE_OK;
  584|    248|}
Curl_ssl_set_engine:
  589|    732|{
  590|    732|  if(Curl_ssl->set_engine)
  ------------------
  |  Branch (590:6): [True: 732, False: 0]
  ------------------
  591|    732|    return Curl_ssl->set_engine(data, engine);
  592|      0|  return CURLE_NOT_BUILT_IN;
  593|    732|}
Curl_ssl_set_engine_default:
  598|      6|{
  599|      6|  if(Curl_ssl->set_engine_default)
  ------------------
  |  Branch (599:6): [True: 6, False: 0]
  ------------------
  600|      6|    return Curl_ssl->set_engine_default(data);
  601|      0|  return CURLE_NOT_BUILT_IN;
  602|      6|}
Curl_ssl_free_certinfo:
  624|  78.8k|{
  625|  78.8k|  struct curl_certinfo *ci = &data->info.certs;
  626|       |
  627|  78.8k|  if(ci->num_of_certs) {
  ------------------
  |  Branch (627:6): [True: 0, False: 78.8k]
  ------------------
  628|       |    /* free all individual lists used */
  629|      0|    int i;
  630|      0|    for(i = 0; i < ci->num_of_certs; i++) {
  ------------------
  |  Branch (630:16): [True: 0, False: 0]
  ------------------
  631|      0|      curl_slist_free_all(ci->certinfo[i]);
  632|      0|      ci->certinfo[i] = NULL;
  633|      0|    }
  634|       |
  635|       |    curlx_safefree(ci->certinfo); /* free the actual array too */
  ------------------
  |  | 1327|      0|  do {                      \
  |  | 1328|      0|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|      0|    (ptr) = NULL;           \
  |  | 1330|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  636|      0|    ci->num_of_certs = 0;
  637|      0|  }
  638|  78.8k|}
Curl_ssl_random:
  696|  8.20k|{
  697|  8.20k|  DEBUGASSERT(length == sizeof(int));
  ------------------
  |  | 1081|  8.20k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (697:3): [True: 0, False: 8.20k]
  |  Branch (697:3): [True: 8.20k, False: 0]
  ------------------
  698|  8.20k|  if(Curl_ssl->random)
  ------------------
  |  Branch (698:6): [True: 8.20k, False: 0]
  ------------------
  699|  8.20k|    return Curl_ssl->random(data, buffer, length);
  700|      0|  else
  701|      0|    return CURLE_NOT_BUILT_IN;
  702|  8.20k|}
Curl_ssl_cert_status_request:
  914|    768|{
  915|    768|  if(Curl_ssl->cert_status_request)
  ------------------
  |  Branch (915:6): [True: 768, False: 0]
  ------------------
  916|    768|    return Curl_ssl->cert_status_request();
  917|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  918|    768|}
Curl_ssl_peer_cleanup:
 1196|  4.20k|{
 1197|  4.20k|  Curl_peer_unlink(&peer->dest);
 1198|  4.20k|  curlx_safefree(peer->sni);
  ------------------
  |  | 1327|  4.20k|  do {                      \
  |  | 1328|  4.20k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.20k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.20k|    (ptr) = NULL;           \
  |  | 1330|  4.20k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.20k]
  |  |  ------------------
  ------------------
 1199|  4.20k|  curlx_safefree(peer->scache_key);
  ------------------
  |  | 1327|  4.20k|  do {                      \
  |  | 1328|  4.20k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  4.20k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  4.20k|    (ptr) = NULL;           \
  |  | 1330|  4.20k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 4.20k]
  |  |  ------------------
  ------------------
 1200|  4.20k|  peer->transport = TRNSPRT_NONE;
  ------------------
  |  |  306|  4.20k|#define TRNSPRT_NONE 0
  ------------------
 1201|  4.20k|  peer->type = CURL_SSL_PEER_DNS;
 1202|  4.20k|}
Curl_ssl_peer_init:
 1240|  2.09k|{
 1241|  2.09k|  struct Curl_peer *dest = NULL;
 1242|  2.09k|  CURLcode result = CURLE_OUT_OF_MEMORY;
 1243|       |
 1244|       |  /* We expect a clean struct, e.g. called only ONCE */
 1245|  2.09k|  DEBUGASSERT(peer);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1245:3): [True: 0, False: 2.09k]
  |  Branch (1245:3): [True: 2.09k, False: 0]
  ------------------
 1246|  2.09k|  DEBUGASSERT(!peer->dest);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1246:3): [True: 0, False: 2.09k]
  |  Branch (1246:3): [True: 2.09k, False: 0]
  ------------------
 1247|  2.09k|  DEBUGASSERT(!peer->sni);
  ------------------
  |  | 1081|  2.09k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1247:3): [True: 0, False: 2.09k]
  |  Branch (1247:3): [True: 2.09k, False: 0]
  ------------------
 1248|       |  /* We need the hostname for SNI negotiation. Once handshaked, this remains
 1249|       |   * the SNI hostname for the TLS connection. When the connection is reused,
 1250|       |   * the settings in cf->conn might change. We keep a copy of the hostname we
 1251|       |   * use for SNI.
 1252|       |   */
 1253|  2.09k|  peer->transport = transport;
 1254|  2.09k|#ifndef CURL_DISABLE_PROXY
 1255|  2.09k|  if(Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1255:6): [True: 2.09k, False: 0]
  ------------------
 1256|  2.09k|    dest = cf->conn->http_proxy.peer;
 1257|  2.09k|  }
 1258|      0|  else
 1259|      0|#endif
 1260|      0|  {
 1261|      0|    dest = cf->conn->origin;
 1262|      0|  }
 1263|       |
 1264|       |  /* hostname MUST exist and not be empty */
 1265|  2.09k|  if(!dest) {
  ------------------
  |  Branch (1265:6): [True: 0, False: 2.09k]
  ------------------
 1266|      0|    result = CURLE_FAILED_INIT;
 1267|      0|    goto out;
 1268|      0|  }
 1269|       |
 1270|  2.09k|  Curl_peer_link(&peer->dest, dest);
 1271|  2.09k|  peer->type = get_peer_type(dest->hostname);
 1272|  2.09k|  if(peer->type == CURL_SSL_PEER_DNS) {
  ------------------
  |  Branch (1272:6): [True: 32, False: 2.06k]
  ------------------
 1273|       |    /* not an IP address, normalize according to RCC 6066 ch. 3,
 1274|       |     * max len of SNI is 2^16-1, no trailing dot */
 1275|     32|    size_t len = strlen(dest->hostname);
 1276|     32|    if(len && (dest->hostname[len - 1] == '.'))
  ------------------
  |  Branch (1276:8): [True: 32, False: 0]
  |  Branch (1276:15): [True: 0, False: 32]
  ------------------
 1277|      0|      len--;
 1278|     32|    if(len < USHRT_MAX) {
  ------------------
  |  Branch (1278:8): [True: 32, False: 0]
  ------------------
 1279|     32|      peer->sni = curlx_calloc(1, len + 1);
  ------------------
  |  | 1480|     32|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
 1280|     32|      if(!peer->sni)
  ------------------
  |  Branch (1280:10): [True: 0, False: 32]
  ------------------
 1281|      0|        goto out;
 1282|     32|      Curl_strntolower(peer->sni, dest->hostname, len);
 1283|     32|      peer->sni[len] = 0;
 1284|     32|    }
 1285|     32|  }
 1286|       |
 1287|  2.09k|  result = Curl_ssl_peer_key_make(cf, peer, tls_id, &peer->scache_key);
 1288|       |
 1289|  2.09k|out:
 1290|  2.09k|  if(result)
  ------------------
  |  Branch (1290:6): [True: 6, False: 2.09k]
  ------------------
 1291|      6|    Curl_ssl_peer_cleanup(peer);
 1292|  2.09k|  return result;
 1293|  2.09k|}
Curl_cf_ssl_proxy_insert_after:
 1810|  2.10k|{
 1811|  2.10k|  struct Curl_cfilter *cf;
 1812|  2.10k|  CURLcode result;
 1813|       |
 1814|  2.10k|  result = cf_ssl_proxy_create(&cf, data, cf_at->conn);
 1815|  2.10k|  if(!result)
  ------------------
  |  Branch (1815:6): [True: 2.10k, False: 0]
  ------------------
 1816|  2.10k|    Curl_conn_cf_insert_after(cf_at, cf);
 1817|  2.10k|  return result;
 1818|  2.10k|}
Curl_ssl_supports:
 1823|  20.6k|{
 1824|  20.6k|  (void)data;
 1825|  20.6k|  return (Curl_ssl->supports & ssl_option);
 1826|  20.6k|}
Curl_ssl_cf_is_proxy:
 1907|  28.9k|{
 1908|  28.9k|  return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  207|  28.9k|#define CF_TYPE_SSL         (1 << 1)
  ------------------
                return (cf->cft->flags & CF_TYPE_SSL) && (cf->cft->flags & CF_TYPE_PROXY);
  ------------------
  |  |  209|  28.9k|#define CF_TYPE_PROXY       (1 << 3)
  ------------------
  |  Branch (1908:10): [True: 28.9k, False: 0]
  |  Branch (1908:44): [True: 28.9k, False: 0]
  ------------------
 1909|  28.9k|}
Curl_ssl_cf_get_config:
 1913|  10.4k|{
 1914|       |#ifdef CURL_DISABLE_PROXY
 1915|       |  (void)cf;
 1916|       |  return &data->set.ssl;
 1917|       |#else
 1918|  10.4k|  return Curl_ssl_cf_is_proxy(cf) ? &data->set.proxy_ssl : &data->set.ssl;
  ------------------
  |  Branch (1918:10): [True: 10.4k, False: 0]
  ------------------
 1919|  10.4k|#endif
 1920|  10.4k|}
Curl_ssl_cf_get_primary_config:
 1924|  16.4k|{
 1925|       |#ifdef CURL_DISABLE_PROXY
 1926|       |  return &cf->conn->ssl_config;
 1927|       |#else
 1928|  16.4k|  return Curl_ssl_cf_is_proxy(cf) ?
  ------------------
  |  Branch (1928:10): [True: 16.4k, False: 0]
  ------------------
 1929|  16.4k|    &cf->conn->proxy_ssl_config : &cf->conn->ssl_config;
 1930|  16.4k|#endif
 1931|  16.4k|}
Curl_alpn_to_proto_buf:
 1935|  1.31k|{
 1936|  1.31k|  size_t i, len;
 1937|  1.31k|  int off = 0;
 1938|  1.31k|  unsigned char blen;
 1939|       |
 1940|  1.31k|  memset(buf, 0, sizeof(*buf));
 1941|  3.33k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1941:14): [True: 3.33k, False: 0]
  |  Branch (1941:22): [True: 2.02k, False: 1.31k]
  ------------------
 1942|  2.02k|    len = strlen(spec->entries[i]);
 1943|  2.02k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  2.02k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1943:8): [True: 0, False: 2.02k]
  ------------------
 1944|      0|      return CURLE_FAILED_INIT;
 1945|  2.02k|    blen = (unsigned char)len;
 1946|  2.02k|    if(off + blen + 1 >= (int)sizeof(buf->data))
  ------------------
  |  Branch (1946:8): [True: 0, False: 2.02k]
  ------------------
 1947|      0|      return CURLE_FAILED_INIT;
 1948|  2.02k|    buf->data[off++] = blen;
 1949|  2.02k|    memcpy(buf->data + off, spec->entries[i], blen);
 1950|  2.02k|    off += blen;
 1951|  2.02k|  }
 1952|  1.31k|  buf->len = off;
 1953|  1.31k|  return CURLE_OK;
 1954|  1.31k|}
Curl_alpn_to_proto_str:
 1958|  1.31k|{
 1959|  1.31k|  size_t i, len;
 1960|  1.31k|  size_t off = 0;
 1961|       |
 1962|  1.31k|  memset(buf, 0, sizeof(*buf));
 1963|  3.33k|  for(i = 0; spec && i < spec->count; ++i) {
  ------------------
  |  Branch (1963:14): [True: 3.33k, False: 0]
  |  Branch (1963:22): [True: 2.02k, False: 1.31k]
  ------------------
 1964|  2.02k|    len = strlen(spec->entries[i]);
 1965|  2.02k|    if(len >= ALPN_NAME_MAX)
  ------------------
  |  |   52|  2.02k|#define ALPN_NAME_MAX      10
  ------------------
  |  Branch (1965:8): [True: 0, False: 2.02k]
  ------------------
 1966|      0|      return CURLE_FAILED_INIT;
 1967|  2.02k|    if(off + len + 2 >= sizeof(buf->data))
  ------------------
  |  Branch (1967:8): [True: 0, False: 2.02k]
  ------------------
 1968|      0|      return CURLE_FAILED_INIT;
 1969|  2.02k|    if(off)
  ------------------
  |  Branch (1969:8): [True: 709, False: 1.31k]
  ------------------
 1970|    709|      buf->data[off++] = ',';
 1971|  2.02k|    memcpy(buf->data + off, spec->entries[i], len);
 1972|  2.02k|    off += len;
 1973|  2.02k|  }
 1974|  1.31k|  buf->data[off] = '\0';
 1975|  1.31k|  buf->len = (int)off;
 1976|  1.31k|  return CURLE_OK;
 1977|  1.31k|}
Curl_alpn_copy:
 2002|  1.31k|{
 2003|  1.31k|  if(src)
  ------------------
  |  Branch (2003:6): [True: 1.31k, False: 1]
  ------------------
 2004|  1.31k|    memcpy(dest, src, sizeof(*dest));
 2005|      1|  else
 2006|      1|    memset(dest, 0, sizeof(*dest));
 2007|  1.31k|}
vtls.c:match_ssl_primary_config:
  197|     59|{
  198|     59|  (void)data;
  199|     59|  if((c1->version == c2->version) &&
  ------------------
  |  Branch (199:6): [True: 59, False: 0]
  ------------------
  200|     59|     (c1->version_max == c2->version_max) &&
  ------------------
  |  Branch (200:6): [True: 59, False: 0]
  ------------------
  201|     59|     (c1->ssl_options == c2->ssl_options) &&
  ------------------
  |  Branch (201:6): [True: 59, False: 0]
  ------------------
  202|     59|     (c1->verifypeer == c2->verifypeer) &&
  ------------------
  |  Branch (202:6): [True: 59, False: 0]
  ------------------
  203|     59|     (c1->verifyhost == c2->verifyhost) &&
  ------------------
  |  Branch (203:6): [True: 59, False: 0]
  ------------------
  204|     59|     (c1->verifystatus == c2->verifystatus) &&
  ------------------
  |  Branch (204:6): [True: 59, False: 0]
  ------------------
  205|     59|     blobcmp(c1->cert_blob, c2->cert_blob) &&
  ------------------
  |  Branch (205:6): [True: 59, False: 0]
  ------------------
  206|     59|     blobcmp(c1->ca_info_blob, c2->ca_info_blob) &&
  ------------------
  |  Branch (206:6): [True: 59, False: 0]
  ------------------
  207|     59|     blobcmp(c1->issuercert_blob, c2->issuercert_blob) &&
  ------------------
  |  Branch (207:6): [True: 59, False: 0]
  ------------------
  208|     59|     blobcmp(c1->key_blob, c2->key_blob) &&
  ------------------
  |  Branch (208:6): [True: 59, False: 0]
  ------------------
  209|     59|     Curl_safecmp(c1->CApath, c2->CApath) &&
  ------------------
  |  Branch (209:6): [True: 59, False: 0]
  ------------------
  210|     59|     Curl_safecmp(c1->CAfile, c2->CAfile) &&
  ------------------
  |  Branch (210:6): [True: 59, False: 0]
  ------------------
  211|     59|     Curl_safecmp(c1->issuercert, c2->issuercert) &&
  ------------------
  |  Branch (211:6): [True: 59, False: 0]
  ------------------
  212|     59|     Curl_safecmp(c1->clientcert, c2->clientcert) &&
  ------------------
  |  Branch (212:6): [True: 59, False: 0]
  ------------------
  213|     59|#ifdef USE_TLS_SRP
  214|     59|     !Curl_timestrcmp(c1->username, c2->username) &&
  ------------------
  |  Branch (214:6): [True: 59, False: 0]
  ------------------
  215|     59|     !Curl_timestrcmp(c1->password, c2->password) &&
  ------------------
  |  Branch (215:6): [True: 59, False: 0]
  ------------------
  216|     59|#endif
  217|     59|     curl_strequal(c1->cipher_list, c2->cipher_list) &&
  ------------------
  |  Branch (217:6): [True: 59, False: 0]
  ------------------
  218|     59|     curl_strequal(c1->cipher_list13, c2->cipher_list13) &&
  ------------------
  |  Branch (218:6): [True: 59, False: 0]
  ------------------
  219|     59|     curl_strequal(c1->curves, c2->curves) &&
  ------------------
  |  Branch (219:6): [True: 59, False: 0]
  ------------------
  220|     59|     curl_strequal(c1->signature_algorithms, c2->signature_algorithms) &&
  ------------------
  |  Branch (220:6): [True: 59, False: 0]
  ------------------
  221|     59|     Curl_safecmp(c1->CRLfile, c2->CRLfile) &&
  ------------------
  |  Branch (221:6): [True: 59, False: 0]
  ------------------
  222|     59|     Curl_safecmp(c1->pinned_key, c2->pinned_key) &&
  ------------------
  |  Branch (222:6): [True: 59, False: 0]
  ------------------
  223|     59|     curl_strequal(c1->cert_type, c2->cert_type) &&
  ------------------
  |  Branch (223:6): [True: 59, False: 0]
  ------------------
  224|     59|     Curl_safecmp(c1->key, c2->key) &&
  ------------------
  |  Branch (224:6): [True: 59, False: 0]
  ------------------
  225|     59|     curl_strequal(c1->key_type, c2->key_type) &&
  ------------------
  |  Branch (225:6): [True: 59, False: 0]
  ------------------
  226|     59|     !Curl_timestrcmp(c1->key_passwd, c2->key_passwd))
  ------------------
  |  Branch (226:6): [True: 59, False: 0]
  ------------------
  227|     59|    return TRUE;
  ------------------
  |  | 1055|     59|#define TRUE true
  ------------------
  228|       |
  229|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  230|     59|}
vtls.c:blobcmp:
  122|    236|{
  123|    236|  if(!first && !second) /* both are NULL */
  ------------------
  |  Branch (123:6): [True: 236, False: 0]
  |  Branch (123:16): [True: 236, False: 0]
  ------------------
  124|    236|    return TRUE;
  ------------------
  |  | 1055|    236|#define TRUE true
  ------------------
  125|      0|  if(!first || !second) /* one is NULL */
  ------------------
  |  Branch (125:6): [True: 0, False: 0]
  |  Branch (125:16): [True: 0, False: 0]
  ------------------
  126|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  127|      0|  if(first->len != second->len) /* different sizes */
  ------------------
  |  Branch (127:6): [True: 0, False: 0]
  ------------------
  128|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  129|      0|  return !memcmp(first->data, second->data, first->len); /* same data */
  130|      0|}
vtls.c:clone_ssl_primary_config:
  249|  22.0k|{
  250|  22.0k|  dest->version = source->version;
  251|  22.0k|  dest->version_max = source->version_max;
  252|  22.0k|  dest->verifypeer = source->verifypeer;
  253|  22.0k|  dest->verifyhost = source->verifyhost;
  254|  22.0k|  dest->verifystatus = source->verifystatus;
  255|  22.0k|  dest->cache_session = source->cache_session;
  256|  22.0k|  dest->ssl_options = source->ssl_options;
  257|       |
  258|  22.0k|  CLONE_BLOB(cert_blob);
  ------------------
  |  |   94|  22.0k|  do {                                   \
  |  |   95|  22.0k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   96|  22.0k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  259|  22.0k|  CLONE_BLOB(ca_info_blob);
  ------------------
  |  |   94|  22.0k|  do {                                   \
  |  |   95|  22.0k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   96|  22.0k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  260|  22.0k|  CLONE_BLOB(issuercert_blob);
  ------------------
  |  |   94|  22.0k|  do {                                   \
  |  |   95|  22.0k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   96|  22.0k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  261|  22.0k|  CLONE_BLOB(key_blob);
  ------------------
  |  |   94|  22.0k|  do {                                   \
  |  |   95|  22.0k|    if(blobdup(&dest->var, source->var)) \
  |  |  ------------------
  |  |  |  Branch (95:8): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   96|  22.0k|      return FALSE;                      \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   97|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (97:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  262|  22.0k|  CLONE_STRING(CApath);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 22.0k, False: 0]
  |  |  ------------------
  |  |   85|  22.0k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|  22.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|  22.0k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   87|  22.0k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|  22.0k|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  263|  22.0k|  CLONE_STRING(CAfile);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 22.0k, False: 0]
  |  |  ------------------
  |  |   85|  22.0k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|  22.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|  22.0k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   87|  22.0k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|  22.0k|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  264|  22.0k|  CLONE_STRING(issuercert);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 62, False: 21.9k]
  |  |  ------------------
  |  |   85|     62|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     62|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     62|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 62]
  |  |  ------------------
  |  |   87|     62|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     62|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  265|  22.0k|  CLONE_STRING(clientcert);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 36, False: 22.0k]
  |  |  ------------------
  |  |   85|     36|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     36|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     36|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 36]
  |  |  ------------------
  |  |   87|     36|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     36|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  266|  22.0k|  CLONE_STRING(cipher_list);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 879, False: 21.1k]
  |  |  ------------------
  |  |   85|    879|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|    879|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|    879|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 879]
  |  |  ------------------
  |  |   87|    879|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|    879|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  267|  22.0k|  CLONE_STRING(cipher_list13);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 188, False: 21.8k]
  |  |  ------------------
  |  |   85|    188|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|    188|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|    188|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 188]
  |  |  ------------------
  |  |   87|    188|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|    188|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  268|  22.0k|  CLONE_STRING(pinned_key);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 87, False: 21.9k]
  |  |  ------------------
  |  |   85|     87|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     87|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     87|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 87]
  |  |  ------------------
  |  |   87|     87|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     87|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  269|  22.0k|  CLONE_STRING(curves);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 51, False: 22.0k]
  |  |  ------------------
  |  |   85|     51|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     51|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     51|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 51]
  |  |  ------------------
  |  |   87|     51|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     51|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  270|  22.0k|  CLONE_STRING(signature_algorithms);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 0, False: 22.0k]
  |  |  ------------------
  |  |   85|      0|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|      0|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 0]
  |  |  ------------------
  |  |   87|      0|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|      0|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  271|  22.0k|  CLONE_STRING(CRLfile);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 11.0k, False: 10.9k]
  |  |  ------------------
  |  |   85|  11.0k|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|  11.0k|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|  11.0k|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 11.0k]
  |  |  ------------------
  |  |   87|  11.0k|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|  11.0k|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  272|  22.0k|  CLONE_STRING(cert_type);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 57, False: 21.9k]
  |  |  ------------------
  |  |   85|     57|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     57|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     57|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 57]
  |  |  ------------------
  |  |   87|     57|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     57|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  273|  22.0k|  CLONE_STRING(key);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 50, False: 22.0k]
  |  |  ------------------
  |  |   85|     50|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     50|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     50|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 50]
  |  |  ------------------
  |  |   87|     50|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     50|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  274|  22.0k|  CLONE_STRING(key_type);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 18, False: 22.0k]
  |  |  ------------------
  |  |   85|     18|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     18|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     18|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 18]
  |  |  ------------------
  |  |   87|     18|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     18|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  275|  22.0k|  CLONE_STRING(key_passwd);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 39, False: 22.0k]
  |  |  ------------------
  |  |   85|     39|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     39|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     39|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 39]
  |  |  ------------------
  |  |   87|     39|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     39|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  276|  22.0k|#ifdef USE_TLS_SRP
  277|  22.0k|  CLONE_STRING(username);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 101, False: 21.9k]
  |  |  ------------------
  |  |   85|    101|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|    101|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|    101|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 101]
  |  |  ------------------
  |  |   87|    101|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|    101|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  278|  22.0k|  CLONE_STRING(password);
  ------------------
  |  |   83|  22.0k|  do {                                       \
  |  |   84|  22.0k|    if(source->var) {                        \
  |  |  ------------------
  |  |  |  Branch (84:8): [True: 34, False: 22.0k]
  |  |  ------------------
  |  |   85|     34|      dest->var = curlx_strdup(source->var); \
  |  |  ------------------
  |  |  |  | 1477|     34|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  |   86|     34|      if(!dest->var)                         \
  |  |  ------------------
  |  |  |  Branch (86:10): [True: 0, False: 34]
  |  |  ------------------
  |  |   87|     34|        return FALSE;                        \
  |  |  ------------------
  |  |  |  | 1058|      0|#define FALSE false
  |  |  ------------------
  |  |   88|     34|    }                                        \
  |  |   89|  22.0k|    else                                     \
  |  |   90|  22.0k|      dest->var = NULL;                      \
  |  |   91|  22.0k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (91:11): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
  279|  22.0k|#endif
  280|       |
  281|  22.0k|  return TRUE;
  ------------------
  |  | 1055|  22.0k|#define TRUE true
  ------------------
  282|  22.0k|}
vtls.c:blobdup:
  100|  88.2k|{
  101|  88.2k|  DEBUGASSERT(dest);
  ------------------
  |  | 1081|  88.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (101:3): [True: 0, False: 88.2k]
  |  Branch (101:3): [True: 88.2k, False: 0]
  ------------------
  102|  88.2k|  DEBUGASSERT(!*dest);
  ------------------
  |  | 1081|  88.2k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (102:3): [True: 0, False: 88.2k]
  |  Branch (102:3): [True: 88.2k, False: 0]
  ------------------
  103|  88.2k|  if(src) {
  ------------------
  |  Branch (103:6): [True: 0, False: 88.2k]
  ------------------
  104|       |    /* only if there is data to dupe! */
  105|      0|    struct curl_blob *d;
  106|      0|    d = curlx_malloc(sizeof(struct curl_blob) + src->len);
  ------------------
  |  | 1478|      0|#define curlx_malloc(size)         curl_dbg_malloc(size, __LINE__, __FILE__)
  ------------------
  107|      0|    if(!d)
  ------------------
  |  Branch (107:8): [True: 0, False: 0]
  ------------------
  108|      0|      return CURLE_OUT_OF_MEMORY;
  109|      0|    d->len = src->len;
  110|       |    /* Always duplicate because the connection may survive longer than the
  111|       |       handle that passed in the blob. */
  112|      0|    d->flags = CURL_BLOB_COPY;
  ------------------
  |  |   31|      0|#define CURL_BLOB_COPY   1 /* tell libcurl to copy the data */
  ------------------
  113|      0|    d->data = (void *)((char *)d + sizeof(struct curl_blob));
  114|      0|    memcpy(d->data, src->data, src->len);
  115|      0|    *dest = d;
  116|      0|  }
  117|  88.2k|  return CURLE_OK;
  118|  88.2k|}
vtls.c:free_primary_ssl_config:
  285|  46.5k|{
  286|  46.5k|  curlx_safefree(sslc->CApath);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  287|  46.5k|  curlx_safefree(sslc->CAfile);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  288|  46.5k|  curlx_safefree(sslc->issuercert);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  289|  46.5k|  curlx_safefree(sslc->clientcert);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  290|  46.5k|  curlx_safefree(sslc->cipher_list);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  291|  46.5k|  curlx_safefree(sslc->cipher_list13);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  292|  46.5k|  curlx_safefree(sslc->pinned_key);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  293|  46.5k|  curlx_safefree(sslc->cert_blob);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  294|  46.5k|  curlx_safefree(sslc->ca_info_blob);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  295|  46.5k|  curlx_safefree(sslc->issuercert_blob);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  296|  46.5k|  curlx_safefree(sslc->key_blob);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  297|  46.5k|  curlx_safefree(sslc->curves);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  298|  46.5k|  curlx_safefree(sslc->signature_algorithms);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  299|  46.5k|  curlx_safefree(sslc->CRLfile);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  300|  46.5k|  curlx_safefree(sslc->cert_type);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  301|  46.5k|  curlx_safefree(sslc->key);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  302|  46.5k|  curlx_safefree(sslc->key_type);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  303|  46.5k|  curlx_safefree(sslc->key_passwd);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  304|  46.5k|#ifdef USE_TLS_SRP
  305|  46.5k|  curlx_safefree(sslc->username);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  306|       |  curlx_safefree(sslc->password);
  ------------------
  |  | 1327|  46.5k|  do {                      \
  |  | 1328|  46.5k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  46.5k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  46.5k|    (ptr) = NULL;           \
  |  | 1330|  46.5k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 46.5k]
  |  |  ------------------
  ------------------
  307|  46.5k|#endif
  308|  46.5k|}
vtls.c:multissl_setup:
 1107|  43.0k|{
 1108|  43.0k|  int i;
 1109|  43.0k|  char *env;
 1110|       |
 1111|  43.0k|  if(Curl_ssl != &Curl_ssl_multi)
  ------------------
  |  Branch (1111:6): [True: 43.0k, False: 0]
  ------------------
 1112|  43.0k|    return 1;
 1113|       |
 1114|      0|  if(backend) {
  ------------------
  |  Branch (1114:6): [True: 0, False: 0]
  ------------------
 1115|      0|    Curl_ssl = backend;
 1116|      0|    return 0;
 1117|      0|  }
 1118|       |
 1119|      0|  if(!available_backends[0])
  ------------------
  |  Branch (1119:6): [True: 0, False: 0]
  ------------------
 1120|      0|    return 1;
 1121|       |
 1122|      0|  env = curl_getenv("CURL_SSL_BACKEND");
 1123|      0|  if(env) {
  ------------------
  |  Branch (1123:6): [True: 0, False: 0]
  ------------------
 1124|      0|    for(i = 0; available_backends[i]; i++) {
  ------------------
  |  Branch (1124:16): [True: 0, False: 0]
  ------------------
 1125|      0|      if(curl_strequal(env, available_backends[i]->info.name)) {
  ------------------
  |  Branch (1125:10): [True: 0, False: 0]
  ------------------
 1126|      0|        Curl_ssl = available_backends[i];
 1127|      0|        curlx_free(env);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1128|      0|        return 0;
 1129|      0|      }
 1130|      0|    }
 1131|      0|  }
 1132|       |
 1133|       |#ifdef CURL_DEFAULT_SSL_BACKEND
 1134|       |  for(i = 0; available_backends[i]; i++) {
 1135|       |    if(curl_strequal(CURL_DEFAULT_SSL_BACKEND,
 1136|       |                     available_backends[i]->info.name)) {
 1137|       |      Curl_ssl = available_backends[i];
 1138|       |      curlx_free(env);
 1139|       |      return 0;
 1140|       |    }
 1141|       |  }
 1142|       |#endif
 1143|       |
 1144|       |  /* Fall back to first available backend */
 1145|      0|  Curl_ssl = available_backends[0];
 1146|      0|  curlx_free(env);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
 1147|      0|  return 0;
 1148|      0|}
vtls.c:get_peer_type:
 1218|  2.09k|{
 1219|  2.09k|  if(hostname && hostname[0]) {
  ------------------
  |  Branch (1219:6): [True: 2.09k, False: 0]
  |  Branch (1219:18): [True: 2.09k, False: 0]
  ------------------
 1220|  2.09k|#ifdef USE_IPV6
 1221|  2.09k|    struct in6_addr addr;
 1222|       |#else
 1223|       |    struct in_addr addr;
 1224|       |#endif
 1225|  2.09k|    if(curlx_inet_pton(AF_INET, hostname, &addr))
  ------------------
  |  |   43|  2.09k|  inet_pton(x, y, z)
  |  |  ------------------
  |  |  |  Branch (43:3): [True: 2.06k, False: 32]
  |  |  ------------------
  ------------------
 1226|  2.06k|      return CURL_SSL_PEER_IPV4;
 1227|     32|#ifdef USE_IPV6
 1228|     32|    else if(curlx_inet_pton(AF_INET6, hostname, &addr)) {
  ------------------
  |  |   43|     32|  inet_pton(x, y, z)
  |  |  ------------------
  |  |  |  Branch (43:3): [True: 0, False: 32]
  |  |  ------------------
  ------------------
 1229|      0|      return CURL_SSL_PEER_IPV6;
 1230|      0|    }
 1231|  2.09k|#endif
 1232|  2.09k|  }
 1233|     32|  return CURL_SSL_PEER_DNS;
 1234|  2.09k|}
vtls.c:ssl_cf_destroy:
 1296|  2.10k|{
 1297|  2.10k|  struct cf_call_data save;
 1298|       |
 1299|  2.10k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|  2.10k|  do { \
  |  |  671|  2.10k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  2.10k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.10k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|  2.10k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|  2.10k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  866|  2.10k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|  2.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
  |  Branch (1299:3): [True: 2.10k, False: 0]
  |  Branch (1299:3): [True: 0, False: 0]
  |  Branch (1299:3): [True: 2.10k, False: 0]
  |  Branch (1299:3): [True: 0, False: 0]
  ------------------
 1300|  2.10k|  cf_close(cf, data);
 1301|  2.10k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|  2.10k|  do { \
  |  |  679|  2.10k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|  2.10k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  2.10k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.10k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|  2.10k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|  2.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
  |  Branch (1301:3): [True: 0, False: 2.10k]
  |  Branch (1301:3): [True: 2.10k, False: 0]
  |  Branch (1301:3): [True: 2.10k, False: 0]
  |  Branch (1301:3): [True: 0, False: 0]
  |  Branch (1301:3): [True: 2.10k, False: 0]
  |  Branch (1301:3): [True: 0, False: 0]
  ------------------
 1302|  2.10k|  cf_ctx_free(cf->ctx);
 1303|       |  cf->ctx = NULL;
 1304|  2.10k|}
vtls.c:cf_close:
 1205|  4.20k|{
 1206|  4.20k|  struct ssl_connect_data *connssl = cf->ctx;
 1207|  4.20k|  if(connssl) {
  ------------------
  |  Branch (1207:6): [True: 4.20k, False: 0]
  ------------------
 1208|  4.20k|    connssl->ssl_impl->close(cf, data);
 1209|  4.20k|    connssl->state = ssl_connection_none;
 1210|  4.20k|    connssl->connecting_state = ssl_connect_1;
 1211|  4.20k|    connssl->prefs_checked = FALSE;
  ------------------
  |  | 1058|  4.20k|#define FALSE false
  ------------------
 1212|  4.20k|    Curl_ssl_peer_cleanup(&connssl->peer);
 1213|  4.20k|  }
 1214|       |  cf->connected = FALSE;
  ------------------
  |  | 1058|  4.20k|#define FALSE false
  ------------------
 1215|  4.20k|}
vtls.c:cf_ctx_free:
  537|  2.10k|{
  538|  2.10k|  if(ctx) {
  ------------------
  |  Branch (538:6): [True: 2.10k, False: 0]
  ------------------
  539|  2.10k|    curlx_safefree(ctx->negotiated.alpn);
  ------------------
  |  | 1327|  2.10k|  do {                      \
  |  | 1328|  2.10k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|  2.10k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|  2.10k|    (ptr) = NULL;           \
  |  | 1330|  2.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
  540|  2.10k|    Curl_bufq_free(&ctx->earlydata);
  541|  2.10k|    curlx_free(ctx->backend);
  ------------------
  |  | 1483|  2.10k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  542|  2.10k|    curlx_free(ctx);
  ------------------
  |  | 1483|  2.10k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  543|  2.10k|  }
  544|  2.10k|}
vtls.c:ssl_cf_connect:
 1321|  2.34k|{
 1322|  2.34k|  struct ssl_connect_data *connssl = cf->ctx;
 1323|  2.34k|  struct cf_call_data save;
 1324|  2.34k|  CURLcode result;
 1325|       |
 1326|  2.34k|  if(cf->connected && (connssl->state != ssl_connection_deferred)) {
  ------------------
  |  Branch (1326:6): [True: 0, False: 2.34k]
  |  Branch (1326:23): [True: 0, False: 0]
  ------------------
 1327|      0|    *done = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1328|      0|    return CURLE_OK;
 1329|      0|  }
 1330|       |
 1331|  2.34k|  if(!cf->next) {
  ------------------
  |  Branch (1331:6): [True: 0, False: 2.34k]
  ------------------
 1332|      0|    *done = FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
 1333|      0|    return CURLE_FAILED_INIT;
 1334|      0|  }
 1335|       |
 1336|  2.34k|  if(!cf->next->connected) {
  ------------------
  |  Branch (1336:6): [True: 0, False: 2.34k]
  ------------------
 1337|      0|    result = cf->next->cft->do_connect(cf->next, data, done);
 1338|      0|    if(result || !*done)
  ------------------
  |  Branch (1338:8): [True: 0, False: 0]
  |  Branch (1338:18): [True: 0, False: 0]
  ------------------
 1339|      0|      return result;
 1340|      0|  }
 1341|       |
 1342|  2.34k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|  2.34k|  do { \
  |  |  671|  2.34k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|  2.34k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  2.34k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.34k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|  2.34k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|  2.34k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|  2.34k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|  2.34k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  866|  2.34k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|  2.34k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
  |  Branch (1342:3): [True: 2.34k, False: 0]
  |  Branch (1342:3): [True: 0, False: 0]
  |  Branch (1342:3): [True: 2.34k, False: 0]
  |  Branch (1342:3): [True: 0, False: 0]
  ------------------
 1343|  2.34k|  CURL_TRC_CF(data, cf, "cf_connect()");
  ------------------
  |  |  153|  2.34k|  do {                                          \
  |  |  154|  2.34k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.34k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.69k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.34k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.69k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.34k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.34k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.34k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
 1344|  2.34k|  DEBUGASSERT(connssl);
  ------------------
  |  | 1081|  2.34k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1344:3): [True: 0, False: 2.34k]
  |  Branch (1344:3): [True: 2.34k, False: 0]
  ------------------
 1345|       |
 1346|  2.34k|  *done = FALSE;
  ------------------
  |  | 1058|  2.34k|#define FALSE false
  ------------------
 1347|       |
 1348|  2.34k|  if(!connssl->prefs_checked) {
  ------------------
  |  Branch (1348:6): [True: 2.10k, False: 246]
  ------------------
 1349|  2.10k|    if(!ssl_prefs_check(data)) {
  ------------------
  |  Branch (1349:8): [True: 1, False: 2.09k]
  ------------------
 1350|      1|      result = CURLE_SSL_CONNECT_ERROR;
 1351|      1|      goto out;
 1352|      1|    }
 1353|  2.09k|    connssl->prefs_checked = TRUE;
  ------------------
  |  | 1055|  2.09k|#define TRUE true
  ------------------
 1354|  2.09k|  }
 1355|       |
 1356|  2.34k|  if(!connssl->peer.dest) {
  ------------------
  |  Branch (1356:6): [True: 2.09k, False: 246]
  ------------------
 1357|  2.09k|    char tls_id[80];
 1358|  2.09k|    connssl->ssl_impl->version(tls_id, sizeof(tls_id) - 1);
 1359|  2.09k|    result = Curl_ssl_peer_init(&connssl->peer, cf, tls_id, TRNSPRT_TCP);
  ------------------
  |  |  307|  2.09k|#define TRNSPRT_TCP  3
  ------------------
 1360|  2.09k|    if(result)
  ------------------
  |  Branch (1360:8): [True: 6, False: 2.09k]
  ------------------
 1361|      6|      goto out;
 1362|  2.09k|  }
 1363|       |
 1364|  2.33k|  result = connssl->ssl_impl->do_connect(cf, data, done);
 1365|       |
 1366|  2.33k|  if(!result && *done) {
  ------------------
  |  Branch (1366:6): [True: 248, False: 2.09k]
  |  Branch (1366:17): [True: 0, False: 248]
  ------------------
 1367|      0|    cf->connected = TRUE;
  ------------------
  |  | 1055|      0|#define TRUE true
  ------------------
 1368|      0|    if(connssl->state == ssl_connection_complete) {
  ------------------
  |  Branch (1368:8): [True: 0, False: 0]
  ------------------
 1369|      0|      connssl->handshake_done = *Curl_pgrs_now(data);
 1370|      0|    }
 1371|      0|    if(Curl_tls_keylog_enabled()) {
  ------------------
  |  Branch (1371:8): [True: 0, False: 0]
  ------------------
 1372|      0|      infof(data, "SSLKEYLOGFILE set, all TLS secrets are logged to '%s'",
  ------------------
  |  |  143|      0|  do {                               \
  |  |  144|      0|    if(Curl_trc_is_verbose(data))    \
  |  |  ------------------
  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  145|      0|      Curl_infof(data, __VA_ARGS__); \
  |  |  146|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (146:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1373|      0|            Curl_tls_keylog_file_name());
 1374|       |#ifdef LIBRESSL_VERSION_NUMBER
 1375|       |      infof(data, "Note LibreSSL only supports SSLKEYLOGFILE for TLS <= 1.2");
 1376|       |#endif
 1377|      0|    }
 1378|       |    /* Connection can be deferred when sending early data */
 1379|      0|    DEBUGASSERT(connssl->state == ssl_connection_complete ||
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1379:5): [True: 0, False: 0]
  |  Branch (1379:5): [True: 0, False: 0]
  |  Branch (1379:5): [True: 0, False: 0]
  |  Branch (1379:5): [True: 0, False: 0]
  ------------------
 1380|      0|                connssl->state == ssl_connection_deferred);
 1381|      0|    DEBUGASSERT(connssl->state != ssl_connection_deferred ||
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1381:5): [True: 0, False: 0]
  |  Branch (1381:5): [True: 0, False: 0]
  |  Branch (1381:5): [True: 0, False: 0]
  |  Branch (1381:5): [True: 0, False: 0]
  ------------------
 1382|      0|                connssl->earlydata_state > ssl_earlydata_none);
 1383|      0|  }
 1384|  2.34k|out:
 1385|  2.34k|  CURL_TRC_CF(data, cf, "cf_connect() -> %d, done=%d", result, *done);
  ------------------
  |  |  153|  2.34k|  do {                                          \
  |  |  154|  2.34k|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|  2.34k|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  4.69k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 2.34k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 2.34k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  4.69k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|  2.34k|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|  2.34k|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|  2.34k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
 1386|  2.34k|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|  2.34k|  do { \
  |  |  679|  2.34k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|  2.34k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  2.34k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.34k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|  2.34k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|  2.34k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|  2.34k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 2.34k]
  |  |  ------------------
  ------------------
  |  Branch (1386:3): [True: 0, False: 2.34k]
  |  Branch (1386:3): [True: 2.34k, False: 0]
  |  Branch (1386:3): [True: 2.34k, False: 0]
  |  Branch (1386:3): [True: 0, False: 0]
  |  Branch (1386:3): [True: 2.34k, False: 0]
  |  Branch (1386:3): [True: 0, False: 0]
  ------------------
 1387|  2.34k|  return result;
 1388|  2.34k|}
vtls.c:ssl_prefs_check:
  492|  2.10k|{
  493|       |  /* check for CURLOPT_SSLVERSION invalid parameter value */
  494|  2.10k|  const unsigned char sslver = data->set.ssl.primary.version;
  495|  2.10k|  if(sslver >= CURL_SSLVERSION_LAST) {
  ------------------
  |  | 2377|  2.10k|#define CURL_SSLVERSION_LAST    8L /* never use, keep last */
  ------------------
  |  Branch (495:6): [True: 0, False: 2.10k]
  ------------------
  496|      0|    failf(data, "Unrecognized parameter value passed via CURLOPT_SSLVERSION");
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  497|      0|    return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  498|      0|  }
  499|       |
  500|  2.10k|  switch(data->set.ssl.primary.version_max) {
  501|  2.09k|  case CURL_SSLVERSION_MAX_NONE:
  ------------------
  |  | 2379|  2.09k|#define CURL_SSLVERSION_MAX_NONE 0L
  ------------------
  |  Branch (501:3): [True: 2.09k, False: 3]
  ------------------
  502|  2.09k|  case CURL_SSLVERSION_MAX_DEFAULT:
  ------------------
  |  | 2380|  2.09k|#define CURL_SSLVERSION_MAX_DEFAULT (CURL_SSLVERSION_TLSv1   << 16)
  |  |  ------------------
  |  |  |  | 2369|  2.09k|#define CURL_SSLVERSION_TLSv1   1L /* TLS 1.x */
  |  |  ------------------
  ------------------
  |  Branch (502:3): [True: 1, False: 2.09k]
  ------------------
  503|  2.09k|    break;
  504|       |
  505|      2|  default:
  ------------------
  |  Branch (505:3): [True: 2, False: 2.09k]
  ------------------
  506|      2|    if((data->set.ssl.primary.version_max >> 16) < sslver) {
  ------------------
  |  Branch (506:8): [True: 1, False: 1]
  ------------------
  507|      1|      failf(data, "CURL_SSLVERSION_MAX incompatible with CURL_SSLVERSION");
  ------------------
  |  |   62|      1|#define failf Curl_failf
  ------------------
  508|      1|      return FALSE;
  ------------------
  |  | 1058|      1|#define FALSE false
  ------------------
  509|      1|    }
  510|  2.10k|  }
  511|       |
  512|  2.09k|  return TRUE;
  ------------------
  |  | 1055|  2.09k|#define TRUE true
  ------------------
  513|  2.10k|}
vtls.c:ssl_cf_close:
 1308|  2.10k|{
 1309|  2.10k|  struct cf_call_data save;
 1310|       |
 1311|  2.10k|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|  2.10k|  do { \
  |  |  671|  2.10k|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|  2.10k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.10k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|  2.10k|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|  2.10k|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  866|  2.10k|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|  2.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
  |  Branch (1311:3): [True: 2.10k, False: 0]
  |  Branch (1311:3): [True: 0, False: 0]
  |  Branch (1311:3): [True: 2.10k, False: 0]
  |  Branch (1311:3): [True: 0, False: 0]
  ------------------
 1312|  2.10k|  cf_close(cf, data);
 1313|  2.10k|  if(cf->next)
  ------------------
  |  Branch (1313:6): [True: 2.10k, False: 0]
  ------------------
 1314|  2.10k|    cf->next->cft->do_close(cf->next, data);
 1315|       |  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|  2.10k|  do { \
  |  |  679|  2.10k|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|  2.10k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|  2.10k|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|  2.10k|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|  2.10k|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|  2.10k|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|  2.10k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 2.10k]
  |  |  ------------------
  ------------------
  |  Branch (1315:3): [True: 0, False: 2.10k]
  |  Branch (1315:3): [True: 2.10k, False: 0]
  |  Branch (1315:3): [True: 2.10k, False: 0]
  |  Branch (1315:3): [True: 0, False: 0]
  |  Branch (1315:3): [True: 2.10k, False: 0]
  |  Branch (1315:3): [True: 0, False: 0]
  ------------------
 1316|  2.10k|}
vtls.c:ssl_cf_adjust_pollset:
 1585|    248|{
 1586|    248|  struct ssl_connect_data *connssl = cf->ctx;
 1587|    248|  struct cf_call_data save;
 1588|    248|  CURLcode result;
 1589|       |
 1590|    248|  CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|    248|  do { \
  |  |  671|    248|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|    248|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|    248|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|    248|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|    248|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|    248|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|    248|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|    248|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  866|    248|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
  |  Branch (1590:3): [True: 248, False: 0]
  |  Branch (1590:3): [True: 0, False: 0]
  |  Branch (1590:3): [True: 248, False: 0]
  |  Branch (1590:3): [True: 0, False: 0]
  ------------------
 1591|    248|  result = connssl->ssl_impl->adjust_pollset(cf, data, ps);
 1592|    248|  CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|    248|  do { \
  |  |  679|    248|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|    248|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|    248|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|    248|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|    248|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|    248|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|    248|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 248]
  |  |  ------------------
  ------------------
  |  Branch (1592:3): [True: 0, False: 248]
  |  Branch (1592:3): [True: 248, False: 0]
  |  Branch (1592:3): [True: 248, False: 0]
  |  Branch (1592:3): [True: 0, False: 0]
  |  Branch (1592:3): [True: 248, False: 0]
  |  Branch (1592:3): [True: 0, False: 0]
  ------------------
 1593|    248|  return result;
 1594|    248|}
vtls.c:ssl_cf_query:
 1599|  4.69k|{
 1600|  4.69k|  struct ssl_connect_data *connssl = cf->ctx;
 1601|       |
 1602|  4.69k|  switch(query) {
 1603|  2.09k|  case CF_QUERY_TIMER_APPCONNECT: {
  ------------------
  |  |  169|  2.09k|#define CF_QUERY_TIMER_APPCONNECT   5  /* -          struct curltime */
  ------------------
  |  Branch (1603:3): [True: 2.09k, False: 2.59k]
  ------------------
 1604|  2.09k|    struct curltime *when = pres2;
 1605|  2.09k|    if(cf->connected && !Curl_ssl_cf_is_proxy(cf))
  ------------------
  |  Branch (1605:8): [True: 0, False: 2.09k]
  |  Branch (1605:25): [True: 0, False: 0]
  ------------------
 1606|      0|      *when = connssl->handshake_done;
 1607|  2.09k|    return CURLE_OK;
 1608|      0|  }
 1609|      0|  case CF_QUERY_SSL_INFO:
  ------------------
  |  |  178|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1609:3): [True: 0, False: 4.69k]
  ------------------
 1610|      0|  case CF_QUERY_SSL_CTX_INFO:
  ------------------
  |  |  179|      0|#define CF_QUERY_SSL_CTX_INFO      13  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1610:3): [True: 0, False: 4.69k]
  ------------------
 1611|      0|    if(!Curl_ssl_cf_is_proxy(cf)) {
  ------------------
  |  Branch (1611:8): [True: 0, False: 0]
  ------------------
 1612|      0|      struct curl_tlssessioninfo *info = pres2;
 1613|      0|      struct cf_call_data save;
 1614|      0|      CF_DATA_SAVE(save, cf, data);
  ------------------
  |  |  670|      0|  do { \
  |  |  671|      0|    (save) = CF_CTX_CALL_DATA(cf); \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  672|      0|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  673|      0|    CF_CTX_CALL_DATA(cf).depth++;  \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  674|      0|    CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |                   CF_CTX_CALL_DATA(cf).data = (struct Curl_easy *)CURL_UNCONST(data); \
  |  |  ------------------
  |  |  |  |  866|      0|#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
  |  |  ------------------
  |  |  675|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (675:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1614:7): [True: 0, False: 0]
  |  Branch (1614:7): [True: 0, False: 0]
  |  Branch (1614:7): [True: 0, False: 0]
  |  Branch (1614:7): [True: 0, False: 0]
  ------------------
 1615|      0|      info->backend = Curl_ssl_backend();
 1616|      0|      info->internals = connssl->ssl_impl->get_internals(
 1617|      0|        cf->ctx, (query == CF_QUERY_SSL_INFO) ?
  ------------------
  |  |  178|      0|#define CF_QUERY_SSL_INFO          12  /* -    struct curl_tlssessioninfo * */
  ------------------
  |  Branch (1617:18): [True: 0, False: 0]
  ------------------
 1618|      0|        CURLINFO_TLS_SSL_PTR : CURLINFO_TLS_SESSION);
 1619|      0|      CF_DATA_RESTORE(cf, save);
  ------------------
  |  |  678|      0|  do { \
  |  |  679|      0|    DEBUGASSERT(CF_CTX_CALL_DATA(cf).depth == (save).depth + 1); \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  680|      0|    DEBUGASSERT((save).data == NULL || (save).depth > 0); \
  |  |  ------------------
  |  |  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  |  |  ------------------
  |  |  681|      0|    CF_CTX_CALL_DATA(cf) = (save); \
  |  |  ------------------
  |  |  |  |  213|      0|#define CF_CTX_CALL_DATA(cf) ((struct ssl_connect_data *)(cf)->ctx)->call_data
  |  |  ------------------
  |  |  682|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (682:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  |  Branch (1619:7): [True: 0, False: 0]
  ------------------
 1620|      0|      return CURLE_OK;
 1621|      0|    }
 1622|      0|    break;
 1623|      0|  case CF_QUERY_ALPN_NEGOTIATED: {
  ------------------
  |  |  181|      0|#define CF_QUERY_ALPN_NEGOTIATED   15  /* -          const char * */
  ------------------
  |  Branch (1623:3): [True: 0, False: 4.69k]
  ------------------
 1624|      0|    const char **palpn = pres2;
 1625|      0|    DEBUGASSERT(palpn);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (1625:5): [True: 0, False: 0]
  |  Branch (1625:5): [True: 0, False: 0]
  ------------------
 1626|      0|    *palpn = connssl->negotiated.alpn;
 1627|      0|    CURL_TRC_CF(data, cf, "query ALPN: returning '%s'", *palpn);
  ------------------
  |  |  153|      0|  do {                                          \
  |  |  154|      0|    if(Curl_trc_cf_is_verbose(cf, data))        \
  |  |  ------------------
  |  |  |  |  323|      0|  (Curl_trc_is_verbose(data) &&                       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  324|      0|   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (324:4): [True: 0, False: 0]
  |  |  |  |  |  Branch (324:12): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  155|      0|      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
  |  |  156|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (156:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1628|      0|    return CURLE_OK;
 1629|      0|  }
 1630|  2.59k|  default:
  ------------------
  |  Branch (1630:3): [True: 2.59k, False: 2.09k]
  ------------------
 1631|  2.59k|    break;
 1632|  4.69k|  }
 1633|  2.59k|  return cf->next ?
  ------------------
  |  Branch (1633:10): [True: 2.59k, False: 0]
  ------------------
 1634|  2.59k|    cf->next->cft->query(cf->next, data, query, pres1, pres2) :
 1635|  2.59k|    CURLE_UNKNOWN_OPTION;
 1636|  4.69k|}
vtls.c:cf_ctx_new:
  517|  2.10k|{
  518|  2.10k|  struct ssl_connect_data *ctx;
  519|       |
  520|  2.10k|  (void)data;
  521|  2.10k|  ctx = curlx_calloc(1, sizeof(*ctx));
  ------------------
  |  | 1480|  2.10k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  522|  2.10k|  if(!ctx)
  ------------------
  |  Branch (522:6): [True: 0, False: 2.10k]
  ------------------
  523|      0|    return NULL;
  524|       |
  525|  2.10k|  ctx->ssl_impl = Curl_ssl;
  526|  2.10k|  ctx->alpn = alpn;
  527|  2.10k|  Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  110|  2.10k|#define CURL_SSL_EARLY_MAX      (64 * 1024)
  ------------------
                Curl_bufq_init2(&ctx->earlydata, CURL_SSL_EARLY_MAX, 1, BUFQ_OPT_NO_SPARES);
  ------------------
  |  |  115|  2.10k|#define BUFQ_OPT_NO_SPARES   (1 << 1)
  ------------------
  528|  2.10k|  ctx->backend = curlx_calloc(1, ctx->ssl_impl->sizeof_ssl_backend_data);
  ------------------
  |  | 1480|  2.10k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  529|  2.10k|  if(!ctx->backend) {
  ------------------
  |  Branch (529:6): [True: 0, False: 2.10k]
  ------------------
  530|      0|    curlx_free(ctx);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  531|      0|    return NULL;
  532|      0|  }
  533|  2.10k|  return ctx;
  534|  2.10k|}
vtls.c:alpn_get_spec:
  156|  2.10k|{
  157|  2.10k|  if(!use_alpn)
  ------------------
  |  Branch (157:6): [True: 1, False: 2.09k]
  ------------------
  158|      1|    return NULL;
  159|       |  /* If HTTP/1.0 is the wanted protocol then use ALPN http/1.0 and http/1.1.
  160|       |     This is for compatibility reasons since some HTTP/1.0 servers with old
  161|       |     ALPN implementations understand ALPN http/1.1 but not http/1.0. */
  162|  2.09k|  if(only_http_10 && (wanted & CURL_HTTP_V1x))
  ------------------
  |  |   40|      0|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (162:6): [True: 0, False: 2.09k]
  |  Branch (162:22): [True: 0, False: 0]
  ------------------
  163|      0|    return &ALPN_SPEC_H10_H11;
  164|  2.09k|#ifdef USE_HTTP2
  165|  2.09k|  if(wanted & CURL_HTTP_V2x) {
  ------------------
  |  |   41|  2.09k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
  |  Branch (165:6): [True: 1.26k, False: 830]
  ------------------
  166|  1.26k|    if(wanted & CURL_HTTP_V1x)
  ------------------
  |  |   40|  1.26k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (166:8): [True: 1.26k, False: 0]
  ------------------
  167|  1.26k|      return (preferred == CURL_HTTP_V1x) ?
  ------------------
  |  |   40|  1.26k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
  |  Branch (167:14): [True: 0, False: 1.26k]
  ------------------
  168|  1.26k|        &ALPN_SPEC_H11_H2 : &ALPN_SPEC_H2_H11;
  169|      0|    return &ALPN_SPEC_H2;
  170|  1.26k|  }
  171|       |#else
  172|       |  (void)wanted;
  173|       |  (void)preferred;
  174|       |#endif
  175|    830|  return &ALPN_SPEC_H11;
  176|  2.09k|}
vtls.c:cf_ssl_proxy_create:
 1778|  2.10k|{
 1779|  2.10k|  struct Curl_cfilter *cf = NULL;
 1780|  2.10k|  struct ssl_connect_data *ctx;
 1781|  2.10k|  CURLcode result;
 1782|       |  /* ALPN is default, but if user explicitly disables it, obey */
 1783|  2.10k|  bool use_alpn = (bool)data->set.ssl_enable_alpn;
 1784|  2.10k|  http_majors wanted = CURL_HTTP_V1x;
  ------------------
  |  |   40|  2.10k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
 1785|       |
 1786|  2.10k|  (void)conn;
 1787|  2.10k|#ifdef USE_HTTP2
 1788|  2.10k|  if(conn->http_proxy.proxytype == CURLPROXY_HTTPS2) {
  ------------------
  |  |  796|  2.10k|#define CURLPROXY_HTTPS2          3L /* HTTPS and attempt HTTP/2
  ------------------
  |  Branch (1788:6): [True: 1.26k, False: 831]
  ------------------
 1789|  1.26k|    use_alpn = TRUE;
  ------------------
  |  | 1055|  1.26k|#define TRUE true
  ------------------
 1790|  1.26k|    wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   40|  1.26k|#define CURL_HTTP_V1x   (1 << 0)
  ------------------
                  wanted = (CURL_HTTP_V1x | CURL_HTTP_V2x);
  ------------------
  |  |   41|  1.26k|#define CURL_HTTP_V2x   (1 << 1)
  ------------------
 1791|  1.26k|  }
 1792|  2.10k|#endif
 1793|       |
 1794|  2.10k|  ctx = cf_ctx_new(data, alpn_get_spec(wanted, 0, false, use_alpn));
 1795|  2.10k|  if(!ctx) {
  ------------------
  |  Branch (1795:6): [True: 0, False: 2.10k]
  ------------------
 1796|      0|    result = CURLE_OUT_OF_MEMORY;
 1797|      0|    goto out;
 1798|      0|  }
 1799|  2.10k|  result = Curl_cf_create(&cf, &Curl_cft_ssl_proxy, ctx);
 1800|       |
 1801|  2.10k|out:
 1802|  2.10k|  if(result)
  ------------------
  |  Branch (1802:6): [True: 0, False: 2.10k]
  ------------------
 1803|      0|    cf_ctx_free(ctx);
 1804|  2.10k|  *pcf = result ? NULL : cf;
  ------------------
  |  Branch (1804:10): [True: 0, False: 2.10k]
  ------------------
 1805|  2.10k|  return result;
 1806|  2.10k|}

Curl_ssl_peer_key_build:
  185|  2.09k|{
  186|  2.09k|  struct dynbuf buf;
  187|  2.09k|  size_t key_len;
  188|  2.09k|  bool is_local = FALSE;
  ------------------
  |  | 1058|  2.09k|#define FALSE false
  ------------------
  189|  2.09k|  CURLcode result;
  190|       |
  191|  2.09k|  *ppeer_key = NULL;
  192|  2.09k|  curlx_dyn_init(&buf, 10 * 1024);
  193|       |
  194|  2.09k|  result = curlx_dyn_addf(&buf, "%s:%d",
  195|  2.09k|                          peer->dest->hostname, peer->dest->port);
  196|  2.09k|  if(result)
  ------------------
  |  Branch (196:6): [True: 0, False: 2.09k]
  ------------------
  197|      0|    goto out;
  198|       |
  199|  2.09k|  switch(peer->transport) {
  200|  2.09k|  case TRNSPRT_TCP:
  ------------------
  |  |  307|  2.09k|#define TRNSPRT_TCP  3
  ------------------
  |  Branch (200:3): [True: 2.09k, False: 0]
  ------------------
  201|  2.09k|    break;
  202|      0|  case TRNSPRT_UDP:
  ------------------
  |  |  308|      0|#define TRNSPRT_UDP  4
  ------------------
  |  Branch (202:3): [True: 0, False: 2.09k]
  ------------------
  203|      0|    result = curlx_dyn_add(&buf, ":UDP");
  204|      0|    break;
  205|      0|  case TRNSPRT_QUIC:
  ------------------
  |  |  309|      0|#define TRNSPRT_QUIC 5
  ------------------
  |  Branch (205:3): [True: 0, False: 2.09k]
  ------------------
  206|      0|    result = curlx_dyn_add(&buf, ":QUIC");
  207|      0|    break;
  208|      0|  case TRNSPRT_UNIX:
  ------------------
  |  |  310|      0|#define TRNSPRT_UNIX 6
  ------------------
  |  Branch (208:3): [True: 0, False: 2.09k]
  ------------------
  209|      0|    result = curlx_dyn_add(&buf, ":UNIX");
  210|      0|    break;
  211|      0|  default:
  ------------------
  |  Branch (211:3): [True: 0, False: 2.09k]
  ------------------
  212|      0|    result = curlx_dyn_addf(&buf, ":TRNSPRT-%d", peer->transport);
  213|      0|    break;
  214|  2.09k|  }
  215|  2.09k|  if(result)
  ------------------
  |  Branch (215:6): [True: 0, False: 2.09k]
  ------------------
  216|      0|    goto out;
  217|       |
  218|  2.09k|  if(!ssl->verifypeer) {
  ------------------
  |  Branch (218:6): [True: 4, False: 2.09k]
  ------------------
  219|      4|    result = curlx_dyn_add(&buf, ":NO-VRFY-PEER");
  220|      4|    if(result)
  ------------------
  |  Branch (220:8): [True: 0, False: 4]
  ------------------
  221|      0|      goto out;
  222|      4|  }
  223|  2.09k|  if(!ssl->verifyhost) {
  ------------------
  |  Branch (223:6): [True: 1, False: 2.09k]
  ------------------
  224|      1|    result = curlx_dyn_add(&buf, ":NO-VRFY-HOST");
  225|      1|    if(result)
  ------------------
  |  Branch (225:8): [True: 0, False: 1]
  ------------------
  226|      0|      goto out;
  227|      1|  }
  228|  2.09k|  if(ssl->verifystatus) {
  ------------------
  |  Branch (228:6): [True: 0, False: 2.09k]
  ------------------
  229|      0|    result = curlx_dyn_add(&buf, ":VRFY-STATUS");
  230|      0|    if(result)
  ------------------
  |  Branch (230:8): [True: 0, False: 0]
  ------------------
  231|      0|      goto out;
  232|      0|  }
  233|  2.09k|  if(!ssl->verifypeer || !ssl->verifyhost) {
  ------------------
  |  Branch (233:6): [True: 4, False: 2.09k]
  |  Branch (233:26): [True: 1, False: 2.09k]
  ------------------
  234|      5|    if(via_peer) {
  ------------------
  |  Branch (234:8): [True: 5, False: 0]
  ------------------
  235|      5|      result = curlx_dyn_addf(&buf, ":CHOST-%s:CPORT-%u",
  236|      5|                              via_peer->hostname,
  237|      5|                              via_peer->port);
  238|      5|      if(result)
  ------------------
  |  Branch (238:10): [True: 0, False: 5]
  ------------------
  239|      0|        goto out;
  240|      5|    }
  241|      5|  }
  242|       |
  243|  2.09k|  if(ssl->version || ssl->version_max) {
  ------------------
  |  Branch (243:6): [True: 2.09k, False: 0]
  |  Branch (243:22): [True: 0, False: 0]
  ------------------
  244|  2.09k|    result = curlx_dyn_addf(&buf, ":TLSVER-%d-%u", ssl->version,
  245|  2.09k|                            (ssl->version_max >> 16));
  246|  2.09k|    if(result)
  ------------------
  |  Branch (246:8): [True: 0, False: 2.09k]
  ------------------
  247|      0|      goto out;
  248|  2.09k|  }
  249|  2.09k|  if(ssl->ssl_options) {
  ------------------
  |  Branch (249:6): [True: 3, False: 2.09k]
  ------------------
  250|      3|    result = curlx_dyn_addf(&buf, ":TLSOPT-%x", ssl->ssl_options);
  251|      3|    if(result)
  ------------------
  |  Branch (251:8): [True: 0, False: 3]
  ------------------
  252|      0|      goto out;
  253|      3|  }
  254|  2.09k|  if(ssl->cipher_list) {
  ------------------
  |  Branch (254:6): [True: 844, False: 1.25k]
  ------------------
  255|    844|    result = curlx_dyn_addf(&buf, ":CIPHER-%s", ssl->cipher_list);
  256|    844|    if(result)
  ------------------
  |  Branch (256:8): [True: 1, False: 843]
  ------------------
  257|      1|      goto out;
  258|    844|  }
  259|  2.09k|  if(ssl->cipher_list13) {
  ------------------
  |  Branch (259:6): [True: 166, False: 1.93k]
  ------------------
  260|    166|    result = curlx_dyn_addf(&buf, ":CIPHER13-%s", ssl->cipher_list13);
  261|    166|    if(result)
  ------------------
  |  Branch (261:8): [True: 0, False: 166]
  ------------------
  262|      0|      goto out;
  263|    166|  }
  264|  2.09k|  if(ssl->curves) {
  ------------------
  |  Branch (264:6): [True: 0, False: 2.09k]
  ------------------
  265|      0|    result = curlx_dyn_addf(&buf, ":CURVES-%s", ssl->curves);
  266|      0|    if(result)
  ------------------
  |  Branch (266:8): [True: 0, False: 0]
  ------------------
  267|      0|      goto out;
  268|      0|  }
  269|  2.09k|  if(ssl->signature_algorithms) {
  ------------------
  |  Branch (269:6): [True: 0, False: 2.09k]
  ------------------
  270|      0|    result = curlx_dyn_addf(&buf, ":SIGALGS-%s",
  271|      0|                            ssl->signature_algorithms);
  272|      0|    if(result)
  ------------------
  |  Branch (272:8): [True: 0, False: 0]
  ------------------
  273|      0|      goto out;
  274|      0|  }
  275|  2.09k|  if(ssl->verifypeer) {
  ------------------
  |  Branch (275:6): [True: 2.09k, False: 4]
  ------------------
  276|  2.09k|    result = cf_ssl_peer_key_add_path(&buf, "CA", ssl->CAfile, &is_local);
  277|  2.09k|    if(result)
  ------------------
  |  Branch (277:8): [True: 1, False: 2.09k]
  ------------------
  278|      1|      goto out;
  279|  2.09k|    result = cf_ssl_peer_key_add_path(&buf, "CApath", ssl->CApath, &is_local);
  280|  2.09k|    if(result)
  ------------------
  |  Branch (280:8): [True: 1, False: 2.09k]
  ------------------
  281|      1|      goto out;
  282|  2.09k|    result = cf_ssl_peer_key_add_path(&buf, "CRL", ssl->CRLfile, &is_local);
  283|  2.09k|    if(result)
  ------------------
  |  Branch (283:8): [True: 0, False: 2.09k]
  ------------------
  284|      0|      goto out;
  285|  2.09k|    result = cf_ssl_peer_key_add_path(&buf, "Issuer", ssl->issuercert,
  286|  2.09k|                                      &is_local);
  287|  2.09k|    if(result)
  ------------------
  |  Branch (287:8): [True: 0, False: 2.09k]
  ------------------
  288|      0|      goto out;
  289|  2.09k|    if(ssl->ca_info_blob) {
  ------------------
  |  Branch (289:8): [True: 0, False: 2.09k]
  ------------------
  290|      0|      result = cf_ssl_peer_key_add_hash(&buf, "CAInfoBlob", ssl->ca_info_blob);
  291|      0|      if(result)
  ------------------
  |  Branch (291:10): [True: 0, False: 0]
  ------------------
  292|      0|        goto out;
  293|      0|    }
  294|  2.09k|    if(ssl->issuercert_blob) {
  ------------------
  |  Branch (294:8): [True: 0, False: 2.09k]
  ------------------
  295|      0|      result = cf_ssl_peer_key_add_hash(&buf, "IssuerBlob",
  296|      0|                                        ssl->issuercert_blob);
  297|      0|      if(result)
  ------------------
  |  Branch (297:10): [True: 0, False: 0]
  ------------------
  298|      0|        goto out;
  299|      0|    }
  300|  2.09k|  }
  301|  2.09k|  if(ssl->cert_blob) {
  ------------------
  |  Branch (301:6): [True: 0, False: 2.09k]
  ------------------
  302|      0|    result = cf_ssl_peer_key_add_hash(&buf, "CertBlob", ssl->cert_blob);
  303|      0|    if(result)
  ------------------
  |  Branch (303:8): [True: 0, False: 0]
  ------------------
  304|      0|      goto out;
  305|      0|  }
  306|  2.09k|  if(ssl->pinned_key && ssl->pinned_key[0]) {
  ------------------
  |  Branch (306:6): [True: 72, False: 2.02k]
  |  Branch (306:25): [True: 70, False: 2]
  ------------------
  307|     70|    result = curlx_dyn_addf(&buf, ":Pinned-%s", ssl->pinned_key);
  308|     70|    if(result)
  ------------------
  |  Branch (308:8): [True: 1, False: 69]
  ------------------
  309|      1|      goto out;
  310|     70|  }
  311|       |
  312|  2.09k|  result = cf_ssl_peer_key_add_mtls(&buf, ssl, &is_local);
  313|  2.09k|  if(result)
  ------------------
  |  Branch (313:6): [True: 0, False: 2.09k]
  ------------------
  314|      0|    goto out;
  315|  2.09k|#ifdef USE_TLS_SRP
  316|  2.09k|  if(ssl->username || ssl->password) {
  ------------------
  |  Branch (316:6): [True: 71, False: 2.02k]
  |  Branch (316:23): [True: 3, False: 2.02k]
  ------------------
  317|     74|    result = curlx_dyn_add(&buf, ":SRP-AUTH");
  318|     74|    if(result)
  ------------------
  |  Branch (318:8): [True: 0, False: 74]
  ------------------
  319|      0|      goto out;
  320|     74|  }
  321|  2.09k|#endif
  322|       |
  323|  2.09k|  if(!tls_id || !tls_id[0]) {
  ------------------
  |  Branch (323:6): [True: 0, False: 2.09k]
  |  Branch (323:17): [True: 0, False: 2.09k]
  ------------------
  324|      0|    result = CURLE_FAILED_INIT;
  325|      0|    goto out;
  326|      0|  }
  327|  2.09k|  result = curlx_dyn_addf(&buf, ":IMPL-%s", tls_id);
  328|  2.09k|  if(result)
  ------------------
  |  Branch (328:6): [True: 1, False: 2.09k]
  ------------------
  329|      1|    goto out;
  330|       |
  331|  2.09k|  result = curlx_dyn_addf(&buf, is_local ?
  ------------------
  |  Branch (331:33): [True: 239, False: 1.85k]
  ------------------
  332|  1.85k|                          CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  169|    239|#define CURL_SSLS_LOCAL_SUFFIX     ":L"
  ------------------
                                        CURL_SSLS_LOCAL_SUFFIX : CURL_SSLS_GLOBAL_SUFFIX);
  ------------------
  |  |  170|  1.85k|#define CURL_SSLS_GLOBAL_SUFFIX    ":G"
  ------------------
  333|  2.09k|  if(result)
  ------------------
  |  Branch (333:6): [True: 1, False: 2.09k]
  ------------------
  334|      1|    goto out;
  335|       |
  336|  2.09k|  *ppeer_key = curlx_dyn_take(&buf, &key_len);
  337|       |  /* we added printable char, and dynbuf always null-terminates, no need
  338|       |   * to track length */
  339|       |
  340|  2.09k|out:
  341|  2.09k|  curlx_dyn_free(&buf);
  342|  2.09k|  return result;
  343|  2.09k|}
Curl_ssl_peer_key_make:
  349|  2.09k|{
  350|  2.09k|  struct ssl_primary_config *ssl = Curl_ssl_cf_get_primary_config(cf);
  351|  2.09k|  return Curl_ssl_peer_key_build(ssl, peer, cf->conn->via_peer, tls_id,
  352|  2.09k|                                 ppeer_key);
  353|  2.09k|}
Curl_ssl_session_destroy:
  441|  1.31k|{
  442|  1.31k|  if(s) {
  ------------------
  |  Branch (442:6): [True: 0, False: 1.31k]
  ------------------
  443|       |    /* if in the list, the list destructor takes care of it */
  444|      0|    if(Curl_node_llist(&s->list))
  ------------------
  |  Branch (444:8): [True: 0, False: 0]
  ------------------
  445|      0|      Curl_node_remove(&s->list);
  446|      0|    else {
  447|       |      cf_ssl_scache_session_ldestroy(NULL, s);
  448|      0|    }
  449|      0|  }
  450|  1.31k|}
Curl_ssl_scache_create:
  594|  15.3k|{
  595|  15.3k|  struct Curl_ssl_scache *scache;
  596|  15.3k|  struct Curl_ssl_scache_peer *peers;
  597|  15.3k|  size_t i;
  598|       |
  599|  15.3k|  *pscache = NULL;
  600|  15.3k|  peers = curlx_calloc(max_peers, sizeof(*peers));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  601|  15.3k|  if(!peers)
  ------------------
  |  Branch (601:6): [True: 0, False: 15.3k]
  ------------------
  602|      0|    return CURLE_OUT_OF_MEMORY;
  603|       |
  604|  15.3k|  scache = curlx_calloc(1, sizeof(*scache));
  ------------------
  |  | 1480|  15.3k|  curl_dbg_calloc(nbelem, size, __LINE__, __FILE__)
  ------------------
  605|  15.3k|  if(!scache) {
  ------------------
  |  Branch (605:6): [True: 0, False: 15.3k]
  ------------------
  606|      0|    curlx_free(peers);
  ------------------
  |  | 1483|      0|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  607|      0|    return CURLE_OUT_OF_MEMORY;
  608|      0|  }
  609|       |
  610|  15.3k|  scache->magic = CURL_SCACHE_MAGIC;
  ------------------
  |  |   67|  15.3k|#define CURL_SCACHE_MAGIC 0x000e1551
  ------------------
  611|  15.3k|  scache->default_lifetime_secs = (24 * 60 * 60); /* 1 day */
  612|  15.3k|  scache->peer_count = max_peers;
  613|  15.3k|  scache->peers = peers;
  614|  15.3k|  scache->age = 1;
  615|   399k|  for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (615:14): [True: 383k, False: 15.3k]
  ------------------
  616|   383k|    scache->peers[i].max_sessions = max_sessions_per_peer;
  617|   383k|    Curl_llist_init(&scache->peers[i].sessions,
  618|   383k|                    cf_ssl_scache_session_ldestroy);
  619|   383k|  }
  620|       |
  621|  15.3k|  *pscache = scache;
  622|  15.3k|  return CURLE_OK;
  623|  15.3k|}
Curl_ssl_scache_destroy:
  626|  15.3k|{
  627|  15.3k|  if(GOOD_SCACHE(scache)) {
  ------------------
  |  |   69|  15.3k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   67|  15.3k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (69:25): [True: 15.3k, False: 0]
  |  |  |  Branch (69:32): [True: 15.3k, False: 0]
  |  |  ------------------
  ------------------
  628|  15.3k|    size_t i;
  629|  15.3k|    scache->magic = 0;
  630|   399k|    for(i = 0; i < scache->peer_count; ++i) {
  ------------------
  |  Branch (630:16): [True: 383k, False: 15.3k]
  ------------------
  631|   383k|      cf_ssl_scache_clear_peer(&scache->peers[i]);
  632|   383k|    }
  633|  15.3k|    curlx_free(scache->peers);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  634|  15.3k|    curlx_free(scache);
  ------------------
  |  | 1483|  15.3k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  ------------------
  635|  15.3k|  }
  636|  15.3k|}
Curl_ssl_scache_use:
  639|  1.31k|{
  640|  1.31k|  if(cf_ssl_scache_get(data)) {
  ------------------
  |  Branch (640:6): [True: 1.31k, False: 0]
  ------------------
  641|  1.31k|    struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
  642|  1.31k|    return ssl_config ? ssl_config->primary.cache_session : FALSE;
  ------------------
  |  | 1058|  1.31k|#define FALSE false
  ------------------
  |  Branch (642:12): [True: 1.31k, False: 0]
  ------------------
  643|  1.31k|  }
  644|      0|  return FALSE;
  ------------------
  |  | 1058|      0|#define FALSE false
  ------------------
  645|  1.31k|}
Curl_ssl_scache_lock:
  649|  1.31k|{
  650|  1.31k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  651|  1.31k|  if(scache) {
  ------------------
  |  Branch (651:6): [True: 1.31k, False: 0]
  ------------------
  652|  1.31k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  1.31k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 1.31k]
  |  |  ------------------
  |  |   86|  1.31k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  653|      0|      Curl_share_lock(data, CURL_LOCK_DATA_SSL_SESSION,
  654|      0|                      CURL_LOCK_ACCESS_SINGLE);
  655|  1.31k|    DEBUGASSERT(!scache->is_locked);
  ------------------
  |  | 1081|  1.31k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (655:5): [True: 0, False: 1.31k]
  |  Branch (655:5): [True: 1.31k, False: 0]
  ------------------
  656|  1.31k|    scache->is_locked = TRUE;
  ------------------
  |  | 1055|  1.31k|#define TRUE true
  ------------------
  657|  1.31k|  }
  658|  1.31k|}
Curl_ssl_scache_unlock:
  662|  1.31k|{
  663|  1.31k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  664|  1.31k|  if(scache) {
  ------------------
  |  Branch (664:6): [True: 1.31k, False: 0]
  ------------------
  665|  1.31k|    DEBUGASSERT(scache->is_locked);
  ------------------
  |  | 1081|  1.31k|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (665:5): [True: 0, False: 1.31k]
  |  Branch (665:5): [True: 1.31k, False: 0]
  ------------------
  666|  1.31k|    scache->is_locked = FALSE;
  ------------------
  |  | 1058|  1.31k|#define FALSE false
  ------------------
  667|  1.31k|    if(CURL_SHARE_ssl_scache(data))
  ------------------
  |  |   85|  1.31k|  ((data)->share &&                                                \
  |  |  ------------------
  |  |  |  Branch (85:4): [True: 0, False: 1.31k]
  |  |  ------------------
  |  |   86|  1.31k|   ((data)->share->specifier & (1 << CURL_LOCK_DATA_SSL_SESSION)))
  |  |  ------------------
  |  |  |  Branch (86:4): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  668|      0|      Curl_share_unlock(data, CURL_LOCK_DATA_SSL_SESSION);
  669|  1.31k|  }
  670|  1.31k|}
Curl_ssl_scache_return:
  945|  1.31k|{
  946|       |  /* See RFC 8446 C.4:
  947|       |   * "Clients SHOULD NOT reuse a ticket for multiple connections." */
  948|  1.31k|  if(s && s->ietf_tls_id < 0x304)
  ------------------
  |  Branch (948:6): [True: 0, False: 1.31k]
  |  Branch (948:11): [True: 0, False: 0]
  ------------------
  949|      0|    (void)Curl_ssl_scache_put(cf, data, ssl_peer_key, s);
  950|  1.31k|  else
  951|  1.31k|    Curl_ssl_session_destroy(s);
  952|  1.31k|}
Curl_ssl_scache_take:
  958|  1.31k|{
  959|  1.31k|  struct Curl_ssl_scache *scache = cf_ssl_scache_get(data);
  960|  1.31k|  struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
  961|  1.31k|  struct Curl_ssl_scache_peer *peer = NULL;
  962|  1.31k|  struct Curl_llist_node *n;
  963|  1.31k|  struct Curl_ssl_session *s = NULL;
  964|  1.31k|  CURLcode result;
  965|       |
  966|  1.31k|  *ps = NULL;
  967|  1.31k|  if(!scache)
  ------------------
  |  Branch (967:6): [True: 0, False: 1.31k]
  ------------------
  968|      0|    return CURLE_OK;
  969|       |
  970|  1.31k|  Curl_ssl_scache_lock(data);
  971|  1.31k|  result = cf_ssl_find_peer_by_key(data, scache, ssl_peer_key, conn_config,
  972|  1.31k|                                   &peer);
  973|  1.31k|  if(!result && peer) {
  ------------------
  |  Branch (973:6): [True: 1.31k, False: 0]
  |  Branch (973:17): [True: 0, False: 1.31k]
  ------------------
  974|      0|    cf_scache_peer_remove_expired(peer, (curl_off_t)time(NULL));
  975|      0|    n = Curl_llist_head(&peer->sessions);
  976|      0|    if(n) {
  ------------------
  |  Branch (976:8): [True: 0, False: 0]
  ------------------
  977|      0|      s = Curl_node_take_elem(n);
  978|      0|      (scache->age)++;            /* increase general age */
  979|      0|      peer->age = scache->age; /* set this as used in this age */
  980|      0|    }
  981|      0|  }
  982|  1.31k|  if(s) {
  ------------------
  |  Branch (982:6): [True: 0, False: 1.31k]
  ------------------
  983|      0|    *ps = s;
  984|      0|    CURL_TRC_SSLS(data, "took session for %s [proto=0x%x, "
  ------------------
  |  |  194|      0|  do {                                                    \
  |  |  195|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  ------------------
  |  |  |  Branch (196:27): [True: 0, False: 0]
  |  |  ------------------
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  985|      0|                  "alpn=%s, earlydata=%zu, quic_tp=%s], %zu sessions remain",
  986|      0|                  ssl_peer_key, s->ietf_tls_id, s->alpn,
  987|      0|                  s->earlydata_max, s->quic_tp ? "yes" : "no",
  988|      0|                  Curl_llist_count(&peer->sessions));
  989|      0|  }
  990|  1.31k|  else {
  991|  1.31k|    CURL_TRC_SSLS(data, "no cached session for %s", ssl_peer_key);
  ------------------
  |  |  194|  1.31k|  do {                                                    \
  |  |  195|  1.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.31k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.31k]
  |  |  ------------------
  ------------------
  992|  1.31k|  }
  993|  1.31k|  Curl_ssl_scache_unlock(data);
  994|  1.31k|  return result;
  995|  1.31k|}
vtls_scache.c:cf_ssl_peer_key_add_path:
   75|  8.39k|{
   76|  8.39k|  if(path && path[0]) {
  ------------------
  |  Branch (76:6): [True: 4.30k, False: 4.08k]
  |  Branch (76:14): [True: 4.28k, False: 29]
  ------------------
   77|       |    /* We try to add absolute paths, so that the session key can stay valid
   78|       |     * when used in another process with different CWD. When a path does not
   79|       |     * exist, this does not work. Then, we add the path as is. */
   80|       |#ifdef _WIN32
   81|       |    char abspath[_MAX_PATH];
   82|       |    if(_fullpath(abspath, path, _MAX_PATH))
   83|       |      return curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   84|       |    *is_local = TRUE;
   85|       |#elif defined(HAVE_REALPATH)
   86|  4.28k|    if(path[0] != '/') {
  ------------------
  |  Branch (86:8): [True: 320, False: 3.96k]
  ------------------
   87|    320|      char *abspath = realpath(path, NULL);
   88|    320|      if(abspath) {
  ------------------
  |  Branch (88:10): [True: 77, False: 243]
  ------------------
   89|     77|        CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
   90|       |        /* !checksrc! disable BANNEDFUNC 1 */
   91|     77|        free(abspath); /* allocated by libc, free without memdebug */
   92|     77|        return result;
   93|     77|      }
   94|    243|      *is_local = TRUE;
  ------------------
  |  | 1055|    243|#define TRUE true
  ------------------
   95|    243|    }
   96|  4.20k|#endif
   97|  4.20k|    return curlx_dyn_addf(buf, ":%s-%s", name, path);
   98|  4.28k|  }
   99|  4.11k|  return CURLE_OK;
  100|  8.39k|}
vtls_scache.c:cf_ssl_peer_key_add_mtls:
  130|  2.09k|{
  131|  2.09k|  CURLcode result = CURLE_OK;
  132|  2.09k|  if(ssl->clientcert && ssl->clientcert[0]) {
  ------------------
  |  Branch (132:6): [True: 14, False: 2.08k]
  |  Branch (132:25): [True: 8, False: 6]
  ------------------
  133|      8|    result = cf_ssl_peer_key_add_path(buf, "CCERT", ssl->clientcert, is_local);
  134|      8|    if(result)
  ------------------
  |  Branch (134:8): [True: 0, False: 8]
  ------------------
  135|      0|      goto out;
  136|      8|  }
  137|  2.09k|  if(ssl->key && ssl->key[0]) {
  ------------------
  |  Branch (137:6): [True: 17, False: 2.07k]
  |  Branch (137:18): [True: 15, False: 2]
  ------------------
  138|     15|    result = cf_ssl_peer_key_add_path(buf, "KEY", ssl->key, is_local);
  139|     15|    if(result)
  ------------------
  |  Branch (139:8): [True: 0, False: 15]
  ------------------
  140|      0|      goto out;
  141|     15|  }
  142|  2.09k|  if(ssl->key_blob) {
  ------------------
  |  Branch (142:6): [True: 0, False: 2.09k]
  ------------------
  143|      0|    result = cf_ssl_peer_key_add_hash(buf, "KEYBlob", ssl->key_blob);
  144|      0|    if(result)
  ------------------
  |  Branch (144:8): [True: 0, False: 0]
  ------------------
  145|      0|      goto out;
  146|      0|  }
  147|  2.09k|  if(ssl->cert_type && ssl->cert_type[0]) {
  ------------------
  |  Branch (147:6): [True: 46, False: 2.04k]
  |  Branch (147:24): [True: 45, False: 1]
  ------------------
  148|     45|    size_t i;
  149|     45|    result = curlx_dyn_add(buf, ":CT-");
  150|    539|    for(i = 0; !result && ssl->cert_type[i]; i++) {
  ------------------
  |  Branch (150:16): [True: 539, False: 0]
  |  Branch (150:27): [True: 494, False: 45]
  ------------------
  151|    494|      char c = Curl_raw_toupper(ssl->cert_type[i]);
  152|    494|      result = curlx_dyn_addn(buf, &c, 1);
  153|    494|    }
  154|     45|    if(result)
  ------------------
  |  Branch (154:8): [True: 0, False: 45]
  ------------------
  155|      0|      goto out;
  156|     45|  }
  157|  2.09k|  if(ssl->key_type && ssl->key_type[0]) {
  ------------------
  |  Branch (157:6): [True: 10, False: 2.08k]
  |  Branch (157:23): [True: 9, False: 1]
  ------------------
  158|      9|    size_t i;
  159|      9|    result = curlx_dyn_add(buf, ":KT-");
  160|    483|    for(i = 0; !result && ssl->key_type[i]; i++) {
  ------------------
  |  Branch (160:16): [True: 483, False: 0]
  |  Branch (160:27): [True: 474, False: 9]
  ------------------
  161|    474|      char c = Curl_raw_toupper(ssl->key_type[i]);
  162|    474|      result = curlx_dyn_addn(buf, &c, 1);
  163|    474|    }
  164|      9|  }
  165|  2.09k|out:
  166|  2.09k|  return result;
  167|  2.09k|}
vtls_scache.c:cf_ssl_scache_clear_peer:
  453|   383k|{
  454|   383k|  Curl_llist_destroy(&peer->sessions, NULL);
  455|   383k|  if(peer->sobj) {
  ------------------
  |  Branch (455:6): [True: 0, False: 383k]
  ------------------
  456|      0|    DEBUGASSERT(peer->sobj_free);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (456:5): [True: 0, False: 0]
  |  Branch (456:5): [True: 0, False: 0]
  ------------------
  457|      0|    if(peer->sobj_free)
  ------------------
  |  Branch (457:8): [True: 0, False: 0]
  ------------------
  458|      0|      peer->sobj_free(peer->sobj);
  459|      0|    peer->sobj = NULL;
  460|      0|  }
  461|   383k|  peer->sobj_free = NULL;
  462|   383k|  curlx_safefree(peer->clientcert);
  ------------------
  |  | 1327|   383k|  do {                      \
  |  | 1328|   383k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   383k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   383k|    (ptr) = NULL;           \
  |  | 1330|   383k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 383k]
  |  |  ------------------
  ------------------
  463|   383k|  curlx_safefree(peer->key_passwd);
  ------------------
  |  | 1327|   383k|  do {                      \
  |  | 1328|   383k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   383k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   383k|    (ptr) = NULL;           \
  |  | 1330|   383k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 383k]
  |  |  ------------------
  ------------------
  464|   383k|#ifdef USE_TLS_SRP
  465|   383k|  curlx_safefree(peer->srp_username);
  ------------------
  |  | 1327|   383k|  do {                      \
  |  | 1328|   383k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   383k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   383k|    (ptr) = NULL;           \
  |  | 1330|   383k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 383k]
  |  |  ------------------
  ------------------
  466|   383k|  curlx_safefree(peer->srp_password);
  ------------------
  |  | 1327|   383k|  do {                      \
  |  | 1328|   383k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   383k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   383k|    (ptr) = NULL;           \
  |  | 1330|   383k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 383k]
  |  |  ------------------
  ------------------
  467|   383k|#endif
  468|   383k|  curlx_safefree(peer->ssl_peer_key);
  ------------------
  |  | 1327|   383k|  do {                      \
  |  | 1328|   383k|    curlx_free(ptr);        \
  |  |  ------------------
  |  |  |  | 1483|   383k|#define curlx_free(ptr)            curl_dbg_free(ptr, __LINE__, __FILE__)
  |  |  ------------------
  |  | 1329|   383k|    (ptr) = NULL;           \
  |  | 1330|   383k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (1330:11): [Folded, False: 383k]
  |  |  ------------------
  ------------------
  469|   383k|  peer->age = 0;
  470|       |  peer->hmac_set = FALSE;
  ------------------
  |  | 1058|   383k|#define FALSE false
  ------------------
  471|   383k|}
vtls_scache.c:cf_ssl_scache_get:
  365|  5.26k|{
  366|  5.26k|  struct Curl_ssl_scache *scache = NULL;
  367|       |  /* If a share is present, its ssl_scache has preference over the multi */
  368|  5.26k|  if(data->share && data->share->ssl_scache)
  ------------------
  |  Branch (368:6): [True: 0, False: 5.26k]
  |  Branch (368:21): [True: 0, False: 0]
  ------------------
  369|      0|    scache = data->share->ssl_scache;
  370|  5.26k|  else if(data->multi && data->multi->ssl_scache)
  ------------------
  |  Branch (370:11): [True: 5.26k, False: 0]
  |  Branch (370:26): [True: 5.26k, False: 0]
  ------------------
  371|  5.26k|    scache = data->multi->ssl_scache;
  372|  5.26k|  if(scache && !GOOD_SCACHE(scache)) {
  ------------------
  |  |   69|  5.26k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   67|  5.26k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (69:25): [True: 5.26k, False: 0]
  |  |  |  Branch (69:32): [True: 5.26k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (372:6): [True: 5.26k, False: 0]
  ------------------
  373|      0|    failf(data, "transfer would use an invalid scache at %p, denied",
  ------------------
  |  |   62|      0|#define failf Curl_failf
  ------------------
  374|      0|          (void *)scache);
  375|      0|    DEBUGASSERT(0);
  ------------------
  |  | 1081|      0|#define DEBUGASSERT(x) assert(x)
  ------------------
  |  Branch (375:5): [Folded, False: 0]
  |  Branch (375:5): [Folded, False: 0]
  ------------------
  376|      0|    return NULL;
  377|      0|  }
  378|  5.26k|  return scache;
  379|  5.26k|}
vtls_scache.c:cf_ssl_find_peer_by_key:
  701|  1.31k|{
  702|  1.31k|  size_t i, peer_key_len = 0;
  703|  1.31k|  CURLcode result = CURLE_OK;
  704|       |
  705|  1.31k|  *ppeer = NULL;
  706|  1.31k|  if(!GOOD_SCACHE(scache)) {
  ------------------
  |  |   69|  1.31k|#define GOOD_SCACHE(x) ((x) && (x)->magic == CURL_SCACHE_MAGIC)
  |  |  ------------------
  |  |  |  |   67|  1.31k|#define CURL_SCACHE_MAGIC 0x000e1551
  |  |  ------------------
  |  |  |  Branch (69:25): [True: 1.31k, False: 0]
  |  |  |  Branch (69:32): [True: 1.31k, False: 0]
  |  |  ------------------
  ------------------
  707|      0|    return CURLE_BAD_FUNCTION_ARGUMENT;
  708|      0|  }
  709|       |
  710|  1.31k|  CURL_TRC_SSLS(data, "find peer slot for %s among %zu slots",
  ------------------
  |  |  194|  1.31k|  do {                                                    \
  |  |  195|  1.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.31k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.31k]
  |  |  ------------------
  ------------------
  711|  1.31k|                ssl_peer_key, scache->peer_count);
  712|       |
  713|       |  /* check for entries with known peer_key */
  714|  34.1k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (714:14): [True: 34.1k, False: 0]
  |  Branch (714:24): [True: 32.8k, False: 1.31k]
  ------------------
  715|  32.8k|    if(scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (715:8): [True: 0, False: 32.8k]
  ------------------
  716|      0|       curl_strequal(ssl_peer_key, scache->peers[i].ssl_peer_key) &&
  ------------------
  |  Branch (716:8): [True: 0, False: 0]
  ------------------
  717|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (717:8): [True: 0, False: 0]
  ------------------
  718|       |      /* yes, we have a cached session for this! */
  719|      0|      *ppeer = &scache->peers[i];
  720|      0|      goto out;
  721|      0|    }
  722|  32.8k|  }
  723|       |  /* check for entries with HMAC set but no known peer_key */
  724|  34.1k|  for(i = 0; scache && i < scache->peer_count; i++) {
  ------------------
  |  Branch (724:14): [True: 34.1k, False: 0]
  |  Branch (724:24): [True: 32.8k, False: 1.31k]
  ------------------
  725|  32.8k|    if(!scache->peers[i].ssl_peer_key &&
  ------------------
  |  Branch (725:8): [True: 32.8k, False: 0]
  ------------------
  726|  32.8k|       scache->peers[i].hmac_set &&
  ------------------
  |  Branch (726:8): [True: 0, False: 32.8k]
  ------------------
  727|      0|       cf_ssl_scache_match_auth(&scache->peers[i], conn_config)) {
  ------------------
  |  Branch (727:8): [True: 0, False: 0]
  ------------------
  728|       |      /* possible entry with unknown peer_key, check hmac */
  729|      0|      unsigned char my_hmac[CURL_SHA256_DIGEST_LENGTH];
  730|      0|      if(!peer_key_len) /* we are lazy */
  ------------------
  |  Branch (730:10): [True: 0, False: 0]
  ------------------
  731|      0|        peer_key_len = strlen(ssl_peer_key);
  732|      0|      result = Curl_hmacit(&Curl_HMAC_SHA256,
  733|      0|                           scache->peers[i].key_salt,
  734|      0|                           sizeof(scache->peers[i].key_salt),
  735|      0|                           (const unsigned char *)ssl_peer_key,
  736|      0|                           peer_key_len,
  737|      0|                           my_hmac);
  738|      0|      if(result)
  ------------------
  |  Branch (738:10): [True: 0, False: 0]
  ------------------
  739|      0|        goto out;
  740|      0|      if(!memcmp(scache->peers[i].key_hmac, my_hmac, sizeof(my_hmac))) {
  ------------------
  |  Branch (740:10): [True: 0, False: 0]
  ------------------
  741|       |        /* remember peer_key for future lookups */
  742|      0|        CURL_TRC_SSLS(data, "peer entry %zu key recovered: %s",
  ------------------
  |  |  194|      0|  do {                                                    \
  |  |  195|      0|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|      0|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|      0|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|      0|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|      0|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|      0|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|      0|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 0]
  |  |  ------------------
  ------------------
  743|      0|                      i, ssl_peer_key);
  744|      0|        scache->peers[i].ssl_peer_key = curlx_strdup(ssl_peer_key);
  ------------------
  |  | 1477|      0|#define curlx_strdup(ptr)          curl_dbg_strdup(ptr, __LINE__, __FILE__)
  ------------------
  745|      0|        if(!scache->peers[i].ssl_peer_key) {
  ------------------
  |  Branch (745:12): [True: 0, False: 0]
  ------------------
  746|      0|          result = CURLE_OUT_OF_MEMORY;
  747|      0|          goto out;
  748|      0|        }
  749|      0|        cf_ssl_cache_peer_update(&scache->peers[i]);
  750|      0|        *ppeer = &scache->peers[i];
  751|      0|        goto out;
  752|      0|      }
  753|      0|    }
  754|  32.8k|  }
  755|  1.31k|  CURL_TRC_SSLS(data, "peer not found for %s", ssl_peer_key);
  ------------------
  |  |  194|  1.31k|  do {                                                    \
  |  |  195|  1.31k|    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
  |  |  ------------------
  |  |  |  |  326|  1.31k|  (Curl_trc_is_verbose(data) &&          \
  |  |  |  |  ------------------
  |  |  |  |  |  |  319|  2.63k|  ((data) && (data)->set.verbose &&                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (319:4): [True: 1.31k, False: 0]
  |  |  |  |  |  |  |  Branch (319:14): [True: 0, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  320|  2.63k|   (!(data)->state.feat ||                                 \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (320:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  321|      0|    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (321:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  327|  1.31k|   (ft)->log_level >= CURL_LOG_LVL_INFO)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|      0|#define CURL_LOG_LVL_INFO  1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (327:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  196|  1.31k|      Curl_trc_ssls(data, __VA_ARGS__);                   \
  |  |  197|  1.31k|  } while(0)
  |  |  ------------------
  |  |  |  Branch (197:11): [Folded, False: 1.31k]
  |  |  ------------------
  ------------------
  756|  1.31k|out:
  757|  1.31k|  return result;
  758|  1.31k|}

freea:
  107|    270|{
  108|       |  /* Check argument.  */
  109|    270|  uintptr_t u = (uintptr_t) p;
  110|    270|  if (u & (sa_alignment_max - 1))
  ------------------
  |  Branch (110:7): [True: 0, False: 270]
  ------------------
  111|      0|    {
  112|       |      /* p was not the result of a malloca() call.  Invalid argument.  */
  113|      0|      abort ();
  114|      0|    }
  115|       |  /* Determine whether p was a non-NULL pointer returned by mmalloca().  */
  116|    270|  if (u & sa_alignment_max)
  ------------------
  |  Branch (116:7): [True: 0, False: 270]
  ------------------
  117|      0|    {
  118|      0|      char *cp = p;
  119|      0|      small_t *sp = p;
  120|       |# if defined __CHERI_PURE_CAPABILITY__
  121|       |      void *mem = (void *) sp[-1];
  122|       |# else
  123|      0|      void *mem = cp - sp[-1];
  124|      0|# endif
  125|      0|      free (mem);
  126|      0|    }
  127|    270|}

idn2_lookup_ul:
  656|    270|{
  657|    270|  uint8_t *utf8src = NULL;
  658|    270|  int rc;
  659|       |
  660|    270|  if (src)
  ------------------
  |  Branch (660:7): [True: 270, False: 0]
  ------------------
  661|    270|    {
  662|    270|      const char *encoding = locale_charset ();
  663|       |
  664|    270|      utf8src = u8_strconv_from_encoding (src, encoding, iconveh_error);
  665|       |
  666|    270|      if (!utf8src)
  ------------------
  |  Branch (666:11): [True: 270, False: 0]
  ------------------
  667|    270|	{
  668|    270|	  if (errno == ENOMEM)
  ------------------
  |  Branch (668:8): [True: 0, False: 270]
  ------------------
  669|      0|	    return IDN2_MALLOC;
  670|    270|	  return IDN2_ICONV_FAIL;
  671|    270|	}
  672|    270|    }
  673|       |
  674|      0|  rc = idn2_lookup_u8 (utf8src, (uint8_t **) lookupname,
  675|      0|		       flags | IDN2_NFC_INPUT);
  676|       |
  677|      0|  free (utf8src);
  678|       |
  679|      0|  return rc;
  680|    270|}

idn2_check_version:
   62|    135|{
   63|    135|  if (!req_version || strverscmp (req_version, IDN2_VERSION) <= 0)
  ------------------
  |  |  119|    135|# define IDN2_VERSION "2.3.8"
  ------------------
  |  Branch (63:7): [True: 0, False: 135]
  |  Branch (63:23): [True: 135, False: 0]
  ------------------
   64|    135|    return IDN2_VERSION;
  ------------------
  |  |  119|    135|# define IDN2_VERSION "2.3.8"
  ------------------
   65|       |
   66|      0|  return NULL;
   67|    135|}

c_tolower:
  338|  9.18k|{
  339|  9.18k|  switch (c)
  340|  9.18k|    {
  341|  6.48k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|  1.35k|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|    810|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 810, False: 8.37k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 9.18k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 9.18k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 9.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|  1.35k|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 9.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 540, False: 8.64k]
  |  |  |  |  ------------------
  |  |  |  |  123|  1.89k|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (123:36): [True: 540, False: 8.64k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 9.18k]
  |  |  |  |  ------------------
  |  |  |  |  124|  2.97k|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (124:20): [True: 540, False: 8.64k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (124:52): [True: 540, False: 8.64k]
  |  |  |  |  ------------------
  |  |  |  |  125|  3.51k|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (125:52): [True: 540, False: 8.64k]
  |  |  |  |  ------------------
  |  |  |  |  126|  6.48k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 540, False: 8.64k]
  |  |  |  |  |  Branch (126:20): [True: 1.62k, False: 7.56k]
  |  |  |  |  |  Branch (126:36): [True: 810, False: 8.37k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 9.18k]
  |  |  |  |  ------------------
  |  |  |  |  127|  6.48k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 9.18k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 9.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  342|  6.48k|      return c - 'A' + 'a';
  343|  2.70k|    default:
  ------------------
  |  Branch (343:5): [True: 2.70k, False: 6.48k]
  ------------------
  344|  2.70k|      return c;
  345|  9.18k|    }
  346|  9.18k|}
c_isupper:
  313|  2.16k|{
  314|  2.16k|  switch (c)
  315|  2.16k|    {
  316|  1.35k|    _C_CTYPE_UPPER:
  ------------------
  |  |  148|      0|#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
  |  |  ------------------
  |  |  |  |  122|    270|   _C_CTYPE_LOWER_A_THRU_F_N(N): \
  |  |  |  |  ------------------
  |  |  |  |  |  |  119|      0|   case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (119:4): [True: 0, False: 2.16k]
  |  |  |  |  |  |  |  Branch (119:20): [True: 0, False: 2.16k]
  |  |  |  |  |  |  |  Branch (119:36): [True: 0, False: 2.16k]
  |  |  |  |  |  |  |  Branch (119:52): [True: 0, False: 2.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  120|    270|   case 'e' + (N): case 'f' + (N)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (120:4): [True: 0, False: 2.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (122:4): [True: 270, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  123|    270|   case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (123:4): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (123:20): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (123:36): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (123:52): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  124|    270|   case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (124:4): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (124:20): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (124:36): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (124:52): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  125|    270|   case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (125:4): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (125:20): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (125:36): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (125:52): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  126|  1.35k|   case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (126:4): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (126:20): [True: 270, False: 1.89k]
  |  |  |  |  |  Branch (126:36): [True: 810, False: 1.35k]
  |  |  |  |  |  Branch (126:52): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  127|  1.35k|   case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (127:4): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (127:20): [True: 0, False: 2.16k]
  |  |  |  |  |  Branch (127:36): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  317|  1.35k|      return true;
  318|    810|    default:
  ------------------
  |  Branch (318:5): [True: 810, False: 1.35k]
  ------------------
  319|       |      return false;
  320|  2.16k|    }
  321|  2.16k|}

c_strcasecmp:
   28|    540|{
   29|    540|  register const unsigned char *p1 = (const unsigned char *) s1;
   30|    540|  register const unsigned char *p2 = (const unsigned char *) s2;
   31|    540|  unsigned char c1, c2;
   32|       |
   33|    540|  if (p1 == p2)
  ------------------
  |  Branch (33:7): [True: 0, False: 540]
  ------------------
   34|      0|    return 0;
   35|       |
   36|    540|  do
   37|  4.59k|    {
   38|  4.59k|      c1 = c_tolower (*p1);
   39|  4.59k|      c2 = c_tolower (*p2);
   40|       |
   41|  4.59k|      if (c1 == '\0')
  ------------------
  |  Branch (41:11): [True: 270, False: 4.32k]
  ------------------
   42|    270|        break;
   43|       |
   44|  4.32k|      ++p1;
   45|  4.32k|      ++p2;
   46|  4.32k|    }
   47|  4.32k|  while (c1 == c2);
  ------------------
  |  Branch (47:10): [True: 4.05k, False: 270]
  ------------------
   48|       |
   49|    540|  if (UCHAR_MAX <= INT_MAX)
  ------------------
  |  Branch (49:7): [True: 540, Folded]
  ------------------
   50|    540|    return c1 - c2;
   51|      0|  else
   52|       |    /* On machines where 'char' and 'int' are types of the same size, the
   53|       |       difference of two 'unsigned char' values - including the sign bit -
   54|       |       doesn't fit in an 'int'.  */
   55|      0|    return _GL_CMP (c1, c2);
  ------------------
  |  | 1797|      0|#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
  ------------------
   56|    540|}

u8-conv-from-enc.c:strcaseeq0:
  166|    270|{
  167|    270|  if (CASEEQ (s1[0], s20))
  ------------------
  |  |   40|    270|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 270]
  |  |  |  Branch (40:7): [True: 270, False: 0]
  |  |  ------------------
  ------------------
  168|      0|    {
  169|      0|      if (s20 == 0)
  ------------------
  |  Branch (169:11): [True: 0, False: 0]
  ------------------
  170|      0|        return 1;
  171|      0|      else
  172|      0|        return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
  173|      0|    }
  174|    270|  else
  175|    270|    return 0;
  176|    270|}
striconveh.c:strcaseeq0:
  166|    540|{
  167|    540|  if (CASEEQ (s1[0], s20))
  ------------------
  |  |   40|    540|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 270, False: 270]
  |  |  |  Branch (40:7): [True: 540, False: 0]
  |  |  ------------------
  ------------------
  168|    270|    {
  169|    270|      if (s20 == 0)
  ------------------
  |  Branch (169:11): [True: 0, False: 270]
  ------------------
  170|      0|        return 1;
  171|    270|      else
  172|    270|        return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
  173|    270|    }
  174|    270|  else
  175|    270|    return 0;
  176|    540|}
striconveh.c:strcaseeq1:
  152|    270|{
  153|    270|  if (CASEEQ (s1[1], s21))
  ------------------
  |  |   40|    270|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 270, False: 0]
  |  |  |  Branch (40:7): [True: 270, False: 0]
  |  |  ------------------
  ------------------
  154|    270|    {
  155|    270|      if (s21 == 0)
  ------------------
  |  Branch (155:11): [True: 0, False: 270]
  ------------------
  156|      0|        return 1;
  157|    270|      else
  158|    270|        return strcaseeq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
  159|    270|    }
  160|      0|  else
  161|      0|    return 0;
  162|    270|}
striconveh.c:strcaseeq2:
  138|    270|{
  139|    270|  if (CASEEQ (s1[2], s22))
  ------------------
  |  |   40|    270|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 270, False: 0]
  |  |  |  Branch (40:7): [True: 270, False: 0]
  |  |  ------------------
  ------------------
  140|    270|    {
  141|    270|      if (s22 == 0)
  ------------------
  |  Branch (141:11): [True: 0, False: 270]
  ------------------
  142|      0|        return 1;
  143|    270|      else
  144|    270|        return strcaseeq3 (s1, s2, s23, s24, s25, s26, s27, s28);
  145|    270|    }
  146|      0|  else
  147|      0|    return 0;
  148|    270|}
striconveh.c:strcaseeq3:
  124|    270|{
  125|    270|  if (CASEEQ (s1[3], s23))
  ------------------
  |  |   40|    270|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 270, False: 0]
  |  |  |  Branch (40:7): [True: 0, False: 270]
  |  |  ------------------
  ------------------
  126|    270|    {
  127|    270|      if (s23 == 0)
  ------------------
  |  Branch (127:11): [True: 0, False: 270]
  ------------------
  128|      0|        return 1;
  129|    270|      else
  130|    270|        return strcaseeq4 (s1, s2, s24, s25, s26, s27, s28);
  131|    270|    }
  132|      0|  else
  133|      0|    return 0;
  134|    270|}
striconveh.c:strcaseeq4:
  110|    270|{
  111|    270|  if (CASEEQ (s1[4], s24))
  ------------------
  |  |   40|    270|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 270, False: 0]
  |  |  |  Branch (40:7): [True: 0, False: 270]
  |  |  ------------------
  ------------------
  112|    270|    {
  113|    270|      if (s24 == 0)
  ------------------
  |  Branch (113:11): [True: 0, False: 270]
  ------------------
  114|      0|        return 1;
  115|    270|      else
  116|    270|        return strcaseeq5 (s1, s2, s25, s26, s27, s28);
  117|    270|    }
  118|      0|  else
  119|      0|    return 0;
  120|    270|}
striconveh.c:strcaseeq5:
   96|    270|{
   97|    270|  if (CASEEQ (s1[5], s25))
  ------------------
  |  |   40|    270|     (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
  |  |  ------------------
  |  |  |  Branch (40:6): [True: 0, False: 270]
  |  |  |  Branch (40:7): [True: 0, False: 270]
  |  |  ------------------
  ------------------
   98|      0|    {
   99|      0|      if (s25 == 0)
  ------------------
  |  Branch (99:11): [True: 0, False: 0]
  ------------------
  100|      0|        return 1;
  101|      0|      else
  102|      0|        return strcaseeq6 (s1, s2, s26, s27, s28);
  103|      0|    }
  104|    270|  else
  105|    270|    return 0;
  106|    270|}

locale_charset:
  832|    270|{
  833|    270|  const char *codeset;
  834|       |
  835|       |  /* This function must be multithread-safe.  To achieve this without using
  836|       |     thread-local storage, we use a simple strcpy or memcpy to fill this static
  837|       |     buffer.  Filling it through, for example, strcpy + strcat would not be
  838|       |     guaranteed to leave the buffer's contents intact if another thread is
  839|       |     currently accessing it.  If necessary, the contents is first assembled in
  840|       |     a stack-allocated buffer.  */
  841|       |
  842|    270|#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
  843|       |
  844|    270|# if HAVE_LANGINFO_CODESET
  845|       |
  846|       |  /* Most systems support nl_langinfo (CODESET) nowadays.  */
  847|    270|  codeset = nl_langinfo (CODESET);
  848|       |
  849|       |#  ifdef __CYGWIN__
  850|       |  /* Cygwin < 1.7 does not have locales.  nl_langinfo (CODESET) always
  851|       |     returns "US-ASCII".  Return the suffix of the locale name from the
  852|       |     environment variables (if present) or the codepage as a number.  */
  853|       |  if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
  854|       |    {
  855|       |      const char *locale;
  856|       |      static char resultbuf[2 + 10 + 1];
  857|       |
  858|       |      locale = getenv ("LC_ALL");
  859|       |      if (locale == NULL || locale[0] == '\0')
  860|       |        {
  861|       |          locale = getenv ("LC_CTYPE");
  862|       |          if (locale == NULL || locale[0] == '\0')
  863|       |            locale = getenv ("LANG");
  864|       |        }
  865|       |      if (locale != NULL && locale[0] != '\0')
  866|       |        {
  867|       |          /* If the locale name contains an encoding after the dot, return
  868|       |             it.  */
  869|       |          const char *dot = strchr (locale, '.');
  870|       |
  871|       |          if (dot != NULL)
  872|       |            {
  873|       |              const char *modifier;
  874|       |
  875|       |              dot++;
  876|       |              /* Look for the possible @... trailer and remove it, if any.  */
  877|       |              modifier = strchr (dot, '@');
  878|       |              if (modifier == NULL)
  879|       |                return dot;
  880|       |              if (modifier - dot < sizeof (resultbuf))
  881|       |                {
  882|       |                  /* This way of filling resultbuf is multithread-safe.  */
  883|       |                  memcpy (resultbuf, dot, modifier - dot);
  884|       |                  resultbuf [modifier - dot] = '\0';
  885|       |                  return resultbuf;
  886|       |                }
  887|       |            }
  888|       |        }
  889|       |
  890|       |      /* The Windows API has a function returning the locale's codepage as a
  891|       |         number: GetACP().  This encoding is used by Cygwin, unless the user
  892|       |         has set the environment variable CYGWIN=codepage:oem (which very few
  893|       |         people do).
  894|       |         Output directed to console windows needs to be converted (to
  895|       |         GetOEMCP() if the console is using a raster font, or to
  896|       |         GetConsoleOutputCP() if it is using a TrueType font).  Cygwin does
  897|       |         this conversion transparently (see winsup/cygwin/fhandler_console.cc),
  898|       |         converting to GetConsoleOutputCP().  This leads to correct results,
  899|       |         except when SetConsoleOutputCP has been called and a raster font is
  900|       |         in use.  */
  901|       |      {
  902|       |        char buf[2 + 10 + 1];
  903|       |
  904|       |        sprintf (buf, "CP%u", GetACP ());
  905|       |        strcpy (resultbuf, buf);
  906|       |        codeset = resultbuf;
  907|       |      }
  908|       |    }
  909|       |#  endif
  910|       |
  911|    270|  if (codeset == NULL)
  ------------------
  |  Branch (911:7): [True: 0, False: 270]
  ------------------
  912|       |    /* The canonical name cannot be determined.  */
  913|      0|    codeset = "";
  914|       |
  915|       |# elif defined WINDOWS_NATIVE
  916|       |
  917|       |  char buf[2 + 10 + 1];
  918|       |  static char resultbuf[2 + 10 + 1];
  919|       |
  920|       |  /* The Windows API has a function returning the locale's codepage as
  921|       |     a number, but the value doesn't change according to what the
  922|       |     'setlocale' call specified.  So we use it as a last resort, in
  923|       |     case the string returned by 'setlocale' doesn't specify the
  924|       |     codepage.  */
  925|       |  char *current_locale = setlocale (LC_CTYPE, NULL);
  926|       |  char *pdot = strrchr (current_locale, '.');
  927|       |
  928|       |  if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
  929|       |    sprintf (buf, "CP%s", pdot + 1);
  930|       |  else
  931|       |    {
  932|       |      /* The Windows API has a function returning the locale's codepage as a
  933|       |         number: GetACP().
  934|       |         When the output goes to a console window, it needs to be provided in
  935|       |         GetOEMCP() encoding if the console is using a raster font, or in
  936|       |         GetConsoleOutputCP() encoding if it is using a TrueType font.
  937|       |         But in GUI programs and for output sent to files and pipes, GetACP()
  938|       |         encoding is the best bet.  */
  939|       |      sprintf (buf, "CP%u", GetACP ());
  940|       |    }
  941|       |  /* For a locale name such as "French_France.65001", in Windows 10,
  942|       |     setlocale now returns "French_France.utf8" instead, or in the UTF-8
  943|       |     environment (with modern system settings) "fr_FR.UTF-8".  */
  944|       |  if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0
  945|       |      || strcmp (buf + 2, "UTF-8") == 0)
  946|       |    codeset = "UTF-8";
  947|       |  else
  948|       |    {
  949|       |      strcpy (resultbuf, buf);
  950|       |      codeset = resultbuf;
  951|       |    }
  952|       |
  953|       |# elif defined OS2
  954|       |
  955|       |  const char *locale;
  956|       |  static char resultbuf[2 + 10 + 1];
  957|       |  ULONG cp[3];
  958|       |  ULONG cplen;
  959|       |
  960|       |  codeset = NULL;
  961|       |
  962|       |  /* Allow user to override the codeset, as set in the operating system,
  963|       |     with standard language environment variables.  */
  964|       |  locale = getenv ("LC_ALL");
  965|       |  if (locale == NULL || locale[0] == '\0')
  966|       |    {
  967|       |      locale = getenv ("LC_CTYPE");
  968|       |      if (locale == NULL || locale[0] == '\0')
  969|       |        locale = getenv ("LANG");
  970|       |    }
  971|       |  if (locale != NULL && locale[0] != '\0')
  972|       |    {
  973|       |      /* If the locale name contains an encoding after the dot, return it.  */
  974|       |      const char *dot = strchr (locale, '.');
  975|       |
  976|       |      if (dot != NULL)
  977|       |        {
  978|       |          const char *modifier;
  979|       |
  980|       |          dot++;
  981|       |          /* Look for the possible @... trailer and remove it, if any.  */
  982|       |          modifier = strchr (dot, '@');
  983|       |          if (modifier == NULL)
  984|       |            return dot;
  985|       |          if (modifier - dot < sizeof (resultbuf))
  986|       |            {
  987|       |              /* This way of filling resultbuf is multithread-safe.  */
  988|       |              memcpy (resultbuf, dot, modifier - dot);
  989|       |              resultbuf [modifier - dot] = '\0';
  990|       |              return resultbuf;
  991|       |            }
  992|       |        }
  993|       |
  994|       |      /* For the POSIX locale, don't use the system's codepage.  */
  995|       |      if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
  996|       |        codeset = "";
  997|       |    }
  998|       |
  999|       |  if (codeset == NULL)
 1000|       |    {
 1001|       |      /* OS/2 has a function returning the locale's codepage as a number.  */
 1002|       |      if (DosQueryCp (sizeof (cp), cp, &cplen))
 1003|       |        codeset = "";
 1004|       |      else
 1005|       |        {
 1006|       |          char buf[2 + 10 + 1];
 1007|       |
 1008|       |          sprintf (buf, "CP%u", cp[0]);
 1009|       |          strcpy (resultbuf, buf);
 1010|       |          codeset = resultbuf;
 1011|       |        }
 1012|       |    }
 1013|       |
 1014|       |# else
 1015|       |
 1016|       |#  error "Add code for other platforms here."
 1017|       |
 1018|       |# endif
 1019|       |
 1020|       |  /* Resolve alias.  */
 1021|    270|  {
 1022|       |# ifdef alias_table_defined
 1023|       |    /* On some platforms, UTF-8 locales are the most frequently used ones.
 1024|       |       Speed up the common case and slow down the less common cases by
 1025|       |       testing for this case first.  */
 1026|       |#  if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__
 1027|       |    if (strcmp (codeset, "UTF-8") == 0)
 1028|       |      goto done_table_lookup;
 1029|       |    else
 1030|       |#  endif
 1031|       |      {
 1032|       |        const struct table_entry * const table = alias_table;
 1033|       |        size_t const table_size =
 1034|       |          sizeof (alias_table) / sizeof (struct table_entry);
 1035|       |        /* The table is sorted.  Perform a binary search.  */
 1036|       |        size_t hi = table_size;
 1037|       |        size_t lo = 0;
 1038|       |        while (lo < hi)
 1039|       |          {
 1040|       |            /* Invariant:
 1041|       |               for i < lo, strcmp (table[i].alias, codeset) < 0,
 1042|       |               for i >= hi, strcmp (table[i].alias, codeset) > 0.  */
 1043|       |            size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
 1044|       |            int cmp = strcmp (table[mid].alias, codeset);
 1045|       |            if (cmp < 0)
 1046|       |              lo = mid + 1;
 1047|       |            else if (cmp > 0)
 1048|       |              hi = mid;
 1049|       |            else
 1050|       |              {
 1051|       |                /* Found an i with
 1052|       |                     strcmp (table[i].alias, codeset) == 0.  */
 1053|       |                codeset = table[mid].canonical;
 1054|       |                goto done_table_lookup;
 1055|       |              }
 1056|       |          }
 1057|       |      }
 1058|       |    if (0)
 1059|       |      done_table_lookup: {}
 1060|       |    else
 1061|       |# endif
 1062|    270|      {
 1063|       |        /* Did not find it in the table.  */
 1064|       |        /* On Mac OS X, all modern locales use the UTF-8 encoding.
 1065|       |           BeOS and Haiku have a single locale, and it has UTF-8 encoding.  */
 1066|       |# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__
 1067|       |        codeset = "UTF-8";
 1068|       |# else
 1069|       |        /* Don't return an empty string.  GNU libc and GNU libiconv interpret
 1070|       |           the empty string as denoting "the locale's character encoding",
 1071|       |           thus GNU libiconv would call this function a second time.  */
 1072|    270|        if (codeset[0] == '\0')
  ------------------
  |  Branch (1072:13): [True: 0, False: 270]
  ------------------
 1073|      0|          codeset = "ASCII";
 1074|    270|# endif
 1075|    270|      }
 1076|    270|  }
 1077|       |
 1078|       |#else
 1079|       |
 1080|       |  /* On old systems which lack it, use setlocale or getenv.  */
 1081|       |  const char *locale = NULL;
 1082|       |
 1083|       |  /* But most old systems don't have a complete set of locales.  Some
 1084|       |     (like DJGPP) have only the C locale.  Therefore we don't use setlocale
 1085|       |     here; it would return "C" when it doesn't support the locale name the
 1086|       |     user has set.  */
 1087|       |# if 0
 1088|       |  locale = setlocale (LC_CTYPE, NULL);
 1089|       |# endif
 1090|       |  if (locale == NULL || locale[0] == '\0')
 1091|       |    {
 1092|       |      locale = getenv ("LC_ALL");
 1093|       |      if (locale == NULL || locale[0] == '\0')
 1094|       |        {
 1095|       |          locale = getenv ("LC_CTYPE");
 1096|       |          if (locale == NULL || locale[0] == '\0')
 1097|       |            locale = getenv ("LANG");
 1098|       |            if (locale == NULL)
 1099|       |              locale = "";
 1100|       |        }
 1101|       |    }
 1102|       |
 1103|       |  /* Map locale name to canonical encoding name.  */
 1104|       |  {
 1105|       |# ifdef locale_table_defined
 1106|       |    const struct table_entry * const table = locale_table;
 1107|       |    size_t const table_size =
 1108|       |      sizeof (locale_table) / sizeof (struct table_entry);
 1109|       |    /* The table is sorted.  Perform a binary search.  */
 1110|       |    size_t hi = table_size;
 1111|       |    size_t lo = 0;
 1112|       |    while (lo < hi)
 1113|       |      {
 1114|       |        /* Invariant:
 1115|       |           for i < lo, strcmp (table[i].locale, locale) < 0,
 1116|       |           for i >= hi, strcmp (table[i].locale, locale) > 0.  */
 1117|       |        size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
 1118|       |        int cmp = strcmp (table[mid].locale, locale);
 1119|       |        if (cmp < 0)
 1120|       |          lo = mid + 1;
 1121|       |        else if (cmp > 0)
 1122|       |          hi = mid;
 1123|       |        else
 1124|       |          {
 1125|       |            /* Found an i with
 1126|       |                 strcmp (table[i].locale, locale) == 0.  */
 1127|       |            codeset = table[mid].canonical;
 1128|       |            goto done_table_lookup;
 1129|       |          }
 1130|       |      }
 1131|       |    if (0)
 1132|       |      done_table_lookup: ;
 1133|       |    else
 1134|       |# endif
 1135|       |      {
 1136|       |        /* Did not find it in the table.  */
 1137|       |        /* On Mac OS X, all modern locales use the UTF-8 encoding.
 1138|       |           BeOS and Haiku have a single locale, and it has UTF-8 encoding.  */
 1139|       |# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__
 1140|       |        codeset = "UTF-8";
 1141|       |# else
 1142|       |        /* The canonical name cannot be determined.  */
 1143|       |        /* Don't return an empty string.  GNU libc and GNU libiconv interpret
 1144|       |           the empty string as denoting "the locale's character encoding",
 1145|       |           thus GNU libiconv would call this function a second time.  */
 1146|       |        codeset = "ASCII";
 1147|       |# endif
 1148|       |      }
 1149|       |  }
 1150|       |
 1151|       |#endif
 1152|       |
 1153|       |#ifdef DARWIN7
 1154|       |  /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
 1155|       |     (the default codeset) does not work when MB_CUR_MAX is 1.  */
 1156|       |  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
 1157|       |    codeset = "ASCII";
 1158|       |#endif
 1159|       |
 1160|    270|  return codeset;
 1161|    270|}

iconveh_open:
   48|    270|{
   49|    270|  iconv_t cd;
   50|    270|  iconv_t cd1;
   51|    270|  iconv_t cd2;
   52|       |
   53|    270|  cd = iconv_open (to_codeset, from_codeset);
   54|       |
   55|    270|  if (STRCASEEQ (from_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0))
  ------------------
  |  |  179|    270|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 270]
  |  |  ------------------
  ------------------
   56|      0|    cd1 = (iconv_t)(-1);
   57|    270|  else
   58|    270|    {
   59|    270|      cd1 = iconv_open ("UTF-8", from_codeset);
   60|    270|      if (cd1 == (iconv_t)(-1))
  ------------------
  |  Branch (60:11): [True: 0, False: 270]
  ------------------
   61|      0|        {
   62|      0|          int saved_errno = errno;
   63|      0|          if (cd != (iconv_t)(-1))
  ------------------
  |  Branch (63:15): [True: 0, False: 0]
  ------------------
   64|      0|            iconv_close (cd);
   65|      0|          errno = saved_errno;
   66|      0|          return -1;
   67|      0|        }
   68|    270|    }
   69|       |
   70|    270|  if (STRCASEEQ (to_codeset, "UTF-8", 'U','T','F','-','8',0,0,0,0)
  ------------------
  |  |  179|    540|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 270]
  |  |  ------------------
  ------------------
   71|    270|# if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
   72|    270|      && !defined __UCLIBC__) \
   73|    270|     || _LIBICONV_VERSION >= 0x0105 \
   74|    270|     || defined ICONV_SET_TRANSLITERATE
   75|    270|      || c_strcasecmp (to_codeset, "UTF-8//TRANSLIT") == 0
  ------------------
  |  Branch (75:10): [True: 270, False: 0]
  ------------------
   76|    270|# endif
   77|    270|     )
   78|    270|    cd2 = (iconv_t)(-1);
   79|      0|  else
   80|      0|    {
   81|      0|      cd2 = iconv_open (to_codeset, "UTF-8");
   82|      0|      if (cd2 == (iconv_t)(-1))
  ------------------
  |  Branch (82:11): [True: 0, False: 0]
  ------------------
   83|      0|        {
   84|      0|          int saved_errno = errno;
   85|      0|          if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (85:15): [True: 0, False: 0]
  ------------------
   86|      0|            iconv_close (cd1);
   87|      0|          if (cd != (iconv_t)(-1))
  ------------------
  |  Branch (87:15): [True: 0, False: 0]
  ------------------
   88|      0|            iconv_close (cd);
   89|      0|          errno = saved_errno;
   90|      0|          return -1;
   91|      0|        }
   92|      0|    }
   93|       |
   94|    270|  cdp->cd = cd;
   95|    270|  cdp->cd1 = cd1;
   96|    270|  cdp->cd2 = cd2;
   97|    270|  return 0;
   98|    270|}
iconveh_close:
  102|    270|{
  103|    270|  if (cd->cd2 != (iconv_t)(-1) && iconv_close (cd->cd2) < 0)
  ------------------
  |  Branch (103:7): [True: 0, False: 270]
  |  Branch (103:35): [True: 0, False: 0]
  ------------------
  104|      0|    {
  105|       |      /* Return -1, but preserve the errno from iconv_close.  */
  106|      0|      int saved_errno = errno;
  107|      0|      if (cd->cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (107:11): [True: 0, False: 0]
  ------------------
  108|      0|        iconv_close (cd->cd1);
  109|      0|      if (cd->cd != (iconv_t)(-1))
  ------------------
  |  Branch (109:11): [True: 0, False: 0]
  ------------------
  110|      0|        iconv_close (cd->cd);
  111|      0|      errno = saved_errno;
  112|      0|      return -1;
  113|      0|    }
  114|    270|  if (cd->cd1 != (iconv_t)(-1) && iconv_close (cd->cd1) < 0)
  ------------------
  |  Branch (114:7): [True: 270, False: 0]
  |  Branch (114:35): [True: 0, False: 270]
  ------------------
  115|      0|    {
  116|       |      /* Return -1, but preserve the errno from iconv_close.  */
  117|      0|      int saved_errno = errno;
  118|      0|      if (cd->cd != (iconv_t)(-1))
  ------------------
  |  Branch (118:11): [True: 0, False: 0]
  ------------------
  119|      0|        iconv_close (cd->cd);
  120|      0|      errno = saved_errno;
  121|      0|      return -1;
  122|      0|    }
  123|    270|  if (cd->cd != (iconv_t)(-1) && iconv_close (cd->cd) < 0)
  ------------------
  |  Branch (123:7): [True: 270, False: 0]
  |  Branch (123:34): [True: 0, False: 270]
  ------------------
  124|      0|    return -1;
  125|    270|  return 0;
  126|    270|}
mem_cd_iconveh:
 1055|    270|{
 1056|    270|  return mem_cd_iconveh_internal (src, srclen, cd->cd, cd->cd1, cd->cd2,
 1057|    270|                                  handler, 0, offsets, resultp, lengthp);
 1058|    270|}
mem_iconveh:
 1095|    270|{
 1096|    270|  if (srclen == 0)
  ------------------
  |  Branch (1096:7): [True: 0, False: 270]
  ------------------
 1097|      0|    {
 1098|       |      /* Nothing to convert.  */
 1099|      0|      *lengthp = 0;
 1100|      0|      return 0;
 1101|      0|    }
 1102|    270|  else if (offsets == NULL && c_strcasecmp (from_codeset, to_codeset) == 0)
  ------------------
  |  Branch (1102:12): [True: 270, False: 0]
  |  Branch (1102:31): [True: 0, False: 270]
  ------------------
 1103|      0|    {
 1104|      0|      char *result;
 1105|       |
 1106|      0|      if (*resultp != NULL && *lengthp >= srclen)
  ------------------
  |  Branch (1106:11): [True: 0, False: 0]
  |  Branch (1106:31): [True: 0, False: 0]
  ------------------
 1107|      0|        result = *resultp;
 1108|      0|      else
 1109|      0|        {
 1110|      0|          result = (char *) malloc (srclen);
 1111|      0|          if (result == NULL)
  ------------------
  |  Branch (1111:15): [True: 0, False: 0]
  ------------------
 1112|      0|            {
 1113|      0|              errno = ENOMEM;
 1114|      0|              return -1;
 1115|      0|            }
 1116|      0|        }
 1117|      0|      memcpy (result, src, srclen);
 1118|      0|      *resultp = result;
 1119|      0|      *lengthp = srclen;
 1120|      0|      return 0;
 1121|      0|    }
 1122|    270|  else
 1123|    270|    {
 1124|    270|#if HAVE_ICONV
 1125|    270|      iconveh_t cd;
 1126|    270|      char *result;
 1127|    270|      size_t length;
 1128|    270|      int retval;
 1129|       |
 1130|    270|      if (iconveh_open (to_codeset, from_codeset, &cd) < 0)
  ------------------
  |  Branch (1130:11): [True: 0, False: 270]
  ------------------
 1131|      0|        return -1;
 1132|       |
 1133|    270|      result = *resultp;
 1134|    270|      length = *lengthp;
 1135|    270|      retval = mem_cd_iconveh (src, srclen, &cd, handler, offsets,
 1136|    270|                               &result, &length);
 1137|       |
 1138|    270|      if (retval < 0)
  ------------------
  |  Branch (1138:11): [True: 270, False: 0]
  ------------------
 1139|    270|        {
 1140|       |          /* Close cd, but preserve the errno from str_cd_iconv.  */
 1141|    270|          int saved_errno = errno;
 1142|    270|          iconveh_close (&cd);
 1143|    270|          errno = saved_errno;
 1144|    270|        }
 1145|      0|      else
 1146|      0|        {
 1147|      0|          if (iconveh_close (&cd) < 0)
  ------------------
  |  Branch (1147:15): [True: 0, False: 0]
  ------------------
 1148|      0|            {
 1149|      0|              if (result != *resultp)
  ------------------
  |  Branch (1149:19): [True: 0, False: 0]
  ------------------
 1150|      0|                free (result);
 1151|      0|              return -1;
 1152|      0|            }
 1153|      0|          *resultp = result;
 1154|      0|          *lengthp = length;
 1155|      0|        }
 1156|    270|      return retval;
 1157|       |#else
 1158|       |      /* This is a different error code than if iconv_open existed but didn't
 1159|       |         support from_codeset and to_codeset, so that the caller can emit
 1160|       |         an error message such as
 1161|       |           "iconv() is not supported. Installing GNU libiconv and
 1162|       |            then reinstalling this package would fix this."  */
 1163|       |      errno = ENOSYS;
 1164|       |      return -1;
 1165|       |#endif
 1166|    270|    }
 1167|    270|}
striconveh.c:mem_cd_iconveh_internal:
  347|    270|{
  348|       |  /* When a conversion error occurs, we cannot start using CD1 and CD2 at
  349|       |     this point: FROM_CODESET may be a stateful encoding like ISO-2022-KR.
  350|       |     Instead, we have to start afresh from the beginning of SRC.  */
  351|       |  /* Use a temporary buffer, so that for small strings, a single malloc()
  352|       |     call will be sufficient.  */
  353|    270|# define tmpbufsize 4096
  354|       |  /* The alignment is needed when converting e.g. to glibc's WCHAR_T or
  355|       |     libiconv's UCS-4-INTERNAL encoding.  */
  356|    270|  union { unsigned int align; char buf[tmpbufsize]; } tmp;
  357|    270|# define tmpbuf tmp.buf
  358|       |
  359|    270|  char *initial_result;
  360|    270|  char *result;
  361|    270|  size_t allocated;
  362|    270|  size_t length;
  363|    270|  size_t last_length = (size_t)(-1); /* only needed if offsets != NULL */
  364|       |
  365|    270|  if (*resultp != NULL && *lengthp >= sizeof (tmpbuf))
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
  |  Branch (365:7): [True: 0, False: 270]
  |  Branch (365:27): [True: 0, False: 0]
  ------------------
  366|      0|    {
  367|      0|      initial_result = *resultp;
  368|      0|      allocated = *lengthp;
  369|      0|    }
  370|    270|  else
  371|    270|    {
  372|    270|      initial_result = tmpbuf;
  ------------------
  |  |  357|    270|# define tmpbuf tmp.buf
  ------------------
  373|    270|      allocated = sizeof (tmpbuf);
  ------------------
  |  |  357|    270|# define tmpbuf tmp.buf
  ------------------
  374|    270|    }
  375|    270|  result = initial_result;
  376|       |
  377|       |  /* Test whether a direct conversion is possible at all.  */
  378|    270|  if (cd == (iconv_t)(-1))
  ------------------
  |  Branch (378:7): [True: 0, False: 270]
  ------------------
  379|      0|    goto indirectly;
  380|       |
  381|    270|  if (offsets != NULL)
  ------------------
  |  Branch (381:7): [True: 0, False: 270]
  ------------------
  382|      0|    {
  383|      0|      size_t i;
  384|       |
  385|      0|      for (i = 0; i < srclen; i++)
  ------------------
  |  Branch (385:19): [True: 0, False: 0]
  ------------------
  386|      0|        offsets[i] = (size_t)(-1);
  387|       |
  388|      0|      last_length = (size_t)(-1);
  389|      0|    }
  390|    270|  length = 0;
  391|       |
  392|       |  /* First, try a direct conversion, and see whether a conversion error
  393|       |     occurs at all.  */
  394|    270|  {
  395|    270|    const char *inptr = src;
  396|    270|    size_t insize = srclen;
  397|       |
  398|       |    /* Set to the initial state.  */
  399|    270|    iconv (cd, NULL, NULL, NULL, NULL);
  400|       |
  401|    320|    while (insize > 0)
  ------------------
  |  Branch (401:12): [True: 320, False: 0]
  ------------------
  402|    320|      {
  403|    320|        char *outptr = result + length;
  404|    320|        size_t outsize = allocated - extra_alloc - length;
  405|    320|        bool incremented;
  406|    320|        size_t res;
  407|    320|        bool grow;
  408|       |
  409|    320|        if (offsets != NULL)
  ------------------
  |  Branch (409:13): [True: 0, False: 320]
  ------------------
  410|      0|          {
  411|      0|            if (length != last_length) /* ensure that offset[] be increasing */
  ------------------
  |  Branch (411:17): [True: 0, False: 0]
  ------------------
  412|      0|              {
  413|      0|                offsets[inptr - src] = length;
  414|      0|                last_length = length;
  415|      0|              }
  416|      0|            res = iconv_carefully_1 (cd,
  417|      0|                                     &inptr, &insize,
  418|      0|                                     &outptr, &outsize,
  419|      0|                                     &incremented);
  420|      0|          }
  421|    320|        else
  422|       |          /* Use iconv_carefully instead of iconv here, because:
  423|       |             - If TO_CODESET is UTF-8, we can do the error handling in this
  424|       |               loop, no need for a second loop,
  425|       |             - With iconv() implementations other than GNU libiconv and GNU
  426|       |               libc, if we use iconv() in a big swoop, checking for an E2BIG
  427|       |               return, we lose the number of irreversible conversions.  */
  428|    320|          res = iconv_carefully (cd,
  ------------------
  |  |  201|    320|     (*(incremented) = false, \
  |  |  202|    320|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  429|    320|                                 &inptr, &insize,
  430|    320|                                 &outptr, &outsize,
  431|    320|                                 &incremented);
  432|       |
  433|    320|        length = outptr - result;
  434|    320|        grow = (length + extra_alloc > allocated / 2);
  435|    320|        if (res == (size_t)(-1))
  ------------------
  |  Branch (435:13): [True: 320, False: 0]
  ------------------
  436|    320|          {
  437|    320|            if (errno == E2BIG)
  ------------------
  |  Branch (437:17): [True: 50, False: 270]
  ------------------
  438|     50|              grow = true;
  439|    270|            else if (errno == EINVAL)
  ------------------
  |  Branch (439:22): [True: 0, False: 270]
  ------------------
  440|      0|              break;
  441|    270|            else if (errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (441:22): [True: 270, False: 0]
  |  Branch (441:41): [True: 0, False: 270]
  ------------------
  442|      0|              {
  443|      0|                if (cd2 == (iconv_t)(-1))
  ------------------
  |  Branch (443:21): [True: 0, False: 0]
  ------------------
  444|      0|                  {
  445|       |                    /* TO_CODESET is UTF-8.  */
  446|       |                    /* Error handling can produce up to 1 or 3 bytes of
  447|       |                       output.  */
  448|      0|                    size_t extra_need =
  449|      0|                      (handler == iconveh_replacement_character ? 3 : 1);
  ------------------
  |  Branch (449:24): [True: 0, False: 0]
  ------------------
  450|      0|                    if (length + extra_need + extra_alloc > allocated)
  ------------------
  |  Branch (450:25): [True: 0, False: 0]
  ------------------
  451|      0|                      {
  452|      0|                        char *memory;
  453|       |
  454|      0|                        allocated = 2 * allocated;
  455|      0|                        if (length + extra_need + extra_alloc > allocated)
  ------------------
  |  Branch (455:29): [True: 0, False: 0]
  ------------------
  456|      0|                          allocated = 2 * allocated;
  457|      0|                        if (length + extra_need + extra_alloc > allocated)
  ------------------
  |  Branch (457:29): [True: 0, False: 0]
  ------------------
  458|      0|                          abort ();
  459|      0|                        if (result == initial_result)
  ------------------
  |  Branch (459:29): [True: 0, False: 0]
  ------------------
  460|      0|                          memory = (char *) malloc (allocated);
  461|      0|                        else
  462|      0|                          memory = (char *) realloc (result, allocated);
  463|      0|                        if (memory == NULL)
  ------------------
  |  Branch (463:29): [True: 0, False: 0]
  ------------------
  464|      0|                          {
  465|      0|                            if (result != initial_result)
  ------------------
  |  Branch (465:33): [True: 0, False: 0]
  ------------------
  466|      0|                              free (result);
  467|      0|                            errno = ENOMEM;
  468|      0|                            return -1;
  469|      0|                          }
  470|      0|                        if (result == initial_result)
  ------------------
  |  Branch (470:29): [True: 0, False: 0]
  ------------------
  471|      0|                          memcpy (memory, initial_result, length);
  472|      0|                        result = memory;
  473|      0|                        grow = false;
  474|      0|                      }
  475|       |                    /* The input is invalid in FROM_CODESET.  Eat up one byte
  476|       |                       and emit a replacement character or a question mark.  */
  477|      0|                    if (!incremented)
  ------------------
  |  Branch (477:25): [True: 0, False: 0]
  ------------------
  478|      0|                      {
  479|      0|                        if (insize == 0)
  ------------------
  |  Branch (479:29): [True: 0, False: 0]
  ------------------
  480|      0|                          abort ();
  481|      0|                        inptr++;
  482|      0|                        insize--;
  483|      0|                      }
  484|      0|                    if (handler == iconveh_replacement_character)
  ------------------
  |  Branch (484:25): [True: 0, False: 0]
  ------------------
  485|      0|                      {
  486|       |                        /* U+FFFD in UTF-8 encoding.  */
  487|      0|                        result[length+0] = '\357';
  488|      0|                        result[length+1] = '\277';
  489|      0|                        result[length+2] = '\275';
  490|      0|                        length += 3;
  491|      0|                      }
  492|      0|                    else
  493|      0|                      {
  494|      0|                        result[length] = '?';
  495|      0|                        length++;
  496|      0|                      }
  497|      0|                  }
  498|      0|                else
  499|      0|                  goto indirectly;
  500|      0|              }
  501|    270|            else
  502|    270|              {
  503|    270|                if (result != initial_result)
  ------------------
  |  Branch (503:21): [True: 20, False: 250]
  ------------------
  504|     20|                  free (result);
  505|    270|                return -1;
  506|    270|              }
  507|    320|          }
  508|     50|        if (insize == 0)
  ------------------
  |  Branch (508:13): [True: 0, False: 50]
  ------------------
  509|      0|          break;
  510|     50|        if (grow)
  ------------------
  |  Branch (510:13): [True: 50, False: 0]
  ------------------
  511|     50|          {
  512|     50|            char *memory;
  513|       |
  514|     50|            allocated = 2 * allocated;
  515|     50|            if (result == initial_result)
  ------------------
  |  Branch (515:17): [True: 20, False: 30]
  ------------------
  516|     20|              memory = (char *) malloc (allocated);
  517|     30|            else
  518|     30|              memory = (char *) realloc (result, allocated);
  519|     50|            if (memory == NULL)
  ------------------
  |  Branch (519:17): [True: 0, False: 50]
  ------------------
  520|      0|              {
  521|      0|                if (result != initial_result)
  ------------------
  |  Branch (521:21): [True: 0, False: 0]
  ------------------
  522|      0|                  free (result);
  523|      0|                errno = ENOMEM;
  524|      0|                return -1;
  525|      0|              }
  526|     50|            if (result == initial_result)
  ------------------
  |  Branch (526:17): [True: 20, False: 30]
  ------------------
  527|     20|              memcpy (memory, initial_result, length);
  528|     50|            result = memory;
  529|     50|          }
  530|     50|      }
  531|    270|  }
  532|       |
  533|       |  /* Now get the conversion state back to the initial state.
  534|       |     But avoid glibc-2.1 bug and Solaris 2.7 bug.  */
  535|      0|#if defined _LIBICONV_VERSION \
  536|      0|    || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
  537|      0|         || defined __sun)
  538|      0|  for (;;)
  539|      0|    {
  540|      0|      char *outptr = result + length;
  541|      0|      size_t outsize = allocated - extra_alloc - length;
  542|      0|      size_t res;
  543|       |
  544|      0|      res = iconv (cd, NULL, NULL, &outptr, &outsize);
  545|      0|      length = outptr - result;
  546|      0|      if (res == (size_t)(-1))
  ------------------
  |  Branch (546:11): [True: 0, False: 0]
  ------------------
  547|      0|        {
  548|      0|          if (errno == E2BIG)
  ------------------
  |  Branch (548:15): [True: 0, False: 0]
  ------------------
  549|      0|            {
  550|      0|              char *memory;
  551|       |
  552|      0|              allocated = 2 * allocated;
  553|      0|              if (result == initial_result)
  ------------------
  |  Branch (553:19): [True: 0, False: 0]
  ------------------
  554|      0|                memory = (char *) malloc (allocated);
  555|      0|              else
  556|      0|                memory = (char *) realloc (result, allocated);
  557|      0|              if (memory == NULL)
  ------------------
  |  Branch (557:19): [True: 0, False: 0]
  ------------------
  558|      0|                {
  559|      0|                  if (result != initial_result)
  ------------------
  |  Branch (559:23): [True: 0, False: 0]
  ------------------
  560|      0|                    free (result);
  561|      0|                  errno = ENOMEM;
  562|      0|                  return -1;
  563|      0|                }
  564|      0|              if (result == initial_result)
  ------------------
  |  Branch (564:19): [True: 0, False: 0]
  ------------------
  565|      0|                memcpy (memory, initial_result, length);
  566|      0|              result = memory;
  567|      0|            }
  568|      0|          else
  569|      0|            {
  570|      0|              if (result != initial_result)
  ------------------
  |  Branch (570:19): [True: 0, False: 0]
  ------------------
  571|      0|                free (result);
  572|      0|              return -1;
  573|      0|            }
  574|      0|        }
  575|      0|      else
  576|      0|        break;
  577|      0|    }
  578|      0|#endif
  579|       |
  580|       |  /* The direct conversion succeeded.  */
  581|      0|  goto done;
  582|       |
  583|      0| indirectly:
  584|       |  /* The direct conversion failed.
  585|       |     Use a conversion through UTF-8.  */
  586|      0|  if (offsets != NULL)
  ------------------
  |  Branch (586:7): [True: 0, False: 0]
  ------------------
  587|      0|    {
  588|      0|      size_t i;
  589|       |
  590|      0|      for (i = 0; i < srclen; i++)
  ------------------
  |  Branch (590:19): [True: 0, False: 0]
  ------------------
  591|      0|        offsets[i] = (size_t)(-1);
  592|       |
  593|      0|      last_length = (size_t)(-1);
  594|      0|    }
  595|      0|  length = 0;
  596|      0|  {
  597|      0|    const bool slowly = (offsets != NULL || handler == iconveh_error);
  ------------------
  |  Branch (597:26): [True: 0, False: 0]
  |  Branch (597:45): [True: 0, False: 0]
  ------------------
  598|      0|# define utf8bufsize 4096 /* may also be smaller or larger than tmpbufsize */
  599|      0|    char utf8buf[utf8bufsize + 3];
  600|      0|    size_t utf8len = 0;
  601|      0|    const char *in1ptr = src;
  602|      0|    size_t in1size = srclen;
  603|      0|    bool do_final_flush1 = true;
  604|      0|    bool do_final_flush2 = true;
  605|       |
  606|       |    /* Set to the initial state.  */
  607|      0|    if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (607:9): [True: 0, False: 0]
  ------------------
  608|      0|      iconv (cd1, NULL, NULL, NULL, NULL);
  609|      0|    if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (609:9): [True: 0, False: 0]
  ------------------
  610|      0|      iconv (cd2, NULL, NULL, NULL, NULL);
  611|       |
  612|      0|    while (in1size > 0 || do_final_flush1 || utf8len > 0 || do_final_flush2)
  ------------------
  |  Branch (612:12): [True: 0, False: 0]
  |  Branch (612:27): [True: 0, False: 0]
  |  Branch (612:46): [True: 0, False: 0]
  |  Branch (612:61): [True: 0, False: 0]
  ------------------
  613|      0|      {
  614|      0|        char *out1ptr = utf8buf + utf8len;
  615|      0|        size_t out1size = utf8bufsize - utf8len;
  ------------------
  |  |  598|      0|# define utf8bufsize 4096 /* may also be smaller or larger than tmpbufsize */
  ------------------
  616|      0|        bool incremented1;
  617|      0|        size_t res1;
  618|      0|        int errno1;
  619|       |
  620|       |        /* Conversion step 1: from FROM_CODESET to UTF-8.  */
  621|      0|        if (in1size > 0)
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|          {
  623|      0|            if (offsets != NULL
  ------------------
  |  Branch (623:17): [True: 0, False: 0]
  ------------------
  624|      0|                && length != last_length) /* ensure that offset[] be increasing */
  ------------------
  |  Branch (624:20): [True: 0, False: 0]
  ------------------
  625|      0|              {
  626|      0|                offsets[in1ptr - src] = length;
  627|      0|                last_length = length;
  628|      0|              }
  629|      0|            if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (629:17): [True: 0, False: 0]
  ------------------
  630|      0|              {
  631|      0|                if (slowly)
  ------------------
  |  Branch (631:21): [True: 0, False: 0]
  ------------------
  632|      0|                  res1 = iconv_carefully_1 (cd1,
  633|      0|                                            &in1ptr, &in1size,
  634|      0|                                            &out1ptr, &out1size,
  635|      0|                                            &incremented1);
  636|      0|                else
  637|      0|                  res1 = iconv_carefully (cd1,
  ------------------
  |  |  201|      0|     (*(incremented) = false, \
  |  |  202|      0|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  638|      0|                                          &in1ptr, &in1size,
  639|      0|                                          &out1ptr, &out1size,
  640|      0|                                          &incremented1);
  641|      0|              }
  642|      0|            else
  643|      0|              {
  644|       |                /* FROM_CODESET is UTF-8.  */
  645|      0|                res1 = utf8conv_carefully (slowly,
  646|      0|                                           &in1ptr, &in1size,
  647|      0|                                           &out1ptr, &out1size,
  648|      0|                                           &incremented1);
  649|      0|              }
  650|      0|          }
  651|      0|        else if (do_final_flush1)
  ------------------
  |  Branch (651:18): [True: 0, False: 0]
  ------------------
  652|      0|          {
  653|       |            /* Now get the conversion state of CD1 back to the initial state.
  654|       |               But avoid glibc-2.1 bug and Solaris 2.7 bug.  */
  655|      0|# if defined _LIBICONV_VERSION \
  656|      0|     || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
  657|      0|          || defined __sun)
  658|      0|            if (cd1 != (iconv_t)(-1))
  ------------------
  |  Branch (658:17): [True: 0, False: 0]
  ------------------
  659|      0|              res1 = iconv (cd1, NULL, NULL, &out1ptr, &out1size);
  660|      0|            else
  661|      0|# endif
  662|      0|              res1 = 0;
  663|      0|            do_final_flush1 = false;
  664|      0|            incremented1 = true;
  665|      0|          }
  666|      0|        else
  667|      0|          {
  668|      0|            res1 = 0;
  669|      0|            incremented1 = true;
  670|      0|          }
  671|      0|        if (res1 == (size_t)(-1)
  ------------------
  |  Branch (671:13): [True: 0, False: 0]
  ------------------
  672|      0|            && !(errno == E2BIG || errno == EINVAL || errno == EILSEQ))
  ------------------
  |  Branch (672:18): [True: 0, False: 0]
  |  Branch (672:36): [True: 0, False: 0]
  |  Branch (672:55): [True: 0, False: 0]
  ------------------
  673|      0|          {
  674|      0|            if (result != initial_result)
  ------------------
  |  Branch (674:17): [True: 0, False: 0]
  ------------------
  675|      0|              free (result);
  676|      0|            return -1;
  677|      0|          }
  678|      0|        if (res1 == (size_t)(-1)
  ------------------
  |  Branch (678:13): [True: 0, False: 0]
  ------------------
  679|      0|            && errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (679:16): [True: 0, False: 0]
  |  Branch (679:35): [True: 0, False: 0]
  ------------------
  680|      0|          {
  681|       |            /* The input is invalid in FROM_CODESET.  Eat up one byte and
  682|       |               emit a U+FFFD character or a question mark.  Room for this
  683|       |               character was allocated at the end of utf8buf.  */
  684|      0|            if (!incremented1)
  ------------------
  |  Branch (684:17): [True: 0, False: 0]
  ------------------
  685|      0|              {
  686|      0|                if (in1size == 0)
  ------------------
  |  Branch (686:21): [True: 0, False: 0]
  ------------------
  687|      0|                  abort ();
  688|      0|                in1ptr++;
  689|      0|                in1size--;
  690|      0|              }
  691|      0|            if (handler == iconveh_replacement_character)
  ------------------
  |  Branch (691:17): [True: 0, False: 0]
  ------------------
  692|      0|              {
  693|       |                /* U+FFFD in UTF-8 encoding.  */
  694|      0|                out1ptr[0] = '\357';
  695|      0|                out1ptr[1] = '\277';
  696|      0|                out1ptr[2] = '\275';
  697|      0|                out1ptr += 3;
  698|      0|              }
  699|      0|            else
  700|      0|              *out1ptr++ = '?';
  701|      0|            res1 = 0;
  702|      0|          }
  703|      0|        errno1 = errno;
  704|      0|        utf8len = out1ptr - utf8buf;
  705|       |
  706|      0|        if (offsets != NULL
  ------------------
  |  Branch (706:13): [True: 0, False: 0]
  ------------------
  707|      0|            || in1size == 0
  ------------------
  |  Branch (707:16): [True: 0, False: 0]
  ------------------
  708|      0|            || utf8len > utf8bufsize / 2
  ------------------
  |  |  598|      0|# define utf8bufsize 4096 /* may also be smaller or larger than tmpbufsize */
  ------------------
  |  Branch (708:16): [True: 0, False: 0]
  ------------------
  709|      0|            || (res1 == (size_t)(-1) && errno1 == E2BIG))
  ------------------
  |  Branch (709:17): [True: 0, False: 0]
  |  Branch (709:41): [True: 0, False: 0]
  ------------------
  710|      0|          {
  711|       |            /* Conversion step 2: from UTF-8 to TO_CODESET.  */
  712|      0|            const char *in2ptr = utf8buf;
  713|      0|            size_t in2size = utf8len;
  714|       |
  715|      0|            while (in2size > 0
  ------------------
  |  Branch (715:20): [True: 0, False: 0]
  ------------------
  716|      0|                   || (in1size == 0 && !do_final_flush1 && do_final_flush2))
  ------------------
  |  Branch (716:24): [True: 0, False: 0]
  |  Branch (716:40): [True: 0, False: 0]
  |  Branch (716:60): [True: 0, False: 0]
  ------------------
  717|      0|              {
  718|      0|                char *out2ptr = result + length;
  719|      0|                size_t out2size = allocated - extra_alloc - length;
  720|      0|                bool incremented2;
  721|      0|                size_t res2;
  722|      0|                bool grow;
  723|       |
  724|      0|                if (in2size > 0)
  ------------------
  |  Branch (724:21): [True: 0, False: 0]
  ------------------
  725|      0|                  {
  726|      0|                    if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (726:25): [True: 0, False: 0]
  ------------------
  727|      0|                      res2 = iconv_carefully (cd2,
  ------------------
  |  |  201|      0|     (*(incremented) = false, \
  |  |  202|      0|      iconv (cd, (ICONV_CONST char **) (inbuf), inbytesleft, outbuf, outbytesleft))
  ------------------
  728|      0|                                              &in2ptr, &in2size,
  729|      0|                                              &out2ptr, &out2size,
  730|      0|                                              &incremented2);
  731|      0|                    else
  732|       |                      /* TO_CODESET is UTF-8.  */
  733|      0|                      res2 = utf8conv_carefully (false,
  734|      0|                                                 &in2ptr, &in2size,
  735|      0|                                                 &out2ptr, &out2size,
  736|      0|                                                 &incremented2);
  737|      0|                  }
  738|      0|                else /* in1size == 0 && !do_final_flush1
  739|       |                        && in2size == 0 && do_final_flush2 */
  740|      0|                  {
  741|       |                    /* Now get the conversion state of CD1 back to the initial
  742|       |                       state.  But avoid glibc-2.1 bug and Solaris 2.7 bug.  */
  743|      0|# if defined _LIBICONV_VERSION \
  744|      0|     || !(((__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1) && !defined __UCLIBC__) \
  745|      0|          || defined __sun)
  746|      0|                    if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (746:25): [True: 0, False: 0]
  ------------------
  747|      0|                      res2 = iconv (cd2, NULL, NULL, &out2ptr, &out2size);
  748|      0|                    else
  749|      0|# endif
  750|      0|                      res2 = 0;
  751|      0|                    do_final_flush2 = false;
  752|      0|                    incremented2 = true;
  753|      0|                  }
  754|       |
  755|      0|                length = out2ptr - result;
  756|      0|                grow = (length + extra_alloc > allocated / 2);
  757|      0|                if (res2 == (size_t)(-1))
  ------------------
  |  Branch (757:21): [True: 0, False: 0]
  ------------------
  758|      0|                  {
  759|      0|                    if (errno == E2BIG)
  ------------------
  |  Branch (759:25): [True: 0, False: 0]
  ------------------
  760|      0|                      grow = true;
  761|      0|                    else if (errno == EINVAL)
  ------------------
  |  Branch (761:30): [True: 0, False: 0]
  ------------------
  762|      0|                      break;
  763|      0|                    else if (errno == EILSEQ && handler != iconveh_error)
  ------------------
  |  Branch (763:30): [True: 0, False: 0]
  |  Branch (763:49): [True: 0, False: 0]
  ------------------
  764|      0|                      {
  765|       |                        /* Error handling can produce up to 10 bytes of UTF-8
  766|       |                           output.  But TO_CODESET may be UCS-2, UTF-16 or
  767|       |                           UCS-4, so use CD2 here as well.  */
  768|      0|                        char scratchbuf[10];
  769|      0|                        size_t scratchlen;
  770|      0|                        ucs4_t uc;
  771|      0|                        const char *inptr;
  772|      0|                        size_t insize;
  773|      0|                        size_t res;
  774|       |
  775|      0|                        if (incremented2)
  ------------------
  |  Branch (775:29): [True: 0, False: 0]
  ------------------
  776|      0|                          {
  777|      0|                            if (u8_prev (&uc, (const uint8_t *) in2ptr,
  ------------------
  |  Branch (777:33): [True: 0, False: 0]
  ------------------
  778|      0|                                         (const uint8_t *) utf8buf)
  779|      0|                                == NULL)
  780|      0|                              abort ();
  781|      0|                          }
  782|      0|                        else
  783|      0|                          {
  784|      0|                            int n;
  785|      0|                            if (in2size == 0)
  ------------------
  |  Branch (785:33): [True: 0, False: 0]
  ------------------
  786|      0|                              abort ();
  787|      0|                            n = u8_mbtouc_unsafe (&uc, (const uint8_t *) in2ptr,
  788|      0|                                                  in2size);
  789|      0|                            in2ptr += n;
  790|      0|                            in2size -= n;
  791|      0|                          }
  792|       |
  793|      0|                        if (handler == iconveh_escape_sequence)
  ------------------
  |  Branch (793:29): [True: 0, False: 0]
  ------------------
  794|      0|                          {
  795|      0|                            static char const hex[16] = "0123456789ABCDEF";
  796|      0|                            scratchlen = 0;
  797|      0|                            scratchbuf[scratchlen++] = '\\';
  798|      0|                            if (uc < 0x10000)
  ------------------
  |  Branch (798:33): [True: 0, False: 0]
  ------------------
  799|      0|                              scratchbuf[scratchlen++] = 'u';
  800|      0|                            else
  801|      0|                              {
  802|      0|                                scratchbuf[scratchlen++] = 'U';
  803|      0|                                scratchbuf[scratchlen++] = hex[(uc>>28) & 15];
  804|      0|                                scratchbuf[scratchlen++] = hex[(uc>>24) & 15];
  805|      0|                                scratchbuf[scratchlen++] = hex[(uc>>20) & 15];
  806|      0|                                scratchbuf[scratchlen++] = hex[(uc>>16) & 15];
  807|      0|                              }
  808|      0|                            scratchbuf[scratchlen++] = hex[(uc>>12) & 15];
  809|      0|                            scratchbuf[scratchlen++] = hex[(uc>>8) & 15];
  810|      0|                            scratchbuf[scratchlen++] = hex[(uc>>4) & 15];
  811|      0|                            scratchbuf[scratchlen++] = hex[uc & 15];
  812|      0|                          }
  813|      0|                        else if (handler == iconveh_replacement_character)
  ------------------
  |  Branch (813:34): [True: 0, False: 0]
  ------------------
  814|      0|                          {
  815|       |                            /* U+FFFD in UTF-8 encoding.  */
  816|      0|                            scratchbuf[0] = '\357';
  817|      0|                            scratchbuf[1] = '\277';
  818|      0|                            scratchbuf[2] = '\275';
  819|      0|                            scratchlen = 3;
  820|      0|                          }
  821|      0|                        else
  822|      0|                          {
  823|      0|                            scratchbuf[0] = '?';
  824|      0|                            scratchlen = 1;
  825|      0|                          }
  826|       |
  827|      0|                        inptr = scratchbuf;
  828|      0|                        insize = scratchlen;
  829|      0|                        if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (829:29): [True: 0, False: 0]
  ------------------
  830|      0|                          {
  831|      0|                            char *out2ptr_try = out2ptr;
  832|      0|                            size_t out2size_try = out2size;
  833|      0|                            res = iconv (cd2,
  834|      0|                                         (ICONV_CONST char **) &inptr, &insize,
  835|      0|                                         &out2ptr_try, &out2size_try);
  836|      0|                            if (handler == iconveh_replacement_character
  ------------------
  |  Branch (836:33): [True: 0, False: 0]
  ------------------
  837|      0|                                && (res == (size_t)(-1)
  ------------------
  |  Branch (837:36): [True: 0, False: 0]
  |  Branch (837:37): [True: 0, False: 0]
  ------------------
  838|      0|                                    ? errno == EILSEQ
  839|       |                                    /* FreeBSD iconv(), NetBSD iconv(), and
  840|       |                                       Solaris 11 iconv() insert a '?' if they
  841|       |                                       cannot convert.  This is what we want.
  842|       |                                       But IRIX iconv() inserts a NUL byte if it
  843|       |                                       cannot convert.
  844|       |                                       And musl libc iconv() inserts a '*' if it
  845|       |                                       cannot convert.  */
  846|      0|                                    : (res > 0
  ------------------
  |  Branch (846:40): [True: 0, False: 0]
  ------------------
  847|      0|                                       && !(out2ptr_try - out2ptr == 1
  ------------------
  |  Branch (847:45): [True: 0, False: 0]
  ------------------
  848|      0|                                            && *out2ptr == '?'))))
  ------------------
  |  Branch (848:48): [True: 0, False: 0]
  ------------------
  849|      0|                              {
  850|       |                                /* The iconv() call failed.
  851|       |                                   U+FFFD can't be converted to TO_CODESET.
  852|       |                                   Use '?' instead.  */
  853|      0|                                scratchbuf[0] = '?';
  854|      0|                                scratchlen = 1;
  855|      0|                                inptr = scratchbuf;
  856|      0|                                insize = scratchlen;
  857|      0|                                res = iconv (cd2,
  858|      0|                                             (ICONV_CONST char **) &inptr, &insize,
  859|      0|                                             &out2ptr, &out2size);
  860|      0|                              }
  861|      0|                            else
  862|      0|                              {
  863|       |                                /* Accept the results of the iconv() call.  */
  864|      0|                                out2ptr = out2ptr_try;
  865|      0|                                out2size = out2size_try;
  866|      0|                                res = 0;
  867|      0|                              }
  868|      0|                          }
  869|      0|                        else
  870|      0|                          {
  871|       |                            /* TO_CODESET is UTF-8.  */
  872|      0|                            if (out2size >= insize)
  ------------------
  |  Branch (872:33): [True: 0, False: 0]
  ------------------
  873|      0|                              {
  874|      0|                                memcpy (out2ptr, inptr, insize);
  875|      0|                                out2ptr += insize;
  876|      0|                                out2size -= insize;
  877|      0|                                inptr += insize;
  878|      0|                                insize = 0;
  879|      0|                                res = 0;
  880|      0|                              }
  881|      0|                            else
  882|      0|                              {
  883|      0|                                errno = E2BIG;
  884|      0|                                res = (size_t)(-1);
  885|      0|                              }
  886|      0|                          }
  887|      0|                        length = out2ptr - result;
  888|      0|                        if (res == (size_t)(-1) && errno == E2BIG)
  ------------------
  |  Branch (888:29): [True: 0, False: 0]
  |  Branch (888:52): [True: 0, False: 0]
  ------------------
  889|      0|                          {
  890|      0|                            char *memory;
  891|       |
  892|      0|                            allocated = 2 * allocated;
  893|      0|                            if (length + 1 + extra_alloc > allocated)
  ------------------
  |  Branch (893:33): [True: 0, False: 0]
  ------------------
  894|      0|                              abort ();
  895|      0|                            if (result == initial_result)
  ------------------
  |  Branch (895:33): [True: 0, False: 0]
  ------------------
  896|      0|                              memory = (char *) malloc (allocated);
  897|      0|                            else
  898|      0|                              memory = (char *) realloc (result, allocated);
  899|      0|                            if (memory == NULL)
  ------------------
  |  Branch (899:33): [True: 0, False: 0]
  ------------------
  900|      0|                              {
  901|      0|                                if (result != initial_result)
  ------------------
  |  Branch (901:37): [True: 0, False: 0]
  ------------------
  902|      0|                                  free (result);
  903|      0|                                errno = ENOMEM;
  904|      0|                                return -1;
  905|      0|                              }
  906|      0|                            if (result == initial_result)
  ------------------
  |  Branch (906:33): [True: 0, False: 0]
  ------------------
  907|      0|                              memcpy (memory, initial_result, length);
  908|      0|                            result = memory;
  909|      0|                            grow = false;
  910|       |
  911|      0|                            out2ptr = result + length;
  912|      0|                            out2size = allocated - extra_alloc - length;
  913|      0|                            if (cd2 != (iconv_t)(-1))
  ------------------
  |  Branch (913:33): [True: 0, False: 0]
  ------------------
  914|      0|                              res = iconv (cd2,
  915|      0|                                           (ICONV_CONST char **) &inptr,
  916|      0|                                           &insize,
  917|      0|                                           &out2ptr, &out2size);
  918|      0|                            else
  919|      0|                              {
  920|       |                                /* TO_CODESET is UTF-8.  */
  921|      0|                                if (!(out2size >= insize))
  ------------------
  |  Branch (921:37): [True: 0, False: 0]
  ------------------
  922|      0|                                  abort ();
  923|      0|                                memcpy (out2ptr, inptr, insize);
  924|      0|                                out2ptr += insize;
  925|      0|                                out2size -= insize;
  926|      0|                                inptr += insize;
  927|      0|                                insize = 0;
  928|      0|                                res = 0;
  929|      0|                              }
  930|      0|                            length = out2ptr - result;
  931|      0|                          }
  932|       |# if !(defined _LIBICONV_VERSION && !(_LIBICONV_VERSION == 0x10b && defined __APPLE__)) \
  933|       |     && !(defined __GLIBC__ && !defined __UCLIBC__)
  934|       |                        /* IRIX iconv() inserts a NUL byte if it cannot convert.
  935|       |                           FreeBSD iconv(), NetBSD iconv(), and Solaris 11
  936|       |                           iconv() insert a '?' if they cannot convert.
  937|       |                           musl libc iconv() inserts a '*' if it cannot convert.
  938|       |                           Only GNU libiconv (excluding the bastard Apple iconv)
  939|       |                           and GNU libc are known to prefer to fail rather than
  940|       |                           doing a lossy conversion.  */
  941|       |                        if (res != (size_t)(-1) && res > 0)
  942|       |                          {
  943|       |                            errno = EILSEQ;
  944|       |                            res = (size_t)(-1);
  945|       |                          }
  946|       |# endif
  947|      0|                        if (res == (size_t)(-1))
  ------------------
  |  Branch (947:29): [True: 0, False: 0]
  ------------------
  948|      0|                          {
  949|       |                            /* Failure converting the ASCII replacement.  */
  950|      0|                            if (result != initial_result)
  ------------------
  |  Branch (950:33): [True: 0, False: 0]
  ------------------
  951|      0|                              free (result);
  952|      0|                            return -1;
  953|      0|                          }
  954|      0|                      }
  955|      0|                    else
  956|      0|                      {
  957|      0|                        if (result != initial_result)
  ------------------
  |  Branch (957:29): [True: 0, False: 0]
  ------------------
  958|      0|                          free (result);
  959|      0|                        return -1;
  960|      0|                      }
  961|      0|                  }
  962|      0|                if (!(in2size > 0
  ------------------
  |  Branch (962:23): [True: 0, False: 0]
  ------------------
  963|      0|                      || (in1size == 0 && !do_final_flush1 && do_final_flush2)))
  ------------------
  |  Branch (963:27): [True: 0, False: 0]
  |  Branch (963:43): [True: 0, False: 0]
  |  Branch (963:63): [True: 0, False: 0]
  ------------------
  964|      0|                  break;
  965|      0|                if (grow)
  ------------------
  |  Branch (965:21): [True: 0, False: 0]
  ------------------
  966|      0|                  {
  967|      0|                    char *memory;
  968|       |
  969|      0|                    allocated = 2 * allocated;
  970|      0|                    if (result == initial_result)
  ------------------
  |  Branch (970:25): [True: 0, False: 0]
  ------------------
  971|      0|                      memory = (char *) malloc (allocated);
  972|      0|                    else
  973|      0|                      memory = (char *) realloc (result, allocated);
  974|      0|                    if (memory == NULL)
  ------------------
  |  Branch (974:25): [True: 0, False: 0]
  ------------------
  975|      0|                      {
  976|      0|                        if (result != initial_result)
  ------------------
  |  Branch (976:29): [True: 0, False: 0]
  ------------------
  977|      0|                          free (result);
  978|      0|                        errno = ENOMEM;
  979|      0|                        return -1;
  980|      0|                      }
  981|      0|                    if (result == initial_result)
  ------------------
  |  Branch (981:25): [True: 0, False: 0]
  ------------------
  982|      0|                      memcpy (memory, initial_result, length);
  983|      0|                    result = memory;
  984|      0|                  }
  985|      0|              }
  986|       |
  987|       |            /* Move the remaining bytes to the beginning of utf8buf.  */
  988|      0|            if (in2size > 0)
  ------------------
  |  Branch (988:17): [True: 0, False: 0]
  ------------------
  989|      0|              memmove (utf8buf, in2ptr, in2size);
  990|      0|            utf8len = in2size;
  991|      0|          }
  992|       |
  993|      0|        if (res1 == (size_t)(-1))
  ------------------
  |  Branch (993:13): [True: 0, False: 0]
  ------------------
  994|      0|          {
  995|      0|            if (errno1 == EINVAL)
  ------------------
  |  Branch (995:17): [True: 0, False: 0]
  ------------------
  996|      0|              in1size = 0;
  997|      0|            else if (errno1 == EILSEQ)
  ------------------
  |  Branch (997:22): [True: 0, False: 0]
  ------------------
  998|      0|              {
  999|      0|                if (result != initial_result)
  ------------------
  |  Branch (999:21): [True: 0, False: 0]
  ------------------
 1000|      0|                  free (result);
 1001|      0|                errno = errno1;
 1002|      0|                return -1;
 1003|      0|              }
 1004|      0|          }
 1005|      0|      }
 1006|      0|# undef utf8bufsize
 1007|      0|  }
 1008|       |
 1009|      0| done:
 1010|       |  /* Now the final memory allocation.  */
 1011|      0|  if (result == tmpbuf)
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
  |  Branch (1011:7): [True: 0, False: 0]
  ------------------
 1012|      0|    {
 1013|      0|      size_t memsize = length + extra_alloc;
 1014|       |
 1015|      0|      if (*resultp != NULL && *lengthp >= memsize)
  ------------------
  |  Branch (1015:11): [True: 0, False: 0]
  |  Branch (1015:31): [True: 0, False: 0]
  ------------------
 1016|      0|        result = *resultp;
 1017|      0|      else
 1018|      0|        {
 1019|      0|          char *memory;
 1020|       |
 1021|      0|          memory = (char *) malloc (memsize > 0 ? memsize : 1);
  ------------------
  |  Branch (1021:37): [True: 0, False: 0]
  ------------------
 1022|      0|          if (memory != NULL)
  ------------------
  |  Branch (1022:15): [True: 0, False: 0]
  ------------------
 1023|      0|            result = memory;
 1024|      0|          else
 1025|      0|            {
 1026|      0|              errno = ENOMEM;
 1027|      0|              return -1;
 1028|      0|            }
 1029|      0|        }
 1030|      0|      memcpy (result, tmpbuf, length);
  ------------------
  |  |  357|      0|# define tmpbuf tmp.buf
  ------------------
 1031|      0|    }
 1032|      0|  else if (result != *resultp && length + extra_alloc < allocated)
  ------------------
  |  Branch (1032:12): [True: 0, False: 0]
  |  Branch (1032:34): [True: 0, False: 0]
  ------------------
 1033|      0|    {
 1034|       |      /* Shrink the allocated memory if possible.  */
 1035|      0|      size_t memsize = length + extra_alloc;
 1036|      0|      char *memory;
 1037|       |
 1038|      0|      memory = (char *) realloc (result, memsize > 0 ? memsize : 1);
  ------------------
  |  Branch (1038:42): [True: 0, False: 0]
  ------------------
 1039|      0|      if (memory != NULL)
  ------------------
  |  Branch (1039:11): [True: 0, False: 0]
  ------------------
 1040|      0|        result = memory;
 1041|      0|    }
 1042|      0|  *resultp = result;
 1043|      0|  *lengthp = length;
 1044|      0|  return 0;
 1045|      0|# undef tmpbuf
 1046|      0|# undef tmpbufsize
 1047|      0|}

mem_iconveha:
  214|    270|{
  215|    270|  if (srclen == 0)
  ------------------
  |  Branch (215:7): [True: 0, False: 270]
  ------------------
  216|      0|    {
  217|       |      /* Nothing to convert.  */
  218|      0|      *lengthp = 0;
  219|      0|      return 0;
  220|      0|    }
  221|       |
  222|       |  /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5 or Citrus/FreeBSD/macOS
  223|       |     iconv, we want to use transliteration.  */
  224|    270|#if (((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2) \
  225|    270|     && !defined __UCLIBC__) \
  226|    270|    || _LIBICONV_VERSION >= 0x0105 \
  227|    270|    || defined ICONV_SET_TRANSLITERATE
  228|    270|  if (transliterate)
  ------------------
  |  Branch (228:7): [True: 270, False: 0]
  ------------------
  229|    270|    {
  230|    270|      int retval;
  231|    270|      size_t len = strlen (to_codeset);
  232|    270|      char *to_codeset_suffixed = (char *) malloca (len + 10 + 1);
  ------------------
  |  |   86|    270|    ((N) < 4032 - (2 * sa_alignment_max - 1)                                   \
  |  |  ------------------
  |  |  |  Branch (86:6): [True: 270, False: 0]
  |  |  ------------------
  |  |   87|    270|     ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \
  |  |   88|    270|                  + (2 * sa_alignment_max - 1))                                \
  |  |   89|    270|                 & ~(uintptr_t)(2 * sa_alignment_max - 1))                     \
  |  |   90|    270|     : mmalloca (N))
  ------------------
  233|    270|      if (to_codeset_suffixed == NULL)
  ------------------
  |  Branch (233:11): [True: 0, False: 270]
  ------------------
  234|      0|        {
  235|      0|          errno = ENOMEM;
  236|      0|          return -1;
  237|      0|        }
  238|    270|      memcpy (to_codeset_suffixed, to_codeset, len);
  239|    270|      memcpy (to_codeset_suffixed + len, "//TRANSLIT", 10 + 1);
  240|       |
  241|    270|      retval = mem_iconveha_notranslit (src, srclen,
  242|    270|                                        from_codeset, to_codeset_suffixed,
  243|    270|                                        handler, offsets, resultp, lengthp);
  244|       |
  245|    270|      freea (to_codeset_suffixed);
  246|       |
  247|    270|      return retval;
  248|    270|    }
  249|      0|  else
  250|      0|#endif
  251|      0|    return mem_iconveha_notranslit (src, srclen,
  252|      0|                                    from_codeset, to_codeset,
  253|      0|                                    handler, offsets, resultp, lengthp);
  254|    270|}
striconveha.c:mem_iconveha_notranslit:
  151|    270|{
  152|    270|  int retval = mem_iconveh (src, srclen, from_codeset, to_codeset, handler,
  153|    270|                            offsets, resultp, lengthp);
  154|    270|  if (retval >= 0 || errno != EINVAL)
  ------------------
  |  Branch (154:7): [True: 0, False: 270]
  |  Branch (154:22): [True: 270, False: 0]
  ------------------
  155|    270|    return retval;
  156|      0|  else
  157|      0|    {
  158|      0|      struct autodetect_alias *alias;
  159|       |
  160|       |      /* Unsupported from_codeset or to_codeset. Check whether the caller
  161|       |         requested autodetection.  */
  162|      0|      for (alias = autodetect_list; alias != NULL; alias = alias->next)
  ------------------
  |  Branch (162:37): [True: 0, False: 0]
  ------------------
  163|      0|        if (strcmp (from_codeset, alias->name) == 0)
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|          {
  165|      0|            const char * const *encodings;
  166|       |
  167|      0|            if (handler != iconveh_error)
  ------------------
  |  Branch (167:17): [True: 0, False: 0]
  ------------------
  168|      0|              {
  169|       |                /* First try all encodings without any forgiving.  */
  170|      0|                encodings = alias->encodings_to_try;
  171|      0|                do
  172|      0|                  {
  173|      0|                    retval = mem_iconveha_notranslit (src, srclen,
  174|      0|                                                      *encodings, to_codeset,
  175|      0|                                                      iconveh_error, offsets,
  176|      0|                                                      resultp, lengthp);
  177|      0|                    if (!(retval < 0 && errno == EILSEQ))
  ------------------
  |  Branch (177:27): [True: 0, False: 0]
  |  Branch (177:41): [True: 0, False: 0]
  ------------------
  178|      0|                      return retval;
  179|      0|                    encodings++;
  180|      0|                  }
  181|      0|                while (*encodings != NULL);
  ------------------
  |  Branch (181:24): [True: 0, False: 0]
  ------------------
  182|      0|              }
  183|       |
  184|      0|            encodings = alias->encodings_to_try;
  185|      0|            do
  186|      0|              {
  187|      0|                retval = mem_iconveha_notranslit (src, srclen,
  188|      0|                                                  *encodings, to_codeset,
  189|      0|                                                  handler, offsets,
  190|      0|                                                  resultp, lengthp);
  191|      0|                if (!(retval < 0 && errno == EILSEQ))
  ------------------
  |  Branch (191:23): [True: 0, False: 0]
  |  Branch (191:37): [True: 0, False: 0]
  ------------------
  192|      0|                  return retval;
  193|      0|                encodings++;
  194|      0|              }
  195|      0|            while (*encodings != NULL);
  ------------------
  |  Branch (195:20): [True: 0, False: 0]
  ------------------
  196|       |
  197|       |            /* Return the last call's result.  */
  198|      0|            return -1;
  199|      0|          }
  200|       |
  201|       |      /* It wasn't an autodetection name.  */
  202|      0|      errno = EINVAL;
  203|      0|      return -1;
  204|      0|    }
  205|    270|}

u8_strconv_from_encoding:
   21|    270|{
   22|    270|  UNIT *result;
  ------------------
  |  |   31|    270|#define UNIT uint8_t
  ------------------
   23|    270|  size_t length;
   24|       |
   25|    270|  result =
   26|    270|    U_CONV_FROM_ENCODING (fromcode, handler,
  ------------------
  |  |   32|    270|#define U_CONV_FROM_ENCODING u8_conv_from_encoding
  ------------------
   27|    270|                          string, strlen (string) + 1, NULL,
   28|    270|                          NULL, &length);
   29|    270|  if (result == NULL)
  ------------------
  |  Branch (29:7): [True: 270, False: 0]
  ------------------
   30|    270|    return NULL;
   31|       |  /* Verify the result has exactly one NUL unit, at the end.  */
   32|      0|  if (!(length > 0 && result[length-1] == 0
  ------------------
  |  Branch (32:9): [True: 0, False: 0]
  |  Branch (32:23): [True: 0, False: 0]
  ------------------
   33|      0|        && U_STRLEN (result) == length-1))
  ------------------
  |  |   33|      0|#define U_STRLEN u8_strlen
  ------------------
  |  Branch (33:12): [True: 0, False: 0]
  ------------------
   34|      0|    {
   35|      0|      free (result);
   36|      0|      errno = EILSEQ;
   37|      0|      return NULL;
   38|      0|    }
   39|      0|  return result;
   40|      0|}

u8_conv_from_encoding:
   38|    270|{
   39|    270|  if (STRCASEEQ (fromcode, "UTF-8", 'U','T','F','-','8',0,0,0,0))
  ------------------
  |  |  179|    270|  strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
  |  |  ------------------
  |  |  |  Branch (179:3): [True: 0, False: 270]
  |  |  ------------------
  ------------------
   40|      0|    {
   41|       |      /* Conversion from UTF-8 to UTF-8.  No need to go through iconv().  */
   42|      0|      uint8_t *result;
   43|       |
   44|      0|      if (u8_check ((const uint8_t *) src, srclen))
  ------------------
  |  Branch (44:11): [True: 0, False: 0]
  ------------------
   45|      0|        {
   46|      0|          errno = EILSEQ;
   47|      0|          return NULL;
   48|      0|        }
   49|       |
   50|      0|      if (offsets != NULL)
  ------------------
  |  Branch (50:11): [True: 0, False: 0]
  ------------------
   51|      0|        {
   52|      0|          size_t i;
   53|       |
   54|      0|          for (i = 0; i < srclen; )
  ------------------
  |  Branch (54:23): [True: 0, False: 0]
  ------------------
   55|      0|            {
   56|      0|              int count = u8_mblen ((const uint8_t *) src + i, srclen - i);
   57|       |              /* We can rely on count > 0 because of the previous u8_check.  */
   58|      0|              if (count <= 0)
  ------------------
  |  Branch (58:19): [True: 0, False: 0]
  ------------------
   59|      0|                abort ();
   60|      0|              offsets[i] = i;
   61|      0|              i++;
   62|      0|              while (--count > 0)
  ------------------
  |  Branch (62:22): [True: 0, False: 0]
  ------------------
   63|      0|                offsets[i++] = (size_t)(-1);
   64|      0|            }
   65|      0|        }
   66|       |
   67|       |      /* Memory allocation.  */
   68|      0|      if (resultbuf != NULL && *lengthp >= srclen)
  ------------------
  |  Branch (68:11): [True: 0, False: 0]
  |  Branch (68:32): [True: 0, False: 0]
  ------------------
   69|      0|        result = resultbuf;
   70|      0|      else
   71|      0|        {
   72|      0|          result = (uint8_t *) malloc (srclen > 0 ? srclen : 1);
  ------------------
  |  Branch (72:40): [True: 0, False: 0]
  ------------------
   73|      0|          if (result == NULL)
  ------------------
  |  Branch (73:15): [True: 0, False: 0]
  ------------------
   74|      0|            {
   75|      0|              errno = ENOMEM;
   76|      0|              return NULL;
   77|      0|            }
   78|      0|        }
   79|       |
   80|      0|      if (srclen > 0)
  ------------------
  |  Branch (80:11): [True: 0, False: 0]
  ------------------
   81|      0|        memcpy ((char *) result, src, srclen);
   82|      0|      *lengthp = srclen;
   83|      0|      return result;
   84|      0|    }
   85|    270|  else
   86|    270|    {
   87|    270|      char *result = (char *) resultbuf;
   88|    270|      size_t length = *lengthp;
   89|       |
   90|    270|      if (mem_iconveha (src, srclen, fromcode, "UTF-8", true, handler,
  ------------------
  |  Branch (90:11): [True: 270, False: 0]
  ------------------
   91|    270|                        offsets, &result, &length) < 0)
   92|    270|        return NULL;
   93|       |
   94|      0|      if (result == NULL) /* when (resultbuf == NULL && length == 0)  */
  ------------------
  |  Branch (94:11): [True: 0, False: 0]
  ------------------
   95|      0|        {
   96|      0|          result = (char *) malloc (1);
   97|      0|          if (result == NULL)
  ------------------
  |  Branch (97:15): [True: 0, False: 0]
  ------------------
   98|      0|            {
   99|      0|              errno = ENOMEM;
  100|      0|              return NULL;
  101|      0|            }
  102|      0|        }
  103|      0|      *lengthp = length;
  104|      0|      return (uint8_t *) result;
  105|      0|    }
  106|    270|}

CRYPTO_malloc_array:
   19|   588k|{
   20|   588k|    size_t bytes;
   21|       |
   22|   588k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|   588k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 588k]
  |  |  ------------------
  ------------------
   23|      0|        return NULL;
   24|       |
   25|   588k|    return CRYPTO_malloc(bytes, file, line);
   26|   588k|}
CRYPTO_calloc:
   29|  9.21M|{
   30|  9.21M|    size_t bytes;
   31|       |
   32|  9.21M|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|  9.21M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.21M]
  |  |  ------------------
  ------------------
   33|      0|        return NULL;
   34|       |
   35|  9.21M|    return CRYPTO_zalloc(bytes, file, line);
   36|  9.21M|}
CRYPTO_aligned_alloc_array:
   40|  1.39k|{
   41|  1.39k|    size_t bytes;
   42|       |
   43|  1.39k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line))) {
  ------------------
  |  |   23|  1.39k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.39k]
  |  |  ------------------
  ------------------
   44|      0|        *freeptr = NULL;
   45|       |
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|  1.39k|    return CRYPTO_aligned_alloc(bytes, align, freeptr, file, line);
   50|  1.39k|}
CRYPTO_realloc_array:
   54|   365k|{
   55|   365k|    size_t bytes;
   56|       |
   57|   365k|    if (ossl_unlikely(!ossl_size_mul(num, size, &bytes, file, line)))
  ------------------
  |  |   23|   365k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 365k]
  |  |  ------------------
  ------------------
   58|      0|        return NULL;
   59|       |
   60|   365k|    return CRYPTO_realloc(addr, bytes, file, line);
   61|   365k|}

ossl_i2c_ASN1_BIT_STRING:
   22|  44.3k|{
   23|  44.3k|    int ret, j, bits, len;
   24|  44.3k|    unsigned char *p, *d;
   25|       |
   26|  44.3k|    if (a == NULL)
  ------------------
  |  Branch (26:9): [True: 0, False: 44.3k]
  ------------------
   27|      0|        return 0;
   28|       |
   29|  44.3k|    len = a->length;
   30|       |
   31|  44.3k|    if (len > 0) {
  ------------------
  |  Branch (31:9): [True: 44.3k, False: 0]
  ------------------
   32|  44.3k|        if (a->flags & ASN1_STRING_FLAG_BITS_LEFT) {
  ------------------
  |  |  164|  44.3k|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  |  Branch (32:13): [True: 44.3k, False: 0]
  ------------------
   33|  44.3k|            bits = (int)a->flags & 0x07;
   34|  44.3k|        } else {
   35|      0|            for (; len > 0; len--) {
  ------------------
  |  Branch (35:20): [True: 0, False: 0]
  ------------------
   36|      0|                if (a->data[len - 1])
  ------------------
  |  Branch (36:21): [True: 0, False: 0]
  ------------------
   37|      0|                    break;
   38|      0|            }
   39|       |
   40|      0|            if (len == 0) {
  ------------------
  |  Branch (40:17): [True: 0, False: 0]
  ------------------
   41|      0|                bits = 0;
   42|      0|            } else {
   43|      0|                j = a->data[len - 1];
   44|      0|                if (j & 0x01)
  ------------------
  |  Branch (44:21): [True: 0, False: 0]
  ------------------
   45|      0|                    bits = 0;
   46|      0|                else if (j & 0x02)
  ------------------
  |  Branch (46:26): [True: 0, False: 0]
  ------------------
   47|      0|                    bits = 1;
   48|      0|                else if (j & 0x04)
  ------------------
  |  Branch (48:26): [True: 0, False: 0]
  ------------------
   49|      0|                    bits = 2;
   50|      0|                else if (j & 0x08)
  ------------------
  |  Branch (50:26): [True: 0, False: 0]
  ------------------
   51|      0|                    bits = 3;
   52|      0|                else if (j & 0x10)
  ------------------
  |  Branch (52:26): [True: 0, False: 0]
  ------------------
   53|      0|                    bits = 4;
   54|      0|                else if (j & 0x20)
  ------------------
  |  Branch (54:26): [True: 0, False: 0]
  ------------------
   55|      0|                    bits = 5;
   56|      0|                else if (j & 0x40)
  ------------------
  |  Branch (56:26): [True: 0, False: 0]
  ------------------
   57|      0|                    bits = 6;
   58|      0|                else if (j & 0x80)
  ------------------
  |  Branch (58:26): [True: 0, False: 0]
  ------------------
   59|      0|                    bits = 7;
   60|      0|                else
   61|      0|                    bits = 0; /* should not happen */
   62|      0|            }
   63|      0|        }
   64|  44.3k|    } else
   65|      0|        bits = 0;
   66|       |
   67|  44.3k|    ret = 1 + len;
   68|  44.3k|    if (pp == NULL)
  ------------------
  |  Branch (68:9): [True: 33.2k, False: 11.0k]
  ------------------
   69|  33.2k|        return ret;
   70|       |
   71|  11.0k|    p = *pp;
   72|       |
   73|  11.0k|    *(p++) = (unsigned char)bits;
   74|  11.0k|    d = a->data;
   75|  11.0k|    if (len > 0) {
  ------------------
  |  Branch (75:9): [True: 11.0k, False: 0]
  ------------------
   76|  11.0k|        memcpy(p, d, len);
   77|  11.0k|        p += len;
   78|  11.0k|        p[-1] &= (0xff << bits);
   79|  11.0k|    }
   80|  11.0k|    *pp = p;
   81|  11.0k|    return ret;
   82|  44.3k|}
ossl_c2i_ASN1_BIT_STRING:
   86|   773k|{
   87|   773k|    ASN1_BIT_STRING *ret = NULL;
   88|   773k|    const unsigned char *p;
   89|   773k|    unsigned char *s;
   90|   773k|    int i = 0;
   91|       |
   92|   773k|    if (len < 1) {
  ------------------
  |  Branch (92:9): [True: 0, False: 773k]
  ------------------
   93|      0|        i = ASN1_R_STRING_TOO_SHORT;
  ------------------
  |  |  114|      0|#define ASN1_R_STRING_TOO_SHORT 152
  ------------------
   94|      0|        goto err;
   95|      0|    }
   96|       |
   97|   773k|    if (len > INT_MAX) {
  ------------------
  |  Branch (97:9): [True: 0, False: 773k]
  ------------------
   98|      0|        i = ASN1_R_STRING_TOO_LONG;
  ------------------
  |  |  113|      0|#define ASN1_R_STRING_TOO_LONG 151
  ------------------
   99|      0|        goto err;
  100|      0|    }
  101|       |
  102|   773k|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (102:9): [True: 0, False: 773k]
  |  Branch (102:24): [True: 201k, False: 572k]
  ------------------
  103|   201k|        if ((ret = ASN1_BIT_STRING_new()) == NULL)
  ------------------
  |  Branch (103:13): [True: 0, False: 201k]
  ------------------
  104|      0|            return NULL;
  105|   201k|    } else
  106|   572k|        ret = (*a);
  107|       |
  108|   773k|    p = *pp;
  109|   773k|    i = *(p++);
  110|   773k|    if (i > 7) {
  ------------------
  |  Branch (110:9): [True: 0, False: 773k]
  ------------------
  111|      0|        i = ASN1_R_INVALID_BIT_STRING_BITS_LEFT;
  ------------------
  |  |   70|      0|#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
  ------------------
  112|      0|        goto err;
  113|      0|    }
  114|       |    /*
  115|       |     * We do this to preserve the settings.  If we modify the settings, via
  116|       |     * the _set_bit function, we will recalculate on output
  117|       |     */
  118|   773k|    ossl_asn1_string_set_bits_left(ret, i);
  119|       |
  120|   773k|    if (len-- > 1) { /* using one because of the bits left byte */
  ------------------
  |  Branch (120:9): [True: 773k, False: 0]
  ------------------
  121|   773k|        s = OPENSSL_malloc((int)len);
  ------------------
  |  |  106|   773k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  122|   773k|        if (s == NULL) {
  ------------------
  |  Branch (122:13): [True: 0, False: 773k]
  ------------------
  123|      0|            goto err;
  124|      0|        }
  125|   773k|        memcpy(s, p, (int)len);
  126|   773k|        s[len - 1] &= (0xff << i);
  127|   773k|        p += len;
  128|   773k|    } else
  129|      0|        s = NULL;
  130|       |
  131|   773k|    ASN1_STRING_set0(ret, s, (int)len);
  132|   773k|    ret->type = V_ASN1_BIT_STRING;
  ------------------
  |  |   67|   773k|#define V_ASN1_BIT_STRING 3
  ------------------
  133|   773k|    if (a != NULL)
  ------------------
  |  Branch (133:9): [True: 773k, False: 0]
  ------------------
  134|   773k|        (*a) = ret;
  135|   773k|    *pp = p;
  136|   773k|    return ret;
  137|      0|err:
  138|      0|    if (i != 0)
  ------------------
  |  Branch (138:9): [True: 0, False: 0]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  |  Branch (140:24): [True: 0, False: 0]
  ------------------
  141|      0|        ASN1_BIT_STRING_free(ret);
  142|       |    return NULL;
  143|   773k|}

asn1_d2i_read_bio:
  110|   381k|{
  111|   381k|    BUF_MEM *b;
  112|   381k|    unsigned char *p;
  113|   381k|    size_t want = HEADER_SIZE;
  ------------------
  |  |  107|   381k|#define HEADER_SIZE 8
  ------------------
  114|   381k|    uint32_t eos = 0;
  115|   381k|    size_t off = 0;
  116|   381k|    size_t len = 0;
  117|   381k|    size_t diff;
  118|       |
  119|   381k|    const unsigned char *q;
  120|   381k|    long slen;
  121|   381k|    int inf, tag, xclass;
  122|       |
  123|   381k|    b = BUF_MEM_new();
  124|   381k|    if (b == NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 381k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return -1;
  127|      0|    }
  128|       |
  129|   381k|    ERR_set_mark();
  130|   381k|    for (;;) {
  131|   381k|        diff = len - off;
  132|   381k|        if (want >= diff) {
  ------------------
  |  Branch (132:13): [True: 381k, False: 0]
  ------------------
  133|   381k|            int i;
  134|       |
  135|   381k|            want -= diff;
  136|       |
  137|   381k|            if (len + want < len || !BUF_MEM_grow_clean(b, len + want)) {
  ------------------
  |  Branch (137:17): [True: 0, False: 381k]
  |  Branch (137:37): [True: 0, False: 381k]
  ------------------
  138|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  139|      0|                goto err;
  140|      0|            }
  141|   381k|            i = BIO_read(in, &(b->data[len]), (int)want);
  142|   381k|            if (i < 0 && diff == 0) {
  ------------------
  |  Branch (142:17): [True: 0, False: 381k]
  |  Branch (142:26): [True: 0, False: 0]
  ------------------
  143|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|                goto err;
  145|      0|            }
  146|   381k|            if (i > 0) {
  ------------------
  |  Branch (146:17): [True: 381k, False: 0]
  ------------------
  147|   381k|                if (len + i < len) {
  ------------------
  |  Branch (147:21): [True: 0, False: 381k]
  ------------------
  148|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|                    goto err;
  150|      0|                }
  151|   381k|                len += i;
  152|   381k|                if ((size_t)i < want)
  ------------------
  |  Branch (152:21): [True: 0, False: 381k]
  ------------------
  153|      0|                    continue;
  154|   381k|            }
  155|   381k|        }
  156|       |        /* else data already loaded */
  157|       |
  158|   381k|        p = (unsigned char *)&(b->data[off]);
  159|   381k|        q = p;
  160|   381k|        diff = len - off;
  161|   381k|        if (diff == 0)
  ------------------
  |  Branch (161:13): [True: 0, False: 381k]
  ------------------
  162|      0|            goto err;
  163|   381k|        inf = ASN1_get_object(&q, &slen, &tag, &xclass, (int)diff);
  164|   381k|        if (inf & 0x80) {
  ------------------
  |  Branch (164:13): [True: 381k, False: 0]
  ------------------
  165|   381k|            unsigned long e;
  166|       |
  167|   381k|            e = ERR_GET_REASON(ERR_peek_last_error());
  168|   381k|            if (e != ASN1_R_TOO_LONG)
  ------------------
  |  |  118|   381k|#define ASN1_R_TOO_LONG 155
  ------------------
  |  Branch (168:17): [True: 0, False: 381k]
  ------------------
  169|      0|                goto err;
  170|   381k|            ERR_pop_to_mark();
  171|   381k|            ERR_set_mark();
  172|   381k|        }
  173|   381k|        off += q - p; /* end of data */
  174|       |
  175|   381k|        if (inf & 1) {
  ------------------
  |  Branch (175:13): [True: 0, False: 381k]
  ------------------
  176|       |            /* no data body so go round again */
  177|      0|            if (eos == UINT32_MAX) {
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|                goto err;
  180|      0|            }
  181|      0|            eos++;
  182|      0|            want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 8
  ------------------
  183|   381k|        } else if (eos && (slen == 0) && (tag == V_ASN1_EOC)) {
  ------------------
  |  |   64|      0|#define V_ASN1_EOC 0
  ------------------
  |  Branch (183:20): [True: 0, False: 381k]
  |  Branch (183:27): [True: 0, False: 0]
  |  Branch (183:42): [True: 0, False: 0]
  ------------------
  184|       |            /* eos value, so go back and read another header */
  185|      0|            eos--;
  186|      0|            if (eos == 0)
  ------------------
  |  Branch (186:17): [True: 0, False: 0]
  ------------------
  187|      0|                break;
  188|      0|            else
  189|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 8
  ------------------
  190|   381k|        } else {
  191|       |            /* suck in slen bytes of data */
  192|   381k|            want = slen;
  193|   381k|            if (want > (len - off)) {
  ------------------
  |  Branch (193:17): [True: 381k, False: 0]
  ------------------
  194|   381k|                size_t chunk_max = ASN1_CHUNK_INITIAL_SIZE;
  ------------------
  |  |  108|   381k|#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
  ------------------
  195|       |
  196|   381k|                want -= (len - off);
  197|   381k|                if (want > INT_MAX /* BIO_read takes an int length */ || len + want < len) {
  ------------------
  |  Branch (197:21): [True: 0, False: 381k]
  |  Branch (197:74): [True: 0, False: 381k]
  ------------------
  198|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|                    goto err;
  200|      0|                }
  201|   762k|                while (want > 0) {
  ------------------
  |  Branch (201:24): [True: 381k, False: 381k]
  ------------------
  202|       |                    /*
  203|       |                     * Read content in chunks of increasing size
  204|       |                     * so we can return an error for EOF without
  205|       |                     * having to allocate the entire content length
  206|       |                     * in one go.
  207|       |                     */
  208|   381k|                    size_t chunk = want > chunk_max ? chunk_max : want;
  ------------------
  |  Branch (208:36): [True: 0, False: 381k]
  ------------------
  209|   381k|                    int i;
  210|       |
  211|   381k|                    if (!BUF_MEM_grow_clean(b, len + chunk)) {
  ------------------
  |  Branch (211:25): [True: 0, False: 381k]
  ------------------
  212|      0|                        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|                        goto err;
  214|      0|                    }
  215|   381k|                    want -= chunk;
  216|   762k|                    while (chunk > 0) {
  ------------------
  |  Branch (216:28): [True: 381k, False: 381k]
  ------------------
  217|   381k|                        i = BIO_read(in, &(b->data[len]), (int)chunk);
  218|   381k|                        if (i <= 0) {
  ------------------
  |  Branch (218:29): [True: 0, False: 381k]
  ------------------
  219|      0|                            ERR_raise(ERR_LIB_ASN1, ASN1_R_NOT_ENOUGH_DATA);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  220|      0|                            goto err;
  221|      0|                        }
  222|       |                        /*
  223|       |                         * This can't overflow because |len+want| didn't
  224|       |                         * overflow.
  225|       |                         */
  226|   381k|                        len += i;
  227|   381k|                        chunk -= i;
  228|   381k|                    }
  229|   381k|                    if (chunk_max < INT_MAX / 2)
  ------------------
  |  Branch (229:25): [True: 381k, False: 0]
  ------------------
  230|   381k|                        chunk_max *= 2;
  231|   381k|                }
  232|   381k|            }
  233|   381k|            if (off + slen < off) {
  ------------------
  |  Branch (233:17): [True: 0, False: 381k]
  ------------------
  234|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  235|      0|                goto err;
  236|      0|            }
  237|   381k|            off += slen;
  238|   381k|            if (eos == 0) {
  ------------------
  |  Branch (238:17): [True: 381k, False: 0]
  ------------------
  239|   381k|                break;
  240|   381k|            } else
  241|      0|                want = HEADER_SIZE;
  ------------------
  |  |  107|      0|#define HEADER_SIZE 8
  ------------------
  242|   381k|        }
  243|   381k|    }
  244|       |
  245|   381k|    if (off > INT_MAX) {
  ------------------
  |  Branch (245:9): [True: 0, False: 381k]
  ------------------
  246|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|        goto err;
  248|      0|    }
  249|       |
  250|   381k|    *pb = b;
  251|   381k|    ERR_clear_last_mark();
  252|   381k|    return (int)off;
  253|      0|err:
  254|      0|    ERR_clear_last_mark();
  255|      0|    BUF_MEM_free(b);
  256|      0|    return -1;
  257|   381k|}

ossl_asn1_item_digest_ex:
   57|  11.0k|{
   58|  11.0k|    int i, ret = 0;
   59|  11.0k|    unsigned char *str = NULL;
   60|  11.0k|    EVP_MD *fetched_md = (EVP_MD *)md;
   61|       |
   62|  11.0k|    i = ASN1_item_i2d(asn, &str, it);
   63|  11.0k|    if (i < 0 || str == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 11.0k]
  |  Branch (63:18): [True: 0, False: 11.0k]
  ------------------
   64|      0|        return 0;
   65|       |
   66|  11.0k|    if (EVP_MD_get0_provider(md) == NULL) {
  ------------------
  |  Branch (66:9): [True: 11.0k, False: 0]
  ------------------
   67|  11.0k|#if !defined(OPENSSL_NO_ENGINE)
   68|  11.0k|        ENGINE *tmpeng = ENGINE_get_digest_engine(EVP_MD_get_type(md));
   69|       |
   70|  11.0k|        if (tmpeng != NULL)
  ------------------
  |  Branch (70:13): [True: 0, False: 11.0k]
  ------------------
   71|      0|            ENGINE_finish(tmpeng);
   72|  11.0k|        else
   73|  11.0k|#endif
   74|  11.0k|            fetched_md = EVP_MD_fetch(libctx, EVP_MD_get0_name(md), propq);
   75|  11.0k|    }
   76|  11.0k|    if (fetched_md == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 11.0k]
  ------------------
   77|      0|        goto err;
   78|       |
   79|  11.0k|    ret = EVP_Digest(str, i, data, len, fetched_md, NULL);
   80|  11.0k|err:
   81|  11.0k|    OPENSSL_free(str);
  ------------------
  |  |  131|  11.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|  11.0k|    if (fetched_md != md)
  ------------------
  |  Branch (82:9): [True: 11.0k, False: 0]
  ------------------
   83|  11.0k|        EVP_MD_free(fetched_md);
   84|  11.0k|    return ret;
   85|  11.0k|}

ASN1_INTEGER_cmp:
   24|    380|{
   25|    380|    int neg, ret;
   26|       |    /* Compare signs */
   27|    380|    neg = x->type & V_ASN1_NEG;
  ------------------
  |  |   99|    380|#define V_ASN1_NEG 0x100
  ------------------
   28|    380|    if (neg != (y->type & V_ASN1_NEG)) {
  ------------------
  |  |   99|    380|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (28:9): [True: 0, False: 380]
  ------------------
   29|      0|        if (neg)
  ------------------
  |  Branch (29:13): [True: 0, False: 0]
  ------------------
   30|      0|            return -1;
   31|      0|        else
   32|      0|            return 1;
   33|      0|    }
   34|       |
   35|    380|    ret = ASN1_STRING_cmp(x, y);
   36|       |
   37|    380|    if (neg)
  ------------------
  |  Branch (37:9): [True: 0, False: 380]
  ------------------
   38|      0|        return -ret;
   39|    380|    else
   40|    380|        return ret;
   41|    380|}
ossl_c2i_ASN1_INTEGER:
  301|   381k|{
  302|   381k|    ASN1_INTEGER *ret = NULL;
  303|   381k|    size_t r;
  304|   381k|    int neg;
  305|       |
  306|   381k|    r = c2i_ibuf(NULL, NULL, *pp, len);
  307|       |
  308|   381k|    if (r == 0)
  ------------------
  |  Branch (308:9): [True: 0, False: 381k]
  ------------------
  309|      0|        return NULL;
  310|       |
  311|   381k|    if ((a == NULL) || ((*a) == NULL)) {
  ------------------
  |  Branch (311:9): [True: 0, False: 381k]
  |  Branch (311:24): [True: 191k, False: 190k]
  ------------------
  312|   191k|        ret = ASN1_INTEGER_new();
  313|   191k|        if (ret == NULL)
  ------------------
  |  Branch (313:13): [True: 0, False: 191k]
  ------------------
  314|      0|            return NULL;
  315|   191k|        ret->type = V_ASN1_INTEGER;
  ------------------
  |  |   66|   191k|#define V_ASN1_INTEGER 2
  ------------------
  316|   191k|    } else
  317|   190k|        ret = *a;
  318|       |
  319|   381k|    if (r > INT_MAX || ASN1_STRING_set(ret, NULL, (int)r) == 0) {
  ------------------
  |  Branch (319:9): [True: 0, False: 381k]
  |  Branch (319:24): [True: 0, False: 381k]
  ------------------
  320|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  321|      0|        goto err;
  322|      0|    }
  323|       |
  324|   381k|    c2i_ibuf(ret->data, &neg, *pp, len);
  325|       |
  326|   381k|    if (neg != 0)
  ------------------
  |  Branch (326:9): [True: 0, False: 381k]
  ------------------
  327|      0|        ret->type |= V_ASN1_NEG;
  ------------------
  |  |   99|      0|#define V_ASN1_NEG 0x100
  ------------------
  328|   381k|    else
  329|   381k|        ret->type &= ~V_ASN1_NEG;
  ------------------
  |  |   99|   381k|#define V_ASN1_NEG 0x100
  ------------------
  330|       |
  331|   381k|    *pp += len;
  332|   381k|    if (a != NULL)
  ------------------
  |  Branch (332:9): [True: 381k, False: 0]
  ------------------
  333|   381k|        (*a) = ret;
  334|   381k|    return ret;
  335|      0|err:
  336|      0|    if (a == NULL || *a != ret)
  ------------------
  |  Branch (336:9): [True: 0, False: 0]
  |  Branch (336:22): [True: 0, False: 0]
  ------------------
  337|      0|        ASN1_INTEGER_free(ret);
  338|       |    return NULL;
  339|   381k|}
ASN1_INTEGER_get_int64:
  539|  11.3k|{
  540|  11.3k|    return asn1_string_get_int64(pr, a, V_ASN1_INTEGER);
  ------------------
  |  |   66|  11.3k|#define V_ASN1_INTEGER 2
  ------------------
  541|  11.3k|}
ASN1_INTEGER_get:
  564|  11.3k|{
  565|  11.3k|    int i;
  566|  11.3k|    int64_t r;
  567|  11.3k|    if (a == NULL)
  ------------------
  |  Branch (567:9): [True: 0, False: 11.3k]
  ------------------
  568|      0|        return 0;
  569|  11.3k|    i = ASN1_INTEGER_get_int64(&r, a);
  570|  11.3k|    if (i == 0)
  ------------------
  |  Branch (570:9): [True: 0, False: 11.3k]
  ------------------
  571|      0|        return -1;
  572|  11.3k|    if (r > LONG_MAX || r < LONG_MIN)
  ------------------
  |  Branch (572:9): [True: 0, False: 11.3k]
  |  Branch (572:25): [True: 0, False: 11.3k]
  ------------------
  573|      0|        return -1;
  574|  11.3k|    return (long)r;
  575|  11.3k|}
a_int.c:twos_complement:
   78|   168k|{
   79|   168k|    unsigned int carry = pad & 1;
   80|       |
   81|       |    /* Begin at the end of the encoding */
   82|   168k|    if (len != 0) {
  ------------------
  |  Branch (82:9): [True: 168k, False: 0]
  ------------------
   83|       |        /*
   84|       |         * if len == 0 then src/dst could be NULL, and this would be undefined
   85|       |         * behaviour.
   86|       |         */
   87|   168k|        dst += len;
   88|   168k|        src += len;
   89|   168k|    }
   90|       |    /* two's complement value: ~value + 1 */
   91|  2.42M|    while (len-- != 0) {
  ------------------
  |  Branch (91:12): [True: 2.25M, False: 168k]
  ------------------
   92|  2.25M|        *(--dst) = (unsigned char)(carry += *(--src) ^ pad);
   93|  2.25M|        carry >>= 8;
   94|  2.25M|    }
   95|   168k|}
a_int.c:c2i_ibuf:
  156|   763k|{
  157|   763k|    int neg, pad;
  158|       |    /* Zero content length is illegal */
  159|   763k|    if (plen == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 763k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        return 0;
  162|      0|    }
  163|   763k|    neg = p[0] & 0x80;
  164|   763k|    if (pneg)
  ------------------
  |  Branch (164:9): [True: 381k, False: 381k]
  ------------------
  165|   381k|        *pneg = neg;
  166|       |    /* Handle common case where length is 1 octet separately */
  167|   763k|    if (plen == 1) {
  ------------------
  |  Branch (167:9): [True: 426k, False: 337k]
  ------------------
  168|   426k|        if (b != NULL) {
  ------------------
  |  Branch (168:13): [True: 213k, False: 213k]
  ------------------
  169|   213k|            if (neg)
  ------------------
  |  Branch (169:17): [True: 0, False: 213k]
  ------------------
  170|      0|                b[0] = (p[0] ^ 0xFF) + 1;
  171|   213k|            else
  172|   213k|                b[0] = p[0];
  173|   213k|        }
  174|   426k|        return 1;
  175|   426k|    }
  176|       |
  177|   337k|    pad = 0;
  178|   337k|    if (p[0] == 0) {
  ------------------
  |  Branch (178:9): [True: 36.7k, False: 300k]
  ------------------
  179|  36.7k|        pad = 1;
  180|   300k|    } else if (p[0] == 0xFF) {
  ------------------
  |  Branch (180:16): [True: 0, False: 300k]
  ------------------
  181|      0|        size_t i;
  182|       |
  183|       |        /*
  184|       |         * Special case [of "one less minimal negative" for given length]:
  185|       |         * if any other bytes non zero it was padded, otherwise not.
  186|       |         */
  187|      0|        for (pad = 0, i = 1; i < plen; i++)
  ------------------
  |  Branch (187:30): [True: 0, False: 0]
  ------------------
  188|      0|            pad |= p[i];
  189|      0|        pad = pad != 0 ? 1 : 0;
  ------------------
  |  Branch (189:15): [True: 0, False: 0]
  ------------------
  190|      0|    }
  191|       |    /* reject illegal padding: first two octets MSB can't match */
  192|   337k|    if (pad && (neg == (p[1] & 0x80))) {
  ------------------
  |  Branch (192:9): [True: 36.7k, False: 300k]
  |  Branch (192:16): [True: 0, False: 36.7k]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_PADDING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        return 0;
  195|      0|    }
  196|       |
  197|       |    /* skip over pad */
  198|   337k|    p += pad;
  199|   337k|    plen -= pad;
  200|       |
  201|   337k|    if (b != NULL)
  ------------------
  |  Branch (201:9): [True: 168k, False: 168k]
  ------------------
  202|   168k|        twos_complement(b, p, plen, neg ? 0xffU : 0);
  ------------------
  |  Branch (202:37): [True: 0, False: 168k]
  ------------------
  203|       |
  204|   337k|    return plen;
  205|   337k|}
a_int.c:asn1_string_get_int64:
  342|  11.3k|{
  343|  11.3k|    if (a == NULL) {
  ------------------
  |  Branch (343:9): [True: 0, False: 11.3k]
  ------------------
  344|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  345|      0|        return 0;
  346|      0|    }
  347|  11.3k|    if ((a->type & ~V_ASN1_NEG) != itype) {
  ------------------
  |  |   99|  11.3k|#define V_ASN1_NEG 0x100
  ------------------
  |  Branch (347:9): [True: 0, False: 11.3k]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_INTEGER_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return 0;
  350|      0|    }
  351|  11.3k|    return asn1_get_int64(pr, a->data, a->length, a->type & V_ASN1_NEG);
  ------------------
  |  |   99|  11.3k|#define V_ASN1_NEG 0x100
  ------------------
  352|  11.3k|}
a_int.c:asn1_get_int64:
  266|  11.3k|{
  267|  11.3k|    uint64_t r;
  268|  11.3k|    if (asn1_get_uint64(&r, b, blen) == 0)
  ------------------
  |  Branch (268:9): [True: 0, False: 11.3k]
  ------------------
  269|      0|        return 0;
  270|  11.3k|    if (neg) {
  ------------------
  |  Branch (270:9): [True: 0, False: 11.3k]
  ------------------
  271|      0|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|       |            /*
  273|       |             * Most significant bit is guaranteed to be clear, negation
  274|       |             * is guaranteed to be meaningful in platform-neutral sense.
  275|       |             */
  276|      0|            *pr = -(int64_t)r;
  277|      0|        } else if (r == ABS_INT64_MIN) {
  ------------------
  |  |  261|      0|#define ABS_INT64_MIN ((uint64_t)INT64_MAX + (-(INT64_MIN + INT64_MAX)))
  ------------------
  |  Branch (277:20): [True: 0, False: 0]
  ------------------
  278|       |            /*
  279|       |             * This never happens if INT64_MAX == ABS_INT64_MIN, e.g.
  280|       |             * on ones'-complement system.
  281|       |             */
  282|      0|            *pr = (int64_t)(0 - r);
  283|      0|        } else {
  284|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            return 0;
  286|      0|        }
  287|  11.3k|    } else {
  288|  11.3k|        if (r <= INT64_MAX) {
  ------------------
  |  Branch (288:13): [True: 11.3k, False: 0]
  ------------------
  289|  11.3k|            *pr = (int64_t)r;
  290|  11.3k|        } else {
  291|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  292|      0|            return 0;
  293|      0|        }
  294|  11.3k|    }
  295|  11.3k|    return 1;
  296|  11.3k|}
a_int.c:asn1_get_uint64:
  223|  11.3k|{
  224|  11.3k|    size_t i;
  225|  11.3k|    uint64_t r;
  226|       |
  227|  11.3k|    if (blen > sizeof(*pr)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 11.3k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        return 0;
  230|      0|    }
  231|  11.3k|    if (b == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 11.3k]
  ------------------
  232|      0|        return 0;
  233|  22.6k|    for (r = 0, i = 0; i < blen; i++) {
  ------------------
  |  Branch (233:24): [True: 11.3k, False: 11.3k]
  ------------------
  234|  11.3k|        r <<= 8;
  235|  11.3k|        r |= b[i];
  236|  11.3k|    }
  237|  11.3k|    *pr = r;
  238|  11.3k|    return 1;
  239|  11.3k|}

ASN1_mbstring_copy:
   38|  1.36M|{
   39|  1.36M|    return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
   40|  1.36M|}
ASN1_mbstring_ncopy:
   45|  1.36M|{
   46|  1.36M|    int str_type;
   47|  1.36M|    int ret;
   48|  1.36M|    char free_out;
   49|  1.36M|    int outform, outlen = 0;
   50|  1.36M|    ASN1_STRING *dest;
   51|  1.36M|    unsigned char *p;
   52|  1.36M|    int nchar;
   53|  1.36M|    int (*cpyfunc)(unsigned long, void *) = NULL;
   54|  1.36M|    if (len == -1) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.36M]
  ------------------
   55|      0|        size_t len_s = strlen((const char *)in);
   56|       |
   57|      0|        if (len_s >= INT_MAX) {
  ------------------
  |  Branch (57:13): [True: 0, False: 0]
  ------------------
   58|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   59|      0|            return -1;
   60|      0|        }
   61|      0|        len = (int)len_s;
   62|      0|    }
   63|  1.36M|    if (!mask)
  ------------------
  |  Branch (63:9): [True: 0, False: 1.36M]
  ------------------
   64|      0|        mask = DIRSTRING_TYPE;
  ------------------
  |  |  226|      0|    (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  105|      0|#define B_ASN1_PRINTABLESTRING 0x0002
  |  |  ------------------
  |  |                   (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  106|      0|#define B_ASN1_T61STRING 0x0004
  |  |  ------------------
  |  |                   (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  117|      0|#define B_ASN1_BMPSTRING 0x0800
  |  |  ------------------
  |  |                   (B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
  |  |  ------------------
  |  |  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  |  |  ------------------
  ------------------
   65|  1.36M|    if (len < 0) {
  ------------------
  |  Branch (65:9): [True: 0, False: 1.36M]
  ------------------
   66|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   67|      0|        return -1;
   68|      0|    }
   69|       |
   70|       |    /* First do a string check and work out the number of characters */
   71|  1.36M|    switch (inform) {
   72|       |
   73|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (73:5): [True: 0, False: 1.36M]
  ------------------
   74|      0|        if (len & 1) {
  ------------------
  |  Branch (74:13): [True: 0, False: 0]
  ------------------
   75|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_BMPSTRING_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      0|            return -1;
   77|      0|        }
   78|      0|        nchar = len >> 1;
   79|      0|        break;
   80|       |
   81|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (81:5): [True: 0, False: 1.36M]
  ------------------
   82|      0|        if (len & 3) {
  ------------------
  |  Branch (82:13): [True: 0, False: 0]
  ------------------
   83|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|      0|            return -1;
   85|      0|        }
   86|      0|        nchar = len >> 2;
   87|      0|        break;
   88|       |
   89|   345k|    case MBSTRING_UTF8:
  ------------------
  |  |  125|   345k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|   345k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (89:5): [True: 345k, False: 1.01M]
  ------------------
   90|   345k|        nchar = 0;
   91|       |        /* This counts the characters and does utf8 syntax checking */
   92|   345k|        ret = traverse_string(in, len, MBSTRING_UTF8, in_utf8, &nchar);
  ------------------
  |  |  125|   345k|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|   345k|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
   93|   345k|        if (ret < 0) {
  ------------------
  |  Branch (93:13): [True: 0, False: 345k]
  ------------------
   94|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   95|      0|            return -1;
   96|      0|        }
   97|   345k|        break;
   98|       |
   99|  1.01M|    case MBSTRING_ASC:
  ------------------
  |  |  126|  1.01M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  1.01M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (99:5): [True: 1.01M, False: 345k]
  ------------------
  100|  1.01M|        nchar = len;
  101|  1.01M|        break;
  102|       |
  103|      0|    default:
  ------------------
  |  Branch (103:5): [True: 0, False: 1.36M]
  ------------------
  104|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNKNOWN_FORMAT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|        return -1;
  106|  1.36M|    }
  107|       |
  108|  1.36M|    if ((minsize > 0) && (nchar < minsize)) {
  ------------------
  |  Branch (108:9): [True: 0, False: 1.36M]
  |  Branch (108:26): [True: 0, False: 0]
  ------------------
  109|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |   85|      0|#define ERR_LIB_ASN1 13
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_SHORT,
  ------------------
  |  |  114|      0|#define ASN1_R_STRING_TOO_SHORT 152
  ------------------
  110|      0|            "minsize=%ld", minsize);
  111|      0|        return -1;
  112|      0|    }
  113|       |
  114|  1.36M|    if ((maxsize > 0) && (nchar > maxsize)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 1.36M]
  |  Branch (114:26): [True: 0, False: 0]
  ------------------
  115|      0|        ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |   85|      0|#define ERR_LIB_ASN1 13
  ------------------
                      ERR_raise_data(ERR_LIB_ASN1, ASN1_R_STRING_TOO_LONG,
  ------------------
  |  |  113|      0|#define ASN1_R_STRING_TOO_LONG 151
  ------------------
  116|      0|            "maxsize=%ld", maxsize);
  117|      0|        return -1;
  118|      0|    }
  119|       |
  120|       |    /* Now work out minimal type (if any) */
  121|  1.36M|    if (traverse_string(in, len, inform, type_str, &mask) < 0) {
  ------------------
  |  Branch (121:9): [True: 0, False: 1.36M]
  ------------------
  122|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_CHARACTERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  123|      0|        return -1;
  124|      0|    }
  125|       |
  126|       |    /*
  127|       |     * Now work out output format and string type.
  128|       |     * These checks should be in sync with the checks in type_str.
  129|       |     */
  130|  1.36M|    outform = MBSTRING_ASC;
  ------------------
  |  |  126|  1.36M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  1.36M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  131|  1.36M|    if (mask & B_ASN1_NUMERICSTRING)
  ------------------
  |  |  104|  1.36M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (131:9): [True: 0, False: 1.36M]
  ------------------
  132|      0|        str_type = V_ASN1_NUMERICSTRING;
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  133|  1.36M|    else if (mask & B_ASN1_PRINTABLESTRING)
  ------------------
  |  |  105|  1.36M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  |  Branch (133:14): [True: 0, False: 1.36M]
  ------------------
  134|      0|        str_type = V_ASN1_PRINTABLESTRING;
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  135|  1.36M|    else if (mask & B_ASN1_IA5STRING)
  ------------------
  |  |  109|  1.36M|#define B_ASN1_IA5STRING 0x0010
  ------------------
  |  Branch (135:14): [True: 0, False: 1.36M]
  ------------------
  136|      0|        str_type = V_ASN1_IA5STRING;
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  137|  1.36M|    else if (mask & B_ASN1_T61STRING)
  ------------------
  |  |  106|  1.36M|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (137:14): [True: 0, False: 1.36M]
  ------------------
  138|      0|        str_type = V_ASN1_T61STRING;
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  139|  1.36M|    else if (mask & B_ASN1_BMPSTRING) {
  ------------------
  |  |  117|  1.36M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (139:14): [True: 0, False: 1.36M]
  ------------------
  140|      0|        str_type = V_ASN1_BMPSTRING;
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  141|      0|        outform = MBSTRING_BMP;
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  142|  1.36M|    } else if (mask & B_ASN1_UNIVERSALSTRING) {
  ------------------
  |  |  114|  1.36M|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
  |  Branch (142:16): [True: 0, False: 1.36M]
  ------------------
  143|      0|        str_type = V_ASN1_UNIVERSALSTRING;
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  144|      0|        outform = MBSTRING_UNIV;
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  145|  1.36M|    } else {
  146|  1.36M|        str_type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  1.36M|#define V_ASN1_UTF8STRING 12
  ------------------
  147|  1.36M|        outform = MBSTRING_UTF8;
  ------------------
  |  |  125|  1.36M|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  1.36M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  148|  1.36M|    }
  149|  1.36M|    if (!out)
  ------------------
  |  Branch (149:9): [True: 0, False: 1.36M]
  ------------------
  150|      0|        return str_type;
  151|  1.36M|    if (*out) {
  ------------------
  |  Branch (151:9): [True: 1.36M, False: 0]
  ------------------
  152|  1.36M|        free_out = 0;
  153|  1.36M|        dest = *out;
  154|  1.36M|        ASN1_STRING_set0(dest, NULL, 0);
  155|  1.36M|        dest->type = str_type;
  156|  1.36M|    } else {
  157|      0|        free_out = 1;
  158|      0|        dest = ASN1_STRING_type_new(str_type);
  159|      0|        if (dest == NULL) {
  ------------------
  |  Branch (159:13): [True: 0, False: 0]
  ------------------
  160|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|            return -1;
  162|      0|        }
  163|      0|        *out = dest;
  164|      0|    }
  165|       |    /* If both the same type just copy across */
  166|  1.36M|    if (inform == outform) {
  ------------------
  |  Branch (166:9): [True: 345k, False: 1.01M]
  ------------------
  167|   345k|        if (!ASN1_STRING_set(dest, in, len)) {
  ------------------
  |  Branch (167:13): [True: 0, False: 345k]
  ------------------
  168|      0|            if (free_out) {
  ------------------
  |  Branch (168:17): [True: 0, False: 0]
  ------------------
  169|      0|                ASN1_STRING_free(dest);
  170|      0|                *out = NULL;
  171|      0|            }
  172|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  173|      0|            return -1;
  174|      0|        }
  175|   345k|        return str_type;
  176|   345k|    }
  177|       |
  178|       |    /* Work out how much space the destination will need */
  179|  1.01M|    switch (outform) {
  ------------------
  |  Branch (179:13): [True: 1.01M, False: 0]
  ------------------
  180|      0|    case MBSTRING_ASC:
  ------------------
  |  |  126|      0|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (180:5): [True: 0, False: 1.01M]
  ------------------
  181|      0|        outlen = nchar;
  182|      0|        cpyfunc = cpy_asc;
  183|      0|        break;
  184|       |
  185|      0|    case MBSTRING_BMP:
  ------------------
  |  |  127|      0|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (185:5): [True: 0, False: 1.01M]
  ------------------
  186|      0|        outlen = nchar << 1;
  187|      0|        cpyfunc = cpy_bmp;
  188|      0|        break;
  189|       |
  190|      0|    case MBSTRING_UNIV:
  ------------------
  |  |  128|      0|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|      0|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (190:5): [True: 0, False: 1.01M]
  ------------------
  191|      0|        outlen = nchar << 2;
  192|      0|        cpyfunc = cpy_univ;
  193|      0|        break;
  194|       |
  195|  1.01M|    case MBSTRING_UTF8:
  ------------------
  |  |  125|  1.01M|#define MBSTRING_UTF8 (MBSTRING_FLAG)
  |  |  ------------------
  |  |  |  |  124|  1.01M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (195:5): [True: 1.01M, False: 0]
  ------------------
  196|  1.01M|        outlen = 0;
  197|  1.01M|        ret = traverse_string(in, len, inform, out_utf8, &outlen);
  198|  1.01M|        if (ret < 0) {
  ------------------
  |  Branch (198:13): [True: 0, False: 1.01M]
  ------------------
  199|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_UTF8STRING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|            return -1;
  201|      0|        }
  202|  1.01M|        cpyfunc = cpy_utf8;
  203|  1.01M|        break;
  204|  1.01M|    }
  205|  1.01M|    if ((p = OPENSSL_malloc(outlen + 1)) == NULL) {
  ------------------
  |  |  106|  1.01M|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (205:9): [True: 0, False: 1.01M]
  ------------------
  206|      0|        if (free_out) {
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            ASN1_STRING_free(dest);
  208|      0|            *out = NULL;
  209|      0|        }
  210|      0|        return -1;
  211|      0|    }
  212|  1.01M|    dest->length = outlen;
  213|  1.01M|    dest->data = p;
  214|  1.01M|    p[outlen] = 0;
  215|  1.01M|    traverse_string(in, len, inform, cpyfunc, &p);
  216|  1.01M|    return str_type;
  217|  1.01M|}
a_mbstr.c:traverse_string:
  227|  3.74M|{
  228|  3.74M|    unsigned long value;
  229|  3.74M|    int ret;
  230|  61.8M|    while (len) {
  ------------------
  |  Branch (230:12): [True: 58.1M, False: 3.74M]
  ------------------
  231|  58.1M|        if (inform == MBSTRING_ASC) {
  ------------------
  |  |  126|  58.1M|#define MBSTRING_ASC (MBSTRING_FLAG | 1)
  |  |  ------------------
  |  |  |  |  124|  58.1M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (231:13): [True: 44.0M, False: 14.1M]
  ------------------
  232|  44.0M|            value = *p++;
  233|  44.0M|            len--;
  234|  44.0M|        } else if (inform == MBSTRING_BMP) {
  ------------------
  |  |  127|  14.1M|#define MBSTRING_BMP (MBSTRING_FLAG | 2)
  |  |  ------------------
  |  |  |  |  124|  14.1M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (234:20): [True: 0, False: 14.1M]
  ------------------
  235|      0|            value = *p++ << 8;
  236|      0|            value |= *p++;
  237|      0|            len -= 2;
  238|  14.1M|        } else if (inform == MBSTRING_UNIV) {
  ------------------
  |  |  128|  14.1M|#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
  |  |  ------------------
  |  |  |  |  124|  14.1M|#define MBSTRING_FLAG 0x1000
  |  |  ------------------
  ------------------
  |  Branch (238:20): [True: 0, False: 14.1M]
  ------------------
  239|      0|            value = ((unsigned long)*p++) << 24;
  240|      0|            value |= ((unsigned long)*p++) << 16;
  241|      0|            value |= *p++ << 8;
  242|      0|            value |= *p++;
  243|      0|            len -= 4;
  244|  14.1M|        } else {
  245|  14.1M|            ret = UTF8_getc(p, len, &value);
  246|  14.1M|            if (ret < 0)
  ------------------
  |  Branch (246:17): [True: 0, False: 14.1M]
  ------------------
  247|      0|                return -1;
  248|  14.1M|            len -= ret;
  249|  14.1M|            p += ret;
  250|  14.1M|        }
  251|  58.1M|        if (rfunc) {
  ------------------
  |  Branch (251:13): [True: 58.1M, False: 0]
  ------------------
  252|  58.1M|            ret = rfunc(value, arg);
  253|  58.1M|            if (ret <= 0)
  ------------------
  |  Branch (253:17): [True: 0, False: 58.1M]
  ------------------
  254|      0|                return ret;
  255|  58.1M|        }
  256|  58.1M|    }
  257|  3.74M|    return 1;
  258|  3.74M|}
a_mbstr.c:in_utf8:
  265|  7.06M|{
  266|  7.06M|    int *nchar;
  267|       |
  268|  7.06M|    if (!is_unicode_valid(value))
  ------------------
  |  Branch (268:9): [True: 0, False: 7.06M]
  ------------------
  269|      0|        return -2;
  270|  7.06M|    nchar = arg;
  271|  7.06M|    (*nchar)++;
  272|  7.06M|    return 1;
  273|  7.06M|}
a_mbstr.c:out_utf8:
  278|  14.6M|{
  279|  14.6M|    int *outlen, len;
  280|       |
  281|  14.6M|    len = UTF8_putc(NULL, -1, value);
  282|  14.6M|    if (len <= 0)
  ------------------
  |  Branch (282:9): [True: 0, False: 14.6M]
  ------------------
  283|      0|        return len;
  284|  14.6M|    outlen = arg;
  285|  14.6M|    *outlen += len;
  286|  14.6M|    return 1;
  287|  14.6M|}
a_mbstr.c:type_str:
  295|  21.7M|{
  296|  21.7M|    unsigned long usable_types = *((unsigned long *)arg);
  297|  21.7M|    unsigned long types = usable_types;
  298|  21.7M|    const int native = value > INT_MAX ? INT_MAX : ossl_fromascii(value);
  ------------------
  |  |   57|  43.4M|#define ossl_fromascii(c) (c)
  ------------------
  |  Branch (298:24): [True: 0, False: 21.7M]
  ------------------
  299|       |
  300|       |    /*
  301|       |     * Clear out all the types which are not checked later. If any of those
  302|       |     * is present in the mask, then the UTF8 type will be added and checked
  303|       |     * below.
  304|       |     */
  305|  21.7M|    types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  104|  21.7M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
                  types &= B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING
  ------------------
  |  |  105|  21.7M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  306|  21.7M|        | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  109|  21.7M|#define B_ASN1_IA5STRING 0x0010
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  106|  21.7M|#define B_ASN1_T61STRING 0x0004
  ------------------
                      | B_ASN1_IA5STRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING
  ------------------
  |  |  117|  21.7M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  307|  21.7M|        | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  114|  21.7M|#define B_ASN1_UNIVERSALSTRING 0x0100
  ------------------
                      | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING;
  ------------------
  |  |  119|  21.7M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  308|       |
  309|       |    /*
  310|       |     * If any other types were in the input mask, they're effectively treated
  311|       |     * as UTF8
  312|       |     */
  313|  21.7M|    if (types != usable_types)
  ------------------
  |  Branch (313:9): [True: 0, False: 21.7M]
  ------------------
  314|      0|        types |= B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  315|       |
  316|       |    /*
  317|       |     * These checks should be in sync with ASN1_mbstring_ncopy.
  318|       |     */
  319|  21.7M|    if ((types & B_ASN1_NUMERICSTRING) && !(ossl_isdigit(native) || native == ' '))
  ------------------
  |  |  104|  21.7M|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  |  Branch (319:9): [True: 0, False: 21.7M]
  |  Branch (319:45): [True: 0, False: 0]
  |  Branch (319:69): [True: 0, False: 0]
  ------------------
  320|      0|        types &= ~B_ASN1_NUMERICSTRING;
  ------------------
  |  |  104|      0|#define B_ASN1_NUMERICSTRING 0x0001
  ------------------
  321|  21.7M|    if ((types & B_ASN1_PRINTABLESTRING) && !ossl_isasn1print(native))
  ------------------
  |  |  105|  21.7M|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
                  if ((types & B_ASN1_PRINTABLESTRING) && !ossl_isasn1print(native))
  ------------------
  |  |   85|      0|#define ossl_isasn1print(c) (ossl_ctype_check((c), CTYPE_MASK_asn1print))
  |  |  ------------------
  |  |  |  |   38|      0|#define CTYPE_MASK_asn1print 0x800
  |  |  ------------------
  ------------------
  |  Branch (321:9): [True: 0, False: 21.7M]
  |  Branch (321:45): [True: 0, False: 0]
  ------------------
  322|      0|        types &= ~B_ASN1_PRINTABLESTRING;
  ------------------
  |  |  105|      0|#define B_ASN1_PRINTABLESTRING 0x0002
  ------------------
  323|  21.7M|    if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |  109|  21.7M|#define B_ASN1_IA5STRING 0x0010
  ------------------
                  if ((types & B_ASN1_IA5STRING) && !ossl_isascii(native))
  ------------------
  |  |   75|      0|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (323:9): [True: 0, False: 21.7M]
  |  Branch (323:39): [True: 0, False: 0]
  ------------------
  324|      0|        types &= ~B_ASN1_IA5STRING;
  ------------------
  |  |  109|      0|#define B_ASN1_IA5STRING 0x0010
  ------------------
  325|  21.7M|    if ((types & B_ASN1_T61STRING) && (value > 0xff))
  ------------------
  |  |  106|  21.7M|#define B_ASN1_T61STRING 0x0004
  ------------------
  |  Branch (325:9): [True: 0, False: 21.7M]
  |  Branch (325:39): [True: 0, False: 0]
  ------------------
  326|      0|        types &= ~B_ASN1_T61STRING;
  ------------------
  |  |  106|      0|#define B_ASN1_T61STRING 0x0004
  ------------------
  327|  21.7M|    if ((types & B_ASN1_BMPSTRING) && (value > 0xffff))
  ------------------
  |  |  117|  21.7M|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  |  Branch (327:9): [True: 0, False: 21.7M]
  |  Branch (327:39): [True: 0, False: 0]
  ------------------
  328|      0|        types &= ~B_ASN1_BMPSTRING;
  ------------------
  |  |  117|      0|#define B_ASN1_BMPSTRING 0x0800
  ------------------
  329|  21.7M|    if ((types & B_ASN1_UTF8STRING) && !is_unicode_valid(value))
  ------------------
  |  |  119|  21.7M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  |  Branch (329:9): [True: 21.7M, False: 0]
  |  Branch (329:40): [True: 0, False: 21.7M]
  ------------------
  330|      0|        types &= ~B_ASN1_UTF8STRING;
  ------------------
  |  |  119|      0|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  331|  21.7M|    if (!types)
  ------------------
  |  Branch (331:9): [True: 0, False: 21.7M]
  ------------------
  332|      0|        return -1;
  333|  21.7M|    *((unsigned long *)arg) = types;
  334|  21.7M|    return 1;
  335|  21.7M|}
a_mbstr.c:cpy_utf8:
  380|  14.6M|{
  381|  14.6M|    unsigned char **p;
  382|  14.6M|    int ret;
  383|  14.6M|    p = arg;
  384|       |    /* We already know there is enough room so pass 0xff as the length */
  385|  14.6M|    ret = UTF8_putc(*p, 0xff, value);
  386|  14.6M|    if (ret < 0)
  ------------------
  |  Branch (386:9): [True: 0, False: 14.6M]
  ------------------
  387|      0|        return ret;
  388|  14.6M|    *p += ret;
  389|  14.6M|    return 1;
  390|  14.6M|}

a2d_ASN1_OBJECT:
   52|  12.3k|{
   53|  12.3k|    int i, first, len = 0, c, use_bn;
   54|  12.3k|    char ftmp[24], *tmp = ftmp;
   55|  12.3k|    int tmpsize = sizeof(ftmp);
   56|  12.3k|    const char *p;
   57|  12.3k|    unsigned long l;
   58|  12.3k|    BIGNUM *bl = NULL;
   59|       |
   60|  12.3k|    if (num == 0) {
  ------------------
  |  Branch (60:9): [True: 0, False: 12.3k]
  ------------------
   61|      0|        return 0;
   62|  12.3k|    } else if (num == -1) {
  ------------------
  |  Branch (62:16): [True: 12.3k, False: 0]
  ------------------
   63|  12.3k|        size_t num_s = strlen(buf);
   64|       |
   65|  12.3k|        if (num_s >= INT_MAX) {
  ------------------
  |  Branch (65:13): [True: 0, False: 12.3k]
  ------------------
   66|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_LENGTH_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   67|      0|            goto err;
   68|      0|        }
   69|  12.3k|        num = (int)num_s;
   70|  12.3k|    }
   71|       |
   72|  12.3k|    p = buf;
   73|  12.3k|    c = *(p++);
   74|  12.3k|    num--;
   75|  12.3k|    if ((c >= '0') && (c <= '2')) {
  ------------------
  |  Branch (75:9): [True: 12.3k, False: 0]
  |  Branch (75:23): [True: 12.3k, False: 0]
  ------------------
   76|  12.3k|        first = c - '0';
   77|  12.3k|    } else {
   78|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_FIRST_NUM_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   79|      0|        goto err;
   80|      0|    }
   81|       |
   82|  12.3k|    if (num <= 0) {
  ------------------
  |  Branch (82:9): [True: 0, False: 12.3k]
  ------------------
   83|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_SECOND_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   84|      0|        goto err;
   85|      0|    }
   86|  12.3k|    c = *(p++);
   87|  12.3k|    num--;
   88|   111k|    for (;;) {
   89|   111k|        if (num <= 0)
  ------------------
  |  Branch (89:13): [True: 12.3k, False: 99.1k]
  ------------------
   90|  12.3k|            break;
   91|  99.1k|        if ((c != '.') && (c != ' ')) {
  ------------------
  |  Branch (91:13): [True: 0, False: 99.1k]
  |  Branch (91:27): [True: 0, False: 0]
  ------------------
   92|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_SEPARATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|            goto err;
   94|      0|        }
   95|  99.1k|        l = 0;
   96|  99.1k|        use_bn = 0;
   97|   272k|        for (;;) {
   98|   272k|            if (num <= 0)
  ------------------
  |  Branch (98:17): [True: 12.3k, False: 260k]
  ------------------
   99|  12.3k|                break;
  100|   260k|            num--;
  101|   260k|            c = *(p++);
  102|   260k|            if ((c == ' ') || (c == '.'))
  ------------------
  |  Branch (102:17): [True: 0, False: 260k]
  |  Branch (102:31): [True: 86.7k, False: 173k]
  ------------------
  103|  86.7k|                break;
  104|   173k|            if (!ossl_isdigit(c)) {
  ------------------
  |  Branch (104:17): [True: 0, False: 173k]
  ------------------
  105|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_DIGIT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  106|      0|                goto err;
  107|      0|            }
  108|   173k|            if (!use_bn && l >= ((ULONG_MAX - 80) / 10L)) {
  ------------------
  |  Branch (108:17): [True: 173k, False: 0]
  |  Branch (108:28): [True: 0, False: 173k]
  ------------------
  109|      0|                use_bn = 1;
  110|      0|                if (bl == NULL)
  ------------------
  |  Branch (110:21): [True: 0, False: 0]
  ------------------
  111|      0|                    bl = BN_new();
  112|      0|                if (bl == NULL || !BN_set_word(bl, l))
  ------------------
  |  Branch (112:21): [True: 0, False: 0]
  |  Branch (112:35): [True: 0, False: 0]
  ------------------
  113|      0|                    goto err;
  114|      0|            }
  115|   173k|            if (use_bn) {
  ------------------
  |  Branch (115:17): [True: 0, False: 173k]
  ------------------
  116|      0|                if (!BN_mul_word(bl, 10L)
  ------------------
  |  Branch (116:21): [True: 0, False: 0]
  ------------------
  117|      0|                    || !BN_add_word(bl, c - '0'))
  ------------------
  |  Branch (117:24): [True: 0, False: 0]
  ------------------
  118|      0|                    goto err;
  119|      0|            } else
  120|   173k|                l = l * 10L + (long)(c - '0');
  121|   173k|        }
  122|  99.1k|        if (len == 0) {
  ------------------
  |  Branch (122:13): [True: 12.3k, False: 86.7k]
  ------------------
  123|  12.3k|            if ((first < 2) && (l >= 40)) {
  ------------------
  |  Branch (123:17): [True: 0, False: 12.3k]
  |  Branch (123:32): [True: 0, False: 0]
  ------------------
  124|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_SECOND_NUMBER_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  125|      0|                goto err;
  126|      0|            }
  127|  12.3k|            if (use_bn) {
  ------------------
  |  Branch (127:17): [True: 0, False: 12.3k]
  ------------------
  128|      0|                if (!BN_add_word(bl, first * 40))
  ------------------
  |  Branch (128:21): [True: 0, False: 0]
  ------------------
  129|      0|                    goto err;
  130|      0|            } else
  131|  12.3k|                l += (long)first * 40;
  132|  12.3k|        }
  133|  99.1k|        i = 0;
  134|  99.1k|        if (use_bn) {
  ------------------
  |  Branch (134:13): [True: 0, False: 99.1k]
  ------------------
  135|      0|            int blsize;
  136|      0|            blsize = BN_num_bits(bl);
  137|      0|            blsize = (blsize + 6) / 7;
  138|      0|            if (blsize > tmpsize) {
  ------------------
  |  Branch (138:17): [True: 0, False: 0]
  ------------------
  139|      0|                if (tmp != ftmp)
  ------------------
  |  Branch (139:21): [True: 0, False: 0]
  ------------------
  140|      0|                    OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  141|      0|                tmpsize = blsize + 32;
  142|      0|                tmp = OPENSSL_malloc(tmpsize);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  143|      0|                if (tmp == NULL)
  ------------------
  |  Branch (143:21): [True: 0, False: 0]
  ------------------
  144|      0|                    goto err;
  145|      0|            }
  146|      0|            while (blsize--) {
  ------------------
  |  Branch (146:20): [True: 0, False: 0]
  ------------------
  147|      0|                BN_ULONG t = BN_div_word(bl, 0x80L);
  ------------------
  |  |   37|      0|#define BN_ULONG unsigned long
  ------------------
  148|      0|                if (t == (BN_ULONG)-1)
  ------------------
  |  Branch (148:21): [True: 0, False: 0]
  ------------------
  149|      0|                    goto err;
  150|      0|                tmp[i++] = (unsigned char)t;
  151|      0|            }
  152|  99.1k|        } else {
  153|       |
  154|   111k|            for (;;) {
  155|   111k|                tmp[i++] = (unsigned char)l & 0x7f;
  156|   111k|                l >>= 7L;
  157|   111k|                if (l == 0L)
  ------------------
  |  Branch (157:21): [True: 99.1k, False: 12.3k]
  ------------------
  158|  99.1k|                    break;
  159|   111k|            }
  160|  99.1k|        }
  161|  99.1k|        if (out != NULL) {
  ------------------
  |  Branch (161:13): [True: 49.5k, False: 49.5k]
  ------------------
  162|  49.5k|            if (len + i > olen) {
  ------------------
  |  Branch (162:17): [True: 0, False: 49.5k]
  ------------------
  163|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  164|      0|                goto err;
  165|      0|            }
  166|  55.7k|            while (--i > 0)
  ------------------
  |  Branch (166:20): [True: 6.19k, False: 49.5k]
  ------------------
  167|  6.19k|                out[len++] = tmp[i] | 0x80;
  168|  49.5k|            out[len++] = tmp[0];
  169|  49.5k|        } else
  170|  49.5k|            len += i;
  171|  99.1k|    }
  172|  12.3k|    if (tmp != ftmp)
  ------------------
  |  Branch (172:9): [True: 0, False: 12.3k]
  ------------------
  173|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  174|  12.3k|    BN_free(bl);
  175|  12.3k|    return len;
  176|      0|err:
  177|      0|    if (tmp != ftmp)
  ------------------
  |  Branch (177:9): [True: 0, False: 0]
  ------------------
  178|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  179|      0|    BN_free(bl);
  180|      0|    return 0;
  181|  12.3k|}
d2i_ASN1_OBJECT:
  219|  6.19k|{
  220|  6.19k|    const unsigned char *p;
  221|  6.19k|    long len;
  222|  6.19k|    int tag, xclass;
  223|  6.19k|    int inf, i;
  224|  6.19k|    ASN1_OBJECT *ret = NULL;
  225|  6.19k|    p = *pp;
  226|  6.19k|    inf = ASN1_get_object(&p, &len, &tag, &xclass, length);
  227|  6.19k|    if (inf & 0x80) {
  ------------------
  |  Branch (227:9): [True: 0, False: 6.19k]
  ------------------
  228|      0|        i = ASN1_R_BAD_OBJECT_HEADER;
  ------------------
  |  |   26|      0|#define ASN1_R_BAD_OBJECT_HEADER 102
  ------------------
  229|      0|        goto err;
  230|      0|    }
  231|       |
  232|  6.19k|    if (tag != V_ASN1_OBJECT) {
  ------------------
  |  |   70|  6.19k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (232:9): [True: 0, False: 6.19k]
  ------------------
  233|      0|        i = ASN1_R_EXPECTING_AN_OBJECT;
  ------------------
  |  |   43|      0|#define ASN1_R_EXPECTING_AN_OBJECT 116
  ------------------
  234|      0|        goto err;
  235|      0|    }
  236|  6.19k|    ret = ossl_c2i_ASN1_OBJECT(a, &p, len);
  237|  6.19k|    if (ret)
  ------------------
  |  Branch (237:9): [True: 6.19k, False: 0]
  ------------------
  238|  6.19k|        *pp = p;
  239|  6.19k|    return ret;
  240|      0|err:
  241|      0|    ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  242|       |    return NULL;
  243|  6.19k|}
ossl_c2i_ASN1_OBJECT:
  247|  3.13M|{
  248|  3.13M|    ASN1_OBJECT *ret = NULL, tobj;
  249|  3.13M|    const unsigned char *p;
  250|  3.13M|    unsigned char *data;
  251|  3.13M|    int i, length;
  252|       |
  253|       |    /*
  254|       |     * Sanity check OID encoding. Need at least one content octet. MSB must
  255|       |     * be clear in the last octet. can't have leading 0x80 in subidentifiers,
  256|       |     * see: X.690 8.19.2
  257|       |     */
  258|  3.13M|    if (len <= 0 || len > INT_MAX || pp == NULL || (p = *pp) == NULL || p[len - 1] & 0x80) {
  ------------------
  |  Branch (258:9): [True: 0, False: 3.13M]
  |  Branch (258:21): [True: 0, False: 3.13M]
  |  Branch (258:38): [True: 0, False: 3.13M]
  |  Branch (258:52): [True: 0, False: 3.13M]
  |  Branch (258:73): [True: 0, False: 3.13M]
  ------------------
  259|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_OBJECT_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  260|      0|        return NULL;
  261|      0|    }
  262|       |    /* Now 0 < len <= INT_MAX, so the cast is safe. */
  263|  3.13M|    length = (int)len;
  264|       |    /*
  265|       |     * Try to lookup OID in table: these are all valid encodings so if we get
  266|       |     * a match we know the OID is valid.
  267|       |     */
  268|  3.13M|    tobj.nid = NID_undef;
  ------------------
  |  |   18|  3.13M|#define NID_undef                       0
  ------------------
  269|  3.13M|    tobj.data = p;
  270|  3.13M|    tobj.length = length;
  271|  3.13M|    tobj.flags = 0;
  272|  3.13M|    i = OBJ_obj2nid(&tobj);
  273|  3.13M|    if (i != NID_undef) {
  ------------------
  |  |   18|  3.13M|#define NID_undef                       0
  ------------------
  |  Branch (273:9): [True: 3.12M, False: 14.3k]
  ------------------
  274|       |        /*
  275|       |         * Return shared registered OID object: this improves efficiency
  276|       |         * because we don't have to return a dynamically allocated OID
  277|       |         * and NID lookups can use the cached value.
  278|       |         */
  279|  3.12M|        ret = OBJ_nid2obj(i);
  280|  3.12M|        if (a) {
  ------------------
  |  Branch (280:13): [True: 3.11M, False: 6.19k]
  ------------------
  281|  3.11M|            ASN1_OBJECT_free(*a);
  282|  3.11M|            *a = ret;
  283|  3.11M|        }
  284|  3.12M|        *pp += len;
  285|  3.12M|        return ret;
  286|  3.12M|    }
  287|   143k|    for (i = 0; i < length; i++, p++) {
  ------------------
  |  Branch (287:17): [True: 129k, False: 14.3k]
  ------------------
  288|   129k|        if (*p == 0x80 && (!i || !(p[-1] & 0x80))) {
  ------------------
  |  Branch (288:13): [True: 0, False: 129k]
  |  Branch (288:28): [True: 0, False: 0]
  |  Branch (288:34): [True: 0, False: 0]
  ------------------
  289|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_INVALID_OBJECT_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  290|      0|            return NULL;
  291|      0|        }
  292|   129k|    }
  293|       |
  294|  14.3k|    if ((a == NULL) || ((*a) == NULL) || !((*a)->flags & ASN1_OBJECT_FLAG_DYNAMIC)) {
  ------------------
  |  |  110|  14.3k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (294:9): [True: 0, False: 14.3k]
  |  Branch (294:24): [True: 0, False: 14.3k]
  |  Branch (294:42): [True: 14.3k, False: 0]
  ------------------
  295|  14.3k|        if ((ret = ASN1_OBJECT_new()) == NULL)
  ------------------
  |  Branch (295:13): [True: 0, False: 14.3k]
  ------------------
  296|      0|            return NULL;
  297|  14.3k|    } else {
  298|      0|        ret = (*a);
  299|      0|    }
  300|       |
  301|  14.3k|    p = *pp;
  302|       |    /* detach data from object */
  303|  14.3k|    data = (unsigned char *)ret->data;
  304|  14.3k|    ret->data = NULL;
  305|       |    /* once detached we can change it */
  306|  14.3k|    if ((data == NULL) || (ret->length < length)) {
  ------------------
  |  Branch (306:9): [True: 14.3k, False: 0]
  |  Branch (306:27): [True: 0, False: 0]
  ------------------
  307|  14.3k|        ret->length = 0;
  308|  14.3k|        OPENSSL_free(data);
  ------------------
  |  |  131|  14.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  309|  14.3k|        data = OPENSSL_malloc(length);
  ------------------
  |  |  106|  14.3k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  310|  14.3k|        if (data == NULL)
  ------------------
  |  Branch (310:13): [True: 0, False: 14.3k]
  ------------------
  311|      0|            goto err;
  312|  14.3k|        ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA;
  ------------------
  |  |  113|  14.3k|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
  313|  14.3k|    }
  314|  14.3k|    memcpy(data, p, length);
  315|       |    /* If there are dynamic strings, free them here, and clear the flag */
  316|  14.3k|    if ((ret->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) != 0) {
  ------------------
  |  |  112|  14.3k|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  |  Branch (316:9): [True: 0, False: 14.3k]
  ------------------
  317|      0|        OPENSSL_free((char *)ret->sn);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  318|      0|        OPENSSL_free((char *)ret->ln);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  319|      0|        ret->flags &= ~ASN1_OBJECT_FLAG_DYNAMIC_STRINGS;
  ------------------
  |  |  112|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  320|      0|    }
  321|       |    /* reattach data to object, after which it remains const */
  322|  14.3k|    ret->data = data;
  323|  14.3k|    ret->length = length;
  324|  14.3k|    ret->sn = NULL;
  325|  14.3k|    ret->ln = NULL;
  326|       |    /* ret->flags=ASN1_OBJECT_FLAG_DYNAMIC; we know it is dynamic */
  327|  14.3k|    p += length;
  328|       |
  329|  14.3k|    if (a != NULL)
  ------------------
  |  Branch (329:9): [True: 14.3k, False: 0]
  ------------------
  330|  14.3k|        (*a) = ret;
  331|  14.3k|    *pp = p;
  332|  14.3k|    return ret;
  333|      0|err:
  334|      0|    ERR_raise(ERR_LIB_ASN1, i);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|    if ((a == NULL) || (*a != ret))
  ------------------
  |  Branch (335:9): [True: 0, False: 0]
  |  Branch (335:24): [True: 0, False: 0]
  ------------------
  336|      0|        ASN1_OBJECT_free(ret);
  337|       |    return NULL;
  338|  14.3k|}
ASN1_OBJECT_new:
  341|  14.3k|{
  342|  14.3k|    ASN1_OBJECT *ret;
  343|       |
  344|  14.3k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  14.3k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  345|  14.3k|    if (ret == NULL)
  ------------------
  |  Branch (345:9): [True: 0, False: 14.3k]
  ------------------
  346|      0|        return NULL;
  347|  14.3k|    ret->flags = ASN1_OBJECT_FLAG_DYNAMIC;
  ------------------
  |  |  110|  14.3k|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  348|  14.3k|    return ret;
  349|  14.3k|}
ASN1_OBJECT_free:
  352|  7.79M|{
  353|  7.79M|    if (a == NULL)
  ------------------
  |  Branch (353:9): [True: 156k, False: 7.63M]
  ------------------
  354|   156k|        return;
  355|  7.63M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_STRINGS) {
  ------------------
  |  |  112|  7.63M|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
  |  Branch (355:9): [True: 0, False: 7.63M]
  ------------------
  356|      0|#ifndef CONST_STRICT
  357|       |        /*
  358|       |         * Disable purely for compile-time strict const checking.  Doing this
  359|       |         * on a "real" compile will cause memory leaks
  360|       |         */
  361|      0|        OPENSSL_free((void *)a->sn);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      0|        OPENSSL_free((void *)a->ln);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  363|      0|#endif
  364|      0|        a->sn = a->ln = NULL;
  365|      0|    }
  366|  7.63M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC_DATA) {
  ------------------
  |  |  113|  7.63M|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
  |  Branch (366:9): [True: 14.3k, False: 7.62M]
  ------------------
  367|  14.3k|        OPENSSL_free((void *)a->data);
  ------------------
  |  |  131|  14.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  368|  14.3k|        a->data = NULL;
  369|  14.3k|        a->length = 0;
  370|  14.3k|    }
  371|  7.63M|    if (a->flags & ASN1_OBJECT_FLAG_DYNAMIC)
  ------------------
  |  |  110|  7.63M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (371:9): [True: 14.3k, False: 7.62M]
  ------------------
  372|  14.3k|        OPENSSL_free(a);
  ------------------
  |  |  131|  14.3k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  373|  7.63M|}

ASN1_OCTET_STRING_cmp:
   21|  2.43k|{
   22|  2.43k|    return ASN1_STRING_cmp(a, b);
   23|  2.43k|}

ASN1_STRING_to_UTF8:
  602|  1.36M|{
  603|  1.36M|    ASN1_STRING stmp, *str = &stmp;
  604|  1.36M|    int mbflag, type, ret;
  605|  1.36M|    if (!in)
  ------------------
  |  Branch (605:9): [True: 0, False: 1.36M]
  ------------------
  606|      0|        return -1;
  607|  1.36M|    type = in->type;
  608|  1.36M|    if ((type < 0) || (type > 30))
  ------------------
  |  Branch (608:9): [True: 0, False: 1.36M]
  |  Branch (608:23): [True: 0, False: 1.36M]
  ------------------
  609|      0|        return -1;
  610|  1.36M|    mbflag = tag2nbyte[type];
  611|  1.36M|    if (mbflag == -1)
  ------------------
  |  Branch (611:9): [True: 0, False: 1.36M]
  ------------------
  612|      0|        return -1;
  613|  1.36M|    mbflag |= MBSTRING_FLAG;
  ------------------
  |  |  124|  1.36M|#define MBSTRING_FLAG 0x1000
  ------------------
  614|  1.36M|    stmp.data = NULL;
  615|  1.36M|    stmp.length = 0;
  616|  1.36M|    stmp.flags = 0;
  617|  1.36M|    ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag,
  618|  1.36M|        B_ASN1_UTF8STRING);
  ------------------
  |  |  119|  1.36M|#define B_ASN1_UTF8STRING 0x2000
  ------------------
  619|  1.36M|    if (ret < 0)
  ------------------
  |  Branch (619:9): [True: 0, False: 1.36M]
  ------------------
  620|      0|        return ret;
  621|  1.36M|    *out = stmp.data;
  622|  1.36M|    return stmp.length;
  623|  1.36M|}

ASN1_TYPE_set:
   27|   848k|{
   28|   848k|    if (a->type != V_ASN1_BOOLEAN
  ------------------
  |  |   65|  1.69M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (28:9): [True: 848k, False: 0]
  ------------------
   29|   848k|        && a->type != V_ASN1_NULL
  ------------------
  |  |   69|  1.69M|#define V_ASN1_NULL 5
  ------------------
  |  Branch (29:12): [True: 848k, False: 0]
  ------------------
   30|   848k|        && a->value.ptr != NULL) {
  ------------------
  |  Branch (30:12): [True: 0, False: 848k]
  ------------------
   31|      0|        ASN1_TYPE **tmp_a = &a;
   32|      0|        ossl_asn1_primitive_free((ASN1_VALUE **)tmp_a, NULL, 0);
   33|      0|    }
   34|   848k|    a->type = type;
   35|   848k|    if (type == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|   848k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (35:9): [True: 0, False: 848k]
  ------------------
   36|      0|        a->value.boolean = value ? 0xff : 0;
  ------------------
  |  Branch (36:28): [True: 0, False: 0]
  ------------------
   37|   848k|    else
   38|   848k|        a->value.ptr = value;
   39|   848k|}

UTF8_getc:
   29|  14.1M|{
   30|  14.1M|    const unsigned char *p;
   31|  14.1M|    unsigned long value;
   32|  14.1M|    int ret;
   33|  14.1M|    if (len <= 0)
  ------------------
  |  Branch (33:9): [True: 0, False: 14.1M]
  ------------------
   34|      0|        return 0;
   35|  14.1M|    p = str;
   36|       |
   37|       |    /* Check syntax and work out the encoded value (if correct) */
   38|  14.1M|    if ((*p & 0x80) == 0) {
  ------------------
  |  Branch (38:9): [True: 14.0M, False: 41.7k]
  ------------------
   39|  14.0M|        value = *p++ & 0x7f;
   40|  14.0M|        ret = 1;
   41|  14.0M|    } else if ((*p & 0xe0) == 0xc0) {
  ------------------
  |  Branch (41:16): [True: 41.7k, False: 0]
  ------------------
   42|  41.7k|        if (len < 2)
  ------------------
  |  Branch (42:13): [True: 0, False: 41.7k]
  ------------------
   43|      0|            return -1;
   44|  41.7k|        if ((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (44:13): [True: 0, False: 41.7k]
  ------------------
   45|      0|            return -3;
   46|  41.7k|        value = (*p++ & 0x1f) << 6;
   47|  41.7k|        value |= *p++ & 0x3f;
   48|  41.7k|        if (value < 0x80)
  ------------------
  |  Branch (48:13): [True: 0, False: 41.7k]
  ------------------
   49|      0|            return -4;
   50|  41.7k|        ret = 2;
   51|  41.7k|    } else if ((*p & 0xf0) == 0xe0) {
  ------------------
  |  Branch (51:16): [True: 0, False: 0]
  ------------------
   52|      0|        if (len < 3)
  ------------------
  |  Branch (52:13): [True: 0, False: 0]
  ------------------
   53|      0|            return -1;
   54|      0|        if (((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (54:13): [True: 0, False: 0]
  ------------------
   55|      0|            || ((p[2] & 0xc0) != 0x80))
  ------------------
  |  Branch (55:16): [True: 0, False: 0]
  ------------------
   56|      0|            return -3;
   57|      0|        value = (*p++ & 0xf) << 12;
   58|      0|        value |= (*p++ & 0x3f) << 6;
   59|      0|        value |= *p++ & 0x3f;
   60|      0|        if (value < 0x800)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            return -4;
   62|      0|        if (is_unicode_surrogate(value))
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  ------------------
   63|      0|            return -2;
   64|      0|        ret = 3;
   65|      0|    } else if ((*p & 0xf8) == 0xf0) {
  ------------------
  |  Branch (65:16): [True: 0, False: 0]
  ------------------
   66|      0|        if (len < 4)
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            return -1;
   68|      0|        if (((p[1] & 0xc0) != 0x80)
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            || ((p[2] & 0xc0) != 0x80)
  ------------------
  |  Branch (69:16): [True: 0, False: 0]
  ------------------
   70|      0|            || ((p[3] & 0xc0) != 0x80))
  ------------------
  |  Branch (70:16): [True: 0, False: 0]
  ------------------
   71|      0|            return -3;
   72|      0|        value = ((unsigned long)(*p++ & 0x7)) << 18;
   73|      0|        value |= (*p++ & 0x3f) << 12;
   74|      0|        value |= (*p++ & 0x3f) << 6;
   75|      0|        value |= *p++ & 0x3f;
   76|      0|        if (value < 0x10000 || value >= UNICODE_LIMIT)
  ------------------
  |  Branch (76:13): [True: 0, False: 0]
  |  Branch (76:32): [True: 0, False: 0]
  ------------------
   77|      0|            return -4;
   78|      0|        ret = 4;
   79|      0|    } else
   80|      0|        return -2;
   81|  14.1M|    *val = value;
   82|  14.1M|    return ret;
   83|  14.1M|}
UTF8_putc:
   94|  29.3M|{
   95|  29.3M|    if (!str)
  ------------------
  |  Branch (95:9): [True: 14.6M, False: 14.6M]
  ------------------
   96|  14.6M|        len = 4; /* Maximum we will need */
   97|  14.6M|    else if (len <= 0)
  ------------------
  |  Branch (97:14): [True: 0, False: 14.6M]
  ------------------
   98|      0|        return -1;
   99|  29.3M|    if (value < 0x80) {
  ------------------
  |  Branch (99:9): [True: 29.3M, False: 0]
  ------------------
  100|  29.3M|        if (str)
  ------------------
  |  Branch (100:13): [True: 14.6M, False: 14.6M]
  ------------------
  101|  14.6M|            *str = (unsigned char)value;
  102|  29.3M|        return 1;
  103|  29.3M|    }
  104|      0|    if (value < 0x800) {
  ------------------
  |  Branch (104:9): [True: 0, False: 0]
  ------------------
  105|      0|        if (len < 2)
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|            return -1;
  107|      0|        if (str) {
  ------------------
  |  Branch (107:13): [True: 0, False: 0]
  ------------------
  108|      0|            *str++ = (unsigned char)(((value >> 6) & 0x1f) | 0xc0);
  109|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  110|      0|        }
  111|      0|        return 2;
  112|      0|    }
  113|      0|    if (value < 0x10000) {
  ------------------
  |  Branch (113:9): [True: 0, False: 0]
  ------------------
  114|      0|        if (is_unicode_surrogate(value))
  ------------------
  |  Branch (114:13): [True: 0, False: 0]
  ------------------
  115|      0|            return -2;
  116|      0|        if (len < 3)
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            return -1;
  118|      0|        if (str) {
  ------------------
  |  Branch (118:13): [True: 0, False: 0]
  ------------------
  119|      0|            *str++ = (unsigned char)(((value >> 12) & 0xf) | 0xe0);
  120|      0|            *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
  121|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  122|      0|        }
  123|      0|        return 3;
  124|      0|    }
  125|      0|    if (value < UNICODE_LIMIT) {
  ------------------
  |  Branch (125:9): [True: 0, False: 0]
  ------------------
  126|      0|        if (len < 4)
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  ------------------
  127|      0|            return -1;
  128|      0|        if (str) {
  ------------------
  |  Branch (128:13): [True: 0, False: 0]
  ------------------
  129|      0|            *str++ = (unsigned char)(((value >> 18) & 0x7) | 0xf0);
  130|      0|            *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
  131|      0|            *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
  132|      0|            *str = (unsigned char)((value & 0x3f) | 0x80);
  133|      0|        }
  134|      0|        return 4;
  135|      0|    }
  136|      0|    return -2;
  137|      0|}

EVP_PKEY_asn1_get_count:
   41|   929k|{
   42|   929k|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|   929k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   43|   929k|    if (app_methods)
  ------------------
  |  Branch (43:9): [True: 0, False: 929k]
  ------------------
   44|      0|        num += sk_EVP_PKEY_ASN1_METHOD_num(app_methods);
   45|   929k|    return num;
   46|   929k|}
EVP_PKEY_asn1_get0:
   49|  13.1M|{
   50|  13.1M|    int num = OSSL_NELEM(standard_methods);
  ------------------
  |  |   14|  13.1M|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   51|  13.1M|    if (idx < 0)
  ------------------
  |  Branch (51:9): [True: 0, False: 13.1M]
  ------------------
   52|      0|        return NULL;
   53|  13.1M|    if (idx < num)
  ------------------
  |  Branch (53:9): [True: 13.1M, False: 0]
  ------------------
   54|  13.1M|        return standard_methods[idx];
   55|      0|    idx -= num;
   56|      0|    return sk_EVP_PKEY_ASN1_METHOD_value(app_methods, idx);
   57|  13.1M|}
EVP_PKEY_asn1_find:
   84|   532k|{
   85|   532k|    const EVP_PKEY_ASN1_METHOD *t;
   86|       |
   87|   532k|    for (;;) {
   88|   532k|        t = pkey_asn1_find(type);
   89|   532k|        if (!t || !(t->pkey_flags & ASN1_PKEY_ALIAS))
  ------------------
  |  | 1603|   450k|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (89:13): [True: 82.0k, False: 450k]
  |  Branch (89:19): [True: 450k, False: 0]
  ------------------
   90|   532k|            break;
   91|      0|        type = t->pkey_base_id;
   92|      0|    }
   93|   532k|    if (pe) {
  ------------------
  |  Branch (93:9): [True: 532k, False: 0]
  ------------------
   94|   532k|#ifndef OPENSSL_NO_ENGINE
   95|   532k|        ENGINE *e;
   96|       |        /* type will contain the final unaliased type */
   97|   532k|        e = ENGINE_get_pkey_asn1_meth_engine(type);
   98|   532k|        if (e) {
  ------------------
  |  Branch (98:13): [True: 0, False: 532k]
  ------------------
   99|      0|            *pe = e;
  100|      0|            return ENGINE_get_pkey_asn1_meth(e, type);
  101|      0|        }
  102|   532k|#endif
  103|   532k|        *pe = NULL;
  104|   532k|    }
  105|   532k|    return t;
  106|   532k|}
EVP_PKEY_asn1_find_str:
  110|   929k|{
  111|   929k|    int i;
  112|   929k|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
  113|       |
  114|   929k|    if (len == -1)
  ------------------
  |  Branch (114:9): [True: 14.6k, False: 914k]
  ------------------
  115|  14.6k|        len = (int)strlen(str);
  116|   929k|    if (pe) {
  ------------------
  |  Branch (116:9): [True: 929k, False: 0]
  ------------------
  117|   929k|#ifndef OPENSSL_NO_ENGINE
  118|   929k|        ENGINE *e;
  119|   929k|        ameth = ENGINE_pkey_asn1_find_str(&e, str, len);
  120|   929k|        if (ameth) {
  ------------------
  |  Branch (120:13): [True: 0, False: 929k]
  ------------------
  121|       |            /*
  122|       |             * Convert structural into functional reference
  123|       |             */
  124|      0|            if (!ENGINE_init(e))
  ------------------
  |  Branch (124:17): [True: 0, False: 0]
  ------------------
  125|      0|                ameth = NULL;
  126|      0|            ENGINE_free(e);
  127|      0|            *pe = e;
  128|      0|            return ameth;
  129|      0|        }
  130|   929k|#endif
  131|   929k|        *pe = NULL;
  132|   929k|    }
  133|  13.7M|    for (i = EVP_PKEY_asn1_get_count(); i-- > 0;) {
  ------------------
  |  Branch (133:41): [True: 13.1M, False: 543k]
  ------------------
  134|  13.1M|        ameth = EVP_PKEY_asn1_get0(i);
  135|  13.1M|        if (ameth->pkey_flags & ASN1_PKEY_ALIAS)
  ------------------
  |  | 1603|  13.1M|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (135:13): [True: 4.20M, False: 8.95M]
  ------------------
  136|  4.20M|            continue;
  137|  8.95M|        if ((int)strlen(ameth->pem_str) == len
  ------------------
  |  Branch (137:13): [True: 668k, False: 8.28M]
  ------------------
  138|   668k|            && OPENSSL_strncasecmp(ameth->pem_str, str, len) == 0)
  ------------------
  |  Branch (138:16): [True: 386k, False: 282k]
  ------------------
  139|   386k|            return ameth;
  140|  8.95M|    }
  141|   543k|    return NULL;
  142|   929k|}
EVP_PKEY_asn1_get0_info:
  203|  7.92k|{
  204|  7.92k|    if (!ameth)
  ------------------
  |  Branch (204:9): [True: 0, False: 7.92k]
  ------------------
  205|      0|        return 0;
  206|  7.92k|    if (ppkey_id)
  ------------------
  |  Branch (206:9): [True: 7.92k, False: 0]
  ------------------
  207|  7.92k|        *ppkey_id = ameth->pkey_id;
  208|  7.92k|    if (ppkey_base_id)
  ------------------
  |  Branch (208:9): [True: 7.92k, False: 0]
  ------------------
  209|  7.92k|        *ppkey_base_id = ameth->pkey_base_id;
  210|  7.92k|    if (ppkey_flags)
  ------------------
  |  Branch (210:9): [True: 7.92k, False: 0]
  ------------------
  211|  7.92k|        *ppkey_flags = ameth->pkey_flags;
  212|  7.92k|    if (pinfo)
  ------------------
  |  Branch (212:9): [True: 0, False: 7.92k]
  ------------------
  213|      0|        *pinfo = ameth->info;
  214|  7.92k|    if (ppem_str)
  ------------------
  |  Branch (214:9): [True: 7.92k, False: 0]
  ------------------
  215|  7.92k|        *ppem_str = ameth->pem_str;
  216|  7.92k|    return 1;
  217|  7.92k|}
ameth_lib.c:pkey_asn1_find:
   60|   532k|{
   61|   532k|    EVP_PKEY_ASN1_METHOD tmp;
   62|   532k|    const EVP_PKEY_ASN1_METHOD *t = &tmp, **ret;
   63|       |
   64|   532k|    tmp.pkey_id = type;
   65|   532k|    if (app_methods) {
  ------------------
  |  Branch (65:9): [True: 0, False: 532k]
  ------------------
   66|      0|        int idx;
   67|      0|        idx = sk_EVP_PKEY_ASN1_METHOD_find(app_methods, &tmp);
   68|      0|        if (idx >= 0)
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            return sk_EVP_PKEY_ASN1_METHOD_value(app_methods, idx);
   70|      0|    }
   71|   532k|    ret = OBJ_bsearch_ameth(&t, standard_methods, OSSL_NELEM(standard_methods));
  ------------------
  |  |   14|   532k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   72|   532k|    if (ret == NULL || *ret == NULL)
  ------------------
  |  Branch (72:9): [True: 82.0k, False: 450k]
  |  Branch (72:24): [True: 0, False: 450k]
  ------------------
   73|  82.0k|        return NULL;
   74|   450k|    return *ret;
   75|   532k|}
ameth_lib.c:ameth_cmp:
   33|  1.64M|{
   34|  1.64M|    return ((*a)->pkey_id - (*b)->pkey_id);
   35|  1.64M|}

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

ASN1_get_object:
   48|  15.0M|{
   49|  15.0M|    int i, ret;
   50|  15.0M|    long len;
   51|  15.0M|    const unsigned char *p = *pp;
   52|  15.0M|    int tag, xclass, inf;
   53|  15.0M|    long max = omax;
   54|       |
   55|  15.0M|    if (omax <= 0) {
  ------------------
  |  Branch (55:9): [True: 0, False: 15.0M]
  ------------------
   56|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   57|      0|        return 0x80;
   58|      0|    }
   59|  15.0M|    ret = (*p & V_ASN1_CONSTRUCTED);
  ------------------
  |  |   54|  15.0M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
   60|  15.0M|    xclass = (*p & V_ASN1_PRIVATE);
  ------------------
  |  |   52|  15.0M|#define V_ASN1_PRIVATE 0xc0
  ------------------
   61|  15.0M|    i = *p & V_ASN1_PRIMITIVE_TAG;
  ------------------
  |  |   55|  15.0M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
   62|  15.0M|    if (i == V_ASN1_PRIMITIVE_TAG) { /* high-tag */
  ------------------
  |  |   55|  15.0M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  |  Branch (62:9): [True: 0, False: 15.0M]
  ------------------
   63|      0|        p++;
   64|      0|        if (--max == 0)
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|            goto err;
   66|      0|        len = 0;
   67|      0|        while (*p & 0x80) {
  ------------------
  |  Branch (67:16): [True: 0, False: 0]
  ------------------
   68|      0|            len <<= 7L;
   69|      0|            len |= *(p++) & 0x7f;
   70|      0|            if (--max == 0)
  ------------------
  |  Branch (70:17): [True: 0, False: 0]
  ------------------
   71|      0|                goto err;
   72|      0|            if (len > (INT_MAX >> 7L))
  ------------------
  |  Branch (72:17): [True: 0, False: 0]
  ------------------
   73|      0|                goto err;
   74|      0|        }
   75|      0|        len <<= 7L;
   76|      0|        len |= *(p++) & 0x7f;
   77|      0|        tag = (int)len;
   78|      0|        if (--max == 0)
  ------------------
  |  Branch (78:13): [True: 0, False: 0]
  ------------------
   79|      0|            goto err;
   80|  15.0M|    } else {
   81|  15.0M|        tag = i;
   82|  15.0M|        p++;
   83|  15.0M|        if (--max == 0)
  ------------------
  |  Branch (83:13): [True: 0, False: 15.0M]
  ------------------
   84|      0|            goto err;
   85|  15.0M|    }
   86|  15.0M|    *ptag = tag;
   87|  15.0M|    *pclass = xclass;
   88|  15.0M|    if (!asn1_get_length(&p, &inf, plength, max))
  ------------------
  |  Branch (88:9): [True: 0, False: 15.0M]
  ------------------
   89|      0|        goto err;
   90|       |
   91|  15.0M|    if (inf && !(ret & V_ASN1_CONSTRUCTED))
  ------------------
  |  |   54|      0|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (91:9): [True: 0, False: 15.0M]
  |  Branch (91:16): [True: 0, False: 0]
  ------------------
   92|      0|        goto err;
   93|       |
   94|  15.0M|    if (*plength > (omax - (p - *pp))) {
  ------------------
  |  Branch (94:9): [True: 381k, False: 14.6M]
  ------------------
   95|   381k|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|   381k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|   381k|    (ERR_new(),                                                  \
  |  |  |  |  407|   381k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|   381k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|   381k|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|       |        /*
   97|       |         * Set this so that even if things are not long enough the values are
   98|       |         * set correctly
   99|       |         */
  100|   381k|        ret |= 0x80;
  101|   381k|    }
  102|  15.0M|    *pp = p;
  103|  15.0M|    return ret | inf;
  104|      0|err:
  105|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_HEADER_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  106|      0|    return 0x80;
  107|  15.0M|}
ASN1_put_object:
  162|  5.51M|{
  163|  5.51M|    unsigned char *p = *pp;
  164|  5.51M|    int i, ttag;
  165|       |
  166|  5.51M|    i = (constructed) ? V_ASN1_CONSTRUCTED : 0;
  ------------------
  |  |   54|  2.75M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
  |  Branch (166:9): [True: 2.75M, False: 2.76M]
  ------------------
  167|  5.51M|    i |= (xclass & V_ASN1_PRIVATE);
  ------------------
  |  |   52|  5.51M|#define V_ASN1_PRIVATE 0xc0
  ------------------
  168|  5.51M|    if (tag < 31) {
  ------------------
  |  Branch (168:9): [True: 5.51M, False: 0]
  ------------------
  169|  5.51M|        *(p++) = i | (tag & V_ASN1_PRIMITIVE_TAG);
  ------------------
  |  |   55|  5.51M|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  170|  5.51M|    } else {
  171|      0|        *(p++) = i | V_ASN1_PRIMITIVE_TAG;
  ------------------
  |  |   55|      0|#define V_ASN1_PRIMITIVE_TAG 0x1f
  ------------------
  172|      0|        for (i = 0, ttag = tag; ttag > 0; i++)
  ------------------
  |  Branch (172:33): [True: 0, False: 0]
  ------------------
  173|      0|            ttag >>= 7;
  174|      0|        ttag = i;
  175|      0|        while (i-- > 0) {
  ------------------
  |  Branch (175:16): [True: 0, False: 0]
  ------------------
  176|      0|            p[i] = tag & 0x7f;
  177|      0|            if (i != (ttag - 1))
  ------------------
  |  Branch (177:17): [True: 0, False: 0]
  ------------------
  178|      0|                p[i] |= 0x80;
  179|      0|            tag >>= 7;
  180|      0|        }
  181|      0|        p += ttag;
  182|      0|    }
  183|  5.51M|    if (constructed == 2)
  ------------------
  |  Branch (183:9): [True: 0, False: 5.51M]
  ------------------
  184|      0|        *(p++) = 0x80;
  185|  5.51M|    else
  186|  5.51M|        asn1_put_length(&p, length);
  187|  5.51M|    *pp = p;
  188|  5.51M|}
ASN1_object_size:
  223|  17.9M|{
  224|  17.9M|    int ret = 1;
  225|       |
  226|  17.9M|    if (length < 0)
  ------------------
  |  Branch (226:9): [True: 0, False: 17.9M]
  ------------------
  227|      0|        return -1;
  228|  17.9M|    if (tag >= 31) {
  ------------------
  |  Branch (228:9): [True: 0, False: 17.9M]
  ------------------
  229|      0|        while (tag > 0) {
  ------------------
  |  Branch (229:16): [True: 0, False: 0]
  ------------------
  230|      0|            tag >>= 7;
  231|      0|            ret++;
  232|      0|        }
  233|      0|    }
  234|  17.9M|    if (constructed == 2) {
  ------------------
  |  Branch (234:9): [True: 0, False: 17.9M]
  ------------------
  235|      0|        ret += 3;
  236|  17.9M|    } else {
  237|  17.9M|        ret++;
  238|  17.9M|        if (length > 127) {
  ------------------
  |  Branch (238:13): [True: 46.3k, False: 17.8M]
  ------------------
  239|  46.3k|            int tmplen = length;
  240|   139k|            while (tmplen > 0) {
  ------------------
  |  Branch (240:20): [True: 92.7k, False: 46.3k]
  ------------------
  241|  92.7k|                tmplen >>= 8;
  242|  92.7k|                ret++;
  243|  92.7k|            }
  244|  46.3k|        }
  245|  17.9M|    }
  246|  17.9M|    if (ret >= INT_MAX - length)
  ------------------
  |  Branch (246:9): [True: 0, False: 17.9M]
  ------------------
  247|      0|        return -1;
  248|  17.9M|    return ret + length;
  249|  17.9M|}
ossl_asn1_string_set_bits_left:
  252|   773k|{
  253|   773k|    str->flags &= ~0x07;
  254|   773k|    str->flags |= ASN1_STRING_FLAG_BITS_LEFT | (num & 0x07);
  ------------------
  |  |  164|   773k|#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
  ------------------
  255|   773k|}
ASN1_STRING_set:
  287|  3.14M|{
  288|  3.14M|    unsigned char *c;
  289|  3.14M|    const char *data = _data;
  290|  3.14M|    size_t len;
  291|       |
  292|  3.14M|    if (len_in < 0) {
  ------------------
  |  Branch (292:9): [True: 0, False: 3.14M]
  ------------------
  293|      0|        if (data == NULL)
  ------------------
  |  Branch (293:13): [True: 0, False: 0]
  ------------------
  294|      0|            return 0;
  295|      0|        len = strlen(data);
  296|  3.14M|    } else {
  297|  3.14M|        len = (size_t)len_in;
  298|  3.14M|    }
  299|       |    /*
  300|       |     * Verify that the length fits within an integer for assignment to
  301|       |     * str->length below.  The additional 1 is subtracted to allow for the
  302|       |     * '\0' terminator even though this isn't strictly necessary.
  303|       |     */
  304|  3.14M|    if (len > INT_MAX - 1) {
  ------------------
  |  Branch (304:9): [True: 0, False: 3.14M]
  ------------------
  305|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LARGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  306|      0|        return 0;
  307|      0|    }
  308|  3.14M|    if ((size_t)str->length <= len || str->data == NULL) {
  ------------------
  |  Branch (308:9): [True: 3.14M, False: 0]
  |  Branch (308:39): [True: 0, False: 0]
  ------------------
  309|  3.14M|        c = str->data;
  310|  3.14M|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  311|       |        /* No NUL terminator in fuzzing builds */
  312|  3.14M|        str->data = OPENSSL_realloc(c, len != 0 ? len : 1);
  ------------------
  |  |  120|  6.29M|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (120:26): [True: 3.14M, False: 0]
  |  |  ------------------
  ------------------
  313|       |#else
  314|       |        str->data = OPENSSL_realloc(c, len + 1);
  315|       |#endif
  316|  3.14M|        if (str->data == NULL) {
  ------------------
  |  Branch (316:13): [True: 0, False: 3.14M]
  ------------------
  317|      0|            str->data = c;
  318|      0|            return 0;
  319|      0|        }
  320|  3.14M|    }
  321|  3.14M|    str->length = (int)len;
  322|  3.14M|    if (data != NULL) {
  ------------------
  |  Branch (322:9): [True: 2.76M, False: 381k]
  ------------------
  323|  2.76M|        memcpy(str->data, data, len);
  324|  2.76M|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  325|       |        /* Set the unused byte to something non NUL and printable. */
  326|  2.76M|        if (len == 0)
  ------------------
  |  Branch (326:13): [True: 0, False: 2.76M]
  ------------------
  327|      0|            str->data[len] = '~';
  328|       |#else
  329|       |        /*
  330|       |         * Add a NUL terminator. This should not be necessary - but we add it as
  331|       |         * a safety precaution
  332|       |         */
  333|       |        str->data[len] = '\0';
  334|       |#endif
  335|  2.76M|    }
  336|  3.14M|    return 1;
  337|  3.14M|}
ASN1_STRING_set0:
  340|  2.13M|{
  341|  2.13M|    OPENSSL_free(str->data);
  ------------------
  |  |  131|  2.13M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  342|  2.13M|    str->data = data;
  343|  2.13M|    str->length = len;
  344|  2.13M|}
ASN1_STRING_type_new:
  352|  3.90M|{
  353|  3.90M|    ASN1_STRING *ret;
  354|       |
  355|  3.90M|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  3.90M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|  3.90M|    if (ret == NULL)
  ------------------
  |  Branch (356:9): [True: 0, False: 3.90M]
  ------------------
  357|      0|        return NULL;
  358|  3.90M|    ret->type = type;
  359|  3.90M|    return ret;
  360|  3.90M|}
ossl_asn1_string_embed_free:
  363|  4.93M|{
  364|  4.93M|    if (a == NULL)
  ------------------
  |  Branch (364:9): [True: 0, False: 4.93M]
  ------------------
  365|      0|        return;
  366|  4.93M|    if (!(a->flags & ASN1_STRING_FLAG_NDEF))
  ------------------
  |  |  170|  4.93M|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (366:9): [True: 4.93M, False: 0]
  ------------------
  367|  4.93M|        OPENSSL_free(a->data);
  ------------------
  |  |  131|  4.93M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  368|  4.93M|    if (embed == 0)
  ------------------
  |  Branch (368:9): [True: 3.90M, False: 1.03M]
  ------------------
  369|  3.90M|        OPENSSL_free(a);
  ------------------
  |  |  131|  3.90M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|  4.93M|}
ASN1_STRING_free:
  373|  1.15M|{
  374|  1.15M|    if (a == NULL)
  ------------------
  |  Branch (374:9): [True: 751k, False: 403k]
  ------------------
  375|   751k|        return;
  376|   403k|    ossl_asn1_string_embed_free(a, a->flags & ASN1_STRING_FLAG_EMBED);
  ------------------
  |  |  185|   403k|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  377|   403k|}
ASN1_STRING_cmp:
  389|  2.81k|{
  390|  2.81k|    int i;
  391|       |
  392|  2.81k|    i = (a->length - b->length);
  393|  2.81k|    if (i == 0) {
  ------------------
  |  Branch (393:9): [True: 2.81k, False: 0]
  ------------------
  394|  2.81k|        if (a->length != 0)
  ------------------
  |  Branch (394:13): [True: 2.81k, False: 0]
  ------------------
  395|  2.81k|            i = memcmp(a->data, b->data, a->length);
  396|  2.81k|        if (i == 0)
  ------------------
  |  Branch (396:13): [True: 2.81k, False: 0]
  ------------------
  397|  2.81k|            return a->type - b->type;
  398|      0|        else
  399|      0|            return i;
  400|  2.81k|    } else {
  401|      0|        return i;
  402|      0|    }
  403|  2.81k|}
ASN1_STRING_length:
  406|  36.5k|{
  407|  36.5k|    return x->length;
  408|  36.5k|}
ASN1_STRING_get0_data:
  423|  36.5k|{
  424|  36.5k|    return x->data;
  425|  36.5k|}
asn1_lib.c:asn1_get_length:
  118|  15.0M|{
  119|  15.0M|    const unsigned char *p = *pp;
  120|  15.0M|    unsigned long ret = 0;
  121|  15.0M|    int i;
  122|       |
  123|  15.0M|    if (max-- < 1)
  ------------------
  |  Branch (123:9): [True: 0, False: 15.0M]
  ------------------
  124|      0|        return 0;
  125|  15.0M|    if (*p == 0x80) {
  ------------------
  |  Branch (125:9): [True: 0, False: 15.0M]
  ------------------
  126|      0|        *inf = 1;
  127|      0|        p++;
  128|  15.0M|    } else {
  129|  15.0M|        *inf = 0;
  130|  15.0M|        i = *p & 0x7f;
  131|  15.0M|        if (*p++ & 0x80) {
  ------------------
  |  Branch (131:13): [True: 2.06M, False: 12.9M]
  ------------------
  132|  2.06M|            if (max < i + 1)
  ------------------
  |  Branch (132:17): [True: 0, False: 2.06M]
  ------------------
  133|      0|                return 0;
  134|       |            /* Skip leading zeroes */
  135|  2.06M|            while (i > 0 && *p == 0) {
  ------------------
  |  Branch (135:20): [True: 2.06M, False: 0]
  |  Branch (135:29): [True: 0, False: 2.06M]
  ------------------
  136|      0|                p++;
  137|      0|                i--;
  138|      0|            }
  139|  2.06M|            if (i > (int)sizeof(long))
  ------------------
  |  Branch (139:17): [True: 0, False: 2.06M]
  ------------------
  140|      0|                return 0;
  141|  6.04M|            while (i > 0) {
  ------------------
  |  Branch (141:20): [True: 3.98M, False: 2.06M]
  ------------------
  142|  3.98M|                ret <<= 8;
  143|  3.98M|                ret |= *p++;
  144|  3.98M|                i--;
  145|  3.98M|            }
  146|  2.06M|            if (ret > LONG_MAX)
  ------------------
  |  Branch (146:17): [True: 0, False: 2.06M]
  ------------------
  147|      0|                return 0;
  148|  12.9M|        } else {
  149|  12.9M|            ret = i;
  150|  12.9M|        }
  151|  15.0M|    }
  152|  15.0M|    *pp = p;
  153|  15.0M|    *rl = (long)ret;
  154|  15.0M|    return 1;
  155|  15.0M|}
asn1_lib.c:asn1_put_length:
  201|  5.51M|{
  202|  5.51M|    unsigned char *p = *pp;
  203|  5.51M|    int i, len;
  204|       |
  205|  5.51M|    if (length <= 127) {
  ------------------
  |  Branch (205:9): [True: 5.49M, False: 19.1k]
  ------------------
  206|  5.49M|        *(p++) = (unsigned char)length;
  207|  5.49M|    } else {
  208|  19.1k|        len = length;
  209|  57.4k|        for (i = 0; len > 0; i++)
  ------------------
  |  Branch (209:21): [True: 38.3k, False: 19.1k]
  ------------------
  210|  38.3k|            len >>= 8;
  211|  19.1k|        *(p++) = i | 0x80;
  212|  19.1k|        len = i;
  213|  57.4k|        while (i-- > 0) {
  ------------------
  |  Branch (213:16): [True: 38.3k, False: 19.1k]
  ------------------
  214|  38.3k|            p[i] = length & 0xff;
  215|  38.3k|            length >>= 8;
  216|  38.3k|        }
  217|  19.1k|        p += len;
  218|  19.1k|    }
  219|  5.51M|    *pp = p;
  220|  5.51M|}

ASN1_tag2bit:
  106|  3.11M|{
  107|  3.11M|    if ((tag < 0) || (tag > 30))
  ------------------
  |  Branch (107:9): [True: 0, False: 3.11M]
  |  Branch (107:22): [True: 0, False: 3.11M]
  ------------------
  108|      0|        return 0;
  109|  3.11M|    return tag2bit[tag];
  110|  3.11M|}
ASN1_item_ex_d2i:
  153|   381k|{
  154|   381k|    return asn1_item_ex_d2i_intern(pval, in, len, it, tag, aclass, opt, ctx,
  155|   381k|        NULL, NULL);
  156|   381k|}
ASN1_item_d2i_ex:
  162|   747k|{
  163|   747k|    ASN1_TLC c;
  164|   747k|    ASN1_VALUE *ptmpval = NULL;
  165|       |
  166|   747k|    if (pval == NULL)
  ------------------
  |  Branch (166:9): [True: 174k, False: 572k]
  ------------------
  167|   174k|        pval = &ptmpval;
  168|   747k|    asn1_tlc_clear_nc(&c);
  ------------------
  |  |  121|   747k|    do {                     \
  |  |  122|   747k|        (c)->valid = 0;      \
  |  |  123|   747k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (123:14): [Folded, False: 747k]
  |  |  ------------------
  ------------------
  169|   747k|    if (asn1_item_ex_d2i_intern(pval, in, len, it, -1, 0, 0, &c, libctx,
  ------------------
  |  Branch (169:9): [True: 747k, False: 0]
  ------------------
  170|   747k|            propq)
  171|   747k|        > 0)
  172|   747k|        return *pval;
  173|      0|    return NULL;
  174|   747k|}
ASN1_item_d2i:
  179|   556k|{
  180|   556k|    return ASN1_item_d2i_ex(pval, in, len, it, NULL, NULL);
  181|   556k|}
asn1_item_embed_d2i:
  193|  15.5M|{
  194|  15.5M|    const ASN1_TEMPLATE *tt, *errtt = NULL;
  195|  15.5M|    const ASN1_EXTERN_FUNCS *ef;
  196|  15.5M|    const ASN1_AUX *aux;
  197|  15.5M|    ASN1_aux_cb *asn1_cb;
  198|  15.5M|    const unsigned char *p = NULL, *q;
  199|  15.5M|    unsigned char oclass;
  200|  15.5M|    char seq_eoc, seq_nolen, cst, isopt;
  201|  15.5M|    long tmplen;
  202|  15.5M|    int i;
  203|  15.5M|    int otag;
  204|  15.5M|    int ret = 0;
  205|  15.5M|    ASN1_VALUE **pchptr;
  206|       |
  207|  15.5M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 15.5M]
  |  Branch (207:25): [True: 0, False: 15.5M]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|  15.5M|    if (len <= 0) {
  ------------------
  |  Branch (211:9): [True: 0, False: 15.5M]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|  15.5M|    aux = it->funcs;
  216|  15.5M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (216:9): [True: 1.56M, False: 13.9M]
  |  Branch (216:16): [True: 607k, False: 953k]
  ------------------
  217|   607k|        asn1_cb = aux->asn1_cb;
  218|  14.9M|    else
  219|  14.9M|        asn1_cb = 0;
  220|       |
  221|  15.5M|    if (++depth > ASN1_MAX_CONSTRUCTED_NEST) {
  ------------------
  |  |   27|  15.5M|#define ASN1_MAX_CONSTRUCTED_NEST 30
  ------------------
  |  Branch (221:9): [True: 0, False: 15.5M]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_NESTED_TOO_DEEP);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        goto err;
  224|      0|    }
  225|       |
  226|  15.5M|    switch (it->itype) {
  227|  8.73M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  8.73M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (227:5): [True: 8.73M, False: 6.78M]
  ------------------
  228|  8.73M|        if (it->templates) {
  ------------------
  |  Branch (228:13): [True: 1.74M, False: 6.98M]
  ------------------
  229|       |            /*
  230|       |             * tagging or OPTIONAL is currently illegal on an item template
  231|       |             * because the flags can't get passed down. In practice this
  232|       |             * isn't a problem: we include the relevant flags from the item
  233|       |             * template in the template itself.
  234|       |             */
  235|  1.74M|            if ((tag != -1) || opt) {
  ------------------
  |  Branch (235:17): [True: 0, False: 1.74M]
  |  Branch (235:32): [True: 0, False: 1.74M]
  ------------------
  236|      0|                ERR_raise(ERR_LIB_ASN1,
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  237|      0|                    ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE);
  238|      0|                goto err;
  239|      0|            }
  240|  1.74M|            return asn1_template_ex_d2i(pval, in, len, it->templates, opt, ctx,
  241|  1.74M|                depth, libctx, propq);
  242|  1.74M|        }
  243|  6.98M|        return asn1_d2i_ex_primitive(pval, in, len, it,
  244|  6.98M|            tag, aclass, opt, ctx);
  245|       |
  246|  1.74M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  1.74M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (246:5): [True: 1.74M, False: 13.7M]
  ------------------
  247|       |        /*
  248|       |         * It never makes sense for multi-strings to have implicit tagging, so
  249|       |         * if tag != -1, then this looks like an error in the template.
  250|       |         */
  251|  1.74M|        if (tag != -1) {
  ------------------
  |  Branch (251:13): [True: 0, False: 1.74M]
  ------------------
  252|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|            goto err;
  254|      0|        }
  255|       |
  256|  1.74M|        p = *in;
  257|       |        /* Just read in tag and class */
  258|  1.74M|        ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
  259|  1.74M|            &p, len, -1, 0, 1, ctx);
  260|  1.74M|        if (!ret) {
  ------------------
  |  Branch (260:13): [True: 0, False: 1.74M]
  ------------------
  261|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  262|      0|            goto err;
  263|      0|        }
  264|       |
  265|       |        /* Must be UNIVERSAL class */
  266|  1.74M|        if (oclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|  1.74M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (266:13): [True: 0, False: 1.74M]
  ------------------
  267|       |            /* If OPTIONAL, assume this is OK */
  268|      0|            if (opt)
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  ------------------
  269|      0|                return -1;
  270|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MSTRING_NOT_UNIVERSAL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|            goto err;
  272|      0|        }
  273|       |
  274|       |        /* Check tag matches bit map */
  275|  1.74M|        if (!(ASN1_tag2bit(otag) & it->utype)) {
  ------------------
  |  Branch (275:13): [True: 0, False: 1.74M]
  ------------------
  276|       |            /* If OPTIONAL, assume this is OK */
  277|      0|            if (opt)
  ------------------
  |  Branch (277:17): [True: 0, False: 0]
  ------------------
  278|      0|                return -1;
  279|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MSTRING_WRONG_TAG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|            goto err;
  281|      0|        }
  282|  1.74M|        return asn1_d2i_ex_primitive(pval, in, len, it, otag, 0, 0, ctx);
  283|       |
  284|   763k|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|   763k|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (284:5): [True: 763k, False: 14.7M]
  ------------------
  285|       |        /* Use new style d2i */
  286|   763k|        ef = it->funcs;
  287|   763k|        if (ef->asn1_ex_d2i_ex != NULL)
  ------------------
  |  Branch (287:13): [True: 381k, False: 381k]
  ------------------
  288|   381k|            return ef->asn1_ex_d2i_ex(pval, in, len, it, tag, aclass, opt, ctx,
  289|   381k|                libctx, propq);
  290|   381k|        return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx);
  291|       |
  292|  3.26k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  3.26k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (292:5): [True: 3.26k, False: 15.5M]
  ------------------
  293|       |        /*
  294|       |         * It never makes sense for CHOICE types to have implicit tagging, so
  295|       |         * if tag != -1, then this looks like an error in the template.
  296|       |         */
  297|  3.26k|        if (tag != -1) {
  ------------------
  |  Branch (297:13): [True: 0, False: 3.26k]
  ------------------
  298|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|            goto err;
  300|      0|        }
  301|       |
  302|  3.26k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|  1.29k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (302:13): [True: 1.29k, False: 1.97k]
  |  Branch (302:24): [True: 0, False: 1.29k]
  ------------------
  303|      0|            goto auxerr;
  304|  3.26k|        if (*pval) {
  ------------------
  |  Branch (304:13): [True: 0, False: 3.26k]
  ------------------
  305|       |            /* Free up and zero CHOICE value if initialised */
  306|      0|            i = ossl_asn1_get_choice_selector(pval, it);
  307|      0|            if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  |  Branch (307:29): [True: 0, False: 0]
  ------------------
  308|      0|                tt = it->templates + i;
  309|      0|                pchptr = ossl_asn1_get_field_ptr(pval, tt);
  310|      0|                ossl_asn1_template_free(pchptr, tt);
  311|      0|                ossl_asn1_set_choice_selector(pval, -1, it);
  312|      0|            }
  313|  3.26k|        } else if (!ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (313:20): [True: 0, False: 3.26k]
  ------------------
  314|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  315|      0|            goto err;
  316|      0|        }
  317|       |        /* CHOICE type, try each possibility in turn */
  318|  3.26k|        p = *in;
  319|  13.0k|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (319:41): [True: 13.0k, False: 0]
  ------------------
  320|  13.0k|            pchptr = ossl_asn1_get_field_ptr(pval, tt);
  321|       |            /*
  322|       |             * We mark field as OPTIONAL so its absence can be recognised.
  323|       |             */
  324|  13.0k|            ret = asn1_template_ex_d2i(pchptr, &p, len, tt, 1, ctx, depth,
  325|  13.0k|                libctx, propq);
  326|       |            /* If field not present, try the next one */
  327|  13.0k|            if (ret == -1)
  ------------------
  |  Branch (327:17): [True: 9.80k, False: 3.26k]
  ------------------
  328|  9.80k|                continue;
  329|       |            /* If positive return, read OK, break loop */
  330|  3.26k|            if (ret > 0)
  ------------------
  |  Branch (330:17): [True: 3.26k, False: 0]
  ------------------
  331|  3.26k|                break;
  332|       |            /*
  333|       |             * Must be an ASN1 parsing error.
  334|       |             * Free up any partial choice value
  335|       |             */
  336|      0|            ossl_asn1_template_free(pchptr, tt);
  337|      0|            errtt = tt;
  338|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  339|      0|            goto err;
  340|  3.26k|        }
  341|       |
  342|       |        /* Did we fall off the end without reading anything? */
  343|  3.26k|        if (i == it->tcount) {
  ------------------
  |  Branch (343:13): [True: 0, False: 3.26k]
  ------------------
  344|       |            /* If OPTIONAL, this is OK */
  345|      0|            if (opt) {
  ------------------
  |  Branch (345:17): [True: 0, False: 0]
  ------------------
  346|       |                /* Free and zero it */
  347|      0|                ASN1_item_ex_free(pval, it);
  348|      0|                return -1;
  349|      0|            }
  350|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NO_MATCHING_CHOICE_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|            goto err;
  352|      0|        }
  353|       |
  354|  3.26k|        ossl_asn1_set_choice_selector(pval, i, it);
  355|       |
  356|  3.26k|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|  1.29k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (356:13): [True: 1.29k, False: 1.97k]
  |  Branch (356:24): [True: 0, False: 1.29k]
  ------------------
  357|      0|            goto auxerr;
  358|  3.26k|        *in = p;
  359|  3.26k|        return 1;
  360|       |
  361|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (361:5): [True: 0, False: 15.5M]
  ------------------
  362|  4.27M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  4.27M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (362:5): [True: 4.27M, False: 11.2M]
  ------------------
  363|  4.27M|        p = *in;
  364|  4.27M|        tmplen = len;
  365|       |
  366|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  367|  4.27M|        if (tag == -1) {
  ------------------
  |  Branch (367:13): [True: 4.27M, False: 3.26k]
  ------------------
  368|  4.27M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  4.27M|#define V_ASN1_SEQUENCE 16
  ------------------
  369|  4.27M|            aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  4.27M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  370|  4.27M|        }
  371|       |        /* Get SEQUENCE length and update len, p */
  372|  4.27M|        ret = asn1_check_tlen(&len, NULL, NULL, &seq_eoc, &cst,
  373|  4.27M|            &p, len, tag, aclass, opt, ctx);
  374|  4.27M|        if (!ret) {
  ------------------
  |  Branch (374:13): [True: 0, False: 4.27M]
  ------------------
  375|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  376|      0|            goto err;
  377|  4.27M|        } else if (ret == -1)
  ------------------
  |  Branch (377:20): [True: 3.26k, False: 4.27M]
  ------------------
  378|  3.26k|            return -1;
  379|  4.27M|        if (aux && (aux->flags & ASN1_AFLG_BROKEN)) {
  ------------------
  |  |  725|   519k|#define ASN1_AFLG_BROKEN 4
  ------------------
  |  Branch (379:13): [True: 519k, False: 3.75M]
  |  Branch (379:20): [True: 0, False: 519k]
  ------------------
  380|      0|            len = tmplen - (long)(p - *in);
  381|      0|            seq_nolen = 1;
  382|      0|        }
  383|       |        /* If indefinite we don't do a length check */
  384|  4.27M|        else
  385|  4.27M|            seq_nolen = seq_eoc;
  386|  4.27M|        if (!cst) {
  ------------------
  |  Branch (386:13): [True: 0, False: 4.27M]
  ------------------
  387|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_NOT_CONSTRUCTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  388|      0|            goto err;
  389|      0|        }
  390|       |
  391|  4.27M|        if (*pval == NULL
  ------------------
  |  Branch (391:13): [True: 2.36M, False: 1.90M]
  ------------------
  392|  2.36M|            && !ossl_asn1_item_ex_new_intern(pval, it, libctx, propq)) {
  ------------------
  |  Branch (392:16): [True: 0, False: 2.36M]
  ------------------
  393|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  394|      0|            goto err;
  395|      0|        }
  396|       |
  397|  4.27M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
  ------------------
  |  |  735|   329k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (397:13): [True: 329k, False: 3.94M]
  |  Branch (397:24): [True: 0, False: 329k]
  ------------------
  398|      0|            goto auxerr;
  399|       |
  400|       |        /* Free up and zero any ADB found */
  401|  15.1M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (401:41): [True: 10.9M, False: 4.27M]
  ------------------
  402|  10.9M|            if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  10.9M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (402:17): [True: 0, False: 10.9M]
  ------------------
  403|      0|                const ASN1_TEMPLATE *seqtt;
  404|      0|                ASN1_VALUE **pseqval;
  405|      0|                seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  406|      0|                if (seqtt == NULL)
  ------------------
  |  Branch (406:21): [True: 0, False: 0]
  ------------------
  407|      0|                    continue;
  408|      0|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  409|      0|                ossl_asn1_template_free(pseqval, seqtt);
  410|      0|            }
  411|  10.9M|        }
  412|       |
  413|       |        /* Get each field entry */
  414|  15.0M|        for (i = 0, tt = it->templates; i < it->tcount; i++, tt++) {
  ------------------
  |  Branch (414:41): [True: 10.9M, False: 4.15M]
  ------------------
  415|  10.9M|            const ASN1_TEMPLATE *seqtt;
  416|  10.9M|            ASN1_VALUE **pseqval;
  417|  10.9M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  418|  10.9M|            if (seqtt == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 10.9M]
  ------------------
  419|      0|                goto err;
  420|  10.9M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  421|       |            /* Have we ran out of data? */
  422|  10.9M|            if (!len)
  ------------------
  |  Branch (422:17): [True: 118k, False: 10.7M]
  ------------------
  423|   118k|                break;
  424|  10.7M|            q = p;
  425|  10.7M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (425:17): [True: 0, False: 10.7M]
  ------------------
  426|      0|                if (!seq_eoc) {
  ------------------
  |  Branch (426:21): [True: 0, False: 0]
  ------------------
  427|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  428|      0|                    goto err;
  429|      0|                }
  430|      0|                len -= (long)(p - q);
  431|      0|                seq_eoc = 0;
  432|      0|                break;
  433|      0|            }
  434|       |            /*
  435|       |             * This determines the OPTIONAL flag value. The field cannot be
  436|       |             * omitted if it is the last of a SEQUENCE and there is still
  437|       |             * data to be read. This isn't strictly necessary but it
  438|       |             * increases efficiency in some cases.
  439|       |             */
  440|  10.7M|            if (i == (it->tcount - 1))
  ------------------
  |  Branch (440:17): [True: 4.15M, False: 6.64M]
  ------------------
  441|  4.15M|                isopt = 0;
  442|  6.64M|            else
  443|  6.64M|                isopt = (char)(seqtt->flags & ASN1_TFLG_OPTIONAL);
  ------------------
  |  |  512|  6.64M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  444|       |            /*
  445|       |             * attempt to read in field, allowing each to be OPTIONAL
  446|       |             */
  447|       |
  448|  10.7M|            ret = asn1_template_ex_d2i(pseqval, &p, len, seqtt, isopt, ctx,
  449|  10.7M|                depth, libctx, propq);
  450|  10.7M|            if (!ret) {
  ------------------
  |  Branch (450:17): [True: 0, False: 10.7M]
  ------------------
  451|      0|                errtt = seqtt;
  452|      0|                goto err;
  453|  10.7M|            } else if (ret == -1) {
  ------------------
  |  Branch (453:24): [True: 675k, False: 10.1M]
  ------------------
  454|       |                /*
  455|       |                 * OPTIONAL component absent. Free and zero the field.
  456|       |                 */
  457|   675k|                ossl_asn1_template_free(pseqval, seqtt);
  458|   675k|                continue;
  459|   675k|            }
  460|       |            /* Update length */
  461|  10.1M|            len -= (long)(p - q);
  462|  10.1M|        }
  463|       |
  464|       |        /* Check for EOC if expecting one */
  465|  4.27M|        if (seq_eoc && !asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (465:13): [True: 0, False: 4.27M]
  |  Branch (465:24): [True: 0, False: 0]
  ------------------
  466|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|            goto err;
  468|      0|        }
  469|       |        /* Check all data read */
  470|  4.27M|        if (!seq_nolen && len) {
  ------------------
  |  Branch (470:13): [True: 4.27M, False: 0]
  |  Branch (470:27): [True: 0, False: 4.27M]
  ------------------
  471|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_SEQUENCE_LENGTH_MISMATCH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  472|      0|            goto err;
  473|      0|        }
  474|       |
  475|       |        /*
  476|       |         * If we get here we've got no more data in the SEQUENCE, however we
  477|       |         * may not have read all fields so check all remaining are OPTIONAL
  478|       |         * and clear any that are.
  479|       |         */
  480|  4.39M|        for (; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (480:16): [True: 122k, False: 4.27M]
  ------------------
  481|   122k|            const ASN1_TEMPLATE *seqtt;
  482|   122k|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  483|   122k|            if (seqtt == NULL)
  ------------------
  |  Branch (483:17): [True: 0, False: 122k]
  ------------------
  484|      0|                goto err;
  485|   122k|            if (seqtt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|   122k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (485:17): [True: 122k, False: 0]
  ------------------
  486|   122k|                ASN1_VALUE **pseqval;
  487|   122k|                pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  488|   122k|                ossl_asn1_template_free(pseqval, seqtt);
  489|   122k|            } else {
  490|      0|                errtt = seqtt;
  491|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_FIELD_MISSING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  492|      0|                goto err;
  493|      0|            }
  494|   122k|        }
  495|       |        /* Save encoding */
  496|  4.27M|        if (!ossl_asn1_enc_save(pval, *in, (long)(p - *in), it))
  ------------------
  |  Branch (496:13): [True: 0, False: 4.27M]
  ------------------
  497|      0|            goto auxerr;
  498|  4.27M|        if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
  ------------------
  |  |  736|   329k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (498:13): [True: 329k, False: 3.94M]
  |  Branch (498:24): [True: 0, False: 329k]
  ------------------
  499|      0|            goto auxerr;
  500|  4.27M|        *in = p;
  501|  4.27M|        return 1;
  502|       |
  503|      0|    default:
  ------------------
  |  Branch (503:5): [True: 0, False: 15.5M]
  ------------------
  504|      0|        return 0;
  505|  15.5M|    }
  506|      0|auxerr:
  507|      0|    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  508|      0|err:
  509|      0|    if (errtt)
  ------------------
  |  Branch (509:9): [True: 0, False: 0]
  ------------------
  510|      0|        ERR_add_error_data(4, "Field=", errtt->field_name,
  511|      0|            ", Type=", it->sname);
  512|      0|    else
  513|      0|        ERR_add_error_data(2, "Type=", it->sname);
  514|      0|    return 0;
  515|      0|}
tasn_dec.c:asn1_item_ex_d2i_intern:
  136|  1.12M|{
  137|  1.12M|    int rv;
  138|       |
  139|  1.12M|    if (pval == NULL || it == NULL) {
  ------------------
  |  Branch (139:9): [True: 0, False: 1.12M]
  |  Branch (139:25): [True: 0, False: 1.12M]
  ------------------
  140|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  141|      0|        return 0;
  142|      0|    }
  143|  1.12M|    rv = asn1_item_embed_d2i(pval, in, len, it, tag, aclass, opt, ctx, 0,
  144|  1.12M|        libctx, propq);
  145|  1.12M|    if (rv <= 0)
  ------------------
  |  Branch (145:9): [True: 0, False: 1.12M]
  ------------------
  146|      0|        ASN1_item_ex_free(pval, it);
  147|  1.12M|    return rv;
  148|  1.12M|}
tasn_dec.c:asn1_template_ex_d2i:
  527|  12.5M|{
  528|  12.5M|    int flags, aclass;
  529|  12.5M|    int ret;
  530|  12.5M|    long len;
  531|  12.5M|    const unsigned char *p, *q;
  532|  12.5M|    char exp_eoc;
  533|  12.5M|    if (!val)
  ------------------
  |  Branch (533:9): [True: 0, False: 12.5M]
  ------------------
  534|      0|        return 0;
  535|  12.5M|    flags = tt->flags;
  536|  12.5M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  12.5M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  537|       |
  538|  12.5M|    p = *in;
  539|       |
  540|       |    /* Check if EXPLICIT tag expected */
  541|  12.5M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  12.5M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (541:9): [True: 384k, False: 12.1M]
  ------------------
  542|   384k|        char cst;
  543|       |        /*
  544|       |         * Need to work out amount of data available to the inner content and
  545|       |         * where it starts: so read in EXPLICIT header to get the info.
  546|       |         */
  547|   384k|        ret = asn1_check_tlen(&len, NULL, NULL, &exp_eoc, &cst,
  548|   384k|            &p, inlen, tt->tag, aclass, opt, ctx);
  549|   384k|        q = p;
  550|   384k|        if (!ret) {
  ------------------
  |  Branch (550:13): [True: 0, False: 384k]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|   384k|        } else if (ret == -1)
  ------------------
  |  Branch (553:20): [True: 1.29k, False: 383k]
  ------------------
  554|  1.29k|            return -1;
  555|   383k|        if (!cst) {
  ------------------
  |  Branch (555:13): [True: 0, False: 383k]
  ------------------
  556|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  557|      0|            return 0;
  558|      0|        }
  559|       |        /* We've found the field so it can't be OPTIONAL now */
  560|   383k|        ret = asn1_template_noexp_d2i(val, &p, len, tt, 0, ctx, depth, libctx,
  561|   383k|            propq);
  562|   383k|        if (!ret) {
  ------------------
  |  Branch (562:13): [True: 0, False: 383k]
  ------------------
  563|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|            return 0;
  565|      0|        }
  566|       |        /* We read the field in OK so update length */
  567|   383k|        len -= (long)(p - q);
  568|   383k|        if (exp_eoc) {
  ------------------
  |  Branch (568:13): [True: 0, False: 383k]
  ------------------
  569|       |            /* If NDEF we must have an EOC here */
  570|      0|            if (!asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (570:17): [True: 0, False: 0]
  ------------------
  571|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  572|      0|                goto err;
  573|      0|            }
  574|   383k|        } else {
  575|       |            /*
  576|       |             * Otherwise we must hit the EXPLICIT tag end or its an error
  577|       |             */
  578|   383k|            if (len) {
  ------------------
  |  Branch (578:17): [True: 0, False: 383k]
  ------------------
  579|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_EXPLICIT_LENGTH_MISMATCH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  580|      0|                goto err;
  581|      0|            }
  582|   383k|        }
  583|   383k|    } else
  584|  12.1M|        return asn1_template_noexp_d2i(val, in, inlen, tt, opt, ctx, depth,
  585|  12.1M|            libctx, propq);
  586|       |
  587|   383k|    *in = p;
  588|   383k|    return 1;
  589|       |
  590|      0|err:
  591|      0|    return 0;
  592|  12.5M|}
tasn_dec.c:asn1_template_noexp_d2i:
  599|  12.5M|{
  600|  12.5M|    int flags, aclass;
  601|  12.5M|    int ret;
  602|  12.5M|    ASN1_VALUE *tval;
  603|  12.5M|    const unsigned char *p, *q;
  604|  12.5M|    if (!val)
  ------------------
  |  Branch (604:9): [True: 0, False: 12.5M]
  ------------------
  605|      0|        return 0;
  606|  12.5M|    flags = tt->flags;
  607|  12.5M|    aclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  12.5M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  608|       |
  609|  12.5M|    p = *in;
  610|       |
  611|       |    /*
  612|       |     * If field is embedded then val needs fixing so it is a pointer to
  613|       |     * a pointer to a field.
  614|       |     */
  615|  12.5M|    if (tt->flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  12.5M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (615:9): [True: 1.80M, False: 10.7M]
  ------------------
  616|  1.80M|        tval = (ASN1_VALUE *)val;
  617|  1.80M|        val = &tval;
  618|  1.80M|    }
  619|       |
  620|  12.5M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  12.5M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (620:9): [True: 1.93M, False: 10.6M]
  ------------------
  621|       |        /* SET OF, SEQUENCE OF */
  622|  1.93M|        int sktag, skaclass;
  623|  1.93M|        char sk_eoc;
  624|       |        /* First work out expected inner tag value */
  625|  1.93M|        if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  1.93M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (625:13): [True: 1.67k, False: 1.93M]
  ------------------
  626|  1.67k|            sktag = tt->tag;
  627|  1.67k|            skaclass = aclass;
  628|  1.93M|        } else {
  629|  1.93M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  1.93M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  630|  1.93M|            if (flags & ASN1_TFLG_SET_OF)
  ------------------
  |  |  515|  1.93M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (630:17): [True: 1.36M, False: 573k]
  ------------------
  631|  1.36M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  1.36M|#define V_ASN1_SET 17
  ------------------
  632|   573k|            else
  633|   573k|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|   573k|#define V_ASN1_SEQUENCE 16
  ------------------
  634|  1.93M|        }
  635|       |        /* Get the tag */
  636|  1.93M|        ret = asn1_check_tlen(&len, NULL, NULL, &sk_eoc, NULL,
  637|  1.93M|            &p, len, sktag, skaclass, opt, ctx);
  638|  1.93M|        if (!ret) {
  ------------------
  |  Branch (638:13): [True: 0, False: 1.93M]
  ------------------
  639|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  640|      0|            return 0;
  641|  1.93M|        } else if (ret == -1)
  ------------------
  |  Branch (641:20): [True: 0, False: 1.93M]
  ------------------
  642|      0|            return -1;
  643|  1.93M|        if (*val == NULL)
  ------------------
  |  Branch (643:13): [True: 1.93M, False: 0]
  ------------------
  644|  1.93M|            *val = (ASN1_VALUE *)sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|  1.93M|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
  ------------------
  645|      0|        else {
  646|       |            /*
  647|       |             * We've got a valid STACK: free up any items present
  648|       |             */
  649|      0|            STACK_OF(ASN1_VALUE) *sktmp = (STACK_OF(ASN1_VALUE) *)*val;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  650|      0|            ASN1_VALUE *vtmp;
  651|      0|            while (sk_ASN1_VALUE_num(sktmp) > 0) {
  ------------------
  |  |  887|      0|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (651:20): [True: 0, False: 0]
  ------------------
  652|      0|                vtmp = sk_ASN1_VALUE_pop(sktmp);
  ------------------
  |  |  899|      0|#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
  ------------------
  653|      0|                ASN1_item_ex_free(&vtmp, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  654|      0|            }
  655|      0|        }
  656|       |
  657|  1.93M|        if (*val == NULL) {
  ------------------
  |  Branch (657:13): [True: 0, False: 1.93M]
  ------------------
  658|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  659|      0|            goto err;
  660|      0|        }
  661|       |
  662|       |        /* Read as many items as we can */
  663|  5.32M|        while (len > 0) {
  ------------------
  |  Branch (663:16): [True: 3.38M, False: 1.93M]
  ------------------
  664|  3.38M|            ASN1_VALUE *skfield;
  665|  3.38M|            q = p;
  666|       |            /* See if EOC found */
  667|  3.38M|            if (asn1_check_eoc(&p, len)) {
  ------------------
  |  Branch (667:17): [True: 0, False: 3.38M]
  ------------------
  668|      0|                if (!sk_eoc) {
  ------------------
  |  Branch (668:21): [True: 0, False: 0]
  ------------------
  669|      0|                    ERR_raise(ERR_LIB_ASN1, ASN1_R_UNEXPECTED_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  670|      0|                    goto err;
  671|      0|                }
  672|      0|                len -= (long)(p - q);
  673|      0|                sk_eoc = 0;
  674|      0|                break;
  675|      0|            }
  676|  3.38M|            skfield = NULL;
  677|  3.38M|            if (asn1_item_embed_d2i(&skfield, &p, len,
  ------------------
  |  Branch (677:17): [True: 0, False: 3.38M]
  ------------------
  678|  3.38M|                    ASN1_ITEM_ptr(tt->item), -1, 0, 0, ctx,
  ------------------
  |  |  428|  3.38M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  679|  3.38M|                    depth, libctx, propq)
  680|  3.38M|                <= 0) {
  681|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  682|       |                /* |skfield| may be partially allocated despite failure. */
  683|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  684|      0|                goto err;
  685|      0|            }
  686|  3.38M|            len -= (long)(p - q);
  687|  3.38M|            if (!sk_ASN1_VALUE_push((STACK_OF(ASN1_VALUE) *)*val, skfield)) {
  ------------------
  |  |  897|  3.38M|#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
  ------------------
  |  Branch (687:17): [True: 0, False: 3.38M]
  ------------------
  688|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  689|      0|                ASN1_item_free(skfield, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  690|      0|                goto err;
  691|      0|            }
  692|  3.38M|        }
  693|  1.93M|        if (sk_eoc) {
  ------------------
  |  Branch (693:13): [True: 0, False: 1.93M]
  ------------------
  694|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_MISSING_EOC);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  695|      0|            goto err;
  696|      0|        }
  697|  10.6M|    } else if (flags & ASN1_TFLG_IMPTAG) {
  ------------------
  |  |  536|  10.6M|#define ASN1_TFLG_IMPTAG (0x1 << 3)
  ------------------
  |  Branch (697:16): [True: 394k, False: 10.2M]
  ------------------
  698|       |        /* IMPLICIT tagging */
  699|   394k|        ret = asn1_item_embed_d2i(val, &p, len,
  700|   394k|            ASN1_ITEM_ptr(tt->item), tt->tag, aclass, opt,
  ------------------
  |  |  428|   394k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  701|   394k|            ctx, depth, libctx, propq);
  702|   394k|        if (!ret) {
  ------------------
  |  Branch (702:13): [True: 0, False: 394k]
  ------------------
  703|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  704|      0|            goto err;
  705|   394k|        } else if (ret == -1)
  ------------------
  |  Branch (705:20): [True: 389k, False: 4.33k]
  ------------------
  706|   389k|            return -1;
  707|  10.2M|    } else {
  708|       |        /* Nothing special */
  709|  10.2M|        ret = asn1_item_embed_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  10.2M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  710|  10.2M|            -1, 0, opt, ctx, depth, libctx, propq);
  711|  10.2M|        if (!ret) {
  ------------------
  |  Branch (711:13): [True: 0, False: 10.2M]
  ------------------
  712|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  713|      0|            goto err;
  714|  10.2M|        } else if (ret == -1)
  ------------------
  |  Branch (714:20): [True: 293k, False: 9.93M]
  ------------------
  715|   293k|            return -1;
  716|  10.2M|    }
  717|       |
  718|  11.8M|    *in = p;
  719|  11.8M|    return 1;
  720|       |
  721|      0|err:
  722|      0|    return 0;
  723|  12.5M|}
tasn_dec.c:asn1_d2i_ex_primitive:
  729|  8.72M|{
  730|  8.72M|    int ret = 0, utype;
  731|  8.72M|    long plen;
  732|  8.72M|    char cst, inf, free_cont = 0;
  733|  8.72M|    const unsigned char *p;
  734|  8.72M|    BUF_MEM buf = { 0, NULL, 0, 0 };
  735|  8.72M|    const unsigned char *cont = NULL;
  736|  8.72M|    long len;
  737|       |
  738|  8.72M|    if (pval == NULL) {
  ------------------
  |  Branch (738:9): [True: 0, False: 8.72M]
  ------------------
  739|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  740|      0|        return 0; /* Should never happen */
  741|      0|    }
  742|       |
  743|  8.72M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  8.72M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (743:9): [True: 1.74M, False: 6.98M]
  ------------------
  744|  1.74M|        utype = tag;
  745|  1.74M|        tag = -1;
  746|  1.74M|    } else
  747|  6.98M|        utype = it->utype;
  748|       |
  749|  8.72M|    if (utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  8.72M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (749:9): [True: 848k, False: 7.88M]
  ------------------
  750|       |        /* If type is ANY need to figure out type from tag */
  751|   848k|        unsigned char oclass;
  752|   848k|        if (tag >= 0) {
  ------------------
  |  Branch (752:13): [True: 0, False: 848k]
  ------------------
  753|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_TAGGED_ANY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  754|      0|            return 0;
  755|      0|        }
  756|   848k|        if (opt) {
  ------------------
  |  Branch (756:13): [True: 0, False: 848k]
  ------------------
  757|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_OPTIONAL_ANY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  758|      0|            return 0;
  759|      0|        }
  760|   848k|        p = *in;
  761|   848k|        ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, NULL,
  762|   848k|            &p, inlen, -1, 0, 0, ctx);
  763|   848k|        if (!ret) {
  ------------------
  |  Branch (763:13): [True: 0, False: 848k]
  ------------------
  764|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  765|      0|            return 0;
  766|      0|        }
  767|   848k|        if (oclass != V_ASN1_UNIVERSAL)
  ------------------
  |  |   49|   848k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (767:13): [True: 0, False: 848k]
  ------------------
  768|      0|            utype = V_ASN1_OTHER;
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  769|   848k|    }
  770|  8.72M|    if (tag == -1) {
  ------------------
  |  Branch (770:9): [True: 8.33M, False: 390k]
  ------------------
  771|  8.33M|        tag = utype;
  772|  8.33M|        aclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  8.33M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  773|  8.33M|    }
  774|  8.72M|    p = *in;
  775|       |    /* Check header */
  776|  8.72M|    ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst,
  777|  8.72M|        &p, inlen, tag, aclass, opt, ctx);
  778|  8.72M|    if (!ret) {
  ------------------
  |  Branch (778:9): [True: 0, False: 8.72M]
  ------------------
  779|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  780|      0|        return 0;
  781|  8.72M|    } else if (ret == -1)
  ------------------
  |  Branch (781:16): [True: 680k, False: 8.04M]
  ------------------
  782|   680k|        return -1;
  783|  8.04M|    ret = 0;
  784|       |    /* SEQUENCE, SET and "OTHER" are left in encoded form */
  785|  8.04M|    if ((utype == V_ASN1_SEQUENCE)
  ------------------
  |  |   76|  8.04M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (785:9): [True: 0, False: 8.04M]
  ------------------
  786|  8.04M|        || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   77|  8.04M|#define V_ASN1_SET 17
  ------------------
                      || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
  ------------------
  |  |   59|  8.04M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (786:12): [True: 0, False: 8.04M]
  |  Branch (786:37): [True: 0, False: 8.04M]
  ------------------
  787|       |        /*
  788|       |         * Clear context cache for type OTHER because the auto clear when we
  789|       |         * have a exact match won't work
  790|       |         */
  791|      0|        if (utype == V_ASN1_OTHER) {
  ------------------
  |  |   59|      0|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (791:13): [True: 0, False: 0]
  ------------------
  792|      0|            asn1_tlc_clear(ctx);
  ------------------
  |  |  115|      0|    do {                    \
  |  |  116|      0|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|            (c)->valid = 0; \
  |  |  118|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  793|      0|        }
  794|       |        /* SEQUENCE and SET must be constructed */
  795|      0|        else if (!cst) {
  ------------------
  |  Branch (795:18): [True: 0, False: 0]
  ------------------
  796|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TYPE_NOT_CONSTRUCTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  797|      0|            return 0;
  798|      0|        }
  799|       |
  800|      0|        cont = *in;
  801|       |        /* If indefinite length constructed find the real end */
  802|      0|        if (inf) {
  ------------------
  |  Branch (802:13): [True: 0, False: 0]
  ------------------
  803|      0|            if (!asn1_find_end(&p, plen, inf))
  ------------------
  |  Branch (803:17): [True: 0, False: 0]
  ------------------
  804|      0|                goto err;
  805|      0|            len = (long)(p - cont);
  806|      0|        } else {
  807|      0|            len = (long)(p - cont) + plen;
  808|      0|            p += plen;
  809|      0|        }
  810|  8.04M|    } else if (cst) {
  ------------------
  |  Branch (810:16): [True: 0, False: 8.04M]
  ------------------
  811|      0|        if (utype == V_ASN1_NULL || utype == V_ASN1_BOOLEAN
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
                      if (utype == V_ASN1_NULL || utype == V_ASN1_BOOLEAN
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (811:13): [True: 0, False: 0]
  |  Branch (811:37): [True: 0, False: 0]
  ------------------
  812|      0|            || utype == V_ASN1_OBJECT || utype == V_ASN1_INTEGER
  ------------------
  |  |   70|      0|#define V_ASN1_OBJECT 6
  ------------------
                          || utype == V_ASN1_OBJECT || utype == V_ASN1_INTEGER
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (812:16): [True: 0, False: 0]
  |  Branch (812:42): [True: 0, False: 0]
  ------------------
  813|      0|            || utype == V_ASN1_ENUMERATED) {
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (813:16): [True: 0, False: 0]
  ------------------
  814|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_TYPE_NOT_PRIMITIVE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  815|      0|            return 0;
  816|      0|        }
  817|       |
  818|       |        /* Free any returned 'buf' content */
  819|      0|        free_cont = 1;
  820|       |        /*
  821|       |         * Should really check the internal tags are correct but some things
  822|       |         * may get this wrong. The relevant specs say that constructed string
  823|       |         * types should be OCTET STRINGs internally irrespective of the type.
  824|       |         * So instead just check for UNIVERSAL class and ignore the tag.
  825|       |         */
  826|      0|        if (!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL, 0)) {
  ------------------
  |  |   49|      0|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (826:13): [True: 0, False: 0]
  ------------------
  827|      0|            goto err;
  828|      0|        }
  829|      0|        len = (long)buf.length;
  830|       |        /* Append a final null to string */
  831|      0|        if (!BUF_MEM_grow_clean(&buf, len + 1)) {
  ------------------
  |  Branch (831:13): [True: 0, False: 0]
  ------------------
  832|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  833|      0|            goto err;
  834|      0|        }
  835|      0|        buf.data[len] = 0;
  836|      0|        cont = (const unsigned char *)buf.data;
  837|  8.04M|    } else {
  838|  8.04M|        cont = p;
  839|  8.04M|        len = plen;
  840|  8.04M|        p += plen;
  841|  8.04M|    }
  842|       |
  843|       |    /* We now have content length and type: translate into a structure */
  844|       |    /* asn1_ex_c2i may reuse allocated buffer, and so sets free_cont to 0 */
  845|  8.04M|    if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it))
  ------------------
  |  Branch (845:9): [True: 0, False: 8.04M]
  ------------------
  846|      0|        goto err;
  847|       |
  848|  8.04M|    *in = p;
  849|  8.04M|    ret = 1;
  850|  8.04M|err:
  851|  8.04M|    if (free_cont)
  ------------------
  |  Branch (851:9): [True: 0, False: 8.04M]
  ------------------
  852|      0|        OPENSSL_free(buf.data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  853|  8.04M|    return ret;
  854|  8.04M|}
tasn_dec.c:asn1_ex_c2i:
  860|  8.04M|{
  861|  8.04M|    ASN1_VALUE **opval = NULL;
  862|  8.04M|    ASN1_STRING *stmp;
  863|  8.04M|    ASN1_TYPE *typ = NULL;
  864|  8.04M|    int ret = 0;
  865|  8.04M|    const ASN1_PRIMITIVE_FUNCS *pf;
  866|  8.04M|    ASN1_INTEGER **tint;
  867|  8.04M|    pf = it->funcs;
  868|       |
  869|  8.04M|    if (pf && pf->prim_c2i)
  ------------------
  |  Branch (869:9): [True: 276k, False: 7.77M]
  |  Branch (869:15): [True: 276k, False: 0]
  ------------------
  870|   276k|        return pf->prim_c2i(pval, cont, len, utype, free_cont, it);
  871|       |    /* If ANY type clear type and set pointer to internal value */
  872|  7.77M|    if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  7.77M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (872:9): [True: 848k, False: 6.92M]
  ------------------
  873|   848k|        if (*pval == NULL) {
  ------------------
  |  Branch (873:13): [True: 848k, False: 0]
  ------------------
  874|   848k|            typ = ASN1_TYPE_new();
  875|   848k|            if (typ == NULL)
  ------------------
  |  Branch (875:17): [True: 0, False: 848k]
  ------------------
  876|      0|                goto err;
  877|   848k|            *pval = (ASN1_VALUE *)typ;
  878|   848k|        } else
  879|      0|            typ = (ASN1_TYPE *)*pval;
  880|       |
  881|   848k|        if (utype != typ->type)
  ------------------
  |  Branch (881:13): [True: 848k, False: 0]
  ------------------
  882|   848k|            ASN1_TYPE_set(typ, utype, NULL);
  883|   848k|        opval = pval;
  884|   848k|        pval = &typ->value.asn1_value;
  885|   848k|    }
  886|  7.77M|    switch (utype) {
  887|  3.13M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  3.13M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (887:5): [True: 3.13M, False: 4.63M]
  ------------------
  888|  3.13M|        if (!ossl_c2i_ASN1_OBJECT((ASN1_OBJECT **)pval, &cont, len))
  ------------------
  |  Branch (888:13): [True: 0, False: 3.13M]
  ------------------
  889|      0|            goto err;
  890|  3.13M|        break;
  891|       |
  892|  3.13M|    case V_ASN1_NULL:
  ------------------
  |  |   69|   692k|#define V_ASN1_NULL 5
  ------------------
  |  Branch (892:5): [True: 692k, False: 7.07M]
  ------------------
  893|   692k|        if (len) {
  ------------------
  |  Branch (893:13): [True: 0, False: 692k]
  ------------------
  894|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_NULL_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  895|      0|            goto err;
  896|      0|        }
  897|   692k|        *pval = (ASN1_VALUE *)1;
  898|   692k|        break;
  899|       |
  900|   374k|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|   374k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (900:5): [True: 374k, False: 7.39M]
  ------------------
  901|   374k|        if (len != 1) {
  ------------------
  |  Branch (901:13): [True: 0, False: 374k]
  ------------------
  902|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BOOLEAN_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  903|      0|            goto err;
  904|   374k|        } else {
  905|   374k|            ASN1_BOOLEAN *tbool;
  906|   374k|            tbool = (ASN1_BOOLEAN *)pval;
  907|   374k|            *tbool = *cont;
  908|   374k|        }
  909|   374k|        break;
  910|       |
  911|   773k|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|   773k|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (911:5): [True: 773k, False: 6.99M]
  ------------------
  912|   773k|        if (!ossl_c2i_ASN1_BIT_STRING((ASN1_BIT_STRING **)pval, &cont, len))
  ------------------
  |  Branch (912:13): [True: 0, False: 773k]
  ------------------
  913|      0|            goto err;
  914|   773k|        break;
  915|       |
  916|   773k|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|   381k|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (916:5): [True: 381k, False: 7.38M]
  ------------------
  917|   381k|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|   381k|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (917:5): [True: 0, False: 7.77M]
  ------------------
  918|   381k|        tint = (ASN1_INTEGER **)pval;
  919|   381k|        if (!ossl_c2i_ASN1_INTEGER(tint, &cont, len))
  ------------------
  |  Branch (919:13): [True: 0, False: 381k]
  ------------------
  920|      0|            goto err;
  921|       |        /* Fixup type to match the expected form */
  922|   381k|        (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG);
  ------------------
  |  |   99|   381k|#define V_ASN1_NEG 0x100
  ------------------
  923|   381k|        break;
  924|       |
  925|   670k|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|   670k|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (925:5): [True: 670k, False: 7.10M]
  ------------------
  926|   670k|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|   670k|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (926:5): [True: 0, False: 7.77M]
  ------------------
  927|  1.68M|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|  1.68M|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (927:5): [True: 1.01M, False: 6.75M]
  ------------------
  928|  1.68M|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|  1.68M|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (928:5): [True: 2.61k, False: 7.76M]
  ------------------
  929|  1.68M|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|  1.68M|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (929:5): [True: 0, False: 7.77M]
  ------------------
  930|  1.69M|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|  1.69M|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (930:5): [True: 4.13k, False: 7.76M]
  ------------------
  931|  2.07M|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|  2.07M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (931:5): [True: 378k, False: 7.39M]
  ------------------
  932|  2.07M|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|  2.07M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (932:5): [True: 2.61k, False: 7.76M]
  ------------------
  933|  2.07M|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|  2.07M|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (933:5): [True: 0, False: 7.77M]
  ------------------
  934|  2.07M|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|  2.07M|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (934:5): [True: 0, False: 7.77M]
  ------------------
  935|  2.07M|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|  2.07M|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (935:5): [True: 0, False: 7.77M]
  ------------------
  936|  2.07M|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|  2.07M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (936:5): [True: 0, False: 7.77M]
  ------------------
  937|  2.07M|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|  2.07M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (937:5): [True: 0, False: 7.77M]
  ------------------
  938|  2.41M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  2.41M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (938:5): [True: 345k, False: 7.42M]
  ------------------
  939|  2.41M|    case V_ASN1_OTHER:
  ------------------
  |  |   59|  2.41M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (939:5): [True: 0, False: 7.77M]
  ------------------
  940|  2.41M|    case V_ASN1_SET:
  ------------------
  |  |   77|  2.41M|#define V_ASN1_SET 17
  ------------------
  |  Branch (940:5): [True: 0, False: 7.77M]
  ------------------
  941|  2.41M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  2.41M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (941:5): [True: 0, False: 7.77M]
  ------------------
  942|  2.41M|    default:
  ------------------
  |  Branch (942:5): [True: 0, False: 7.77M]
  ------------------
  943|  2.41M|        if (utype == V_ASN1_BMPSTRING && (len & 1)) {
  ------------------
  |  |   91|  4.83M|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (943:13): [True: 0, False: 2.41M]
  |  Branch (943:42): [True: 0, False: 0]
  ------------------
  944|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  945|      0|            goto err;
  946|      0|        }
  947|  2.41M|        if (utype == V_ASN1_UNIVERSALSTRING && (len & 3)) {
  ------------------
  |  |   90|  4.83M|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (947:13): [True: 0, False: 2.41M]
  |  Branch (947:48): [True: 0, False: 0]
  ------------------
  948|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  949|      0|            goto err;
  950|      0|        }
  951|  2.41M|        if (utype == V_ASN1_GENERALIZEDTIME && (len < 15)) {
  ------------------
  |  |   85|  4.83M|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (951:13): [True: 2.61k, False: 2.41M]
  |  Branch (951:48): [True: 0, False: 2.61k]
  ------------------
  952|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  953|      0|            goto err;
  954|      0|        }
  955|  2.41M|        if (utype == V_ASN1_UTCTIME && (len < 13)) {
  ------------------
  |  |   84|  4.83M|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (955:13): [True: 378k, False: 2.03M]
  |  Branch (955:40): [True: 0, False: 378k]
  ------------------
  956|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_UTCTIME_IS_TOO_SHORT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  957|      0|            goto err;
  958|      0|        }
  959|       |        /* All based on ASN1_STRING and handled the same */
  960|  2.41M|        if (*pval == NULL) {
  ------------------
  |  Branch (960:13): [True: 14.9k, False: 2.40M]
  ------------------
  961|  14.9k|            stmp = ASN1_STRING_type_new(utype);
  962|  14.9k|            if (stmp == NULL) {
  ------------------
  |  Branch (962:17): [True: 0, False: 14.9k]
  ------------------
  963|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  964|      0|                goto err;
  965|      0|            }
  966|  14.9k|            *pval = (ASN1_VALUE *)stmp;
  967|  2.40M|        } else {
  968|  2.40M|            stmp = (ASN1_STRING *)*pval;
  969|  2.40M|            stmp->type = utype;
  970|  2.40M|        }
  971|       |        /* If we've already allocated a buffer use it */
  972|  2.41M|        if (*free_cont) {
  ------------------
  |  Branch (972:13): [True: 0, False: 2.41M]
  ------------------
  973|      0|            ASN1_STRING_set0(stmp, (unsigned char *)cont /* UGLY CAST! */, len);
  974|      0|            *free_cont = 0;
  975|  2.41M|        } else {
  976|  2.41M|            if (!ASN1_STRING_set(stmp, cont, len)) {
  ------------------
  |  Branch (976:17): [True: 0, False: 2.41M]
  ------------------
  977|      0|                ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  978|      0|                ASN1_STRING_free(stmp);
  979|      0|                *pval = NULL;
  980|      0|                goto err;
  981|      0|            }
  982|  2.41M|        }
  983|  2.41M|        break;
  984|  7.77M|    }
  985|       |    /* If ASN1_ANY and NULL type fix up value */
  986|  7.77M|    if (typ && (utype == V_ASN1_NULL))
  ------------------
  |  |   69|   848k|#define V_ASN1_NULL 5
  ------------------
  |  Branch (986:9): [True: 848k, False: 6.92M]
  |  Branch (986:16): [True: 692k, False: 156k]
  ------------------
  987|   692k|        typ->value.ptr = NULL;
  988|       |
  989|  7.77M|    ret = 1;
  990|  7.77M|err:
  991|  7.77M|    if (!ret) {
  ------------------
  |  Branch (991:9): [True: 0, False: 7.77M]
  ------------------
  992|      0|        ASN1_TYPE_free(typ);
  993|      0|        if (opval)
  ------------------
  |  Branch (993:13): [True: 0, False: 0]
  ------------------
  994|      0|            *opval = NULL;
  995|      0|    }
  996|  7.77M|    return ret;
  997|  7.77M|}
tasn_dec.c:asn1_check_eoc:
 1153|  14.1M|{
 1154|  14.1M|    const unsigned char *p;
 1155|       |
 1156|  14.1M|    if (len < 2)
  ------------------
  |  Branch (1156:9): [True: 0, False: 14.1M]
  ------------------
 1157|      0|        return 0;
 1158|  14.1M|    p = *in;
 1159|  14.1M|    if (p[0] == '\0' && p[1] == '\0') {
  ------------------
  |  Branch (1159:9): [True: 0, False: 14.1M]
  |  Branch (1159:25): [True: 0, False: 0]
  ------------------
 1160|      0|        *in += 2;
 1161|      0|        return 1;
 1162|      0|    }
 1163|  14.1M|    return 0;
 1164|  14.1M|}
tasn_dec.c:asn1_check_tlen:
 1177|  17.9M|{
 1178|  17.9M|    int i;
 1179|  17.9M|    int ptag, pclass;
 1180|  17.9M|    long plen;
 1181|  17.9M|    const unsigned char *p, *q;
 1182|  17.9M|    p = *in;
 1183|  17.9M|    q = p;
 1184|       |
 1185|  17.9M|    if (len <= 0) {
  ------------------
  |  Branch (1185:9): [True: 0, False: 17.9M]
  ------------------
 1186|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1187|      0|        goto err;
 1188|      0|    }
 1189|  17.9M|    if (ctx != NULL && ctx->valid) {
  ------------------
  |  Branch (1189:9): [True: 17.9M, False: 0]
  |  Branch (1189:24): [True: 3.28M, False: 14.6M]
  ------------------
 1190|  3.28M|        i = ctx->ret;
 1191|  3.28M|        plen = ctx->plen;
 1192|  3.28M|        pclass = ctx->pclass;
 1193|  3.28M|        ptag = ctx->ptag;
 1194|  3.28M|        p += ctx->hdrlen;
 1195|  14.6M|    } else {
 1196|  14.6M|        i = ASN1_get_object(&p, &plen, &ptag, &pclass, len);
 1197|  14.6M|        if (ctx != NULL) {
  ------------------
  |  Branch (1197:13): [True: 14.6M, False: 0]
  ------------------
 1198|  14.6M|            ctx->ret = i;
 1199|  14.6M|            ctx->plen = plen;
 1200|  14.6M|            ctx->pclass = pclass;
 1201|  14.6M|            ctx->ptag = ptag;
 1202|  14.6M|            ctx->hdrlen = (int)(p - q);
 1203|  14.6M|            ctx->valid = 1;
 1204|       |            /*
 1205|       |             * If definite length, and no error, length + header can't exceed
 1206|       |             * total amount of data available.
 1207|       |             */
 1208|  14.6M|            if ((i & 0x81) == 0 && (plen + ctx->hdrlen) > len) {
  ------------------
  |  Branch (1208:17): [True: 14.6M, False: 0]
  |  Branch (1208:36): [True: 0, False: 14.6M]
  ------------------
 1209|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1210|      0|                goto err;
 1211|      0|            }
 1212|  14.6M|        }
 1213|  14.6M|    }
 1214|       |
 1215|  17.9M|    if ((i & 0x80) != 0) {
  ------------------
  |  Branch (1215:9): [True: 0, False: 17.9M]
  ------------------
 1216|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_OBJECT_HEADER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1217|      0|        goto err;
 1218|      0|    }
 1219|  17.9M|    if (exptag >= 0) {
  ------------------
  |  Branch (1219:9): [True: 15.3M, False: 2.59M]
  ------------------
 1220|  15.3M|        if (exptag != ptag || expclass != pclass) {
  ------------------
  |  Branch (1220:13): [True: 685k, False: 14.6M]
  |  Branch (1220:31): [True: 0, False: 14.6M]
  ------------------
 1221|       |            /*
 1222|       |             * If type is OPTIONAL, not an error: indicate missing type.
 1223|       |             */
 1224|   685k|            if (opt != 0)
  ------------------
  |  Branch (1224:17): [True: 685k, False: 0]
  ------------------
 1225|   685k|                return -1;
 1226|   685k|            ERR_raise(ERR_LIB_ASN1, ASN1_R_WRONG_TAG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1227|      0|            goto err;
 1228|   685k|        }
 1229|       |        /*
 1230|       |         * We have a tag and class match: assume we are going to do something
 1231|       |         * with it
 1232|       |         */
 1233|  14.6M|        asn1_tlc_clear(ctx);
  ------------------
  |  |  115|  14.6M|    do {                    \
  |  |  116|  14.6M|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 14.6M, False: 0]
  |  |  ------------------
  |  |  117|  14.6M|            (c)->valid = 0; \
  |  |  118|  14.6M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 14.6M]
  |  |  ------------------
  ------------------
 1234|  14.6M|    }
 1235|       |
 1236|  17.2M|    if ((i & 1) != 0)
  ------------------
  |  Branch (1236:9): [True: 0, False: 17.2M]
  ------------------
 1237|      0|        plen = len - (long)(p - q);
 1238|       |
 1239|  17.2M|    if (inf != NULL)
  ------------------
  |  Branch (1239:9): [True: 14.6M, False: 2.59M]
  ------------------
 1240|  14.6M|        *inf = i & 1;
 1241|       |
 1242|  17.2M|    if (cst != NULL)
  ------------------
  |  Branch (1242:9): [True: 12.7M, False: 4.53M]
  ------------------
 1243|  12.7M|        *cst = i & V_ASN1_CONSTRUCTED;
  ------------------
  |  |   54|  12.7M|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
 1244|       |
 1245|  17.2M|    if (olen != NULL)
  ------------------
  |  Branch (1245:9): [True: 14.6M, False: 2.59M]
  ------------------
 1246|  14.6M|        *olen = plen;
 1247|       |
 1248|  17.2M|    if (oclass != NULL)
  ------------------
  |  Branch (1248:9): [True: 2.59M, False: 14.6M]
  ------------------
 1249|  2.59M|        *oclass = pclass;
 1250|       |
 1251|  17.2M|    if (otag != NULL)
  ------------------
  |  Branch (1251:9): [True: 2.59M, False: 14.6M]
  ------------------
 1252|  2.59M|        *otag = ptag;
 1253|       |
 1254|  17.2M|    *in = p;
 1255|  17.2M|    return 1;
 1256|       |
 1257|      0|err:
 1258|       |    asn1_tlc_clear(ctx);
  ------------------
  |  |  115|      0|    do {                    \
  |  |  116|      0|        if ((c) != NULL)    \
  |  |  ------------------
  |  |  |  Branch (116:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|            (c)->valid = 0; \
  |  |  118|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (118:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1259|      0|    return 0;
 1260|  17.9M|}

ASN1_item_i2d:
   44|  11.0k|{
   45|  11.0k|    return asn1_item_flags_i2d(val, out, it, 0);
   46|  11.0k|}
ASN1_item_ex_i2d:
   83|  17.9M|{
   84|  17.9M|    const ASN1_TEMPLATE *tt = NULL;
   85|  17.9M|    int i, seqcontlen, seqlen, ndef = 1;
   86|  17.9M|    const ASN1_EXTERN_FUNCS *ef;
   87|  17.9M|    const ASN1_AUX *aux = it->funcs;
   88|  17.9M|    ASN1_aux_const_cb *asn1_cb = NULL;
   89|       |
   90|  17.9M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  17.9M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (90:9): [True: 9.64M, False: 8.31M]
  |  Branch (90:48): [True: 0, False: 9.64M]
  ------------------
   91|      0|        return 0;
   92|       |
   93|  17.9M|    if (aux != NULL) {
  ------------------
  |  Branch (93:9): [True: 55.4k, False: 17.8M]
  ------------------
   94|  55.4k|        asn1_cb = ((aux->flags & ASN1_AFLG_CONST_CB) != 0) ? aux->asn1_const_cb
  ------------------
  |  |  727|  55.4k|#define ASN1_AFLG_CONST_CB 8
  ------------------
  |  Branch (94:19): [True: 0, False: 55.4k]
  ------------------
   95|  55.4k|                                                           : (ASN1_aux_const_cb *)aux->asn1_cb; /* backward compatibility */
   96|  55.4k|    }
   97|       |
   98|  17.9M|    switch (it->itype) {
   99|       |
  100|  8.31M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  8.31M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (100:5): [True: 8.31M, False: 9.64M]
  ------------------
  101|  8.31M|        if (it->templates)
  ------------------
  |  Branch (101:13): [True: 2.72M, False: 5.58M]
  ------------------
  102|  2.72M|            return asn1_template_ex_i2d(pval, out, it->templates,
  103|  2.72M|                tag, aclass);
  104|  5.58M|        return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
  105|       |
  106|  5.45M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  5.45M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (106:5): [True: 5.45M, False: 12.4M]
  ------------------
  107|       |        /*
  108|       |         * It never makes sense for multi-strings to have implicit tagging, so
  109|       |         * if tag != -1, then this looks like an error in the template.
  110|       |         */
  111|  5.45M|        if (tag != -1) {
  ------------------
  |  Branch (111:13): [True: 0, False: 5.45M]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            return -1;
  114|      0|        }
  115|  5.45M|        return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
  116|       |
  117|      0|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|      0|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (117:5): [True: 0, False: 17.9M]
  ------------------
  118|       |        /*
  119|       |         * It never makes sense for CHOICE types to have implicit tagging, so
  120|       |         * if tag != -1, then this looks like an error in the template.
  121|       |         */
  122|      0|        if (tag != -1) {
  ------------------
  |  Branch (122:13): [True: 0, False: 0]
  ------------------
  123|      0|            ERR_raise(ERR_LIB_ASN1, ASN1_R_BAD_TEMPLATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|            return -1;
  125|      0|        }
  126|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|      0|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (126:13): [True: 0, False: 0]
  |  Branch (126:24): [True: 0, False: 0]
  ------------------
  127|      0|            return 0;
  128|      0|        i = ossl_asn1_get_choice_selector_const(pval, it);
  129|      0|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  |  Branch (129:25): [True: 0, False: 0]
  ------------------
  130|      0|            const ASN1_VALUE **pchval;
  131|      0|            const ASN1_TEMPLATE *chtt;
  132|      0|            chtt = it->templates + i;
  133|      0|            pchval = ossl_asn1_get_const_field_ptr(pval, chtt);
  134|      0|            return asn1_template_ex_i2d(pchval, out, chtt, -1, aclass);
  135|      0|        }
  136|       |        /* Fixme: error condition if selector out of range */
  137|      0|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|      0|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (137:13): [True: 0, False: 0]
  |  Branch (137:24): [True: 0, False: 0]
  ------------------
  138|      0|            return 0;
  139|      0|        break;
  140|       |
  141|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (141:5): [True: 0, False: 17.9M]
  ------------------
  142|       |        /* If new style i2d it does all the work */
  143|      0|        ef = it->funcs;
  144|      0|        return ef->asn1_ex_i2d(pval, out, it, tag, aclass);
  145|       |
  146|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (146:5): [True: 0, False: 17.9M]
  ------------------
  147|       |        /* Use indefinite length constructed if requested */
  148|      0|        if (aclass & ASN1_TFLG_NDEF)
  ------------------
  |  |  583|      0|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (148:13): [True: 0, False: 0]
  ------------------
  149|      0|            ndef = 2;
  150|       |        /* fall through */
  151|       |
  152|  4.18M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  4.18M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (152:5): [True: 4.18M, False: 13.7M]
  ------------------
  153|  4.18M|        i = ossl_asn1_enc_restore(&seqcontlen, out, pval, it);
  154|       |        /* An error occurred */
  155|  4.18M|        if (i < 0)
  ------------------
  |  Branch (155:13): [True: 0, False: 4.18M]
  ------------------
  156|      0|            return 0;
  157|       |        /* We have a valid cached encoding... */
  158|  4.18M|        if (i > 0)
  ------------------
  |  Branch (158:13): [True: 33.2k, False: 4.14M]
  ------------------
  159|  33.2k|            return seqcontlen;
  160|       |        /* Otherwise carry on */
  161|  4.14M|        seqcontlen = 0;
  162|       |        /* If no IMPLICIT tagging set to SEQUENCE, UNIVERSAL */
  163|  4.14M|        if (tag == -1) {
  ------------------
  |  Branch (163:13): [True: 4.14M, False: 0]
  ------------------
  164|  4.14M|            tag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|  4.14M|#define V_ASN1_SEQUENCE 16
  ------------------
  165|       |            /* Retain any other flags in aclass */
  166|  4.14M|            aclass = (aclass & ~ASN1_TFLG_TAG_CLASS)
  ------------------
  |  |  564|  4.14M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  167|  4.14M|                | V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  4.14M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  168|  4.14M|        }
  169|  4.14M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
  ------------------
  |  |  737|  22.1k|#define ASN1_OP_I2D_PRE 6
  ------------------
  |  Branch (169:13): [True: 22.1k, False: 4.12M]
  |  Branch (169:24): [True: 0, False: 22.1k]
  ------------------
  170|      0|            return 0;
  171|       |        /* First work out sequence content length */
  172|  12.4M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (172:41): [True: 8.32M, False: 4.14M]
  ------------------
  173|  8.32M|            const ASN1_TEMPLATE *seqtt;
  174|  8.32M|            const ASN1_VALUE **pseqval;
  175|  8.32M|            int tmplen;
  176|  8.32M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  177|  8.32M|            if (!seqtt)
  ------------------
  |  Branch (177:17): [True: 0, False: 8.32M]
  ------------------
  178|      0|                return 0;
  179|  8.32M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  180|  8.32M|            tmplen = asn1_template_ex_i2d(pseqval, NULL, seqtt, -1, aclass);
  181|  8.32M|            if (tmplen == -1 || (tmplen > INT_MAX - seqcontlen))
  ------------------
  |  Branch (181:17): [True: 0, False: 8.32M]
  |  Branch (181:33): [True: 0, False: 8.32M]
  ------------------
  182|      0|                return -1;
  183|  8.32M|            seqcontlen += tmplen;
  184|  8.32M|        }
  185|       |
  186|  4.14M|        seqlen = ASN1_object_size(ndef, seqcontlen, tag);
  187|  4.14M|        if (!out || seqlen == -1)
  ------------------
  |  Branch (187:13): [True: 2.76M, False: 1.38M]
  |  Branch (187:21): [True: 0, False: 1.38M]
  ------------------
  188|  2.76M|            return seqlen;
  189|       |        /* Output SEQUENCE header */
  190|  1.38M|        ASN1_put_object(out, ndef, seqcontlen, tag, aclass);
  191|  4.17M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (191:41): [True: 2.78M, False: 1.38M]
  ------------------
  192|  2.78M|            const ASN1_TEMPLATE *seqtt;
  193|  2.78M|            const ASN1_VALUE **pseqval;
  194|  2.78M|            seqtt = ossl_asn1_do_adb(*pval, tt, 1);
  195|  2.78M|            if (!seqtt)
  ------------------
  |  Branch (195:17): [True: 0, False: 2.78M]
  ------------------
  196|      0|                return 0;
  197|  2.78M|            pseqval = ossl_asn1_get_const_field_ptr(pval, seqtt);
  198|       |            /* FIXME: check for errors in enhanced version */
  199|  2.78M|            asn1_template_ex_i2d(pseqval, out, seqtt, -1, aclass);
  200|  2.78M|        }
  201|  1.38M|        if (ndef == 2)
  ------------------
  |  Branch (201:13): [True: 0, False: 1.38M]
  ------------------
  202|      0|            ASN1_put_eoc(out);
  203|  1.38M|        if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL))
  ------------------
  |  |  738|  11.0k|#define ASN1_OP_I2D_POST 7
  ------------------
  |  Branch (203:13): [True: 11.0k, False: 1.37M]
  |  Branch (203:24): [True: 0, False: 11.0k]
  ------------------
  204|      0|            return 0;
  205|  1.38M|        return seqlen;
  206|       |
  207|      0|    default:
  ------------------
  |  Branch (207:5): [True: 0, False: 17.9M]
  ------------------
  208|      0|        return 0;
  209|  17.9M|    }
  210|      0|    return 0;
  211|  17.9M|}
tasn_enc.c:asn1_item_flags_i2d:
   57|  11.0k|{
   58|  11.0k|    if (out != NULL && *out == NULL) {
  ------------------
  |  Branch (58:9): [True: 11.0k, False: 0]
  |  Branch (58:24): [True: 11.0k, False: 0]
  ------------------
   59|  11.0k|        unsigned char *p, *buf;
   60|  11.0k|        int len;
   61|       |
   62|  11.0k|        len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
   63|  11.0k|        if (len <= 0)
  ------------------
  |  Branch (63:13): [True: 0, False: 11.0k]
  ------------------
   64|      0|            return len;
   65|  11.0k|        if ((buf = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  106|  11.0k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (65:13): [True: 0, False: 11.0k]
  ------------------
   66|      0|            return -1;
   67|  11.0k|        p = buf;
   68|  11.0k|        ASN1_item_ex_i2d(&val, &p, it, -1, flags);
   69|  11.0k|        *out = buf;
   70|  11.0k|        return len;
   71|  11.0k|    }
   72|       |
   73|      0|    return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   74|  11.0k|}
tasn_enc.c:asn1_template_ex_i2d:
  215|  13.8M|{
  216|  13.8M|    const int flags = tt->flags;
  217|  13.8M|    int i, ret, ttag, tclass, ndef, len;
  218|  13.8M|    const ASN1_VALUE *tval;
  219|       |
  220|       |    /*
  221|       |     * If field is embedded then val needs fixing so it is a pointer to
  222|       |     * a pointer to a field.
  223|       |     */
  224|  13.8M|    if (flags & ASN1_TFLG_EMBED) {
  ------------------
  |  |  586|  13.8M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  |  Branch (224:9): [True: 99.8k, False: 13.7M]
  ------------------
  225|  99.8k|        tval = (ASN1_VALUE *)pval;
  226|  99.8k|        pval = &tval;
  227|  99.8k|    }
  228|       |    /*
  229|       |     * Work out tag and class to use: tagging may come either from the
  230|       |     * template or the arguments, not both because this would create
  231|       |     * ambiguity. Additionally the iclass argument may contain some
  232|       |     * additional flags which should be noted and passed down to other
  233|       |     * levels.
  234|       |     */
  235|  13.8M|    if (flags & ASN1_TFLG_TAG_MASK) {
  ------------------
  |  |  541|  13.8M|#define ASN1_TFLG_TAG_MASK (0x3 << 3)
  ------------------
  |  Branch (235:9): [True: 0, False: 13.8M]
  ------------------
  236|       |        /* Error if argument and template tagging */
  237|      0|        if (tag != -1)
  ------------------
  |  Branch (237:13): [True: 0, False: 0]
  ------------------
  238|       |            /* FIXME: error code here */
  239|      0|            return -1;
  240|       |        /* Get tagging from template */
  241|      0|        ttag = tt->tag;
  242|      0|        tclass = flags & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|      0|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  243|  13.8M|    } else if (tag != -1) {
  ------------------
  |  Branch (243:16): [True: 0, False: 13.8M]
  ------------------
  244|       |        /* No template tagging, get from arguments */
  245|      0|        ttag = tag;
  246|      0|        tclass = iclass & ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|      0|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  247|  13.8M|    } else {
  248|  13.8M|        ttag = -1;
  249|  13.8M|        tclass = 0;
  250|  13.8M|    }
  251|       |    /*
  252|       |     * Remove any class mask from iflag.
  253|       |     */
  254|  13.8M|    iclass &= ~ASN1_TFLG_TAG_CLASS;
  ------------------
  |  |  564|  13.8M|#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
  ------------------
  255|       |
  256|       |    /*
  257|       |     * At this point 'ttag' contains the outer tag to use, 'tclass' is the
  258|       |     * class and iclass is any flags passed to this function.
  259|       |     */
  260|       |
  261|       |    /* if template and arguments require ndef, use it */
  262|  13.8M|    if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|  13.8M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
                  if ((flags & ASN1_TFLG_NDEF) && (iclass & ASN1_TFLG_NDEF))
  ------------------
  |  |  583|      0|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (262:9): [True: 0, False: 13.8M]
  |  Branch (262:37): [True: 0, False: 0]
  ------------------
  263|      0|        ndef = 2;
  264|  13.8M|    else
  265|  13.8M|        ndef = 1;
  266|       |
  267|  13.8M|    if (flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  13.8M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (267:9): [True: 2.72M, False: 11.1M]
  ------------------
  268|       |        /* SET OF, SEQUENCE OF */
  269|  2.72M|        STACK_OF(const_ASN1_VALUE) *sk = (STACK_OF(const_ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|  2.72M|#define STACK_OF(type) struct stack_st_##type
  ------------------
  270|  2.72M|        int isset, sktag, skaclass;
  271|  2.72M|        int skcontlen, sklen;
  272|  2.72M|        const ASN1_VALUE *skitem;
  273|       |
  274|  2.72M|        if (*pval == NULL)
  ------------------
  |  Branch (274:13): [True: 0, False: 2.72M]
  ------------------
  275|      0|            return 0;
  276|       |
  277|  2.72M|        if (flags & ASN1_TFLG_SET_OF) {
  ------------------
  |  |  515|  2.72M|#define ASN1_TFLG_SET_OF (0x1 << 1)
  ------------------
  |  Branch (277:13): [True: 2.72M, False: 0]
  ------------------
  278|  2.72M|            isset = 1;
  279|       |            /* 2 means we reorder */
  280|  2.72M|            if (flags & ASN1_TFLG_SEQUENCE_OF)
  ------------------
  |  |  518|  2.72M|#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
  ------------------
  |  Branch (280:17): [True: 0, False: 2.72M]
  ------------------
  281|      0|                isset = 2;
  282|  2.72M|        } else
  283|      0|            isset = 0;
  284|       |
  285|       |        /*
  286|       |         * Work out inner tag value: if EXPLICIT or no tagging use underlying
  287|       |         * type.
  288|       |         */
  289|  2.72M|        if ((ttag != -1) && !(flags & ASN1_TFLG_EXPTAG)) {
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (289:13): [True: 0, False: 2.72M]
  |  Branch (289:29): [True: 0, False: 0]
  ------------------
  290|      0|            sktag = ttag;
  291|      0|            skaclass = tclass;
  292|  2.72M|        } else {
  293|  2.72M|            skaclass = V_ASN1_UNIVERSAL;
  ------------------
  |  |   49|  2.72M|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  294|  2.72M|            if (isset)
  ------------------
  |  Branch (294:17): [True: 2.72M, False: 0]
  ------------------
  295|  2.72M|                sktag = V_ASN1_SET;
  ------------------
  |  |   77|  2.72M|#define V_ASN1_SET 17
  ------------------
  296|      0|            else
  297|      0|                sktag = V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  298|  2.72M|        }
  299|       |
  300|       |        /* Determine total length of items */
  301|  2.72M|        skcontlen = 0;
  302|  5.45M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (302:21): [True: 2.72M, False: 2.72M]
  ------------------
  303|  2.72M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  304|  2.72M|            len = ASN1_item_ex_i2d(&skitem, NULL, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  2.72M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  305|  2.72M|                -1, iclass);
  306|  2.72M|            if (len == -1 || (skcontlen > INT_MAX - len))
  ------------------
  |  Branch (306:17): [True: 0, False: 2.72M]
  |  Branch (306:30): [True: 0, False: 2.72M]
  ------------------
  307|      0|                return -1;
  308|  2.72M|            if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (308:17): [True: 0, False: 2.72M]
  |  Branch (308:29): [True: 0, False: 0]
  ------------------
  309|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|                return -1;
  311|      0|            }
  312|  2.72M|            skcontlen += len;
  313|  2.72M|        }
  314|  2.72M|        sklen = ASN1_object_size(ndef, skcontlen, sktag);
  315|  2.72M|        if (sklen == -1)
  ------------------
  |  Branch (315:13): [True: 0, False: 2.72M]
  ------------------
  316|      0|            return -1;
  317|       |        /* If EXPLICIT need length of surrounding tag */
  318|  2.72M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  2.72M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (318:13): [True: 0, False: 2.72M]
  ------------------
  319|      0|            ret = ASN1_object_size(ndef, sklen, ttag);
  320|  2.72M|        else
  321|  2.72M|            ret = sklen;
  322|       |
  323|  2.72M|        if (!out || ret == -1)
  ------------------
  |  Branch (323:13): [True: 1.36M, False: 1.36M]
  |  Branch (323:21): [True: 0, False: 1.36M]
  ------------------
  324|  1.36M|            return ret;
  325|       |
  326|       |        /* Now encode this lot... */
  327|       |        /* EXPLICIT tag */
  328|  1.36M|        if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|  1.36M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (328:13): [True: 0, False: 1.36M]
  ------------------
  329|      0|            ASN1_put_object(out, ndef, sklen, ttag, tclass);
  330|       |        /* SET or SEQUENCE and IMPLICIT tag */
  331|  1.36M|        ASN1_put_object(out, ndef, skcontlen, sktag, skaclass);
  332|       |        /* And the stuff itself */
  333|  1.36M|        asn1_set_seq_out(sk, out, skcontlen, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  1.36M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  334|  1.36M|            isset, iclass);
  335|  1.36M|        if (ndef == 2) {
  ------------------
  |  Branch (335:13): [True: 0, False: 1.36M]
  ------------------
  336|      0|            ASN1_put_eoc(out);
  337|      0|            if (flags & ASN1_TFLG_EXPTAG)
  ------------------
  |  |  539|      0|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (337:17): [True: 0, False: 0]
  ------------------
  338|      0|                ASN1_put_eoc(out);
  339|      0|        }
  340|       |
  341|  1.36M|        return ret;
  342|  2.72M|    }
  343|       |
  344|  11.1M|    if (flags & ASN1_TFLG_EXPTAG) {
  ------------------
  |  |  539|  11.1M|#define ASN1_TFLG_EXPTAG (0x2 << 3)
  ------------------
  |  Branch (344:9): [True: 0, False: 11.1M]
  ------------------
  345|       |        /* EXPLICIT tagging */
  346|       |        /* Find length of tagged item */
  347|      0|        i = ASN1_item_ex_i2d(pval, NULL, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  348|      0|        if (i == 0) {
  ------------------
  |  Branch (348:13): [True: 0, False: 0]
  ------------------
  349|      0|            if ((tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|      0|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|                return -1;
  352|      0|            }
  353|      0|            return 0;
  354|      0|        }
  355|       |        /* Find length of EXPLICIT tag */
  356|      0|        ret = ASN1_object_size(ndef, i, ttag);
  357|      0|        if (out && ret != -1) {
  ------------------
  |  Branch (357:13): [True: 0, False: 0]
  |  Branch (357:20): [True: 0, False: 0]
  ------------------
  358|       |            /* Output tag and item */
  359|      0|            ASN1_put_object(out, ndef, i, ttag, tclass);
  360|      0|            ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item), -1, iclass);
  ------------------
  |  |  428|      0|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  361|      0|            if (ndef == 2)
  ------------------
  |  Branch (361:17): [True: 0, False: 0]
  ------------------
  362|      0|                ASN1_put_eoc(out);
  363|      0|        }
  364|      0|        return ret;
  365|      0|    }
  366|       |
  367|       |    /* Either normal or IMPLICIT tagging: combine class and flags */
  368|  11.1M|    len = ASN1_item_ex_i2d(pval, out, ASN1_ITEM_ptr(tt->item),
  ------------------
  |  |  428|  11.1M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  369|  11.1M|        ttag, tclass | iclass);
  370|  11.1M|    if (len == 0 && (tt->flags & ASN1_TFLG_OPTIONAL) == 0) {
  ------------------
  |  |  512|  12.1k|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (370:9): [True: 12.1k, False: 11.0M]
  |  Branch (370:21): [True: 0, False: 12.1k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_ILLEGAL_ZERO_CONTENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        return -1;
  373|      0|    }
  374|  11.1M|    return len;
  375|  11.1M|}
tasn_enc.c:asn1_set_seq_out:
  402|  1.36M|{
  403|  1.36M|    int i, ret = 0;
  404|  1.36M|    const ASN1_VALUE *skitem;
  405|  1.36M|    unsigned char *tmpdat = NULL, *p = NULL;
  406|  1.36M|    DER_ENC *derlst = NULL, *tder;
  407|       |
  408|  1.36M|    if (do_sort) {
  ------------------
  |  Branch (408:9): [True: 1.36M, False: 0]
  ------------------
  409|       |        /* Don't need to sort less than 2 items */
  410|  1.36M|        if (sk_const_ASN1_VALUE_num(sk) < 2)
  ------------------
  |  Branch (410:13): [True: 1.36M, False: 0]
  ------------------
  411|  1.36M|            do_sort = 0;
  412|      0|        else {
  413|      0|            derlst = OPENSSL_malloc(sk_const_ASN1_VALUE_num(sk)
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  414|      0|                * sizeof(*derlst));
  415|      0|            if (derlst == NULL)
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                return 0;
  417|      0|            tmpdat = OPENSSL_malloc(skcontlen);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  418|      0|            if (tmpdat == NULL)
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|                goto err;
  420|      0|        }
  421|  1.36M|    }
  422|       |    /* If not sorting just output each item */
  423|  1.36M|    if (!do_sort) {
  ------------------
  |  Branch (423:9): [True: 1.36M, False: 0]
  ------------------
  424|  2.72M|        for (i = 0; i < sk_const_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  Branch (424:21): [True: 1.36M, False: 1.36M]
  ------------------
  425|  1.36M|            skitem = sk_const_ASN1_VALUE_value(sk, i);
  426|  1.36M|            ASN1_item_ex_i2d(&skitem, out, item, -1, iclass);
  427|  1.36M|        }
  428|  1.36M|        return 1;
  429|  1.36M|    }
  430|      0|    p = tmpdat;
  431|       |
  432|       |    /* Doing sort: build up a list of each member's DER encoding */
  433|      0|    for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++) {
  ------------------
  |  Branch (433:32): [True: 0, False: 0]
  ------------------
  434|      0|        skitem = sk_const_ASN1_VALUE_value(sk, i);
  435|      0|        tder->data = p;
  436|      0|        tder->length = ASN1_item_ex_i2d(&skitem, &p, item, -1, iclass);
  437|      0|        tder->field = skitem;
  438|      0|    }
  439|       |
  440|       |    /* Now sort them */
  441|      0|    qsort(derlst, sk_const_ASN1_VALUE_num(sk), sizeof(*derlst), der_cmp);
  442|       |    /* Output sorted DER encoding */
  443|      0|    p = *out;
  444|      0|    for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++) {
  ------------------
  |  Branch (444:32): [True: 0, False: 0]
  ------------------
  445|      0|        memcpy(p, tder->data, tder->length);
  446|      0|        p += tder->length;
  447|      0|    }
  448|      0|    *out = p;
  449|       |    /* If do_sort is 2 then reorder the STACK */
  450|      0|    if (do_sort == 2) {
  ------------------
  |  Branch (450:9): [True: 0, False: 0]
  ------------------
  451|      0|        for (i = 0, tder = derlst; i < sk_const_ASN1_VALUE_num(sk); i++, tder++)
  ------------------
  |  Branch (451:36): [True: 0, False: 0]
  ------------------
  452|      0|            (void)sk_const_ASN1_VALUE_set(sk, i, tder->field);
  453|      0|    }
  454|      0|    ret = 1;
  455|      0|err:
  456|      0|    OPENSSL_free(derlst);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  457|      0|    OPENSSL_free(tmpdat);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  458|      0|    return ret;
  459|      0|}
tasn_enc.c:asn1_i2d_ex_primitive:
  463|  11.0M|{
  464|  11.0M|    int len;
  465|  11.0M|    int utype;
  466|  11.0M|    int usetag;
  467|  11.0M|    int ndef = 0;
  468|       |
  469|  11.0M|    utype = it->utype;
  470|       |
  471|       |    /*
  472|       |     * Get length of content octets and maybe find out the underlying type.
  473|       |     */
  474|       |
  475|  11.0M|    len = asn1_ex_i2c(pval, NULL, &utype, it);
  476|       |
  477|       |    /*
  478|       |     * If SEQUENCE, SET or OTHER then header is included in pseudo content
  479|       |     * octets so don't include tag+length. We need to check here because the
  480|       |     * call to asn1_ex_i2c() could change utype.
  481|       |     */
  482|  11.0M|    if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   76|  11.0M|#define V_ASN1_SEQUENCE 16
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   77|  11.0M|#define V_ASN1_SET 17
  ------------------
                  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER))
  ------------------
  |  |   59|  11.0M|#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
  ------------------
  |  Branch (482:9): [True: 0, False: 11.0M]
  |  Branch (482:39): [True: 0, False: 11.0M]
  |  Branch (482:64): [True: 0, False: 11.0M]
  ------------------
  483|      0|        usetag = 0;
  484|  11.0M|    else
  485|  11.0M|        usetag = 1;
  486|       |
  487|       |    /* -1 means omit type */
  488|       |
  489|  11.0M|    if (len == -1)
  ------------------
  |  Branch (489:9): [True: 12.1k, False: 11.0M]
  ------------------
  490|  12.1k|        return 0;
  491|       |
  492|       |    /* -2 return is special meaning use ndef */
  493|  11.0M|    if (len == -2) {
  ------------------
  |  Branch (493:9): [True: 0, False: 11.0M]
  ------------------
  494|      0|        ndef = 2;
  495|      0|        len = 0;
  496|      0|    }
  497|       |
  498|       |    /* If not implicitly tagged get tag from underlying type */
  499|  11.0M|    if (tag == -1)
  ------------------
  |  Branch (499:9): [True: 11.0M, False: 0]
  ------------------
  500|  11.0M|        tag = utype;
  501|       |
  502|       |    /* Output tag+length followed by content octets */
  503|  11.0M|    if (out) {
  ------------------
  |  Branch (503:9): [True: 2.75M, False: 8.26M]
  ------------------
  504|  2.75M|        if (usetag)
  ------------------
  |  Branch (504:13): [True: 2.75M, False: 0]
  ------------------
  505|  2.75M|            ASN1_put_object(out, ndef, len, tag, aclass);
  506|  2.75M|        asn1_ex_i2c(pval, *out, &utype, it);
  507|  2.75M|        if (ndef)
  ------------------
  |  Branch (507:13): [True: 0, False: 2.75M]
  ------------------
  508|      0|            ASN1_put_eoc(out);
  509|  2.75M|        else
  510|  2.75M|            *out += len;
  511|  2.75M|    }
  512|       |
  513|  11.0M|    if (usetag)
  ------------------
  |  Branch (513:9): [True: 11.0M, False: 0]
  ------------------
  514|  11.0M|        return ASN1_object_size(ndef, len, tag);
  515|      0|    return len;
  516|  11.0M|}
tasn_enc.c:asn1_ex_i2c:
  522|  13.7M|{
  523|  13.7M|    ASN1_BOOLEAN *tbool = NULL;
  524|  13.7M|    ASN1_STRING *strtmp;
  525|  13.7M|    ASN1_OBJECT *otmp;
  526|  13.7M|    int utype;
  527|  13.7M|    const unsigned char *cont;
  528|  13.7M|    unsigned char c;
  529|  13.7M|    int len;
  530|  13.7M|    const ASN1_PRIMITIVE_FUNCS *pf;
  531|  13.7M|    pf = it->funcs;
  532|  13.7M|    if (pf && pf->prim_i2c)
  ------------------
  |  Branch (532:9): [True: 0, False: 13.7M]
  |  Branch (532:15): [True: 0, False: 0]
  ------------------
  533|      0|        return pf->prim_i2c(pval, cout, putype, it);
  534|       |
  535|       |    /* Should type be omitted? */
  536|  13.7M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE)
  ------------------
  |  |   82|  13.7M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (536:9): [True: 6.82M, False: 6.97M]
  ------------------
  537|  13.7M|        || (it->utype != V_ASN1_BOOLEAN)) {
  ------------------
  |  |   65|  6.97M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (537:12): [True: 6.97M, False: 0]
  ------------------
  538|  13.7M|        if (*pval == NULL)
  ------------------
  |  Branch (538:13): [True: 12.1k, False: 13.7M]
  ------------------
  539|  12.1k|            return -1;
  540|  13.7M|    }
  541|       |
  542|  13.7M|    if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  13.7M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (542:9): [True: 6.82M, False: 6.96M]
  ------------------
  543|       |        /* If MSTRING type set the underlying type */
  544|  6.82M|        strtmp = (ASN1_STRING *)*pval;
  545|  6.82M|        utype = strtmp->type;
  546|  6.82M|        *putype = utype;
  547|  6.96M|    } else if (it->utype == V_ASN1_ANY) {
  ------------------
  |  |   60|  6.96M|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (547:16): [True: 40.2k, False: 6.92M]
  ------------------
  548|       |        /* If ANY set type and pointer to value */
  549|  40.2k|        ASN1_TYPE *typ;
  550|  40.2k|        typ = (ASN1_TYPE *)*pval;
  551|  40.2k|        utype = typ->type;
  552|  40.2k|        *putype = utype;
  553|  40.2k|        pval = (const ASN1_VALUE **)&typ->value.asn1_value; /* actually is const */
  554|  40.2k|    } else
  555|  6.92M|        utype = *putype;
  556|       |
  557|  13.7M|    switch (utype) {
  558|  6.87M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  6.87M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (558:5): [True: 6.87M, False: 6.90M]
  ------------------
  559|  6.87M|        otmp = (ASN1_OBJECT *)*pval;
  560|  6.87M|        cont = otmp->data;
  561|  6.87M|        len = otmp->length;
  562|  6.87M|        if (cont == NULL || len == 0)
  ------------------
  |  Branch (562:13): [True: 0, False: 6.87M]
  |  Branch (562:29): [True: 0, False: 6.87M]
  ------------------
  563|      0|            return -1;
  564|  6.87M|        break;
  565|       |
  566|  6.87M|    case V_ASN1_UNDEF:
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (566:5): [True: 0, False: 13.7M]
  ------------------
  567|      0|        return -2;
  568|       |
  569|  40.2k|    case V_ASN1_NULL:
  ------------------
  |  |   69|  40.2k|#define V_ASN1_NULL 5
  ------------------
  |  Branch (569:5): [True: 40.2k, False: 13.7M]
  ------------------
  570|  40.2k|        cont = NULL;
  571|  40.2k|        len = 0;
  572|  40.2k|        break;
  573|       |
  574|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (574:5): [True: 0, False: 13.7M]
  ------------------
  575|      0|        tbool = (ASN1_BOOLEAN *)pval;
  576|      0|        if (*tbool == -1)
  ------------------
  |  Branch (576:13): [True: 0, False: 0]
  ------------------
  577|      0|            return -1;
  578|      0|        if (it->utype != V_ASN1_ANY) {
  ------------------
  |  |   60|      0|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (578:13): [True: 0, False: 0]
  ------------------
  579|       |            /*
  580|       |             * Default handling if value == size field then omit
  581|       |             */
  582|      0|            if (*tbool && (it->size > 0))
  ------------------
  |  Branch (582:17): [True: 0, False: 0]
  |  Branch (582:27): [True: 0, False: 0]
  ------------------
  583|      0|                return -1;
  584|      0|            if (!*tbool && !it->size)
  ------------------
  |  Branch (584:17): [True: 0, False: 0]
  |  Branch (584:28): [True: 0, False: 0]
  ------------------
  585|      0|                return -1;
  586|      0|        }
  587|      0|        c = (unsigned char)*tbool;
  588|      0|        cont = &c;
  589|      0|        len = 1;
  590|      0|        break;
  591|       |
  592|  44.3k|    case V_ASN1_BIT_STRING:
  ------------------
  |  |   67|  44.3k|#define V_ASN1_BIT_STRING 3
  ------------------
  |  Branch (592:5): [True: 44.3k, False: 13.7M]
  ------------------
  593|  44.3k|        return ossl_i2c_ASN1_BIT_STRING((ASN1_BIT_STRING *)*pval,
  594|  44.3k|            cout ? &cout : NULL);
  ------------------
  |  Branch (594:13): [True: 11.0k, False: 33.2k]
  ------------------
  595|       |
  596|      0|    case V_ASN1_INTEGER:
  ------------------
  |  |   66|      0|#define V_ASN1_INTEGER 2
  ------------------
  |  Branch (596:5): [True: 0, False: 13.7M]
  ------------------
  597|      0|    case V_ASN1_ENUMERATED:
  ------------------
  |  |   74|      0|#define V_ASN1_ENUMERATED 10
  ------------------
  |  Branch (597:5): [True: 0, False: 13.7M]
  ------------------
  598|       |        /*
  599|       |         * These are all have the same content format as ASN1_INTEGER
  600|       |         */
  601|      0|        return ossl_i2c_ASN1_INTEGER((ASN1_INTEGER *)*pval, cout ? &cout : NULL);
  ------------------
  |  Branch (601:61): [True: 0, False: 0]
  ------------------
  602|       |
  603|      0|    case V_ASN1_OCTET_STRING:
  ------------------
  |  |   68|      0|#define V_ASN1_OCTET_STRING 4
  ------------------
  |  Branch (603:5): [True: 0, False: 13.7M]
  ------------------
  604|      0|    case V_ASN1_NUMERICSTRING:
  ------------------
  |  |   78|      0|#define V_ASN1_NUMERICSTRING 18
  ------------------
  |  Branch (604:5): [True: 0, False: 13.7M]
  ------------------
  605|      0|    case V_ASN1_PRINTABLESTRING:
  ------------------
  |  |   79|      0|#define V_ASN1_PRINTABLESTRING 19
  ------------------
  |  Branch (605:5): [True: 0, False: 13.7M]
  ------------------
  606|      0|    case V_ASN1_T61STRING:
  ------------------
  |  |   80|      0|#define V_ASN1_T61STRING 20
  ------------------
  |  Branch (606:5): [True: 0, False: 13.7M]
  ------------------
  607|      0|    case V_ASN1_VIDEOTEXSTRING:
  ------------------
  |  |   82|      0|#define V_ASN1_VIDEOTEXSTRING 21
  ------------------
  |  Branch (607:5): [True: 0, False: 13.7M]
  ------------------
  608|      0|    case V_ASN1_IA5STRING:
  ------------------
  |  |   83|      0|#define V_ASN1_IA5STRING 22
  ------------------
  |  Branch (608:5): [True: 0, False: 13.7M]
  ------------------
  609|      0|    case V_ASN1_UTCTIME:
  ------------------
  |  |   84|      0|#define V_ASN1_UTCTIME 23
  ------------------
  |  Branch (609:5): [True: 0, False: 13.7M]
  ------------------
  610|      0|    case V_ASN1_GENERALIZEDTIME:
  ------------------
  |  |   85|      0|#define V_ASN1_GENERALIZEDTIME 24
  ------------------
  |  Branch (610:5): [True: 0, False: 13.7M]
  ------------------
  611|      0|    case V_ASN1_GRAPHICSTRING:
  ------------------
  |  |   86|      0|#define V_ASN1_GRAPHICSTRING 25
  ------------------
  |  Branch (611:5): [True: 0, False: 13.7M]
  ------------------
  612|      0|    case V_ASN1_VISIBLESTRING:
  ------------------
  |  |   88|      0|#define V_ASN1_VISIBLESTRING 26 /* alias */
  ------------------
  |  Branch (612:5): [True: 0, False: 13.7M]
  ------------------
  613|      0|    case V_ASN1_GENERALSTRING:
  ------------------
  |  |   89|      0|#define V_ASN1_GENERALSTRING 27
  ------------------
  |  Branch (613:5): [True: 0, False: 13.7M]
  ------------------
  614|      0|    case V_ASN1_UNIVERSALSTRING:
  ------------------
  |  |   90|      0|#define V_ASN1_UNIVERSALSTRING 28
  ------------------
  |  Branch (614:5): [True: 0, False: 13.7M]
  ------------------
  615|      0|    case V_ASN1_BMPSTRING:
  ------------------
  |  |   91|      0|#define V_ASN1_BMPSTRING 30
  ------------------
  |  Branch (615:5): [True: 0, False: 13.7M]
  ------------------
  616|  6.82M|    case V_ASN1_UTF8STRING:
  ------------------
  |  |   75|  6.82M|#define V_ASN1_UTF8STRING 12
  ------------------
  |  Branch (616:5): [True: 6.82M, False: 6.96M]
  ------------------
  617|  6.82M|    case V_ASN1_SEQUENCE:
  ------------------
  |  |   76|  6.82M|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (617:5): [True: 0, False: 13.7M]
  ------------------
  618|  6.82M|    case V_ASN1_SET:
  ------------------
  |  |   77|  6.82M|#define V_ASN1_SET 17
  ------------------
  |  Branch (618:5): [True: 0, False: 13.7M]
  ------------------
  619|  6.82M|    default:
  ------------------
  |  Branch (619:5): [True: 0, False: 13.7M]
  ------------------
  620|       |        /* All based on ASN1_STRING and handled the same */
  621|  6.82M|        strtmp = (ASN1_STRING *)*pval;
  622|       |        /* Special handling for NDEF */
  623|  6.82M|        if ((it->size == ASN1_TFLG_NDEF)
  ------------------
  |  |  583|  6.82M|#define ASN1_TFLG_NDEF (0x1 << 11)
  ------------------
  |  Branch (623:13): [True: 0, False: 6.82M]
  ------------------
  624|      0|            && (strtmp->flags & ASN1_STRING_FLAG_NDEF)) {
  ------------------
  |  |  170|      0|#define ASN1_STRING_FLAG_NDEF 0x010
  ------------------
  |  Branch (624:16): [True: 0, False: 0]
  ------------------
  625|      0|            if (cout) {
  ------------------
  |  Branch (625:17): [True: 0, False: 0]
  ------------------
  626|      0|                strtmp->data = cout;
  627|      0|                strtmp->length = 0;
  628|      0|            }
  629|       |            /* Special return code */
  630|      0|            return -2;
  631|      0|        }
  632|  6.82M|        cont = strtmp->data;
  633|  6.82M|        len = strtmp->length;
  634|       |
  635|  6.82M|        break;
  636|  13.7M|    }
  637|  13.7M|    if (cout && len)
  ------------------
  |  Branch (637:9): [True: 2.74M, False: 10.9M]
  |  Branch (637:17): [True: 2.74M, False: 8.05k]
  ------------------
  638|  2.74M|        memcpy(cout, cont, len);
  639|  13.7M|    return len;
  640|  13.7M|}

ASN1_item_free:
   19|  7.31M|{
   20|  7.31M|    ossl_asn1_item_embed_free(&val, it, 0);
   21|  7.31M|}
ossl_asn1_item_embed_free:
   29|  21.1M|{
   30|  21.1M|    const ASN1_TEMPLATE *tt = NULL, *seqtt;
   31|  21.1M|    const ASN1_EXTERN_FUNCS *ef;
   32|  21.1M|    const ASN1_AUX *aux = it->funcs;
   33|  21.1M|    ASN1_aux_cb *asn1_cb;
   34|  21.1M|    int i;
   35|       |
   36|  21.1M|    if (pval == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 21.1M]
  ------------------
   37|      0|        return;
   38|  21.1M|    if ((it->itype != ASN1_ITYPE_PRIMITIVE) && *pval == NULL)
  ------------------
  |  |   82|  21.1M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (38:9): [True: 11.8M, False: 9.33M]
  |  Branch (38:48): [True: 2.66M, False: 9.18M]
  ------------------
   39|  2.66M|        return;
   40|  18.5M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (40:9): [True: 1.33M, False: 17.1M]
  |  Branch (40:16): [True: 382k, False: 953k]
  ------------------
   41|   382k|        asn1_cb = aux->asn1_cb;
   42|  18.1M|    else
   43|  18.1M|        asn1_cb = 0;
   44|       |
   45|  18.5M|    switch (it->itype) {
  ------------------
  |  Branch (45:13): [True: 18.5M, False: 0]
  ------------------
   46|       |
   47|  9.33M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  9.33M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (47:5): [True: 9.33M, False: 9.18M]
  ------------------
   48|  9.33M|        if (it->templates)
  ------------------
  |  Branch (48:13): [True: 762k, False: 8.57M]
  ------------------
   49|   762k|            ossl_asn1_template_free(pval, it->templates);
   50|  8.57M|        else
   51|  8.57M|            ossl_asn1_primitive_free(pval, it, embed);
   52|  9.33M|        break;
   53|       |
   54|  3.11M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  3.11M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (54:5): [True: 3.11M, False: 15.4M]
  ------------------
   55|  3.11M|        ossl_asn1_primitive_free(pval, it, embed);
   56|  3.11M|        break;
   57|       |
   58|  3.26k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  3.26k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (58:5): [True: 3.26k, False: 18.5M]
  ------------------
   59|  3.26k|        if (asn1_cb) {
  ------------------
  |  Branch (59:13): [True: 1.29k, False: 1.97k]
  ------------------
   60|  1.29k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|  1.29k|#define ASN1_OP_FREE_PRE 2
  ------------------
   61|  1.29k|            if (i == 2)
  ------------------
  |  Branch (61:17): [True: 0, False: 1.29k]
  ------------------
   62|      0|                return;
   63|  1.29k|        }
   64|  3.26k|        i = ossl_asn1_get_choice_selector(pval, it);
   65|  3.26k|        if ((i >= 0) && (i < it->tcount)) {
  ------------------
  |  Branch (65:13): [True: 3.26k, False: 0]
  |  Branch (65:25): [True: 3.26k, False: 0]
  ------------------
   66|  3.26k|            ASN1_VALUE **pchval;
   67|       |
   68|  3.26k|            tt = it->templates + i;
   69|  3.26k|            pchval = ossl_asn1_get_field_ptr(pval, tt);
   70|  3.26k|            ossl_asn1_template_free(pchval, tt);
   71|  3.26k|        }
   72|  3.26k|        if (asn1_cb)
  ------------------
  |  Branch (72:13): [True: 1.29k, False: 1.97k]
  ------------------
   73|  1.29k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|  1.29k|#define ASN1_OP_FREE_POST 3
  ------------------
   74|  3.26k|        if (embed == 0) {
  ------------------
  |  Branch (74:13): [True: 3.26k, False: 0]
  ------------------
   75|  3.26k|            OPENSSL_free(*pval);
  ------------------
  |  |  131|  3.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|  3.26k|            *pval = NULL;
   77|  3.26k|        }
   78|  3.26k|        break;
   79|       |
   80|   763k|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|   763k|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (80:5): [True: 763k, False: 17.7M]
  ------------------
   81|   763k|        ef = it->funcs;
   82|   763k|        if (ef && ef->asn1_ex_free)
  ------------------
  |  Branch (82:13): [True: 763k, False: 0]
  |  Branch (82:19): [True: 763k, False: 0]
  ------------------
   83|   763k|            ef->asn1_ex_free(pval, it);
   84|   763k|        break;
   85|       |
   86|      0|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (86:5): [True: 0, False: 18.5M]
  ------------------
   87|  5.30M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  5.30M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (87:5): [True: 5.30M, False: 13.2M]
  ------------------
   88|  5.30M|        if (ossl_asn1_do_lock(pval, -1, it) != 0) {
  ------------------
  |  Branch (88:13): [True: 190k, False: 5.11M]
  ------------------
   89|       |            /* if error or ref-counter > 0 */
   90|   190k|            OPENSSL_assert(embed == 0);
  ------------------
  |  |  476|   190k|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:12): [True: 190k, False: 0]
  |  |  ------------------
  ------------------
   91|   190k|            *pval = NULL;
   92|   190k|            return;
   93|   190k|        }
   94|  5.11M|        if (asn1_cb) {
  ------------------
  |  Branch (94:13): [True: 190k, False: 4.92M]
  ------------------
   95|   190k|            i = asn1_cb(ASN1_OP_FREE_PRE, pval, it, NULL);
  ------------------
  |  |  733|   190k|#define ASN1_OP_FREE_PRE 2
  ------------------
   96|   190k|            if (i == 2)
  ------------------
  |  Branch (96:17): [True: 0, False: 190k]
  ------------------
   97|      0|                return;
   98|   190k|        }
   99|  5.11M|        ossl_asn1_enc_free(pval, it);
  100|       |        /*
  101|       |         * If we free up as normal we will invalidate any ANY DEFINED BY
  102|       |         * field and we won't be able to determine the type of the field it
  103|       |         * defines. So free up in reverse order.
  104|       |         */
  105|  5.11M|        tt = it->templates + it->tcount;
  106|  17.7M|        for (i = 0; i < it->tcount; i++) {
  ------------------
  |  Branch (106:21): [True: 12.6M, False: 5.11M]
  ------------------
  107|  12.6M|            ASN1_VALUE **pseqval;
  108|       |
  109|  12.6M|            tt--;
  110|  12.6M|            seqtt = ossl_asn1_do_adb(*pval, tt, 0);
  111|  12.6M|            if (!seqtt)
  ------------------
  |  Branch (111:17): [True: 0, False: 12.6M]
  ------------------
  112|      0|                continue;
  113|  12.6M|            pseqval = ossl_asn1_get_field_ptr(pval, seqtt);
  114|  12.6M|            ossl_asn1_template_free(pseqval, seqtt);
  115|  12.6M|        }
  116|  5.11M|        if (asn1_cb)
  ------------------
  |  Branch (116:13): [True: 190k, False: 4.92M]
  ------------------
  117|   190k|            asn1_cb(ASN1_OP_FREE_POST, pval, it, NULL);
  ------------------
  |  |  734|   190k|#define ASN1_OP_FREE_POST 3
  ------------------
  118|  5.11M|        if (embed == 0) {
  ------------------
  |  Branch (118:13): [True: 4.35M, False: 762k]
  ------------------
  119|  4.35M|            OPENSSL_free(*pval);
  ------------------
  |  |  131|  4.35M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|       |            *pval = NULL;
  121|  4.35M|        }
  122|  5.11M|        break;
  123|  18.5M|    }
  124|  18.5M|}
ossl_asn1_template_free:
  127|  14.1M|{
  128|  14.1M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  14.1M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  129|  14.1M|    ASN1_VALUE *tval;
  130|  14.1M|    if (embed) {
  ------------------
  |  Branch (130:9): [True: 1.80M, False: 12.3M]
  ------------------
  131|  1.80M|        tval = (ASN1_VALUE *)pval;
  132|  1.80M|        pval = &tval;
  133|  1.80M|    }
  134|  14.1M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  14.1M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (134:9): [True: 961k, False: 13.2M]
  ------------------
  135|   961k|        STACK_OF(ASN1_VALUE) *sk = (STACK_OF(ASN1_VALUE) *)*pval;
  ------------------
  |  |   33|   961k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  136|   961k|        int i;
  137|       |
  138|  1.62M|        for (i = 0; i < sk_ASN1_VALUE_num(sk); i++) {
  ------------------
  |  |  887|  1.62M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (138:21): [True: 660k, False: 961k]
  ------------------
  139|   660k|            ASN1_VALUE *vtmp = sk_ASN1_VALUE_value(sk, i);
  ------------------
  |  |  888|   660k|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  140|       |
  141|   660k|            ossl_asn1_item_embed_free(&vtmp, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  428|   660k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  142|   660k|        }
  143|   961k|        sk_ASN1_VALUE_free(sk);
  ------------------
  |  |  893|   961k|#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
  ------------------
  144|   961k|        *pval = NULL;
  145|  13.2M|    } else {
  146|  13.2M|        ossl_asn1_item_embed_free(pval, ASN1_ITEM_ptr(tt->item), embed);
  ------------------
  |  |  428|  13.2M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  147|  13.2M|    }
  148|  14.1M|}
ossl_asn1_primitive_free:
  151|  12.5M|{
  152|  12.5M|    int utype;
  153|       |
  154|       |    /* Special case: if 'it' is a primitive with a free_func, use that. */
  155|  12.5M|    if (it) {
  ------------------
  |  Branch (155:9): [True: 11.6M, False: 848k]
  ------------------
  156|  11.6M|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  157|       |
  158|  11.6M|        if (embed) {
  ------------------
  |  Branch (158:13): [True: 1.03M, False: 10.6M]
  ------------------
  159|  1.03M|            if (pf && pf->prim_clear) {
  ------------------
  |  Branch (159:17): [True: 0, False: 1.03M]
  |  Branch (159:23): [True: 0, False: 0]
  ------------------
  160|      0|                pf->prim_clear(pval, it);
  161|      0|                return;
  162|      0|            }
  163|  10.6M|        } else if (pf && pf->prim_free) {
  ------------------
  |  Branch (163:20): [True: 0, False: 10.6M]
  |  Branch (163:26): [True: 0, False: 0]
  ------------------
  164|      0|            pf->prim_free(pval, it);
  165|      0|            return;
  166|      0|        }
  167|  11.6M|    }
  168|       |
  169|       |    /* Special case: if 'it' is NULL, free contents of ASN1_TYPE */
  170|  12.5M|    if (!it) {
  ------------------
  |  Branch (170:9): [True: 848k, False: 11.6M]
  ------------------
  171|   848k|        ASN1_TYPE *typ = (ASN1_TYPE *)*pval;
  172|       |
  173|   848k|        utype = typ->type;
  174|   848k|        pval = &typ->value.asn1_value;
  175|   848k|        if (*pval == NULL)
  ------------------
  |  Branch (175:13): [True: 692k, False: 156k]
  ------------------
  176|   692k|            return;
  177|  11.6M|    } else if (it->itype == ASN1_ITYPE_MSTRING) {
  ------------------
  |  |   87|  11.6M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (177:16): [True: 3.11M, False: 8.57M]
  ------------------
  178|  3.11M|        utype = -1;
  179|  3.11M|        if (*pval == NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 3.11M]
  ------------------
  180|      0|            return;
  181|  8.57M|    } else {
  182|  8.57M|        utype = it->utype;
  183|  8.57M|        if ((utype != V_ASN1_BOOLEAN) && *pval == NULL)
  ------------------
  |  |   65|  8.57M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (183:13): [True: 7.61M, False: 961k]
  |  Branch (183:42): [True: 1.00M, False: 6.61M]
  ------------------
  184|  1.00M|            return;
  185|  8.57M|    }
  186|       |
  187|  10.8M|    switch (utype) {
  188|  4.49M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  4.49M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (188:5): [True: 4.49M, False: 6.34M]
  ------------------
  189|  4.49M|        ASN1_OBJECT_free((ASN1_OBJECT *)*pval);
  190|  4.49M|        break;
  191|       |
  192|   961k|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|   961k|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (192:5): [True: 961k, False: 9.88M]
  ------------------
  193|   961k|        if (it)
  ------------------
  |  Branch (193:13): [True: 961k, False: 0]
  ------------------
  194|   961k|            *(ASN1_BOOLEAN *)pval = it->size;
  195|      0|        else
  196|      0|            *(ASN1_BOOLEAN *)pval = -1;
  197|   961k|        return;
  198|       |
  199|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (199:5): [True: 0, False: 10.8M]
  ------------------
  200|      0|        break;
  201|       |
  202|   848k|    case V_ASN1_ANY:
  ------------------
  |  |   60|   848k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (202:5): [True: 848k, False: 9.99M]
  ------------------
  203|   848k|        ossl_asn1_primitive_free(pval, NULL, 0);
  204|   848k|        OPENSSL_free(*pval);
  ------------------
  |  |  131|   848k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|   848k|        break;
  206|       |
  207|  4.53M|    default:
  ------------------
  |  Branch (207:5): [True: 4.53M, False: 6.30M]
  ------------------
  208|  4.53M|        ossl_asn1_string_embed_free((ASN1_STRING *)*pval, embed);
  209|  4.53M|        break;
  210|  10.8M|    }
  211|  9.88M|    *pval = NULL;
  212|  9.88M|}

ASN1_item_new:
   30|  2.59M|{
   31|  2.59M|    ASN1_VALUE *ret = NULL;
   32|  2.59M|    if (ASN1_item_ex_new(&ret, it) > 0)
  ------------------
  |  Branch (32:9): [True: 2.59M, False: 0]
  ------------------
   33|  2.59M|        return ret;
   34|      0|    return NULL;
   35|  2.59M|}
ASN1_item_new_ex:
   39|   190k|{
   40|   190k|    ASN1_VALUE *ret = NULL;
   41|   190k|    if (asn1_item_embed_new(&ret, it, 0, libctx, propq) > 0)
  ------------------
  |  Branch (41:9): [True: 190k, False: 0]
  ------------------
   42|   190k|        return ret;
   43|      0|    return NULL;
   44|   190k|}
ossl_asn1_item_ex_new_intern:
   50|  2.36M|{
   51|  2.36M|    return asn1_item_embed_new(pval, it, 0, libctx, propq);
   52|  2.36M|}
ASN1_item_ex_new:
   55|  2.59M|{
   56|  2.59M|    return asn1_item_embed_new(pval, it, 0, NULL, NULL);
   57|  2.59M|}
tasn_new.c:asn1_item_embed_new:
   61|  14.9M|{
   62|  14.9M|    const ASN1_TEMPLATE *tt = NULL;
   63|  14.9M|    const ASN1_EXTERN_FUNCS *ef;
   64|  14.9M|    const ASN1_AUX *aux = it->funcs;
   65|  14.9M|    ASN1_aux_cb *asn1_cb;
   66|  14.9M|    ASN1_VALUE **pseqval;
   67|  14.9M|    int i;
   68|  14.9M|    if (aux && aux->asn1_cb)
  ------------------
  |  Branch (68:9): [True: 1.09M, False: 13.8M]
  |  Branch (68:16): [True: 330k, False: 762k]
  ------------------
   69|   330k|        asn1_cb = aux->asn1_cb;
   70|  14.6M|    else
   71|  14.6M|        asn1_cb = 0;
   72|       |
   73|  14.9M|    switch (it->itype) {
  ------------------
  |  Branch (73:13): [True: 14.9M, False: 0]
  ------------------
   74|       |
   75|   572k|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|   572k|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (75:5): [True: 572k, False: 14.4M]
  ------------------
   76|   572k|        ef = it->funcs;
   77|   572k|        if (ef != NULL) {
  ------------------
  |  Branch (77:13): [True: 572k, False: 0]
  ------------------
   78|   572k|            if (ef->asn1_ex_new_ex != NULL) {
  ------------------
  |  Branch (78:17): [True: 190k, False: 381k]
  ------------------
   79|   190k|                if (!ef->asn1_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (79:21): [True: 0, False: 190k]
  ------------------
   80|      0|                    goto asn1err;
   81|   381k|            } else if (ef->asn1_ex_new != NULL) {
  ------------------
  |  Branch (81:24): [True: 381k, False: 0]
  ------------------
   82|   381k|                if (!ef->asn1_ex_new(pval, it))
  ------------------
  |  Branch (82:21): [True: 0, False: 381k]
  ------------------
   83|      0|                    goto asn1err;
   84|   381k|            }
   85|   572k|        }
   86|   572k|        break;
   87|       |
   88|  6.22M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  6.22M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (88:5): [True: 6.22M, False: 8.75M]
  ------------------
   89|  6.22M|        if (it->templates) {
  ------------------
  |  Branch (89:13): [True: 0, False: 6.22M]
  ------------------
   90|      0|            if (!asn1_template_new(pval, it->templates, libctx, propq))
  ------------------
  |  Branch (90:17): [True: 0, False: 0]
  ------------------
   91|      0|                goto asn1err;
   92|  6.22M|        } else if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (92:20): [True: 0, False: 6.22M]
  ------------------
   93|      0|            goto asn1err;
   94|  6.22M|        break;
   95|       |
   96|  6.22M|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|  3.11M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (96:5): [True: 3.11M, False: 11.8M]
  ------------------
   97|  3.11M|        if (!asn1_primitive_new(pval, it, embed))
  ------------------
  |  Branch (97:13): [True: 0, False: 3.11M]
  ------------------
   98|      0|            goto asn1err;
   99|  3.11M|        break;
  100|       |
  101|  3.11M|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  3.26k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (101:5): [True: 3.26k, False: 14.9M]
  ------------------
  102|  3.26k|        if (asn1_cb) {
  ------------------
  |  Branch (102:13): [True: 1.29k, False: 1.97k]
  ------------------
  103|  1.29k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|  1.29k|#define ASN1_OP_NEW_PRE 0
  ------------------
  104|  1.29k|            if (!i)
  ------------------
  |  Branch (104:17): [True: 0, False: 1.29k]
  ------------------
  105|      0|                goto auxerr;
  106|  1.29k|            if (i == 2) {
  ------------------
  |  Branch (106:17): [True: 0, False: 1.29k]
  ------------------
  107|      0|                return 1;
  108|      0|            }
  109|  1.29k|        }
  110|  3.26k|        if (embed) {
  ------------------
  |  Branch (110:13): [True: 0, False: 3.26k]
  ------------------
  111|      0|            memset(*pval, 0, it->size);
  112|  3.26k|        } else {
  113|  3.26k|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  108|  3.26k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|  3.26k|            if (*pval == NULL)
  ------------------
  |  Branch (114:17): [True: 0, False: 3.26k]
  ------------------
  115|      0|                return 0;
  116|  3.26k|        }
  117|  3.26k|        ossl_asn1_set_choice_selector(pval, -1, it);
  118|  3.26k|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|  1.29k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (118:13): [True: 1.29k, False: 1.97k]
  |  Branch (118:24): [True: 0, False: 1.29k]
  ------------------
  119|      0|            goto auxerr2;
  120|  3.26k|        break;
  121|       |
  122|  3.26k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (122:5): [True: 0, False: 14.9M]
  ------------------
  123|  5.06M|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  5.06M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (123:5): [True: 5.06M, False: 9.91M]
  ------------------
  124|  5.06M|        if (asn1_cb) {
  ------------------
  |  Branch (124:13): [True: 329k, False: 4.73M]
  ------------------
  125|   329k|            i = asn1_cb(ASN1_OP_NEW_PRE, pval, it, NULL);
  ------------------
  |  |  731|   329k|#define ASN1_OP_NEW_PRE 0
  ------------------
  126|   329k|            if (!i)
  ------------------
  |  Branch (126:17): [True: 0, False: 329k]
  ------------------
  127|      0|                goto auxerr;
  128|   329k|            if (i == 2) {
  ------------------
  |  Branch (128:17): [True: 138k, False: 190k]
  ------------------
  129|   138k|                return 1;
  130|   138k|            }
  131|   329k|        }
  132|  4.92M|        if (embed) {
  ------------------
  |  Branch (132:13): [True: 762k, False: 4.16M]
  ------------------
  133|   762k|            memset(*pval, 0, it->size);
  134|  4.16M|        } else {
  135|  4.16M|            *pval = OPENSSL_zalloc(it->size);
  ------------------
  |  |  108|  4.16M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  136|  4.16M|            if (*pval == NULL)
  ------------------
  |  Branch (136:17): [True: 0, False: 4.16M]
  ------------------
  137|      0|                return 0;
  138|  4.16M|        }
  139|       |        /* 0 : init. lock */
  140|  4.92M|        if (ossl_asn1_do_lock(pval, 0, it) < 0) {
  ------------------
  |  Branch (140:13): [True: 0, False: 4.92M]
  ------------------
  141|      0|            if (!embed) {
  ------------------
  |  Branch (141:17): [True: 0, False: 0]
  ------------------
  142|      0|                OPENSSL_free(*pval);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  143|      0|                *pval = NULL;
  144|      0|            }
  145|      0|            goto asn1err;
  146|      0|        }
  147|  4.92M|        ossl_asn1_enc_init(pval, it);
  148|  17.1M|        for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
  ------------------
  |  Branch (148:41): [True: 12.2M, False: 4.92M]
  ------------------
  149|  12.2M|            pseqval = ossl_asn1_get_field_ptr(pval, tt);
  150|  12.2M|            if (!asn1_template_new(pseqval, tt, libctx, propq))
  ------------------
  |  Branch (150:17): [True: 0, False: 12.2M]
  ------------------
  151|      0|                goto asn1err2;
  152|  12.2M|        }
  153|  4.92M|        if (asn1_cb && !asn1_cb(ASN1_OP_NEW_POST, pval, it, NULL))
  ------------------
  |  |  732|   190k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (153:13): [True: 190k, False: 4.73M]
  |  Branch (153:24): [True: 0, False: 190k]
  ------------------
  154|      0|            goto auxerr2;
  155|  4.92M|        break;
  156|  14.9M|    }
  157|  14.8M|    return 1;
  158|       |
  159|      0|asn1err2:
  160|      0|    ossl_asn1_item_embed_free(pval, it, embed);
  161|      0|asn1err:
  162|      0|    ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  163|      0|    return 0;
  164|       |
  165|      0|auxerr2:
  166|      0|    ossl_asn1_item_embed_free(pval, it, embed);
  167|      0|auxerr:
  168|       |    ERR_raise(ERR_LIB_ASN1, ASN1_R_AUX_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  169|      0|    return 0;
  170|      0|}
tasn_new.c:asn1_template_new:
  207|  12.2M|{
  208|  12.2M|    const ASN1_ITEM *it = ASN1_ITEM_ptr(tt->item);
  ------------------
  |  |  428|  12.2M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  209|  12.2M|    int embed = tt->flags & ASN1_TFLG_EMBED;
  ------------------
  |  |  586|  12.2M|#define ASN1_TFLG_EMBED (0x1 << 12)
  ------------------
  210|  12.2M|    ASN1_VALUE *tval;
  211|  12.2M|    int ret;
  212|  12.2M|    if (embed) {
  ------------------
  |  Branch (212:9): [True: 1.80M, False: 10.4M]
  ------------------
  213|  1.80M|        tval = (ASN1_VALUE *)pval;
  214|  1.80M|        pval = &tval;
  215|  1.80M|    }
  216|  12.2M|    if (tt->flags & ASN1_TFLG_OPTIONAL) {
  ------------------
  |  |  512|  12.2M|#define ASN1_TFLG_OPTIONAL (0x1)
  ------------------
  |  Branch (216:9): [True: 2.40M, False: 9.82M]
  ------------------
  217|  2.40M|        asn1_template_clear(pval, tt);
  218|  2.40M|        return 1;
  219|  2.40M|    }
  220|       |    /* If ANY DEFINED BY nothing to do */
  221|       |
  222|  9.82M|    if (tt->flags & ASN1_TFLG_ADB_MASK) {
  ------------------
  |  |  572|  9.82M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (222:9): [True: 0, False: 9.82M]
  ------------------
  223|      0|        *pval = NULL;
  224|      0|        return 1;
  225|      0|    }
  226|       |    /* If SET OF or SEQUENCE OF, its a STACK */
  227|  9.82M|    if (tt->flags & ASN1_TFLG_SK_MASK) {
  ------------------
  |  |  528|  9.82M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (227:9): [True: 0, False: 9.82M]
  ------------------
  228|      0|        STACK_OF(ASN1_VALUE) *skval;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  229|      0|        skval = sk_ASN1_VALUE_new_null();
  ------------------
  |  |  890|      0|#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
  ------------------
  230|      0|        if (!skval) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|            ret = 0;
  233|      0|            goto done;
  234|      0|        }
  235|      0|        *pval = (ASN1_VALUE *)skval;
  236|      0|        ret = 1;
  237|      0|        goto done;
  238|      0|    }
  239|       |    /* Otherwise pass it back to the item routine */
  240|  9.82M|    ret = asn1_item_embed_new(pval, it, embed, libctx, propq);
  241|  9.82M|done:
  242|  9.82M|    return ret;
  243|  9.82M|}
tasn_new.c:asn1_template_clear:
  246|  2.40M|{
  247|       |    /* If ADB or STACK just NULL the field */
  248|  2.40M|    if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  572|  2.40M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
                  if (tt->flags & (ASN1_TFLG_ADB_MASK | ASN1_TFLG_SK_MASK))
  ------------------
  |  |  528|  2.40M|#define ASN1_TFLG_SK_MASK (0x3 << 1)
  ------------------
  |  Branch (248:9): [True: 194k, False: 2.21M]
  ------------------
  249|   194k|        *pval = NULL;
  250|  2.21M|    else
  251|  2.21M|        asn1_item_clear(pval, ASN1_ITEM_ptr(tt->item));
  ------------------
  |  |  428|  2.21M|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  252|  2.40M|}
tasn_new.c:asn1_item_clear:
  173|  2.21M|{
  174|  2.21M|    const ASN1_EXTERN_FUNCS *ef;
  175|       |
  176|  2.21M|    switch (it->itype) {
  ------------------
  |  Branch (176:13): [True: 2.21M, False: 0]
  ------------------
  177|       |
  178|      0|    case ASN1_ITYPE_EXTERN:
  ------------------
  |  |   86|      0|#define ASN1_ITYPE_EXTERN 0x4
  ------------------
  |  Branch (178:5): [True: 0, False: 2.21M]
  ------------------
  179|      0|        ef = it->funcs;
  180|      0|        if (ef && ef->asn1_ex_clear)
  ------------------
  |  Branch (180:13): [True: 0, False: 0]
  |  Branch (180:19): [True: 0, False: 0]
  ------------------
  181|      0|            ef->asn1_ex_clear(pval, it);
  182|      0|        else
  183|      0|            *pval = NULL;
  184|      0|        break;
  185|       |
  186|  2.21M|    case ASN1_ITYPE_PRIMITIVE:
  ------------------
  |  |   82|  2.21M|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
  |  Branch (186:5): [True: 2.21M, False: 1.29k]
  ------------------
  187|  2.21M|        if (it->templates)
  ------------------
  |  Branch (187:13): [True: 0, False: 2.21M]
  ------------------
  188|      0|            asn1_template_clear(pval, it->templates);
  189|  2.21M|        else
  190|  2.21M|            asn1_primitive_clear(pval, it);
  191|  2.21M|        break;
  192|       |
  193|      0|    case ASN1_ITYPE_MSTRING:
  ------------------
  |  |   87|      0|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (193:5): [True: 0, False: 2.21M]
  ------------------
  194|      0|        asn1_primitive_clear(pval, it);
  195|      0|        break;
  196|       |
  197|  1.29k|    case ASN1_ITYPE_CHOICE:
  ------------------
  |  |   84|  1.29k|#define ASN1_ITYPE_CHOICE 0x2
  ------------------
  |  Branch (197:5): [True: 1.29k, False: 2.21M]
  ------------------
  198|  1.29k|    case ASN1_ITYPE_SEQUENCE:
  ------------------
  |  |   83|  1.29k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (198:5): [True: 0, False: 2.21M]
  ------------------
  199|  1.29k|    case ASN1_ITYPE_NDEF_SEQUENCE:
  ------------------
  |  |   88|  1.29k|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (199:5): [True: 0, False: 2.21M]
  ------------------
  200|       |        *pval = NULL;
  201|  1.29k|        break;
  202|  2.21M|    }
  203|  2.21M|}
tasn_new.c:asn1_primitive_clear:
  326|  2.21M|{
  327|  2.21M|    int utype;
  328|  2.21M|    if (it && it->funcs) {
  ------------------
  |  Branch (328:9): [True: 2.21M, False: 0]
  |  Branch (328:15): [True: 0, False: 2.21M]
  ------------------
  329|      0|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  330|      0|        if (pf->prim_clear)
  ------------------
  |  Branch (330:13): [True: 0, False: 0]
  ------------------
  331|      0|            pf->prim_clear(pval, it);
  332|      0|        else
  333|      0|            *pval = NULL;
  334|      0|        return;
  335|      0|    }
  336|  2.21M|    if (!it || (it->itype == ASN1_ITYPE_MSTRING))
  ------------------
  |  |   87|  2.21M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (336:9): [True: 0, False: 2.21M]
  |  Branch (336:16): [True: 0, False: 2.21M]
  ------------------
  337|      0|        utype = -1;
  338|  2.21M|    else
  339|  2.21M|        utype = it->utype;
  340|  2.21M|    if (utype == V_ASN1_BOOLEAN)
  ------------------
  |  |   65|  2.21M|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (340:9): [True: 668k, False: 1.54M]
  ------------------
  341|   668k|        *(ASN1_BOOLEAN *)pval = it->size;
  342|  1.54M|    else
  343|  1.54M|        *pval = NULL;
  344|  2.21M|}
tasn_new.c:asn1_primitive_new:
  261|  9.33M|{
  262|  9.33M|    ASN1_TYPE *typ;
  263|  9.33M|    ASN1_STRING *str;
  264|  9.33M|    int utype;
  265|       |
  266|  9.33M|    if (!it)
  ------------------
  |  Branch (266:9): [True: 0, False: 9.33M]
  ------------------
  267|      0|        return 0;
  268|       |
  269|  9.33M|    if (it->funcs) {
  ------------------
  |  Branch (269:9): [True: 0, False: 9.33M]
  ------------------
  270|      0|        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
  271|      0|        if (embed) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|      0|            if (pf->prim_clear) {
  ------------------
  |  Branch (272:17): [True: 0, False: 0]
  ------------------
  273|      0|                pf->prim_clear(pval, it);
  274|      0|                return 1;
  275|      0|            }
  276|      0|        } else if (pf->prim_new) {
  ------------------
  |  Branch (276:20): [True: 0, False: 0]
  ------------------
  277|      0|            return pf->prim_new(pval, it);
  278|      0|        }
  279|      0|    }
  280|       |
  281|  9.33M|    if (it->itype == ASN1_ITYPE_MSTRING)
  ------------------
  |  |   87|  9.33M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (281:9): [True: 3.11M, False: 6.22M]
  ------------------
  282|  3.11M|        utype = -1;
  283|  6.22M|    else
  284|  6.22M|        utype = it->utype;
  285|  9.33M|    switch (utype) {
  286|  4.33M|    case V_ASN1_OBJECT:
  ------------------
  |  |   70|  4.33M|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (286:5): [True: 4.33M, False: 4.99M]
  ------------------
  287|  4.33M|        *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
  ------------------
  |  |   18|  4.33M|#define NID_undef                       0
  ------------------
  288|  4.33M|        return 1;
  289|       |
  290|      0|    case V_ASN1_BOOLEAN:
  ------------------
  |  |   65|      0|#define V_ASN1_BOOLEAN 1
  ------------------
  |  Branch (290:5): [True: 0, False: 9.33M]
  ------------------
  291|      0|        *(ASN1_BOOLEAN *)pval = it->size;
  292|      0|        return 1;
  293|       |
  294|      0|    case V_ASN1_NULL:
  ------------------
  |  |   69|      0|#define V_ASN1_NULL 5
  ------------------
  |  Branch (294:5): [True: 0, False: 9.33M]
  ------------------
  295|      0|        *pval = (ASN1_VALUE *)1;
  296|      0|        return 1;
  297|       |
  298|   848k|    case V_ASN1_ANY:
  ------------------
  |  |   60|   848k|#define V_ASN1_ANY -4 /* used in ASN1 template code */
  ------------------
  |  Branch (298:5): [True: 848k, False: 8.48M]
  ------------------
  299|   848k|        if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL)
  ------------------
  |  |  106|   848k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (299:13): [True: 0, False: 848k]
  ------------------
  300|      0|            return 0;
  301|   848k|        typ->value.ptr = NULL;
  302|   848k|        typ->type = -1;
  303|   848k|        *pval = (ASN1_VALUE *)typ;
  304|   848k|        break;
  305|       |
  306|  4.14M|    default:
  ------------------
  |  Branch (306:5): [True: 4.14M, False: 5.18M]
  ------------------
  307|  4.14M|        if (embed) {
  ------------------
  |  Branch (307:13): [True: 1.03M, False: 3.11M]
  ------------------
  308|  1.03M|            str = *(ASN1_STRING **)pval;
  309|  1.03M|            memset(str, 0, sizeof(*str));
  310|  1.03M|            str->type = utype;
  311|  1.03M|            str->flags = ASN1_STRING_FLAG_EMBED;
  ------------------
  |  |  185|  1.03M|#define ASN1_STRING_FLAG_EMBED 0x080
  ------------------
  312|  3.11M|        } else {
  313|  3.11M|            str = ASN1_STRING_type_new(utype);
  314|  3.11M|            *pval = (ASN1_VALUE *)str;
  315|  3.11M|        }
  316|  4.14M|        if (it->itype == ASN1_ITYPE_MSTRING && str)
  ------------------
  |  |   87|  8.29M|#define ASN1_ITYPE_MSTRING 0x5
  ------------------
  |  Branch (316:13): [True: 3.11M, False: 1.03M]
  |  Branch (316:48): [True: 3.11M, False: 0]
  ------------------
  317|  3.11M|            str->flags |= ASN1_STRING_FLAG_MSTRING;
  ------------------
  |  |  183|  3.11M|#define ASN1_STRING_FLAG_MSTRING 0x040
  ------------------
  318|  4.14M|        break;
  319|  9.33M|    }
  320|  4.99M|    if (*pval)
  ------------------
  |  Branch (320:9): [True: 4.99M, False: 0]
  ------------------
  321|  4.99M|        return 1;
  322|      0|    return 0;
  323|  4.99M|}

ASN1_OCTET_STRING_free:
   24|   762k|    {                                                          \
   25|   762k|        ASN1_STRING_free(x);                                   \
   26|   762k|    }
ASN1_INTEGER_new:
   20|   191k|    {                                                          \
   21|   191k|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   66|   191k|#define V_ASN1_INTEGER 2
  ------------------
   22|   191k|    }                                                          \
ASN1_BIT_STRING_new:
   20|   582k|    {                                                          \
   21|   582k|        return ASN1_STRING_type_new(V_##sname);                \
  ------------------
  |  |   67|   582k|#define V_ASN1_BIT_STRING 3
  ------------------
   22|   582k|    }                                                          \
ASN1_BIT_STRING_free:
   24|   392k|    {                                                          \
   25|   392k|        ASN1_STRING_free(x);                                   \
   26|   392k|    }

ossl_asn1_get_choice_selector:
   30|  3.26k|{
   31|  3.26k|    int *sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|  3.26k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   32|       |
   33|  3.26k|    return *sel;
   34|  3.26k|}
ossl_asn1_set_choice_selector:
   50|  6.53k|{
   51|  6.53k|    int *sel, ret;
   52|       |
   53|  6.53k|    sel = offset2ptr(*pval, it->utype);
  ------------------
  |  |   23|  6.53k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   54|  6.53k|    ret = *sel;
   55|  6.53k|    *sel = value;
   56|  6.53k|    return ret;
   57|  6.53k|}
ossl_asn1_do_lock:
   69|  10.2M|{
   70|  10.2M|    const ASN1_AUX *aux;
   71|  10.2M|    CRYPTO_RWLOCK **lock;
   72|  10.2M|    CRYPTO_REF_COUNT *refcnt;
   73|  10.2M|    int ret = -1;
   74|       |
   75|  10.2M|    if ((it->itype != ASN1_ITYPE_SEQUENCE)
  ------------------
  |  |   83|  10.2M|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  |  Branch (75:9): [True: 0, False: 10.2M]
  ------------------
   76|      0|        && (it->itype != ASN1_ITYPE_NDEF_SEQUENCE))
  ------------------
  |  |   88|      0|#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        return 0;
   78|  10.2M|    aux = it->funcs;
   79|  10.2M|    if (aux == NULL || (aux->flags & ASN1_AFLG_REFCOUNT) == 0)
  ------------------
  |  |  721|   953k|#define ASN1_AFLG_REFCOUNT 1
  ------------------
  |  Branch (79:9): [True: 9.28M, False: 953k]
  |  Branch (79:24): [True: 381k, False: 572k]
  ------------------
   80|  9.66M|        return 0;
   81|   572k|    lock = offset2ptr(*pval, aux->ref_lock);
  ------------------
  |  |   23|   572k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   82|   572k|    refcnt = offset2ptr(*pval, aux->ref_offset);
  ------------------
  |  |   23|   572k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
   83|       |
   84|   572k|    switch (op) {
  ------------------
  |  Branch (84:13): [True: 572k, False: 0]
  ------------------
   85|   190k|    case 0:
  ------------------
  |  Branch (85:5): [True: 190k, False: 381k]
  ------------------
   86|   190k|        if (!CRYPTO_NEW_REF(refcnt, 1))
  ------------------
  |  Branch (86:13): [True: 0, False: 190k]
  ------------------
   87|      0|            return -1;
   88|   190k|        *lock = CRYPTO_THREAD_lock_new();
   89|   190k|        if (*lock == NULL) {
  ------------------
  |  Branch (89:13): [True: 0, False: 190k]
  ------------------
   90|      0|            CRYPTO_FREE_REF(refcnt);
   91|      0|            ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|            return -1;
   93|      0|        }
   94|   190k|        ret = 1;
   95|   190k|        break;
   96|      0|    case 1:
  ------------------
  |  Branch (96:5): [True: 0, False: 572k]
  ------------------
   97|      0|        if (!CRYPTO_UP_REF(refcnt, &ret))
  ------------------
  |  Branch (97:13): [True: 0, False: 0]
  ------------------
   98|      0|            return -1;
   99|      0|        break;
  100|   381k|    case -1:
  ------------------
  |  Branch (100:5): [True: 381k, False: 190k]
  ------------------
  101|   381k|        if (!CRYPTO_DOWN_REF(refcnt, &ret))
  ------------------
  |  Branch (101:13): [True: 0, False: 381k]
  ------------------
  102|      0|            return -1; /* failed */
  103|   381k|        REF_PRINT_EX(it->sname, ret, (void *)it);
  ------------------
  |  |  299|   381k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  ------------------
  |  |  |  |  297|   381k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|   381k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  104|   381k|        REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|   381k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 381k]
  |  |  ------------------
  ------------------
  105|   381k|        if (ret == 0) {
  ------------------
  |  Branch (105:13): [True: 190k, False: 190k]
  ------------------
  106|   190k|            CRYPTO_THREAD_lock_free(*lock);
  107|   190k|            *lock = NULL;
  108|   190k|            CRYPTO_FREE_REF(refcnt);
  109|   190k|        }
  110|   381k|        break;
  111|   572k|    }
  112|       |
  113|   572k|    return ret;
  114|   572k|}
ossl_asn1_enc_init:
  142|  4.92M|{
  143|  4.92M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  144|       |
  145|  4.92M|    if (enc != NULL) {
  ------------------
  |  Branch (145:9): [True: 190k, False: 4.73M]
  ------------------
  146|       |        enc->enc = NULL;
  147|   190k|        enc->len = 0;
  148|   190k|        enc->modified = 1;
  149|   190k|    }
  150|  4.92M|}
ossl_asn1_enc_free:
  153|  5.11M|{
  154|  5.11M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  155|       |
  156|  5.11M|    if (enc != NULL) {
  ------------------
  |  Branch (156:9): [True: 190k, False: 4.92M]
  ------------------
  157|   190k|        OPENSSL_free(enc->enc);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  158|       |        enc->enc = NULL;
  159|   190k|        enc->len = 0;
  160|   190k|        enc->modified = 1;
  161|   190k|    }
  162|  5.11M|}
ossl_asn1_enc_save:
  166|  4.27M|{
  167|  4.27M|    ASN1_ENCODING *enc = asn1_get_enc_ptr(pval, it);
  168|       |
  169|  4.27M|    if (enc == NULL)
  ------------------
  |  Branch (169:9): [True: 4.08M, False: 190k]
  ------------------
  170|  4.08M|        return 1;
  171|       |
  172|   190k|    OPENSSL_free(enc->enc);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|   190k|    if (inlen <= 0) {
  ------------------
  |  Branch (173:9): [True: 0, False: 190k]
  ------------------
  174|      0|        enc->enc = NULL;
  175|      0|        return 0;
  176|      0|    }
  177|   190k|    if ((enc->enc = OPENSSL_malloc(inlen)) == NULL)
  ------------------
  |  |  106|   190k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (177:9): [True: 0, False: 190k]
  ------------------
  178|      0|        return 0;
  179|   190k|    memcpy(enc->enc, in, inlen);
  180|   190k|    enc->len = inlen;
  181|   190k|    enc->modified = 0;
  182|       |
  183|   190k|    return 1;
  184|   190k|}
ossl_asn1_enc_restore:
  188|  4.18M|{
  189|  4.18M|    const ASN1_ENCODING *enc = asn1_get_const_enc_ptr(pval, it);
  190|       |
  191|  4.18M|    if (enc == NULL || enc->modified)
  ------------------
  |  Branch (191:9): [True: 4.14M, False: 33.2k]
  |  Branch (191:24): [True: 0, False: 33.2k]
  ------------------
  192|  4.14M|        return 0;
  193|  33.2k|    if (out) {
  ------------------
  |  Branch (193:9): [True: 11.0k, False: 22.1k]
  ------------------
  194|  11.0k|        memcpy(*out, enc->enc, enc->len);
  195|  11.0k|        *out += enc->len;
  196|  11.0k|    }
  197|  33.2k|    if (len != NULL)
  ------------------
  |  Branch (197:9): [True: 33.2k, False: 0]
  ------------------
  198|  33.2k|        *len = enc->len;
  199|  33.2k|    return 1;
  200|  4.18M|}
ossl_asn1_get_field_ptr:
  204|  35.8M|{
  205|  35.8M|    ASN1_VALUE **pvaltmp = offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  35.8M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  206|       |
  207|       |    /*
  208|       |     * NOTE for BOOLEAN types the field is just a plain int so we can't
  209|       |     * return int **, so settle for (int *).
  210|       |     */
  211|  35.8M|    return pvaltmp;
  212|  35.8M|}
ossl_asn1_get_const_field_ptr:
  217|  11.1M|{
  218|  11.1M|    return offset2ptr(*pval, tt->offset);
  ------------------
  |  |   23|  11.1M|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  219|  11.1M|}
ossl_asn1_do_adb:
  229|  34.7M|{
  230|  34.7M|    const ASN1_ADB *adb;
  231|  34.7M|    const ASN1_ADB_TABLE *atbl;
  232|  34.7M|    long selector;
  233|  34.7M|    const ASN1_VALUE **sfld;
  234|  34.7M|    int i;
  235|       |
  236|  34.7M|    if ((tt->flags & ASN1_TFLG_ADB_MASK) == 0)
  ------------------
  |  |  572|  34.7M|#define ASN1_TFLG_ADB_MASK (0x3 << 8)
  ------------------
  |  Branch (236:9): [True: 34.7M, False: 0]
  ------------------
  237|  34.7M|        return tt;
  238|       |
  239|       |    /* Else ANY DEFINED BY ... get the table */
  240|      0|    adb = ASN1_ADB_ptr(tt->item);
  ------------------
  |  |   91|      0|#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
  ------------------
  241|       |
  242|       |    /* Get the selector field */
  243|      0|    sfld = offset2ptr(val, adb->offset);
  ------------------
  |  |   23|      0|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  244|       |
  245|       |    /* Check if NULL */
  246|      0|    if (*sfld == NULL) {
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|        if (adb->null_tt == NULL)
  ------------------
  |  Branch (247:13): [True: 0, False: 0]
  ------------------
  248|      0|            goto err;
  249|      0|        return adb->null_tt;
  250|      0|    }
  251|       |
  252|       |    /*
  253|       |     * Convert type to a long: NB: don't check for NID_undef here because it
  254|       |     * might be a legitimate value in the table
  255|       |     */
  256|      0|    if ((tt->flags & ASN1_TFLG_ADB_OID) != 0)
  ------------------
  |  |  574|      0|#define ASN1_TFLG_ADB_OID (0x1 << 8)
  ------------------
  |  Branch (256:9): [True: 0, False: 0]
  ------------------
  257|      0|        selector = OBJ_obj2nid((ASN1_OBJECT *)*sfld);
  258|      0|    else
  259|      0|        selector = ASN1_INTEGER_get((ASN1_INTEGER *)*sfld);
  260|       |
  261|       |    /* Let application callback translate value */
  262|      0|    if (adb->adb_cb != NULL && adb->adb_cb(&selector) == 0) {
  ------------------
  |  Branch (262:9): [True: 0, False: 0]
  |  Branch (262:32): [True: 0, False: 0]
  ------------------
  263|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|        return NULL;
  265|      0|    }
  266|       |
  267|       |    /*
  268|       |     * Try to find matching entry in table Maybe should check application
  269|       |     * types first to allow application override? Might also be useful to
  270|       |     * have a flag which indicates table is sorted and we can do a binary
  271|       |     * search. For now stick to a linear search.
  272|       |     */
  273|       |
  274|      0|    for (atbl = adb->tbl, i = 0; i < adb->tblcount; i++, atbl++)
  ------------------
  |  Branch (274:34): [True: 0, False: 0]
  ------------------
  275|      0|        if (atbl->value == selector)
  ------------------
  |  Branch (275:13): [True: 0, False: 0]
  ------------------
  276|      0|            return &atbl->tt;
  277|       |
  278|       |    /* FIXME: need to search application table too */
  279|       |
  280|       |    /* No match, return default type */
  281|      0|    if (!adb->default_tt)
  ------------------
  |  Branch (281:9): [True: 0, False: 0]
  ------------------
  282|      0|        goto err;
  283|      0|    return adb->default_tt;
  284|       |
  285|      0|err:
  286|       |    /* FIXME: should log the value or OID of unsupported type */
  287|      0|    if (nullerr)
  ------------------
  |  Branch (287:9): [True: 0, False: 0]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_ASN1, ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|       |    return NULL;
  290|      0|}
tasn_utl.c:asn1_get_enc_ptr:
  117|  14.3M|{
  118|  14.3M|    const ASN1_AUX *aux;
  119|       |
  120|  14.3M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 14.3M]
  |  Branch (120:25): [True: 0, False: 14.3M]
  ------------------
  121|      0|        return NULL;
  122|  14.3M|    aux = it->funcs;
  123|  14.3M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  1.28M|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (123:9): [True: 13.0M, False: 1.28M]
  |  Branch (123:24): [True: 710k, False: 572k]
  ------------------
  124|  13.7M|        return NULL;
  125|   572k|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|   572k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  126|  14.3M|}
tasn_utl.c:asn1_get_const_enc_ptr:
  130|  4.18M|{
  131|  4.18M|    const ASN1_AUX *aux;
  132|       |
  133|  4.18M|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 4.18M]
  |  Branch (133:25): [True: 0, False: 4.18M]
  ------------------
  134|      0|        return NULL;
  135|  4.18M|    aux = it->funcs;
  136|  4.18M|    if (aux == NULL || (aux->flags & ASN1_AFLG_ENCODING) == 0)
  ------------------
  |  |  723|  55.4k|#define ASN1_AFLG_ENCODING 2
  ------------------
  |  Branch (136:9): [True: 4.12M, False: 55.4k]
  |  Branch (136:24): [True: 22.1k, False: 33.2k]
  ------------------
  137|  4.14M|        return NULL;
  138|  33.2k|    return offset2ptr(*pval, aux->enc_offset);
  ------------------
  |  |   23|  33.2k|#define offset2ptr(addr, offset) (void *)(((char *)addr) + offset)
  ------------------
  139|  4.18M|}

X509_ALGOR_get0:
   73|   433k|{
   74|   433k|    if (paobj)
  ------------------
  |  Branch (74:9): [True: 329k, False: 104k]
  ------------------
   75|   329k|        *paobj = algor->algorithm;
   76|   433k|    if (pptype) {
  ------------------
  |  Branch (76:9): [True: 242k, False: 190k]
  ------------------
   77|   242k|        if (algor->parameter == NULL) {
  ------------------
  |  Branch (77:13): [True: 0, False: 242k]
  ------------------
   78|      0|            *pptype = V_ASN1_UNDEF;
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
   79|      0|            return;
   80|      0|        } else
   81|   242k|            *pptype = algor->parameter->type;
   82|   242k|        if (ppval)
  ------------------
  |  Branch (82:13): [True: 242k, False: 0]
  ------------------
   83|   242k|            *ppval = algor->parameter->value.ptr;
   84|   242k|    }
   85|   433k|}

BIGNUM_it:
   57|   276k|ASN1_ITEM_start(BIGNUM)
  ------------------
  |  |   97|   276k|    {                                  \
  |  |   98|   276k|        static const ASN1_ITEM local_it = {
  ------------------
   58|   276k|    ASN1_ITYPE_PRIMITIVE,
  ------------------
  |  |   82|   276k|#define ASN1_ITYPE_PRIMITIVE 0x0
  ------------------
   59|   276k|    V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |   66|   276k|#define V_ASN1_INTEGER 2
  ------------------
                  V_ASN1_INTEGER, NULL, 0, &bignum_pf, 0, "BIGNUM" ASN1_ITEM_end(BIGNUM)
  ------------------
  |  |  104|   276k|    }                         \
  |  |  105|   276k|    ;                         \
  |  |  106|   276k|    return &local_it;         \
  |  |  107|   276k|    }
  ------------------
x_bignum.c:bn_new:
   65|   276k|{
   66|   276k|    *pval = (ASN1_VALUE *)BN_new();
   67|   276k|    if (*pval != NULL)
  ------------------
  |  Branch (67:9): [True: 276k, False: 0]
  ------------------
   68|   276k|        return 1;
   69|      0|    else
   70|      0|        return 0;
   71|   276k|}
x_bignum.c:bn_c2i:
  116|   276k|{
  117|   276k|    BIGNUM *bn;
  118|       |
  119|   276k|    if (*pval == NULL && !bn_new(pval, it))
  ------------------
  |  Branch (119:9): [True: 276k, False: 0]
  |  Branch (119:26): [True: 0, False: 276k]
  ------------------
  120|      0|        return 0;
  121|   276k|    bn = (BIGNUM *)*pval;
  122|   276k|    if (!BN_bin2bn(cont, len, bn)) {
  ------------------
  |  Branch (122:9): [True: 0, False: 276k]
  ------------------
  123|      0|        bn_free(pval, it);
  124|      0|        return 0;
  125|      0|    }
  126|   276k|    return 1;
  127|   276k|}

X509_INFO_new:
   17|   190k|{
   18|   190k|    X509_INFO *ret;
   19|       |
   20|   190k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|   190k|    if (ret == NULL)
  ------------------
  |  Branch (21:9): [True: 0, False: 190k]
  ------------------
   22|      0|        return NULL;
   23|       |
   24|   190k|    return ret;
   25|   190k|}
X509_INFO_free:
   28|   191k|{
   29|   191k|    if (x == NULL)
  ------------------
  |  Branch (29:9): [True: 1.30k, False: 190k]
  ------------------
   30|  1.30k|        return;
   31|       |
   32|   190k|    X509_free(x->x509);
   33|   190k|    X509_CRL_free(x->crl);
   34|   190k|    X509_PKEY_free(x->x_pkey);
   35|   190k|    OPENSSL_free(x->enc_data);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|   190k|    OPENSSL_free(x);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   37|   190k|}

X509_PKEY_free:
   36|   190k|{
   37|   190k|    if (x == NULL)
  ------------------
  |  Branch (37:9): [True: 190k, False: 0]
  ------------------
   38|   190k|        return;
   39|       |
   40|      0|    X509_ALGOR_free(x->enc_algor);
   41|      0|    ASN1_OCTET_STRING_free(x->enc_pkey);
   42|      0|    EVP_PKEY_free(x->dec_pkey);
   43|      0|    if (x->key_free)
  ------------------
  |  Branch (43:9): [True: 0, False: 0]
  ------------------
   44|      0|        OPENSSL_free(x->key_data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|      0|    OPENSSL_free(x);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|      0|}

ossl_encode_der_length:
   40|   156k|{
   41|   156k|    if (cont_len > 0xffff)
  ------------------
  |  Branch (41:9): [True: 0, False: 156k]
  ------------------
   42|      0|        return 0; /* Too large for supported length encodings */
   43|       |
   44|   156k|    if (cont_len > 0xff) {
  ------------------
  |  Branch (44:9): [True: 0, False: 156k]
  ------------------
   45|      0|        if (!WPACKET_put_bytes_u8(pkt, 0x82)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (45:13): [True: 0, False: 0]
  ------------------
   46|      0|            || !WPACKET_put_bytes_u16(pkt, cont_len))
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (46:16): [True: 0, False: 0]
  ------------------
   47|      0|            return 0;
   48|   156k|    } else {
   49|   156k|        if (cont_len > 0x7f
  ------------------
  |  Branch (49:13): [True: 0, False: 156k]
  ------------------
   50|      0|            && !WPACKET_put_bytes_u8(pkt, 0x81))
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (50:16): [True: 0, False: 0]
  ------------------
   51|      0|            return 0;
   52|   156k|        if (!WPACKET_put_bytes_u8(pkt, cont_len))
  ------------------
  |  |  889|   156k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (52:13): [True: 0, False: 156k]
  ------------------
   53|      0|            return 0;
   54|   156k|    }
   55|       |
   56|   156k|    return 1;
   57|   156k|}
ossl_encode_der_integer:
   67|   104k|{
   68|   104k|    unsigned char *bnbytes;
   69|   104k|    size_t cont_len;
   70|       |
   71|   104k|    if (BN_is_negative(n))
  ------------------
  |  Branch (71:9): [True: 0, False: 104k]
  ------------------
   72|      0|        return 0;
   73|       |
   74|       |    /*
   75|       |     * Calculate the ASN.1 INTEGER DER content length for n.
   76|       |     * This is the number of whole bytes required to represent n (i.e. rounded
   77|       |     * down), plus one.
   78|       |     * If n is zero then the content is a single zero byte (length = 1).
   79|       |     * If the number of bits of n is a multiple of 8 then an extra zero padding
   80|       |     * byte is included to ensure that the value is still treated as positive
   81|       |     * in the INTEGER two's complement representation.
   82|       |     */
   83|   104k|    cont_len = BN_num_bits(n) / 8 + 1;
   84|       |
   85|   104k|    if (!WPACKET_start_sub_packet(pkt)
  ------------------
  |  Branch (85:9): [True: 0, False: 104k]
  ------------------
   86|   104k|        || !WPACKET_put_bytes_u8(pkt, ID_INTEGER)
  ------------------
  |  |  889|   208k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (86:12): [True: 0, False: 104k]
  ------------------
   87|   104k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (87:12): [True: 0, False: 104k]
  ------------------
   88|   104k|        || !WPACKET_allocate_bytes(pkt, cont_len, &bnbytes)
  ------------------
  |  Branch (88:12): [True: 0, False: 104k]
  ------------------
   89|   104k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (89:12): [True: 0, False: 104k]
  ------------------
   90|      0|        return 0;
   91|       |
   92|   104k|    if (bnbytes != NULL
  ------------------
  |  Branch (92:9): [True: 0, False: 104k]
  ------------------
   93|      0|        && BN_bn2binpad(n, bnbytes, (int)cont_len) != (int)cont_len)
  ------------------
  |  Branch (93:12): [True: 0, False: 0]
  ------------------
   94|      0|        return 0;
   95|       |
   96|   104k|    return 1;
   97|   104k|}
ossl_encode_der_dsa_sig:
  107|  52.2k|{
  108|  52.2k|    WPACKET tmppkt, *dummypkt;
  109|  52.2k|    size_t cont_len;
  110|  52.2k|    int isnull = WPACKET_is_null_buf(pkt);
  111|       |
  112|  52.2k|    if (!WPACKET_start_sub_packet(pkt))
  ------------------
  |  Branch (112:9): [True: 0, False: 52.2k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|  52.2k|    if (!isnull) {
  ------------------
  |  Branch (115:9): [True: 0, False: 52.2k]
  ------------------
  116|      0|        if (!WPACKET_init_null(&tmppkt, 0))
  ------------------
  |  Branch (116:13): [True: 0, False: 0]
  ------------------
  117|      0|            return 0;
  118|      0|        dummypkt = &tmppkt;
  119|  52.2k|    } else {
  120|       |        /* If the input packet has a NULL buffer, we don't need a dummy packet */
  121|  52.2k|        dummypkt = pkt;
  122|  52.2k|    }
  123|       |
  124|       |    /* Calculate the content length */
  125|  52.2k|    if (!ossl_encode_der_integer(dummypkt, r)
  ------------------
  |  Branch (125:9): [True: 0, False: 52.2k]
  ------------------
  126|  52.2k|        || !ossl_encode_der_integer(dummypkt, s)
  ------------------
  |  Branch (126:12): [True: 0, False: 52.2k]
  ------------------
  127|  52.2k|        || !WPACKET_get_length(dummypkt, &cont_len)
  ------------------
  |  Branch (127:12): [True: 0, False: 52.2k]
  ------------------
  128|  52.2k|        || (!isnull && !WPACKET_finish(dummypkt))) {
  ------------------
  |  Branch (128:13): [True: 0, False: 52.2k]
  |  Branch (128:24): [True: 0, False: 0]
  ------------------
  129|      0|        if (!isnull)
  ------------------
  |  Branch (129:13): [True: 0, False: 0]
  ------------------
  130|      0|            WPACKET_cleanup(dummypkt);
  131|      0|        return 0;
  132|      0|    }
  133|       |
  134|       |    /* Add the tag and length bytes */
  135|  52.2k|    if (!WPACKET_put_bytes_u8(pkt, ID_SEQUENCE)
  ------------------
  |  |  889|   104k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (135:9): [True: 0, False: 52.2k]
  ------------------
  136|  52.2k|        || !ossl_encode_der_length(pkt, cont_len)
  ------------------
  |  Branch (136:12): [True: 0, False: 52.2k]
  ------------------
  137|       |        /*
  138|       |         * Really encode the integers. We already wrote to the main pkt
  139|       |         * if it had a NULL buffer, so don't do it again
  140|       |         */
  141|  52.2k|        || (!isnull && !ossl_encode_der_integer(pkt, r))
  ------------------
  |  Branch (141:13): [True: 0, False: 52.2k]
  |  Branch (141:24): [True: 0, False: 0]
  ------------------
  142|  52.2k|        || (!isnull && !ossl_encode_der_integer(pkt, s))
  ------------------
  |  Branch (142:13): [True: 0, False: 52.2k]
  |  Branch (142:24): [True: 0, False: 0]
  ------------------
  143|  52.2k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (143:12): [True: 0, False: 52.2k]
  ------------------
  144|      0|        return 0;
  145|       |
  146|  52.2k|    return 1;
  147|  52.2k|}

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

ASYNC_WAIT_CTX_free:
   21|  1.31k|{
   22|  1.31k|    struct fd_lookup_st *curr;
   23|  1.31k|    struct fd_lookup_st *next;
   24|       |
   25|  1.31k|    if (ctx == NULL)
  ------------------
  |  Branch (25:9): [True: 1.31k, False: 0]
  ------------------
   26|  1.31k|        return;
   27|       |
   28|      0|    curr = ctx->fds;
   29|      0|    while (curr != NULL) {
  ------------------
  |  Branch (29:12): [True: 0, False: 0]
  ------------------
   30|      0|        if (!curr->del) {
  ------------------
  |  Branch (30:13): [True: 0, False: 0]
  ------------------
   31|       |            /* Only try and cleanup if it hasn't been marked deleted */
   32|      0|            if (curr->cleanup != NULL)
  ------------------
  |  Branch (32:17): [True: 0, False: 0]
  ------------------
   33|      0|                curr->cleanup(ctx, curr->key, curr->fd, curr->custom_data);
   34|      0|        }
   35|       |        /* Always free the fd_lookup_st */
   36|      0|        next = curr->next;
   37|      0|        OPENSSL_free(curr);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|      0|        curr = next;
   39|      0|    }
   40|       |
   41|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   42|      0|}

BIO_f_buffer:
   41|  1.31k|{
   42|  1.31k|    return &methods_buffer;
   43|  1.31k|}
bf_buff.c:buffer_write:
  159|  2.35k|{
  160|  2.35k|    int i, num = 0;
  161|  2.35k|    BIO_F_BUFFER_CTX *ctx;
  162|       |
  163|  2.35k|    if ((in == NULL) || (inl <= 0))
  ------------------
  |  Branch (163:9): [True: 0, False: 2.35k]
  |  Branch (163:25): [True: 0, False: 2.35k]
  ------------------
  164|      0|        return 0;
  165|  2.35k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  166|  2.35k|    if ((ctx == NULL) || (b->next_bio == NULL))
  ------------------
  |  Branch (166:9): [True: 0, False: 2.35k]
  |  Branch (166:26): [True: 0, False: 2.35k]
  ------------------
  167|      0|        return 0;
  168|       |
  169|  2.35k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  263|  2.35k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  2.35k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  2.35k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  2.35k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  2.35k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  2.35k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  170|  2.35k|start:
  171|  2.35k|    i = ctx->obuf_size - (ctx->obuf_len + ctx->obuf_off);
  172|       |    /* add to buffer and return */
  173|  2.35k|    if (i >= inl) {
  ------------------
  |  Branch (173:9): [True: 2.35k, False: 0]
  ------------------
  174|  2.35k|        memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, inl);
  175|  2.35k|        ctx->obuf_len += inl;
  176|  2.35k|        return (num + inl);
  177|  2.35k|    }
  178|       |    /* else */
  179|       |    /* stuff already in buffer, so add to it first, then flush */
  180|      0|    if (ctx->obuf_len != 0) {
  ------------------
  |  Branch (180:9): [True: 0, False: 0]
  ------------------
  181|      0|        if (i > 0) { /* lets fill it up if we can */
  ------------------
  |  Branch (181:13): [True: 0, False: 0]
  ------------------
  182|      0|            memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, i);
  183|      0|            in += i;
  184|      0|            inl -= i;
  185|      0|            num += i;
  186|      0|            ctx->obuf_len += i;
  187|      0|        }
  188|       |        /* we now have a full buffer needing flushing */
  189|      0|        for (;;) {
  190|      0|            i = BIO_write(b->next_bio, &(ctx->obuf[ctx->obuf_off]),
  191|      0|                ctx->obuf_len);
  192|      0|            if (i <= 0) {
  ------------------
  |  Branch (192:17): [True: 0, False: 0]
  ------------------
  193|      0|                BIO_copy_next_retry(b);
  194|       |
  195|      0|                if (i < 0)
  ------------------
  |  Branch (195:21): [True: 0, False: 0]
  ------------------
  196|      0|                    return ((num > 0) ? num : i);
  ------------------
  |  Branch (196:29): [True: 0, False: 0]
  ------------------
  197|      0|                if (i == 0)
  ------------------
  |  Branch (197:21): [True: 0, False: 0]
  ------------------
  198|      0|                    return num;
  199|      0|            }
  200|      0|            ctx->obuf_off += i;
  201|      0|            ctx->obuf_len -= i;
  202|      0|            if (ctx->obuf_len == 0)
  ------------------
  |  Branch (202:17): [True: 0, False: 0]
  ------------------
  203|      0|                break;
  204|      0|        }
  205|      0|    }
  206|       |    /*
  207|       |     * we only get here if the buffer has been flushed and we still have
  208|       |     * stuff to write
  209|       |     */
  210|      0|    ctx->obuf_off = 0;
  211|       |
  212|       |    /* we now have inl bytes to write */
  213|      0|    while (inl >= ctx->obuf_size) {
  ------------------
  |  Branch (213:12): [True: 0, False: 0]
  ------------------
  214|      0|        i = BIO_write(b->next_bio, in, inl);
  215|      0|        if (i <= 0) {
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            BIO_copy_next_retry(b);
  217|      0|            if (i < 0)
  ------------------
  |  Branch (217:17): [True: 0, False: 0]
  ------------------
  218|      0|                return ((num > 0) ? num : i);
  ------------------
  |  Branch (218:25): [True: 0, False: 0]
  ------------------
  219|      0|            if (i == 0)
  ------------------
  |  Branch (219:17): [True: 0, False: 0]
  ------------------
  220|      0|                return num;
  221|      0|        }
  222|      0|        num += i;
  223|      0|        in += i;
  224|      0|        inl -= i;
  225|      0|        if (inl == 0)
  ------------------
  |  Branch (225:13): [True: 0, False: 0]
  ------------------
  226|      0|            return num;
  227|      0|    }
  228|       |
  229|       |    /*
  230|       |     * copy the rest into the buffer since we have only a small amount left
  231|       |     */
  232|      0|    goto start;
  233|      0|}
bf_buff.c:buffer_ctrl:
  236|  6.30k|{
  237|  6.30k|    BIO *dbio;
  238|  6.30k|    BIO_F_BUFFER_CTX *ctx;
  239|  6.30k|    long ret = 1;
  240|  6.30k|    char *p1, *p2;
  241|  6.30k|    int r, i, *ip;
  242|  6.30k|    int ibs, obs;
  243|       |
  244|  6.30k|    ctx = (BIO_F_BUFFER_CTX *)b->ptr;
  245|       |
  246|  6.30k|    switch (cmd) {
  247|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (247:5): [True: 0, False: 6.30k]
  ------------------
  248|      0|        ctx->ibuf_off = 0;
  249|      0|        ctx->ibuf_len = 0;
  250|      0|        ctx->obuf_off = 0;
  251|      0|        ctx->obuf_len = 0;
  252|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (252:13): [True: 0, False: 0]
  ------------------
  253|      0|            return 0;
  254|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  255|      0|        break;
  256|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (256:5): [True: 0, False: 6.30k]
  ------------------
  257|      0|        if (ctx->ibuf_len > 0)
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            return 0;
  259|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  260|      0|        break;
  261|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (261:5): [True: 0, False: 6.30k]
  ------------------
  262|      0|        ret = (long)ctx->obuf_len;
  263|      0|        break;
  264|      0|    case BIO_C_GET_BUFF_NUM_LINES:
  ------------------
  |  |  450|      0|#define BIO_C_GET_BUFF_NUM_LINES 116
  ------------------
  |  Branch (264:5): [True: 0, False: 6.30k]
  ------------------
  265|      0|        ret = 0;
  266|      0|        p1 = ctx->ibuf;
  267|      0|        for (i = 0; i < ctx->ibuf_len; i++) {
  ------------------
  |  Branch (267:21): [True: 0, False: 0]
  ------------------
  268|      0|            if (p1[ctx->ibuf_off + i] == '\n')
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  ------------------
  269|      0|                ret++;
  270|      0|        }
  271|      0|        break;
  272|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (272:5): [True: 0, False: 6.30k]
  ------------------
  273|      0|        ret = (long)ctx->obuf_len;
  274|      0|        if (ret == 0) {
  ------------------
  |  Branch (274:13): [True: 0, False: 0]
  ------------------
  275|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|                return 0;
  277|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  278|      0|        }
  279|      0|        break;
  280|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (280:5): [True: 0, False: 6.30k]
  ------------------
  281|      0|        ret = (long)ctx->ibuf_len;
  282|      0|        if (ret == 0) {
  ------------------
  |  Branch (282:13): [True: 0, False: 0]
  ------------------
  283|      0|            if (b->next_bio == NULL)
  ------------------
  |  Branch (283:17): [True: 0, False: 0]
  ------------------
  284|      0|                return 0;
  285|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  286|      0|        }
  287|      0|        break;
  288|      0|    case BIO_C_SET_BUFF_READ_DATA:
  ------------------
  |  |  456|      0|#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
  ------------------
  |  Branch (288:5): [True: 0, False: 6.30k]
  ------------------
  289|      0|        if (num > ctx->ibuf_size) {
  ------------------
  |  Branch (289:13): [True: 0, False: 0]
  ------------------
  290|      0|            if (num <= 0)
  ------------------
  |  Branch (290:17): [True: 0, False: 0]
  ------------------
  291|      0|                return 0;
  292|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  293|      0|            if (p1 == NULL)
  ------------------
  |  Branch (293:17): [True: 0, False: 0]
  ------------------
  294|      0|                return 0;
  295|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  296|      0|            ctx->ibuf = p1;
  297|      0|        }
  298|      0|        ctx->ibuf_off = 0;
  299|      0|        ctx->ibuf_len = (int)num;
  300|      0|        memcpy(ctx->ibuf, ptr, (int)num);
  301|      0|        ret = 1;
  302|      0|        break;
  303|  1.31k|    case BIO_C_SET_BUFF_SIZE:
  ------------------
  |  |  451|  1.31k|#define BIO_C_SET_BUFF_SIZE 117
  ------------------
  |  Branch (303:5): [True: 1.31k, False: 4.98k]
  ------------------
  304|  1.31k|        if (ptr != NULL) {
  ------------------
  |  Branch (304:13): [True: 1.31k, False: 0]
  ------------------
  305|  1.31k|            ip = (int *)ptr;
  306|  1.31k|            if (*ip == 0) {
  ------------------
  |  Branch (306:17): [True: 1.31k, False: 0]
  ------------------
  307|  1.31k|                ibs = (int)num;
  308|  1.31k|                obs = ctx->obuf_size;
  309|  1.31k|            } else { /* if (*ip == 1) */
  310|       |
  311|      0|                ibs = ctx->ibuf_size;
  312|      0|                obs = (int)num;
  313|      0|            }
  314|  1.31k|        } else {
  315|      0|            ibs = (int)num;
  316|      0|            obs = (int)num;
  317|      0|        }
  318|  1.31k|        p1 = ctx->ibuf;
  319|  1.31k|        p2 = ctx->obuf;
  320|  1.31k|        if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
  ------------------
  |  |   23|  1.31k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (320:13): [True: 0, False: 1.31k]
  |  Branch (320:44): [True: 0, False: 0]
  ------------------
  321|      0|            if (num <= 0)
  ------------------
  |  Branch (321:17): [True: 0, False: 0]
  ------------------
  322|      0|                return 0;
  323|      0|            p1 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  324|      0|            if (p1 == NULL)
  ------------------
  |  Branch (324:17): [True: 0, False: 0]
  ------------------
  325|      0|                return 0;
  326|      0|        }
  327|  1.31k|        if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
  ------------------
  |  |   23|  1.31k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
  |  Branch (327:13): [True: 0, False: 1.31k]
  |  Branch (327:44): [True: 0, False: 0]
  ------------------
  328|      0|            p2 = OPENSSL_malloc((size_t)num);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  329|      0|            if (p2 == NULL) {
  ------------------
  |  Branch (329:17): [True: 0, False: 0]
  ------------------
  330|      0|                if (p1 != ctx->ibuf)
  ------------------
  |  Branch (330:21): [True: 0, False: 0]
  ------------------
  331|      0|                    OPENSSL_free(p1);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  332|      0|                return 0;
  333|      0|            }
  334|      0|        }
  335|  1.31k|        if (ctx->ibuf != p1) {
  ------------------
  |  Branch (335:13): [True: 0, False: 1.31k]
  ------------------
  336|      0|            OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  337|      0|            ctx->ibuf = p1;
  338|      0|            ctx->ibuf_off = 0;
  339|      0|            ctx->ibuf_len = 0;
  340|      0|            ctx->ibuf_size = ibs;
  341|      0|        }
  342|  1.31k|        if (ctx->obuf != p2) {
  ------------------
  |  Branch (342:13): [True: 0, False: 1.31k]
  ------------------
  343|      0|            OPENSSL_free(ctx->obuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  344|      0|            ctx->obuf = p2;
  345|      0|            ctx->obuf_off = 0;
  346|      0|            ctx->obuf_len = 0;
  347|      0|            ctx->obuf_size = obs;
  348|      0|        }
  349|  1.31k|        break;
  350|      0|    case BIO_C_DO_STATE_MACHINE:
  ------------------
  |  |  435|      0|#define BIO_C_DO_STATE_MACHINE 101
  ------------------
  |  Branch (350:5): [True: 0, False: 6.30k]
  ------------------
  351|      0|        if (b->next_bio == NULL)
  ------------------
  |  Branch (351:13): [True: 0, False: 0]
  ------------------
  352|      0|            return 0;
  353|      0|        BIO_clear_retry_flags(b);
  ------------------
  |  |  263|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  354|      0|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  355|      0|        BIO_copy_next_retry(b);
  356|      0|        break;
  357|       |
  358|  2.35k|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|  2.35k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (358:5): [True: 2.35k, False: 3.94k]
  ------------------
  359|  2.35k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (359:13): [True: 0, False: 2.35k]
  ------------------
  360|      0|            return 0;
  361|  2.35k|        if (ctx->obuf_len <= 0) {
  ------------------
  |  Branch (361:13): [True: 0, False: 2.35k]
  ------------------
  362|      0|            ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  363|      0|            BIO_copy_next_retry(b);
  364|      0|            break;
  365|      0|        }
  366|       |
  367|  4.71k|        for (;;) {
  368|  4.71k|            BIO_clear_retry_flags(b);
  ------------------
  |  |  263|  4.71k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  4.71k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  4.71k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  4.71k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  4.71k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  4.71k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  369|  4.71k|            if (ctx->obuf_len > 0) {
  ------------------
  |  Branch (369:17): [True: 2.35k, False: 2.35k]
  ------------------
  370|  2.35k|                r = BIO_write(b->next_bio,
  371|  2.35k|                    &(ctx->obuf[ctx->obuf_off]), ctx->obuf_len);
  372|  2.35k|                BIO_copy_next_retry(b);
  373|  2.35k|                if (r <= 0)
  ------------------
  |  Branch (373:21): [True: 0, False: 2.35k]
  ------------------
  374|      0|                    return (long)r;
  375|  2.35k|                ctx->obuf_off += r;
  376|  2.35k|                ctx->obuf_len -= r;
  377|  2.35k|            } else {
  378|  2.35k|                ctx->obuf_len = 0;
  379|  2.35k|                ctx->obuf_off = 0;
  380|  2.35k|                break;
  381|  2.35k|            }
  382|  4.71k|        }
  383|  2.35k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  384|  2.35k|        BIO_copy_next_retry(b);
  385|  2.35k|        break;
  386|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (386:5): [True: 0, False: 6.30k]
  ------------------
  387|      0|        dbio = (BIO *)ptr;
  388|      0|        if (BIO_set_read_buffer_size(dbio, ctx->ibuf_size) <= 0 || BIO_set_write_buffer_size(dbio, ctx->obuf_size) <= 0)
  ------------------
  |  |  625|      0|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  451|      0|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
                      if (BIO_set_read_buffer_size(dbio, ctx->ibuf_size) <= 0 || BIO_set_write_buffer_size(dbio, ctx->obuf_size) <= 0)
  ------------------
  |  |  626|      0|#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
  |  |  ------------------
  |  |  |  |  451|      0|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (388:13): [True: 0, False: 0]
  |  Branch (388:68): [True: 0, False: 0]
  ------------------
  389|      0|            ret = 0;
  390|      0|        break;
  391|      0|    case BIO_CTRL_PEEK:
  ------------------
  |  |  106|      0|#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
  ------------------
  |  Branch (391:5): [True: 0, False: 6.30k]
  ------------------
  392|       |        /* Ensure there's stuff in the input buffer */
  393|      0|        {
  394|      0|            char fake_buf[1];
  395|      0|            (void)buffer_read(b, fake_buf, 0);
  396|      0|        }
  397|      0|        if (num > ctx->ibuf_len)
  ------------------
  |  Branch (397:13): [True: 0, False: 0]
  ------------------
  398|      0|            num = ctx->ibuf_len;
  399|      0|        memcpy(ptr, &(ctx->ibuf[ctx->ibuf_off]), num);
  400|      0|        ret = num;
  401|      0|        break;
  402|  2.63k|    default:
  ------------------
  |  Branch (402:5): [True: 2.63k, False: 3.67k]
  ------------------
  403|  2.63k|        if (b->next_bio == NULL)
  ------------------
  |  Branch (403:13): [True: 0, False: 2.63k]
  ------------------
  404|      0|            return 0;
  405|  2.63k|        ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
  406|  2.63k|        break;
  407|  6.30k|    }
  408|  6.30k|    return ret;
  409|  6.30k|}
bf_buff.c:buffer_new:
   46|  1.31k|{
   47|  1.31k|    BIO_F_BUFFER_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|  1.31k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|  1.31k|    if (ctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 1.31k]
  ------------------
   50|      0|        return 0;
   51|  1.31k|    ctx->ibuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  1.31k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   52|  1.31k|    ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  106|  1.31k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|  1.31k|    if (ctx->ibuf == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 1.31k]
  ------------------
   54|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|      0|        return 0;
   56|      0|    }
   57|  1.31k|    ctx->obuf_size = DEFAULT_BUFFER_SIZE;
  ------------------
  |  |   23|  1.31k|#define DEFAULT_BUFFER_SIZE 4096
  ------------------
   58|  1.31k|    ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);
  ------------------
  |  |  106|  1.31k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|  1.31k|    if (ctx->obuf == NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 1.31k]
  ------------------
   60|      0|        OPENSSL_free(ctx->ibuf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|        return 0;
   63|      0|    }
   64|       |
   65|  1.31k|    bi->init = 1;
   66|  1.31k|    bi->ptr = (char *)ctx;
   67|  1.31k|    bi->flags = 0;
   68|  1.31k|    return 1;
   69|  1.31k|}
bf_buff.c:buffer_free:
   72|  1.31k|{
   73|  1.31k|    BIO_F_BUFFER_CTX *b;
   74|       |
   75|  1.31k|    if (a == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 1.31k]
  ------------------
   76|      0|        return 0;
   77|  1.31k|    b = (BIO_F_BUFFER_CTX *)a->ptr;
   78|  1.31k|    OPENSSL_free(b->ibuf);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|  1.31k|    OPENSSL_free(b->obuf);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|  1.31k|    OPENSSL_free(a->ptr);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   81|       |    a->ptr = NULL;
   82|  1.31k|    a->init = 0;
   83|  1.31k|    a->flags = 0;
   84|  1.31k|    return 1;
   85|  1.31k|}

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

BIO_new_ex:
   82|  1.15M|{
   83|  1.15M|    BIO *bio = OPENSSL_zalloc(sizeof(*bio));
  ------------------
  |  |  108|  1.15M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|       |
   85|  1.15M|    if (bio == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 1.15M]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|  1.15M|    bio->libctx = libctx;
   89|  1.15M|    bio->method = method;
   90|  1.15M|    bio->shutdown = 1;
   91|       |
   92|  1.15M|    if (!CRYPTO_NEW_REF(&bio->references, 1))
  ------------------
  |  Branch (92:9): [True: 0, False: 1.15M]
  ------------------
   93|      0|        goto err;
   94|       |
   95|  1.15M|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data))
  ------------------
  |  |  262|  1.15M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  |  Branch (95:9): [True: 0, False: 1.15M]
  ------------------
   96|      0|        goto err;
   97|       |
   98|  1.15M|    if (method->create != NULL && !method->create(bio)) {
  ------------------
  |  Branch (98:9): [True: 1.15M, False: 0]
  |  Branch (98:35): [True: 0, False: 1.15M]
  ------------------
   99|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data);
  ------------------
  |  |  262|      0|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  101|      0|        goto err;
  102|      0|    }
  103|  1.15M|    if (method->create == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 1.15M]
  ------------------
  104|      0|        bio->init = 1;
  105|       |
  106|  1.15M|    return bio;
  107|       |
  108|      0|err:
  109|      0|    CRYPTO_FREE_REF(&bio->references);
  110|      0|    OPENSSL_free(bio);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |    return NULL;
  112|  1.15M|}
BIO_new:
  115|  1.15M|{
  116|       |    return BIO_new_ex(NULL, method);
  117|  1.15M|}
BIO_free:
  120|  1.97M|{
  121|  1.97M|    int ret;
  122|       |
  123|  1.97M|    if (a == NULL)
  ------------------
  |  Branch (123:9): [True: 427k, False: 1.55M]
  ------------------
  124|   427k|        return 0;
  125|       |
  126|  1.55M|    if (CRYPTO_DOWN_REF(&a->references, &ret) <= 0)
  ------------------
  |  Branch (126:9): [True: 0, False: 1.55M]
  ------------------
  127|      0|        return 0;
  128|       |
  129|  1.55M|    REF_PRINT_COUNT("BIO", ret, a);
  ------------------
  |  |  301|  1.55M|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.55M|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  1.55M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  1.55M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  130|  1.55M|    if (ret > 0)
  ------------------
  |  Branch (130:9): [True: 394k, False: 1.15M]
  ------------------
  131|   394k|        return 1;
  132|  1.15M|    REF_ASSERT_ISNT(ret < 0);
  ------------------
  |  |  293|  1.15M|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.15M]
  |  |  ------------------
  ------------------
  133|       |
  134|  1.15M|    if (HAS_CALLBACK(a)) {
  ------------------
  |  |   26|  1.15M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 1.15M]
  |  |  |  Branch (26:51): [True: 0, False: 1.15M]
  |  |  ------------------
  ------------------
  135|      0|        ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  291|      0|#define BIO_CB_FREE 0x01
  ------------------
  136|      0|        if (ret <= 0)
  ------------------
  |  Branch (136:13): [True: 0, False: 0]
  ------------------
  137|      0|            return 0;
  138|      0|    }
  139|       |
  140|  1.15M|    if ((a->method != NULL) && (a->method->destroy != NULL))
  ------------------
  |  Branch (140:9): [True: 1.15M, False: 0]
  |  Branch (140:32): [True: 1.15M, False: 0]
  ------------------
  141|  1.15M|        a->method->destroy(a);
  142|       |
  143|  1.15M|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
  ------------------
  |  |  262|  1.15M|#define CRYPTO_EX_INDEX_BIO 12
  ------------------
  144|       |
  145|  1.15M|    CRYPTO_FREE_REF(&a->references);
  146|       |
  147|  1.15M|    OPENSSL_free(a);
  ------------------
  |  |  131|  1.15M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|       |
  149|  1.15M|    return 1;
  150|  1.15M|}
BIO_set_data:
  153|   383k|{
  154|   383k|    a->ptr = ptr;
  155|   383k|}
BIO_get_data:
  158|  1.15M|{
  159|  1.15M|    return a->ptr;
  160|  1.15M|}
BIO_set_init:
  163|   764k|{
  164|   764k|    a->init = init;
  165|   764k|}
BIO_set_shutdown:
  173|  1.31k|{
  174|  1.31k|    a->shutdown = shut;
  175|  1.31k|}
BIO_up_ref:
  188|   394k|{
  189|   394k|    int i;
  190|       |
  191|   394k|    if (CRYPTO_UP_REF(&a->references, &i) <= 0)
  ------------------
  |  Branch (191:9): [True: 0, False: 394k]
  ------------------
  192|      0|        return 0;
  193|       |
  194|   394k|    REF_PRINT_COUNT("BIO", i, a);
  ------------------
  |  |  301|   394k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   394k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   394k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   394k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|   394k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   394k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 394k]
  |  |  ------------------
  ------------------
  196|   394k|    return i > 1;
  197|   394k|}
BIO_clear_flags:
  200|  5.30M|{
  201|  5.30M|    b->flags &= ~flags;
  202|  5.30M|}
BIO_test_flags:
  205|  6.13k|{
  206|  6.13k|    return (b->flags & flags);
  207|  6.13k|}
BIO_set_flags:
  210|  4.96k|{
  211|  4.96k|    b->flags |= flags;
  212|  4.96k|}
BIO_read:
  302|   955k|{
  303|   955k|    size_t readbytes;
  304|   955k|    int ret;
  305|       |
  306|   955k|    if (dlen < 0)
  ------------------
  |  Branch (306:9): [True: 0, False: 955k]
  ------------------
  307|      0|        return 0;
  308|       |
  309|   955k|    ret = bio_read_intern(b, data, (size_t)dlen, &readbytes);
  310|       |
  311|   955k|    if (ret > 0) {
  ------------------
  |  Branch (311:9): [True: 954k, False: 1.16k]
  ------------------
  312|       |        /* *readbytes should always be <= dlen */
  313|   954k|        ret = (int)readbytes;
  314|   954k|    }
  315|       |
  316|   955k|    return ret;
  317|   955k|}
BIO_read_ex:
  320|   762k|{
  321|   762k|    return bio_read_intern(b, data, dlen, readbytes) > 0;
  322|   762k|}
BIO_write:
  367|  6.00k|{
  368|  6.00k|    size_t written;
  369|  6.00k|    int ret;
  370|       |
  371|  6.00k|    if (dlen <= 0)
  ------------------
  |  Branch (371:9): [True: 0, False: 6.00k]
  ------------------
  372|      0|        return 0;
  373|       |
  374|  6.00k|    ret = bio_write_intern(b, data, (size_t)dlen, &written);
  375|       |
  376|  6.00k|    if (ret > 0) {
  ------------------
  |  Branch (376:9): [True: 6.00k, False: 0]
  ------------------
  377|       |        /* written should always be <= dlen */
  378|  6.00k|        ret = (int)written;
  379|  6.00k|    }
  380|       |
  381|  6.00k|    return ret;
  382|  6.00k|}
BIO_write_ex:
  385|    107|{
  386|    107|    return bio_write_intern(b, data, dlen, written) > 0
  ------------------
  |  Branch (386:12): [True: 107, False: 0]
  ------------------
  387|      0|        || (b != NULL && dlen == 0); /* order is important for *written */
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  |  Branch (387:26): [True: 0, False: 0]
  ------------------
  388|    107|}
BIO_puts:
  495|  4.33M|{
  496|  4.33M|    int ret;
  497|  4.33M|    size_t written = 0;
  498|       |
  499|  4.33M|    if (b == NULL) {
  ------------------
  |  Branch (499:9): [True: 0, False: 4.33M]
  ------------------
  500|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  501|      0|        return -1;
  502|      0|    }
  503|  4.33M|    if (b->method == NULL || b->method->bputs == NULL) {
  ------------------
  |  Branch (503:9): [True: 0, False: 4.33M]
  |  Branch (503:30): [True: 0, False: 4.33M]
  ------------------
  504|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  505|      0|        return -2;
  506|      0|    }
  507|       |
  508|  4.33M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  4.33M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.33M]
  |  |  |  Branch (26:51): [True: 0, False: 4.33M]
  |  |  ------------------
  ------------------
  509|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS, buf, 0, 0, 0L, 1L, NULL);
  ------------------
  |  |  294|      0|#define BIO_CB_PUTS 0x04
  ------------------
  510|      0|        if (ret <= 0)
  ------------------
  |  Branch (510:13): [True: 0, False: 0]
  ------------------
  511|      0|            return ret;
  512|      0|    }
  513|       |
  514|  4.33M|    if (!b->init) {
  ------------------
  |  Branch (514:9): [True: 0, False: 4.33M]
  ------------------
  515|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  516|      0|        return -1;
  517|      0|    }
  518|       |
  519|  4.33M|    ret = b->method->bputs(b, buf);
  520|       |
  521|  4.33M|    if (ret > 0) {
  ------------------
  |  Branch (521:9): [True: 4.33M, False: 0]
  ------------------
  522|  4.33M|        b->num_write += (uint64_t)ret;
  523|  4.33M|        written = ret;
  524|  4.33M|        ret = 1;
  525|  4.33M|    }
  526|       |
  527|  4.33M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  4.33M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.33M]
  |  |  |  Branch (26:51): [True: 0, False: 4.33M]
  |  |  ------------------
  ------------------
  528|      0|        ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  294|      0|#define BIO_CB_PUTS 0x04
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_PUTS | BIO_CB_RETURN, buf, 0, 0,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  529|      0|            0L, ret, &written);
  530|       |
  531|  4.33M|    if (ret > 0) {
  ------------------
  |  Branch (531:9): [True: 4.33M, False: 0]
  ------------------
  532|  4.33M|        if (written > INT_MAX) {
  ------------------
  |  Branch (532:13): [True: 0, False: 4.33M]
  ------------------
  533|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_LENGTH_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|            ret = -1;
  535|  4.33M|        } else {
  536|  4.33M|            ret = (int)written;
  537|  4.33M|        }
  538|  4.33M|    }
  539|       |
  540|  4.33M|    return ret;
  541|  4.33M|}
BIO_gets:
  544|  4.71M|{
  545|  4.71M|    int ret;
  546|  4.71M|    size_t readbytes = 0;
  547|       |
  548|  4.71M|    if (b == NULL) {
  ------------------
  |  Branch (548:9): [True: 0, False: 4.71M]
  ------------------
  549|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  550|      0|        return -1;
  551|      0|    }
  552|  4.71M|    if (b->method == NULL || b->method->bgets == NULL) {
  ------------------
  |  Branch (552:9): [True: 0, False: 4.71M]
  |  Branch (552:30): [True: 0, False: 4.71M]
  ------------------
  553|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  554|      0|        return -2;
  555|      0|    }
  556|       |
  557|  4.71M|    if (size < 0) {
  ------------------
  |  Branch (557:9): [True: 0, False: 4.71M]
  ------------------
  558|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  559|      0|        return -1;
  560|      0|    }
  561|       |
  562|  4.71M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  4.71M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.71M]
  |  |  |  Branch (26:51): [True: 0, False: 4.71M]
  |  |  ------------------
  ------------------
  563|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS, buf, size, 0, 0L, 1, NULL);
  ------------------
  |  |  295|      0|#define BIO_CB_GETS 0x05
  ------------------
  564|      0|        if (ret <= 0)
  ------------------
  |  Branch (564:13): [True: 0, False: 0]
  ------------------
  565|      0|            return ret;
  566|      0|    }
  567|       |
  568|  4.71M|    if (!b->init) {
  ------------------
  |  Branch (568:9): [True: 0, False: 4.71M]
  ------------------
  569|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  570|      0|        return -1;
  571|      0|    }
  572|       |
  573|  4.71M|    ret = b->method->bgets(b, buf, size);
  574|       |
  575|  4.71M|    if (ret > 0) {
  ------------------
  |  Branch (575:9): [True: 4.71M, False: 1.33k]
  ------------------
  576|  4.71M|        readbytes = ret;
  577|  4.71M|        ret = 1;
  578|  4.71M|    }
  579|       |
  580|  4.71M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  4.71M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 4.71M]
  |  |  |  Branch (26:51): [True: 0, False: 4.71M]
  |  |  ------------------
  ------------------
  581|      0|        ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  295|      0|#define BIO_CB_GETS 0x05
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_GETS | BIO_CB_RETURN, buf, size,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  582|      0|            0, 0L, ret, &readbytes);
  583|       |
  584|  4.71M|    if (ret > 0) {
  ------------------
  |  Branch (584:9): [True: 4.71M, False: 1.33k]
  ------------------
  585|       |        /* Shouldn't happen */
  586|  4.71M|        if (readbytes > (size_t)size)
  ------------------
  |  Branch (586:13): [True: 0, False: 4.71M]
  ------------------
  587|      0|            ret = -1;
  588|  4.71M|        else
  589|  4.71M|            ret = (int)readbytes;
  590|  4.71M|    }
  591|       |
  592|  4.71M|    return ret;
  593|  4.71M|}
BIO_int_ctrl:
  639|  1.31k|{
  640|  1.31k|    int i;
  641|       |
  642|  1.31k|    i = iarg;
  643|  1.31k|    return BIO_ctrl(b, cmd, larg, (char *)&i);
  644|  1.31k|}
BIO_ctrl:
  657|  1.92M|{
  658|  1.92M|    long ret;
  659|       |
  660|  1.92M|    if (b == NULL)
  ------------------
  |  Branch (660:9): [True: 0, False: 1.92M]
  ------------------
  661|      0|        return -1;
  662|  1.92M|    if (b->method == NULL || b->method->ctrl == NULL) {
  ------------------
  |  Branch (662:9): [True: 0, False: 1.92M]
  |  Branch (662:30): [True: 0, False: 1.92M]
  ------------------
  663|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  664|      0|        return -2;
  665|      0|    }
  666|       |
  667|  1.92M|    if (HAS_CALLBACK(b)) {
  ------------------
  |  |   26|  1.92M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 1.92M]
  |  |  |  Branch (26:51): [True: 0, False: 1.92M]
  |  |  ------------------
  ------------------
  668|      0|        ret = bio_call_callback(b, BIO_CB_CTRL, parg, 0, cmd, larg, 1L, NULL);
  ------------------
  |  |  296|      0|#define BIO_CB_CTRL 0x06
  ------------------
  669|      0|        if (ret <= 0)
  ------------------
  |  Branch (669:13): [True: 0, False: 0]
  ------------------
  670|      0|            return ret;
  671|      0|    }
  672|       |
  673|  1.92M|    ret = b->method->ctrl(b, cmd, larg, parg);
  674|       |
  675|  1.92M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  1.92M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 1.92M]
  |  |  |  Branch (26:51): [True: 0, False: 1.92M]
  |  |  ------------------
  ------------------
  676|      0|        ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  296|      0|#define BIO_CB_CTRL 0x06
  ------------------
                      ret = bio_call_callback(b, BIO_CB_CTRL | BIO_CB_RETURN, parg, 0, cmd,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  677|      0|            larg, ret, NULL);
  678|       |
  679|  1.92M|    return ret;
  680|  1.92M|}
BIO_push:
  743|  1.31k|{
  744|  1.31k|    BIO *lb;
  745|       |
  746|  1.31k|    if (b == NULL)
  ------------------
  |  Branch (746:9): [True: 0, False: 1.31k]
  ------------------
  747|      0|        return bio;
  748|  1.31k|    lb = b;
  749|  1.31k|    while (lb->next_bio != NULL)
  ------------------
  |  Branch (749:12): [True: 0, False: 1.31k]
  ------------------
  750|      0|        lb = lb->next_bio;
  751|  1.31k|    lb->next_bio = bio;
  752|  1.31k|    if (bio != NULL)
  ------------------
  |  Branch (752:9): [True: 1.31k, False: 0]
  ------------------
  753|  1.31k|        bio->prev_bio = lb;
  754|       |    /* called to do internal processing */
  755|  1.31k|    BIO_ctrl(b, BIO_CTRL_PUSH, 0, lb);
  ------------------
  |  |   95|  1.31k|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  756|  1.31k|    return b;
  757|  1.31k|}
BIO_pop:
  761|  1.31k|{
  762|  1.31k|    BIO *ret;
  763|       |
  764|  1.31k|    if (b == NULL)
  ------------------
  |  Branch (764:9): [True: 0, False: 1.31k]
  ------------------
  765|      0|        return NULL;
  766|  1.31k|    ret = b->next_bio;
  767|       |
  768|  1.31k|    BIO_ctrl(b, BIO_CTRL_POP, 0, b);
  ------------------
  |  |   96|  1.31k|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  769|       |
  770|  1.31k|    if (b->prev_bio != NULL)
  ------------------
  |  Branch (770:9): [True: 0, False: 1.31k]
  ------------------
  771|      0|        b->prev_bio->next_bio = b->next_bio;
  772|  1.31k|    if (b->next_bio != NULL)
  ------------------
  |  Branch (772:9): [True: 1.31k, False: 0]
  ------------------
  773|  1.31k|        b->next_bio->prev_bio = b->prev_bio;
  774|       |
  775|  1.31k|    b->next_bio = NULL;
  776|       |    b->prev_bio = NULL;
  777|  1.31k|    return ret;
  778|  1.31k|}
BIO_free_all:
  846|  5.26k|{
  847|  5.26k|    BIO *b;
  848|  5.26k|    int ref;
  849|       |
  850|  6.58k|    while (bio != NULL) {
  ------------------
  |  Branch (850:12): [True: 2.63k, False: 3.94k]
  ------------------
  851|  2.63k|        b = bio;
  852|  2.63k|        CRYPTO_GET_REF(&b->references, &ref);
  853|  2.63k|        bio = bio->next_bio;
  854|  2.63k|        BIO_free(b);
  855|       |        /* Since ref count > 1, don't free anyone else. */
  856|  2.63k|        if (ref > 1)
  ------------------
  |  Branch (856:13): [True: 1.31k, False: 1.31k]
  ------------------
  857|  1.31k|            break;
  858|  2.63k|    }
  859|  5.26k|}
BIO_copy_next_retry:
  908|  4.71k|{
  909|  4.71k|    BIO_set_flags(b, BIO_get_retry_flags(b->next_bio));
  ------------------
  |  |  265|  4.71k|    BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  4.71k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  4.71k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  4.71k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  4.71k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  4.71k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  910|  4.71k|    b->retry_reason = b->next_bio->retry_reason;
  911|  4.71k|}
bio_cleanup:
  943|      1|{
  944|      1|#ifndef OPENSSL_NO_SOCK
  945|      1|    bio_sock_cleanup_int();
  946|      1|    CRYPTO_THREAD_lock_free(bio_lookup_lock);
  947|       |    bio_lookup_lock = NULL;
  948|      1|#endif
  949|      1|    CRYPTO_FREE_REF(&bio_type_count);
  950|      1|}
bio_lib.c:bio_read_intern:
  263|  1.71M|{
  264|  1.71M|    int ret;
  265|       |
  266|  1.71M|    if (b == NULL) {
  ------------------
  |  Branch (266:9): [True: 0, False: 1.71M]
  ------------------
  267|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  268|      0|        return -1;
  269|      0|    }
  270|  1.71M|    if (b->method == NULL || b->method->bread == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 1.71M]
  |  Branch (270:30): [True: 0, False: 1.71M]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return -2;
  273|      0|    }
  274|       |
  275|  1.71M|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  3.43M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 1.71M]
  |  |  |  Branch (26:51): [True: 0, False: 1.71M]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_READ, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  292|      0|#define BIO_CB_READ 0x02
  ------------------
  |  Branch (275:28): [True: 0, False: 0]
  ------------------
  276|      0|        return ret;
  277|       |
  278|  1.71M|    if (!b->init) {
  ------------------
  |  Branch (278:9): [True: 0, False: 1.71M]
  ------------------
  279|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|        return -1;
  281|      0|    }
  282|       |
  283|  1.71M|    ret = b->method->bread(b, data, dlen, readbytes);
  284|       |
  285|  1.71M|    if (ret > 0)
  ------------------
  |  Branch (285:9): [True: 1.71M, False: 1.16k]
  ------------------
  286|  1.71M|        b->num_read += (uint64_t)*readbytes;
  287|       |
  288|  1.71M|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  1.71M|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 1.71M]
  |  |  |  Branch (26:51): [True: 0, False: 1.71M]
  |  |  ------------------
  ------------------
  289|      0|        ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  292|      0|#define BIO_CB_READ 0x02
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_READ | BIO_CB_RETURN, data,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  290|      0|            dlen, 0, 0L, ret, readbytes);
  291|       |
  292|       |    /* Shouldn't happen */
  293|  1.71M|    if (ret > 0 && *readbytes > dlen) {
  ------------------
  |  Branch (293:9): [True: 1.71M, False: 1.16k]
  |  Branch (293:20): [True: 0, False: 1.71M]
  ------------------
  294|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  295|      0|        return -1;
  296|      0|    }
  297|       |
  298|  1.71M|    return ret;
  299|  1.71M|}
bio_lib.c:bio_write_intern:
  326|  6.10k|{
  327|  6.10k|    size_t local_written;
  328|  6.10k|    int ret;
  329|       |
  330|  6.10k|    if (written != NULL)
  ------------------
  |  Branch (330:9): [True: 6.10k, False: 0]
  ------------------
  331|  6.10k|        *written = 0;
  332|       |    /*
  333|       |     * b == NULL is not an error but just means that zero bytes are written.
  334|       |     * Do not raise an error here.
  335|       |     */
  336|  6.10k|    if (b == NULL)
  ------------------
  |  Branch (336:9): [True: 0, False: 6.10k]
  ------------------
  337|      0|        return 0;
  338|       |
  339|  6.10k|    if (b->method == NULL || b->method->bwrite == NULL) {
  ------------------
  |  Branch (339:9): [True: 0, False: 6.10k]
  |  Branch (339:30): [True: 0, False: 6.10k]
  ------------------
  340|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNSUPPORTED_METHOD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  341|      0|        return -2;
  342|      0|    }
  343|       |
  344|  6.10k|    if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |   26|  12.2k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 6.10k]
  |  |  |  Branch (26:51): [True: 0, False: 6.10k]
  |  |  ------------------
  ------------------
                  if (HAS_CALLBACK(b) && ((ret = (int)bio_call_callback(b, BIO_CB_WRITE, data, dlen, 0, 0L, 1L, NULL)) <= 0))
  ------------------
  |  |  293|      0|#define BIO_CB_WRITE 0x03
  ------------------
  |  Branch (344:28): [True: 0, False: 0]
  ------------------
  345|      0|        return ret;
  346|       |
  347|  6.10k|    if (!b->init) {
  ------------------
  |  Branch (347:9): [True: 0, False: 6.10k]
  ------------------
  348|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_UNINITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  349|      0|        return -1;
  350|      0|    }
  351|       |
  352|  6.10k|    ret = b->method->bwrite(b, data, dlen, &local_written);
  353|       |
  354|  6.10k|    if (ret > 0)
  ------------------
  |  Branch (354:9): [True: 6.10k, False: 0]
  ------------------
  355|  6.10k|        b->num_write += (uint64_t)local_written;
  356|       |
  357|  6.10k|    if (HAS_CALLBACK(b))
  ------------------
  |  |   26|  6.10k|#define HAS_CALLBACK(b) ((b)->callback != NULL || (b)->callback_ex != NULL)
  |  |  ------------------
  |  |  |  Branch (26:26): [True: 0, False: 6.10k]
  |  |  |  Branch (26:51): [True: 0, False: 6.10k]
  |  |  ------------------
  ------------------
  358|      0|        ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  293|      0|#define BIO_CB_WRITE 0x03
  ------------------
                      ret = (int)bio_call_callback(b, BIO_CB_WRITE | BIO_CB_RETURN, data,
  ------------------
  |  |  304|      0|#define BIO_CB_RETURN 0x80
  ------------------
  359|      0|            dlen, 0, 0L, ret, &local_written);
  360|       |
  361|  6.10k|    if (written != NULL)
  ------------------
  |  Branch (361:9): [True: 6.10k, False: 0]
  ------------------
  362|  6.10k|        *written = local_written;
  363|  6.10k|    return ret;
  364|  6.10k|}

BIO_meth_new:
   38|  2.07k|{
   39|  2.07k|    BIO_METHOD *biom = OPENSSL_zalloc(sizeof(BIO_METHOD));
  ------------------
  |  |  108|  2.07k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|       |
   41|  2.07k|    if (biom == NULL
  ------------------
  |  Branch (41:9): [True: 0, False: 2.07k]
  ------------------
   42|  2.07k|        || (biom->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  135|  2.07k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:12): [True: 0, False: 2.07k]
  ------------------
   43|      0|        OPENSSL_free(biom);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|  2.07k|    biom->type = type;
   47|  2.07k|    return biom;
   48|  2.07k|}
BIO_meth_free:
   51|  2.07k|{
   52|  2.07k|    if (biom != NULL) {
  ------------------
  |  Branch (52:9): [True: 2.07k, False: 0]
  ------------------
   53|  2.07k|        OPENSSL_free(biom->name);
  ------------------
  |  |  131|  2.07k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   54|  2.07k|        OPENSSL_free(biom);
  ------------------
  |  |  131|  2.07k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   55|  2.07k|    }
   56|  2.07k|}
bwrite_conv:
   73|  6.10k|{
   74|  6.10k|    int ret;
   75|       |
   76|  6.10k|    if (datal > INT_MAX)
  ------------------
  |  Branch (76:9): [True: 0, False: 6.10k]
  ------------------
   77|      0|        datal = INT_MAX;
   78|       |
   79|  6.10k|    ret = bio->method->bwrite_old(bio, data, (int)datal);
   80|       |
   81|  6.10k|    if (ret <= 0) {
  ------------------
  |  Branch (81:9): [True: 0, False: 6.10k]
  ------------------
   82|      0|        *written = 0;
   83|      0|        return ret;
   84|      0|    }
   85|       |
   86|  6.10k|    *written = (size_t)ret;
   87|       |
   88|  6.10k|    return 1;
   89|  6.10k|}
BIO_meth_set_write:
   93|  1.31k|{
   94|  1.31k|    biom->bwrite_old = bwrite;
   95|  1.31k|    biom->bwrite = bwrite_conv;
   96|  1.31k|    return 1;
   97|  1.31k|}
BIO_meth_set_write_ex:
  101|    758|{
  102|       |    biom->bwrite_old = NULL;
  103|    758|    biom->bwrite = bwrite;
  104|    758|    return 1;
  105|    758|}
bread_conv:
  121|   955k|{
  122|   955k|    int ret;
  123|       |
  124|   955k|    if (datal > INT_MAX)
  ------------------
  |  Branch (124:9): [True: 0, False: 955k]
  ------------------
  125|      0|        datal = INT_MAX;
  126|       |
  127|   955k|    ret = bio->method->bread_old(bio, data, (int)datal);
  128|       |
  129|   955k|    if (ret <= 0) {
  ------------------
  |  Branch (129:9): [True: 1.16k, False: 954k]
  ------------------
  130|  1.16k|        *readbytes = 0;
  131|  1.16k|        return ret;
  132|  1.16k|    }
  133|       |
  134|   954k|    *readbytes = (size_t)ret;
  135|       |
  136|   954k|    return 1;
  137|   955k|}
BIO_meth_set_read:
  141|  1.31k|{
  142|  1.31k|    biom->bread_old = bread;
  143|  1.31k|    biom->bread = bread_conv;
  144|  1.31k|    return 1;
  145|  1.31k|}
BIO_meth_set_read_ex:
  149|    758|{
  150|       |    biom->bread_old = NULL;
  151|    758|    biom->bread = bread;
  152|    758|    return 1;
  153|    758|}
BIO_meth_set_puts:
  164|    758|{
  165|    758|    biom->bputs = bputs;
  166|    758|    return 1;
  167|    758|}
BIO_meth_set_gets:
  178|    758|{
  179|    758|    biom->bgets = bgets;
  180|    758|    return 1;
  181|    758|}
BIO_meth_set_ctrl:
  192|  2.07k|{
  193|  2.07k|    biom->ctrl = ctrl;
  194|  2.07k|    return 1;
  195|  2.07k|}
BIO_meth_set_create:
  205|  2.07k|{
  206|  2.07k|    biom->create = create;
  207|  2.07k|    return 1;
  208|  2.07k|}
BIO_meth_set_destroy:
  218|  2.07k|{
  219|  2.07k|    biom->destroy = destroy;
  220|  2.07k|    return 1;
  221|  2.07k|}

BIO_snprintf:
 1094|   733k|{
 1095|   733k|    va_list args;
 1096|   733k|    int ret;
 1097|       |
 1098|   733k|    va_start(args, format);
 1099|       |
 1100|   733k|    ret = BIO_vsnprintf(buf, n, format, args);
 1101|       |
 1102|       |    va_end(args);
 1103|   733k|    return ret;
 1104|   733k|}
BIO_vsnprintf:
 1107|   799k|{
 1108|   799k|    size_t retlen;
 1109|   799k|    int truncated;
 1110|       |
 1111|   799k|    if (!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))
  ------------------
  |  Branch (1111:9): [True: 0, False: 799k]
  ------------------
 1112|      0|        return -1;
 1113|       |
 1114|   799k|    if (truncated)
  ------------------
  |  Branch (1114:9): [True: 3.50k, False: 795k]
  ------------------
 1115|       |        /*
 1116|       |         * In case of truncation, return -1 like traditional snprintf.
 1117|       |         * (Current drafts for ISO/IEC 9899 say snprintf should return the
 1118|       |         * number of characters that would have been written, had the buffer
 1119|       |         * been large enough.)
 1120|       |         */
 1121|  3.50k|        return -1;
 1122|   795k|    return (retlen <= INT_MAX) ? (int)retlen : -1;
  ------------------
  |  Branch (1122:12): [True: 795k, False: 0]
  ------------------
 1123|   799k|}
bio_print.c:_dopr:
  104|   799k|{
  105|   799k|    char ch;
  106|   799k|    int64_t value;
  107|   799k|#ifndef OPENSSL_SYS_UEFI
  108|   799k|    LDOUBLE fvalue;
  ------------------
  |  |   28|   799k|#define LDOUBLE double
  ------------------
  109|   799k|#endif
  110|   799k|    char *strvalue;
  111|   799k|    int min;
  112|   799k|    int max;
  113|   799k|    int state;
  114|   799k|    int flags;
  115|   799k|    int cflags;
  116|   799k|    struct pr_desc desc = { *sbuffer, buffer, 0, *maxlen, 0 };
  117|   799k|    int ret = 0;
  118|       |
  119|   799k|    state = DP_S_DEFAULT;
  ------------------
  |  |   56|   799k|#define DP_S_DEFAULT 0
  ------------------
  120|   799k|    flags = cflags = min = 0;
  121|   799k|    max = -1;
  122|   799k|    ch = *format++;
  123|       |
  124|  9.27M|    while (state != DP_S_DONE) {
  ------------------
  |  |   63|  9.27M|#define DP_S_DONE 7
  ------------------
  |  Branch (124:12): [True: 8.47M, False: 799k]
  ------------------
  125|  8.47M|        if (ch == '\0')
  ------------------
  |  Branch (125:13): [True: 799k, False: 7.68M]
  ------------------
  126|   799k|            state = DP_S_DONE;
  ------------------
  |  |   63|   799k|#define DP_S_DONE 7
  ------------------
  127|       |
  128|  8.47M|        switch (state) {
  129|  3.10M|        case DP_S_DEFAULT:
  ------------------
  |  |   56|  3.10M|#define DP_S_DEFAULT 0
  ------------------
  |  Branch (129:9): [True: 3.10M, False: 5.37M]
  ------------------
  130|  3.10M|            if (ch == '%')
  ------------------
  |  Branch (130:17): [True: 914k, False: 2.18M]
  ------------------
  131|   914k|                state = DP_S_FLAGS;
  ------------------
  |  |   57|   914k|#define DP_S_FLAGS 1
  ------------------
  132|  2.18M|            else if (!doapr_outch(&desc, ch))
  ------------------
  |  Branch (132:22): [True: 0, False: 2.18M]
  ------------------
  133|      0|                goto out;
  134|  3.10M|            ch = *format++;
  135|  3.10M|            break;
  136|   916k|        case DP_S_FLAGS:
  ------------------
  |  |   57|   916k|#define DP_S_FLAGS 1
  ------------------
  |  Branch (136:9): [True: 916k, False: 7.56M]
  ------------------
  137|   916k|            switch (ch) {
  138|      0|            case '-':
  ------------------
  |  Branch (138:13): [True: 0, False: 916k]
  ------------------
  139|      0|                flags |= DP_F_MINUS;
  ------------------
  |  |   67|      0|#define DP_F_MINUS (1 << 0)
  ------------------
  140|      0|                ch = *format++;
  141|      0|                break;
  142|      0|            case '+':
  ------------------
  |  Branch (142:13): [True: 0, False: 916k]
  ------------------
  143|      0|                flags |= DP_F_PLUS;
  ------------------
  |  |   69|      0|#define DP_F_PLUS (1 << 1)
  ------------------
  144|      0|                ch = *format++;
  145|      0|                break;
  146|      0|            case ' ':
  ------------------
  |  Branch (146:13): [True: 0, False: 916k]
  ------------------
  147|      0|                flags |= DP_F_SPACE;
  ------------------
  |  |   71|      0|#define DP_F_SPACE (1 << 2)
  ------------------
  148|      0|                ch = *format++;
  149|      0|                break;
  150|      0|            case '#':
  ------------------
  |  Branch (150:13): [True: 0, False: 916k]
  ------------------
  151|      0|                flags |= DP_F_NUM;
  ------------------
  |  |   73|      0|#define DP_F_NUM (1 << 3)
  ------------------
  152|      0|                ch = *format++;
  153|      0|                break;
  154|  1.42k|            case '0':
  ------------------
  |  Branch (154:13): [True: 1.42k, False: 914k]
  ------------------
  155|  1.42k|                flags |= DP_F_ZERO;
  ------------------
  |  |   75|  1.42k|#define DP_F_ZERO (1 << 4)
  ------------------
  156|  1.42k|                ch = *format++;
  157|  1.42k|                break;
  158|   914k|            default:
  ------------------
  |  Branch (158:13): [True: 914k, False: 1.42k]
  ------------------
  159|   914k|                state = DP_S_MIN;
  ------------------
  |  |   58|   914k|#define DP_S_MIN 2
  ------------------
  160|   914k|                break;
  161|   916k|            }
  162|   916k|            break;
  163|   916k|        case DP_S_MIN: /* width */
  ------------------
  |  |   58|   916k|#define DP_S_MIN 2
  ------------------
  |  Branch (163:9): [True: 916k, False: 7.56M]
  ------------------
  164|   916k|            if (ossl_isdigit(ch)) {
  ------------------
  |  Branch (164:17): [True: 1.42k, False: 914k]
  ------------------
  165|       |                /*
  166|       |                 * Most implementations cap the possible explicitly specified
  167|       |                 * width by (INT_MAX / 10) * 10 - 1 or so (the standard gives
  168|       |                 * no clear limit on this), we can do the same.
  169|       |                 */
  170|  1.42k|                if (min < INT_MAX / 10)
  ------------------
  |  Branch (170:21): [True: 1.42k, False: 0]
  ------------------
  171|  1.42k|                    min = 10 * min + char_to_int(ch);
  ------------------
  |  |   96|  1.42k|#define char_to_int(p) (p - '0')
  ------------------
  172|      0|                else
  173|      0|                    goto out;
  174|  1.42k|                ch = *format++;
  175|   914k|            } else if (ch == '*') {
  ------------------
  |  Branch (175:24): [True: 0, False: 914k]
  ------------------
  176|      0|                min = va_arg(args, int);
  177|      0|                if (min < 0) {
  ------------------
  |  Branch (177:21): [True: 0, False: 0]
  ------------------
  178|      0|                    flags |= DP_F_MINUS;
  ------------------
  |  |   67|      0|#define DP_F_MINUS (1 << 0)
  ------------------
  179|      0|                    min = -min;
  180|      0|                }
  181|      0|                ch = *format++;
  182|      0|                state = DP_S_DOT;
  ------------------
  |  |   59|      0|#define DP_S_DOT 3
  ------------------
  183|      0|            } else
  184|   914k|                state = DP_S_DOT;
  ------------------
  |  |   59|   914k|#define DP_S_DOT 3
  ------------------
  185|   916k|            break;
  186|   916k|        case DP_S_DOT:
  ------------------
  |  |   59|   914k|#define DP_S_DOT 3
  ------------------
  |  Branch (186:9): [True: 914k, False: 7.56M]
  ------------------
  187|   914k|            if (ch == '.') {
  ------------------
  |  Branch (187:17): [True: 0, False: 914k]
  ------------------
  188|      0|                state = DP_S_MAX;
  ------------------
  |  |   60|      0|#define DP_S_MAX 4
  ------------------
  189|      0|                ch = *format++;
  190|      0|            } else
  191|   914k|                state = DP_S_MOD;
  ------------------
  |  |   61|   914k|#define DP_S_MOD 5
  ------------------
  192|   914k|            break;
  193|      0|        case DP_S_MAX: /* precision */
  ------------------
  |  |   60|      0|#define DP_S_MAX 4
  ------------------
  |  Branch (193:9): [True: 0, False: 8.47M]
  ------------------
  194|      0|            if (ossl_isdigit(ch)) {
  ------------------
  |  Branch (194:17): [True: 0, False: 0]
  ------------------
  195|      0|                if (max < 0)
  ------------------
  |  Branch (195:21): [True: 0, False: 0]
  ------------------
  196|      0|                    max = 0;
  197|       |                /*
  198|       |                 * Most implementations cap the possible explicitly specified
  199|       |                 * width by (INT_MAX / 10) * 10 - 1 or so (the standard gives
  200|       |                 * no clear limit on this), we can do the same.
  201|       |                 */
  202|      0|                if (max < INT_MAX / 10)
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|                    max = 10 * max + char_to_int(ch);
  ------------------
  |  |   96|      0|#define char_to_int(p) (p - '0')
  ------------------
  204|      0|                else
  205|      0|                    goto out;
  206|      0|                ch = *format++;
  207|      0|            } else if (ch == '*') {
  ------------------
  |  Branch (207:24): [True: 0, False: 0]
  ------------------
  208|      0|                max = va_arg(args, int);
  209|      0|                ch = *format++;
  210|      0|                state = DP_S_MOD;
  ------------------
  |  |   61|      0|#define DP_S_MOD 5
  ------------------
  211|      0|            } else {
  212|      0|                if (max < 0)
  ------------------
  |  Branch (212:21): [True: 0, False: 0]
  ------------------
  213|      0|                    max = 0;
  214|      0|                state = DP_S_MOD;
  ------------------
  |  |   61|      0|#define DP_S_MOD 5
  ------------------
  215|      0|            }
  216|      0|            break;
  217|   914k|        case DP_S_MOD:
  ------------------
  |  |   61|   914k|#define DP_S_MOD 5
  ------------------
  |  Branch (217:9): [True: 914k, False: 7.56M]
  ------------------
  218|   914k|            switch (ch) {
  219|      0|            case 'h':
  ------------------
  |  Branch (219:13): [True: 0, False: 914k]
  ------------------
  220|      0|                if (*format == 'h') {
  ------------------
  |  Branch (220:21): [True: 0, False: 0]
  ------------------
  221|      0|                    cflags = DP_C_CHAR;
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  222|      0|                    format++;
  223|      0|                } else {
  224|      0|                    cflags = DP_C_SHORT;
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  225|      0|                }
  226|      0|                ch = *format++;
  227|      0|                break;
  228|   730k|            case 'l':
  ------------------
  |  Branch (228:13): [True: 730k, False: 184k]
  ------------------
  229|   730k|                if (*format == 'l') {
  ------------------
  |  Branch (229:21): [True: 0, False: 730k]
  ------------------
  230|      0|                    cflags = DP_C_LLONG;
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  231|      0|                    format++;
  232|      0|                } else
  233|   730k|                    cflags = DP_C_LONG;
  ------------------
  |  |   84|   730k|#define DP_C_LONG 3
  ------------------
  234|   730k|                ch = *format++;
  235|   730k|                break;
  236|      0|            case 'q':
  ------------------
  |  Branch (236:13): [True: 0, False: 914k]
  ------------------
  237|      0|            case 'j':
  ------------------
  |  Branch (237:13): [True: 0, False: 914k]
  ------------------
  238|      0|                cflags = DP_C_LLONG;
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  239|      0|                ch = *format++;
  240|      0|                break;
  241|      0|            case 'L':
  ------------------
  |  Branch (241:13): [True: 0, False: 914k]
  ------------------
  242|      0|                cflags = DP_C_LDOUBLE;
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  243|      0|                ch = *format++;
  244|      0|                break;
  245|      0|            case 'z':
  ------------------
  |  Branch (245:13): [True: 0, False: 914k]
  ------------------
  246|      0|                cflags = DP_C_SIZE;
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  247|      0|                ch = *format++;
  248|      0|                break;
  249|      0|            case 't':
  ------------------
  |  Branch (249:13): [True: 0, False: 914k]
  ------------------
  250|      0|                cflags = DP_C_PTRDIFF;
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  251|      0|                ch = *format++;
  252|      0|                break;
  253|   184k|            default:
  ------------------
  |  Branch (253:13): [True: 184k, False: 730k]
  ------------------
  254|   184k|                break;
  255|   914k|            }
  256|   914k|            state = DP_S_CONV;
  ------------------
  |  |   62|   914k|#define DP_S_CONV 6
  ------------------
  257|   914k|            break;
  258|   914k|        case DP_S_CONV:
  ------------------
  |  |   62|   914k|#define DP_S_CONV 6
  ------------------
  |  Branch (258:9): [True: 914k, False: 7.56M]
  ------------------
  259|   914k|            switch (ch) {
  260|  35.9k|            case 'd':
  ------------------
  |  Branch (260:13): [True: 35.9k, False: 878k]
  ------------------
  261|  35.9k|            case 'i':
  ------------------
  |  Branch (261:13): [True: 0, False: 914k]
  ------------------
  262|  35.9k|                switch (cflags) {
  263|      0|                case DP_C_CHAR:
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  |  Branch (263:17): [True: 0, False: 35.9k]
  ------------------
  264|      0|                    value = (signed char)va_arg(args, int);
  265|      0|                    break;
  266|      0|                case DP_C_SHORT:
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  |  Branch (266:17): [True: 0, False: 35.9k]
  ------------------
  267|      0|                    value = (short int)va_arg(args, int);
  268|      0|                    break;
  269|      0|                case DP_C_LONG:
  ------------------
  |  |   84|      0|#define DP_C_LONG 3
  ------------------
  |  Branch (269:17): [True: 0, False: 35.9k]
  ------------------
  270|      0|                    value = va_arg(args, long int);
  271|      0|                    break;
  272|      0|                case DP_C_LLONG:
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  |  Branch (272:17): [True: 0, False: 35.9k]
  ------------------
  273|      0|                    value = va_arg(args, int64_t);
  274|      0|                    break;
  275|      0|                case DP_C_SIZE:
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  |  Branch (275:17): [True: 0, False: 35.9k]
  ------------------
  276|      0|                    value = va_arg(args, ossl_ssize_t);
  277|      0|                    break;
  278|      0|                case DP_C_PTRDIFF:
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  |  Branch (278:17): [True: 0, False: 35.9k]
  ------------------
  279|      0|                    value = va_arg(args, ptrdiff_t);
  280|      0|                    break;
  281|  35.9k|                default:
  ------------------
  |  Branch (281:17): [True: 35.9k, False: 0]
  ------------------
  282|  35.9k|                    value = va_arg(args, int);
  283|  35.9k|                    break;
  284|  35.9k|                }
  285|  35.9k|                if (!fmtint(&desc, value, 10, min, max, flags))
  ------------------
  |  Branch (285:21): [True: 0, False: 35.9k]
  ------------------
  286|      0|                    goto out;
  287|  35.9k|                break;
  288|  35.9k|            case 'X':
  ------------------
  |  Branch (288:13): [True: 1.42k, False: 913k]
  ------------------
  289|  1.42k|                flags |= DP_F_UP;
  ------------------
  |  |   77|  1.42k|#define DP_F_UP (1 << 5)
  ------------------
  290|       |                /* FALLTHROUGH */
  291|  1.42k|            case 'x':
  ------------------
  |  Branch (291:13): [True: 0, False: 914k]
  ------------------
  292|  1.42k|            case 'o':
  ------------------
  |  Branch (292:13): [True: 0, False: 914k]
  ------------------
  293|   730k|            case 'u':
  ------------------
  |  Branch (293:13): [True: 729k, False: 185k]
  ------------------
  294|   730k|                flags |= DP_F_UNSIGNED;
  ------------------
  |  |   79|   730k|#define DP_F_UNSIGNED (1 << 6)
  ------------------
  295|   730k|                switch (cflags) {
  296|      0|                case DP_C_CHAR:
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  |  Branch (296:17): [True: 0, False: 730k]
  ------------------
  297|      0|                    value = (unsigned char)va_arg(args, unsigned int);
  298|      0|                    break;
  299|      0|                case DP_C_SHORT:
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  |  Branch (299:17): [True: 0, False: 730k]
  ------------------
  300|      0|                    value = (unsigned short int)va_arg(args, unsigned int);
  301|      0|                    break;
  302|   730k|                case DP_C_LONG:
  ------------------
  |  |   84|   730k|#define DP_C_LONG 3
  ------------------
  |  Branch (302:17): [True: 730k, False: 0]
  ------------------
  303|   730k|                    value = va_arg(args, unsigned long int);
  304|   730k|                    break;
  305|      0|                case DP_C_LLONG:
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  |  Branch (305:17): [True: 0, False: 730k]
  ------------------
  306|      0|                    value = va_arg(args, uint64_t);
  307|      0|                    break;
  308|      0|                case DP_C_SIZE:
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  |  Branch (308:17): [True: 0, False: 730k]
  ------------------
  309|      0|                    value = va_arg(args, size_t);
  310|      0|                    break;
  311|      0|                case DP_C_PTRDIFF:
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  |  Branch (311:17): [True: 0, False: 730k]
  ------------------
  312|       |                    /*
  313|       |                     * There is no unsigned variant of ptrdiff_t, and POSIX
  314|       |                     * requires using a "corresponding unsigned type argument".
  315|       |                     * Assuming it is power of two in size, at least.
  316|       |                     */
  317|      0|                    if (sizeof(ptrdiff_t) == sizeof(uint64_t))
  ------------------
  |  Branch (317:25): [True: 0, Folded]
  ------------------
  318|      0|                        value = va_arg(args, uint64_t);
  319|      0|                    else
  320|      0|                        value = va_arg(args, unsigned int);
  321|      0|                    break;
  322|      0|                default:
  ------------------
  |  Branch (322:17): [True: 0, False: 730k]
  ------------------
  323|      0|                    value = va_arg(args, unsigned int);
  324|      0|                    break;
  325|   730k|                }
  326|   730k|                if (!fmtint(&desc, value,
  ------------------
  |  Branch (326:21): [True: 0, False: 730k]
  ------------------
  327|   730k|                        ch == 'o' ? 8 : (ch == 'u' ? 10 : 16),
  ------------------
  |  Branch (327:25): [True: 0, False: 730k]
  |  Branch (327:42): [True: 729k, False: 1.42k]
  ------------------
  328|   730k|                        min, max, flags))
  329|      0|                    goto out;
  330|   730k|                break;
  331|   730k|#ifndef OPENSSL_SYS_UEFI
  332|   730k|            case 'f':
  ------------------
  |  Branch (332:13): [True: 0, False: 914k]
  ------------------
  333|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  |  Branch (333:21): [True: 0, False: 0]
  ------------------
  334|      0|                    fvalue = va_arg(args, LDOUBLE);
  335|      0|                else
  336|      0|                    fvalue = va_arg(args, double);
  337|      0|                if (!fmtfp(&desc, fvalue, min, max, flags, F_FORMAT))
  ------------------
  |  |   91|      0|#define F_FORMAT 0
  ------------------
  |  Branch (337:21): [True: 0, False: 0]
  ------------------
  338|      0|                    goto out;
  339|      0|                break;
  340|      0|            case 'E':
  ------------------
  |  Branch (340:13): [True: 0, False: 914k]
  ------------------
  341|      0|                flags |= DP_F_UP;
  ------------------
  |  |   77|      0|#define DP_F_UP (1 << 5)
  ------------------
  342|       |                /* fall through */
  343|      0|            case 'e':
  ------------------
  |  Branch (343:13): [True: 0, False: 914k]
  ------------------
  344|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  |  Branch (344:21): [True: 0, False: 0]
  ------------------
  345|      0|                    fvalue = va_arg(args, LDOUBLE);
  346|      0|                else
  347|      0|                    fvalue = va_arg(args, double);
  348|      0|                if (!fmtfp(&desc, fvalue, min, max, flags, E_FORMAT))
  ------------------
  |  |   92|      0|#define E_FORMAT 1
  ------------------
  |  Branch (348:21): [True: 0, False: 0]
  ------------------
  349|      0|                    goto out;
  350|      0|                break;
  351|      0|            case 'G':
  ------------------
  |  Branch (351:13): [True: 0, False: 914k]
  ------------------
  352|      0|                flags |= DP_F_UP;
  ------------------
  |  |   77|      0|#define DP_F_UP (1 << 5)
  ------------------
  353|       |                /* fall through */
  354|      0|            case 'g':
  ------------------
  |  Branch (354:13): [True: 0, False: 914k]
  ------------------
  355|      0|                if (cflags == DP_C_LDOUBLE)
  ------------------
  |  |   85|      0|#define DP_C_LDOUBLE 4
  ------------------
  |  Branch (355:21): [True: 0, False: 0]
  ------------------
  356|      0|                    fvalue = va_arg(args, LDOUBLE);
  357|      0|                else
  358|      0|                    fvalue = va_arg(args, double);
  359|      0|                if (!fmtfp(&desc, fvalue, min, max, flags, G_FORMAT))
  ------------------
  |  |   93|      0|#define G_FORMAT 2
  ------------------
  |  Branch (359:21): [True: 0, False: 0]
  ------------------
  360|      0|                    goto out;
  361|      0|                break;
  362|       |#else
  363|       |            case 'f':
  364|       |            case 'E':
  365|       |            case 'e':
  366|       |            case 'G':
  367|       |            case 'g':
  368|       |                /* not implemented for UEFI */
  369|       |                ERR_raise(ERR_LIB_BIO, ERR_R_UNSUPPORTED);
  370|       |                goto out;
  371|       |#endif
  372|    574|            case 'c':
  ------------------
  |  Branch (372:13): [True: 574, False: 914k]
  ------------------
  373|    574|                if (!doapr_outch(&desc, va_arg(args, int)))
  ------------------
  |  Branch (373:21): [True: 0, False: 574]
  ------------------
  374|      0|                    goto out;
  375|    574|                break;
  376|   147k|            case 's':
  ------------------
  |  Branch (376:13): [True: 147k, False: 767k]
  ------------------
  377|   147k|                strvalue = va_arg(args, char *);
  378|   147k|                if (max < 0)
  ------------------
  |  Branch (378:21): [True: 147k, False: 0]
  ------------------
  379|   147k|                    max = INT_MAX;
  380|   147k|                if (!fmtstr(&desc, strvalue, flags, min, max))
  ------------------
  |  Branch (380:21): [True: 0, False: 147k]
  ------------------
  381|      0|                    goto out;
  382|   147k|                break;
  383|   147k|            case 'p':
  ------------------
  |  Branch (383:13): [True: 0, False: 914k]
  ------------------
  384|      0|                value = (size_t)va_arg(args, void *);
  385|      0|                if (!fmtint(&desc, value, 16, min, max, flags | DP_F_NUM))
  ------------------
  |  |   73|      0|#define DP_F_NUM (1 << 3)
  ------------------
  |  Branch (385:21): [True: 0, False: 0]
  ------------------
  386|      0|                    goto out;
  387|      0|                break;
  388|      0|            case 'n':
  ------------------
  |  Branch (388:13): [True: 0, False: 914k]
  ------------------
  389|      0|                switch (cflags) {
  390|      0|#define HANDLE_N(type)              \
  391|      0|    do {                            \
  392|      0|        type *num;                  \
  393|      0|                                    \
  394|      0|        num = va_arg(args, type *); \
  395|      0|        *num = (type)desc.pos;      \
  396|      0|    } while (0)
  397|      0|                case DP_C_CHAR:
  ------------------
  |  |   82|      0|#define DP_C_CHAR 1
  ------------------
  |  Branch (397:17): [True: 0, False: 0]
  ------------------
  398|      0|                    HANDLE_N(signed char);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  399|      0|                    break;
  400|      0|                case DP_C_SHORT:
  ------------------
  |  |   83|      0|#define DP_C_SHORT 2
  ------------------
  |  Branch (400:17): [True: 0, False: 0]
  ------------------
  401|      0|                    HANDLE_N(short);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  402|      0|                    break;
  403|      0|                case DP_C_LONG:
  ------------------
  |  |   84|      0|#define DP_C_LONG 3
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  ------------------
  404|      0|                    HANDLE_N(long);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  405|      0|                    break;
  406|      0|                case DP_C_LLONG:
  ------------------
  |  |   86|      0|#define DP_C_LLONG 5
  ------------------
  |  Branch (406:17): [True: 0, False: 0]
  ------------------
  407|      0|                    HANDLE_N(long long);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  408|      0|                    break;
  409|      0|                case DP_C_SIZE:
  ------------------
  |  |   87|      0|#define DP_C_SIZE 6
  ------------------
  |  Branch (409:17): [True: 0, False: 0]
  ------------------
  410|      0|                    HANDLE_N(ossl_ssize_t);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  411|      0|                    break;
  412|      0|                case DP_C_PTRDIFF:
  ------------------
  |  |   88|      0|#define DP_C_PTRDIFF 7
  ------------------
  |  Branch (412:17): [True: 0, False: 0]
  ------------------
  413|      0|                    HANDLE_N(ptrdiff_t);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  414|      0|                    break;
  415|      0|                default:
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  ------------------
  416|      0|                    HANDLE_N(int);
  ------------------
  |  |  391|      0|    do {                            \
  |  |  392|      0|        type *num;                  \
  |  |  393|      0|                                    \
  |  |  394|      0|        num = va_arg(args, type *); \
  |  |  395|      0|        *num = (type)desc.pos;      \
  |  |  396|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (396:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  417|      0|                    break;
  418|      0|#undef HANDLE_N
  419|      0|                }
  420|      0|                break;
  421|      0|            case '%':
  ------------------
  |  Branch (421:13): [True: 0, False: 914k]
  ------------------
  422|      0|                if (!doapr_outch(&desc, ch))
  ------------------
  |  Branch (422:21): [True: 0, False: 0]
  ------------------
  423|      0|                    goto out;
  424|      0|                break;
  425|      0|            case 'w':
  ------------------
  |  Branch (425:13): [True: 0, False: 914k]
  ------------------
  426|       |                /* not supported yet, treat as next char */
  427|      0|                format++;
  428|      0|                break;
  429|      0|            default:
  ------------------
  |  Branch (429:13): [True: 0, False: 914k]
  ------------------
  430|       |                /* unknown, skip */
  431|      0|                break;
  432|   914k|            }
  433|   914k|            ch = *format++;
  434|   914k|            state = DP_S_DEFAULT;
  ------------------
  |  |   56|   914k|#define DP_S_DEFAULT 0
  ------------------
  435|   914k|            flags = cflags = min = 0;
  436|   914k|            max = -1;
  437|   914k|            break;
  438|   799k|        case DP_S_DONE:
  ------------------
  |  |   63|   799k|#define DP_S_DONE 7
  ------------------
  |  Branch (438:9): [True: 799k, False: 7.68M]
  ------------------
  439|   799k|            break;
  440|      0|        default:
  ------------------
  |  Branch (440:9): [True: 0, False: 8.47M]
  ------------------
  441|      0|            break;
  442|  8.47M|        }
  443|  8.47M|    }
  444|   799k|    ret = 1;
  445|       |
  446|   799k|out:
  447|       |    /*
  448|       |     * We have to truncate if there is no dynamic buffer and we have filled the
  449|       |     * static buffer.
  450|       |     */
  451|   799k|    if (buffer == NULL) {
  ------------------
  |  Branch (451:9): [True: 799k, False: 0]
  ------------------
  452|   799k|        *truncated = (desc.currlen > desc.maxlen - 1);
  453|   799k|        if (*truncated)
  ------------------
  |  Branch (453:13): [True: 3.50k, False: 795k]
  ------------------
  454|  3.50k|            desc.currlen = desc.maxlen - 1;
  455|   799k|    }
  456|       |
  457|   799k|    if (!doapr_outch(&desc, '\0'))
  ------------------
  |  Branch (457:9): [True: 0, False: 799k]
  ------------------
  458|      0|        ret = 0;
  459|       |
  460|   799k|    *retlen = desc.currlen - 1;
  461|   799k|    *sbuffer = desc.sbuffer;
  462|   799k|    *maxlen = desc.maxlen;
  463|       |
  464|   799k|    return ret;
  465|   799k|}
bio_print.c:doapr_outch:
  963|  30.1M|{
  964|       |    /* If we haven't at least one buffer, someone has done a big booboo */
  965|  30.1M|    if (!ossl_assert(desc->sbuffer != NULL || desc->buffer != NULL))
  ------------------
  |  |   52|  30.1M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 30.1M, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  30.1M|    __FILE__, __LINE__)
  ------------------
  |  Branch (965:9): [True: 0, False: 30.1M]
  ------------------
  966|      0|        return 0;
  967|       |
  968|       |    /* |currlen| must always be <= |*maxlen| */
  969|  30.1M|    if (!ossl_assert(desc->currlen <= desc->maxlen))
  ------------------
  |  |   52|  30.1M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  30.1M|    __FILE__, __LINE__)
  ------------------
  |  Branch (969:9): [True: 0, False: 30.1M]
  ------------------
  970|      0|        return 0;
  971|       |
  972|  30.1M|    if (desc->buffer != NULL && desc->currlen == desc->maxlen) {
  ------------------
  |  Branch (972:9): [True: 0, False: 30.1M]
  |  Branch (972:33): [True: 0, False: 0]
  ------------------
  973|      0|        if (desc->maxlen > INT_MAX - BUFFER_INC)
  ------------------
  |  |  959|      0|#define BUFFER_INC 1024
  ------------------
  |  Branch (973:13): [True: 0, False: 0]
  ------------------
  974|      0|            return 0;
  975|       |
  976|      0|        desc->maxlen += BUFFER_INC;
  ------------------
  |  |  959|      0|#define BUFFER_INC 1024
  ------------------
  977|      0|        if (*(desc->buffer) == NULL) {
  ------------------
  |  Branch (977:13): [True: 0, False: 0]
  ------------------
  978|      0|            if ((*(desc->buffer) = OPENSSL_malloc(desc->maxlen)) == NULL)
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (978:17): [True: 0, False: 0]
  ------------------
  979|      0|                return 0;
  980|      0|            if (desc->currlen > 0) {
  ------------------
  |  Branch (980:17): [True: 0, False: 0]
  ------------------
  981|      0|                if (!ossl_assert(desc->sbuffer != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (981:21): [True: 0, False: 0]
  ------------------
  982|      0|                    return 0;
  983|      0|                memcpy(*(desc->buffer), desc->sbuffer, desc->currlen);
  984|      0|            }
  985|      0|            desc->sbuffer = NULL;
  986|      0|        } else {
  987|      0|            char *tmpbuf;
  988|       |
  989|      0|            tmpbuf = OPENSSL_realloc(*(desc->buffer), desc->maxlen);
  ------------------
  |  |  120|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  990|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (990:17): [True: 0, False: 0]
  ------------------
  991|      0|                return 0;
  992|      0|            *(desc->buffer) = tmpbuf;
  993|      0|        }
  994|      0|    }
  995|       |
  996|  30.1M|    if (desc->currlen < desc->maxlen) {
  ------------------
  |  Branch (996:9): [True: 30.1M, False: 6.84k]
  ------------------
  997|  30.1M|        if (desc->sbuffer)
  ------------------
  |  Branch (997:13): [True: 30.1M, False: 0]
  ------------------
  998|  30.1M|            (desc->sbuffer)[(desc->currlen)++] = (char)c;
  999|      0|        else
 1000|      0|            (*(desc->buffer))[(desc->currlen)++] = (char)c;
 1001|  30.1M|    }
 1002|       |
 1003|  30.1M|    if (desc->pos < LLONG_MAX)
  ------------------
  |  Branch (1003:9): [True: 30.1M, False: 0]
  ------------------
 1004|  30.1M|        desc->pos++;
 1005|       |
 1006|  30.1M|    return 1;
 1007|  30.1M|}
bio_print.c:fmtint:
  537|   766k|{
  538|   766k|    static const char oct_prefix[] = "0";
  539|       |
  540|   766k|    int signvalue = 0;
  541|   766k|    const char *prefix = "";
  542|   766k|    uint64_t uvalue;
  543|   766k|    char convert[DECIMAL_SIZE(value) + 3];
  544|   766k|    int place = 0;
  545|   766k|    int spadlen = 0;
  546|   766k|    int zpadlen = 0;
  547|   766k|    int caps = 0;
  548|       |
  549|   766k|    if (max < 0) {
  ------------------
  |  Branch (549:9): [True: 766k, False: 0]
  ------------------
  550|       |        /* A negative precision is taken as if the precision were omitted. */
  551|   766k|        max = 1;
  552|   766k|    } else {
  553|       |        /*
  554|       |         * If a precision is given with an integer conversion,
  555|       |         * the 0 flag is ignored.
  556|       |         */
  557|      0|        flags &= ~DP_F_ZERO;
  ------------------
  |  |   75|      0|#define DP_F_ZERO (1 << 4)
  ------------------
  558|      0|    }
  559|   766k|    uvalue = value;
  560|   766k|    if (!(flags & DP_F_UNSIGNED)) {
  ------------------
  |  |   79|   766k|#define DP_F_UNSIGNED (1 << 6)
  ------------------
  |  Branch (560:9): [True: 35.9k, False: 730k]
  ------------------
  561|  35.9k|        if (value < 0) {
  ------------------
  |  Branch (561:13): [True: 0, False: 35.9k]
  ------------------
  562|      0|            signvalue = '-';
  563|      0|            uvalue = 0 - (uint64_t)value;
  564|  35.9k|        } else if (flags & DP_F_PLUS)
  ------------------
  |  |   69|  35.9k|#define DP_F_PLUS (1 << 1)
  ------------------
  |  Branch (564:20): [True: 0, False: 35.9k]
  ------------------
  565|      0|            signvalue = '+';
  566|  35.9k|        else if (flags & DP_F_SPACE)
  ------------------
  |  |   71|  35.9k|#define DP_F_SPACE (1 << 2)
  ------------------
  |  Branch (566:18): [True: 0, False: 35.9k]
  ------------------
  567|      0|            signvalue = ' ';
  568|  35.9k|    }
  569|   766k|    if (flags & DP_F_NUM) {
  ------------------
  |  |   73|   766k|#define DP_F_NUM (1 << 3)
  ------------------
  |  Branch (569:9): [True: 0, False: 766k]
  ------------------
  570|      0|        if (base == 8)
  ------------------
  |  Branch (570:13): [True: 0, False: 0]
  ------------------
  571|      0|            prefix = oct_prefix;
  572|      0|        if (value != 0) {
  ------------------
  |  Branch (572:13): [True: 0, False: 0]
  ------------------
  573|      0|            if (base == 16)
  ------------------
  |  Branch (573:17): [True: 0, False: 0]
  ------------------
  574|      0|                prefix = flags & DP_F_UP ? "0X" : "0x";
  ------------------
  |  |   77|      0|#define DP_F_UP (1 << 5)
  ------------------
  |  Branch (574:26): [True: 0, False: 0]
  ------------------
  575|      0|        }
  576|      0|    }
  577|   766k|    if (flags & DP_F_UP)
  ------------------
  |  |   77|   766k|#define DP_F_UP (1 << 5)
  ------------------
  |  Branch (577:9): [True: 1.42k, False: 765k]
  ------------------
  578|  1.42k|        caps = 1;
  579|       |    /* When 0 is printed with an explicit precision 0, the output is empty. */
  580|  2.13M|    while (uvalue && (place < (int)sizeof(convert))) {
  ------------------
  |  Branch (580:12): [True: 1.36M, False: 766k]
  |  Branch (580:22): [True: 1.36M, False: 0]
  ------------------
  581|  1.36M|        convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")
  ------------------
  |  Branch (581:29): [True: 10.1k, False: 1.35M]
  ------------------
  582|  1.36M|            [uvalue % (unsigned)base];
  583|  1.36M|        uvalue = (uvalue / (unsigned)base);
  584|  1.36M|    }
  585|   766k|    if (place == sizeof(convert))
  ------------------
  |  Branch (585:9): [True: 0, False: 766k]
  ------------------
  586|      0|        place--;
  587|   766k|    convert[place] = 0;
  588|       |
  589|       |    /*
  590|       |     * "#" (alternative form):
  591|       |     *   - For o conversion, it shall increase the precision, if and only
  592|       |     *     if necessary, to force the first digit of the result to be a zero
  593|       |     */
  594|   766k|    zpadlen = max - place - (prefix == oct_prefix);
  595|   766k|    if (zpadlen < 0)
  ------------------
  |  Branch (595:9): [True: 299k, False: 467k]
  ------------------
  596|   299k|        zpadlen = 0;
  597|   766k|    spadlen = min - OSSL_MAX(max, place + zpadlen + (signvalue ? 1 : 0) + (int)strlen(prefix));
  ------------------
  |  |   97|  1.53M|#define OSSL_MAX(p, q) ((p >= q) ? p : q)
  |  |  ------------------
  |  |  |  Branch (97:25): [True: 467k, False: 299k]
  |  |  |  Branch (97:31): [True: 0, False: 766k]
  |  |  |  Branch (97:40): [True: 0, False: 299k]
  |  |  ------------------
  ------------------
  598|   766k|    if (spadlen < 0)
  ------------------
  |  Branch (598:9): [True: 765k, False: 1.42k]
  ------------------
  599|   765k|        spadlen = 0;
  600|   766k|    if (flags & DP_F_MINUS) {
  ------------------
  |  |   67|   766k|#define DP_F_MINUS (1 << 0)
  ------------------
  |  Branch (600:9): [True: 0, False: 766k]
  ------------------
  601|      0|        spadlen = -spadlen;
  602|   766k|    } else if (flags & DP_F_ZERO) {
  ------------------
  |  |   75|   766k|#define DP_F_ZERO (1 << 4)
  ------------------
  |  Branch (602:16): [True: 1.42k, False: 765k]
  ------------------
  603|  1.42k|        zpadlen = zpadlen + spadlen;
  604|  1.42k|        spadlen = 0;
  605|  1.42k|    }
  606|       |
  607|       |    /* spaces */
  608|   766k|    while (spadlen > 0 && eob_ok(desc, spadlen)) {
  ------------------
  |  Branch (608:12): [True: 0, False: 766k]
  |  Branch (608:27): [True: 0, False: 0]
  ------------------
  609|      0|        if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (609:13): [True: 0, False: 0]
  ------------------
  610|      0|            return 0;
  611|      0|        --spadlen;
  612|      0|    }
  613|       |
  614|       |    /* sign */
  615|   766k|    if (signvalue)
  ------------------
  |  Branch (615:9): [True: 0, False: 766k]
  ------------------
  616|      0|        if (!doapr_outch(desc, signvalue))
  ------------------
  |  Branch (616:13): [True: 0, False: 0]
  ------------------
  617|      0|            return 0;
  618|       |
  619|       |    /* prefix */
  620|   766k|    while (*prefix) {
  ------------------
  |  Branch (620:12): [True: 0, False: 766k]
  ------------------
  621|      0|        if (!doapr_outch(desc, *prefix))
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            return 0;
  623|      0|        prefix++;
  624|      0|    }
  625|       |
  626|       |    /* zeros */
  627|   766k|    if (zpadlen > 0) {
  ------------------
  |  Branch (627:9): [True: 26.4k, False: 740k]
  ------------------
  628|  52.8k|        while (zpadlen > 0 && eob_ok(desc, zpadlen)) {
  ------------------
  |  Branch (628:16): [True: 26.4k, False: 26.4k]
  |  Branch (628:31): [True: 26.4k, False: 0]
  ------------------
  629|  26.4k|            if (!doapr_outch(desc, '0'))
  ------------------
  |  Branch (629:17): [True: 0, False: 26.4k]
  ------------------
  630|      0|                return 0;
  631|  26.4k|            --zpadlen;
  632|  26.4k|        }
  633|  26.4k|    }
  634|       |    /* digits */
  635|  2.13M|    while (place > 0) {
  ------------------
  |  Branch (635:12): [True: 1.36M, False: 766k]
  ------------------
  636|  1.36M|        if (!doapr_outch(desc, convert[--place]))
  ------------------
  |  Branch (636:13): [True: 0, False: 1.36M]
  ------------------
  637|      0|            return 0;
  638|  1.36M|    }
  639|       |
  640|       |    /* left justified spaces */
  641|   766k|    if (spadlen < 0) {
  ------------------
  |  Branch (641:9): [True: 0, False: 766k]
  ------------------
  642|      0|        spadlen = -spadlen;
  643|       |
  644|      0|        while (spadlen > 0 && eob_ok(desc, spadlen)) {
  ------------------
  |  Branch (644:16): [True: 0, False: 0]
  |  Branch (644:31): [True: 0, False: 0]
  ------------------
  645|      0|            if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (645:17): [True: 0, False: 0]
  ------------------
  646|      0|                return 0;
  647|      0|            --spadlen;
  648|      0|        }
  649|      0|    }
  650|   766k|    return 1;
  651|   766k|}
bio_print.c:eob_ok:
 1022|  25.8M|{
 1023|       |    /*
 1024|       |     * desc->buffer is auto-sizeable, so we are never supposed to reach the end
 1025|       |     * of it.
 1026|       |     */
 1027|  25.8M|    if (desc->buffer != NULL)
  ------------------
  |  Branch (1027:9): [True: 0, False: 25.8M]
  ------------------
 1028|      0|        return 1;
 1029|       |
 1030|  25.8M|    if (desc->currlen >= desc->maxlen) {
  ------------------
  |  Branch (1030:9): [True: 2.99k, False: 25.8M]
  ------------------
 1031|  2.99k|        if (left > 0) {
  ------------------
  |  Branch (1031:13): [True: 2.99k, False: 0]
  ------------------
 1032|  2.99k|            if (desc->pos < LLONG_MAX - left) {
  ------------------
  |  Branch (1032:17): [True: 2.99k, False: 0]
  ------------------
 1033|  2.99k|                desc->pos += left;
 1034|  2.99k|            } else {
 1035|      0|                desc->pos = LLONG_MAX;
 1036|      0|            }
 1037|  2.99k|        }
 1038|       |
 1039|  2.99k|        return 0;
 1040|  2.99k|    }
 1041|       |
 1042|  25.8M|    return 1;
 1043|  25.8M|}
bio_print.c:fmtstr:
  469|   147k|{
  470|   147k|    int padlen = 0;
  471|   147k|    size_t strln;
  472|   147k|    int cnt = 0;
  473|       |
  474|   147k|    if (value == 0)
  ------------------
  |  Branch (474:9): [True: 2.87k, False: 144k]
  ------------------
  475|  2.87k|        value = "<NULL>";
  476|       |
  477|   147k|    strln = OPENSSL_strnlen(value, max < 0 ? SIZE_MAX : (size_t)max);
  ------------------
  |  Branch (477:36): [True: 0, False: 147k]
  ------------------
  478|       |
  479|   147k|    if (min >= 0 && strln < INT_MAX) {
  ------------------
  |  Branch (479:9): [True: 147k, False: 0]
  |  Branch (479:21): [True: 147k, False: 0]
  ------------------
  480|   147k|        padlen = min - (int)strln;
  481|   147k|        if (padlen < 0)
  ------------------
  |  Branch (481:13): [True: 145k, False: 2.02k]
  ------------------
  482|   145k|            padlen = 0;
  483|   147k|    }
  484|   147k|    if (max >= 0) {
  ------------------
  |  Branch (484:9): [True: 147k, False: 0]
  ------------------
  485|       |        /*
  486|       |         * Calculate the maximum output including padding.
  487|       |         * Make sure max doesn't overflow into negativity
  488|       |         */
  489|   147k|        if (max < INT_MAX - padlen)
  ------------------
  |  Branch (489:13): [True: 0, False: 147k]
  ------------------
  490|      0|            max += padlen;
  491|   147k|        else
  492|   147k|            max = INT_MAX;
  493|   147k|    }
  494|       |
  495|   147k|    if (!(flags & DP_F_MINUS) && padlen > 0) {
  ------------------
  |  |   67|   147k|#define DP_F_MINUS (1 << 0)
  ------------------
  |  Branch (495:9): [True: 147k, False: 0]
  |  Branch (495:34): [True: 0, False: 147k]
  ------------------
  496|       |        /* cap padlen to max so we can pass it as-is to eob_ok() */
  497|      0|        if (max >= 0) {
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|            if (padlen > max)
  ------------------
  |  Branch (498:17): [True: 0, False: 0]
  ------------------
  499|      0|                padlen = max;
  500|      0|            cnt = padlen;
  501|      0|        }
  502|      0|        while (padlen > 0 && eob_ok(desc, padlen)) {
  ------------------
  |  Branch (502:16): [True: 0, False: 0]
  |  Branch (502:30): [True: 0, False: 0]
  ------------------
  503|      0|            if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (503:17): [True: 0, False: 0]
  ------------------
  504|      0|                return 0;
  505|      0|            --padlen;
  506|      0|        }
  507|      0|    }
  508|   147k|    if (max >= 0) {
  ------------------
  |  Branch (508:9): [True: 147k, False: 0]
  ------------------
  509|       |        /* cap strln to (max - cnt) so we can pass it as-is to eob_ok() */
  510|   147k|        if (strln > INT_MAX || (int)strln > max - cnt)
  ------------------
  |  Branch (510:13): [True: 0, False: 147k]
  |  Branch (510:32): [True: 0, False: 147k]
  ------------------
  511|      0|            strln = max - cnt;
  512|   147k|        cnt += (int)strln;
  513|   147k|    }
  514|  25.9M|    while (strln > 0 && eob_ok(desc, strln)) {
  ------------------
  |  Branch (514:12): [True: 25.8M, False: 144k]
  |  Branch (514:25): [True: 25.8M, False: 2.99k]
  ------------------
  515|  25.8M|        if (!doapr_outch(desc, *value++))
  ------------------
  |  Branch (515:13): [True: 0, False: 25.8M]
  ------------------
  516|      0|            return 0;
  517|  25.8M|        --strln;
  518|  25.8M|    }
  519|   147k|    if ((flags & DP_F_MINUS) && padlen > 0) {
  ------------------
  |  |   67|   147k|#define DP_F_MINUS (1 << 0)
  ------------------
  |  Branch (519:9): [True: 0, False: 147k]
  |  Branch (519:33): [True: 0, False: 0]
  ------------------
  520|       |        /* cap padlen to (max - cnt) so we can pass it as-is to eob_ok() */
  521|      0|        if (max >= 0) {
  ------------------
  |  Branch (521:13): [True: 0, False: 0]
  ------------------
  522|      0|            if (padlen > max - cnt)
  ------------------
  |  Branch (522:17): [True: 0, False: 0]
  ------------------
  523|      0|                padlen = max - cnt;
  524|      0|        }
  525|      0|        while (padlen > 0 && eob_ok(desc, padlen)) {
  ------------------
  |  Branch (525:16): [True: 0, False: 0]
  |  Branch (525:30): [True: 0, False: 0]
  ------------------
  526|      0|            if (!doapr_outch(desc, ' '))
  ------------------
  |  Branch (526:17): [True: 0, False: 0]
  ------------------
  527|      0|                return 0;
  528|      0|            --padlen;
  529|      0|        }
  530|      0|    }
  531|   147k|    return 1;
  532|   147k|}

bio_sock_cleanup_int:
  205|      1|{
  206|       |#ifdef OPENSSL_SYS_WINDOWS
  207|       |    if (wsa_init_done) {
  208|       |        wsa_init_done = 0;
  209|       |        WSACleanup();
  210|       |    }
  211|       |#endif
  212|      1|}

ossl_bio_core_globals_free:
   26|    695|{
   27|    695|    OPENSSL_free(vbcg);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   28|    695|}
ossl_bio_core_globals_new:
   31|    695|{
   32|    695|    return OPENSSL_zalloc(sizeof(BIO_CORE_GLOBALS));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|    695|}

BIO_new_file:
   58|  2.07k|{
   59|  2.07k|    BIO *ret;
   60|  2.07k|    FILE *file = openssl_fopen(filename, mode);
   61|  2.07k|    int fp_flags = BIO_CLOSE;
  ------------------
  |  |   85|  2.07k|#define BIO_CLOSE 0x01
  ------------------
   62|       |
   63|  2.07k|    if (strchr(mode, 'b') == NULL)
  ------------------
  |  Branch (63:9): [True: 1.37k, False: 695]
  ------------------
   64|  1.37k|        fp_flags |= BIO_FP_TEXT;
  ------------------
  |  |  220|  1.37k|#define BIO_FP_TEXT 0x10
  ------------------
   65|       |
   66|  2.07k|    if (file == NULL) {
  ------------------
  |  Branch (66:9): [True: 757, False: 1.31k]
  ------------------
   67|    757|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|    757|    (ERR_new(),                                                  \
  |  |  407|    757|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    757|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    757|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|    757|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|    757|#define get_last_sys_error() errno
  ------------------
   68|    757|            "calling fopen(%s, %s)",
   69|    757|            filename, mode);
   70|    757|        if (errno == ENOENT
  ------------------
  |  Branch (70:13): [True: 755, False: 2]
  ------------------
   71|      2|#ifdef ENXIO
   72|    757|            || errno == ENXIO
  ------------------
  |  Branch (72:16): [True: 0, False: 2]
  ------------------
   73|    757|#endif
   74|    757|        )
   75|    757|            ERR_raise(ERR_LIB_BIO, BIO_R_NO_SUCH_FILE);
  ------------------
  |  |  404|    755|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    755|    (ERR_new(),                                                  \
  |  |  |  |  407|    755|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    755|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    755|        ERR_set_error)
  |  |  ------------------
  ------------------
   76|      2|        else
   77|    757|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  404|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      2|    (ERR_new(),                                                  \
  |  |  |  |  407|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
   78|    757|        return NULL;
   79|    757|    }
   80|  1.31k|    if ((ret = BIO_new(BIO_s_file())) == NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 1.31k]
  ------------------
   81|      0|        fclose(file);
   82|      0|        return NULL;
   83|      0|    }
   84|       |
   85|       |    /* we did fopen -> we disengage UPLINK */
   86|  1.31k|    BIO_clear_flags(ret, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|  1.31k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
   87|  1.31k|    BIO_set_fp(ret, file, fp_flags);
  ------------------
  |  |  568|  1.31k|#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
  |  |  ------------------
  |  |  |  |  440|  1.31k|#define BIO_C_SET_FILE_PTR 106
  |  |  ------------------
  ------------------
   88|  1.31k|    return ret;
   89|  1.31k|}
BIO_s_file:
  105|  1.40k|{
  106|  1.40k|    return &methods_filep;
  107|  1.40k|}
bss_file.c:file_gets:
  351|  4.71M|{
  352|  4.71M|    int ret = 0;
  353|       |
  354|  4.71M|    buf[0] = '\0';
  355|  4.71M|    if (bp->flags & BIO_FLAGS_UPLINK_INTERNAL) {
  ------------------
  |  |   18|  4.71M|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (355:9): [True: 0, False: 4.71M]
  ------------------
  356|      0|        if (!UP_fgets(buf, size, bp->ptr))
  ------------------
  |  |  152|      0|#define UP_fgets fgets
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|            goto err;
  358|  4.71M|    } else {
  359|  4.71M|        if (!fgets(buf, size, (FILE *)bp->ptr))
  ------------------
  |  Branch (359:13): [True: 1.33k, False: 4.71M]
  ------------------
  360|  1.33k|            goto err;
  361|  4.71M|    }
  362|  4.71M|    if (buf[0] != '\0')
  ------------------
  |  Branch (362:9): [True: 4.71M, False: 0]
  ------------------
  363|  4.71M|        ret = (int)strlen(buf);
  364|  4.71M|err:
  365|  4.71M|    return ret;
  366|  4.71M|}
bss_file.c:file_ctrl:
  180|  1.40k|{
  181|  1.40k|    long ret = 1;
  182|  1.40k|    FILE *fp = (FILE *)b->ptr;
  183|  1.40k|    FILE **fpp;
  184|  1.40k|    char p[4];
  185|  1.40k|    int st;
  186|       |
  187|  1.40k|    switch (cmd) {
  188|      0|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  462|      0|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (188:5): [True: 0, False: 1.40k]
  ------------------
  189|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (189:5): [True: 0, False: 1.40k]
  ------------------
  190|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (190:13): [True: 0, False: 0]
  ------------------
  191|      0|            ret = (long)UP_fseek(b->ptr, num, 0);
  ------------------
  |  |  160|      0|#define UP_fseek fseek
  ------------------
  192|      0|        else
  193|      0|            ret = (long)fseek(fp, num, 0);
  194|      0|        break;
  195|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (195:5): [True: 0, False: 1.40k]
  ------------------
  196|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (196:13): [True: 0, False: 0]
  ------------------
  197|      0|            ret = (long)UP_feof(fp);
  ------------------
  |  |  156|      0|#define UP_feof feof
  ------------------
  198|      0|        else
  199|      0|            ret = (long)feof(fp);
  200|      0|        break;
  201|      0|    case BIO_C_FILE_TELL:
  ------------------
  |  |  468|      0|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (201:5): [True: 0, False: 1.40k]
  ------------------
  202|      0|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|      0|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (202:5): [True: 0, False: 1.40k]
  ------------------
  203|      0|        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  ------------------
  204|      0|            ret = UP_ftell(b->ptr);
  ------------------
  |  |  161|      0|#define UP_ftell ftell
  ------------------
  205|      0|        else {
  206|       |#if defined(OPENSSL_SYS_WINDOWS)
  207|       |            /*
  208|       |             * On Windows, for non-seekable files (stdin), ftell() is undefined.
  209|       |             */
  210|       |            if (GetFileType((HANDLE)_get_osfhandle(_fileno(fp))) != FILE_TYPE_DISK)
  211|       |                ret = -1;
  212|       |            else
  213|       |                ret = ftell(fp);
  214|       |#else
  215|      0|            ret = ftell(fp);
  216|      0|#endif
  217|      0|        }
  218|      0|        break;
  219|  1.31k|    case BIO_C_SET_FILE_PTR:
  ------------------
  |  |  440|  1.31k|#define BIO_C_SET_FILE_PTR 106
  ------------------
  |  Branch (219:5): [True: 1.31k, False: 91]
  ------------------
  220|  1.31k|        file_free(b);
  221|  1.31k|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|  1.31k|#define BIO_CLOSE 0x01
  ------------------
  222|  1.31k|        b->ptr = ptr;
  223|  1.31k|        b->init = 1;
  224|       |#if BIO_FLAGS_UPLINK_INTERNAL != 0
  225|       |#if defined(__MINGW32__) && defined(__MSVCRT__) && !defined(_IOB_ENTRIES)
  226|       |#define _IOB_ENTRIES 20
  227|       |#endif
  228|       |        /* Safety net to catch purely internal BIO_set_fp calls */
  229|       |#if (defined(_MSC_VER) && _MSC_VER >= 1900) || defined(__BORLANDC__)
  230|       |        if (ptr == stdin || ptr == stdout || ptr == stderr)
  231|       |            BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  232|       |#elif defined(_IOB_ENTRIES)
  233|       |        if ((size_t)ptr >= (size_t)stdin && (size_t)ptr < (size_t)(stdin + _IOB_ENTRIES))
  234|       |            BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  235|       |#endif
  236|       |#endif
  237|       |#ifdef UP_fsetmod
  238|       |        if (b->flags & BIO_FLAGS_UPLINK_INTERNAL)
  239|       |            UP_fsetmod(b->ptr, (char)((num & BIO_FP_TEXT) ? 't' : 'b'));
  240|       |        else
  241|       |#endif
  242|  1.31k|        {
  243|       |#if defined(OPENSSL_SYS_WINDOWS)
  244|       |            int fd = _fileno((FILE *)ptr);
  245|       |            if (num & BIO_FP_TEXT)
  246|       |                _setmode(fd, _O_TEXT);
  247|       |            else
  248|       |                _setmode(fd, _O_BINARY);
  249|       |#elif defined(OPENSSL_SYS_MSDOS)
  250|       |            int fd = fileno((FILE *)ptr);
  251|       |            /* Set correct text/binary mode */
  252|       |            if (num & BIO_FP_TEXT)
  253|       |                _setmode(fd, _O_TEXT);
  254|       |            /* Dangerous to set stdin/stdout to raw (unless redirected) */
  255|       |            else {
  256|       |                if (fd == STDIN_FILENO || fd == STDOUT_FILENO) {
  257|       |                    if (isatty(fd) <= 0)
  258|       |                        _setmode(fd, _O_BINARY);
  259|       |                } else
  260|       |                    _setmode(fd, _O_BINARY);
  261|       |            }
  262|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  263|       |            int fd = fileno((FILE *)ptr);
  264|       |            if (!(num & BIO_FP_TEXT))
  265|       |                setmode(fd, O_BINARY);
  266|       |#endif
  267|  1.31k|        }
  268|  1.31k|        break;
  269|     91|    case BIO_C_SET_FILENAME:
  ------------------
  |  |  442|     91|#define BIO_C_SET_FILENAME 108
  ------------------
  |  Branch (269:5): [True: 91, False: 1.31k]
  ------------------
  270|     91|        file_free(b);
  271|     91|        b->shutdown = (int)num & BIO_CLOSE;
  ------------------
  |  |   85|     91|#define BIO_CLOSE 0x01
  ------------------
  272|     91|        if (num & BIO_FP_APPEND) {
  ------------------
  |  |  219|     91|#define BIO_FP_APPEND 0x08
  ------------------
  |  Branch (272:13): [True: 0, False: 91]
  ------------------
  273|      0|            if (num & BIO_FP_READ)
  ------------------
  |  |  217|      0|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (273:17): [True: 0, False: 0]
  ------------------
  274|      0|                OPENSSL_strlcpy(p, "a+", sizeof(p));
  275|      0|            else
  276|      0|                OPENSSL_strlcpy(p, "a", sizeof(p));
  277|     91|        } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  217|     91|#define BIO_FP_READ 0x02
  ------------------
                      } else if ((num & BIO_FP_READ) && (num & BIO_FP_WRITE))
  ------------------
  |  |  218|     91|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (277:20): [True: 91, False: 0]
  |  Branch (277:43): [True: 0, False: 91]
  ------------------
  278|      0|            OPENSSL_strlcpy(p, "r+", sizeof(p));
  279|     91|        else if (num & BIO_FP_WRITE)
  ------------------
  |  |  218|     91|#define BIO_FP_WRITE 0x04
  ------------------
  |  Branch (279:18): [True: 0, False: 91]
  ------------------
  280|      0|            OPENSSL_strlcpy(p, "w", sizeof(p));
  281|     91|        else if (num & BIO_FP_READ)
  ------------------
  |  |  217|     91|#define BIO_FP_READ 0x02
  ------------------
  |  Branch (281:18): [True: 91, False: 0]
  ------------------
  282|     91|            OPENSSL_strlcpy(p, "r", sizeof(p));
  283|      0|        else {
  284|      0|            ERR_raise(ERR_LIB_BIO, BIO_R_BAD_FOPEN_MODE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            ret = 0;
  286|      0|            break;
  287|      0|        }
  288|       |#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
  289|       |        if (!(num & BIO_FP_TEXT))
  290|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  291|       |        else
  292|       |            OPENSSL_strlcat(p, "t", sizeof(p));
  293|       |#elif defined(OPENSSL_SYS_WIN32_CYGWIN)
  294|       |        if (!(num & BIO_FP_TEXT))
  295|       |            OPENSSL_strlcat(p, "b", sizeof(p));
  296|       |#endif
  297|     91|        fp = openssl_fopen(ptr, p);
  298|     91|        if (fp == NULL) {
  ------------------
  |  Branch (298:13): [True: 76, False: 15]
  ------------------
  299|     76|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|     76|    (ERR_new(),                                                  \
  |  |  407|     76|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     76|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|     76|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|     76|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|     76|#define get_last_sys_error() errno
  ------------------
  300|     76|                "calling fopen(%s, %s)",
  301|     76|                (const char *)ptr, p);
  302|     76|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  404|     76|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     76|    (ERR_new(),                                                  \
  |  |  |  |  407|     76|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     76|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     76|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|     76|            ret = 0;
  304|     76|            break;
  305|     76|        }
  306|     15|        b->ptr = fp;
  307|     15|        b->init = 1;
  308|       |        /* we did fopen -> we disengage UPLINK */
  309|     15|        BIO_clear_flags(b, BIO_FLAGS_UPLINK_INTERNAL);
  ------------------
  |  |   18|     15|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  310|     15|        break;
  311|      0|    case BIO_C_GET_FILE_PTR:
  ------------------
  |  |  441|      0|#define BIO_C_GET_FILE_PTR 107
  ------------------
  |  Branch (311:5): [True: 0, False: 1.40k]
  ------------------
  312|       |        /* the ptr parameter is actually a FILE ** in this case. */
  313|      0|        if (ptr != NULL) {
  ------------------
  |  Branch (313:13): [True: 0, False: 0]
  ------------------
  314|      0|            fpp = (FILE **)ptr;
  315|      0|            *fpp = (FILE *)b->ptr;
  316|      0|        }
  317|      0|        break;
  318|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (318:5): [True: 0, False: 1.40k]
  ------------------
  319|      0|        ret = (long)b->shutdown;
  320|      0|        break;
  321|      0|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|      0|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (321:5): [True: 0, False: 1.40k]
  ------------------
  322|      0|        b->shutdown = (int)num;
  323|      0|        break;
  324|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (324:5): [True: 0, False: 1.40k]
  ------------------
  325|      0|        st = b->flags & BIO_FLAGS_UPLINK_INTERNAL
  ------------------
  |  |   18|      0|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (325:14): [True: 0, False: 0]
  ------------------
  326|      0|            ? UP_fflush(b->ptr)
  ------------------
  |  |  162|      0|#define UP_fflush fflush
  ------------------
  327|      0|            : fflush((FILE *)b->ptr);
  328|      0|        if (st == EOF) {
  ------------------
  |  Branch (328:13): [True: 0, False: 0]
  ------------------
  329|      0|            ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
                          ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
  330|      0|                "calling fflush()");
  331|      0|            ERR_raise(ERR_LIB_BIO, ERR_R_SYS_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  332|      0|            ret = 0;
  333|      0|        }
  334|      0|        break;
  335|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (335:5): [True: 0, False: 1.40k]
  ------------------
  336|      0|        ret = 1;
  337|      0|        break;
  338|       |
  339|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (339:5): [True: 0, False: 1.40k]
  ------------------
  340|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (340:5): [True: 0, False: 1.40k]
  ------------------
  341|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (341:5): [True: 0, False: 1.40k]
  ------------------
  342|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (342:5): [True: 0, False: 1.40k]
  ------------------
  343|      0|    default:
  ------------------
  |  Branch (343:5): [True: 0, False: 1.40k]
  ------------------
  344|      0|        ret = 0;
  345|      0|        break;
  346|  1.40k|    }
  347|  1.40k|    return ret;
  348|  1.40k|}
bss_file.c:file_new:
  110|  1.40k|{
  111|  1.40k|    bi->init = 0;
  112|  1.40k|    bi->num = 0;
  113|  1.40k|    bi->ptr = NULL;
  114|  1.40k|    bi->flags = BIO_FLAGS_UPLINK_INTERNAL; /* default to UPLINK */
  ------------------
  |  |   18|  1.40k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  115|  1.40k|    return 1;
  116|  1.40k|}
bss_file.c:file_free:
  119|  2.81k|{
  120|  2.81k|    if (a == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 2.81k]
  ------------------
  121|      0|        return 0;
  122|  2.81k|    if (a->shutdown) {
  ------------------
  |  Branch (122:9): [True: 2.81k, False: 0]
  ------------------
  123|  2.81k|        if ((a->init) && (a->ptr != NULL)) {
  ------------------
  |  Branch (123:13): [True: 1.33k, False: 1.48k]
  |  Branch (123:26): [True: 1.33k, False: 0]
  ------------------
  124|  1.33k|            if (a->flags & BIO_FLAGS_UPLINK_INTERNAL)
  ------------------
  |  |   18|  1.33k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  |  Branch (124:17): [True: 0, False: 1.33k]
  ------------------
  125|      0|                UP_fclose(a->ptr);
  ------------------
  |  |  157|      0|#define UP_fclose fclose
  ------------------
  126|  1.33k|            else
  127|  1.33k|                fclose(a->ptr);
  128|  1.33k|            a->ptr = NULL;
  129|  1.33k|            a->flags = BIO_FLAGS_UPLINK_INTERNAL;
  ------------------
  |  |   18|  1.33k|#define BIO_FLAGS_UPLINK_INTERNAL 0
  ------------------
  130|  1.33k|        }
  131|  2.81k|        a->init = 0;
  132|  2.81k|    }
  133|  2.81k|    return 1;
  134|  2.81k|}

BIO_s_mem:
   73|   578k|{
   74|   578k|    return &mem_method;
   75|   578k|}
BIO_new_mem_buf:
   83|   381k|{
   84|   381k|    BIO *ret;
   85|   381k|    BUF_MEM *b;
   86|   381k|    BIO_BUF_MEM *bb;
   87|   381k|    size_t sz;
   88|       |
   89|   381k|    if (buf == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 381k]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return NULL;
   92|      0|    }
   93|   381k|    sz = (len < 0) ? strlen(buf) : (size_t)len;
  ------------------
  |  Branch (93:10): [True: 0, False: 381k]
  ------------------
   94|   381k|    if ((ret = BIO_new(BIO_s_mem())) == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 381k]
  ------------------
   95|      0|        return NULL;
   96|   381k|    bb = (BIO_BUF_MEM *)ret->ptr;
   97|   381k|    b = bb->buf;
   98|       |    /* Cast away const and trust in the MEM_RDONLY flag. */
   99|   381k|    b->data = (void *)buf;
  100|   381k|    b->length = sz;
  101|   381k|    b->max = sz;
  102|   381k|    *bb->readp = *bb->buf;
  103|   381k|    ret->flags |= BIO_FLAGS_MEM_RDONLY;
  ------------------
  |  |  239|   381k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  104|       |    /* Since this is static data retrying won't help */
  105|   381k|    ret->num = 0;
  106|   381k|    return ret;
  107|   381k|}
bss_mem.c:mem_write:
  215|  4.33M|{
  216|  4.33M|    int ret = -1;
  217|  4.33M|    size_t blen;
  218|  4.33M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  219|       |
  220|  4.33M|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  239|  4.33M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (220:9): [True: 0, False: 4.33M]
  ------------------
  221|      0|        ERR_raise(ERR_LIB_BIO, BIO_R_WRITE_TO_READ_ONLY_BIO);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  222|      0|        goto end;
  223|      0|    }
  224|  4.33M|    BIO_clear_retry_flags(b);
  ------------------
  |  |  263|  4.33M|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|  4.33M|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|  4.33M|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|  4.33M|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|  4.33M|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|  4.33M|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  225|  4.33M|    if (inl == 0)
  ------------------
  |  Branch (225:9): [True: 0, False: 4.33M]
  ------------------
  226|      0|        return 0;
  227|  4.33M|    if (in == NULL) {
  ------------------
  |  Branch (227:9): [True: 0, False: 4.33M]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_BIO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        goto end;
  230|      0|    }
  231|  4.33M|    blen = bbm->readp->length;
  232|  4.33M|    mem_buf_sync(b);
  233|  4.33M|    if (BUF_MEM_grow_clean(bbm->buf, blen + inl) == 0)
  ------------------
  |  Branch (233:9): [True: 0, False: 4.33M]
  ------------------
  234|      0|        goto end;
  235|  4.33M|    memcpy(bbm->buf->data + blen, in, inl);
  236|  4.33M|    *bbm->readp = *bbm->buf;
  237|  4.33M|    ret = inl;
  238|  4.33M|end:
  239|  4.33M|    return ret;
  240|  4.33M|}
bss_mem.c:mem_buf_sync:
  178|  4.52M|{
  179|  4.52M|    if (b != NULL && b->init != 0 && b->ptr != NULL) {
  ------------------
  |  Branch (179:9): [True: 4.52M, False: 0]
  |  Branch (179:22): [True: 4.52M, False: 0]
  |  Branch (179:38): [True: 4.52M, False: 0]
  ------------------
  180|  4.52M|        BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  181|       |
  182|  4.52M|        if (bbm->readp->data != bbm->buf->data) {
  ------------------
  |  Branch (182:13): [True: 0, False: 4.52M]
  ------------------
  183|      0|            memmove(bbm->buf->data, bbm->readp->data, bbm->readp->length);
  184|      0|            bbm->buf->length = bbm->readp->length;
  185|      0|            bbm->readp->data = bbm->buf->data;
  186|      0|        }
  187|  4.52M|    }
  188|  4.52M|    return 0;
  189|  4.52M|}
bss_mem.c:mem_read:
  192|   953k|{
  193|   953k|    int ret = -1;
  194|   953k|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  195|   953k|    BUF_MEM *bm = bbm->readp;
  196|       |
  197|   953k|    if (b->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  239|   953k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (197:9): [True: 762k, False: 190k]
  ------------------
  198|   762k|        bm = bbm->buf;
  199|   953k|    BIO_clear_retry_flags(b);
  ------------------
  |  |  263|   953k|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|   953k|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|   953k|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|   953k|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|   953k|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|   953k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  200|   953k|    ret = (outl >= 0 && (size_t)outl > bm->length) ? (int)bm->length : outl;
  ------------------
  |  Branch (200:12): [True: 953k, False: 0]
  |  Branch (200:25): [True: 0, False: 953k]
  ------------------
  201|   953k|    if ((out != NULL) && (ret > 0)) {
  ------------------
  |  Branch (201:9): [True: 953k, False: 0]
  |  Branch (201:26): [True: 953k, False: 0]
  ------------------
  202|   953k|        memcpy(out, bm->data, ret);
  203|   953k|        bm->length -= ret;
  204|   953k|        bm->max -= ret;
  205|   953k|        bm->data += ret;
  206|   953k|    } else if (bm->length == 0) {
  ------------------
  |  Branch (206:16): [True: 0, False: 0]
  ------------------
  207|      0|        ret = b->num;
  208|      0|        if (ret != 0)
  ------------------
  |  Branch (208:13): [True: 0, False: 0]
  ------------------
  209|      0|            BIO_set_retry_read(b);
  ------------------
  |  |  257|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  210|      0|    }
  211|   953k|    return ret;
  212|   953k|}
bss_mem.c:mem_puts:
  382|  4.33M|{
  383|  4.33M|    int ret;
  384|  4.33M|    size_t n = strlen(str);
  385|       |
  386|  4.33M|    if (n > INT_MAX)
  ------------------
  |  Branch (386:9): [True: 0, False: 4.33M]
  ------------------
  387|      0|        return -1;
  388|  4.33M|    ret = mem_write(bp, str, (int)n);
  389|       |    /* memory semantics is that it will always work */
  390|  4.33M|    return ret;
  391|  4.33M|}
bss_mem.c:mem_ctrl:
  243|  1.90M|{
  244|  1.90M|    long ret = 1;
  245|  1.90M|    char **pptr;
  246|  1.90M|    BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
  247|  1.90M|    BUF_MEM *bm, *bo; /* bio_mem, bio_other */
  248|  1.90M|    ossl_ssize_t off, remain;
  ------------------
  |  |  204|  1.90M|#define ossl_ssize_t ssize_t
  ------------------
  249|       |
  250|  1.90M|    if (b->flags & BIO_FLAGS_MEM_RDONLY) {
  ------------------
  |  |  239|  1.90M|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (250:9): [True: 1.52M, False: 382k]
  ------------------
  251|  1.52M|        bm = bbm->buf;
  252|  1.52M|        bo = bbm->readp;
  253|  1.52M|    } else {
  254|   382k|        bm = bbm->readp;
  255|   382k|        bo = bbm->buf;
  256|   382k|    }
  257|  1.90M|    off = (bm->data == bo->data) ? 0 : bm->data - bo->data;
  ------------------
  |  Branch (257:11): [True: 1.71M, False: 190k]
  ------------------
  258|  1.90M|    remain = bm->length;
  259|       |
  260|  1.90M|    switch (cmd) {
  261|      0|    case BIO_CTRL_RESET:
  ------------------
  |  |   90|      0|#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
  ------------------
  |  Branch (261:5): [True: 0, False: 1.90M]
  ------------------
  262|      0|        bm = bbm->buf;
  263|      0|        if (bm->data != NULL) {
  ------------------
  |  Branch (263:13): [True: 0, False: 0]
  ------------------
  264|      0|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY)) {
  ------------------
  |  |  239|      0|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (264:17): [True: 0, False: 0]
  ------------------
  265|      0|                if (!(b->flags & BIO_FLAGS_NONCLEAR_RST)) {
  ------------------
  |  |  240|      0|#define BIO_FLAGS_NONCLEAR_RST 0x400
  ------------------
  |  Branch (265:21): [True: 0, False: 0]
  ------------------
  266|      0|                    memset(bm->data, 0, bm->max);
  267|      0|                    bm->length = 0;
  268|      0|                }
  269|      0|                *bbm->readp = *bbm->buf;
  270|      0|            } else {
  271|       |                /* For read only case just reset to the start again */
  272|      0|                *bbm->buf = *bbm->readp;
  273|      0|            }
  274|      0|        }
  275|      0|        break;
  276|   381k|    case BIO_C_FILE_SEEK:
  ------------------
  |  |  462|   381k|#define BIO_C_FILE_SEEK 128
  ------------------
  |  Branch (276:5): [True: 381k, False: 1.52M]
  ------------------
  277|   381k|        if (num < 0 || num > off + remain)
  ------------------
  |  Branch (277:13): [True: 0, False: 381k]
  |  Branch (277:24): [True: 0, False: 381k]
  ------------------
  278|      0|            return -1; /* Can't see outside of the current buffer */
  279|       |
  280|   381k|        bm->data = (num != 0) ? bo->data + num : bo->data;
  ------------------
  |  Branch (280:20): [True: 0, False: 381k]
  ------------------
  281|   381k|        bm->length = bo->length - num;
  282|   381k|        bm->max = bo->max - num;
  283|   381k|        off = (ossl_ssize_t)num;
  284|       |        /* FALLTHRU */
  285|  1.33M|    case BIO_C_FILE_TELL:
  ------------------
  |  |  468|  1.33M|#define BIO_C_FILE_TELL 133
  ------------------
  |  Branch (285:5): [True: 953k, False: 954k]
  ------------------
  286|  1.33M|        ret = (long)off;
  287|  1.33M|        if (off > LONG_MAX)
  ------------------
  |  Branch (287:13): [True: 0, False: 1.33M]
  ------------------
  288|      0|            ret = -1;
  289|  1.33M|        break;
  290|      0|    case BIO_CTRL_EOF:
  ------------------
  |  |   91|      0|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  ------------------
  |  Branch (290:5): [True: 0, False: 1.90M]
  ------------------
  291|      0|        ret = (long)(bm->length == 0);
  292|      0|        break;
  293|      0|    case BIO_C_SET_BUF_MEM_EOF_RETURN:
  ------------------
  |  |  464|      0|#define BIO_C_SET_BUF_MEM_EOF_RETURN 130 /* return end of input \
  ------------------
  |  Branch (293:5): [True: 0, False: 1.90M]
  ------------------
  294|      0|        b->num = (int)num;
  295|      0|        break;
  296|   381k|    case BIO_CTRL_INFO:
  ------------------
  |  |   92|   381k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  ------------------
  |  Branch (296:5): [True: 381k, False: 1.52M]
  ------------------
  297|   381k|        ret = (long)bm->length;
  298|   381k|        if (ptr != NULL) {
  ------------------
  |  Branch (298:13): [True: 190k, False: 190k]
  ------------------
  299|   190k|            pptr = (char **)ptr;
  300|   190k|            *pptr = (char *)(bm->data);
  301|   190k|        }
  302|   381k|        break;
  303|      0|    case BIO_C_SET_BUF_MEM:
  ------------------
  |  |  448|      0|#define BIO_C_SET_BUF_MEM 114
  ------------------
  |  Branch (303:5): [True: 0, False: 1.90M]
  ------------------
  304|      0|        mem_buf_free(b);
  305|      0|        b->shutdown = (int)num;
  306|      0|        bbm->buf = ptr;
  307|      0|        *bbm->readp = *bbm->buf;
  308|      0|        break;
  309|   190k|    case BIO_C_GET_BUF_MEM_PTR:
  ------------------
  |  |  449|   190k|#define BIO_C_GET_BUF_MEM_PTR 115
  ------------------
  |  Branch (309:5): [True: 190k, False: 1.71M]
  ------------------
  310|   190k|        if (ptr != NULL) {
  ------------------
  |  Branch (310:13): [True: 190k, False: 0]
  ------------------
  311|   190k|            if (!(b->flags & BIO_FLAGS_MEM_RDONLY))
  ------------------
  |  |  239|   190k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (311:17): [True: 190k, False: 0]
  ------------------
  312|   190k|                mem_buf_sync(b);
  313|   190k|            bm = bbm->buf;
  314|   190k|            pptr = (char **)ptr;
  315|   190k|            *pptr = (char *)bm;
  316|   190k|        }
  317|   190k|        break;
  318|      0|    case BIO_CTRL_GET_CLOSE:
  ------------------
  |  |   97|      0|#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
  ------------------
  |  Branch (318:5): [True: 0, False: 1.90M]
  ------------------
  319|      0|        ret = (long)b->shutdown;
  320|      0|        break;
  321|  1.31k|    case BIO_CTRL_SET_CLOSE:
  ------------------
  |  |   98|  1.31k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  ------------------
  |  Branch (321:5): [True: 1.31k, False: 1.90M]
  ------------------
  322|  1.31k|        b->shutdown = (int)num;
  323|  1.31k|        break;
  324|      0|    case BIO_CTRL_WPENDING:
  ------------------
  |  |  102|      0|#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
  ------------------
  |  Branch (324:5): [True: 0, False: 1.90M]
  ------------------
  325|      0|        ret = 0L;
  326|      0|        break;
  327|      0|    case BIO_CTRL_PENDING:
  ------------------
  |  |   99|      0|#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
  ------------------
  |  Branch (327:5): [True: 0, False: 1.90M]
  ------------------
  328|      0|        ret = (long)bm->length;
  329|      0|        break;
  330|      0|    case BIO_CTRL_DUP:
  ------------------
  |  |  101|      0|#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
  ------------------
  |  Branch (330:5): [True: 0, False: 1.90M]
  ------------------
  331|      0|    case BIO_CTRL_FLUSH:
  ------------------
  |  |  100|      0|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  ------------------
  |  Branch (331:5): [True: 0, False: 1.90M]
  ------------------
  332|      0|        ret = 1;
  333|      0|        break;
  334|      0|    case BIO_CTRL_PUSH:
  ------------------
  |  |   95|      0|#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
  ------------------
  |  Branch (334:5): [True: 0, False: 1.90M]
  ------------------
  335|      0|    case BIO_CTRL_POP:
  ------------------
  |  |   96|      0|#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
  ------------------
  |  Branch (335:5): [True: 0, False: 1.90M]
  ------------------
  336|      0|    default:
  ------------------
  |  Branch (336:5): [True: 0, False: 1.90M]
  ------------------
  337|      0|        ret = 0;
  338|      0|        break;
  339|  1.90M|    }
  340|  1.90M|    return ret;
  341|  1.90M|}
bss_mem.c:mem_buf_free:
  158|   770k|{
  159|   770k|    if (a == NULL)
  ------------------
  |  Branch (159:9): [True: 0, False: 770k]
  ------------------
  160|      0|        return 0;
  161|       |
  162|   770k|    if (a->shutdown && a->init && a->ptr != NULL) {
  ------------------
  |  Branch (162:9): [True: 770k, False: 0]
  |  Branch (162:24): [True: 770k, False: 0]
  |  Branch (162:35): [True: 770k, False: 0]
  ------------------
  163|   770k|        BIO_BUF_MEM *bb = (BIO_BUF_MEM *)a->ptr;
  164|   770k|        BUF_MEM *b = bb->buf;
  165|       |
  166|   770k|        if (a->flags & BIO_FLAGS_MEM_RDONLY)
  ------------------
  |  |  239|   770k|#define BIO_FLAGS_MEM_RDONLY 0x200
  ------------------
  |  Branch (166:13): [True: 381k, False: 389k]
  ------------------
  167|   381k|            b->data = NULL;
  168|   770k|        BUF_MEM_free(b);
  169|   770k|    }
  170|   770k|    return 1;
  171|   770k|}
bss_mem.c:mem_new:
  133|   770k|{
  134|   770k|    return mem_init(bi, 0L);
  135|   770k|}
bss_mem.c:mem_init:
  110|   770k|{
  111|   770k|    BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));
  ------------------
  |  |  108|   770k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|       |
  113|   770k|    if (bb == NULL)
  ------------------
  |  Branch (113:9): [True: 0, False: 770k]
  ------------------
  114|      0|        return 0;
  115|   770k|    if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 770k]
  ------------------
  116|      0|        OPENSSL_free(bb);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return 0;
  118|      0|    }
  119|   770k|    if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL) {
  ------------------
  |  |  108|   770k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 0, False: 770k]
  ------------------
  120|      0|        BUF_MEM_free(bb->buf);
  121|      0|        OPENSSL_free(bb);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  122|      0|        return 0;
  123|      0|    }
  124|   770k|    *bb->readp = *bb->buf;
  125|   770k|    bi->shutdown = 1;
  126|   770k|    bi->init = 1;
  127|   770k|    bi->num = -1;
  128|   770k|    bi->ptr = (char *)bb;
  129|   770k|    return 1;
  130|   770k|}
bss_mem.c:mem_free:
  143|   770k|{
  144|   770k|    BIO_BUF_MEM *bb;
  145|       |
  146|   770k|    if (a == NULL)
  ------------------
  |  Branch (146:9): [True: 0, False: 770k]
  ------------------
  147|      0|        return 0;
  148|       |
  149|   770k|    bb = (BIO_BUF_MEM *)a->ptr;
  150|   770k|    if (!mem_buf_free(a))
  ------------------
  |  Branch (150:9): [True: 0, False: 770k]
  ------------------
  151|      0|        return 0;
  152|   770k|    OPENSSL_free(bb->readp);
  ------------------
  |  |  131|   770k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  153|   770k|    OPENSSL_free(bb);
  ------------------
  |  |  131|   770k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|   770k|    return 1;
  155|   770k|}

ossl_core_bio_up_ref:
   35|   381k|{
   36|   381k|    int ref = 0;
   37|       |
   38|   381k|    return CRYPTO_UP_REF(&cb->ref_cnt, &ref);
   39|   381k|}
ossl_core_bio_free:
   42|   953k|{
   43|   953k|    int ref = 0, res = 1;
   44|       |
   45|   953k|    if (cb != NULL) {
  ------------------
  |  Branch (45:9): [True: 762k, False: 190k]
  ------------------
   46|   762k|        CRYPTO_DOWN_REF(&cb->ref_cnt, &ref);
   47|   762k|        if (ref <= 0) {
  ------------------
  |  Branch (47:13): [True: 381k, False: 381k]
  ------------------
   48|   381k|            res = BIO_free(cb->bio);
   49|   381k|            CRYPTO_FREE_REF(&cb->ref_cnt);
   50|   381k|            OPENSSL_free(cb);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|   381k|        }
   52|   762k|    }
   53|   953k|    return res;
   54|   953k|}
ossl_core_bio_new_from_bio:
   57|   381k|{
   58|   381k|    OSSL_CORE_BIO *cb = core_bio_new();
   59|       |
   60|   381k|    if (cb == NULL || !BIO_up_ref(bio)) {
  ------------------
  |  Branch (60:9): [True: 0, False: 381k]
  |  Branch (60:23): [True: 0, False: 381k]
  ------------------
   61|      0|        ossl_core_bio_free(cb);
   62|      0|        return NULL;
   63|      0|    }
   64|   381k|    cb->bio = bio;
   65|   381k|    return cb;
   66|   381k|}
ossl_core_bio_read_ex:
   94|   762k|{
   95|   762k|    return BIO_read_ex(cb->bio, data, dlen, readbytes);
   96|   762k|}
ossl_core_bio.c:core_bio_new:
   24|   381k|{
   25|   381k|    OSSL_CORE_BIO *cb = OPENSSL_malloc(sizeof(*cb));
  ------------------
  |  |  106|   381k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|       |
   27|   381k|    if (cb == NULL || !CRYPTO_NEW_REF(&cb->ref_cnt, 1)) {
  ------------------
  |  Branch (27:9): [True: 0, False: 381k]
  |  Branch (27:23): [True: 0, False: 381k]
  ------------------
   28|      0|        OPENSSL_free(cb);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|      0|        return NULL;
   30|      0|    }
   31|   381k|    return cb;
   32|   381k|}

bn_mul_add_words:
  116|  1.24M|{
  117|  1.24M|    BN_ULONG c1 = 0;
  ------------------
  |  |   37|  1.24M|#define BN_ULONG unsigned long
  ------------------
  118|       |
  119|  1.24M|    if (num <= 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 1.24M]
  ------------------
  120|      0|        return c1;
  121|       |
  122|  1.92M|    while (num & ~3) {
  ------------------
  |  Branch (122:12): [True: 679k, False: 1.24M]
  ------------------
  123|   679k|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   77|   679k|    do {                              \
  |  |   78|   679k|        register BN_ULONG high, low;  \
  |  |   79|   679k|        asm("mulq %3"                 \
  |  |   80|   679k|            : "=a"(low), "=d"(high)   \
  |  |   81|   679k|            : "a"(word), "m"(a)       \
  |  |   82|   679k|            : "cc");                  \
  |  |   83|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   679k|            : "+r"(carry), "+d"(high) \
  |  |   85|   679k|            : "a"(low), "g"(0)        \
  |  |   86|   679k|            : "cc");                  \
  |  |   87|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   679k|            : "+m"(r), "+d"(high)     \
  |  |   89|   679k|            : "r"(carry), "g"(0)      \
  |  |   90|   679k|            : "cc");                  \
  |  |   91|   679k|        carry = high;                 \
  |  |   92|   679k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 679k]
  |  |  ------------------
  ------------------
  124|   679k|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   77|   679k|    do {                              \
  |  |   78|   679k|        register BN_ULONG high, low;  \
  |  |   79|   679k|        asm("mulq %3"                 \
  |  |   80|   679k|            : "=a"(low), "=d"(high)   \
  |  |   81|   679k|            : "a"(word), "m"(a)       \
  |  |   82|   679k|            : "cc");                  \
  |  |   83|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   679k|            : "+r"(carry), "+d"(high) \
  |  |   85|   679k|            : "a"(low), "g"(0)        \
  |  |   86|   679k|            : "cc");                  \
  |  |   87|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   679k|            : "+m"(r), "+d"(high)     \
  |  |   89|   679k|            : "r"(carry), "g"(0)      \
  |  |   90|   679k|            : "cc");                  \
  |  |   91|   679k|        carry = high;                 \
  |  |   92|   679k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 679k]
  |  |  ------------------
  ------------------
  125|   679k|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   77|   679k|    do {                              \
  |  |   78|   679k|        register BN_ULONG high, low;  \
  |  |   79|   679k|        asm("mulq %3"                 \
  |  |   80|   679k|            : "=a"(low), "=d"(high)   \
  |  |   81|   679k|            : "a"(word), "m"(a)       \
  |  |   82|   679k|            : "cc");                  \
  |  |   83|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   679k|            : "+r"(carry), "+d"(high) \
  |  |   85|   679k|            : "a"(low), "g"(0)        \
  |  |   86|   679k|            : "cc");                  \
  |  |   87|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   679k|            : "+m"(r), "+d"(high)     \
  |  |   89|   679k|            : "r"(carry), "g"(0)      \
  |  |   90|   679k|            : "cc");                  \
  |  |   91|   679k|        carry = high;                 \
  |  |   92|   679k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 679k]
  |  |  ------------------
  ------------------
  126|   679k|        mul_add(rp[3], ap[3], w, c1);
  ------------------
  |  |   77|   679k|    do {                              \
  |  |   78|   679k|        register BN_ULONG high, low;  \
  |  |   79|   679k|        asm("mulq %3"                 \
  |  |   80|   679k|            : "=a"(low), "=d"(high)   \
  |  |   81|   679k|            : "a"(word), "m"(a)       \
  |  |   82|   679k|            : "cc");                  \
  |  |   83|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   679k|            : "+r"(carry), "+d"(high) \
  |  |   85|   679k|            : "a"(low), "g"(0)        \
  |  |   86|   679k|            : "cc");                  \
  |  |   87|   679k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   679k|            : "+m"(r), "+d"(high)     \
  |  |   89|   679k|            : "r"(carry), "g"(0)      \
  |  |   90|   679k|            : "cc");                  \
  |  |   91|   679k|        carry = high;                 \
  |  |   92|   679k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 679k]
  |  |  ------------------
  ------------------
  127|   679k|        ap += 4;
  128|   679k|        rp += 4;
  129|   679k|        num -= 4;
  130|   679k|    }
  131|  1.24M|    if (num) {
  ------------------
  |  Branch (131:9): [True: 1.03M, False: 208k]
  ------------------
  132|  1.03M|        mul_add(rp[0], ap[0], w, c1);
  ------------------
  |  |   77|  1.03M|    do {                              \
  |  |   78|  1.03M|        register BN_ULONG high, low;  \
  |  |   79|  1.03M|        asm("mulq %3"                 \
  |  |   80|  1.03M|            : "=a"(low), "=d"(high)   \
  |  |   81|  1.03M|            : "a"(word), "m"(a)       \
  |  |   82|  1.03M|            : "cc");                  \
  |  |   83|  1.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|  1.03M|            : "+r"(carry), "+d"(high) \
  |  |   85|  1.03M|            : "a"(low), "g"(0)        \
  |  |   86|  1.03M|            : "cc");                  \
  |  |   87|  1.03M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|  1.03M|            : "+m"(r), "+d"(high)     \
  |  |   89|  1.03M|            : "r"(carry), "g"(0)      \
  |  |   90|  1.03M|            : "cc");                  \
  |  |   91|  1.03M|        carry = high;                 \
  |  |   92|  1.03M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 1.03M]
  |  |  ------------------
  ------------------
  133|  1.03M|        if (--num == 0)
  ------------------
  |  Branch (133:13): [True: 188k, False: 846k]
  ------------------
  134|   188k|            return c1;
  135|   846k|        mul_add(rp[1], ap[1], w, c1);
  ------------------
  |  |   77|   846k|    do {                              \
  |  |   78|   846k|        register BN_ULONG high, low;  \
  |  |   79|   846k|        asm("mulq %3"                 \
  |  |   80|   846k|            : "=a"(low), "=d"(high)   \
  |  |   81|   846k|            : "a"(word), "m"(a)       \
  |  |   82|   846k|            : "cc");                  \
  |  |   83|   846k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   846k|            : "+r"(carry), "+d"(high) \
  |  |   85|   846k|            : "a"(low), "g"(0)        \
  |  |   86|   846k|            : "cc");                  \
  |  |   87|   846k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   846k|            : "+m"(r), "+d"(high)     \
  |  |   89|   846k|            : "r"(carry), "g"(0)      \
  |  |   90|   846k|            : "cc");                  \
  |  |   91|   846k|        carry = high;                 \
  |  |   92|   846k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 846k]
  |  |  ------------------
  ------------------
  136|   846k|        if (--num == 0)
  ------------------
  |  Branch (136:13): [True: 658k, False: 188k]
  ------------------
  137|   658k|            return c1;
  138|   188k|        mul_add(rp[2], ap[2], w, c1);
  ------------------
  |  |   77|   188k|    do {                              \
  |  |   78|   188k|        register BN_ULONG high, low;  \
  |  |   79|   188k|        asm("mulq %3"                 \
  |  |   80|   188k|            : "=a"(low), "=d"(high)   \
  |  |   81|   188k|            : "a"(word), "m"(a)       \
  |  |   82|   188k|            : "cc");                  \
  |  |   83|   188k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   84|   188k|            : "+r"(carry), "+d"(high) \
  |  |   85|   188k|            : "a"(low), "g"(0)        \
  |  |   86|   188k|            : "cc");                  \
  |  |   87|   188k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |   88|   188k|            : "+m"(r), "+d"(high)     \
  |  |   89|   188k|            : "r"(carry), "g"(0)      \
  |  |   90|   188k|            : "cc");                  \
  |  |   91|   188k|        carry = high;                 \
  |  |   92|   188k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (92:14): [Folded, False: 188k]
  |  |  ------------------
  ------------------
  139|   188k|        return c1;
  140|   846k|    }
  141|       |
  142|   208k|    return c1;
  143|  1.24M|}
bn_mul_words:
  146|  1.36M|{
  147|  1.36M|    BN_ULONG c1 = 0;
  ------------------
  |  |   37|  1.36M|#define BN_ULONG unsigned long
  ------------------
  148|       |
  149|  1.36M|    if (num <= 0)
  ------------------
  |  Branch (149:9): [True: 0, False: 1.36M]
  ------------------
  150|      0|        return c1;
  151|       |
  152|  2.44M|    while (num & ~3) {
  ------------------
  |  Branch (152:12): [True: 1.08M, False: 1.36M]
  ------------------
  153|  1.08M|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   95|  1.08M|    do {                              \
  |  |   96|  1.08M|        register BN_ULONG high, low;  \
  |  |   97|  1.08M|        asm("mulq %3"                 \
  |  |   98|  1.08M|            : "=a"(low), "=d"(high)   \
  |  |   99|  1.08M|            : "a"(word), "g"(a)       \
  |  |  100|  1.08M|            : "cc");                  \
  |  |  101|  1.08M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  1.08M|            : "+r"(carry), "+d"(high) \
  |  |  103|  1.08M|            : "a"(low), "g"(0)        \
  |  |  104|  1.08M|            : "cc");                  \
  |  |  105|  1.08M|        (r) = carry, carry = high;    \
  |  |  106|  1.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 1.08M]
  |  |  ------------------
  ------------------
  154|  1.08M|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   95|  1.08M|    do {                              \
  |  |   96|  1.08M|        register BN_ULONG high, low;  \
  |  |   97|  1.08M|        asm("mulq %3"                 \
  |  |   98|  1.08M|            : "=a"(low), "=d"(high)   \
  |  |   99|  1.08M|            : "a"(word), "g"(a)       \
  |  |  100|  1.08M|            : "cc");                  \
  |  |  101|  1.08M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  1.08M|            : "+r"(carry), "+d"(high) \
  |  |  103|  1.08M|            : "a"(low), "g"(0)        \
  |  |  104|  1.08M|            : "cc");                  \
  |  |  105|  1.08M|        (r) = carry, carry = high;    \
  |  |  106|  1.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 1.08M]
  |  |  ------------------
  ------------------
  155|  1.08M|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   95|  1.08M|    do {                              \
  |  |   96|  1.08M|        register BN_ULONG high, low;  \
  |  |   97|  1.08M|        asm("mulq %3"                 \
  |  |   98|  1.08M|            : "=a"(low), "=d"(high)   \
  |  |   99|  1.08M|            : "a"(word), "g"(a)       \
  |  |  100|  1.08M|            : "cc");                  \
  |  |  101|  1.08M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  1.08M|            : "+r"(carry), "+d"(high) \
  |  |  103|  1.08M|            : "a"(low), "g"(0)        \
  |  |  104|  1.08M|            : "cc");                  \
  |  |  105|  1.08M|        (r) = carry, carry = high;    \
  |  |  106|  1.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 1.08M]
  |  |  ------------------
  ------------------
  156|  1.08M|        mul(rp[3], ap[3], w, c1);
  ------------------
  |  |   95|  1.08M|    do {                              \
  |  |   96|  1.08M|        register BN_ULONG high, low;  \
  |  |   97|  1.08M|        asm("mulq %3"                 \
  |  |   98|  1.08M|            : "=a"(low), "=d"(high)   \
  |  |   99|  1.08M|            : "a"(word), "g"(a)       \
  |  |  100|  1.08M|            : "cc");                  \
  |  |  101|  1.08M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  1.08M|            : "+r"(carry), "+d"(high) \
  |  |  103|  1.08M|            : "a"(low), "g"(0)        \
  |  |  104|  1.08M|            : "cc");                  \
  |  |  105|  1.08M|        (r) = carry, carry = high;    \
  |  |  106|  1.08M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 1.08M]
  |  |  ------------------
  ------------------
  157|  1.08M|        ap += 4;
  158|  1.08M|        rp += 4;
  159|  1.08M|        num -= 4;
  160|  1.08M|    }
  161|  1.36M|    if (num) {
  ------------------
  |  Branch (161:9): [True: 1.31M, False: 47.0k]
  ------------------
  162|  1.31M|        mul(rp[0], ap[0], w, c1);
  ------------------
  |  |   95|  1.31M|    do {                              \
  |  |   96|  1.31M|        register BN_ULONG high, low;  \
  |  |   97|  1.31M|        asm("mulq %3"                 \
  |  |   98|  1.31M|            : "=a"(low), "=d"(high)   \
  |  |   99|  1.31M|            : "a"(word), "g"(a)       \
  |  |  100|  1.31M|            : "cc");                  \
  |  |  101|  1.31M|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|  1.31M|            : "+r"(carry), "+d"(high) \
  |  |  103|  1.31M|            : "a"(low), "g"(0)        \
  |  |  104|  1.31M|            : "cc");                  \
  |  |  105|  1.31M|        (r) = carry, carry = high;    \
  |  |  106|  1.31M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 1.31M]
  |  |  ------------------
  ------------------
  163|  1.31M|        if (--num == 0)
  ------------------
  |  Branch (163:13): [True: 470k, False: 846k]
  ------------------
  164|   470k|            return c1;
  165|   846k|        mul(rp[1], ap[1], w, c1);
  ------------------
  |  |   95|   846k|    do {                              \
  |  |   96|   846k|        register BN_ULONG high, low;  \
  |  |   97|   846k|        asm("mulq %3"                 \
  |  |   98|   846k|            : "=a"(low), "=d"(high)   \
  |  |   99|   846k|            : "a"(word), "g"(a)       \
  |  |  100|   846k|            : "cc");                  \
  |  |  101|   846k|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|   846k|            : "+r"(carry), "+d"(high) \
  |  |  103|   846k|            : "a"(low), "g"(0)        \
  |  |  104|   846k|            : "cc");                  \
  |  |  105|   846k|        (r) = carry, carry = high;    \
  |  |  106|   846k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 846k]
  |  |  ------------------
  ------------------
  166|   846k|        if (--num == 0)
  ------------------
  |  Branch (166:13): [True: 846k, False: 0]
  ------------------
  167|   846k|            return c1;
  168|      0|        mul(rp[2], ap[2], w, c1);
  ------------------
  |  |   95|      0|    do {                              \
  |  |   96|      0|        register BN_ULONG high, low;  \
  |  |   97|      0|        asm("mulq %3"                 \
  |  |   98|      0|            : "=a"(low), "=d"(high)   \
  |  |   99|      0|            : "a"(word), "g"(a)       \
  |  |  100|      0|            : "cc");                  \
  |  |  101|      0|        asm("addq %2,%0; adcq %3,%1"  \
  |  |  102|      0|            : "+r"(carry), "+d"(high) \
  |  |  103|      0|            : "a"(low), "g"(0)        \
  |  |  104|      0|            : "cc");                  \
  |  |  105|      0|        (r) = carry, carry = high;    \
  |  |  106|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (106:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  169|      0|    }
  170|  47.0k|    return c1;
  171|  1.36M|}
bn_sqr_words:
  174|   188k|{
  175|   188k|    if (n <= 0)
  ------------------
  |  Branch (175:9): [True: 0, False: 188k]
  ------------------
  176|      0|        return;
  177|       |
  178|   376k|    while (n & ~3) {
  ------------------
  |  Branch (178:12): [True: 188k, False: 188k]
  ------------------
  179|   188k|        sqr(r[0], r[1], a[0]);
  ------------------
  |  |  109|   188k|    asm("mulq %2"            \
  |  |  110|   188k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   188k|        : "a"(a)             \
  |  |  112|   188k|        : "cc");
  ------------------
  180|   188k|        sqr(r[2], r[3], a[1]);
  ------------------
  |  |  109|   188k|    asm("mulq %2"            \
  |  |  110|   188k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   188k|        : "a"(a)             \
  |  |  112|   188k|        : "cc");
  ------------------
  181|   188k|        sqr(r[4], r[5], a[2]);
  ------------------
  |  |  109|   188k|    asm("mulq %2"            \
  |  |  110|   188k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   188k|        : "a"(a)             \
  |  |  112|   188k|        : "cc");
  ------------------
  182|   188k|        sqr(r[6], r[7], a[3]);
  ------------------
  |  |  109|   188k|    asm("mulq %2"            \
  |  |  110|   188k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   188k|        : "a"(a)             \
  |  |  112|   188k|        : "cc");
  ------------------
  183|   188k|        a += 4;
  184|   188k|        r += 8;
  185|   188k|        n -= 4;
  186|   188k|    }
  187|   188k|    if (n) {
  ------------------
  |  Branch (187:9): [True: 188k, False: 0]
  ------------------
  188|   188k|        sqr(r[0], r[1], a[0]);
  ------------------
  |  |  109|   188k|    asm("mulq %2"            \
  |  |  110|   188k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   188k|        : "a"(a)             \
  |  |  112|   188k|        : "cc");
  ------------------
  189|   188k|        if (--n == 0)
  ------------------
  |  Branch (189:13): [True: 0, False: 188k]
  ------------------
  190|      0|            return;
  191|   188k|        sqr(r[2], r[3], a[1]);
  ------------------
  |  |  109|   188k|    asm("mulq %2"            \
  |  |  110|   188k|        : "=a"(r0), "=d"(r1) \
  |  |  111|   188k|        : "a"(a)             \
  |  |  112|   188k|        : "cc");
  ------------------
  192|   188k|        if (--n == 0)
  ------------------
  |  Branch (192:13): [True: 188k, False: 0]
  ------------------
  193|   188k|            return;
  194|      0|        sqr(r[4], r[5], a[2]);
  ------------------
  |  |  109|      0|    asm("mulq %2"            \
  |  |  110|      0|        : "=a"(r0), "=d"(r1) \
  |  |  111|      0|        : "a"(a)             \
  |  |  112|      0|        : "cc");
  ------------------
  195|      0|    }
  196|   188k|}
bn_div_words:
  199|  1.07M|{
  200|  1.07M|    BN_ULONG ret, waste;
  ------------------
  |  |   37|  1.07M|#define BN_ULONG unsigned long
  ------------------
  201|       |
  202|  1.07M|    asm("divq      %4" : "=a"(ret), "=d"(waste)
  203|  1.07M|        : "a"(l), "d"(h), "r"(d)
  204|  1.07M|        : "cc");
  205|       |
  206|  1.07M|    return ret;
  207|  1.07M|}
bn_add_words:
  211|  5.92M|{
  212|  5.92M|    BN_ULONG ret;
  ------------------
  |  |   37|  5.92M|#define BN_ULONG unsigned long
  ------------------
  213|  5.92M|    size_t i = 0;
  214|       |
  215|  5.92M|    if (n <= 0)
  ------------------
  |  Branch (215:9): [True: 47.0k, False: 5.87M]
  ------------------
  216|  47.0k|        return 0;
  217|       |
  218|  5.87M|    asm volatile("       subq    %0,%0           \n" /* clear carry */
  219|  5.87M|                 "       jmp     1f              \n"
  220|  5.87M|                 ".p2align 4                     \n"
  221|  5.87M|                 "1:     movq    (%4,%2,8),%0    \n"
  222|  5.87M|                 "       adcq    (%5,%2,8),%0    \n"
  223|  5.87M|                 "       movq    %0,(%3,%2,8)    \n"
  224|  5.87M|                 "       lea     1(%2),%2        \n"
  225|  5.87M|                 "       dec     %1              \n"
  226|  5.87M|                 "       jnz     1b              \n"
  227|  5.87M|                 "       sbbq    %0,%0           \n"
  228|  5.87M|        : "=&r"(ret), "+c"(n), "+r"(i)
  229|  5.87M|        : "r"(rp), "r"(ap), "r"(bp)
  230|  5.87M|        : "cc", "memory");
  231|       |
  232|  5.87M|    return ret & 1;
  233|  5.92M|}
bn_sub_words:
  238|  4.85M|{
  239|  4.85M|    BN_ULONG ret;
  ------------------
  |  |   37|  4.85M|#define BN_ULONG unsigned long
  ------------------
  240|  4.85M|    size_t i = 0;
  241|       |
  242|  4.85M|    if (n <= 0)
  ------------------
  |  Branch (242:9): [True: 0, False: 4.85M]
  ------------------
  243|      0|        return 0;
  244|       |
  245|  4.85M|    asm volatile("       subq    %0,%0           \n" /* clear borrow */
  246|  4.85M|                 "       jmp     1f              \n"
  247|  4.85M|                 ".p2align 4                     \n"
  248|  4.85M|                 "1:     movq    (%4,%2,8),%0    \n"
  249|  4.85M|                 "       sbbq    (%5,%2,8),%0    \n"
  250|  4.85M|                 "       movq    %0,(%3,%2,8)    \n"
  251|  4.85M|                 "       lea     1(%2),%2        \n"
  252|  4.85M|                 "       dec     %1              \n"
  253|  4.85M|                 "       jnz     1b              \n"
  254|  4.85M|                 "       sbbq    %0,%0           \n"
  255|  4.85M|        : "=&r"(ret), "+c"(n), "+r"(i)
  256|  4.85M|        : "r"(rp), "r"(ap), "r"(bp)
  257|  4.85M|        : "cc", "memory");
  258|       |
  259|  4.85M|    return ret & 1;
  260|  4.85M|}

BN_add:
   15|  47.0k|{
   16|  47.0k|    int ret, r_neg, cmp_res;
   17|       |
   18|  47.0k|    bn_check_top(a);
   19|  47.0k|    bn_check_top(b);
   20|       |
   21|  47.0k|    if (a->neg == b->neg) {
  ------------------
  |  Branch (21:9): [True: 0, False: 47.0k]
  ------------------
   22|      0|        r_neg = a->neg;
   23|      0|        ret = BN_uadd(r, a, b);
   24|  47.0k|    } else {
   25|  47.0k|        cmp_res = BN_ucmp(a, b);
   26|  47.0k|        if (cmp_res > 0) {
  ------------------
  |  Branch (26:13): [True: 0, False: 47.0k]
  ------------------
   27|      0|            r_neg = a->neg;
   28|      0|            ret = BN_usub(r, a, b);
   29|  47.0k|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (29:20): [True: 47.0k, False: 0]
  ------------------
   30|  47.0k|            r_neg = b->neg;
   31|  47.0k|            ret = BN_usub(r, b, a);
   32|  47.0k|        } else {
   33|      0|            r_neg = 0;
   34|      0|            BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   35|      0|            ret = 1;
   36|      0|        }
   37|  47.0k|    }
   38|       |
   39|  47.0k|    r->neg = r_neg;
   40|  47.0k|    bn_check_top(r);
   41|  47.0k|    return ret;
   42|  47.0k|}
BN_sub:
   46|  47.0k|{
   47|  47.0k|    int ret, r_neg, cmp_res;
   48|       |
   49|  47.0k|    bn_check_top(a);
   50|  47.0k|    bn_check_top(b);
   51|       |
   52|  47.0k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (52:9): [True: 0, False: 47.0k]
  ------------------
   53|      0|        r_neg = a->neg;
   54|      0|        ret = BN_uadd(r, a, b);
   55|  47.0k|    } else {
   56|  47.0k|        cmp_res = BN_ucmp(a, b);
   57|  47.0k|        if (cmp_res > 0) {
  ------------------
  |  Branch (57:13): [True: 0, False: 47.0k]
  ------------------
   58|      0|            r_neg = a->neg;
   59|      0|            ret = BN_usub(r, a, b);
   60|  47.0k|        } else if (cmp_res < 0) {
  ------------------
  |  Branch (60:20): [True: 47.0k, False: 0]
  ------------------
   61|  47.0k|            r_neg = !b->neg;
   62|  47.0k|            ret = BN_usub(r, b, a);
   63|  47.0k|        } else {
   64|      0|            r_neg = 0;
   65|      0|            BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   66|      0|            ret = 1;
   67|      0|        }
   68|  47.0k|    }
   69|       |
   70|  47.0k|    r->neg = r_neg;
   71|  47.0k|    bn_check_top(r);
   72|  47.0k|    return ret;
   73|  47.0k|}
BN_uadd:
   77|  4.46M|{
   78|  4.46M|    int max, min, dif;
   79|  4.46M|    const BN_ULONG *ap, *bp;
   80|  4.46M|    BN_ULONG *rp, carry, t1, t2;
  ------------------
  |  |   37|  4.46M|#define BN_ULONG unsigned long
  ------------------
   81|       |
   82|  4.46M|    bn_check_top(a);
   83|  4.46M|    bn_check_top(b);
   84|       |
   85|  4.46M|    if (a->top < b->top) {
  ------------------
  |  Branch (85:9): [True: 94.0k, False: 4.37M]
  ------------------
   86|  94.0k|        const BIGNUM *tmp;
   87|       |
   88|  94.0k|        tmp = a;
   89|  94.0k|        a = b;
   90|  94.0k|        b = tmp;
   91|  94.0k|    }
   92|  4.46M|    max = a->top;
   93|  4.46M|    min = b->top;
   94|  4.46M|    dif = max - min;
   95|       |
   96|  4.46M|    if (bn_wexpand(r, max + 1) == NULL)
  ------------------
  |  Branch (96:9): [True: 0, False: 4.46M]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  4.46M|    r->top = max;
  100|       |
  101|  4.46M|    ap = a->d;
  102|  4.46M|    bp = b->d;
  103|  4.46M|    rp = r->d;
  104|       |
  105|  4.46M|    carry = bn_add_words(rp, ap, bp, min);
  106|  4.46M|    rp += min;
  107|  4.46M|    ap += min;
  108|       |
  109|  5.92M|    while (dif) {
  ------------------
  |  Branch (109:12): [True: 1.45M, False: 4.46M]
  ------------------
  110|  1.45M|        dif--;
  111|  1.45M|        t1 = *(ap++);
  112|  1.45M|        t2 = (t1 + carry) & BN_MASK2;
  ------------------
  |  |   93|  1.45M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  113|  1.45M|        *(rp++) = t2;
  114|  1.45M|        carry &= (t2 == 0);
  115|  1.45M|    }
  116|  4.46M|    *rp = carry;
  117|  4.46M|    r->top += (int)carry;
  118|       |
  119|  4.46M|    r->neg = 0;
  120|  4.46M|    bn_check_top(r);
  121|  4.46M|    return 1;
  122|  4.46M|}
BN_usub:
  126|  3.10M|{
  127|  3.10M|    int max, min, dif;
  128|  3.10M|    BN_ULONG t1, t2, borrow, *rp;
  ------------------
  |  |   37|  3.10M|#define BN_ULONG unsigned long
  ------------------
  129|  3.10M|    const BN_ULONG *ap, *bp;
  130|       |
  131|  3.10M|    bn_check_top(a);
  132|  3.10M|    bn_check_top(b);
  133|       |
  134|  3.10M|    max = a->top;
  135|  3.10M|    min = b->top;
  136|  3.10M|    dif = max - min;
  137|       |
  138|  3.10M|    if (dif < 0) { /* hmm... should not be happening */
  ------------------
  |  Branch (138:9): [True: 0, False: 3.10M]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_BN, BN_R_ARG2_LT_ARG3);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        return 0;
  141|      0|    }
  142|       |
  143|  3.10M|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (143:9): [True: 0, False: 3.10M]
  ------------------
  144|      0|        return 0;
  145|       |
  146|  3.10M|    ap = a->d;
  147|  3.10M|    bp = b->d;
  148|  3.10M|    rp = r->d;
  149|       |
  150|  3.10M|    borrow = bn_sub_words(rp, ap, bp, min);
  151|  3.10M|    ap += min;
  152|  3.10M|    rp += min;
  153|       |
  154|  3.15M|    while (dif) {
  ------------------
  |  Branch (154:12): [True: 47.0k, False: 3.10M]
  ------------------
  155|  47.0k|        dif--;
  156|  47.0k|        t1 = *(ap++);
  157|  47.0k|        t2 = (t1 - borrow) & BN_MASK2;
  ------------------
  |  |   93|  47.0k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  158|  47.0k|        *(rp++) = t2;
  159|  47.0k|        borrow &= (t1 == 0);
  160|  47.0k|    }
  161|       |
  162|  3.15M|    while (max && *--rp == 0)
  ------------------
  |  Branch (162:12): [True: 3.10M, False: 47.0k]
  |  Branch (162:19): [True: 47.0k, False: 3.05M]
  ------------------
  163|  47.0k|        max--;
  164|       |
  165|  3.10M|    r->top = max;
  166|  3.10M|    r->neg = 0;
  167|  3.10M|    bn_pollute(r);
  168|       |
  169|  3.10M|    return 1;
  170|  3.10M|}

BN_CTX_new_ex:
  123|   261k|{
  124|   261k|    BN_CTX *ret;
  125|       |
  126|   261k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|   261k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (126:9): [True: 0, False: 261k]
  ------------------
  127|      0|        return NULL;
  128|       |    /* Initialise the structure */
  129|   261k|    BN_POOL_init(&ret->pool);
  130|   261k|    BN_STACK_init(&ret->stack);
  131|   261k|    ret->libctx = ctx;
  132|   261k|    return ret;
  133|   261k|}
BN_CTX_free:
  159|   898k|{
  160|   898k|    if (ctx == NULL)
  ------------------
  |  Branch (160:9): [True: 637k, False: 261k]
  ------------------
  161|   637k|        return;
  162|   261k|#ifndef FIPS_MODULE
  163|   261k|    OSSL_TRACE_BEGIN(BN_CTX)
  ------------------
  |  |  221|   261k|    do {                           \
  |  |  222|   261k|        BIO *trc_out = NULL;       \
  |  |  223|   261k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 261k]
  |  |  ------------------
  ------------------
  164|      0|    {
  165|      0|        BN_POOL_ITEM *pool = ctx->pool.head;
  166|      0|        BIO_printf(trc_out,
  167|      0|            "BN_CTX_free(): stack-size=%d, pool-bignums=%d\n",
  168|      0|            ctx->stack.size, ctx->pool.size);
  169|      0|        BIO_printf(trc_out, "  dmaxs: ");
  170|      0|        while (pool) {
  ------------------
  |  Branch (170:16): [True: 0, False: 0]
  ------------------
  171|      0|            unsigned loop = 0;
  172|      0|            while (loop < BN_CTX_POOL_SIZE)
  ------------------
  |  |   15|      0|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (172:20): [True: 0, False: 0]
  ------------------
  173|      0|                BIO_printf(trc_out, "%02x ", pool->vals[loop++].dmax);
  174|      0|            pool = pool->next;
  175|      0|        }
  176|      0|        BIO_printf(trc_out, "\n");
  177|      0|    }
  178|   261k|    OSSL_TRACE_END(BN_CTX);
  ------------------
  |  |  226|   261k|    }                            \
  |  |  227|   261k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 261k]
  |  |  ------------------
  ------------------
  179|   261k|#endif
  180|   261k|    BN_STACK_finish(&ctx->stack);
  181|   261k|    BN_POOL_finish(&ctx->pool);
  182|   261k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   261k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  183|   261k|}
BN_CTX_start:
  186|  1.30M|{
  187|  1.30M|    CTXDBG("ENTER BN_CTX_start()", ctx);
  ------------------
  |  |  110|  1.30M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  221|  1.30M|    do {                           \
  |  |  |  |  222|  1.30M|        BIO *trc_out = NULL;       \
  |  |  |  |  223|  1.30M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (223:13): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  1.30M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  1.30M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  226|  1.30M|    }                            \
  |  |  |  |  227|  1.30M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (227:12): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|       |    /* If we're already overflowing ... */
  189|  1.30M|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (189:9): [True: 0, False: 1.30M]
  |  Branch (189:27): [True: 0, False: 1.30M]
  ------------------
  190|      0|        ctx->err_stack++;
  191|       |    /* (Try to) get a new frame pointer */
  192|  1.30M|    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {
  ------------------
  |  Branch (192:14): [True: 0, False: 1.30M]
  ------------------
  193|      0|        ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|        ctx->err_stack++;
  195|      0|    }
  196|       |    CTXDBG("LEAVE BN_CTX_start()", ctx);
  ------------------
  |  |  110|  1.30M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  221|  1.30M|    do {                           \
  |  |  |  |  222|  1.30M|        BIO *trc_out = NULL;       \
  |  |  |  |  223|  1.30M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (223:13): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  1.30M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  1.30M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  226|  1.30M|    }                            \
  |  |  |  |  227|  1.30M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (227:12): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  197|  1.30M|}
BN_CTX_end:
  200|  1.30M|{
  201|  1.30M|    if (ctx == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 1.30M]
  ------------------
  202|      0|        return;
  203|  1.30M|    CTXDBG("ENTER BN_CTX_end()", ctx);
  ------------------
  |  |  110|  1.30M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  221|  1.30M|    do {                           \
  |  |  |  |  222|  1.30M|        BIO *trc_out = NULL;       \
  |  |  |  |  223|  1.30M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (223:13): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  1.30M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  1.30M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  226|  1.30M|    }                            \
  |  |  |  |  227|  1.30M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (227:12): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  204|  1.30M|    if (ctx->err_stack)
  ------------------
  |  Branch (204:9): [True: 0, False: 1.30M]
  ------------------
  205|      0|        ctx->err_stack--;
  206|  1.30M|    else {
  207|  1.30M|        unsigned int fp = BN_STACK_pop(&ctx->stack);
  208|       |        /* Does this stack frame have anything to release? */
  209|  1.30M|        if (fp < ctx->used)
  ------------------
  |  Branch (209:13): [True: 1.24M, False: 57.4k]
  ------------------
  210|  1.24M|            BN_POOL_release(&ctx->pool, ctx->used - fp);
  211|  1.30M|        ctx->used = fp;
  212|       |        /* Unjam "too_many" in case "get" had failed */
  213|  1.30M|        ctx->too_many = 0;
  214|  1.30M|    }
  215|       |    CTXDBG("LEAVE BN_CTX_end()", ctx);
  ------------------
  |  |  110|  1.30M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  221|  1.30M|    do {                           \
  |  |  |  |  222|  1.30M|        BIO *trc_out = NULL;       \
  |  |  |  |  223|  1.30M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (223:13): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  1.30M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  1.30M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  226|  1.30M|    }                            \
  |  |  |  |  227|  1.30M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (227:12): [Folded, False: 1.30M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  216|  1.30M|}
BN_CTX_get:
  219|  3.75M|{
  220|  3.75M|    BIGNUM *ret;
  221|       |
  222|  3.75M|    CTXDBG("ENTER BN_CTX_get()", ctx);
  ------------------
  |  |  110|  3.75M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  221|  3.75M|    do {                           \
  |  |  |  |  222|  3.75M|        BIO *trc_out = NULL;       \
  |  |  |  |  223|  3.75M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (223:13): [Folded, False: 3.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  3.75M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  3.75M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  226|  3.75M|    }                            \
  |  |  |  |  227|  3.75M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (227:12): [Folded, False: 3.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  223|  3.75M|    if (ctx->err_stack || ctx->too_many)
  ------------------
  |  Branch (223:9): [True: 0, False: 3.75M]
  |  Branch (223:27): [True: 0, False: 3.75M]
  ------------------
  224|      0|        return NULL;
  225|  3.75M|    if ((ret = BN_POOL_get(&ctx->pool, ctx->flags)) == NULL) {
  ------------------
  |  Branch (225:9): [True: 0, False: 3.75M]
  ------------------
  226|       |        /*
  227|       |         * Setting too_many prevents repeated "get" attempts from cluttering
  228|       |         * the error stack.
  229|       |         */
  230|      0|        ctx->too_many = 1;
  231|      0|        ERR_raise(ERR_LIB_BN, BN_R_TOO_MANY_TEMPORARY_VARIABLES);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  232|      0|        return NULL;
  233|      0|    }
  234|       |    /* OK, make sure the returned bignum is "zero" */
  235|  3.75M|    BN_zero(ret);
  ------------------
  |  |  201|  3.75M|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  236|       |    /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  237|  3.75M|    ret->flags &= (~BN_FLG_CONSTTIME);
  ------------------
  |  |   67|  3.75M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  238|  3.75M|    ctx->used++;
  239|       |    CTXDBG("LEAVE BN_CTX_get()", ctx);
  ------------------
  |  |  110|  3.75M|    OSSL_TRACE_BEGIN(BN_CTX)       \
  |  |  ------------------
  |  |  |  |  221|  3.75M|    do {                           \
  |  |  |  |  222|  3.75M|        BIO *trc_out = NULL;       \
  |  |  |  |  223|  3.75M|        if (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (223:13): [Folded, False: 3.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  111|  3.75M|    {                              \
  |  |  112|      0|        ctxdbg(trc_out, str, ctx); \
  |  |  113|      0|    }                              \
  |  |  114|  3.75M|    OSSL_TRACE_END(BN_CTX)
  |  |  ------------------
  |  |  |  |  226|  3.75M|    }                            \
  |  |  |  |  227|  3.75M|    while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (227:12): [Folded, False: 3.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  240|  3.75M|    return ret;
  241|  3.75M|}
bn_ctx.c:BN_STACK_init:
  255|   261k|{
  256|       |    st->indexes = NULL;
  257|   261k|    st->depth = st->size = 0;
  258|   261k|}
bn_ctx.c:BN_STACK_finish:
  261|   261k|{
  262|   261k|    OPENSSL_free(st->indexes);
  ------------------
  |  |  131|   261k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  263|       |    st->indexes = NULL;
  264|   261k|}
bn_ctx.c:BN_STACK_push:
  267|  1.30M|{
  268|  1.30M|    if (st->depth == st->size) {
  ------------------
  |  Branch (268:9): [True: 203k, False: 1.09M]
  ------------------
  269|       |        /* Need to expand */
  270|   203k|        unsigned int newsize = st->size ? (st->size * 3 / 2) : BN_CTX_START_FRAMES;
  ------------------
  |  |   17|   203k|#define BN_CTX_START_FRAMES 32
  ------------------
  |  Branch (270:32): [True: 0, False: 203k]
  ------------------
  271|   203k|        unsigned int *newitems;
  272|       |
  273|   203k|        if ((newitems = OPENSSL_malloc_array(newsize, sizeof(*newitems))) == NULL)
  ------------------
  |  |  110|   203k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (273:13): [True: 0, False: 203k]
  ------------------
  274|      0|            return 0;
  275|   203k|        if (st->depth)
  ------------------
  |  Branch (275:13): [True: 0, False: 203k]
  ------------------
  276|      0|            memcpy(newitems, st->indexes, sizeof(*newitems) * st->depth);
  277|   203k|        OPENSSL_free(st->indexes);
  ------------------
  |  |  131|   203k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|   203k|        st->indexes = newitems;
  279|   203k|        st->size = newsize;
  280|   203k|    }
  281|  1.30M|    st->indexes[(st->depth)++] = idx;
  282|  1.30M|    return 1;
  283|  1.30M|}
bn_ctx.c:BN_STACK_pop:
  286|  1.30M|{
  287|  1.30M|    return st->indexes[--(st->depth)];
  288|  1.30M|}
bn_ctx.c:BN_POOL_init:
  295|   261k|{
  296|       |    p->head = p->current = p->tail = NULL;
  297|   261k|    p->used = p->size = 0;
  298|   261k|}
bn_ctx.c:BN_POOL_finish:
  301|   261k|{
  302|   261k|    unsigned int loop;
  303|   261k|    BIGNUM *bn;
  304|       |
  305|   412k|    while (p->head) {
  ------------------
  |  Branch (305:12): [True: 151k, False: 261k]
  ------------------
  306|  2.57M|        for (loop = 0, bn = p->head->vals; loop++ < BN_CTX_POOL_SIZE; bn++)
  ------------------
  |  |   15|  2.57M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (306:44): [True: 2.42M, False: 151k]
  ------------------
  307|  2.42M|            if (bn->d)
  ------------------
  |  Branch (307:17): [True: 1.23M, False: 1.19M]
  ------------------
  308|  1.23M|                BN_clear_free(bn);
  309|   151k|        p->current = p->head->next;
  310|   151k|        OPENSSL_free(p->head);
  ------------------
  |  |  131|   151k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  311|   151k|        p->head = p->current;
  312|   151k|    }
  313|   261k|}
bn_ctx.c:BN_POOL_get:
  316|  3.75M|{
  317|  3.75M|    BIGNUM *bn;
  318|  3.75M|    unsigned int loop;
  319|       |
  320|       |    /* Full; allocate a new pool item and link it in. */
  321|  3.75M|    if (p->used == p->size) {
  ------------------
  |  Branch (321:9): [True: 151k, False: 3.60M]
  ------------------
  322|   151k|        BN_POOL_ITEM *item;
  323|       |
  324|   151k|        if ((item = OPENSSL_malloc(sizeof(*item))) == NULL)
  ------------------
  |  |  106|   151k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (324:13): [True: 0, False: 151k]
  ------------------
  325|      0|            return NULL;
  326|  2.57M|        for (loop = 0, bn = item->vals; loop++ < BN_CTX_POOL_SIZE; bn++) {
  ------------------
  |  |   15|  2.57M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (326:41): [True: 2.42M, False: 151k]
  ------------------
  327|  2.42M|            bn_init(bn);
  328|  2.42M|            if ((flag & BN_FLG_SECURE) != 0)
  ------------------
  |  |   68|  2.42M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (328:17): [True: 0, False: 2.42M]
  ------------------
  329|      0|                BN_set_flags(bn, BN_FLG_SECURE);
  ------------------
  |  |   68|      0|#define BN_FLG_SECURE 0x08
  ------------------
  330|  2.42M|        }
  331|   151k|        item->prev = p->tail;
  332|   151k|        item->next = NULL;
  333|       |
  334|   151k|        if (p->head == NULL)
  ------------------
  |  Branch (334:13): [True: 151k, False: 0]
  ------------------
  335|   151k|            p->head = p->current = p->tail = item;
  336|      0|        else {
  337|      0|            p->tail->next = item;
  338|      0|            p->tail = item;
  339|      0|            p->current = item;
  340|      0|        }
  341|   151k|        p->size += BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|   151k|#define BN_CTX_POOL_SIZE 16
  ------------------
  342|   151k|        p->used++;
  343|       |        /* Return the first bignum from the new pool */
  344|   151k|        return item->vals;
  345|   151k|    }
  346|       |
  347|  3.60M|    if (!p->used)
  ------------------
  |  Branch (347:9): [True: 214k, False: 3.39M]
  ------------------
  348|   214k|        p->current = p->head;
  349|  3.39M|    else if ((p->used % BN_CTX_POOL_SIZE) == 0)
  ------------------
  |  |   15|  3.39M|#define BN_CTX_POOL_SIZE 16
  ------------------
  |  Branch (349:14): [True: 0, False: 3.39M]
  ------------------
  350|      0|        p->current = p->current->next;
  351|  3.60M|    return p->current->vals + ((p->used++) % BN_CTX_POOL_SIZE);
  ------------------
  |  |   15|  3.60M|#define BN_CTX_POOL_SIZE 16
  ------------------
  352|  3.75M|}
bn_ctx.c:BN_POOL_release:
  355|  1.24M|{
  356|  1.24M|    unsigned int offset = (p->used - 1) % BN_CTX_POOL_SIZE;
  ------------------
  |  |   15|  1.24M|#define BN_CTX_POOL_SIZE 16
  ------------------
  357|       |
  358|  1.24M|    p->used -= num;
  359|  4.99M|    while (num--) {
  ------------------
  |  Branch (359:12): [True: 3.75M, False: 1.24M]
  ------------------
  360|  3.75M|        bn_check_top(p->current->vals + offset);
  361|  3.75M|        if (offset == 0) {
  ------------------
  |  Branch (361:13): [True: 365k, False: 3.39M]
  ------------------
  362|   365k|            offset = BN_CTX_POOL_SIZE - 1;
  ------------------
  |  |   15|   365k|#define BN_CTX_POOL_SIZE 16
  ------------------
  363|   365k|            p->current = p->current->prev;
  364|   365k|        } else
  365|  3.39M|            offset--;
  366|  3.75M|    }
  367|  1.24M|}

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

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

int_bn_mod_inverse:
  200|  47.0k|{
  201|  47.0k|    BIGNUM *A, *B, *X, *Y, *M, *D, *T, *R = NULL;
  202|  47.0k|    BIGNUM *ret = NULL;
  203|  47.0k|    int sign;
  204|       |
  205|       |    /* This is invalid input so we don't worry about constant time here */
  206|  47.0k|    if (BN_abs_is_word(n, 1) || BN_is_zero(n)) {
  ------------------
  |  Branch (206:9): [True: 0, False: 47.0k]
  |  Branch (206:33): [True: 0, False: 47.0k]
  ------------------
  207|      0|        *pnoinv = 1;
  208|      0|        return NULL;
  209|      0|    }
  210|       |
  211|  47.0k|    *pnoinv = 0;
  212|       |
  213|  47.0k|    if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|  47.0k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (213:9): [True: 0, False: 47.0k]
  ------------------
  214|  47.0k|        || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
  ------------------
  |  |   67|  47.0k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (214:12): [True: 0, False: 47.0k]
  ------------------
  215|      0|        return bn_mod_inverse_no_branch(in, a, n, ctx, pnoinv);
  216|      0|    }
  217|       |
  218|  47.0k|    bn_check_top(a);
  219|  47.0k|    bn_check_top(n);
  220|       |
  221|  47.0k|    BN_CTX_start(ctx);
  222|  47.0k|    A = BN_CTX_get(ctx);
  223|  47.0k|    B = BN_CTX_get(ctx);
  224|  47.0k|    X = BN_CTX_get(ctx);
  225|  47.0k|    D = BN_CTX_get(ctx);
  226|  47.0k|    M = BN_CTX_get(ctx);
  227|  47.0k|    Y = BN_CTX_get(ctx);
  228|  47.0k|    T = BN_CTX_get(ctx);
  229|  47.0k|    if (T == NULL)
  ------------------
  |  Branch (229:9): [True: 0, False: 47.0k]
  ------------------
  230|      0|        goto err;
  231|       |
  232|  47.0k|    if (in == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 47.0k]
  ------------------
  233|      0|        R = BN_new();
  234|  47.0k|    else
  235|  47.0k|        R = in;
  236|  47.0k|    if (R == NULL)
  ------------------
  |  Branch (236:9): [True: 0, False: 47.0k]
  ------------------
  237|      0|        goto err;
  238|       |
  239|  47.0k|    if (!BN_one(X))
  ------------------
  |  |  196|  47.0k|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (239:9): [True: 0, False: 47.0k]
  ------------------
  240|      0|        goto err;
  241|  47.0k|    BN_zero(Y);
  ------------------
  |  |  201|  47.0k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  242|  47.0k|    if (BN_copy(B, a) == NULL)
  ------------------
  |  Branch (242:9): [True: 0, False: 47.0k]
  ------------------
  243|      0|        goto err;
  244|  47.0k|    if (BN_copy(A, n) == NULL)
  ------------------
  |  Branch (244:9): [True: 0, False: 47.0k]
  ------------------
  245|      0|        goto err;
  246|  47.0k|    A->neg = 0;
  247|  47.0k|    if (B->neg || (BN_ucmp(B, A) >= 0)) {
  ------------------
  |  Branch (247:9): [True: 0, False: 47.0k]
  |  Branch (247:19): [True: 47.0k, False: 0]
  ------------------
  248|  47.0k|        if (!BN_nnmod(B, B, A, ctx))
  ------------------
  |  Branch (248:13): [True: 0, False: 47.0k]
  ------------------
  249|      0|            goto err;
  250|  47.0k|    }
  251|  47.0k|    sign = -1;
  252|       |    /*-
  253|       |     * From  B = a mod |n|,  A = |n|  it follows that
  254|       |     *
  255|       |     *      0 <= B < A,
  256|       |     *     -sign*X*a  ==  B   (mod |n|),
  257|       |     *      sign*Y*a  ==  A   (mod |n|).
  258|       |     */
  259|       |
  260|  47.0k|    if (BN_is_odd(n) && (BN_num_bits(n) <= 2048)) {
  ------------------
  |  Branch (260:9): [True: 47.0k, False: 0]
  |  Branch (260:25): [True: 47.0k, False: 0]
  ------------------
  261|       |        /*
  262|       |         * Binary inversion algorithm; requires odd modulus. This is faster
  263|       |         * than the general algorithm if the modulus is sufficiently small
  264|       |         * (about 400 .. 500 bits on 32-bit systems, but much more on 64-bit
  265|       |         * systems)
  266|       |         */
  267|  47.0k|        int shift;
  268|       |
  269|  3.05M|        while (!BN_is_zero(B)) {
  ------------------
  |  Branch (269:16): [True: 3.00M, False: 47.0k]
  ------------------
  270|       |            /*-
  271|       |             *      0 < B < |n|,
  272|       |             *      0 < A <= |n|,
  273|       |             * (1) -sign*X*a  ==  B   (mod |n|),
  274|       |             * (2)  sign*Y*a  ==  A   (mod |n|)
  275|       |             */
  276|       |
  277|       |            /*
  278|       |             * Now divide B by the maximum possible power of two in the
  279|       |             * integers, and divide X by the same value mod |n|. When we're
  280|       |             * done, (1) still holds.
  281|       |             */
  282|  3.00M|            shift = 0;
  283|  4.46M|            while (!BN_is_bit_set(B, shift)) { /* note that 0 < B */
  ------------------
  |  Branch (283:20): [True: 1.45M, False: 3.00M]
  ------------------
  284|  1.45M|                shift++;
  285|       |
  286|  1.45M|                if (BN_is_odd(X)) {
  ------------------
  |  Branch (286:21): [True: 752k, False: 705k]
  ------------------
  287|   752k|                    if (!BN_uadd(X, X, n))
  ------------------
  |  Branch (287:25): [True: 0, False: 752k]
  ------------------
  288|      0|                        goto err;
  289|   752k|                }
  290|       |                /*
  291|       |                 * now X is even, so we can easily divide it by two
  292|       |                 */
  293|  1.45M|                if (!BN_rshift1(X, X))
  ------------------
  |  Branch (293:21): [True: 0, False: 1.45M]
  ------------------
  294|      0|                    goto err;
  295|  1.45M|            }
  296|  3.00M|            if (shift > 0) {
  ------------------
  |  Branch (296:17): [True: 1.45M, False: 1.55M]
  ------------------
  297|  1.45M|                if (!BN_rshift(B, B, shift))
  ------------------
  |  Branch (297:21): [True: 0, False: 1.45M]
  ------------------
  298|      0|                    goto err;
  299|  1.45M|            }
  300|       |
  301|       |            /*
  302|       |             * Same for A and Y.  Afterwards, (2) still holds.
  303|       |             */
  304|  3.00M|            shift = 0;
  305|  4.51M|            while (!BN_is_bit_set(A, shift)) { /* note that 0 < A */
  ------------------
  |  Branch (305:20): [True: 1.50M, False: 3.00M]
  ------------------
  306|  1.50M|                shift++;
  307|       |
  308|  1.50M|                if (BN_is_odd(Y)) {
  ------------------
  |  Branch (308:21): [True: 705k, False: 799k]
  ------------------
  309|   705k|                    if (!BN_uadd(Y, Y, n))
  ------------------
  |  Branch (309:25): [True: 0, False: 705k]
  ------------------
  310|      0|                        goto err;
  311|   705k|                }
  312|       |                /* now Y is even */
  313|  1.50M|                if (!BN_rshift1(Y, Y))
  ------------------
  |  Branch (313:21): [True: 0, False: 1.50M]
  ------------------
  314|      0|                    goto err;
  315|  1.50M|            }
  316|  3.00M|            if (shift > 0) {
  ------------------
  |  Branch (316:17): [True: 1.50M, False: 1.50M]
  ------------------
  317|  1.50M|                if (!BN_rshift(A, A, shift))
  ------------------
  |  Branch (317:21): [True: 0, False: 1.50M]
  ------------------
  318|      0|                    goto err;
  319|  1.50M|            }
  320|       |
  321|       |            /*-
  322|       |             * We still have (1) and (2).
  323|       |             * Both  A  and  B  are odd.
  324|       |             * The following computations ensure that
  325|       |             *
  326|       |             *     0 <= B < |n|,
  327|       |             *      0 < A < |n|,
  328|       |             * (1) -sign*X*a  ==  B   (mod |n|),
  329|       |             * (2)  sign*Y*a  ==  A   (mod |n|),
  330|       |             *
  331|       |             * and that either  A  or  B  is even in the next iteration.
  332|       |             */
  333|  3.00M|            if (BN_ucmp(B, A) >= 0) {
  ------------------
  |  Branch (333:17): [True: 1.50M, False: 1.50M]
  ------------------
  334|       |                /* -sign*(X + Y)*a == B - A  (mod |n|) */
  335|  1.50M|                if (!BN_uadd(X, X, Y))
  ------------------
  |  Branch (335:21): [True: 0, False: 1.50M]
  ------------------
  336|      0|                    goto err;
  337|       |                /*
  338|       |                 * NB: we could use BN_mod_add_quick(X, X, Y, n), but that
  339|       |                 * actually makes the algorithm slower
  340|       |                 */
  341|  1.50M|                if (!BN_usub(B, B, A))
  ------------------
  |  Branch (341:21): [True: 0, False: 1.50M]
  ------------------
  342|      0|                    goto err;
  343|  1.50M|            } else {
  344|       |                /*  sign*(X + Y)*a == A - B  (mod |n|) */
  345|  1.50M|                if (!BN_uadd(Y, Y, X))
  ------------------
  |  Branch (345:21): [True: 0, False: 1.50M]
  ------------------
  346|      0|                    goto err;
  347|       |                /*
  348|       |                 * as above, BN_mod_add_quick(Y, Y, X, n) would slow things down
  349|       |                 */
  350|  1.50M|                if (!BN_usub(A, A, B))
  ------------------
  |  Branch (350:21): [True: 0, False: 1.50M]
  ------------------
  351|      0|                    goto err;
  352|  1.50M|            }
  353|  3.00M|        }
  354|  47.0k|    } else {
  355|       |        /* general inversion algorithm */
  356|       |
  357|      0|        while (!BN_is_zero(B)) {
  ------------------
  |  Branch (357:16): [True: 0, False: 0]
  ------------------
  358|      0|            BIGNUM *tmp;
  359|       |
  360|       |            /*-
  361|       |             *      0 < B < A,
  362|       |             * (*) -sign*X*a  ==  B   (mod |n|),
  363|       |             *      sign*Y*a  ==  A   (mod |n|)
  364|       |             */
  365|       |
  366|       |            /* (D, M) := (A/B, A%B) ... */
  367|      0|            if (BN_num_bits(A) == BN_num_bits(B)) {
  ------------------
  |  Branch (367:17): [True: 0, False: 0]
  ------------------
  368|      0|                if (!BN_one(D))
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (368:21): [True: 0, False: 0]
  ------------------
  369|      0|                    goto err;
  370|      0|                if (!BN_sub(M, A, B))
  ------------------
  |  Branch (370:21): [True: 0, False: 0]
  ------------------
  371|      0|                    goto err;
  372|      0|            } else if (BN_num_bits(A) == BN_num_bits(B) + 1) {
  ------------------
  |  Branch (372:24): [True: 0, False: 0]
  ------------------
  373|       |                /* A/B is 1, 2, or 3 */
  374|      0|                if (!BN_lshift1(T, B))
  ------------------
  |  Branch (374:21): [True: 0, False: 0]
  ------------------
  375|      0|                    goto err;
  376|      0|                if (BN_ucmp(A, T) < 0) {
  ------------------
  |  Branch (376:21): [True: 0, False: 0]
  ------------------
  377|       |                    /* A < 2*B, so D=1 */
  378|      0|                    if (!BN_one(D))
  ------------------
  |  |  196|      0|#define BN_one(a) (BN_set_word((a), 1))
  ------------------
  |  Branch (378:25): [True: 0, False: 0]
  ------------------
  379|      0|                        goto err;
  380|      0|                    if (!BN_sub(M, A, B))
  ------------------
  |  Branch (380:25): [True: 0, False: 0]
  ------------------
  381|      0|                        goto err;
  382|      0|                } else {
  383|       |                    /* A >= 2*B, so D=2 or D=3 */
  384|      0|                    if (!BN_sub(M, A, T))
  ------------------
  |  Branch (384:25): [True: 0, False: 0]
  ------------------
  385|      0|                        goto err;
  386|      0|                    if (!BN_add(D, T, B))
  ------------------
  |  Branch (386:25): [True: 0, False: 0]
  ------------------
  387|      0|                        goto err; /* use D (:= 3*B) as temp */
  388|      0|                    if (BN_ucmp(A, D) < 0) {
  ------------------
  |  Branch (388:25): [True: 0, False: 0]
  ------------------
  389|       |                        /* A < 3*B, so D=2 */
  390|      0|                        if (!BN_set_word(D, 2))
  ------------------
  |  Branch (390:29): [True: 0, False: 0]
  ------------------
  391|      0|                            goto err;
  392|       |                        /*
  393|       |                         * M (= A - 2*B) already has the correct value
  394|       |                         */
  395|      0|                    } else {
  396|       |                        /* only D=3 remains */
  397|      0|                        if (!BN_set_word(D, 3))
  ------------------
  |  Branch (397:29): [True: 0, False: 0]
  ------------------
  398|      0|                            goto err;
  399|       |                        /*
  400|       |                         * currently M = A - 2*B, but we need M = A - 3*B
  401|       |                         */
  402|      0|                        if (!BN_sub(M, M, B))
  ------------------
  |  Branch (402:29): [True: 0, False: 0]
  ------------------
  403|      0|                            goto err;
  404|      0|                    }
  405|      0|                }
  406|      0|            } else {
  407|      0|                if (!BN_div(D, M, A, B, ctx))
  ------------------
  |  Branch (407:21): [True: 0, False: 0]
  ------------------
  408|      0|                    goto err;
  409|      0|            }
  410|       |
  411|       |            /*-
  412|       |             * Now
  413|       |             *      A = D*B + M;
  414|       |             * thus we have
  415|       |             * (**)  sign*Y*a  ==  D*B + M   (mod |n|).
  416|       |             */
  417|       |
  418|      0|            tmp = A; /* keep the BIGNUM object, the value does not matter */
  419|       |
  420|       |            /* (A, B) := (B, A mod B) ... */
  421|      0|            A = B;
  422|      0|            B = M;
  423|       |            /* ... so we have  0 <= B < A  again */
  424|       |
  425|       |            /*-
  426|       |             * Since the former  M  is now  B  and the former  B  is now  A,
  427|       |             * (**) translates into
  428|       |             *       sign*Y*a  ==  D*A + B    (mod |n|),
  429|       |             * i.e.
  430|       |             *       sign*Y*a - D*A  ==  B    (mod |n|).
  431|       |             * Similarly, (*) translates into
  432|       |             *      -sign*X*a  ==  A          (mod |n|).
  433|       |             *
  434|       |             * Thus,
  435|       |             *   sign*Y*a + D*sign*X*a  ==  B  (mod |n|),
  436|       |             * i.e.
  437|       |             *        sign*(Y + D*X)*a  ==  B  (mod |n|).
  438|       |             *
  439|       |             * So if we set  (X, Y, sign) := (Y + D*X, X, -sign), we arrive back at
  440|       |             *      -sign*X*a  ==  B   (mod |n|),
  441|       |             *       sign*Y*a  ==  A   (mod |n|).
  442|       |             * Note that  X  and  Y  stay non-negative all the time.
  443|       |             */
  444|       |
  445|       |            /*
  446|       |             * most of the time D is very small, so we can optimize tmp := D*X+Y
  447|       |             */
  448|      0|            if (BN_is_one(D)) {
  ------------------
  |  Branch (448:17): [True: 0, False: 0]
  ------------------
  449|      0|                if (!BN_add(tmp, X, Y))
  ------------------
  |  Branch (449:21): [True: 0, False: 0]
  ------------------
  450|      0|                    goto err;
  451|      0|            } else {
  452|      0|                if (BN_is_word(D, 2)) {
  ------------------
  |  Branch (452:21): [True: 0, False: 0]
  ------------------
  453|      0|                    if (!BN_lshift1(tmp, X))
  ------------------
  |  Branch (453:25): [True: 0, False: 0]
  ------------------
  454|      0|                        goto err;
  455|      0|                } else if (BN_is_word(D, 4)) {
  ------------------
  |  Branch (455:28): [True: 0, False: 0]
  ------------------
  456|      0|                    if (!BN_lshift(tmp, X, 2))
  ------------------
  |  Branch (456:25): [True: 0, False: 0]
  ------------------
  457|      0|                        goto err;
  458|      0|                } else if (D->top == 1) {
  ------------------
  |  Branch (458:28): [True: 0, False: 0]
  ------------------
  459|      0|                    if (!BN_copy(tmp, X))
  ------------------
  |  Branch (459:25): [True: 0, False: 0]
  ------------------
  460|      0|                        goto err;
  461|      0|                    if (!BN_mul_word(tmp, D->d[0]))
  ------------------
  |  Branch (461:25): [True: 0, False: 0]
  ------------------
  462|      0|                        goto err;
  463|      0|                } else {
  464|      0|                    if (!BN_mul(tmp, D, X, ctx))
  ------------------
  |  Branch (464:25): [True: 0, False: 0]
  ------------------
  465|      0|                        goto err;
  466|      0|                }
  467|      0|                if (!BN_add(tmp, tmp, Y))
  ------------------
  |  Branch (467:21): [True: 0, False: 0]
  ------------------
  468|      0|                    goto err;
  469|      0|            }
  470|       |
  471|      0|            M = Y; /* keep the BIGNUM object, the value does not matter */
  472|      0|            Y = X;
  473|      0|            X = tmp;
  474|      0|            sign = -sign;
  475|      0|        }
  476|      0|    }
  477|       |
  478|       |    /*-
  479|       |     * The while loop (Euclid's algorithm) ends when
  480|       |     *      A == gcd(a,n);
  481|       |     * we have
  482|       |     *       sign*Y*a  ==  A  (mod |n|),
  483|       |     * where  Y  is non-negative.
  484|       |     */
  485|       |
  486|  47.0k|    if (sign < 0) {
  ------------------
  |  Branch (486:9): [True: 47.0k, False: 0]
  ------------------
  487|  47.0k|        if (!BN_sub(Y, n, Y))
  ------------------
  |  Branch (487:13): [True: 0, False: 47.0k]
  ------------------
  488|      0|            goto err;
  489|  47.0k|    }
  490|       |    /* Now  Y*a  ==  A  (mod |n|).  */
  491|       |
  492|  47.0k|    if (BN_is_one(A)) {
  ------------------
  |  Branch (492:9): [True: 47.0k, False: 0]
  ------------------
  493|       |        /* Y*a == 1  (mod |n|) */
  494|  47.0k|        if (!Y->neg && BN_ucmp(Y, n) < 0) {
  ------------------
  |  Branch (494:13): [True: 0, False: 47.0k]
  |  Branch (494:24): [True: 0, False: 0]
  ------------------
  495|      0|            if (!BN_copy(R, Y))
  ------------------
  |  Branch (495:17): [True: 0, False: 0]
  ------------------
  496|      0|                goto err;
  497|  47.0k|        } else {
  498|  47.0k|            if (!BN_nnmod(R, Y, n, ctx))
  ------------------
  |  Branch (498:17): [True: 0, False: 47.0k]
  ------------------
  499|      0|                goto err;
  500|  47.0k|        }
  501|  47.0k|    } else {
  502|      0|        *pnoinv = 1;
  503|      0|        goto err;
  504|      0|    }
  505|  47.0k|    ret = R;
  506|  47.0k|err:
  507|  47.0k|    if ((ret == NULL) && (in == NULL))
  ------------------
  |  Branch (507:9): [True: 0, False: 47.0k]
  |  Branch (507:26): [True: 0, False: 0]
  ------------------
  508|      0|        BN_free(R);
  509|  47.0k|    BN_CTX_end(ctx);
  510|  47.0k|    bn_check_top(ret);
  511|  47.0k|    return ret;
  512|  47.0k|}
BN_mod_inverse:
  517|  47.0k|{
  518|  47.0k|    BN_CTX *new_ctx = NULL;
  519|  47.0k|    BIGNUM *rv;
  520|  47.0k|    int noinv = 0;
  521|       |
  522|  47.0k|    if (ctx == NULL) {
  ------------------
  |  Branch (522:9): [True: 0, False: 47.0k]
  ------------------
  523|      0|        ctx = new_ctx = BN_CTX_new_ex(NULL);
  524|      0|        if (ctx == NULL) {
  ------------------
  |  Branch (524:13): [True: 0, False: 0]
  ------------------
  525|      0|            ERR_raise(ERR_LIB_BN, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  526|      0|            return NULL;
  527|      0|        }
  528|      0|    }
  529|       |
  530|  47.0k|    rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
  531|  47.0k|    if (noinv)
  ------------------
  |  Branch (531:9): [True: 0, False: 47.0k]
  ------------------
  532|       |        ERR_raise(ERR_LIB_BN, BN_R_NO_INVERSE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  533|  47.0k|    BN_CTX_free(new_ctx);
  534|  47.0k|    return rv;
  535|  47.0k|}

BN_value_one:
   83|   109k|{
   84|   109k|    static const BN_ULONG data_one = 1L;
   85|   109k|    static const BIGNUM const_one = {
   86|   109k|        (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   109k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
   87|   109k|    };
   88|       |
   89|   109k|    return &const_one;
   90|   109k|}
BN_num_bits_word:
  102|  1.66M|{
  103|  1.66M|    BN_ULONG x, mask;
  ------------------
  |  |   37|  1.66M|#define BN_ULONG unsigned long
  ------------------
  104|  1.66M|    int bits = (l != 0);
  105|       |
  106|  1.66M|#if BN_BITS2 > 32
  107|  1.66M|    x = l >> 32;
  108|  1.66M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  1.66M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  109|  1.66M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  1.66M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.66M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  110|  1.66M|    bits += 32 & mask;
  111|  1.66M|    l ^= (x ^ l) & mask;
  112|  1.66M|#endif
  113|       |
  114|  1.66M|    x = l >> 16;
  115|  1.66M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  1.66M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  116|  1.66M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  1.66M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.66M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|  1.66M|    bits += 16 & mask;
  118|  1.66M|    l ^= (x ^ l) & mask;
  119|       |
  120|  1.66M|    x = l >> 8;
  121|  1.66M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  1.66M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  122|  1.66M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  1.66M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.66M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|  1.66M|    bits += 8 & mask;
  124|  1.66M|    l ^= (x ^ l) & mask;
  125|       |
  126|  1.66M|    x = l >> 4;
  127|  1.66M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  1.66M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  128|  1.66M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  1.66M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.66M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  129|  1.66M|    bits += 4 & mask;
  130|  1.66M|    l ^= (x ^ l) & mask;
  131|       |
  132|  1.66M|    x = l >> 2;
  133|  1.66M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  1.66M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  1.66M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  1.66M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.66M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  135|  1.66M|    bits += 2 & mask;
  136|  1.66M|    l ^= (x ^ l) & mask;
  137|       |
  138|  1.66M|    x = l >> 1;
  139|  1.66M|    mask = (0 - x) & BN_MASK2;
  ------------------
  |  |   93|  1.66M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  140|  1.66M|    mask = (0 - (mask >> (BN_BITS2 - 1)));
  ------------------
  |  |   54|  1.66M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.66M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  141|  1.66M|    bits += 1 & mask;
  142|       |
  143|  1.66M|    return bits;
  144|  1.66M|}
BN_num_bits:
  179|  1.05M|{
  180|  1.05M|    int i = a->top - 1;
  181|  1.05M|    bn_check_top(a);
  182|       |
  183|  1.05M|    if (a->flags & BN_FLG_CONSTTIME) {
  ------------------
  |  |   67|  1.05M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (183:9): [True: 0, False: 1.05M]
  ------------------
  184|       |        /*
  185|       |         * We assume that BIGNUMs flagged as CONSTTIME have also been expanded
  186|       |         * so that a->dmax is not leaking secret information.
  187|       |         *
  188|       |         * In other words, it's the caller's responsibility to ensure `a` has
  189|       |         * been preallocated in advance to a public length if we hit this
  190|       |         * branch.
  191|       |         *
  192|       |         */
  193|      0|        return bn_num_bits_consttime(a);
  194|      0|    }
  195|       |
  196|  1.05M|    if (ossl_unlikely(BN_is_zero(a)))
  ------------------
  |  |   23|  1.05M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.05M]
  |  |  ------------------
  ------------------
  197|      0|        return 0;
  198|       |
  199|  1.05M|    return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  ------------------
  |  |   54|  1.05M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  1.05M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  200|  1.05M|}
BN_clear_free:
  213|  2.46M|{
  214|  2.46M|    if (a == NULL)
  ------------------
  |  Branch (214:9): [True: 888k, False: 1.57M]
  ------------------
  215|   888k|        return;
  216|  1.57M|    if (a->d != NULL && !BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  1.46M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (216:9): [True: 1.46M, False: 114k]
  |  Branch (216:25): [True: 1.46M, False: 0]
  ------------------
  217|  1.46M|        bn_free_d(a, 1);
  218|  1.57M|    if (BN_get_flags(a, BN_FLG_MALLOCED)) {
  ------------------
  |  |   58|  1.57M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (218:9): [True: 0, False: 1.57M]
  ------------------
  219|      0|        OPENSSL_cleanse(a, sizeof(*a));
  220|      0|        OPENSSL_free(a);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  221|      0|    }
  222|  1.57M|}
BN_free:
  225|  1.96M|{
  226|  1.96M|    if (a == NULL)
  ------------------
  |  Branch (226:9): [True: 213k, False: 1.75M]
  ------------------
  227|   213k|        return;
  228|  1.75M|    if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
  ------------------
  |  |   59|  1.75M|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  |  Branch (228:9): [True: 1.75M, False: 0]
  ------------------
  229|  1.75M|        bn_free_d(a, 0);
  230|  1.75M|    if (a->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|  1.75M|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (230:9): [True: 1.75M, False: 0]
  ------------------
  231|  1.75M|        OPENSSL_free(a);
  ------------------
  |  |  131|  1.75M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|  1.75M|}
bn_init:
  235|  2.81M|{
  236|  2.81M|    static BIGNUM nilbn;
  237|       |
  238|  2.81M|    *a = nilbn;
  239|  2.81M|    bn_check_top(a);
  240|  2.81M|}
BN_new:
  243|  1.75M|{
  244|  1.75M|    BIGNUM *ret;
  245|       |
  246|  1.75M|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|  1.75M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (246:9): [True: 0, False: 1.75M]
  ------------------
  247|      0|        return NULL;
  248|  1.75M|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|  1.75M|#define BN_FLG_MALLOCED 0x01
  ------------------
  249|  1.75M|    bn_check_top(ret);
  250|  1.75M|    return ret;
  251|  1.75M|}
bn_expand2:
  299|  4.02M|{
  300|  4.02M|    if (ossl_likely(words > b->dmax)) {
  ------------------
  |  |   22|  4.02M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.02M, False: 0]
  |  |  ------------------
  ------------------
  301|  4.02M|        BN_ULONG *a = bn_expand_internal(b, words);
  ------------------
  |  |   37|  4.02M|#define BN_ULONG unsigned long
  ------------------
  302|       |
  303|  4.02M|        if (ossl_unlikely(!a))
  ------------------
  |  |   23|  4.02M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.02M]
  |  |  ------------------
  ------------------
  304|      0|            return NULL;
  305|  4.02M|        if (b->d != NULL)
  ------------------
  |  Branch (305:13): [True: 814k, False: 3.21M]
  ------------------
  306|   814k|            bn_free_d(b, 1);
  307|  4.02M|        b->d = a;
  308|  4.02M|        b->dmax = words;
  309|  4.02M|    }
  310|       |
  311|  4.02M|    return b;
  312|  4.02M|}
BN_dup:
  315|  5.22k|{
  316|  5.22k|    BIGNUM *t;
  317|       |
  318|  5.22k|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 5.22k]
  ------------------
  319|      0|        return NULL;
  320|  5.22k|    bn_check_top(a);
  321|       |
  322|  5.22k|    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
  ------------------
  |  |   68|  5.22k|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (322:9): [True: 0, False: 5.22k]
  ------------------
  323|  5.22k|    if (t == NULL)
  ------------------
  |  Branch (323:9): [True: 0, False: 5.22k]
  ------------------
  324|      0|        return NULL;
  325|  5.22k|    if (!BN_copy(t, a)) {
  ------------------
  |  Branch (325:9): [True: 0, False: 5.22k]
  ------------------
  326|      0|        BN_free(t);
  327|      0|        return NULL;
  328|      0|    }
  329|  5.22k|    bn_check_top(t);
  330|  5.22k|    return t;
  331|  5.22k|}
BN_copy:
  334|  1.81M|{
  335|  1.81M|    int bn_words;
  336|       |
  337|  1.81M|    bn_check_top(b);
  338|       |
  339|  1.81M|    bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
  ------------------
  |  |   67|  1.81M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (339:16): [True: 0, False: 1.81M]
  ------------------
  340|       |
  341|  1.81M|    if (ossl_unlikely(a == b))
  ------------------
  |  |   23|  1.81M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.81M]
  |  |  ------------------
  ------------------
  342|      0|        return a;
  343|  1.81M|    if (ossl_unlikely(bn_wexpand(a, bn_words) == NULL))
  ------------------
  |  |   23|  1.81M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.81M]
  |  |  ------------------
  ------------------
  344|      0|        return NULL;
  345|       |
  346|  1.81M|    if (ossl_likely(b->top > 0))
  ------------------
  |  |   22|  1.81M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.75M, False: 57.4k]
  |  |  ------------------
  ------------------
  347|  1.75M|        memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
  348|       |
  349|  1.81M|    a->neg = b->neg;
  350|  1.81M|    a->top = b->top;
  351|  1.81M|    a->flags |= b->flags & BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  1.81M|#define BN_FLG_FIXED_TOP 0
  ------------------
  352|  1.81M|    bn_check_top(a);
  353|  1.81M|    return a;
  354|  1.81M|}
BN_set_word:
  415|   104k|{
  416|   104k|    bn_check_top(a);
  417|   104k|    if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
  ------------------
  |  Branch (417:9): [True: 0, False: 104k]
  ------------------
  418|      0|        return 0;
  419|   104k|    a->neg = 0;
  420|   104k|    a->d[0] = w;
  421|   104k|    a->top = (w ? 1 : 0);
  ------------------
  |  Branch (421:15): [True: 104k, False: 0]
  ------------------
  422|   104k|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   104k|#define BN_FLG_FIXED_TOP 0
  ------------------
  423|   104k|    bn_check_top(a);
  424|   104k|    return 1;
  425|   104k|}
BN_bin2bn:
  535|   846k|{
  536|   846k|    return bin2bn(s, len, ret, BIG, UNSIGNED);
  537|   846k|}
BN_ucmp:
  707|  3.92M|{
  708|  3.92M|    int i;
  709|  3.92M|    BN_ULONG t1, t2, *ap, *bp;
  ------------------
  |  |   37|  3.92M|#define BN_ULONG unsigned long
  ------------------
  710|       |
  711|  3.92M|    ap = a->d;
  712|  3.92M|    bp = b->d;
  713|       |
  714|  3.92M|    if (BN_get_flags(a, BN_FLG_CONSTTIME)
  ------------------
  |  |   67|  3.92M|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (714:9): [True: 0, False: 3.92M]
  ------------------
  715|      0|        && a->top == b->top) {
  ------------------
  |  Branch (715:12): [True: 0, False: 0]
  ------------------
  716|      0|        int res = 0;
  717|       |
  718|      0|        for (i = 0; i < b->top; i++) {
  ------------------
  |  Branch (718:21): [True: 0, False: 0]
  ------------------
  719|      0|            res = constant_time_select_int((int)constant_time_lt_bn(ap[i], bp[i]),
  720|      0|                -1, res);
  721|      0|            res = constant_time_select_int((int)constant_time_lt_bn(bp[i], ap[i]),
  722|      0|                1, res);
  723|      0|        }
  724|      0|        return res;
  725|      0|    }
  726|       |
  727|  3.92M|    bn_check_top(a);
  728|  3.92M|    bn_check_top(b);
  729|       |
  730|  3.92M|    i = a->top - b->top;
  731|  3.92M|    if (i != 0)
  ------------------
  |  Branch (731:9): [True: 376k, False: 3.54M]
  ------------------
  732|   376k|        return i;
  733|       |
  734|  4.20M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (734:26): [True: 4.04M, False: 151k]
  ------------------
  735|  4.04M|        t1 = ap[i];
  736|  4.04M|        t2 = bp[i];
  737|  4.04M|        if (t1 != t2)
  ------------------
  |  Branch (737:13): [True: 3.39M, False: 653k]
  ------------------
  738|  3.39M|            return ((t1 > t2) ? 1 : -1);
  ------------------
  |  Branch (738:21): [True: 1.45M, False: 1.93M]
  ------------------
  739|  4.04M|    }
  740|   151k|    return 0;
  741|  3.54M|}
BN_cmp:
  744|   193k|{
  745|   193k|    int i;
  746|   193k|    int gt, lt;
  747|   193k|    BN_ULONG t1, t2;
  ------------------
  |  |   37|   193k|#define BN_ULONG unsigned long
  ------------------
  748|       |
  749|   193k|    if ((a == NULL) || (b == NULL)) {
  ------------------
  |  Branch (749:9): [True: 0, False: 193k]
  |  Branch (749:24): [True: 0, False: 193k]
  ------------------
  750|      0|        if (a != NULL)
  ------------------
  |  Branch (750:13): [True: 0, False: 0]
  ------------------
  751|      0|            return -1;
  752|      0|        else if (b != NULL)
  ------------------
  |  Branch (752:18): [True: 0, False: 0]
  ------------------
  753|      0|            return 1;
  754|      0|        else
  755|      0|            return 0;
  756|      0|    }
  757|       |
  758|   193k|    bn_check_top(a);
  759|   193k|    bn_check_top(b);
  760|       |
  761|   193k|    if (a->neg != b->neg) {
  ------------------
  |  Branch (761:9): [True: 0, False: 193k]
  ------------------
  762|      0|        if (a->neg)
  ------------------
  |  Branch (762:13): [True: 0, False: 0]
  ------------------
  763|      0|            return -1;
  764|      0|        else
  765|      0|            return 1;
  766|      0|    }
  767|   193k|    if (a->neg == 0) {
  ------------------
  |  Branch (767:9): [True: 193k, False: 0]
  ------------------
  768|   193k|        gt = 1;
  769|   193k|        lt = -1;
  770|   193k|    } else {
  771|      0|        gt = -1;
  772|      0|        lt = 1;
  773|      0|    }
  774|       |
  775|   193k|    if (a->top > b->top)
  ------------------
  |  Branch (775:9): [True: 0, False: 193k]
  ------------------
  776|      0|        return gt;
  777|   193k|    if (a->top < b->top)
  ------------------
  |  Branch (777:9): [True: 0, False: 193k]
  ------------------
  778|      0|        return lt;
  779|  1.34M|    for (i = a->top - 1; i >= 0; i--) {
  ------------------
  |  Branch (779:26): [True: 1.14M, False: 193k]
  ------------------
  780|  1.14M|        t1 = a->d[i];
  781|  1.14M|        t2 = b->d[i];
  782|  1.14M|        if (t1 > t2)
  ------------------
  |  Branch (782:13): [True: 0, False: 1.14M]
  ------------------
  783|      0|            return gt;
  784|  1.14M|        if (t1 < t2)
  ------------------
  |  Branch (784:13): [True: 0, False: 1.14M]
  ------------------
  785|      0|            return lt;
  786|  1.14M|    }
  787|   193k|    return 0;
  788|   193k|}
BN_set_bit:
  791|  94.0k|{
  792|  94.0k|    int i, j, k;
  793|       |
  794|  94.0k|    if (n < 0)
  ------------------
  |  Branch (794:9): [True: 0, False: 94.0k]
  ------------------
  795|      0|        return 0;
  796|       |
  797|  94.0k|    i = n / BN_BITS2;
  ------------------
  |  |   54|  94.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  94.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  798|  94.0k|    j = n % BN_BITS2;
  ------------------
  |  |   54|  94.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  94.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  799|  94.0k|    if (a->top <= i) {
  ------------------
  |  Branch (799:9): [True: 94.0k, False: 0]
  ------------------
  800|  94.0k|        if (bn_wexpand(a, i + 1) == NULL)
  ------------------
  |  Branch (800:13): [True: 0, False: 94.0k]
  ------------------
  801|      0|            return 0;
  802|   799k|        for (k = a->top; k < i + 1; k++)
  ------------------
  |  Branch (802:26): [True: 705k, False: 94.0k]
  ------------------
  803|   705k|            a->d[k] = 0;
  804|  94.0k|        a->top = i + 1;
  805|  94.0k|        a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  94.0k|#define BN_FLG_FIXED_TOP 0
  ------------------
  806|  94.0k|    }
  807|       |
  808|  94.0k|    a->d[i] |= (((BN_ULONG)1) << j);
  809|  94.0k|    bn_check_top(a);
  810|  94.0k|    return 1;
  811|  94.0k|}
BN_is_bit_set:
  832|  8.98M|{
  833|  8.98M|    int i, j;
  834|       |
  835|  8.98M|    bn_check_top(a);
  836|  8.98M|    if (ossl_unlikely(n < 0))
  ------------------
  |  |   23|  8.98M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.98M]
  |  |  ------------------
  ------------------
  837|      0|        return 0;
  838|  8.98M|    i = n / BN_BITS2;
  ------------------
  |  |   54|  8.98M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  8.98M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  839|  8.98M|    j = n % BN_BITS2;
  ------------------
  |  |   54|  8.98M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  8.98M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  840|  8.98M|    if (ossl_unlikely(a->top <= i))
  ------------------
  |  |   23|  8.98M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 8.98M]
  |  |  ------------------
  ------------------
  841|      0|        return 0;
  842|  8.98M|    return (int)(((a->d[i]) >> j) & ((BN_ULONG)1));
  843|  8.98M|}
BN_set_negative:
  878|  52.2k|{
  879|  52.2k|    if (b && !BN_is_zero(a))
  ------------------
  |  Branch (879:9): [True: 0, False: 52.2k]
  |  Branch (879:14): [True: 0, False: 0]
  ------------------
  880|      0|        a->neg = 1;
  881|  52.2k|    else
  882|  52.2k|        a->neg = 0;
  883|  52.2k|}
BN_zero_ex:
 1024|  3.89M|{
 1025|  3.89M|    a->neg = 0;
 1026|  3.89M|    a->top = 0;
 1027|  3.89M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  3.89M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1028|  3.89M|}
BN_abs_is_word:
 1031|   245k|{
 1032|   245k|    return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));
  ------------------
  |  Branch (1032:13): [True: 245k, False: 0]
  |  Branch (1032:30): [True: 151k, False: 94.0k]
  |  Branch (1032:50): [True: 0, False: 94.0k]
  |  Branch (1032:62): [True: 0, False: 0]
  ------------------
 1033|   245k|}
BN_is_zero:
 1036|  8.16M|{
 1037|  8.16M|    return a->top == 0;
 1038|  8.16M|}
BN_is_one:
 1041|   198k|{
 1042|   198k|    return BN_abs_is_word(a, 1) && !a->neg;
  ------------------
  |  Branch (1042:12): [True: 151k, False: 47.0k]
  |  Branch (1042:36): [True: 151k, False: 0]
  ------------------
 1043|   198k|}
BN_is_odd:
 1067|  3.10M|{
 1068|  3.10M|    return (a->top > 0) && (a->d[0] & 1);
  ------------------
  |  Branch (1068:12): [True: 3.10M, False: 0]
  |  Branch (1068:28): [True: 1.60M, False: 1.50M]
  ------------------
 1069|  3.10M|}
BN_is_negative:
 1072|   527k|{
 1073|   527k|    return (a->neg != 0);
 1074|   527k|}
BN_to_montgomery:
 1078|  36.5k|{
 1079|  36.5k|    return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
 1080|  36.5k|}
BN_get_flags:
 1116|  22.8M|{
 1117|  22.8M|    return b->flags & n;
 1118|  22.8M|}
bn_wexpand:
 1146|  13.4M|{
 1147|  13.4M|    return (words <= a->dmax) ? a : bn_expand2(a, words);
  ------------------
  |  Branch (1147:12): [True: 9.44M, False: 3.97M]
  ------------------
 1148|  13.4M|}
bn_correct_top:
 1173|  5.30M|{
 1174|  5.30M|    BN_ULONG *ftl;
  ------------------
  |  |   37|  5.30M|#define BN_ULONG unsigned long
  ------------------
 1175|  5.30M|    int tmp_top = a->top;
 1176|       |
 1177|  5.30M|    if (ossl_likely(tmp_top > 0)) {
  ------------------
  |  |   22|  5.30M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.30M, False: 0]
  |  |  ------------------
  ------------------
 1178|  5.89M|        for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
  ------------------
  |  Branch (1178:38): [True: 5.89M, False: 0]
  ------------------
 1179|  5.89M|            ftl--;
 1180|  5.89M|            if (*ftl != 0)
  ------------------
  |  Branch (1180:17): [True: 5.30M, False: 595k]
  ------------------
 1181|  5.30M|                break;
 1182|  5.89M|        }
 1183|  5.30M|        a->top = tmp_top;
 1184|  5.30M|    }
 1185|  5.30M|    if (a->top == 0)
  ------------------
  |  Branch (1185:9): [True: 0, False: 5.30M]
  ------------------
 1186|      0|        a->neg = 0;
 1187|  5.30M|    a->flags &= ~BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  5.30M|#define BN_FLG_FIXED_TOP 0
  ------------------
 1188|  5.30M|    bn_pollute(a);
 1189|  5.30M|}
bn_lib.c:bn_free_d:
  203|  4.02M|{
  204|  4.02M|    if (BN_get_flags(a, BN_FLG_SECURE))
  ------------------
  |  |   68|  4.02M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (204:9): [True: 0, False: 4.02M]
  ------------------
  205|      0|        OPENSSL_secure_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  206|  4.02M|    else if (clear != 0)
  ------------------
  |  Branch (206:14): [True: 2.27M, False: 1.75M]
  ------------------
  207|  2.27M|        OPENSSL_clear_free(a->d, a->dmax * sizeof(a->d[0]));
  ------------------
  |  |  129|  2.27M|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  1.75M|    else
  209|  1.75M|        OPENSSL_free(a->d);
  ------------------
  |  |  131|  1.75M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  210|  4.02M|}
bn_lib.c:bn_expand_internal:
  265|  4.02M|{
  266|  4.02M|    BN_ULONG *a = NULL;
  ------------------
  |  |   37|  4.02M|#define BN_ULONG unsigned long
  ------------------
  267|       |
  268|  4.02M|    if (ossl_unlikely(words > (INT_MAX / (4 * BN_BITS2)))) {
  ------------------
  |  |   23|  4.02M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.02M]
  |  |  ------------------
  ------------------
  269|      0|        ERR_raise(ERR_LIB_BN, BN_R_BIGNUM_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return NULL;
  271|      0|    }
  272|  4.02M|    if (ossl_unlikely(BN_get_flags(b, BN_FLG_STATIC_DATA))) {
  ------------------
  |  |   23|  4.02M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.02M]
  |  |  ------------------
  ------------------
  273|      0|        ERR_raise(ERR_LIB_BN, BN_R_EXPAND_ON_STATIC_BIGNUM_DATA);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|        return NULL;
  275|      0|    }
  276|  4.02M|    if (BN_get_flags(b, BN_FLG_SECURE))
  ------------------
  |  |   68|  4.02M|#define BN_FLG_SECURE 0x08
  ------------------
  |  Branch (276:9): [True: 0, False: 4.02M]
  ------------------
  277|      0|        a = OPENSSL_secure_calloc(words, sizeof(*a));
  ------------------
  |  |  145|      0|    CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  278|  4.02M|    else
  279|  4.02M|        a = OPENSSL_calloc(words, sizeof(*a));
  ------------------
  |  |  112|  4.02M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|  4.02M|    if (ossl_unlikely(a == NULL))
  ------------------
  |  |   23|  4.02M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.02M]
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|       |
  283|  4.02M|    assert(b->top <= words);
  ------------------
  |  Branch (283:5): [True: 0, False: 4.02M]
  |  Branch (283:5): [True: 4.02M, False: 0]
  ------------------
  284|  4.02M|    if (b->top > 0)
  ------------------
  |  Branch (284:9): [True: 193k, False: 3.83M]
  ------------------
  285|   193k|        memcpy(a, b->d, sizeof(*a) * b->top);
  286|       |
  287|  4.02M|    return a;
  288|  4.02M|}
bn_lib.c:bin2bn:
  434|   846k|{
  435|   846k|    int inc;
  436|   846k|    const unsigned char *s2;
  437|   846k|    int inc2;
  438|   846k|    int neg = 0, xor = 0, carry = 0;
  439|   846k|    unsigned int i;
  440|   846k|    unsigned int n;
  441|   846k|    BIGNUM *bn = NULL;
  442|       |
  443|       |    /* Negative length is not acceptable */
  444|   846k|    if (len < 0)
  ------------------
  |  Branch (444:9): [True: 0, False: 846k]
  ------------------
  445|      0|        return NULL;
  446|       |
  447|   846k|    if (ret == NULL)
  ------------------
  |  Branch (447:9): [True: 313k, False: 532k]
  ------------------
  448|   313k|        ret = bn = BN_new();
  449|   846k|    if (ret == NULL)
  ------------------
  |  Branch (449:9): [True: 0, False: 846k]
  ------------------
  450|      0|        return NULL;
  451|   846k|    bn_check_top(ret);
  452|       |
  453|       |    /*
  454|       |     * If the input has no bits, the number is considered zero.
  455|       |     * This makes calls with s==NULL and len==0 safe.
  456|       |     */
  457|   846k|    if (len == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 846k]
  ------------------
  458|      0|        BN_clear(ret);
  459|      0|        return ret;
  460|      0|    }
  461|       |
  462|       |    /*
  463|       |     * The loop that does the work iterates from least to most
  464|       |     * significant BIGNUM chunk, so we adapt parameters to transfer
  465|       |     * input bytes accordingly.
  466|       |     */
  467|   846k|    if (endianness == LITTLE) {
  ------------------
  |  Branch (467:9): [True: 0, False: 846k]
  ------------------
  468|      0|        s2 = s + len - 1;
  469|      0|        inc2 = -1;
  470|      0|        inc = 1;
  471|   846k|    } else {
  472|   846k|        s2 = s;
  473|   846k|        inc2 = 1;
  474|   846k|        inc = -1;
  475|   846k|        s += len - 1;
  476|   846k|    }
  477|       |
  478|       |    /* Take note of the signedness of the input bytes*/
  479|   846k|    if (signedness == SIGNED) {
  ------------------
  |  Branch (479:9): [True: 0, False: 846k]
  ------------------
  480|      0|        neg = !!(*s2 & 0x80);
  481|      0|        xor = neg ? 0xff : 0x00;
  ------------------
  |  Branch (481:15): [True: 0, False: 0]
  ------------------
  482|      0|        carry = neg;
  483|      0|    }
  484|       |
  485|       |    /*
  486|       |     * Skip leading sign extensions (the value of |xor|).
  487|       |     * This is the only spot where |s2| and |inc2| are used.
  488|       |     */
  489|  1.00M|    for (; len > 0 && *s2 == xor; s2 += inc2, len--)
  ------------------
  |  Branch (489:12): [True: 1.00M, False: 0]
  |  Branch (489:23): [True: 155k, False: 846k]
  ------------------
  490|   155k|        continue;
  491|       |
  492|       |    /*
  493|       |     * If there was a set of 0xff, we backtrack one byte unless the next
  494|       |     * one has a sign bit, as the last 0xff is then part of the actual
  495|       |     * number, rather then a mere sign extension.
  496|       |     */
  497|   846k|    if (xor == 0xff) {
  ------------------
  |  Branch (497:9): [True: 0, False: 846k]
  ------------------
  498|      0|        if (len == 0 || !(*s2 & 0x80))
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  |  Branch (498:25): [True: 0, False: 0]
  ------------------
  499|      0|            len++;
  500|      0|    }
  501|       |    /* If it was all zeros, we're done */
  502|   846k|    if (len == 0) {
  ------------------
  |  Branch (502:9): [True: 0, False: 846k]
  ------------------
  503|      0|        ret->top = 0;
  504|      0|        return ret;
  505|      0|    }
  506|   846k|    n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */
  ------------------
  |  |   38|   846k|#define BN_BYTES 8
  ------------------
  507|   846k|    if (bn_wexpand(ret, (int)n) == NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 846k]
  ------------------
  508|      0|        BN_free(bn);
  509|      0|        return NULL;
  510|      0|    }
  511|   846k|    ret->top = n;
  512|   846k|    ret->neg = neg;
  513|  11.3M|    for (i = 0; n-- > 0; i++) {
  ------------------
  |  Branch (513:17): [True: 10.5M, False: 846k]
  ------------------
  514|  10.5M|        BN_ULONG l = 0; /* Accumulator */
  ------------------
  |  |   37|  10.5M|#define BN_ULONG unsigned long
  ------------------
  515|  10.5M|        unsigned int m = 0; /* Offset in a bignum chunk, in bits */
  516|       |
  517|  93.9M|        for (; len > 0 && m < BN_BYTES * 8; len--, s += inc, m += 8) {
  ------------------
  |  |   38|  93.0M|#define BN_BYTES 8
  ------------------
  |  Branch (517:16): [True: 93.0M, False: 846k]
  |  Branch (517:27): [True: 83.3M, False: 9.66M]
  ------------------
  518|  83.3M|            BN_ULONG byte_xored = *s ^ xor;
  ------------------
  |  |   37|  83.3M|#define BN_ULONG unsigned long
  ------------------
  519|  83.3M|            BN_ULONG byte = (byte_xored + carry) & 0xff;
  ------------------
  |  |   37|  83.3M|#define BN_ULONG unsigned long
  ------------------
  520|       |
  521|  83.3M|            carry = byte_xored > byte; /* Implicit 1 or 0 */
  522|  83.3M|            l |= (byte << m);
  523|  83.3M|        }
  524|  10.5M|        ret->d[i] = l;
  525|  10.5M|    }
  526|       |    /*
  527|       |     * need to call this due to clear byte at top if avoiding having the top
  528|       |     * bit set (-ve number)
  529|       |     */
  530|   846k|    bn_correct_top(ret);
  531|   846k|    return ret;
  532|   846k|}

bn_lib.c:bn_expand:
  680|   104k|{
  681|   104k|    if (bits > (INT_MAX - BN_BITS2 + 1))
  ------------------
  |  |   54|   104k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   104k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (681:9): [True: 0, False: 104k]
  ------------------
  682|      0|        return NULL;
  683|       |
  684|   104k|    if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|   104k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   104k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  if (((bits + BN_BITS2 - 1) / BN_BITS2) <= (a)->dmax)
  ------------------
  |  |   54|   104k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   104k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (684:9): [True: 52.2k, False: 52.2k]
  ------------------
  685|  52.2k|        return a;
  686|       |
  687|  52.2k|    return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|  52.2k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  52.2k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                  return bn_expand2((a), (bits + BN_BITS2 - 1) / BN_BITS2);
  ------------------
  |  |   54|  52.2k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  52.2k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  688|   104k|}

BN_nnmod:
   15|   511k|{
   16|       |    /*
   17|       |     * like BN_mod, but returns non-negative remainder (i.e., 0 <= r < |d|
   18|       |     * always holds)
   19|       |     */
   20|       |
   21|   511k|    if (r == d) {
  ------------------
  |  Branch (21:9): [True: 0, False: 511k]
  ------------------
   22|      0|        ERR_raise(ERR_LIB_BN, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   23|      0|        return 0;
   24|      0|    }
   25|       |
   26|   511k|    if (!(BN_mod(r, m, d, ctx)))
  ------------------
  |  |  276|   511k|#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx))
  ------------------
  |  Branch (26:9): [True: 0, False: 511k]
  ------------------
   27|      0|        return 0;
   28|   511k|    if (!r->neg)
  ------------------
  |  Branch (28:9): [True: 464k, False: 47.0k]
  ------------------
   29|   464k|        return 1;
   30|       |    /* now   -|d| < r < 0,  so we have to set  r := r + |d| */
   31|  47.0k|    return (d->neg ? BN_sub : BN_add)(r, r, d);
  ------------------
  |  Branch (31:13): [True: 0, False: 47.0k]
  ------------------
   32|   511k|}
bn_mod_add_fixed_top:
   56|   208k|{
   57|   208k|    size_t i, ai, bi, mtop = m->top;
   58|   208k|    BN_ULONG storage[1024 / BN_BITS2];
  ------------------
  |  |   37|   208k|#define BN_ULONG unsigned long
  ------------------
   59|   208k|    BN_ULONG carry, temp, mask, *rp, *tp = storage;
  ------------------
  |  |   37|   208k|#define BN_ULONG unsigned long
  ------------------
   60|   208k|    const BN_ULONG *ap, *bp;
   61|       |
   62|   208k|    if (bn_wexpand(r, (int)mtop) == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 208k]
  ------------------
   63|      0|        return 0;
   64|       |
   65|   208k|    if (mtop > OSSL_NELEM(storage)) {
  ------------------
  |  |   14|   208k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (65:9): [True: 0, False: 208k]
  ------------------
   66|      0|        tp = OPENSSL_malloc_array(mtop, sizeof(BN_ULONG));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|      0|        if (tp == NULL)
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            return 0;
   69|      0|    }
   70|       |
   71|   208k|    ap = a->d != NULL ? a->d : tp;
  ------------------
  |  Branch (71:10): [True: 208k, False: 0]
  ------------------
   72|   208k|    bp = b->d != NULL ? b->d : tp;
  ------------------
  |  Branch (72:10): [True: 208k, False: 0]
  ------------------
   73|       |
   74|  1.42M|    for (i = 0, ai = 0, bi = 0, carry = 0; i < mtop;) {
  ------------------
  |  Branch (74:44): [True: 1.21M, False: 208k]
  ------------------
   75|  1.21M|        mask = (BN_ULONG)0 - ((i - a->top) >> (8 * sizeof(i) - 1));
   76|  1.21M|        temp = ((ap[ai] & mask) + carry) & BN_MASK2;
  ------------------
  |  |   93|  1.21M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   77|  1.21M|        carry = (temp < carry);
   78|       |
   79|  1.21M|        mask = (BN_ULONG)0 - ((i - b->top) >> (8 * sizeof(i) - 1));
   80|  1.21M|        tp[i] = ((bp[bi] & mask) + temp) & BN_MASK2;
  ------------------
  |  |   93|  1.21M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   81|  1.21M|        carry += (tp[i] < temp);
   82|       |
   83|  1.21M|        i++;
   84|  1.21M|        ai += (i - a->dmax) >> (8 * sizeof(i) - 1);
   85|  1.21M|        bi += (i - b->dmax) >> (8 * sizeof(i) - 1);
   86|  1.21M|    }
   87|   208k|    rp = r->d;
   88|   208k|    carry -= bn_sub_words(rp, tp, m->d, (int)mtop);
   89|  1.42M|    for (i = 0; i < mtop; i++) {
  ------------------
  |  Branch (89:17): [True: 1.21M, False: 208k]
  ------------------
   90|  1.21M|        rp[i] = (carry & tp[i]) | (~carry & rp[i]);
   91|  1.21M|        ((volatile BN_ULONG *)tp)[i] = 0;
   92|  1.21M|    }
   93|   208k|    r->top = (int)mtop;
   94|   208k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   208k|#define BN_FLG_FIXED_TOP 0
  ------------------
   95|   208k|    r->neg = 0;
   96|       |
   97|   208k|    if (tp != storage)
  ------------------
  |  Branch (97:9): [True: 0, False: 208k]
  ------------------
   98|      0|        OPENSSL_free(tp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|   208k|    return 1;
  101|   208k|}
BN_mod_add_quick:
  105|   208k|{
  106|   208k|    int ret = bn_mod_add_fixed_top(r, a, b, m);
  107|       |
  108|   208k|    if (ret)
  ------------------
  |  Branch (108:9): [True: 208k, False: 0]
  ------------------
  109|   208k|        bn_correct_top(r);
  110|       |
  111|   208k|    return ret;
  112|   208k|}

BN_mod_mul_montgomery:
   27|  67.9k|{
   28|  67.9k|    int ret = bn_mul_mont_fixed_top(r, a, b, mont, ctx);
   29|       |
   30|  67.9k|    bn_correct_top(r);
   31|  67.9k|    bn_check_top(r);
   32|       |
   33|  67.9k|    return ret;
   34|  67.9k|}
bn_mul_mont_fixed_top:
   38|  67.9k|{
   39|  67.9k|    BIGNUM *tmp;
   40|  67.9k|    int ret = 0;
   41|  67.9k|    int num = mont->N.top;
   42|       |
   43|  67.9k|#if defined(OPENSSL_BN_ASM_MONT) && defined(MONT_WORD)
   44|  67.9k|    if (num > 1 && num <= BN_SOFT_LIMIT && a->top == num && b->top == num) {
  ------------------
  |  |   62|   135k|#define BN_SOFT_LIMIT (4096 / BN_BYTES)
  |  |  ------------------
  |  |  |  |   38|  67.9k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (44:9): [True: 67.9k, False: 0]
  |  Branch (44:20): [True: 67.9k, False: 0]
  |  Branch (44:44): [True: 62.6k, False: 5.22k]
  |  Branch (44:61): [True: 62.6k, False: 0]
  ------------------
   45|  62.6k|        if (bn_wexpand(r, num) == NULL)
  ------------------
  |  Branch (45:13): [True: 0, False: 62.6k]
  ------------------
   46|      0|            return 0;
   47|  62.6k|        if (bn_mul_mont(r->d, a->d, b->d, mont->N.d, mont->n0, num)) {
  ------------------
  |  Branch (47:13): [True: 62.6k, False: 0]
  ------------------
   48|  62.6k|            r->neg = a->neg ^ b->neg;
   49|  62.6k|            r->top = num;
   50|  62.6k|            r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  62.6k|#define BN_FLG_FIXED_TOP 0
  ------------------
   51|  62.6k|            return 1;
   52|  62.6k|        }
   53|  62.6k|    }
   54|  5.22k|#endif
   55|       |
   56|  5.22k|    if ((a->top + b->top) > 2 * num)
  ------------------
  |  Branch (56:9): [True: 0, False: 5.22k]
  ------------------
   57|      0|        return 0;
   58|       |
   59|  5.22k|    BN_CTX_start(ctx);
   60|  5.22k|    tmp = BN_CTX_get(ctx);
   61|  5.22k|    if (tmp == NULL)
  ------------------
  |  Branch (61:9): [True: 0, False: 5.22k]
  ------------------
   62|      0|        goto err;
   63|       |
   64|  5.22k|    bn_check_top(tmp);
   65|  5.22k|    if (a == b) {
  ------------------
  |  Branch (65:9): [True: 0, False: 5.22k]
  ------------------
   66|      0|        if (!bn_sqr_fixed_top(tmp, a, ctx))
  ------------------
  |  Branch (66:13): [True: 0, False: 0]
  ------------------
   67|      0|            goto err;
   68|  5.22k|    } else {
   69|  5.22k|        if (!bn_mul_fixed_top(tmp, a, b, ctx))
  ------------------
  |  Branch (69:13): [True: 0, False: 5.22k]
  ------------------
   70|      0|            goto err;
   71|  5.22k|    }
   72|       |    /* reduce from aRR to aR */
   73|  5.22k|#ifdef MONT_WORD
   74|  5.22k|    if (!bn_from_montgomery_word(r, tmp, mont))
  ------------------
  |  Branch (74:9): [True: 0, False: 5.22k]
  ------------------
   75|      0|        goto err;
   76|       |#else
   77|       |    if (!BN_from_montgomery(r, tmp, mont, ctx))
   78|       |        goto err;
   79|       |#endif
   80|  5.22k|    ret = 1;
   81|  5.22k|err:
   82|  5.22k|    BN_CTX_end(ctx);
   83|  5.22k|    return ret;
   84|  5.22k|}
BN_MONT_CTX_new:
  228|   114k|{
  229|   114k|    BN_MONT_CTX *ret;
  230|       |
  231|   114k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  106|   114k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (231:9): [True: 0, False: 114k]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|   114k|    BN_MONT_CTX_init(ret);
  235|   114k|    ret->flags = BN_FLG_MALLOCED;
  ------------------
  |  |   58|   114k|#define BN_FLG_MALLOCED 0x01
  ------------------
  236|   114k|    return ret;
  237|   114k|}
BN_MONT_CTX_init:
  240|   114k|{
  241|   114k|    ctx->ri = 0;
  242|   114k|    bn_init(&ctx->RR);
  243|   114k|    bn_init(&ctx->N);
  244|   114k|    bn_init(&ctx->Ni);
  245|   114k|    ctx->n0[0] = ctx->n0[1] = 0;
  246|   114k|    ctx->flags = 0;
  247|   114k|}
BN_MONT_CTX_free:
  250|   592k|{
  251|   592k|    if (mont == NULL)
  ------------------
  |  Branch (251:9): [True: 477k, False: 114k]
  ------------------
  252|   477k|        return;
  253|   114k|    BN_clear_free(&mont->RR);
  254|   114k|    BN_clear_free(&mont->N);
  255|   114k|    BN_clear_free(&mont->Ni);
  256|   114k|    if (mont->flags & BN_FLG_MALLOCED)
  ------------------
  |  |   58|   114k|#define BN_FLG_MALLOCED 0x01
  ------------------
  |  Branch (256:9): [True: 114k, False: 0]
  ------------------
  257|   114k|        OPENSSL_free(mont);
  ------------------
  |  |  131|   114k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|   114k|}
BN_MONT_CTX_set:
  261|  47.0k|{
  262|  47.0k|    int i, ret = 0;
  263|  47.0k|    BIGNUM *Ri, *R;
  264|       |
  265|  47.0k|    if (BN_is_zero(mod))
  ------------------
  |  Branch (265:9): [True: 0, False: 47.0k]
  ------------------
  266|      0|        return 0;
  267|       |
  268|  47.0k|    BN_CTX_start(ctx);
  269|  47.0k|    if ((Ri = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 47.0k]
  ------------------
  270|      0|        goto err;
  271|  47.0k|    R = &(mont->RR); /* grab RR as a temp */
  272|  47.0k|    if (!BN_copy(&(mont->N), mod))
  ------------------
  |  Branch (272:9): [True: 0, False: 47.0k]
  ------------------
  273|      0|        goto err; /* Set N */
  274|  47.0k|    if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|  47.0k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (274:9): [True: 0, False: 47.0k]
  ------------------
  275|      0|        BN_set_flags(&(mont->N), BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  276|  47.0k|    mont->N.neg = 0;
  277|       |
  278|  47.0k|#ifdef MONT_WORD
  279|  47.0k|    {
  280|  47.0k|        BIGNUM tmod;
  281|  47.0k|        BN_ULONG buf[2];
  ------------------
  |  |   37|  47.0k|#define BN_ULONG unsigned long
  ------------------
  282|       |
  283|  47.0k|        bn_init(&tmod);
  284|  47.0k|        tmod.d = buf;
  285|  47.0k|        tmod.dmax = 2;
  286|  47.0k|        tmod.neg = 0;
  287|       |
  288|  47.0k|        if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0)
  ------------------
  |  |   67|  47.0k|#define BN_FLG_CONSTTIME 0x04
  ------------------
  |  Branch (288:13): [True: 0, False: 47.0k]
  ------------------
  289|      0|            BN_set_flags(&tmod, BN_FLG_CONSTTIME);
  ------------------
  |  |   67|      0|#define BN_FLG_CONSTTIME 0x04
  ------------------
  290|       |
  291|  47.0k|        mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|  47.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  47.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|  47.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  47.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
                      mont->ri = (BN_num_bits(mod) + (BN_BITS2 - 1)) / BN_BITS2 * BN_BITS2;
  ------------------
  |  |   54|  47.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  47.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  292|       |
  293|       |#if defined(OPENSSL_BN_ASM_MONT) && (BN_BITS2 <= 32)
  294|       |        /*
  295|       |         * Only certain BN_BITS2<=32 platforms actually make use of n0[1],
  296|       |         * and we could use the #else case (with a shorter R value) for the
  297|       |         * others.  However, currently only the assembler files do know which
  298|       |         * is which.
  299|       |         */
  300|       |
  301|       |        BN_zero(R);
  302|       |        if (!(BN_set_bit(R, 2 * BN_BITS2)))
  303|       |            goto err;
  304|       |
  305|       |        tmod.top = 0;
  306|       |        if ((buf[0] = mod->d[0]))
  307|       |            tmod.top = 1;
  308|       |        if ((buf[1] = mod->top > 1 ? mod->d[1] : 0))
  309|       |            tmod.top = 2;
  310|       |
  311|       |        if (BN_is_one(&tmod))
  312|       |            BN_zero(Ri);
  313|       |        else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  314|       |            goto err;
  315|       |        if (!BN_lshift(Ri, Ri, 2 * BN_BITS2))
  316|       |            goto err; /* R*Ri */
  317|       |        if (!BN_is_zero(Ri)) {
  318|       |            if (!BN_sub_word(Ri, 1))
  319|       |                goto err;
  320|       |        } else { /* if N mod word size == 1 */
  321|       |
  322|       |            if (bn_expand(Ri, (int)sizeof(BN_ULONG) * 2) == NULL)
  323|       |                goto err;
  324|       |            /* Ri-- (mod double word size) */
  325|       |            Ri->neg = 0;
  326|       |            Ri->d[0] = BN_MASK2;
  327|       |            Ri->d[1] = BN_MASK2;
  328|       |            Ri->top = 2;
  329|       |        }
  330|       |        if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
  331|       |            goto err;
  332|       |        /*
  333|       |         * Ni = (R*Ri-1)/N, keep only couple of least significant words:
  334|       |         */
  335|       |        mont->n0[0] = (Ri->top > 0) ? Ri->d[0] : 0;
  336|       |        mont->n0[1] = (Ri->top > 1) ? Ri->d[1] : 0;
  337|       |#else
  338|  47.0k|        BN_zero(R);
  ------------------
  |  |  201|  47.0k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  339|  47.0k|        if (!(BN_set_bit(R, BN_BITS2)))
  ------------------
  |  |   54|  47.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  47.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (339:13): [True: 0, False: 47.0k]
  ------------------
  340|      0|            goto err; /* R */
  341|       |
  342|  47.0k|        buf[0] = mod->d[0]; /* tmod = N mod word size */
  343|  47.0k|        buf[1] = 0;
  344|  47.0k|        tmod.top = buf[0] != 0 ? 1 : 0;
  ------------------
  |  Branch (344:20): [True: 47.0k, False: 0]
  ------------------
  345|       |        /* Ri = R^-1 mod N */
  346|  47.0k|        if (BN_is_one(&tmod))
  ------------------
  |  Branch (346:13): [True: 0, False: 47.0k]
  ------------------
  347|      0|            BN_zero(Ri);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  348|  47.0k|        else if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
  ------------------
  |  Branch (348:18): [True: 0, False: 47.0k]
  ------------------
  349|      0|            goto err;
  350|  47.0k|        if (!BN_lshift(Ri, Ri, BN_BITS2))
  ------------------
  |  |   54|  47.0k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  47.0k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  |  Branch (350:13): [True: 0, False: 47.0k]
  ------------------
  351|      0|            goto err; /* R*Ri */
  352|  47.0k|        if (!BN_is_zero(Ri)) {
  ------------------
  |  Branch (352:13): [True: 47.0k, False: 0]
  ------------------
  353|  47.0k|            if (!BN_sub_word(Ri, 1))
  ------------------
  |  Branch (353:17): [True: 0, False: 47.0k]
  ------------------
  354|      0|                goto err;
  355|  47.0k|        } else { /* if N mod word size == 1 */
  356|       |
  357|      0|            if (!BN_set_word(Ri, BN_MASK2))
  ------------------
  |  |   93|      0|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  |  Branch (357:17): [True: 0, False: 0]
  ------------------
  358|      0|                goto err; /* Ri-- (mod word size) */
  359|      0|        }
  360|  47.0k|        if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
  ------------------
  |  Branch (360:13): [True: 0, False: 47.0k]
  ------------------
  361|      0|            goto err;
  362|       |        /*
  363|       |         * Ni = (R*Ri-1)/N, keep only least significant word:
  364|       |         */
  365|  47.0k|        mont->n0[0] = (Ri->top > 0) ? Ri->d[0] : 0;
  ------------------
  |  Branch (365:23): [True: 47.0k, False: 0]
  ------------------
  366|  47.0k|        mont->n0[1] = 0;
  367|  47.0k|#endif
  368|  47.0k|    }
  369|       |#else /* !MONT_WORD */
  370|       |    { /* bignum version */
  371|       |        mont->ri = BN_num_bits(&mont->N);
  372|       |        BN_zero(R);
  373|       |        if (!BN_set_bit(R, mont->ri))
  374|       |            goto err; /* R = 2^ri */
  375|       |        /* Ri = R^-1 mod N */
  376|       |        if ((BN_mod_inverse(Ri, R, &mont->N, ctx)) == NULL)
  377|       |            goto err;
  378|       |        if (!BN_lshift(Ri, Ri, mont->ri))
  379|       |            goto err; /* R*Ri */
  380|       |        if (!BN_sub_word(Ri, 1))
  381|       |            goto err;
  382|       |        /*
  383|       |         * Ni = (R*Ri-1) / N
  384|       |         */
  385|       |        if (!BN_div(&(mont->Ni), NULL, Ri, &mont->N, ctx))
  386|       |            goto err;
  387|       |    }
  388|       |#endif
  389|       |
  390|       |    /* setup RR for conversions */
  391|  47.0k|    BN_zero(&(mont->RR));
  ------------------
  |  |  201|  47.0k|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  392|  47.0k|    if (!BN_set_bit(&(mont->RR), mont->ri * 2))
  ------------------
  |  Branch (392:9): [True: 0, False: 47.0k]
  ------------------
  393|      0|        goto err;
  394|  47.0k|    if (!BN_mod(&(mont->RR), &(mont->RR), &(mont->N), ctx))
  ------------------
  |  |  276|  47.0k|#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx))
  ------------------
  |  Branch (394:9): [True: 0, False: 47.0k]
  ------------------
  395|      0|        goto err;
  396|       |
  397|  47.0k|    for (i = mont->RR.top, ret = mont->N.top; i < ret; i++)
  ------------------
  |  Branch (397:47): [True: 0, False: 47.0k]
  ------------------
  398|      0|        mont->RR.d[i] = 0;
  399|  47.0k|    mont->RR.top = ret;
  400|  47.0k|    mont->RR.flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  47.0k|#define BN_FLG_FIXED_TOP 0
  ------------------
  401|       |
  402|  47.0k|    ret = 1;
  403|  47.0k|err:
  404|  47.0k|    BN_CTX_end(ctx);
  405|  47.0k|    return ret;
  406|  47.0k|}
BN_MONT_CTX_copy:
  409|  57.4k|{
  410|  57.4k|    if (to == from)
  ------------------
  |  Branch (410:9): [True: 0, False: 57.4k]
  ------------------
  411|      0|        return to;
  412|       |
  413|  57.4k|    if (!BN_copy(&(to->RR), &(from->RR)))
  ------------------
  |  Branch (413:9): [True: 0, False: 57.4k]
  ------------------
  414|      0|        return NULL;
  415|  57.4k|    if (!BN_copy(&(to->N), &(from->N)))
  ------------------
  |  Branch (415:9): [True: 0, False: 57.4k]
  ------------------
  416|      0|        return NULL;
  417|  57.4k|    if (!BN_copy(&(to->Ni), &(from->Ni)))
  ------------------
  |  Branch (417:9): [True: 0, False: 57.4k]
  ------------------
  418|      0|        return NULL;
  419|  57.4k|    to->ri = from->ri;
  420|  57.4k|    to->n0[0] = from->n0[0];
  421|  57.4k|    to->n0[1] = from->n0[1];
  422|  57.4k|    return to;
  423|  57.4k|}
ossl_bn_mont_ctx_set:
  470|  10.4k|{
  471|  10.4k|    if (BN_copy(&ctx->N, modulus) == NULL)
  ------------------
  |  Branch (471:9): [True: 0, False: 10.4k]
  ------------------
  472|      0|        return 0;
  473|  10.4k|    if (BN_bin2bn(rr, rrlen, &ctx->RR) == NULL)
  ------------------
  |  Branch (473:9): [True: 0, False: 10.4k]
  ------------------
  474|      0|        return 0;
  475|  10.4k|    ctx->ri = ri;
  476|       |#if (BN_BITS2 <= 32) && defined(OPENSSL_BN_ASM_MONT)
  477|       |    ctx->n0[0] = nlo;
  478|       |    ctx->n0[1] = nhi;
  479|       |#elif BN_BITS2 <= 32
  480|       |    ctx->n0[0] = nlo;
  481|       |    ctx->n0[1] = 0;
  482|       |#else
  483|  10.4k|    ctx->n0[0] = ((BN_ULONG)nhi << 32) | nlo;
  484|  10.4k|    ctx->n0[1] = 0;
  485|  10.4k|#endif
  486|       |
  487|  10.4k|    return 1;
  488|  10.4k|}
bn_mont.c:bn_from_montgomery_word:
   88|  5.22k|{
   89|  5.22k|    BIGNUM *n;
   90|  5.22k|    BN_ULONG *ap, *np, *rp, n0, v, carry;
  ------------------
  |  |   37|  5.22k|#define BN_ULONG unsigned long
  ------------------
   91|  5.22k|    int nl, max, i;
   92|  5.22k|    unsigned int rtop;
   93|       |
   94|  5.22k|    n = &(mont->N);
   95|  5.22k|    nl = n->top;
   96|  5.22k|    if (nl == 0) {
  ------------------
  |  Branch (96:9): [True: 0, False: 5.22k]
  ------------------
   97|      0|        ret->top = 0;
   98|      0|        return 1;
   99|      0|    }
  100|       |
  101|  5.22k|    max = (2 * nl); /* carry is stored separately */
  102|  5.22k|    if (bn_wexpand(r, max) == NULL)
  ------------------
  |  Branch (102:9): [True: 0, False: 5.22k]
  ------------------
  103|      0|        return 0;
  104|       |
  105|  5.22k|    r->neg ^= n->neg;
  106|  5.22k|    np = n->d;
  107|  5.22k|    rp = r->d;
  108|       |
  109|       |    /* clear the top words of T */
  110|  47.0k|    for (rtop = r->top, i = 0; i < max; i++) {
  ------------------
  |  Branch (110:32): [True: 41.7k, False: 5.22k]
  ------------------
  111|  41.7k|        v = (BN_ULONG)0 - ((i - rtop) >> (8 * sizeof(rtop) - 1));
  112|  41.7k|        rp[i] &= v;
  113|  41.7k|    }
  114|       |
  115|  5.22k|    r->top = max;
  116|  5.22k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  5.22k|#define BN_FLG_FIXED_TOP 0
  ------------------
  117|  5.22k|    n0 = mont->n0[0];
  118|       |
  119|       |    /*
  120|       |     * Add multiples of |n| to |r| until R = 2^(nl * BN_BITS2) divides it. On
  121|       |     * input, we had |r| < |n| * R, so now |r| < 2 * |n| * R. Note that |r|
  122|       |     * includes |carry| which is stored separately.
  123|       |     */
  124|  26.1k|    for (carry = 0, i = 0; i < nl; i++, rp++) {
  ------------------
  |  Branch (124:28): [True: 20.8k, False: 5.22k]
  ------------------
  125|  20.8k|        v = bn_mul_add_words(rp, np, nl, (rp[0] * n0) & BN_MASK2);
  ------------------
  |  |   93|  20.8k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  126|  20.8k|        v = (v + carry + rp[nl]) & BN_MASK2;
  ------------------
  |  |   93|  20.8k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  127|  20.8k|        carry |= (v != rp[nl]);
  128|  20.8k|        carry &= (v <= rp[nl]);
  129|  20.8k|        rp[nl] = v;
  130|  20.8k|    }
  131|       |
  132|  5.22k|    if (bn_wexpand(ret, nl) == NULL)
  ------------------
  |  Branch (132:9): [True: 0, False: 5.22k]
  ------------------
  133|      0|        return 0;
  134|  5.22k|    ret->top = nl;
  135|  5.22k|    ret->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  5.22k|#define BN_FLG_FIXED_TOP 0
  ------------------
  136|  5.22k|    ret->neg = r->neg;
  137|       |
  138|  5.22k|    rp = ret->d;
  139|       |
  140|       |    /*
  141|       |     * Shift |nl| words to divide by R. We have |ap| < 2 * |n|. Note that |ap|
  142|       |     * includes |carry| which is stored separately.
  143|       |     */
  144|  5.22k|    ap = &(r->d[nl]);
  145|       |
  146|  5.22k|    carry -= bn_sub_words(rp, ap, np, nl);
  147|       |    /*
  148|       |     * |carry| is -1 if |ap| - |np| underflowed or zero if it did not. Note
  149|       |     * |carry| cannot be 1. That would imply the subtraction did not fit in
  150|       |     * |nl| words, and we know at most one subtraction is needed.
  151|       |     */
  152|  26.1k|    for (i = 0; i < nl; i++) {
  ------------------
  |  Branch (152:17): [True: 20.8k, False: 5.22k]
  ------------------
  153|  20.8k|        rp[i] = (carry & ap[i]) | (~carry & rp[i]);
  154|  20.8k|        ap[i] = 0;
  155|  20.8k|    }
  156|       |
  157|  5.22k|    return 1;
  158|  5.22k|}

BN_mul:
  498|  94.0k|{
  499|  94.0k|    int ret = bn_mul_fixed_top(r, a, b, ctx);
  500|       |
  501|  94.0k|    bn_correct_top(r);
  502|  94.0k|    bn_check_top(r);
  503|       |
  504|  94.0k|    return ret;
  505|  94.0k|}
bn_mul_fixed_top:
  508|  99.2k|{
  509|  99.2k|    int ret = 0;
  510|  99.2k|    int top, al, bl;
  511|  99.2k|    BIGNUM *rr;
  512|  99.2k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  513|  99.2k|    int i;
  514|  99.2k|#endif
  515|  99.2k|#ifdef BN_RECURSION
  516|  99.2k|    BIGNUM *t = NULL;
  517|  99.2k|    int j = 0, k;
  518|  99.2k|#endif
  519|       |
  520|  99.2k|    bn_check_top(a);
  521|  99.2k|    bn_check_top(b);
  522|  99.2k|    bn_check_top(r);
  523|       |
  524|  99.2k|    al = a->top;
  525|  99.2k|    bl = b->top;
  526|       |
  527|  99.2k|    if ((al == 0) || (bl == 0)) {
  ------------------
  |  Branch (527:9): [True: 0, False: 99.2k]
  |  Branch (527:22): [True: 0, False: 99.2k]
  ------------------
  528|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  529|      0|        return 1;
  530|      0|    }
  531|  99.2k|    top = al + bl;
  532|       |
  533|  99.2k|    BN_CTX_start(ctx);
  534|  99.2k|    if ((r == a) || (r == b)) {
  ------------------
  |  Branch (534:9): [True: 94.0k, False: 5.22k]
  |  Branch (534:21): [True: 0, False: 5.22k]
  ------------------
  535|  94.0k|        if ((rr = BN_CTX_get(ctx)) == NULL)
  ------------------
  |  Branch (535:13): [True: 0, False: 94.0k]
  ------------------
  536|      0|            goto err;
  537|  94.0k|    } else
  538|  5.22k|        rr = r;
  539|       |
  540|  99.2k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  541|  99.2k|    i = al - bl;
  542|  99.2k|#endif
  543|  99.2k|#ifdef BN_MUL_COMBA
  544|  99.2k|    if (i == 0) {
  ------------------
  |  Branch (544:9): [True: 94.0k, False: 5.22k]
  ------------------
  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|  94.0k|        if (al == 8) {
  ------------------
  |  Branch (554:13): [True: 0, False: 94.0k]
  ------------------
  555|      0|            if (bn_wexpand(rr, 16) == NULL)
  ------------------
  |  Branch (555:17): [True: 0, False: 0]
  ------------------
  556|      0|                goto err;
  557|      0|            rr->top = 16;
  558|      0|            bn_mul_comba8(rr->d, a->d, b->d);
  559|      0|            goto end;
  560|      0|        }
  561|  94.0k|    }
  562|  99.2k|#endif /* BN_MUL_COMBA */
  563|  99.2k|#ifdef BN_RECURSION
  564|  99.2k|    if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  359|  99.2k|#define BN_MULL_SIZE_NORMAL (16) /* 32 */
  ------------------
                  if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL)) {
  ------------------
  |  |  359|      0|#define BN_MULL_SIZE_NORMAL (16) /* 32 */
  ------------------
  |  Branch (564:9): [True: 0, False: 99.2k]
  |  Branch (564:40): [True: 0, False: 0]
  ------------------
  565|      0|        if (i >= -1 && i <= 1) {
  ------------------
  |  Branch (565:13): [True: 0, False: 0]
  |  Branch (565:24): [True: 0, False: 0]
  ------------------
  566|       |            /*
  567|       |             * Find out the power of two lower or equal to the longest of the
  568|       |             * two numbers
  569|       |             */
  570|      0|            if (i >= 0) {
  ------------------
  |  Branch (570:17): [True: 0, False: 0]
  ------------------
  571|      0|                j = BN_num_bits_word((BN_ULONG)al);
  572|      0|            }
  573|      0|            if (i == -1) {
  ------------------
  |  Branch (573:17): [True: 0, False: 0]
  ------------------
  574|      0|                j = BN_num_bits_word((BN_ULONG)bl);
  575|      0|            }
  576|      0|            j = 1 << (j - 1);
  577|      0|            assert(j <= al || j <= bl);
  ------------------
  |  Branch (577:13): [True: 0, False: 0]
  |  Branch (577:13): [True: 0, False: 0]
  |  Branch (577:13): [True: 0, False: 0]
  |  Branch (577:13): [True: 0, False: 0]
  ------------------
  578|      0|            k = j + j;
  579|      0|            t = BN_CTX_get(ctx);
  580|      0|            if (t == NULL)
  ------------------
  |  Branch (580:17): [True: 0, False: 0]
  ------------------
  581|      0|                goto err;
  582|      0|            if (al > j || bl > j) {
  ------------------
  |  Branch (582:17): [True: 0, False: 0]
  |  Branch (582:27): [True: 0, False: 0]
  ------------------
  583|      0|                if (bn_wexpand(t, k * 4) == NULL)
  ------------------
  |  Branch (583:21): [True: 0, False: 0]
  ------------------
  584|      0|                    goto err;
  585|      0|                if (bn_wexpand(rr, k * 4) == NULL)
  ------------------
  |  Branch (585:21): [True: 0, False: 0]
  ------------------
  586|      0|                    goto err;
  587|      0|                bn_mul_part_recursive(rr->d, a->d, b->d,
  588|      0|                    j, al - j, bl - j, t->d);
  589|      0|            } else { /* al <= j || bl <= j */
  590|       |
  591|      0|                if (bn_wexpand(t, k * 2) == NULL)
  ------------------
  |  Branch (591:21): [True: 0, False: 0]
  ------------------
  592|      0|                    goto err;
  593|      0|                if (bn_wexpand(rr, k * 2) == NULL)
  ------------------
  |  Branch (593:21): [True: 0, False: 0]
  ------------------
  594|      0|                    goto err;
  595|      0|                bn_mul_recursive(rr->d, a->d, b->d, j, al - j, bl - j, t->d);
  596|      0|            }
  597|      0|            rr->top = top;
  598|      0|            goto end;
  599|      0|        }
  600|      0|    }
  601|  99.2k|#endif /* BN_RECURSION */
  602|  99.2k|    if (bn_wexpand(rr, top) == NULL)
  ------------------
  |  Branch (602:9): [True: 0, False: 99.2k]
  ------------------
  603|      0|        goto err;
  604|  99.2k|    rr->top = top;
  605|  99.2k|    bn_mul_normal(rr->d, a->d, al, b->d, bl);
  606|       |
  607|  99.2k|#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)
  608|  99.2k|end:
  609|  99.2k|#endif
  610|  99.2k|    rr->neg = a->neg ^ b->neg;
  611|  99.2k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  99.2k|#define BN_FLG_FIXED_TOP 0
  ------------------
  612|  99.2k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (612:9): [True: 94.0k, False: 5.22k]
  |  Branch (612:20): [True: 0, False: 94.0k]
  ------------------
  613|      0|        goto err;
  614|       |
  615|  99.2k|    ret = 1;
  616|  99.2k|err:
  617|  99.2k|    bn_check_top(r);
  618|  99.2k|    BN_CTX_end(ctx);
  619|  99.2k|    return ret;
  620|  99.2k|}
bn_mul_normal:
  623|  99.2k|{
  624|  99.2k|    BN_ULONG *rr;
  ------------------
  |  |   37|  99.2k|#define BN_ULONG unsigned long
  ------------------
  625|       |
  626|  99.2k|    if (na < nb) {
  ------------------
  |  Branch (626:9): [True: 5.22k, False: 94.0k]
  ------------------
  627|  5.22k|        int itmp;
  628|  5.22k|        BN_ULONG *ltmp;
  ------------------
  |  |   37|  5.22k|#define BN_ULONG unsigned long
  ------------------
  629|       |
  630|  5.22k|        itmp = na;
  631|  5.22k|        na = nb;
  632|  5.22k|        nb = itmp;
  633|  5.22k|        ltmp = a;
  634|  5.22k|        a = b;
  635|  5.22k|        b = ltmp;
  636|  5.22k|    }
  637|  99.2k|    rr = &(r[na]);
  638|  99.2k|    if (nb <= 0) {
  ------------------
  |  Branch (638:9): [True: 0, False: 99.2k]
  ------------------
  639|      0|        (void)bn_mul_words(r, a, na, 0);
  640|      0|        return;
  641|      0|    } else
  642|  99.2k|        rr[0] = bn_mul_words(r, a, na, b[0]);
  643|       |
  644|   193k|    for (;;) {
  645|   193k|        if (--nb <= 0)
  ------------------
  |  Branch (645:13): [True: 5.22k, False: 188k]
  ------------------
  646|  5.22k|            return;
  647|   188k|        rr[1] = bn_mul_add_words(&(r[1]), a, na, b[1]);
  648|   188k|        if (--nb <= 0)
  ------------------
  |  Branch (648:13): [True: 94.0k, False: 94.0k]
  ------------------
  649|  94.0k|            return;
  650|  94.0k|        rr[2] = bn_mul_add_words(&(r[2]), a, na, b[2]);
  651|  94.0k|        if (--nb <= 0)
  ------------------
  |  Branch (651:13): [True: 0, False: 94.0k]
  ------------------
  652|      0|            return;
  653|  94.0k|        rr[3] = bn_mul_add_words(&(r[3]), a, na, b[3]);
  654|  94.0k|        if (--nb <= 0)
  ------------------
  |  Branch (654:13): [True: 0, False: 94.0k]
  ------------------
  655|      0|            return;
  656|  94.0k|        rr[4] = bn_mul_add_words(&(r[4]), a, na, b[4]);
  657|  94.0k|        rr += 4;
  658|  94.0k|        r += 4;
  659|  94.0k|        b += 4;
  660|  94.0k|    }
  661|  99.2k|}

BN_nist_mod_384:
  889|   282k|{
  890|   282k|    int i, top = a->top;
  891|   282k|    int carry = 0;
  892|   282k|    register BN_ULONG *r_d, *a_d = a->d;
  893|   282k|    union {
  894|   282k|        BN_ULONG bn[BN_NIST_384_TOP];
  895|   282k|        unsigned int ui[BN_NIST_384_TOP * sizeof(BN_ULONG) / sizeof(unsigned int)];
  896|   282k|    } buf;
  897|   282k|    BN_ULONG c_d[BN_NIST_384_TOP], *res;
  ------------------
  |  |   37|   282k|#define BN_ULONG unsigned long
  ------------------
  898|   282k|    bn_addsub_f adjust;
  899|   282k|    static const BIGNUM ossl_bignum_nist_p_384_sqr = {
  900|   282k|        (BN_ULONG *)_nist_p_384_sqr,
  901|   282k|        OSSL_NELEM(_nist_p_384_sqr),
  ------------------
  |  |   14|   282k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  902|   282k|        OSSL_NELEM(_nist_p_384_sqr),
  ------------------
  |  |   14|   282k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  903|   282k|        0, BN_FLG_STATIC_DATA
  ------------------
  |  |   59|   282k|#define BN_FLG_STATIC_DATA 0x02
  ------------------
  904|   282k|    };
  905|       |
  906|   282k|    field = &ossl_bignum_nist_p_384; /* just to make sure */
  907|       |
  908|   282k|    if (BN_is_negative(a) || BN_ucmp(a, &ossl_bignum_nist_p_384_sqr) >= 0)
  ------------------
  |  Branch (908:9): [True: 0, False: 282k]
  |  Branch (908:30): [True: 0, False: 282k]
  ------------------
  909|      0|        return BN_nnmod(r, a, field, ctx);
  910|       |
  911|   282k|    i = BN_ucmp(field, a);
  912|   282k|    if (i == 0) {
  ------------------
  |  Branch (912:9): [True: 0, False: 282k]
  ------------------
  913|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  914|      0|        return 1;
  915|   282k|    } else if (i > 0)
  ------------------
  |  Branch (915:16): [True: 0, False: 282k]
  ------------------
  916|      0|        return (r == a) ? 1 : (BN_copy(r, a) != NULL);
  ------------------
  |  Branch (916:16): [True: 0, False: 0]
  ------------------
  917|       |
  918|   282k|    if (r != a) {
  ------------------
  |  Branch (918:9): [True: 0, False: 282k]
  ------------------
  919|      0|        if (!bn_wexpand(r, BN_NIST_384_TOP))
  ------------------
  |  |   16|      0|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (919:13): [True: 0, False: 0]
  ------------------
  920|      0|            return 0;
  921|      0|        r_d = r->d;
  922|      0|        nist_cp_bn(r_d, a_d, BN_NIST_384_TOP);
  ------------------
  |  |   16|      0|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|      0|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|      0|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  923|      0|    } else
  924|   282k|        r_d = a_d;
  925|       |
  926|   282k|    nist_cp_bn_0(buf.bn, a_d + BN_NIST_384_TOP, top - BN_NIST_384_TOP,
  ------------------
  |  |  265|   282k|    {                                       \
  |  |  266|   282k|        int ii;                             \
  |  |  267|   282k|        const BN_ULONG *src = src_in;       \
  |  |  268|   282k|                                            \
  |  |  269|  1.97M|        for (ii = 0; ii < top; ii++)        \
  |  |  ------------------
  |  |  |  Branch (269:22): [True: 1.69M, False: 282k]
  |  |  ------------------
  |  |  270|  1.69M|            (dst)[ii] = src[ii];            \
  |  |  271|   282k|        for (; ii < max; ii++)              \
  |  |  ------------------
  |  |  |  Branch (271:16): [True: 0, False: 282k]
  |  |  ------------------
  |  |  272|   282k|            (dst)[ii] = 0;                  \
  |  |  273|   282k|    }
  ------------------
  927|   282k|        BN_NIST_384_TOP);
  928|       |
  929|   282k|#if defined(NIST_INT64)
  930|   282k|    {
  931|   282k|        NIST_INT64 acc; /* accumulator */
  ------------------
  |  |  298|   282k|#define NIST_INT64 long long
  ------------------
  932|   282k|        unsigned int *rp = (unsigned int *)r_d;
  933|   282k|        const unsigned int *bp = (const unsigned int *)buf.ui;
  934|       |
  935|   282k|        acc = load_u32(&rp[0]);
  936|   282k|        acc += bp[12 - 12];
  937|   282k|        acc += bp[21 - 12];
  938|   282k|        acc += bp[20 - 12];
  939|   282k|        acc -= bp[23 - 12];
  940|   282k|        store_lo32(&rp[0], acc);
  941|   282k|        acc >>= 32;
  942|       |
  943|   282k|        acc += load_u32(&rp[1]);
  944|   282k|        acc += bp[13 - 12];
  945|   282k|        acc += bp[22 - 12];
  946|   282k|        acc += bp[23 - 12];
  947|   282k|        acc -= bp[12 - 12];
  948|   282k|        acc -= bp[20 - 12];
  949|   282k|        store_lo32(&rp[1], acc);
  950|   282k|        acc >>= 32;
  951|       |
  952|   282k|        acc += load_u32(&rp[2]);
  953|   282k|        acc += bp[14 - 12];
  954|   282k|        acc += bp[23 - 12];
  955|   282k|        acc -= bp[13 - 12];
  956|   282k|        acc -= bp[21 - 12];
  957|   282k|        store_lo32(&rp[2], acc);
  958|   282k|        acc >>= 32;
  959|       |
  960|   282k|        acc += load_u32(&rp[3]);
  961|   282k|        acc += bp[15 - 12];
  962|   282k|        acc += bp[12 - 12];
  963|   282k|        acc += bp[20 - 12];
  964|   282k|        acc += bp[21 - 12];
  965|   282k|        acc -= bp[14 - 12];
  966|   282k|        acc -= bp[22 - 12];
  967|   282k|        acc -= bp[23 - 12];
  968|   282k|        store_lo32(&rp[3], acc);
  969|   282k|        acc >>= 32;
  970|       |
  971|   282k|        acc += load_u32(&rp[4]);
  972|   282k|        acc += bp[21 - 12];
  973|   282k|        acc += bp[21 - 12];
  974|   282k|        acc += bp[16 - 12];
  975|   282k|        acc += bp[13 - 12];
  976|   282k|        acc += bp[12 - 12];
  977|   282k|        acc += bp[20 - 12];
  978|   282k|        acc += bp[22 - 12];
  979|   282k|        acc -= bp[15 - 12];
  980|   282k|        acc -= bp[23 - 12];
  981|   282k|        acc -= bp[23 - 12];
  982|   282k|        store_lo32(&rp[4], acc);
  983|   282k|        acc >>= 32;
  984|       |
  985|   282k|        acc += load_u32(&rp[5]);
  986|   282k|        acc += bp[22 - 12];
  987|   282k|        acc += bp[22 - 12];
  988|   282k|        acc += bp[17 - 12];
  989|   282k|        acc += bp[14 - 12];
  990|   282k|        acc += bp[13 - 12];
  991|   282k|        acc += bp[21 - 12];
  992|   282k|        acc += bp[23 - 12];
  993|   282k|        acc -= bp[16 - 12];
  994|   282k|        store_lo32(&rp[5], acc);
  995|   282k|        acc >>= 32;
  996|       |
  997|   282k|        acc += load_u32(&rp[6]);
  998|   282k|        acc += bp[23 - 12];
  999|   282k|        acc += bp[23 - 12];
 1000|   282k|        acc += bp[18 - 12];
 1001|   282k|        acc += bp[15 - 12];
 1002|   282k|        acc += bp[14 - 12];
 1003|   282k|        acc += bp[22 - 12];
 1004|   282k|        acc -= bp[17 - 12];
 1005|   282k|        store_lo32(&rp[6], acc);
 1006|   282k|        acc >>= 32;
 1007|       |
 1008|   282k|        acc += load_u32(&rp[7]);
 1009|   282k|        acc += bp[19 - 12];
 1010|   282k|        acc += bp[16 - 12];
 1011|   282k|        acc += bp[15 - 12];
 1012|   282k|        acc += bp[23 - 12];
 1013|   282k|        acc -= bp[18 - 12];
 1014|   282k|        store_lo32(&rp[7], acc);
 1015|   282k|        acc >>= 32;
 1016|       |
 1017|   282k|        acc += load_u32(&rp[8]);
 1018|   282k|        acc += bp[20 - 12];
 1019|   282k|        acc += bp[17 - 12];
 1020|   282k|        acc += bp[16 - 12];
 1021|   282k|        acc -= bp[19 - 12];
 1022|   282k|        store_lo32(&rp[8], acc);
 1023|   282k|        acc >>= 32;
 1024|       |
 1025|   282k|        acc += load_u32(&rp[9]);
 1026|   282k|        acc += bp[21 - 12];
 1027|   282k|        acc += bp[18 - 12];
 1028|   282k|        acc += bp[17 - 12];
 1029|   282k|        acc -= bp[20 - 12];
 1030|   282k|        store_lo32(&rp[9], acc);
 1031|   282k|        acc >>= 32;
 1032|       |
 1033|   282k|        acc += load_u32(&rp[10]);
 1034|   282k|        acc += bp[22 - 12];
 1035|   282k|        acc += bp[19 - 12];
 1036|   282k|        acc += bp[18 - 12];
 1037|   282k|        acc -= bp[21 - 12];
 1038|   282k|        store_lo32(&rp[10], acc);
 1039|   282k|        acc >>= 32;
 1040|       |
 1041|   282k|        acc += load_u32(&rp[11]);
 1042|   282k|        acc += bp[23 - 12];
 1043|   282k|        acc += bp[20 - 12];
 1044|   282k|        acc += bp[19 - 12];
 1045|   282k|        acc -= bp[22 - 12];
 1046|   282k|        store_lo32(&rp[11], acc);
 1047|       |
 1048|   282k|        carry = (int)(acc >> 32);
 1049|   282k|    }
 1050|       |#else
 1051|       |    {
 1052|       |        BN_ULONG t_d[BN_NIST_384_TOP];
 1053|       |
 1054|       |        /*
 1055|       |         * S1
 1056|       |         */
 1057|       |        nist_set_256(t_d, buf.bn, 0, 0, 0, 0, 0, 23 - 4, 22 - 4, 21 - 4);
 1058|       |        /* left shift */
 1059|       |        {
 1060|       |            register BN_ULONG *ap, t, c;
 1061|       |            ap = t_d;
 1062|       |            c = 0;
 1063|       |            for (i = 3; i != 0; --i) {
 1064|       |                t = *ap;
 1065|       |                *(ap++) = ((t << 1) | c) & BN_MASK2;
 1066|       |                c = (t & BN_TBIT) ? 1 : 0;
 1067|       |            }
 1068|       |            *ap = c;
 1069|       |        }
 1070|       |        carry = (int)bn_add_words(r_d + (128 / BN_BITS2), r_d + (128 / BN_BITS2),
 1071|       |            t_d, BN_NIST_256_TOP);
 1072|       |        /*
 1073|       |         * S2
 1074|       |         */
 1075|       |        carry += (int)bn_add_words(r_d, r_d, buf.bn, BN_NIST_384_TOP);
 1076|       |        /*
 1077|       |         * S3
 1078|       |         */
 1079|       |        nist_set_384(t_d, buf.bn, 20, 19, 18, 17, 16, 15, 14, 13, 12, 23, 22,
 1080|       |            21);
 1081|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1082|       |        /*
 1083|       |         * S4
 1084|       |         */
 1085|       |        nist_set_384(t_d, buf.bn, 19, 18, 17, 16, 15, 14, 13, 12, 20, 0, 23,
 1086|       |            0);
 1087|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1088|       |        /*
 1089|       |         * S5
 1090|       |         */
 1091|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 23, 22, 21, 20, 0, 0, 0, 0);
 1092|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1093|       |        /*
 1094|       |         * S6
 1095|       |         */
 1096|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 0, 0, 23, 22, 21, 0, 0, 20);
 1097|       |        carry += (int)bn_add_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1098|       |        /*
 1099|       |         * D1
 1100|       |         */
 1101|       |        nist_set_384(t_d, buf.bn, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12,
 1102|       |            23);
 1103|       |        carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1104|       |        /*
 1105|       |         * D2
 1106|       |         */
 1107|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 0, 0, 0, 23, 22, 21, 20, 0);
 1108|       |        carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1109|       |        /*
 1110|       |         * D3
 1111|       |         */
 1112|       |        nist_set_384(t_d, buf.bn, 0, 0, 0, 0, 0, 0, 0, 23, 23, 0, 0, 0);
 1113|       |        carry -= (int)bn_sub_words(r_d, r_d, t_d, BN_NIST_384_TOP);
 1114|       |    }
 1115|       |#endif
 1116|       |    /* see BN_nist_mod_224 for explanation */
 1117|   282k|    adjust = bn_sub_words;
 1118|   282k|    if (carry > 0)
  ------------------
  |  Branch (1118:9): [True: 182k, False: 99.2k]
  ------------------
 1119|   182k|        carry = (int)bn_sub_words(r_d, r_d, _nist_p_384[carry - 1],
 1120|   182k|            BN_NIST_384_TOP);
  ------------------
  |  |   16|   182k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   182k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   182k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   182k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   182k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1121|  99.2k|    else if (carry < 0) {
  ------------------
  |  Branch (1121:14): [True: 2.61k, False: 96.6k]
  ------------------
 1122|  2.61k|        carry = (int)bn_add_words(r_d, r_d, _nist_p_384[-carry - 1],
 1123|  2.61k|            BN_NIST_384_TOP);
  ------------------
  |  |   16|  2.61k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  2.61k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  2.61k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|  2.61k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|  2.61k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1124|  2.61k|        adjust = carry ? bn_sub_words : bn_add_words;
  ------------------
  |  Branch (1124:18): [True: 2.61k, False: 0]
  ------------------
 1125|  2.61k|    } else
 1126|  96.6k|        carry = 1;
 1127|       |
 1128|   282k|    res = ((*adjust)(c_d, r_d, _nist_p_384[0], BN_NIST_384_TOP) && carry)
  ------------------
  |  |   16|   282k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   282k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   282k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   282k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   282k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1128:12): [True: 282k, False: 0]
  |  Branch (1128:68): [True: 282k, False: 0]
  ------------------
 1129|   282k|        ? r_d
 1130|   282k|        : c_d;
 1131|   282k|    nist_cp_bn(r_d, res, BN_NIST_384_TOP);
  ------------------
  |  |   16|   282k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   282k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   282k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   282k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   282k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1132|   282k|    r->top = BN_NIST_384_TOP;
  ------------------
  |  |   16|   282k|#define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   282k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   282k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define BN_NIST_384_TOP (384 + BN_BITS2 - 1) / BN_BITS2
  |  |  ------------------
  |  |  |  |   54|   282k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   38|   282k|#define BN_BYTES 8
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1133|   282k|    bn_correct_top(r);
 1134|       |
 1135|   282k|    return 1;
 1136|   282k|}
bn_nist.c:nist_cp_bn:
  276|   282k|{
  277|   282k|    int i;
  278|       |
  279|  1.97M|    for (i = 0; i < top; i++)
  ------------------
  |  Branch (279:17): [True: 1.69M, False: 282k]
  ------------------
  280|  1.69M|        dst[i] = src[i];
  281|   282k|}
bn_nist.c:load_u32:
  325|  3.38M|{
  326|  3.38M|    uint32_t tmp;
  327|       |
  328|  3.38M|    memcpy(&tmp, ptr, sizeof(tmp));
  329|  3.38M|    return tmp;
  330|  3.38M|}
bn_nist.c:store_lo32:
  333|  3.38M|{
  334|       |    /* A cast is needed for big-endian system: on a 32-bit BE system
  335|       |     * NIST_INT64 may be defined as well if the compiler supports 64-bit
  336|       |     * long long.  */
  337|  3.38M|    uint32_t tmp = (uint32_t)val;
  338|       |
  339|  3.38M|    memcpy(ptr, &tmp, sizeof(tmp));
  340|  3.38M|}

BN_rshift1:
   46|  2.96M|{
   47|  2.96M|    BN_ULONG *ap, *rp, t, c;
  ------------------
  |  |   37|  2.96M|#define BN_ULONG unsigned long
  ------------------
   48|  2.96M|    int i;
   49|       |
   50|  2.96M|    bn_check_top(r);
   51|  2.96M|    bn_check_top(a);
   52|       |
   53|  2.96M|    if (BN_is_zero(a)) {
  ------------------
  |  Branch (53:9): [True: 0, False: 2.96M]
  ------------------
   54|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
   55|      0|        return 1;
   56|      0|    }
   57|  2.96M|    i = a->top;
   58|  2.96M|    ap = a->d;
   59|  2.96M|    if (a != r) {
  ------------------
  |  Branch (59:9): [True: 0, False: 2.96M]
  ------------------
   60|      0|        if (bn_wexpand(r, i) == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            return 0;
   62|      0|        r->neg = a->neg;
   63|      0|    }
   64|  2.96M|    rp = r->d;
   65|  2.96M|    r->top = i;
   66|  2.96M|    t = ap[--i];
   67|  2.96M|    rp[i] = t >> 1;
   68|  2.96M|    c = t << (BN_BITS2 - 1);
  ------------------
  |  |   54|  2.96M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.96M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   69|  2.96M|    r->top -= (t == 1);
   70|  5.78M|    while (i > 0) {
  ------------------
  |  Branch (70:12): [True: 2.82M, False: 2.96M]
  ------------------
   71|  2.82M|        t = ap[--i];
   72|  2.82M|        rp[i] = ((t >> 1) & BN_MASK2) | c;
  ------------------
  |  |   93|  2.82M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
   73|  2.82M|        c = t << (BN_BITS2 - 1);
  ------------------
  |  |   54|  2.82M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  2.82M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
   74|  2.82M|    }
   75|  2.96M|    if (!r->top)
  ------------------
  |  Branch (75:9): [True: 0, False: 2.96M]
  ------------------
   76|      0|        r->neg = 0; /* don't allow negative zero */
   77|  2.96M|    bn_check_top(r);
   78|  2.96M|    return 1;
   79|  2.96M|}
BN_lshift:
   82|  47.0k|{
   83|  47.0k|    int ret;
   84|       |
   85|  47.0k|    if (n < 0) {
  ------------------
  |  Branch (85:9): [True: 0, False: 47.0k]
  ------------------
   86|      0|        ERR_raise(ERR_LIB_BN, BN_R_INVALID_SHIFT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   87|      0|        return 0;
   88|      0|    }
   89|       |
   90|  47.0k|    ret = bn_lshift_fixed_top(r, a, n);
   91|       |
   92|  47.0k|    bn_correct_top(r);
   93|  47.0k|    bn_check_top(r);
   94|       |
   95|  47.0k|    return ret;
   96|  47.0k|}
bn_lshift_fixed_top:
  105|   653k|{
  106|   653k|    int i, nw;
  107|   653k|    unsigned int lb, rb;
  108|   653k|    BN_ULONG *t, *f;
  ------------------
  |  |   37|   653k|#define BN_ULONG unsigned long
  ------------------
  109|   653k|    BN_ULONG l, m, rmask = 0;
  ------------------
  |  |   37|   653k|#define BN_ULONG unsigned long
  ------------------
  110|       |
  111|   653k|    assert(n >= 0);
  ------------------
  |  Branch (111:5): [True: 0, False: 653k]
  |  Branch (111:5): [True: 653k, False: 0]
  ------------------
  112|       |
  113|   653k|    bn_check_top(r);
  114|   653k|    bn_check_top(a);
  115|       |
  116|   653k|    nw = n / BN_BITS2;
  ------------------
  |  |   54|   653k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   653k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  117|   653k|    if (bn_wexpand(r, a->top + nw + 1) == NULL)
  ------------------
  |  Branch (117:9): [True: 0, False: 653k]
  ------------------
  118|      0|        return 0;
  119|       |
  120|   653k|    if (a->top != 0) {
  ------------------
  |  Branch (120:9): [True: 653k, False: 0]
  ------------------
  121|   653k|        lb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|   653k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   653k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  122|   653k|        rb = BN_BITS2 - lb;
  ------------------
  |  |   54|   653k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   653k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  123|   653k|        rb %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|   653k|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|   653k|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  124|   653k|        rmask = (BN_ULONG)0 - rb; /* rmask = 0 - (rb != 0) */
  125|   653k|        rmask |= rmask >> 8;
  126|   653k|        f = &(a->d[0]);
  127|   653k|        t = &(r->d[nw]);
  128|   653k|        l = f[a->top - 1];
  129|   653k|        t[a->top] = (l >> rb) & rmask;
  130|  2.86M|        for (i = a->top - 1; i > 0; i--) {
  ------------------
  |  Branch (130:30): [True: 2.20M, False: 653k]
  ------------------
  131|  2.20M|            m = l << lb;
  132|  2.20M|            l = f[i - 1];
  133|  2.20M|            t[i] = (m | ((l >> rb) & rmask)) & BN_MASK2;
  ------------------
  |  |   93|  2.20M|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  134|  2.20M|        }
  135|   653k|        t[0] = (l << lb) & BN_MASK2;
  ------------------
  |  |   93|   653k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  136|   653k|    } else {
  137|       |        /* shouldn't happen, but formally required */
  138|      0|        r->d[nw] = 0;
  139|      0|    }
  140|   653k|    if (nw != 0)
  ------------------
  |  Branch (140:9): [True: 47.0k, False: 605k]
  ------------------
  141|  47.0k|        memset(r->d, 0, sizeof(*t) * nw);
  142|       |
  143|   653k|    r->neg = a->neg;
  144|   653k|    r->top = a->top + nw + 1;
  145|   653k|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   653k|#define BN_FLG_FIXED_TOP 0
  ------------------
  146|       |
  147|   653k|    return 1;
  148|   653k|}
BN_rshift:
  151|  2.96M|{
  152|  2.96M|    int ret = 0;
  153|       |
  154|  2.96M|    if (n < 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 2.96M]
  ------------------
  155|      0|        ERR_raise(ERR_LIB_BN, BN_R_INVALID_SHIFT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  156|      0|        return 0;
  157|      0|    }
  158|       |
  159|  2.96M|    bn_check_top(r);
  160|  2.96M|    bn_check_top(a);
  161|       |
  162|  2.96M|    ret = bn_rshift_fixed_top(r, a, n);
  163|       |
  164|  2.96M|    bn_correct_top(r);
  165|  2.96M|    bn_check_top(r);
  166|       |
  167|  2.96M|    return ret;
  168|  2.96M|}
bn_rshift_fixed_top:
  177|  3.52M|{
  178|  3.52M|    int i, top, nw;
  179|  3.52M|    unsigned int lb, rb;
  180|  3.52M|    BN_ULONG *t, *f;
  ------------------
  |  |   37|  3.52M|#define BN_ULONG unsigned long
  ------------------
  181|  3.52M|    BN_ULONG l, m, mask;
  ------------------
  |  |   37|  3.52M|#define BN_ULONG unsigned long
  ------------------
  182|       |
  183|  3.52M|    assert(n >= 0);
  ------------------
  |  Branch (183:5): [True: 0, False: 3.52M]
  |  Branch (183:5): [True: 3.52M, False: 0]
  ------------------
  184|       |
  185|  3.52M|    nw = n / BN_BITS2;
  ------------------
  |  |   54|  3.52M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.52M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  186|  3.52M|    if (nw >= a->top) {
  ------------------
  |  Branch (186:9): [True: 0, False: 3.52M]
  ------------------
  187|       |        /* shouldn't happen, but formally required */
  188|      0|        BN_zero(r);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  189|      0|        return 1;
  190|      0|    }
  191|       |
  192|  3.52M|    rb = (unsigned int)n % BN_BITS2;
  ------------------
  |  |   54|  3.52M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.52M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  193|  3.52M|    lb = BN_BITS2 - rb;
  ------------------
  |  |   54|  3.52M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.52M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  194|  3.52M|    lb %= BN_BITS2; /* say no to undefined behaviour */
  ------------------
  |  |   54|  3.52M|#define BN_BITS2 (BN_BYTES * 8)
  |  |  ------------------
  |  |  |  |   38|  3.52M|#define BN_BYTES 8
  |  |  ------------------
  ------------------
  195|  3.52M|    mask = (BN_ULONG)0 - lb; /* mask = 0 - (lb != 0) */
  196|  3.52M|    mask |= mask >> 8;
  197|  3.52M|    top = a->top - nw;
  198|  3.52M|    if (r != a && bn_wexpand(r, top) == NULL)
  ------------------
  |  Branch (198:9): [True: 558k, False: 2.96M]
  |  Branch (198:19): [True: 0, False: 558k]
  ------------------
  199|      0|        return 0;
  200|       |
  201|  3.52M|    t = &(r->d[0]);
  202|  3.52M|    f = &(a->d[nw]);
  203|  3.52M|    l = f[0];
  204|  5.76M|    for (i = 0; i < top - 1; i++) {
  ------------------
  |  Branch (204:17): [True: 2.24M, False: 3.52M]
  ------------------
  205|  2.24M|        m = f[i + 1];
  206|  2.24M|        t[i] = (l >> rb) | ((m << lb) & mask);
  207|  2.24M|        l = m;
  208|  2.24M|    }
  209|  3.52M|    t[i] = l >> rb;
  210|       |
  211|  3.52M|    r->neg = a->neg;
  212|  3.52M|    r->top = top;
  213|  3.52M|    r->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|  3.52M|#define BN_FLG_FIXED_TOP 0
  ------------------
  214|       |
  215|  3.52M|    return 1;
  216|  3.52M|}

BN_sqr:
   18|   188k|{
   19|   188k|    int ret = bn_sqr_fixed_top(r, a, ctx);
   20|       |
   21|   188k|    bn_correct_top(r);
   22|   188k|    bn_check_top(r);
   23|       |
   24|   188k|    return ret;
   25|   188k|}
bn_sqr_fixed_top:
   28|   188k|{
   29|   188k|    int max, al;
   30|   188k|    int ret = 0;
   31|   188k|    BIGNUM *tmp, *rr;
   32|       |
   33|   188k|    bn_check_top(a);
   34|       |
   35|   188k|    al = a->top;
   36|   188k|    if (al <= 0) {
  ------------------
  |  Branch (36:9): [True: 0, False: 188k]
  ------------------
   37|      0|        r->top = 0;
   38|      0|        r->neg = 0;
   39|      0|        return 1;
   40|      0|    }
   41|       |
   42|   188k|    BN_CTX_start(ctx);
   43|   188k|    rr = (a != r) ? r : BN_CTX_get(ctx);
  ------------------
  |  Branch (43:10): [True: 188k, False: 0]
  ------------------
   44|   188k|    tmp = BN_CTX_get(ctx);
   45|   188k|    if (rr == NULL || tmp == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 188k]
  |  Branch (45:23): [True: 0, False: 188k]
  ------------------
   46|      0|        goto err;
   47|       |
   48|   188k|    max = 2 * al; /* Non-zero (from above) */
   49|   188k|    if (bn_wexpand(rr, max) == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 188k]
  ------------------
   50|      0|        goto err;
   51|       |
   52|   188k|    if (al == 4) {
  ------------------
  |  Branch (52:9): [True: 0, False: 188k]
  ------------------
   53|       |#ifndef BN_SQR_COMBA
   54|       |        BN_ULONG t[8];
   55|       |        bn_sqr_normal(rr->d, a->d, 4, t);
   56|       |#else
   57|      0|        bn_sqr_comba4(rr->d, a->d);
   58|      0|#endif
   59|   188k|    } else if (al == 8) {
  ------------------
  |  Branch (59:16): [True: 0, False: 188k]
  ------------------
   60|       |#ifndef BN_SQR_COMBA
   61|       |        BN_ULONG t[16];
   62|       |        bn_sqr_normal(rr->d, a->d, 8, t);
   63|       |#else
   64|      0|        bn_sqr_comba8(rr->d, a->d);
   65|      0|#endif
   66|   188k|    } else {
   67|   188k|#if defined(BN_RECURSION)
   68|   188k|        if (al < BN_SQR_RECURSIVE_SIZE_NORMAL) {
  ------------------
  |  |  361|   188k|#define BN_SQR_RECURSIVE_SIZE_NORMAL (16) /* 32 */
  ------------------
  |  Branch (68:13): [True: 188k, False: 0]
  ------------------
   69|   188k|            BN_ULONG t[BN_SQR_RECURSIVE_SIZE_NORMAL * 2];
  ------------------
  |  |   37|   188k|#define BN_ULONG unsigned long
  ------------------
   70|   188k|            bn_sqr_normal(rr->d, a->d, al, t);
   71|   188k|        } else {
   72|      0|            int j, k;
   73|       |
   74|      0|            j = BN_num_bits_word((BN_ULONG)al);
   75|      0|            j = 1 << (j - 1);
   76|      0|            k = j + j;
   77|      0|            if (al == j) {
  ------------------
  |  Branch (77:17): [True: 0, False: 0]
  ------------------
   78|      0|                if (bn_wexpand(tmp, k * 2) == NULL)
  ------------------
  |  Branch (78:21): [True: 0, False: 0]
  ------------------
   79|      0|                    goto err;
   80|      0|                bn_sqr_recursive(rr->d, a->d, al, tmp->d);
   81|      0|            } else {
   82|      0|                if (bn_wexpand(tmp, max) == NULL)
  ------------------
  |  Branch (82:21): [True: 0, False: 0]
  ------------------
   83|      0|                    goto err;
   84|      0|                bn_sqr_normal(rr->d, a->d, al, tmp->d);
   85|      0|            }
   86|      0|        }
   87|       |#else
   88|       |        if (bn_wexpand(tmp, max) == NULL)
   89|       |            goto err;
   90|       |        bn_sqr_normal(rr->d, a->d, al, tmp->d);
   91|       |#endif
   92|   188k|    }
   93|       |
   94|   188k|    rr->neg = 0;
   95|   188k|    rr->top = max;
   96|   188k|    rr->flags |= BN_FLG_FIXED_TOP;
  ------------------
  |  |  221|   188k|#define BN_FLG_FIXED_TOP 0
  ------------------
   97|   188k|    if (r != rr && BN_copy(r, rr) == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 188k]
  |  Branch (97:20): [True: 0, False: 0]
  ------------------
   98|      0|        goto err;
   99|       |
  100|   188k|    ret = 1;
  101|   188k|err:
  102|   188k|    bn_check_top(rr);
  103|   188k|    bn_check_top(tmp);
  104|   188k|    BN_CTX_end(ctx);
  105|   188k|    return ret;
  106|   188k|}
bn_sqr_normal:
  110|   188k|{
  111|   188k|    int i, j, max;
  112|   188k|    const BN_ULONG *ap;
  113|   188k|    BN_ULONG *rp;
  ------------------
  |  |   37|   188k|#define BN_ULONG unsigned long
  ------------------
  114|       |
  115|   188k|    max = n * 2;
  116|   188k|    ap = a;
  117|   188k|    rp = r;
  118|   188k|    rp[0] = rp[max - 1] = 0;
  119|   188k|    rp++;
  120|   188k|    j = n;
  121|       |
  122|   188k|    if (--j > 0) {
  ------------------
  |  Branch (122:9): [True: 188k, False: 0]
  ------------------
  123|   188k|        ap++;
  124|   188k|        rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
  125|   188k|        rp += 2;
  126|   188k|    }
  127|       |
  128|   940k|    for (i = n - 2; i > 0; i--) {
  ------------------
  |  Branch (128:21): [True: 752k, False: 188k]
  ------------------
  129|   752k|        j--;
  130|   752k|        ap++;
  131|   752k|        rp[j] = bn_mul_add_words(rp, ap, j, ap[-1]);
  132|   752k|        rp += 2;
  133|   752k|    }
  134|       |
  135|   188k|    bn_add_words(r, r, r, max);
  136|       |
  137|       |    /* There will not be a carry */
  138|       |
  139|   188k|    bn_sqr_words(tmp, a, n);
  140|       |
  141|   188k|    bn_add_words(r, r, tmp, max);
  142|   188k|}

BN_add_word:
   98|  52.2k|{
   99|  52.2k|    BN_ULONG l;
  ------------------
  |  |   37|  52.2k|#define BN_ULONG unsigned long
  ------------------
  100|  52.2k|    int i;
  101|       |
  102|  52.2k|    bn_check_top(a);
  103|  52.2k|    w &= BN_MASK2;
  ------------------
  |  |   93|  52.2k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  104|       |
  105|       |    /* degenerate case: w is zero */
  106|  52.2k|    if (!w)
  ------------------
  |  Branch (106:9): [True: 0, False: 52.2k]
  ------------------
  107|      0|        return 1;
  108|       |    /* degenerate case: a is zero */
  109|  52.2k|    if (BN_is_zero(a))
  ------------------
  |  Branch (109:9): [True: 0, False: 52.2k]
  ------------------
  110|      0|        return BN_set_word(a, w);
  111|       |    /* handle 'a' when negative */
  112|  52.2k|    if (a->neg) {
  ------------------
  |  Branch (112:9): [True: 0, False: 52.2k]
  ------------------
  113|      0|        a->neg = 0;
  114|      0|        i = BN_sub_word(a, w);
  115|      0|        if (!BN_is_zero(a))
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  ------------------
  116|      0|            a->neg = !(a->neg);
  117|      0|        return i;
  118|      0|    }
  119|   104k|    for (i = 0; w != 0 && i < a->top; i++) {
  ------------------
  |  Branch (119:17): [True: 52.2k, False: 52.2k]
  |  Branch (119:27): [True: 52.2k, False: 0]
  ------------------
  120|  52.2k|        a->d[i] = l = (a->d[i] + w) & BN_MASK2;
  ------------------
  |  |   93|  52.2k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  121|  52.2k|        w = (w > l) ? 1 : 0;
  ------------------
  |  Branch (121:13): [True: 0, False: 52.2k]
  ------------------
  122|  52.2k|    }
  123|  52.2k|    if (w && i == a->top) {
  ------------------
  |  Branch (123:9): [True: 0, False: 52.2k]
  |  Branch (123:14): [True: 0, False: 0]
  ------------------
  124|      0|        if (bn_wexpand(a, a->top + 1) == NULL)
  ------------------
  |  Branch (124:13): [True: 0, False: 0]
  ------------------
  125|      0|            return 0;
  126|      0|        a->top++;
  127|      0|        a->d[i] = w;
  128|      0|    }
  129|  52.2k|    bn_check_top(a);
  130|  52.2k|    return 1;
  131|  52.2k|}
BN_sub_word:
  134|  47.0k|{
  135|  47.0k|    int i;
  136|       |
  137|  47.0k|    bn_check_top(a);
  138|  47.0k|    w &= BN_MASK2;
  ------------------
  |  |   93|  47.0k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  139|       |
  140|       |    /* degenerate case: w is zero */
  141|  47.0k|    if (!w)
  ------------------
  |  Branch (141:9): [True: 0, False: 47.0k]
  ------------------
  142|      0|        return 1;
  143|       |    /* degenerate case: a is zero */
  144|  47.0k|    if (BN_is_zero(a)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 47.0k]
  ------------------
  145|      0|        i = BN_set_word(a, w);
  146|      0|        if (i != 0)
  ------------------
  |  Branch (146:13): [True: 0, False: 0]
  ------------------
  147|      0|            BN_set_negative(a, 1);
  148|      0|        return i;
  149|      0|    }
  150|       |    /* handle 'a' when negative */
  151|  47.0k|    if (a->neg) {
  ------------------
  |  Branch (151:9): [True: 0, False: 47.0k]
  ------------------
  152|      0|        a->neg = 0;
  153|      0|        i = BN_add_word(a, w);
  154|      0|        a->neg = 1;
  155|      0|        return i;
  156|      0|    }
  157|       |
  158|  47.0k|    if ((a->top == 1) && (a->d[0] < w)) {
  ------------------
  |  Branch (158:9): [True: 0, False: 47.0k]
  |  Branch (158:26): [True: 0, False: 0]
  ------------------
  159|      0|        a->d[0] = w - a->d[0];
  160|      0|        a->neg = 1;
  161|      0|        return 1;
  162|      0|    }
  163|  47.0k|    i = 0;
  164|  94.0k|    for (;;) {
  165|  94.0k|        if (a->d[i] >= w) {
  ------------------
  |  Branch (165:13): [True: 47.0k, False: 47.0k]
  ------------------
  166|  47.0k|            a->d[i] -= w;
  167|  47.0k|            break;
  168|  47.0k|        } else {
  169|  47.0k|            a->d[i] = (a->d[i] - w) & BN_MASK2;
  ------------------
  |  |   93|  47.0k|#define BN_MASK2 (0xffffffffffffffffL)
  ------------------
  170|  47.0k|            i++;
  171|  47.0k|            w = 1;
  172|  47.0k|        }
  173|  94.0k|    }
  174|  47.0k|    if ((a->d[i] == 0) && (i == (a->top - 1)))
  ------------------
  |  Branch (174:9): [True: 0, False: 47.0k]
  |  Branch (174:27): [True: 0, False: 0]
  ------------------
  175|      0|        a->top--;
  176|  47.0k|    bn_check_top(a);
  177|  47.0k|    return 1;
  178|  47.0k|}

ossl_bsearch:
   16|  3.94M|{
   17|  3.94M|    const char *base_ = base;
   18|  3.94M|    int l, h, i = 0, c = 0;
   19|  3.94M|    const char *p = NULL;
   20|       |
   21|  3.94M|    if (num == 0)
  ------------------
  |  Branch (21:9): [True: 0, False: 3.94M]
  ------------------
   22|      0|        return NULL;
   23|  3.94M|    l = 0;
   24|  3.94M|    h = num;
   25|  35.3M|    while (l < h) {
  ------------------
  |  Branch (25:12): [True: 35.0M, False: 216k]
  ------------------
   26|  35.0M|        i = l + (h - l) / 2;
   27|  35.0M|        p = &(base_[i * size]);
   28|  35.0M|        c = (*cmp)(key, p);
   29|  35.0M|        if (c < 0)
  ------------------
  |  Branch (29:13): [True: 20.8M, False: 14.2M]
  ------------------
   30|  20.8M|            h = i;
   31|  14.2M|        else if (c > 0)
  ------------------
  |  Branch (31:18): [True: 10.4M, False: 3.73M]
  ------------------
   32|  10.4M|            l = i + 1;
   33|  3.73M|        else
   34|  3.73M|            break;
   35|  35.0M|    }
   36|  3.94M|    if (c != 0 && !(flags & OSSL_BSEARCH_VALUE_ON_NOMATCH))
  ------------------
  |  |  149|   216k|#define OSSL_BSEARCH_VALUE_ON_NOMATCH 0x01
  ------------------
  |  Branch (36:9): [True: 216k, False: 3.73M]
  |  Branch (36:19): [True: 216k, False: 0]
  ------------------
   37|   216k|        p = NULL;
   38|  3.73M|    else if (c == 0 && (flags & OSSL_BSEARCH_FIRST_VALUE_ON_MATCH)) {
  ------------------
  |  |  150|  3.73M|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  |  Branch (38:14): [True: 3.73M, False: 0]
  |  Branch (38:24): [True: 2.02k, False: 3.72M]
  ------------------
   39|  2.02k|        while (i > 0 && (*cmp)(key, &(base_[(i - 1) * size])) == 0)
  ------------------
  |  Branch (39:16): [True: 159, False: 1.86k]
  |  Branch (39:25): [True: 0, False: 159]
  ------------------
   40|      0|            i--;
   41|  2.02k|        p = &(base_[i * size]);
   42|  2.02k|    }
   43|  3.94M|    return p;
   44|  3.94M|}

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

BUF_MEM_new_ex:
   22|   770k|{
   23|   770k|    BUF_MEM *ret;
   24|       |
   25|   770k|    ret = BUF_MEM_new();
   26|   770k|    if (ret != NULL)
  ------------------
  |  Branch (26:9): [True: 770k, False: 0]
  ------------------
   27|   770k|        ret->flags = flags;
   28|   770k|    return ret;
   29|   770k|}
BUF_MEM_new:
   32|  1.91M|{
   33|  1.91M|    BUF_MEM *ret;
   34|       |
   35|  1.91M|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  1.91M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|  1.91M|    if (ret == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 1.91M]
  ------------------
   37|      0|        return NULL;
   38|  1.91M|    return ret;
   39|  1.91M|}
BUF_MEM_free:
   42|  1.54M|{
   43|  1.54M|    if (a == NULL)
  ------------------
  |  Branch (43:9): [True: 4.19k, False: 1.53M]
  ------------------
   44|  4.19k|        return;
   45|  1.53M|    if (a->data != NULL) {
  ------------------
  |  Branch (45:9): [True: 575k, False: 961k]
  ------------------
   46|   575k|        if (a->flags & BUF_MEM_FLAG_SECURE)
  ------------------
  |  |   48|   575k|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (46:13): [True: 0, False: 575k]
  ------------------
   47|      0|            OPENSSL_secure_clear_free(a->data, a->max);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|   575k|        else
   49|   575k|            OPENSSL_clear_free(a->data, a->max);
  ------------------
  |  |  129|   575k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   50|   575k|    }
   51|  1.53M|    OPENSSL_free(a);
  ------------------
  |  |  131|  1.53M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|  1.53M|}
BUF_MEM_grow:
   72|   383k|{
   73|   383k|    char *ret;
   74|   383k|    size_t n;
   75|       |
   76|   383k|    if (str->length >= len) {
  ------------------
  |  Branch (76:9): [True: 0, False: 383k]
  ------------------
   77|      0|        str->length = len;
   78|      0|        return len;
   79|      0|    }
   80|   383k|    if (str->max >= len) {
  ------------------
  |  Branch (80:9): [True: 0, False: 383k]
  ------------------
   81|      0|        if (str->data != NULL)
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  ------------------
   82|      0|            memset(&str->data[str->length], 0, len - str->length);
   83|      0|        str->length = len;
   84|      0|        return len;
   85|      0|    }
   86|       |    /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
   87|   383k|    if (len > LIMIT_BEFORE_EXPANSION) {
  ------------------
  |  |   19|   383k|#define LIMIT_BEFORE_EXPANSION 0x5ffffffc
  ------------------
  |  Branch (87:9): [True: 0, False: 383k]
  ------------------
   88|      0|        ERR_raise(ERR_LIB_BUF, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|        return 0;
   90|      0|    }
   91|   383k|    n = (len + 3) / 3 * 4;
   92|   383k|    if ((str->flags & BUF_MEM_FLAG_SECURE))
  ------------------
  |  |   48|   383k|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (92:9): [True: 0, False: 383k]
  ------------------
   93|      0|        ret = sec_alloc_realloc(str, n);
   94|   383k|    else
   95|   383k|        ret = OPENSSL_realloc(str->data, n);
  ------------------
  |  |  120|   383k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|   383k|    if (ret == NULL) {
  ------------------
  |  Branch (96:9): [True: 0, False: 383k]
  ------------------
   97|      0|        len = 0;
   98|   383k|    } else {
   99|   383k|        str->data = ret;
  100|   383k|        str->max = n;
  101|   383k|        memset(&str->data[str->length], 0, len - str->length);
  102|   383k|        str->length = len;
  103|   383k|    }
  104|   383k|    return len;
  105|   383k|}
BUF_MEM_grow_clean:
  108|  5.09M|{
  109|  5.09M|    char *ret;
  110|  5.09M|    size_t n;
  111|       |
  112|  5.09M|    if (str->length >= len) {
  ------------------
  |  Branch (112:9): [True: 65, False: 5.09M]
  ------------------
  113|     65|        if (str->data != NULL)
  ------------------
  |  Branch (113:13): [True: 65, False: 0]
  ------------------
  114|     65|            memset(&str->data[len], 0, str->length - len);
  115|     65|        str->length = len;
  116|     65|        return len;
  117|     65|    }
  118|  5.09M|    if (str->max >= len) {
  ------------------
  |  Branch (118:9): [True: 2.83M, False: 2.26M]
  ------------------
  119|  2.83M|        memset(&str->data[str->length], 0, len - str->length);
  120|  2.83M|        str->length = len;
  121|  2.83M|        return len;
  122|  2.83M|    }
  123|       |    /* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
  124|  2.26M|    if (len > LIMIT_BEFORE_EXPANSION) {
  ------------------
  |  |   19|  2.26M|#define LIMIT_BEFORE_EXPANSION 0x5ffffffc
  ------------------
  |  Branch (124:9): [True: 0, False: 2.26M]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_BUF, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|      0|    }
  128|  2.26M|    n = (len + 3) / 3 * 4;
  129|  2.26M|    if ((str->flags & BUF_MEM_FLAG_SECURE))
  ------------------
  |  |   48|  2.26M|#define BUF_MEM_FLAG_SECURE 0x01
  ------------------
  |  Branch (129:9): [True: 0, False: 2.26M]
  ------------------
  130|      0|        ret = sec_alloc_realloc(str, n);
  131|  2.26M|    else
  132|  2.26M|        ret = OPENSSL_clear_realloc(str->data, str->max, n);
  ------------------
  |  |  122|  2.26M|    CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  133|  2.26M|    if (ret == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 2.26M]
  ------------------
  134|      0|        len = 0;
  135|  2.26M|    } else {
  136|  2.26M|        str->data = ret;
  137|  2.26M|        str->max = n;
  138|  2.26M|        memset(&str->data[str->length], 0, len - str->length);
  139|  2.26M|        str->length = len;
  140|  2.26M|    }
  141|  2.26M|    return len;
  142|  2.26M|}

ossl_err_load_CMP_strings:
  199|      1|{
  200|      1|#ifndef OPENSSL_NO_ERR
  201|      1|    if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (201:9): [True: 1, False: 0]
  ------------------
  202|      1|        ERR_load_strings_const(CMP_str_reasons);
  203|      1|#endif
  204|      1|    return 1;
  205|      1|}

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

ossl_err_load_CMS_strings:
  182|      1|{
  183|      1|#ifndef OPENSSL_NO_ERR
  184|      1|    if (ERR_reason_error_string(CMS_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (184:9): [True: 1, False: 0]
  ------------------
  185|      1|        ERR_load_strings_const(CMS_str_reasons);
  186|      1|#endif
  187|      1|    return 1;
  188|      1|}

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

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

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

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

COMP_get_type:
   41|    695|{
   42|    695|    if (meth == NULL)
  ------------------
  |  Branch (42:9): [True: 695, False: 0]
  ------------------
   43|    695|        return NID_undef;
  ------------------
  |  |   18|    695|#define NID_undef                       0
  ------------------
   44|      0|    return meth->type;
   45|    695|}
COMP_CTX_free:
   55|  7.89k|{
   56|  7.89k|    if (ctx == NULL)
  ------------------
  |  Branch (56:9): [True: 7.89k, False: 0]
  ------------------
   57|  7.89k|        return;
   58|      0|    if (ctx->meth->finish != NULL)
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|      0|        ctx->meth->finish(ctx);
   60|       |
   61|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      0|}

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

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

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

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

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

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

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

conf_ssl_name_find:
  148|  2.06k|{
  149|  2.06k|    size_t i;
  150|  2.06k|    const struct ssl_conf_name_st *nm;
  151|       |
  152|  2.06k|    if (name == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 2.06k]
  ------------------
  153|      0|        return 0;
  154|  2.06k|    for (i = 0, nm = ssl_names; i < ssl_names_count; i++, nm++) {
  ------------------
  |  Branch (154:33): [True: 0, False: 2.06k]
  ------------------
  155|      0|        if (strcmp(nm->name, name) == 0) {
  ------------------
  |  Branch (155:13): [True: 0, False: 0]
  ------------------
  156|      0|            *idx = i;
  157|      0|            return 1;
  158|      0|        }
  159|      0|    }
  160|  2.06k|    return 0;
  161|  2.06k|}

ossl_lib_ctx_write_lock:
   59|    596|{
   60|    596|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 596]
  ------------------
   61|      0|        return 0;
   62|    596|    return CRYPTO_THREAD_write_lock(ctx->lock);
   63|    596|}
ossl_lib_ctx_read_lock:
   66|   141k|{
   67|   141k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (67:9): [True: 0, False: 141k]
  ------------------
   68|      0|        return 0;
   69|   141k|    return CRYPTO_THREAD_read_lock(ctx->lock);
   70|   141k|}
ossl_lib_ctx_unlock:
   73|   142k|{
   74|   142k|    if ((ctx = ossl_lib_ctx_get_concrete(ctx)) == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 142k]
  ------------------
   75|      0|        return 0;
   76|   142k|    return CRYPTO_THREAD_unlock(ctx->lock);
   77|   142k|}
ossl_lib_ctx_default_deinit:
  400|      1|{
  401|      1|    if (!default_context_inited)
  ------------------
  |  Branch (401:9): [True: 0, False: 1]
  ------------------
  402|      0|        return;
  403|      1|    context_deinit(&default_context_int);
  404|      1|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  405|      1|    default_context_inited = 0;
  406|      1|}
OSSL_LIB_CTX_new:
  435|    694|{
  436|    694|    OSSL_LIB_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|    694|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  437|       |
  438|    694|    if (ctx != NULL && !context_init(ctx)) {
  ------------------
  |  Branch (438:9): [True: 694, False: 0]
  |  Branch (438:24): [True: 0, False: 694]
  ------------------
  439|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  440|       |        ctx = NULL;
  441|      0|    }
  442|    694|    return ctx;
  443|    694|}
OSSL_LIB_CTX_load_config:
  480|    694|{
  481|       |    return CONF_modules_load_file_ex(ctx, config_file, NULL, 0) > 0;
  482|    694|}
OSSL_LIB_CTX_free:
  486|  33.3k|{
  487|  33.3k|    if (ctx == NULL || ossl_lib_ctx_is_default(ctx))
  ------------------
  |  Branch (487:9): [True: 32.6k, False: 694]
  |  Branch (487:24): [True: 0, False: 694]
  ------------------
  488|  32.6k|        return;
  489|       |
  490|    694|#ifndef FIPS_MODULE
  491|    694|    if (ctx->ischild)
  ------------------
  |  Branch (491:9): [True: 0, False: 694]
  ------------------
  492|      0|        ossl_provider_deinit_child(ctx);
  493|    694|#endif
  494|    694|    context_deinit(ctx);
  495|    694|    OPENSSL_free(ctx);
  ------------------
  |  |  131|    694|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  496|    694|}
OSSL_LIB_CTX_get0_global_default:
  500|      1|{
  501|      1|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (501:9): [True: 0, False: 1]
  ------------------
  502|      0|        return NULL;
  503|       |
  504|      1|    return &default_context_int;
  505|      1|}
OSSL_LIB_CTX_set0_default:
  508|  2.06k|{
  509|  2.06k|    OSSL_LIB_CTX *current_defctx;
  510|       |
  511|  2.06k|    if ((current_defctx = get_default_context()) != NULL) {
  ------------------
  |  Branch (511:9): [True: 2.06k, False: 0]
  ------------------
  512|  2.06k|        if (libctx != NULL)
  ------------------
  |  Branch (512:13): [True: 0, False: 2.06k]
  ------------------
  513|      0|            set_default_context(libctx);
  514|  2.06k|        return current_defctx;
  515|  2.06k|    }
  516|       |
  517|      0|    return NULL;
  518|  2.06k|}
ossl_release_default_drbg_ctx:
  521|      1|{
  522|       |    /* early release of the DRBG in global default libctx */
  523|      1|    if (default_context_int.drbg != NULL) {
  ------------------
  |  Branch (523:9): [True: 1, False: 0]
  ------------------
  524|      1|        ossl_rand_ctx_free(default_context_int.drbg);
  525|       |        default_context_int.drbg = NULL;
  526|      1|    }
  527|      1|}
ossl_lib_ctx_get_concrete:
  531|  8.55M|{
  532|  8.55M|#ifndef FIPS_MODULE
  533|  8.55M|    if (ctx == NULL)
  ------------------
  |  Branch (533:9): [True: 5.12M, False: 3.43M]
  ------------------
  534|  5.12M|        return get_default_context();
  535|  3.43M|#endif
  536|  3.43M|    return ctx;
  537|  8.55M|}
ossl_lib_ctx_is_default:
  540|   114k|{
  541|   114k|#ifndef FIPS_MODULE
  542|   114k|    if (ctx == NULL || ctx == get_default_context())
  ------------------
  |  Branch (542:9): [True: 28.2k, False: 86.6k]
  |  Branch (542:24): [True: 7.88k, False: 78.7k]
  ------------------
  543|  36.1k|        return 1;
  544|  78.7k|#endif
  545|  78.7k|    return 0;
  546|   114k|}
ossl_lib_ctx_is_global_default:
  549|  35.9k|{
  550|  35.9k|#ifndef FIPS_MODULE
  551|  35.9k|    if (ossl_lib_ctx_get_concrete(ctx) == &default_context_int)
  ------------------
  |  Branch (551:9): [True: 25.0k, False: 10.9k]
  ------------------
  552|  25.0k|        return 1;
  553|  10.9k|#endif
  554|  10.9k|    return 0;
  555|  35.9k|}
ossl_lib_ctx_get_data:
  558|  3.93M|{
  559|  3.93M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  560|  3.93M|    if (ctx == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 3.93M]
  ------------------
  561|      0|        return NULL;
  562|       |
  563|  3.93M|    switch (index) {
  564|   632k|    case OSSL_LIB_CTX_PROPERTY_STRING_INDEX:
  ------------------
  |  |   99|   632k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  |  Branch (564:5): [True: 632k, False: 3.30M]
  ------------------
  565|   632k|        return ctx->property_string_data;
  566|   643k|    case OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX:
  ------------------
  |  |   96|   643k|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
  |  Branch (566:5): [True: 643k, False: 3.29M]
  ------------------
  567|   643k|        return ctx->evp_method_store;
  568|  69.5k|    case OSSL_LIB_CTX_PROVIDER_STORE_INDEX:
  ------------------
  |  |   97|  69.5k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  |  Branch (568:5): [True: 69.5k, False: 3.86M]
  ------------------
  569|  69.5k|        return ctx->provider_store;
  570|  2.19M|    case OSSL_LIB_CTX_NAMEMAP_INDEX:
  ------------------
  |  |  100|  2.19M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  |  Branch (570:5): [True: 2.19M, False: 1.74M]
  ------------------
  571|  2.19M|        return ctx->namemap;
  572|   142k|    case OSSL_LIB_CTX_PROPERTY_DEFN_INDEX:
  ------------------
  |  |   98|   142k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  |  Branch (572:5): [True: 142k, False: 3.79M]
  ------------------
  573|   142k|        return ctx->property_defns;
  574|  27.5k|    case OSSL_LIB_CTX_GLOBAL_PROPERTIES:
  ------------------
  |  |  112|  27.5k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  |  Branch (574:5): [True: 27.5k, False: 3.90M]
  ------------------
  575|  27.5k|        return ctx->global_properties;
  576|  35.2k|    case OSSL_LIB_CTX_DRBG_INDEX:
  ------------------
  |  |  101|  35.2k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
  |  Branch (576:5): [True: 35.2k, False: 3.90M]
  ------------------
  577|  35.2k|        return ctx->drbg;
  578|      0|    case OSSL_LIB_CTX_DRBG_NONCE_INDEX:
  ------------------
  |  |  102|      0|#define OSSL_LIB_CTX_DRBG_NONCE_INDEX 6
  ------------------
  |  Branch (578:5): [True: 0, False: 3.93M]
  ------------------
  579|      0|        return ctx->drbg_nonce;
  580|      0|#ifndef FIPS_MODULE
  581|      0|    case OSSL_LIB_CTX_PROVIDER_CONF_INDEX:
  ------------------
  |  |  114|      0|#define OSSL_LIB_CTX_PROVIDER_CONF_INDEX 16
  ------------------
  |  Branch (581:5): [True: 0, False: 3.93M]
  ------------------
  582|      0|        return ctx->provider_conf;
  583|      0|    case OSSL_LIB_CTX_BIO_CORE_INDEX:
  ------------------
  |  |  115|      0|#define OSSL_LIB_CTX_BIO_CORE_INDEX 17
  ------------------
  |  Branch (583:5): [True: 0, False: 3.93M]
  ------------------
  584|      0|        return ctx->bio_core;
  585|      0|    case OSSL_LIB_CTX_CHILD_PROVIDER_INDEX:
  ------------------
  |  |  116|      0|#define OSSL_LIB_CTX_CHILD_PROVIDER_INDEX 18
  ------------------
  |  Branch (585:5): [True: 0, False: 3.93M]
  ------------------
  586|      0|        return ctx->child_provider;
  587|    254|    case OSSL_LIB_CTX_DECODER_STORE_INDEX:
  ------------------
  |  |  109|    254|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  |  Branch (587:5): [True: 254, False: 3.93M]
  ------------------
  588|    254|        return ctx->decoder_store;
  589|   191k|    case OSSL_LIB_CTX_DECODER_CACHE_INDEX:
  ------------------
  |  |  118|   191k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  |  Branch (589:5): [True: 191k, False: 3.74M]
  ------------------
  590|   191k|        return ctx->decoder_cache;
  591|    162|    case OSSL_LIB_CTX_ENCODER_STORE_INDEX:
  ------------------
  |  |  108|    162|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  |  Branch (591:5): [True: 162, False: 3.93M]
  ------------------
  592|    162|        return ctx->encoder_store;
  593|    162|    case OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX:
  ------------------
  |  |  113|    162|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  |  Branch (593:5): [True: 162, False: 3.93M]
  ------------------
  594|    162|        return ctx->store_loader_store;
  595|      0|    case OSSL_LIB_CTX_SELF_TEST_CB_INDEX:
  ------------------
  |  |  110|      0|#define OSSL_LIB_CTX_SELF_TEST_CB_INDEX 12
  ------------------
  |  Branch (595:5): [True: 0, False: 3.93M]
  ------------------
  596|      0|        return ctx->self_test_cb;
  597|      0|    case OSSL_LIB_CTX_INDICATOR_CB_INDEX:
  ------------------
  |  |  120|      0|#define OSSL_LIB_CTX_INDICATOR_CB_INDEX 22
  ------------------
  |  Branch (597:5): [True: 0, False: 3.93M]
  ------------------
  598|      0|        return ctx->indicator_cb;
  599|      0|#endif
  600|      0|#ifndef OPENSSL_NO_THREAD_POOL
  601|      0|    case OSSL_LIB_CTX_THREAD_INDEX:
  ------------------
  |  |  117|      0|#define OSSL_LIB_CTX_THREAD_INDEX 19
  ------------------
  |  Branch (601:5): [True: 0, False: 3.93M]
  ------------------
  602|      0|        return ctx->threads;
  603|      0|#endif
  604|       |
  605|       |#ifdef FIPS_MODULE
  606|       |    case OSSL_LIB_CTX_FIPS_PROV_INDEX:
  607|       |        return ctx->fips_prov;
  608|       |#endif
  609|       |
  610|  2.06k|    case OSSL_LIB_CTX_COMP_METHODS:
  ------------------
  |  |  119|  2.06k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
  |  Branch (610:5): [True: 2.06k, False: 3.93M]
  ------------------
  611|  2.06k|        return (void *)&ctx->comp_methods;
  612|       |
  613|      0|    default:
  ------------------
  |  Branch (613:5): [True: 0, False: 3.93M]
  ------------------
  614|       |        return NULL;
  615|  3.93M|    }
  616|  3.93M|}
OSSL_LIB_CTX_get_data:
  619|  2.06k|{
  620|  2.06k|    return ossl_lib_ctx_get_data(ctx, index);
  621|  2.06k|}
ossl_lib_ctx_get_ex_data_global:
  624|  4.24M|{
  625|  4.24M|    ctx = ossl_lib_ctx_get_concrete(ctx);
  626|  4.24M|    if (ctx == NULL)
  ------------------
  |  Branch (626:9): [True: 0, False: 4.24M]
  ------------------
  627|      0|        return NULL;
  628|  4.24M|    return &ctx->global;
  629|  4.24M|}
ossl_lib_ctx_get_descriptor:
  632|  35.9k|{
  633|       |#ifdef FIPS_MODULE
  634|       |    return "FIPS internal library context";
  635|       |#else
  636|  35.9k|    if (ossl_lib_ctx_is_global_default(libctx))
  ------------------
  |  Branch (636:9): [True: 25.0k, False: 10.9k]
  ------------------
  637|  25.0k|        return "Global default library context";
  638|  10.9k|    if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (638:9): [True: 0, False: 10.9k]
  ------------------
  639|      0|        return "Thread-local default library context";
  640|  10.9k|    return "Non-default library context";
  641|  10.9k|#endif
  642|  10.9k|}
OSSL_LIB_CTX_get_conf_diagnostics:
  645|    695|{
  646|    695|    libctx = ossl_lib_ctx_get_concrete(libctx);
  647|    695|    if (libctx == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 695]
  ------------------
  648|      0|        return 0;
  649|    695|    return libctx->conf_diagnostics;
  650|    695|}
context.c:context_deinit:
  359|    695|{
  360|    695|    if (ctx == NULL)
  ------------------
  |  Branch (360:9): [True: 0, False: 695]
  ------------------
  361|      0|        return 1;
  362|       |
  363|    695|    ossl_ctx_thread_stop(ctx);
  364|       |
  365|    695|    context_deinit_objs(ctx);
  366|       |
  367|    695|    ossl_crypto_cleanup_all_ex_data_int(ctx);
  368|       |
  369|    695|    CRYPTO_THREAD_lock_free(ctx->lock);
  370|       |    ctx->lock = NULL;
  371|    695|    return 1;
  372|    695|}
context.c:context_deinit_objs:
  229|    695|{
  230|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  231|    695|    if (ctx->evp_method_store != NULL) {
  ------------------
  |  Branch (231:9): [True: 695, False: 0]
  ------------------
  232|    695|        ossl_method_store_free(ctx->evp_method_store);
  233|    695|        ctx->evp_method_store = NULL;
  234|    695|    }
  235|       |
  236|       |    /* P2. */
  237|    695|    if (ctx->drbg != NULL) {
  ------------------
  |  Branch (237:9): [True: 694, False: 1]
  ------------------
  238|    694|        ossl_rand_ctx_free(ctx->drbg);
  239|    694|        ctx->drbg = NULL;
  240|    694|    }
  241|       |
  242|    695|#ifndef FIPS_MODULE
  243|       |    /* P2. */
  244|    695|    if (ctx->provider_conf != NULL) {
  ------------------
  |  Branch (244:9): [True: 695, False: 0]
  ------------------
  245|    695|        ossl_prov_conf_ctx_free(ctx->provider_conf);
  246|    695|        ctx->provider_conf = NULL;
  247|    695|    }
  248|       |
  249|       |    /*
  250|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  251|       |     * provider store
  252|       |     */
  253|    695|    if (ctx->decoder_store != NULL) {
  ------------------
  |  Branch (253:9): [True: 695, False: 0]
  ------------------
  254|    695|        ossl_method_store_free(ctx->decoder_store);
  255|    695|        ctx->decoder_store = NULL;
  256|    695|    }
  257|    695|    if (ctx->decoder_cache != NULL) {
  ------------------
  |  Branch (257:9): [True: 695, False: 0]
  ------------------
  258|    695|        ossl_decoder_cache_free(ctx->decoder_cache);
  259|    695|        ctx->decoder_cache = NULL;
  260|    695|    }
  261|       |
  262|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  263|    695|    if (ctx->encoder_store != NULL) {
  ------------------
  |  Branch (263:9): [True: 695, False: 0]
  ------------------
  264|    695|        ossl_method_store_free(ctx->encoder_store);
  265|    695|        ctx->encoder_store = NULL;
  266|    695|    }
  267|       |
  268|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  269|    695|    if (ctx->store_loader_store != NULL) {
  ------------------
  |  Branch (269:9): [True: 695, False: 0]
  ------------------
  270|    695|        ossl_method_store_free(ctx->store_loader_store);
  271|    695|        ctx->store_loader_store = NULL;
  272|    695|    }
  273|    695|#endif
  274|       |
  275|       |    /* P1. Needs to be freed before the child provider data is freed */
  276|    695|    if (ctx->provider_store != NULL) {
  ------------------
  |  Branch (276:9): [True: 695, False: 0]
  ------------------
  277|    695|        ossl_provider_store_free(ctx->provider_store);
  278|    695|        ctx->provider_store = NULL;
  279|    695|    }
  280|       |
  281|       |    /* Default priority. */
  282|    695|    if (ctx->property_string_data != NULL) {
  ------------------
  |  Branch (282:9): [True: 695, False: 0]
  ------------------
  283|    695|        ossl_property_string_data_free(ctx->property_string_data);
  284|    695|        ctx->property_string_data = NULL;
  285|    695|    }
  286|       |
  287|    695|    if (ctx->namemap != NULL) {
  ------------------
  |  Branch (287:9): [True: 695, False: 0]
  ------------------
  288|    695|        ossl_stored_namemap_free(ctx->namemap);
  289|    695|        ctx->namemap = NULL;
  290|    695|    }
  291|       |
  292|    695|    if (ctx->property_defns != NULL) {
  ------------------
  |  Branch (292:9): [True: 695, False: 0]
  ------------------
  293|    695|        ossl_property_defns_free(ctx->property_defns);
  294|    695|        ctx->property_defns = NULL;
  295|    695|    }
  296|       |
  297|    695|    if (ctx->global_properties != NULL) {
  ------------------
  |  Branch (297:9): [True: 695, False: 0]
  ------------------
  298|    695|        ossl_ctx_global_properties_free(ctx->global_properties);
  299|    695|        ctx->global_properties = NULL;
  300|    695|    }
  301|       |
  302|    695|#ifndef FIPS_MODULE
  303|    695|    if (ctx->bio_core != NULL) {
  ------------------
  |  Branch (303:9): [True: 695, False: 0]
  ------------------
  304|    695|        ossl_bio_core_globals_free(ctx->bio_core);
  305|    695|        ctx->bio_core = NULL;
  306|    695|    }
  307|    695|#endif
  308|       |
  309|    695|    if (ctx->drbg_nonce != NULL) {
  ------------------
  |  Branch (309:9): [True: 695, False: 0]
  ------------------
  310|    695|        ossl_prov_drbg_nonce_ctx_free(ctx->drbg_nonce);
  311|    695|        ctx->drbg_nonce = NULL;
  312|    695|    }
  313|       |
  314|    695|#ifndef FIPS_MODULE
  315|    695|    if (ctx->indicator_cb != NULL) {
  ------------------
  |  Branch (315:9): [True: 695, False: 0]
  ------------------
  316|    695|        ossl_indicator_set_callback_free(ctx->indicator_cb);
  317|    695|        ctx->indicator_cb = NULL;
  318|    695|    }
  319|       |
  320|    695|    if (ctx->self_test_cb != NULL) {
  ------------------
  |  Branch (320:9): [True: 695, False: 0]
  ------------------
  321|    695|        ossl_self_test_set_callback_free(ctx->self_test_cb);
  322|    695|        ctx->self_test_cb = NULL;
  323|    695|    }
  324|    695|#endif
  325|       |
  326|       |#ifdef FIPS_MODULE
  327|       |    ossl_thread_event_ctx_free(ctx);
  328|       |
  329|       |    if (ctx->fips_prov != NULL) {
  330|       |        ossl_fips_prov_ossl_ctx_free(ctx->fips_prov);
  331|       |        ctx->fips_prov = NULL;
  332|       |    }
  333|       |#endif
  334|       |
  335|    695|#ifndef OPENSSL_NO_THREAD_POOL
  336|    695|    if (ctx->threads != NULL) {
  ------------------
  |  Branch (336:9): [True: 695, False: 0]
  ------------------
  337|    695|        ossl_threads_ctx_free(ctx->threads);
  338|    695|        ctx->threads = NULL;
  339|    695|    }
  340|    695|#endif
  341|       |
  342|       |    /* Low priority. */
  343|    695|#ifndef FIPS_MODULE
  344|    695|    if (ctx->child_provider != NULL) {
  ------------------
  |  Branch (344:9): [True: 695, False: 0]
  ------------------
  345|    695|        ossl_child_prov_ctx_free(ctx->child_provider);
  346|    695|        ctx->child_provider = NULL;
  347|    695|    }
  348|    695|#endif
  349|       |
  350|    695|#ifndef FIPS_MODULE
  351|    695|    if (ctx->comp_methods != NULL) {
  ------------------
  |  Branch (351:9): [True: 695, False: 0]
  ------------------
  352|    695|        ossl_free_compression_methods_int(ctx->comp_methods);
  353|       |        ctx->comp_methods = NULL;
  354|    695|    }
  355|    695|#endif
  356|    695|}
context.c:context_init:
   91|    695|{
   92|    695|    int exdata_done = 0;
   93|       |
   94|    695|    ctx->lock = CRYPTO_THREAD_lock_new();
   95|    695|    if (ctx->lock == NULL)
  ------------------
  |  Branch (95:9): [True: 0, False: 695]
  ------------------
   96|      0|        goto err;
   97|       |
   98|       |    /* Initialize ex_data. */
   99|    695|    if (!ossl_do_ex_data_init(ctx))
  ------------------
  |  Branch (99:9): [True: 0, False: 695]
  ------------------
  100|      0|        goto err;
  101|    695|    exdata_done = 1;
  102|       |
  103|       |    /* P2. We want evp_method_store to be cleaned up before the provider store */
  104|    695|    ctx->evp_method_store = ossl_method_store_new(ctx);
  105|    695|    if (ctx->evp_method_store == NULL)
  ------------------
  |  Branch (105:9): [True: 0, False: 695]
  ------------------
  106|      0|        goto err;
  107|    695|    OSSL_TRACE1(QUERY, "context_init: allocating store %p\n", ctx->evp_method_store);
  ------------------
  |  |  293|    695|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  285|    695|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  108|       |
  109|    695|#ifndef FIPS_MODULE
  110|       |    /* P2. Must be freed before the provider store is freed */
  111|    695|    ctx->provider_conf = ossl_prov_conf_ctx_new(ctx);
  112|    695|    if (ctx->provider_conf == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 695]
  ------------------
  113|      0|        goto err;
  114|    695|#endif
  115|       |
  116|       |    /* P2. */
  117|    695|    ctx->drbg = ossl_rand_ctx_new(ctx);
  118|    695|    if (ctx->drbg == NULL)
  ------------------
  |  Branch (118:9): [True: 0, False: 695]
  ------------------
  119|      0|        goto err;
  120|       |
  121|    695|#ifndef FIPS_MODULE
  122|       |    /*
  123|       |     * P2. We want decoder_store/decoder_cache to be cleaned up before the
  124|       |     * provider store
  125|       |     */
  126|    695|    ctx->decoder_store = ossl_method_store_new(ctx);
  127|    695|    if (ctx->decoder_store == NULL)
  ------------------
  |  Branch (127:9): [True: 0, False: 695]
  ------------------
  128|      0|        goto err;
  129|    695|    ctx->decoder_cache = ossl_decoder_cache_new(ctx);
  130|    695|    if (ctx->decoder_cache == NULL)
  ------------------
  |  Branch (130:9): [True: 0, False: 695]
  ------------------
  131|      0|        goto err;
  132|       |
  133|       |    /* P2. We want encoder_store to be cleaned up before the provider store */
  134|    695|    ctx->encoder_store = ossl_method_store_new(ctx);
  135|    695|    if (ctx->encoder_store == NULL)
  ------------------
  |  Branch (135:9): [True: 0, False: 695]
  ------------------
  136|      0|        goto err;
  137|       |
  138|       |    /* P2. We want loader_store to be cleaned up before the provider store */
  139|    695|    ctx->store_loader_store = ossl_method_store_new(ctx);
  140|    695|    if (ctx->store_loader_store == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 695]
  ------------------
  141|      0|        goto err;
  142|    695|#endif
  143|       |
  144|       |    /* P1. Needs to be freed before the child provider data is freed */
  145|    695|    ctx->provider_store = ossl_provider_store_new(ctx);
  146|    695|    if (ctx->provider_store == NULL)
  ------------------
  |  Branch (146:9): [True: 0, False: 695]
  ------------------
  147|      0|        goto err;
  148|       |
  149|       |    /* Default priority. */
  150|    695|    ctx->property_string_data = ossl_property_string_data_new(ctx);
  151|    695|    if (ctx->property_string_data == NULL)
  ------------------
  |  Branch (151:9): [True: 0, False: 695]
  ------------------
  152|      0|        goto err;
  153|       |
  154|    695|    ctx->namemap = ossl_stored_namemap_new(ctx);
  155|    695|    if (ctx->namemap == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 695]
  ------------------
  156|      0|        goto err;
  157|       |
  158|    695|    ctx->property_defns = ossl_property_defns_new(ctx);
  159|    695|    if (ctx->property_defns == NULL)
  ------------------
  |  Branch (159:9): [True: 0, False: 695]
  ------------------
  160|      0|        goto err;
  161|       |
  162|    695|    ctx->global_properties = ossl_ctx_global_properties_new(ctx);
  163|    695|    if (ctx->global_properties == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 695]
  ------------------
  164|      0|        goto err;
  165|       |
  166|    695|#ifndef FIPS_MODULE
  167|    695|    ctx->bio_core = ossl_bio_core_globals_new(ctx);
  168|    695|    if (ctx->bio_core == NULL)
  ------------------
  |  Branch (168:9): [True: 0, False: 695]
  ------------------
  169|      0|        goto err;
  170|    695|#endif
  171|       |
  172|    695|    ctx->drbg_nonce = ossl_prov_drbg_nonce_ctx_new(ctx);
  173|    695|    if (ctx->drbg_nonce == NULL)
  ------------------
  |  Branch (173:9): [True: 0, False: 695]
  ------------------
  174|      0|        goto err;
  175|       |
  176|    695|#ifndef FIPS_MODULE
  177|    695|    ctx->self_test_cb = ossl_self_test_set_callback_new(ctx);
  178|    695|    if (ctx->self_test_cb == NULL)
  ------------------
  |  Branch (178:9): [True: 0, False: 695]
  ------------------
  179|      0|        goto err;
  180|    695|    ctx->indicator_cb = ossl_indicator_set_callback_new(ctx);
  181|    695|    if (ctx->indicator_cb == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 695]
  ------------------
  182|      0|        goto err;
  183|    695|#endif
  184|       |
  185|       |#ifdef FIPS_MODULE
  186|       |    if (!ossl_thread_event_ctx_new(ctx))
  187|       |        goto err;
  188|       |
  189|       |    ctx->fips_prov = ossl_fips_prov_ossl_ctx_new(ctx);
  190|       |    if (ctx->fips_prov == NULL)
  191|       |        goto err;
  192|       |#endif
  193|       |
  194|    695|#ifndef OPENSSL_NO_THREAD_POOL
  195|    695|    ctx->threads = ossl_threads_ctx_new(ctx);
  196|    695|    if (ctx->threads == NULL)
  ------------------
  |  Branch (196:9): [True: 0, False: 695]
  ------------------
  197|      0|        goto err;
  198|    695|#endif
  199|       |
  200|       |    /* Low priority. */
  201|    695|#ifndef FIPS_MODULE
  202|    695|    ctx->child_provider = ossl_child_prov_ctx_new(ctx);
  203|    695|    if (ctx->child_provider == NULL)
  ------------------
  |  Branch (203:9): [True: 0, False: 695]
  ------------------
  204|      0|        goto err;
  205|    695|#endif
  206|       |
  207|       |    /* Everything depends on properties, so we also pre-initialise that */
  208|    695|    if (!ossl_property_parse_init(ctx))
  ------------------
  |  Branch (208:9): [True: 0, False: 695]
  ------------------
  209|      0|        goto err;
  210|       |
  211|    695|#ifndef FIPS_MODULE
  212|    695|    ctx->comp_methods = ossl_load_builtin_compressions();
  213|    695|#endif
  214|       |
  215|    695|    return 1;
  216|       |
  217|      0|err:
  218|      0|    context_deinit_objs(ctx);
  219|       |
  220|      0|    if (exdata_done)
  ------------------
  |  Branch (220:9): [True: 0, False: 0]
  ------------------
  221|      0|        ossl_crypto_cleanup_all_ex_data_int(ctx);
  222|       |
  223|      0|    CRYPTO_THREAD_lock_free(ctx->lock);
  224|      0|    memset(ctx, '\0', sizeof(*ctx));
  225|      0|    return 0;
  226|    695|}
context.c:default_context_do_init:
  383|      1|{
  384|      1|    if (!CRYPTO_THREAD_init_local(&default_context_thread_local, NULL))
  ------------------
  |  Branch (384:9): [True: 0, False: 1]
  ------------------
  385|      0|        goto err;
  386|       |
  387|      1|    if (!context_init(&default_context_int))
  ------------------
  |  Branch (387:9): [True: 0, False: 1]
  ------------------
  388|      0|        goto deinit_thread;
  389|       |
  390|      1|    default_context_inited = 1;
  391|      1|    return 1;
  392|       |
  393|      0|deinit_thread:
  394|      0|    CRYPTO_THREAD_cleanup_local(&default_context_thread_local);
  395|      0|err:
  396|      0|    return 0;
  397|      0|}
context.c:get_default_context:
  417|  5.21M|{
  418|  5.21M|    OSSL_LIB_CTX *current_defctx = get_thread_default_context();
  419|       |
  420|  5.21M|    if (current_defctx == NULL && default_context_inited)
  ------------------
  |  Branch (420:9): [True: 5.21M, False: 0]
  |  Branch (420:35): [True: 5.21M, False: 0]
  ------------------
  421|  5.21M|        current_defctx = &default_context_int;
  422|  5.21M|    return current_defctx;
  423|  5.21M|}
context.c:get_thread_default_context:
  409|  5.21M|{
  410|  5.21M|    if (!RUN_ONCE(&default_context_init, default_context_do_init))
  ------------------
  |  |  130|  5.21M|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 5.21M, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (410:9): [True: 0, False: 5.21M]
  ------------------
  411|      0|        return NULL;
  412|       |
  413|  5.21M|    return CRYPTO_THREAD_get_local(&default_context_thread_local);
  414|  5.21M|}

ossl_algorithm_do_all:
  149|  61.0k|{
  150|  61.0k|    struct algorithm_data_st cbdata = {
  151|  61.0k|        0,
  152|  61.0k|    };
  153|       |
  154|  61.0k|    cbdata.libctx = libctx;
  155|  61.0k|    cbdata.operation_id = operation_id;
  156|  61.0k|    cbdata.pre = pre;
  157|  61.0k|    cbdata.reserve_store = reserve_store;
  158|  61.0k|    cbdata.fn = fn;
  159|  61.0k|    cbdata.unreserve_store = unreserve_store;
  160|  61.0k|    cbdata.post = post;
  161|  61.0k|    cbdata.data = data;
  162|       |
  163|  61.0k|    if (provider == NULL) {
  ------------------
  |  Branch (163:9): [True: 60.0k, False: 1.00k]
  ------------------
  164|  60.0k|        ossl_provider_doall_activated(libctx, algorithm_do_this, &cbdata);
  165|  60.0k|    } else {
  166|  1.00k|        OSSL_LIB_CTX *libctx2 = ossl_provider_libctx(provider);
  167|       |
  168|       |        /*
  169|       |         * If a provider is given, its library context MUST match the library
  170|       |         * context we're passed.  If this turns out not to be true, there is
  171|       |         * a programming error in the functions up the call stack.
  172|       |         */
  173|  1.00k|        if (!ossl_assert(ossl_lib_ctx_get_concrete(libctx)
  ------------------
  |  |   52|  1.00k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.00k|    __FILE__, __LINE__)
  ------------------
  |  Branch (173:13): [True: 0, False: 1.00k]
  ------------------
  174|  1.00k|                == ossl_lib_ctx_get_concrete(libctx2)))
  175|      0|            return;
  176|       |
  177|  1.00k|        cbdata.libctx = libctx2;
  178|  1.00k|        algorithm_do_this(provider, &cbdata);
  179|  1.00k|    }
  180|  61.0k|}
ossl_algorithm_get1_first_name:
  183|   141k|{
  184|   141k|    const char *first_name_end = NULL;
  185|   141k|    size_t first_name_len = 0;
  186|   141k|    char *ret;
  187|       |
  188|   141k|    if (algo->algorithm_names == NULL)
  ------------------
  |  Branch (188:9): [True: 0, False: 141k]
  ------------------
  189|      0|        return NULL;
  190|       |
  191|   141k|    first_name_end = strchr(algo->algorithm_names, ':');
  192|   141k|    if (first_name_end == NULL)
  ------------------
  |  Branch (192:9): [True: 43.2k, False: 98.2k]
  ------------------
  193|  43.2k|        first_name_len = strlen(algo->algorithm_names);
  194|  98.2k|    else
  195|  98.2k|        first_name_len = first_name_end - algo->algorithm_names;
  196|       |
  197|   141k|    ret = OPENSSL_strndup(algo->algorithm_names, first_name_len);
  ------------------
  |  |  137|   141k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  198|   141k|    return ret;
  199|   141k|}
core_algorithm.c:algorithm_do_this:
  103|  66.2k|{
  104|  66.2k|    struct algorithm_data_st *data = cbdata;
  105|  66.2k|    int first_operation = 1;
  106|  66.2k|    int last_operation = OSSL_OP__HIGHEST;
  ------------------
  |  |  299|  66.2k|#define OSSL_OP__HIGHEST 22
  ------------------
  107|  66.2k|    int cur_operation;
  108|  66.2k|    int ok = 1;
  109|       |
  110|  66.2k|    if (data->operation_id != 0)
  ------------------
  |  Branch (110:9): [True: 66.2k, False: 0]
  ------------------
  111|  66.2k|        first_operation = last_operation = data->operation_id;
  112|       |
  113|  66.2k|    for (cur_operation = first_operation;
  114|   132k|        cur_operation <= last_operation;
  ------------------
  |  Branch (114:9): [True: 66.2k, False: 66.2k]
  ------------------
  115|  66.2k|        cur_operation++) {
  116|  66.2k|        int no_store = 0; /* Assume caching is ok */
  117|  66.2k|        const OSSL_ALGORITHM *map = NULL;
  118|  66.2k|        int ret = 0;
  119|       |
  120|  66.2k|        map = ossl_provider_query_operation(provider, cur_operation,
  121|  66.2k|            &no_store);
  122|  66.2k|        ret = algorithm_do_map(provider, map, cur_operation, no_store, data);
  123|  66.2k|        ossl_provider_unquery_operation(provider, cur_operation, map);
  124|       |
  125|  66.2k|        if (ret < 0)
  ------------------
  |  Branch (125:13): [True: 0, False: 66.2k]
  ------------------
  126|       |            /* Hard error, bail out immediately! */
  127|      0|            return 0;
  128|       |
  129|       |        /* If post-condition not fulfilled, set general failure */
  130|  66.2k|        if (!ret)
  ------------------
  |  Branch (130:13): [True: 0, False: 66.2k]
  ------------------
  131|      0|            ok = 0;
  132|  66.2k|    }
  133|       |
  134|  66.2k|    return ok;
  135|  66.2k|}
core_algorithm.c:algorithm_do_map:
   44|  66.2k|{
   45|  66.2k|    struct algorithm_data_st *data = cbdata;
   46|  66.2k|    int ret = 0;
   47|       |
   48|  66.2k|    if (!data->reserve_store(no_store, data->data))
  ------------------
  |  Branch (48:9): [True: 0, False: 66.2k]
  ------------------
   49|       |        /* Error, bail out! */
   50|      0|        return -1;
   51|       |
   52|       |    /* Do we fulfill pre-conditions? */
   53|  66.2k|    if (data->pre == NULL) {
  ------------------
  |  Branch (53:9): [True: 0, False: 66.2k]
  ------------------
   54|       |        /* If there is no pre-condition function, assume "yes" */
   55|      0|        ret = 1;
   56|  66.2k|    } else if (!data->pre(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (56:16): [True: 0, False: 66.2k]
  ------------------
   57|  66.2k|                   &ret)) {
   58|       |        /* Error, bail out! */
   59|      0|        ret = -1;
   60|      0|        goto end;
   61|      0|    }
   62|       |
   63|       |    /*
   64|       |     * If pre-condition not fulfilled don't add this set of implementations,
   65|       |     * but do continue with the next.  This simply means that another thread
   66|       |     * got to it first.
   67|       |     */
   68|  66.2k|    if (ret == 0) {
  ------------------
  |  Branch (68:9): [True: 62.7k, False: 3.58k]
  ------------------
   69|  62.7k|        ret = 1;
   70|  62.7k|        goto end;
   71|  62.7k|    }
   72|       |
   73|  3.58k|    if (map != NULL) {
  ------------------
  |  Branch (73:9): [True: 3.19k, False: 394]
  ------------------
   74|  3.19k|        const OSSL_ALGORITHM *thismap;
   75|       |
   76|   144k|        for (thismap = map; thismap->algorithm_names != NULL; thismap++)
  ------------------
  |  Branch (76:29): [True: 141k, False: 3.19k]
  ------------------
   77|   141k|            data->fn(provider, thismap, no_store, data->data);
   78|  3.19k|    }
   79|       |
   80|       |    /* Do we fulfill post-conditions? */
   81|  3.58k|    if (data->post == NULL) {
  ------------------
  |  Branch (81:9): [True: 0, False: 3.58k]
  ------------------
   82|       |        /* If there is no post-condition function, assume "yes" */
   83|      0|        ret = 1;
   84|  3.58k|    } else if (!data->post(provider, cur_operation, no_store, data->data,
  ------------------
  |  Branch (84:16): [True: 0, False: 3.58k]
  ------------------
   85|  3.58k|                   &ret)) {
   86|       |        /* Error, bail out! */
   87|      0|        ret = -1;
   88|      0|    }
   89|       |
   90|  66.2k|end:
   91|  66.2k|    data->unreserve_store(data->data);
   92|       |
   93|  66.2k|    return ret;
   94|  3.58k|}

ossl_method_construct:
  137|  61.0k|{
  138|  61.0k|    void *method = NULL;
  139|  61.0k|    OSSL_PROVIDER *provider = provider_rw != NULL ? *provider_rw : NULL;
  ------------------
  |  Branch (139:31): [True: 61.0k, False: 0]
  ------------------
  140|  61.0k|    struct construct_data_st cbdata;
  141|       |
  142|       |    /*
  143|       |     * We might be tempted to try to look into the method store without
  144|       |     * constructing to see if we can find our method there already.
  145|       |     * Unfortunately that does not work well if the query contains
  146|       |     * optional properties as newly loaded providers can match them better.
  147|       |     * We trust that ossl_method_construct_precondition() and
  148|       |     * ossl_method_construct_postcondition() make sure that the
  149|       |     * ossl_algorithm_do_all() does very little when methods from
  150|       |     * a provider have already been constructed.
  151|       |     */
  152|       |
  153|  61.0k|    cbdata.store = NULL;
  154|  61.0k|    cbdata.force_store = force_store;
  155|  61.0k|    cbdata.mcm = mcm;
  156|  61.0k|    cbdata.mcm_data = mcm_data;
  157|  61.0k|    ossl_algorithm_do_all(libctx, operation_id, provider,
  158|  61.0k|        ossl_method_construct_precondition,
  159|  61.0k|        ossl_method_construct_reserve_store,
  160|  61.0k|        ossl_method_construct_this,
  161|  61.0k|        ossl_method_construct_unreserve_store,
  162|  61.0k|        ossl_method_construct_postcondition,
  163|  61.0k|        &cbdata);
  164|       |
  165|       |    /* If there is a temporary store, try there first */
  166|  61.0k|    if (cbdata.store != NULL)
  ------------------
  |  Branch (166:9): [True: 0, False: 61.0k]
  ------------------
  167|      0|        method = mcm->get(cbdata.store, (const OSSL_PROVIDER **)provider_rw,
  168|      0|            mcm_data);
  169|       |
  170|       |    /* If no method was found yet, try the global store */
  171|  61.0k|    if (method == NULL)
  ------------------
  |  Branch (171:9): [True: 61.0k, False: 0]
  ------------------
  172|  61.0k|        method = mcm->get(NULL, (const OSSL_PROVIDER **)provider_rw, mcm_data);
  173|       |
  174|  61.0k|    return method;
  175|  61.0k|}
core_fetch.c:ossl_method_construct_precondition:
   63|  66.2k|{
   64|  66.2k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|  66.2k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  66.2k|    __FILE__, __LINE__)
  ------------------
  |  Branch (64:9): [True: 0, False: 66.2k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|       |
   69|       |    /* Assume that no bits are set */
   70|  66.2k|    *result = 0;
   71|       |
   72|       |    /* No flag bits for temporary stores */
   73|  66.2k|    if (!is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (73:9): [True: 66.2k, False: 0]
  ------------------
   74|  66.2k|        && !ossl_provider_test_operation_bit(provider, operation_id, result))
  ------------------
  |  Branch (74:12): [True: 0, False: 66.2k]
  ------------------
   75|      0|        return 0;
   76|       |
   77|       |    /*
   78|       |     * The result we get tells if methods have already been constructed.
   79|       |     * However, we want to tell whether construction should happen (true)
   80|       |     * or not (false), which is the opposite of what we got.
   81|       |     */
   82|  66.2k|    *result = !*result;
   83|       |
   84|  66.2k|    return 1;
   85|  66.2k|}
core_fetch.c:is_temporary_method_store:
   29|   136k|{
   30|   136k|    struct construct_data_st *data = cbdata;
   31|       |
   32|   136k|    return no_store && !data->force_store;
  ------------------
  |  Branch (32:12): [True: 0, False: 136k]
  |  Branch (32:24): [True: 0, False: 0]
  ------------------
   33|   136k|}
core_fetch.c:ossl_method_construct_reserve_store:
   36|  66.2k|{
   37|  66.2k|    struct construct_data_st *data = cbdata;
   38|       |
   39|  66.2k|    if (is_temporary_method_store(no_store, data) && data->store == NULL) {
  ------------------
  |  Branch (39:9): [True: 0, False: 66.2k]
  |  Branch (39:54): [True: 0, False: 0]
  ------------------
   40|       |        /*
   41|       |         * If we have been told not to store the method "permanently", we
   42|       |         * ask for a temporary store, and store the method there.
   43|       |         * The owner of |data->mcm| is completely responsible for managing
   44|       |         * that temporary store.
   45|       |         */
   46|      0|        if ((data->store = data->mcm->get_tmp_store(data->mcm_data)) == NULL)
  ------------------
  |  Branch (46:13): [True: 0, False: 0]
  ------------------
   47|      0|            return 0;
   48|      0|    }
   49|       |
   50|  66.2k|    return data->mcm->lock_store(data->store, data->mcm_data);
   51|  66.2k|}
core_fetch.c:ossl_method_construct_this:
  106|   141k|{
  107|   141k|    struct construct_data_st *data = cbdata;
  108|   141k|    void *method = NULL;
  109|       |
  110|   141k|    if ((method = data->mcm->construct(algo, provider, data->mcm_data))
  ------------------
  |  Branch (110:9): [True: 0, False: 141k]
  ------------------
  111|   141k|        == NULL)
  112|      0|        return;
  113|       |
  114|   141k|    OSSL_TRACE2(QUERY,
  ------------------
  |  |  295|   141k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|   141k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  115|   141k|        "ossl_method_construct_this: putting an algo to the store %p with no_store %d\n",
  116|   141k|        (void *)data->store, no_store);
  117|       |    /*
  118|       |     * Note regarding putting the method in stores:
  119|       |     *
  120|       |     * we don't need to care if it actually got in or not here.
  121|       |     * If it didn't get in, it will simply not be available when
  122|       |     * ossl_method_construct() tries to get it from the store.
  123|       |     *
  124|       |     * It is *expected* that the put function increments the refcnt
  125|       |     * of the passed method.
  126|       |     */
  127|   141k|    data->mcm->put(no_store ? data->store : NULL, method, provider, algo->algorithm_names,
  ------------------
  |  Branch (127:20): [True: 0, False: 141k]
  ------------------
  128|   141k|        algo->property_definition, data->mcm_data);
  129|       |
  130|       |    /* refcnt-- because we're dropping the reference */
  131|   141k|    data->mcm->destruct(method, data->mcm_data);
  132|   141k|}
core_fetch.c:ossl_method_construct_unreserve_store:
   54|  66.2k|{
   55|  66.2k|    struct construct_data_st *data = cbdata;
   56|       |
   57|  66.2k|    return data->mcm->unlock_store(data->store, data->mcm_data);
   58|  66.2k|}
core_fetch.c:ossl_method_construct_postcondition:
   90|  3.58k|{
   91|  3.58k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|  3.58k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.58k|    __FILE__, __LINE__)
  ------------------
  |  Branch (91:9): [True: 0, False: 3.58k]
  ------------------
   92|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   93|      0|        return 0;
   94|      0|    }
   95|       |
   96|  3.58k|    *result = 1;
   97|       |
   98|       |    /* No flag bits for temporary stores */
   99|  3.58k|    return is_temporary_method_store(no_store, cbdata)
  ------------------
  |  Branch (99:12): [True: 0, False: 3.58k]
  ------------------
  100|  3.58k|        || ossl_provider_set_operation_bit(provider, operation_id);
  ------------------
  |  Branch (100:12): [True: 3.58k, False: 0]
  ------------------
  101|  3.58k|}

ossl_stored_namemap_new:
   62|    695|{
   63|    695|    OSSL_NAMEMAP *namemap = ossl_namemap_new(libctx);
   64|       |
   65|    695|    if (namemap != NULL)
  ------------------
  |  Branch (65:9): [True: 695, False: 0]
  ------------------
   66|    695|        namemap->stored = 1;
   67|       |
   68|    695|    return namemap;
   69|    695|}
ossl_stored_namemap_free:
   72|    695|{
   73|    695|    OSSL_NAMEMAP *namemap = vnamemap;
   74|       |
   75|    695|    if (namemap != NULL) {
  ------------------
  |  Branch (75:9): [True: 695, False: 0]
  ------------------
   76|       |        /* Pretend it isn't stored, or ossl_namemap_free() will do nothing */
   77|    695|        namemap->stored = 0;
   78|    695|        ossl_namemap_free(namemap);
   79|    695|    }
   80|    695|}
ossl_namemap_empty:
   88|  2.19M|{
   89|       |#ifdef TSAN_REQUIRES_LOCKING
   90|       |    /* No TSAN support */
   91|       |    int rv;
   92|       |
   93|       |    if (namemap == NULL)
   94|       |        return 1;
   95|       |
   96|       |    if (!CRYPTO_THREAD_read_lock(namemap->lock))
   97|       |        return -1;
   98|       |    rv = namemap->max_number == 0;
   99|       |    CRYPTO_THREAD_unlock(namemap->lock);
  100|       |    return rv;
  101|       |#else
  102|       |    /* Have TSAN support */
  103|  2.19M|    return namemap == NULL || tsan_load(&namemap->max_number) == 0;
  ------------------
  |  |   61|  2.19M|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (103:12): [True: 0, False: 2.19M]
  |  Branch (103:31): [True: 528, False: 2.19M]
  ------------------
  104|  2.19M|#endif
  105|  2.19M|}
ossl_namemap_doall_names:
  115|   299k|{
  116|   299k|    int i;
  117|   299k|    NAMES *names;
  118|       |
  119|   299k|    if (namemap == NULL || number <= 0)
  ------------------
  |  Branch (119:9): [True: 0, False: 299k]
  |  Branch (119:28): [True: 0, False: 299k]
  ------------------
  120|      0|        return 0;
  121|       |
  122|       |    /*
  123|       |     * We duplicate the NAMES stack under a read lock. Subsequently we call
  124|       |     * the user function, so that we're not holding the read lock when in user
  125|       |     * code. This could lead to deadlocks.
  126|       |     */
  127|   299k|    if (!CRYPTO_THREAD_read_lock(namemap->lock))
  ------------------
  |  Branch (127:9): [True: 0, False: 299k]
  ------------------
  128|      0|        return 0;
  129|       |
  130|   299k|    names = sk_NAMES_value(namemap->numnames, number - 1);
  131|   299k|    if (names != NULL)
  ------------------
  |  Branch (131:9): [True: 299k, False: 0]
  ------------------
  132|   299k|        names = sk_OPENSSL_STRING_dup(names);
  ------------------
  |  |  254|   299k|#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
  ------------------
  133|       |
  134|   299k|    CRYPTO_THREAD_unlock(namemap->lock);
  135|       |
  136|   299k|    if (names == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 299k]
  ------------------
  137|      0|        return 0;
  138|       |
  139|  1.24M|    for (i = 0; i < sk_OPENSSL_STRING_num(names); i++)
  ------------------
  |  |  232|  1.24M|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (139:17): [True: 943k, False: 299k]
  ------------------
  140|   943k|        fn(sk_OPENSSL_STRING_value(names, i), data);
  ------------------
  |  |  233|   943k|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  141|       |
  142|   299k|    sk_OPENSSL_STRING_free(names);
  ------------------
  |  |  238|   299k|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  143|   299k|    return i > 0;
  144|   299k|}
ossl_namemap_name2num:
  147|  2.59M|{
  148|  2.59M|    int number = 0;
  149|  2.59M|    HT_VALUE *val;
  150|  2.59M|    NAMENUM_KEY key;
  151|       |
  152|  2.59M|#ifndef FIPS_MODULE
  153|  2.59M|    if (namemap == NULL)
  ------------------
  |  Branch (153:9): [True: 0, False: 2.59M]
  ------------------
  154|      0|        namemap = ossl_namemap_stored(NULL);
  155|  2.59M|#endif
  156|       |
  157|  2.59M|    if (namemap == NULL)
  ------------------
  |  Branch (157:9): [True: 0, False: 2.59M]
  ------------------
  158|      0|        return 0;
  159|       |
  160|  2.59M|    HT_INIT_KEY(&key);
  ------------------
  |  |  110|  2.59M|    do {                                                                \
  |  |  111|  2.59M|        memset((key), 0, sizeof(*(key)));                               \
  |  |  112|  2.59M|        (key)->key_header.keysize = (sizeof(*(key)) - sizeof(HT_KEY));  \
  |  |  113|  2.59M|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY)); \
  |  |  114|  2.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (114:14): [Folded, False: 2.59M]
  |  |  ------------------
  ------------------
  161|  2.59M|    HT_SET_KEY_STRING_CASE(&key, name, name);
  ------------------
  |  |  143|  2.59M|    do {                                                                                      \
  |  |  144|  2.59M|        ossl_ht_strcase((key)->keyfields.member, value, sizeof((key)->keyfields.member) - 1); \
  |  |  145|  2.59M|    } while (0)
  |  |  ------------------
  |  |  |  Branch (145:14): [Folded, False: 2.59M]
  |  |  ------------------
  ------------------
  162|       |
  163|  2.59M|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  181|  2.59M|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  164|       |
  165|  2.59M|    if (val != NULL)
  ------------------
  |  Branch (165:9): [True: 2.08M, False: 509k]
  ------------------
  166|       |        /* We store a (small) int directly instead of a pointer to it. */
  167|  2.08M|        number = (int)(intptr_t)val->value;
  168|       |
  169|  2.59M|    return number;
  170|  2.59M|}
ossl_namemap_name2num_n:
  174|   165k|{
  175|   165k|    int number = 0;
  176|   165k|    HT_VALUE *val;
  177|   165k|    NAMENUM_KEY key;
  178|       |
  179|   165k|#ifndef FIPS_MODULE
  180|   165k|    if (namemap == NULL)
  ------------------
  |  Branch (180:9): [True: 0, False: 165k]
  ------------------
  181|      0|        namemap = ossl_namemap_stored(NULL);
  182|   165k|#endif
  183|       |
  184|   165k|    if (namemap == NULL)
  ------------------
  |  Branch (184:9): [True: 0, False: 165k]
  ------------------
  185|      0|        return 0;
  186|       |
  187|   165k|    HT_INIT_KEY(&key);
  ------------------
  |  |  110|   165k|    do {                                                                \
  |  |  111|   165k|        memset((key), 0, sizeof(*(key)));                               \
  |  |  112|   165k|        (key)->key_header.keysize = (sizeof(*(key)) - sizeof(HT_KEY));  \
  |  |  113|   165k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY)); \
  |  |  114|   165k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (114:14): [Folded, False: 165k]
  |  |  ------------------
  ------------------
  188|   165k|    HT_SET_KEY_STRING_CASE_N(&key, name, name, (int)name_len);
  ------------------
  |  |  162|   165k|    do {                                                                                          \
  |  |  163|   165k|        if ((size_t)len < sizeof((key)->keyfields.member))                                        \
  |  |  ------------------
  |  |  |  Branch (163:13): [True: 165k, False: 0]
  |  |  ------------------
  |  |  164|   165k|            ossl_ht_strcase((key)->keyfields.member, value, len);                                 \
  |  |  165|   165k|        else                                                                                      \
  |  |  166|   165k|            ossl_ht_strcase((key)->keyfields.member, value, sizeof((key)->keyfields.member) - 1); \
  |  |  167|   165k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (167:14): [Folded, False: 165k]
  |  |  ------------------
  ------------------
  189|       |
  190|   165k|    val = ossl_ht_get(namemap->namenum_ht, TO_HT_KEY(&key));
  ------------------
  |  |  181|   165k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  191|       |
  192|   165k|    if (val != NULL)
  ------------------
  |  Branch (192:9): [True: 142k, False: 23.0k]
  ------------------
  193|       |        /* We store a (small) int directly instead of a pointer to it. */
  194|   142k|        number = (int)(intptr_t)val->value;
  195|       |
  196|   165k|    return number;
  197|   165k|}
ossl_namemap_add_name:
  296|   344k|{
  297|   344k|    int tmp_number;
  298|       |
  299|   344k|#ifndef FIPS_MODULE
  300|   344k|    if (namemap == NULL)
  ------------------
  |  Branch (300:9): [True: 0, False: 344k]
  ------------------
  301|      0|        namemap = ossl_namemap_stored(NULL);
  302|   344k|#endif
  303|       |
  304|   344k|    if (name == NULL || *name == 0 || namemap == NULL)
  ------------------
  |  Branch (304:9): [True: 0, False: 344k]
  |  Branch (304:25): [True: 0, False: 344k]
  |  Branch (304:39): [True: 0, False: 344k]
  ------------------
  305|      0|        return 0;
  306|       |
  307|   344k|    if (!CRYPTO_THREAD_write_lock(namemap->lock))
  ------------------
  |  Branch (307:9): [True: 0, False: 344k]
  ------------------
  308|      0|        return 0;
  309|   344k|    tmp_number = namemap_add_name(namemap, number, name);
  310|   344k|    CRYPTO_THREAD_unlock(namemap->lock);
  311|   344k|    return tmp_number;
  312|   344k|}
ossl_namemap_add_names:
  316|   141k|{
  317|   141k|    char *tmp, *p, *q, *endp;
  318|       |
  319|       |    /* Check that we have a namemap */
  320|   141k|    if (!ossl_assert(namemap != NULL)) {
  ------------------
  |  |   52|   141k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   141k|    __FILE__, __LINE__)
  ------------------
  |  Branch (320:9): [True: 0, False: 141k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        return 0;
  323|      0|    }
  324|       |
  325|   141k|    if ((tmp = OPENSSL_strdup(names)) == NULL)
  ------------------
  |  |  135|   141k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (325:9): [True: 0, False: 141k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|   141k|    if (!CRYPTO_THREAD_write_lock(namemap->lock)) {
  ------------------
  |  Branch (328:9): [True: 0, False: 141k]
  ------------------
  329|      0|        OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|      0|        return 0;
  331|      0|    }
  332|       |    /*
  333|       |     * Check that no name is an empty string, and that all names have at
  334|       |     * most one numeric identity together.
  335|       |     */
  336|   470k|    for (p = tmp; *p != '\0'; p = q) {
  ------------------
  |  Branch (336:19): [True: 328k, False: 141k]
  ------------------
  337|   328k|        int this_number;
  338|   328k|        size_t l;
  339|       |
  340|   328k|        if ((q = strchr(p, separator)) == NULL) {
  ------------------
  |  Branch (340:13): [True: 141k, False: 187k]
  ------------------
  341|   141k|            l = strlen(p); /* offset to \0 */
  342|   141k|            q = p + l;
  343|   187k|        } else {
  344|   187k|            l = q - p; /* offset to the next separator */
  345|   187k|            *q++ = '\0';
  346|   187k|        }
  347|       |
  348|   328k|        if (*p == '\0') {
  ------------------
  |  Branch (348:13): [True: 0, False: 328k]
  ------------------
  349|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_BAD_ALGORITHM_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  350|      0|            number = 0;
  351|      0|            goto end;
  352|      0|        }
  353|       |
  354|   328k|        this_number = ossl_namemap_name2num(namemap, p);
  355|       |
  356|   328k|        if (number == 0) {
  ------------------
  |  Branch (356:13): [True: 230k, False: 98.2k]
  ------------------
  357|   230k|            number = this_number;
  358|   230k|        } else if (this_number != 0 && this_number != number) {
  ------------------
  |  Branch (358:20): [True: 85.0k, False: 13.2k]
  |  Branch (358:40): [True: 0, False: 85.0k]
  ------------------
  359|      0|            ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, CRYPTO_R_CONFLICTING_NAMES,
  ------------------
  |  |   23|      0|#define CRYPTO_R_CONFLICTING_NAMES 118
  ------------------
  360|      0|                "\"%s\" has an existing different identity %d (from \"%s\")",
  361|      0|                p, this_number, names);
  362|      0|            number = 0;
  363|      0|            goto end;
  364|      0|        }
  365|   328k|    }
  366|   141k|    endp = p;
  367|       |
  368|       |    /* Now that we have checked, register all names */
  369|   470k|    for (p = tmp; p < endp; p = q) {
  ------------------
  |  Branch (369:19): [True: 328k, False: 141k]
  ------------------
  370|   328k|        int this_number;
  371|       |
  372|   328k|        q = p + strlen(p) + 1;
  373|       |
  374|   328k|        this_number = namemap_add_name(namemap, number, p);
  375|   328k|        if (number == 0) {
  ------------------
  |  Branch (375:13): [True: 71.6k, False: 257k]
  ------------------
  376|  71.6k|            number = this_number;
  377|   257k|        } else if (this_number != number) {
  ------------------
  |  Branch (377:20): [True: 0, False: 257k]
  ------------------
  378|      0|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  379|      0|                "Got number %d when expecting %d",
  380|      0|                this_number, number);
  381|      0|            number = 0;
  382|      0|            goto end;
  383|      0|        }
  384|   328k|    }
  385|       |
  386|   141k|end:
  387|   141k|    CRYPTO_THREAD_unlock(namemap->lock);
  388|   141k|    OPENSSL_free(tmp);
  ------------------
  |  |  131|   141k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|   141k|    return number;
  390|   141k|}
ossl_namemap_stored:
  490|  2.19M|{
  491|  2.19M|#ifndef FIPS_MODULE
  492|  2.19M|    int nms;
  493|  2.19M|#endif
  494|  2.19M|    OSSL_NAMEMAP *namemap = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_NAMEMAP_INDEX);
  ------------------
  |  |  100|  2.19M|#define OSSL_LIB_CTX_NAMEMAP_INDEX 4
  ------------------
  495|       |
  496|  2.19M|    if (namemap == NULL)
  ------------------
  |  Branch (496:9): [True: 0, False: 2.19M]
  ------------------
  497|      0|        return NULL;
  498|       |
  499|  2.19M|#ifndef FIPS_MODULE
  500|  2.19M|    nms = ossl_namemap_empty(namemap);
  501|  2.19M|    if (nms < 0) {
  ------------------
  |  Branch (501:9): [True: 0, False: 2.19M]
  ------------------
  502|       |        /*
  503|       |         * Could not get lock to make the count, so maybe internal objects
  504|       |         * weren't added. This seems safest.
  505|       |         */
  506|      0|        return NULL;
  507|      0|    }
  508|  2.19M|    if (nms == 1) {
  ------------------
  |  Branch (508:9): [True: 528, False: 2.19M]
  ------------------
  509|    528|        int num;
  510|       |
  511|       |        /* Before pilfering, we make sure the legacy database is populated */
  512|    528|        OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  506|    528|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
  513|    528|                | OPENSSL_INIT_ADD_ALL_DIGESTS,
  ------------------
  |  |  507|    528|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  514|    528|            NULL);
  515|       |
  516|    528|        OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    528|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  517|    528|            get_legacy_cipher_names, namemap);
  518|    528|        OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|    528|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  519|    528|            get_legacy_md_names, namemap);
  520|       |
  521|       |        /*
  522|       |         * Some old providers (<= 3.5) may not have the rsassaPSS alias which
  523|       |         * may cause problems in some cases. We add it manually here
  524|       |         */
  525|    528|        num = ossl_namemap_add_name(namemap, 0, "RSA-PSS");
  526|    528|        if (num != 0) {
  ------------------
  |  Branch (526:13): [True: 528, False: 0]
  ------------------
  527|    528|            ossl_namemap_add_name(namemap, num, "rsassaPss");
  528|       |            /* Add other RSA-PSS aliases as well */
  529|    528|            ossl_namemap_add_name(namemap, num, "RSASSA-PSS");
  530|    528|            ossl_namemap_add_name(namemap, num, "1.2.840.113549.1.1.10");
  531|    528|        }
  532|    528|#ifndef OPENSSL_NO_DEPRECATED_3_6
  533|    528|        {
  534|    528|            int i, end;
  535|       |
  536|       |            /* We also pilfer data from the legacy EVP_PKEY_ASN1_METHODs */
  537|  8.44k|            for (i = 0, end = EVP_PKEY_asn1_get_count(); i < end; i++)
  ------------------
  |  Branch (537:58): [True: 7.92k, False: 528]
  ------------------
  538|  7.92k|                get_legacy_pkey_meth_names(EVP_PKEY_asn1_get0(i), namemap);
  539|    528|        }
  540|    528|#endif
  541|    528|    }
  542|  2.19M|#endif
  543|       |
  544|  2.19M|    return namemap;
  545|  2.19M|}
ossl_namemap_new:
  548|    695|{
  549|    695|    OSSL_NAMEMAP *namemap;
  550|    695|    HT_CONFIG htconf = { NULL, NULL, NULL, NAMEMAP_HT_BUCKETS, 1, 1 };
  ------------------
  |  |   22|    695|#define NAMEMAP_HT_BUCKETS 512
  ------------------
  551|       |
  552|    695|    htconf.ctx = libctx;
  553|       |
  554|    695|    if ((namemap = OPENSSL_zalloc(sizeof(*namemap))) == NULL)
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (554:9): [True: 0, False: 695]
  ------------------
  555|      0|        goto err;
  556|       |
  557|    695|    if ((namemap->lock = CRYPTO_THREAD_lock_new()) == NULL)
  ------------------
  |  Branch (557:9): [True: 0, False: 695]
  ------------------
  558|      0|        goto err;
  559|       |
  560|    695|    if ((namemap->namenum_ht = ossl_ht_new(&htconf)) == NULL)
  ------------------
  |  Branch (560:9): [True: 0, False: 695]
  ------------------
  561|      0|        goto err;
  562|       |
  563|    695|    if ((namemap->numnames = sk_NAMES_new_null()) == NULL)
  ------------------
  |  Branch (563:9): [True: 0, False: 695]
  ------------------
  564|      0|        goto err;
  565|       |
  566|    695|    return namemap;
  567|       |
  568|      0|err:
  569|      0|    ossl_namemap_free(namemap);
  570|       |    return NULL;
  571|    695|}
ossl_namemap_free:
  574|    695|{
  575|    695|    if (namemap == NULL || namemap->stored)
  ------------------
  |  Branch (575:9): [True: 0, False: 695]
  |  Branch (575:28): [True: 0, False: 695]
  ------------------
  576|      0|        return;
  577|       |
  578|    695|    sk_NAMES_pop_free(namemap->numnames, names_free);
  579|       |
  580|    695|    ossl_ht_free(namemap->namenum_ht);
  581|       |
  582|    695|    CRYPTO_THREAD_lock_free(namemap->lock);
  583|    695|    OPENSSL_free(namemap);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  584|    695|}
core_namemap.c:namemap_add_name:
  264|   673k|{
  265|   673k|    int ret;
  266|   673k|    HT_VALUE val = { 0 };
  267|   673k|    NAMENUM_KEY key;
  268|       |
  269|       |    /* If it already exists, we don't add it */
  270|   673k|    if ((ret = ossl_namemap_name2num(namemap, name)) != 0)
  ------------------
  |  Branch (270:9): [True: 362k, False: 310k]
  ------------------
  271|   362k|        return ret;
  272|       |
  273|   310k|    if ((number = numname_insert(namemap, number, name)) == 0)
  ------------------
  |  Branch (273:9): [True: 0, False: 310k]
  ------------------
  274|      0|        return 0;
  275|       |
  276|       |    /* Using tsan_store alone here is safe since we're under lock */
  277|   310k|    tsan_store(&namemap->max_number, number);
  ------------------
  |  |   62|   310k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  278|       |
  279|   310k|    HT_INIT_KEY(&key);
  ------------------
  |  |  110|   310k|    do {                                                                \
  |  |  111|   310k|        memset((key), 0, sizeof(*(key)));                               \
  |  |  112|   310k|        (key)->key_header.keysize = (sizeof(*(key)) - sizeof(HT_KEY));  \
  |  |  113|   310k|        (key)->key_header.keybuf = (((uint8_t *)key) + sizeof(HT_KEY)); \
  |  |  114|   310k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (114:14): [Folded, False: 310k]
  |  |  ------------------
  ------------------
  280|   310k|    HT_SET_KEY_STRING_CASE(&key, name, name);
  ------------------
  |  |  143|   310k|    do {                                                                                      \
  |  |  144|   310k|        ossl_ht_strcase((key)->keyfields.member, value, sizeof((key)->keyfields.member) - 1); \
  |  |  145|   310k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (145:14): [Folded, False: 310k]
  |  |  ------------------
  ------------------
  281|   310k|    val.value = (void *)(intptr_t)number;
  282|   310k|    ret = ossl_ht_insert(namemap->namenum_ht, TO_HT_KEY(&key), &val, NULL);
  ------------------
  |  |  181|   310k|#define TO_HT_KEY(key) &(key)->key_header
  ------------------
  283|   310k|    if (ret <= 0) {
  ------------------
  |  Branch (283:9): [True: 0, False: 310k]
  ------------------
  284|       |        /*
  285|       |         * We either got an allocation failure (INTERNAL_ERROR), or
  286|       |         * hit too many conflicts in the table (TOO_MANY_NAMES)
  287|       |         */
  288|      0|        ERR_raise(ERR_LIB_CRYPTO, (ret < 0) ? CRYPTO_R_TOO_MANY_NAMES : ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  |  |  |  Branch (404:55): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|        return 0;
  290|      0|    }
  291|   310k|    return number;
  292|   310k|}
core_namemap.c:numname_insert:
  223|   310k|{
  224|   310k|    NAMES *names;
  225|   310k|    char *tmpname;
  226|       |
  227|   310k|    if (number > 0) {
  ------------------
  |  Branch (227:9): [True: 176k, False: 133k]
  ------------------
  228|   176k|        names = sk_NAMES_value(namemap->numnames, number - 1);
  229|   176k|        if (!ossl_assert(names != NULL)) {
  ------------------
  |  |   52|   176k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   176k|    __FILE__, __LINE__)
  ------------------
  |  Branch (229:13): [True: 0, False: 176k]
  ------------------
  230|       |            /* cannot happen */
  231|      0|            return 0;
  232|      0|        }
  233|   176k|    } else {
  234|       |        /* a completely new entry */
  235|   133k|        names = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  235|   133k|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_null())
  ------------------
  236|   133k|        if (names == NULL)
  ------------------
  |  Branch (236:13): [True: 0, False: 133k]
  ------------------
  237|      0|            return 0;
  238|   133k|    }
  239|       |
  240|   310k|    if ((tmpname = OPENSSL_strdup(name)) == NULL)
  ------------------
  |  |  135|   310k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (240:9): [True: 0, False: 310k]
  ------------------
  241|      0|        goto err;
  242|       |
  243|   310k|    if (!sk_OPENSSL_STRING_push(names, tmpname))
  ------------------
  |  |  242|   310k|#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
  ------------------
  |  Branch (243:9): [True: 0, False: 310k]
  ------------------
  244|      0|        goto err;
  245|   310k|    tmpname = NULL;
  246|       |
  247|   310k|    if (number <= 0) {
  ------------------
  |  Branch (247:9): [True: 133k, False: 176k]
  ------------------
  248|   133k|        if (!sk_NAMES_push(namemap->numnames, names))
  ------------------
  |  Branch (248:13): [True: 0, False: 133k]
  ------------------
  249|      0|            goto err;
  250|   133k|        number = sk_NAMES_num(namemap->numnames);
  251|   133k|    }
  252|   310k|    return number;
  253|       |
  254|      0|err:
  255|      0|    if (number <= 0)
  ------------------
  |  Branch (255:9): [True: 0, False: 0]
  ------------------
  256|      0|        sk_OPENSSL_STRING_pop_free(names, name_string_free);
  ------------------
  |  |  246|      0|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
  257|      0|    OPENSSL_free(tmpname);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|      0|    return 0;
  259|   310k|}
core_namemap.c:name_string_free:
   50|   310k|{
   51|   310k|    OPENSSL_free(name);
  ------------------
  |  |  131|   310k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   52|   310k|}
core_namemap.c:get_legacy_cipher_names:
  427|  96.6k|{
  428|  96.6k|    const EVP_CIPHER *cipher = (void *)OBJ_NAME_get(on->name, on->type);
  429|       |
  430|  96.6k|    if (cipher != NULL)
  ------------------
  |  Branch (430:9): [True: 96.6k, False: 0]
  ------------------
  431|  96.6k|        get_legacy_evp_names(NID_undef, EVP_CIPHER_get_type(cipher), NULL, arg);
  ------------------
  |  |   18|  96.6k|#define NID_undef                       0
  ------------------
  432|  96.6k|}
core_namemap.c:get_legacy_evp_names:
  403|   136k|{
  404|   136k|    int num = 0;
  405|   136k|    ASN1_OBJECT *obj;
  406|       |
  407|   136k|    if (base_nid != NID_undef) {
  ------------------
  |  |   18|   136k|#define NID_undef                       0
  ------------------
  |  Branch (407:9): [True: 2.11k, False: 134k]
  ------------------
  408|  2.11k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(base_nid));
  409|  2.11k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(base_nid));
  410|  2.11k|    }
  411|       |
  412|   136k|    if (nid != NID_undef) {
  ------------------
  |  |   18|   136k|#define NID_undef                       0
  ------------------
  |  Branch (412:9): [True: 110k, False: 25.3k]
  ------------------
  413|   110k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2sn(nid));
  414|   110k|        num = ossl_namemap_add_name(arg, num, OBJ_nid2ln(nid));
  415|   110k|        if ((obj = OBJ_nid2obj(nid)) != NULL) {
  ------------------
  |  Branch (415:13): [True: 110k, False: 0]
  ------------------
  416|   110k|            char txtoid[OSSL_MAX_NAME_SIZE];
  417|       |
  418|   110k|            if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0)
  ------------------
  |  Branch (418:17): [True: 110k, False: 528]
  ------------------
  419|   110k|                num = ossl_namemap_add_name(arg, num, txtoid);
  420|   110k|        }
  421|   110k|    }
  422|   136k|    if (pem_name != NULL)
  ------------------
  |  Branch (422:9): [True: 5.80k, False: 130k]
  ------------------
  423|  5.80k|        num = ossl_namemap_add_name(arg, num, pem_name);
  424|   136k|}
core_namemap.c:get_legacy_md_names:
  435|  31.1k|{
  436|  31.1k|    const EVP_MD *md = (void *)OBJ_NAME_get(on->name, on->type);
  437|       |
  438|  31.1k|    if (md != NULL)
  ------------------
  |  Branch (438:9): [True: 31.1k, False: 0]
  ------------------
  439|  31.1k|        get_legacy_evp_names(0, EVP_MD_get_type(md), NULL, arg);
  440|  31.1k|}
core_namemap.c:get_legacy_pkey_meth_names:
  445|  7.92k|{
  446|  7.92k|    int nid = 0, base_nid = 0, flags = 0;
  447|  7.92k|    const char *pem_name = NULL;
  448|       |
  449|  7.92k|    EVP_PKEY_asn1_get0_info(&nid, &base_nid, &flags, NULL, &pem_name, ameth);
  450|  7.92k|    if (nid != NID_undef) {
  ------------------
  |  |   18|  7.92k|#define NID_undef                       0
  ------------------
  |  Branch (450:9): [True: 7.92k, False: 0]
  ------------------
  451|  7.92k|        if ((flags & ASN1_PKEY_ALIAS) == 0) {
  ------------------
  |  | 1603|  7.92k|#define ASN1_PKEY_ALIAS 0x1
  ------------------
  |  Branch (451:13): [True: 5.28k, False: 2.64k]
  ------------------
  452|  5.28k|            switch (nid) {
  453|    528|            case EVP_PKEY_DHX:
  ------------------
  |  |   72|    528|#define EVP_PKEY_DHX NID_dhpublicnumber
  |  |  ------------------
  |  |  |  | 5522|    528|#define NID_dhpublicnumber              920
  |  |  ------------------
  ------------------
  |  Branch (453:13): [True: 528, False: 4.75k]
  ------------------
  454|       |                /* We know that the name "DHX" is used too */
  455|    528|                get_legacy_evp_names(0, nid, "DHX", arg);
  456|       |                /* FALLTHRU */
  457|  5.28k|            default:
  ------------------
  |  Branch (457:13): [True: 4.75k, False: 528]
  ------------------
  458|  5.28k|                get_legacy_evp_names(0, nid, pem_name, arg);
  459|  5.28k|            }
  460|  5.28k|        } else {
  461|       |            /*
  462|       |             * Treat aliases carefully, some of them are undesirable, or
  463|       |             * should not be treated as such for providers.
  464|       |             */
  465|       |
  466|  2.64k|            switch (nid) {
  467|    528|            case EVP_PKEY_SM2:
  ------------------
  |  |   74|    528|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|    528|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (467:13): [True: 528, False: 2.11k]
  ------------------
  468|       |                /*
  469|       |                 * SM2 is a separate keytype with providers, not an alias for
  470|       |                 * EC.
  471|       |                 */
  472|    528|                get_legacy_evp_names(0, nid, pem_name, arg);
  473|    528|                break;
  474|  2.11k|            default:
  ------------------
  |  Branch (474:13): [True: 2.11k, False: 528]
  ------------------
  475|       |                /* Use the short name of the base nid as the common reference */
  476|  2.11k|                get_legacy_evp_names(base_nid, nid, pem_name, arg);
  477|  2.64k|            }
  478|  2.64k|        }
  479|  7.92k|    }
  480|  7.92k|}
core_namemap.c:names_free:
   55|   133k|{
   56|   133k|    sk_OPENSSL_STRING_pop_free(n, name_string_free);
  ------------------
  |  |  246|   133k|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
   57|   133k|}

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

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

ossl_err_load_CRMF_strings:
   78|      1|{
   79|      1|#ifndef OPENSSL_NO_ERR
   80|      1|    if (ERR_reason_error_string(CRMF_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (80:9): [True: 1, False: 0]
  ------------------
   81|      1|        ERR_load_strings_const(CRMF_str_reasons);
   82|      1|#endif
   83|      1|    return 1;
   84|      1|}

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

CTLOG_STORE_new_ex:
  101|  2.09k|{
  102|  2.09k|    CTLOG_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.09k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|       |
  104|  2.09k|    if (ret == NULL)
  ------------------
  |  Branch (104:9): [True: 0, False: 2.09k]
  ------------------
  105|      0|        return NULL;
  106|       |
  107|  2.09k|    ret->libctx = libctx;
  108|  2.09k|    if (propq != NULL) {
  ------------------
  |  Branch (108:9): [True: 520, False: 1.57k]
  ------------------
  109|    520|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|    520|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|    520|        if (ret->propq == NULL)
  ------------------
  |  Branch (110:13): [True: 0, False: 520]
  ------------------
  111|      0|            goto err;
  112|    520|    }
  113|       |
  114|  2.09k|    ret->logs = sk_CTLOG_new_null();
  ------------------
  |  |   74|  2.09k|#define sk_CTLOG_new_null() ((STACK_OF(CTLOG) *)OPENSSL_sk_new_null())
  ------------------
  115|  2.09k|    if (ret->logs == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 2.09k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_CT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|       |
  120|  2.09k|    return ret;
  121|      0|err:
  122|      0|    CTLOG_STORE_free(ret);
  123|       |    return NULL;
  124|  2.09k|}
CTLOG_STORE_free:
  132|  2.09k|{
  133|  2.09k|    if (store != NULL) {
  ------------------
  |  Branch (133:9): [True: 2.09k, False: 0]
  ------------------
  134|  2.09k|        OPENSSL_free(store->propq);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  135|  2.09k|        sk_CTLOG_pop_free(store->logs, CTLOG_free);
  ------------------
  |  |   85|  2.09k|#define sk_CTLOG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_freefunc_type(freefunc))
  ------------------
  136|  2.09k|        OPENSSL_free(store);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|  2.09k|    }
  138|  2.09k|}

SCT_LIST_free:
   47|  1.31k|{
   48|  1.31k|    sk_SCT_pop_free(a, SCT_free);
  ------------------
  |  |   59|  1.31k|#define sk_SCT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SCT_sk_type(sk), ossl_check_SCT_freefunc_type(freefunc))
  ------------------
   49|  1.31k|}

ossl_ctype_check:
  253|  35.1M|{
  254|  35.1M|    const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);
  255|  35.1M|    const int a = ossl_toascii(c);
  ------------------
  |  |   56|  35.1M|#define ossl_toascii(c) (c)
  ------------------
  256|       |
  257|  35.1M|    return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
  ------------------
  |  Branch (257:12): [True: 35.1M, False: 7.01k]
  |  Branch (257:22): [True: 35.1M, False: 0]
  |  Branch (257:33): [True: 7.12M, False: 27.9M]
  ------------------
  258|  35.1M|}
ossl_isdigit:
  270|  2.20M|{
  271|  2.20M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|  2.20M|#define ossl_toascii(c) (c)
  ------------------
  272|       |
  273|  2.20M|    return ASCII_IS_DIGIT(a);
  ------------------
  |  |  265|  2.20M|#define ASCII_IS_DIGIT(c) (c >= 0x30 && c <= 0x39)
  |  |  ------------------
  |  |  |  Branch (265:28): [True: 2.11M, False: 92.3k]
  |  |  |  Branch (265:41): [True: 1.15M, False: 957k]
  |  |  ------------------
  ------------------
  274|  2.20M|}
ossl_tolower:
  297|  72.0M|{
  298|  72.0M|    int a = ossl_toascii(c);
  ------------------
  |  |   56|  72.0M|#define ossl_toascii(c) (c)
  ------------------
  299|       |
  300|  72.0M|    return ASCII_IS_UPPER(a) ? c ^ case_change : c;
  ------------------
  |  |  266|  72.0M|#define ASCII_IS_UPPER(c) (c >= 0x41 && c <= 0x5A)
  |  |  ------------------
  |  |  |  Branch (266:28): [True: 62.5M, False: 9.48M]
  |  |  |  Branch (266:41): [True: 19.0M, False: 43.4M]
  |  |  ------------------
  ------------------
  301|  72.0M|}

OpenSSL_version:
   80|  3.52k|{
   81|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
   82|       |    /* Cannot really fail but we would return empty strings anyway */
   83|       |    (void)RUN_ONCE(&version_strings_once, version_strings_setup);
   84|       |#endif
   85|       |
   86|  3.52k|    switch (t) {
  ------------------
  |  Branch (86:13): [True: 3.52k, False: 0]
  ------------------
   87|      0|    case OPENSSL_VERSION:
  ------------------
  |  |  183|      0|#define OPENSSL_VERSION 0
  ------------------
  |  Branch (87:5): [True: 0, False: 3.52k]
  ------------------
   88|      0|        return OPENSSL_VERSION_TEXT;
  ------------------
  |  |  110|      0|# define OPENSSL_VERSION_TEXT "OpenSSL 3.6.2 7 Apr 2026"
  ------------------
   89|  3.52k|    case OPENSSL_VERSION_STRING:
  ------------------
  |  |  189|  3.52k|#define OPENSSL_VERSION_STRING 6
  ------------------
  |  Branch (89:5): [True: 3.52k, False: 0]
  ------------------
   90|  3.52k|        return OPENSSL_VERSION_STR;
  ------------------
  |  |   90|  3.52k|# define OPENSSL_VERSION_STR "3.6.2"
  ------------------
   91|      0|    case OPENSSL_FULL_VERSION_STRING:
  ------------------
  |  |  190|      0|#define OPENSSL_FULL_VERSION_STRING 7
  ------------------
  |  Branch (91:5): [True: 0, False: 3.52k]
  ------------------
   92|      0|        return OPENSSL_FULL_VERSION_STR;
  ------------------
  |  |   93|      0|# define OPENSSL_FULL_VERSION_STR "3.6.2"
  ------------------
   93|      0|    case OPENSSL_BUILT_ON:
  ------------------
  |  |  185|      0|#define OPENSSL_BUILT_ON 2
  ------------------
  |  Branch (93:5): [True: 0, False: 3.52k]
  ------------------
   94|      0|        return DATE;
  ------------------
  |  |   14|      0|#define DATE "built on: Sat May 30 06:02:09 2026 UTC"
  ------------------
   95|      0|    case OPENSSL_CFLAGS:
  ------------------
  |  |  184|      0|#define OPENSSL_CFLAGS 1
  ------------------
  |  Branch (95:5): [True: 0, False: 3.52k]
  ------------------
   96|      0|        return compiler_flags;
   97|      0|    case OPENSSL_PLATFORM:
  ------------------
  |  |  186|      0|#define OPENSSL_PLATFORM 3
  ------------------
  |  Branch (97:5): [True: 0, False: 3.52k]
  ------------------
   98|      0|        return PLATFORM;
  ------------------
  |  |   13|      0|#define PLATFORM "platform: linux-x86_64-clang"
  ------------------
   99|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  100|       |    case OPENSSL_DIR:
  101|       |        return openssldir;
  102|       |    case OPENSSL_ENGINES_DIR:
  103|       |        return enginesdir;
  104|       |    case OPENSSL_MODULES_DIR:
  105|       |        return modulesdir;
  106|       |#else
  107|      0|    case OPENSSL_DIR:
  ------------------
  |  |  187|      0|#define OPENSSL_DIR 4
  ------------------
  |  Branch (107:5): [True: 0, False: 3.52k]
  ------------------
  108|      0|#ifdef OPENSSLDIR
  109|      0|        return "OPENSSLDIR: \"" OPENSSLDIR "\"";
  110|       |#else
  111|       |        return "OPENSSLDIR: N/A";
  112|       |#endif
  113|      0|    case OPENSSL_ENGINES_DIR:
  ------------------
  |  |  188|      0|#define OPENSSL_ENGINES_DIR 5
  ------------------
  |  Branch (113:5): [True: 0, False: 3.52k]
  ------------------
  114|      0|#ifdef ENGINESDIR
  115|      0|        return "ENGINESDIR: \"" ENGINESDIR "\"";
  116|       |#else
  117|       |        return "ENGINESDIR: N/A";
  118|       |#endif
  119|      0|    case OPENSSL_MODULES_DIR:
  ------------------
  |  |  191|      0|#define OPENSSL_MODULES_DIR 8
  ------------------
  |  Branch (119:5): [True: 0, False: 3.52k]
  ------------------
  120|      0|#ifdef MODULESDIR
  121|      0|        return "MODULESDIR: \"" MODULESDIR "\"";
  122|       |#else
  123|       |        return "MODULESDIR: N/A";
  124|       |#endif
  125|      0|#endif
  126|      0|    case OPENSSL_CPU_INFO:
  ------------------
  |  |  192|      0|#define OPENSSL_CPU_INFO 9
  ------------------
  |  Branch (126:5): [True: 0, False: 3.52k]
  ------------------
  127|      0|        if (OPENSSL_info(OPENSSL_INFO_CPU_SETTINGS) != NULL)
  ------------------
  |  |  207|      0|#define OPENSSL_INFO_CPU_SETTINGS 1008
  ------------------
  |  Branch (127:13): [True: 0, False: 0]
  ------------------
  128|      0|            return ossl_cpu_info_str;
  129|      0|        else
  130|      0|            return "CPUINFO: N/A";
  131|      0|    case OPENSSL_WINCTX:
  ------------------
  |  |  193|      0|#define OPENSSL_WINCTX 10
  ------------------
  |  Branch (131:5): [True: 0, False: 3.52k]
  ------------------
  132|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  133|       |        return OSSL_WINCTX_STRING;
  134|       |#else
  135|      0|        return "OSSL_WINCTX: Undefined";
  136|  3.52k|#endif
  137|  3.52k|    }
  138|      0|    return "not available";
  139|  3.52k|}

ossl_get_enginesdir:
  168|    724|{
  169|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  170|       |    if (!RUN_ONCE(&defaults_setup_init, do_defaults_setup))
  171|       |        return NULL;
  172|       |    return (const char *)enginesdirptr;
  173|       |#else
  174|    724|    return ENGINESDIR;
  175|    724|#endif
  176|    724|}
ossl_get_modulesdir:
  184|    155|{
  185|       |#if defined(_WIN32) && defined(OSSL_WINCTX)
  186|       |    if (!RUN_ONCE(&defaults_setup_init, do_defaults_setup))
  187|       |        return NULL;
  188|       |    return (const char *)modulesdirptr;
  189|       |#else
  190|    155|    return MODULESDIR;
  191|    155|#endif
  192|    155|}

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

dsa_ameth.c:int_dsa_free:
  267|  2.06k|{
  268|  2.06k|    DSA_free(pkey->pkey.dsa);
  269|  2.06k|}

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

DSA_free:
  213|  2.06k|{
  214|  2.06k|    int i;
  215|       |
  216|  2.06k|    if (r == NULL)
  ------------------
  |  Branch (216:9): [True: 2.06k, False: 0]
  ------------------
  217|  2.06k|        return;
  218|       |
  219|      0|    CRYPTO_DOWN_REF(&r->references, &i);
  220|      0|    REF_PRINT_COUNT("DSA", i, r);
  ------------------
  |  |  301|      0|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|      0|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  221|      0|    if (i > 0)
  ------------------
  |  Branch (221:9): [True: 0, False: 0]
  ------------------
  222|      0|        return;
  223|      0|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|      0|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  224|       |
  225|      0|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (225:9): [True: 0, False: 0]
  |  Branch (225:28): [True: 0, False: 0]
  ------------------
  226|      0|        r->meth->finish(r);
  227|      0|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_ENGINE)
  228|      0|    ENGINE_finish(r->engine);
  229|      0|#endif
  230|       |
  231|      0|#ifndef FIPS_MODULE
  232|      0|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);
  ------------------
  |  |  257|      0|#define CRYPTO_EX_INDEX_DSA 7
  ------------------
  233|      0|#endif
  234|       |
  235|      0|    CRYPTO_THREAD_lock_free(r->lock);
  236|      0|    CRYPTO_FREE_REF(&r->references);
  237|       |
  238|      0|    ossl_ffc_params_cleanup(&r->params);
  239|      0|    BN_clear_free(r->pub_key);
  240|      0|    BN_clear_free(r->priv_key);
  241|      0|    OPENSSL_free(r);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|      0|}

DSO_METHOD_openssl:
   62|    879|{
   63|    879|    return &dso_meth_dlfcn;
   64|    879|}
dso_dlfcn.c:dlfcn_load:
   94|    879|{
   95|    879|    void *ptr = NULL;
   96|       |    /* See applicable comments in dso_dl.c */
   97|    879|    char *filename = DSO_convert_filename(dso, NULL);
   98|    879|    int flags = DLOPEN_FLAG;
  ------------------
  |  |   85|    879|#define DLOPEN_FLAG RTLD_NOW /* Hope this works everywhere else */
  ------------------
   99|    879|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|    879|#define get_last_sys_error() errno
  ------------------
  100|       |
  101|    879|    if (filename == NULL) {
  ------------------
  |  Branch (101:9): [True: 0, False: 879]
  ------------------
  102|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  103|      0|        goto err;
  104|      0|    }
  105|    879|#ifdef RTLD_GLOBAL
  106|    879|    if (dso->flags & DSO_FLAG_GLOBAL_SYMBOLS)
  ------------------
  |  |   53|    879|#define DSO_FLAG_GLOBAL_SYMBOLS 0x20
  ------------------
  |  Branch (106:9): [True: 0, False: 879]
  ------------------
  107|      0|        flags |= RTLD_GLOBAL;
  108|    879|#endif
  109|       |#ifdef _AIX
  110|       |    if (filename[strlen(filename) - 1] == ')')
  111|       |        flags |= RTLD_MEMBER;
  112|       |#endif
  113|    879|    ptr = dlopen(filename, flags);
  114|    879|    if (ptr == NULL) {
  ------------------
  |  Branch (114:9): [True: 879, False: 0]
  ------------------
  115|    879|        ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |  406|    879|    (ERR_new(),                                                  \
  |  |  407|    879|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    879|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    879|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |  100|    879|#define ERR_LIB_DSO 37
  ------------------
                      ERR_raise_data(ERR_LIB_DSO, DSO_R_LOAD_FAILED,
  ------------------
  |  |   34|    879|#define DSO_R_LOAD_FAILED 103
  ------------------
  116|    879|            "filename(%s): %s", filename, dlerror());
  117|    879|        goto err;
  118|    879|    }
  119|       |    /*
  120|       |     * Some dlopen() implementations (e.g. solaris) do no preserve errno, even
  121|       |     * on a successful call.
  122|       |     */
  123|    879|    set_sys_error(saveerrno);
  ------------------
  |  |   32|    879|#define set_sys_error(e) errno = (e)
  ------------------
  124|      0|    if (!sk_void_push(dso->meth_data, (char *)ptr)) {
  ------------------
  |  |  229|      0|#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
  ------------------
  |  Branch (124:9): [True: 0, False: 0]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_STACK_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|       |    /* Success */
  129|      0|    dso->loaded_filename = filename;
  130|      0|    return 1;
  131|    879|err:
  132|       |    /* Cleanup! */
  133|    879|    OPENSSL_free(filename);
  ------------------
  |  |  131|    879|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  134|    879|    if (ptr != NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 879]
  ------------------
  135|      0|        dlclose(ptr);
  136|    879|    return 0;
  137|      0|}
dso_dlfcn.c:dlfcn_unload:
  140|    879|{
  141|    879|    void *ptr;
  142|    879|    if (dso == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 879]
  ------------------
  143|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|        return 0;
  145|      0|    }
  146|    879|    if (sk_void_num(dso->meth_data) < 1)
  ------------------
  |  |  219|    879|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (146:9): [True: 879, False: 0]
  ------------------
  147|    879|        return 1;
  148|      0|    ptr = sk_void_pop(dso->meth_data);
  ------------------
  |  |  231|      0|#define sk_void_pop(sk) ((void *)OPENSSL_sk_pop(ossl_check_void_sk_type(sk)))
  ------------------
  149|      0|    if (ptr == NULL) {
  ------------------
  |  Branch (149:9): [True: 0, False: 0]
  ------------------
  150|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NULL_HANDLE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|       |        /*
  152|       |         * Should push the value back onto the stack in case of a retry.
  153|       |         */
  154|      0|        sk_void_push(dso->meth_data, ptr);
  ------------------
  |  |  229|      0|#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
  ------------------
  155|      0|        return 0;
  156|      0|    }
  157|       |    /* For now I'm not aware of any errors associated with dlclose() */
  158|      0|    dlclose(ptr);
  159|      0|    return 1;
  160|      0|}
dso_dlfcn.c:dlfcn_name_converter:
  245|  1.75k|{
  246|  1.75k|    char *translated;
  247|  1.75k|    int len, rsize, transform;
  248|       |
  249|  1.75k|    len = strlen(filename);
  250|  1.75k|    rsize = len + 1;
  251|  1.75k|    transform = (strchr(filename, '/') == NULL);
  252|  1.75k|    if (transform) {
  ------------------
  |  Branch (252:9): [True: 719, False: 1.03k]
  ------------------
  253|       |        /* We will convert this to "%s.so" or "lib%s.so" etc */
  254|    719|        rsize += strlen(DSO_EXTENSION); /* The length of ".so" */
  ------------------
  |  |   23|    719|# define DSO_EXTENSION ".so"
  ------------------
  255|    719|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|    719|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (255:13): [True: 0, False: 719]
  ------------------
  256|      0|            rsize += 3; /* The length of "lib" */
  257|    719|    }
  258|  1.75k|    translated = OPENSSL_malloc(rsize);
  ------------------
  |  |  106|  1.75k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  259|  1.75k|    if (translated == NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 1.75k]
  ------------------
  260|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NAME_TRANSLATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  261|      0|        return NULL;
  262|      0|    }
  263|  1.75k|    if (transform) {
  ------------------
  |  Branch (263:9): [True: 719, False: 1.03k]
  ------------------
  264|    719|        if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
  ------------------
  |  |   41|    719|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  |  Branch (264:13): [True: 0, False: 719]
  ------------------
  265|      0|            BIO_snprintf(translated, rsize, "lib%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|      0|# define DSO_EXTENSION ".so"
  ------------------
  266|    719|        else
  267|    719|            BIO_snprintf(translated, rsize, "%s" DSO_EXTENSION, filename);
  ------------------
  |  |   23|    719|# define DSO_EXTENSION ".so"
  ------------------
  268|  1.03k|    } else {
  269|  1.03k|        BIO_snprintf(translated, rsize, "%s", filename);
  270|  1.03k|    }
  271|  1.75k|    return translated;
  272|  1.75k|}
dso_dlfcn.c:dlfcn_merger:
  194|    879|{
  195|    879|    char *merged;
  196|       |
  197|    879|    if (!filespec1 && !filespec2) {
  ------------------
  |  Branch (197:9): [True: 0, False: 879]
  |  Branch (197:23): [True: 0, False: 0]
  ------------------
  198|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|        return NULL;
  200|      0|    }
  201|       |    /*
  202|       |     * If the first file specification is a rooted path, it rules. same goes
  203|       |     * if the second file specification is missing.
  204|       |     */
  205|    879|    if (!filespec2 || (filespec1 != NULL && filespec1[0] == '/')) {
  ------------------
  |  Branch (205:9): [True: 0, False: 879]
  |  Branch (205:24): [True: 879, False: 0]
  |  Branch (205:45): [True: 7, False: 872]
  ------------------
  206|      7|        merged = OPENSSL_strdup(filespec1);
  ------------------
  |  |  135|      7|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  207|      7|        if (merged == NULL)
  ------------------
  |  Branch (207:13): [True: 0, False: 7]
  ------------------
  208|      0|            return NULL;
  209|      7|    }
  210|       |    /*
  211|       |     * If the first file specification is missing, the second one rules.
  212|       |     */
  213|    872|    else if (!filespec1) {
  ------------------
  |  Branch (213:14): [True: 0, False: 872]
  ------------------
  214|      0|        merged = OPENSSL_strdup(filespec2);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  215|      0|        if (merged == NULL)
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            return NULL;
  217|    872|    } else {
  218|       |        /*
  219|       |         * This part isn't as trivial as it looks.  It assumes that the
  220|       |         * second file specification really is a directory, and makes no
  221|       |         * checks whatsoever.  Therefore, the result becomes the
  222|       |         * concatenation of filespec2 followed by a slash followed by
  223|       |         * filespec1.
  224|       |         */
  225|    872|        int spec2len, len;
  226|       |
  227|    872|        spec2len = strlen(filespec2);
  228|    872|        len = spec2len + strlen(filespec1);
  229|       |
  230|    872|        if (spec2len && filespec2[spec2len - 1] == '/') {
  ------------------
  |  Branch (230:13): [True: 872, False: 0]
  |  Branch (230:25): [True: 0, False: 872]
  ------------------
  231|      0|            spec2len--;
  232|      0|            len--;
  233|      0|        }
  234|    872|        merged = OPENSSL_malloc(len + 2);
  ------------------
  |  |  106|    872|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  235|    872|        if (merged == NULL)
  ------------------
  |  Branch (235:13): [True: 0, False: 872]
  ------------------
  236|      0|            return NULL;
  237|    872|        strcpy(merged, filespec2);
  238|    872|        merged[spec2len] = '/';
  239|    872|        strcpy(&merged[spec2len + 1], filespec1);
  240|    872|    }
  241|    879|    return merged;
  242|    879|}

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

DSO_new:
   43|    879|{
   44|       |    return DSO_new_method(NULL);
   45|    879|}
DSO_free:
   48|  2.53k|{
   49|  2.53k|    int i;
   50|       |
   51|  2.53k|    if (dso == NULL)
  ------------------
  |  Branch (51:9): [True: 1.65k, False: 879]
  ------------------
   52|  1.65k|        return 1;
   53|       |
   54|    879|    if (CRYPTO_DOWN_REF(&dso->references, &i) <= 0)
  ------------------
  |  Branch (54:9): [True: 0, False: 879]
  ------------------
   55|      0|        return 0;
   56|       |
   57|    879|    REF_PRINT_COUNT("DSO", i, dso);
  ------------------
  |  |  301|    879|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|    879|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|    879|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|    879|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   58|    879|    if (i > 0)
  ------------------
  |  Branch (58:9): [True: 0, False: 879]
  ------------------
   59|      0|        return 1;
   60|    879|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|    879|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 879]
  |  |  ------------------
  ------------------
   61|       |
   62|    879|    if ((dso->flags & DSO_FLAG_NO_UNLOAD_ON_FREE) == 0) {
  ------------------
  |  |   46|    879|#define DSO_FLAG_NO_UNLOAD_ON_FREE 0x04
  ------------------
  |  Branch (62:9): [True: 879, False: 0]
  ------------------
   63|    879|        if ((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso)) {
  ------------------
  |  Branch (63:13): [True: 879, False: 0]
  |  Branch (63:48): [True: 0, False: 879]
  ------------------
   64|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_UNLOAD_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|            return 0;
   66|      0|        }
   67|    879|    }
   68|       |
   69|    879|    if ((dso->meth->finish != NULL) && !dso->meth->finish(dso)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 879]
  |  Branch (69:40): [True: 0, False: 0]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_FINISH_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|       |
   74|    879|    sk_void_free(dso->meth_data);
  ------------------
  |  |  225|    879|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   75|    879|    OPENSSL_free(dso->filename);
  ------------------
  |  |  131|    879|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   76|    879|    OPENSSL_free(dso->loaded_filename);
  ------------------
  |  |  131|    879|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|    879|    CRYPTO_FREE_REF(&dso->references);
   78|    879|    OPENSSL_free(dso);
  ------------------
  |  |  131|    879|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|    879|    return 1;
   80|    879|}
DSO_flags:
   83|  1.43k|{
   84|  1.43k|    return ((dso == NULL) ? 0 : dso->flags);
  ------------------
  |  Branch (84:13): [True: 0, False: 1.43k]
  ------------------
   85|  1.43k|}
DSO_load:
  105|    879|{
  106|    879|    DSO *ret;
  107|    879|    int allocated = 0;
  108|       |
  109|    879|    if (dso == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 879]
  ------------------
  110|      0|        ret = DSO_new_method(meth);
  111|      0|        if (ret == NULL) {
  ------------------
  |  Branch (111:13): [True: 0, False: 0]
  ------------------
  112|      0|            ERR_raise(ERR_LIB_DSO, ERR_R_DSO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|            goto err;
  114|      0|        }
  115|      0|        allocated = 1;
  116|       |        /* Pass the provided flags to the new DSO object */
  117|      0|        if (DSO_ctrl(ret, DSO_CTRL_SET_FLAGS, flags, NULL) < 0) {
  ------------------
  |  |   19|      0|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  |  Branch (117:13): [True: 0, False: 0]
  ------------------
  118|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_CTRL_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|            goto err;
  120|      0|        }
  121|      0|    } else
  122|    879|        ret = dso;
  123|       |    /* Don't load if we're currently already loaded */
  124|    879|    if (ret->filename != NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 879]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_DSO_ALREADY_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|       |    /*
  129|       |     * filename can only be NULL if we were passed a dso that already has one
  130|       |     * set.
  131|       |     */
  132|    879|    if (filename != NULL)
  ------------------
  |  Branch (132:9): [True: 879, False: 0]
  ------------------
  133|    879|        if (!DSO_set_filename(ret, filename)) {
  ------------------
  |  Branch (133:13): [True: 0, False: 879]
  ------------------
  134|      0|            ERR_raise(ERR_LIB_DSO, DSO_R_SET_FILENAME_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  135|      0|            goto err;
  136|      0|        }
  137|    879|    filename = ret->filename;
  138|    879|    if (filename == NULL) {
  ------------------
  |  Branch (138:9): [True: 0, False: 879]
  ------------------
  139|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  140|      0|        goto err;
  141|      0|    }
  142|    879|    if (ret->meth->dso_load == NULL) {
  ------------------
  |  Branch (142:9): [True: 0, False: 879]
  ------------------
  143|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_UNSUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  144|      0|        goto err;
  145|      0|    }
  146|    879|    if (!ret->meth->dso_load(ret)) {
  ------------------
  |  Branch (146:9): [True: 879, False: 0]
  ------------------
  147|    879|        ERR_raise(ERR_LIB_DSO, DSO_R_LOAD_FAILED);
  ------------------
  |  |  404|    879|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    879|    (ERR_new(),                                                  \
  |  |  |  |  407|    879|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    879|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    879|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|    879|        goto err;
  149|    879|    }
  150|       |    /* Load succeeded */
  151|      0|    return ret;
  152|    879|err:
  153|    879|    if (allocated)
  ------------------
  |  Branch (153:9): [True: 0, False: 879]
  ------------------
  154|      0|        DSO_free(ret);
  155|       |    return NULL;
  156|    879|}
DSO_ctrl:
  188|    879|{
  189|    879|    if (dso == NULL) {
  ------------------
  |  Branch (189:9): [True: 0, False: 879]
  ------------------
  190|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  191|      0|        return -1;
  192|      0|    }
  193|       |    /*
  194|       |     * We should intercept certain generic commands and only pass control to
  195|       |     * the method-specific ctrl() function if it's something we don't handle.
  196|       |     */
  197|    879|    switch (cmd) {
  198|      0|    case DSO_CTRL_GET_FLAGS:
  ------------------
  |  |   18|      0|#define DSO_CTRL_GET_FLAGS 1
  ------------------
  |  Branch (198:5): [True: 0, False: 879]
  ------------------
  199|      0|        return dso->flags;
  200|    879|    case DSO_CTRL_SET_FLAGS:
  ------------------
  |  |   19|    879|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  |  Branch (200:5): [True: 879, False: 0]
  ------------------
  201|    879|        dso->flags = (int)larg;
  202|    879|        return 0;
  203|      0|    case DSO_CTRL_OR_FLAGS:
  ------------------
  |  |   20|      0|#define DSO_CTRL_OR_FLAGS 3
  ------------------
  |  Branch (203:5): [True: 0, False: 879]
  ------------------
  204|      0|        dso->flags |= (int)larg;
  205|      0|        return 0;
  206|      0|    default:
  ------------------
  |  Branch (206:5): [True: 0, False: 879]
  ------------------
  207|      0|        break;
  208|    879|    }
  209|      0|    if ((dso->meth == NULL) || (dso->meth->dso_ctrl == NULL)) {
  ------------------
  |  Branch (209:9): [True: 0, False: 0]
  |  Branch (209:32): [True: 0, False: 0]
  ------------------
  210|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_UNSUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|        return -1;
  212|      0|    }
  213|      0|    return dso->meth->dso_ctrl(dso, cmd, larg, parg);
  214|      0|}
DSO_set_filename:
  226|    879|{
  227|    879|    char *copied;
  228|       |
  229|    879|    if ((dso == NULL) || (filename == NULL)) {
  ------------------
  |  Branch (229:9): [True: 0, False: 879]
  |  Branch (229:26): [True: 0, False: 879]
  ------------------
  230|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|        return 0;
  232|      0|    }
  233|    879|    if (dso->loaded_filename) {
  ------------------
  |  Branch (233:9): [True: 0, False: 879]
  ------------------
  234|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_DSO_ALREADY_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  235|      0|        return 0;
  236|      0|    }
  237|       |    /* We'll duplicate filename */
  238|    879|    copied = OPENSSL_strdup(filename);
  ------------------
  |  |  135|    879|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  239|    879|    if (copied == NULL)
  ------------------
  |  Branch (239:9): [True: 0, False: 879]
  ------------------
  240|      0|        return 0;
  241|    879|    OPENSSL_free(dso->filename);
  ------------------
  |  |  131|    879|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|    879|    dso->filename = copied;
  243|    879|    return 1;
  244|    879|}
DSO_merge:
  247|    879|{
  248|    879|    char *result = NULL;
  249|       |
  250|    879|    if (dso == NULL || filespec1 == NULL) {
  ------------------
  |  Branch (250:9): [True: 0, False: 879]
  |  Branch (250:24): [True: 0, False: 879]
  ------------------
  251|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  252|      0|        return NULL;
  253|      0|    }
  254|    879|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|    879|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (254:9): [True: 879, False: 0]
  ------------------
  255|    879|        if (dso->merger != NULL)
  ------------------
  |  Branch (255:13): [True: 0, False: 879]
  ------------------
  256|      0|            result = dso->merger(dso, filespec1, filespec2);
  257|    879|        else if (dso->meth->dso_merger != NULL)
  ------------------
  |  Branch (257:18): [True: 879, False: 0]
  ------------------
  258|    879|            result = dso->meth->dso_merger(dso, filespec1, filespec2);
  259|    879|    }
  260|    879|    return result;
  261|    879|}
DSO_convert_filename:
  264|  1.75k|{
  265|  1.75k|    char *result = NULL;
  266|       |
  267|  1.75k|    if (dso == NULL) {
  ------------------
  |  Branch (267:9): [True: 0, False: 1.75k]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return NULL;
  270|      0|    }
  271|  1.75k|    if (filename == NULL)
  ------------------
  |  Branch (271:9): [True: 879, False: 879]
  ------------------
  272|    879|        filename = dso->filename;
  273|  1.75k|    if (filename == NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 1.75k]
  ------------------
  274|      0|        ERR_raise(ERR_LIB_DSO, DSO_R_NO_FILENAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  275|      0|        return NULL;
  276|      0|    }
  277|  1.75k|    if ((dso->flags & DSO_FLAG_NO_NAME_TRANSLATION) == 0) {
  ------------------
  |  |   33|  1.75k|#define DSO_FLAG_NO_NAME_TRANSLATION 0x01
  ------------------
  |  Branch (277:9): [True: 1.75k, False: 0]
  ------------------
  278|  1.75k|        if (dso->name_converter != NULL)
  ------------------
  |  Branch (278:13): [True: 0, False: 1.75k]
  ------------------
  279|      0|            result = dso->name_converter(dso, filename);
  280|  1.75k|        else if (dso->meth->dso_name_converter != NULL)
  ------------------
  |  Branch (280:18): [True: 1.75k, False: 0]
  ------------------
  281|  1.75k|            result = dso->meth->dso_name_converter(dso, filename);
  282|  1.75k|    }
  283|  1.75k|    if (result == NULL) {
  ------------------
  |  Branch (283:9): [True: 0, False: 1.75k]
  ------------------
  284|      0|        result = OPENSSL_strdup(filename);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  285|      0|        if (result == NULL)
  ------------------
  |  Branch (285:13): [True: 0, False: 0]
  ------------------
  286|      0|            return NULL;
  287|      0|    }
  288|  1.75k|    return result;
  289|  1.75k|}
dso_lib.c:DSO_new_method:
   14|    879|{
   15|    879|    DSO *ret;
   16|       |
   17|    879|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|    879|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|    879|    if (ret == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 879]
  ------------------
   19|      0|        return NULL;
   20|    879|    ret->meth_data = sk_void_new_null();
  ------------------
  |  |  222|    879|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_new_null())
  ------------------
   21|    879|    if (ret->meth_data == NULL) {
  ------------------
  |  Branch (21:9): [True: 0, False: 879]
  ------------------
   22|       |        /* sk_new doesn't generate any errors so we do */
   23|      0|        ERR_raise(ERR_LIB_DSO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   24|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|      0|        return NULL;
   26|      0|    }
   27|    879|    ret->meth = DSO_METHOD_openssl();
   28|    879|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (28:9): [True: 0, False: 879]
  ------------------
   29|      0|        sk_void_free(ret->meth_data);
  ------------------
  |  |  225|      0|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
   30|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|      0|        return NULL;
   32|      0|    }
   33|       |
   34|    879|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 879]
  |  Branch (34:38): [True: 0, False: 0]
  ------------------
   35|      0|        DSO_free(ret);
   36|      0|        ret = NULL;
   37|      0|    }
   38|       |
   39|    879|    return ret;
   40|    879|}

ossl_x25519_public_from_private:
 5855|  2.46k|{
 5856|  2.46k|    uint8_t e[32];
 5857|  2.46k|    ge_p3 A;
 5858|  2.46k|    fe zplusy, zminusy, zminusy_inv;
 5859|       |
 5860|  2.46k|    memcpy(e, private_key, 32);
 5861|  2.46k|    e[0] &= 248;
 5862|  2.46k|    e[31] &= 127;
 5863|  2.46k|    e[31] |= 64;
 5864|       |
 5865|  2.46k|    ge_scalarmult_base(&A, e);
 5866|       |
 5867|       |    /*
 5868|       |     * We only need the u-coordinate of the curve25519 point.
 5869|       |     * The map is u=(y+1)/(1-y). Since y=Y/Z, this gives
 5870|       |     * u=(Z+Y)/(Z-Y).
 5871|       |     */
 5872|  2.46k|    fe_add(zplusy, A.Z, A.Y);
 5873|  2.46k|    fe_sub(zminusy, A.Z, A.Y);
 5874|  2.46k|    fe_invert(zminusy_inv, zminusy);
 5875|  2.46k|    fe_mul(zplusy, zplusy, zminusy_inv);
 5876|  2.46k|    fe_tobytes(out_public_value, zplusy);
 5877|       |
 5878|  2.46k|    OPENSSL_cleanse(e, sizeof(e));
 5879|  2.46k|}
curve25519.c:ge_scalarmult_base:
 4366|  2.46k|{
 4367|  2.46k|    signed char e[64];
 4368|  2.46k|    signed char carry;
 4369|  2.46k|    ge_p1p1 r;
 4370|  2.46k|    ge_p2 s;
 4371|  2.46k|    ge_precomp t;
 4372|  2.46k|    int i;
 4373|       |
 4374|  81.1k|    for (i = 0; i < 32; ++i) {
  ------------------
  |  Branch (4374:17): [True: 78.7k, False: 2.46k]
  ------------------
 4375|  78.7k|        e[2 * i + 0] = (a[i] >> 0) & 15;
 4376|  78.7k|        e[2 * i + 1] = (a[i] >> 4) & 15;
 4377|  78.7k|    }
 4378|       |    /* each e[i] is between 0 and 15 */
 4379|       |    /* e[63] is between 0 and 7 */
 4380|       |
 4381|  2.46k|    carry = 0;
 4382|   157k|    for (i = 0; i < 63; ++i) {
  ------------------
  |  Branch (4382:17): [True: 154k, False: 2.46k]
  ------------------
 4383|   154k|        e[i] += carry;
 4384|   154k|        carry = e[i] + 8;
 4385|   154k|        carry >>= 4;
 4386|   154k|        e[i] -= carry << 4;
 4387|   154k|    }
 4388|  2.46k|    e[63] += carry;
 4389|       |    /* each e[i] is between -8 and 8 */
 4390|       |
 4391|  2.46k|    ge_p3_0(h);
 4392|  81.1k|    for (i = 1; i < 64; i += 2) {
  ------------------
  |  Branch (4392:17): [True: 78.7k, False: 2.46k]
  ------------------
 4393|  78.7k|        table_select(&t, i / 2, e[i]);
 4394|  78.7k|        ge_madd(&r, h, &t);
 4395|  78.7k|        ge_p1p1_to_p3(h, &r);
 4396|  78.7k|    }
 4397|       |
 4398|  2.46k|    ge_p3_dbl(&r, h);
 4399|  2.46k|    ge_p1p1_to_p2(&s, &r);
 4400|  2.46k|    ge_p2_dbl(&r, &s);
 4401|  2.46k|    ge_p1p1_to_p2(&s, &r);
 4402|  2.46k|    ge_p2_dbl(&r, &s);
 4403|  2.46k|    ge_p1p1_to_p2(&s, &r);
 4404|  2.46k|    ge_p2_dbl(&r, &s);
 4405|  2.46k|    ge_p1p1_to_p3(h, &r);
 4406|       |
 4407|  81.1k|    for (i = 0; i < 64; i += 2) {
  ------------------
  |  Branch (4407:17): [True: 78.7k, False: 2.46k]
  ------------------
 4408|  78.7k|        table_select(&t, i / 2, e[i]);
 4409|  78.7k|        ge_madd(&r, h, &t);
 4410|  78.7k|        ge_p1p1_to_p3(h, &r);
 4411|  78.7k|    }
 4412|       |
 4413|  2.46k|    OPENSSL_cleanse(e, sizeof(e));
 4414|  2.46k|}
curve25519.c:ge_p3_0:
 2046|  2.46k|{
 2047|  2.46k|    fe_0(h->X);
 2048|  2.46k|    fe_1(h->Y);
 2049|  2.46k|    fe_1(h->Z);
 2050|  2.46k|    fe_0(h->T);
 2051|  2.46k|}
curve25519.c:fe_0:
 1022|   162k|{
 1023|   162k|    memset(h, 0, sizeof(int32_t) * 10);
 1024|   162k|}
curve25519.c:fe_1:
 1028|   319k|{
 1029|   319k|    memset(h, 0, sizeof(int32_t) * 10);
 1030|   319k|    h[0] = 1;
 1031|   319k|}
curve25519.c:table_select:
 4336|   157k|{
 4337|   157k|    ge_precomp minust;
 4338|   157k|    uint8_t bnegative = negative(b);
 4339|   157k|    uint8_t babs = b - ((uint8_t)((-bnegative) & b) << 1);
 4340|       |
 4341|   157k|    ge_precomp_0(t);
 4342|   157k|    cmov(t, &k25519Precomp[pos][0], equal(babs, 1));
 4343|   157k|    cmov(t, &k25519Precomp[pos][1], equal(babs, 2));
 4344|   157k|    cmov(t, &k25519Precomp[pos][2], equal(babs, 3));
 4345|   157k|    cmov(t, &k25519Precomp[pos][3], equal(babs, 4));
 4346|   157k|    cmov(t, &k25519Precomp[pos][4], equal(babs, 5));
 4347|   157k|    cmov(t, &k25519Precomp[pos][5], equal(babs, 6));
 4348|   157k|    cmov(t, &k25519Precomp[pos][6], equal(babs, 7));
 4349|   157k|    cmov(t, &k25519Precomp[pos][7], equal(babs, 8));
 4350|   157k|    fe_copy(minust.yplusx, t->yminusx);
 4351|   157k|    fe_copy(minust.yminusx, t->yplusx);
 4352|   157k|    fe_neg(minust.xy2d, t->xy2d);
 4353|   157k|    cmov(t, &minust, bnegative);
 4354|   157k|}
curve25519.c:negative:
 4328|   157k|{
 4329|   157k|    uint32_t x = b;
 4330|       |
 4331|   157k|    x >>= 31; /* 1: yes; 0: no */
 4332|   157k|    return x;
 4333|   157k|}
curve25519.c:ge_precomp_0:
 2054|   157k|{
 2055|   157k|    fe_1(h->yplusx);
 2056|   157k|    fe_1(h->yminusx);
 2057|   157k|    fe_0(h->xy2d);
 2058|   157k|}
curve25519.c:cmov:
 2205|  1.41M|{
 2206|  1.41M|    fe_cmov(t->yplusx, u->yplusx, b);
 2207|  1.41M|    fe_cmov(t->yminusx, u->yminusx, b);
 2208|  1.41M|    fe_cmov(t->xy2d, u->xy2d, b);
 2209|  1.41M|}
curve25519.c:fe_cmov:
 1636|  4.25M|{
 1637|  4.25M|    size_t i;
 1638|       |
 1639|  4.25M|    b = 0 - b;
 1640|  46.7M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1640:17): [True: 42.5M, False: 4.25M]
  ------------------
 1641|  42.5M|        int32_t x = f[i] ^ g[i];
 1642|  42.5M|        x &= b;
 1643|  42.5M|        f[i] ^= x;
 1644|  42.5M|    }
 1645|  4.25M|}
curve25519.c:equal:
 2194|  1.25M|{
 2195|  1.25M|    uint8_t ub = b;
 2196|  1.25M|    uint8_t uc = c;
 2197|  1.25M|    uint8_t x = ub ^ uc; /* 0: yes; 1..255: no */
 2198|  1.25M|    uint32_t y = x; /* 0: yes; 1..255: no */
 2199|  1.25M|    y -= 1; /* 4294967295: yes; 0..254: no */
 2200|  1.25M|    y >>= 31; /* 1: yes; 0: no */
 2201|  1.25M|    return y;
 2202|  1.25M|}
curve25519.c:fe_copy:
 1016|   322k|{
 1017|   322k|    memmove(h, f, sizeof(int32_t) * 10);
 1018|   322k|}
curve25519.c:ge_madd:
 2125|   157k|{
 2126|   157k|    fe t0;
 2127|       |
 2128|   157k|    fe_add(r->X, p->Y, p->X);
 2129|   157k|    fe_sub(r->Y, p->Y, p->X);
 2130|   157k|    fe_mul(r->Z, r->X, q->yplusx);
 2131|   157k|    fe_mul(r->Y, r->Y, q->yminusx);
 2132|   157k|    fe_mul(r->T, q->xy2d, p->T);
 2133|   157k|    fe_add(t0, p->Z, p->Z);
 2134|   157k|    fe_sub(r->X, r->Z, r->Y);
 2135|   157k|    fe_add(r->Y, r->Z, r->Y);
 2136|   157k|    fe_add(r->Z, t0, r->T);
 2137|   157k|    fe_sub(r->T, t0, r->T);
 2138|   157k|}
curve25519.c:ge_p1p1_to_p3:
 2092|   159k|{
 2093|   159k|    fe_mul(r->X, p->X, p->T);
 2094|   159k|    fe_mul(r->Y, p->Y, p->Z);
 2095|   159k|    fe_mul(r->Z, p->Z, p->T);
 2096|   159k|    fe_mul(r->T, p->X, p->Y);
 2097|   159k|}
curve25519.c:ge_p3_dbl:
 2117|  2.46k|{
 2118|  2.46k|    ge_p2 q;
 2119|  2.46k|    ge_p3_to_p2(&q, p);
 2120|  2.46k|    ge_p2_dbl(r, &q);
 2121|  2.46k|}
curve25519.c:ge_p3_to_p2:
 2062|  2.46k|{
 2063|  2.46k|    fe_copy(r->X, p->X);
 2064|  2.46k|    fe_copy(r->Y, p->Y);
 2065|  2.46k|    fe_copy(r->Z, p->Z);
 2066|  2.46k|}
curve25519.c:ge_p1p1_to_p2:
 2084|  7.38k|{
 2085|  7.38k|    fe_mul(r->X, p->X, p->T);
 2086|  7.38k|    fe_mul(r->Y, p->Y, p->Z);
 2087|  7.38k|    fe_mul(r->Z, p->Z, p->T);
 2088|  7.38k|}
curve25519.c:ge_p2_dbl:
 2101|  9.84k|{
 2102|  9.84k|    fe t0;
 2103|       |
 2104|  9.84k|    fe_sq(r->X, p->X);
 2105|  9.84k|    fe_sq(r->Z, p->Y);
 2106|  9.84k|    fe_sq2(r->T, p->Z);
 2107|  9.84k|    fe_add(r->Y, p->X, p->Y);
 2108|  9.84k|    fe_sq(t0, r->Y);
 2109|  9.84k|    fe_add(r->Y, r->Z, r->X);
 2110|  9.84k|    fe_sub(r->Z, r->Z, r->X);
 2111|  9.84k|    fe_sub(r->X, t0, r->Y);
 2112|  9.84k|    fe_sub(r->T, r->T, r->Z);
 2113|  9.84k|}
curve25519.c:fe_sq:
 1360|   654k|{
 1361|   654k|    int32_t f0 = f[0];
 1362|   654k|    int32_t f1 = f[1];
 1363|   654k|    int32_t f2 = f[2];
 1364|   654k|    int32_t f3 = f[3];
 1365|   654k|    int32_t f4 = f[4];
 1366|   654k|    int32_t f5 = f[5];
 1367|   654k|    int32_t f6 = f[6];
 1368|   654k|    int32_t f7 = f[7];
 1369|   654k|    int32_t f8 = f[8];
 1370|   654k|    int32_t f9 = f[9];
 1371|   654k|    int32_t f0_2 = 2 * f0;
 1372|   654k|    int32_t f1_2 = 2 * f1;
 1373|   654k|    int32_t f2_2 = 2 * f2;
 1374|   654k|    int32_t f3_2 = 2 * f3;
 1375|   654k|    int32_t f4_2 = 2 * f4;
 1376|   654k|    int32_t f5_2 = 2 * f5;
 1377|   654k|    int32_t f6_2 = 2 * f6;
 1378|   654k|    int32_t f7_2 = 2 * f7;
 1379|   654k|    int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
 1380|   654k|    int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
 1381|   654k|    int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
 1382|   654k|    int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
 1383|   654k|    int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
 1384|   654k|    int64_t f0f0 = f0 * (int64_t)f0;
 1385|   654k|    int64_t f0f1_2 = f0_2 * (int64_t)f1;
 1386|   654k|    int64_t f0f2_2 = f0_2 * (int64_t)f2;
 1387|   654k|    int64_t f0f3_2 = f0_2 * (int64_t)f3;
 1388|   654k|    int64_t f0f4_2 = f0_2 * (int64_t)f4;
 1389|   654k|    int64_t f0f5_2 = f0_2 * (int64_t)f5;
 1390|   654k|    int64_t f0f6_2 = f0_2 * (int64_t)f6;
 1391|   654k|    int64_t f0f7_2 = f0_2 * (int64_t)f7;
 1392|   654k|    int64_t f0f8_2 = f0_2 * (int64_t)f8;
 1393|   654k|    int64_t f0f9_2 = f0_2 * (int64_t)f9;
 1394|   654k|    int64_t f1f1_2 = f1_2 * (int64_t)f1;
 1395|   654k|    int64_t f1f2_2 = f1_2 * (int64_t)f2;
 1396|   654k|    int64_t f1f3_4 = f1_2 * (int64_t)f3_2;
 1397|   654k|    int64_t f1f4_2 = f1_2 * (int64_t)f4;
 1398|   654k|    int64_t f1f5_4 = f1_2 * (int64_t)f5_2;
 1399|   654k|    int64_t f1f6_2 = f1_2 * (int64_t)f6;
 1400|   654k|    int64_t f1f7_4 = f1_2 * (int64_t)f7_2;
 1401|   654k|    int64_t f1f8_2 = f1_2 * (int64_t)f8;
 1402|   654k|    int64_t f1f9_76 = f1_2 * (int64_t)f9_38;
 1403|   654k|    int64_t f2f2 = f2 * (int64_t)f2;
 1404|   654k|    int64_t f2f3_2 = f2_2 * (int64_t)f3;
 1405|   654k|    int64_t f2f4_2 = f2_2 * (int64_t)f4;
 1406|   654k|    int64_t f2f5_2 = f2_2 * (int64_t)f5;
 1407|   654k|    int64_t f2f6_2 = f2_2 * (int64_t)f6;
 1408|   654k|    int64_t f2f7_2 = f2_2 * (int64_t)f7;
 1409|   654k|    int64_t f2f8_38 = f2_2 * (int64_t)f8_19;
 1410|   654k|    int64_t f2f9_38 = f2 * (int64_t)f9_38;
 1411|   654k|    int64_t f3f3_2 = f3_2 * (int64_t)f3;
 1412|   654k|    int64_t f3f4_2 = f3_2 * (int64_t)f4;
 1413|   654k|    int64_t f3f5_4 = f3_2 * (int64_t)f5_2;
 1414|   654k|    int64_t f3f6_2 = f3_2 * (int64_t)f6;
 1415|   654k|    int64_t f3f7_76 = f3_2 * (int64_t)f7_38;
 1416|   654k|    int64_t f3f8_38 = f3_2 * (int64_t)f8_19;
 1417|   654k|    int64_t f3f9_76 = f3_2 * (int64_t)f9_38;
 1418|   654k|    int64_t f4f4 = f4 * (int64_t)f4;
 1419|   654k|    int64_t f4f5_2 = f4_2 * (int64_t)f5;
 1420|   654k|    int64_t f4f6_38 = f4_2 * (int64_t)f6_19;
 1421|   654k|    int64_t f4f7_38 = f4 * (int64_t)f7_38;
 1422|   654k|    int64_t f4f8_38 = f4_2 * (int64_t)f8_19;
 1423|   654k|    int64_t f4f9_38 = f4 * (int64_t)f9_38;
 1424|   654k|    int64_t f5f5_38 = f5 * (int64_t)f5_38;
 1425|   654k|    int64_t f5f6_38 = f5_2 * (int64_t)f6_19;
 1426|   654k|    int64_t f5f7_76 = f5_2 * (int64_t)f7_38;
 1427|   654k|    int64_t f5f8_38 = f5_2 * (int64_t)f8_19;
 1428|   654k|    int64_t f5f9_76 = f5_2 * (int64_t)f9_38;
 1429|   654k|    int64_t f6f6_19 = f6 * (int64_t)f6_19;
 1430|   654k|    int64_t f6f7_38 = f6 * (int64_t)f7_38;
 1431|   654k|    int64_t f6f8_38 = f6_2 * (int64_t)f8_19;
 1432|   654k|    int64_t f6f9_38 = f6 * (int64_t)f9_38;
 1433|   654k|    int64_t f7f7_38 = f7 * (int64_t)f7_38;
 1434|   654k|    int64_t f7f8_38 = f7_2 * (int64_t)f8_19;
 1435|   654k|    int64_t f7f9_76 = f7_2 * (int64_t)f9_38;
 1436|   654k|    int64_t f8f8_19 = f8 * (int64_t)f8_19;
 1437|   654k|    int64_t f8f9_38 = f8 * (int64_t)f9_38;
 1438|   654k|    int64_t f9f9_38 = f9 * (int64_t)f9_38;
 1439|   654k|    int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
 1440|   654k|    int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
 1441|   654k|    int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
 1442|   654k|    int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
 1443|   654k|    int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
 1444|   654k|    int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
 1445|   654k|    int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
 1446|   654k|    int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
 1447|   654k|    int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
 1448|   654k|    int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
 1449|   654k|    int64_t carry0;
 1450|   654k|    int64_t carry1;
 1451|   654k|    int64_t carry2;
 1452|   654k|    int64_t carry3;
 1453|   654k|    int64_t carry4;
 1454|   654k|    int64_t carry5;
 1455|   654k|    int64_t carry6;
 1456|   654k|    int64_t carry7;
 1457|   654k|    int64_t carry8;
 1458|   654k|    int64_t carry9;
 1459|       |
 1460|   654k|    carry0 = h0 + (1 << 25);
 1461|   654k|    h1 += carry0 >> 26;
 1462|   654k|    h0 -= carry0 & kTop38Bits;
 1463|   654k|    carry4 = h4 + (1 << 25);
 1464|   654k|    h5 += carry4 >> 26;
 1465|   654k|    h4 -= carry4 & kTop38Bits;
 1466|       |
 1467|   654k|    carry1 = h1 + (1 << 24);
 1468|   654k|    h2 += carry1 >> 25;
 1469|   654k|    h1 -= carry1 & kTop39Bits;
 1470|   654k|    carry5 = h5 + (1 << 24);
 1471|   654k|    h6 += carry5 >> 25;
 1472|   654k|    h5 -= carry5 & kTop39Bits;
 1473|       |
 1474|   654k|    carry2 = h2 + (1 << 25);
 1475|   654k|    h3 += carry2 >> 26;
 1476|   654k|    h2 -= carry2 & kTop38Bits;
 1477|   654k|    carry6 = h6 + (1 << 25);
 1478|   654k|    h7 += carry6 >> 26;
 1479|   654k|    h6 -= carry6 & kTop38Bits;
 1480|       |
 1481|   654k|    carry3 = h3 + (1 << 24);
 1482|   654k|    h4 += carry3 >> 25;
 1483|   654k|    h3 -= carry3 & kTop39Bits;
 1484|   654k|    carry7 = h7 + (1 << 24);
 1485|   654k|    h8 += carry7 >> 25;
 1486|   654k|    h7 -= carry7 & kTop39Bits;
 1487|       |
 1488|   654k|    carry4 = h4 + (1 << 25);
 1489|   654k|    h5 += carry4 >> 26;
 1490|   654k|    h4 -= carry4 & kTop38Bits;
 1491|   654k|    carry8 = h8 + (1 << 25);
 1492|   654k|    h9 += carry8 >> 26;
 1493|   654k|    h8 -= carry8 & kTop38Bits;
 1494|       |
 1495|   654k|    carry9 = h9 + (1 << 24);
 1496|   654k|    h0 += (carry9 >> 25) * 19;
 1497|   654k|    h9 -= carry9 & kTop39Bits;
 1498|       |
 1499|   654k|    carry0 = h0 + (1 << 25);
 1500|   654k|    h1 += carry0 >> 26;
 1501|   654k|    h0 -= carry0 & kTop38Bits;
 1502|       |
 1503|   654k|    h[0] = (int32_t)h0;
 1504|   654k|    h[1] = (int32_t)h1;
 1505|   654k|    h[2] = (int32_t)h2;
 1506|   654k|    h[3] = (int32_t)h3;
 1507|   654k|    h[4] = (int32_t)h4;
 1508|   654k|    h[5] = (int32_t)h5;
 1509|   654k|    h[6] = (int32_t)h6;
 1510|   654k|    h[7] = (int32_t)h7;
 1511|   654k|    h[8] = (int32_t)h8;
 1512|   654k|    h[9] = (int32_t)h9;
 1513|   654k|}
curve25519.c:fe_sq2:
 1693|  9.84k|{
 1694|  9.84k|    int32_t f0 = f[0];
 1695|  9.84k|    int32_t f1 = f[1];
 1696|  9.84k|    int32_t f2 = f[2];
 1697|  9.84k|    int32_t f3 = f[3];
 1698|  9.84k|    int32_t f4 = f[4];
 1699|  9.84k|    int32_t f5 = f[5];
 1700|  9.84k|    int32_t f6 = f[6];
 1701|  9.84k|    int32_t f7 = f[7];
 1702|  9.84k|    int32_t f8 = f[8];
 1703|  9.84k|    int32_t f9 = f[9];
 1704|  9.84k|    int32_t f0_2 = 2 * f0;
 1705|  9.84k|    int32_t f1_2 = 2 * f1;
 1706|  9.84k|    int32_t f2_2 = 2 * f2;
 1707|  9.84k|    int32_t f3_2 = 2 * f3;
 1708|  9.84k|    int32_t f4_2 = 2 * f4;
 1709|  9.84k|    int32_t f5_2 = 2 * f5;
 1710|  9.84k|    int32_t f6_2 = 2 * f6;
 1711|  9.84k|    int32_t f7_2 = 2 * f7;
 1712|  9.84k|    int32_t f5_38 = 38 * f5; /* 1.959375*2^30 */
 1713|  9.84k|    int32_t f6_19 = 19 * f6; /* 1.959375*2^30 */
 1714|  9.84k|    int32_t f7_38 = 38 * f7; /* 1.959375*2^30 */
 1715|  9.84k|    int32_t f8_19 = 19 * f8; /* 1.959375*2^30 */
 1716|  9.84k|    int32_t f9_38 = 38 * f9; /* 1.959375*2^30 */
 1717|  9.84k|    int64_t f0f0 = f0 * (int64_t)f0;
 1718|  9.84k|    int64_t f0f1_2 = f0_2 * (int64_t)f1;
 1719|  9.84k|    int64_t f0f2_2 = f0_2 * (int64_t)f2;
 1720|  9.84k|    int64_t f0f3_2 = f0_2 * (int64_t)f3;
 1721|  9.84k|    int64_t f0f4_2 = f0_2 * (int64_t)f4;
 1722|  9.84k|    int64_t f0f5_2 = f0_2 * (int64_t)f5;
 1723|  9.84k|    int64_t f0f6_2 = f0_2 * (int64_t)f6;
 1724|  9.84k|    int64_t f0f7_2 = f0_2 * (int64_t)f7;
 1725|  9.84k|    int64_t f0f8_2 = f0_2 * (int64_t)f8;
 1726|  9.84k|    int64_t f0f9_2 = f0_2 * (int64_t)f9;
 1727|  9.84k|    int64_t f1f1_2 = f1_2 * (int64_t)f1;
 1728|  9.84k|    int64_t f1f2_2 = f1_2 * (int64_t)f2;
 1729|  9.84k|    int64_t f1f3_4 = f1_2 * (int64_t)f3_2;
 1730|  9.84k|    int64_t f1f4_2 = f1_2 * (int64_t)f4;
 1731|  9.84k|    int64_t f1f5_4 = f1_2 * (int64_t)f5_2;
 1732|  9.84k|    int64_t f1f6_2 = f1_2 * (int64_t)f6;
 1733|  9.84k|    int64_t f1f7_4 = f1_2 * (int64_t)f7_2;
 1734|  9.84k|    int64_t f1f8_2 = f1_2 * (int64_t)f8;
 1735|  9.84k|    int64_t f1f9_76 = f1_2 * (int64_t)f9_38;
 1736|  9.84k|    int64_t f2f2 = f2 * (int64_t)f2;
 1737|  9.84k|    int64_t f2f3_2 = f2_2 * (int64_t)f3;
 1738|  9.84k|    int64_t f2f4_2 = f2_2 * (int64_t)f4;
 1739|  9.84k|    int64_t f2f5_2 = f2_2 * (int64_t)f5;
 1740|  9.84k|    int64_t f2f6_2 = f2_2 * (int64_t)f6;
 1741|  9.84k|    int64_t f2f7_2 = f2_2 * (int64_t)f7;
 1742|  9.84k|    int64_t f2f8_38 = f2_2 * (int64_t)f8_19;
 1743|  9.84k|    int64_t f2f9_38 = f2 * (int64_t)f9_38;
 1744|  9.84k|    int64_t f3f3_2 = f3_2 * (int64_t)f3;
 1745|  9.84k|    int64_t f3f4_2 = f3_2 * (int64_t)f4;
 1746|  9.84k|    int64_t f3f5_4 = f3_2 * (int64_t)f5_2;
 1747|  9.84k|    int64_t f3f6_2 = f3_2 * (int64_t)f6;
 1748|  9.84k|    int64_t f3f7_76 = f3_2 * (int64_t)f7_38;
 1749|  9.84k|    int64_t f3f8_38 = f3_2 * (int64_t)f8_19;
 1750|  9.84k|    int64_t f3f9_76 = f3_2 * (int64_t)f9_38;
 1751|  9.84k|    int64_t f4f4 = f4 * (int64_t)f4;
 1752|  9.84k|    int64_t f4f5_2 = f4_2 * (int64_t)f5;
 1753|  9.84k|    int64_t f4f6_38 = f4_2 * (int64_t)f6_19;
 1754|  9.84k|    int64_t f4f7_38 = f4 * (int64_t)f7_38;
 1755|  9.84k|    int64_t f4f8_38 = f4_2 * (int64_t)f8_19;
 1756|  9.84k|    int64_t f4f9_38 = f4 * (int64_t)f9_38;
 1757|  9.84k|    int64_t f5f5_38 = f5 * (int64_t)f5_38;
 1758|  9.84k|    int64_t f5f6_38 = f5_2 * (int64_t)f6_19;
 1759|  9.84k|    int64_t f5f7_76 = f5_2 * (int64_t)f7_38;
 1760|  9.84k|    int64_t f5f8_38 = f5_2 * (int64_t)f8_19;
 1761|  9.84k|    int64_t f5f9_76 = f5_2 * (int64_t)f9_38;
 1762|  9.84k|    int64_t f6f6_19 = f6 * (int64_t)f6_19;
 1763|  9.84k|    int64_t f6f7_38 = f6 * (int64_t)f7_38;
 1764|  9.84k|    int64_t f6f8_38 = f6_2 * (int64_t)f8_19;
 1765|  9.84k|    int64_t f6f9_38 = f6 * (int64_t)f9_38;
 1766|  9.84k|    int64_t f7f7_38 = f7 * (int64_t)f7_38;
 1767|  9.84k|    int64_t f7f8_38 = f7_2 * (int64_t)f8_19;
 1768|  9.84k|    int64_t f7f9_76 = f7_2 * (int64_t)f9_38;
 1769|  9.84k|    int64_t f8f8_19 = f8 * (int64_t)f8_19;
 1770|  9.84k|    int64_t f8f9_38 = f8 * (int64_t)f9_38;
 1771|  9.84k|    int64_t f9f9_38 = f9 * (int64_t)f9_38;
 1772|  9.84k|    int64_t h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38;
 1773|  9.84k|    int64_t h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38;
 1774|  9.84k|    int64_t h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19;
 1775|  9.84k|    int64_t h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38;
 1776|  9.84k|    int64_t h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38;
 1777|  9.84k|    int64_t h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38;
 1778|  9.84k|    int64_t h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19;
 1779|  9.84k|    int64_t h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38;
 1780|  9.84k|    int64_t h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38;
 1781|  9.84k|    int64_t h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2;
 1782|  9.84k|    int64_t carry0;
 1783|  9.84k|    int64_t carry1;
 1784|  9.84k|    int64_t carry2;
 1785|  9.84k|    int64_t carry3;
 1786|  9.84k|    int64_t carry4;
 1787|  9.84k|    int64_t carry5;
 1788|  9.84k|    int64_t carry6;
 1789|  9.84k|    int64_t carry7;
 1790|  9.84k|    int64_t carry8;
 1791|  9.84k|    int64_t carry9;
 1792|       |
 1793|  9.84k|    h0 += h0;
 1794|  9.84k|    h1 += h1;
 1795|  9.84k|    h2 += h2;
 1796|  9.84k|    h3 += h3;
 1797|  9.84k|    h4 += h4;
 1798|  9.84k|    h5 += h5;
 1799|  9.84k|    h6 += h6;
 1800|  9.84k|    h7 += h7;
 1801|  9.84k|    h8 += h8;
 1802|  9.84k|    h9 += h9;
 1803|       |
 1804|  9.84k|    carry0 = h0 + (1 << 25);
 1805|  9.84k|    h1 += carry0 >> 26;
 1806|  9.84k|    h0 -= carry0 & kTop38Bits;
 1807|  9.84k|    carry4 = h4 + (1 << 25);
 1808|  9.84k|    h5 += carry4 >> 26;
 1809|  9.84k|    h4 -= carry4 & kTop38Bits;
 1810|       |
 1811|  9.84k|    carry1 = h1 + (1 << 24);
 1812|  9.84k|    h2 += carry1 >> 25;
 1813|  9.84k|    h1 -= carry1 & kTop39Bits;
 1814|  9.84k|    carry5 = h5 + (1 << 24);
 1815|  9.84k|    h6 += carry5 >> 25;
 1816|  9.84k|    h5 -= carry5 & kTop39Bits;
 1817|       |
 1818|  9.84k|    carry2 = h2 + (1 << 25);
 1819|  9.84k|    h3 += carry2 >> 26;
 1820|  9.84k|    h2 -= carry2 & kTop38Bits;
 1821|  9.84k|    carry6 = h6 + (1 << 25);
 1822|  9.84k|    h7 += carry6 >> 26;
 1823|  9.84k|    h6 -= carry6 & kTop38Bits;
 1824|       |
 1825|  9.84k|    carry3 = h3 + (1 << 24);
 1826|  9.84k|    h4 += carry3 >> 25;
 1827|  9.84k|    h3 -= carry3 & kTop39Bits;
 1828|  9.84k|    carry7 = h7 + (1 << 24);
 1829|  9.84k|    h8 += carry7 >> 25;
 1830|  9.84k|    h7 -= carry7 & kTop39Bits;
 1831|       |
 1832|  9.84k|    carry4 = h4 + (1 << 25);
 1833|  9.84k|    h5 += carry4 >> 26;
 1834|  9.84k|    h4 -= carry4 & kTop38Bits;
 1835|  9.84k|    carry8 = h8 + (1 << 25);
 1836|  9.84k|    h9 += carry8 >> 26;
 1837|  9.84k|    h8 -= carry8 & kTop38Bits;
 1838|       |
 1839|  9.84k|    carry9 = h9 + (1 << 24);
 1840|  9.84k|    h0 += (carry9 >> 25) * 19;
 1841|  9.84k|    h9 -= carry9 & kTop39Bits;
 1842|       |
 1843|  9.84k|    carry0 = h0 + (1 << 25);
 1844|  9.84k|    h1 += carry0 >> 26;
 1845|  9.84k|    h0 -= carry0 & kTop38Bits;
 1846|       |
 1847|  9.84k|    h[0] = (int32_t)h0;
 1848|  9.84k|    h[1] = (int32_t)h1;
 1849|  9.84k|    h[2] = (int32_t)h2;
 1850|  9.84k|    h[3] = (int32_t)h3;
 1851|  9.84k|    h[4] = (int32_t)h4;
 1852|  9.84k|    h[5] = (int32_t)h5;
 1853|  9.84k|    h[6] = (int32_t)h6;
 1854|  9.84k|    h[7] = (int32_t)h7;
 1855|  9.84k|    h[8] = (int32_t)h8;
 1856|  9.84k|    h[9] = (int32_t)h9;
 1857|  9.84k|}
curve25519.c:fe_neg:
 1621|   157k|{
 1622|   157k|    unsigned i;
 1623|       |
 1624|  1.73M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1624:17): [True: 1.57M, False: 157k]
  ------------------
 1625|  1.57M|        h[i] = -f[i];
 1626|  1.57M|    }
 1627|   157k|}
curve25519.c:fe_add:
 1046|   651k|{
 1047|   651k|    unsigned i;
 1048|       |
 1049|  7.17M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1049:17): [True: 6.51M, False: 651k]
  ------------------
 1050|  6.51M|        h[i] = f[i] + g[i];
 1051|  6.51M|    }
 1052|   651k|}
curve25519.c:fe_sub:
 1067|   504k|{
 1068|   504k|    unsigned i;
 1069|       |
 1070|  5.54M|    for (i = 0; i < 10; i++) {
  ------------------
  |  Branch (1070:17): [True: 5.04M, False: 504k]
  ------------------
 1071|  5.04M|        h[i] = f[i] - g[i];
 1072|  5.04M|    }
 1073|   504k|}
curve25519.c:fe_invert:
 1516|  2.46k|{
 1517|  2.46k|    fe t0;
 1518|  2.46k|    fe t1;
 1519|  2.46k|    fe t2;
 1520|  2.46k|    fe t3;
 1521|  2.46k|    int i;
 1522|       |
 1523|       |    /*
 1524|       |     * Compute z ** -1 = z ** (2 ** 255 - 19 - 2) with the exponent as
 1525|       |     * 2 ** 255 - 21 = (2 ** 5) * (2 ** 250 - 1) + 11.
 1526|       |     */
 1527|       |
 1528|       |    /* t0 = z ** 2 */
 1529|  2.46k|    fe_sq(t0, z);
 1530|       |
 1531|       |    /* t1 = t0 ** (2 ** 2) = z ** 8 */
 1532|  2.46k|    fe_sq(t1, t0);
 1533|  2.46k|    fe_sq(t1, t1);
 1534|       |
 1535|       |    /* t1 = z * t1 = z ** 9 */
 1536|  2.46k|    fe_mul(t1, z, t1);
 1537|       |    /* t0 = t0 * t1 = z ** 11 -- stash t0 away for the end. */
 1538|  2.46k|    fe_mul(t0, t0, t1);
 1539|       |
 1540|       |    /* t2 = t0 ** 2 = z ** 22 */
 1541|  2.46k|    fe_sq(t2, t0);
 1542|       |
 1543|       |    /* t1 = t1 * t2 = z ** (2 ** 5 - 1) */
 1544|  2.46k|    fe_mul(t1, t1, t2);
 1545|       |
 1546|       |    /* t2 = t1 ** (2 ** 5) = z ** ((2 ** 5) * (2 ** 5 - 1)) */
 1547|  2.46k|    fe_sq(t2, t1);
 1548|  12.3k|    for (i = 1; i < 5; ++i) {
  ------------------
  |  Branch (1548:17): [True: 9.84k, False: 2.46k]
  ------------------
 1549|  9.84k|        fe_sq(t2, t2);
 1550|  9.84k|    }
 1551|       |
 1552|       |    /* t1 = t1 * t2 = z ** ((2 ** 5 + 1) * (2 ** 5 - 1)) = z ** (2 ** 10 - 1) */
 1553|  2.46k|    fe_mul(t1, t2, t1);
 1554|       |
 1555|       |    /* Continuing similarly... */
 1556|       |
 1557|       |    /* t2 = z ** (2 ** 20 - 1) */
 1558|  2.46k|    fe_sq(t2, t1);
 1559|  24.6k|    for (i = 1; i < 10; ++i) {
  ------------------
  |  Branch (1559:17): [True: 22.1k, False: 2.46k]
  ------------------
 1560|  22.1k|        fe_sq(t2, t2);
 1561|  22.1k|    }
 1562|  2.46k|    fe_mul(t2, t2, t1);
 1563|       |
 1564|       |    /* t2 = z ** (2 ** 40 - 1) */
 1565|  2.46k|    fe_sq(t3, t2);
 1566|  49.2k|    for (i = 1; i < 20; ++i) {
  ------------------
  |  Branch (1566:17): [True: 46.7k, False: 2.46k]
  ------------------
 1567|  46.7k|        fe_sq(t3, t3);
 1568|  46.7k|    }
 1569|  2.46k|    fe_mul(t2, t3, t2);
 1570|       |
 1571|       |    /* t2 = z ** (2 ** 10) * (2 ** 40 - 1) */
 1572|  27.0k|    for (i = 0; i < 10; ++i) {
  ------------------
  |  Branch (1572:17): [True: 24.6k, False: 2.46k]
  ------------------
 1573|  24.6k|        fe_sq(t2, t2);
 1574|  24.6k|    }
 1575|       |    /* t1 = z ** (2 ** 50 - 1) */
 1576|  2.46k|    fe_mul(t1, t2, t1);
 1577|       |
 1578|       |    /* t2 = z ** (2 ** 100 - 1) */
 1579|  2.46k|    fe_sq(t2, t1);
 1580|   123k|    for (i = 1; i < 50; ++i) {
  ------------------
  |  Branch (1580:17): [True: 120k, False: 2.46k]
  ------------------
 1581|   120k|        fe_sq(t2, t2);
 1582|   120k|    }
 1583|  2.46k|    fe_mul(t2, t2, t1);
 1584|       |
 1585|       |    /* t2 = z ** (2 ** 200 - 1) */
 1586|  2.46k|    fe_sq(t3, t2);
 1587|   246k|    for (i = 1; i < 100; ++i) {
  ------------------
  |  Branch (1587:17): [True: 243k, False: 2.46k]
  ------------------
 1588|   243k|        fe_sq(t3, t3);
 1589|   243k|    }
 1590|  2.46k|    fe_mul(t2, t3, t2);
 1591|       |
 1592|       |    /* t2 = z ** ((2 ** 50) * (2 ** 200 - 1) */
 1593|  2.46k|    fe_sq(t2, t2);
 1594|   123k|    for (i = 1; i < 50; ++i) {
  ------------------
  |  Branch (1594:17): [True: 120k, False: 2.46k]
  ------------------
 1595|   120k|        fe_sq(t2, t2);
 1596|   120k|    }
 1597|       |
 1598|       |    /* t1 = z ** (2 ** 250 - 1) */
 1599|  2.46k|    fe_mul(t1, t2, t1);
 1600|       |
 1601|       |    /* t1 = z ** ((2 ** 5) * (2 ** 250 - 1)) */
 1602|  2.46k|    fe_sq(t1, t1);
 1603|  12.3k|    for (i = 1; i < 5; ++i) {
  ------------------
  |  Branch (1603:17): [True: 9.84k, False: 2.46k]
  ------------------
 1604|  9.84k|        fe_sq(t1, t1);
 1605|  9.84k|    }
 1606|       |
 1607|       |    /* Recall t0 = z ** 11; out = z ** (2 ** 255 - 21) */
 1608|  2.46k|    fe_mul(out, t1, t0);
 1609|  2.46k|}
curve25519.c:fe_mul:
 1106|  1.16M|{
 1107|  1.16M|    int32_t f0 = f[0];
 1108|  1.16M|    int32_t f1 = f[1];
 1109|  1.16M|    int32_t f2 = f[2];
 1110|  1.16M|    int32_t f3 = f[3];
 1111|  1.16M|    int32_t f4 = f[4];
 1112|  1.16M|    int32_t f5 = f[5];
 1113|  1.16M|    int32_t f6 = f[6];
 1114|  1.16M|    int32_t f7 = f[7];
 1115|  1.16M|    int32_t f8 = f[8];
 1116|  1.16M|    int32_t f9 = f[9];
 1117|  1.16M|    int32_t g0 = g[0];
 1118|  1.16M|    int32_t g1 = g[1];
 1119|  1.16M|    int32_t g2 = g[2];
 1120|  1.16M|    int32_t g3 = g[3];
 1121|  1.16M|    int32_t g4 = g[4];
 1122|  1.16M|    int32_t g5 = g[5];
 1123|  1.16M|    int32_t g6 = g[6];
 1124|  1.16M|    int32_t g7 = g[7];
 1125|  1.16M|    int32_t g8 = g[8];
 1126|  1.16M|    int32_t g9 = g[9];
 1127|  1.16M|    int32_t g1_19 = 19 * g1; /* 1.959375*2^29 */
 1128|  1.16M|    int32_t g2_19 = 19 * g2; /* 1.959375*2^30; still ok */
 1129|  1.16M|    int32_t g3_19 = 19 * g3;
 1130|  1.16M|    int32_t g4_19 = 19 * g4;
 1131|  1.16M|    int32_t g5_19 = 19 * g5;
 1132|  1.16M|    int32_t g6_19 = 19 * g6;
 1133|  1.16M|    int32_t g7_19 = 19 * g7;
 1134|  1.16M|    int32_t g8_19 = 19 * g8;
 1135|  1.16M|    int32_t g9_19 = 19 * g9;
 1136|  1.16M|    int32_t f1_2 = 2 * f1;
 1137|  1.16M|    int32_t f3_2 = 2 * f3;
 1138|  1.16M|    int32_t f5_2 = 2 * f5;
 1139|  1.16M|    int32_t f7_2 = 2 * f7;
 1140|  1.16M|    int32_t f9_2 = 2 * f9;
 1141|  1.16M|    int64_t f0g0 = f0 * (int64_t)g0;
 1142|  1.16M|    int64_t f0g1 = f0 * (int64_t)g1;
 1143|  1.16M|    int64_t f0g2 = f0 * (int64_t)g2;
 1144|  1.16M|    int64_t f0g3 = f0 * (int64_t)g3;
 1145|  1.16M|    int64_t f0g4 = f0 * (int64_t)g4;
 1146|  1.16M|    int64_t f0g5 = f0 * (int64_t)g5;
 1147|  1.16M|    int64_t f0g6 = f0 * (int64_t)g6;
 1148|  1.16M|    int64_t f0g7 = f0 * (int64_t)g7;
 1149|  1.16M|    int64_t f0g8 = f0 * (int64_t)g8;
 1150|  1.16M|    int64_t f0g9 = f0 * (int64_t)g9;
 1151|  1.16M|    int64_t f1g0 = f1 * (int64_t)g0;
 1152|  1.16M|    int64_t f1g1_2 = f1_2 * (int64_t)g1;
 1153|  1.16M|    int64_t f1g2 = f1 * (int64_t)g2;
 1154|  1.16M|    int64_t f1g3_2 = f1_2 * (int64_t)g3;
 1155|  1.16M|    int64_t f1g4 = f1 * (int64_t)g4;
 1156|  1.16M|    int64_t f1g5_2 = f1_2 * (int64_t)g5;
 1157|  1.16M|    int64_t f1g6 = f1 * (int64_t)g6;
 1158|  1.16M|    int64_t f1g7_2 = f1_2 * (int64_t)g7;
 1159|  1.16M|    int64_t f1g8 = f1 * (int64_t)g8;
 1160|  1.16M|    int64_t f1g9_38 = f1_2 * (int64_t)g9_19;
 1161|  1.16M|    int64_t f2g0 = f2 * (int64_t)g0;
 1162|  1.16M|    int64_t f2g1 = f2 * (int64_t)g1;
 1163|  1.16M|    int64_t f2g2 = f2 * (int64_t)g2;
 1164|  1.16M|    int64_t f2g3 = f2 * (int64_t)g3;
 1165|  1.16M|    int64_t f2g4 = f2 * (int64_t)g4;
 1166|  1.16M|    int64_t f2g5 = f2 * (int64_t)g5;
 1167|  1.16M|    int64_t f2g6 = f2 * (int64_t)g6;
 1168|  1.16M|    int64_t f2g7 = f2 * (int64_t)g7;
 1169|  1.16M|    int64_t f2g8_19 = f2 * (int64_t)g8_19;
 1170|  1.16M|    int64_t f2g9_19 = f2 * (int64_t)g9_19;
 1171|  1.16M|    int64_t f3g0 = f3 * (int64_t)g0;
 1172|  1.16M|    int64_t f3g1_2 = f3_2 * (int64_t)g1;
 1173|  1.16M|    int64_t f3g2 = f3 * (int64_t)g2;
 1174|  1.16M|    int64_t f3g3_2 = f3_2 * (int64_t)g3;
 1175|  1.16M|    int64_t f3g4 = f3 * (int64_t)g4;
 1176|  1.16M|    int64_t f3g5_2 = f3_2 * (int64_t)g5;
 1177|  1.16M|    int64_t f3g6 = f3 * (int64_t)g6;
 1178|  1.16M|    int64_t f3g7_38 = f3_2 * (int64_t)g7_19;
 1179|  1.16M|    int64_t f3g8_19 = f3 * (int64_t)g8_19;
 1180|  1.16M|    int64_t f3g9_38 = f3_2 * (int64_t)g9_19;
 1181|  1.16M|    int64_t f4g0 = f4 * (int64_t)g0;
 1182|  1.16M|    int64_t f4g1 = f4 * (int64_t)g1;
 1183|  1.16M|    int64_t f4g2 = f4 * (int64_t)g2;
 1184|  1.16M|    int64_t f4g3 = f4 * (int64_t)g3;
 1185|  1.16M|    int64_t f4g4 = f4 * (int64_t)g4;
 1186|  1.16M|    int64_t f4g5 = f4 * (int64_t)g5;
 1187|  1.16M|    int64_t f4g6_19 = f4 * (int64_t)g6_19;
 1188|  1.16M|    int64_t f4g7_19 = f4 * (int64_t)g7_19;
 1189|  1.16M|    int64_t f4g8_19 = f4 * (int64_t)g8_19;
 1190|  1.16M|    int64_t f4g9_19 = f4 * (int64_t)g9_19;
 1191|  1.16M|    int64_t f5g0 = f5 * (int64_t)g0;
 1192|  1.16M|    int64_t f5g1_2 = f5_2 * (int64_t)g1;
 1193|  1.16M|    int64_t f5g2 = f5 * (int64_t)g2;
 1194|  1.16M|    int64_t f5g3_2 = f5_2 * (int64_t)g3;
 1195|  1.16M|    int64_t f5g4 = f5 * (int64_t)g4;
 1196|  1.16M|    int64_t f5g5_38 = f5_2 * (int64_t)g5_19;
 1197|  1.16M|    int64_t f5g6_19 = f5 * (int64_t)g6_19;
 1198|  1.16M|    int64_t f5g7_38 = f5_2 * (int64_t)g7_19;
 1199|  1.16M|    int64_t f5g8_19 = f5 * (int64_t)g8_19;
 1200|  1.16M|    int64_t f5g9_38 = f5_2 * (int64_t)g9_19;
 1201|  1.16M|    int64_t f6g0 = f6 * (int64_t)g0;
 1202|  1.16M|    int64_t f6g1 = f6 * (int64_t)g1;
 1203|  1.16M|    int64_t f6g2 = f6 * (int64_t)g2;
 1204|  1.16M|    int64_t f6g3 = f6 * (int64_t)g3;
 1205|  1.16M|    int64_t f6g4_19 = f6 * (int64_t)g4_19;
 1206|  1.16M|    int64_t f6g5_19 = f6 * (int64_t)g5_19;
 1207|  1.16M|    int64_t f6g6_19 = f6 * (int64_t)g6_19;
 1208|  1.16M|    int64_t f6g7_19 = f6 * (int64_t)g7_19;
 1209|  1.16M|    int64_t f6g8_19 = f6 * (int64_t)g8_19;
 1210|  1.16M|    int64_t f6g9_19 = f6 * (int64_t)g9_19;
 1211|  1.16M|    int64_t f7g0 = f7 * (int64_t)g0;
 1212|  1.16M|    int64_t f7g1_2 = f7_2 * (int64_t)g1;
 1213|  1.16M|    int64_t f7g2 = f7 * (int64_t)g2;
 1214|  1.16M|    int64_t f7g3_38 = f7_2 * (int64_t)g3_19;
 1215|  1.16M|    int64_t f7g4_19 = f7 * (int64_t)g4_19;
 1216|  1.16M|    int64_t f7g5_38 = f7_2 * (int64_t)g5_19;
 1217|  1.16M|    int64_t f7g6_19 = f7 * (int64_t)g6_19;
 1218|  1.16M|    int64_t f7g7_38 = f7_2 * (int64_t)g7_19;
 1219|  1.16M|    int64_t f7g8_19 = f7 * (int64_t)g8_19;
 1220|  1.16M|    int64_t f7g9_38 = f7_2 * (int64_t)g9_19;
 1221|  1.16M|    int64_t f8g0 = f8 * (int64_t)g0;
 1222|  1.16M|    int64_t f8g1 = f8 * (int64_t)g1;
 1223|  1.16M|    int64_t f8g2_19 = f8 * (int64_t)g2_19;
 1224|  1.16M|    int64_t f8g3_19 = f8 * (int64_t)g3_19;
 1225|  1.16M|    int64_t f8g4_19 = f8 * (int64_t)g4_19;
 1226|  1.16M|    int64_t f8g5_19 = f8 * (int64_t)g5_19;
 1227|  1.16M|    int64_t f8g6_19 = f8 * (int64_t)g6_19;
 1228|  1.16M|    int64_t f8g7_19 = f8 * (int64_t)g7_19;
 1229|  1.16M|    int64_t f8g8_19 = f8 * (int64_t)g8_19;
 1230|  1.16M|    int64_t f8g9_19 = f8 * (int64_t)g9_19;
 1231|  1.16M|    int64_t f9g0 = f9 * (int64_t)g0;
 1232|  1.16M|    int64_t f9g1_38 = f9_2 * (int64_t)g1_19;
 1233|  1.16M|    int64_t f9g2_19 = f9 * (int64_t)g2_19;
 1234|  1.16M|    int64_t f9g3_38 = f9_2 * (int64_t)g3_19;
 1235|  1.16M|    int64_t f9g4_19 = f9 * (int64_t)g4_19;
 1236|  1.16M|    int64_t f9g5_38 = f9_2 * (int64_t)g5_19;
 1237|  1.16M|    int64_t f9g6_19 = f9 * (int64_t)g6_19;
 1238|  1.16M|    int64_t f9g7_38 = f9_2 * (int64_t)g7_19;
 1239|  1.16M|    int64_t f9g8_19 = f9 * (int64_t)g8_19;
 1240|  1.16M|    int64_t f9g9_38 = f9_2 * (int64_t)g9_19;
 1241|  1.16M|    int64_t h0 = f0g0 + f1g9_38 + f2g8_19 + f3g7_38 + f4g6_19 + f5g5_38 + f6g4_19 + f7g3_38 + f8g2_19 + f9g1_38;
 1242|  1.16M|    int64_t h1 = f0g1 + f1g0 + f2g9_19 + f3g8_19 + f4g7_19 + f5g6_19 + f6g5_19 + f7g4_19 + f8g3_19 + f9g2_19;
 1243|  1.16M|    int64_t h2 = f0g2 + f1g1_2 + f2g0 + f3g9_38 + f4g8_19 + f5g7_38 + f6g6_19 + f7g5_38 + f8g4_19 + f9g3_38;
 1244|  1.16M|    int64_t h3 = f0g3 + f1g2 + f2g1 + f3g0 + f4g9_19 + f5g8_19 + f6g7_19 + f7g6_19 + f8g5_19 + f9g4_19;
 1245|  1.16M|    int64_t h4 = f0g4 + f1g3_2 + f2g2 + f3g1_2 + f4g0 + f5g9_38 + f6g8_19 + f7g7_38 + f8g6_19 + f9g5_38;
 1246|  1.16M|    int64_t h5 = f0g5 + f1g4 + f2g3 + f3g2 + f4g1 + f5g0 + f6g9_19 + f7g8_19 + f8g7_19 + f9g6_19;
 1247|  1.16M|    int64_t h6 = f0g6 + f1g5_2 + f2g4 + f3g3_2 + f4g2 + f5g1_2 + f6g0 + f7g9_38 + f8g8_19 + f9g7_38;
 1248|  1.16M|    int64_t h7 = f0g7 + f1g6 + f2g5 + f3g4 + f4g3 + f5g2 + f6g1 + f7g0 + f8g9_19 + f9g8_19;
 1249|  1.16M|    int64_t h8 = f0g8 + f1g7_2 + f2g6 + f3g5_2 + f4g4 + f5g3_2 + f6g2 + f7g1_2 + f8g0 + f9g9_38;
 1250|  1.16M|    int64_t h9 = f0g9 + f1g8 + f2g7 + f3g6 + f4g5 + f5g4 + f6g3 + f7g2 + f8g1 + f9g0;
 1251|  1.16M|    int64_t carry0;
 1252|  1.16M|    int64_t carry1;
 1253|  1.16M|    int64_t carry2;
 1254|  1.16M|    int64_t carry3;
 1255|  1.16M|    int64_t carry4;
 1256|  1.16M|    int64_t carry5;
 1257|  1.16M|    int64_t carry6;
 1258|  1.16M|    int64_t carry7;
 1259|  1.16M|    int64_t carry8;
 1260|  1.16M|    int64_t carry9;
 1261|       |
 1262|       |    /* |h0| <= (1.65*1.65*2^52*(1+19+19+19+19)+1.65*1.65*2^50*(38+38+38+38+38))
 1263|       |     *   i.e. |h0| <= 1.4*2^60; narrower ranges for h2, h4, h6, h8
 1264|       |     * |h1| <= (1.65*1.65*2^51*(1+1+19+19+19+19+19+19+19+19))
 1265|       |     *   i.e. |h1| <= 1.7*2^59; narrower ranges for h3, h5, h7, h9 */
 1266|       |
 1267|  1.16M|    carry0 = h0 + (1 << 25);
 1268|  1.16M|    h1 += carry0 >> 26;
 1269|  1.16M|    h0 -= carry0 & kTop38Bits;
 1270|  1.16M|    carry4 = h4 + (1 << 25);
 1271|  1.16M|    h5 += carry4 >> 26;
 1272|  1.16M|    h4 -= carry4 & kTop38Bits;
 1273|       |    /* |h0| <= 2^25 */
 1274|       |    /* |h4| <= 2^25 */
 1275|       |    /* |h1| <= 1.71*2^59 */
 1276|       |    /* |h5| <= 1.71*2^59 */
 1277|       |
 1278|  1.16M|    carry1 = h1 + (1 << 24);
 1279|  1.16M|    h2 += carry1 >> 25;
 1280|  1.16M|    h1 -= carry1 & kTop39Bits;
 1281|  1.16M|    carry5 = h5 + (1 << 24);
 1282|  1.16M|    h6 += carry5 >> 25;
 1283|  1.16M|    h5 -= carry5 & kTop39Bits;
 1284|       |    /* |h1| <= 2^24; from now on fits into int32 */
 1285|       |    /* |h5| <= 2^24; from now on fits into int32 */
 1286|       |    /* |h2| <= 1.41*2^60 */
 1287|       |    /* |h6| <= 1.41*2^60 */
 1288|       |
 1289|  1.16M|    carry2 = h2 + (1 << 25);
 1290|  1.16M|    h3 += carry2 >> 26;
 1291|  1.16M|    h2 -= carry2 & kTop38Bits;
 1292|  1.16M|    carry6 = h6 + (1 << 25);
 1293|  1.16M|    h7 += carry6 >> 26;
 1294|  1.16M|    h6 -= carry6 & kTop38Bits;
 1295|       |    /* |h2| <= 2^25; from now on fits into int32 unchanged */
 1296|       |    /* |h6| <= 2^25; from now on fits into int32 unchanged */
 1297|       |    /* |h3| <= 1.71*2^59 */
 1298|       |    /* |h7| <= 1.71*2^59 */
 1299|       |
 1300|  1.16M|    carry3 = h3 + (1 << 24);
 1301|  1.16M|    h4 += carry3 >> 25;
 1302|  1.16M|    h3 -= carry3 & kTop39Bits;
 1303|  1.16M|    carry7 = h7 + (1 << 24);
 1304|  1.16M|    h8 += carry7 >> 25;
 1305|  1.16M|    h7 -= carry7 & kTop39Bits;
 1306|       |    /* |h3| <= 2^24; from now on fits into int32 unchanged */
 1307|       |    /* |h7| <= 2^24; from now on fits into int32 unchanged */
 1308|       |    /* |h4| <= 1.72*2^34 */
 1309|       |    /* |h8| <= 1.41*2^60 */
 1310|       |
 1311|  1.16M|    carry4 = h4 + (1 << 25);
 1312|  1.16M|    h5 += carry4 >> 26;
 1313|  1.16M|    h4 -= carry4 & kTop38Bits;
 1314|  1.16M|    carry8 = h8 + (1 << 25);
 1315|  1.16M|    h9 += carry8 >> 26;
 1316|  1.16M|    h8 -= carry8 & kTop38Bits;
 1317|       |    /* |h4| <= 2^25; from now on fits into int32 unchanged */
 1318|       |    /* |h8| <= 2^25; from now on fits into int32 unchanged */
 1319|       |    /* |h5| <= 1.01*2^24 */
 1320|       |    /* |h9| <= 1.71*2^59 */
 1321|       |
 1322|  1.16M|    carry9 = h9 + (1 << 24);
 1323|  1.16M|    h0 += (carry9 >> 25) * 19;
 1324|  1.16M|    h9 -= carry9 & kTop39Bits;
 1325|       |    /* |h9| <= 2^24; from now on fits into int32 unchanged */
 1326|       |    /* |h0| <= 1.1*2^39 */
 1327|       |
 1328|  1.16M|    carry0 = h0 + (1 << 25);
 1329|  1.16M|    h1 += carry0 >> 26;
 1330|  1.16M|    h0 -= carry0 & kTop38Bits;
 1331|       |    /* |h0| <= 2^25; from now on fits into int32 unchanged */
 1332|       |    /* |h1| <= 1.01*2^24 */
 1333|       |
 1334|  1.16M|    h[0] = (int32_t)h0;
 1335|  1.16M|    h[1] = (int32_t)h1;
 1336|  1.16M|    h[2] = (int32_t)h2;
 1337|  1.16M|    h[3] = (int32_t)h3;
 1338|  1.16M|    h[4] = (int32_t)h4;
 1339|  1.16M|    h[5] = (int32_t)h5;
 1340|  1.16M|    h[6] = (int32_t)h6;
 1341|  1.16M|    h[7] = (int32_t)h7;
 1342|  1.16M|    h[8] = (int32_t)h8;
 1343|  1.16M|    h[9] = (int32_t)h9;
 1344|  1.16M|}
curve25519.c:fe_tobytes:
  924|  2.46k|{
  925|  2.46k|    int32_t h0 = h[0];
  926|  2.46k|    int32_t h1 = h[1];
  927|  2.46k|    int32_t h2 = h[2];
  928|  2.46k|    int32_t h3 = h[3];
  929|  2.46k|    int32_t h4 = h[4];
  930|  2.46k|    int32_t h5 = h[5];
  931|  2.46k|    int32_t h6 = h[6];
  932|  2.46k|    int32_t h7 = h[7];
  933|  2.46k|    int32_t h8 = h[8];
  934|  2.46k|    int32_t h9 = h[9];
  935|  2.46k|    int32_t q;
  936|       |
  937|  2.46k|    q = (19 * h9 + (((int32_t)1) << 24)) >> 25;
  938|  2.46k|    q = (h0 + q) >> 26;
  939|  2.46k|    q = (h1 + q) >> 25;
  940|  2.46k|    q = (h2 + q) >> 26;
  941|  2.46k|    q = (h3 + q) >> 25;
  942|  2.46k|    q = (h4 + q) >> 26;
  943|  2.46k|    q = (h5 + q) >> 25;
  944|  2.46k|    q = (h6 + q) >> 26;
  945|  2.46k|    q = (h7 + q) >> 25;
  946|  2.46k|    q = (h8 + q) >> 26;
  947|  2.46k|    q = (h9 + q) >> 25;
  948|       |
  949|       |    /* Goal: Output h-(2^255-19)q, which is between 0 and 2^255-20. */
  950|  2.46k|    h0 += 19 * q;
  951|       |    /* Goal: Output h-2^255 q, which is between 0 and 2^255-20. */
  952|       |
  953|  2.46k|    h1 += h0 >> 26;
  954|  2.46k|    h0 &= kBottom26Bits;
  955|  2.46k|    h2 += h1 >> 25;
  956|  2.46k|    h1 &= kBottom25Bits;
  957|  2.46k|    h3 += h2 >> 26;
  958|  2.46k|    h2 &= kBottom26Bits;
  959|  2.46k|    h4 += h3 >> 25;
  960|  2.46k|    h3 &= kBottom25Bits;
  961|  2.46k|    h5 += h4 >> 26;
  962|  2.46k|    h4 &= kBottom26Bits;
  963|  2.46k|    h6 += h5 >> 25;
  964|  2.46k|    h5 &= kBottom25Bits;
  965|  2.46k|    h7 += h6 >> 26;
  966|  2.46k|    h6 &= kBottom26Bits;
  967|  2.46k|    h8 += h7 >> 25;
  968|  2.46k|    h7 &= kBottom25Bits;
  969|  2.46k|    h9 += h8 >> 26;
  970|  2.46k|    h8 &= kBottom26Bits;
  971|  2.46k|    h9 &= kBottom25Bits;
  972|       |    /* h10 = carry9 */
  973|       |
  974|       |    /*
  975|       |     * Goal: Output h0+...+2^255 h10-2^255 q, which is between 0 and 2^255-20.
  976|       |     * Have h0+...+2^230 h9 between 0 and 2^255-1;
  977|       |     * evidently 2^255 h10-2^255 q = 0.
  978|       |     * Goal: Output h0+...+2^230 h9.
  979|       |     */
  980|  2.46k|    s[0] = (uint8_t)(h0 >> 0);
  981|  2.46k|    s[1] = (uint8_t)(h0 >> 8);
  982|  2.46k|    s[2] = (uint8_t)(h0 >> 16);
  983|  2.46k|    s[3] = (uint8_t)((h0 >> 24) | ((uint32_t)(h1) << 2));
  984|  2.46k|    s[4] = (uint8_t)(h1 >> 6);
  985|  2.46k|    s[5] = (uint8_t)(h1 >> 14);
  986|  2.46k|    s[6] = (uint8_t)((h1 >> 22) | ((uint32_t)(h2) << 3));
  987|  2.46k|    s[7] = (uint8_t)(h2 >> 5);
  988|  2.46k|    s[8] = (uint8_t)(h2 >> 13);
  989|  2.46k|    s[9] = (uint8_t)((h2 >> 21) | ((uint32_t)(h3) << 5));
  990|  2.46k|    s[10] = (uint8_t)(h3 >> 3);
  991|  2.46k|    s[11] = (uint8_t)(h3 >> 11);
  992|  2.46k|    s[12] = (uint8_t)((h3 >> 19) | ((uint32_t)(h4) << 6));
  993|  2.46k|    s[13] = (uint8_t)(h4 >> 2);
  994|  2.46k|    s[14] = (uint8_t)(h4 >> 10);
  995|  2.46k|    s[15] = (uint8_t)(h4 >> 18);
  996|  2.46k|    s[16] = (uint8_t)(h5 >> 0);
  997|  2.46k|    s[17] = (uint8_t)(h5 >> 8);
  998|  2.46k|    s[18] = (uint8_t)(h5 >> 16);
  999|  2.46k|    s[19] = (uint8_t)((h5 >> 24) | ((uint32_t)(h6) << 1));
 1000|  2.46k|    s[20] = (uint8_t)(h6 >> 7);
 1001|  2.46k|    s[21] = (uint8_t)(h6 >> 15);
 1002|  2.46k|    s[22] = (uint8_t)((h6 >> 23) | ((uint32_t)(h7) << 3));
 1003|  2.46k|    s[23] = (uint8_t)(h7 >> 5);
 1004|  2.46k|    s[24] = (uint8_t)(h7 >> 13);
 1005|  2.46k|    s[25] = (uint8_t)((h7 >> 21) | ((uint32_t)(h8) << 4));
 1006|  2.46k|    s[26] = (uint8_t)(h8 >> 4);
 1007|  2.46k|    s[27] = (uint8_t)(h8 >> 12);
 1008|  2.46k|    s[28] = (uint8_t)((h8 >> 20) | ((uint32_t)(h9) << 6));
 1009|  2.46k|    s[29] = (uint8_t)(h9 >> 2);
 1010|  2.46k|    s[30] = (uint8_t)(h9 >> 10);
 1011|  2.46k|    s[31] = (uint8_t)(h9 >> 18);
 1012|  2.46k|}

ec_ameth.c:eckey_pub_decode:
  101|  52.2k|{
  102|  52.2k|    const unsigned char *p = NULL;
  103|  52.2k|    int pklen;
  104|  52.2k|    EC_KEY *eckey = NULL;
  105|  52.2k|    X509_ALGOR *palg;
  106|  52.2k|    OSSL_LIB_CTX *libctx = NULL;
  107|  52.2k|    const char *propq = NULL;
  108|       |
  109|  52.2k|    if (!ossl_x509_PUBKEY_get0_libctx(&libctx, &propq, pubkey)
  ------------------
  |  Branch (109:9): [True: 0, False: 52.2k]
  ------------------
  110|  52.2k|        || !X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey))
  ------------------
  |  Branch (110:12): [True: 0, False: 52.2k]
  ------------------
  111|      0|        return 0;
  112|  52.2k|    eckey = ossl_ec_key_param_from_x509_algor(palg, libctx, propq);
  113|       |
  114|  52.2k|    if (!eckey)
  ------------------
  |  Branch (114:9): [True: 0, False: 52.2k]
  ------------------
  115|      0|        return 0;
  116|       |
  117|       |    /* We have parameters now set public key */
  118|  52.2k|    if (!o2i_ECPublicKey(&eckey, &p, pklen)) {
  ------------------
  |  Branch (118:9): [True: 0, False: 52.2k]
  ------------------
  119|      0|        ERR_raise(ERR_LIB_EC, EC_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  120|      0|        goto ecerr;
  121|      0|    }
  122|       |
  123|  52.2k|    EVP_PKEY_assign_EC_KEY(pkey, eckey);
  ------------------
  |  |  527|  52.2k|#define EVP_PKEY_assign_EC_KEY(pkey, eckey) EVP_PKEY_assign((pkey), \
  |  |  528|  52.2k|    EVP_PKEY_EC,                                                    \
  |  |  ------------------
  |  |  |  |   73|  52.2k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  |  |  ------------------
  |  |  |  |  |  |  178|  52.2k|#define NID_X9_62_id_ecPublicKey                408
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  529|  52.2k|    (eckey))
  ------------------
  124|  52.2k|    return 1;
  125|       |
  126|      0|ecerr:
  127|      0|    EC_KEY_free(eckey);
  128|      0|    return 0;
  129|  52.2k|}
ec_ameth.c:int_ec_free:
  273|  52.2k|{
  274|  52.2k|    EC_KEY_free(pkey->pkey.ec);
  275|  52.2k|}

o2i_ECPublicKey:
 1122|  52.2k|{
 1123|  52.2k|    EC_KEY *ret = NULL;
 1124|       |
 1125|  52.2k|    if (a == NULL || (*a) == NULL || (*a)->group == NULL) {
  ------------------
  |  Branch (1125:9): [True: 0, False: 52.2k]
  |  Branch (1125:22): [True: 0, False: 52.2k]
  |  Branch (1125:38): [True: 0, False: 52.2k]
  ------------------
 1126|       |        /*
 1127|       |         * sorry, but a EC_GROUP-structure is necessary to set the public key
 1128|       |         */
 1129|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1130|      0|        return 0;
 1131|      0|    }
 1132|  52.2k|    ret = *a;
 1133|       |    /* EC_KEY_opt2key updates dirty_cnt */
 1134|  52.2k|    if (!EC_KEY_oct2key(ret, *in, len, NULL)) {
  ------------------
  |  Branch (1134:9): [True: 0, False: 52.2k]
  ------------------
 1135|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1136|      0|        return 0;
 1137|      0|    }
 1138|  52.2k|    *in += len;
 1139|  52.2k|    return ret;
 1140|  52.2k|}
i2d_ECDSA_SIG:
 1232|  52.2k|{
 1233|  52.2k|    BUF_MEM *buf = NULL;
 1234|  52.2k|    size_t encoded_len;
 1235|  52.2k|    WPACKET pkt;
 1236|       |
 1237|  52.2k|    if (ppout == NULL) {
  ------------------
  |  Branch (1237:9): [True: 52.2k, False: 0]
  ------------------
 1238|  52.2k|        if (!WPACKET_init_null(&pkt, 0))
  ------------------
  |  Branch (1238:13): [True: 0, False: 52.2k]
  ------------------
 1239|      0|            return -1;
 1240|  52.2k|    } else if (*ppout == NULL) {
  ------------------
  |  Branch (1240:16): [True: 0, False: 0]
  ------------------
 1241|      0|        if ((buf = BUF_MEM_new()) == NULL
  ------------------
  |  Branch (1241:13): [True: 0, False: 0]
  ------------------
 1242|      0|            || !WPACKET_init_len(&pkt, buf, 0)) {
  ------------------
  |  Branch (1242:16): [True: 0, False: 0]
  ------------------
 1243|      0|            BUF_MEM_free(buf);
 1244|      0|            return -1;
 1245|      0|        }
 1246|      0|    } else {
 1247|      0|        if (!WPACKET_init_static_len(&pkt, *ppout, SIZE_MAX, 0))
  ------------------
  |  Branch (1247:13): [True: 0, False: 0]
  ------------------
 1248|      0|            return -1;
 1249|      0|    }
 1250|       |
 1251|  52.2k|    if (!ossl_encode_der_dsa_sig(&pkt, sig->r, sig->s)
  ------------------
  |  Branch (1251:9): [True: 0, False: 52.2k]
  ------------------
 1252|  52.2k|        || !WPACKET_get_total_written(&pkt, &encoded_len)
  ------------------
  |  Branch (1252:12): [True: 0, False: 52.2k]
  ------------------
 1253|  52.2k|        || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (1253:12): [True: 0, False: 52.2k]
  ------------------
 1254|      0|        BUF_MEM_free(buf);
 1255|      0|        WPACKET_cleanup(&pkt);
 1256|      0|        return -1;
 1257|      0|    }
 1258|       |
 1259|  52.2k|    if (ppout != NULL) {
  ------------------
  |  Branch (1259:9): [True: 0, False: 52.2k]
  ------------------
 1260|      0|        if (*ppout == NULL) {
  ------------------
  |  Branch (1260:13): [True: 0, False: 0]
  ------------------
 1261|      0|            *ppout = (unsigned char *)buf->data;
 1262|      0|            buf->data = NULL;
 1263|      0|            BUF_MEM_free(buf);
 1264|      0|        } else {
 1265|      0|            *ppout += encoded_len;
 1266|      0|        }
 1267|      0|    }
 1268|       |
 1269|  52.2k|    return (int)encoded_len;
 1270|  52.2k|}
ECDSA_size:
 1302|  52.2k|{
 1303|  52.2k|    int ret;
 1304|  52.2k|    ECDSA_SIG sig;
 1305|  52.2k|    const EC_GROUP *group;
 1306|  52.2k|    const BIGNUM *bn;
 1307|       |
 1308|  52.2k|    if (ec == NULL)
  ------------------
  |  Branch (1308:9): [True: 0, False: 52.2k]
  ------------------
 1309|      0|        return 0;
 1310|  52.2k|    group = EC_KEY_get0_group(ec);
 1311|  52.2k|    if (group == NULL)
  ------------------
  |  Branch (1311:9): [True: 0, False: 52.2k]
  ------------------
 1312|      0|        return 0;
 1313|       |
 1314|  52.2k|    bn = EC_GROUP_get0_order(group);
 1315|  52.2k|    if (bn == NULL)
  ------------------
  |  Branch (1315:9): [True: 0, False: 52.2k]
  ------------------
 1316|      0|        return 0;
 1317|       |
 1318|  52.2k|    sig.r = sig.s = (BIGNUM *)bn;
 1319|  52.2k|    ret = i2d_ECDSA_SIG(&sig, NULL);
 1320|       |
 1321|  52.2k|    if (ret < 0)
  ------------------
  |  Branch (1321:9): [True: 0, False: 52.2k]
  ------------------
 1322|      0|        ret = 0;
 1323|  52.2k|    return ret;
 1324|  52.2k|}

ossl_ec_check_group_type_id2name:
   76|  52.2k|{
   77|  52.2k|    size_t i, sz;
   78|       |
   79|  52.2k|    for (i = 0, sz = OSSL_NELEM(check_group_type_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|  52.2k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (79:63): [True: 52.2k, False: 0]
  ------------------
   80|  52.2k|        if (id == (int)check_group_type_nameid_map[i].id)
  ------------------
  |  Branch (80:13): [True: 52.2k, False: 0]
  ------------------
   81|  52.2k|            return check_group_type_nameid_map[i].ptr;
   82|  52.2k|    }
   83|      0|    return NULL;
   84|  52.2k|}
ossl_ec_pt_format_id2name:
  147|   104k|{
  148|   104k|    size_t i, sz;
  149|       |
  150|   104k|    for (i = 0, sz = OSSL_NELEM(format_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|   104k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (150:53): [True: 104k, False: 0]
  ------------------
  151|   104k|        if (id == (int)format_nameid_map[i].id)
  ------------------
  |  Branch (151:13): [True: 104k, False: 0]
  ------------------
  152|   104k|            return format_nameid_map[i].ptr;
  153|   104k|    }
  154|      0|    return NULL;
  155|   104k|}
ossl_ec_group_todata:
  292|  52.2k|{
  293|  52.2k|    int ret = 0, curve_nid, encoding_flag;
  294|  52.2k|    const char *encoding_name, *pt_form_name;
  295|  52.2k|    point_conversion_form_t genform;
  296|       |
  297|  52.2k|    if (group == NULL) {
  ------------------
  |  Branch (297:9): [True: 0, False: 52.2k]
  ------------------
  298|      0|        ERR_raise(ERR_LIB_EC, EC_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|        return 0;
  300|      0|    }
  301|       |
  302|  52.2k|    genform = EC_GROUP_get_point_conversion_form(group);
  303|  52.2k|    pt_form_name = ossl_ec_pt_format_id2name(genform);
  304|  52.2k|    if (pt_form_name == NULL
  ------------------
  |  Branch (304:9): [True: 0, False: 52.2k]
  ------------------
  305|  52.2k|        || !ossl_param_build_set_utf8_string(
  ------------------
  |  Branch (305:12): [True: 0, False: 52.2k]
  ------------------
  306|  52.2k|            tmpl, params,
  307|  52.2k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT, pt_form_name)) {
  ------------------
  |  |  394|  52.2k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  308|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FORM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  309|      0|        return 0;
  310|      0|    }
  311|  52.2k|    encoding_flag = EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE;
  ------------------
  |  |   31|  52.2k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  312|  52.2k|    encoding_name = ec_param_encoding_id2name(encoding_flag);
  313|  52.2k|    if (encoding_name == NULL
  ------------------
  |  Branch (313:9): [True: 0, False: 52.2k]
  ------------------
  314|  52.2k|        || !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (314:12): [True: 0, False: 52.2k]
  ------------------
  315|  52.2k|            OSSL_PKEY_PARAM_EC_ENCODING,
  ------------------
  |  |  387|  52.2k|# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
  ------------------
  316|  52.2k|            encoding_name)) {
  317|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  318|      0|        return 0;
  319|      0|    }
  320|       |
  321|  52.2k|    if (!ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (321:9): [True: 0, False: 52.2k]
  ------------------
  322|  52.2k|            OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS,
  ------------------
  |  |  386|  52.2k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  323|  52.2k|            group->decoded_from_explicit_params))
  324|      0|        return 0;
  325|       |
  326|  52.2k|    curve_nid = EC_GROUP_get_curve_name(group);
  327|       |
  328|       |    /*
  329|       |     * Get the explicit parameters in these two cases:
  330|       |     * - We do not have a template, i.e. specific parameters are requested
  331|       |     * - The curve is not a named curve
  332|       |     */
  333|  52.2k|    if (tmpl == NULL || curve_nid == NID_undef)
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (333:9): [True: 52.2k, False: 0]
  |  Branch (333:25): [True: 0, False: 0]
  ------------------
  334|  52.2k|        if (!ec_group_explicit_todata(group, tmpl, params, bnctx, genbuf))
  ------------------
  |  Branch (334:13): [True: 0, False: 52.2k]
  ------------------
  335|      0|            goto err;
  336|       |
  337|  52.2k|    if (curve_nid != NID_undef) {
  ------------------
  |  |   18|  52.2k|#define NID_undef                       0
  ------------------
  |  Branch (337:9): [True: 52.2k, False: 0]
  ------------------
  338|       |        /* Named curve */
  339|  52.2k|        const char *curve_name = OSSL_EC_curve_nid2name(curve_nid);
  340|       |
  341|  52.2k|        if (curve_name == NULL
  ------------------
  |  Branch (341:13): [True: 0, False: 52.2k]
  ------------------
  342|  52.2k|            || !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (342:16): [True: 0, False: 52.2k]
  ------------------
  343|  52.2k|                OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|  52.2k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
  344|  52.2k|                curve_name)) {
  345|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  346|      0|            goto err;
  347|      0|        }
  348|  52.2k|    }
  349|  52.2k|    ret = 1;
  350|  52.2k|err:
  351|  52.2k|    return ret;
  352|  52.2k|}
ossl_ec_key_is_foreign:
  586|  52.2k|{
  587|  52.2k|#ifndef FIPS_MODULE
  588|  52.2k|    if (ec->engine != NULL || EC_KEY_get_method(ec) != EC_KEY_OpenSSL())
  ------------------
  |  Branch (588:9): [True: 0, False: 52.2k]
  |  Branch (588:31): [True: 0, False: 52.2k]
  ------------------
  589|      0|        return 1;
  590|  52.2k|#endif
  591|  52.2k|    return 0;
  592|  52.2k|}
ossl_x509_algor_is_sm2:
  731|  52.2k|{
  732|  52.2k|    int ptype = 0;
  733|  52.2k|    const void *pval = NULL;
  734|       |
  735|  52.2k|    X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  736|       |
  737|  52.2k|    if (ptype == V_ASN1_OBJECT)
  ------------------
  |  |   70|  52.2k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (737:9): [True: 52.2k, False: 0]
  ------------------
  738|  52.2k|        return OBJ_obj2nid((ASN1_OBJECT *)pval) == NID_sm2;
  ------------------
  |  | 1255|  52.2k|#define NID_sm2         1172
  ------------------
  739|       |
  740|      0|    if (ptype == V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (740:9): [True: 0, False: 0]
  ------------------
  741|      0|        const ASN1_STRING *str = pval;
  742|      0|        const unsigned char *der = str->data;
  743|      0|        int derlen = str->length;
  744|      0|        EC_GROUP *group;
  745|      0|        int ret;
  746|       |
  747|      0|        if ((group = d2i_ECPKParameters(NULL, &der, derlen)) == NULL)
  ------------------
  |  Branch (747:13): [True: 0, False: 0]
  ------------------
  748|      0|            ret = 0;
  749|      0|        else
  750|      0|            ret = (EC_GROUP_get_curve_name(group) == NID_sm2);
  ------------------
  |  | 1255|      0|#define NID_sm2         1172
  ------------------
  751|       |
  752|      0|        EC_GROUP_free(group);
  753|      0|        return ret;
  754|      0|    }
  755|       |
  756|      0|    return 0;
  757|      0|}
ossl_ec_key_param_from_x509_algor:
  761|  52.2k|{
  762|  52.2k|    int ptype = 0;
  763|  52.2k|    const void *pval = NULL;
  764|  52.2k|    EC_KEY *eckey = NULL;
  765|  52.2k|    EC_GROUP *group = NULL;
  766|       |
  767|  52.2k|    X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  768|  52.2k|    if ((eckey = EC_KEY_new_ex(libctx, propq)) == NULL) {
  ------------------
  |  Branch (768:9): [True: 0, False: 52.2k]
  ------------------
  769|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  770|      0|        goto ecerr;
  771|      0|    }
  772|       |
  773|  52.2k|    if (ptype == V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|  52.2k|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (773:9): [True: 0, False: 52.2k]
  ------------------
  774|      0|        const ASN1_STRING *pstr = pval;
  775|      0|        const unsigned char *pm = pstr->data;
  776|      0|        int pmlen = pstr->length;
  777|       |
  778|      0|        if (d2i_ECParameters(&eckey, &pm, pmlen) == NULL) {
  ------------------
  |  Branch (778:13): [True: 0, False: 0]
  ------------------
  779|      0|            ERR_raise(ERR_LIB_EC, EC_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  780|      0|            goto ecerr;
  781|      0|        }
  782|  52.2k|    } else if (ptype == V_ASN1_OBJECT) {
  ------------------
  |  |   70|  52.2k|#define V_ASN1_OBJECT 6
  ------------------
  |  Branch (782:16): [True: 52.2k, False: 0]
  ------------------
  783|  52.2k|        const ASN1_OBJECT *poid = pval;
  784|       |
  785|       |        /*
  786|       |         * type == V_ASN1_OBJECT => the parameters are given by an asn1 OID
  787|       |         */
  788|       |
  789|  52.2k|        group = EC_GROUP_new_by_curve_name_ex(libctx, propq, OBJ_obj2nid(poid));
  790|  52.2k|        if (group == NULL)
  ------------------
  |  Branch (790:13): [True: 0, False: 52.2k]
  ------------------
  791|      0|            goto ecerr;
  792|  52.2k|        EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE);
  ------------------
  |  |   31|  52.2k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  793|  52.2k|        if (EC_KEY_set_group(eckey, group) == 0)
  ------------------
  |  Branch (793:13): [True: 0, False: 52.2k]
  ------------------
  794|      0|            goto ecerr;
  795|  52.2k|        EC_GROUP_free(group);
  796|  52.2k|    } else {
  797|      0|        ERR_raise(ERR_LIB_EC, EC_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  798|      0|        goto ecerr;
  799|      0|    }
  800|       |
  801|  52.2k|    return eckey;
  802|       |
  803|      0|ecerr:
  804|      0|    EC_KEY_free(eckey);
  805|      0|    EC_GROUP_free(group);
  806|       |    return NULL;
  807|  52.2k|}
ec_backend.c:ec_param_encoding_id2name:
   65|  52.2k|{
   66|  52.2k|    size_t i, sz;
   67|       |
   68|   104k|    for (i = 0, sz = OSSL_NELEM(encoding_nameid_map); i < sz; i++) {
  ------------------
  |  |   14|  52.2k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (68:55): [True: 104k, False: 0]
  ------------------
   69|   104k|        if (id == (int)encoding_nameid_map[i].id)
  ------------------
  |  Branch (69:13): [True: 52.2k, False: 52.2k]
  ------------------
   70|  52.2k|            return encoding_nameid_map[i].ptr;
   71|   104k|    }
   72|      0|    return NULL;
   73|  52.2k|}
ec_backend.c:ec_group_explicit_todata:
  160|  52.2k|{
  161|  52.2k|    int ret = 0, fid;
  162|  52.2k|    const char *field_type;
  163|  52.2k|    const OSSL_PARAM *param = NULL;
  164|  52.2k|    const OSSL_PARAM *param_p = NULL;
  165|  52.2k|    const OSSL_PARAM *param_a = NULL;
  166|  52.2k|    const OSSL_PARAM *param_b = NULL;
  167|       |
  168|  52.2k|    fid = EC_GROUP_get_field_type(group);
  169|       |
  170|  52.2k|    if (fid == NID_X9_62_prime_field) {
  ------------------
  |  |  152|  52.2k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (170:9): [True: 52.2k, False: 0]
  ------------------
  171|  52.2k|        field_type = SN_X9_62_prime_field;
  ------------------
  |  |  151|  52.2k|#define SN_X9_62_prime_field            "prime-field"
  ------------------
  172|  52.2k|    } else if (fid == NID_X9_62_characteristic_two_field) {
  ------------------
  |  |  156|      0|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (172:16): [True: 0, False: 0]
  ------------------
  173|       |#ifdef OPENSSL_NO_EC2M
  174|       |        ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
  175|       |        goto err;
  176|       |#else
  177|      0|        field_type = SN_X9_62_characteristic_two_field;
  ------------------
  |  |  155|      0|#define SN_X9_62_characteristic_two_field               "characteristic-two-field"
  ------------------
  178|      0|#endif
  179|      0|    } else {
  180|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  181|      0|        return 0;
  182|      0|    }
  183|       |
  184|  52.2k|    param_p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_P);
  ------------------
  |  |  393|  52.2k|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  185|  52.2k|    param_a = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_A);
  ------------------
  |  |  377|  52.2k|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  186|  52.2k|    param_b = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_B);
  ------------------
  |  |  378|  52.2k|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  187|  52.2k|    if (tmpl != NULL || param_p != NULL || param_a != NULL || param_b != NULL) {
  ------------------
  |  Branch (187:9): [True: 0, False: 52.2k]
  |  Branch (187:25): [True: 0, False: 52.2k]
  |  Branch (187:44): [True: 0, False: 52.2k]
  |  Branch (187:63): [True: 0, False: 52.2k]
  ------------------
  188|      0|        BIGNUM *p = BN_CTX_get(bnctx);
  189|      0|        BIGNUM *a = BN_CTX_get(bnctx);
  190|      0|        BIGNUM *b = BN_CTX_get(bnctx);
  191|       |
  192|      0|        if (b == NULL) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  194|      0|            goto err;
  195|      0|        }
  196|       |
  197|      0|        if (!EC_GROUP_get_curve(group, p, a, b, bnctx)) {
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|            goto err;
  200|      0|        }
  201|      0|        if (!ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_P, p)
  ------------------
  |  |  393|      0|# define OSSL_PKEY_PARAM_EC_P "p"
  ------------------
  |  Branch (201:13): [True: 0, False: 0]
  ------------------
  202|      0|            || !ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_A, a)
  ------------------
  |  |  377|      0|# define OSSL_PKEY_PARAM_EC_A "a"
  ------------------
  |  Branch (202:16): [True: 0, False: 0]
  ------------------
  203|      0|            || !ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_B, b)) {
  ------------------
  |  |  378|      0|# define OSSL_PKEY_PARAM_EC_B "b"
  ------------------
  |  Branch (203:16): [True: 0, False: 0]
  ------------------
  204|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  205|      0|            goto err;
  206|      0|        }
  207|      0|    }
  208|       |
  209|  52.2k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ORDER);
  ------------------
  |  |  392|  52.2k|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  210|  52.2k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (210:9): [True: 0, False: 52.2k]
  |  Branch (210:25): [True: 0, False: 52.2k]
  ------------------
  211|      0|        const BIGNUM *order = EC_GROUP_get0_order(group);
  212|       |
  213|      0|        if (order == NULL) {
  ------------------
  |  Branch (213:13): [True: 0, False: 0]
  ------------------
  214|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  215|      0|            goto err;
  216|      0|        }
  217|      0|        if (!ossl_param_build_set_bn(tmpl, params, OSSL_PKEY_PARAM_EC_ORDER,
  ------------------
  |  |  392|      0|# define OSSL_PKEY_PARAM_EC_ORDER "order"
  ------------------
  |  Branch (217:13): [True: 0, False: 0]
  ------------------
  218|      0|                order)) {
  219|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  220|      0|            goto err;
  221|      0|        }
  222|      0|    }
  223|       |
  224|  52.2k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_FIELD_TYPE);
  ------------------
  |  |  388|  52.2k|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  225|  52.2k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (225:9): [True: 0, False: 52.2k]
  |  Branch (225:25): [True: 0, False: 52.2k]
  ------------------
  226|      0|        if (!ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  ------------------
  227|      0|                OSSL_PKEY_PARAM_EC_FIELD_TYPE,
  ------------------
  |  |  388|      0|# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
  ------------------
  228|      0|                field_type)) {
  229|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  230|      0|            goto err;
  231|      0|        }
  232|      0|    }
  233|       |
  234|  52.2k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_GENERATOR);
  ------------------
  |  |  389|  52.2k|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  235|  52.2k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (235:9): [True: 0, False: 52.2k]
  |  Branch (235:25): [True: 0, False: 52.2k]
  ------------------
  236|      0|        size_t genbuf_len;
  237|      0|        const EC_POINT *genpt = EC_GROUP_get0_generator(group);
  238|      0|        point_conversion_form_t genform = EC_GROUP_get_point_conversion_form(group);
  239|       |
  240|      0|        if (genpt == NULL) {
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  ------------------
  241|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  242|      0|            goto err;
  243|      0|        }
  244|      0|        genbuf_len = EC_POINT_point2buf(group, genpt, genform, genbuf, bnctx);
  245|      0|        if (genbuf_len == 0) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_GENERATOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|            goto err;
  248|      0|        }
  249|      0|        if (!ossl_param_build_set_octet_string(tmpl, params,
  ------------------
  |  Branch (249:13): [True: 0, False: 0]
  ------------------
  250|      0|                OSSL_PKEY_PARAM_EC_GENERATOR,
  ------------------
  |  |  389|      0|# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
  ------------------
  251|      0|                *genbuf, genbuf_len)) {
  252|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|            goto err;
  254|      0|        }
  255|      0|    }
  256|       |
  257|  52.2k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_COFACTOR);
  ------------------
  |  |  385|  52.2k|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  258|  52.2k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (258:9): [True: 0, False: 52.2k]
  |  Branch (258:25): [True: 0, False: 52.2k]
  ------------------
  259|      0|        const BIGNUM *cofactor = EC_GROUP_get0_cofactor(group);
  260|       |
  261|      0|        if (cofactor != NULL
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            && !ossl_param_build_set_bn(tmpl, params,
  ------------------
  |  Branch (262:16): [True: 0, False: 0]
  ------------------
  263|      0|                OSSL_PKEY_PARAM_EC_COFACTOR, cofactor)) {
  ------------------
  |  |  385|      0|# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
  ------------------
  264|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  265|      0|            goto err;
  266|      0|        }
  267|      0|    }
  268|       |
  269|  52.2k|    param = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_SEED);
  ------------------
  |  |  397|  52.2k|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  270|  52.2k|    if (tmpl != NULL || param != NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 52.2k]
  |  Branch (270:25): [True: 0, False: 52.2k]
  ------------------
  271|      0|        unsigned char *seed = EC_GROUP_get0_seed(group);
  272|      0|        size_t seed_len = EC_GROUP_get_seed_len(group);
  273|       |
  274|      0|        if (seed != NULL
  ------------------
  |  Branch (274:13): [True: 0, False: 0]
  ------------------
  275|      0|            && seed_len > 0
  ------------------
  |  Branch (275:16): [True: 0, False: 0]
  ------------------
  276|      0|            && !ossl_param_build_set_octet_string(tmpl, params,
  ------------------
  |  Branch (276:16): [True: 0, False: 0]
  ------------------
  277|      0|                OSSL_PKEY_PARAM_EC_SEED,
  ------------------
  |  |  397|      0|# define OSSL_PKEY_PARAM_EC_SEED "seed"
  ------------------
  278|      0|                seed, seed_len)) {
  279|      0|            ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  280|      0|            goto err;
  281|      0|        }
  282|      0|    }
  283|  52.2k|    ret = 1;
  284|  52.2k|err:
  285|  52.2k|    return ret;
  286|  52.2k|}

EC_GROUP_new_by_curve_name_ex:
 3190|  52.2k|{
 3191|  52.2k|    EC_GROUP *ret = NULL;
 3192|  52.2k|    const ec_list_element *curve;
 3193|       |
 3194|  52.2k|    if ((curve = ec_curve_nid2curve(nid)) == NULL
  ------------------
  |  Branch (3194:9): [True: 0, False: 52.2k]
  ------------------
 3195|  52.2k|        || (ret = ec_group_new_from_data(libctx, propq, *curve)) == NULL) {
  ------------------
  |  Branch (3195:12): [True: 0, False: 52.2k]
  ------------------
 3196|      0|#ifndef FIPS_MODULE
 3197|      0|        ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   88|      0|#define ERR_LIB_EC 16
  ------------------
                      ERR_raise_data(ERR_LIB_EC, EC_R_UNKNOWN_GROUP,
  ------------------
  |  |   95|      0|#define EC_R_UNKNOWN_GROUP 129
  ------------------
 3198|      0|            "name=%s", OBJ_nid2sn(nid));
 3199|       |#else
 3200|       |        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_GROUP);
 3201|       |#endif
 3202|      0|        return NULL;
 3203|      0|    }
 3204|       |
 3205|  52.2k|    return ret;
 3206|  52.2k|}
ec_curve.c:ec_curve_nid2curve:
 3013|  52.2k|{
 3014|  52.2k|    size_t i;
 3015|       |
 3016|  52.2k|    if (nid <= 0)
  ------------------
  |  Branch (3016:9): [True: 0, False: 52.2k]
  ------------------
 3017|      0|        return NULL;
 3018|       |
 3019|   668k|    for (i = 0; i < curve_list_length; i++) {
  ------------------
  |  | 3010|   668k|#define curve_list_length OSSL_NELEM(curve_list)
  |  |  ------------------
  |  |  |  |   14|   668k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3019:17): [True: 668k, False: 0]
  ------------------
 3020|   668k|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (3020:13): [True: 52.2k, False: 616k]
  ------------------
 3021|  52.2k|            return &curve_list[i];
 3022|   668k|    }
 3023|      0|    return NULL;
 3024|  52.2k|}
ec_curve.c:ec_group_new_from_data:
 3029|  52.2k|{
 3030|  52.2k|    EC_GROUP *group = NULL;
 3031|  52.2k|    EC_POINT *P = NULL;
 3032|  52.2k|    BN_CTX *ctx = NULL;
 3033|  52.2k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *order = NULL;
 3034|  52.2k|    int ok = 0;
 3035|  52.2k|    int seed_len, param_len;
 3036|  52.2k|    const EC_METHOD *meth;
 3037|  52.2k|    const EC_CURVE_DATA *data;
 3038|  52.2k|    const unsigned char *params;
 3039|       |
 3040|       |    /* If no curve data curve method must handle everything */
 3041|  52.2k|    if (curve.data == NULL)
  ------------------
  |  Branch (3041:9): [True: 0, False: 52.2k]
  ------------------
 3042|      0|        return ossl_ec_group_new_ex(libctx, propq,
 3043|      0|            curve.meth != NULL ? curve.meth() : NULL);
  ------------------
  |  Branch (3043:13): [True: 0, False: 0]
  ------------------
 3044|       |
 3045|  52.2k|    if ((ctx = BN_CTX_new_ex(libctx)) == NULL) {
  ------------------
  |  Branch (3045:9): [True: 0, False: 52.2k]
  ------------------
 3046|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3047|      0|        goto err;
 3048|      0|    }
 3049|       |
 3050|  52.2k|    data = curve.data;
 3051|  52.2k|    seed_len = data->seed_len;
 3052|  52.2k|    param_len = data->param_len;
 3053|  52.2k|    params = (const unsigned char *)(data + 1); /* skip header */
 3054|       |
 3055|  52.2k|    if (curve.meth != NULL) {
  ------------------
  |  Branch (3055:9): [True: 52.2k, False: 0]
  ------------------
 3056|  52.2k|        meth = curve.meth();
 3057|  52.2k|        if ((group = ossl_ec_group_new_ex(libctx, propq, meth)) == NULL) {
  ------------------
  |  Branch (3057:13): [True: 0, False: 52.2k]
  ------------------
 3058|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3059|      0|            goto err;
 3060|      0|        }
 3061|  52.2k|        if (group->meth->group_full_init != NULL) {
  ------------------
  |  Branch (3061:13): [True: 5.22k, False: 47.0k]
  ------------------
 3062|  5.22k|            if (!group->meth->group_full_init(group, params)) {
  ------------------
  |  Branch (3062:17): [True: 0, False: 5.22k]
  ------------------
 3063|      0|                ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3064|      0|                goto err;
 3065|      0|            }
 3066|  5.22k|            EC_GROUP_set_curve_name(group, curve.nid);
 3067|  5.22k|            BN_CTX_free(ctx);
 3068|  5.22k|            return group;
 3069|  5.22k|        }
 3070|  52.2k|    }
 3071|       |
 3072|  47.0k|    params += seed_len; /* skip seed */
 3073|       |
 3074|  47.0k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3074:9): [True: 0, False: 47.0k]
  ------------------
 3075|  47.0k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3075:12): [True: 0, False: 47.0k]
  ------------------
 3076|  47.0k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (3076:12): [True: 0, False: 47.0k]
  ------------------
 3077|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3078|      0|        goto err;
 3079|      0|    }
 3080|       |
 3081|  47.0k|    if (group != NULL) {
  ------------------
  |  Branch (3081:9): [True: 47.0k, False: 0]
  ------------------
 3082|  47.0k|        if (group->meth->group_set_curve(group, p, a, b, ctx) == 0) {
  ------------------
  |  Branch (3082:13): [True: 0, False: 47.0k]
  ------------------
 3083|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3084|      0|            goto err;
 3085|      0|        }
 3086|  47.0k|    } else if (data->field_type == NID_X9_62_prime_field) {
  ------------------
  |  |  152|      0|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (3086:16): [True: 0, False: 0]
  ------------------
 3087|      0|        if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (3087:13): [True: 0, False: 0]
  ------------------
 3088|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3089|      0|            goto err;
 3090|      0|        }
 3091|      0|    }
 3092|      0|#ifndef OPENSSL_NO_EC2M
 3093|      0|    else { /* field_type ==
 3094|       |            * NID_X9_62_characteristic_two_field */
 3095|       |
 3096|      0|        if ((group = EC_GROUP_new_curve_GF2m(p, a, b, ctx)) == NULL) {
  ------------------
  |  Branch (3096:13): [True: 0, False: 0]
  ------------------
 3097|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3098|      0|            goto err;
 3099|      0|        }
 3100|      0|    }
 3101|  47.0k|#endif
 3102|       |
 3103|  47.0k|    EC_GROUP_set_curve_name(group, curve.nid);
 3104|       |
 3105|  47.0k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (3105:9): [True: 0, False: 47.0k]
  ------------------
 3106|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3107|      0|        goto err;
 3108|      0|    }
 3109|       |
 3110|  47.0k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3110:9): [True: 0, False: 47.0k]
  ------------------
 3111|  47.0k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (3111:12): [True: 0, False: 47.0k]
  ------------------
 3112|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3113|      0|        goto err;
 3114|      0|    }
 3115|  47.0k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (3115:9): [True: 0, False: 47.0k]
  ------------------
 3116|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3117|      0|        goto err;
 3118|      0|    }
 3119|  47.0k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (3119:9): [True: 0, False: 47.0k]
  ------------------
 3120|  47.0k|        || !BN_set_word(x, (BN_ULONG)data->cofactor)) {
  ------------------
  |  Branch (3120:12): [True: 0, False: 47.0k]
  ------------------
 3121|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3122|      0|        goto err;
 3123|      0|    }
 3124|  47.0k|    if (!EC_GROUP_set_generator(group, P, order, x)) {
  ------------------
  |  Branch (3124:9): [True: 0, False: 47.0k]
  ------------------
 3125|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3126|      0|        goto err;
 3127|      0|    }
 3128|  47.0k|    if (seed_len) {
  ------------------
  |  Branch (3128:9): [True: 47.0k, False: 0]
  ------------------
 3129|  47.0k|        if (!EC_GROUP_set_seed(group, params - seed_len, seed_len)) {
  ------------------
  |  Branch (3129:13): [True: 0, False: 47.0k]
  ------------------
 3130|      0|            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3131|      0|            goto err;
 3132|      0|        }
 3133|  47.0k|    }
 3134|       |
 3135|  47.0k|#ifndef FIPS_MODULE
 3136|  47.0k|    if (EC_GROUP_get_asn1_flag(group) == OPENSSL_EC_NAMED_CURVE) {
  ------------------
  |  |   31|  47.0k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  |  Branch (3136:9): [True: 47.0k, False: 0]
  ------------------
 3137|       |        /*
 3138|       |         * Some curves don't have an associated OID: for those we should not
 3139|       |         * default to `OPENSSL_EC_NAMED_CURVE` encoding of parameters and
 3140|       |         * instead set the ASN1 flag to `OPENSSL_EC_EXPLICIT_CURVE`.
 3141|       |         *
 3142|       |         * Note that `OPENSSL_EC_NAMED_CURVE` is set as the default ASN1 flag on
 3143|       |         * `EC_GROUP_new()`, when we don't have enough elements to determine if
 3144|       |         * an OID for the curve name actually exists.
 3145|       |         * We could implement this check on `EC_GROUP_set_curve_name()` but
 3146|       |         * overloading the simple setter with this lookup could have a negative
 3147|       |         * performance impact and unexpected consequences.
 3148|       |         */
 3149|  47.0k|        ASN1_OBJECT *asn1obj = OBJ_nid2obj(curve.nid);
 3150|       |
 3151|  47.0k|        if (asn1obj == NULL) {
  ------------------
  |  Branch (3151:13): [True: 0, False: 47.0k]
  ------------------
 3152|      0|            ERR_raise(ERR_LIB_EC, ERR_R_OBJ_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3153|      0|            goto err;
 3154|      0|        }
 3155|  47.0k|        if (OBJ_length(asn1obj) == 0)
  ------------------
  |  Branch (3155:13): [True: 0, False: 47.0k]
  ------------------
 3156|      0|            EC_GROUP_set_asn1_flag(group, OPENSSL_EC_EXPLICIT_CURVE);
  ------------------
  |  |   30|      0|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
 3157|       |
 3158|  47.0k|        ASN1_OBJECT_free(asn1obj);
 3159|  47.0k|    }
 3160|       |#else
 3161|       |    /*
 3162|       |     * Inside the FIPS module we do not support explicit curves anyway
 3163|       |     * so the above check is not necessary.
 3164|       |     *
 3165|       |     * Skipping it is also necessary because `OBJ_length()` and
 3166|       |     * `ASN1_OBJECT_free()` are not available within the FIPS module
 3167|       |     * boundaries.
 3168|       |     */
 3169|       |#endif
 3170|       |
 3171|  47.0k|    ok = 1;
 3172|  47.0k|err:
 3173|  47.0k|    if (!ok) {
  ------------------
  |  Branch (3173:9): [True: 0, False: 47.0k]
  ------------------
 3174|      0|        EC_GROUP_free(group);
 3175|       |        group = NULL;
 3176|      0|    }
 3177|  47.0k|    EC_POINT_free(P);
 3178|  47.0k|    BN_CTX_free(ctx);
 3179|  47.0k|    BN_free(p);
 3180|  47.0k|    BN_free(a);
 3181|  47.0k|    BN_free(b);
 3182|  47.0k|    BN_free(order);
 3183|  47.0k|    BN_free(x);
 3184|  47.0k|    BN_free(y);
 3185|  47.0k|    return group;
 3186|  47.0k|}

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

EC_KEY_new_ex:
   41|  52.2k|{
   42|       |    return ossl_ec_key_new_method_int(ctx, propq, NULL);
   43|  52.2k|}
EC_KEY_free:
   72|   156k|{
   73|   156k|    int i;
   74|       |
   75|   156k|    if (r == NULL)
  ------------------
  |  Branch (75:9): [True: 52.2k, False: 104k]
  ------------------
   76|  52.2k|        return;
   77|       |
   78|   104k|    CRYPTO_DOWN_REF(&r->references, &i);
   79|   104k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|   104k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   104k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   104k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   104k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   80|   104k|    if (i > 0)
  ------------------
  |  Branch (80:9): [True: 52.2k, False: 52.2k]
  ------------------
   81|  52.2k|        return;
   82|  52.2k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  52.2k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 52.2k]
  |  |  ------------------
  ------------------
   83|       |
   84|  52.2k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (84:9): [True: 52.2k, False: 0]
  |  Branch (84:28): [True: 0, False: 52.2k]
  ------------------
   85|      0|        r->meth->finish(r);
   86|       |
   87|  52.2k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
   88|  52.2k|    ENGINE_finish(r->engine);
   89|  52.2k|#endif
   90|       |
   91|  52.2k|    if (r->group && r->group->meth->keyfinish)
  ------------------
  |  Branch (91:9): [True: 52.2k, False: 0]
  |  Branch (91:21): [True: 0, False: 52.2k]
  ------------------
   92|      0|        r->group->meth->keyfinish(r);
   93|       |
   94|  52.2k|#ifndef FIPS_MODULE
   95|  52.2k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data);
  ------------------
  |  |  258|  52.2k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
   96|  52.2k|#endif
   97|  52.2k|    CRYPTO_FREE_REF(&r->references);
   98|  52.2k|    EC_GROUP_free(r->group);
   99|  52.2k|    EC_POINT_free(r->pub_key);
  100|  52.2k|    BN_clear_free(r->priv_key);
  101|  52.2k|    OPENSSL_free(r->propq);
  ------------------
  |  |  131|  52.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  102|       |
  103|  52.2k|    OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
  ------------------
  |  |  129|  52.2k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|  52.2k|}
EC_KEY_up_ref:
  193|  52.2k|{
  194|  52.2k|    int i;
  195|       |
  196|  52.2k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (196:9): [True: 0, False: 52.2k]
  ------------------
  197|      0|        return 0;
  198|       |
  199|  52.2k|    REF_PRINT_COUNT("EC_KEY", i, r);
  ------------------
  |  |  301|  52.2k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  52.2k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  52.2k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  52.2k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|  52.2k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  52.2k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 52.2k]
  |  |  ------------------
  ------------------
  201|  52.2k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (201:13): [True: 52.2k, False: 0]
  ------------------
  202|  52.2k|}
ossl_ec_key_get_libctx:
  748|   104k|{
  749|   104k|    return key->libctx;
  750|   104k|}
ossl_ec_key_get0_propq:
  753|  52.2k|{
  754|  52.2k|    return key->propq;
  755|  52.2k|}
ossl_ec_key_set0_libctx:
  758|  52.2k|{
  759|  52.2k|    key->libctx = libctx;
  760|       |    /* Do we need to propagate this to the group? */
  761|  52.2k|}
EC_KEY_get0_group:
  764|   261k|{
  765|   261k|    return key->group;
  766|   261k|}
EC_KEY_set_group:
  769|  52.2k|{
  770|  52.2k|    if (key->meth->set_group != NULL && key->meth->set_group(key, group) == 0)
  ------------------
  |  Branch (770:9): [True: 0, False: 52.2k]
  |  Branch (770:41): [True: 0, False: 0]
  ------------------
  771|      0|        return 0;
  772|  52.2k|    EC_GROUP_free(key->group);
  773|  52.2k|    key->group = EC_GROUP_dup(group);
  774|  52.2k|    if (key->group != NULL && EC_GROUP_get_curve_name(key->group) == NID_sm2)
  ------------------
  |  | 1255|  52.2k|#define NID_sm2         1172
  ------------------
  |  Branch (774:9): [True: 52.2k, False: 0]
  |  Branch (774:31): [True: 0, False: 52.2k]
  ------------------
  775|      0|        EC_KEY_set_flags(key, EC_FLAG_SM2_RANGE);
  ------------------
  |  |  954|      0|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  776|       |
  777|  52.2k|    key->dirty_cnt++;
  778|  52.2k|    return (key->group == NULL) ? 0 : 1;
  ------------------
  |  Branch (778:12): [True: 0, False: 52.2k]
  ------------------
  779|  52.2k|}
EC_KEY_get0_private_key:
  782|  52.2k|{
  783|  52.2k|    return key->priv_key;
  784|  52.2k|}
EC_KEY_get0_public_key:
  882|  52.2k|{
  883|  52.2k|    return key->pub_key;
  884|  52.2k|}
EC_KEY_get_enc_flags:
  898|  52.2k|{
  899|  52.2k|    return key->enc_flag;
  900|  52.2k|}
EC_KEY_get_conv_form:
  908|  52.2k|{
  909|  52.2k|    return key->conv_form;
  910|  52.2k|}
EC_KEY_get_flags:
  935|   208k|{
  936|   208k|    return key->flags;
  937|   208k|}
EC_KEY_oct2key:
  968|  52.2k|{
  969|  52.2k|    if (key == NULL || key->group == NULL)
  ------------------
  |  Branch (969:9): [True: 0, False: 52.2k]
  |  Branch (969:24): [True: 0, False: 52.2k]
  ------------------
  970|      0|        return 0;
  971|  52.2k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (971:9): [True: 52.2k, False: 0]
  ------------------
  972|  52.2k|        key->pub_key = EC_POINT_new(key->group);
  973|  52.2k|    if (key->pub_key == NULL)
  ------------------
  |  Branch (973:9): [True: 0, False: 52.2k]
  ------------------
  974|      0|        return 0;
  975|  52.2k|    if (EC_POINT_oct2point(key->group, key->pub_key, buf, len, ctx) == 0)
  ------------------
  |  Branch (975:9): [True: 0, False: 52.2k]
  ------------------
  976|      0|        return 0;
  977|  52.2k|    key->dirty_cnt++;
  978|       |    /*
  979|       |     * Save the point conversion form.
  980|       |     * For non-custom curves the first octet of the buffer (excluding
  981|       |     * the last significant bit) contains the point conversion form.
  982|       |     * EC_POINT_oct2point() has already performed sanity checking of
  983|       |     * the buffer so we know it is valid.
  984|       |     */
  985|  52.2k|    if ((key->group->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0)
  ------------------
  |  |   29|  52.2k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (985:9): [True: 52.2k, False: 0]
  ------------------
  986|  52.2k|        key->conv_form = (point_conversion_form_t)(buf[0] & ~0x01);
  987|  52.2k|    return 1;
  988|  52.2k|}

EC_KEY_OpenSSL:
   40|  52.2k|{
   41|  52.2k|    return &openssl_ec_key_method;
   42|  52.2k|}
EC_KEY_get_default_method:
   45|  52.2k|{
   46|  52.2k|    return default_ec_key_meth;
   47|  52.2k|}
EC_KEY_get_method:
   58|  52.2k|{
   59|  52.2k|    return key->meth;
   60|  52.2k|}
ossl_ec_key_new_method_int:
   82|  52.2k|{
   83|  52.2k|    EC_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  52.2k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|       |
   85|  52.2k|    if (ret == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 52.2k]
  ------------------
   86|      0|        return NULL;
   87|       |
   88|  52.2k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (88:9): [True: 0, False: 52.2k]
  ------------------
   89|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   90|      0|        return NULL;
   91|      0|    }
   92|       |
   93|  52.2k|    ret->libctx = libctx;
   94|  52.2k|    if (propq != NULL) {
  ------------------
  |  Branch (94:9): [True: 0, False: 52.2k]
  ------------------
   95|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   96|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (96:13): [True: 0, False: 0]
  ------------------
   97|      0|            goto err;
   98|      0|    }
   99|       |
  100|  52.2k|    ret->meth = EC_KEY_get_default_method();
  101|  52.2k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  102|  52.2k|    if (engine != NULL) {
  ------------------
  |  Branch (102:9): [True: 0, False: 52.2k]
  ------------------
  103|      0|        if (!ENGINE_init(engine)) {
  ------------------
  |  Branch (103:13): [True: 0, False: 0]
  ------------------
  104|      0|            ERR_raise(ERR_LIB_EC, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  105|      0|            goto err;
  106|      0|        }
  107|      0|        ret->engine = engine;
  108|      0|    } else
  109|  52.2k|        ret->engine = ENGINE_get_default_EC();
  110|  52.2k|    if (ret->engine != NULL) {
  ------------------
  |  Branch (110:9): [True: 0, False: 52.2k]
  ------------------
  111|      0|        ret->meth = ENGINE_get_EC(ret->engine);
  112|      0|        if (ret->meth == NULL) {
  ------------------
  |  Branch (112:13): [True: 0, False: 0]
  ------------------
  113|      0|            ERR_raise(ERR_LIB_EC, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  114|      0|            goto err;
  115|      0|        }
  116|      0|    }
  117|  52.2k|#endif
  118|       |
  119|  52.2k|    ret->version = 1;
  120|  52.2k|    ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
  121|       |
  122|       |/* No ex_data inside the FIPS provider */
  123|  52.2k|#ifndef FIPS_MODULE
  124|  52.2k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data)) {
  ------------------
  |  |  258|  52.2k|#define CRYPTO_EX_INDEX_EC_KEY 8
  ------------------
  |  Branch (124:9): [True: 0, False: 52.2k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_EC, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        goto err;
  127|      0|    }
  128|  52.2k|#endif
  129|       |
  130|  52.2k|    if (ret->meth->init != NULL && ret->meth->init(ret) == 0) {
  ------------------
  |  Branch (130:9): [True: 0, False: 52.2k]
  |  Branch (130:36): [True: 0, False: 0]
  ------------------
  131|      0|        ERR_raise(ERR_LIB_EC, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  132|      0|        goto err;
  133|      0|    }
  134|  52.2k|    return ret;
  135|       |
  136|      0|err:
  137|      0|    EC_KEY_free(ret);
  138|       |    return NULL;
  139|  52.2k|}

ossl_ec_group_new_ex:
   32|   104k|{
   33|   104k|    EC_GROUP *ret;
   34|       |
   35|   104k|    if (meth == NULL) {
  ------------------
  |  Branch (35:9): [True: 0, False: 104k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_EC, EC_R_SLOT_FULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        return NULL;
   38|      0|    }
   39|   104k|    if (meth->group_init == 0) {
  ------------------
  |  Branch (39:9): [True: 0, False: 104k]
  ------------------
   40|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   41|      0|        return NULL;
   42|      0|    }
   43|       |
   44|   104k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   104k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|   104k|    if (ret == NULL)
  ------------------
  |  Branch (45:9): [True: 0, False: 104k]
  ------------------
   46|      0|        return NULL;
   47|       |
   48|   104k|    ret->libctx = libctx;
   49|   104k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 104k]
  ------------------
   50|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            goto err;
   53|      0|    }
   54|   104k|    ret->meth = meth;
   55|   104k|    if ((ret->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|   104k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (55:9): [True: 104k, False: 0]
  ------------------
   56|   104k|        ret->order = BN_new();
   57|   104k|        if (ret->order == NULL)
  ------------------
  |  Branch (57:13): [True: 0, False: 104k]
  ------------------
   58|      0|            goto err;
   59|   104k|        ret->cofactor = BN_new();
   60|   104k|        if (ret->cofactor == NULL)
  ------------------
  |  Branch (60:13): [True: 0, False: 104k]
  ------------------
   61|      0|            goto err;
   62|   104k|    }
   63|   104k|    ret->asn1_flag = OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|   104k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
   64|   104k|    ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED;
   65|   104k|    if (!meth->group_init(ret))
  ------------------
  |  Branch (65:9): [True: 0, False: 104k]
  ------------------
   66|      0|        goto err;
   67|   104k|    return ret;
   68|       |
   69|      0|err:
   70|      0|    BN_free(ret->order);
   71|      0|    BN_free(ret->cofactor);
   72|      0|    OPENSSL_free(ret->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   73|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|       |    return NULL;
   75|   104k|}
EC_pre_comp_free:
   87|   156k|{
   88|   156k|    switch (group->pre_comp_type) {
  ------------------
  |  Branch (88:13): [True: 156k, False: 0]
  ------------------
   89|   156k|    case PCT_none:
  ------------------
  |  Branch (89:5): [True: 156k, False: 0]
  ------------------
   90|   156k|        break;
   91|      0|    case PCT_nistz256:
  ------------------
  |  Branch (91:5): [True: 0, False: 156k]
  ------------------
   92|      0|#ifdef ECP_NISTZ256_ASM
   93|      0|        EC_nistz256_pre_comp_free(group->pre_comp.nistz256);
   94|      0|#endif
   95|      0|        break;
   96|      0|#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
   97|      0|    case PCT_nistp224:
  ------------------
  |  Branch (97:5): [True: 0, False: 156k]
  ------------------
   98|      0|        EC_nistp224_pre_comp_free(group->pre_comp.nistp224);
   99|      0|        break;
  100|      0|    case PCT_nistp256:
  ------------------
  |  Branch (100:5): [True: 0, False: 156k]
  ------------------
  101|      0|        EC_nistp256_pre_comp_free(group->pre_comp.nistp256);
  102|      0|        break;
  103|      0|    case PCT_nistp384:
  ------------------
  |  Branch (103:5): [True: 0, False: 156k]
  ------------------
  104|      0|        ossl_ec_nistp384_pre_comp_free(group->pre_comp.nistp384);
  105|      0|        break;
  106|      0|    case PCT_nistp521:
  ------------------
  |  Branch (106:5): [True: 0, False: 156k]
  ------------------
  107|      0|        EC_nistp521_pre_comp_free(group->pre_comp.nistp521);
  108|      0|        break;
  109|       |#else
  110|       |    case PCT_nistp224:
  111|       |    case PCT_nistp256:
  112|       |    case PCT_nistp384:
  113|       |    case PCT_nistp521:
  114|       |        break;
  115|       |#endif
  116|      0|    case PCT_ec:
  ------------------
  |  Branch (116:5): [True: 0, False: 156k]
  ------------------
  117|      0|        EC_ec_pre_comp_free(group->pre_comp.ec);
  118|      0|        break;
  119|   156k|    }
  120|   156k|    group->pre_comp.ec = NULL;
  121|   156k|}
EC_GROUP_free:
  124|   156k|{
  125|   156k|    if (!group)
  ------------------
  |  Branch (125:9): [True: 52.2k, False: 104k]
  ------------------
  126|  52.2k|        return;
  127|       |
  128|   104k|    if (group->meth->group_finish != 0)
  ------------------
  |  Branch (128:9): [True: 104k, False: 0]
  ------------------
  129|   104k|        group->meth->group_finish(group);
  130|       |
  131|   104k|    EC_pre_comp_free(group);
  132|   104k|    BN_MONT_CTX_free(group->mont_data);
  133|   104k|    EC_POINT_free(group->generator);
  134|   104k|    BN_free(group->order);
  135|   104k|    BN_free(group->cofactor);
  136|   104k|    OPENSSL_free(group->seed);
  ------------------
  |  |  131|   104k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|   104k|    OPENSSL_free(group->propq);
  ------------------
  |  |  131|   104k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  138|   104k|    OPENSSL_free(group);
  ------------------
  |  |  131|   104k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  139|   104k|}
EC_GROUP_copy:
  163|  52.2k|{
  164|  52.2k|    if (dest->meth->group_copy == 0) {
  ------------------
  |  Branch (164:9): [True: 0, False: 52.2k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        return 0;
  167|      0|    }
  168|  52.2k|    if (dest->meth != src->meth) {
  ------------------
  |  Branch (168:9): [True: 0, False: 52.2k]
  ------------------
  169|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  170|      0|        return 0;
  171|      0|    }
  172|  52.2k|    if (dest == src)
  ------------------
  |  Branch (172:9): [True: 0, False: 52.2k]
  ------------------
  173|      0|        return 1;
  174|       |
  175|  52.2k|    dest->libctx = src->libctx;
  176|  52.2k|    dest->curve_name = src->curve_name;
  177|       |
  178|  52.2k|    EC_pre_comp_free(dest);
  179|       |
  180|       |    /* Copy precomputed */
  181|  52.2k|    dest->pre_comp_type = src->pre_comp_type;
  182|  52.2k|    switch (src->pre_comp_type) {
  ------------------
  |  Branch (182:13): [True: 52.2k, False: 0]
  ------------------
  183|  52.2k|    case PCT_none:
  ------------------
  |  Branch (183:5): [True: 52.2k, False: 0]
  ------------------
  184|  52.2k|        dest->pre_comp.ec = NULL;
  185|  52.2k|        break;
  186|      0|    case PCT_nistz256:
  ------------------
  |  Branch (186:5): [True: 0, False: 52.2k]
  ------------------
  187|      0|#ifdef ECP_NISTZ256_ASM
  188|      0|        dest->pre_comp.nistz256 = EC_nistz256_pre_comp_dup(src->pre_comp.nistz256);
  189|      0|#endif
  190|      0|        break;
  191|      0|#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
  192|      0|    case PCT_nistp224:
  ------------------
  |  Branch (192:5): [True: 0, False: 52.2k]
  ------------------
  193|      0|        dest->pre_comp.nistp224 = EC_nistp224_pre_comp_dup(src->pre_comp.nistp224);
  194|      0|        break;
  195|      0|    case PCT_nistp256:
  ------------------
  |  Branch (195:5): [True: 0, False: 52.2k]
  ------------------
  196|      0|        dest->pre_comp.nistp256 = EC_nistp256_pre_comp_dup(src->pre_comp.nistp256);
  197|      0|        break;
  198|      0|    case PCT_nistp384:
  ------------------
  |  Branch (198:5): [True: 0, False: 52.2k]
  ------------------
  199|      0|        dest->pre_comp.nistp384 = ossl_ec_nistp384_pre_comp_dup(src->pre_comp.nistp384);
  200|      0|        break;
  201|      0|    case PCT_nistp521:
  ------------------
  |  Branch (201:5): [True: 0, False: 52.2k]
  ------------------
  202|      0|        dest->pre_comp.nistp521 = EC_nistp521_pre_comp_dup(src->pre_comp.nistp521);
  203|      0|        break;
  204|       |#else
  205|       |    case PCT_nistp224:
  206|       |    case PCT_nistp256:
  207|       |    case PCT_nistp384:
  208|       |    case PCT_nistp521:
  209|       |        break;
  210|       |#endif
  211|      0|    case PCT_ec:
  ------------------
  |  Branch (211:5): [True: 0, False: 52.2k]
  ------------------
  212|      0|        dest->pre_comp.ec = EC_ec_pre_comp_dup(src->pre_comp.ec);
  213|      0|        break;
  214|  52.2k|    }
  215|       |
  216|  52.2k|    if (src->mont_data != NULL) {
  ------------------
  |  Branch (216:9): [True: 52.2k, False: 0]
  ------------------
  217|  52.2k|        if (dest->mont_data == NULL) {
  ------------------
  |  Branch (217:13): [True: 52.2k, False: 0]
  ------------------
  218|  52.2k|            dest->mont_data = BN_MONT_CTX_new();
  219|  52.2k|            if (dest->mont_data == NULL)
  ------------------
  |  Branch (219:17): [True: 0, False: 52.2k]
  ------------------
  220|      0|                return 0;
  221|  52.2k|        }
  222|  52.2k|        if (!BN_MONT_CTX_copy(dest->mont_data, src->mont_data))
  ------------------
  |  Branch (222:13): [True: 0, False: 52.2k]
  ------------------
  223|      0|            return 0;
  224|  52.2k|    } else {
  225|       |        /* src->generator == NULL */
  226|      0|        BN_MONT_CTX_free(dest->mont_data);
  227|      0|        dest->mont_data = NULL;
  228|      0|    }
  229|       |
  230|  52.2k|    if (src->generator != NULL) {
  ------------------
  |  Branch (230:9): [True: 52.2k, False: 0]
  ------------------
  231|  52.2k|        if (dest->generator == NULL) {
  ------------------
  |  Branch (231:13): [True: 52.2k, False: 0]
  ------------------
  232|  52.2k|            dest->generator = EC_POINT_new(dest);
  233|  52.2k|            if (dest->generator == NULL)
  ------------------
  |  Branch (233:17): [True: 0, False: 52.2k]
  ------------------
  234|      0|                return 0;
  235|  52.2k|        }
  236|  52.2k|        if (!EC_POINT_copy(dest->generator, src->generator))
  ------------------
  |  Branch (236:13): [True: 0, False: 52.2k]
  ------------------
  237|      0|            return 0;
  238|  52.2k|    } else {
  239|       |        /* src->generator == NULL */
  240|      0|        EC_POINT_clear_free(dest->generator);
  241|      0|        dest->generator = NULL;
  242|      0|    }
  243|       |
  244|  52.2k|    if ((src->meth->flags & EC_FLAGS_CUSTOM_CURVE) == 0) {
  ------------------
  |  |   29|  52.2k|#define EC_FLAGS_CUSTOM_CURVE 0x2
  ------------------
  |  Branch (244:9): [True: 52.2k, False: 0]
  ------------------
  245|  52.2k|        if (!BN_copy(dest->order, src->order))
  ------------------
  |  Branch (245:13): [True: 0, False: 52.2k]
  ------------------
  246|      0|            return 0;
  247|  52.2k|        if (!BN_copy(dest->cofactor, src->cofactor))
  ------------------
  |  Branch (247:13): [True: 0, False: 52.2k]
  ------------------
  248|      0|            return 0;
  249|  52.2k|    }
  250|       |
  251|  52.2k|    dest->asn1_flag = src->asn1_flag;
  252|  52.2k|    dest->asn1_form = src->asn1_form;
  253|  52.2k|    dest->decoded_from_explicit_params = src->decoded_from_explicit_params;
  254|       |
  255|  52.2k|    if (src->seed) {
  ------------------
  |  Branch (255:9): [True: 52.2k, False: 0]
  ------------------
  256|  52.2k|        OPENSSL_free(dest->seed);
  ------------------
  |  |  131|  52.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|  52.2k|        if ((dest->seed = OPENSSL_malloc(src->seed_len)) == NULL)
  ------------------
  |  |  106|  52.2k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (257:13): [True: 0, False: 52.2k]
  ------------------
  258|      0|            return 0;
  259|  52.2k|        if (!memcpy(dest->seed, src->seed, src->seed_len))
  ------------------
  |  Branch (259:13): [True: 0, False: 52.2k]
  ------------------
  260|      0|            return 0;
  261|  52.2k|        dest->seed_len = src->seed_len;
  262|  52.2k|    } else {
  263|      0|        OPENSSL_free(dest->seed);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  264|      0|        dest->seed = NULL;
  265|      0|        dest->seed_len = 0;
  266|      0|    }
  267|       |
  268|  52.2k|    return dest->meth->group_copy(dest, src);
  269|  52.2k|}
EC_GROUP_dup:
  272|  52.2k|{
  273|  52.2k|    EC_GROUP *t = NULL;
  274|  52.2k|    int ok = 0;
  275|       |
  276|  52.2k|    if (a == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 52.2k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  52.2k|    if ((t = ossl_ec_group_new_ex(a->libctx, a->propq, a->meth)) == NULL)
  ------------------
  |  Branch (279:9): [True: 0, False: 52.2k]
  ------------------
  280|      0|        return NULL;
  281|  52.2k|    if (!EC_GROUP_copy(t, a))
  ------------------
  |  Branch (281:9): [True: 0, False: 52.2k]
  ------------------
  282|      0|        goto err;
  283|       |
  284|  52.2k|    ok = 1;
  285|       |
  286|  52.2k|err:
  287|  52.2k|    if (!ok) {
  ------------------
  |  Branch (287:9): [True: 0, False: 52.2k]
  ------------------
  288|      0|        EC_GROUP_free(t);
  289|      0|        return NULL;
  290|      0|    }
  291|  52.2k|    return t;
  292|  52.2k|}
EC_GROUP_set_generator:
  372|  47.0k|{
  373|  47.0k|    if (generator == NULL) {
  ------------------
  |  Branch (373:9): [True: 0, False: 47.0k]
  ------------------
  374|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  375|      0|        return 0;
  376|      0|    }
  377|       |
  378|       |    /* require group->field >= 1 */
  379|  47.0k|    if (group->field == NULL || BN_is_zero(group->field)
  ------------------
  |  Branch (379:9): [True: 0, False: 47.0k]
  |  Branch (379:33): [True: 0, False: 47.0k]
  ------------------
  380|  47.0k|        || BN_is_negative(group->field)) {
  ------------------
  |  Branch (380:12): [True: 0, False: 47.0k]
  ------------------
  381|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  382|      0|        return 0;
  383|      0|    }
  384|       |
  385|       |    /*-
  386|       |     * - require order >= 1
  387|       |     * - enforce upper bound due to Hasse thm: order can be no more than one bit
  388|       |     *   longer than field cardinality
  389|       |     */
  390|  47.0k|    if (order == NULL || BN_is_zero(order) || BN_is_negative(order)
  ------------------
  |  Branch (390:9): [True: 0, False: 47.0k]
  |  Branch (390:26): [True: 0, False: 47.0k]
  |  Branch (390:47): [True: 0, False: 47.0k]
  ------------------
  391|  47.0k|        || BN_num_bits(order) > BN_num_bits(group->field) + 1) {
  ------------------
  |  Branch (391:12): [True: 0, False: 47.0k]
  ------------------
  392|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_GROUP_ORDER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  393|      0|        return 0;
  394|      0|    }
  395|       |
  396|       |    /*-
  397|       |     * Unfortunately the cofactor is an optional field in many standards.
  398|       |     * Internally, the lib uses 0 cofactor as a marker for "unknown cofactor".
  399|       |     * So accept cofactor == NULL or cofactor >= 0.
  400|       |     */
  401|  47.0k|    if (cofactor != NULL && BN_is_negative(cofactor)) {
  ------------------
  |  Branch (401:9): [True: 47.0k, False: 0]
  |  Branch (401:29): [True: 0, False: 47.0k]
  ------------------
  402|      0|        ERR_raise(ERR_LIB_EC, EC_R_UNKNOWN_COFACTOR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  403|      0|        return 0;
  404|      0|    }
  405|       |
  406|  47.0k|    if (group->generator == NULL) {
  ------------------
  |  Branch (406:9): [True: 47.0k, False: 0]
  ------------------
  407|  47.0k|        group->generator = EC_POINT_new(group);
  408|  47.0k|        if (group->generator == NULL)
  ------------------
  |  Branch (408:13): [True: 0, False: 47.0k]
  ------------------
  409|      0|            return 0;
  410|  47.0k|    }
  411|  47.0k|    if (!EC_POINT_copy(group->generator, generator))
  ------------------
  |  Branch (411:9): [True: 0, False: 47.0k]
  ------------------
  412|      0|        return 0;
  413|       |
  414|  47.0k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (414:9): [True: 0, False: 47.0k]
  ------------------
  415|      0|        return 0;
  416|       |
  417|       |    /* Either take the provided positive cofactor, or try to compute it */
  418|  47.0k|    if (cofactor != NULL && !BN_is_zero(cofactor)) {
  ------------------
  |  Branch (418:9): [True: 47.0k, False: 0]
  |  Branch (418:29): [True: 47.0k, False: 0]
  ------------------
  419|  47.0k|        if (!BN_copy(group->cofactor, cofactor))
  ------------------
  |  Branch (419:13): [True: 0, False: 47.0k]
  ------------------
  420|      0|            return 0;
  421|  47.0k|    } else if (!ec_guess_cofactor(group)) {
  ------------------
  |  Branch (421:16): [True: 0, False: 0]
  ------------------
  422|      0|        BN_zero(group->cofactor);
  ------------------
  |  |  201|      0|#define BN_zero(a) BN_zero_ex(a)
  ------------------
  423|      0|        return 0;
  424|      0|    }
  425|       |
  426|       |    /*
  427|       |     * Some groups have an order with
  428|       |     * factors of two, which makes the Montgomery setup fail.
  429|       |     * |group->mont_data| will be NULL in this case.
  430|       |     */
  431|  47.0k|    if (BN_is_odd(group->order)) {
  ------------------
  |  Branch (431:9): [True: 47.0k, False: 0]
  ------------------
  432|  47.0k|        return ec_precompute_mont_data(group);
  433|  47.0k|    }
  434|       |
  435|      0|    BN_MONT_CTX_free(group->mont_data);
  436|       |    group->mont_data = NULL;
  437|      0|    return 1;
  438|  47.0k|}
EC_GROUP_get0_order:
  461|  52.2k|{
  462|  52.2k|    return group->order;
  463|  52.2k|}
EC_GROUP_order_bits:
  466|   104k|{
  467|   104k|    return group->meth->group_order_bits(group);
  468|   104k|}
EC_GROUP_set_curve_name:
  488|  52.2k|{
  489|  52.2k|    group->curve_name = nid;
  490|  52.2k|    group->asn1_flag = (nid != NID_undef)
  ------------------
  |  |   18|  52.2k|#define NID_undef                       0
  ------------------
  |  Branch (490:24): [True: 52.2k, False: 0]
  ------------------
  491|  52.2k|        ? OPENSSL_EC_NAMED_CURVE
  ------------------
  |  |   31|  52.2k|#define OPENSSL_EC_NAMED_CURVE 0x001
  ------------------
  492|  52.2k|        : OPENSSL_EC_EXPLICIT_CURVE;
  ------------------
  |  |   30|  52.2k|#define OPENSSL_EC_EXPLICIT_CURVE 0x000
  ------------------
  493|  52.2k|}
EC_GROUP_get_curve_name:
  496|   208k|{
  497|   208k|    return group->curve_name;
  498|   208k|}
EC_GROUP_get_field_type:
  506|   104k|{
  507|   104k|    return group->meth->field_type;
  508|   104k|}
EC_GROUP_set_asn1_flag:
  511|  52.2k|{
  512|  52.2k|    group->asn1_flag = flag;
  513|  52.2k|}
EC_GROUP_get_asn1_flag:
  516|  99.2k|{
  517|  99.2k|    return group->asn1_flag;
  518|  99.2k|}
EC_GROUP_get_point_conversion_form:
  528|  52.2k|{
  529|  52.2k|    return group->asn1_form;
  530|  52.2k|}
EC_GROUP_set_seed:
  533|  52.2k|{
  534|  52.2k|    OPENSSL_free(group->seed);
  ------------------
  |  |  131|  52.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  535|  52.2k|    group->seed = NULL;
  536|  52.2k|    group->seed_len = 0;
  537|       |
  538|  52.2k|    if (!len || !p)
  ------------------
  |  Branch (538:9): [True: 0, False: 52.2k]
  |  Branch (538:17): [True: 0, False: 52.2k]
  ------------------
  539|      0|        return 1;
  540|       |
  541|  52.2k|    if ((group->seed = OPENSSL_malloc(len)) == NULL)
  ------------------
  |  |  106|  52.2k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (541:9): [True: 0, False: 52.2k]
  ------------------
  542|      0|        return 0;
  543|  52.2k|    memcpy(group->seed, p, len);
  544|  52.2k|    group->seed_len = len;
  545|       |
  546|  52.2k|    return len;
  547|  52.2k|}
EC_POINT_new:
  717|   208k|{
  718|   208k|    EC_POINT *ret;
  719|       |
  720|   208k|    if (group == NULL) {
  ------------------
  |  Branch (720:9): [True: 0, False: 208k]
  ------------------
  721|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  722|      0|        return NULL;
  723|      0|    }
  724|   208k|    if (group->meth->point_init == NULL) {
  ------------------
  |  Branch (724:9): [True: 0, False: 208k]
  ------------------
  725|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  726|      0|        return NULL;
  727|      0|    }
  728|       |
  729|   208k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   208k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  730|   208k|    if (ret == NULL)
  ------------------
  |  Branch (730:9): [True: 0, False: 208k]
  ------------------
  731|      0|        return NULL;
  732|       |
  733|   208k|    ret->meth = group->meth;
  734|   208k|    ret->curve_name = group->curve_name;
  735|       |
  736|   208k|    if (!ret->meth->point_init(ret)) {
  ------------------
  |  Branch (736:9): [True: 0, False: 208k]
  ------------------
  737|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  738|      0|        return NULL;
  739|      0|    }
  740|       |
  741|   208k|    return ret;
  742|   208k|}
EC_POINT_free:
  745|   208k|{
  746|   208k|    if (point == NULL)
  ------------------
  |  Branch (746:9): [True: 0, False: 208k]
  ------------------
  747|      0|        return;
  748|       |
  749|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  750|       |    EC_POINT_clear_free(point);
  751|       |#else
  752|   208k|    if (point->meth->point_finish != 0)
  ------------------
  |  Branch (752:9): [True: 208k, False: 0]
  ------------------
  753|   208k|        point->meth->point_finish(point);
  754|   208k|    OPENSSL_free(point);
  ------------------
  |  |  131|   208k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  755|   208k|#endif
  756|   208k|}
EC_POINT_copy:
  771|   104k|{
  772|   104k|    if (dest->meth->point_copy == 0) {
  ------------------
  |  Branch (772:9): [True: 0, False: 104k]
  ------------------
  773|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  774|      0|        return 0;
  775|      0|    }
  776|   104k|    if (dest->meth != src->meth
  ------------------
  |  Branch (776:9): [True: 0, False: 104k]
  ------------------
  777|   104k|        || (dest->curve_name != src->curve_name
  ------------------
  |  Branch (777:13): [True: 5.22k, False: 99.2k]
  ------------------
  778|  5.22k|            && dest->curve_name != 0
  ------------------
  |  Branch (778:16): [True: 5.22k, False: 0]
  ------------------
  779|  5.22k|            && src->curve_name != 0)) {
  ------------------
  |  Branch (779:16): [True: 0, False: 5.22k]
  ------------------
  780|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  781|      0|        return 0;
  782|      0|    }
  783|   104k|    if (dest == src)
  ------------------
  |  Branch (783:9): [True: 0, False: 104k]
  ------------------
  784|      0|        return 1;
  785|   104k|    return dest->meth->point_copy(dest, src);
  786|   104k|}
EC_POINT_set_Jprojective_coordinates_GFp:
  832|   104k|{
  833|   104k|    if (group->meth->field_type != NID_X9_62_prime_field) {
  ------------------
  |  |  152|   104k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (833:9): [True: 0, False: 104k]
  ------------------
  834|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  835|      0|        return 0;
  836|      0|    }
  837|   104k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (837:9): [True: 0, False: 104k]
  ------------------
  838|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  839|      0|        return 0;
  840|      0|    }
  841|   104k|    return ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(group, point,
  842|   104k|        x, y, z, ctx);
  843|   104k|}
EC_POINT_set_affine_coordinates:
  866|   104k|{
  867|   104k|    if (group->meth->point_set_affine_coordinates == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 104k]
  ------------------
  868|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  869|      0|        return 0;
  870|      0|    }
  871|   104k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (871:9): [True: 0, False: 104k]
  ------------------
  872|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  873|      0|        return 0;
  874|      0|    }
  875|   104k|    if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (875:9): [True: 0, False: 104k]
  ------------------
  876|      0|        return 0;
  877|       |
  878|   104k|    if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
  ------------------
  |  Branch (878:9): [True: 0, False: 104k]
  ------------------
  879|      0|        ERR_raise(ERR_LIB_EC, EC_R_POINT_IS_NOT_ON_CURVE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  880|      0|        return 0;
  881|      0|    }
  882|   104k|    return 1;
  883|   104k|}
EC_POINT_is_at_infinity:
  983|   104k|{
  984|   104k|    if (group->meth->is_at_infinity == 0) {
  ------------------
  |  Branch (984:9): [True: 0, False: 104k]
  ------------------
  985|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  986|      0|        return 0;
  987|      0|    }
  988|   104k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (988:9): [True: 0, False: 104k]
  ------------------
  989|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  990|      0|        return 0;
  991|      0|    }
  992|   104k|    return group->meth->is_at_infinity(group, point);
  993|   104k|}
EC_POINT_is_on_curve:
 1004|   104k|{
 1005|   104k|    if (group->meth->is_on_curve == 0) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 104k]
  ------------------
 1006|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1007|      0|        return 0;
 1008|      0|    }
 1009|   104k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (1009:9): [True: 0, False: 104k]
  ------------------
 1010|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1011|      0|        return 0;
 1012|      0|    }
 1013|   104k|    return group->meth->is_on_curve(group, point, ctx);
 1014|   104k|}
ossl_ec_group_simple_order_bits:
 1230|   104k|{
 1231|   104k|    if (group->order == NULL)
  ------------------
  |  Branch (1231:9): [True: 0, False: 104k]
  ------------------
 1232|      0|        return 0;
 1233|   104k|    return BN_num_bits(group->order);
 1234|   104k|}
ec_lib.c:ec_precompute_mont_data:
 1189|  47.0k|{
 1190|  47.0k|    BN_CTX *ctx = BN_CTX_new_ex(group->libctx);
 1191|  47.0k|    int ret = 0;
 1192|       |
 1193|  47.0k|    BN_MONT_CTX_free(group->mont_data);
 1194|  47.0k|    group->mont_data = NULL;
 1195|       |
 1196|  47.0k|    if (ctx == NULL)
  ------------------
  |  Branch (1196:9): [True: 0, False: 47.0k]
  ------------------
 1197|      0|        goto err;
 1198|       |
 1199|  47.0k|    group->mont_data = BN_MONT_CTX_new();
 1200|  47.0k|    if (group->mont_data == NULL)
  ------------------
  |  Branch (1200:9): [True: 0, False: 47.0k]
  ------------------
 1201|      0|        goto err;
 1202|       |
 1203|  47.0k|    if (!BN_MONT_CTX_set(group->mont_data, group->order, ctx)) {
  ------------------
  |  Branch (1203:9): [True: 0, False: 47.0k]
  ------------------
 1204|      0|        BN_MONT_CTX_free(group->mont_data);
 1205|      0|        group->mont_data = NULL;
 1206|      0|        goto err;
 1207|      0|    }
 1208|       |
 1209|  47.0k|    ret = 1;
 1210|       |
 1211|  47.0k|err:
 1212|       |
 1213|  47.0k|    BN_CTX_free(ctx);
 1214|  47.0k|    return ret;
 1215|  47.0k|}

ec_lib.c:ec_point_is_compat:
  333|   417k|{
  334|   417k|    return group->meth == point->meth
  ------------------
  |  Branch (334:12): [True: 417k, False: 0]
  ------------------
  335|   417k|        && (group->curve_name == 0
  ------------------
  |  Branch (335:13): [True: 20.8k, False: 397k]
  ------------------
  336|   397k|            || point->curve_name == 0
  ------------------
  |  Branch (336:16): [True: 0, False: 397k]
  ------------------
  337|   397k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (337:16): [True: 397k, False: 0]
  ------------------
  338|   417k|}
ec_oct.c:ec_point_is_compat:
  333|  52.2k|{
  334|  52.2k|    return group->meth == point->meth
  ------------------
  |  Branch (334:12): [True: 52.2k, False: 0]
  ------------------
  335|  52.2k|        && (group->curve_name == 0
  ------------------
  |  Branch (335:13): [True: 0, False: 52.2k]
  ------------------
  336|  52.2k|            || point->curve_name == 0
  ------------------
  |  Branch (336:16): [True: 0, False: 52.2k]
  ------------------
  337|  52.2k|            || group->curve_name == point->curve_name);
  ------------------
  |  Branch (337:16): [True: 52.2k, False: 0]
  ------------------
  338|  52.2k|}

EC_POINT_oct2point:
  111|  52.2k|{
  112|  52.2k|    if (group->meth->oct2point == 0
  ------------------
  |  Branch (112:9): [True: 52.2k, False: 0]
  ------------------
  113|  52.2k|        && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) {
  ------------------
  |  |   26|  52.2k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (113:12): [True: 0, False: 52.2k]
  ------------------
  114|      0|        ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  115|      0|        return 0;
  116|      0|    }
  117|  52.2k|    if (!ec_point_is_compat(point, group)) {
  ------------------
  |  Branch (117:9): [True: 0, False: 52.2k]
  ------------------
  118|      0|        ERR_raise(ERR_LIB_EC, EC_R_INCOMPATIBLE_OBJECTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|        return 0;
  120|      0|    }
  121|  52.2k|    if (group->meth->flags & EC_FLAGS_DEFAULT_OCT) {
  ------------------
  |  |   26|  52.2k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
  |  Branch (121:9): [True: 52.2k, False: 0]
  ------------------
  122|  52.2k|        if (group->meth->field_type == NID_X9_62_prime_field)
  ------------------
  |  |  152|  52.2k|#define NID_X9_62_prime_field           406
  ------------------
  |  Branch (122:13): [True: 52.2k, False: 0]
  ------------------
  123|  52.2k|            return ossl_ec_GFp_simple_oct2point(group, point, buf, len, ctx);
  124|      0|        else
  125|       |#ifdef OPENSSL_NO_EC2M
  126|       |        {
  127|       |            ERR_raise(ERR_LIB_EC, EC_R_GF2M_NOT_SUPPORTED);
  128|       |            return 0;
  129|       |        }
  130|       |#else
  131|      0|            return ossl_ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
  132|  52.2k|#endif
  133|  52.2k|    }
  134|      0|    return group->meth->oct2point(group, point, buf, len, ctx);
  135|  52.2k|}

ossl_ec_GFp_mont_group_init:
   84|  10.4k|{
   85|  10.4k|    int ok;
   86|       |
   87|  10.4k|    ok = ossl_ec_GFp_simple_group_init(group);
   88|  10.4k|    group->field_data1 = NULL;
   89|       |    group->field_data2 = NULL;
   90|  10.4k|    return ok;
   91|  10.4k|}
ossl_ec_GFp_mont_group_finish:
   94|  10.4k|{
   95|  10.4k|    BN_MONT_CTX_free(group->field_data1);
   96|  10.4k|    group->field_data1 = NULL;
   97|  10.4k|    BN_free(group->field_data2);
   98|       |    group->field_data2 = NULL;
   99|  10.4k|    ossl_ec_GFp_simple_group_finish(group);
  100|  10.4k|}
ossl_ec_GFp_mont_group_copy:
  112|  5.22k|{
  113|  5.22k|    BN_MONT_CTX_free(dest->field_data1);
  114|  5.22k|    dest->field_data1 = NULL;
  115|  5.22k|    BN_clear_free(dest->field_data2);
  116|  5.22k|    dest->field_data2 = NULL;
  117|       |
  118|  5.22k|    if (!ossl_ec_GFp_simple_group_copy(dest, src))
  ------------------
  |  Branch (118:9): [True: 0, False: 5.22k]
  ------------------
  119|      0|        return 0;
  120|       |
  121|  5.22k|    if (src->field_data1 != NULL) {
  ------------------
  |  Branch (121:9): [True: 5.22k, False: 0]
  ------------------
  122|  5.22k|        dest->field_data1 = BN_MONT_CTX_new();
  123|  5.22k|        if (dest->field_data1 == NULL)
  ------------------
  |  Branch (123:13): [True: 0, False: 5.22k]
  ------------------
  124|      0|            return 0;
  125|  5.22k|        if (!BN_MONT_CTX_copy(dest->field_data1, src->field_data1))
  ------------------
  |  Branch (125:13): [True: 0, False: 5.22k]
  ------------------
  126|      0|            goto err;
  127|  5.22k|    }
  128|  5.22k|    if (src->field_data2 != NULL) {
  ------------------
  |  Branch (128:9): [True: 5.22k, False: 0]
  ------------------
  129|  5.22k|        dest->field_data2 = BN_dup(src->field_data2);
  130|  5.22k|        if (dest->field_data2 == NULL)
  ------------------
  |  Branch (130:13): [True: 0, False: 5.22k]
  ------------------
  131|      0|            goto err;
  132|  5.22k|    }
  133|       |
  134|  5.22k|    return 1;
  135|       |
  136|      0|err:
  137|      0|    BN_MONT_CTX_free(dest->field_data1);
  138|       |    dest->field_data1 = NULL;
  139|      0|    return 0;
  140|  5.22k|}
ossl_ec_GFp_mont_field_mul:
  198|  10.4k|{
  199|  10.4k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (199:9): [True: 0, False: 10.4k]
  ------------------
  200|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  201|      0|        return 0;
  202|      0|    }
  203|       |
  204|  10.4k|    return BN_mod_mul_montgomery(r, a, b, group->field_data1, ctx);
  205|  10.4k|}
ossl_ec_GFp_mont_field_sqr:
  209|  20.8k|{
  210|  20.8k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (210:9): [True: 0, False: 20.8k]
  ------------------
  211|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  212|      0|        return 0;
  213|      0|    }
  214|       |
  215|  20.8k|    return BN_mod_mul_montgomery(r, a, a, group->field_data1, ctx);
  216|  20.8k|}
ossl_ec_GFp_mont_field_encode:
  269|  31.3k|{
  270|  31.3k|    if (group->field_data1 == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 31.3k]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return 0;
  273|      0|    }
  274|       |
  275|  31.3k|    return BN_to_montgomery(r, a, (BN_MONT_CTX *)group->field_data1, ctx);
  276|  31.3k|}
ossl_ec_GFp_mont_field_set_to_one:
  291|  10.4k|{
  292|  10.4k|    if (group->field_data2 == NULL) {
  ------------------
  |  Branch (292:9): [True: 0, False: 10.4k]
  ------------------
  293|      0|        ERR_raise(ERR_LIB_EC, EC_R_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  294|      0|        return 0;
  295|      0|    }
  296|       |
  297|  10.4k|    if (!BN_copy(r, group->field_data2))
  ------------------
  |  Branch (297:9): [True: 0, False: 10.4k]
  ------------------
  298|      0|        return 0;
  299|  10.4k|    return 1;
  300|  10.4k|}

ossl_ec_GFp_nist_group_copy:
   86|  47.0k|{
   87|  47.0k|    dest->field_mod_func = src->field_mod_func;
   88|       |
   89|  47.0k|    return ossl_ec_GFp_simple_group_copy(dest, src);
   90|  47.0k|}
ossl_ec_GFp_nist_field_mul:
  130|  94.0k|{
  131|  94.0k|    int ret = 0;
  132|  94.0k|    BN_CTX *ctx_new = NULL;
  133|       |
  134|  94.0k|    if (!group || !r || !a || !b) {
  ------------------
  |  Branch (134:9): [True: 0, False: 94.0k]
  |  Branch (134:19): [True: 0, False: 94.0k]
  |  Branch (134:25): [True: 0, False: 94.0k]
  |  Branch (134:31): [True: 0, False: 94.0k]
  ------------------
  135|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  136|      0|        goto err;
  137|      0|    }
  138|  94.0k|    if (!ctx)
  ------------------
  |  Branch (138:9): [True: 0, False: 94.0k]
  ------------------
  139|      0|        if ((ctx_new = ctx = BN_CTX_new_ex(group->libctx)) == NULL)
  ------------------
  |  Branch (139:13): [True: 0, False: 0]
  ------------------
  140|      0|            goto err;
  141|       |
  142|  94.0k|    if (!BN_mul(r, a, b, ctx))
  ------------------
  |  Branch (142:9): [True: 0, False: 94.0k]
  ------------------
  143|      0|        goto err;
  144|  94.0k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (144:9): [True: 0, False: 94.0k]
  ------------------
  145|      0|        goto err;
  146|       |
  147|  94.0k|    ret = 1;
  148|  94.0k|err:
  149|  94.0k|    BN_CTX_free(ctx_new);
  150|  94.0k|    return ret;
  151|  94.0k|}
ossl_ec_GFp_nist_field_sqr:
  155|   188k|{
  156|   188k|    int ret = 0;
  157|   188k|    BN_CTX *ctx_new = NULL;
  158|       |
  159|   188k|    if (!group || !r || !a) {
  ------------------
  |  Branch (159:9): [True: 0, False: 188k]
  |  Branch (159:19): [True: 0, False: 188k]
  |  Branch (159:25): [True: 0, False: 188k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_EC, EC_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        goto err;
  162|      0|    }
  163|   188k|    if (!ctx)
  ------------------
  |  Branch (163:9): [True: 0, False: 188k]
  ------------------
  164|      0|        if ((ctx_new = ctx = BN_CTX_new_ex(group->libctx)) == NULL)
  ------------------
  |  Branch (164:13): [True: 0, False: 0]
  ------------------
  165|      0|            goto err;
  166|       |
  167|   188k|    if (!BN_sqr(r, a, ctx))
  ------------------
  |  Branch (167:9): [True: 0, False: 188k]
  ------------------
  168|      0|        goto err;
  169|   188k|    if (!group->field_mod_func(r, r, group->field, ctx))
  ------------------
  |  Branch (169:9): [True: 0, False: 188k]
  ------------------
  170|      0|        goto err;
  171|       |
  172|   188k|    ret = 1;
  173|   188k|err:
  174|   188k|    BN_CTX_free(ctx_new);
  175|   188k|    return ret;
  176|   188k|}

ossl_ec_GFp_nistp384_method:
 1496|  47.0k|{
 1497|  47.0k|    static const EC_METHOD ret = {
 1498|  47.0k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  47.0k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1499|  47.0k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  47.0k|#define NID_X9_62_prime_field           406
  ------------------
 1500|  47.0k|        ossl_ec_GFp_nistp384_group_init,
 1501|  47.0k|        ossl_ec_GFp_simple_group_finish,
 1502|  47.0k|        ossl_ec_GFp_simple_group_clear_finish,
 1503|  47.0k|        ossl_ec_GFp_nist_group_copy,
 1504|  47.0k|        ossl_ec_GFp_nistp384_group_set_curve,
 1505|  47.0k|        ossl_ec_GFp_simple_group_get_curve,
 1506|  47.0k|        ossl_ec_GFp_simple_group_get_degree,
 1507|  47.0k|        ossl_ec_group_simple_order_bits,
 1508|  47.0k|        ossl_ec_GFp_simple_group_check_discriminant,
 1509|  47.0k|        ossl_ec_GFp_simple_point_init,
 1510|  47.0k|        ossl_ec_GFp_simple_point_finish,
 1511|  47.0k|        ossl_ec_GFp_simple_point_clear_finish,
 1512|  47.0k|        ossl_ec_GFp_simple_point_copy,
 1513|  47.0k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1514|  47.0k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1515|  47.0k|        ossl_ec_GFp_nistp384_point_get_affine_coordinates,
 1516|  47.0k|        0, /* point_set_compressed_coordinates */
 1517|  47.0k|        0, /* point2oct */
 1518|  47.0k|        0, /* oct2point */
 1519|  47.0k|        ossl_ec_GFp_simple_add,
 1520|  47.0k|        ossl_ec_GFp_simple_dbl,
 1521|  47.0k|        ossl_ec_GFp_simple_invert,
 1522|  47.0k|        ossl_ec_GFp_simple_is_at_infinity,
 1523|  47.0k|        ossl_ec_GFp_simple_is_on_curve,
 1524|  47.0k|        ossl_ec_GFp_simple_cmp,
 1525|  47.0k|        ossl_ec_GFp_simple_make_affine,
 1526|  47.0k|        ossl_ec_GFp_simple_points_make_affine,
 1527|  47.0k|        ossl_ec_GFp_nistp384_points_mul,
 1528|  47.0k|        ossl_ec_GFp_nistp384_precompute_mult,
 1529|  47.0k|        ossl_ec_GFp_nistp384_have_precompute_mult,
 1530|  47.0k|        ossl_ec_GFp_nist_field_mul,
 1531|  47.0k|        ossl_ec_GFp_nist_field_sqr,
 1532|  47.0k|        0, /* field_div */
 1533|  47.0k|        ossl_ec_GFp_simple_field_inv,
 1534|  47.0k|        0, /* field_encode */
 1535|  47.0k|        0, /* field_decode */
 1536|  47.0k|        0, /* field_set_to_one */
 1537|  47.0k|        ossl_ec_key_simple_priv2oct,
 1538|  47.0k|        ossl_ec_key_simple_oct2priv,
 1539|  47.0k|        0, /* set private */
 1540|  47.0k|        ossl_ec_key_simple_generate_key,
 1541|  47.0k|        ossl_ec_key_simple_check_key,
 1542|  47.0k|        ossl_ec_key_simple_generate_public_key,
 1543|  47.0k|        0, /* keycopy */
 1544|  47.0k|        0, /* keyfinish */
 1545|  47.0k|        ossl_ecdh_simple_compute_key,
 1546|  47.0k|        ossl_ecdsa_simple_sign_setup,
 1547|  47.0k|        ossl_ecdsa_simple_sign_sig,
 1548|  47.0k|        ossl_ecdsa_simple_verify_sig,
 1549|  47.0k|        0, /* field_inverse_mod_ord */
 1550|  47.0k|        0, /* blind_coordinates */
 1551|  47.0k|        0, /* ladder_pre */
 1552|  47.0k|        0, /* ladder_step */
 1553|  47.0k|        0 /* ladder_post */
 1554|  47.0k|    };
 1555|       |
 1556|  47.0k|    return &ret;
 1557|  47.0k|}
ossl_ec_GFp_nistp384_group_init:
 1610|  94.0k|{
 1611|  94.0k|    int ret;
 1612|       |
 1613|  94.0k|    ret = ossl_ec_GFp_simple_group_init(group);
 1614|  94.0k|    group->a_is_minus3 = 1;
 1615|  94.0k|    return ret;
 1616|  94.0k|}
ossl_ec_GFp_nistp384_group_set_curve:
 1621|  47.0k|{
 1622|  47.0k|    int ret = 0;
 1623|  47.0k|    BIGNUM *curve_p, *curve_a, *curve_b;
 1624|  47.0k|#ifndef FIPS_MODULE
 1625|  47.0k|    BN_CTX *new_ctx = NULL;
 1626|       |
 1627|  47.0k|    if (ctx == NULL)
  ------------------
  |  Branch (1627:9): [True: 0, False: 47.0k]
  ------------------
 1628|      0|        ctx = new_ctx = BN_CTX_new();
 1629|  47.0k|#endif
 1630|  47.0k|    if (ctx == NULL)
  ------------------
  |  Branch (1630:9): [True: 0, False: 47.0k]
  ------------------
 1631|      0|        return 0;
 1632|       |
 1633|  47.0k|    BN_CTX_start(ctx);
 1634|  47.0k|    curve_p = BN_CTX_get(ctx);
 1635|  47.0k|    curve_a = BN_CTX_get(ctx);
 1636|  47.0k|    curve_b = BN_CTX_get(ctx);
 1637|  47.0k|    if (curve_b == NULL)
  ------------------
  |  Branch (1637:9): [True: 0, False: 47.0k]
  ------------------
 1638|      0|        goto err;
 1639|  47.0k|    BN_bin2bn(nistp384_curve_params[0], sizeof(felem_bytearray), curve_p);
 1640|  47.0k|    BN_bin2bn(nistp384_curve_params[1], sizeof(felem_bytearray), curve_a);
 1641|  47.0k|    BN_bin2bn(nistp384_curve_params[2], sizeof(felem_bytearray), curve_b);
 1642|  47.0k|    if ((BN_cmp(curve_p, p)) || (BN_cmp(curve_a, a)) || (BN_cmp(curve_b, b))) {
  ------------------
  |  Branch (1642:9): [True: 0, False: 47.0k]
  |  Branch (1642:33): [True: 0, False: 47.0k]
  |  Branch (1642:57): [True: 0, False: 47.0k]
  ------------------
 1643|      0|        ERR_raise(ERR_LIB_EC, EC_R_WRONG_CURVE_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1644|      0|        goto err;
 1645|      0|    }
 1646|  47.0k|    group->field_mod_func = BN_nist_mod_384;
 1647|  47.0k|    ret = ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
 1648|  47.0k|err:
 1649|  47.0k|    BN_CTX_end(ctx);
 1650|  47.0k|#ifndef FIPS_MODULE
 1651|  47.0k|    BN_CTX_free(new_ctx);
 1652|  47.0k|#endif
 1653|  47.0k|    return ret;
 1654|  47.0k|}

EC_GFp_nistz256_method:
 1570|  5.22k|{
 1571|  5.22k|    static const EC_METHOD ret = {
 1572|  5.22k|        EC_FLAGS_DEFAULT_OCT,
  ------------------
  |  |   26|  5.22k|#define EC_FLAGS_DEFAULT_OCT 0x1
  ------------------
 1573|  5.22k|        NID_X9_62_prime_field,
  ------------------
  |  |  152|  5.22k|#define NID_X9_62_prime_field           406
  ------------------
 1574|  5.22k|        ossl_ec_GFp_mont_group_init,
 1575|  5.22k|        ossl_ec_GFp_mont_group_finish,
 1576|  5.22k|        ossl_ec_GFp_mont_group_clear_finish,
 1577|  5.22k|        ossl_ec_GFp_mont_group_copy,
 1578|  5.22k|        ossl_ec_GFp_mont_group_set_curve,
 1579|  5.22k|        ossl_ec_GFp_simple_group_get_curve,
 1580|  5.22k|        ossl_ec_GFp_simple_group_get_degree,
 1581|  5.22k|        ossl_ec_group_simple_order_bits,
 1582|  5.22k|        ossl_ec_GFp_simple_group_check_discriminant,
 1583|  5.22k|        ossl_ec_GFp_simple_point_init,
 1584|  5.22k|        ossl_ec_GFp_simple_point_finish,
 1585|  5.22k|        ossl_ec_GFp_simple_point_clear_finish,
 1586|  5.22k|        ossl_ec_GFp_simple_point_copy,
 1587|  5.22k|        ossl_ec_GFp_simple_point_set_to_infinity,
 1588|  5.22k|        ossl_ec_GFp_simple_point_set_affine_coordinates,
 1589|  5.22k|        ecp_nistz256_get_affine,
 1590|  5.22k|        0, 0, 0,
 1591|  5.22k|        ossl_ec_GFp_simple_add,
 1592|  5.22k|        ossl_ec_GFp_simple_dbl,
 1593|  5.22k|        ossl_ec_GFp_simple_invert,
 1594|  5.22k|        ossl_ec_GFp_simple_is_at_infinity,
 1595|  5.22k|        ossl_ec_GFp_simple_is_on_curve,
 1596|  5.22k|        ossl_ec_GFp_simple_cmp,
 1597|  5.22k|        ossl_ec_GFp_simple_make_affine,
 1598|  5.22k|        ossl_ec_GFp_simple_points_make_affine,
 1599|  5.22k|        ecp_nistz256_points_mul, /* mul */
 1600|  5.22k|        ecp_nistz256_mult_precompute, /* precompute_mult */
 1601|  5.22k|        ecp_nistz256_window_have_precompute_mult, /* have_precompute_mult */
 1602|  5.22k|        ossl_ec_GFp_mont_field_mul,
 1603|  5.22k|        ossl_ec_GFp_mont_field_sqr,
 1604|  5.22k|        0, /* field_div */
 1605|  5.22k|        ossl_ec_GFp_mont_field_inv,
 1606|  5.22k|        ossl_ec_GFp_mont_field_encode,
 1607|  5.22k|        ossl_ec_GFp_mont_field_decode,
 1608|  5.22k|        ossl_ec_GFp_mont_field_set_to_one,
 1609|  5.22k|        ossl_ec_key_simple_priv2oct,
 1610|  5.22k|        ossl_ec_key_simple_oct2priv,
 1611|  5.22k|        0, /* set private */
 1612|  5.22k|        ossl_ec_key_simple_generate_key,
 1613|  5.22k|        ossl_ec_key_simple_check_key,
 1614|  5.22k|        ossl_ec_key_simple_generate_public_key,
 1615|  5.22k|        0, /* keycopy */
 1616|  5.22k|        0, /* keyfinish */
 1617|  5.22k|        ossl_ecdh_simple_compute_key,
 1618|  5.22k|        ossl_ecdsa_simple_sign_setup,
 1619|  5.22k|        ossl_ecdsa_simple_sign_sig,
 1620|  5.22k|        ossl_ecdsa_simple_verify_sig,
 1621|  5.22k|        ecp_nistz256_inv_mod_ord, /* can be #define-d NULL */
 1622|  5.22k|        0, /* blind_coordinates */
 1623|  5.22k|        0, /* ladder_pre */
 1624|  5.22k|        0, /* ladder_step */
 1625|  5.22k|        0, /* ladder_post */
 1626|  5.22k|        ecp_nistz256group_full_init
 1627|  5.22k|    };
 1628|       |
 1629|  5.22k|    return &ret;
 1630|  5.22k|}
ecp_nistz256.c:ecp_nistz256group_full_init:
 1445|  5.22k|{
 1446|  5.22k|    BN_CTX *ctx = NULL;
 1447|  5.22k|    BN_MONT_CTX *mont = NULL, *ordmont = NULL;
 1448|  5.22k|    const int param_len = 32;
 1449|  5.22k|    const int seed_len = 20;
 1450|  5.22k|    int ok = 0;
 1451|  5.22k|    uint32_t hi_order_n = 0xccd1c8aa;
 1452|  5.22k|    uint32_t lo_order_n = 0xee00bc4f;
 1453|  5.22k|    BIGNUM *p = NULL, *a = NULL, *b = NULL, *x = NULL, *y = NULL, *one = NULL,
 1454|  5.22k|           *order = NULL;
 1455|  5.22k|    EC_POINT *P = NULL;
 1456|       |
 1457|  5.22k|    if ((ctx = BN_CTX_new_ex(group->libctx)) == NULL) {
  ------------------
  |  Branch (1457:9): [True: 0, False: 5.22k]
  ------------------
 1458|      0|        ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1459|      0|        return 0;
 1460|      0|    }
 1461|       |
 1462|  5.22k|    if (!EC_GROUP_set_seed(group, params, seed_len)) {
  ------------------
  |  Branch (1462:9): [True: 0, False: 5.22k]
  ------------------
 1463|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1464|      0|        goto err;
 1465|      0|    }
 1466|  5.22k|    params += seed_len;
 1467|       |
 1468|  5.22k|    if ((p = BN_bin2bn(params + 0 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1468:9): [True: 0, False: 5.22k]
  ------------------
 1469|  5.22k|        || (a = BN_bin2bn(params + 1 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1469:12): [True: 0, False: 5.22k]
  ------------------
 1470|  5.22k|        || (b = BN_bin2bn(params + 2 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1470:12): [True: 0, False: 5.22k]
  ------------------
 1471|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1472|      0|        goto err;
 1473|      0|    }
 1474|       |
 1475|       |    /*
 1476|       |     * Set up curve params and montgomery for field
 1477|       |     * Start by setting up montgomery and one
 1478|       |     */
 1479|  5.22k|    mont = BN_MONT_CTX_new();
 1480|  5.22k|    if (mont == NULL)
  ------------------
  |  Branch (1480:9): [True: 0, False: 5.22k]
  ------------------
 1481|      0|        goto err;
 1482|       |
 1483|  5.22k|    if (!ossl_bn_mont_ctx_set(mont, p, 256, params + 6 * param_len, param_len,
  ------------------
  |  Branch (1483:9): [True: 0, False: 5.22k]
  ------------------
 1484|  5.22k|            1, 0))
 1485|      0|        goto err;
 1486|       |
 1487|  5.22k|    one = BN_new();
 1488|  5.22k|    if (one == NULL) {
  ------------------
  |  Branch (1488:9): [True: 0, False: 5.22k]
  ------------------
 1489|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1490|      0|        goto err;
 1491|      0|    }
 1492|  5.22k|    if (!BN_to_montgomery(one, BN_value_one(), mont, ctx)) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 5.22k]
  ------------------
 1493|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1494|      0|        goto err;
 1495|      0|    }
 1496|  5.22k|    group->field_data1 = mont;
 1497|  5.22k|    mont = NULL;
 1498|  5.22k|    group->field_data2 = one;
 1499|  5.22k|    one = NULL;
 1500|       |
 1501|  5.22k|    if (!ossl_ec_GFp_simple_group_set_curve(group, p, a, b, ctx)) {
  ------------------
  |  Branch (1501:9): [True: 0, False: 5.22k]
  ------------------
 1502|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1503|      0|        goto err;
 1504|      0|    }
 1505|       |
 1506|  5.22k|    if ((P = EC_POINT_new(group)) == NULL) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 5.22k]
  ------------------
 1507|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1508|      0|        goto err;
 1509|      0|    }
 1510|       |
 1511|  5.22k|    if ((x = BN_bin2bn(params + 3 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1511:9): [True: 0, False: 5.22k]
  ------------------
 1512|  5.22k|        || (y = BN_bin2bn(params + 4 * param_len, param_len, NULL)) == NULL) {
  ------------------
  |  Branch (1512:12): [True: 0, False: 5.22k]
  ------------------
 1513|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1514|      0|        goto err;
 1515|      0|    }
 1516|  5.22k|    if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) {
  ------------------
  |  Branch (1516:9): [True: 0, False: 5.22k]
  ------------------
 1517|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1518|      0|        goto err;
 1519|      0|    }
 1520|  5.22k|    if ((order = BN_bin2bn(params + 5 * param_len, param_len, NULL)) == NULL
  ------------------
  |  Branch (1520:9): [True: 0, False: 5.22k]
  ------------------
 1521|  5.22k|        || !BN_set_word(x, (BN_ULONG)1)) { /* cofactor is 1 */
  ------------------
  |  Branch (1521:12): [True: 0, False: 5.22k]
  ------------------
 1522|      0|        ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1523|      0|        goto err;
 1524|      0|    }
 1525|       |
 1526|       |    /*
 1527|       |     * Set up generator and order and montgomery data
 1528|       |     */
 1529|  5.22k|    group->generator = EC_POINT_new(group);
 1530|  5.22k|    if (group->generator == NULL) {
  ------------------
  |  Branch (1530:9): [True: 0, False: 5.22k]
  ------------------
 1531|      0|        ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1532|      0|        goto err;
 1533|      0|    }
 1534|  5.22k|    if (!EC_POINT_copy(group->generator, P))
  ------------------
  |  Branch (1534:9): [True: 0, False: 5.22k]
  ------------------
 1535|      0|        goto err;
 1536|  5.22k|    if (!BN_copy(group->order, order))
  ------------------
  |  Branch (1536:9): [True: 0, False: 5.22k]
  ------------------
 1537|      0|        goto err;
 1538|  5.22k|    if (!BN_set_word(group->cofactor, 1))
  ------------------
  |  Branch (1538:9): [True: 0, False: 5.22k]
  ------------------
 1539|      0|        goto err;
 1540|       |
 1541|  5.22k|    ordmont = BN_MONT_CTX_new();
 1542|  5.22k|    if (ordmont == NULL)
  ------------------
  |  Branch (1542:9): [True: 0, False: 5.22k]
  ------------------
 1543|      0|        goto err;
 1544|  5.22k|    if (!ossl_bn_mont_ctx_set(ordmont, order, 256, params + 7 * param_len,
  ------------------
  |  Branch (1544:9): [True: 0, False: 5.22k]
  ------------------
 1545|  5.22k|            param_len, lo_order_n, hi_order_n))
 1546|      0|        goto err;
 1547|       |
 1548|  5.22k|    group->mont_data = ordmont;
 1549|  5.22k|    ordmont = NULL;
 1550|       |
 1551|  5.22k|    ok = 1;
 1552|       |
 1553|  5.22k|err:
 1554|  5.22k|    EC_POINT_free(P);
 1555|  5.22k|    BN_CTX_free(ctx);
 1556|  5.22k|    BN_MONT_CTX_free(mont);
 1557|  5.22k|    BN_MONT_CTX_free(ordmont);
 1558|  5.22k|    BN_free(p);
 1559|  5.22k|    BN_free(one);
 1560|  5.22k|    BN_free(a);
 1561|  5.22k|    BN_free(b);
 1562|  5.22k|    BN_free(order);
 1563|  5.22k|    BN_free(x);
 1564|  5.22k|    BN_free(y);
 1565|       |
 1566|  5.22k|    return ok;
 1567|  5.22k|}

ossl_ec_GFp_simple_oct2point:
  276|  52.2k|{
  277|  52.2k|    point_conversion_form_t form;
  278|  52.2k|    int y_bit;
  279|  52.2k|    BN_CTX *new_ctx = NULL;
  280|  52.2k|    BIGNUM *x, *y;
  281|  52.2k|    int field_len, enc_len;
  282|  52.2k|    int ret = 0;
  283|       |
  284|  52.2k|    if (len == 0) {
  ------------------
  |  Branch (284:9): [True: 0, False: 52.2k]
  ------------------
  285|      0|        ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  286|      0|        return 0;
  287|      0|    }
  288|  52.2k|    form = buf[0];
  289|  52.2k|    y_bit = form & 1;
  290|  52.2k|    form = form & ~1U;
  291|  52.2k|    if ((form != 0) && (form != POINT_CONVERSION_COMPRESSED)
  ------------------
  |  Branch (291:9): [True: 52.2k, False: 0]
  |  Branch (291:24): [True: 52.2k, False: 0]
  ------------------
  292|  52.2k|        && (form != POINT_CONVERSION_UNCOMPRESSED)
  ------------------
  |  Branch (292:12): [True: 0, False: 52.2k]
  ------------------
  293|      0|        && (form != POINT_CONVERSION_HYBRID)) {
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  295|      0|        return 0;
  296|      0|    }
  297|  52.2k|    if ((form == 0 || form == POINT_CONVERSION_UNCOMPRESSED) && y_bit) {
  ------------------
  |  Branch (297:10): [True: 0, False: 52.2k]
  |  Branch (297:23): [True: 52.2k, False: 0]
  |  Branch (297:65): [True: 0, False: 52.2k]
  ------------------
  298|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|        return 0;
  300|      0|    }
  301|       |
  302|  52.2k|    if (form == 0) {
  ------------------
  |  Branch (302:9): [True: 0, False: 52.2k]
  ------------------
  303|      0|        if (len != 1) {
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  305|      0|            return 0;
  306|      0|        }
  307|       |
  308|      0|        return EC_POINT_set_to_infinity(group, point);
  309|      0|    }
  310|       |
  311|  52.2k|    field_len = BN_num_bytes(group->field);
  ------------------
  |  |  188|  52.2k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
  312|  52.2k|    enc_len = (form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
  ------------------
  |  Branch (312:15): [True: 0, False: 52.2k]
  ------------------
  313|       |
  314|  52.2k|    if (len != (size_t)enc_len) {
  ------------------
  |  Branch (314:9): [True: 0, False: 52.2k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        return 0;
  317|      0|    }
  318|       |
  319|  52.2k|    if (ctx == NULL) {
  ------------------
  |  Branch (319:9): [True: 52.2k, False: 0]
  ------------------
  320|  52.2k|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  321|  52.2k|        if (ctx == NULL)
  ------------------
  |  Branch (321:13): [True: 0, False: 52.2k]
  ------------------
  322|      0|            return 0;
  323|  52.2k|    }
  324|       |
  325|  52.2k|    BN_CTX_start(ctx);
  326|  52.2k|    x = BN_CTX_get(ctx);
  327|  52.2k|    y = BN_CTX_get(ctx);
  328|  52.2k|    if (y == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 52.2k]
  ------------------
  329|      0|        goto err;
  330|       |
  331|  52.2k|    if (!BN_bin2bn(buf + 1, field_len, x))
  ------------------
  |  Branch (331:9): [True: 0, False: 52.2k]
  ------------------
  332|      0|        goto err;
  333|  52.2k|    if (BN_ucmp(x, group->field) >= 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 52.2k]
  ------------------
  334|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  335|      0|        goto err;
  336|      0|    }
  337|       |
  338|  52.2k|    if (form == POINT_CONVERSION_COMPRESSED) {
  ------------------
  |  Branch (338:9): [True: 0, False: 52.2k]
  ------------------
  339|      0|        if (!EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx))
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  ------------------
  340|      0|            goto err;
  341|  52.2k|    } else {
  342|  52.2k|        if (!BN_bin2bn(buf + 1 + field_len, field_len, y))
  ------------------
  |  Branch (342:13): [True: 0, False: 52.2k]
  ------------------
  343|      0|            goto err;
  344|  52.2k|        if (BN_ucmp(y, group->field) >= 0) {
  ------------------
  |  Branch (344:13): [True: 0, False: 52.2k]
  ------------------
  345|      0|            ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  346|      0|            goto err;
  347|      0|        }
  348|  52.2k|        if (form == POINT_CONVERSION_HYBRID) {
  ------------------
  |  Branch (348:13): [True: 0, False: 52.2k]
  ------------------
  349|      0|            if (y_bit != BN_is_odd(y)) {
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  351|      0|                goto err;
  352|      0|            }
  353|      0|        }
  354|       |
  355|       |        /*
  356|       |         * EC_POINT_set_affine_coordinates is responsible for checking that
  357|       |         * the point is on the curve.
  358|       |         */
  359|  52.2k|        if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
  ------------------
  |  Branch (359:13): [True: 0, False: 52.2k]
  ------------------
  360|      0|            goto err;
  361|  52.2k|    }
  362|       |
  363|  52.2k|    ret = 1;
  364|       |
  365|  52.2k|err:
  366|  52.2k|    BN_CTX_end(ctx);
  367|  52.2k|    BN_CTX_free(new_ctx);
  368|  52.2k|    return ret;
  369|  52.2k|}

ossl_ec_GFp_simple_group_init:
   99|   104k|{
  100|   104k|    group->field = BN_new();
  101|   104k|    group->a = BN_new();
  102|   104k|    group->b = BN_new();
  103|   104k|    if (group->field == NULL || group->a == NULL || group->b == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 104k]
  |  Branch (103:33): [True: 0, False: 104k]
  |  Branch (103:53): [True: 0, False: 104k]
  ------------------
  104|      0|        BN_free(group->field);
  105|      0|        BN_free(group->a);
  106|      0|        BN_free(group->b);
  107|      0|        return 0;
  108|      0|    }
  109|   104k|    group->a_is_minus3 = 0;
  110|   104k|    return 1;
  111|   104k|}
ossl_ec_GFp_simple_group_finish:
  114|   104k|{
  115|   104k|    BN_free(group->field);
  116|   104k|    BN_free(group->a);
  117|   104k|    BN_free(group->b);
  118|   104k|}
ossl_ec_GFp_simple_group_copy:
  128|  52.2k|{
  129|  52.2k|    if (!BN_copy(dest->field, src->field))
  ------------------
  |  Branch (129:9): [True: 0, False: 52.2k]
  ------------------
  130|      0|        return 0;
  131|  52.2k|    if (!BN_copy(dest->a, src->a))
  ------------------
  |  Branch (131:9): [True: 0, False: 52.2k]
  ------------------
  132|      0|        return 0;
  133|  52.2k|    if (!BN_copy(dest->b, src->b))
  ------------------
  |  Branch (133:9): [True: 0, False: 52.2k]
  ------------------
  134|      0|        return 0;
  135|       |
  136|  52.2k|    dest->a_is_minus3 = src->a_is_minus3;
  137|       |
  138|  52.2k|    return 1;
  139|  52.2k|}
ossl_ec_GFp_simple_group_set_curve:
  144|  52.2k|{
  145|  52.2k|    int ret = 0;
  146|  52.2k|    BN_CTX *new_ctx = NULL;
  147|  52.2k|    BIGNUM *tmp_a;
  148|       |
  149|       |    /* p must be a prime > 3 */
  150|  52.2k|    if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) {
  ------------------
  |  Branch (150:9): [True: 0, False: 52.2k]
  |  Branch (150:32): [True: 0, False: 52.2k]
  ------------------
  151|      0|        ERR_raise(ERR_LIB_EC, EC_R_INVALID_FIELD);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  152|      0|        return 0;
  153|      0|    }
  154|       |
  155|  52.2k|    if (ctx == NULL) {
  ------------------
  |  Branch (155:9): [True: 0, False: 52.2k]
  ------------------
  156|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  157|      0|        if (ctx == NULL)
  ------------------
  |  Branch (157:13): [True: 0, False: 0]
  ------------------
  158|      0|            return 0;
  159|      0|    }
  160|       |
  161|  52.2k|    BN_CTX_start(ctx);
  162|  52.2k|    tmp_a = BN_CTX_get(ctx);
  163|  52.2k|    if (tmp_a == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 52.2k]
  ------------------
  164|      0|        goto err;
  165|       |
  166|       |    /* group->field */
  167|  52.2k|    if (!BN_copy(group->field, p))
  ------------------
  |  Branch (167:9): [True: 0, False: 52.2k]
  ------------------
  168|      0|        goto err;
  169|  52.2k|    BN_set_negative(group->field, 0);
  170|       |
  171|       |    /* group->a */
  172|  52.2k|    if (!BN_nnmod(tmp_a, a, p, ctx))
  ------------------
  |  Branch (172:9): [True: 0, False: 52.2k]
  ------------------
  173|      0|        goto err;
  174|  52.2k|    if (group->meth->field_encode != NULL) {
  ------------------
  |  Branch (174:9): [True: 5.22k, False: 47.0k]
  ------------------
  175|  5.22k|        if (!group->meth->field_encode(group, group->a, tmp_a, ctx))
  ------------------
  |  Branch (175:13): [True: 0, False: 5.22k]
  ------------------
  176|      0|            goto err;
  177|  47.0k|    } else if (!BN_copy(group->a, tmp_a))
  ------------------
  |  Branch (177:16): [True: 0, False: 47.0k]
  ------------------
  178|      0|        goto err;
  179|       |
  180|       |    /* group->b */
  181|  52.2k|    if (!BN_nnmod(group->b, b, p, ctx))
  ------------------
  |  Branch (181:9): [True: 0, False: 52.2k]
  ------------------
  182|      0|        goto err;
  183|  52.2k|    if (group->meth->field_encode != NULL)
  ------------------
  |  Branch (183:9): [True: 5.22k, False: 47.0k]
  ------------------
  184|  5.22k|        if (!group->meth->field_encode(group, group->b, group->b, ctx))
  ------------------
  |  Branch (184:13): [True: 0, False: 5.22k]
  ------------------
  185|      0|            goto err;
  186|       |
  187|       |    /* group->a_is_minus3 */
  188|  52.2k|    if (!BN_add_word(tmp_a, 3))
  ------------------
  |  Branch (188:9): [True: 0, False: 52.2k]
  ------------------
  189|      0|        goto err;
  190|  52.2k|    group->a_is_minus3 = (0 == BN_cmp(tmp_a, group->field));
  191|       |
  192|  52.2k|    ret = 1;
  193|       |
  194|  52.2k|err:
  195|  52.2k|    BN_CTX_end(ctx);
  196|  52.2k|    BN_CTX_free(new_ctx);
  197|  52.2k|    return ret;
  198|  52.2k|}
ossl_ec_GFp_simple_point_init:
  323|   208k|{
  324|   208k|    point->X = BN_new();
  325|   208k|    point->Y = BN_new();
  326|   208k|    point->Z = BN_new();
  327|   208k|    point->Z_is_one = 0;
  328|       |
  329|   208k|    if (point->X == NULL || point->Y == NULL || point->Z == NULL) {
  ------------------
  |  Branch (329:9): [True: 0, False: 208k]
  |  Branch (329:29): [True: 0, False: 208k]
  |  Branch (329:49): [True: 0, False: 208k]
  ------------------
  330|      0|        BN_free(point->X);
  331|      0|        BN_free(point->Y);
  332|      0|        BN_free(point->Z);
  333|      0|        return 0;
  334|      0|    }
  335|   208k|    return 1;
  336|   208k|}
ossl_ec_GFp_simple_point_finish:
  339|   208k|{
  340|   208k|    BN_free(point->X);
  341|   208k|    BN_free(point->Y);
  342|   208k|    BN_free(point->Z);
  343|   208k|}
ossl_ec_GFp_simple_point_copy:
  354|   104k|{
  355|   104k|    if (!BN_copy(dest->X, src->X))
  ------------------
  |  Branch (355:9): [True: 0, False: 104k]
  ------------------
  356|      0|        return 0;
  357|   104k|    if (!BN_copy(dest->Y, src->Y))
  ------------------
  |  Branch (357:9): [True: 0, False: 104k]
  ------------------
  358|      0|        return 0;
  359|   104k|    if (!BN_copy(dest->Z, src->Z))
  ------------------
  |  Branch (359:9): [True: 0, False: 104k]
  ------------------
  360|      0|        return 0;
  361|   104k|    dest->Z_is_one = src->Z_is_one;
  362|   104k|    dest->curve_name = src->curve_name;
  363|       |
  364|   104k|    return 1;
  365|   104k|}
ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp:
  381|   104k|{
  382|   104k|    BN_CTX *new_ctx = NULL;
  383|   104k|    int ret = 0;
  384|       |
  385|   104k|    if (ctx == NULL) {
  ------------------
  |  Branch (385:9): [True: 0, False: 104k]
  ------------------
  386|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  387|      0|        if (ctx == NULL)
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            return 0;
  389|      0|    }
  390|       |
  391|   104k|    if (x != NULL) {
  ------------------
  |  Branch (391:9): [True: 104k, False: 0]
  ------------------
  392|   104k|        if (!BN_nnmod(point->X, x, group->field, ctx))
  ------------------
  |  Branch (392:13): [True: 0, False: 104k]
  ------------------
  393|      0|            goto err;
  394|   104k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (394:13): [True: 10.4k, False: 94.0k]
  ------------------
  395|  10.4k|            if (!group->meth->field_encode(group, point->X, point->X, ctx))
  ------------------
  |  Branch (395:17): [True: 0, False: 10.4k]
  ------------------
  396|      0|                goto err;
  397|  10.4k|        }
  398|   104k|    }
  399|       |
  400|   104k|    if (y != NULL) {
  ------------------
  |  Branch (400:9): [True: 104k, False: 0]
  ------------------
  401|   104k|        if (!BN_nnmod(point->Y, y, group->field, ctx))
  ------------------
  |  Branch (401:13): [True: 0, False: 104k]
  ------------------
  402|      0|            goto err;
  403|   104k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (403:13): [True: 10.4k, False: 94.0k]
  ------------------
  404|  10.4k|            if (!group->meth->field_encode(group, point->Y, point->Y, ctx))
  ------------------
  |  Branch (404:17): [True: 0, False: 10.4k]
  ------------------
  405|      0|                goto err;
  406|  10.4k|        }
  407|   104k|    }
  408|       |
  409|   104k|    if (z != NULL) {
  ------------------
  |  Branch (409:9): [True: 104k, False: 0]
  ------------------
  410|   104k|        int Z_is_one;
  411|       |
  412|   104k|        if (!BN_nnmod(point->Z, z, group->field, ctx))
  ------------------
  |  Branch (412:13): [True: 0, False: 104k]
  ------------------
  413|      0|            goto err;
  414|   104k|        Z_is_one = BN_is_one(point->Z);
  415|   104k|        if (group->meth->field_encode) {
  ------------------
  |  Branch (415:13): [True: 10.4k, False: 94.0k]
  ------------------
  416|  10.4k|            if (Z_is_one && (group->meth->field_set_to_one != 0)) {
  ------------------
  |  Branch (416:17): [True: 10.4k, False: 0]
  |  Branch (416:29): [True: 10.4k, False: 0]
  ------------------
  417|  10.4k|                if (!group->meth->field_set_to_one(group, point->Z, ctx))
  ------------------
  |  Branch (417:21): [True: 0, False: 10.4k]
  ------------------
  418|      0|                    goto err;
  419|  10.4k|            } else {
  420|      0|                if (!group->meth->field_encode(group, point->Z, point->Z, ctx))
  ------------------
  |  Branch (420:21): [True: 0, False: 0]
  ------------------
  421|      0|                    goto err;
  422|      0|            }
  423|  10.4k|        }
  424|   104k|        point->Z_is_one = Z_is_one;
  425|   104k|    }
  426|       |
  427|   104k|    ret = 1;
  428|       |
  429|   104k|err:
  430|   104k|    BN_CTX_free(new_ctx);
  431|   104k|    return ret;
  432|   104k|}
ossl_ec_GFp_simple_point_set_affine_coordinates:
  487|   104k|{
  488|   104k|    if (x == NULL || y == NULL) {
  ------------------
  |  Branch (488:9): [True: 0, False: 104k]
  |  Branch (488:22): [True: 0, False: 104k]
  ------------------
  489|       |        /*
  490|       |         * unlike for projective coordinates, we do not tolerate this
  491|       |         */
  492|      0|        ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        return 0;
  494|      0|    }
  495|       |
  496|   104k|    return EC_POINT_set_Jprojective_coordinates_GFp(group, point, x, y,
  497|   104k|        BN_value_one(), ctx);
  498|   104k|}
ossl_ec_GFp_simple_is_at_infinity:
  951|   104k|{
  952|   104k|    return BN_is_zero(point->Z);
  953|   104k|}
ossl_ec_GFp_simple_is_on_curve:
  957|   104k|{
  958|   104k|    int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *,
  959|   104k|        const BIGNUM *, BN_CTX *);
  960|   104k|    int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
  961|   104k|    const BIGNUM *p;
  962|   104k|    BN_CTX *new_ctx = NULL;
  963|   104k|    BIGNUM *rh, *tmp, *Z4, *Z6;
  964|   104k|    int ret = -1;
  965|       |
  966|   104k|    if (EC_POINT_is_at_infinity(group, point))
  ------------------
  |  Branch (966:9): [True: 0, False: 104k]
  ------------------
  967|      0|        return 1;
  968|       |
  969|   104k|    field_mul = group->meth->field_mul;
  970|   104k|    field_sqr = group->meth->field_sqr;
  971|   104k|    p = group->field;
  972|       |
  973|   104k|    if (ctx == NULL) {
  ------------------
  |  Branch (973:9): [True: 0, False: 104k]
  ------------------
  974|      0|        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
  975|      0|        if (ctx == NULL)
  ------------------
  |  Branch (975:13): [True: 0, False: 0]
  ------------------
  976|      0|            return -1;
  977|      0|    }
  978|       |
  979|   104k|    BN_CTX_start(ctx);
  980|   104k|    rh = BN_CTX_get(ctx);
  981|   104k|    tmp = BN_CTX_get(ctx);
  982|   104k|    Z4 = BN_CTX_get(ctx);
  983|   104k|    Z6 = BN_CTX_get(ctx);
  984|   104k|    if (Z6 == NULL)
  ------------------
  |  Branch (984:9): [True: 0, False: 104k]
  ------------------
  985|      0|        goto err;
  986|       |
  987|       |    /*-
  988|       |     * We have a curve defined by a Weierstrass equation
  989|       |     *      y^2 = x^3 + a*x + b.
  990|       |     * The point to consider is given in Jacobian projective coordinates
  991|       |     * where  (X, Y, Z)  represents  (x, y) = (X/Z^2, Y/Z^3).
  992|       |     * Substituting this and multiplying by  Z^6  transforms the above equation into
  993|       |     *      Y^2 = X^3 + a*X*Z^4 + b*Z^6.
  994|       |     * To test this, we add up the right-hand side in 'rh'.
  995|       |     */
  996|       |
  997|       |    /* rh := X^2 */
  998|   104k|    if (!field_sqr(group, rh, point->X, ctx))
  ------------------
  |  Branch (998:9): [True: 0, False: 104k]
  ------------------
  999|      0|        goto err;
 1000|       |
 1001|   104k|    if (!point->Z_is_one) {
  ------------------
  |  Branch (1001:9): [True: 0, False: 104k]
  ------------------
 1002|      0|        if (!field_sqr(group, tmp, point->Z, ctx))
  ------------------
  |  Branch (1002:13): [True: 0, False: 0]
  ------------------
 1003|      0|            goto err;
 1004|      0|        if (!field_sqr(group, Z4, tmp, ctx))
  ------------------
  |  Branch (1004:13): [True: 0, False: 0]
  ------------------
 1005|      0|            goto err;
 1006|      0|        if (!field_mul(group, Z6, Z4, tmp, ctx))
  ------------------
  |  Branch (1006:13): [True: 0, False: 0]
  ------------------
 1007|      0|            goto err;
 1008|       |
 1009|       |        /* rh := (rh + a*Z^4)*X */
 1010|      0|        if (group->a_is_minus3) {
  ------------------
  |  Branch (1010:13): [True: 0, False: 0]
  ------------------
 1011|      0|            if (!BN_mod_lshift1_quick(tmp, Z4, p))
  ------------------
  |  Branch (1011:17): [True: 0, False: 0]
  ------------------
 1012|      0|                goto err;
 1013|      0|            if (!BN_mod_add_quick(tmp, tmp, Z4, p))
  ------------------
  |  Branch (1013:17): [True: 0, False: 0]
  ------------------
 1014|      0|                goto err;
 1015|      0|            if (!BN_mod_sub_quick(rh, rh, tmp, p))
  ------------------
  |  Branch (1015:17): [True: 0, False: 0]
  ------------------
 1016|      0|                goto err;
 1017|      0|            if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1017:17): [True: 0, False: 0]
  ------------------
 1018|      0|                goto err;
 1019|      0|        } else {
 1020|      0|            if (!field_mul(group, tmp, Z4, group->a, ctx))
  ------------------
  |  Branch (1020:17): [True: 0, False: 0]
  ------------------
 1021|      0|                goto err;
 1022|      0|            if (!BN_mod_add_quick(rh, rh, tmp, p))
  ------------------
  |  Branch (1022:17): [True: 0, False: 0]
  ------------------
 1023|      0|                goto err;
 1024|      0|            if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1024:17): [True: 0, False: 0]
  ------------------
 1025|      0|                goto err;
 1026|      0|        }
 1027|       |
 1028|       |        /* rh := rh + b*Z^6 */
 1029|      0|        if (!field_mul(group, tmp, group->b, Z6, ctx))
  ------------------
  |  Branch (1029:13): [True: 0, False: 0]
  ------------------
 1030|      0|            goto err;
 1031|      0|        if (!BN_mod_add_quick(rh, rh, tmp, p))
  ------------------
  |  Branch (1031:13): [True: 0, False: 0]
  ------------------
 1032|      0|            goto err;
 1033|   104k|    } else {
 1034|       |        /* point->Z_is_one */
 1035|       |
 1036|       |        /* rh := (rh + a)*X */
 1037|   104k|        if (!BN_mod_add_quick(rh, rh, group->a, p))
  ------------------
  |  Branch (1037:13): [True: 0, False: 104k]
  ------------------
 1038|      0|            goto err;
 1039|   104k|        if (!field_mul(group, rh, rh, point->X, ctx))
  ------------------
  |  Branch (1039:13): [True: 0, False: 104k]
  ------------------
 1040|      0|            goto err;
 1041|       |        /* rh := rh + b */
 1042|   104k|        if (!BN_mod_add_quick(rh, rh, group->b, p))
  ------------------
  |  Branch (1042:13): [True: 0, False: 104k]
  ------------------
 1043|      0|            goto err;
 1044|   104k|    }
 1045|       |
 1046|       |    /* 'lh' := Y^2 */
 1047|   104k|    if (!field_sqr(group, tmp, point->Y, ctx))
  ------------------
  |  Branch (1047:9): [True: 0, False: 104k]
  ------------------
 1048|      0|        goto err;
 1049|       |
 1050|   104k|    ret = (0 == BN_ucmp(tmp, rh));
 1051|       |
 1052|   104k|err:
 1053|   104k|    BN_CTX_end(ctx);
 1054|   104k|    BN_CTX_free(new_ctx);
 1055|   104k|    return ret;
 1056|   104k|}

ossl_ecx_key_new:
   22|  2.46k|{
   23|  2.46k|    ECX_KEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.46k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   24|       |
   25|  2.46k|    if (ret == NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 2.46k]
  ------------------
   26|      0|        return NULL;
   27|       |
   28|  2.46k|    ret->libctx = libctx;
   29|  2.46k|    ret->haspubkey = haspubkey;
   30|  2.46k|    switch (type) {
  ------------------
  |  Branch (30:13): [True: 2.46k, False: 0]
  ------------------
   31|  2.46k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (31:5): [True: 2.46k, False: 0]
  ------------------
   32|  2.46k|        ret->keylen = X25519_KEYLEN;
  ------------------
  |  |   26|  2.46k|#define X25519_KEYLEN 32
  ------------------
   33|  2.46k|        break;
   34|      0|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (34:5): [True: 0, False: 2.46k]
  ------------------
   35|      0|        ret->keylen = X448_KEYLEN;
  ------------------
  |  |   27|      0|#define X448_KEYLEN 56
  ------------------
   36|      0|        break;
   37|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (37:5): [True: 0, False: 2.46k]
  ------------------
   38|      0|        ret->keylen = ED25519_KEYLEN;
  ------------------
  |  |   28|      0|#define ED25519_KEYLEN 32
  ------------------
   39|      0|        break;
   40|      0|    case ECX_KEY_TYPE_ED448:
  ------------------
  |  Branch (40:5): [True: 0, False: 2.46k]
  ------------------
   41|      0|        ret->keylen = ED448_KEYLEN;
  ------------------
  |  |   29|      0|#define ED448_KEYLEN 57
  ------------------
   42|      0|        break;
   43|  2.46k|    }
   44|  2.46k|    ret->type = type;
   45|       |
   46|  2.46k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (46:9): [True: 0, False: 2.46k]
  ------------------
   47|      0|        goto err;
   48|       |
   49|  2.46k|    if (propq != NULL) {
  ------------------
  |  Branch (49:9): [True: 0, False: 2.46k]
  ------------------
   50|      0|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|      0|        if (ret->propq == NULL)
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|      0|            goto err;
   53|      0|    }
   54|  2.46k|    return ret;
   55|      0|err:
   56|      0|    if (ret != NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        OPENSSL_free(ret->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|      0|        CRYPTO_FREE_REF(&ret->references);
   59|      0|    }
   60|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |    return NULL;
   62|  2.46k|}
ossl_ecx_key_free:
   65|  2.48k|{
   66|  2.48k|    int i;
   67|       |
   68|  2.48k|    if (key == NULL)
  ------------------
  |  Branch (68:9): [True: 28, False: 2.46k]
  ------------------
   69|     28|        return;
   70|       |
   71|  2.46k|    CRYPTO_DOWN_REF(&key->references, &i);
   72|  2.46k|    REF_PRINT_COUNT("ECX_KEY", i, key);
  ------------------
  |  |  301|  2.46k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  2.46k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  2.46k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  2.46k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   73|  2.46k|    if (i > 0)
  ------------------
  |  Branch (73:9): [True: 0, False: 2.46k]
  ------------------
   74|      0|        return;
   75|  2.46k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.46k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.46k]
  |  |  ------------------
  ------------------
   76|       |
   77|  2.46k|    OPENSSL_free(key->propq);
  ------------------
  |  |  131|  2.46k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   78|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
   79|       |    OPENSSL_cleanse(&key->pubkey, sizeof(key->pubkey));
   80|       |#endif
   81|  2.46k|    OPENSSL_secure_clear_free(key->privkey, key->keylen);
  ------------------
  |  |  149|  2.46k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|  2.46k|    CRYPTO_FREE_REF(&key->references);
   83|  2.46k|    OPENSSL_free(key);
  ------------------
  |  |  131|  2.46k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   84|  2.46k|}
ossl_ecx_key_allocate_privkey:
  104|  2.46k|{
  105|  2.46k|    key->privkey = OPENSSL_secure_zalloc(key->keylen);
  ------------------
  |  |  141|  2.46k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|       |
  107|  2.46k|    return key->privkey;
  108|  2.46k|}

ecx_meth.c:ecx_free:
  156|     28|{
  157|     28|    ossl_ecx_key_free(pkey->pkey.ecx);
  158|     28|}

OSSL_DECODER_from_bio:
   48|   190k|{
   49|   190k|    struct decoder_process_data_st data;
   50|   190k|    int ok = 0;
   51|   190k|    BIO *new_bio = NULL;
   52|   190k|    unsigned long lasterr;
   53|       |
   54|   190k|    if (in == NULL) {
  ------------------
  |  Branch (54:9): [True: 0, False: 190k]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return 0;
   57|      0|    }
   58|       |
   59|   190k|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) == 0) {
  ------------------
  |  Branch (59:9): [True: 0, False: 190k]
  ------------------
   60|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, OSSL_DECODER_R_DECODER_NOT_FOUND,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, OSSL_DECODER_R_DECODER_NOT_FOUND,
  ------------------
  |  |  123|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, OSSL_DECODER_R_DECODER_NOT_FOUND,
  ------------------
  |  |   23|      0|#define OSSL_DECODER_R_DECODER_NOT_FOUND 102
  ------------------
   61|      0|            "No decoders were found. For standard decoders you need "
   62|      0|            "at least one of the default or base providers "
   63|      0|            "available. Did you forget to load them?");
   64|      0|        return 0;
   65|      0|    }
   66|       |
   67|   190k|    lasterr = ERR_peek_last_error();
   68|       |
   69|   190k|    if (BIO_tell(in) < 0) {
  ------------------
  |  |  573|   190k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  468|   190k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 190k]
  ------------------
   70|      0|        new_bio = BIO_new(BIO_f_readbuffer());
   71|      0|        if (new_bio == NULL)
  ------------------
  |  Branch (71:13): [True: 0, False: 0]
  ------------------
   72|      0|            return 0;
   73|      0|        in = BIO_push(new_bio, in);
   74|      0|    }
   75|   190k|    memset(&data, 0, sizeof(data));
   76|   190k|    data.ctx = ctx;
   77|   190k|    data.bio = in;
   78|       |
   79|       |    /* Enable passphrase caching */
   80|   190k|    (void)ossl_pw_enable_passphrase_caching(&ctx->pwdata);
   81|       |
   82|   190k|    ok = decoder_process(NULL, &data);
   83|       |
   84|   190k|    if (!data.flag_construct_called) {
  ------------------
  |  Branch (84:9): [True: 0, False: 190k]
  ------------------
   85|      0|        const char *spaces
   86|      0|            = ctx->start_input_type != NULL && ctx->input_structure != NULL
  ------------------
  |  Branch (86:15): [True: 0, False: 0]
  |  Branch (86:48): [True: 0, False: 0]
  ------------------
   87|      0|            ? " "
   88|      0|            : "";
   89|      0|        const char *input_type_label
   90|      0|            = ctx->start_input_type != NULL ? "Input type: " : "";
  ------------------
  |  Branch (90:15): [True: 0, False: 0]
  ------------------
   91|      0|        const char *input_structure_label
   92|      0|            = ctx->input_structure != NULL ? "Input structure: " : "";
  ------------------
  |  Branch (92:15): [True: 0, False: 0]
  ------------------
   93|      0|        const char *comma
   94|      0|            = ctx->start_input_type != NULL && ctx->input_structure != NULL
  ------------------
  |  Branch (94:15): [True: 0, False: 0]
  |  Branch (94:48): [True: 0, False: 0]
  ------------------
   95|      0|            ? ", "
   96|      0|            : "";
   97|      0|        const char *input_type
   98|      0|            = ctx->start_input_type != NULL ? ctx->start_input_type : "";
  ------------------
  |  Branch (98:15): [True: 0, False: 0]
  ------------------
   99|      0|        const char *input_structure
  100|      0|            = ctx->input_structure != NULL ? ctx->input_structure : "";
  ------------------
  |  Branch (100:15): [True: 0, False: 0]
  ------------------
  101|       |
  102|      0|        if (ERR_peek_last_error() == lasterr || ERR_peek_error() == 0)
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  |  Branch (102:49): [True: 0, False: 0]
  ------------------
  103|       |            /* Prevent spurious decoding error but add at least something */
  104|      0|            ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_UNSUPPORTED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_UNSUPPORTED,
  ------------------
  |  |  123|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                          ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_UNSUPPORTED,
  ------------------
  |  |  364|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  105|      0|                "No supported data to decode. %s%s%s%s%s%s",
  106|      0|                spaces, input_type_label, input_type, comma,
  107|      0|                input_structure_label, input_structure);
  108|      0|        ok = 0;
  109|      0|    }
  110|       |
  111|       |    /* Clear any internally cached passphrase */
  112|   190k|    (void)ossl_pw_clear_passphrase_cache(&ctx->pwdata);
  113|       |
  114|   190k|    if (new_bio != NULL) {
  ------------------
  |  Branch (114:9): [True: 0, False: 190k]
  ------------------
  115|      0|        BIO_pop(new_bio);
  116|      0|        BIO_free(new_bio);
  117|      0|    }
  118|   190k|    return ok;
  119|   190k|}
OSSL_DECODER_from_data:
  149|   190k|{
  150|   190k|    BIO *membio;
  151|   190k|    int ret = 0;
  152|       |
  153|   190k|    if (pdata == NULL || *pdata == NULL || pdata_len == NULL) {
  ------------------
  |  Branch (153:9): [True: 0, False: 190k]
  |  Branch (153:26): [True: 0, False: 190k]
  |  Branch (153:44): [True: 0, False: 190k]
  ------------------
  154|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  155|      0|        return 0;
  156|      0|    }
  157|       |
  158|   190k|    membio = BIO_new_mem_buf(*pdata, (int)*pdata_len);
  159|   190k|    if (OSSL_DECODER_from_bio(ctx, membio)) {
  ------------------
  |  Branch (159:9): [True: 190k, False: 0]
  ------------------
  160|   190k|        *pdata_len = (size_t)BIO_get_mem_data(membio, pdata);
  ------------------
  |  |  615|   190k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|   190k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
  161|   190k|        ret = 1;
  162|   190k|    }
  163|   190k|    BIO_free(membio);
  164|       |
  165|   190k|    return ret;
  166|   190k|}
OSSL_DECODER_CTX_set_selection:
  169|      2|{
  170|      2|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|      2|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      2|    __FILE__, __LINE__)
  ------------------
  |  Branch (170:9): [True: 0, False: 2]
  ------------------
  171|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  172|      0|        return 0;
  173|      0|    }
  174|       |
  175|       |    /*
  176|       |     * 0 is a valid selection, and means that the caller leaves
  177|       |     * it to code to discover what the selection is.
  178|       |     */
  179|      2|    ctx->selection = selection;
  180|      2|    return 1;
  181|      2|}
OSSL_DECODER_CTX_set_input_type:
  185|   190k|{
  186|   190k|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|   190k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   190k|    __FILE__, __LINE__)
  ------------------
  |  Branch (186:9): [True: 0, False: 190k]
  ------------------
  187|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  188|      0|        return 0;
  189|      0|    }
  190|       |
  191|       |    /*
  192|       |     * NULL is a valid starting input type, and means that the caller leaves
  193|       |     * it to code to discover what the starting input type is.
  194|       |     */
  195|   190k|    ctx->start_input_type = input_type;
  196|   190k|    return 1;
  197|   190k|}
OSSL_DECODER_CTX_set_input_structure:
  201|   190k|{
  202|   190k|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|   190k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   190k|    __FILE__, __LINE__)
  ------------------
  |  Branch (202:9): [True: 0, False: 190k]
  ------------------
  203|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|        return 0;
  205|      0|    }
  206|       |
  207|       |    /*
  208|       |     * NULL is a valid starting input structure, and means that the caller
  209|       |     * leaves it to code to discover what the starting input structure is.
  210|       |     */
  211|   190k|    ctx->input_structure = input_structure;
  212|   190k|    return 1;
  213|   190k|}
ossl_decoder_instance_new:
  244|     17|{
  245|     17|    OSSL_DECODER_INSTANCE *decoder_inst = NULL;
  246|     17|    const OSSL_PROVIDER *prov;
  247|     17|    OSSL_LIB_CTX *libctx;
  248|     17|    const OSSL_PROPERTY_LIST *props;
  249|     17|    const OSSL_PROPERTY_DEFINITION *prop;
  250|       |
  251|     17|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|     17|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     17|    __FILE__, __LINE__)
  ------------------
  |  Branch (251:9): [True: 0, False: 17]
  ------------------
  252|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|        return 0;
  254|      0|    }
  255|       |
  256|     17|    if ((decoder_inst = OPENSSL_zalloc(sizeof(*decoder_inst))) == NULL)
  ------------------
  |  |  108|     17|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (256:9): [True: 0, False: 17]
  ------------------
  257|      0|        return 0;
  258|       |
  259|     17|    prov = OSSL_DECODER_get0_provider(decoder);
  260|     17|    libctx = ossl_provider_libctx(prov);
  261|     17|    props = ossl_decoder_parsed_properties(decoder);
  262|     17|    if (props == NULL) {
  ------------------
  |  Branch (262:9): [True: 0, False: 17]
  ------------------
  263|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  123|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  366|      0|#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  264|      0|            "there are no property definitions with decoder %s",
  265|      0|            OSSL_DECODER_get0_name(decoder));
  266|      0|        goto err;
  267|      0|    }
  268|       |
  269|       |    /* The "input" property is mandatory */
  270|     17|    prop = ossl_property_find_property(props, libctx, "input");
  271|     17|    decoder_inst->input_type = ossl_property_get_string_value(libctx, prop);
  272|     17|    decoder_inst->input_type_id = 0;
  273|     17|    if (decoder_inst->input_type == NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 17]
  ------------------
  274|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  123|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROPERTY_DEFINITION,
  ------------------
  |  |  366|      0|#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  275|      0|            "the mandatory 'input' property is missing "
  276|      0|            "for decoder %s (properties: %s)",
  277|      0|            OSSL_DECODER_get0_name(decoder),
  278|      0|            OSSL_DECODER_get0_properties(decoder));
  279|      0|        goto err;
  280|      0|    }
  281|       |
  282|       |    /* The "structure" property is optional */
  283|     17|    prop = ossl_property_find_property(props, libctx, "structure");
  284|     17|    if (prop != NULL) {
  ------------------
  |  Branch (284:9): [True: 9, False: 8]
  ------------------
  285|      9|        decoder_inst->input_structure
  286|      9|            = ossl_property_get_string_value(libctx, prop);
  287|      9|    }
  288|       |
  289|     17|    if (!OSSL_DECODER_up_ref(decoder)) {
  ------------------
  |  Branch (289:9): [True: 0, False: 17]
  ------------------
  290|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  291|      0|        goto err;
  292|      0|    }
  293|     17|    decoder_inst->decoder = decoder;
  294|     17|    decoder_inst->decoderctx = decoderctx;
  295|     17|    return decoder_inst;
  296|      0|err:
  297|      0|    ossl_decoder_instance_free(decoder_inst);
  298|       |    return NULL;
  299|     17|}
ossl_decoder_instance_free:
  302|  1.09M|{
  303|  1.09M|    if (decoder_inst != NULL) {
  ------------------
  |  Branch (303:9): [True: 1.09M, False: 0]
  ------------------
  304|  1.09M|        if (decoder_inst->decoder != NULL)
  ------------------
  |  Branch (304:13): [True: 1.09M, False: 0]
  ------------------
  305|  1.09M|            decoder_inst->decoder->freectx(decoder_inst->decoderctx);
  306|  1.09M|        decoder_inst->decoderctx = NULL;
  307|  1.09M|        OSSL_DECODER_free(decoder_inst->decoder);
  308|  1.09M|        decoder_inst->decoder = NULL;
  309|  1.09M|        OPENSSL_free(decoder_inst);
  ------------------
  |  |  131|  1.09M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  310|  1.09M|    }
  311|  1.09M|}
ossl_decoder_instance_dup:
  314|  1.09M|{
  315|  1.09M|    OSSL_DECODER_INSTANCE *dest;
  316|  1.09M|    const OSSL_PROVIDER *prov;
  317|  1.09M|    void *provctx;
  318|       |
  319|  1.09M|    if ((dest = OPENSSL_zalloc(sizeof(*dest))) == NULL)
  ------------------
  |  |  108|  1.09M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (319:9): [True: 0, False: 1.09M]
  ------------------
  320|      0|        return NULL;
  321|       |
  322|  1.09M|    *dest = *src;
  323|  1.09M|    if (!OSSL_DECODER_up_ref(dest->decoder)) {
  ------------------
  |  Branch (323:9): [True: 0, False: 1.09M]
  ------------------
  324|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  325|      0|        goto err;
  326|      0|    }
  327|  1.09M|    prov = OSSL_DECODER_get0_provider(dest->decoder);
  328|  1.09M|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  329|       |
  330|  1.09M|    dest->decoderctx = dest->decoder->newctx(provctx);
  331|  1.09M|    if (dest->decoderctx == NULL) {
  ------------------
  |  Branch (331:9): [True: 0, False: 1.09M]
  ------------------
  332|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  333|      0|        OSSL_DECODER_free(dest->decoder);
  334|      0|        goto err;
  335|      0|    }
  336|       |
  337|  1.09M|    return dest;
  338|       |
  339|      0|err:
  340|      0|    OPENSSL_free(dest);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  341|       |    return NULL;
  342|  1.09M|}
ossl_decoder_ctx_add_decoder_inst:
  356|     11|{
  357|     11|    int ok;
  358|       |
  359|     11|    if (ctx->decoder_insts == NULL
  ------------------
  |  Branch (359:9): [True: 2, False: 9]
  ------------------
  360|      2|        && (ctx->decoder_insts = sk_OSSL_DECODER_INSTANCE_new_null()) == NULL) {
  ------------------
  |  Branch (360:12): [True: 0, False: 2]
  ------------------
  361|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  362|      0|        return 0;
  363|      0|    }
  364|       |
  365|     11|    ok = (sk_OSSL_DECODER_INSTANCE_push(ctx->decoder_insts, di) > 0);
  366|     11|    if (ok) {
  ------------------
  |  Branch (366:9): [True: 11, False: 0]
  ------------------
  367|     11|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|     11|    do {                           \
  |  |  222|     11|        BIO *trc_out = NULL;       \
  |  |  223|     11|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 11]
  |  |  ------------------
  ------------------
  368|      0|        {
  369|      0|            BIO_printf(trc_out,
  370|      0|                "(ctx %p) Added decoder instance %p for decoder %p\n"
  371|      0|                "    %s with %s\n",
  372|      0|                (void *)ctx, (void *)di, (void *)di->decoder,
  373|      0|                OSSL_DECODER_get0_name(di->decoder),
  374|      0|                OSSL_DECODER_get0_properties(di->decoder));
  375|      0|        }
  376|     11|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|     11|    }                            \
  |  |  227|     11|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 11]
  |  |  ------------------
  ------------------
  377|     11|    }
  378|     11|    return ok;
  379|     11|}
OSSL_DECODER_CTX_add_extra:
  558|      2|{
  559|       |    /*
  560|       |     * This function goes through existing decoder methods in
  561|       |     * |ctx->decoder_insts|, and tries to fetch new decoders that produce
  562|       |     * what the existing ones want as input, and push those newly fetched
  563|       |     * decoders on top of the same stack.
  564|       |     * Then it does the same again, but looping over the newly fetched
  565|       |     * decoders, until there are no more decoders to be fetched, or
  566|       |     * when we have done this 10 times.
  567|       |     *
  568|       |     * we do this with sliding windows on the stack by keeping track of indexes
  569|       |     * and of the end.
  570|       |     *
  571|       |     * +----------------+
  572|       |     * |   DER to RSA   | <--- w_prev_start
  573|       |     * +----------------+
  574|       |     * |   DER to DSA   |
  575|       |     * +----------------+
  576|       |     * |   DER to DH    |
  577|       |     * +----------------+
  578|       |     * |   PEM to DER   | <--- w_prev_end, w_new_start
  579|       |     * +----------------+
  580|       |     *                    <--- w_new_end
  581|       |     */
  582|      2|    struct collect_extra_decoder_data_st data;
  583|      2|    size_t depth = 0; /* Counts the number of iterations */
  584|      2|    size_t count; /* Calculates how many were added in each iteration */
  585|      2|    int numdecoders;
  586|      2|    STACK_OF(OSSL_DECODER) *skdecoders;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
  587|       |
  588|      2|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|      2|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      2|    __FILE__, __LINE__)
  ------------------
  |  Branch (588:9): [True: 0, False: 2]
  ------------------
  589|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  590|      0|        return 0;
  591|      0|    }
  592|       |
  593|       |    /*
  594|       |     * If there is no stack of OSSL_DECODER_INSTANCE, we have nothing
  595|       |     * more to add.  That's fine.
  596|       |     */
  597|      2|    if (ctx->decoder_insts == NULL)
  ------------------
  |  Branch (597:9): [True: 0, False: 2]
  ------------------
  598|      0|        return 1;
  599|       |
  600|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  601|      0|    {
  602|      0|        BIO_printf(trc_out, "(ctx %p) Looking for extra decoders\n",
  603|      0|            (void *)ctx);
  604|      0|    }
  605|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  606|       |
  607|      2|    skdecoders = sk_OSSL_DECODER_new_null();
  608|      2|    if (skdecoders == NULL) {
  ------------------
  |  Branch (608:9): [True: 0, False: 2]
  ------------------
  609|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  610|      0|        return 0;
  611|      0|    }
  612|      2|    OSSL_DECODER_do_all_provided(libctx, collect_all_decoders, skdecoders);
  613|      2|    numdecoders = sk_OSSL_DECODER_num(skdecoders);
  614|       |
  615|       |    /*
  616|       |     * If there are provided or default properties, sort the initial decoder list
  617|       |     * by property matching score so that the highest scored provider is selected
  618|       |     * first.
  619|       |     */
  620|      2|    if (propq != NULL || ossl_ctx_global_properties(libctx, 0) != NULL) {
  ------------------
  |  Branch (620:9): [True: 0, False: 2]
  |  Branch (620:26): [True: 2, False: 0]
  ------------------
  621|      2|        int num_decoder_insts = sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  622|      2|        int i;
  623|      2|        OSSL_DECODER_INSTANCE *di;
  624|      2|        sk_OSSL_DECODER_INSTANCE_compfunc old_cmp = sk_OSSL_DECODER_INSTANCE_set_cmp_func(ctx->decoder_insts, decoder_sk_cmp);
  625|       |
  626|      7|        for (i = 0; i < num_decoder_insts; i++) {
  ------------------
  |  Branch (626:21): [True: 5, False: 2]
  ------------------
  627|      5|            di = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
  628|      5|            di->order = i;
  629|      5|        }
  630|      2|        sk_OSSL_DECODER_INSTANCE_sort(ctx->decoder_insts);
  631|      2|        sk_OSSL_DECODER_INSTANCE_set_cmp_func(ctx->decoder_insts, old_cmp);
  632|      2|    }
  633|       |
  634|      2|    memset(&data, 0, sizeof(data));
  635|      2|    data.ctx = ctx;
  636|      2|    data.w_prev_start = 0;
  637|      2|    data.w_prev_end = sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  638|      4|    do {
  639|      4|        int i, j;
  640|       |
  641|      4|        data.w_new_start = data.w_new_end = data.w_prev_end;
  642|       |
  643|       |        /*
  644|       |         * Two iterations:
  645|       |         * 0.  All decoders that have the same name as their input type.
  646|       |         *     This allows for decoders that unwrap some data in a specific
  647|       |         *     encoding, and pass the result on with the same encoding.
  648|       |         * 1.  All decoders that a different name than their input type.
  649|       |         */
  650|      4|        for (data.type_check = IS_SAME;
  651|     12|            data.type_check <= IS_DIFFERENT;
  ------------------
  |  Branch (651:13): [True: 8, False: 4]
  ------------------
  652|      8|            data.type_check++) {
  653|     30|            for (i = data.w_prev_start; i < data.w_prev_end; i++) {
  ------------------
  |  Branch (653:41): [True: 22, False: 8]
  ------------------
  654|     22|                OSSL_DECODER_INSTANCE *decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
  655|       |
  656|     22|                data.output_type
  657|     22|                    = OSSL_DECODER_INSTANCE_get_input_type(decoder_inst);
  658|       |
  659|     22|                data.output_type_id = 0;
  660|       |
  661|  1.69k|                for (j = 0; j < numdecoders; j++)
  ------------------
  |  Branch (661:29): [True: 1.67k, False: 22]
  ------------------
  662|  1.67k|                    collect_extra_decoder(sk_OSSL_DECODER_value(skdecoders, j),
  663|  1.67k|                        &data);
  664|     22|            }
  665|      8|        }
  666|       |        /* How many were added in this iteration */
  667|      4|        count = data.w_new_end - data.w_new_start;
  668|       |
  669|       |        /* Slide the "previous decoder" windows */
  670|      4|        data.w_prev_start = data.w_new_start;
  671|      4|        data.w_prev_end = data.w_new_end;
  672|       |
  673|      4|        depth++;
  674|      4|    } while (count != 0 && depth <= 10);
  ------------------
  |  Branch (674:14): [True: 2, False: 2]
  |  Branch (674:28): [True: 2, False: 0]
  ------------------
  675|       |
  676|      2|    sk_OSSL_DECODER_pop_free(skdecoders, OSSL_DECODER_free);
  677|      2|    return 1;
  678|      2|}
OSSL_DECODER_CTX_get_num_decoders:
  681|   381k|{
  682|   381k|    if (ctx == NULL || ctx->decoder_insts == NULL)
  ------------------
  |  Branch (682:9): [True: 0, False: 381k]
  |  Branch (682:24): [True: 0, False: 381k]
  ------------------
  683|      0|        return 0;
  684|   381k|    return sk_OSSL_DECODER_INSTANCE_num(ctx->decoder_insts);
  685|   381k|}
OSSL_DECODER_CTX_set_construct:
  689|   190k|{
  690|   190k|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|   190k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   190k|    __FILE__, __LINE__)
  ------------------
  |  Branch (690:9): [True: 0, False: 190k]
  ------------------
  691|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|        return 0;
  693|      0|    }
  694|   190k|    ctx->construct = construct;
  695|   190k|    return 1;
  696|   190k|}
OSSL_DECODER_CTX_set_construct_data:
  700|   190k|{
  701|   190k|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|   190k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   190k|    __FILE__, __LINE__)
  ------------------
  |  Branch (701:9): [True: 0, False: 190k]
  ------------------
  702|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  703|      0|        return 0;
  704|      0|    }
  705|   190k|    ctx->construct_data = construct_data;
  706|   190k|    return 1;
  707|   190k|}
OSSL_DECODER_CTX_set_cleanup:
  711|   190k|{
  712|   190k|    if (!ossl_assert(ctx != NULL)) {
  ------------------
  |  |   52|   190k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   190k|    __FILE__, __LINE__)
  ------------------
  |  Branch (712:9): [True: 0, False: 190k]
  ------------------
  713|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  714|      0|        return 0;
  715|      0|    }
  716|   190k|    ctx->cleanup = cleanup;
  717|   190k|    return 1;
  718|   190k|}
OSSL_DECODER_CTX_get_construct:
  722|   190k|{
  723|   190k|    if (ctx == NULL)
  ------------------
  |  Branch (723:9): [True: 0, False: 190k]
  ------------------
  724|      0|        return NULL;
  725|   190k|    return ctx->construct;
  726|   190k|}
OSSL_DECODER_CTX_get_construct_data:
  729|   190k|{
  730|   190k|    if (ctx == NULL)
  ------------------
  |  Branch (730:9): [True: 0, False: 190k]
  ------------------
  731|      0|        return NULL;
  732|   190k|    return ctx->construct_data;
  733|   190k|}
OSSL_DECODER_CTX_get_cleanup:
  737|   190k|{
  738|   190k|    if (ctx == NULL)
  ------------------
  |  Branch (738:9): [True: 0, False: 190k]
  ------------------
  739|      0|        return NULL;
  740|   190k|    return ctx->cleanup;
  741|   190k|}
OSSL_DECODER_INSTANCE_get_decoder:
  766|  1.85M|{
  767|  1.85M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (767:9): [True: 0, False: 1.85M]
  ------------------
  768|      0|        return NULL;
  769|  1.85M|    return decoder_inst->decoder;
  770|  1.85M|}
OSSL_DECODER_INSTANCE_get_decoder_ctx:
  774|  1.47M|{
  775|  1.47M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (775:9): [True: 0, False: 1.47M]
  ------------------
  776|      0|        return NULL;
  777|  1.47M|    return decoder_inst->decoderctx;
  778|  1.47M|}
OSSL_DECODER_INSTANCE_get_input_type:
  782|  1.09M|{
  783|  1.09M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (783:9): [True: 0, False: 1.09M]
  ------------------
  784|      0|        return NULL;
  785|  1.09M|    return decoder_inst->input_type;
  786|  1.09M|}
OSSL_DECODER_INSTANCE_get_input_structure:
  791|  1.09M|{
  792|  1.09M|    if (decoder_inst == NULL)
  ------------------
  |  Branch (792:9): [True: 0, False: 1.09M]
  ------------------
  793|      0|        return NULL;
  794|  1.09M|    *was_set = decoder_inst->flag_input_structure_was_set;
  795|  1.09M|    return decoder_inst->input_structure;
  796|  1.09M|}
decoder_lib.c:collect_all_decoders:
  431|    152|{
  432|    152|    STACK_OF(OSSL_DECODER) *skdecoders = arg;
  ------------------
  |  |   33|    152|#define STACK_OF(type) struct stack_st_##type
  ------------------
  433|       |
  434|    152|    if (OSSL_DECODER_up_ref(decoder)
  ------------------
  |  Branch (434:9): [True: 152, False: 0]
  ------------------
  435|    152|        && !sk_OSSL_DECODER_push(skdecoders, decoder))
  ------------------
  |  Branch (435:12): [True: 0, False: 152]
  ------------------
  436|      0|        OSSL_DECODER_free(decoder);
  437|    152|}
decoder_lib.c:decoder_sk_cmp:
  550|      3|{
  551|      3|    if ((*a)->score == (*b)->score)
  ------------------
  |  Branch (551:9): [True: 3, False: 0]
  ------------------
  552|      3|        return (*a)->order - (*b)->order;
  553|      0|    return (*a)->score - (*b)->score;
  554|      3|}
decoder_lib.c:collect_extra_decoder:
  440|  1.67k|{
  441|  1.67k|    struct collect_extra_decoder_data_st *data = arg;
  442|  1.67k|    int j;
  443|  1.67k|    const OSSL_PROVIDER *prov = OSSL_DECODER_get0_provider(decoder);
  444|  1.67k|    void *provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  445|       |
  446|  1.67k|    if (ossl_decoder_fast_is_a(decoder, data->output_type, &data->output_type_id)) {
  ------------------
  |  Branch (446:9): [True: 54, False: 1.61k]
  ------------------
  447|     54|        void *decoderctx = NULL;
  448|     54|        OSSL_DECODER_INSTANCE *di = NULL;
  449|       |
  450|     54|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|     54|    do {                           \
  |  |  222|     54|        BIO *trc_out = NULL;       \
  |  |  223|     54|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 54]
  |  |  ------------------
  ------------------
  451|      0|        {
  452|      0|            BIO_printf(trc_out,
  453|      0|                "(ctx %p) [%d] Checking out decoder %p:\n"
  454|      0|                "    %s with %s\n",
  455|      0|                (void *)data->ctx, data->type_check, (void *)decoder,
  456|      0|                OSSL_DECODER_get0_name(decoder),
  457|      0|                OSSL_DECODER_get0_properties(decoder));
  458|      0|        }
  459|     54|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|     54|    }                            \
  |  |  227|     54|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 54]
  |  |  ------------------
  ------------------
  460|       |
  461|       |        /*
  462|       |         * Check that we don't already have this decoder in our stack,
  463|       |         * starting with the previous windows but also looking at what
  464|       |         * we have added in the current window.
  465|       |         */
  466|    184|        for (j = data->w_prev_start; j < data->w_new_end; j++) {
  ------------------
  |  Branch (466:38): [True: 173, False: 11]
  ------------------
  467|    173|            OSSL_DECODER_INSTANCE *check_inst = sk_OSSL_DECODER_INSTANCE_value(data->ctx->decoder_insts, j);
  468|       |
  469|    173|            if (decoder->base.algodef == check_inst->decoder->base.algodef) {
  ------------------
  |  Branch (469:17): [True: 43, False: 130]
  ------------------
  470|       |                /* We found it, so don't do anything more */
  471|     43|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|     43|    do {                           \
  |  |  222|     43|        BIO *trc_out = NULL;       \
  |  |  223|     43|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 43]
  |  |  ------------------
  ------------------
  472|      0|                {
  473|      0|                    BIO_printf(trc_out,
  474|      0|                        "    REJECTED: already exists in the chain\n");
  475|      0|                }
  476|     43|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|     43|    }                            \
  |  |  227|     43|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 43]
  |  |  ------------------
  ------------------
  477|     43|                return;
  478|     43|            }
  479|    173|        }
  480|       |
  481|     11|        if ((decoderctx = decoder->newctx(provctx)) == NULL)
  ------------------
  |  Branch (481:13): [True: 0, False: 11]
  ------------------
  482|      0|            return;
  483|       |
  484|     11|        if (decoder->set_ctx_params != NULL
  ------------------
  |  Branch (484:13): [True: 11, False: 0]
  ------------------
  485|     11|            && data->ctx->input_structure != NULL) {
  ------------------
  |  Branch (485:16): [True: 11, False: 0]
  ------------------
  486|     11|            OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|     11|    { NULL, 0, NULL, 0, 0 }
  ------------------
                          OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|     11|    { NULL, 0, NULL, 0, 0 }
  ------------------
  487|     11|            const char *str = data->ctx->input_structure;
  488|       |
  489|     11|            params[0] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  357|     11|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  490|     11|                (char *)str, 0);
  491|     11|            if (!decoder->set_ctx_params(decoderctx, params)) {
  ------------------
  |  Branch (491:17): [True: 0, False: 11]
  ------------------
  492|      0|                decoder->freectx(decoderctx);
  493|      0|                return;
  494|      0|            }
  495|     11|        }
  496|       |
  497|     11|        if ((di = ossl_decoder_instance_new(decoder, decoderctx)) == NULL) {
  ------------------
  |  Branch (497:13): [True: 0, False: 11]
  ------------------
  498|      0|            decoder->freectx(decoderctx);
  499|      0|            return;
  500|      0|        }
  501|       |
  502|     11|        switch (data->type_check) {
  ------------------
  |  Branch (502:17): [True: 11, False: 0]
  ------------------
  503|      9|        case IS_SAME:
  ------------------
  |  Branch (503:9): [True: 9, False: 2]
  ------------------
  504|       |            /* If it differs, this is not a decoder to add for now. */
  505|      9|            if (!ossl_decoder_fast_is_a(decoder,
  ------------------
  |  Branch (505:17): [True: 5, False: 4]
  ------------------
  506|      9|                    OSSL_DECODER_INSTANCE_get_input_type(di),
  507|      9|                    &di->input_type_id)) {
  508|      5|                ossl_decoder_instance_free(di);
  509|      5|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      5|    do {                           \
  |  |  222|      5|        BIO *trc_out = NULL;       \
  |  |  223|      5|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 5]
  |  |  ------------------
  ------------------
  510|      0|                {
  511|      0|                    BIO_printf(trc_out,
  512|      0|                        "    REJECTED: input type doesn't match output type\n");
  513|      0|                }
  514|      5|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      5|    }                            \
  |  |  227|      5|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  515|      5|                return;
  516|      5|            }
  517|      4|            break;
  518|      4|        case IS_DIFFERENT:
  ------------------
  |  Branch (518:9): [True: 2, False: 9]
  ------------------
  519|       |            /* If it's the same, this is not a decoder to add for now. */
  520|      2|            if (ossl_decoder_fast_is_a(decoder,
  ------------------
  |  Branch (520:17): [True: 0, False: 2]
  ------------------
  521|      2|                    OSSL_DECODER_INSTANCE_get_input_type(di),
  522|      2|                    &di->input_type_id)) {
  523|      0|                ossl_decoder_instance_free(di);
  524|      0|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      0|    do {                           \
  |  |  222|      0|        BIO *trc_out = NULL;       \
  |  |  223|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  525|      0|                {
  526|      0|                    BIO_printf(trc_out,
  527|      0|                        "    REJECTED: input type matches output type\n");
  528|      0|                }
  529|      0|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      0|    }                            \
  |  |  227|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
  530|      0|                return;
  531|      0|            }
  532|      2|            break;
  533|     11|        }
  534|       |
  535|       |        /*
  536|       |         * Apart from keeping w_new_end up to date, We don't care about
  537|       |         * errors here.  If it doesn't collect, then it doesn't...
  538|       |         */
  539|      6|        if (!ossl_decoder_ctx_add_decoder_inst(data->ctx, di)) {
  ------------------
  |  Branch (539:13): [True: 0, False: 6]
  ------------------
  540|      0|            ossl_decoder_instance_free(di);
  541|      0|            return;
  542|      0|        }
  543|       |
  544|      6|        data->w_new_end++;
  545|      6|    }
  546|  1.67k|}
decoder_lib.c:decoder_process:
  799|   572k|{
  800|   572k|    struct decoder_process_data_st *data = arg;
  801|   572k|    OSSL_DECODER_CTX *ctx = data->ctx;
  802|   572k|    OSSL_DECODER_INSTANCE *decoder_inst = NULL;
  803|   572k|    OSSL_DECODER *decoder = NULL;
  804|   572k|    OSSL_CORE_BIO *cbio = NULL;
  805|   572k|    BIO *bio = data->bio;
  806|   572k|    long loc;
  807|   572k|    int i;
  808|   572k|    int ok = 0;
  809|       |    /* For recursions */
  810|   572k|    struct decoder_process_data_st new_data;
  811|   572k|    const char *data_type = NULL;
  812|   572k|    const char *data_structure = NULL;
  813|       |    /* Saved to restore on return, mutated in PEM->DER transition. */
  814|   572k|    const char *start_input_type = ctx->start_input_type;
  815|       |
  816|       |    /*
  817|       |     * This is an indicator up the call stack that something was indeed
  818|       |     * decoded, leading to a recursive call of this function.
  819|       |     */
  820|   572k|    data->flag_next_level_called = 1;
  821|       |
  822|   572k|    memset(&new_data, 0, sizeof(new_data));
  823|   572k|    new_data.ctx = data->ctx;
  824|   572k|    new_data.recursion = data->recursion + 1;
  825|       |
  826|   572k|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  827|   572k|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  828|   572k|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  829|   572k|        : LEVEL_STR "...")
  830|       |
  831|   572k|    if (params == NULL) {
  ------------------
  |  Branch (831:9): [True: 190k, False: 381k]
  ------------------
  832|       |        /* First iteration, where we prepare for what is to come */
  833|       |
  834|   190k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   190k|    do {                           \
  |  |  222|   190k|        BIO *trc_out = NULL;       \
  |  |  223|   190k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 190k]
  |  |  ------------------
  ------------------
  835|      0|        {
  836|      0|            BIO_printf(trc_out,
  837|      0|                "(ctx %p) starting to walk the decoder chain\n",
  838|      0|                (void *)new_data.ctx);
  839|      0|        }
  840|   190k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   190k|    }                            \
  |  |  227|   190k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 190k]
  |  |  ------------------
  ------------------
  841|       |
  842|   190k|        data->current_decoder_inst_index = OSSL_DECODER_CTX_get_num_decoders(ctx);
  843|       |
  844|   190k|        bio = data->bio;
  845|   381k|    } else {
  846|   381k|        const OSSL_PARAM *p;
  847|   381k|        const char *trace_data_structure;
  848|       |
  849|   381k|        decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts,
  850|   381k|            data->current_decoder_inst_index);
  851|   381k|        decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
  852|       |
  853|   381k|        data->flag_construct_called = 0;
  854|   381k|        if (ctx->construct != NULL) {
  ------------------
  |  Branch (854:13): [True: 381k, False: 0]
  ------------------
  855|   381k|            int rv;
  856|       |
  857|   381k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   381k|    do {                           \
  |  |  222|   381k|        BIO *trc_out = NULL;       \
  |  |  223|   381k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 381k]
  |  |  ------------------
  ------------------
  858|      0|            {
  859|      0|                BIO_printf(trc_out,
  860|      0|                    "(ctx %p) %s Running constructor\n",
  861|      0|                    (void *)new_data.ctx, LEVEL);
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  862|      0|            }
  863|   381k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   381k|    }                            \
  |  |  227|   381k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 381k]
  |  |  ------------------
  ------------------
  864|       |
  865|   381k|            rv = ctx->construct(decoder_inst, params, ctx->construct_data);
  866|       |
  867|   381k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   381k|    do {                           \
  |  |  222|   381k|        BIO *trc_out = NULL;       \
  |  |  223|   381k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 381k]
  |  |  ------------------
  ------------------
  868|      0|            {
  869|      0|                BIO_printf(trc_out,
  870|      0|                    "(ctx %p) %s Running constructor => %d\n",
  871|      0|                    (void *)new_data.ctx, LEVEL, rv);
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  872|      0|            }
  873|   381k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   381k|    }                            \
  |  |  227|   381k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 381k]
  |  |  ------------------
  ------------------
  874|       |
  875|   381k|            ok = (rv > 0);
  876|   381k|            if (ok) {
  ------------------
  |  Branch (876:17): [True: 190k, False: 190k]
  ------------------
  877|   190k|                data->flag_construct_called = 1;
  878|   190k|                goto end;
  879|   190k|            }
  880|   381k|        }
  881|       |
  882|       |        /* The constructor didn't return success */
  883|       |
  884|       |        /*
  885|       |         * so we try to use the object we got and feed it to any next
  886|       |         * decoder that will take it.  Object references are not
  887|       |         * allowed for this.
  888|       |         * If this data isn't present, decoding has failed.
  889|       |         */
  890|       |
  891|   190k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA);
  ------------------
  |  |  356|   190k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  892|   190k|        if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   190k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (892:13): [True: 0, False: 190k]
  |  Branch (892:26): [True: 0, False: 190k]
  ------------------
  893|      0|            goto end;
  894|   190k|        new_data.bio = BIO_new_mem_buf(p->data, (int)p->data_size);
  895|   190k|        if (new_data.bio == NULL)
  ------------------
  |  Branch (895:13): [True: 0, False: 190k]
  ------------------
  896|      0|            goto end;
  897|   190k|        bio = new_data.bio;
  898|       |
  899|       |        /* Get the data type if there is one */
  900|   190k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  358|   190k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  901|   190k|        if (p != NULL && !OSSL_PARAM_get_utf8_string_ptr(p, &data_type))
  ------------------
  |  Branch (901:13): [True: 190k, False: 0]
  |  Branch (901:26): [True: 0, False: 190k]
  ------------------
  902|      0|            goto end;
  903|       |
  904|       |        /* Get the data structure if there is one */
  905|   190k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_STRUCTURE);
  ------------------
  |  |  357|   190k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  906|   190k|        if (p != NULL && !OSSL_PARAM_get_utf8_string_ptr(p, &data_structure))
  ------------------
  |  Branch (906:13): [True: 190k, False: 0]
  |  Branch (906:26): [True: 0, False: 190k]
  ------------------
  907|      0|            goto end;
  908|       |
  909|       |        /* Get the new input type if there is one */
  910|   190k|        p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_INPUT_TYPE);
  ------------------
  |  |  360|   190k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  911|   190k|        if (p != NULL) {
  ------------------
  |  Branch (911:13): [True: 190k, False: 0]
  ------------------
  912|   190k|            if (!OSSL_PARAM_get_utf8_string_ptr(p, &ctx->start_input_type))
  ------------------
  |  Branch (912:17): [True: 0, False: 190k]
  ------------------
  913|      0|                goto end;
  914|       |            /*
  915|       |             * When switching PKCS8 from PEM to DER we decrypt the data if needed
  916|       |             * and then determine the algorithm OID.  Likewise, with SPKI, only
  917|       |             * this time sans decryption.
  918|       |             */
  919|   190k|            if (ctx->input_structure != NULL
  ------------------
  |  Branch (919:17): [True: 190k, False: 0]
  ------------------
  920|   190k|                && (OPENSSL_strcasecmp(ctx->input_structure, "SubjectPublicKeyInfo") == 0
  ------------------
  |  Branch (920:21): [True: 190k, False: 0]
  ------------------
  921|      0|                    || OPENSSL_strcasecmp(data_structure, "PrivateKeyInfo") == 0
  ------------------
  |  Branch (921:24): [True: 0, False: 0]
  ------------------
  922|      0|                    || OPENSSL_strcasecmp(ctx->input_structure, "PrivateKeyInfo") == 0))
  ------------------
  |  Branch (922:24): [True: 0, False: 0]
  ------------------
  923|   190k|                data->flag_input_structure_checked = 1;
  924|   190k|        }
  925|       |
  926|       |        /*
  927|       |         * If the data structure is "type-specific" and the data type is
  928|       |         * given, we drop the data structure.  The reasoning is that the
  929|       |         * data type is already enough to find the applicable next decoder,
  930|       |         * so an additional "type-specific" data structure is extraneous.
  931|       |         *
  932|       |         * Furthermore, if the OSSL_DECODER caller asked for a type specific
  933|       |         * structure under another name, such as "DH", we get a mismatch
  934|       |         * if the data structure we just received is "type-specific".
  935|       |         * There's only so much you can do without infusing this code with
  936|       |         * too special knowledge.
  937|       |         */
  938|   190k|        trace_data_structure = data_structure;
  939|   190k|        if (data_type != NULL && data_structure != NULL
  ------------------
  |  Branch (939:13): [True: 190k, False: 0]
  |  Branch (939:34): [True: 190k, False: 0]
  ------------------
  940|   190k|            && OPENSSL_strcasecmp(data_structure, "type-specific") == 0)
  ------------------
  |  Branch (940:16): [True: 0, False: 190k]
  ------------------
  941|      0|            data_structure = NULL;
  942|       |
  943|   190k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   190k|    do {                           \
  |  |  222|   190k|        BIO *trc_out = NULL;       \
  |  |  223|   190k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 190k]
  |  |  ------------------
  ------------------
  944|      0|        {
  945|      0|            BIO_printf(trc_out,
  946|      0|                "(ctx %p) %s incoming from previous decoder (%p):\n"
  947|      0|                "    data type: %s, data structure: %s%s\n",
  948|      0|                (void *)new_data.ctx, LEVEL, (void *)decoder,
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  949|      0|                data_type, trace_data_structure,
  950|      0|                (trace_data_structure == data_structure
  ------------------
  |  Branch (950:18): [True: 0, False: 0]
  ------------------
  951|      0|                        ? ""
  952|      0|                        : " (dropped)"));
  953|      0|        }
  954|   190k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   190k|    }                            \
  |  |  227|   190k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 190k]
  |  |  ------------------
  ------------------
  955|   190k|    }
  956|       |
  957|       |    /*
  958|       |     * If we have no more decoders to look through at this point,
  959|       |     * we failed
  960|       |     */
  961|   381k|    if (data->current_decoder_inst_index == 0)
  ------------------
  |  Branch (961:9): [True: 0, False: 381k]
  ------------------
  962|      0|        goto end;
  963|       |
  964|   381k|    if ((loc = BIO_tell(bio)) < 0) {
  ------------------
  |  |  573|   381k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  468|   381k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (964:9): [True: 0, False: 381k]
  ------------------
  965|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_BIO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  966|      0|        goto end;
  967|      0|    }
  968|       |
  969|   381k|    if ((cbio = ossl_core_bio_new_from_bio(bio)) == NULL) {
  ------------------
  |  Branch (969:9): [True: 0, False: 381k]
  ------------------
  970|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_BIO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  971|      0|        goto end;
  972|      0|    }
  973|       |
  974|  1.09M|    for (i = data->current_decoder_inst_index; i-- > 0;) {
  ------------------
  |  Branch (974:48): [True: 1.09M, False: 0]
  ------------------
  975|  1.09M|        OSSL_DECODER_INSTANCE *new_decoder_inst = sk_OSSL_DECODER_INSTANCE_value(ctx->decoder_insts, i);
  976|  1.09M|        OSSL_DECODER *new_decoder = OSSL_DECODER_INSTANCE_get_decoder(new_decoder_inst);
  977|  1.09M|        const char *new_decoder_name = NULL;
  978|  1.09M|        void *new_decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(new_decoder_inst);
  979|  1.09M|        const char *new_input_type = OSSL_DECODER_INSTANCE_get_input_type(new_decoder_inst);
  980|  1.09M|        int n_i_s_was_set = 0; /* We don't care here */
  981|  1.09M|        const char *new_input_structure = OSSL_DECODER_INSTANCE_get_input_structure(new_decoder_inst,
  982|  1.09M|            &n_i_s_was_set);
  983|       |
  984|  1.09M|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|  1.09M|    do {                           \
  |  |  222|  1.09M|        BIO *trc_out = NULL;       \
  |  |  223|  1.09M|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 1.09M]
  |  |  ------------------
  ------------------
  985|      0|        {
  986|      0|            new_decoder_name = OSSL_DECODER_get0_name(new_decoder);
  987|      0|            BIO_printf(trc_out,
  988|      0|                "(ctx %p) %s [%u] Considering decoder instance %p (decoder %p):\n"
  989|      0|                "    %s with %s\n",
  990|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
  991|      0|                (void *)new_decoder_inst, (void *)new_decoder,
  992|      0|                new_decoder_name,
  993|      0|                OSSL_DECODER_get0_properties(new_decoder));
  994|      0|        }
  995|  1.09M|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|  1.09M|    }                            \
  |  |  227|  1.09M|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 1.09M]
  |  |  ------------------
  ------------------
  996|       |
  997|       |        /*
  998|       |         * If |decoder| is NULL, it means we've just started, and the caller
  999|       |         * may have specified what it expects the initial input to be.  If
 1000|       |         * that's the case, we do this extra check.
 1001|       |         */
 1002|  1.09M|        if (decoder == NULL && ctx->start_input_type != NULL
  ------------------
  |  Branch (1002:13): [True: 572k, False: 519k]
  |  Branch (1002:32): [True: 572k, False: 0]
  ------------------
 1003|   572k|            && OPENSSL_strcasecmp(ctx->start_input_type, new_input_type) != 0) {
  ------------------
  |  Branch (1003:16): [True: 190k, False: 381k]
  ------------------
 1004|   190k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   190k|    do {                           \
  |  |  222|   190k|        BIO *trc_out = NULL;       \
  |  |  223|   190k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 190k]
  |  |  ------------------
  ------------------
 1005|      0|            {
 1006|      0|                BIO_printf(trc_out,
 1007|      0|                    "(ctx %p) %s [%u] the start input type '%s' doesn't match the input type of the considered decoder, skipping...\n",
 1008|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1009|      0|                    ctx->start_input_type);
 1010|      0|            }
 1011|   190k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   190k|    }                            \
  |  |  227|   190k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 190k]
  |  |  ------------------
  ------------------
 1012|   190k|            continue;
 1013|   190k|        }
 1014|       |
 1015|       |        /*
 1016|       |         * If we have a previous decoder, we check that the input type
 1017|       |         * of the next to be used matches the type of this previous one.
 1018|       |         * |new_input_type| holds the value of the "input-type" parameter
 1019|       |         * for the decoder we're currently considering.
 1020|       |         */
 1021|   901k|        if (decoder != NULL && !ossl_decoder_fast_is_a(decoder, new_input_type, &new_decoder_inst->input_type_id)) {
  ------------------
  |  Branch (1021:13): [True: 519k, False: 381k]
  |  Branch (1021:32): [True: 0, False: 519k]
  ------------------
 1022|      0|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      0|    do {                           \
  |  |  222|      0|        BIO *trc_out = NULL;       \
  |  |  223|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1023|      0|            {
 1024|      0|                BIO_printf(trc_out,
 1025|      0|                    "(ctx %p) %s [%u] the input type doesn't match the name of the previous decoder (%p), skipping...\n",
 1026|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1027|      0|                    (void *)decoder);
 1028|      0|            }
 1029|      0|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      0|    }                            \
  |  |  227|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1030|      0|            continue;
 1031|      0|        }
 1032|       |
 1033|       |        /*
 1034|       |         * If the previous decoder gave us a data type, we check to see
 1035|       |         * if that matches the decoder we're currently considering.
 1036|       |         */
 1037|   901k|        if (data_type != NULL && !OSSL_DECODER_is_a(new_decoder, data_type)) {
  ------------------
  |  Branch (1037:13): [True: 519k, False: 381k]
  |  Branch (1037:34): [True: 52.2k, False: 467k]
  ------------------
 1038|  52.2k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|  52.2k|    do {                           \
  |  |  222|  52.2k|        BIO *trc_out = NULL;       \
  |  |  223|  52.2k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 52.2k]
  |  |  ------------------
  ------------------
 1039|      0|            {
 1040|      0|                BIO_printf(trc_out,
 1041|      0|                    "(ctx %p) %s [%u] the previous decoder's data type doesn't match the name of the considered decoder, skipping...\n",
 1042|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i);
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1043|      0|            }
 1044|  52.2k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|  52.2k|    }                            \
  |  |  227|  52.2k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 52.2k]
  |  |  ------------------
  ------------------
 1045|  52.2k|            continue;
 1046|  52.2k|        }
 1047|       |
 1048|       |        /*
 1049|       |         * If the previous decoder gave us a data structure name, we check
 1050|       |         * to see that it matches the input data structure of the decoder
 1051|       |         * we're currently considering.
 1052|       |         */
 1053|   848k|        if (data_structure != NULL
  ------------------
  |  Branch (1053:13): [True: 467k, False: 381k]
  ------------------
 1054|   467k|            && (new_input_structure == NULL
  ------------------
  |  Branch (1054:17): [True: 0, False: 467k]
  ------------------
 1055|   467k|                || OPENSSL_strcasecmp(data_structure,
  ------------------
  |  Branch (1055:20): [True: 276k, False: 190k]
  ------------------
 1056|   467k|                       new_input_structure)
 1057|   467k|                    != 0)) {
 1058|   276k|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   276k|    do {                           \
  |  |  222|   276k|        BIO *trc_out = NULL;       \
  |  |  223|   276k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 276k]
  |  |  ------------------
  ------------------
 1059|      0|            {
 1060|      0|                BIO_printf(trc_out,
 1061|      0|                    "(ctx %p) %s [%u] the previous decoder's data structure doesn't match the input structure of the considered decoder, skipping...\n",
 1062|      0|                    (void *)new_data.ctx, LEVEL, (unsigned int)i);
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1063|      0|            }
 1064|   276k|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   276k|    }                            \
  |  |  227|   276k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 276k]
  |  |  ------------------
  ------------------
 1065|   276k|            continue;
 1066|   276k|        }
 1067|       |
 1068|       |        /*
 1069|       |         * If the decoder we're currently considering specifies a structure,
 1070|       |         * and this check hasn't already been done earlier in this chain of
 1071|       |         * decoder_process() calls, check that it matches the user provided
 1072|       |         * input structure, if one is given.
 1073|       |         */
 1074|   572k|        if (!data->flag_input_structure_checked
  ------------------
  |  Branch (1074:13): [True: 190k, False: 381k]
  ------------------
 1075|   190k|            && ctx->input_structure != NULL
  ------------------
  |  Branch (1075:16): [True: 190k, False: 0]
  ------------------
 1076|   190k|            && new_input_structure != NULL) {
  ------------------
  |  Branch (1076:16): [True: 190k, False: 0]
  ------------------
 1077|   190k|            data->flag_input_structure_checked = 1;
 1078|   190k|            if (OPENSSL_strcasecmp(new_input_structure,
  ------------------
  |  Branch (1078:17): [True: 190k, False: 0]
  ------------------
 1079|   190k|                    ctx->input_structure)
 1080|   190k|                != 0) {
 1081|   190k|                OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   190k|    do {                           \
  |  |  222|   190k|        BIO *trc_out = NULL;       \
  |  |  223|   190k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 190k]
  |  |  ------------------
  ------------------
 1082|      0|                {
 1083|      0|                    BIO_printf(trc_out,
 1084|      0|                        "(ctx %p) %s [%u] the previous decoder's data structure doesn't match the input structure given by the user, skipping...\n",
 1085|      0|                        (void *)new_data.ctx, LEVEL, (unsigned int)i);
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1086|      0|                }
 1087|   190k|                OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   190k|    }                            \
  |  |  227|   190k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 190k]
  |  |  ------------------
  ------------------
 1088|   190k|                continue;
 1089|   190k|            }
 1090|   190k|        }
 1091|       |
 1092|       |        /*
 1093|       |         * Checking the return value of BIO_reset() or BIO_seek() is unsafe.
 1094|       |         * Furthermore, BIO_reset() is unsafe to use if the source BIO happens
 1095|       |         * to be a BIO_s_mem(), because the earlier BIO_tell() gives us zero
 1096|       |         * no matter where we are in the underlying buffer we're reading from.
 1097|       |         *
 1098|       |         * So, we simply do a BIO_seek(), and use BIO_tell() that we're back
 1099|       |         * at the same position.  This is a best effort attempt, but BIO_seek()
 1100|       |         * and BIO_tell() should come as a pair...
 1101|       |         */
 1102|   381k|        (void)BIO_seek(bio, loc);
  ------------------
  |  |  572|   381k|#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
  |  |  ------------------
  |  |  |  |  462|   381k|#define BIO_C_FILE_SEEK 128
  |  |  ------------------
  ------------------
 1103|   381k|        if (BIO_tell(bio) != loc)
  ------------------
  |  |  573|   381k|#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
  |  |  ------------------
  |  |  |  |  468|   381k|#define BIO_C_FILE_TELL 133
  |  |  ------------------
  ------------------
  |  Branch (1103:13): [True: 0, False: 381k]
  ------------------
 1104|      0|            goto end;
 1105|       |
 1106|       |        /* Recurse */
 1107|   381k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   381k|    do {                           \
  |  |  222|   381k|        BIO *trc_out = NULL;       \
  |  |  223|   381k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 381k]
  |  |  ------------------
  ------------------
 1108|      0|        {
 1109|      0|            BIO_printf(trc_out,
 1110|      0|                "(ctx %p) %s [%u] Running decoder instance %s (%p)\n",
 1111|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1112|      0|                new_decoder_name, (void *)new_decoder_inst);
 1113|      0|        }
 1114|   381k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   381k|    }                            \
  |  |  227|   381k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 381k]
  |  |  ------------------
  ------------------
 1115|       |
 1116|       |        /*
 1117|       |         * We only care about errors reported from decoder implementations
 1118|       |         * if it returns false (i.e. there was a fatal error).
 1119|       |         */
 1120|   381k|        ERR_set_mark();
 1121|       |
 1122|   381k|        new_data.current_decoder_inst_index = i;
 1123|   381k|        new_data.flag_input_structure_checked
 1124|   381k|            = data->flag_input_structure_checked;
 1125|   381k|        ok = new_decoder->decode(new_decoderctx, cbio,
 1126|   381k|            new_data.ctx->selection,
 1127|   381k|            decoder_process, &new_data,
 1128|   381k|            ossl_pw_passphrase_callback_dec,
 1129|   381k|            &new_data.ctx->pwdata);
 1130|       |
 1131|   381k|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|   381k|    do {                           \
  |  |  222|   381k|        BIO *trc_out = NULL;       \
  |  |  223|   381k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 381k]
  |  |  ------------------
  ------------------
 1132|      0|        {
 1133|      0|            BIO_printf(trc_out,
 1134|      0|                "(ctx %p) %s [%u] Running decoder instance %s (%p) => %d"
 1135|      0|                " (recursed further: %s, construct called: %s)\n",
 1136|      0|                (void *)new_data.ctx, LEVEL, (unsigned int)i,
  ------------------
  |  |  827|      0|#define LEVEL ((size_t)new_data.recursion < sizeof(LEVEL_STR)    \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  |  Branch (827:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  828|      0|        ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |                       ? &LEVEL_STR[sizeof(LEVEL_STR) - new_data.recursion - 1] \
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  |  |  829|      0|        : LEVEL_STR "...")
  |  |  ------------------
  |  |  |  |  826|      0|#define LEVEL_STR ">>>>>>>>>>>>>>>>"
  |  |  ------------------
  ------------------
 1137|      0|                new_decoder_name, (void *)new_decoder_inst, ok,
 1138|      0|                new_data.flag_next_level_called ? "yes" : "no",
  ------------------
  |  Branch (1138:17): [True: 0, False: 0]
  ------------------
 1139|      0|                new_data.flag_construct_called ? "yes" : "no");
  ------------------
  |  Branch (1139:17): [True: 0, False: 0]
  ------------------
 1140|      0|        }
 1141|   381k|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|   381k|    }                            \
  |  |  227|   381k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 381k]
  |  |  ------------------
  ------------------
 1142|       |
 1143|   381k|        data->flag_construct_called = new_data.flag_construct_called;
 1144|       |
 1145|       |        /* Break on error or if we tried to construct an object already */
 1146|   381k|        if (!ok || data->flag_construct_called) {
  ------------------
  |  Branch (1146:13): [True: 0, False: 381k]
  |  Branch (1146:20): [True: 381k, False: 0]
  ------------------
 1147|   381k|            ERR_clear_last_mark();
 1148|   381k|            break;
 1149|   381k|        }
 1150|      0|        ERR_pop_to_mark();
 1151|       |
 1152|       |        /*
 1153|       |         * Break if the decoder implementation that we called recursed, since
 1154|       |         * that indicates that it successfully decoded something.
 1155|       |         */
 1156|      0|        if (new_data.flag_next_level_called)
  ------------------
  |  Branch (1156:13): [True: 0, False: 0]
  ------------------
 1157|      0|            break;
 1158|      0|    }
 1159|       |
 1160|   572k|end:
 1161|   572k|    ossl_core_bio_free(cbio);
 1162|   572k|    BIO_free(new_data.bio);
 1163|   572k|    ctx->start_input_type = start_input_type;
 1164|   572k|    return ok;
 1165|   381k|}

OSSL_DECODER_up_ref:
   53|  1.09M|{
   54|  1.09M|    int ref = 0;
   55|       |
   56|  1.09M|    CRYPTO_UP_REF(&decoder->base.refcnt, &ref);
   57|  1.09M|    return 1;
   58|  1.09M|}
OSSL_DECODER_free:
   61|  1.09M|{
   62|  1.09M|    int ref = 0;
   63|       |
   64|  1.09M|    if (decoder == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 1.09M]
  ------------------
   65|      0|        return;
   66|       |
   67|  1.09M|    CRYPTO_DOWN_REF(&decoder->base.refcnt, &ref);
   68|  1.09M|    if (ref > 0)
  ------------------
  |  Branch (68:9): [True: 1.09M, False: 76]
  ------------------
   69|  1.09M|        return;
   70|     76|    OPENSSL_free(decoder->base.name);
  ------------------
  |  |  131|     76|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|     76|    ossl_property_free(decoder->base.parsed_propdef);
   72|     76|    ossl_provider_free(decoder->base.prov);
   73|     76|    CRYPTO_FREE_REF(&decoder->base.refcnt);
   74|     76|    OPENSSL_free(decoder);
  ------------------
  |  |  131|     76|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|     76|}
ossl_decoder_from_algorithm:
  211|     76|{
  212|     76|    OSSL_DECODER *decoder = NULL;
  213|     76|    const OSSL_DISPATCH *fns = algodef->implementation;
  214|     76|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  215|       |
  216|     76|    if ((decoder = ossl_decoder_new()) == NULL)
  ------------------
  |  Branch (216:9): [True: 0, False: 76]
  ------------------
  217|      0|        return NULL;
  218|     76|    decoder->base.id = id;
  219|     76|    if ((decoder->base.name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (219:9): [True: 0, False: 76]
  ------------------
  220|      0|        OSSL_DECODER_free(decoder);
  221|      0|        return NULL;
  222|      0|    }
  223|     76|    decoder->base.algodef = algodef;
  224|     76|    if ((decoder->base.parsed_propdef
  ------------------
  |  Branch (224:9): [True: 0, False: 76]
  ------------------
  225|     76|            = ossl_parse_property(libctx, algodef->property_definition))
  226|     76|        == NULL) {
  227|      0|        OSSL_DECODER_free(decoder);
  228|      0|        return NULL;
  229|      0|    }
  230|       |
  231|    598|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (231:12): [True: 522, False: 76]
  ------------------
  232|    522|        switch (fns->function_id) {
  ------------------
  |  Branch (232:17): [True: 522, False: 0]
  ------------------
  233|     76|        case OSSL_FUNC_DECODER_NEWCTX:
  ------------------
  |  |  984|     76|#define OSSL_FUNC_DECODER_NEWCTX 1
  ------------------
  |  Branch (233:9): [True: 76, False: 446]
  ------------------
  234|     76|            if (decoder->newctx == NULL)
  ------------------
  |  Branch (234:17): [True: 76, False: 0]
  ------------------
  235|     76|                decoder->newctx = OSSL_FUNC_decoder_newctx(fns);
  236|     76|            break;
  237|     76|        case OSSL_FUNC_DECODER_FREECTX:
  ------------------
  |  |  985|     76|#define OSSL_FUNC_DECODER_FREECTX 2
  ------------------
  |  Branch (237:9): [True: 76, False: 446]
  ------------------
  238|     76|            if (decoder->freectx == NULL)
  ------------------
  |  Branch (238:17): [True: 76, False: 0]
  ------------------
  239|     76|                decoder->freectx = OSSL_FUNC_decoder_freectx(fns);
  240|     76|            break;
  241|      0|        case OSSL_FUNC_DECODER_GET_PARAMS:
  ------------------
  |  |  986|      0|#define OSSL_FUNC_DECODER_GET_PARAMS 3
  ------------------
  |  Branch (241:9): [True: 0, False: 522]
  ------------------
  242|      0|            if (decoder->get_params == NULL)
  ------------------
  |  Branch (242:17): [True: 0, False: 0]
  ------------------
  243|      0|                decoder->get_params = OSSL_FUNC_decoder_get_params(fns);
  244|      0|            break;
  245|      0|        case OSSL_FUNC_DECODER_GETTABLE_PARAMS:
  ------------------
  |  |  987|      0|#define OSSL_FUNC_DECODER_GETTABLE_PARAMS 4
  ------------------
  |  Branch (245:9): [True: 0, False: 522]
  ------------------
  246|      0|            if (decoder->gettable_params == NULL)
  ------------------
  |  Branch (246:17): [True: 0, False: 0]
  ------------------
  247|      0|                decoder->gettable_params = OSSL_FUNC_decoder_gettable_params(fns);
  248|      0|            break;
  249|     74|        case OSSL_FUNC_DECODER_SET_CTX_PARAMS:
  ------------------
  |  |  988|     74|#define OSSL_FUNC_DECODER_SET_CTX_PARAMS 5
  ------------------
  |  Branch (249:9): [True: 74, False: 448]
  ------------------
  250|     74|            if (decoder->set_ctx_params == NULL)
  ------------------
  |  Branch (250:17): [True: 74, False: 0]
  ------------------
  251|     74|                decoder->set_ctx_params = OSSL_FUNC_decoder_set_ctx_params(fns);
  252|     74|            break;
  253|     74|        case OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  989|     74|#define OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS 6
  ------------------
  |  Branch (253:9): [True: 74, False: 448]
  ------------------
  254|     74|            if (decoder->settable_ctx_params == NULL)
  ------------------
  |  Branch (254:17): [True: 74, False: 0]
  ------------------
  255|     74|                decoder->settable_ctx_params = OSSL_FUNC_decoder_settable_ctx_params(fns);
  256|     74|            break;
  257|     73|        case OSSL_FUNC_DECODER_DOES_SELECTION:
  ------------------
  |  |  990|     73|#define OSSL_FUNC_DECODER_DOES_SELECTION 10
  ------------------
  |  Branch (257:9): [True: 73, False: 449]
  ------------------
  258|     73|            if (decoder->does_selection == NULL)
  ------------------
  |  Branch (258:17): [True: 73, False: 0]
  ------------------
  259|     73|                decoder->does_selection = OSSL_FUNC_decoder_does_selection(fns);
  260|     73|            break;
  261|     76|        case OSSL_FUNC_DECODER_DECODE:
  ------------------
  |  |  991|     76|#define OSSL_FUNC_DECODER_DECODE 11
  ------------------
  |  Branch (261:9): [True: 76, False: 446]
  ------------------
  262|     76|            if (decoder->decode == NULL)
  ------------------
  |  Branch (262:17): [True: 76, False: 0]
  ------------------
  263|     76|                decoder->decode = OSSL_FUNC_decoder_decode(fns);
  264|     76|            break;
  265|     73|        case OSSL_FUNC_DECODER_EXPORT_OBJECT:
  ------------------
  |  |  992|     73|#define OSSL_FUNC_DECODER_EXPORT_OBJECT 20
  ------------------
  |  Branch (265:9): [True: 73, False: 449]
  ------------------
  266|     73|            if (decoder->export_object == NULL)
  ------------------
  |  Branch (266:17): [True: 73, False: 0]
  ------------------
  267|     73|                decoder->export_object = OSSL_FUNC_decoder_export_object(fns);
  268|     73|            break;
  269|    522|        }
  270|    522|    }
  271|       |    /*
  272|       |     * Try to check that the method is sensible.
  273|       |     * If you have a constructor, you must have a destructor and vice versa.
  274|       |     * You must have at least one of the encoding driver functions.
  275|       |     */
  276|     76|    if (!((decoder->newctx == NULL && decoder->freectx == NULL)
  ------------------
  |  Branch (276:12): [True: 0, False: 76]
  |  Branch (276:39): [True: 0, False: 0]
  ------------------
  277|     76|            || (decoder->newctx != NULL && decoder->freectx != NULL))
  ------------------
  |  Branch (277:17): [True: 76, False: 0]
  |  Branch (277:44): [True: 76, False: 0]
  ------------------
  278|     76|        || decoder->decode == NULL) {
  ------------------
  |  Branch (278:12): [True: 0, False: 76]
  ------------------
  279|      0|        OSSL_DECODER_free(decoder);
  280|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|      0|    }
  283|       |
  284|     76|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (284:9): [True: 76, False: 0]
  |  Branch (284:25): [True: 0, False: 76]
  ------------------
  285|      0|        OSSL_DECODER_free(decoder);
  286|      0|        return NULL;
  287|      0|    }
  288|       |
  289|     76|    decoder->base.prov = prov;
  290|     76|    return decoder;
  291|     76|}
ossl_decoder_store_cache_flush:
  438|     81|{
  439|     81|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  440|       |
  441|     81|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 81, False: 0]
  ------------------
  442|     81|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|     81|}
ossl_decoder_store_remove_all_provided:
  447|     81|{
  448|     81|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|     81|    OSSL_METHOD_STORE *store = get_decoder_store(libctx);
  450|       |
  451|     81|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 81, False: 0]
  ------------------
  452|     81|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|     81|}
OSSL_DECODER_get0_provider:
  461|  1.47M|{
  462|  1.47M|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|  1.47M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.47M|    __FILE__, __LINE__)
  ------------------
  |  Branch (462:9): [True: 0, False: 1.47M]
  ------------------
  463|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|  1.47M|    return decoder->base.prov;
  468|  1.47M|}
ossl_decoder_parsed_properties:
  482|     22|{
  483|     22|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|     22|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|     22|    __FILE__, __LINE__)
  ------------------
  |  Branch (483:9): [True: 0, False: 22]
  ------------------
  484|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  485|      0|        return 0;
  486|      0|    }
  487|       |
  488|     22|    return decoder->base.parsed_propdef;
  489|     22|}
ossl_decoder_get_number:
  492|   521k|{
  493|   521k|    if (!ossl_assert(decoder != NULL)) {
  ------------------
  |  |   52|   521k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   521k|    __FILE__, __LINE__)
  ------------------
  |  Branch (493:9): [True: 0, False: 521k]
  ------------------
  494|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  495|      0|        return 0;
  496|      0|    }
  497|       |
  498|   521k|    return decoder->base.id;
  499|   521k|}
OSSL_DECODER_is_a:
  512|   519k|{
  513|   519k|    if (decoder->base.prov != NULL) {
  ------------------
  |  Branch (513:9): [True: 519k, False: 0]
  ------------------
  514|   519k|        OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  515|   519k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  516|       |
  517|   519k|        return ossl_namemap_name2num(namemap, name) == decoder->base.id;
  518|   519k|    }
  519|      0|    return 0;
  520|   519k|}
ossl_decoder_fast_is_a:
  531|   521k|{
  532|   521k|    int id = *id_cache;
  533|       |
  534|   521k|    if (id <= 0)
  ------------------
  |  Branch (534:9): [True: 520k, False: 1.35k]
  ------------------
  535|   520k|        *id_cache = id = resolve_name(decoder, name);
  536|       |
  537|   521k|    return id > 0 && ossl_decoder_get_number(decoder) == id;
  ------------------
  |  Branch (537:12): [True: 521k, False: 311]
  |  Branch (537:22): [True: 519k, False: 1.31k]
  ------------------
  538|   521k|}
OSSL_DECODER_do_all_provided:
  556|      4|{
  557|      4|    struct decoder_data_st methdata;
  558|      4|    struct do_one_data_st data;
  559|       |
  560|      4|    methdata.libctx = libctx;
  561|      4|    methdata.tmp_store = NULL;
  562|      4|    (void)inner_ossl_decoder_fetch(&methdata, NULL, NULL /* properties */);
  563|       |
  564|      4|    data.user_fn = user_fn;
  565|      4|    data.user_arg = user_arg;
  566|      4|    if (methdata.tmp_store != NULL)
  ------------------
  |  Branch (566:9): [True: 0, False: 4]
  ------------------
  567|      0|        ossl_method_store_do_all(methdata.tmp_store, &do_one, &data);
  568|      4|    ossl_method_store_do_all(get_decoder_store(libctx), &do_one, &data);
  569|      4|    dealloc_tmp_decoder_store(methdata.tmp_store);
  570|      4|}
OSSL_DECODER_CTX_new:
  629|   190k|{
  630|   190k|    OSSL_DECODER_CTX *ctx;
  631|       |
  632|   190k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  633|   190k|    return ctx;
  634|   190k|}
OSSL_DECODER_CTX_free:
  666|   381k|{
  667|   381k|    if (ctx != NULL) {
  ------------------
  |  Branch (667:9): [True: 190k, False: 190k]
  ------------------
  668|   190k|        if (ctx->cleanup != NULL)
  ------------------
  |  Branch (668:13): [True: 190k, False: 0]
  ------------------
  669|   190k|            ctx->cleanup(ctx->construct_data);
  670|   190k|        sk_OSSL_DECODER_INSTANCE_pop_free(ctx->decoder_insts,
  671|   190k|            ossl_decoder_instance_free);
  672|   190k|        ossl_pw_clear_passphrase_data(&ctx->pwdata);
  673|   190k|        OPENSSL_free(ctx);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  674|   190k|    }
  675|   381k|}
decoder_meth.c:ossl_decoder_new:
   39|     76|{
   40|     76|    OSSL_DECODER *decoder = NULL;
   41|       |
   42|     76|    if ((decoder = OPENSSL_zalloc(sizeof(*decoder))) == NULL)
  ------------------
  |  |  108|     76|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 76]
  ------------------
   43|      0|        return NULL;
   44|     76|    if (!CRYPTO_NEW_REF(&decoder->base.refcnt, 1)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 76]
  ------------------
   45|      0|        OSSL_DECODER_free(decoder);
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|     76|    return decoder;
   50|     76|}
decoder_meth.c:inner_ossl_decoder_fetch:
  348|      4|{
  349|      4|    OSSL_METHOD_STORE *store = get_decoder_store(methdata->libctx);
  350|      4|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  351|      4|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (351:31): [True: 0, False: 4]
  ------------------
  352|      4|    void *method = NULL;
  353|      4|    int unsupported, id;
  354|       |
  355|      4|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (355:9): [True: 0, False: 4]
  |  Branch (355:26): [True: 0, False: 4]
  ------------------
  356|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  357|      0|        return NULL;
  358|      0|    }
  359|       |
  360|      4|    id = name != NULL ? ossl_namemap_name2num(namemap, name) : 0;
  ------------------
  |  Branch (360:10): [True: 0, False: 4]
  ------------------
  361|       |
  362|       |    /*
  363|       |     * If we haven't found the name yet, chances are that the algorithm to
  364|       |     * be fetched is unsupported.
  365|       |     */
  366|      4|    unsupported = id == 0;
  367|       |
  368|      4|    if (id == 0
  ------------------
  |  Branch (368:9): [True: 4, False: 0]
  ------------------
  369|      4|        || !ossl_method_store_cache_get(store, NULL, id, propq, &method)) {
  ------------------
  |  Branch (369:12): [True: 0, False: 0]
  ------------------
  370|      4|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  371|      4|            get_tmp_decoder_store,
  372|      4|            reserve_decoder_store,
  373|      4|            unreserve_decoder_store,
  374|      4|            get_decoder_from_store,
  375|      4|            put_decoder_in_store,
  376|      4|            construct_decoder,
  377|      4|            destruct_decoder
  378|      4|        };
  379|      4|        OSSL_PROVIDER *prov = NULL;
  380|       |
  381|      4|        methdata->id = id;
  382|      4|        methdata->names = name;
  383|      4|        methdata->propquery = propq;
  384|      4|        methdata->flag_construct_error_occurred = 0;
  385|      4|        if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_DECODER,
  ------------------
  |  |  296|      4|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (385:13): [True: 0, False: 4]
  ------------------
  386|      4|                 &prov, 0 /* !force_cache */,
  387|      4|                 &mcm, methdata))
  388|      4|            != NULL) {
  389|       |            /*
  390|       |             * If construction did create a method for us, we know that
  391|       |             * there is a correct name_id and meth_id, since those have
  392|       |             * already been calculated in get_decoder_from_store() and
  393|       |             * put_decoder_in_store() above.
  394|       |             */
  395|      0|            if (id == 0 && name != NULL)
  ------------------
  |  Branch (395:17): [True: 0, False: 0]
  |  Branch (395:28): [True: 0, False: 0]
  ------------------
  396|      0|                id = ossl_namemap_name2num(namemap, name);
  397|      0|            if (id != 0)
  ------------------
  |  Branch (397:17): [True: 0, False: 0]
  ------------------
  398|      0|                ossl_method_store_cache_set(store, prov, id, propq, method,
  399|      0|                    up_ref_decoder, free_decoder);
  400|      0|        }
  401|       |
  402|       |        /*
  403|       |         * If we never were in the constructor, the algorithm to be fetched
  404|       |         * is unsupported.
  405|       |         */
  406|      4|        unsupported = !methdata->flag_construct_error_occurred;
  407|      4|    }
  408|       |
  409|      4|    if ((id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (409:10): [True: 0, False: 4]
  |  Branch (409:21): [True: 0, False: 4]
  |  Branch (409:38): [True: 0, False: 0]
  ------------------
  410|      0|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  364|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  365|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (410:20): [True: 0, False: 0]
  ------------------
  411|       |
  412|      0|        if (name == NULL)
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            name = ossl_namemap_num2name(namemap, id, 0);
  414|      0|        ERR_raise_data(ERR_LIB_OSSL_DECODER, code,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_OSSL_DECODER, code,
  ------------------
  |  |  123|      0|#define ERR_LIB_OSSL_DECODER 60
  ------------------
  415|      0|            "%s, Name (%s : %d), Properties (%s)",
  416|      0|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  417|      0|            name == NULL ? "<null>" : name, id,
  ------------------
  |  Branch (417:13): [True: 0, False: 0]
  ------------------
  418|      0|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (418:13): [True: 0, False: 0]
  ------------------
  419|      0|    }
  420|       |
  421|      4|    return method;
  422|      4|}
decoder_meth.c:reserve_decoder_store:
  117|      4|{
  118|      4|    struct decoder_data_st *methdata = data;
  119|       |
  120|      4|    if (store == NULL
  ------------------
  |  Branch (120:9): [True: 4, False: 0]
  ------------------
  121|      4|        && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (121:12): [True: 0, False: 4]
  ------------------
  122|      0|        return 0;
  123|       |
  124|      4|    return ossl_method_lock_store(store);
  125|      4|}
decoder_meth.c:unreserve_decoder_store:
  128|      4|{
  129|      4|    struct decoder_data_st *methdata = data;
  130|       |
  131|      4|    if (store == NULL
  ------------------
  |  Branch (131:9): [True: 4, False: 0]
  ------------------
  132|      4|        && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (132:12): [True: 0, False: 4]
  ------------------
  133|      0|        return 0;
  134|       |
  135|      4|    return ossl_method_unlock_store(store);
  136|      4|}
decoder_meth.c:get_decoder_from_store:
  141|      4|{
  142|      4|    struct decoder_data_st *methdata = data;
  143|      4|    void *method = NULL;
  144|      4|    int id;
  145|       |
  146|       |    /*
  147|       |     * get_decoder_from_store() is only called to try and get the method
  148|       |     * that OSSL_DECODER_fetch() is asking for, and the name or name id are
  149|       |     * passed via methdata.
  150|       |     */
  151|      4|    if ((id = methdata->id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (151:9): [True: 4, False: 0]
  |  Branch (151:37): [True: 0, False: 4]
  ------------------
  152|      0|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  153|      0|        const char *names = methdata->names;
  154|      0|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   25|      0|#define NAME_SEPARATOR ':'
  ------------------
  155|      0|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (155:21): [True: 0, False: 0]
  ------------------
  156|       |
  157|      0|        if (namemap == 0)
  ------------------
  |  Branch (157:13): [True: 0, False: 0]
  ------------------
  158|      0|            return NULL;
  159|      0|        id = ossl_namemap_name2num_n(namemap, names, l);
  160|      0|    }
  161|       |
  162|      4|    if (id == 0)
  ------------------
  |  Branch (162:9): [True: 4, False: 0]
  ------------------
  163|      4|        return NULL;
  164|       |
  165|      0|    if (store == NULL
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|        && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (166:12): [True: 0, False: 0]
  ------------------
  167|      0|        return NULL;
  168|       |
  169|      0|    if (!ossl_method_store_fetch(store, id, methdata->propquery, prov, &method))
  ------------------
  |  Branch (169:9): [True: 0, False: 0]
  ------------------
  170|      0|        return NULL;
  171|      0|    return method;
  172|      0|}
decoder_meth.c:put_decoder_in_store:
  178|     76|{
  179|     76|    struct decoder_data_st *methdata = data;
  180|     76|    OSSL_NAMEMAP *namemap;
  181|     76|    int id;
  182|     76|    size_t l = 0;
  183|       |
  184|       |    /*
  185|       |     * put_decoder_in_store() is only called with an OSSL_DECODER method that
  186|       |     * was successfully created by construct_decoder() below, which means that
  187|       |     * all the names should already be stored in the namemap with the same
  188|       |     * numeric identity, so just use the first to get that identity.
  189|       |     */
  190|     76|    if (names != NULL) {
  ------------------
  |  Branch (190:9): [True: 76, False: 0]
  ------------------
  191|     76|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   25|     76|#define NAME_SEPARATOR ':'
  ------------------
  192|       |
  193|     76|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (193:14): [True: 76, False: 0]
  ------------------
  194|     76|    }
  195|       |
  196|     76|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (196:9): [True: 0, False: 76]
  ------------------
  197|     76|        || (id = ossl_namemap_name2num_n(namemap, names, l)) == 0)
  ------------------
  |  Branch (197:12): [True: 0, False: 76]
  ------------------
  198|      0|        return 0;
  199|       |
  200|     76|    if (store == NULL && (store = get_decoder_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (200:9): [True: 76, False: 0]
  |  Branch (200:26): [True: 0, False: 76]
  ------------------
  201|      0|        return 0;
  202|       |
  203|     76|    return ossl_method_store_add(store, prov, id, propdef, method,
  204|     76|        ossl_decoder_up_ref,
  205|     76|        ossl_decoder_free);
  206|     76|}
decoder_meth.c:ossl_decoder_up_ref:
   33|     76|{
   34|     76|    return OSSL_DECODER_up_ref(data);
   35|     76|}
decoder_meth.c:ossl_decoder_free:
   28|     76|{
   29|     76|    OSSL_DECODER_free(data);
   30|     76|}
decoder_meth.c:construct_decoder:
  300|     76|{
  301|       |    /*
  302|       |     * This function is only called if get_decoder_from_store() returned
  303|       |     * NULL, so it's safe to say that of all the spots to create a new
  304|       |     * namemap entry, this is it.  Should the name already exist there, we
  305|       |     * know that ossl_namemap_add() will return its corresponding number.
  306|       |     */
  307|     76|    struct decoder_data_st *methdata = data;
  308|     76|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  309|     76|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  310|     76|    const char *names = algodef->algorithm_names;
  311|     76|    int id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   25|     76|#define NAME_SEPARATOR ':'
  ------------------
  312|     76|    void *method = NULL;
  313|       |
  314|     76|    if (id != 0)
  ------------------
  |  Branch (314:9): [True: 76, False: 0]
  ------------------
  315|     76|        method = ossl_decoder_from_algorithm(id, algodef, prov);
  316|       |
  317|       |    /*
  318|       |     * Flag to indicate that there was actual construction errors.  This
  319|       |     * helps inner_evp_generic_fetch() determine what error it should
  320|       |     * record on inaccessible algorithms.
  321|       |     */
  322|     76|    if (method == NULL)
  ------------------
  |  Branch (322:9): [True: 0, False: 76]
  ------------------
  323|      0|        methdata->flag_construct_error_occurred = 1;
  324|       |
  325|     76|    return method;
  326|     76|}
decoder_meth.c:destruct_decoder:
  330|     76|{
  331|     76|    OSSL_DECODER_free(method);
  332|     76|}
decoder_meth.c:dealloc_tmp_decoder_store:
  105|      4|{
  106|      4|    if (store != NULL)
  ------------------
  |  Branch (106:9): [True: 0, False: 4]
  ------------------
  107|      0|        ossl_method_store_free(store);
  108|      4|}
decoder_meth.c:get_decoder_store:
  112|    254|{
  113|    254|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_STORE_INDEX);
  ------------------
  |  |  109|    254|#define OSSL_LIB_CTX_DECODER_STORE_INDEX 11
  ------------------
  114|    254|}
decoder_meth.c:resolve_name:
  523|   520k|{
  524|   520k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(decoder->base.prov);
  525|   520k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  526|       |
  527|   520k|    return ossl_namemap_name2num(namemap, name);
  528|   520k|}
decoder_meth.c:do_one:
  546|    304|{
  547|    304|    struct do_one_data_st *data = arg;
  548|       |
  549|    304|    data->user_fn(method, data->user_arg);
  550|    304|}

ossl_decoder_cache_new:
  764|    695|{
  765|    695|    DECODER_CACHE *cache = OPENSSL_malloc(sizeof(*cache));
  ------------------
  |  |  106|    695|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  766|       |
  767|    695|    if (cache == NULL)
  ------------------
  |  Branch (767:9): [True: 0, False: 695]
  ------------------
  768|      0|        return NULL;
  769|       |
  770|    695|    cache->lock = CRYPTO_THREAD_lock_new();
  771|    695|    if (cache->lock == NULL) {
  ------------------
  |  Branch (771:9): [True: 0, False: 695]
  ------------------
  772|      0|        OPENSSL_free(cache);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  773|      0|        return NULL;
  774|      0|    }
  775|    695|    cache->hashtable = lh_DECODER_CACHE_ENTRY_new(decoder_cache_entry_hash,
  776|    695|        decoder_cache_entry_cmp);
  777|    695|    if (cache->hashtable == NULL) {
  ------------------
  |  Branch (777:9): [True: 0, False: 695]
  ------------------
  778|      0|        CRYPTO_THREAD_lock_free(cache->lock);
  779|      0|        OPENSSL_free(cache);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  780|      0|        return NULL;
  781|      0|    }
  782|       |
  783|    695|    return cache;
  784|    695|}
ossl_decoder_cache_free:
  787|    695|{
  788|    695|    DECODER_CACHE *cache = (DECODER_CACHE *)vcache;
  789|       |
  790|    695|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  791|    695|    lh_DECODER_CACHE_ENTRY_free(cache->hashtable);
  792|    695|    CRYPTO_THREAD_lock_free(cache->lock);
  793|    695|    OPENSSL_free(cache);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  794|    695|}
ossl_decoder_cache_flush:
  801|    857|{
  802|    857|    DECODER_CACHE *cache
  803|    857|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  118|    857|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  804|       |
  805|    857|    if (cache == NULL)
  ------------------
  |  Branch (805:9): [True: 695, False: 162]
  ------------------
  806|    695|        return 0;
  807|       |
  808|    162|    if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (808:9): [True: 0, False: 162]
  ------------------
  809|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  810|      0|        return 0;
  811|      0|    }
  812|       |
  813|    162|    lh_DECODER_CACHE_ENTRY_doall(cache->hashtable, decoder_cache_entry_free);
  814|    162|    lh_DECODER_CACHE_ENTRY_flush(cache->hashtable);
  815|       |
  816|    162|    CRYPTO_THREAD_unlock(cache->lock);
  817|    162|    return 1;
  818|    162|}
OSSL_DECODER_CTX_new_for_pkey:
  826|   190k|{
  827|   190k|    OSSL_DECODER_CTX *ctx = NULL;
  828|   190k|    OSSL_PARAM decoder_params[] = {
  829|   190k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   190k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  830|   190k|        OSSL_PARAM_END,
  ------------------
  |  |   25|   190k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  831|   190k|        OSSL_PARAM_END
  ------------------
  |  |   25|   190k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  832|   190k|    };
  833|   190k|    DECODER_CACHE *cache
  834|   190k|        = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DECODER_CACHE_INDEX);
  ------------------
  |  |  118|   190k|#define OSSL_LIB_CTX_DECODER_CACHE_INDEX 20
  ------------------
  835|   190k|    DECODER_CACHE_ENTRY cacheent, *res, *newcache = NULL;
  836|   190k|    int i = 0;
  837|       |
  838|   190k|    if (cache == NULL) {
  ------------------
  |  Branch (838:9): [True: 0, False: 190k]
  ------------------
  839|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  840|      0|        return NULL;
  841|      0|    }
  842|   190k|    if (input_structure != NULL)
  ------------------
  |  Branch (842:9): [True: 190k, False: 0]
  ------------------
  843|   190k|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  357|   190k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  844|   190k|            (char *)input_structure, 0);
  845|   190k|    if (propquery != NULL)
  ------------------
  |  Branch (845:9): [True: 0, False: 190k]
  ------------------
  846|      0|        decoder_params[i++] = OSSL_PARAM_construct_utf8_string(OSSL_DECODER_PARAM_PROPERTIES,
  ------------------
  |  |  224|      0|# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  132|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  847|      0|            (char *)propquery, 0);
  848|       |
  849|       |    /* It is safe to cast away the const here */
  850|   190k|    cacheent.input_type = (char *)input_type;
  851|   190k|    cacheent.input_structure = (char *)input_structure;
  852|   190k|    cacheent.keytype = (char *)keytype;
  853|   190k|    cacheent.selection = selection;
  854|   190k|    cacheent.propquery = (char *)propquery;
  855|       |
  856|   190k|    if (!CRYPTO_THREAD_read_lock(cache->lock)) {
  ------------------
  |  Branch (856:9): [True: 0, False: 190k]
  ------------------
  857|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  858|      0|        return NULL;
  859|      0|    }
  860|       |
  861|       |    /* First see if we have a template OSSL_DECODER_CTX */
  862|   190k|    res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  863|       |
  864|   190k|    if (res == NULL) {
  ------------------
  |  Branch (864:9): [True: 2, False: 190k]
  ------------------
  865|       |        /*
  866|       |         * There is no template so we will have to construct one. This will be
  867|       |         * time consuming so release the lock and we will later upgrade it to a
  868|       |         * write lock.
  869|       |         */
  870|      2|        CRYPTO_THREAD_unlock(cache->lock);
  871|       |
  872|      2|        if ((ctx = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (872:13): [True: 0, False: 2]
  ------------------
  873|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  874|      0|            return NULL;
  875|      0|        }
  876|       |
  877|      2|        OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  878|      0|        {
  879|      0|            BIO_printf(trc_out,
  880|      0|                "(ctx %p) Looking for %s decoders with selection %d\n",
  881|      0|                (void *)ctx, keytype, selection);
  882|      0|            BIO_printf(trc_out, "    input type: %s, input structure: %s\n",
  883|      0|                input_type, input_structure);
  884|      0|        }
  885|      2|        OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  886|       |
  887|      2|        if (OSSL_DECODER_CTX_set_input_type(ctx, input_type)
  ------------------
  |  Branch (887:13): [True: 2, False: 0]
  ------------------
  888|      2|            && OSSL_DECODER_CTX_set_input_structure(ctx, input_structure)
  ------------------
  |  Branch (888:16): [True: 2, False: 0]
  ------------------
  889|      2|            && OSSL_DECODER_CTX_set_selection(ctx, selection)
  ------------------
  |  Branch (889:16): [True: 2, False: 0]
  ------------------
  890|      2|            && ossl_decoder_ctx_setup_for_pkey(ctx, keytype, libctx, propquery)
  ------------------
  |  Branch (890:16): [True: 2, False: 0]
  ------------------
  891|      2|            && OSSL_DECODER_CTX_add_extra(ctx, libctx, propquery)
  ------------------
  |  Branch (891:16): [True: 2, False: 0]
  ------------------
  892|      2|            && (propquery == NULL
  ------------------
  |  Branch (892:17): [True: 2, False: 0]
  ------------------
  893|      2|                || OSSL_DECODER_CTX_set_params(ctx, decoder_params))) {
  ------------------
  |  Branch (893:20): [True: 0, False: 0]
  ------------------
  894|      2|            OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  895|      0|            {
  896|      0|                BIO_printf(trc_out, "(ctx %p) Got %d decoders\n",
  897|      0|                    (void *)ctx, OSSL_DECODER_CTX_get_num_decoders(ctx));
  898|      0|            }
  899|      2|            OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  900|      2|        } else {
  901|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  902|      0|            OSSL_DECODER_CTX_free(ctx);
  903|      0|            return NULL;
  904|      0|        }
  905|       |
  906|      2|        newcache = OPENSSL_zalloc(sizeof(*newcache));
  ------------------
  |  |  108|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  907|      2|        if (newcache == NULL) {
  ------------------
  |  Branch (907:13): [True: 0, False: 2]
  ------------------
  908|      0|            OSSL_DECODER_CTX_free(ctx);
  909|      0|            return NULL;
  910|      0|        }
  911|       |
  912|      2|        if (input_type != NULL) {
  ------------------
  |  Branch (912:13): [True: 2, False: 0]
  ------------------
  913|      2|            newcache->input_type = OPENSSL_strdup(input_type);
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  914|      2|            if (newcache->input_type == NULL)
  ------------------
  |  Branch (914:17): [True: 0, False: 2]
  ------------------
  915|      0|                goto err;
  916|      2|        }
  917|      2|        if (input_structure != NULL) {
  ------------------
  |  Branch (917:13): [True: 2, False: 0]
  ------------------
  918|      2|            newcache->input_structure = OPENSSL_strdup(input_structure);
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  919|      2|            if (newcache->input_structure == NULL)
  ------------------
  |  Branch (919:17): [True: 0, False: 2]
  ------------------
  920|      0|                goto err;
  921|      2|        }
  922|      2|        if (keytype != NULL) {
  ------------------
  |  Branch (922:13): [True: 2, False: 0]
  ------------------
  923|      2|            newcache->keytype = OPENSSL_strdup(keytype);
  ------------------
  |  |  135|      2|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  924|      2|            if (newcache->keytype == NULL)
  ------------------
  |  Branch (924:17): [True: 0, False: 2]
  ------------------
  925|      0|                goto err;
  926|      2|        }
  927|      2|        if (propquery != NULL) {
  ------------------
  |  Branch (927:13): [True: 0, False: 2]
  ------------------
  928|      0|            newcache->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  929|      0|            if (newcache->propquery == NULL)
  ------------------
  |  Branch (929:17): [True: 0, False: 0]
  ------------------
  930|      0|                goto err;
  931|      0|        }
  932|      2|        newcache->selection = selection;
  933|      2|        newcache->template = ctx;
  934|       |
  935|      2|        if (!CRYPTO_THREAD_write_lock(cache->lock)) {
  ------------------
  |  Branch (935:13): [True: 0, False: 2]
  ------------------
  936|      0|            ctx = NULL;
  937|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  938|      0|            goto err;
  939|      0|        }
  940|      2|        res = lh_DECODER_CACHE_ENTRY_retrieve(cache->hashtable, &cacheent);
  941|      2|        if (res == NULL) {
  ------------------
  |  Branch (941:13): [True: 2, False: 0]
  ------------------
  942|      2|            (void)lh_DECODER_CACHE_ENTRY_insert(cache->hashtable, newcache);
  943|      2|            if (lh_DECODER_CACHE_ENTRY_error(cache->hashtable)) {
  ------------------
  |  Branch (943:17): [True: 0, False: 2]
  ------------------
  944|      0|                ctx = NULL;
  945|      0|                CRYPTO_THREAD_unlock(cache->lock);
  946|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  947|      0|                goto err;
  948|      0|            }
  949|      2|        } else {
  950|       |            /*
  951|       |             * We raced with another thread to construct this and lost. Free
  952|       |             * what we just created and use the entry from the hashtable instead
  953|       |             */
  954|      0|            decoder_cache_entry_free(newcache);
  955|      0|            ctx = res->template;
  956|      0|        }
  957|   190k|    } else {
  958|   190k|        ctx = res->template;
  959|   190k|    }
  960|       |
  961|   190k|    ctx = ossl_decoder_ctx_for_pkey_dup(ctx, pkey, input_type, input_structure);
  962|   190k|    CRYPTO_THREAD_unlock(cache->lock);
  963|       |
  964|   190k|    return ctx;
  965|      0|err:
  966|      0|    decoder_cache_entry_free(newcache);
  967|      0|    OSSL_DECODER_CTX_free(ctx);
  968|       |    return NULL;
  969|   190k|}
decoder_pkey.c:decoder_cache_entry_hash:
  694|   190k|{
  695|   190k|    unsigned long hash = 17;
  696|       |
  697|   190k|    hash = (hash * 23)
  698|   190k|        + (cache->propquery == NULL
  ------------------
  |  Branch (698:12): [True: 190k, False: 0]
  ------------------
  699|   190k|                ? 0
  700|   190k|                : ossl_lh_strcasehash(cache->propquery));
  701|   190k|    hash = (hash * 23)
  702|   190k|        + (cache->input_structure == NULL
  ------------------
  |  Branch (702:12): [True: 0, False: 190k]
  ------------------
  703|   190k|                ? 0
  704|   190k|                : ossl_lh_strcasehash(cache->input_structure));
  705|   190k|    hash = (hash * 23)
  706|   190k|        + (cache->input_type == NULL
  ------------------
  |  Branch (706:12): [True: 0, False: 190k]
  ------------------
  707|   190k|                ? 0
  708|   190k|                : ossl_lh_strcasehash(cache->input_type));
  709|   190k|    hash = (hash * 23)
  710|   190k|        + (cache->keytype == NULL
  ------------------
  |  Branch (710:12): [True: 0, False: 190k]
  ------------------
  711|   190k|                ? 0
  712|   190k|                : ossl_lh_strcasehash(cache->keytype));
  713|       |
  714|   190k|    hash ^= cache->selection;
  715|       |
  716|   190k|    return hash;
  717|   190k|}
decoder_pkey.c:decoder_cache_entry_cmp:
  740|   190k|{
  741|   190k|    int cmp;
  742|       |
  743|   190k|    if (a->selection != b->selection)
  ------------------
  |  Branch (743:9): [True: 0, False: 190k]
  ------------------
  744|      0|        return (a->selection < b->selection) ? -1 : 1;
  ------------------
  |  Branch (744:16): [True: 0, False: 0]
  ------------------
  745|       |
  746|   190k|    cmp = nullstrcmp(a->keytype, b->keytype, 1);
  747|   190k|    if (cmp != 0)
  ------------------
  |  Branch (747:9): [True: 0, False: 190k]
  ------------------
  748|      0|        return cmp;
  749|       |
  750|   190k|    cmp = nullstrcmp(a->input_type, b->input_type, 1);
  751|   190k|    if (cmp != 0)
  ------------------
  |  Branch (751:9): [True: 0, False: 190k]
  ------------------
  752|      0|        return cmp;
  753|       |
  754|   190k|    cmp = nullstrcmp(a->input_structure, b->input_structure, 1);
  755|   190k|    if (cmp != 0)
  ------------------
  |  Branch (755:9): [True: 0, False: 190k]
  ------------------
  756|      0|        return cmp;
  757|       |
  758|   190k|    cmp = nullstrcmp(a->propquery, b->propquery, 0);
  759|       |
  760|   190k|    return cmp;
  761|   190k|}
decoder_pkey.c:nullstrcmp:
  720|   762k|{
  721|   762k|    if (a == NULL || b == NULL) {
  ------------------
  |  Branch (721:9): [True: 190k, False: 572k]
  |  Branch (721:22): [True: 0, False: 572k]
  ------------------
  722|   190k|        if (a == NULL) {
  ------------------
  |  Branch (722:13): [True: 190k, False: 0]
  ------------------
  723|   190k|            if (b == NULL)
  ------------------
  |  Branch (723:17): [True: 190k, False: 0]
  ------------------
  724|   190k|                return 0;
  725|      0|            else
  726|      0|                return 1;
  727|   190k|        } else {
  728|      0|            return -1;
  729|      0|        }
  730|   572k|    } else {
  731|   572k|        if (casecmp)
  ------------------
  |  Branch (731:13): [True: 572k, False: 0]
  ------------------
  732|   572k|            return OPENSSL_strcasecmp(a, b);
  733|      0|        else
  734|      0|            return strcmp(a, b);
  735|   572k|    }
  736|   762k|}
decoder_pkey.c:decoder_cache_entry_free:
  682|      2|{
  683|      2|    if (entry == NULL)
  ------------------
  |  Branch (683:9): [True: 0, False: 2]
  ------------------
  684|      0|        return;
  685|      2|    OPENSSL_free(entry->input_type);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  686|      2|    OPENSSL_free(entry->input_structure);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  687|      2|    OPENSSL_free(entry->keytype);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  688|      2|    OPENSSL_free(entry->propquery);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  689|      2|    OSSL_DECODER_CTX_free(entry->template);
  690|      2|    OPENSSL_free(entry);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  691|      2|}
decoder_pkey.c:ossl_decoder_ctx_setup_for_pkey:
  435|      2|{
  436|      2|    int ok = 0;
  437|      2|    struct decoder_pkey_data_st *process_data = NULL;
  438|      2|    struct collect_data_st collect_data = { NULL };
  439|      2|    STACK_OF(EVP_KEYMGMT) *keymgmts = NULL;
  ------------------
  |  |   33|      2|#define STACK_OF(type) struct stack_st_##type
  ------------------
  440|      2|    OSSL_PROPERTY_LIST **plp;
  441|      2|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  442|       |
  443|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  444|      0|    {
  445|      0|        const char *input_type = ctx->start_input_type;
  446|      0|        const char *input_structure = ctx->input_structure;
  447|       |
  448|      0|        BIO_printf(trc_out,
  449|      0|            "(ctx %p) Looking for decoders producing %s%s%s%s%s%s\n",
  450|      0|            (void *)ctx,
  451|      0|            keytype != NULL ? keytype : "",
  ------------------
  |  Branch (451:13): [True: 0, False: 0]
  ------------------
  452|      0|            keytype != NULL ? " keys" : "keys of any type",
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            input_type != NULL ? " from " : "",
  ------------------
  |  Branch (453:13): [True: 0, False: 0]
  ------------------
  454|      0|            input_type != NULL ? input_type : "",
  ------------------
  |  Branch (454:13): [True: 0, False: 0]
  ------------------
  455|      0|            input_structure != NULL ? " with " : "",
  ------------------
  |  Branch (455:13): [True: 0, False: 0]
  ------------------
  456|      0|            input_structure != NULL ? input_structure : "");
  ------------------
  |  Branch (456:13): [True: 0, False: 0]
  ------------------
  457|      0|    }
  458|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  459|       |
  460|       |    /* Allocate data. */
  461|      2|    if ((process_data = OPENSSL_zalloc(sizeof(*process_data))) == NULL)
  ------------------
  |  |  108|      2|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (461:9): [True: 0, False: 2]
  ------------------
  462|      0|        goto err;
  463|      2|    if ((propquery != NULL
  ------------------
  |  Branch (463:10): [True: 0, False: 2]
  ------------------
  464|      0|            && (process_data->propq = OPENSSL_strdup(propquery)) == NULL))
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (464:16): [True: 0, False: 0]
  ------------------
  465|      0|        goto err;
  466|       |
  467|       |    /* Allocate our list of EVP_KEYMGMTs. */
  468|      2|    keymgmts = sk_EVP_KEYMGMT_new_null();
  469|      2|    if (keymgmts == NULL) {
  ------------------
  |  Branch (469:9): [True: 0, False: 2]
  ------------------
  470|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  471|      0|        goto err;
  472|      0|    }
  473|       |
  474|      2|    process_data->object = NULL;
  475|      2|    process_data->libctx = libctx;
  476|      2|    process_data->selection = ctx->selection;
  477|      2|    process_data->keymgmts = keymgmts;
  478|       |
  479|       |    /*
  480|       |     * Collect passed and default properties to prioritize the decoders.
  481|       |     */
  482|      2|    if (propquery != NULL)
  ------------------
  |  Branch (482:9): [True: 0, False: 2]
  ------------------
  483|      0|        p2 = pq = ossl_parse_query(libctx, propquery, 1);
  484|       |
  485|      2|    plp = ossl_ctx_global_properties(libctx, 0);
  486|      2|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (486:9): [True: 2, False: 0]
  |  Branch (486:24): [True: 0, False: 2]
  ------------------
  487|      0|        if (pq == NULL) {
  ------------------
  |  Branch (487:13): [True: 0, False: 0]
  ------------------
  488|      0|            pq = *plp;
  489|      0|        } else {
  490|      0|            p2 = ossl_property_merge(pq, *plp);
  491|      0|            ossl_property_free(pq);
  492|      0|            if (p2 == NULL)
  ------------------
  |  Branch (492:17): [True: 0, False: 0]
  ------------------
  493|      0|                goto err;
  494|      0|            pq = p2;
  495|      0|        }
  496|      0|    }
  497|       |
  498|       |    /*
  499|       |     * Enumerate all keymgmts into a stack.
  500|       |     *
  501|       |     * We could nest EVP_KEYMGMT_do_all_provided inside
  502|       |     * OSSL_DECODER_do_all_provided or vice versa but these functions become
  503|       |     * bottlenecks if called repeatedly, which is why we collect the
  504|       |     * EVP_KEYMGMTs into a stack here and call both functions only once.
  505|       |     *
  506|       |     * We resolve the keytype string to a name ID so we don't have to resolve it
  507|       |     * multiple times, avoiding repeated calls to EVP_KEYMGMT_is_a, which is a
  508|       |     * performance bottleneck. However, we do this lazily on the first call to
  509|       |     * collect_keymgmt made by EVP_KEYMGMT_do_all_provided, rather than do it
  510|       |     * upfront, as this ensures that the names for all loaded providers have
  511|       |     * been registered by the time we try to resolve the keytype string.
  512|       |     */
  513|      2|    collect_data.ctx = ctx;
  514|      2|    collect_data.libctx = libctx;
  515|      2|    collect_data.keymgmts = keymgmts;
  516|      2|    collect_data.keytype = keytype;
  517|      2|    collect_data.pq = pq;
  518|      2|    EVP_KEYMGMT_do_all_provided(libctx, collect_keymgmt, &collect_data);
  519|       |
  520|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (520:9): [True: 0, False: 2]
  ------------------
  521|      0|        goto err;
  522|       |
  523|       |    /* Enumerate all matching decoders. */
  524|      2|    OSSL_DECODER_do_all_provided(libctx, collect_decoder, &collect_data);
  525|       |
  526|      2|    if (collect_data.error_occurred)
  ------------------
  |  Branch (526:9): [True: 0, False: 2]
  ------------------
  527|      0|        goto err;
  528|       |
  529|      2|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      2|    do {                           \
  |  |  222|      2|        BIO *trc_out = NULL;       \
  |  |  223|      2|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2]
  |  |  ------------------
  ------------------
  530|      0|    {
  531|      0|        BIO_printf(trc_out,
  532|      0|            "(ctx %p) Got %d decoders producing keys\n",
  533|      0|            (void *)ctx, collect_data.total);
  534|      0|    }
  535|      2|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      2|    }                            \
  |  |  227|      2|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2]
  |  |  ------------------
  ------------------
  536|       |
  537|       |    /*
  538|       |     * Finish initializing the decoder context. If one or more decoders matched
  539|       |     * above then the number of decoders attached to the OSSL_DECODER_CTX will
  540|       |     * be nonzero. Else nothing was found and we do nothing.
  541|       |     */
  542|      2|    if (OSSL_DECODER_CTX_get_num_decoders(ctx) != 0) {
  ------------------
  |  Branch (542:9): [True: 2, False: 0]
  ------------------
  543|      2|        if (!OSSL_DECODER_CTX_set_construct(ctx, decoder_construct_pkey)
  ------------------
  |  Branch (543:13): [True: 0, False: 2]
  ------------------
  544|      2|            || !OSSL_DECODER_CTX_set_construct_data(ctx, process_data)
  ------------------
  |  Branch (544:16): [True: 0, False: 2]
  ------------------
  545|      2|            || !OSSL_DECODER_CTX_set_cleanup(ctx,
  ------------------
  |  Branch (545:16): [True: 0, False: 2]
  ------------------
  546|      2|                decoder_clean_pkey_construct_arg))
  547|      0|            goto err;
  548|       |
  549|      2|        process_data = NULL; /* Avoid it being freed */
  550|      2|    }
  551|       |
  552|      2|    ok = 1;
  553|      2|err:
  554|      2|    decoder_clean_pkey_construct_arg(process_data);
  555|      2|    ossl_property_free(p2);
  556|      2|    return ok;
  557|      2|}
decoder_pkey.c:collect_keymgmt:
  404|     80|{
  405|     80|    struct collect_data_st *data = arg;
  406|       |
  407|     80|    if (!check_keymgmt(keymgmt, data))
  ------------------
  |  Branch (407:9): [True: 77, False: 3]
  ------------------
  408|     77|        return;
  409|       |
  410|       |    /*
  411|       |     * We have to ref EVP_KEYMGMT here because in the success case,
  412|       |     * data->keymgmts is referenced by the constructor we register in the
  413|       |     * OSSL_DECODER_CTX. The registered cleanup function
  414|       |     * (decoder_clean_pkey_construct_arg) unrefs every element of the stack and
  415|       |     * frees it.
  416|       |     */
  417|      3|    if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (417:9): [True: 0, False: 3]
  ------------------
  418|      0|        return;
  419|       |
  420|      3|    if (sk_EVP_KEYMGMT_push(data->keymgmts, keymgmt) <= 0) {
  ------------------
  |  Branch (420:9): [True: 0, False: 3]
  ------------------
  421|      0|        EVP_KEYMGMT_free(keymgmt);
  422|      0|        data->error_occurred = 1;
  423|      0|    }
  424|      3|}
decoder_pkey.c:check_keymgmt:
  365|     80|{
  366|       |    /* If no keytype was specified, everything matches. */
  367|     80|    if (data->keytype == NULL)
  ------------------
  |  Branch (367:9): [True: 0, False: 80]
  ------------------
  368|      0|        return 1;
  369|       |
  370|     80|    if (!data->keytype_resolved) {
  ------------------
  |  Branch (370:9): [True: 2, False: 78]
  ------------------
  371|       |        /* We haven't cached the IDs from the keytype string yet. */
  372|      2|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(data->libctx);
  373|      2|        data->keytype_id = ossl_namemap_name2num(namemap, data->keytype);
  374|       |
  375|       |        /*
  376|       |         * If keytype is a value ambiguously used for both EC and SM2,
  377|       |         * collect the ID for SM2 as well.
  378|       |         */
  379|      2|        if (data->keytype_id != 0
  ------------------
  |  Branch (379:13): [True: 2, False: 0]
  ------------------
  380|      2|            && (strcmp(data->keytype, "id-ecPublicKey") == 0
  ------------------
  |  Branch (380:17): [True: 1, False: 1]
  ------------------
  381|      1|                || strcmp(data->keytype, "1.2.840.10045.2.1") == 0))
  ------------------
  |  Branch (381:20): [True: 0, False: 1]
  ------------------
  382|      1|            data->sm2_id = ossl_namemap_name2num(namemap, "SM2");
  383|       |
  384|       |        /*
  385|       |         * If keytype_id is zero the name was not found, but we still
  386|       |         * set keytype_resolved to avoid trying all this again.
  387|       |         */
  388|      2|        data->keytype_resolved = 1;
  389|      2|    }
  390|       |
  391|       |    /* Specified keytype could not be resolved, so nothing matches. */
  392|     80|    if (data->keytype_id == 0)
  ------------------
  |  Branch (392:9): [True: 0, False: 80]
  ------------------
  393|      0|        return 0;
  394|       |
  395|       |    /* Does not match the keytype specified, so skip. */
  396|     80|    if (keymgmt->name_id != data->keytype_id
  ------------------
  |  Branch (396:9): [True: 78, False: 2]
  ------------------
  397|     78|        && keymgmt->name_id != data->sm2_id)
  ------------------
  |  Branch (397:12): [True: 77, False: 1]
  ------------------
  398|     77|        return 0;
  399|       |
  400|      3|    return 1;
  401|     80|}
decoder_pkey.c:collect_decoder:
  314|    152|{
  315|    152|    struct collect_data_st *data = arg;
  316|    152|    STACK_OF(EVP_KEYMGMT) *keymgmts = data->keymgmts;
  ------------------
  |  |   33|    152|#define STACK_OF(type) struct stack_st_##type
  ------------------
  317|    152|    int i, end_i;
  318|    152|    EVP_KEYMGMT *keymgmt;
  319|    152|    const OSSL_PROVIDER *prov;
  320|    152|    void *provctx;
  321|       |
  322|    152|    if (data->error_occurred)
  ------------------
  |  Branch (322:9): [True: 0, False: 152]
  ------------------
  323|      0|        return;
  324|       |
  325|    152|    prov = OSSL_DECODER_get0_provider(decoder);
  326|    152|    provctx = OSSL_PROVIDER_get0_provider_ctx(prov);
  327|       |
  328|       |    /*
  329|       |     * Either the caller didn't give us a selection, or if they did, the decoder
  330|       |     * must tell us if it supports that selection to be accepted. If the decoder
  331|       |     * doesn't have |does_selection|, it's seen as taking anything.
  332|       |     */
  333|    152|    if (decoder->does_selection != NULL
  ------------------
  |  Branch (333:9): [True: 146, False: 6]
  ------------------
  334|    146|        && !decoder->does_selection(provctx, data->ctx->selection))
  ------------------
  |  Branch (334:12): [True: 76, False: 70]
  ------------------
  335|     76|        return;
  336|       |
  337|     76|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|     76|    do {                           \
  |  |  222|     76|        BIO *trc_out = NULL;       \
  |  |  223|     76|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 76]
  |  |  ------------------
  ------------------
  338|      0|    {
  339|      0|        BIO_printf(trc_out,
  340|      0|            "(ctx %p) Checking out decoder %p:\n"
  341|      0|            "    %s with %s\n",
  342|      0|            (void *)data->ctx, (void *)decoder,
  343|      0|            OSSL_DECODER_get0_name(decoder),
  344|      0|            OSSL_DECODER_get0_properties(decoder));
  345|      0|    }
  346|     76|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|     76|    }                            \
  |  |  227|     76|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 76]
  |  |  ------------------
  ------------------
  347|       |
  348|     76|    end_i = sk_EVP_KEYMGMT_num(keymgmts);
  349|    184|    for (i = 0; i < end_i; ++i) {
  ------------------
  |  Branch (349:17): [True: 113, False: 71]
  ------------------
  350|    113|        keymgmt = sk_EVP_KEYMGMT_value(keymgmts, i);
  351|       |
  352|       |        /* Only add this decoder once */
  353|    113|        if (collect_decoder_keymgmt(keymgmt, decoder, provctx, data))
  ------------------
  |  Branch (353:13): [True: 5, False: 108]
  ------------------
  354|      5|            break;
  355|    108|        if (data->error_occurred)
  ------------------
  |  Branch (355:13): [True: 0, False: 108]
  ------------------
  356|      0|            return;
  357|    108|    }
  358|     76|}
decoder_pkey.c:collect_decoder_keymgmt:
  237|    113|{
  238|    113|    void *decoderctx = NULL;
  239|    113|    OSSL_DECODER_INSTANCE *di = NULL;
  240|    113|    const OSSL_PROPERTY_LIST *props;
  241|       |
  242|       |    /*
  243|       |     * We already checked the EVP_KEYMGMT is applicable in check_keymgmt so we
  244|       |     * don't check it again here.
  245|       |     */
  246|       |
  247|    113|    if (keymgmt->name_id != decoder->base.id)
  ------------------
  |  Branch (247:9): [True: 107, False: 6]
  ------------------
  248|       |        /* Mismatch is not an error, continue. */
  249|    107|        return 0;
  250|       |
  251|      6|    if ((decoderctx = decoder->newctx(provctx)) == NULL) {
  ------------------
  |  Branch (251:9): [True: 0, False: 6]
  ------------------
  252|      0|        data->error_occurred = 1;
  253|      0|        return 0;
  254|      0|    }
  255|       |
  256|      6|    if ((di = ossl_decoder_instance_new(decoder, decoderctx)) == NULL) {
  ------------------
  |  Branch (256:9): [True: 0, False: 6]
  ------------------
  257|      0|        decoder->freectx(decoderctx);
  258|      0|        data->error_occurred = 1;
  259|      0|        return 0;
  260|      0|    }
  261|       |
  262|       |    /*
  263|       |     * Input types must be compatible, but we must accept DER encoders when the
  264|       |     * start input type is "PEM".
  265|       |     */
  266|      6|    if (data->ctx->start_input_type != NULL
  ------------------
  |  Branch (266:9): [True: 6, False: 0]
  ------------------
  267|      6|        && di->input_type != NULL
  ------------------
  |  Branch (267:12): [True: 6, False: 0]
  ------------------
  268|      6|        && OPENSSL_strcasecmp(di->input_type, data->ctx->start_input_type) != 0
  ------------------
  |  Branch (268:12): [True: 1, False: 5]
  ------------------
  269|      1|        && (OPENSSL_strcasecmp(di->input_type, "DER") != 0
  ------------------
  |  Branch (269:13): [True: 1, False: 0]
  ------------------
  270|      1|            || OPENSSL_strcasecmp(data->ctx->start_input_type, "PEM") != 0)) {
  ------------------
  |  Branch (270:16): [True: 0, False: 0]
  ------------------
  271|       |        /* Mismatch is not an error, continue. */
  272|      1|        ossl_decoder_instance_free(di);
  273|      1|        return 0;
  274|      1|    }
  275|       |
  276|      5|    OSSL_TRACE_BEGIN(DECODER)
  ------------------
  |  |  221|      5|    do {                           \
  |  |  222|      5|        BIO *trc_out = NULL;       \
  |  |  223|      5|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 5]
  |  |  ------------------
  ------------------
  277|      0|    {
  278|      0|        BIO_printf(trc_out,
  279|      0|            "(ctx %p) Checking out decoder %p:\n"
  280|      0|            "    %s with %s\n",
  281|      0|            (void *)data->ctx, (void *)decoder,
  282|      0|            OSSL_DECODER_get0_name(decoder),
  283|      0|            OSSL_DECODER_get0_properties(decoder));
  284|      0|    }
  285|      5|    OSSL_TRACE_END(DECODER);
  ------------------
  |  |  226|      5|    }                            \
  |  |  227|      5|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 5]
  |  |  ------------------
  ------------------
  286|       |
  287|       |    /*
  288|       |     * Get the property match score so the decoders can be prioritized later.
  289|       |     */
  290|      5|    props = ossl_decoder_parsed_properties(decoder);
  291|      5|    if (data->pq != NULL && props != NULL) {
  ------------------
  |  Branch (291:9): [True: 0, False: 5]
  |  Branch (291:29): [True: 0, False: 0]
  ------------------
  292|      0|        di->score = ossl_property_match_count(data->pq, props);
  293|       |        /*
  294|       |         * Mismatch of mandatory properties is not an error, the decoder is just
  295|       |         * ignored, continue.
  296|       |         */
  297|      0|        if (di->score < 0) {
  ------------------
  |  Branch (297:13): [True: 0, False: 0]
  ------------------
  298|      0|            ossl_decoder_instance_free(di);
  299|      0|            return 0;
  300|      0|        }
  301|      0|    }
  302|       |
  303|      5|    if (!ossl_decoder_ctx_add_decoder_inst(data->ctx, di)) {
  ------------------
  |  Branch (303:9): [True: 0, False: 5]
  ------------------
  304|      0|        ossl_decoder_instance_free(di);
  305|      0|        data->error_occurred = 1;
  306|      0|        return 0;
  307|      0|    }
  308|       |
  309|      5|    ++data->total;
  310|      5|    return 1;
  311|      5|}
decoder_pkey.c:decoder_construct_pkey:
   74|   381k|{
   75|   381k|    struct decoder_pkey_data_st *data = construct_data;
   76|   381k|    OSSL_DECODER *decoder = OSSL_DECODER_INSTANCE_get_decoder(decoder_inst);
   77|   381k|    void *decoderctx = OSSL_DECODER_INSTANCE_get_decoder_ctx(decoder_inst);
   78|   381k|    const OSSL_PROVIDER *decoder_prov = OSSL_DECODER_get0_provider(decoder);
   79|   381k|    EVP_KEYMGMT *keymgmt = NULL;
   80|   381k|    const OSSL_PROVIDER *keymgmt_prov = NULL;
   81|   381k|    int i, end;
   82|       |    /*
   83|       |     * |object_ref| points to a provider reference to an object, its exact
   84|       |     * contents entirely opaque to us, but may be passed to any provider
   85|       |     * function that expects this (such as OSSL_FUNC_keymgmt_load().
   86|       |     *
   87|       |     * This pointer is considered volatile, i.e. whatever it points at
   88|       |     * is assumed to be freed as soon as this function returns.
   89|       |     */
   90|   381k|    void *object_ref = NULL;
   91|   381k|    size_t object_ref_sz = 0;
   92|   381k|    const OSSL_PARAM *p;
   93|       |
   94|   381k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_DATA_TYPE);
  ------------------
  |  |  358|   381k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
   95|   381k|    if (p != NULL) {
  ------------------
  |  Branch (95:9): [True: 381k, False: 0]
  ------------------
   96|   381k|        char *object_type = NULL;
   97|       |
   98|   381k|        if (!OSSL_PARAM_get_utf8_string(p, &object_type, 0))
  ------------------
  |  Branch (98:13): [True: 0, False: 381k]
  ------------------
   99|      0|            return 0;
  100|   381k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|   381k|        data->object_type = object_type;
  102|   381k|    }
  103|       |
  104|       |    /*
  105|       |     * For stuff that should end up in an EVP_PKEY, we only accept an object
  106|       |     * reference for the moment.  This enforces that the key data itself
  107|       |     * remains with the provider.
  108|       |     */
  109|   381k|    p = OSSL_PARAM_locate_const(params, OSSL_OBJECT_PARAM_REFERENCE);
  ------------------
  |  |  361|   381k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  110|   381k|    if (p == NULL || p->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|   190k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (110:9): [True: 190k, False: 190k]
  |  Branch (110:22): [True: 0, False: 190k]
  ------------------
  111|   190k|        return 0;
  112|   190k|    object_ref = p->data;
  113|   190k|    object_ref_sz = p->data_size;
  114|       |
  115|       |    /*
  116|       |     * First, we try to find a keymgmt that comes from the same provider as
  117|       |     * the decoder that passed the params.
  118|       |     */
  119|   190k|    end = sk_EVP_KEYMGMT_num(data->keymgmts);
  120|   190k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (120:17): [True: 190k, False: 0]
  ------------------
  121|   190k|        keymgmt = sk_EVP_KEYMGMT_value(data->keymgmts, i);
  122|   190k|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  123|       |
  124|   190k|        if (keymgmt_prov == decoder_prov
  ------------------
  |  Branch (124:13): [True: 190k, False: 0]
  ------------------
  125|   190k|            && evp_keymgmt_has_load(keymgmt)
  ------------------
  |  Branch (125:16): [True: 190k, False: 0]
  ------------------
  126|   190k|            && EVP_KEYMGMT_is_a(keymgmt, data->object_type))
  ------------------
  |  Branch (126:16): [True: 190k, False: 0]
  ------------------
  127|   190k|            break;
  128|   190k|    }
  129|   190k|    if (i < end) {
  ------------------
  |  Branch (129:9): [True: 190k, False: 0]
  ------------------
  130|       |        /* To allow it to be freed further down */
  131|   190k|        if (!EVP_KEYMGMT_up_ref(keymgmt))
  ------------------
  |  Branch (131:13): [True: 0, False: 190k]
  ------------------
  132|      0|            return 0;
  133|   190k|    } else if ((keymgmt = EVP_KEYMGMT_fetch(data->libctx,
  ------------------
  |  Branch (133:16): [True: 0, False: 0]
  ------------------
  134|      0|                    data->object_type,
  135|      0|                    data->propq))
  136|      0|        != NULL) {
  137|      0|        keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
  138|      0|    }
  139|       |
  140|   190k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (140:9): [True: 190k, False: 0]
  ------------------
  141|   190k|        EVP_PKEY *pkey = NULL;
  142|   190k|        void *keydata = NULL;
  143|       |
  144|       |        /*
  145|       |         * If the EVP_KEYMGMT and the OSSL_DECODER are from the
  146|       |         * same provider, we assume that the KEYMGMT has a key loading
  147|       |         * function that can handle the provider reference we hold.
  148|       |         *
  149|       |         * Otherwise, we export from the decoder and import the
  150|       |         * result in the keymgmt.
  151|       |         */
  152|   190k|        if (keymgmt_prov == decoder_prov) {
  ------------------
  |  Branch (152:13): [True: 190k, False: 0]
  ------------------
  153|   190k|            keydata = evp_keymgmt_load(keymgmt, object_ref, object_ref_sz);
  154|   190k|        } else {
  155|      0|            struct evp_keymgmt_util_try_import_data_st import_data;
  156|       |
  157|      0|            import_data.keymgmt = keymgmt;
  158|      0|            import_data.keydata = NULL;
  159|      0|            if (data->selection == 0)
  ------------------
  |  Branch (159:17): [True: 0, False: 0]
  ------------------
  160|       |                /* import/export functions do not tolerate 0 selection */
  161|      0|                import_data.selection = OSSL_KEYMGMT_SELECT_ALL;
  ------------------
  |  |  652|      0|    (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  650|      0|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  640|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  |  |  ------------------
  |  |  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  |  |  ------------------
  |  |  |  |  |  |  641|      0|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  ------------------
  |  |  |  |  647|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  ------------------
  |  |  |  |  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  ------------------
  |  |  |  |  648|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  643|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  162|      0|            else
  163|      0|                import_data.selection = data->selection;
  164|       |
  165|       |            /*
  166|       |             * No need to check for errors here, the value of
  167|       |             * |import_data.keydata| is as much an indicator.
  168|       |             */
  169|      0|            (void)decoder->export_object(decoderctx,
  170|      0|                object_ref, object_ref_sz,
  171|      0|                &evp_keymgmt_util_try_import,
  172|      0|                &import_data);
  173|      0|            keydata = import_data.keydata;
  174|      0|            import_data.keydata = NULL;
  175|      0|        }
  176|       |        /*
  177|       |         * When load or import fails, because this is not an acceptable key
  178|       |         * (despite the provided key material being syntactically valid), the
  179|       |         * reason why the key is rejected would be lost, unless we signal a
  180|       |         * hard error, and suppress resetting for another try.
  181|       |         */
  182|   190k|        if (keydata == NULL)
  ------------------
  |  Branch (182:13): [True: 0, False: 190k]
  ------------------
  183|      0|            ossl_decoder_ctx_set_harderr(data->ctx);
  184|       |
  185|   190k|        if (keydata != NULL
  ------------------
  |  Branch (185:13): [True: 190k, False: 0]
  ------------------
  186|   190k|            && (pkey = evp_keymgmt_util_make_pkey(keymgmt, keydata)) == NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 190k]
  ------------------
  187|      0|            evp_keymgmt_freedata(keymgmt, keydata);
  188|       |
  189|   190k|        *data->object = pkey;
  190|       |
  191|       |        /*
  192|       |         * evp_keymgmt_util_make_pkey() increments the reference count when
  193|       |         * assigning the EVP_PKEY, so we can free the keymgmt here.
  194|       |         */
  195|   190k|        EVP_KEYMGMT_free(keymgmt);
  196|   190k|    }
  197|       |    /*
  198|       |     * We successfully looked through, |*ctx->object| determines if we
  199|       |     * actually found something.
  200|       |     */
  201|       |    return (*data->object != NULL);
  202|   190k|}
decoder_pkey.c:decoder_clean_pkey_construct_arg:
  205|   190k|{
  206|   190k|    struct decoder_pkey_data_st *data = construct_data;
  207|       |
  208|   190k|    if (data != NULL) {
  ------------------
  |  Branch (208:9): [True: 190k, False: 2]
  ------------------
  209|   190k|        sk_EVP_KEYMGMT_pop_free(data->keymgmts, EVP_KEYMGMT_free);
  210|   190k|        OPENSSL_free(data->propq);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|   190k|        OPENSSL_free(data->object_type);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|   190k|        OPENSSL_free(data);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|   190k|    }
  214|   190k|}
decoder_pkey.c:ossl_decoder_ctx_for_pkey_dup:
  579|   190k|{
  580|   190k|    OSSL_DECODER_CTX *dest;
  581|   190k|    struct decoder_pkey_data_st *process_data_src, *process_data_dest = NULL;
  582|       |
  583|   190k|    if (src == NULL)
  ------------------
  |  Branch (583:9): [True: 0, False: 190k]
  ------------------
  584|      0|        return NULL;
  585|       |
  586|   190k|    if ((dest = OSSL_DECODER_CTX_new()) == NULL) {
  ------------------
  |  Branch (586:9): [True: 0, False: 190k]
  ------------------
  587|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  588|      0|        return NULL;
  589|      0|    }
  590|       |
  591|   190k|    if (!OSSL_DECODER_CTX_set_input_type(dest, input_type)
  ------------------
  |  Branch (591:9): [True: 0, False: 190k]
  ------------------
  592|   190k|        || !OSSL_DECODER_CTX_set_input_structure(dest, input_structure)) {
  ------------------
  |  Branch (592:12): [True: 0, False: 190k]
  ------------------
  593|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  594|      0|        goto err;
  595|      0|    }
  596|   190k|    dest->selection = src->selection;
  597|       |
  598|   190k|    if (src->decoder_insts != NULL) {
  ------------------
  |  Branch (598:9): [True: 190k, False: 0]
  ------------------
  599|   190k|        dest->decoder_insts
  600|   190k|            = sk_OSSL_DECODER_INSTANCE_deep_copy(src->decoder_insts,
  601|   190k|                ossl_decoder_instance_dup,
  602|   190k|                ossl_decoder_instance_free);
  603|   190k|        if (dest->decoder_insts == NULL) {
  ------------------
  |  Branch (603:13): [True: 0, False: 190k]
  ------------------
  604|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  605|      0|            goto err;
  606|      0|        }
  607|   190k|    }
  608|       |
  609|   190k|    if (!OSSL_DECODER_CTX_set_construct(dest,
  ------------------
  |  Branch (609:9): [True: 0, False: 190k]
  ------------------
  610|   190k|            OSSL_DECODER_CTX_get_construct(src))) {
  611|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  612|      0|        goto err;
  613|      0|    }
  614|       |
  615|   190k|    process_data_src = OSSL_DECODER_CTX_get_construct_data(src);
  616|   190k|    if (process_data_src != NULL) {
  ------------------
  |  Branch (616:9): [True: 190k, False: 0]
  ------------------
  617|   190k|        process_data_dest = OPENSSL_zalloc(sizeof(*process_data_dest));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  618|   190k|        if (process_data_dest == NULL) {
  ------------------
  |  Branch (618:13): [True: 0, False: 190k]
  ------------------
  619|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  620|      0|            goto err;
  621|      0|        }
  622|   190k|        if (process_data_src->propq != NULL) {
  ------------------
  |  Branch (622:13): [True: 0, False: 190k]
  ------------------
  623|      0|            process_data_dest->propq = OPENSSL_strdup(process_data_src->propq);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  624|      0|            if (process_data_dest->propq == NULL) {
  ------------------
  |  Branch (624:17): [True: 0, False: 0]
  ------------------
  625|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  626|      0|                goto err;
  627|      0|            }
  628|      0|        }
  629|       |
  630|   190k|        if (process_data_src->keymgmts != NULL) {
  ------------------
  |  Branch (630:13): [True: 190k, False: 0]
  ------------------
  631|   190k|            process_data_dest->keymgmts
  632|   190k|                = sk_EVP_KEYMGMT_deep_copy(process_data_src->keymgmts,
  633|   190k|                    keymgmt_dup,
  634|   190k|                    EVP_KEYMGMT_free);
  635|   190k|            if (process_data_dest->keymgmts == NULL) {
  ------------------
  |  Branch (635:17): [True: 0, False: 190k]
  ------------------
  636|      0|                ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  637|      0|                goto err;
  638|      0|            }
  639|   190k|        }
  640|       |
  641|   190k|        process_data_dest->object = (void **)pkey;
  642|   190k|        process_data_dest->libctx = process_data_src->libctx;
  643|   190k|        process_data_dest->selection = process_data_src->selection;
  644|   190k|        process_data_dest->ctx = dest;
  645|   190k|        if (!OSSL_DECODER_CTX_set_construct_data(dest, process_data_dest)) {
  ------------------
  |  Branch (645:13): [True: 0, False: 190k]
  ------------------
  646|      0|            ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  647|      0|            goto err;
  648|      0|        }
  649|   190k|        process_data_dest = NULL;
  650|   190k|    }
  651|       |
  652|   190k|    if (!OSSL_DECODER_CTX_set_cleanup(dest,
  ------------------
  |  Branch (652:9): [True: 0, False: 190k]
  ------------------
  653|   190k|            OSSL_DECODER_CTX_get_cleanup(src))) {
  654|      0|        ERR_raise(ERR_LIB_OSSL_DECODER, ERR_R_OSSL_DECODER_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  655|      0|        goto err;
  656|      0|    }
  657|       |
  658|   190k|    return dest;
  659|      0|err:
  660|      0|    decoder_clean_pkey_construct_arg(process_data_dest);
  661|      0|    OSSL_DECODER_CTX_free(dest);
  662|       |    return NULL;
  663|   190k|}
decoder_pkey.c:keymgmt_dup:
  561|   242k|{
  562|   242k|    if (!EVP_KEYMGMT_up_ref((EVP_KEYMGMT *)keymgmt))
  ------------------
  |  Branch (562:9): [True: 0, False: 242k]
  ------------------
  563|      0|        return NULL;
  564|       |
  565|   242k|    return (EVP_KEYMGMT *)keymgmt;
  566|   242k|}

ossl_encoder_store_cache_flush:
  443|     81|{
  444|     81|    OSSL_METHOD_STORE *store = get_encoder_store(libctx);
  445|       |
  446|     81|    if (store != NULL)
  ------------------
  |  Branch (446:9): [True: 81, False: 0]
  ------------------
  447|     81|        return ossl_method_store_cache_flush_all(store);
  448|      0|    return 1;
  449|     81|}
ossl_encoder_store_remove_all_provided:
  452|     81|{
  453|     81|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  454|     81|    OSSL_METHOD_STORE *store = get_encoder_store(libctx);
  455|       |
  456|     81|    if (store != NULL)
  ------------------
  |  Branch (456:9): [True: 81, False: 0]
  ------------------
  457|     81|        return ossl_method_store_remove_all_provided(store, prov);
  458|      0|    return 1;
  459|     81|}
encoder_meth.c:get_encoder_store:
  112|    162|{
  113|    162|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_ENCODER_STORE_INDEX);
  ------------------
  |  |  108|    162|#define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10
  ------------------
  114|    162|}

ENGINE_load_builtin_engines:
   14|  1.45k|{
   15|  1.45k|    OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
  ------------------
  |  |  535|  1.45k|    (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  513|  1.45k|#define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
  |  |  ------------------
  |  |                   (OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
  |  |  ------------------
  |  |  |  |  514|  1.45k|#define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
  |  |  ------------------
  |  |  536|  1.45k|        | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  516|  1.45k|#define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
  |  |  ------------------
  |  |                       | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  517|  1.45k|#define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
  |  |  ------------------
  |  |                       | OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
  |  |  ------------------
  |  |  |  |  518|  1.45k|#define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
  |  |  ------------------
  ------------------
   16|  1.45k|}

ENGINE_ctrl:
  126|  14.4k|{
  127|  14.4k|    int ctrl_exists;
  128|       |
  129|  14.4k|    if (e == NULL) {
  ------------------
  |  Branch (129:9): [True: 0, False: 14.4k]
  ------------------
  130|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  131|      0|        return 0;
  132|      0|    }
  133|       |
  134|  14.4k|    ctrl_exists = ((e->ctrl == NULL) ? 0 : 1);
  ------------------
  |  Branch (134:20): [True: 0, False: 14.4k]
  ------------------
  135|       |
  136|       |    /*
  137|       |     * Intercept any "root-level" commands before trying to hand them on to
  138|       |     * ctrl() handlers.
  139|       |     */
  140|  14.4k|    switch (cmd) {
  141|      0|    case ENGINE_CTRL_HAS_CTRL_FUNCTION:
  ------------------
  |  |  184|      0|#define ENGINE_CTRL_HAS_CTRL_FUNCTION 10
  ------------------
  |  Branch (141:5): [True: 0, False: 14.4k]
  ------------------
  142|      0|        return ctrl_exists;
  143|      0|    case ENGINE_CTRL_GET_FIRST_CMD_TYPE:
  ------------------
  |  |  189|      0|#define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11
  ------------------
  |  Branch (143:5): [True: 0, False: 14.4k]
  ------------------
  144|      0|    case ENGINE_CTRL_GET_NEXT_CMD_TYPE:
  ------------------
  |  |  194|      0|#define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12
  ------------------
  |  Branch (144:5): [True: 0, False: 14.4k]
  ------------------
  145|  3.62k|    case ENGINE_CTRL_GET_CMD_FROM_NAME:
  ------------------
  |  |  199|  3.62k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
  |  Branch (145:5): [True: 3.62k, False: 10.8k]
  ------------------
  146|  3.62k|    case ENGINE_CTRL_GET_NAME_LEN_FROM_CMD:
  ------------------
  |  |  208|  3.62k|#define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14
  ------------------
  |  Branch (146:5): [True: 0, False: 14.4k]
  ------------------
  147|  3.62k|    case ENGINE_CTRL_GET_NAME_FROM_CMD:
  ------------------
  |  |  209|  3.62k|#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
  ------------------
  |  Branch (147:5): [True: 0, False: 14.4k]
  ------------------
  148|  3.62k|    case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD:
  ------------------
  |  |  211|  3.62k|#define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16
  ------------------
  |  Branch (148:5): [True: 0, False: 14.4k]
  ------------------
  149|  3.62k|    case ENGINE_CTRL_GET_DESC_FROM_CMD:
  ------------------
  |  |  212|  3.62k|#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
  ------------------
  |  Branch (149:5): [True: 0, False: 14.4k]
  ------------------
  150|  10.8k|    case ENGINE_CTRL_GET_CMD_FLAGS:
  ------------------
  |  |  218|  10.8k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  |  Branch (150:5): [True: 7.24k, False: 7.24k]
  ------------------
  151|  10.8k|        if (ctrl_exists && !(e->flags & ENGINE_FLAGS_MANUAL_CMD_CTRL))
  ------------------
  |  |   76|  10.8k|#define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002
  ------------------
  |  Branch (151:13): [True: 10.8k, False: 0]
  |  Branch (151:28): [True: 10.8k, False: 0]
  ------------------
  152|  10.8k|            return int_ctrl_helper(e, cmd, i, p, f);
  153|      0|        if (!ctrl_exists) {
  ------------------
  |  Branch (153:13): [True: 0, False: 0]
  ------------------
  154|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NO_CONTROL_FUNCTION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  155|       |            /*
  156|       |             * For these cmd-related functions, failure is indicated by a -1
  157|       |             * return value (because 0 is used as a valid return in some
  158|       |             * places).
  159|       |             */
  160|      0|            return -1;
  161|      0|        }
  162|  3.62k|    default:
  ------------------
  |  Branch (162:5): [True: 3.62k, False: 10.8k]
  ------------------
  163|  3.62k|        break;
  164|  14.4k|    }
  165|       |    /* Anything else requires a ctrl() handler to exist. */
  166|  3.62k|    if (!ctrl_exists) {
  ------------------
  |  Branch (166:9): [True: 0, False: 3.62k]
  ------------------
  167|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NO_CONTROL_FUNCTION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  168|      0|        return 0;
  169|      0|    }
  170|  3.62k|    return e->ctrl(e, cmd, i, p, f);
  171|  3.62k|}
ENGINE_cmd_is_executable:
  174|  3.62k|{
  175|  3.62k|    int flags;
  176|  3.62k|    if ((flags = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FLAGS, cmd, NULL, NULL)) < 0) {
  ------------------
  |  |  218|  3.62k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  |  Branch (176:9): [True: 0, False: 3.62k]
  ------------------
  177|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  178|      0|        return 0;
  179|      0|    }
  180|  3.62k|    if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
  ------------------
  |  |  121|  3.62k|#define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004
  ------------------
                  if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
  ------------------
  |  |  111|  2.89k|#define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001
  ------------------
                  if (!(flags & ENGINE_CMD_FLAG_NO_INPUT) && !(flags & ENGINE_CMD_FLAG_NUMERIC) && !(flags & ENGINE_CMD_FLAG_STRING))
  ------------------
  |  |  116|  1.44k|#define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002
  ------------------
  |  Branch (180:9): [True: 2.89k, False: 724]
  |  Branch (180:48): [True: 1.44k, False: 1.44k]
  |  Branch (180:86): [True: 0, False: 1.44k]
  ------------------
  181|      0|        return 0;
  182|  3.62k|    return 1;
  183|  3.62k|}
ENGINE_ctrl_cmd_string:
  224|  3.62k|{
  225|  3.62k|    int num, flags;
  226|  3.62k|    long l;
  227|  3.62k|    char *ptr;
  228|       |
  229|  3.62k|    if (e == NULL || cmd_name == NULL) {
  ------------------
  |  Branch (229:9): [True: 0, False: 3.62k]
  |  Branch (229:22): [True: 0, False: 3.62k]
  ------------------
  230|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|        return 0;
  232|      0|    }
  233|  3.62k|    if (e->ctrl == NULL
  ------------------
  |  Branch (233:9): [True: 0, False: 3.62k]
  ------------------
  234|  3.62k|        || (num = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FROM_NAME,
  ------------------
  |  |  199|  3.62k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
  |  Branch (234:12): [True: 0, False: 3.62k]
  ------------------
  235|  3.62k|                0, (void *)cmd_name, NULL))
  236|  3.62k|            <= 0) {
  237|       |        /*
  238|       |         * If the command didn't *have* to be supported, we fake success.
  239|       |         * This allows certain settings to be specified for multiple ENGINEs
  240|       |         * and only require a change of ENGINE id (without having to
  241|       |         * selectively apply settings). Eg. changing from a hardware device
  242|       |         * back to the regular software ENGINE without editing the config
  243|       |         * file, etc.
  244|       |         */
  245|      0|        if (cmd_optional) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|            ERR_clear_error();
  247|      0|            return 1;
  248|      0|        }
  249|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  250|      0|        return 0;
  251|      0|    }
  252|  3.62k|    if (!ENGINE_cmd_is_executable(e, num)) {
  ------------------
  |  Branch (252:9): [True: 0, False: 3.62k]
  ------------------
  253|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CMD_NOT_EXECUTABLE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  254|      0|        return 0;
  255|      0|    }
  256|       |
  257|  3.62k|    flags = ENGINE_ctrl(e, ENGINE_CTRL_GET_CMD_FLAGS, num, NULL, NULL);
  ------------------
  |  |  218|  3.62k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  258|  3.62k|    if (flags < 0) {
  ------------------
  |  Branch (258:9): [True: 0, False: 3.62k]
  ------------------
  259|       |        /*
  260|       |         * Shouldn't happen, given that ENGINE_cmd_is_executable() returned
  261|       |         * success.
  262|       |         */
  263|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|        return 0;
  265|      0|    }
  266|       |    /*
  267|       |     * If the command takes no input, there must be no input. And vice versa.
  268|       |     */
  269|  3.62k|    if (flags & ENGINE_CMD_FLAG_NO_INPUT) {
  ------------------
  |  |  121|  3.62k|#define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004
  ------------------
  |  Branch (269:9): [True: 724, False: 2.89k]
  ------------------
  270|    724|        if (arg != NULL) {
  ------------------
  |  Branch (270:13): [True: 0, False: 724]
  ------------------
  271|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_COMMAND_TAKES_NO_INPUT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|            return 0;
  273|      0|        }
  274|       |        /*
  275|       |         * We deliberately force the result of ENGINE_ctrl() to 0 or 1 rather
  276|       |         * than returning it as "return data". This is to ensure usage of
  277|       |         * these commands is consistent across applications and that certain
  278|       |         * applications don't understand it one way, and others another.
  279|       |         */
  280|    724|        if (ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
  ------------------
  |  Branch (280:13): [True: 0, False: 724]
  ------------------
  281|      0|            return 1;
  282|    724|        return 0;
  283|    724|    }
  284|       |    /* So, we require input */
  285|  2.89k|    if (arg == NULL) {
  ------------------
  |  Branch (285:9): [True: 0, False: 2.89k]
  ------------------
  286|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_COMMAND_TAKES_INPUT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  287|      0|        return 0;
  288|      0|    }
  289|       |    /* If it takes string input, that's easy */
  290|  2.89k|    if (flags & ENGINE_CMD_FLAG_STRING) {
  ------------------
  |  |  116|  2.89k|#define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002
  ------------------
  |  Branch (290:9): [True: 1.44k, False: 1.44k]
  ------------------
  291|       |        /* Same explanation as above */
  292|  1.44k|        if (ENGINE_ctrl(e, num, 0, (void *)arg, NULL) > 0)
  ------------------
  |  Branch (292:13): [True: 1.44k, False: 0]
  ------------------
  293|  1.44k|            return 1;
  294|      0|        return 0;
  295|  1.44k|    }
  296|       |    /*
  297|       |     * If it doesn't take numeric either, then it is unsupported for use in a
  298|       |     * config-setting situation, which is what this function is for. This
  299|       |     * should never happen though, because ENGINE_cmd_is_executable() was
  300|       |     * used.
  301|       |     */
  302|  1.44k|    if (!(flags & ENGINE_CMD_FLAG_NUMERIC)) {
  ------------------
  |  |  111|  1.44k|#define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001
  ------------------
  |  Branch (302:9): [True: 0, False: 1.44k]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  304|      0|        return 0;
  305|      0|    }
  306|  1.44k|    l = strtol(arg, &ptr, 10);
  307|  1.44k|    if ((arg == ptr) || (*ptr != '\0')) {
  ------------------
  |  Branch (307:9): [True: 0, False: 1.44k]
  |  Branch (307:25): [True: 0, False: 1.44k]
  ------------------
  308|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  309|      0|        return 0;
  310|      0|    }
  311|       |    /*
  312|       |     * Force the result of the control command to 0 or 1, for the reasons
  313|       |     * mentioned before.
  314|       |     */
  315|  1.44k|    if (ENGINE_ctrl(e, num, l, NULL, NULL) > 0)
  ------------------
  |  Branch (315:9): [True: 1.44k, False: 0]
  ------------------
  316|  1.44k|        return 1;
  317|      0|    return 0;
  318|  1.44k|}
eng_ctrl.c:int_ctrl_helper:
   66|  10.8k|{
   67|  10.8k|    int idx;
   68|  10.8k|    char *s = (char *)p;
   69|  10.8k|    const ENGINE_CMD_DEFN *cdp;
   70|       |
   71|       |    /* Take care of the easy one first (eg. it requires no searches) */
   72|  10.8k|    if (cmd == ENGINE_CTRL_GET_FIRST_CMD_TYPE) {
  ------------------
  |  |  189|  10.8k|#define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11
  ------------------
  |  Branch (72:9): [True: 0, False: 10.8k]
  ------------------
   73|      0|        if ((e->cmd_defns == NULL) || int_ctrl_cmd_is_null(e->cmd_defns))
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  |  Branch (73:39): [True: 0, False: 0]
  ------------------
   74|      0|            return 0;
   75|      0|        return e->cmd_defns->cmd_num;
   76|      0|    }
   77|       |    /* One or two commands require that "p" be a valid string buffer */
   78|  10.8k|    if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
  ------------------
  |  |  199|  10.8k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
                  if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
  ------------------
  |  |  209|  7.24k|#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
  ------------------
                  if ((cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) || (cmd == ENGINE_CTRL_GET_NAME_FROM_CMD) || (cmd == ENGINE_CTRL_GET_DESC_FROM_CMD)) {
  ------------------
  |  |  212|  7.24k|#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
  ------------------
  |  Branch (78:9): [True: 3.62k, False: 7.24k]
  |  Branch (78:51): [True: 0, False: 7.24k]
  |  Branch (78:93): [True: 0, False: 7.24k]
  ------------------
   79|  3.62k|        if (s == NULL) {
  ------------------
  |  Branch (79:13): [True: 0, False: 3.62k]
  ------------------
   80|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   81|      0|            return -1;
   82|      0|        }
   83|  3.62k|    }
   84|       |    /* Now handle cmd_name -> cmd_num conversion */
   85|  10.8k|    if (cmd == ENGINE_CTRL_GET_CMD_FROM_NAME) {
  ------------------
  |  |  199|  10.8k|#define ENGINE_CTRL_GET_CMD_FROM_NAME 13
  ------------------
  |  Branch (85:9): [True: 3.62k, False: 7.24k]
  ------------------
   86|  3.62k|        if ((e->cmd_defns == NULL)
  ------------------
  |  Branch (86:13): [True: 0, False: 3.62k]
  ------------------
   87|  3.62k|            || ((idx = int_ctrl_cmd_by_name(e->cmd_defns, s)) < 0)) {
  ------------------
  |  Branch (87:16): [True: 0, False: 3.62k]
  ------------------
   88|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   89|      0|            return -1;
   90|      0|        }
   91|  3.62k|        return e->cmd_defns[idx].cmd_num;
   92|  3.62k|    }
   93|       |    /*
   94|       |     * For the rest of the commands, the 'long' argument must specify a valid
   95|       |     * command number - so we need to conduct a search.
   96|       |     */
   97|  7.24k|    if ((e->cmd_defns == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 7.24k]
  ------------------
   98|  7.24k|        || ((idx = int_ctrl_cmd_by_num(e->cmd_defns, (unsigned int)i)) < 0)) {
  ------------------
  |  Branch (98:12): [True: 0, False: 7.24k]
  ------------------
   99|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_CMD_NUMBER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|        return -1;
  101|      0|    }
  102|       |    /* Now the logic splits depending on command type */
  103|  7.24k|    cdp = &e->cmd_defns[idx];
  104|  7.24k|    switch (cmd) {
  ------------------
  |  Branch (104:13): [True: 7.24k, False: 0]
  ------------------
  105|      0|    case ENGINE_CTRL_GET_NEXT_CMD_TYPE:
  ------------------
  |  |  194|      0|#define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12
  ------------------
  |  Branch (105:5): [True: 0, False: 7.24k]
  ------------------
  106|      0|        cdp++;
  107|      0|        return int_ctrl_cmd_is_null(cdp) ? 0 : cdp->cmd_num;
  ------------------
  |  Branch (107:16): [True: 0, False: 0]
  ------------------
  108|      0|    case ENGINE_CTRL_GET_NAME_LEN_FROM_CMD:
  ------------------
  |  |  208|      0|#define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14
  ------------------
  |  Branch (108:5): [True: 0, False: 7.24k]
  ------------------
  109|      0|        return (int)strlen(cdp->cmd_name);
  110|      0|    case ENGINE_CTRL_GET_NAME_FROM_CMD:
  ------------------
  |  |  209|      0|#define ENGINE_CTRL_GET_NAME_FROM_CMD 15
  ------------------
  |  Branch (110:5): [True: 0, False: 7.24k]
  ------------------
  111|      0|        return (int)strlen(strcpy(s, cdp->cmd_name));
  112|      0|    case ENGINE_CTRL_GET_DESC_LEN_FROM_CMD:
  ------------------
  |  |  211|      0|#define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16
  ------------------
  |  Branch (112:5): [True: 0, False: 7.24k]
  ------------------
  113|      0|        return (int)strlen(cdp->cmd_desc == NULL ? int_no_description
  ------------------
  |  Branch (113:28): [True: 0, False: 0]
  ------------------
  114|      0|                                                 : cdp->cmd_desc);
  115|      0|    case ENGINE_CTRL_GET_DESC_FROM_CMD:
  ------------------
  |  |  212|      0|#define ENGINE_CTRL_GET_DESC_FROM_CMD 17
  ------------------
  |  Branch (115:5): [True: 0, False: 7.24k]
  ------------------
  116|      0|        return (int)strlen(strcpy(s, cdp->cmd_desc == NULL ? int_no_description : cdp->cmd_desc));
  ------------------
  |  Branch (116:38): [True: 0, False: 0]
  ------------------
  117|  7.24k|    case ENGINE_CTRL_GET_CMD_FLAGS:
  ------------------
  |  |  218|  7.24k|#define ENGINE_CTRL_GET_CMD_FLAGS 18
  ------------------
  |  Branch (117:5): [True: 7.24k, False: 0]
  ------------------
  118|  7.24k|        return cdp->cmd_flags;
  119|  7.24k|    }
  120|       |    /* Shouldn't really be here ... */
  121|  7.24k|    ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  122|      0|    return -1;
  123|  7.24k|}
eng_ctrl.c:int_ctrl_cmd_is_null:
   28|  57.9k|{
   29|  57.9k|    if ((defn->cmd_num == 0) || (defn->cmd_name == NULL))
  ------------------
  |  Branch (29:9): [True: 0, False: 57.9k]
  |  Branch (29:33): [True: 0, False: 57.9k]
  ------------------
   30|      0|        return 1;
   31|  57.9k|    return 0;
   32|  57.9k|}
eng_ctrl.c:int_ctrl_cmd_by_name:
   35|  3.62k|{
   36|  3.62k|    int idx = 0;
   37|  18.1k|    while (!int_ctrl_cmd_is_null(defn) && (strcmp(defn->cmd_name, s) != 0)) {
  ------------------
  |  Branch (37:12): [True: 18.1k, False: 0]
  |  Branch (37:43): [True: 14.4k, False: 3.62k]
  ------------------
   38|  14.4k|        idx++;
   39|  14.4k|        defn++;
   40|  14.4k|    }
   41|  3.62k|    if (int_ctrl_cmd_is_null(defn))
  ------------------
  |  Branch (41:9): [True: 0, False: 3.62k]
  ------------------
   42|       |        /* The given name wasn't found */
   43|      0|        return -1;
   44|  3.62k|    return idx;
   45|  3.62k|}
eng_ctrl.c:int_ctrl_cmd_by_num:
   48|  7.24k|{
   49|  7.24k|    int idx = 0;
   50|       |    /*
   51|       |     * NB: It is stipulated that 'cmd_defn' lists are ordered by cmd_num. So
   52|       |     * our searches don't need to take any longer than necessary.
   53|       |     */
   54|  36.2k|    while (!int_ctrl_cmd_is_null(defn) && (defn->cmd_num < num)) {
  ------------------
  |  Branch (54:12): [True: 36.2k, False: 0]
  |  Branch (54:43): [True: 28.9k, False: 7.24k]
  ------------------
   55|  28.9k|        idx++;
   56|  28.9k|        defn++;
   57|  28.9k|    }
   58|  7.24k|    if (defn->cmd_num == num)
  ------------------
  |  Branch (58:9): [True: 7.24k, False: 0]
  ------------------
   59|  7.24k|        return idx;
   60|       |    /* The given cmd_num wasn't found */
   61|      0|    return -1;
   62|  7.24k|}

engine_load_dynamic_int:
  251|      1|{
  252|      1|    ENGINE *toadd = engine_dynamic();
  253|      1|    if (!toadd)
  ------------------
  |  Branch (253:9): [True: 0, False: 1]
  ------------------
  254|      0|        return;
  255|       |
  256|      1|    ERR_set_mark();
  257|      1|    ENGINE_add(toadd);
  258|       |    /*
  259|       |     * If the "add" worked, it gets a structural reference. So either way, we
  260|       |     * release our just-created reference.
  261|       |     */
  262|      1|    ENGINE_free(toadd);
  263|       |    /*
  264|       |     * If the "add" didn't work, it was probably a conflict because it was
  265|       |     * already added (eg. someone calling ENGINE_load_blah then calling
  266|       |     * ENGINE_load_builtin_engines() perhaps).
  267|       |     */
  268|      1|    ERR_pop_to_mark();
  269|      1|}
eng_dyn.c:engine_dynamic:
  239|      1|{
  240|      1|    ENGINE *ret = ENGINE_new();
  241|      1|    if (ret == NULL)
  ------------------
  |  Branch (241:9): [True: 0, False: 1]
  ------------------
  242|      0|        return NULL;
  243|      1|    if (!ENGINE_set_id(ret, engine_dynamic_id) || !ENGINE_set_name(ret, engine_dynamic_name) || !ENGINE_set_init_function(ret, dynamic_init) || !ENGINE_set_finish_function(ret, dynamic_finish) || !ENGINE_set_ctrl_function(ret, dynamic_ctrl) || !ENGINE_set_flags(ret, ENGINE_FLAGS_BY_ID_COPY) || !ENGINE_set_cmd_defns(ret, dynamic_cmd_defns)) {
  ------------------
  |  |   88|      1|#define ENGINE_FLAGS_BY_ID_COPY (int)0x0004
  ------------------
  |  Branch (243:9): [True: 0, False: 1]
  |  Branch (243:51): [True: 0, False: 1]
  |  Branch (243:97): [True: 0, False: 1]
  |  Branch (243:145): [True: 0, False: 1]
  |  Branch (243:197): [True: 0, False: 1]
  |  Branch (243:245): [True: 0, False: 1]
  |  Branch (243:296): [True: 0, False: 1]
  ------------------
  244|      0|        ENGINE_free(ret);
  245|      0|        return NULL;
  246|      0|    }
  247|      1|    return ret;
  248|      1|}
eng_dyn.c:dynamic_init:
  272|      1|{
  273|       |    /*
  274|       |     * We always return failure - the "dynamic" engine itself can't be used
  275|       |     * for anything.
  276|       |     */
  277|      1|    return 0;
  278|      1|}
eng_dyn.c:dynamic_ctrl:
  290|  3.62k|{
  291|  3.62k|    dynamic_data_ctx *ctx = dynamic_get_data_ctx(e);
  292|  3.62k|    int initialised;
  293|       |
  294|  3.62k|    if (!ctx) {
  ------------------
  |  Branch (294:9): [True: 0, False: 3.62k]
  ------------------
  295|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NOT_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  296|      0|        return 0;
  297|      0|    }
  298|  3.62k|    initialised = ((ctx->dynamic_dso == NULL) ? 0 : 1);
  ------------------
  |  Branch (298:20): [True: 3.62k, False: 0]
  ------------------
  299|       |    /* All our control commands require the ENGINE to be uninitialised */
  300|  3.62k|    if (initialised) {
  ------------------
  |  Branch (300:9): [True: 0, False: 3.62k]
  ------------------
  301|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ALREADY_LOADED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  302|      0|        return 0;
  303|      0|    }
  304|  3.62k|    switch (cmd) {
  305|      0|    case DYNAMIC_CMD_SO_PATH:
  ------------------
  |  |   33|      0|#define DYNAMIC_CMD_SO_PATH ENGINE_CMD_BASE
  |  |  ------------------
  |  |  |  |  224|      0|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (305:5): [True: 0, False: 3.62k]
  ------------------
  306|       |        /* a NULL 'p' or a string of zero-length is the same thing */
  307|      0|        if (p && (strlen((const char *)p) < 1))
  ------------------
  |  Branch (307:13): [True: 0, False: 0]
  |  Branch (307:18): [True: 0, False: 0]
  ------------------
  308|      0|            p = NULL;
  309|      0|        OPENSSL_free(ctx->DYNAMIC_LIBNAME);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  310|      0|        if (p)
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            ctx->DYNAMIC_LIBNAME = OPENSSL_strdup(p);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  312|      0|        else
  313|      0|            ctx->DYNAMIC_LIBNAME = NULL;
  314|      0|        return (ctx->DYNAMIC_LIBNAME ? 1 : 0);
  ------------------
  |  Branch (314:17): [True: 0, False: 0]
  ------------------
  315|      0|    case DYNAMIC_CMD_NO_VCHECK:
  ------------------
  |  |   34|      0|#define DYNAMIC_CMD_NO_VCHECK (ENGINE_CMD_BASE + 1)
  |  |  ------------------
  |  |  |  |  224|      0|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (315:5): [True: 0, False: 3.62k]
  ------------------
  316|      0|        ctx->no_vcheck = ((i == 0) ? 0 : 1);
  ------------------
  |  Branch (316:27): [True: 0, False: 0]
  ------------------
  317|      0|        return 1;
  318|    724|    case DYNAMIC_CMD_ID:
  ------------------
  |  |   35|    724|#define DYNAMIC_CMD_ID (ENGINE_CMD_BASE + 2)
  |  |  ------------------
  |  |  |  |  224|    724|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (318:5): [True: 724, False: 2.89k]
  ------------------
  319|       |        /* a NULL 'p' or a string of zero-length is the same thing */
  320|    724|        if (p && (strlen((const char *)p) < 1))
  ------------------
  |  Branch (320:13): [True: 724, False: 0]
  |  Branch (320:18): [True: 0, False: 724]
  ------------------
  321|      0|            p = NULL;
  322|    724|        OPENSSL_free(ctx->engine_id);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  323|    724|        if (p)
  ------------------
  |  Branch (323:13): [True: 724, False: 0]
  ------------------
  324|    724|            ctx->engine_id = OPENSSL_strdup(p);
  ------------------
  |  |  135|    724|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  325|      0|        else
  326|      0|            ctx->engine_id = NULL;
  327|    724|        return (ctx->engine_id ? 1 : 0);
  ------------------
  |  Branch (327:17): [True: 724, False: 0]
  ------------------
  328|    724|    case DYNAMIC_CMD_LIST_ADD:
  ------------------
  |  |   36|    724|#define DYNAMIC_CMD_LIST_ADD (ENGINE_CMD_BASE + 3)
  |  |  ------------------
  |  |  |  |  224|    724|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (328:5): [True: 724, False: 2.89k]
  ------------------
  329|    724|        if ((i < 0) || (i > 2)) {
  ------------------
  |  Branch (329:13): [True: 0, False: 724]
  |  Branch (329:24): [True: 0, False: 724]
  ------------------
  330|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  331|      0|            return 0;
  332|      0|        }
  333|    724|        ctx->list_add_value = (int)i;
  334|    724|        return 1;
  335|    724|    case DYNAMIC_CMD_LOAD:
  ------------------
  |  |   39|    724|#define DYNAMIC_CMD_LOAD (ENGINE_CMD_BASE + 6)
  |  |  ------------------
  |  |  |  |  224|    724|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (335:5): [True: 724, False: 2.89k]
  ------------------
  336|    724|        return dynamic_load(e, ctx);
  337|    724|    case DYNAMIC_CMD_DIR_LOAD:
  ------------------
  |  |   37|    724|#define DYNAMIC_CMD_DIR_LOAD (ENGINE_CMD_BASE + 4)
  |  |  ------------------
  |  |  |  |  224|    724|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (337:5): [True: 724, False: 2.89k]
  ------------------
  338|    724|        if ((i < 0) || (i > 2)) {
  ------------------
  |  Branch (338:13): [True: 0, False: 724]
  |  Branch (338:24): [True: 0, False: 724]
  ------------------
  339|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|            return 0;
  341|      0|        }
  342|    724|        ctx->dir_load = (int)i;
  343|    724|        return 1;
  344|    724|    case DYNAMIC_CMD_DIR_ADD:
  ------------------
  |  |   38|    724|#define DYNAMIC_CMD_DIR_ADD (ENGINE_CMD_BASE + 5)
  |  |  ------------------
  |  |  |  |  224|    724|#define ENGINE_CMD_BASE 200
  |  |  ------------------
  ------------------
  |  Branch (344:5): [True: 724, False: 2.89k]
  ------------------
  345|       |        /* a NULL 'p' or a string of zero-length is the same thing */
  346|    724|        if (p == NULL || (strlen((const char *)p) < 1)) {
  ------------------
  |  Branch (346:13): [True: 0, False: 724]
  |  Branch (346:26): [True: 0, False: 724]
  ------------------
  347|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|            return 0;
  349|      0|        }
  350|    724|        {
  351|    724|            char *tmp_str = OPENSSL_strdup(p);
  ------------------
  |  |  135|    724|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  352|    724|            if (tmp_str == NULL)
  ------------------
  |  Branch (352:17): [True: 0, False: 724]
  ------------------
  353|      0|                return 0;
  354|    724|            if (!sk_OPENSSL_STRING_push(ctx->dirs, tmp_str)) {
  ------------------
  |  |  242|    724|#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
  ------------------
  |  Branch (354:17): [True: 0, False: 724]
  ------------------
  355|      0|                OPENSSL_free(tmp_str);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|      0|                ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  357|      0|                return 0;
  358|      0|            }
  359|    724|        }
  360|    724|        return 1;
  361|      0|    default:
  ------------------
  |  Branch (361:5): [True: 0, False: 3.62k]
  ------------------
  362|      0|        break;
  363|  3.62k|    }
  364|  3.62k|    ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  365|      0|    return 0;
  366|  3.62k|}
eng_dyn.c:dynamic_get_data_ctx:
  202|  3.62k|{
  203|  3.62k|    dynamic_data_ctx *ctx;
  204|  3.62k|    if (dynamic_ex_data_idx < 0) {
  ------------------
  |  Branch (204:9): [True: 1, False: 3.61k]
  ------------------
  205|       |        /*
  206|       |         * Create and register the ENGINE ex_data, and associate our "free"
  207|       |         * function with it to ensure any allocated contexts get freed when
  208|       |         * an ENGINE goes underground.
  209|       |         */
  210|      1|        int new_idx = ENGINE_get_ex_new_index(0, NULL, NULL, NULL,
  ------------------
  |  |  531|      1|    CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, l, p, newf, dupf, freef)
  |  |  ------------------
  |  |  |  |  260|      1|#define CRYPTO_EX_INDEX_ENGINE 10
  |  |  ------------------
  ------------------
  211|      1|            dynamic_data_ctx_free_func);
  212|      1|        if (new_idx == -1) {
  ------------------
  |  Branch (212:13): [True: 0, False: 1]
  ------------------
  213|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_NO_INDEX);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|            return NULL;
  215|      0|        }
  216|      1|        if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (216:13): [True: 0, False: 1]
  ------------------
  217|      0|            return NULL;
  218|       |        /* Avoid a race by checking again inside this lock */
  219|      1|        if (dynamic_ex_data_idx < 0) {
  ------------------
  |  Branch (219:13): [True: 1, False: 0]
  ------------------
  220|       |            /* Good, someone didn't beat us to it */
  221|      1|            dynamic_ex_data_idx = new_idx;
  222|      1|            new_idx = -1;
  223|      1|        }
  224|      1|        CRYPTO_THREAD_unlock(global_engine_lock);
  225|       |        /*
  226|       |         * In theory we could "give back" the index here if (new_idx>-1), but
  227|       |         * it's not possible and wouldn't gain us much if it were.
  228|       |         */
  229|      1|    }
  230|  3.62k|    ctx = (dynamic_data_ctx *)ENGINE_get_ex_data(e, dynamic_ex_data_idx);
  231|       |    /* Check if the context needs to be created */
  232|  3.62k|    if ((ctx == NULL) && !dynamic_set_data_ctx(e, &ctx))
  ------------------
  |  Branch (232:9): [True: 724, False: 2.89k]
  |  Branch (232:26): [True: 0, False: 724]
  ------------------
  233|       |        /* "set_data" will set errors if necessary */
  234|      0|        return NULL;
  235|  3.62k|    return ctx;
  236|  3.62k|}
eng_dyn.c:dynamic_data_ctx_free_func:
  140|    728|{
  141|    728|    if (ptr) {
  ------------------
  |  Branch (141:9): [True: 724, False: 4]
  ------------------
  142|    724|        dynamic_data_ctx *ctx = (dynamic_data_ctx *)ptr;
  143|    724|        DSO_free(ctx->dynamic_dso);
  144|    724|        OPENSSL_free(ctx->DYNAMIC_LIBNAME);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  145|    724|        OPENSSL_free(ctx->engine_id);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  146|    724|        sk_OPENSSL_STRING_pop_free(ctx->dirs, int_free_str);
  ------------------
  |  |  246|    724|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
  147|    724|        OPENSSL_free(ctx);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|    724|    }
  149|    728|}
eng_dyn.c:int_free_str:
  124|    724|{
  125|    724|    OPENSSL_free(s);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  126|    724|}
eng_dyn.c:dynamic_set_data_ctx:
  158|    724|{
  159|    724|    dynamic_data_ctx *c = OPENSSL_zalloc(sizeof(*c));
  ------------------
  |  |  108|    724|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|    724|    int ret = 0;
  161|       |
  162|    724|    if (c == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 724]
  ------------------
  163|      0|        return 0;
  164|    724|    c->dirs = sk_OPENSSL_STRING_new_null();
  ------------------
  |  |  235|    724|#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_null())
  ------------------
  165|    724|    if (c->dirs == NULL) {
  ------------------
  |  Branch (165:9): [True: 0, False: 724]
  ------------------
  166|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|        goto end;
  168|      0|    }
  169|    724|    c->DYNAMIC_F1 = "v_check";
  170|    724|    c->DYNAMIC_F2 = "bind_engine";
  171|    724|    c->dir_load = 1;
  172|    724|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (172:9): [True: 0, False: 724]
  ------------------
  173|      0|        goto end;
  174|    724|    if ((*ctx = (dynamic_data_ctx *)ENGINE_get_ex_data(e,
  ------------------
  |  Branch (174:9): [True: 724, False: 0]
  ------------------
  175|    724|             dynamic_ex_data_idx))
  176|    724|        == NULL) {
  177|       |        /* Good, we're the first */
  178|    724|        ret = ENGINE_set_ex_data(e, dynamic_ex_data_idx, c);
  179|    724|        if (ret) {
  ------------------
  |  Branch (179:13): [True: 724, False: 0]
  ------------------
  180|    724|            *ctx = c;
  181|    724|            c = NULL;
  182|    724|        }
  183|    724|    }
  184|    724|    CRYPTO_THREAD_unlock(global_engine_lock);
  185|    724|    ret = 1;
  186|       |    /*
  187|       |     * If we lost the race to set the context, c is non-NULL and *ctx is the
  188|       |     * context of the thread that won.
  189|       |     */
  190|    724|end:
  191|    724|    if (c != NULL)
  ------------------
  |  Branch (191:9): [True: 0, False: 724]
  ------------------
  192|      0|        sk_OPENSSL_STRING_free(c->dirs);
  ------------------
  |  |  238|      0|#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
  ------------------
  193|    724|    OPENSSL_free(c);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  194|    724|    return ret;
  195|    724|}
eng_dyn.c:dynamic_load:
  413|    724|{
  414|    724|    ENGINE cpy;
  415|    724|    dynamic_fns fns;
  416|       |
  417|    724|    if (ctx->dynamic_dso == NULL)
  ------------------
  |  Branch (417:9): [True: 724, False: 0]
  ------------------
  418|    724|        ctx->dynamic_dso = DSO_new();
  419|    724|    if (ctx->dynamic_dso == NULL)
  ------------------
  |  Branch (419:9): [True: 0, False: 724]
  ------------------
  420|      0|        return 0;
  421|    724|    if (!ctx->DYNAMIC_LIBNAME) {
  ------------------
  |  Branch (421:9): [True: 724, False: 0]
  ------------------
  422|    724|        if (!ctx->engine_id)
  ------------------
  |  Branch (422:13): [True: 0, False: 724]
  ------------------
  423|      0|            return 0;
  424|    724|        DSO_ctrl(ctx->dynamic_dso, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|    724|#define DSO_CTRL_SET_FLAGS 2
  ------------------
  425|    724|            DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|    724|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
  426|    724|        ctx->DYNAMIC_LIBNAME = DSO_convert_filename(ctx->dynamic_dso, ctx->engine_id);
  427|    724|    }
  428|    724|    if (!int_load(ctx)) {
  ------------------
  |  Branch (428:9): [True: 724, False: 0]
  ------------------
  429|    724|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_DSO_NOT_FOUND);
  ------------------
  |  |  404|    724|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    724|    (ERR_new(),                                                  \
  |  |  |  |  407|    724|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    724|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    724|        ERR_set_error)
  |  |  ------------------
  ------------------
  430|    724|        DSO_free(ctx->dynamic_dso);
  431|    724|        ctx->dynamic_dso = NULL;
  432|    724|        return 0;
  433|    724|    }
  434|       |    /* We have to find a bind function otherwise it'll always end badly */
  435|      0|    if (!(ctx->bind_engine = (dynamic_bind_engine)DSO_bind_func(ctx->dynamic_dso,
  ------------------
  |  Branch (435:9): [True: 0, False: 0]
  ------------------
  436|      0|              ctx->DYNAMIC_F2))) {
  437|      0|        ctx->bind_engine = NULL;
  438|      0|        DSO_free(ctx->dynamic_dso);
  439|      0|        ctx->dynamic_dso = NULL;
  440|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_DSO_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  441|      0|        return 0;
  442|      0|    }
  443|       |    /* Do we perform version checking? */
  444|      0|    if (!ctx->no_vcheck) {
  ------------------
  |  Branch (444:9): [True: 0, False: 0]
  ------------------
  445|      0|        unsigned long vcheck_res = 0;
  446|       |        /*
  447|       |         * Now we try to find a version checking function and decide how to
  448|       |         * cope with failure if/when it fails.
  449|       |         */
  450|      0|        ctx->v_check = (dynamic_v_check_fn)DSO_bind_func(ctx->dynamic_dso,
  451|      0|            ctx->DYNAMIC_F1);
  452|      0|        if (ctx->v_check)
  ------------------
  |  Branch (452:13): [True: 0, False: 0]
  ------------------
  453|      0|            vcheck_res = ctx->v_check(OSSL_DYNAMIC_VERSION);
  ------------------
  |  |  722|      0|#define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000
  ------------------
  454|       |        /*
  455|       |         * We fail if the version checker veto'd the load *or* if it is
  456|       |         * deferring to us (by returning its version) and we think it is too
  457|       |         * old. Also fail if this is engine for openssl 1.1.x.
  458|       |         */
  459|      0|        if (vcheck_res < OSSL_DYNAMIC_OLDEST || using_libcrypto_11(ctx)) {
  ------------------
  |  |  727|      0|#define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000
  ------------------
  |  Branch (459:13): [True: 0, False: 0]
  |  Branch (459:49): [True: 0, False: 0]
  ------------------
  460|       |            /* Fail */
  461|      0|            ctx->bind_engine = NULL;
  462|      0|            ctx->v_check = NULL;
  463|      0|            DSO_free(ctx->dynamic_dso);
  464|      0|            ctx->dynamic_dso = NULL;
  465|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_VERSION_INCOMPATIBILITY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  466|      0|            return 0;
  467|      0|        }
  468|      0|    }
  469|       |    /*
  470|       |     * First binary copy the ENGINE structure so that we can roll back if the
  471|       |     * hand-over fails
  472|       |     */
  473|      0|    memcpy(&cpy, e, sizeof(ENGINE));
  474|       |    /*
  475|       |     * Provide the ERR, "ex_data", memory, and locking callbacks so the
  476|       |     * loaded library uses our state rather than its own. FIXME: As noted in
  477|       |     * engine.h, much of this would be simplified if each area of code
  478|       |     * provided its own "summary" structure of all related callbacks. It
  479|       |     * would also increase opaqueness.
  480|       |     */
  481|      0|    fns.static_state = ENGINE_get_static_state();
  482|      0|    CRYPTO_get_mem_functions(&fns.mem_fns.malloc_fn, &fns.mem_fns.realloc_fn,
  483|      0|        &fns.mem_fns.free_fn);
  484|       |    /*
  485|       |     * Now that we've loaded the dynamic engine, make sure no "dynamic"
  486|       |     * ENGINE elements will show through.
  487|       |     */
  488|      0|    engine_set_all_null(e);
  489|       |
  490|       |    /* Try to bind the ENGINE onto our own ENGINE structure */
  491|      0|    if (!engine_add_dynamic_id(e, (ENGINE_DYNAMIC_ID)ctx->bind_engine, 1)
  ------------------
  |  Branch (491:9): [True: 0, False: 0]
  ------------------
  492|      0|        || !ctx->bind_engine(e, ctx->engine_id, &fns)) {
  ------------------
  |  Branch (492:12): [True: 0, False: 0]
  ------------------
  493|      0|        engine_remove_dynamic_id(e, 1);
  494|      0|        ctx->bind_engine = NULL;
  495|      0|        ctx->v_check = NULL;
  496|      0|        DSO_free(ctx->dynamic_dso);
  497|      0|        ctx->dynamic_dso = NULL;
  498|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INIT_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|       |        /* Copy the original ENGINE structure back */
  500|      0|        memcpy(e, &cpy, sizeof(ENGINE));
  501|      0|        return 0;
  502|      0|    }
  503|       |    /* Do we try to add this ENGINE to the internal list too? */
  504|      0|    if (ctx->list_add_value > 0) {
  ------------------
  |  Branch (504:9): [True: 0, False: 0]
  ------------------
  505|      0|        if (!ENGINE_add(e)) {
  ------------------
  |  Branch (505:13): [True: 0, False: 0]
  ------------------
  506|       |            /* Do we tolerate this or fail? */
  507|      0|            if (ctx->list_add_value > 1) {
  ------------------
  |  Branch (507:17): [True: 0, False: 0]
  ------------------
  508|       |                /*
  509|       |                 * Fail - NB: By this time, it's too late to rollback, and
  510|       |                 * trying to do so allows the bind_engine() code to have
  511|       |                 * created leaks. We just have to fail where we are, after
  512|       |                 * the ENGINE has changed.
  513|       |                 */
  514|      0|                ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CONFLICTING_ENGINE_ID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  515|      0|                return 0;
  516|      0|            }
  517|       |            /* Tolerate */
  518|      0|            ERR_clear_error();
  519|      0|        }
  520|      0|    }
  521|      0|    return 1;
  522|      0|}
eng_dyn.c:int_load:
  369|    724|{
  370|    724|    int num, loop;
  371|       |    /* Unless told not to, try a direct load */
  372|    724|    if ((ctx->dir_load != 2) && (DSO_load(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL)
  ------------------
  |  Branch (372:9): [True: 0, False: 724]
  |  Branch (372:33): [True: 0, False: 0]
  ------------------
  373|      0|        return 1;
  374|       |    /* If we're not allowed to use 'dirs' or we have none, fail */
  375|    724|    if (!ctx->dir_load || (num = sk_OPENSSL_STRING_num(ctx->dirs)) < 1)
  ------------------
  |  |  232|    724|#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
  ------------------
  |  Branch (375:9): [True: 0, False: 724]
  |  Branch (375:27): [True: 0, False: 724]
  ------------------
  376|      0|        return 0;
  377|  1.44k|    for (loop = 0; loop < num; loop++) {
  ------------------
  |  Branch (377:20): [True: 724, False: 724]
  ------------------
  378|    724|        const char *s = sk_OPENSSL_STRING_value(ctx->dirs, loop);
  ------------------
  |  |  233|    724|#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
  ------------------
  379|    724|        char *merge = DSO_merge(ctx->dynamic_dso, ctx->DYNAMIC_LIBNAME, s);
  380|    724|        if (!merge)
  ------------------
  |  Branch (380:13): [True: 0, False: 724]
  ------------------
  381|      0|            return 0;
  382|    724|        if (DSO_load(ctx->dynamic_dso, merge, NULL, 0)) {
  ------------------
  |  Branch (382:13): [True: 0, False: 724]
  ------------------
  383|       |            /* Found what we're looking for */
  384|      0|            OPENSSL_free(merge);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  385|      0|            return 1;
  386|      0|        }
  387|    724|        OPENSSL_free(merge);
  ------------------
  |  |  131|    724|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  388|    724|    }
  389|    724|    return 0;
  390|    724|}

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

ENGINE_set_default:
   18|      2|{
   19|      2|    if ((flags & ENGINE_METHOD_CIPHERS) && !ENGINE_set_default_ciphers(e))
  ------------------
  |  |   49|      2|#define ENGINE_METHOD_CIPHERS (unsigned int)0x0040
  ------------------
  |  Branch (19:9): [True: 2, False: 0]
  |  Branch (19:44): [True: 0, False: 2]
  ------------------
   20|      0|        return 0;
   21|      2|    if ((flags & ENGINE_METHOD_DIGESTS) && !ENGINE_set_default_digests(e))
  ------------------
  |  |   50|      2|#define ENGINE_METHOD_DIGESTS (unsigned int)0x0080
  ------------------
  |  Branch (21:9): [True: 2, False: 0]
  |  Branch (21:44): [True: 0, False: 2]
  ------------------
   22|      0|        return 0;
   23|      2|    if ((flags & ENGINE_METHOD_RSA) && !ENGINE_set_default_RSA(e))
  ------------------
  |  |   45|      2|#define ENGINE_METHOD_RSA (unsigned int)0x0001
  ------------------
  |  Branch (23:9): [True: 2, False: 0]
  |  Branch (23:40): [True: 0, False: 2]
  ------------------
   24|      0|        return 0;
   25|      2|#ifndef OPENSSL_NO_DSA
   26|      2|    if ((flags & ENGINE_METHOD_DSA) && !ENGINE_set_default_DSA(e))
  ------------------
  |  |   46|      2|#define ENGINE_METHOD_DSA (unsigned int)0x0002
  ------------------
  |  Branch (26:9): [True: 2, False: 0]
  |  Branch (26:40): [True: 0, False: 2]
  ------------------
   27|      0|        return 0;
   28|      2|#endif
   29|      2|#ifndef OPENSSL_NO_DH
   30|      2|    if ((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e))
  ------------------
  |  |   47|      2|#define ENGINE_METHOD_DH (unsigned int)0x0004
  ------------------
  |  Branch (30:9): [True: 2, False: 0]
  |  Branch (30:39): [True: 0, False: 2]
  ------------------
   31|      0|        return 0;
   32|      2|#endif
   33|      2|#ifndef OPENSSL_NO_EC
   34|      2|    if ((flags & ENGINE_METHOD_EC) && !ENGINE_set_default_EC(e))
  ------------------
  |  |   53|      2|#define ENGINE_METHOD_EC (unsigned int)0x0800
  ------------------
  |  Branch (34:9): [True: 2, False: 0]
  |  Branch (34:39): [True: 0, False: 2]
  ------------------
   35|      0|        return 0;
   36|      2|#endif
   37|      2|    if ((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e))
  ------------------
  |  |   48|      2|#define ENGINE_METHOD_RAND (unsigned int)0x0008
  ------------------
  |  Branch (37:9): [True: 2, False: 0]
  |  Branch (37:41): [True: 0, False: 2]
  ------------------
   38|      0|        return 0;
   39|      2|    if ((flags & ENGINE_METHOD_PKEY_METHS)
  ------------------
  |  |   51|      2|#define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200
  ------------------
  |  Branch (39:9): [True: 2, False: 0]
  ------------------
   40|      2|        && !ENGINE_set_default_pkey_meths(e))
  ------------------
  |  Branch (40:12): [True: 0, False: 2]
  ------------------
   41|      0|        return 0;
   42|      2|    if ((flags & ENGINE_METHOD_PKEY_ASN1_METHS)
  ------------------
  |  |   52|      2|#define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400
  ------------------
  |  Branch (42:9): [True: 2, False: 0]
  ------------------
   43|      2|        && !ENGINE_set_default_pkey_asn1_meths(e))
  ------------------
  |  Branch (43:12): [True: 0, False: 2]
  ------------------
   44|      0|        return 0;
   45|      2|    return 1;
   46|      2|}
ENGINE_register_complete:
   94|      2|{
   95|      2|    ENGINE_register_ciphers(e);
   96|      2|    ENGINE_register_digests(e);
   97|      2|    ENGINE_register_RSA(e);
   98|      2|#ifndef OPENSSL_NO_DSA
   99|      2|    ENGINE_register_DSA(e);
  100|      2|#endif
  101|      2|#ifndef OPENSSL_NO_DH
  102|      2|    ENGINE_register_DH(e);
  103|      2|#endif
  104|      2|#ifndef OPENSSL_NO_EC
  105|      2|    ENGINE_register_EC(e);
  106|      2|#endif
  107|      2|    ENGINE_register_RAND(e);
  108|      2|    ENGINE_register_pkey_meths(e);
  109|      2|    ENGINE_register_pkey_asn1_meths(e);
  110|      2|    return 1;
  111|      2|}
ENGINE_register_all_complete:
  114|      1|{
  115|      1|    ENGINE *e;
  116|       |
  117|      4|    for (e = ENGINE_get_first(); e; e = ENGINE_get_next(e))
  ------------------
  |  Branch (117:34): [True: 3, False: 1]
  ------------------
  118|      3|        if (!(e->flags & ENGINE_FLAGS_NO_REGISTER_ALL))
  ------------------
  |  |   96|      3|#define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008
  ------------------
  |  Branch (118:13): [True: 2, False: 1]
  ------------------
  119|      2|            ENGINE_register_complete(e);
  120|      1|    return 1;
  121|      1|}

engine_unlocked_init:
   21|     10|{
   22|     10|    int to_return = 1;
   23|       |
   24|     10|    if ((e->funct_ref == 0) && e->init)
  ------------------
  |  Branch (24:9): [True: 7, False: 3]
  |  Branch (24:32): [True: 7, False: 0]
  ------------------
   25|       |        /*
   26|       |         * This is the first functional reference and the engine requires
   27|       |         * initialisation so we do it now.
   28|       |         */
   29|      7|        to_return = e->init(e);
   30|     10|    if (to_return) {
  ------------------
  |  Branch (30:9): [True: 5, False: 5]
  ------------------
   31|      5|        int ref;
   32|       |
   33|       |        /*
   34|       |         * OK, we return a functional reference which is also a structural
   35|       |         * reference.
   36|       |         */
   37|      5|        if (!CRYPTO_UP_REF(&e->struct_ref, &ref)) {
  ------------------
  |  Branch (37:13): [True: 0, False: 5]
  ------------------
   38|      0|            e->finish(e);
   39|      0|            return 0;
   40|      0|        }
   41|      5|        e->funct_ref++;
   42|      5|        ENGINE_REF_PRINT(e, 0, 1);
  ------------------
  |  |   29|      5|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      5|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      5|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      5|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      5|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      5|        ((isfunct)                                        \
  |  |   33|      5|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      5|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      5|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      5|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   43|      5|        ENGINE_REF_PRINT(e, 1, 1);
  ------------------
  |  |   29|      5|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      5|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      5|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      5|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      5|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      5|        ((isfunct)                                        \
  |  |   33|      5|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      5|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      5|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      5|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   44|      5|    }
   45|     10|    return to_return;
   46|     10|}
engine_unlocked_finish:
   53|      5|{
   54|      5|    int to_return = 1;
   55|       |
   56|       |    /*
   57|       |     * Reduce the functional reference count here so if it's the terminating
   58|       |     * case, we can release the lock safely and call the finish() handler
   59|       |     * without risk of a race. We get a race if we leave the count until
   60|       |     * after and something else is calling "finish" at the same time -
   61|       |     * there's a chance that both threads will together take the count from 2
   62|       |     * to 0 without either calling finish().
   63|       |     */
   64|      5|    e->funct_ref--;
   65|      5|    ENGINE_REF_PRINT(e, 1, -1);
  ------------------
  |  |   29|      5|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      5|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      5|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      5|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      5|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      5|        ((isfunct)                                        \
  |  |   33|      5|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      5|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      5|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      5|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   66|      5|    if ((e->funct_ref == 0) && e->finish) {
  ------------------
  |  Branch (66:9): [True: 2, False: 3]
  |  Branch (66:32): [True: 0, False: 2]
  ------------------
   67|      0|        if (unlock_for_handlers)
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
   69|      0|        to_return = e->finish(e);
   70|      0|        if (unlock_for_handlers)
  ------------------
  |  Branch (70:13): [True: 0, False: 0]
  ------------------
   71|      0|            if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (71:17): [True: 0, False: 0]
  ------------------
   72|      0|                return 0;
   73|      0|        if (!to_return)
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            return 0;
   75|      0|    }
   76|      5|    REF_ASSERT_ISNT(e->funct_ref < 0);
  ------------------
  |  |  293|      5|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 5]
  |  |  ------------------
  ------------------
   77|       |    /* Release the structural reference too */
   78|      5|    if (!engine_free_util(e, 0)) {
  ------------------
  |  Branch (78:9): [True: 0, False: 5]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FINISH_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        return 0;
   81|      0|    }
   82|      5|    return to_return;
   83|      5|}
ENGINE_init:
   87|      8|{
   88|      8|    int ret;
   89|      8|    if (e == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 8]
  ------------------
   90|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   91|      0|        return 0;
   92|      0|    }
   93|      8|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|      8|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (93:9): [True: 0, False: 8]
  ------------------
   94|       |        /* Maybe this should be raised in do_engine_lock_init() */
   95|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   96|      0|        return 0;
   97|      0|    }
   98|      8|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (98:9): [True: 0, False: 8]
  ------------------
   99|      0|        return 0;
  100|      8|    ret = engine_unlocked_init(e);
  101|      8|    CRYPTO_THREAD_unlock(global_engine_lock);
  102|      8|    return ret;
  103|      8|}
ENGINE_finish:
  107|  3.40M|{
  108|  3.40M|    int to_return = 1;
  109|       |
  110|  3.40M|    if (e == NULL)
  ------------------
  |  Branch (110:9): [True: 3.40M, False: 3]
  ------------------
  111|  3.40M|        return 1;
  112|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (112:9): [True: 0, False: 3]
  ------------------
  113|      0|        return 0;
  114|      3|    to_return = engine_unlocked_finish(e, 1);
  115|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  116|      3|    if (!to_return) {
  ------------------
  |  Branch (116:9): [True: 0, False: 3]
  ------------------
  117|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FINISH_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  118|      0|        return 0;
  119|      0|    }
  120|      3|    return to_return;
  121|      3|}

ENGINE_new:
   28|    728|{
   29|    728|    ENGINE *ret;
   30|       |
   31|    728|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|    728|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 728, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (31:9): [True: 0, False: 728]
  ------------------
   32|       |        /* Maybe this should be raised in do_engine_lock_init() */
   33|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|      0|        return 0;
   35|      0|    }
   36|    728|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|    728|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (36:9): [True: 0, False: 728]
  ------------------
   37|      0|        return NULL;
   38|    728|    if (!CRYPTO_NEW_REF(&ret->struct_ref, 1)) {
  ------------------
  |  Branch (38:9): [True: 0, False: 728]
  ------------------
   39|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|      0|        return NULL;
   41|      0|    }
   42|    728|    ENGINE_REF_PRINT(ret, 0, 1);
  ------------------
  |  |   29|    728|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|    728|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|    728|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|    728|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|    728|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|    728|        ((isfunct)                                        \
  |  |   33|    728|                ? ((e)->funct_ref - (diff))               \
  |  |   34|    728|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|    728|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|    728|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   43|    728|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ENGINE, ret, &ret->ex_data)) {
  ------------------
  |  |  260|    728|#define CRYPTO_EX_INDEX_ENGINE 10
  ------------------
  |  Branch (43:9): [True: 0, False: 728]
  ------------------
   44|      0|        CRYPTO_FREE_REF(&ret->struct_ref);
   45|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   46|      0|        return NULL;
   47|      0|    }
   48|    728|    return ret;
   49|    728|}
engine_free_util:
   78|    746|{
   79|    746|    int i;
   80|       |
   81|    746|    if (e == NULL)
  ------------------
  |  Branch (81:9): [True: 0, False: 746]
  ------------------
   82|      0|        return 1;
   83|    746|    CRYPTO_DOWN_REF(&e->struct_ref, &i);
   84|    746|    ENGINE_REF_PRINT(e, 0, -1);
  ------------------
  |  |   29|    746|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|    746|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|    746|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|    746|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|    746|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|    746|        ((isfunct)                                        \
  |  |   33|    746|                ? ((e)->funct_ref - (diff))               \
  |  |   34|    746|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|    746|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|    746|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   85|    746|    if (i > 0)
  ------------------
  |  Branch (85:9): [True: 18, False: 728]
  ------------------
   86|     18|        return 1;
   87|    728|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|    728|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 728]
  |  |  ------------------
  ------------------
   88|       |    /* Free up any dynamically allocated public key methods */
   89|    728|    engine_pkey_meths_free(e);
   90|    728|    engine_pkey_asn1_meths_free(e);
   91|       |    /*
   92|       |     * Give the ENGINE a chance to do any structural cleanup corresponding to
   93|       |     * allocation it did in its constructor (eg. unload error strings)
   94|       |     */
   95|    728|    if (e->destroy)
  ------------------
  |  Branch (95:9): [True: 0, False: 728]
  ------------------
   96|      0|        e->destroy(e);
   97|    728|    engine_remove_dynamic_id(e, not_locked);
   98|    728|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ENGINE, e, &e->ex_data);
  ------------------
  |  |  260|    728|#define CRYPTO_EX_INDEX_ENGINE 10
  ------------------
   99|    728|    CRYPTO_FREE_REF(&e->struct_ref);
  100|    728|    OPENSSL_free(e);
  ------------------
  |  |  131|    728|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|    728|    return 1;
  102|    746|}
ENGINE_free:
  105|    738|{
  106|    738|    return engine_free_util(e, 1);
  107|    738|}
engine_cleanup_add_first:
  139|      1|{
  140|      1|    ENGINE_CLEANUP_ITEM *item;
  141|       |
  142|      1|    if (!int_cleanup_check(1))
  ------------------
  |  Branch (142:9): [True: 0, False: 1]
  ------------------
  143|      0|        return 0;
  144|      1|    item = int_cleanup_item(cb);
  145|      1|    if (item != NULL) {
  ------------------
  |  Branch (145:9): [True: 1, False: 0]
  ------------------
  146|      1|        if (sk_ENGINE_CLEANUP_ITEM_insert(cleanup_stack, item, 0))
  ------------------
  |  Branch (146:13): [True: 1, False: 0]
  ------------------
  147|      1|            return 1;
  148|      0|        OPENSSL_free(item);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  149|      0|    }
  150|      0|    return 0;
  151|      1|}
engine_cleanup_add_last:
  154|      1|{
  155|      1|    ENGINE_CLEANUP_ITEM *item;
  156|       |
  157|      1|    if (!int_cleanup_check(1))
  ------------------
  |  Branch (157:9): [True: 0, False: 1]
  ------------------
  158|      0|        return 0;
  159|      1|    item = int_cleanup_item(cb);
  160|      1|    if (item != NULL) {
  ------------------
  |  Branch (160:9): [True: 1, False: 0]
  ------------------
  161|      1|        if (sk_ENGINE_CLEANUP_ITEM_push(cleanup_stack, item) > 0)
  ------------------
  |  Branch (161:13): [True: 1, False: 0]
  ------------------
  162|      1|            return 1;
  163|      0|        OPENSSL_free(item);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  164|      0|    }
  165|      0|    return 0;
  166|      1|}
engine_cleanup_int:
  176|      1|{
  177|      1|    if (int_cleanup_check(0)) {
  ------------------
  |  Branch (177:9): [True: 1, False: 0]
  ------------------
  178|      1|        sk_ENGINE_CLEANUP_ITEM_pop_free(cleanup_stack,
  179|      1|            engine_cleanup_cb_free);
  180|      1|        cleanup_stack = NULL;
  181|      1|    }
  182|      1|    CRYPTO_THREAD_lock_free(global_engine_lock);
  183|       |    global_engine_lock = NULL;
  184|      1|}
ENGINE_set_ex_data:
  189|    724|{
  190|    724|    return CRYPTO_set_ex_data(&e->ex_data, idx, arg);
  191|    724|}
ENGINE_get_ex_data:
  194|  4.34k|{
  195|  4.34k|    return CRYPTO_get_ex_data(&e->ex_data, idx);
  196|  4.34k|}
ENGINE_set_id:
  204|      3|{
  205|      3|    if (id == NULL) {
  ------------------
  |  Branch (205:9): [True: 0, False: 3]
  ------------------
  206|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  207|      0|        return 0;
  208|      0|    }
  209|      3|    e->id = id;
  210|      3|    return 1;
  211|      3|}
ENGINE_set_name:
  214|      3|{
  215|      3|    if (name == NULL) {
  ------------------
  |  Branch (215:9): [True: 0, False: 3]
  ------------------
  216|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  217|      0|        return 0;
  218|      0|    }
  219|      3|    e->name = name;
  220|      3|    return 1;
  221|      3|}
ENGINE_set_init_function:
  230|      3|{
  231|      3|    e->init = init_f;
  232|      3|    return 1;
  233|      3|}
ENGINE_set_finish_function:
  236|      1|{
  237|      1|    e->finish = finish_f;
  238|      1|    return 1;
  239|      1|}
ENGINE_set_ctrl_function:
  242|      1|{
  243|      1|    e->ctrl = ctrl_f;
  244|      1|    return 1;
  245|      1|}
ENGINE_set_flags:
  248|      2|{
  249|      2|    e->flags = flags;
  250|      2|    return 1;
  251|      2|}
ENGINE_set_cmd_defns:
  254|      1|{
  255|      1|    e->cmd_defns = defns;
  256|      1|    return 1;
  257|      1|}
eng_lib.c:do_engine_lock_init:
   22|      1|{
   23|      1|    global_engine_lock = CRYPTO_THREAD_lock_new();
   24|       |    return global_engine_lock != NULL;
   25|      1|}
eng_lib.c:int_cleanup_check:
  119|      3|{
  120|      3|    if (cleanup_stack)
  ------------------
  |  Branch (120:9): [True: 2, False: 1]
  ------------------
  121|      2|        return 1;
  122|      1|    if (!create)
  ------------------
  |  Branch (122:9): [True: 0, False: 1]
  ------------------
  123|      0|        return 0;
  124|      1|    cleanup_stack = sk_ENGINE_CLEANUP_ITEM_new_null();
  125|      1|    return (cleanup_stack ? 1 : 0);
  ------------------
  |  Branch (125:13): [True: 1, False: 0]
  ------------------
  126|      1|}
eng_lib.c:int_cleanup_item:
  129|      2|{
  130|      2|    ENGINE_CLEANUP_ITEM *item;
  131|       |
  132|      2|    if ((item = OPENSSL_malloc(sizeof(*item))) == NULL)
  ------------------
  |  |  106|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (132:9): [True: 0, False: 2]
  ------------------
  133|      0|        return NULL;
  134|      2|    item->cb = cb;
  135|      2|    return item;
  136|      2|}
eng_lib.c:engine_cleanup_cb_free:
  170|      2|{
  171|      2|    (*(item->cb))();
  172|      2|    OPENSSL_free(item);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|      2|}

engine_add_dynamic_id:
  152|    725|{
  153|    725|    int result = 0;
  154|    725|    ENGINE *iterator = NULL;
  155|       |
  156|    725|    if (e == NULL)
  ------------------
  |  Branch (156:9): [True: 0, False: 725]
  ------------------
  157|      0|        return 0;
  158|       |
  159|    725|    if (e->dynamic_id == NULL && dynamic_id == NULL)
  ------------------
  |  Branch (159:9): [True: 725, False: 0]
  |  Branch (159:34): [True: 725, False: 0]
  ------------------
  160|    725|        return 0;
  161|       |
  162|      0|    if (not_locked && !CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 0]
  |  Branch (162:23): [True: 0, False: 0]
  ------------------
  163|      0|        return 0;
  164|       |
  165|      0|    if (dynamic_id != NULL) {
  ------------------
  |  Branch (165:9): [True: 0, False: 0]
  ------------------
  166|      0|        iterator = engine_dyn_list_head;
  167|      0|        while (iterator != NULL) {
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|      0|            if (iterator->dynamic_id == dynamic_id)
  ------------------
  |  Branch (168:17): [True: 0, False: 0]
  ------------------
  169|      0|                goto err;
  170|      0|            iterator = iterator->next;
  171|      0|        }
  172|      0|        if (e->dynamic_id != NULL)
  ------------------
  |  Branch (172:13): [True: 0, False: 0]
  ------------------
  173|      0|            goto err;
  174|      0|        e->dynamic_id = dynamic_id;
  175|      0|    }
  176|       |
  177|      0|    if (engine_dyn_list_head == NULL) {
  ------------------
  |  Branch (177:9): [True: 0, False: 0]
  ------------------
  178|       |        /* We are adding to an empty list. */
  179|      0|        if (engine_dyn_list_tail != NULL)
  ------------------
  |  Branch (179:13): [True: 0, False: 0]
  ------------------
  180|      0|            goto err;
  181|      0|        engine_dyn_list_head = e;
  182|      0|        e->prev_dyn = NULL;
  183|      0|    } else {
  184|       |        /* We are adding to the tail of an existing list. */
  185|      0|        if (engine_dyn_list_tail == NULL
  ------------------
  |  Branch (185:13): [True: 0, False: 0]
  ------------------
  186|      0|            || engine_dyn_list_tail->next_dyn != NULL)
  ------------------
  |  Branch (186:16): [True: 0, False: 0]
  ------------------
  187|      0|            goto err;
  188|      0|        engine_dyn_list_tail->next_dyn = e;
  189|      0|        e->prev_dyn = engine_dyn_list_tail;
  190|      0|    }
  191|       |
  192|      0|    engine_dyn_list_tail = e;
  193|      0|    e->next_dyn = NULL;
  194|      0|    result = 1;
  195|       |
  196|      0|err:
  197|      0|    if (not_locked)
  ------------------
  |  Branch (197:9): [True: 0, False: 0]
  ------------------
  198|      0|        CRYPTO_THREAD_unlock(global_engine_lock);
  199|      0|    return result;
  200|      0|}
engine_remove_dynamic_id:
  204|    728|{
  205|    728|    if (e == NULL || e->dynamic_id == NULL)
  ------------------
  |  Branch (205:9): [True: 0, False: 728]
  |  Branch (205:22): [True: 728, False: 0]
  ------------------
  206|    728|        return;
  207|       |
  208|      0|    if (not_locked && !CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (208:9): [True: 0, False: 0]
  |  Branch (208:23): [True: 0, False: 0]
  ------------------
  209|      0|        return;
  210|       |
  211|      0|    e->dynamic_id = NULL;
  212|       |
  213|       |    /* un-link e from the chain. */
  214|      0|    if (e->next_dyn != NULL)
  ------------------
  |  Branch (214:9): [True: 0, False: 0]
  ------------------
  215|      0|        e->next_dyn->prev_dyn = e->prev_dyn;
  216|      0|    if (e->prev_dyn != NULL)
  ------------------
  |  Branch (216:9): [True: 0, False: 0]
  ------------------
  217|      0|        e->prev_dyn->next_dyn = e->next_dyn;
  218|       |    /* Correct our head/tail if necessary. */
  219|      0|    if (engine_dyn_list_head == e)
  ------------------
  |  Branch (219:9): [True: 0, False: 0]
  ------------------
  220|      0|        engine_dyn_list_head = e->next_dyn;
  221|      0|    if (engine_dyn_list_tail == e)
  ------------------
  |  Branch (221:9): [True: 0, False: 0]
  ------------------
  222|      0|        engine_dyn_list_tail = e->prev_dyn;
  223|       |
  224|      0|    if (not_locked)
  ------------------
  |  Branch (224:9): [True: 0, False: 0]
  ------------------
  225|      0|        CRYPTO_THREAD_unlock(global_engine_lock);
  226|      0|}
ENGINE_get_first:
  230|      1|{
  231|      1|    ENGINE *ret;
  232|       |
  233|      1|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (233:9): [True: 0, False: 1]
  ------------------
  234|       |        /* Maybe this should be raised in do_engine_lock_init() */
  235|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  236|      0|        return NULL;
  237|      0|    }
  238|       |
  239|      1|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (239:9): [True: 0, False: 1]
  ------------------
  240|      0|        return NULL;
  241|      1|    ret = engine_list_head;
  242|      1|    if (ret) {
  ------------------
  |  Branch (242:9): [True: 1, False: 0]
  ------------------
  243|      1|        int ref;
  244|       |
  245|      1|        if (!CRYPTO_UP_REF(&ret->struct_ref, &ref)) {
  ------------------
  |  Branch (245:13): [True: 0, False: 1]
  ------------------
  246|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
  247|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  248|      0|            return NULL;
  249|      0|        }
  250|      1|        ENGINE_REF_PRINT(ret, 0, 1);
  ------------------
  |  |   29|      1|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      1|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      1|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      1|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      1|        ((isfunct)                                        \
  |  |   33|      1|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      1|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      1|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      1|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  251|      1|    }
  252|      1|    CRYPTO_THREAD_unlock(global_engine_lock);
  253|      1|    return ret;
  254|      1|}
ENGINE_get_next:
  285|      3|{
  286|      3|    ENGINE *ret = NULL;
  287|      3|    if (e == NULL) {
  ------------------
  |  Branch (287:9): [True: 0, False: 3]
  ------------------
  288|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  289|      0|        return NULL;
  290|      0|    }
  291|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (291:9): [True: 0, False: 3]
  ------------------
  292|      0|        return NULL;
  293|      3|    ret = e->next;
  294|      3|    if (ret) {
  ------------------
  |  Branch (294:9): [True: 2, False: 1]
  ------------------
  295|      2|        int ref;
  296|       |
  297|       |        /* Return a valid structural reference to the next ENGINE */
  298|      2|        if (!CRYPTO_UP_REF(&ret->struct_ref, &ref)) {
  ------------------
  |  Branch (298:13): [True: 0, False: 2]
  ------------------
  299|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
  300|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  301|      0|            return NULL;
  302|      0|        }
  303|      2|        ENGINE_REF_PRINT(ret, 0, 1);
  ------------------
  |  |   29|      2|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      2|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      2|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      2|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      2|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      2|        ((isfunct)                                        \
  |  |   33|      2|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      2|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      2|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      2|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  304|      2|    }
  305|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  306|       |    /* Release the structural reference to the previous ENGINE */
  307|      3|    ENGINE_free(e);
  308|      3|    return ret;
  309|      3|}
ENGINE_add:
  340|      3|{
  341|      3|    int to_return = 1;
  342|      3|    if (e == NULL) {
  ------------------
  |  Branch (342:9): [True: 0, False: 3]
  ------------------
  343|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  344|      0|        return 0;
  345|      0|    }
  346|      3|    if ((e->id == NULL) || (e->name == NULL)) {
  ------------------
  |  Branch (346:9): [True: 0, False: 3]
  |  Branch (346:28): [True: 0, False: 3]
  ------------------
  347|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ID_OR_NAME_MISSING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  348|      0|        return 0;
  349|      0|    }
  350|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (350:9): [True: 0, False: 3]
  ------------------
  351|      0|        return 0;
  352|      3|    if (!engine_list_add(e)) {
  ------------------
  |  Branch (352:9): [True: 0, False: 3]
  ------------------
  353|       |        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  354|      0|        to_return = 0;
  355|      0|    }
  356|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  357|      3|    return to_return;
  358|      3|}
ENGINE_remove:
  362|      3|{
  363|      3|    int to_return = 1;
  364|      3|    if (e == NULL) {
  ------------------
  |  Branch (364:9): [True: 0, False: 3]
  ------------------
  365|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  366|      0|        return 0;
  367|      0|    }
  368|      3|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (368:9): [True: 0, False: 3]
  ------------------
  369|      0|        return 0;
  370|      3|    if (!engine_list_remove(e)) {
  ------------------
  |  Branch (370:9): [True: 0, False: 3]
  ------------------
  371|       |        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        to_return = 0;
  373|      0|    }
  374|      3|    CRYPTO_THREAD_unlock(global_engine_lock);
  375|      3|    return to_return;
  376|      3|}
ENGINE_by_id:
  409|  1.45k|{
  410|  1.45k|    ENGINE *iterator;
  411|  1.45k|    const char *load_dir = NULL;
  412|  1.45k|    if (id == NULL) {
  ------------------
  |  Branch (412:9): [True: 0, False: 1.45k]
  ------------------
  413|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  414|      0|        return NULL;
  415|      0|    }
  416|  1.45k|    ENGINE_load_builtin_engines();
  417|       |
  418|  1.45k|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|  1.45k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.45k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (418:9): [True: 0, False: 1.45k]
  ------------------
  419|       |        /* Maybe this should be raised in do_engine_lock_init() */
  420|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  421|      0|        return NULL;
  422|      0|    }
  423|       |
  424|  1.45k|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (424:9): [True: 0, False: 1.45k]
  ------------------
  425|      0|        return NULL;
  426|  1.45k|    iterator = engine_list_head;
  427|  4.36k|    while (iterator && (strcmp(id, iterator->id) != 0))
  ------------------
  |  Branch (427:12): [True: 3.63k, False: 724]
  |  Branch (427:24): [True: 2.90k, False: 732]
  ------------------
  428|  2.90k|        iterator = iterator->next;
  429|  1.45k|    if (iterator != NULL) {
  ------------------
  |  Branch (429:9): [True: 732, False: 724]
  ------------------
  430|       |        /*
  431|       |         * We need to return a structural reference. If this is an ENGINE
  432|       |         * type that returns copies, make a duplicate - otherwise increment
  433|       |         * the existing ENGINE's reference count.
  434|       |         */
  435|    732|        if (iterator->flags & ENGINE_FLAGS_BY_ID_COPY) {
  ------------------
  |  |   88|    732|#define ENGINE_FLAGS_BY_ID_COPY (int)0x0004
  ------------------
  |  Branch (435:13): [True: 725, False: 7]
  ------------------
  436|    725|            ENGINE *cp = ENGINE_new();
  437|    725|            if (cp == NULL)
  ------------------
  |  Branch (437:17): [True: 0, False: 725]
  ------------------
  438|      0|                iterator = NULL;
  439|    725|            else {
  440|    725|                engine_cpy(cp, iterator);
  441|    725|                iterator = cp;
  442|    725|            }
  443|    725|        } else {
  444|      7|            int ref;
  445|       |
  446|      7|            if (!CRYPTO_UP_REF(&iterator->struct_ref, &ref)) {
  ------------------
  |  Branch (446:17): [True: 0, False: 7]
  ------------------
  447|      0|                CRYPTO_THREAD_unlock(global_engine_lock);
  448|      0|                ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  449|      0|                return NULL;
  450|      0|            }
  451|      7|            ENGINE_REF_PRINT(iterator, 0, 1);
  ------------------
  |  |   29|      7|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      7|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      7|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      7|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      7|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      7|        ((isfunct)                                        \
  |  |   33|      7|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      7|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      7|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      7|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  452|      7|        }
  453|    732|    }
  454|  1.45k|    CRYPTO_THREAD_unlock(global_engine_lock);
  455|  1.45k|    if (iterator != NULL)
  ------------------
  |  Branch (455:9): [True: 732, False: 724]
  ------------------
  456|    732|        return iterator;
  457|       |    /*
  458|       |     * Prevent infinite recursion if we're looking for the dynamic engine.
  459|       |     */
  460|    724|    if (strcmp(id, "dynamic")) {
  ------------------
  |  Branch (460:9): [True: 724, False: 0]
  ------------------
  461|    724|        if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == NULL)
  ------------------
  |  Branch (461:13): [True: 724, False: 0]
  ------------------
  462|    724|            load_dir = ossl_get_enginesdir();
  463|    724|        iterator = ENGINE_by_id("dynamic");
  464|    724|        if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || !ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) || !ENGINE_ctrl_cmd_string(iterator, "DIR_ADD", load_dir, 0) || !ENGINE_ctrl_cmd_string(iterator, "LIST_ADD", "1", 0) || !ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0))
  ------------------
  |  Branch (464:13): [True: 0, False: 724]
  |  Branch (464:26): [True: 0, False: 724]
  |  Branch (464:76): [True: 0, False: 724]
  |  Branch (464:133): [True: 0, False: 724]
  |  Branch (464:194): [True: 0, False: 724]
  |  Branch (464:251): [True: 724, False: 0]
  ------------------
  465|    724|            goto notfound;
  466|      0|        return iterator;
  467|    724|    }
  468|    724|notfound:
  469|    724|    ENGINE_free(iterator);
  470|    724|    ERR_raise_data(ERR_LIB_ENGINE, ENGINE_R_NO_SUCH_ENGINE, "id=%s", id);
  ------------------
  |  |  406|    724|    (ERR_new(),                                                  \
  |  |  407|    724|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    724|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    724|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_ENGINE, ENGINE_R_NO_SUCH_ENGINE, "id=%s", id);
  ------------------
  |  |  101|    724|#define ERR_LIB_ENGINE 38
  ------------------
                  ERR_raise_data(ERR_LIB_ENGINE, ENGINE_R_NO_SUCH_ENGINE, "id=%s", id);
  ------------------
  |  |   54|    724|#define ENGINE_R_NO_SUCH_ENGINE 116
  ------------------
  471|    724|    return NULL;
  472|       |    /* EEK! Experimental code ends */
  473|    724|}
eng_list.c:engine_list_add:
   58|      3|{
   59|      3|    int conflict = 0;
   60|      3|    ENGINE *iterator = NULL;
   61|      3|    int ref;
   62|       |
   63|      3|    if (e == NULL) {
  ------------------
  |  Branch (63:9): [True: 0, False: 3]
  ------------------
   64|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   65|      0|        return 0;
   66|      0|    }
   67|      3|    iterator = engine_list_head;
   68|      6|    while (iterator && !conflict) {
  ------------------
  |  Branch (68:12): [True: 3, False: 3]
  |  Branch (68:24): [True: 3, False: 0]
  ------------------
   69|      3|        conflict = (strcmp(iterator->id, e->id) == 0);
   70|      3|        iterator = iterator->next;
   71|      3|    }
   72|      3|    if (conflict) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3]
  ------------------
   73|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_CONFLICTING_ENGINE_ID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   74|      0|        return 0;
   75|      0|    }
   76|       |
   77|       |    /*
   78|       |     * Having the engine in the list assumes a structural reference.
   79|       |     */
   80|      3|    if (!CRYPTO_UP_REF(&e->struct_ref, &ref)) {
  ------------------
  |  Branch (80:9): [True: 0, False: 3]
  ------------------
   81|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   82|      0|        return 0;
   83|      0|    }
   84|      3|    ENGINE_REF_PRINT(e, 0, 1);
  ------------------
  |  |   29|      3|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      3|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      3|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      3|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      3|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      3|        ((isfunct)                                        \
  |  |   33|      3|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      3|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      3|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      3|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
   85|      3|    if (engine_list_head == NULL) {
  ------------------
  |  Branch (85:9): [True: 1, False: 2]
  ------------------
   86|       |        /* We are adding to an empty list. */
   87|      1|        if (engine_list_tail != NULL) {
  ------------------
  |  Branch (87:13): [True: 0, False: 1]
  ------------------
   88|      0|            CRYPTO_DOWN_REF(&e->struct_ref, &ref);
   89|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   90|      0|            return 0;
   91|      0|        }
   92|       |        /*
   93|       |         * The first time the list allocates, we should register the cleanup.
   94|       |         */
   95|      1|        if (!engine_cleanup_add_last(engine_list_cleanup)) {
  ------------------
  |  Branch (95:13): [True: 0, False: 1]
  ------------------
   96|      0|            CRYPTO_DOWN_REF(&e->struct_ref, &ref);
   97|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|            return 0;
   99|      0|        }
  100|      1|        engine_list_head = e;
  101|      1|        e->prev = NULL;
  102|      2|    } else {
  103|       |        /* We are adding to the tail of an existing list. */
  104|      2|        if ((engine_list_tail == NULL) || (engine_list_tail->next != NULL)) {
  ------------------
  |  Branch (104:13): [True: 0, False: 2]
  |  Branch (104:43): [True: 0, False: 2]
  ------------------
  105|      0|            CRYPTO_DOWN_REF(&e->struct_ref, &ref);
  106|      0|            ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INTERNAL_LIST_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|            return 0;
  108|      0|        }
  109|      2|        engine_list_tail->next = e;
  110|      2|        e->prev = engine_list_tail;
  111|      2|    }
  112|       |
  113|       |    /* However it came to be, e is the last item in the list. */
  114|      3|    engine_list_tail = e;
  115|       |    e->next = NULL;
  116|      3|    return 1;
  117|      3|}
eng_list.c:engine_list_cleanup:
   43|      1|{
   44|      1|    ENGINE *iterator = engine_list_head;
   45|       |
   46|      4|    while (iterator != NULL) {
  ------------------
  |  Branch (46:12): [True: 3, False: 1]
  ------------------
   47|      3|        ENGINE_remove(iterator);
   48|      3|        iterator = engine_list_head;
   49|      3|    }
   50|      1|    return;
   51|      1|}
eng_list.c:engine_list_remove:
  120|      3|{
  121|      3|    ENGINE *iterator;
  122|       |
  123|      3|    if (e == NULL) {
  ------------------
  |  Branch (123:9): [True: 0, False: 3]
  ------------------
  124|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  125|      0|        return 0;
  126|      0|    }
  127|       |    /* We need to check that e is in our linked list! */
  128|      3|    iterator = engine_list_head;
  129|      3|    while (iterator && (iterator != e))
  ------------------
  |  Branch (129:12): [True: 3, False: 0]
  |  Branch (129:24): [True: 0, False: 3]
  ------------------
  130|      0|        iterator = iterator->next;
  131|      3|    if (iterator == NULL) {
  ------------------
  |  Branch (131:9): [True: 0, False: 3]
  ------------------
  132|      0|        ERR_raise(ERR_LIB_ENGINE, ENGINE_R_ENGINE_IS_NOT_IN_LIST);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  133|      0|        return 0;
  134|      0|    }
  135|       |    /* un-link e from the chain. */
  136|      3|    if (e->next)
  ------------------
  |  Branch (136:9): [True: 2, False: 1]
  ------------------
  137|      2|        e->next->prev = e->prev;
  138|      3|    if (e->prev)
  ------------------
  |  Branch (138:9): [True: 0, False: 3]
  ------------------
  139|      0|        e->prev->next = e->next;
  140|       |    /* Correct our head/tail if necessary. */
  141|      3|    if (engine_list_head == e)
  ------------------
  |  Branch (141:9): [True: 3, False: 0]
  ------------------
  142|      3|        engine_list_head = e->next;
  143|      3|    if (engine_list_tail == e)
  ------------------
  |  Branch (143:9): [True: 1, False: 2]
  ------------------
  144|      1|        engine_list_tail = e->prev;
  145|      3|    engine_free_util(e, 0);
  146|      3|    return 1;
  147|      3|}
eng_list.c:engine_cpy:
  379|    725|{
  380|    725|    dest->id = src->id;
  381|    725|    dest->name = src->name;
  382|    725|    dest->rsa_meth = src->rsa_meth;
  383|    725|#ifndef OPENSSL_NO_DSA
  384|    725|    dest->dsa_meth = src->dsa_meth;
  385|    725|#endif
  386|    725|#ifndef OPENSSL_NO_DH
  387|    725|    dest->dh_meth = src->dh_meth;
  388|    725|#endif
  389|    725|#ifndef OPENSSL_NO_EC
  390|    725|    dest->ec_meth = src->ec_meth;
  391|    725|#endif
  392|    725|    dest->rand_meth = src->rand_meth;
  393|    725|    dest->ciphers = src->ciphers;
  394|    725|    dest->digests = src->digests;
  395|    725|    dest->pkey_meths = src->pkey_meths;
  396|    725|    dest->destroy = src->destroy;
  397|    725|    dest->init = src->init;
  398|    725|    dest->finish = src->finish;
  399|    725|    dest->ctrl = src->ctrl;
  400|    725|    dest->load_privkey = src->load_privkey;
  401|    725|    dest->load_pubkey = src->load_pubkey;
  402|    725|    dest->cmd_defns = src->cmd_defns;
  403|    725|    dest->flags = src->flags;
  404|    725|    dest->dynamic_id = src->dynamic_id;
  405|       |    engine_add_dynamic_id(dest, NULL, 0);
  406|    725|}

engine_load_rdrand_int:
   95|      1|{
   96|      1|    if (OPENSSL_ia32cap_P[1] & (1 << (62 - 32))) {
  ------------------
  |  Branch (96:9): [True: 1, False: 0]
  ------------------
   97|      1|        ENGINE *toadd = ENGINE_rdrand();
   98|      1|        if (!toadd)
  ------------------
  |  Branch (98:13): [True: 0, False: 1]
  ------------------
   99|      0|            return;
  100|      1|        ERR_set_mark();
  101|      1|        ENGINE_add(toadd);
  102|       |        /*
  103|       |         * If the "add" worked, it gets a structural reference. So either way, we
  104|       |         * release our just-created reference.
  105|       |         */
  106|      1|        ENGINE_free(toadd);
  107|       |        /*
  108|       |         * If the "add" didn't work, it was probably a conflict because it was
  109|       |         * already added (eg. someone calling ENGINE_load_blah then calling
  110|       |         * ENGINE_load_builtin_engines() perhaps).
  111|       |         */
  112|      1|        ERR_pop_to_mark();
  113|      1|    }
  114|      1|}
eng_rdrand.c:ENGINE_rdrand:
   83|      1|{
   84|      1|    ENGINE *ret = ENGINE_new();
   85|      1|    if (ret == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 1]
  ------------------
   86|      0|        return NULL;
   87|      1|    if (!bind_helper(ret)) {
  ------------------
  |  Branch (87:9): [True: 0, False: 1]
  ------------------
   88|      0|        ENGINE_free(ret);
   89|      0|        return NULL;
   90|      0|    }
   91|      1|    return ret;
   92|      1|}
eng_rdrand.c:bind_helper:
   75|      1|{
   76|      1|    if (!ENGINE_set_id(e, engine_e_rdrand_id) || !ENGINE_set_name(e, engine_e_rdrand_name) || !ENGINE_set_flags(e, ENGINE_FLAGS_NO_REGISTER_ALL) || !ENGINE_set_init_function(e, rdrand_init) || !ENGINE_set_RAND(e, &rdrand_meth))
  ------------------
  |  |   96|      1|#define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008
  ------------------
  |  Branch (76:9): [True: 0, False: 1]
  |  Branch (76:50): [True: 0, False: 1]
  |  Branch (76:95): [True: 0, False: 1]
  |  Branch (76:149): [True: 0, False: 1]
  |  Branch (76:194): [True: 0, False: 1]
  ------------------
   77|      0|        return 0;
   78|       |
   79|      1|    return 1;
   80|      1|}
eng_rdrand.c:rdrand_init:
   67|      2|{
   68|      2|    return 1;
   69|      2|}

engine_table_register:
   86|      2|{
   87|      2|    int ret = 0, added = 0;
   88|      2|    ENGINE_PILE tmplate, *fnd;
   89|       |
   90|      2|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (90:9): [True: 0, False: 2]
  ------------------
   91|      0|        return 0;
   92|      2|    if (!(*table))
  ------------------
  |  Branch (92:9): [True: 1, False: 1]
  ------------------
   93|      1|        added = 1;
   94|      2|    if (!int_table_check(table, 1))
  ------------------
  |  Branch (94:9): [True: 0, False: 2]
  ------------------
   95|      0|        goto end;
   96|       |    /* The cleanup callback needs to be added */
   97|      2|    if (added && !engine_cleanup_add_first(cleanup)) {
  ------------------
  |  Branch (97:9): [True: 1, False: 1]
  |  Branch (97:18): [True: 0, False: 1]
  ------------------
   98|      0|        lh_ENGINE_PILE_free(&(*table)->piles);
   99|      0|        *table = NULL;
  100|      0|        goto end;
  101|      0|    }
  102|      4|    while (num_nids--) {
  ------------------
  |  Branch (102:12): [True: 2, False: 2]
  ------------------
  103|      2|        tmplate.nid = *nids;
  104|      2|        fnd = lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate);
  105|      2|        if (!fnd) {
  ------------------
  |  Branch (105:13): [True: 1, False: 1]
  ------------------
  106|      1|            fnd = OPENSSL_malloc(sizeof(*fnd));
  ------------------
  |  |  106|      1|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  107|      1|            if (fnd == NULL)
  ------------------
  |  Branch (107:17): [True: 0, False: 1]
  ------------------
  108|      0|                goto end;
  109|      1|            fnd->uptodate = 1;
  110|      1|            fnd->nid = *nids;
  111|      1|            fnd->sk = sk_ENGINE_new_null();
  112|      1|            if (!fnd->sk) {
  ------------------
  |  Branch (112:17): [True: 0, False: 1]
  ------------------
  113|      0|                OPENSSL_free(fnd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  114|      0|                goto end;
  115|      0|            }
  116|      1|            fnd->funct = NULL;
  117|      1|            (void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
  118|      1|            if (lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate) != fnd) {
  ------------------
  |  Branch (118:17): [True: 0, False: 1]
  ------------------
  119|      0|                sk_ENGINE_free(fnd->sk);
  120|      0|                OPENSSL_free(fnd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|      0|                goto end;
  122|      0|            }
  123|      1|        }
  124|       |        /* A registration shouldn't add duplicate entries */
  125|      2|        (void)sk_ENGINE_delete_ptr(fnd->sk, e);
  126|       |        /*
  127|       |         * if 'setdefault', this ENGINE goes to the head of the list
  128|       |         */
  129|      2|        if (!sk_ENGINE_push(fnd->sk, e))
  ------------------
  |  Branch (129:13): [True: 0, False: 2]
  ------------------
  130|      0|            goto end;
  131|       |        /* "touch" this ENGINE_PILE */
  132|      2|        fnd->uptodate = 0;
  133|      2|        if (setdefault) {
  ------------------
  |  Branch (133:13): [True: 2, False: 0]
  ------------------
  134|      2|            if (!engine_unlocked_init(e)) {
  ------------------
  |  Branch (134:17): [True: 0, False: 2]
  ------------------
  135|      0|                ERR_raise(ERR_LIB_ENGINE, ENGINE_R_INIT_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  136|      0|                goto end;
  137|      0|            }
  138|      2|            if (fnd->funct)
  ------------------
  |  Branch (138:17): [True: 1, False: 1]
  ------------------
  139|      1|                engine_unlocked_finish(fnd->funct, 0);
  140|      2|            fnd->funct = e;
  141|      2|            fnd->uptodate = 1;
  142|      2|        }
  143|      2|        nids++;
  144|      2|    }
  145|      2|    ret = 1;
  146|      2|end:
  147|      2|    CRYPTO_THREAD_unlock(global_engine_lock);
  148|      2|    return ret;
  149|      2|}
engine_table_cleanup:
  188|      1|{
  189|      1|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (189:9): [True: 0, False: 1]
  ------------------
  190|      0|        return;
  191|      1|    if (*table) {
  ------------------
  |  Branch (191:9): [True: 1, False: 0]
  ------------------
  192|      1|        lh_ENGINE_PILE_doall(&(*table)->piles, int_cleanup_cb_doall);
  193|      1|        lh_ENGINE_PILE_free(&(*table)->piles);
  194|       |        *table = NULL;
  195|      1|    }
  196|      1|    CRYPTO_THREAD_unlock(global_engine_lock);
  197|      1|}
ossl_engine_table_select:
  202|  1.13M|{
  203|  1.13M|    ENGINE *ret = NULL;
  204|  1.13M|    ENGINE_PILE tmplate, *fnd = NULL;
  205|  1.13M|    int initres, loop = 0;
  206|       |
  207|  1.13M|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
  208|       |    /* Load the config before trying to check if engines are available */
  209|  1.13M|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  510|  1.13M|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  210|  1.13M|#endif
  211|       |
  212|  1.13M|    if (!(*table)) {
  ------------------
  |  Branch (212:9): [True: 1.13M, False: 0]
  ------------------
  213|  1.13M|        OSSL_TRACE3(ENGINE_TABLE,
  ------------------
  |  |  297|  1.13M|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  ------------------
  |  |  |  |  285|  1.13M|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  214|  1.13M|            "%s:%d, nid=%d, nothing registered!\n",
  215|  1.13M|            f, l, nid);
  216|  1.13M|        return NULL;
  217|  1.13M|    }
  218|       |
  219|      0|    if (!CRYPTO_THREAD_write_lock(global_engine_lock))
  ------------------
  |  Branch (219:9): [True: 0, False: 0]
  ------------------
  220|      0|        return NULL;
  221|       |
  222|      0|    ERR_set_mark();
  223|       |    /*
  224|       |     * Check again inside the lock otherwise we could race against cleanup
  225|       |     * operations. But don't worry about a debug printout
  226|       |     */
  227|      0|    if (!int_table_check(table, 0))
  ------------------
  |  Branch (227:9): [True: 0, False: 0]
  ------------------
  228|      0|        goto end;
  229|      0|    tmplate.nid = nid;
  230|      0|    fnd = lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate);
  231|      0|    if (!fnd)
  ------------------
  |  Branch (231:9): [True: 0, False: 0]
  ------------------
  232|      0|        goto end;
  233|      0|    if (fnd->funct && engine_unlocked_init(fnd->funct)) {
  ------------------
  |  Branch (233:9): [True: 0, False: 0]
  |  Branch (233:23): [True: 0, False: 0]
  ------------------
  234|      0|        OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  235|      0|            "%s:%d, nid=%d, using ENGINE '%s' cached\n",
  236|      0|            f, l, nid, fnd->funct->id);
  237|      0|        ret = fnd->funct;
  238|      0|        goto end;
  239|      0|    }
  240|      0|    if (fnd->uptodate) {
  ------------------
  |  Branch (240:9): [True: 0, False: 0]
  ------------------
  241|      0|        ret = fnd->funct;
  242|      0|        goto end;
  243|      0|    }
  244|      0|trynext:
  245|      0|    ret = sk_ENGINE_value(fnd->sk, loop++);
  246|      0|    if (!ret) {
  ------------------
  |  Branch (246:9): [True: 0, False: 0]
  ------------------
  247|      0|        OSSL_TRACE3(ENGINE_TABLE,
  ------------------
  |  |  297|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  248|      0|            "%s:%d, nid=%d, "
  249|      0|            "no registered implementations would initialise\n",
  250|      0|            f, l, nid);
  251|      0|        goto end;
  252|      0|    }
  253|       |    /* Try to initialise the ENGINE? */
  254|      0|    if ((ret->funct_ref > 0) || !(table_flags & ENGINE_TABLE_FLAG_NOINIT))
  ------------------
  |  |   64|      0|#define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001
  ------------------
  |  Branch (254:9): [True: 0, False: 0]
  |  Branch (254:33): [True: 0, False: 0]
  ------------------
  255|      0|        initres = engine_unlocked_init(ret);
  256|      0|    else
  257|      0|        initres = 0;
  258|      0|    if (initres) {
  ------------------
  |  Branch (258:9): [True: 0, False: 0]
  ------------------
  259|       |        /* Update 'funct' */
  260|      0|        if ((fnd->funct != ret) && engine_unlocked_init(ret)) {
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  |  Branch (260:36): [True: 0, False: 0]
  ------------------
  261|       |            /* If there was a previous default we release it. */
  262|      0|            if (fnd->funct)
  ------------------
  |  Branch (262:17): [True: 0, False: 0]
  ------------------
  263|      0|                engine_unlocked_finish(fnd->funct, 0);
  264|      0|            fnd->funct = ret;
  265|      0|            OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  266|      0|                "%s:%d, nid=%d, setting default to '%s'\n",
  267|      0|                f, l, nid, ret->id);
  268|      0|        }
  269|      0|        OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  270|      0|            "%s:%d, nid=%d, using newly initialised '%s'\n",
  271|      0|            f, l, nid, ret->id);
  272|      0|        goto end;
  273|      0|    }
  274|      0|    goto trynext;
  275|      0|end:
  276|       |    /*
  277|       |     * If it failed, it is unlikely to succeed again until some future
  278|       |     * registrations have taken place. In all cases, we cache.
  279|       |     */
  280|      0|    if (fnd)
  ------------------
  |  Branch (280:9): [True: 0, False: 0]
  ------------------
  281|      0|        fnd->uptodate = 1;
  282|      0|    if (ret)
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  ------------------
  283|      0|        OSSL_TRACE4(ENGINE_TABLE,
  ------------------
  |  |  299|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  284|      0|            "%s:%d, nid=%d, caching ENGINE '%s'\n",
  285|      0|            f, l, nid, ret->id);
  286|      0|    else
  287|      0|        OSSL_TRACE3(ENGINE_TABLE,
  ------------------
  |  |  297|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  ------------------
  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  288|      0|            "%s:%d, nid=%d, caching 'no matching ENGINE'\n",
  289|      0|            f, l, nid);
  290|      0|    CRYPTO_THREAD_unlock(global_engine_lock);
  291|       |    /*
  292|       |     * Whatever happened, any failed init()s are not failures in this
  293|       |     * context, so clear our error state.
  294|       |     */
  295|      0|    ERR_pop_to_mark();
  296|      0|    return ret;
  297|      0|}
engine_table_doall:
  310|   929k|{
  311|   929k|    ENGINE_PILE_DOALL dall;
  312|   929k|    dall.cb = cb;
  313|   929k|    dall.arg = arg;
  314|   929k|    if (table)
  ------------------
  |  Branch (314:9): [True: 0, False: 929k]
  ------------------
  315|      0|        lh_ENGINE_PILE_doall_ENGINE_PILE_DOALL(&table->piles, int_dall, &dall);
  316|   929k|}
eng_table.c:int_table_check:
   66|      2|{
   67|      2|    LHASH_OF(ENGINE_PILE) *lh;
  ------------------
  |  |  156|      2|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   68|       |
   69|      2|    if (*t)
  ------------------
  |  Branch (69:9): [True: 1, False: 1]
  ------------------
   70|      1|        return 1;
   71|      1|    if (!create)
  ------------------
  |  Branch (71:9): [True: 0, False: 1]
  ------------------
   72|      0|        return 0;
   73|      1|    if ((lh = lh_ENGINE_PILE_new(engine_pile_hash, engine_pile_cmp)) == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 1]
  ------------------
   74|      0|        return 0;
   75|      1|    *t = (ENGINE_TABLE *)lh;
   76|      1|    return 1;
   77|      1|}
eng_table.c:engine_pile_hash:
   56|      4|{
   57|      4|    return c->nid;
   58|      4|}
eng_table.c:engine_pile_cmp:
   61|      2|{
   62|      2|    return a->nid - b->nid;
   63|      2|}
eng_table.c:int_cleanup_cb_doall:
  178|      1|{
  179|      1|    if (p == NULL)
  ------------------
  |  Branch (179:9): [True: 0, False: 1]
  ------------------
  180|      0|        return;
  181|      1|    sk_ENGINE_free(p->sk);
  182|      1|    if (p->funct)
  ------------------
  |  Branch (182:9): [True: 1, False: 0]
  ------------------
  183|      1|        engine_unlocked_finish(p->funct, 0);
  184|      1|    OPENSSL_free(p);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  185|      1|}

ENGINE_register_pkey_asn1_meths:
   39|      2|{
   40|      2|    if (e->pkey_asn1_meths) {
  ------------------
  |  Branch (40:9): [True: 0, False: 2]
  ------------------
   41|      0|        const int *nids;
   42|      0|        int num_nids = e->pkey_asn1_meths(e, NULL, &nids, 0);
   43|      0|        if (num_nids > 0)
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|            return engine_table_register(&pkey_asn1_meth_table,
   45|      0|                engine_unregister_all_pkey_asn1_meths,
   46|      0|                e, nids, num_nids, 0);
   47|      0|    }
   48|      2|    return 1;
   49|      2|}
ENGINE_set_default_pkey_asn1_meths:
   60|      2|{
   61|      2|    if (e->pkey_asn1_meths) {
  ------------------
  |  Branch (61:9): [True: 0, False: 2]
  ------------------
   62|      0|        const int *nids;
   63|      0|        int num_nids = e->pkey_asn1_meths(e, NULL, &nids, 0);
   64|      0|        if (num_nids > 0)
  ------------------
  |  Branch (64:13): [True: 0, False: 0]
  ------------------
   65|      0|            return engine_table_register(&pkey_asn1_meth_table,
   66|      0|                engine_unregister_all_pkey_asn1_meths,
   67|      0|                e, nids, num_nids, 1);
   68|      0|    }
   69|      2|    return 1;
   70|      2|}
ENGINE_get_pkey_asn1_meth_engine:
   78|   532k|{
   79|   532k|    return ossl_engine_table_select(&pkey_asn1_meth_table, nid,
   80|   532k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   81|   532k|}
engine_pkey_asn1_meths_free:
  117|    728|{
  118|    728|    int i;
  119|    728|    EVP_PKEY_ASN1_METHOD *pkm;
  120|    728|    if (e->pkey_asn1_meths) {
  ------------------
  |  Branch (120:9): [True: 0, False: 728]
  ------------------
  121|      0|        const int *pknids;
  122|      0|        int npknids;
  123|      0|        npknids = e->pkey_asn1_meths(e, NULL, &pknids, 0);
  124|      0|        for (i = 0; i < npknids; i++) {
  ------------------
  |  Branch (124:21): [True: 0, False: 0]
  ------------------
  125|      0|            if (e->pkey_asn1_meths(e, &pkm, NULL, pknids[i])) {
  ------------------
  |  Branch (125:17): [True: 0, False: 0]
  ------------------
  126|      0|                EVP_PKEY_asn1_free(pkm);
  127|      0|            }
  128|      0|        }
  129|      0|    }
  130|    728|}
ENGINE_pkey_asn1_find_str:
  191|   929k|{
  192|   929k|    ENGINE_FIND_STR fstr;
  193|   929k|    fstr.e = NULL;
  194|   929k|    fstr.ameth = NULL;
  195|   929k|    fstr.str = str;
  196|   929k|    fstr.len = len;
  197|       |
  198|   929k|    if (!RUN_ONCE(&engine_lock_init, do_engine_lock_init)) {
  ------------------
  |  |  130|   929k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 929k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (198:9): [True: 0, False: 929k]
  ------------------
  199|       |        /* Maybe this should be raised in do_engine_lock_init() */
  200|      0|        ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  201|      0|        return NULL;
  202|      0|    }
  203|       |
  204|   929k|    if (!CRYPTO_THREAD_read_lock(global_engine_lock))
  ------------------
  |  Branch (204:9): [True: 0, False: 929k]
  ------------------
  205|      0|        return NULL;
  206|   929k|    engine_table_doall(pkey_asn1_meth_table, look_str_cb, &fstr);
  207|       |    /* If found obtain a structural reference to engine */
  208|   929k|    if (fstr.e != NULL) {
  ------------------
  |  Branch (208:9): [True: 0, False: 929k]
  ------------------
  209|      0|        int ref;
  210|       |
  211|      0|        if (!CRYPTO_UP_REF(&fstr.e->struct_ref, &ref)) {
  ------------------
  |  Branch (211:13): [True: 0, False: 0]
  ------------------
  212|      0|            CRYPTO_THREAD_unlock(global_engine_lock);
  213|      0|            ERR_raise(ERR_LIB_ENGINE, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  214|      0|            return NULL;
  215|      0|        }
  216|      0|        ENGINE_REF_PRINT(fstr.e, 0, 1);
  ------------------
  |  |   29|      0|    OSSL_TRACE6(ENGINE_REF_COUNT,                         \
  |  |  ------------------
  |  |  |  |  303|      0|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5, arg6))
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        "engine: %p %s from %d to %d (%s:%d)\n",          \
  |  |   31|      0|        (void *)(e), (isfunct ? "funct" : "struct"),      \
  |  |   32|      0|        ((isfunct)                                        \
  |  |   33|      0|                ? ((e)->funct_ref - (diff))               \
  |  |   34|      0|                : (eng_struct_ref(e) - (diff))),          \
  |  |   35|      0|        ((isfunct) ? (e)->funct_ref : eng_struct_ref(e)), \
  |  |   36|      0|        (OPENSSL_FILE), (OPENSSL_LINE))
  ------------------
  217|      0|    }
  218|   929k|    *pe = fstr.e;
  219|   929k|    CRYPTO_THREAD_unlock(global_engine_lock);
  220|   929k|    return fstr.ameth;
  221|   929k|}

ENGINE_register_ciphers:
   28|      2|{
   29|      2|    if (e->ciphers) {
  ------------------
  |  Branch (29:9): [True: 0, False: 2]
  ------------------
   30|      0|        const int *nids;
   31|      0|        int num_nids = e->ciphers(e, NULL, &nids, 0);
   32|      0|        if (num_nids > 0)
  ------------------
  |  Branch (32:13): [True: 0, False: 0]
  ------------------
   33|      0|            return engine_table_register(&cipher_table,
   34|      0|                engine_unregister_all_ciphers, e,
   35|      0|                nids, num_nids, 0);
   36|      0|    }
   37|      2|    return 1;
   38|      2|}
ENGINE_set_default_ciphers:
   49|      2|{
   50|      2|    if (e->ciphers) {
  ------------------
  |  Branch (50:9): [True: 0, False: 2]
  ------------------
   51|      0|        const int *nids;
   52|      0|        int num_nids = e->ciphers(e, NULL, &nids, 0);
   53|      0|        if (num_nids > 0)
  ------------------
  |  Branch (53:13): [True: 0, False: 0]
  ------------------
   54|      0|            return engine_table_register(&cipher_table,
   55|      0|                engine_unregister_all_ciphers, e,
   56|      0|                nids, num_nids, 1);
   57|      0|    }
   58|      2|    return 1;
   59|      2|}
ENGINE_get_cipher_engine:
   67|  52.6k|{
   68|  52.6k|    return ossl_engine_table_select(&cipher_table, nid,
   69|  52.6k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   70|  52.6k|}

ENGINE_register_DH:
   29|      2|{
   30|      2|    if (e->dh_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&dh_table,
   32|      0|            engine_unregister_all_DH, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_DH:
   46|      2|{
   47|      2|    if (e->dh_meth)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&dh_table,
   49|      0|            engine_unregister_all_DH, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}

ENGINE_register_digests:
   28|      2|{
   29|      2|    if (e->digests) {
  ------------------
  |  Branch (29:9): [True: 0, False: 2]
  ------------------
   30|      0|        const int *nids;
   31|      0|        int num_nids = e->digests(e, NULL, &nids, 0);
   32|      0|        if (num_nids > 0)
  ------------------
  |  Branch (32:13): [True: 0, False: 0]
  ------------------
   33|      0|            return engine_table_register(&digest_table,
   34|      0|                engine_unregister_all_digests, e,
   35|      0|                nids, num_nids, 0);
   36|      0|    }
   37|      2|    return 1;
   38|      2|}
ENGINE_set_default_digests:
   49|      2|{
   50|      2|    if (e->digests) {
  ------------------
  |  Branch (50:9): [True: 0, False: 2]
  ------------------
   51|      0|        const int *nids;
   52|      0|        int num_nids = e->digests(e, NULL, &nids, 0);
   53|      0|        if (num_nids > 0)
  ------------------
  |  Branch (53:13): [True: 0, False: 0]
  ------------------
   54|      0|            return engine_table_register(&digest_table,
   55|      0|                engine_unregister_all_digests, e,
   56|      0|                nids, num_nids, 1);
   57|      0|    }
   58|      2|    return 1;
   59|      2|}
ENGINE_get_digest_engine:
   67|   108k|{
   68|   108k|    return ossl_engine_table_select(&digest_table, nid,
   69|   108k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   70|   108k|}

ENGINE_register_DSA:
   29|      2|{
   30|      2|    if (e->dsa_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&dsa_table,
   32|      0|            engine_unregister_all_DSA, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_DSA:
   46|      2|{
   47|      2|    if (e->dsa_meth)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&dsa_table,
   49|      0|            engine_unregister_all_DSA, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}

ENGINE_register_EC:
   29|      2|{
   30|      2|    if (e->ec_meth != NULL)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&dh_table,
   32|      0|            engine_unregister_all_EC, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_EC:
   46|      2|{
   47|      2|    if (e->ec_meth != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&dh_table,
   49|      0|            engine_unregister_all_EC, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}
ENGINE_get_default_EC:
   60|  52.2k|{
   61|  52.2k|    return ossl_engine_table_select(&dh_table, dummy_nid,
   62|  52.2k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|  52.2k|}

ENGINE_register_pkey_meths:
   29|      2|{
   30|      2|    if (e->pkey_meths) {
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        const int *nids;
   32|      0|        int num_nids = e->pkey_meths(e, NULL, &nids, 0);
   33|      0|        if (num_nids > 0)
  ------------------
  |  Branch (33:13): [True: 0, False: 0]
  ------------------
   34|      0|            return engine_table_register(&pkey_meth_table,
   35|      0|                engine_unregister_all_pkey_meths, e,
   36|      0|                nids, num_nids, 0);
   37|      0|    }
   38|      2|    return 1;
   39|      2|}
ENGINE_set_default_pkey_meths:
   50|      2|{
   51|      2|    if (e->pkey_meths) {
  ------------------
  |  Branch (51:9): [True: 0, False: 2]
  ------------------
   52|      0|        const int *nids;
   53|      0|        int num_nids = e->pkey_meths(e, NULL, &nids, 0);
   54|      0|        if (num_nids > 0)
  ------------------
  |  Branch (54:13): [True: 0, False: 0]
  ------------------
   55|      0|            return engine_table_register(&pkey_meth_table,
   56|      0|                engine_unregister_all_pkey_meths, e,
   57|      0|                nids, num_nids, 1);
   58|      0|    }
   59|      2|    return 1;
   60|      2|}
ENGINE_get_pkey_meth_engine:
   68|   246k|{
   69|   246k|    return ossl_engine_table_select(&pkey_meth_table, nid,
   70|   246k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   71|   246k|}
engine_pkey_meths_free:
  104|    728|{
  105|    728|    int i;
  106|    728|    EVP_PKEY_METHOD *pkm;
  107|    728|    if (e->pkey_meths) {
  ------------------
  |  Branch (107:9): [True: 0, False: 728]
  ------------------
  108|      0|        const int *pknids;
  109|      0|        int npknids;
  110|      0|        npknids = e->pkey_meths(e, NULL, &pknids, 0);
  111|      0|        for (i = 0; i < npknids; i++) {
  ------------------
  |  Branch (111:21): [True: 0, False: 0]
  ------------------
  112|      0|            if (e->pkey_meths(e, &pkm, NULL, pknids[i])) {
  ------------------
  |  Branch (112:17): [True: 0, False: 0]
  ------------------
  113|      0|                EVP_PKEY_meth_free(pkm);
  114|      0|            }
  115|      0|        }
  116|      0|    }
  117|    728|}

ENGINE_register_RAND:
   29|      2|{
   30|      2|    if (e->rand_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&rand_table,
   32|      0|            engine_unregister_all_RAND, e,
   33|      0|            &dummy_nid, 1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_RAND:
   46|      2|{
   47|      2|    if (e->rand_meth)
  ------------------
  |  Branch (47:9): [True: 2, False: 0]
  ------------------
   48|      2|        return engine_table_register(&rand_table,
   49|      2|            engine_unregister_all_RAND, e,
   50|      2|            &dummy_nid, 1, 1);
   51|      0|    return 1;
   52|      2|}
ENGINE_get_default_RAND:
   60|      1|{
   61|      1|    return ossl_engine_table_select(&rand_table, dummy_nid,
   62|      1|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|      1|}
ENGINE_set_RAND:
   73|      1|{
   74|      1|    e->rand_meth = rand_meth;
   75|      1|    return 1;
   76|      1|}
tb_rand.c:engine_unregister_all_RAND:
   24|      1|{
   25|      1|    engine_table_cleanup(&rand_table);
   26|      1|}

ENGINE_register_RSA:
   29|      2|{
   30|      2|    if (e->rsa_meth)
  ------------------
  |  Branch (30:9): [True: 0, False: 2]
  ------------------
   31|      0|        return engine_table_register(&rsa_table,
   32|      0|            engine_unregister_all_RSA, e, &dummy_nid,
   33|      0|            1, 0);
   34|      2|    return 1;
   35|      2|}
ENGINE_set_default_RSA:
   46|      2|{
   47|      2|    if (e->rsa_meth)
  ------------------
  |  Branch (47:9): [True: 0, False: 2]
  ------------------
   48|      0|        return engine_table_register(&rsa_table,
   49|      0|            engine_unregister_all_RSA, e, &dummy_nid,
   50|      0|            1, 1);
   51|      2|    return 1;
   52|      2|}
ENGINE_get_default_RSA:
   60|   138k|{
   61|   138k|    return ossl_engine_table_select(&rsa_table, dummy_nid,
   62|   138k|        OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                      OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
   63|   138k|}

OSSL_ERR_STATE_free:
  201|      1|{
  202|      1|    int i;
  203|       |
  204|      1|    if (state == NULL)
  ------------------
  |  Branch (204:9): [True: 0, False: 1]
  ------------------
  205|      0|        return;
  206|     17|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   57|     17|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (206:17): [True: 16, False: 1]
  ------------------
  207|     16|        err_clear(state, i, 1);
  208|     16|    }
  209|      1|    CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  314|       |#define OPENSSL_FILE __FILE__
  ------------------
                  CRYPTO_free(state, OPENSSL_FILE, OPENSSL_LINE);
  ------------------
  |  |  315|       |#define OPENSSL_LINE __LINE__
  ------------------
  210|      1|}
err_cleanup:
  232|      1|{
  233|      1|    CRYPTO_THREAD_lock_free(err_string_lock);
  234|      1|    err_string_lock = NULL;
  235|      1|#ifndef OPENSSL_NO_ERR
  236|      1|    lh_ERR_STRING_DATA_free(int_error_hash);
  ------------------
  |  |  378|      1|#define lh_ERR_STRING_DATA_free(lh) OPENSSL_LH_free(ossl_check_ERR_STRING_DATA_lh_type(lh))
  ------------------
  237|       |    int_error_hash = NULL;
  238|      1|#endif
  239|      1|}
ossl_err_load_ERR_strings:
  269|     37|{
  270|     37|#ifndef OPENSSL_NO_ERR
  271|     37|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|     37|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 37, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (271:9): [True: 0, False: 37]
  ------------------
  272|      0|        return 0;
  273|       |
  274|     37|    err_load_strings(ERR_str_libraries);
  275|     37|    err_load_strings(ERR_str_reasons);
  276|     37|#endif
  277|     37|    return 1;
  278|     37|}
ERR_load_strings_const:
  294|     36|{
  295|     36|#ifndef OPENSSL_NO_ERR
  296|     36|    if (ossl_err_load_ERR_strings() == 0)
  ------------------
  |  Branch (296:9): [True: 0, False: 36]
  ------------------
  297|      0|        return 0;
  298|     36|    err_load_strings(str);
  299|     36|#endif
  300|       |
  301|     36|    return 1;
  302|     36|}
ERR_clear_error:
  332|  3.13k|{
  333|  3.13k|    int i;
  334|  3.13k|    ERR_STATE *es;
  335|       |
  336|  3.13k|    es = ossl_err_get_state_int();
  337|  3.13k|    if (es == NULL)
  ------------------
  |  Branch (337:9): [True: 0, False: 3.13k]
  ------------------
  338|      0|        return;
  339|       |
  340|  53.3k|    for (i = 0; i < ERR_NUM_ERRORS; i++) {
  ------------------
  |  |   57|  53.3k|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (340:17): [True: 50.1k, False: 3.13k]
  ------------------
  341|  50.1k|        err_clear(es, i, 0);
  342|  50.1k|    }
  343|  3.13k|    es->top = es->bottom = 0;
  344|  3.13k|}
ERR_get_error:
  347|  1.40k|{
  348|  1.40k|    return get_error_values(EV_POP, NULL, NULL, NULL, NULL, NULL);
  349|  1.40k|}
ERR_peek_error:
  372|  1.52k|{
  373|  1.52k|    return get_error_values(EV_PEEK, NULL, NULL, NULL, NULL, NULL);
  374|  1.52k|}
ERR_peek_last_error:
  407|   574k|{
  408|   574k|    return get_error_values(EV_PEEK_LAST, NULL, NULL, NULL, NULL, NULL);
  409|   574k|}
ossl_err_string_int:
  520|  1.42k|{
  521|  1.42k|    char lsbuf[64], rsbuf[256];
  522|  1.42k|    const char *ls, *rs = NULL;
  523|  1.42k|    unsigned long l, r;
  524|       |
  525|  1.42k|    if (len == 0)
  ------------------
  |  Branch (525:9): [True: 0, False: 1.42k]
  ------------------
  526|      0|        return;
  527|       |
  528|  1.42k|    l = ERR_GET_LIB(e);
  529|  1.42k|    ls = ERR_lib_error_string(e);
  530|  1.42k|    if (ls == NULL) {
  ------------------
  |  Branch (530:9): [True: 2, False: 1.42k]
  ------------------
  531|      2|        BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
  532|      2|        ls = lsbuf;
  533|      2|    }
  534|       |
  535|       |    /*
  536|       |     * ERR_reason_error_string() can't safely return system error strings,
  537|       |     * since it would call openssl_strerror_r(), which needs a buffer for
  538|       |     * thread safety.  So for system errors, we call openssl_strerror_r()
  539|       |     * directly instead.
  540|       |     */
  541|  1.42k|    r = ERR_GET_REASON(e);
  542|  1.42k|#ifndef OPENSSL_NO_ERR
  543|  1.42k|    if (ERR_SYSTEM_ERROR(e)) {
  ------------------
  |  |  241|  1.42k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  1.42k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 13, False: 1.41k]
  |  |  ------------------
  ------------------
  544|     13|        if (openssl_strerror_r(r, rsbuf, sizeof(rsbuf)))
  ------------------
  |  Branch (544:13): [True: 13, False: 0]
  ------------------
  545|     13|            rs = rsbuf;
  546|  1.41k|    } else {
  547|  1.41k|        rs = ERR_reason_error_string(e);
  548|  1.41k|    }
  549|  1.42k|#endif
  550|  1.42k|    if (rs == NULL) {
  ------------------
  |  Branch (550:9): [True: 15, False: 1.41k]
  ------------------
  551|     15|        BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)",
  552|     15|            r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
  ------------------
  |  |  231|     15|#define ERR_RFLAGS_MASK 0x1F
  ------------------
                          r & ~(ERR_RFLAGS_MASK << ERR_RFLAGS_OFFSET));
  ------------------
  |  |  230|     15|#define ERR_RFLAGS_OFFSET 18L
  ------------------
  553|     15|        rs = rsbuf;
  554|     15|    }
  555|       |
  556|  1.42k|    BIO_snprintf(buf, len, "error:%08lX:%s:%s:%s", e, ls, func, rs);
  557|  1.42k|    if (strlen(buf) == len - 1) {
  ------------------
  |  Branch (557:9): [True: 0, False: 1.42k]
  ------------------
  558|       |        /* Didn't fit; use a minimal format. */
  559|      0|        BIO_snprintf(buf, len, "err:%lx:%lx:%lx:%lx", e, l, 0L, r);
  560|      0|    }
  561|  1.42k|}
ERR_error_string_n:
  564|  1.42k|{
  565|  1.42k|    ossl_err_string_int(e, "", buf, len);
  566|  1.42k|}
ERR_lib_error_string:
  583|  1.42k|{
  584|  1.42k|#ifndef OPENSSL_NO_ERR
  585|  1.42k|    ERR_STRING_DATA d, *p;
  586|  1.42k|    unsigned long l;
  587|       |
  588|  1.42k|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|  1.42k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.42k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (588:9): [True: 0, False: 1.42k]
  ------------------
  589|      0|        return NULL;
  590|      0|    }
  591|       |
  592|  1.42k|    l = ERR_GET_LIB(e);
  593|  1.42k|    d.error = ERR_PACK(l, 0, 0);
  ------------------
  |  |  281|  1.42k|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|  1.42k|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|  1.42k|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|  1.42k|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  594|  1.42k|    p = int_err_get_item(&d);
  595|  1.42k|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (595:13): [True: 2, False: 1.42k]
  ------------------
  596|       |#else
  597|       |    return NULL;
  598|       |#endif
  599|  1.42k|}
ERR_reason_error_string:
  609|  1.45k|{
  610|  1.45k|#ifndef OPENSSL_NO_ERR
  611|  1.45k|    ERR_STRING_DATA d, *p = NULL;
  612|  1.45k|    unsigned long l, r;
  613|       |
  614|  1.45k|    if (!RUN_ONCE(&err_string_init, do_err_strings_init)) {
  ------------------
  |  |  130|  1.45k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.45k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (614:9): [True: 0, False: 1.45k]
  ------------------
  615|      0|        return NULL;
  616|      0|    }
  617|       |
  618|       |    /*
  619|       |     * ERR_reason_error_string() can't safely return system error strings,
  620|       |     * since openssl_strerror_r() needs a buffer for thread safety, and we
  621|       |     * haven't got one that would serve any sensible purpose.
  622|       |     */
  623|  1.45k|    if (ERR_SYSTEM_ERROR(e))
  ------------------
  |  |  241|  1.45k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  1.45k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 1.45k]
  |  |  ------------------
  ------------------
  624|      0|        return NULL;
  625|       |
  626|  1.45k|    l = ERR_GET_LIB(e);
  627|  1.45k|    r = ERR_GET_REASON(e);
  628|  1.45k|    d.error = ERR_PACK(l, 0, r);
  ------------------
  |  |  281|  1.45k|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|  1.45k|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|  1.45k|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|  1.45k|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  629|  1.45k|    p = int_err_get_item(&d);
  630|  1.45k|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 51, False: 1.40k]
  ------------------
  631|     51|        d.error = ERR_PACK(0, 0, r);
  ------------------
  |  |  281|     51|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|     51|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|     51|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|     51|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
  632|     51|        p = int_err_get_item(&d);
  633|     51|    }
  634|  1.45k|    return ((p == NULL) ? NULL : p->string);
  ------------------
  |  Branch (634:13): [True: 51, False: 1.40k]
  ------------------
  635|       |#else
  636|       |    return NULL;
  637|       |#endif
  638|  1.45k|}
ossl_err_get_state_int:
  666|  9.28M|{
  667|  9.28M|    ERR_STATE *state;
  668|  9.28M|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|  9.28M|#define get_last_sys_error() errno
  ------------------
  669|       |
  670|  9.28M|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|  9.28M|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (670:9): [True: 0, False: 9.28M]
  ------------------
  671|      0|        return NULL;
  672|       |
  673|  9.28M|    state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  674|  9.28M|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   25|  9.28M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  675|  9.28M|    if (state == (ERR_STATE *)-1)
  ------------------
  |  Branch (675:9): [True: 0, False: 9.28M]
  ------------------
  676|      0|        return NULL;
  677|       |
  678|  9.28M|    if (state == NULL) {
  ------------------
  |  Branch (678:9): [True: 1, False: 9.28M]
  ------------------
  679|      1|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (679:13): [True: 0, False: 1]
  ------------------
  680|      1|                CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  681|      0|            return NULL;
  682|       |
  683|      1|        state = OSSL_ERR_STATE_new();
  684|      1|        if (state == NULL) {
  ------------------
  |  Branch (684:13): [True: 0, False: 1]
  ------------------
  685|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  686|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   25|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  687|      0|            return NULL;
  688|      0|        }
  689|       |
  690|      1|        if (!ossl_init_thread_start(NULL, NULL, err_delete_thread_state)
  ------------------
  |  Branch (690:13): [True: 0, False: 1]
  ------------------
  691|      1|            || !CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (691:16): [True: 0, False: 1]
  ------------------
  692|      1|                CRYPTO_THREAD_NO_CONTEXT, state)) {
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  693|      0|            OSSL_ERR_STATE_free(state);
  694|      0|            CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  695|      0|                CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   25|      0|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  696|      0|            return NULL;
  697|      0|        }
  698|       |
  699|       |        /* Ignore failures from these */
  700|      1|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ------------------
  |  |  505|      1|#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
  ------------------
  701|      1|    }
  702|       |
  703|  9.28M|    set_sys_error(saveerrno);
  ------------------
  |  |   32|  9.28M|#define set_sys_error(e) errno = (e)
  ------------------
  704|  9.28M|    return state;
  705|  9.28M|}
err_shelve_state:
  719|      1|{
  720|      1|    int saveerrno = get_last_sys_error();
  ------------------
  |  |   30|      1|#define get_last_sys_error() errno
  ------------------
  721|       |
  722|       |    /*
  723|       |     * Note, at present our only caller is OPENSSL_init_crypto(), indirectly
  724|       |     * via ossl_init_load_crypto_nodelete(), by which point the requested
  725|       |     * "base" initialization has already been performed, so the below call is a
  726|       |     * NOOP, that re-enters OPENSSL_init_crypto() only to quickly return.
  727|       |     *
  728|       |     * If are no other valid callers of this function, the call below can be
  729|       |     * removed, avoiding the re-entry into OPENSSL_init_crypto().  If there are
  730|       |     * potential uses that are not from inside OPENSSL_init_crypto(), then this
  731|       |     * call is needed, but some care is required to make sure that the re-entry
  732|       |     * remains a NOOP.
  733|       |     */
  734|      1|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      1|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (734:9): [True: 0, False: 1]
  ------------------
  735|      0|        return 0;
  736|       |
  737|      1|    *state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  738|      1|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  739|      1|    if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  ------------------
  |  Branch (739:9): [True: 0, False: 1]
  ------------------
  740|      1|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)-1))
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  741|      0|        return 0;
  742|       |
  743|      1|    set_sys_error(saveerrno);
  ------------------
  |  |   32|      1|#define set_sys_error(e) errno = (e)
  ------------------
  744|      1|    return 1;
  745|      1|}
err_unshelve_state:
  752|      1|{
  753|      1|    if (state != (void *)-1)
  ------------------
  |  Branch (753:9): [True: 1, False: 0]
  ------------------
  754|      1|        CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  755|      1|            CRYPTO_THREAD_NO_CONTEXT, (ERR_STATE *)state);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  756|      1|}
ERR_get_next_error_library:
  759|    931|{
  760|    931|    int ret;
  761|       |
  762|    931|    if (!RUN_ONCE(&err_string_init, do_err_strings_init))
  ------------------
  |  |  130|    931|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 931, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (762:9): [True: 0, False: 931]
  ------------------
  763|      0|        return 0;
  764|       |
  765|    931|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (765:9): [True: 0, False: 931]
  ------------------
  766|      0|        return 0;
  767|    931|    ret = int_err_library_number++;
  768|    931|    CRYPTO_THREAD_unlock(err_string_lock);
  769|    931|    return ret;
  770|    931|}
ERR_add_error_data:
  807|     10|{
  808|     10|    va_list args;
  809|     10|    va_start(args, num);
  810|     10|    ERR_add_error_vdata(num, args);
  811|       |    va_end(args);
  812|     10|}
ERR_add_error_vdata:
  815|     10|{
  816|     10|    int i;
  817|     10|    size_t len, size;
  818|     10|    int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   50|     10|#define ERR_TXT_MALLOCED 0x01
  ------------------
                  int flags = ERR_TXT_MALLOCED | ERR_TXT_STRING;
  ------------------
  |  |   51|     10|#define ERR_TXT_STRING 0x02
  ------------------
  819|     10|    char *str, *arg;
  820|     10|    ERR_STATE *es;
  821|       |
  822|       |    /* Get the current error data; if an allocated string get it. */
  823|     10|    es = ossl_err_get_state_int();
  824|     10|    if (es == NULL)
  ------------------
  |  Branch (824:9): [True: 0, False: 10]
  ------------------
  825|      0|        return;
  826|     10|    i = es->top;
  827|       |
  828|       |    /*
  829|       |     * If err_data is allocated already, reuse the space.
  830|       |     * Otherwise, allocate a small new buffer.
  831|       |     */
  832|     10|    if ((es->err_data_flags[i] & flags) == flags
  ------------------
  |  Branch (832:9): [True: 0, False: 10]
  ------------------
  833|      0|        && ossl_assert(es->err_data[i] != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  834|      0|        str = es->err_data[i];
  835|      0|        size = es->err_data_size[i];
  836|       |
  837|       |        /*
  838|       |         * To protect the string we just grabbed from tampering by other
  839|       |         * functions we may call, or to protect them from freeing a pointer
  840|       |         * that may no longer be valid at that point, we clear away the
  841|       |         * data pointer and the flags.  We will set them again at the end
  842|       |         * of this function.
  843|       |         */
  844|      0|        es->err_data[i] = NULL;
  845|      0|        es->err_data_flags[i] = 0;
  846|     10|    } else if ((str = OPENSSL_malloc(size = 81)) == NULL) {
  ------------------
  |  |  106|     10|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (846:16): [True: 0, False: 10]
  ------------------
  847|      0|        return;
  848|     10|    } else {
  849|     10|        str[0] = '\0';
  850|     10|    }
  851|     10|    len = strlen(str);
  852|       |
  853|     30|    while (--num >= 0) {
  ------------------
  |  Branch (853:12): [True: 20, False: 10]
  ------------------
  854|     20|        arg = va_arg(args, char *);
  855|     20|        if (arg == NULL)
  ------------------
  |  Branch (855:13): [True: 0, False: 20]
  ------------------
  856|      0|            arg = "<NULL>";
  857|     20|        len += strlen(arg);
  858|     20|        if (len >= size) {
  ------------------
  |  Branch (858:13): [True: 0, False: 20]
  ------------------
  859|      0|            char *p;
  860|       |
  861|      0|            size = len + 20;
  862|      0|            p = OPENSSL_realloc(str, size);
  ------------------
  |  |  120|      0|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  863|      0|            if (p == NULL) {
  ------------------
  |  Branch (863:17): [True: 0, False: 0]
  ------------------
  864|      0|                OPENSSL_free(str);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  865|      0|                return;
  866|      0|            }
  867|      0|            str = p;
  868|      0|        }
  869|     20|        OPENSSL_strlcat(str, arg, size);
  870|     20|    }
  871|     10|    if (!err_set_error_data_int(str, size, flags, 0))
  ------------------
  |  Branch (871:9): [True: 0, False: 10]
  ------------------
  872|      0|        OPENSSL_free(str);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  873|     10|}
err.c:do_err_strings_init:
  213|      1|{
  214|      1|    if (!OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL))
  ------------------
  |  |   31|      1|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  |  Branch (214:9): [True: 0, False: 1]
  ------------------
  215|      0|        return 0;
  216|      1|    err_string_lock = CRYPTO_THREAD_lock_new();
  217|      1|    if (err_string_lock == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 1]
  ------------------
  218|      0|        return 0;
  219|      1|#ifndef OPENSSL_NO_ERR
  220|      1|    int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash,
  ------------------
  |  |  377|      1|#define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)), lh_ERR_STRING_DATA_hash_thunk, lh_ERR_STRING_DATA_comp_thunk, lh_ERR_STRING_DATA_doall_thunk, lh_ERR_STRING_DATA_doall_arg_thunk))
  ------------------
  221|      1|        err_string_data_cmp);
  222|      1|    if (int_error_hash == NULL) {
  ------------------
  |  Branch (222:9): [True: 0, False: 1]
  ------------------
  223|      0|        CRYPTO_THREAD_lock_free(err_string_lock);
  224|      0|        err_string_lock = NULL;
  225|      0|        return 0;
  226|      0|    }
  227|      1|#endif
  228|      1|    return 1;
  229|      1|}
err.c:err_string_data_hash:
  171|  7.78k|{
  172|  7.78k|    unsigned long ret, l;
  173|       |
  174|  7.78k|    l = a->error;
  175|  7.78k|    ret = l ^ ERR_GET_LIB(l);
  176|  7.78k|    return (ret ^ ret % 19 * 13);
  177|  7.78k|}
err.c:err_string_data_cmp:
  181|  6.24k|{
  182|  6.24k|    if (a->error == b->error)
  ------------------
  |  Branch (182:9): [True: 5.77k, False: 462]
  ------------------
  183|  5.77k|        return 0;
  184|    462|    return a->error > b->error ? 1 : -1;
  ------------------
  |  Branch (184:12): [True: 363, False: 99]
  ------------------
  185|  6.24k|}
err.c:err_load_strings:
  257|    110|{
  258|    110|    if (!CRYPTO_THREAD_write_lock(err_string_lock))
  ------------------
  |  Branch (258:9): [True: 0, False: 110]
  ------------------
  259|      0|        return 0;
  260|  4.96k|    for (; str->error; str++)
  ------------------
  |  Branch (260:12): [True: 4.85k, False: 110]
  ------------------
  261|  4.85k|        (void)lh_ERR_STRING_DATA_insert(int_error_hash,
  ------------------
  |  |  380|  4.96k|#define lh_ERR_STRING_DATA_insert(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_insert(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_ERR_STRING_DATA_lh_plain_type(ptr)))
  ------------------
  262|    110|            (ERR_STRING_DATA *)str);
  263|    110|    CRYPTO_THREAD_unlock(err_string_lock);
  264|    110|    return 1;
  265|    110|}
err.c:get_error_values:
  445|   576k|{
  446|   576k|    int i = 0;
  447|   576k|    ERR_STATE *es;
  448|   576k|    unsigned long ret;
  449|       |
  450|   576k|    es = ossl_err_get_state_int();
  451|   576k|    if (es == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 576k]
  ------------------
  452|      0|        return 0;
  453|       |
  454|       |    /*
  455|       |     * Clear anything that should have been cleared earlier. We do this
  456|       |     * here because this doesn't have constant-time issues.
  457|       |     */
  458|   576k|    while (es->bottom != es->top) {
  ------------------
  |  Branch (458:12): [True: 399k, False: 177k]
  ------------------
  459|   399k|        if (es->err_flags[es->top] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   55|   399k|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (459:13): [True: 0, False: 399k]
  ------------------
  460|      0|            err_clear(es, es->top, 0);
  461|      0|            es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   57|      0|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (461:23): [True: 0, False: 0]
  ------------------
  462|      0|            continue;
  463|      0|        }
  464|   399k|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   57|   399k|#define ERR_NUM_ERRORS 16
  ------------------
  465|   399k|        if (es->err_flags[i] & ERR_FLAG_CLEAR) {
  ------------------
  |  |   55|   399k|#define ERR_FLAG_CLEAR 0x02
  ------------------
  |  Branch (465:13): [True: 0, False: 399k]
  ------------------
  466|      0|            es->bottom = i;
  467|      0|            err_clear(es, es->bottom, 0);
  468|      0|            continue;
  469|      0|        }
  470|   399k|        break;
  471|   399k|    }
  472|       |
  473|       |    /* If everything has been cleared, the stack is empty. */
  474|   576k|    if (es->bottom == es->top)
  ------------------
  |  Branch (474:9): [True: 177k, False: 399k]
  ------------------
  475|   177k|        return 0;
  476|       |
  477|       |    /* Which error, the top of stack (latest one) or the first one? */
  478|   399k|    if (g == EV_PEEK_LAST)
  ------------------
  |  Branch (478:9): [True: 397k, False: 2.67k]
  ------------------
  479|   397k|        i = es->top;
  480|  2.67k|    else
  481|  2.67k|        i = (es->bottom + 1) % ERR_NUM_ERRORS;
  ------------------
  |  |   57|  2.67k|#define ERR_NUM_ERRORS 16
  ------------------
  482|       |
  483|   399k|    ret = es->err_buffer[i];
  484|   399k|    if (g == EV_POP) {
  ------------------
  |  Branch (484:9): [True: 1.39k, False: 398k]
  ------------------
  485|  1.39k|        es->bottom = i;
  486|  1.39k|        es->err_buffer[i] = 0;
  487|  1.39k|    }
  488|       |
  489|   399k|    if (file != NULL) {
  ------------------
  |  Branch (489:9): [True: 0, False: 399k]
  ------------------
  490|      0|        *file = es->err_file[i];
  491|      0|        if (*file == NULL)
  ------------------
  |  Branch (491:13): [True: 0, False: 0]
  ------------------
  492|      0|            *file = "";
  493|      0|    }
  494|   399k|    if (line != NULL)
  ------------------
  |  Branch (494:9): [True: 0, False: 399k]
  ------------------
  495|      0|        *line = es->err_line[i];
  496|   399k|    if (func != NULL) {
  ------------------
  |  Branch (496:9): [True: 0, False: 399k]
  ------------------
  497|      0|        *func = es->err_func[i];
  498|      0|        if (*func == NULL)
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|            *func = "";
  500|      0|    }
  501|   399k|    if (flags != NULL)
  ------------------
  |  Branch (501:9): [True: 0, False: 399k]
  ------------------
  502|      0|        *flags = es->err_data_flags[i];
  503|   399k|    if (data == NULL) {
  ------------------
  |  Branch (503:9): [True: 399k, False: 0]
  ------------------
  504|   399k|        if (g == EV_POP) {
  ------------------
  |  Branch (504:13): [True: 1.39k, False: 398k]
  ------------------
  505|  1.39k|            err_clear_data(es, i, 0);
  506|  1.39k|        }
  507|   399k|    } else {
  508|      0|        *data = es->err_data[i];
  509|      0|        if (*data == NULL) {
  ------------------
  |  Branch (509:13): [True: 0, False: 0]
  ------------------
  510|      0|            *data = "";
  511|      0|            if (flags != NULL)
  ------------------
  |  Branch (511:17): [True: 0, False: 0]
  ------------------
  512|      0|                *flags = 0;
  513|      0|        }
  514|      0|    }
  515|   399k|    return ret;
  516|   576k|}
err.c:int_err_get_item:
  188|  2.93k|{
  189|  2.93k|    ERR_STRING_DATA *p = NULL;
  190|       |
  191|  2.93k|    if (!CRYPTO_THREAD_read_lock(err_string_lock))
  ------------------
  |  Branch (191:9): [True: 0, False: 2.93k]
  ------------------
  192|      0|        return NULL;
  193|  2.93k|    p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d);
  ------------------
  |  |  382|  2.93k|#define lh_ERR_STRING_DATA_retrieve(lh, ptr) ((ERR_STRING_DATA *)OPENSSL_LH_retrieve(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_const_ERR_STRING_DATA_lh_plain_type(ptr)))
  ------------------
  194|  2.93k|    CRYPTO_THREAD_unlock(err_string_lock);
  195|       |
  196|  2.93k|    return p;
  197|  2.93k|}
err.c:err_delete_thread_state:
  641|      1|{
  642|      1|    ERR_STATE *state = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  643|      1|        CRYPTO_THREAD_NO_CONTEXT);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  644|       |
  645|      1|    if (state == NULL)
  ------------------
  |  Branch (645:9): [True: 0, False: 1]
  ------------------
  646|      0|        return;
  647|       |
  648|      1|    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_ERR_KEY,
  649|      1|        CRYPTO_THREAD_NO_CONTEXT, NULL);
  ------------------
  |  |   25|      1|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  650|      1|    OSSL_ERR_STATE_free(state);
  651|      1|}
err.c:err_set_error_data_int:
  774|     10|{
  775|     10|    ERR_STATE *es;
  776|       |
  777|     10|    es = ossl_err_get_state_int();
  778|     10|    if (es == NULL)
  ------------------
  |  Branch (778:9): [True: 0, False: 10]
  ------------------
  779|      0|        return 0;
  780|       |
  781|     10|    err_clear_data(es, es->top, deallocate);
  782|     10|    err_set_data(es, es->top, data, size, flags);
  783|       |
  784|     10|    return 1;
  785|     10|}

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

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

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

ERR_set_mark:
   16|  2.86M|{
   17|  2.86M|    ERR_STATE *es;
   18|       |
   19|  2.86M|    es = ossl_err_get_state_int();
   20|  2.86M|    if (es == NULL)
  ------------------
  |  Branch (20:9): [True: 0, False: 2.86M]
  ------------------
   21|      0|        return 0;
   22|       |
   23|  2.86M|    if (es->bottom == es->top)
  ------------------
  |  Branch (23:9): [True: 2.53M, False: 333k]
  ------------------
   24|  2.53M|        return 0;
   25|   333k|    es->err_marks[es->top]++;
   26|   333k|    return 1;
   27|  2.86M|}
ERR_pop_to_mark:
   43|  1.90M|{
   44|  1.90M|    ERR_STATE *es;
   45|       |
   46|  1.90M|    es = ossl_err_get_state_int();
   47|  1.90M|    if (es == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 1.90M]
  ------------------
   48|      0|        return 0;
   49|       |
   50|  2.88M|    while (es->bottom != es->top
  ------------------
  |  Branch (50:12): [True: 1.24M, False: 1.64M]
  ------------------
   51|  1.24M|        && es->err_marks[es->top] == 0) {
  ------------------
  |  Branch (51:12): [True: 981k, False: 261k]
  ------------------
   52|   981k|        err_clear(es, es->top, 0);
   53|   981k|        es->top = es->top > 0 ? es->top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   57|    950|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (53:19): [True: 980k, False: 950]
  ------------------
   54|   981k|    }
   55|       |
   56|  1.90M|    if (es->bottom == es->top)
  ------------------
  |  Branch (56:9): [True: 1.64M, False: 261k]
  ------------------
   57|  1.64M|        return 0;
   58|   261k|    es->err_marks[es->top]--;
   59|   261k|    return 1;
   60|  1.90M|}
ERR_clear_last_mark:
   82|   962k|{
   83|   962k|    ERR_STATE *es;
   84|   962k|    int top;
   85|       |
   86|   962k|    es = ossl_err_get_state_int();
   87|   962k|    if (es == NULL)
  ------------------
  |  Branch (87:9): [True: 0, False: 962k]
  ------------------
   88|      0|        return 0;
   89|       |
   90|   962k|    top = es->top;
   91|   964k|    while (es->bottom != top
  ------------------
  |  Branch (91:12): [True: 74.3k, False: 889k]
  ------------------
   92|  74.3k|        && es->err_marks[top] == 0) {
  ------------------
  |  Branch (92:12): [True: 2.08k, False: 72.3k]
  ------------------
   93|  2.08k|        top = top > 0 ? top - 1 : ERR_NUM_ERRORS - 1;
  ------------------
  |  |   57|     72|#define ERR_NUM_ERRORS 16
  ------------------
  |  Branch (93:15): [True: 2.01k, False: 72]
  ------------------
   94|  2.08k|    }
   95|       |
   96|   962k|    if (es->bottom == top)
  ------------------
  |  Branch (96:9): [True: 889k, False: 72.3k]
  ------------------
   97|   889k|        return 0;
   98|  72.3k|    es->err_marks[top]--;
   99|  72.3k|    return 1;
  100|   962k|}

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

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

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

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

evp_md_ctx_clear_digest:
   45|  44.6k|{
   46|  44.6k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (46:9): [True: 44.6k, False: 0]
  ------------------
   47|  44.6k|        if (ctx->digest != NULL && ctx->digest->freectx != NULL)
  ------------------
  |  Branch (47:13): [True: 44.6k, False: 0]
  |  Branch (47:36): [True: 44.6k, False: 0]
  ------------------
   48|  44.6k|            ctx->digest->freectx(ctx->algctx);
   49|  44.6k|        ctx->algctx = NULL;
   50|  44.6k|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  217|  44.6k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
   51|  44.6k|    }
   52|       |
   53|       |    /* Code below to be removed when legacy support is dropped. */
   54|       |
   55|       |    /*
   56|       |     * Don't assume ctx->md_data was cleaned in EVP_Digest_Final, because
   57|       |     * sometimes only copies of the context are ever finalised.
   58|       |     */
   59|  44.6k|    cleanup_old_md_data(ctx, force);
   60|  44.6k|    if (force)
  ------------------
  |  Branch (60:9): [True: 0, False: 44.6k]
  ------------------
   61|      0|        ctx->digest = NULL;
   62|       |
   63|  44.6k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_ENGINE)
   64|  44.6k|    ENGINE_finish(ctx->engine);
   65|  44.6k|    ctx->engine = NULL;
   66|  44.6k|#endif
   67|       |
   68|       |    /* Non legacy code, this has to be later than the ctx->digest cleaning */
   69|  44.6k|    if (!keep_fetched) {
  ------------------
  |  Branch (69:9): [True: 44.6k, False: 0]
  ------------------
   70|  44.6k|        EVP_MD_free(ctx->fetched_digest);
   71|  44.6k|        ctx->fetched_digest = NULL;
   72|       |        ctx->reqdigest = NULL;
   73|  44.6k|    }
   74|  44.6k|}
EVP_MD_CTX_reset:
   99|  44.6k|{
  100|  44.6k|    return evp_md_ctx_reset_ex(ctx, 0);
  101|  44.6k|}
EVP_MD_CTX_new:
  130|  44.6k|{
  131|  44.6k|    return OPENSSL_zalloc(sizeof(EVP_MD_CTX));
  ------------------
  |  |  108|  44.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  132|  44.6k|}
EVP_MD_CTX_free:
  135|  64.3k|{
  136|  64.3k|    if (ctx == NULL)
  ------------------
  |  Branch (136:9): [True: 19.7k, False: 44.6k]
  ------------------
  137|  19.7k|        return;
  138|       |
  139|  44.6k|    EVP_MD_CTX_reset(ctx);
  140|  44.6k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  44.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  141|  44.6k|}
evp_md_ctx_free_algctx:
  144|  48.3k|{
  145|  48.3k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (145:9): [True: 3.70k, False: 44.6k]
  ------------------
  146|  3.70k|        if (!ossl_assert(ctx->digest != NULL)) {
  ------------------
  |  |   52|  3.70k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  3.70k|    __FILE__, __LINE__)
  ------------------
  |  Branch (146:13): [True: 0, False: 3.70k]
  ------------------
  147|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  148|      0|            return 0;
  149|      0|        }
  150|  3.70k|        if (ctx->digest->freectx != NULL)
  ------------------
  |  Branch (150:13): [True: 3.70k, False: 0]
  ------------------
  151|  3.70k|            ctx->digest->freectx(ctx->algctx);
  152|  3.70k|        ctx->algctx = NULL;
  153|  3.70k|    }
  154|  48.3k|    return 1;
  155|  48.3k|}
EVP_DigestInit_ex:
  381|  64.3k|{
  382|       |    return evp_md_init_internal(ctx, type, NULL, impl);
  383|  64.3k|}
EVP_DigestUpdate:
  386|  1.78M|{
  387|  1.78M|    if (ossl_unlikely(count == 0))
  ------------------
  |  |   23|  1.78M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 2.77k, False: 1.78M]
  |  |  ------------------
  ------------------
  388|  2.77k|        return 1;
  389|       |
  390|  1.78M|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  1.78M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78M]
  |  |  ------------------
  ------------------
  391|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|        return 0;
  393|      0|    }
  394|       |
  395|  1.78M|    if (ossl_unlikely(ctx->pctx != NULL)
  ------------------
  |  |   23|  3.56M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78M]
  |  |  ------------------
  ------------------
  396|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  744|  1.78M|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  397|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (397:12): [True: 0, False: 0]
  ------------------
  398|      0|#ifndef FIPS_MODULE
  399|       |        /*
  400|       |         * Prior to OpenSSL 3.0 EVP_DigestSignUpdate() and
  401|       |         * EVP_DigestVerifyUpdate() were just macros for EVP_DigestUpdate().
  402|       |         * Some code calls EVP_DigestUpdate() directly even when initialised
  403|       |         * with EVP_DigestSignInit_ex() or
  404|       |         * EVP_DigestVerifyInit_ex(), so we detect that and redirect to
  405|       |         * the correct EVP_Digest*Update() function
  406|       |         */
  407|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (407:13): [True: 0, False: 0]
  ------------------
  408|      0|            return EVP_DigestSignUpdate(ctx, data, count);
  409|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|            return EVP_DigestVerifyUpdate(ctx, data, count);
  411|      0|#endif
  412|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  413|      0|        return 0;
  414|      0|    }
  415|       |
  416|  1.78M|    if (ctx->digest == NULL
  ------------------
  |  Branch (416:9): [True: 0, False: 1.78M]
  ------------------
  417|  1.78M|        || ctx->digest->prov == NULL
  ------------------
  |  Branch (417:12): [True: 0, False: 1.78M]
  ------------------
  418|  1.78M|        || ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0))
  ------------------
  |  |   23|  1.78M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78M]
  |  |  ------------------
  ------------------
  419|      0|        goto legacy;
  420|       |
  421|  1.78M|    if (ossl_unlikely(ctx->digest->dupdate == NULL)) {
  ------------------
  |  |   23|  1.78M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.78M]
  |  |  ------------------
  ------------------
  422|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  423|      0|        return 0;
  424|      0|    }
  425|  1.78M|    return ctx->digest->dupdate(ctx->algctx, data, count);
  426|       |
  427|       |    /* Code below to be removed when legacy support is dropped. */
  428|      0|legacy:
  429|      0|    return ctx->update != NULL ? ctx->update(ctx, data, count) : 0;
  ------------------
  |  Branch (429:12): [True: 0, False: 0]
  ------------------
  430|  1.78M|}
EVP_DigestFinal_ex:
  443|  45.8k|{
  444|  45.8k|    int ret, sz;
  445|  45.8k|    size_t size = 0;
  446|  45.8k|    size_t mdsize = 0;
  447|       |
  448|  45.8k|    if (ossl_unlikely(ctx->digest == NULL))
  ------------------
  |  |   23|  45.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  449|      0|        return 0;
  450|       |
  451|  45.8k|    sz = EVP_MD_CTX_get_size(ctx);
  ------------------
  |  |  589|  45.8k|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
  452|  45.8k|    if (ossl_unlikely(sz < 0))
  ------------------
  |  |   23|  45.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  453|      0|        return 0;
  454|  45.8k|    mdsize = sz;
  455|  45.8k|    if (ossl_unlikely(ctx->digest->prov == NULL))
  ------------------
  |  |   23|  45.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  456|      0|        goto legacy;
  457|       |
  458|  45.8k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|  45.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  459|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        return 0;
  461|      0|    }
  462|       |
  463|  45.8k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  45.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  464|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  465|      0|        return 0;
  466|      0|    }
  467|       |
  468|  45.8k|    ret = ctx->digest->dfinal(ctx->algctx, md, &size, mdsize);
  469|       |
  470|  45.8k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|  45.8k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  471|       |
  472|  45.8k|    if (isize != NULL) {
  ------------------
  |  Branch (472:9): [True: 2.47k, False: 43.3k]
  ------------------
  473|  2.47k|        if (ossl_likely(size <= UINT_MAX)) {
  ------------------
  |  |   22|  2.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.47k, False: 0]
  |  |  ------------------
  ------------------
  474|  2.47k|            *isize = (unsigned int)size;
  475|  2.47k|        } else {
  476|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  477|      0|            ret = 0;
  478|      0|        }
  479|  2.47k|    }
  480|       |
  481|  45.8k|    return ret;
  482|       |
  483|       |    /* Code below to be removed when legacy support is dropped. */
  484|      0|legacy:
  485|      0|    OPENSSL_assert(mdsize <= EVP_MAX_MD_SIZE);
  ------------------
  |  |  476|      0|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:12): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  486|      0|    ret = ctx->digest->final(ctx, md);
  487|      0|    if (isize != NULL)
  ------------------
  |  Branch (487:9): [True: 0, False: 0]
  ------------------
  488|      0|        *isize = (unsigned int)mdsize;
  489|      0|    if (ctx->digest->cleanup) {
  ------------------
  |  Branch (489:9): [True: 0, False: 0]
  ------------------
  490|      0|        ctx->digest->cleanup(ctx);
  491|      0|        EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  217|      0|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
  492|      0|    }
  493|      0|    OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);
  494|      0|    return ret;
  495|  45.8k|}
EVP_DigestFinalXOF:
  499|  7.41k|{
  500|  7.41k|    int ret = 0;
  501|  7.41k|    OSSL_PARAM params[2];
  502|  7.41k|    size_t i = 0;
  503|       |
  504|  7.41k|    if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|  7.41k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  505|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  506|      0|        return 0;
  507|      0|    }
  508|       |
  509|  7.41k|    if (ossl_unlikely(ctx->digest->prov == NULL))
  ------------------
  |  |   23|  7.41k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  510|      0|        goto legacy;
  511|       |
  512|  7.41k|    if (ossl_unlikely(ctx->digest->dfinal == NULL)) {
  ------------------
  |  |   23|  7.41k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  513|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  514|      0|        return 0;
  515|      0|    }
  516|       |
  517|  7.41k|    if (ossl_unlikely((ctx->flags & EVP_MD_CTX_FLAG_FINALISED) != 0)) {
  ------------------
  |  |   23|  7.41k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  518|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_FINAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  519|      0|        return 0;
  520|      0|    }
  521|       |
  522|       |    /*
  523|       |     * For backward compatibility we pass the XOFLEN via a param here so that
  524|       |     * older providers can use the supplied value. Ideally we should have just
  525|       |     * used the size passed into ctx->digest->dfinal().
  526|       |     */
  527|  7.41k|    params[i++] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_XOFLEN, &size);
  ------------------
  |  |  232|  7.41k|# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
  ------------------
  528|  7.41k|    params[i++] = OSSL_PARAM_construct_end();
  529|       |
  530|  7.41k|    if (ossl_likely(EVP_MD_CTX_set_params(ctx, params) >= 0))
  ------------------
  |  |   22|  7.41k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.41k, False: 0]
  |  |  ------------------
  ------------------
  531|  7.41k|        ret = ctx->digest->dfinal(ctx->algctx, md, &size, size);
  532|       |
  533|  7.41k|    ctx->flags |= EVP_MD_CTX_FLAG_FINALISED;
  ------------------
  |  |   33|  7.41k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  534|       |
  535|  7.41k|    return ret;
  536|       |
  537|      0|legacy:
  538|      0|    if (EVP_MD_xof(ctx->digest)
  ------------------
  |  Branch (538:9): [True: 0, False: 0]
  ------------------
  539|      0|        && size <= INT_MAX
  ------------------
  |  Branch (539:12): [True: 0, False: 0]
  ------------------
  540|      0|        && ctx->digest->md_ctrl(ctx, EVP_MD_CTRL_XOF_LEN, (int)size, NULL)) {
  ------------------
  |  |  204|      0|#define EVP_MD_CTRL_XOF_LEN 0x3
  ------------------
  |  Branch (540:12): [True: 0, False: 0]
  ------------------
  541|      0|        ret = ctx->digest->final(ctx, md);
  542|      0|        if (ctx->digest->cleanup != NULL) {
  ------------------
  |  Branch (542:13): [True: 0, False: 0]
  ------------------
  543|      0|            ctx->digest->cleanup(ctx);
  544|      0|            EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
  ------------------
  |  |  217|      0|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
  545|      0|        }
  546|      0|        OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);
  547|      0|    } else {
  548|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NOT_XOF_OR_INVALID_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  549|      0|    }
  550|       |
  551|      0|    return ret;
  552|  7.41k|}
EVP_DigestSqueeze:
  556|  33.4k|{
  557|  33.4k|    if (ctx->digest == NULL) {
  ------------------
  |  Branch (557:9): [True: 0, False: 33.4k]
  ------------------
  558|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  559|      0|        return 0;
  560|      0|    }
  561|       |
  562|  33.4k|    if (ctx->digest->prov == NULL) {
  ------------------
  |  Branch (562:9): [True: 0, False: 33.4k]
  ------------------
  563|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  564|      0|        return 0;
  565|      0|    }
  566|       |
  567|  33.4k|    if (ctx->digest->dsqueeze == NULL) {
  ------------------
  |  Branch (567:9): [True: 0, False: 33.4k]
  ------------------
  568|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  569|      0|        return 0;
  570|      0|    }
  571|       |
  572|  33.4k|    return ctx->digest->dsqueeze(ctx->algctx, md, &size, size);
  573|  33.4k|}
EVP_Digest:
  729|  11.0k|{
  730|  11.0k|    EVP_MD_CTX *ctx = EVP_MD_CTX_new();
  731|  11.0k|    int ret;
  732|       |
  733|  11.0k|    if (ctx == NULL)
  ------------------
  |  Branch (733:9): [True: 0, False: 11.0k]
  ------------------
  734|      0|        return 0;
  735|  11.0k|    EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_ONESHOT);
  ------------------
  |  |  215|  11.0k|#define EVP_MD_CTX_FLAG_ONESHOT 0x0001 /* digest update will be \
  ------------------
  736|  11.0k|    ret = EVP_DigestInit_ex(ctx, type, impl)
  ------------------
  |  Branch (736:11): [True: 11.0k, False: 0]
  ------------------
  737|  11.0k|        && EVP_DigestUpdate(ctx, data, count)
  ------------------
  |  Branch (737:12): [True: 11.0k, False: 0]
  ------------------
  738|  11.0k|        && EVP_DigestFinal_ex(ctx, md, size);
  ------------------
  |  Branch (738:12): [True: 11.0k, False: 0]
  ------------------
  739|  11.0k|    EVP_MD_CTX_free(ctx);
  740|       |
  741|  11.0k|    return ret;
  742|  11.0k|}
EVP_MD_CTX_set_params:
  777|  7.41k|{
  778|  7.41k|    EVP_PKEY_CTX *pctx = ctx->pctx;
  779|       |
  780|       |    /* If we have a pctx then we should try that first */
  781|  7.41k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|  14.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  782|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (782:13): [True: 0, False: 0]
  ------------------
  783|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (783:16): [True: 0, False: 0]
  ------------------
  784|      0|        && pctx->op.sig.algctx != NULL
  ------------------
  |  Branch (784:12): [True: 0, False: 0]
  ------------------
  785|      0|        && pctx->op.sig.signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (785:12): [True: 0, False: 0]
  ------------------
  786|      0|        return pctx->op.sig.signature->set_ctx_md_params(pctx->op.sig.algctx,
  787|      0|            params);
  788|       |
  789|  7.41k|    if (ossl_likely(ctx->digest != NULL && ctx->digest->set_ctx_params != NULL))
  ------------------
  |  |   22|  14.8k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.41k, False: 0]
  |  |  |  Branch (22:44): [True: 7.41k, False: 0]
  |  |  |  Branch (22:44): [True: 7.41k, False: 0]
  |  |  ------------------
  ------------------
  790|  7.41k|        return ctx->digest->set_ctx_params(ctx->algctx, params);
  791|       |
  792|      0|    return 0;
  793|  7.41k|}
EVP_MD_CTX_gettable_params:
  863|  45.8k|{
  864|  45.8k|    EVP_PKEY_CTX *pctx;
  865|  45.8k|    void *provctx;
  866|       |
  867|  45.8k|    if (ossl_unlikely(ctx == NULL))
  ------------------
  |  |   23|  45.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  868|      0|        return NULL;
  869|       |
  870|       |    /* If we have a pctx then we should try that first */
  871|  45.8k|    pctx = ctx->pctx;
  872|  45.8k|    if (ossl_unlikely(pctx != NULL)
  ------------------
  |  |   23|  91.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  873|      0|        && (pctx->operation == EVP_PKEY_OP_VERIFYCTX
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (873:13): [True: 0, False: 0]
  ------------------
  874|      0|            || pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (874:16): [True: 0, False: 0]
  ------------------
  875|      0|        && pctx->op.sig.signature != NULL
  ------------------
  |  Branch (875:12): [True: 0, False: 0]
  ------------------
  876|      0|        && pctx->op.sig.signature->gettable_ctx_md_params != NULL
  ------------------
  |  Branch (876:12): [True: 0, False: 0]
  ------------------
  877|      0|        && pctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (877:12): [True: 0, False: 0]
  ------------------
  878|      0|        return pctx->op.sig.signature->gettable_ctx_md_params(
  879|      0|            pctx->op.sig.algctx);
  880|       |
  881|  45.8k|    if (ossl_unlikely(ctx->digest != NULL
  ------------------
  |  |   23|  91.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 45.8k]
  |  |  |  Branch (23:46): [True: 45.8k, False: 0]
  |  |  |  Branch (23:46): [True: 0, False: 45.8k]
  |  |  ------------------
  ------------------
  882|  45.8k|            && ctx->digest->gettable_ctx_params != NULL)) {
  883|      0|        provctx = ossl_provider_ctx(EVP_MD_get0_provider(ctx->digest));
  884|      0|        return ctx->digest->gettable_ctx_params(ctx->algctx, provctx);
  885|      0|    }
  886|  45.8k|    return NULL;
  887|  45.8k|}
evp_md_new:
  943|  14.2k|{
  944|  14.2k|    EVP_MD *md = OPENSSL_zalloc(sizeof(*md));
  ------------------
  |  |  108|  14.2k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  945|       |
  946|  14.2k|    if (md != NULL && !CRYPTO_NEW_REF(&md->refcnt, 1)) {
  ------------------
  |  Branch (946:9): [True: 14.2k, False: 0]
  |  Branch (946:23): [True: 0, False: 14.2k]
  ------------------
  947|      0|        OPENSSL_free(md);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  948|      0|        return NULL;
  949|      0|    }
  950|  14.2k|    return md;
  951|  14.2k|}
EVP_MD_fetch:
 1162|  81.7k|{
 1163|  81.7k|    EVP_MD *md = evp_generic_fetch(ctx, OSSL_OP_DIGEST, algorithm, properties,
  ------------------
  |  |  283|  81.7k|#define OSSL_OP_DIGEST 1
  ------------------
 1164|  81.7k|        evp_md_from_algorithm, evp_md_up_ref, evp_md_free);
 1165|       |
 1166|  81.7k|    return md;
 1167|  81.7k|}
EVP_MD_up_ref:
 1170|   102k|{
 1171|   102k|    int ref = 0;
 1172|       |
 1173|   102k|    if (md->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   102k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1173:9): [True: 102k, False: 0]
  ------------------
 1174|   102k|        CRYPTO_UP_REF(&md->refcnt, &ref);
 1175|   102k|    return 1;
 1176|   102k|}
EVP_MD_free:
 1179|   161k|{
 1180|   161k|    int i;
 1181|       |
 1182|   161k|    if (md == NULL || md->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   116k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (1182:9): [True: 44.6k, False: 116k]
  |  Branch (1182:23): [True: 0, False: 116k]
  ------------------
 1183|  44.6k|        return;
 1184|       |
 1185|   116k|    CRYPTO_DOWN_REF(&md->refcnt, &i);
 1186|   116k|    if (i > 0)
  ------------------
  |  Branch (1186:9): [True: 102k, False: 14.2k]
  ------------------
 1187|   102k|        return;
 1188|  14.2k|    evp_md_free_int(md);
 1189|  14.2k|}
digest.c:cleanup_old_md_data:
   30|   108k|{
   31|   108k|    if (ctx->digest != NULL) {
  ------------------
  |  Branch (31:9): [True: 64.3k, False: 44.6k]
  ------------------
   32|  64.3k|        if (ctx->digest->cleanup != NULL
  ------------------
  |  Branch (32:13): [True: 0, False: 64.3k]
  ------------------
   33|      0|            && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_CLEANED))
  ------------------
  |  |  217|      0|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
  |  Branch (33:16): [True: 0, False: 0]
  ------------------
   34|      0|            ctx->digest->cleanup(ctx);
   35|  64.3k|        if (ctx->md_data != NULL && ctx->digest->ctx_size > 0
  ------------------
  |  Branch (35:13): [True: 0, False: 64.3k]
  |  Branch (35:37): [True: 0, False: 0]
  ------------------
   36|      0|            && (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)
  ------------------
  |  |  219|      0|#define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data \
  ------------------
  |  Branch (36:17): [True: 0, False: 0]
  ------------------
   37|      0|                || force)) {
  ------------------
  |  Branch (37:20): [True: 0, False: 0]
  ------------------
   38|      0|            OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size);
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|       |            ctx->md_data = NULL;
   40|      0|        }
   41|  64.3k|    }
   42|   108k|}
digest.c:evp_md_ctx_reset_ex:
   77|  44.6k|{
   78|  44.6k|    if (ctx == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 44.6k]
  ------------------
   79|      0|        return 1;
   80|       |
   81|       |    /*
   82|       |     * pctx should be freed by the user of EVP_MD_CTX
   83|       |     * if EVP_MD_CTX_FLAG_KEEP_PKEY_CTX is set
   84|       |     */
   85|  44.6k|    if (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX)) {
  ------------------
  |  |   32|  44.6k|#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400
  ------------------
  |  Branch (85:9): [True: 44.6k, False: 0]
  ------------------
   86|  44.6k|        EVP_PKEY_CTX_free(ctx->pctx);
   87|  44.6k|        ctx->pctx = NULL;
   88|  44.6k|    }
   89|       |
   90|  44.6k|    evp_md_ctx_clear_digest(ctx, 0, keep_fetched);
   91|  44.6k|    if (!keep_fetched)
  ------------------
  |  Branch (91:9): [True: 44.6k, False: 0]
  ------------------
   92|  44.6k|        OPENSSL_cleanse(ctx, sizeof(*ctx));
   93|       |
   94|  44.6k|    return 1;
   95|  44.6k|}
digest.c:evp_md_init_internal:
  159|  64.3k|{
  160|  64.3k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  161|  64.3k|    ENGINE *tmpimpl = NULL;
  162|  64.3k|#endif
  163|       |
  164|  64.3k|#if !defined(FIPS_MODULE)
  165|  64.3k|    if (ctx->pctx != NULL
  ------------------
  |  Branch (165:9): [True: 0, False: 64.3k]
  ------------------
  166|      0|        && EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  744|  64.3k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  167|      0|        && ctx->pctx->op.sig.algctx != NULL) {
  ------------------
  |  Branch (167:12): [True: 0, False: 0]
  ------------------
  168|       |        /*
  169|       |         * Prior to OpenSSL 3.0 calling EVP_DigestInit_ex() on an mdctx
  170|       |         * previously initialised with EVP_DigestSignInit() would retain
  171|       |         * information about the key, and re-initialise for another sign
  172|       |         * operation. So in that case we redirect to EVP_DigestSignInit()
  173|       |         */
  174|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_SIGNCTX)
  ------------------
  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            return EVP_DigestSignInit(ctx, NULL, type, impl, NULL);
  176|      0|        if (ctx->pctx->operation == EVP_PKEY_OP_VERIFYCTX)
  ------------------
  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  ------------------
  |  Branch (176:13): [True: 0, False: 0]
  ------------------
  177|      0|            return EVP_DigestVerifyInit(ctx, NULL, type, impl, NULL);
  178|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|        return 0;
  180|      0|    }
  181|  64.3k|#endif
  182|       |
  183|  64.3k|    EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |  217|  64.3k|#define EVP_MD_CTX_FLAG_CLEANED 0x0002 /* context has already been \
  ------------------
                  EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED | EVP_MD_CTX_FLAG_FINALISED);
  ------------------
  |  |   33|  64.3k|#define EVP_MD_CTX_FLAG_FINALISED 0x0800
  ------------------
  184|       |
  185|  64.3k|    if (type != NULL) {
  ------------------
  |  Branch (185:9): [True: 64.3k, False: 0]
  ------------------
  186|  64.3k|        ctx->reqdigest = type;
  187|  64.3k|    } else {
  188|      0|        if (ossl_unlikely(ctx->digest == NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  189|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_NO_DIGEST_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|            return 0;
  191|      0|        }
  192|      0|        type = ctx->digest;
  193|      0|    }
  194|       |
  195|       |    /* Code below to be removed when legacy support is dropped. */
  196|  64.3k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  197|       |    /*
  198|       |     * Whether it's nice or not, "Inits" can be used on "Final"'d contexts so
  199|       |     * this context may already have an ENGINE! Try to avoid releasing the
  200|       |     * previous handle, re-querying for an ENGINE, and having a
  201|       |     * reinitialisation, when it may all be unnecessary.
  202|       |     */
  203|  64.3k|    if (ossl_unlikely(ctx->engine != NULL)
  ------------------
  |  |   23|   128k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 64.3k]
  |  |  ------------------
  ------------------
  204|      0|        && ctx->digest != NULL
  ------------------
  |  Branch (204:12): [True: 0, False: 0]
  ------------------
  205|      0|        && type->type == ctx->digest->type)
  ------------------
  |  Branch (205:12): [True: 0, False: 0]
  ------------------
  206|      0|        goto skip_to_init;
  207|       |
  208|       |    /*
  209|       |     * Ensure an ENGINE left lying around from last time is cleared (the
  210|       |     * previous check attempted to avoid this if the same ENGINE and
  211|       |     * EVP_MD could be used).
  212|       |     */
  213|  64.3k|    ENGINE_finish(ctx->engine);
  214|  64.3k|    ctx->engine = NULL;
  215|       |
  216|  64.3k|    if (impl == NULL)
  ------------------
  |  Branch (216:9): [True: 64.3k, False: 0]
  ------------------
  217|  64.3k|        tmpimpl = ENGINE_get_digest_engine(type->type);
  218|  64.3k|#endif
  219|       |
  220|       |    /*
  221|       |     * If there are engines involved or EVP_MD_CTX_FLAG_NO_INIT is set then we
  222|       |     * should use legacy handling for now.
  223|       |     */
  224|  64.3k|    if (impl != NULL
  ------------------
  |  Branch (224:9): [True: 0, False: 64.3k]
  ------------------
  225|  64.3k|#if !defined(OPENSSL_NO_ENGINE)
  226|  64.3k|        || ctx->engine != NULL
  ------------------
  |  Branch (226:12): [True: 0, False: 64.3k]
  ------------------
  227|  64.3k|#if !defined(FIPS_MODULE)
  228|  64.3k|        || tmpimpl != NULL
  ------------------
  |  Branch (228:12): [True: 0, False: 64.3k]
  ------------------
  229|  64.3k|#endif
  230|  64.3k|#endif
  231|  64.3k|        || (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) != 0
  ------------------
  |  |  239|  64.3k|#define EVP_MD_CTX_FLAG_NO_INIT 0x0100 /* Don't initialize md_data */
  ------------------
  |  Branch (231:12): [True: 0, False: 64.3k]
  ------------------
  232|  64.3k|        || (type != NULL && type->origin == EVP_ORIG_METH)
  ------------------
  |  |  256|  64.3k|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (232:13): [True: 64.3k, False: 0]
  |  Branch (232:29): [True: 0, False: 64.3k]
  ------------------
  233|  64.3k|        || (type == NULL && ctx->digest != NULL
  ------------------
  |  Branch (233:13): [True: 0, False: 64.3k]
  |  Branch (233:29): [True: 0, False: 0]
  ------------------
  234|      0|            && ctx->digest->origin == EVP_ORIG_METH)) {
  ------------------
  |  |  256|      0|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (234:16): [True: 0, False: 0]
  ------------------
  235|       |        /* If we were using provided hash before, cleanup algctx */
  236|      0|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  ------------------
  237|      0|            return 0;
  238|      0|        if (ctx->digest == ctx->fetched_digest)
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|      0|            ctx->digest = NULL;
  240|      0|        EVP_MD_free(ctx->fetched_digest);
  241|      0|        ctx->fetched_digest = NULL;
  242|      0|        goto legacy;
  243|      0|    }
  244|       |
  245|  64.3k|    cleanup_old_md_data(ctx, 1);
  246|       |
  247|       |    /* Start of non-legacy code below */
  248|  64.3k|    if (ossl_likely(ctx->digest == type)) {
  ------------------
  |  |   22|  64.3k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 16.0k, False: 48.3k]
  |  |  ------------------
  ------------------
  249|  16.0k|        if (ossl_unlikely(!ossl_assert(type->prov != NULL))) {
  ------------------
  |  |   23|  16.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 16.0k]
  |  |  ------------------
  ------------------
  250|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|      0|            return 0;
  252|      0|        }
  253|  48.3k|    } else {
  254|  48.3k|        if (!evp_md_ctx_free_algctx(ctx))
  ------------------
  |  Branch (254:13): [True: 0, False: 48.3k]
  ------------------
  255|      0|            return 0;
  256|  48.3k|    }
  257|       |
  258|  64.3k|    if (ossl_unlikely(type->prov == NULL)) {
  ------------------
  |  |   23|  64.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 32.2k, False: 32.0k]
  |  |  ------------------
  ------------------
  259|       |#ifdef FIPS_MODULE
  260|       |        /* We only do explicit fetches inside the FIPS module */
  261|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  262|       |        return 0;
  263|       |#else
  264|       |        /* The NULL digest is a special case */
  265|  32.2k|        EVP_MD *provmd = EVP_MD_fetch(NULL,
  266|  32.2k|            type->type != NID_undef ? OBJ_nid2sn(type->type)
  ------------------
  |  |   18|  32.2k|#define NID_undef                       0
  ------------------
  |  Branch (266:13): [True: 32.2k, False: 0]
  ------------------
  267|  32.2k|                                    : "NULL",
  268|  32.2k|            "");
  269|       |
  270|  32.2k|        if (provmd == NULL) {
  ------------------
  |  Branch (270:13): [True: 0, False: 32.2k]
  ------------------
  271|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|            return 0;
  273|      0|        }
  274|  32.2k|        type = provmd;
  275|  32.2k|        EVP_MD_free(ctx->fetched_digest);
  276|  32.2k|        ctx->fetched_digest = provmd;
  277|  32.2k|#endif
  278|  32.2k|    }
  279|       |
  280|  64.3k|    if (ossl_unlikely(type->prov != NULL && ctx->fetched_digest != type)) {
  ------------------
  |  |   23|   128k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 16.0k, False: 48.3k]
  |  |  |  Branch (23:46): [True: 64.3k, False: 0]
  |  |  |  Branch (23:46): [True: 16.0k, False: 48.3k]
  |  |  ------------------
  ------------------
  281|  16.0k|        if (ossl_unlikely(!EVP_MD_up_ref((EVP_MD *)type))) {
  ------------------
  |  |   23|  16.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 16.0k]
  |  |  ------------------
  ------------------
  282|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  283|      0|            return 0;
  284|      0|        }
  285|  16.0k|        EVP_MD_free(ctx->fetched_digest);
  286|  16.0k|        ctx->fetched_digest = (EVP_MD *)type;
  287|  16.0k|    }
  288|  64.3k|    ctx->digest = type;
  289|  64.3k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (289:9): [True: 48.3k, False: 16.0k]
  ------------------
  290|  48.3k|        ctx->algctx = ctx->digest->newctx(ossl_provider_ctx(type->prov));
  291|  48.3k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (291:13): [True: 0, False: 48.3k]
  ------------------
  292|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|            return 0;
  294|      0|        }
  295|  48.3k|    }
  296|       |
  297|  64.3k|    if (ctx->digest->dinit == NULL) {
  ------------------
  |  Branch (297:9): [True: 0, False: 64.3k]
  ------------------
  298|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  299|      0|        return 0;
  300|      0|    }
  301|       |
  302|  64.3k|    return ctx->digest->dinit(ctx->algctx, params);
  303|       |
  304|       |    /* Code below to be removed when legacy support is dropped. */
  305|      0|legacy:
  306|       |
  307|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  308|      0|    if (type) {
  ------------------
  |  Branch (308:9): [True: 0, False: 0]
  ------------------
  309|      0|        if (impl != NULL) {
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|            if (!ENGINE_init(impl)) {
  ------------------
  |  Branch (310:17): [True: 0, False: 0]
  ------------------
  311|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  312|      0|                return 0;
  313|      0|            }
  314|      0|        } else {
  315|       |            /* Ask if an ENGINE is reserved for this job */
  316|      0|            impl = tmpimpl;
  317|      0|        }
  318|      0|        if (impl != NULL) {
  ------------------
  |  Branch (318:13): [True: 0, False: 0]
  ------------------
  319|       |            /* There's an ENGINE for this job ... (apparently) */
  320|      0|            const EVP_MD *d = ENGINE_get_digest(impl, type->type);
  321|       |
  322|      0|            if (d == NULL) {
  ------------------
  |  Branch (322:17): [True: 0, False: 0]
  ------------------
  323|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  324|      0|                ENGINE_finish(impl);
  325|      0|                return 0;
  326|      0|            }
  327|       |            /* We'll use the ENGINE's private digest definition */
  328|      0|            type = d;
  329|       |            /*
  330|       |             * Store the ENGINE functional reference so we know 'type' came
  331|       |             * from an ENGINE and we need to release it when done.
  332|       |             */
  333|      0|            ctx->engine = impl;
  334|      0|        } else
  335|      0|            ctx->engine = NULL;
  336|      0|    }
  337|      0|#endif
  338|      0|    if (ctx->digest != type) {
  ------------------
  |  Branch (338:9): [True: 0, False: 0]
  ------------------
  339|      0|        cleanup_old_md_data(ctx, 1);
  340|       |
  341|      0|        ctx->digest = type;
  342|      0|        if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
  ------------------
  |  |  239|      0|#define EVP_MD_CTX_FLAG_NO_INIT 0x0100 /* Don't initialize md_data */
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  |  Branch (342:56): [True: 0, False: 0]
  ------------------
  343|      0|            ctx->update = type->update;
  344|      0|            ctx->md_data = OPENSSL_zalloc(type->ctx_size);
  ------------------
  |  |  108|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  345|      0|            if (ctx->md_data == NULL)
  ------------------
  |  Branch (345:17): [True: 0, False: 0]
  ------------------
  346|      0|                return 0;
  347|      0|        }
  348|      0|    }
  349|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  350|      0|skip_to_init:
  351|      0|#endif
  352|      0|#ifndef FIPS_MODULE
  353|      0|    if (ctx->pctx != NULL
  ------------------
  |  Branch (353:9): [True: 0, False: 0]
  ------------------
  354|      0|        && (!EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx->pctx)
  ------------------
  |  |  744|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (354:13): [True: 0, False: 0]
  ------------------
  355|      0|            || ctx->pctx->op.sig.signature == NULL)) {
  ------------------
  |  Branch (355:16): [True: 0, False: 0]
  ------------------
  356|      0|        int r;
  357|      0|        r = EVP_PKEY_CTX_ctrl(ctx->pctx, -1, EVP_PKEY_OP_TYPE_SIG,
  ------------------
  |  | 1781|      0|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  ------------------
  |  |  |  | 1765|      0|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  ------------------
  |  |  |  | 1775|      0|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  ------------------
  |  | 1782|      0|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  ------------------
  |  |  |  | 1766|      0|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  ------------------
  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  ------------------
  |  |  |  | 1776|      0|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  ------------------
  |  | 1783|      0|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  ------------------
  |  |  |  | 1767|      0|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  ------------------
  |  | 1784|      0|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  ------------------
  |  |  |  | 1768|      0|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  ------------------
  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  ------------------
  |  |  |  | 1769|      0|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  ------------------
  ------------------
  358|      0|            EVP_PKEY_CTRL_DIGESTINIT, 0, ctx);
  ------------------
  |  | 1810|      0|#define EVP_PKEY_CTRL_DIGESTINIT 7
  ------------------
  359|      0|        if (r <= 0 && (r != -2))
  ------------------
  |  Branch (359:13): [True: 0, False: 0]
  |  Branch (359:23): [True: 0, False: 0]
  ------------------
  360|      0|            return 0;
  361|      0|    }
  362|      0|#endif
  363|      0|    if (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT)
  ------------------
  |  |  239|      0|#define EVP_MD_CTX_FLAG_NO_INIT 0x0100 /* Don't initialize md_data */
  ------------------
  |  Branch (363:9): [True: 0, False: 0]
  ------------------
  364|      0|        return 1;
  365|      0|    return ctx->digest->init(ctx);
  366|      0|}
digest.c:evp_md_from_algorithm:
 1019|  14.2k|{
 1020|  14.2k|    const OSSL_DISPATCH *fns = algodef->implementation;
 1021|  14.2k|    EVP_MD *md = NULL;
 1022|  14.2k|    int fncnt = 0;
 1023|       |
 1024|       |    /* EVP_MD_fetch() will set the legacy NID if available */
 1025|  14.2k|    if ((md = evp_md_new()) == NULL) {
  ------------------
  |  Branch (1025:9): [True: 0, False: 14.2k]
  ------------------
 1026|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1027|      0|        return NULL;
 1028|      0|    }
 1029|       |
 1030|  14.2k|#ifndef FIPS_MODULE
 1031|  14.2k|    md->type = NID_undef;
  ------------------
  |  |   18|  14.2k|#define NID_undef                       0
  ------------------
 1032|  14.2k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &md->type)
  ------------------
  |  Branch (1032:9): [True: 0, False: 14.2k]
  ------------------
 1033|  14.2k|        || md->type == -1) {
  ------------------
  |  Branch (1033:12): [True: 0, False: 14.2k]
  ------------------
 1034|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1035|      0|        goto err;
 1036|      0|    }
 1037|  14.2k|#endif
 1038|       |
 1039|  14.2k|    md->name_id = name_id;
 1040|  14.2k|    if ((md->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1040:9): [True: 0, False: 14.2k]
  ------------------
 1041|      0|        goto err;
 1042|       |
 1043|  14.2k|    md->description = algodef->algorithm_description;
 1044|       |
 1045|   159k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1045:12): [True: 145k, False: 14.2k]
  ------------------
 1046|   145k|        switch (fns->function_id) {
  ------------------
  |  Branch (1046:17): [True: 145k, False: 0]
  ------------------
 1047|  14.2k|        case OSSL_FUNC_DIGEST_NEWCTX:
  ------------------
  |  |  303|  14.2k|#define OSSL_FUNC_DIGEST_NEWCTX 1
  ------------------
  |  Branch (1047:9): [True: 14.2k, False: 130k]
  ------------------
 1048|  14.2k|            if (md->newctx == NULL) {
  ------------------
  |  Branch (1048:17): [True: 14.2k, False: 0]
  ------------------
 1049|  14.2k|                md->newctx = OSSL_FUNC_digest_newctx(fns);
 1050|  14.2k|                fncnt++;
 1051|  14.2k|            }
 1052|  14.2k|            break;
 1053|  14.2k|        case OSSL_FUNC_DIGEST_INIT:
  ------------------
  |  |  304|  14.2k|#define OSSL_FUNC_DIGEST_INIT 2
  ------------------
  |  Branch (1053:9): [True: 14.2k, False: 130k]
  ------------------
 1054|  14.2k|            if (md->dinit == NULL) {
  ------------------
  |  Branch (1054:17): [True: 14.2k, False: 0]
  ------------------
 1055|  14.2k|                md->dinit = OSSL_FUNC_digest_init(fns);
 1056|  14.2k|                fncnt++;
 1057|  14.2k|            }
 1058|  14.2k|            break;
 1059|  14.2k|        case OSSL_FUNC_DIGEST_UPDATE:
  ------------------
  |  |  305|  14.2k|#define OSSL_FUNC_DIGEST_UPDATE 3
  ------------------
  |  Branch (1059:9): [True: 14.2k, False: 130k]
  ------------------
 1060|  14.2k|            if (md->dupdate == NULL) {
  ------------------
  |  Branch (1060:17): [True: 14.2k, False: 0]
  ------------------
 1061|  14.2k|                md->dupdate = OSSL_FUNC_digest_update(fns);
 1062|  14.2k|                fncnt++;
 1063|  14.2k|            }
 1064|  14.2k|            break;
 1065|  14.2k|        case OSSL_FUNC_DIGEST_FINAL:
  ------------------
  |  |  306|  14.2k|#define OSSL_FUNC_DIGEST_FINAL 4
  ------------------
  |  Branch (1065:9): [True: 14.2k, False: 130k]
  ------------------
 1066|  14.2k|            if (md->dfinal == NULL) {
  ------------------
  |  Branch (1066:17): [True: 14.2k, False: 0]
  ------------------
 1067|  14.2k|                md->dfinal = OSSL_FUNC_digest_final(fns);
 1068|  14.2k|                fncnt++;
 1069|  14.2k|            }
 1070|  14.2k|            break;
 1071|  2.11k|        case OSSL_FUNC_DIGEST_SQUEEZE:
  ------------------
  |  |  316|  2.11k|#define OSSL_FUNC_DIGEST_SQUEEZE 14
  ------------------
  |  Branch (1071:9): [True: 2.11k, False: 143k]
  ------------------
 1072|  2.11k|            if (md->dsqueeze == NULL) {
  ------------------
  |  Branch (1072:17): [True: 2.11k, False: 0]
  ------------------
 1073|  2.11k|                md->dsqueeze = OSSL_FUNC_digest_squeeze(fns);
 1074|  2.11k|                fncnt++;
 1075|  2.11k|            }
 1076|  2.11k|            break;
 1077|      0|        case OSSL_FUNC_DIGEST_DIGEST:
  ------------------
  |  |  307|      0|#define OSSL_FUNC_DIGEST_DIGEST 5
  ------------------
  |  Branch (1077:9): [True: 0, False: 145k]
  ------------------
 1078|      0|            if (md->digest == NULL)
  ------------------
  |  Branch (1078:17): [True: 0, False: 0]
  ------------------
 1079|      0|                md->digest = OSSL_FUNC_digest_digest(fns);
 1080|       |            /* We don't increment fnct for this as it is stand alone */
 1081|      0|            break;
 1082|  14.2k|        case OSSL_FUNC_DIGEST_FREECTX:
  ------------------
  |  |  308|  14.2k|#define OSSL_FUNC_DIGEST_FREECTX 6
  ------------------
  |  Branch (1082:9): [True: 14.2k, False: 130k]
  ------------------
 1083|  14.2k|            if (md->freectx == NULL) {
  ------------------
  |  Branch (1083:17): [True: 14.2k, False: 0]
  ------------------
 1084|  14.2k|                md->freectx = OSSL_FUNC_digest_freectx(fns);
 1085|  14.2k|                fncnt++;
 1086|  14.2k|            }
 1087|  14.2k|            break;
 1088|  14.2k|        case OSSL_FUNC_DIGEST_DUPCTX:
  ------------------
  |  |  309|  14.2k|#define OSSL_FUNC_DIGEST_DUPCTX 7
  ------------------
  |  Branch (1088:9): [True: 14.2k, False: 130k]
  ------------------
 1089|  14.2k|            if (md->dupctx == NULL)
  ------------------
  |  Branch (1089:17): [True: 14.2k, False: 0]
  ------------------
 1090|  14.2k|                md->dupctx = OSSL_FUNC_digest_dupctx(fns);
 1091|  14.2k|            break;
 1092|  14.2k|        case OSSL_FUNC_DIGEST_GET_PARAMS:
  ------------------
  |  |  310|  14.2k|#define OSSL_FUNC_DIGEST_GET_PARAMS 8
  ------------------
  |  Branch (1092:9): [True: 14.2k, False: 130k]
  ------------------
 1093|  14.2k|            if (md->get_params == NULL)
  ------------------
  |  Branch (1093:17): [True: 14.2k, False: 0]
  ------------------
 1094|  14.2k|                md->get_params = OSSL_FUNC_digest_get_params(fns);
 1095|  14.2k|            break;
 1096|  4.22k|        case OSSL_FUNC_DIGEST_SET_CTX_PARAMS:
  ------------------
  |  |  311|  4.22k|#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
  ------------------
  |  Branch (1096:9): [True: 4.22k, False: 140k]
  ------------------
 1097|  4.22k|            if (md->set_ctx_params == NULL)
  ------------------
  |  Branch (1097:17): [True: 4.22k, False: 0]
  ------------------
 1098|  4.22k|                md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns);
 1099|  4.22k|            break;
 1100|  3.16k|        case OSSL_FUNC_DIGEST_GET_CTX_PARAMS:
  ------------------
  |  |  312|  3.16k|#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
  ------------------
  |  Branch (1100:9): [True: 3.16k, False: 142k]
  ------------------
 1101|  3.16k|            if (md->get_ctx_params == NULL)
  ------------------
  |  Branch (1101:17): [True: 3.16k, False: 0]
  ------------------
 1102|  3.16k|                md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns);
 1103|  3.16k|            break;
 1104|  14.2k|        case OSSL_FUNC_DIGEST_GETTABLE_PARAMS:
  ------------------
  |  |  313|  14.2k|#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
  ------------------
  |  Branch (1104:9): [True: 14.2k, False: 130k]
  ------------------
 1105|  14.2k|            if (md->gettable_params == NULL)
  ------------------
  |  Branch (1105:17): [True: 14.2k, False: 0]
  ------------------
 1106|  14.2k|                md->gettable_params = OSSL_FUNC_digest_gettable_params(fns);
 1107|  14.2k|            break;
 1108|  4.22k|        case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  314|  4.22k|#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (1108:9): [True: 4.22k, False: 140k]
  ------------------
 1109|  4.22k|            if (md->settable_ctx_params == NULL)
  ------------------
  |  Branch (1109:17): [True: 4.22k, False: 0]
  ------------------
 1110|  4.22k|                md->settable_ctx_params = OSSL_FUNC_digest_settable_ctx_params(fns);
 1111|  4.22k|            break;
 1112|  3.16k|        case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  315|  3.16k|#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (1112:9): [True: 3.16k, False: 142k]
  ------------------
 1113|  3.16k|            if (md->gettable_ctx_params == NULL)
  ------------------
  |  Branch (1113:17): [True: 3.16k, False: 0]
  ------------------
 1114|  3.16k|                md->gettable_ctx_params = OSSL_FUNC_digest_gettable_ctx_params(fns);
 1115|  3.16k|            break;
 1116|  14.2k|        case OSSL_FUNC_DIGEST_COPYCTX:
  ------------------
  |  |  317|  14.2k|#define OSSL_FUNC_DIGEST_COPYCTX 15
  ------------------
  |  Branch (1116:9): [True: 14.2k, False: 130k]
  ------------------
 1117|  14.2k|            if (md->copyctx == NULL)
  ------------------
  |  Branch (1117:17): [True: 14.2k, False: 0]
  ------------------
 1118|  14.2k|                md->copyctx = OSSL_FUNC_digest_copyctx(fns);
 1119|  14.2k|            break;
 1120|   145k|        }
 1121|   145k|    }
 1122|  14.2k|    if ((fncnt != 0 && fncnt != 5 && fncnt != 6)
  ------------------
  |  Branch (1122:10): [True: 14.2k, False: 0]
  |  Branch (1122:24): [True: 2.11k, False: 12.1k]
  |  Branch (1122:38): [True: 0, False: 2.11k]
  ------------------
 1123|  14.2k|        || (fncnt == 0 && md->digest == NULL)) {
  ------------------
  |  Branch (1123:13): [True: 0, False: 14.2k]
  |  Branch (1123:27): [True: 0, False: 0]
  ------------------
 1124|       |        /*
 1125|       |         * In order to be a consistent set of functions we either need the
 1126|       |         * whole set of init/update/final etc functions or none of them.
 1127|       |         * The "digest" function can standalone. We at least need one way to
 1128|       |         * generate digests.
 1129|       |         */
 1130|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1131|      0|        goto err;
 1132|      0|    }
 1133|  14.2k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (1133:9): [True: 14.2k, False: 0]
  |  Branch (1133:25): [True: 0, False: 14.2k]
  ------------------
 1134|      0|        goto err;
 1135|       |
 1136|  14.2k|    md->prov = prov;
 1137|       |
 1138|  14.2k|    if (!evp_md_cache_constants(md)) {
  ------------------
  |  Branch (1138:9): [True: 0, False: 14.2k]
  ------------------
 1139|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1140|      0|        goto err;
 1141|      0|    }
 1142|       |
 1143|  14.2k|    return md;
 1144|       |
 1145|      0|err:
 1146|      0|    EVP_MD_free(md);
 1147|       |    return NULL;
 1148|  14.2k|}
digest.c:set_legacy_nid:
  960|  37.4k|{
  961|  37.4k|    int nid;
  962|  37.4k|    int *legacy_nid = vlegacy_nid;
  963|       |    /*
  964|       |     * We use lowest level function to get the associated method, because
  965|       |     * higher level functions such as EVP_get_digestbyname() have changed
  966|       |     * to look at providers too.
  967|       |     */
  968|  37.4k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|  37.4k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  969|       |
  970|  37.4k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (970:9): [True: 0, False: 37.4k]
  ------------------
  971|      0|        return;
  972|       |
  973|  37.4k|    if (legacy_method == NULL)
  ------------------
  |  Branch (973:9): [True: 25.3k, False: 12.1k]
  ------------------
  974|  25.3k|        return;
  975|  12.1k|    nid = EVP_MD_nid(legacy_method);
  ------------------
  |  |  554|  12.1k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  976|  12.1k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|  24.2k|#define NID_undef                       0
  ------------------
  |  Branch (976:9): [True: 2.11k, False: 10.0k]
  |  Branch (976:37): [True: 0, False: 2.11k]
  ------------------
  977|      0|        *legacy_nid = -1;
  978|      0|        return;
  979|      0|    }
  980|  12.1k|    *legacy_nid = nid;
  981|  12.1k|}
digest.c:evp_md_cache_constants:
  985|  14.2k|{
  986|  14.2k|    int ok, xof = 0, algid_absent = 0;
  987|  14.2k|    size_t blksz = 0;
  988|  14.2k|    size_t mdsize = 0;
  989|  14.2k|    OSSL_PARAM params[5];
  990|       |
  991|       |    /*
  992|       |     * Note that these parameters are 'constants' that are only set up
  993|       |     * during the EVP_MD_fetch(). For this reason the XOF functions set the
  994|       |     * md_size to 0, since the output size is unknown.
  995|       |     */
  996|  14.2k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  226|  14.2k|# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  997|  14.2k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &mdsize);
  ------------------
  |  |  229|  14.2k|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
  998|  14.2k|    params[2] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_XOF, &xof);
  ------------------
  |  |  231|  14.2k|# define OSSL_DIGEST_PARAM_XOF "xof"
  ------------------
  999|  14.2k|    params[3] = OSSL_PARAM_construct_int(OSSL_DIGEST_PARAM_ALGID_ABSENT,
  ------------------
  |  |  225|  14.2k|# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
  ------------------
 1000|  14.2k|        &algid_absent);
 1001|  14.2k|    params[4] = OSSL_PARAM_construct_end();
 1002|  14.2k|    ok = evp_do_md_getparams(md, params) > 0;
 1003|  14.2k|    if (mdsize > INT_MAX || blksz > INT_MAX)
  ------------------
  |  Branch (1003:9): [True: 0, False: 14.2k]
  |  Branch (1003:29): [True: 0, False: 14.2k]
  ------------------
 1004|      0|        ok = 0;
 1005|  14.2k|    if (ok) {
  ------------------
  |  Branch (1005:9): [True: 14.2k, False: 0]
  ------------------
 1006|  14.2k|        md->block_size = (int)blksz;
 1007|  14.2k|        md->md_size = (int)mdsize;
 1008|  14.2k|        if (xof)
  ------------------
  |  Branch (1008:13): [True: 2.11k, False: 12.1k]
  ------------------
 1009|  2.11k|            md->flags |= EVP_MD_FLAG_XOF;
  ------------------
  |  |  179|  2.11k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
 1010|  14.2k|        if (algid_absent)
  ------------------
  |  Branch (1010:13): [True: 9.50k, False: 4.75k]
  ------------------
 1011|  9.50k|            md->flags |= EVP_MD_FLAG_DIGALGID_ABSENT;
  ------------------
  |  |  191|  9.50k|#define EVP_MD_FLAG_DIGALGID_ABSENT 0x0008
  ------------------
 1012|  14.2k|    }
 1013|  14.2k|    return ok;
 1014|  14.2k|}
digest.c:evp_md_up_ref:
 1151|  86.3k|{
 1152|  86.3k|    return EVP_MD_up_ref(md);
 1153|  86.3k|}
digest.c:evp_md_free:
 1156|  33.7k|{
 1157|  33.7k|    EVP_MD_free(md);
 1158|  33.7k|}

EVP_aes_128_cbc:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_ecb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_ofb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_cfb128:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_cfb1:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_cfb8:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_ctr:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cbc:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_ecb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_ofb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cfb128:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cfb1:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_cfb8:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_192_ctr:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cbc:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_ecb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_ofb:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cfb128:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cfb1:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_cfb8:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_256_ctr:
  441|      1|    {                                                                                 \
  442|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;     \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  443|      1|    }
EVP_aes_128_gcm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_192_gcm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_gcm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_128_xts:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_xts:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_128_ccm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_192_ccm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_ccm:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_128_wrap:
 3775|      1|{
 3776|      1|    return &aes_128_wrap;
 3777|      1|}
EVP_aes_192_wrap:
 3789|      1|{
 3790|      1|    return &aes_192_wrap;
 3791|      1|}
EVP_aes_256_wrap:
 3803|      1|{
 3804|      1|    return &aes_256_wrap;
 3805|      1|}
EVP_aes_128_wrap_pad:
 3817|      1|{
 3818|      1|    return &aes_128_wrap_pad;
 3819|      1|}
EVP_aes_192_wrap_pad:
 3831|      1|{
 3832|      1|    return &aes_192_wrap_pad;
 3833|      1|}
EVP_aes_256_wrap_pad:
 3845|      1|{
 3846|      1|    return &aes_256_wrap_pad;
 3847|      1|}
EVP_aes_128_ocb:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_192_ocb:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }
EVP_aes_256_ocb:
  471|      1|    {                                                                                                                      \
  472|      1|        return AESNI_CAPABLE ? &aesni_##keylen##_##mode : &aes_##keylen##_##mode;                                          \
  ------------------
  |  |  185|      1|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (185:23): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  473|      1|    }

EVP_aes_128_cbc_hmac_sha1:
  937|      1|{
  938|      1|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_128_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (938:13): [True: 1, False: 0]
  ------------------
  939|      1|}
EVP_aes_256_cbc_hmac_sha1:
  942|      1|{
  943|      1|    return (OPENSSL_ia32cap_P[1] & AESNI_CAPABLE ? &aesni_256_cbc_hmac_sha1_cipher : NULL);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (943:13): [True: 1, False: 0]
  ------------------
  944|      1|}

EVP_aes_128_cbc_hmac_sha256:
  913|      1|{
  914|      1|    return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ? &aesni_128_cbc_hmac_sha256_cipher : NULL);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (914:13): [True: 1, False: 0]
  |  Branch (914:55): [True: 1, False: 0]
  ------------------
  915|      1|}
EVP_aes_256_cbc_hmac_sha256:
  918|      1|{
  919|      1|    return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ? &aesni_256_cbc_hmac_sha256_cipher : NULL);
  ------------------
  |  |   45|      1|#define AESNI_CAPABLE (1 << (57 - 32))
  ------------------
  |  Branch (919:13): [True: 1, False: 0]
  |  Branch (919:55): [True: 1, False: 0]
  ------------------
  920|      1|}

EVP_aria_128_ctr:
  174|      1|    {                                                                                 \
  175|      1|        return &aria_##keylen##_##mode;                                               \
  176|      1|    }
EVP_aria_192_ctr:
  174|      1|    {                                                                                 \
  175|      1|        return &aria_##keylen##_##mode;                                               \
  176|      1|    }
EVP_aria_256_ctr:
  174|      1|    {                                                                                 \
  175|      1|        return &aria_##keylen##_##mode;                                               \
  176|      1|    }
EVP_aria_128_gcm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_192_gcm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_256_gcm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_128_ccm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_192_ccm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }
EVP_aria_256_ccm:
  776|      1|    {                                                  \
  777|      1|        return (EVP_CIPHER *)&aria_##keylen##_##mode;  \
  778|      1|    }

EVP_camellia_128_cbc:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_128_ecb:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_128_ofb:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_128_cfb128:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_128_cfb1:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_128_cfb8:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_128_ctr:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_cbc:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_ecb:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_ofb:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_cfb128:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_cfb1:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_cfb8:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_192_ctr:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_cbc:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_ecb:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_ofb:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_cfb128:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_cfb1:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_cfb8:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }
EVP_camellia_256_ctr:
  180|      1|    {                                                                                 \
  181|      1|        return &camellia_##keylen##_##mode;                                           \
  182|      1|    }

EVP_chacha20:
  147|      1|{
  148|      1|    return &chacha20;
  149|      1|}
EVP_chacha20_poly1305:
  626|      1|{
  627|      1|    return (&chacha20_poly1305);
  628|      1|}

EVP_des_ede:
  301|      1|{
  302|      1|    return &des_ede_ecb;
  303|      1|}
EVP_des_ede3:
  306|      1|{
  307|      1|    return &des_ede3_ecb;
  308|      1|}
EVP_des_ede3_wrap:
  421|      1|{
  422|      1|    return &des3_wrap;
  423|      1|}

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

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

EVP_rc4_hmac_md5:
  263|      1|{
  264|      1|    return &r4_hmac_md5_cipher;
  265|      1|}

EVP_sm4_cbc:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_ecb:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_ofb:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_cfb128:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }
EVP_sm4_ctr:
   48|      1|    {                                                                         \
   49|      1|        return &sm4_##mode;                                                   \
   50|      1|    }

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

OSSL_EC_curve_nid2name:
  119|  52.2k|{
  120|  52.2k|    size_t i;
  121|       |
  122|  52.2k|    if (nid <= 0)
  ------------------
  |  Branch (122:9): [True: 0, False: 52.2k]
  ------------------
  123|      0|        return NULL;
  124|       |
  125|   668k|    for (i = 0; i < OSSL_NELEM(curve_list); i++) {
  ------------------
  |  |   14|   668k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (125:17): [True: 668k, False: 0]
  ------------------
  126|   668k|        if (curve_list[i].nid == nid)
  ------------------
  |  Branch (126:13): [True: 52.2k, False: 616k]
  ------------------
  127|  52.2k|            return curve_list[i].name;
  128|   668k|    }
  129|      0|    return NULL;
  130|  52.2k|}

EVP_ENCODE_CTX_new:
  349|   190k|{
  350|   190k|    return OPENSSL_zalloc(sizeof(EVP_ENCODE_CTX));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|   190k|}
EVP_ENCODE_CTX_free:
  354|   192k|{
  355|   192k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   192k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  356|   192k|}
EVP_DecodeInit:
  495|   190k|{
  496|       |    /* Only ctx->num and ctx->flags are used during decoding. */
  497|   190k|    ctx->num = 0;
  498|   190k|    ctx->length = 0;
  499|   190k|    ctx->line_num = 0;
  500|   190k|    ctx->flags = 0;
  501|   190k|}
EVP_DecodeUpdate:
  525|   190k|{
  526|   190k|    int seof = 0, eof = 0, rv = -1, ret = 0, i, v, tmp, n, decoded_len;
  527|   190k|    unsigned char *d;
  528|   190k|    const unsigned char *table;
  529|       |
  530|   190k|    n = ctx->num;
  531|   190k|    d = ctx->enc_data;
  532|       |
  533|   190k|    if (n > 0 && d[n - 1] == '=') {
  ------------------
  |  Branch (533:9): [True: 0, False: 190k]
  |  Branch (533:18): [True: 0, False: 0]
  ------------------
  534|      0|        eof++;
  535|      0|        if (n > 1 && d[n - 2] == '=')
  ------------------
  |  Branch (535:13): [True: 0, False: 0]
  |  Branch (535:22): [True: 0, False: 0]
  ------------------
  536|      0|            eof++;
  537|      0|    }
  538|       |
  539|       |    /* Legacy behaviour: an empty input chunk signals end of input. */
  540|   190k|    if (inl == 0) {
  ------------------
  |  Branch (540:9): [True: 0, False: 190k]
  ------------------
  541|      0|        rv = 0;
  542|      0|        goto end;
  543|      0|    }
  544|       |
  545|   190k|    if ((ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  899|   190k|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (545:9): [True: 0, False: 190k]
  ------------------
  546|      0|        table = srpdata_ascii2bin;
  547|   190k|    else
  548|   190k|        table = data_ascii2bin;
  549|       |
  550|   276M|    for (i = 0; i < inl; i++) {
  ------------------
  |  Branch (550:17): [True: 276M, False: 190k]
  ------------------
  551|   276M|        tmp = *(in++);
  552|   276M|        v = conv_ascii2bin(tmp, table);
  553|   276M|        if (v == B64_ERROR) {
  ------------------
  |  |   65|   276M|#define B64_ERROR 0xFF
  ------------------
  |  Branch (553:13): [True: 0, False: 276M]
  ------------------
  554|      0|            rv = -1;
  555|      0|            goto end;
  556|      0|        }
  557|       |
  558|   276M|        if (tmp == '=') {
  ------------------
  |  Branch (558:13): [True: 158k, False: 276M]
  ------------------
  559|   158k|            eof++;
  560|   276M|        } else if (eof > 0 && B64_BASE64(v)) {
  ------------------
  |  |   67|   109k|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   66|   109k|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (67:23): [True: 0, False: 109k]
  |  |  ------------------
  ------------------
  |  Branch (560:20): [True: 109k, False: 275M]
  ------------------
  561|       |            /* More data after padding. */
  562|      0|            rv = -1;
  563|      0|            goto end;
  564|      0|        }
  565|       |
  566|   276M|        if (eof > 2) {
  ------------------
  |  Branch (566:13): [True: 0, False: 276M]
  ------------------
  567|      0|            rv = -1;
  568|      0|            goto end;
  569|      0|        }
  570|       |
  571|   276M|        if (v == B64_EOF) {
  ------------------
  |  |   63|   276M|#define B64_EOF 0xF2
  ------------------
  |  Branch (571:13): [True: 0, False: 276M]
  ------------------
  572|      0|            seof = 1;
  573|      0|            goto tail;
  574|      0|        }
  575|       |
  576|       |        /* Only save valid base64 characters. */
  577|   276M|        if (B64_BASE64(v)) {
  ------------------
  |  |   67|   276M|#define B64_BASE64(a) (!B64_NOT_BASE64(a))
  |  |  ------------------
  |  |  |  |   66|   276M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  |  |  ------------------
  |  |  |  Branch (67:23): [True: 271M, False: 4.33M]
  |  |  ------------------
  ------------------
  578|   271M|            if (n >= 64) {
  ------------------
  |  Branch (578:17): [True: 0, False: 271M]
  ------------------
  579|       |                /*
  580|       |                 * We increment n once per loop, and empty the buffer as soon as
  581|       |                 * we reach 64 characters, so this can only happen if someone's
  582|       |                 * manually messed with the ctx. Refuse to write any more data.
  583|       |                 */
  584|      0|                rv = -1;
  585|      0|                goto end;
  586|      0|            }
  587|   271M|            OPENSSL_assert(n < (int)sizeof(ctx->enc_data));
  ------------------
  |  |  476|   271M|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:12): [True: 271M, False: 0]
  |  |  ------------------
  ------------------
  588|   271M|            d[n++] = tmp;
  589|   271M|        }
  590|       |
  591|   276M|        if (n == 64) {
  ------------------
  |  Branch (591:13): [True: 4.15M, False: 272M]
  ------------------
  592|  4.15M|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  593|  4.15M|            n = 0;
  594|  4.15M|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (594:17): [True: 0, False: 4.15M]
  |  Branch (594:37): [True: 0, False: 4.15M]
  |  Branch (594:57): [True: 0, False: 0]
  ------------------
  595|      0|                rv = -1;
  596|      0|                goto end;
  597|      0|            }
  598|  4.15M|            ret += decoded_len;
  599|  4.15M|            out += decoded_len;
  600|  4.15M|        }
  601|   276M|    }
  602|       |
  603|       |    /*
  604|       |     * Legacy behaviour: if the current line is a full base64-block (i.e., has
  605|       |     * 0 mod 4 base64 characters), it is processed immediately. We keep this
  606|       |     * behaviour as applications may not be calling EVP_DecodeFinal properly.
  607|       |     */
  608|   190k|tail:
  609|   190k|    if (n > 0) {
  ------------------
  |  Branch (609:9): [True: 175k, False: 15.6k]
  ------------------
  610|   175k|        if ((n & 3) == 0) {
  ------------------
  |  Branch (610:13): [True: 175k, False: 0]
  ------------------
  611|   175k|            decoded_len = evp_decodeblock_int(ctx, out, d, n, eof);
  612|   175k|            n = 0;
  613|   175k|            if (decoded_len < 0 || (decoded_len == 0 && eof > 0)) {
  ------------------
  |  Branch (613:17): [True: 0, False: 175k]
  |  Branch (613:37): [True: 0, False: 175k]
  |  Branch (613:57): [True: 0, False: 0]
  ------------------
  614|      0|                rv = -1;
  615|      0|                goto end;
  616|      0|            }
  617|   175k|            ret += decoded_len;
  618|   175k|        } else if (seof) {
  ------------------
  |  Branch (618:20): [True: 0, False: 0]
  ------------------
  619|       |            /* EOF in the middle of a base64 block. */
  620|      0|            rv = -1;
  621|      0|            goto end;
  622|      0|        }
  623|   175k|    }
  624|       |
  625|   190k|    rv = seof || (n == 0 && eof) ? 0 : 1;
  ------------------
  |  Branch (625:10): [True: 0, False: 190k]
  |  Branch (625:19): [True: 190k, False: 0]
  |  Branch (625:29): [True: 109k, False: 80.9k]
  ------------------
  626|   190k|end:
  627|       |    /* Legacy behaviour. This should probably rather be zeroed on error. */
  628|   190k|    *outl = ret;
  629|   190k|    ctx->num = n;
  630|   190k|    return rv;
  631|   190k|}
EVP_DecodeFinal:
  719|   190k|{
  720|   190k|    int i;
  721|       |
  722|   190k|    *outl = 0;
  723|   190k|    if (ctx->num != 0) {
  ------------------
  |  Branch (723:9): [True: 0, False: 190k]
  ------------------
  724|      0|        i = evp_decodeblock_int(ctx, out, ctx->enc_data, ctx->num, -1);
  725|      0|        if (i < 0)
  ------------------
  |  Branch (725:13): [True: 0, False: 0]
  ------------------
  726|      0|            return -1;
  727|      0|        ctx->num = 0;
  728|      0|        *outl = i;
  729|      0|        return 1;
  730|      0|    } else
  731|   190k|        return 1;
  732|   190k|}
encode.c:conv_ascii2bin:
  333|   556M|{
  334|   556M|    if (a & 0x80)
  ------------------
  |  Branch (334:9): [True: 0, False: 556M]
  ------------------
  335|      0|        return B64_ERROR;
  ------------------
  |  |   65|      0|#define B64_ERROR 0xFF
  ------------------
  336|   556M|    return table[a];
  337|   556M|}
encode.c:evp_decodeblock_int:
  636|  4.33M|{
  637|  4.33M|    int i, ret = 0, a, b, c, d;
  638|  4.33M|    unsigned long l;
  639|  4.33M|    const unsigned char *table;
  640|       |
  641|  4.33M|    if (eof < -1 || eof > 2)
  ------------------
  |  Branch (641:9): [True: 0, False: 4.33M]
  |  Branch (641:21): [True: 0, False: 4.33M]
  ------------------
  642|      0|        return -1;
  643|       |
  644|  4.33M|    if (ctx != NULL && (ctx->flags & EVP_ENCODE_CTX_USE_SRP_ALPHABET) != 0)
  ------------------
  |  |  899|  4.33M|#define EVP_ENCODE_CTX_USE_SRP_ALPHABET 2
  ------------------
  |  Branch (644:9): [True: 4.33M, False: 0]
  |  Branch (644:24): [True: 0, False: 4.33M]
  ------------------
  645|      0|        table = srpdata_ascii2bin;
  646|  4.33M|    else
  647|  4.33M|        table = data_ascii2bin;
  648|       |
  649|       |    /* trim whitespace from the start of the line. */
  650|  4.33M|    while ((n > 0) && (conv_ascii2bin(*f, table) == B64_WS)) {
  ------------------
  |  |   64|  4.33M|#define B64_WS 0xE0
  ------------------
  |  Branch (650:12): [True: 4.33M, False: 0]
  |  Branch (650:23): [True: 0, False: 4.33M]
  ------------------
  651|      0|        f++;
  652|      0|        n--;
  653|      0|    }
  654|       |
  655|       |    /*
  656|       |     * strip off stuff at the end of the line ascii2bin values B64_WS,
  657|       |     * B64_EOLN, B64_EOLN and B64_EOF
  658|       |     */
  659|  4.33M|    while ((n > 3) && (B64_NOT_BASE64(conv_ascii2bin(f[n - 1], table))))
  ------------------
  |  |   66|  4.33M|#define B64_NOT_BASE64(a) (((a) | 0x13) == 0xF3)
  ------------------
  |  Branch (659:12): [True: 4.33M, False: 0]
  |  Branch (659:23): [True: 0, False: 4.33M]
  ------------------
  660|      0|        n--;
  661|       |
  662|  4.33M|    if (n % 4 != 0)
  ------------------
  |  Branch (662:9): [True: 0, False: 4.33M]
  ------------------
  663|      0|        return -1;
  664|  4.33M|    if (n == 0)
  ------------------
  |  Branch (664:9): [True: 0, False: 4.33M]
  ------------------
  665|      0|        return 0;
  666|       |
  667|       |    /* all 4-byte blocks except the last one do not have padding. */
  668|  67.9M|    for (i = 0; i < n - 4; i += 4) {
  ------------------
  |  Branch (668:17): [True: 63.6M, False: 4.33M]
  ------------------
  669|  63.6M|        a = conv_ascii2bin(*(f++), table);
  670|  63.6M|        b = conv_ascii2bin(*(f++), table);
  671|  63.6M|        c = conv_ascii2bin(*(f++), table);
  672|  63.6M|        d = conv_ascii2bin(*(f++), table);
  673|  63.6M|        if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (673:13): [True: 0, False: 63.6M]
  ------------------
  674|      0|            return -1;
  675|  63.6M|        l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  676|  63.6M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  677|  63.6M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  678|  63.6M|        *(t++) = (unsigned char)(l) & 0xff;
  679|  63.6M|        ret += 3;
  680|  63.6M|    }
  681|       |
  682|       |    /* process the last block that may have padding. */
  683|  4.33M|    a = conv_ascii2bin(*(f++), table);
  684|  4.33M|    b = conv_ascii2bin(*(f++), table);
  685|  4.33M|    c = conv_ascii2bin(*(f++), table);
  686|  4.33M|    d = conv_ascii2bin(*(f++), table);
  687|  4.33M|    if ((a | b | c | d) & 0x80)
  ------------------
  |  Branch (687:9): [True: 0, False: 4.33M]
  ------------------
  688|      0|        return -1;
  689|  4.33M|    l = ((((unsigned long)a) << 18L) | (((unsigned long)b) << 12L) | (((unsigned long)c) << 6L) | (((unsigned long)d)));
  690|       |
  691|  4.33M|    if (eof == -1)
  ------------------
  |  Branch (691:9): [True: 0, False: 4.33M]
  ------------------
  692|      0|        eof = (c == '=') + (d == '=');
  693|       |
  694|  4.33M|    switch (eof) {
  ------------------
  |  Branch (694:13): [True: 4.33M, False: 0]
  ------------------
  695|  48.3k|    case 2:
  ------------------
  |  Branch (695:5): [True: 48.3k, False: 4.28M]
  ------------------
  696|  48.3k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  697|  48.3k|        break;
  698|  61.3k|    case 1:
  ------------------
  |  Branch (698:5): [True: 61.3k, False: 4.27M]
  ------------------
  699|  61.3k|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  700|  61.3k|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  701|  61.3k|        break;
  702|  4.22M|    case 0:
  ------------------
  |  Branch (702:5): [True: 4.22M, False: 109k]
  ------------------
  703|  4.22M|        *(t++) = (unsigned char)(l >> 16L) & 0xff;
  704|  4.22M|        *(t++) = (unsigned char)(l >> 8L) & 0xff;
  705|  4.22M|        *(t++) = (unsigned char)(l) & 0xff;
  706|  4.22M|        break;
  707|  4.33M|    }
  708|  4.33M|    ret += 3 - eof;
  709|       |
  710|  4.33M|    return ret;
  711|  4.33M|}

EVP_CIPHER_CTX_reset:
   34|  4.50k|{
   35|  4.50k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 4.50k]
  ------------------
   36|      0|        return 1;
   37|       |
   38|  4.50k|    if (ctx->cipher == NULL || ctx->cipher->prov == NULL)
  ------------------
  |  Branch (38:9): [True: 0, False: 4.50k]
  |  Branch (38:32): [True: 0, False: 4.50k]
  ------------------
   39|      0|        goto legacy;
   40|       |
   41|  4.50k|    if (ctx->algctx != NULL) {
  ------------------
  |  Branch (41:9): [True: 4.50k, False: 0]
  ------------------
   42|  4.50k|        if (ctx->cipher->freectx != NULL)
  ------------------
  |  Branch (42:13): [True: 4.50k, False: 0]
  ------------------
   43|  4.50k|            ctx->cipher->freectx(ctx->algctx);
   44|  4.50k|        ctx->algctx = NULL;
   45|  4.50k|    }
   46|  4.50k|    if (ctx->fetched_cipher != NULL)
  ------------------
  |  Branch (46:9): [True: 4.50k, False: 0]
  ------------------
   47|  4.50k|        EVP_CIPHER_free(ctx->fetched_cipher);
   48|  4.50k|    memset(ctx, 0, sizeof(*ctx));
   49|  4.50k|    ctx->iv_len = -1;
   50|       |
   51|  4.50k|    return 1;
   52|       |
   53|       |    /* Remove legacy code below when legacy support is removed. */
   54|      0|legacy:
   55|       |
   56|      0|    if (ctx->cipher != NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        if (ctx->cipher->cleanup && !ctx->cipher->cleanup(ctx))
  ------------------
  |  Branch (57:13): [True: 0, False: 0]
  |  Branch (57:37): [True: 0, False: 0]
  ------------------
   58|      0|            return 0;
   59|       |        /* Cleanse cipher context data */
   60|      0|        if (ctx->cipher_data && ctx->cipher->ctx_size)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  |  Branch (60:33): [True: 0, False: 0]
  ------------------
   61|      0|            OPENSSL_cleanse(ctx->cipher_data, ctx->cipher->ctx_size);
   62|      0|    }
   63|      0|    OPENSSL_free(ctx->cipher_data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   64|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
   65|      0|    ENGINE_finish(ctx->engine);
   66|      0|#endif
   67|      0|    memset(ctx, 0, sizeof(*ctx));
   68|      0|    ctx->iv_len = -1;
   69|      0|    return 1;
   70|      0|}
EVP_CIPHER_CTX_new:
   73|  4.50k|{
   74|  4.50k|    EVP_CIPHER_CTX *ctx;
   75|       |
   76|  4.50k|    ctx = OPENSSL_zalloc(sizeof(EVP_CIPHER_CTX));
  ------------------
  |  |  108|  4.50k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  4.50k|    if (ctx == NULL)
  ------------------
  |  Branch (77:9): [True: 0, False: 4.50k]
  ------------------
   78|      0|        return NULL;
   79|       |
   80|  4.50k|    ctx->iv_len = -1;
   81|  4.50k|    return ctx;
   82|  4.50k|}
EVP_CIPHER_CTX_free:
   85|  12.3k|{
   86|  12.3k|    if (ctx == NULL)
  ------------------
  |  Branch (86:9): [True: 7.89k, False: 4.50k]
  ------------------
   87|  7.89k|        return;
   88|  4.50k|    EVP_CIPHER_CTX_reset(ctx);
   89|  4.50k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  4.50k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   90|  4.50k|}
EVP_CipherInit_ex:
  652|  93.8k|{
  653|       |    return evp_cipher_init_internal(ctx, cipher, impl, key, iv, enc, 0, NULL);
  654|  93.8k|}
EVP_CipherUpdate:
  718|  88.0k|{
  719|  88.0k|    if (ctx->encrypt)
  ------------------
  |  Branch (719:9): [True: 88.0k, False: 0]
  ------------------
  720|  88.0k|        return EVP_EncryptUpdate(ctx, out, outl, in, inl);
  721|      0|    else
  722|      0|        return EVP_DecryptUpdate(ctx, out, outl, in, inl);
  723|  88.0k|}
EVP_EncryptUpdate:
  977|  88.0k|{
  978|  88.0k|    int ret;
  979|  88.0k|    size_t soutl, inl_ = (size_t)inl;
  980|  88.0k|    int blocksize;
  981|       |
  982|  88.0k|    if (inl < 0) {
  ------------------
  |  Branch (982:9): [True: 0, False: 88.0k]
  ------------------
  983|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  984|      0|        return 0;
  985|      0|    }
  986|       |
  987|  88.0k|    if (ossl_likely(outl != NULL)) {
  ------------------
  |  |   22|  88.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 88.0k, False: 0]
  |  |  ------------------
  ------------------
  988|  88.0k|        *outl = 0;
  989|  88.0k|    } else {
  990|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  991|      0|        return 0;
  992|      0|    }
  993|       |
  994|       |    /* Prevent accidental use of decryption context when encrypting */
  995|  88.0k|    if (ossl_unlikely(!ctx->encrypt)) {
  ------------------
  |  |   23|  88.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 88.0k]
  |  |  ------------------
  ------------------
  996|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_OPERATION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  997|      0|        return 0;
  998|      0|    }
  999|       |
 1000|  88.0k|    if (ossl_unlikely(ctx->cipher == NULL)) {
  ------------------
  |  |   23|  88.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 88.0k]
  |  |  ------------------
  ------------------
 1001|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1002|      0|        return 0;
 1003|      0|    }
 1004|       |
 1005|  88.0k|    if (ossl_unlikely(ctx->cipher->prov == NULL))
  ------------------
  |  |   23|  88.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 88.0k]
  |  |  ------------------
  ------------------
 1006|      0|        goto legacy;
 1007|       |
 1008|  88.0k|    blocksize = ctx->cipher->block_size;
 1009|       |
 1010|  88.0k|    if (ossl_unlikely(ctx->cipher->cupdate == NULL || blocksize < 1)) {
  ------------------
  |  |   23|   176k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 88.0k]
  |  |  |  Branch (23:46): [True: 0, False: 88.0k]
  |  |  |  Branch (23:46): [True: 0, False: 88.0k]
  |  |  ------------------
  ------------------
 1011|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1012|      0|        return 0;
 1013|      0|    }
 1014|       |
 1015|  88.0k|    ret = ctx->cipher->cupdate(ctx->algctx, out, &soutl,
 1016|  88.0k|        inl_ + (size_t)(blocksize == 1 ? 0 : blocksize),
  ------------------
  |  Branch (1016:25): [True: 24.7k, False: 63.2k]
  ------------------
 1017|  88.0k|        in, inl_);
 1018|       |
 1019|  88.0k|    if (ossl_likely(ret)) {
  ------------------
  |  |   22|  88.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 88.0k, False: 0]
  |  |  ------------------
  ------------------
 1020|  88.0k|        if (ossl_unlikely(soutl > INT_MAX)) {
  ------------------
  |  |   23|  88.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 88.0k]
  |  |  ------------------
  ------------------
 1021|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UPDATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1022|      0|            return 0;
 1023|      0|        }
 1024|  88.0k|        *outl = (int)soutl;
 1025|  88.0k|    }
 1026|       |
 1027|  88.0k|    return ret;
 1028|       |
 1029|       |    /* Code below to be removed when legacy support is dropped. */
 1030|      0|legacy:
 1031|       |
 1032|      0|    return evp_EncryptDecryptUpdate(ctx, out, outl, in, inl);
 1033|  88.0k|}
EVP_CIPHER_get_params:
 1647|  28.9k|{
 1648|  28.9k|    if (cipher != NULL && cipher->get_params != NULL)
  ------------------
  |  Branch (1648:9): [True: 28.9k, False: 0]
  |  Branch (1648:27): [True: 28.9k, False: 0]
  ------------------
 1649|  28.9k|        return cipher->get_params(params);
 1650|      0|    return 0;
 1651|  28.9k|}
EVP_CIPHER_gettable_ctx_params:
 1705|  68.6k|{
 1706|  68.6k|    void *provctx;
 1707|       |
 1708|  68.6k|    if (cipher != NULL && cipher->gettable_ctx_params != NULL) {
  ------------------
  |  Branch (1708:9): [True: 68.6k, False: 0]
  |  Branch (1708:27): [True: 68.6k, False: 0]
  ------------------
 1709|  68.6k|        provctx = ossl_provider_ctx(EVP_CIPHER_get0_provider(cipher));
 1710|  68.6k|        return cipher->gettable_ctx_params(NULL, provctx);
 1711|  68.6k|    }
 1712|      0|    return NULL;
 1713|  68.6k|}
evp_cipher_new:
 1848|  68.6k|{
 1849|  68.6k|    EVP_CIPHER *cipher = OPENSSL_zalloc(sizeof(EVP_CIPHER));
  ------------------
  |  |  108|  68.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1850|       |
 1851|  68.6k|    if (cipher != NULL && !CRYPTO_NEW_REF(&cipher->refcnt, 1)) {
  ------------------
  |  Branch (1851:9): [True: 68.6k, False: 0]
  |  Branch (1851:27): [True: 0, False: 68.6k]
  ------------------
 1852|      0|        OPENSSL_free(cipher);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1853|      0|        return NULL;
 1854|      0|    }
 1855|  68.6k|    return cipher;
 1856|  68.6k|}
EVP_CIPHER_fetch:
 2076|  48.1k|{
 2077|  48.1k|    EVP_CIPHER *cipher = evp_generic_fetch(ctx, OSSL_OP_CIPHER, algorithm, properties,
  ------------------
  |  |  284|  48.1k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 2078|  48.1k|        evp_cipher_from_algorithm, evp_cipher_up_ref,
 2079|  48.1k|        evp_cipher_free);
 2080|       |
 2081|  48.1k|    return cipher;
 2082|  48.1k|}
evp_cipher_fetch_from_prov:
 2087|  3.00k|{
 2088|  3.00k|    return evp_generic_fetch_from_prov(prov, OSSL_OP_CIPHER,
  ------------------
  |  |  284|  3.00k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
 2089|  3.00k|        algorithm, properties,
 2090|  3.00k|        evp_cipher_from_algorithm,
 2091|  3.00k|        evp_cipher_up_ref,
 2092|  3.00k|        evp_cipher_free);
 2093|  3.00k|}
EVP_CIPHER_up_ref:
 2105|   112k|{
 2106|   112k|    int ref = 0;
 2107|       |
 2108|   112k|    if (cipher->origin == EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   112k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (2108:9): [True: 112k, False: 0]
  ------------------
 2109|   112k|        CRYPTO_UP_REF(&cipher->refcnt, &ref);
 2110|   112k|    return 1;
 2111|   112k|}
evp_cipher_free_int:
 2114|  68.6k|{
 2115|  68.6k|    OPENSSL_free(cipher->type_name);
  ------------------
  |  |  131|  68.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2116|  68.6k|    ossl_provider_free(cipher->prov);
 2117|  68.6k|    CRYPTO_FREE_REF(&cipher->refcnt);
 2118|  68.6k|    OPENSSL_free(cipher);
  ------------------
  |  |  131|  68.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2119|  68.6k|}
EVP_CIPHER_free:
 2122|   188k|{
 2123|   188k|    int i;
 2124|       |
 2125|   188k|    if (cipher == NULL || cipher->origin != EVP_ORIG_DYNAMIC)
  ------------------
  |  |  254|   180k|#define EVP_ORIG_DYNAMIC 0
  ------------------
  |  Branch (2125:9): [True: 7.50k, False: 180k]
  |  Branch (2125:27): [True: 0, False: 180k]
  ------------------
 2126|  7.50k|        return;
 2127|       |
 2128|   180k|    CRYPTO_DOWN_REF(&cipher->refcnt, &i);
 2129|   180k|    if (i > 0)
  ------------------
  |  Branch (2129:9): [True: 112k, False: 68.6k]
  ------------------
 2130|   112k|        return;
 2131|  68.6k|    evp_cipher_free_int(cipher);
 2132|  68.6k|}
evp_enc.c:evp_cipher_init_internal:
   98|  93.8k|{
   99|  93.8k|    int n;
  100|  93.8k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  101|  93.8k|    ENGINE *tmpimpl = NULL;
  102|  93.8k|#endif
  103|       |
  104|       |    /*
  105|       |     * enc == 1 means we are encrypting.
  106|       |     * enc == 0 means we are decrypting.
  107|       |     * enc == -1 means, use the previously initialised value for encrypt/decrypt
  108|       |     */
  109|  93.8k|    if (enc == -1) {
  ------------------
  |  Branch (109:9): [True: 89.3k, False: 4.50k]
  ------------------
  110|  89.3k|        enc = ctx->encrypt;
  111|  89.3k|    } else {
  112|  4.50k|        if (enc)
  ------------------
  |  Branch (112:13): [True: 4.50k, False: 0]
  ------------------
  113|  4.50k|            enc = 1;
  114|  4.50k|        ctx->encrypt = enc;
  115|  4.50k|    }
  116|       |
  117|  93.8k|    if (cipher == NULL && ctx->cipher == NULL) {
  ------------------
  |  Branch (117:9): [True: 89.3k, False: 4.50k]
  |  Branch (117:27): [True: 0, False: 89.3k]
  ------------------
  118|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_NO_CIPHER_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  119|      0|        return 0;
  120|      0|    }
  121|       |
  122|       |    /* Code below to be removed when legacy support is dropped. */
  123|  93.8k|    if (is_pipeline)
  ------------------
  |  Branch (123:9): [True: 0, False: 93.8k]
  ------------------
  124|      0|        goto nonlegacy;
  125|       |
  126|  93.8k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  127|       |    /*
  128|       |     * Whether it's nice or not, "Inits" can be used on "Final"'d contexts so
  129|       |     * this context may already have an ENGINE! Try to avoid releasing the
  130|       |     * previous handle, re-querying for an ENGINE, and having a
  131|       |     * reinitialisation, when it may all be unnecessary.
  132|       |     */
  133|  93.8k|    if (ctx->engine && ctx->cipher
  ------------------
  |  Branch (133:9): [True: 0, False: 93.8k]
  |  Branch (133:24): [True: 0, False: 0]
  ------------------
  134|      0|        && (cipher == NULL || cipher->nid == ctx->cipher->nid))
  ------------------
  |  Branch (134:13): [True: 0, False: 0]
  |  Branch (134:31): [True: 0, False: 0]
  ------------------
  135|      0|        goto skip_to_init;
  136|       |
  137|  93.8k|    if (cipher != NULL && impl == NULL) {
  ------------------
  |  Branch (137:9): [True: 4.50k, False: 89.3k]
  |  Branch (137:27): [True: 4.50k, False: 0]
  ------------------
  138|       |        /* Ask if an ENGINE is reserved for this job */
  139|  4.50k|        tmpimpl = ENGINE_get_cipher_engine(cipher->nid);
  140|  4.50k|    }
  141|  93.8k|#endif
  142|       |
  143|       |    /*
  144|       |     * If there are engines involved then we should use legacy handling for now.
  145|       |     */
  146|  93.8k|    if (ctx->engine != NULL
  ------------------
  |  Branch (146:9): [True: 0, False: 93.8k]
  ------------------
  147|  93.8k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  148|  93.8k|        || tmpimpl != NULL
  ------------------
  |  Branch (148:12): [True: 0, False: 93.8k]
  ------------------
  149|  93.8k|#endif
  150|  93.8k|        || impl != NULL
  ------------------
  |  Branch (150:12): [True: 0, False: 93.8k]
  ------------------
  151|  93.8k|        || (cipher != NULL && cipher->origin == EVP_ORIG_METH)
  ------------------
  |  |  256|  4.50k|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (151:13): [True: 4.50k, False: 89.3k]
  |  Branch (151:31): [True: 0, False: 4.50k]
  ------------------
  152|  93.8k|        || (cipher == NULL && ctx->cipher != NULL
  ------------------
  |  Branch (152:13): [True: 89.3k, False: 4.50k]
  |  Branch (152:31): [True: 89.3k, False: 0]
  ------------------
  153|  89.3k|            && ctx->cipher->origin == EVP_ORIG_METH)) {
  ------------------
  |  |  256|  89.3k|#define EVP_ORIG_METH 2
  ------------------
  |  Branch (153:16): [True: 0, False: 89.3k]
  ------------------
  154|      0|        if (ctx->cipher == ctx->fetched_cipher)
  ------------------
  |  Branch (154:13): [True: 0, False: 0]
  ------------------
  155|      0|            ctx->cipher = NULL;
  156|      0|        EVP_CIPHER_free(ctx->fetched_cipher);
  157|      0|        ctx->fetched_cipher = NULL;
  158|      0|        goto legacy;
  159|      0|    }
  160|       |    /*
  161|       |     * Ensure a context left lying around from last time is cleared
  162|       |     * (legacy code)
  163|       |     */
  164|  93.8k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (164:9): [True: 4.50k, False: 89.3k]
  |  Branch (164:27): [True: 0, False: 4.50k]
  ------------------
  165|      0|        if (ctx->cipher->cleanup != NULL && !ctx->cipher->cleanup(ctx))
  ------------------
  |  Branch (165:13): [True: 0, False: 0]
  |  Branch (165:45): [True: 0, False: 0]
  ------------------
  166|      0|            return 0;
  167|      0|        OPENSSL_clear_free(ctx->cipher_data, ctx->cipher->ctx_size);
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  168|      0|        ctx->cipher_data = NULL;
  169|      0|    }
  170|       |
  171|       |    /* Start of non-legacy code below */
  172|  93.8k|nonlegacy:
  173|       |    /* Ensure a context left lying around from last time is cleared */
  174|  93.8k|    if (cipher != NULL && ctx->cipher != NULL) {
  ------------------
  |  Branch (174:9): [True: 4.50k, False: 89.3k]
  |  Branch (174:27): [True: 0, False: 4.50k]
  ------------------
  175|      0|        unsigned long flags = ctx->flags;
  176|       |
  177|      0|        EVP_CIPHER_CTX_reset(ctx);
  178|       |        /* Restore encrypt and flags */
  179|      0|        ctx->encrypt = enc;
  180|      0|        ctx->flags = flags;
  181|      0|    }
  182|       |
  183|  93.8k|    if (cipher == NULL)
  ------------------
  |  Branch (183:9): [True: 89.3k, False: 4.50k]
  ------------------
  184|  89.3k|        cipher = ctx->cipher;
  185|       |
  186|  93.8k|    if (cipher->prov == NULL) {
  ------------------
  |  Branch (186:9): [True: 0, False: 93.8k]
  ------------------
  187|       |#ifdef FIPS_MODULE
  188|       |        /* We only do explicit fetches inside the FIPS module */
  189|       |        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  190|       |        return 0;
  191|       |#else
  192|      0|        EVP_CIPHER *provciph = EVP_CIPHER_fetch(NULL,
  193|      0|            cipher->nid == NID_undef ? "NULL"
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (193:13): [True: 0, False: 0]
  ------------------
  194|      0|                                     : OBJ_nid2sn(cipher->nid),
  195|      0|            "");
  196|       |
  197|      0|        if (provciph == NULL)
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|            return 0;
  199|      0|        cipher = provciph;
  200|      0|        EVP_CIPHER_free(ctx->fetched_cipher);
  201|      0|        ctx->fetched_cipher = provciph;
  202|      0|#endif
  203|      0|    }
  204|       |
  205|  93.8k|    if (!ossl_assert(cipher->prov != NULL)) {
  ------------------
  |  |   52|  93.8k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  93.8k|    __FILE__, __LINE__)
  ------------------
  |  Branch (205:9): [True: 0, False: 93.8k]
  ------------------
  206|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  207|      0|        return 0;
  208|      0|    }
  209|       |
  210|  93.8k|    if (cipher != ctx->fetched_cipher) {
  ------------------
  |  Branch (210:9): [True: 4.50k, False: 89.3k]
  ------------------
  211|  4.50k|        if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) {
  ------------------
  |  Branch (211:13): [True: 0, False: 4.50k]
  ------------------
  212|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|            return 0;
  214|      0|        }
  215|  4.50k|        EVP_CIPHER_free(ctx->fetched_cipher);
  216|       |        /* Coverity false positive, the reference counting is confusing it */
  217|       |        /* coverity[use_after_free] */
  218|  4.50k|        ctx->fetched_cipher = (EVP_CIPHER *)cipher;
  219|  4.50k|    }
  220|  93.8k|    ctx->cipher = cipher;
  221|       |
  222|  93.8k|    if (is_pipeline && !EVP_CIPHER_can_pipeline(cipher, enc)) {
  ------------------
  |  Branch (222:9): [True: 0, False: 93.8k]
  |  Branch (222:24): [True: 0, False: 0]
  ------------------
  223|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_PIPELINE_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  224|      0|        return 0;
  225|      0|    }
  226|       |
  227|  93.8k|    if (ctx->algctx == NULL) {
  ------------------
  |  Branch (227:9): [True: 4.50k, False: 89.3k]
  ------------------
  228|  4.50k|        ctx->algctx = ctx->cipher->newctx(ossl_provider_ctx(cipher->prov));
  229|  4.50k|        if (ctx->algctx == NULL) {
  ------------------
  |  Branch (229:13): [True: 0, False: 4.50k]
  ------------------
  230|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|            return 0;
  232|      0|        }
  233|  4.50k|    }
  234|       |
  235|  93.8k|    if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
  ------------------
  |  |  335|  93.8k|#define EVP_CIPH_NO_PADDING 0x100
  ------------------
  |  Branch (235:9): [True: 0, False: 93.8k]
  ------------------
  236|       |        /*
  237|       |         * If this ctx was already set up for no padding then we need to tell
  238|       |         * the new cipher about it.
  239|       |         */
  240|      0|        if (!EVP_CIPHER_CTX_set_padding(ctx, 0))
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  ------------------
  241|      0|            return 0;
  242|      0|    }
  243|       |
  244|  93.8k|#ifndef FIPS_MODULE
  245|       |    /*
  246|       |     * Fix for CVE-2023-5363
  247|       |     * Passing in a size as part of the init call takes effect late
  248|       |     * so, force such to occur before the initialisation.
  249|       |     *
  250|       |     * The FIPS provider's internal library context is used in a manner
  251|       |     * such that this is not an issue.
  252|       |     */
  253|  93.8k|    if (params != NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 93.8k]
  ------------------
  254|      0|        OSSL_PARAM param_lens[3] = { OSSL_PARAM_END, OSSL_PARAM_END,
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM param_lens[3] = { OSSL_PARAM_END, OSSL_PARAM_END,
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  255|      0|            OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
  256|      0|        OSSL_PARAM *q = param_lens;
  257|      0|        const OSSL_PARAM *p;
  258|       |
  259|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN);
  ------------------
  |  |  200|      0|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  260|      0|        if (p != NULL)
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  ------------------
  261|      0|            memcpy(q++, p, sizeof(*q));
  262|       |
  263|       |        /*
  264|       |         * Note that OSSL_CIPHER_PARAM_AEAD_IVLEN is a synonym for
  265|       |         * OSSL_CIPHER_PARAM_IVLEN so both are covered here.
  266|       |         */
  267|      0|        p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN);
  ------------------
  |  |  199|      0|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  268|      0|        if (p != NULL)
  ------------------
  |  Branch (268:13): [True: 0, False: 0]
  ------------------
  269|      0|            memcpy(q++, p, sizeof(*q));
  270|       |
  271|      0|        if (q != param_lens) {
  ------------------
  |  Branch (271:13): [True: 0, False: 0]
  ------------------
  272|      0|            if (!EVP_CIPHER_CTX_set_params(ctx, param_lens)) {
  ------------------
  |  Branch (272:17): [True: 0, False: 0]
  ------------------
  273|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  274|      0|                return 0;
  275|      0|            }
  276|      0|        }
  277|      0|    }
  278|  93.8k|#endif
  279|       |
  280|  93.8k|    if (is_pipeline)
  ------------------
  |  Branch (280:9): [True: 0, False: 93.8k]
  ------------------
  281|      0|        return 1;
  282|       |
  283|  93.8k|    if (enc) {
  ------------------
  |  Branch (283:9): [True: 93.8k, False: 0]
  ------------------
  284|  93.8k|        if (ctx->cipher->einit == NULL) {
  ------------------
  |  Branch (284:13): [True: 0, False: 93.8k]
  ------------------
  285|       |            /*
  286|       |             * We still should be able to set the IV using the new API
  287|       |             * if the key is not specified and old API is not available
  288|       |             */
  289|      0|            if (key == NULL && ctx->cipher->einit_skey != NULL) {
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  |  Branch (289:32): [True: 0, False: 0]
  ------------------
  290|      0|                return ctx->cipher->einit_skey(ctx->algctx, NULL,
  291|      0|                    iv,
  292|      0|                    iv == NULL ? 0
  ------------------
  |  Branch (292:21): [True: 0, False: 0]
  ------------------
  293|      0|                               : EVP_CIPHER_CTX_get_iv_length(ctx),
  294|      0|                    params);
  295|      0|            }
  296|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  297|      0|            return 0;
  298|      0|        }
  299|       |
  300|  93.8k|        return ctx->cipher->einit(ctx->algctx,
  301|  93.8k|            key,
  302|  93.8k|            key == NULL ? 0
  ------------------
  |  Branch (302:13): [True: 27.7k, False: 66.0k]
  ------------------
  303|  93.8k|                        : EVP_CIPHER_CTX_get_key_length(ctx),
  304|  93.8k|            iv,
  305|  93.8k|            iv == NULL ? 0
  ------------------
  |  Branch (305:13): [True: 69.0k, False: 24.7k]
  ------------------
  306|  93.8k|                       : EVP_CIPHER_CTX_get_iv_length(ctx),
  307|  93.8k|            params);
  308|  93.8k|    }
  309|       |
  310|      0|    if (ctx->cipher->dinit == NULL) {
  ------------------
  |  Branch (310:9): [True: 0, False: 0]
  ------------------
  311|       |        /*
  312|       |         * We still should be able to set the IV using the new API
  313|       |         * if the key is not specified and old API is not available
  314|       |         */
  315|      0|        if (key == NULL && ctx->cipher->dinit_skey != NULL) {
  ------------------
  |  Branch (315:13): [True: 0, False: 0]
  |  Branch (315:28): [True: 0, False: 0]
  ------------------
  316|      0|            return ctx->cipher->dinit_skey(ctx->algctx, NULL,
  317|      0|                iv,
  318|      0|                iv == NULL ? 0
  ------------------
  |  Branch (318:17): [True: 0, False: 0]
  ------------------
  319|      0|                           : EVP_CIPHER_CTX_get_iv_length(ctx),
  320|      0|                params);
  321|      0|        }
  322|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  323|      0|        return 0;
  324|      0|    }
  325|       |
  326|      0|    return ctx->cipher->dinit(ctx->algctx,
  327|      0|        key,
  328|      0|        key == NULL ? 0
  ------------------
  |  Branch (328:9): [True: 0, False: 0]
  ------------------
  329|      0|                    : EVP_CIPHER_CTX_get_key_length(ctx),
  330|      0|        iv,
  331|      0|        iv == NULL ? 0
  ------------------
  |  Branch (331:9): [True: 0, False: 0]
  ------------------
  332|      0|                   : EVP_CIPHER_CTX_get_iv_length(ctx),
  333|      0|        params);
  334|       |
  335|       |    /* Code below to be removed when legacy support is dropped. */
  336|      0|legacy:
  337|       |
  338|      0|    if (cipher != NULL) {
  ------------------
  |  Branch (338:9): [True: 0, False: 0]
  ------------------
  339|       |        /*
  340|       |         * Ensure a context left lying around from last time is cleared (we
  341|       |         * previously attempted to avoid this if the same ENGINE and
  342|       |         * EVP_CIPHER could be used).
  343|       |         */
  344|      0|        if (ctx->cipher) {
  ------------------
  |  Branch (344:13): [True: 0, False: 0]
  ------------------
  345|      0|            unsigned long flags = ctx->flags;
  346|      0|            EVP_CIPHER_CTX_reset(ctx);
  347|       |            /* Restore encrypt and flags */
  348|      0|            ctx->encrypt = enc;
  349|      0|            ctx->flags = flags;
  350|      0|        }
  351|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  352|      0|        if (impl != NULL) {
  ------------------
  |  Branch (352:13): [True: 0, False: 0]
  ------------------
  353|      0|            if (!ENGINE_init(impl)) {
  ------------------
  |  Branch (353:17): [True: 0, False: 0]
  ------------------
  354|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  355|      0|                return 0;
  356|      0|            }
  357|      0|        } else {
  358|      0|            impl = tmpimpl;
  359|      0|        }
  360|      0|        if (impl != NULL) {
  ------------------
  |  Branch (360:13): [True: 0, False: 0]
  ------------------
  361|       |            /* There's an ENGINE for this job ... (apparently) */
  362|      0|            const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
  363|       |
  364|      0|            if (c == NULL) {
  ------------------
  |  Branch (364:17): [True: 0, False: 0]
  ------------------
  365|       |                /*
  366|       |                 * One positive side-effect of US's export control history,
  367|       |                 * is that we should at least be able to avoid using US
  368|       |                 * misspellings of "initialisation"?
  369|       |                 */
  370|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  371|      0|                return 0;
  372|      0|            }
  373|       |            /* We'll use the ENGINE's private cipher definition */
  374|      0|            cipher = c;
  375|       |            /*
  376|       |             * Store the ENGINE functional reference so we know 'cipher' came
  377|       |             * from an ENGINE and we need to release it when done.
  378|       |             */
  379|      0|            ctx->engine = impl;
  380|      0|        } else {
  381|      0|            ctx->engine = NULL;
  382|      0|        }
  383|      0|#endif
  384|       |
  385|      0|        ctx->cipher = cipher;
  386|      0|        if (ctx->cipher->ctx_size) {
  ------------------
  |  Branch (386:13): [True: 0, False: 0]
  ------------------
  387|      0|            ctx->cipher_data = OPENSSL_zalloc(ctx->cipher->ctx_size);
  ------------------
  |  |  108|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  388|      0|            if (ctx->cipher_data == NULL) {
  ------------------
  |  Branch (388:17): [True: 0, False: 0]
  ------------------
  389|      0|                ctx->cipher = NULL;
  390|      0|                return 0;
  391|      0|            }
  392|      0|        } else {
  393|      0|            ctx->cipher_data = NULL;
  394|      0|        }
  395|      0|        ctx->key_len = cipher->key_len;
  396|       |        /* Preserve wrap enable flag, zero everything else */
  397|      0|        ctx->flags &= EVP_CIPHER_CTX_FLAG_WRAP_ALLOW;
  ------------------
  |  |  375|      0|#define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1
  ------------------
  398|      0|        if (ctx->cipher->flags & EVP_CIPH_CTRL_INIT) {
  ------------------
  |  |  331|      0|#define EVP_CIPH_CTRL_INIT 0x40
  ------------------
  |  Branch (398:13): [True: 0, False: 0]
  ------------------
  399|      0|            if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL) <= 0) {
  ------------------
  |  |  379|      0|#define EVP_CTRL_INIT 0x0
  ------------------
  |  Branch (399:17): [True: 0, False: 0]
  ------------------
  400|      0|                ctx->cipher = NULL;
  401|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  402|      0|                return 0;
  403|      0|            }
  404|      0|        }
  405|      0|    }
  406|      0|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  407|      0|skip_to_init:
  408|      0|#endif
  409|      0|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 0]
  ------------------
  410|      0|        return 0;
  411|       |
  412|       |    /* we assume block size is a power of 2 in *cryptUpdate */
  413|      0|    OPENSSL_assert(ctx->cipher->block_size == 1
  ------------------
  |  |  476|      0|    (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  414|      0|        || ctx->cipher->block_size == 8
  415|      0|        || ctx->cipher->block_size == 16);
  416|       |
  417|      0|    if (!(ctx->flags & EVP_CIPHER_CTX_FLAG_WRAP_ALLOW)
  ------------------
  |  |  375|      0|#define EVP_CIPHER_CTX_FLAG_WRAP_ALLOW 0x1
  ------------------
  |  Branch (417:9): [True: 0, False: 0]
  ------------------
  418|      0|        && EVP_CIPHER_CTX_get_mode(ctx) == EVP_CIPH_WRAP_MODE) {
  ------------------
  |  |  674|      0|#define EVP_CIPHER_CTX_get_mode(c) EVP_CIPHER_get_mode(EVP_CIPHER_CTX_get0_cipher(c))
  ------------------
                      && EVP_CIPHER_CTX_get_mode(ctx) == EVP_CIPH_WRAP_MODE) {
  ------------------
  |  |  319|      0|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  |  Branch (418:12): [True: 0, False: 0]
  ------------------
  419|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_WRAP_MODE_NOT_ALLOWED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  420|      0|        return 0;
  421|      0|    }
  422|       |
  423|      0|    if ((EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(ctx))
  ------------------
  |  Branch (423:9): [True: 0, False: 0]
  ------------------
  424|      0|            & EVP_CIPH_CUSTOM_IV)
  ------------------
  |  |  327|      0|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  425|      0|        == 0) {
  426|      0|        switch (EVP_CIPHER_CTX_get_mode(ctx)) {
  ------------------
  |  |  674|      0|#define EVP_CIPHER_CTX_get_mode(c) EVP_CIPHER_get_mode(EVP_CIPHER_CTX_get0_cipher(c))
  ------------------
  427|       |
  428|      0|        case EVP_CIPH_STREAM_CIPHER:
  ------------------
  |  |  310|      0|#define EVP_CIPH_STREAM_CIPHER 0x0
  ------------------
  |  Branch (428:9): [True: 0, False: 0]
  ------------------
  429|      0|        case EVP_CIPH_ECB_MODE:
  ------------------
  |  |  311|      0|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (429:9): [True: 0, False: 0]
  ------------------
  430|      0|            break;
  431|       |
  432|      0|        case EVP_CIPH_CFB_MODE:
  ------------------
  |  |  313|      0|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (432:9): [True: 0, False: 0]
  ------------------
  433|      0|        case EVP_CIPH_OFB_MODE:
  ------------------
  |  |  314|      0|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (433:9): [True: 0, False: 0]
  ------------------
  434|       |
  435|      0|            ctx->num = 0;
  436|       |            /* fall-through */
  437|       |
  438|      0|        case EVP_CIPH_CBC_MODE:
  ------------------
  |  |  312|      0|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (438:9): [True: 0, False: 0]
  ------------------
  439|      0|            n = EVP_CIPHER_CTX_get_iv_length(ctx);
  440|      0|            if (n < 0 || n > (int)sizeof(ctx->iv)) {
  ------------------
  |  Branch (440:17): [True: 0, False: 0]
  |  Branch (440:26): [True: 0, False: 0]
  ------------------
  441|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_IV_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  442|      0|                return 0;
  443|      0|            }
  444|      0|            if (iv != NULL)
  ------------------
  |  Branch (444:17): [True: 0, False: 0]
  ------------------
  445|      0|                memcpy(ctx->oiv, iv, n);
  446|      0|            memcpy(ctx->iv, ctx->oiv, n);
  447|      0|            break;
  448|       |
  449|      0|        case EVP_CIPH_CTR_MODE:
  ------------------
  |  |  315|      0|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (449:9): [True: 0, False: 0]
  ------------------
  450|      0|            ctx->num = 0;
  451|       |            /* Don't reuse IV for CTR mode */
  452|      0|            if (iv != NULL) {
  ------------------
  |  Branch (452:17): [True: 0, False: 0]
  ------------------
  453|      0|                n = EVP_CIPHER_CTX_get_iv_length(ctx);
  454|      0|                if (n <= 0 || n > (int)sizeof(ctx->iv)) {
  ------------------
  |  Branch (454:21): [True: 0, False: 0]
  |  Branch (454:31): [True: 0, False: 0]
  ------------------
  455|      0|                    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_IV_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|                    return 0;
  457|      0|                }
  458|      0|                memcpy(ctx->iv, iv, n);
  459|      0|            }
  460|      0|            break;
  461|       |
  462|      0|        default:
  ------------------
  |  Branch (462:9): [True: 0, False: 0]
  ------------------
  463|      0|            return 0;
  464|      0|        }
  465|      0|    }
  466|       |
  467|      0|    if (key != NULL || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
  ------------------
  |  |  329|      0|#define EVP_CIPH_ALWAYS_CALL_INIT 0x20
  ------------------
  |  Branch (467:9): [True: 0, False: 0]
  |  Branch (467:24): [True: 0, False: 0]
  ------------------
  468|      0|        if (!ctx->cipher->init(ctx, key, iv, enc))
  ------------------
  |  Branch (468:13): [True: 0, False: 0]
  ------------------
  469|      0|            return 0;
  470|      0|    }
  471|      0|    ctx->buf_len = 0;
  472|      0|    ctx->final_used = 0;
  473|      0|    ctx->block_mask = ctx->cipher->block_size - 1;
  474|      0|    return 1;
  475|      0|}
evp_enc.c:evp_cipher_from_algorithm:
 1892|  68.6k|{
 1893|  68.6k|    const OSSL_DISPATCH *fns = algodef->implementation;
 1894|  68.6k|    EVP_CIPHER *cipher = NULL;
 1895|  68.6k|    int fnciphcnt = 0, encinit = 0, decinit = 0, fnpipecnt = 0, fnctxcnt = 0;
 1896|       |
 1897|  68.6k|    if ((cipher = evp_cipher_new()) == NULL) {
  ------------------
  |  Branch (1897:9): [True: 0, False: 68.6k]
  ------------------
 1898|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1899|      0|        return NULL;
 1900|      0|    }
 1901|       |
 1902|  68.6k|#ifndef FIPS_MODULE
 1903|  68.6k|    cipher->nid = NID_undef;
  ------------------
  |  |   18|  68.6k|#define NID_undef                       0
  ------------------
 1904|  68.6k|    if (!evp_names_do_all(prov, name_id, set_legacy_nid, &cipher->nid)
  ------------------
  |  Branch (1904:9): [True: 0, False: 68.6k]
  ------------------
 1905|  68.6k|        || cipher->nid == -1) {
  ------------------
  |  Branch (1905:12): [True: 0, False: 68.6k]
  ------------------
 1906|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1907|      0|        goto err;
 1908|      0|    }
 1909|  68.6k|#endif
 1910|       |
 1911|  68.6k|    cipher->name_id = name_id;
 1912|  68.6k|    if ((cipher->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (1912:9): [True: 0, False: 68.6k]
  ------------------
 1913|      0|        goto err;
 1914|       |
 1915|  68.6k|    cipher->description = algodef->algorithm_description;
 1916|       |
 1917|  1.09M|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1917:12): [True: 1.02M, False: 68.6k]
  ------------------
 1918|  1.02M|        switch (fns->function_id) {
  ------------------
  |  Branch (1918:17): [True: 1.02M, False: 0]
  ------------------
 1919|  68.6k|        case OSSL_FUNC_CIPHER_NEWCTX:
  ------------------
  |  |  351|  68.6k|#define OSSL_FUNC_CIPHER_NEWCTX 1
  ------------------
  |  Branch (1919:9): [True: 68.6k, False: 957k]
  ------------------
 1920|  68.6k|            if (cipher->newctx != NULL)
  ------------------
  |  Branch (1920:17): [True: 0, False: 68.6k]
  ------------------
 1921|      0|                break;
 1922|  68.6k|            cipher->newctx = OSSL_FUNC_cipher_newctx(fns);
 1923|  68.6k|            fnctxcnt++;
 1924|  68.6k|            break;
 1925|  68.6k|        case OSSL_FUNC_CIPHER_ENCRYPT_INIT:
  ------------------
  |  |  352|  68.6k|#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
  ------------------
  |  Branch (1925:9): [True: 68.6k, False: 957k]
  ------------------
 1926|  68.6k|            if (cipher->einit != NULL)
  ------------------
  |  Branch (1926:17): [True: 0, False: 68.6k]
  ------------------
 1927|      0|                break;
 1928|  68.6k|            cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns);
 1929|  68.6k|            encinit = 1;
 1930|  68.6k|            break;
 1931|  68.6k|        case OSSL_FUNC_CIPHER_DECRYPT_INIT:
  ------------------
  |  |  353|  68.6k|#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
  ------------------
  |  Branch (1931:9): [True: 68.6k, False: 957k]
  ------------------
 1932|  68.6k|            if (cipher->dinit != NULL)
  ------------------
  |  Branch (1932:17): [True: 0, False: 68.6k]
  ------------------
 1933|      0|                break;
 1934|  68.6k|            cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns);
 1935|  68.6k|            decinit = 1;
 1936|  68.6k|            break;
 1937|  35.9k|        case OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT:
  ------------------
  |  |  369|  35.9k|#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
  ------------------
  |  Branch (1937:9): [True: 35.9k, False: 990k]
  ------------------
 1938|  35.9k|            if (cipher->einit_skey != NULL)
  ------------------
  |  Branch (1938:17): [True: 0, False: 35.9k]
  ------------------
 1939|      0|                break;
 1940|  35.9k|            cipher->einit_skey = OSSL_FUNC_cipher_encrypt_skey_init(fns);
 1941|  35.9k|            encinit = 1;
 1942|  35.9k|            break;
 1943|  35.9k|        case OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT:
  ------------------
  |  |  370|  35.9k|#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
  ------------------
  |  Branch (1943:9): [True: 35.9k, False: 990k]
  ------------------
 1944|  35.9k|            if (cipher->dinit_skey != NULL)
  ------------------
  |  Branch (1944:17): [True: 0, False: 35.9k]
  ------------------
 1945|      0|                break;
 1946|  35.9k|            cipher->dinit_skey = OSSL_FUNC_cipher_decrypt_skey_init(fns);
 1947|  35.9k|            decinit = 1;
 1948|  35.9k|            break;
 1949|  68.6k|        case OSSL_FUNC_CIPHER_UPDATE:
  ------------------
  |  |  354|  68.6k|#define OSSL_FUNC_CIPHER_UPDATE 4
  ------------------
  |  Branch (1949:9): [True: 68.6k, False: 957k]
  ------------------
 1950|  68.6k|            if (cipher->cupdate != NULL)
  ------------------
  |  Branch (1950:17): [True: 0, False: 68.6k]
  ------------------
 1951|      0|                break;
 1952|  68.6k|            cipher->cupdate = OSSL_FUNC_cipher_update(fns);
 1953|  68.6k|            fnciphcnt++;
 1954|  68.6k|            break;
 1955|  68.6k|        case OSSL_FUNC_CIPHER_FINAL:
  ------------------
  |  |  355|  68.6k|#define OSSL_FUNC_CIPHER_FINAL 5
  ------------------
  |  Branch (1955:9): [True: 68.6k, False: 957k]
  ------------------
 1956|  68.6k|            if (cipher->cfinal != NULL)
  ------------------
  |  Branch (1956:17): [True: 0, False: 68.6k]
  ------------------
 1957|      0|                break;
 1958|  68.6k|            cipher->cfinal = OSSL_FUNC_cipher_final(fns);
 1959|  68.6k|            fnciphcnt++;
 1960|  68.6k|            break;
 1961|  62.3k|        case OSSL_FUNC_CIPHER_CIPHER:
  ------------------
  |  |  356|  62.3k|#define OSSL_FUNC_CIPHER_CIPHER 6
  ------------------
  |  Branch (1961:9): [True: 62.3k, False: 963k]
  ------------------
 1962|  62.3k|            if (cipher->ccipher != NULL)
  ------------------
  |  Branch (1962:17): [True: 0, False: 62.3k]
  ------------------
 1963|      0|                break;
 1964|  62.3k|            cipher->ccipher = OSSL_FUNC_cipher_cipher(fns);
 1965|  62.3k|            break;
 1966|      0|        case OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT:
  ------------------
  |  |  365|      0|#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
  ------------------
  |  Branch (1966:9): [True: 0, False: 1.02M]
  ------------------
 1967|      0|            if (cipher->p_einit != NULL)
  ------------------
  |  Branch (1967:17): [True: 0, False: 0]
  ------------------
 1968|      0|                break;
 1969|      0|            cipher->p_einit = OSSL_FUNC_cipher_pipeline_encrypt_init(fns);
 1970|      0|            fnpipecnt++;
 1971|      0|            break;
 1972|      0|        case OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT:
  ------------------
  |  |  366|      0|#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
  ------------------
  |  Branch (1972:9): [True: 0, False: 1.02M]
  ------------------
 1973|      0|            if (cipher->p_dinit != NULL)
  ------------------
  |  Branch (1973:17): [True: 0, False: 0]
  ------------------
 1974|      0|                break;
 1975|      0|            cipher->p_dinit = OSSL_FUNC_cipher_pipeline_decrypt_init(fns);
 1976|      0|            fnpipecnt++;
 1977|      0|            break;
 1978|      0|        case OSSL_FUNC_CIPHER_PIPELINE_UPDATE:
  ------------------
  |  |  367|      0|#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
  ------------------
  |  Branch (1978:9): [True: 0, False: 1.02M]
  ------------------
 1979|      0|            if (cipher->p_cupdate != NULL)
  ------------------
  |  Branch (1979:17): [True: 0, False: 0]
  ------------------
 1980|      0|                break;
 1981|      0|            cipher->p_cupdate = OSSL_FUNC_cipher_pipeline_update(fns);
 1982|      0|            fnpipecnt++;
 1983|      0|            break;
 1984|      0|        case OSSL_FUNC_CIPHER_PIPELINE_FINAL:
  ------------------
  |  |  368|      0|#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
  ------------------
  |  Branch (1984:9): [True: 0, False: 1.02M]
  ------------------
 1985|      0|            if (cipher->p_cfinal != NULL)
  ------------------
  |  Branch (1985:17): [True: 0, False: 0]
  ------------------
 1986|      0|                break;
 1987|      0|            cipher->p_cfinal = OSSL_FUNC_cipher_pipeline_final(fns);
 1988|      0|            fnpipecnt++;
 1989|      0|            break;
 1990|  68.6k|        case OSSL_FUNC_CIPHER_FREECTX:
  ------------------
  |  |  357|  68.6k|#define OSSL_FUNC_CIPHER_FREECTX 7
  ------------------
  |  Branch (1990:9): [True: 68.6k, False: 957k]
  ------------------
 1991|  68.6k|            if (cipher->freectx != NULL)
  ------------------
  |  Branch (1991:17): [True: 0, False: 68.6k]
  ------------------
 1992|      0|                break;
 1993|  68.6k|            cipher->freectx = OSSL_FUNC_cipher_freectx(fns);
 1994|  68.6k|            fnctxcnt++;
 1995|  68.6k|            break;
 1996|  68.1k|        case OSSL_FUNC_CIPHER_DUPCTX:
  ------------------
  |  |  358|  68.1k|#define OSSL_FUNC_CIPHER_DUPCTX 8
  ------------------
  |  Branch (1996:9): [True: 68.1k, False: 957k]
  ------------------
 1997|  68.1k|            if (cipher->dupctx != NULL)
  ------------------
  |  Branch (1997:17): [True: 0, False: 68.1k]
  ------------------
 1998|      0|                break;
 1999|  68.1k|            cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns);
 2000|  68.1k|            break;
 2001|  68.6k|        case OSSL_FUNC_CIPHER_GET_PARAMS:
  ------------------
  |  |  359|  68.6k|#define OSSL_FUNC_CIPHER_GET_PARAMS 9
  ------------------
  |  Branch (2001:9): [True: 68.6k, False: 957k]
  ------------------
 2002|  68.6k|            if (cipher->get_params != NULL)
  ------------------
  |  Branch (2002:17): [True: 0, False: 68.6k]
  ------------------
 2003|      0|                break;
 2004|  68.6k|            cipher->get_params = OSSL_FUNC_cipher_get_params(fns);
 2005|  68.6k|            break;
 2006|  68.6k|        case OSSL_FUNC_CIPHER_GET_CTX_PARAMS:
  ------------------
  |  |  360|  68.6k|#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
  ------------------
  |  Branch (2006:9): [True: 68.6k, False: 957k]
  ------------------
 2007|  68.6k|            if (cipher->get_ctx_params != NULL)
  ------------------
  |  Branch (2007:17): [True: 0, False: 68.6k]
  ------------------
 2008|      0|                break;
 2009|  68.6k|            cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns);
 2010|  68.6k|            break;
 2011|  68.6k|        case OSSL_FUNC_CIPHER_SET_CTX_PARAMS:
  ------------------
  |  |  361|  68.6k|#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
  ------------------
  |  Branch (2011:9): [True: 68.6k, False: 957k]
  ------------------
 2012|  68.6k|            if (cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (2012:17): [True: 0, False: 68.6k]
  ------------------
 2013|      0|                break;
 2014|  68.6k|            cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns);
 2015|  68.6k|            break;
 2016|  68.6k|        case OSSL_FUNC_CIPHER_GETTABLE_PARAMS:
  ------------------
  |  |  362|  68.6k|#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
  ------------------
  |  Branch (2016:9): [True: 68.6k, False: 957k]
  ------------------
 2017|  68.6k|            if (cipher->gettable_params != NULL)
  ------------------
  |  Branch (2017:17): [True: 0, False: 68.6k]
  ------------------
 2018|      0|                break;
 2019|  68.6k|            cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns);
 2020|  68.6k|            break;
 2021|  68.6k|        case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  363|  68.6k|#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (2021:9): [True: 68.6k, False: 957k]
  ------------------
 2022|  68.6k|            if (cipher->gettable_ctx_params != NULL)
  ------------------
  |  Branch (2022:17): [True: 0, False: 68.6k]
  ------------------
 2023|      0|                break;
 2024|  68.6k|            cipher->gettable_ctx_params = OSSL_FUNC_cipher_gettable_ctx_params(fns);
 2025|  68.6k|            break;
 2026|  68.6k|        case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  364|  68.6k|#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
  ------------------
  |  Branch (2026:9): [True: 68.6k, False: 957k]
  ------------------
 2027|  68.6k|            if (cipher->settable_ctx_params != NULL)
  ------------------
  |  Branch (2027:17): [True: 0, False: 68.6k]
  ------------------
 2028|      0|                break;
 2029|  68.6k|            cipher->settable_ctx_params = OSSL_FUNC_cipher_settable_ctx_params(fns);
 2030|  68.6k|            break;
 2031|  1.02M|        }
 2032|  1.02M|    }
 2033|  68.6k|    fnciphcnt += encinit + decinit;
 2034|  68.6k|    if ((fnciphcnt != 0 && fnciphcnt != 3 && fnciphcnt != 4)
  ------------------
  |  Branch (2034:10): [True: 68.6k, False: 0]
  |  Branch (2034:28): [True: 68.6k, False: 0]
  |  Branch (2034:46): [True: 0, False: 68.6k]
  ------------------
 2035|  68.6k|        || (fnciphcnt == 0 && cipher->ccipher == NULL && fnpipecnt == 0)
  ------------------
  |  Branch (2035:13): [True: 0, False: 68.6k]
  |  Branch (2035:31): [True: 0, False: 0]
  |  Branch (2035:58): [True: 0, False: 0]
  ------------------
 2036|  68.6k|        || (fnpipecnt != 0 && (fnpipecnt < 3 || cipher->p_cupdate == NULL || cipher->p_cfinal == NULL))
  ------------------
  |  Branch (2036:13): [True: 0, False: 68.6k]
  |  Branch (2036:32): [True: 0, False: 0]
  |  Branch (2036:49): [True: 0, False: 0]
  |  Branch (2036:78): [True: 0, False: 0]
  ------------------
 2037|  68.6k|        || fnctxcnt != 2) {
  ------------------
  |  Branch (2037:12): [True: 0, False: 68.6k]
  ------------------
 2038|       |        /*
 2039|       |         * In order to be a consistent set of functions we must have at least
 2040|       |         * a complete set of "encrypt" functions, or a complete set of "decrypt"
 2041|       |         * functions, or a single "cipher" function. In all cases we need both
 2042|       |         * the "newctx" and "freectx" functions.
 2043|       |         */
 2044|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2045|      0|        goto err;
 2046|      0|    }
 2047|  68.6k|    if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (2047:9): [True: 68.6k, False: 0]
  |  Branch (2047:25): [True: 0, False: 68.6k]
  ------------------
 2048|      0|        goto err;
 2049|       |
 2050|  68.6k|    cipher->prov = prov;
 2051|       |
 2052|  68.6k|    if (!evp_cipher_cache_constants(cipher)) {
  ------------------
  |  Branch (2052:9): [True: 0, False: 68.6k]
  ------------------
 2053|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_CACHE_CONSTANTS_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2054|      0|        goto err;
 2055|      0|    }
 2056|       |
 2057|  68.6k|    return cipher;
 2058|       |
 2059|      0|err:
 2060|      0|    EVP_CIPHER_free(cipher);
 2061|       |    return NULL;
 2062|  68.6k|}
evp_enc.c:set_legacy_nid:
 1866|   128k|{
 1867|   128k|    int nid;
 1868|   128k|    int *legacy_nid = vlegacy_nid;
 1869|       |    /*
 1870|       |     * We use lowest level function to get the associated method, because
 1871|       |     * higher level functions such as EVP_get_cipherbyname() have changed
 1872|       |     * to look at providers too.
 1873|       |     */
 1874|   128k|    const void *legacy_method = OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|   128k|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
 1875|       |
 1876|   128k|    if (*legacy_nid == -1) /* We found a clash already */
  ------------------
  |  Branch (1876:9): [True: 0, False: 128k]
  ------------------
 1877|      0|        return;
 1878|   128k|    if (legacy_method == NULL)
  ------------------
  |  Branch (1878:9): [True: 57.5k, False: 70.7k]
  ------------------
 1879|  57.5k|        return;
 1880|  70.7k|    nid = EVP_CIPHER_get_nid(legacy_method);
 1881|  70.7k|    if (*legacy_nid != NID_undef && *legacy_nid != nid) {
  ------------------
  |  |   18|   141k|#define NID_undef                       0
  ------------------
  |  Branch (1881:9): [True: 13.7k, False: 57.0k]
  |  Branch (1881:37): [True: 0, False: 13.7k]
  ------------------
 1882|      0|        *legacy_nid = -1;
 1883|      0|        return;
 1884|      0|    }
 1885|  70.7k|    *legacy_nid = nid;
 1886|  70.7k|}
evp_enc.c:evp_cipher_up_ref:
 2065|   107k|{
 2066|   107k|    return EVP_CIPHER_up_ref(cipher);
 2067|   107k|}
evp_enc.c:evp_cipher_free:
 2070|   144k|{
 2071|   144k|    EVP_CIPHER_free(cipher);
 2072|   144k|}

ossl_err_load_EVP_strings:
  227|      1|{
  228|      1|#ifndef OPENSSL_NO_ERR
  229|      1|    if (ERR_reason_error_string(EVP_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (229:9): [True: 1, False: 0]
  ------------------
  230|      1|        ERR_load_strings_const(EVP_str_reasons);
  231|      1|#endif
  232|      1|    return 1;
  233|      1|}

evp_generic_fetch:
  398|   328k|{
  399|   328k|    struct evp_method_data_st methdata;
  400|   328k|    void *method;
  401|       |
  402|   328k|    methdata.libctx = libctx;
  403|   328k|    methdata.tmp_store = NULL;
  404|       |    method = inner_evp_generic_fetch(&methdata, NULL, operation_id,
  405|   328k|        name, properties,
  406|   328k|        new_method, up_ref_method, free_method);
  407|   328k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  408|   328k|    return method;
  409|   328k|}
evp_generic_fetch_from_prov:
  424|  3.00k|{
  425|  3.00k|    struct evp_method_data_st methdata;
  426|  3.00k|    void *method;
  427|       |
  428|  3.00k|    methdata.libctx = ossl_provider_libctx(prov);
  429|       |    methdata.tmp_store = NULL;
  430|  3.00k|    method = inner_evp_generic_fetch(&methdata, prov, operation_id,
  431|  3.00k|        name, properties,
  432|  3.00k|        new_method, up_ref_method, free_method);
  433|  3.00k|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  434|  3.00k|    return method;
  435|  3.00k|}
evp_method_store_cache_flush:
  438|     81|{
  439|     81|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  440|       |
  441|     81|    if (store != NULL)
  ------------------
  |  Branch (441:9): [True: 81, False: 0]
  ------------------
  442|     81|        return ossl_method_store_cache_flush_all(store);
  443|      0|    return 1;
  444|     81|}
evp_method_store_remove_all_provided:
  447|     81|{
  448|     81|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  449|     81|    OSSL_METHOD_STORE *store = get_evp_method_store(libctx);
  450|       |
  451|     81|    if (store != NULL)
  ------------------
  |  Branch (451:9): [True: 81, False: 0]
  ------------------
  452|     81|        return ossl_method_store_remove_all_provided(store, prov);
  453|      0|    return 1;
  454|     81|}
evp_generic_do_all:
  638|      2|{
  639|      2|    struct evp_method_data_st methdata;
  640|      2|    struct filter_data_st data;
  641|       |
  642|      2|    methdata.libctx = libctx;
  643|      2|    methdata.tmp_store = NULL;
  644|      2|    (void)inner_evp_generic_fetch(&methdata, NULL, operation_id, NULL, NULL,
  645|      2|        new_method, up_ref_method, free_method);
  646|       |
  647|      2|    data.operation_id = operation_id;
  648|      2|    data.user_fn = user_fn;
  649|      2|    data.user_arg = user_arg;
  650|      2|    if (methdata.tmp_store != NULL)
  ------------------
  |  Branch (650:9): [True: 0, False: 2]
  ------------------
  651|      0|        ossl_method_store_do_all(methdata.tmp_store, &filter_on_operation_id,
  652|      0|            &data);
  653|      2|    ossl_method_store_do_all(get_evp_method_store(libctx),
  654|      2|        &filter_on_operation_id, &data);
  655|      2|    dealloc_tmp_evp_method_store(methdata.tmp_store);
  656|      2|}
evp_is_a:
  660|   212k|{
  661|       |    /*
  662|       |     * For a |prov| that is NULL, the library context will be NULL
  663|       |     */
  664|   212k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  665|   212k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  666|       |
  667|   212k|    if (prov == NULL)
  ------------------
  |  Branch (667:9): [True: 11.0k, False: 201k]
  ------------------
  668|  11.0k|        number = ossl_namemap_name2num(namemap, legacy_name);
  669|   212k|    return ossl_namemap_name2num(namemap, name) == number;
  670|   212k|}
evp_names_do_all:
  675|   299k|{
  676|   299k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  677|   299k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  678|       |
  679|   299k|    return ossl_namemap_doall_names(namemap, number, fn, data);
  680|   299k|}
evp_fetch.c:inner_evp_generic_fetch:
  259|   331k|{
  260|   331k|    OSSL_METHOD_STORE *store = get_evp_method_store(methdata->libctx);
  261|   331k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  262|       |#ifdef FIPS_MODULE
  263|       |    /*
  264|       |     * The FIPS provider has its own internal library context where only it
  265|       |     * is loaded.  Consequently, property queries aren't relevant because
  266|       |     * there is only one fetchable algorithm and it is assumed that the
  267|       |     * FIPS-ness is handled by the using algorithm.
  268|       |     */
  269|       |    const char *const propq = "";
  270|       |#else
  271|   331k|    const char *const propq = properties != NULL ? properties : "";
  ------------------
  |  Branch (271:31): [True: 100k, False: 231k]
  ------------------
  272|   331k|#endif /* FIPS_MODULE */
  273|   331k|    uint32_t meth_id = 0;
  274|   331k|    void *method = NULL;
  275|   331k|    int unsupported, name_id;
  276|       |
  277|   331k|    if (store == NULL || namemap == NULL) {
  ------------------
  |  Branch (277:9): [True: 0, False: 331k]
  |  Branch (277:26): [True: 0, False: 331k]
  ------------------
  278|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  279|      0|        return NULL;
  280|      0|    }
  281|       |
  282|       |    /*
  283|       |     * If there's ever an operation_id == 0 passed, we have an internal
  284|       |     * programming error.
  285|       |     */
  286|   331k|    if (!ossl_assert(operation_id > 0)) {
  ------------------
  |  |   52|   331k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   331k|    __FILE__, __LINE__)
  ------------------
  |  Branch (286:9): [True: 0, False: 331k]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        return NULL;
  289|      0|    }
  290|       |
  291|       |    /* If we haven't received a name id yet, try to get one for the name */
  292|   331k|    name_id = name != NULL ? ossl_namemap_name2num(namemap, name) : 0;
  ------------------
  |  Branch (292:15): [True: 331k, False: 2]
  ------------------
  293|       |
  294|       |    /*
  295|       |     * If we have a name id, calculate a method id with evp_method_id().
  296|       |     *
  297|       |     * evp_method_id returns 0 if we have too many operations (more than
  298|       |     * about 2^8) or too many names (more than about 2^24).  In that case,
  299|       |     * we can't create any new method.
  300|       |     * For all intents and purposes, this is an internal error.
  301|       |     */
  302|   331k|    if (name_id != 0 && (meth_id = evp_method_id(name_id, operation_id)) == 0) {
  ------------------
  |  Branch (302:9): [True: 307k, False: 24.0k]
  |  Branch (302:25): [True: 0, False: 307k]
  ------------------
  303|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  304|      0|        return NULL;
  305|      0|    }
  306|       |
  307|       |    /*
  308|       |     * If we haven't found the name yet, chances are that the algorithm to
  309|       |     * be fetched is unsupported.
  310|       |     */
  311|   331k|    unsupported = name_id == 0;
  312|       |
  313|   331k|    if (meth_id == 0
  ------------------
  |  Branch (313:9): [True: 24.0k, False: 307k]
  ------------------
  314|   307k|        || !ossl_method_store_cache_get(store, prov, meth_id, propq, &method)) {
  ------------------
  |  Branch (314:12): [True: 37.0k, False: 270k]
  ------------------
  315|  61.0k|        OSSL_METHOD_CONSTRUCT_METHOD mcm = {
  316|  61.0k|            get_tmp_evp_method_store,
  317|  61.0k|            reserve_evp_method_store,
  318|  61.0k|            unreserve_evp_method_store,
  319|  61.0k|            get_evp_method_from_store,
  320|  61.0k|            put_evp_method_in_store,
  321|  61.0k|            construct_evp_method,
  322|  61.0k|            destruct_evp_method
  323|  61.0k|        };
  324|       |
  325|  61.0k|        methdata->operation_id = operation_id;
  326|  61.0k|        methdata->name_id = name_id;
  327|  61.0k|        methdata->names = name;
  328|  61.0k|        methdata->propquery = propq;
  329|  61.0k|        methdata->method_from_algorithm = new_method;
  330|  61.0k|        methdata->refcnt_up_method = up_ref_method;
  331|  61.0k|        methdata->destruct_method = free_method;
  332|  61.0k|        methdata->flag_construct_error_occurred = 0;
  333|  61.0k|        if ((method = ossl_method_construct(methdata->libctx, operation_id,
  ------------------
  |  Branch (333:13): [True: 25.0k, False: 35.9k]
  ------------------
  334|  61.0k|                 &prov, 0 /* !force_cache */,
  335|  61.0k|                 &mcm, methdata))
  336|  61.0k|            != NULL) {
  337|       |            /*
  338|       |             * If construction did create a method for us, we know that
  339|       |             * there is a correct name_id and meth_id, since those have
  340|       |             * already been calculated in get_evp_method_from_store() and
  341|       |             * put_evp_method_in_store() above.
  342|       |             * Note that there is a corner case here, in which, if a user
  343|       |             * passes a name of the form name1:name2:..., then the construction
  344|       |             * will create a method against all names, but the lookup will fail
  345|       |             * as ossl_namemap_name2num treats the name string as a single name
  346|       |             * rather than introducing new features where in the EVP_<obj>_fetch
  347|       |             * parses the string and queries for each, return an error.
  348|       |             */
  349|  25.0k|            if (name_id == 0)
  ------------------
  |  Branch (349:17): [True: 1.00k, False: 24.0k]
  ------------------
  350|  1.00k|                name_id = ossl_namemap_name2num(namemap, name);
  351|  25.0k|            if (name_id == 0) {
  ------------------
  |  Branch (351:17): [True: 0, False: 25.0k]
  ------------------
  352|      0|                ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                              ERR_raise_data(ERR_LIB_EVP, ERR_R_FETCH_FAILED,
  ------------------
  |  |  365|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  353|      0|                    "Algorithm %s cannot be found", name);
  354|      0|                free_method(method);
  355|      0|                method = NULL;
  356|  25.0k|            } else {
  357|  25.0k|                meth_id = evp_method_id(name_id, operation_id);
  358|  25.0k|                if (meth_id != 0)
  ------------------
  |  Branch (358:21): [True: 25.0k, False: 0]
  ------------------
  359|  25.0k|                    ossl_method_store_cache_set(store, prov, meth_id, propq,
  360|  25.0k|                        method, up_ref_method, free_method);
  361|  25.0k|            }
  362|  25.0k|        }
  363|       |
  364|       |        /*
  365|       |         * If we never were in the constructor, the algorithm to be fetched
  366|       |         * is unsupported.
  367|       |         */
  368|  61.0k|        unsupported = !methdata->flag_construct_error_occurred;
  369|  61.0k|    }
  370|       |
  371|   331k|    if ((name_id != 0 || name != NULL) && method == NULL) {
  ------------------
  |  Branch (371:10): [True: 308k, False: 23.0k]
  |  Branch (371:26): [True: 23.0k, False: 2]
  |  Branch (371:43): [True: 35.9k, False: 295k]
  ------------------
  372|  35.9k|        int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  364|  35.9k|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|  35.9k|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|  35.9k|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      int code = unsupported ? ERR_R_UNSUPPORTED : ERR_R_FETCH_FAILED;
  ------------------
  |  |  365|      0|#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (372:20): [True: 35.9k, False: 0]
  ------------------
  373|       |
  374|  35.9k|        if (name == NULL)
  ------------------
  |  Branch (374:13): [True: 0, False: 35.9k]
  ------------------
  375|      0|            name = ossl_namemap_num2name(namemap, name_id, 0);
  376|  35.9k|        ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |  406|  35.9k|    (ERR_new(),                                                  \
  |  |  407|  35.9k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  35.9k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  35.9k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, code,
  ------------------
  |  |   78|  35.9k|#define ERR_LIB_EVP 6
  ------------------
  377|  35.9k|            "%s, Algorithm (%s : %d), Properties (%s)",
  378|  35.9k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  379|  35.9k|            name == NULL ? "<null>" : name, name_id,
  ------------------
  |  Branch (379:13): [True: 0, False: 35.9k]
  ------------------
  380|  35.9k|            properties == NULL ? "<null>" : properties);
  ------------------
  |  Branch (380:13): [True: 25.1k, False: 10.8k]
  ------------------
  381|   295k|    } else {
  382|   295k|        OSSL_TRACE4(QUERY, "%s, Algorithm (%s : %d), Properties (%s)\n",
  ------------------
  |  |  299|   295k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4))
  |  |  ------------------
  |  |  |  |  285|   295k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  383|   295k|            ossl_lib_ctx_get_descriptor(methdata->libctx),
  384|   295k|            name == NULL ? "<null>" : name, name_id,
  385|   295k|            properties == NULL ? "<null>" : properties);
  386|   295k|    }
  387|       |
  388|   331k|    return method;
  389|   331k|}
evp_fetch.c:evp_method_id:
  117|   512k|{
  118|   512k|    if (!ossl_assert(name_id > 0 && name_id <= METHOD_ID_NAME_MAX)
  ------------------
  |  |   52|  1.02M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 512k, False: 0]
  |  |  |  Branch (52:41): [True: 512k, False: 0]
  |  |  ------------------
  |  |   53|  1.02M|    __FILE__, __LINE__)
  ------------------
  |  Branch (118:9): [True: 0, False: 512k]
  ------------------
  119|   512k|        || !ossl_assert(operation_id > 0
  ------------------
  |  |   52|  1.02M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 512k, False: 0]
  |  |  |  Branch (52:41): [True: 512k, False: 0]
  |  |  ------------------
  |  |   53|   512k|    __FILE__, __LINE__)
  ------------------
  |  Branch (119:12): [True: 0, False: 512k]
  ------------------
  120|   512k|            && operation_id <= METHOD_ID_OPERATION_MAX))
  121|      0|        return 0;
  122|   512k|    return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  114|   512k|#define METHOD_ID_NAME_OFFSET 8
  ------------------
                  return (((name_id << METHOD_ID_NAME_OFFSET) & METHOD_ID_NAME_MASK)
  ------------------
  |  |  113|   512k|#define METHOD_ID_NAME_MASK 0x7FFFFF00
  ------------------
  123|   512k|        | (operation_id & METHOD_ID_OPERATION_MASK));
  ------------------
  |  |  111|   512k|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  124|   512k|}
evp_fetch.c:reserve_evp_method_store:
   73|  66.2k|{
   74|  66.2k|    struct evp_method_data_st *methdata = data;
   75|       |
   76|  66.2k|    if (store == NULL
  ------------------
  |  Branch (76:9): [True: 66.2k, False: 0]
  ------------------
   77|  66.2k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (77:12): [True: 0, False: 66.2k]
  ------------------
   78|      0|        return 0;
   79|       |
   80|  66.2k|    return ossl_method_lock_store(store);
   81|  66.2k|}
evp_fetch.c:unreserve_evp_method_store:
   84|  66.2k|{
   85|  66.2k|    struct evp_method_data_st *methdata = data;
   86|       |
   87|  66.2k|    if (store == NULL
  ------------------
  |  Branch (87:9): [True: 66.2k, False: 0]
  ------------------
   88|  66.2k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (88:12): [True: 0, False: 66.2k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|  66.2k|    return ossl_method_unlock_store(store);
   92|  66.2k|}
evp_fetch.c:get_evp_method_from_store:
  128|  61.0k|{
  129|  61.0k|    struct evp_method_data_st *methdata = data;
  130|  61.0k|    void *method = NULL;
  131|  61.0k|    int name_id;
  132|  61.0k|    uint32_t meth_id;
  133|       |
  134|       |    /*
  135|       |     * get_evp_method_from_store() is only called to try and get the method
  136|       |     * that evp_generic_fetch() is asking for, and the operation id as well
  137|       |     * as the name or name id are passed via methdata.
  138|       |     */
  139|  61.0k|    if ((name_id = methdata->name_id) == 0 && methdata->names != NULL) {
  ------------------
  |  Branch (139:9): [True: 24.0k, False: 37.0k]
  |  Branch (139:47): [True: 24.0k, False: 2]
  ------------------
  140|  24.0k|        OSSL_NAMEMAP *namemap = ossl_namemap_stored(methdata->libctx);
  141|  24.0k|        const char *names = methdata->names;
  142|  24.0k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|  24.0k|#define NAME_SEPARATOR ':'
  ------------------
  143|  24.0k|        size_t l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (143:21): [True: 24.0k, False: 0]
  ------------------
  144|       |
  145|  24.0k|        if (namemap == 0)
  ------------------
  |  Branch (145:13): [True: 0, False: 24.0k]
  ------------------
  146|      0|            return NULL;
  147|  24.0k|        name_id = ossl_namemap_name2num_n(namemap, names, l);
  148|  24.0k|    }
  149|       |
  150|  61.0k|    if (name_id == 0
  ------------------
  |  Branch (150:9): [True: 23.0k, False: 38.0k]
  ------------------
  151|  38.0k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (151:12): [True: 0, False: 38.0k]
  ------------------
  152|  23.0k|        return NULL;
  153|       |
  154|  38.0k|    if (store == NULL
  ------------------
  |  Branch (154:9): [True: 38.0k, False: 0]
  ------------------
  155|  38.0k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (155:12): [True: 0, False: 38.0k]
  ------------------
  156|      0|        return NULL;
  157|       |
  158|  38.0k|    if (!ossl_method_store_fetch(store, meth_id, methdata->propquery, prov,
  ------------------
  |  Branch (158:9): [True: 12.9k, False: 25.0k]
  ------------------
  159|  38.0k|            &method))
  160|  12.9k|        return NULL;
  161|  25.0k|    return method;
  162|  38.0k|}
evp_fetch.c:put_evp_method_in_store:
  168|   141k|{
  169|   141k|    struct evp_method_data_st *methdata = data;
  170|   141k|    OSSL_NAMEMAP *namemap;
  171|   141k|    int name_id;
  172|   141k|    uint32_t meth_id;
  173|   141k|    size_t l = 0;
  174|       |
  175|       |    /*
  176|       |     * put_evp_method_in_store() is only called with an EVP method that was
  177|       |     * successfully created by construct_method() below, which means that
  178|       |     * all the names should already be stored in the namemap with the same
  179|       |     * numeric identity, so just use the first to get that identity.
  180|       |     */
  181|   141k|    if (names != NULL) {
  ------------------
  |  Branch (181:9): [True: 141k, False: 0]
  ------------------
  182|   141k|        const char *q = strchr(names, NAME_SEPARATOR);
  ------------------
  |  |   24|   141k|#define NAME_SEPARATOR ':'
  ------------------
  183|       |
  184|   141k|        l = (q == NULL ? strlen(names) : (size_t)(q - names));
  ------------------
  |  Branch (184:14): [True: 43.2k, False: 98.2k]
  ------------------
  185|   141k|    }
  186|       |
  187|   141k|    if ((namemap = ossl_namemap_stored(methdata->libctx)) == NULL
  ------------------
  |  Branch (187:9): [True: 0, False: 141k]
  ------------------
  188|   141k|        || (name_id = ossl_namemap_name2num_n(namemap, names, l)) == 0
  ------------------
  |  Branch (188:12): [True: 0, False: 141k]
  ------------------
  189|   141k|        || (meth_id = evp_method_id(name_id, methdata->operation_id)) == 0)
  ------------------
  |  Branch (189:12): [True: 0, False: 141k]
  ------------------
  190|      0|        return 0;
  191|       |
  192|   141k|    OSSL_TRACE1(QUERY, "put_evp_method_in_store: original store: %p\n", store);
  ------------------
  |  |  293|   141k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  285|   141k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  193|   141k|    if (store == NULL
  ------------------
  |  Branch (193:9): [True: 141k, False: 0]
  ------------------
  194|   141k|        && (store = get_evp_method_store(methdata->libctx)) == NULL)
  ------------------
  |  Branch (194:12): [True: 0, False: 141k]
  ------------------
  195|      0|        return 0;
  196|       |
  197|   141k|    OSSL_TRACE5(QUERY,
  ------------------
  |  |  301|   141k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3, arg4, arg5))
  |  |  ------------------
  |  |  |  |  285|   141k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  198|   141k|        "put_evp_method_in_store: "
  199|   141k|        "store: %p, names: %s, operation_id %d, method_id: %d, properties: %s\n",
  200|   141k|        store, names, methdata->operation_id, meth_id, propdef ? propdef : "<null>");
  201|   141k|    return ossl_method_store_add(store, prov, meth_id, propdef, method,
  202|   141k|        methdata->refcnt_up_method,
  203|   141k|        methdata->destruct_method);
  204|   141k|}
evp_fetch.c:construct_evp_method:
  212|   141k|{
  213|       |    /*
  214|       |     * This function is only called if get_evp_method_from_store() returned
  215|       |     * NULL, so it's safe to say that of all the spots to create a new
  216|       |     * namemap entry, this is it.  Should the name already exist there, we
  217|       |     * know that ossl_namemap_add_name() will return its corresponding
  218|       |     * number.
  219|       |     */
  220|   141k|    struct evp_method_data_st *methdata = data;
  221|   141k|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  222|   141k|    OSSL_NAMEMAP *namemap = ossl_namemap_stored(libctx);
  223|   141k|    const char *names = algodef->algorithm_names;
  224|   141k|    int name_id = ossl_namemap_add_names(namemap, 0, names, NAME_SEPARATOR);
  ------------------
  |  |   24|   141k|#define NAME_SEPARATOR ':'
  ------------------
  225|   141k|    void *method;
  226|       |
  227|   141k|    if (name_id == 0)
  ------------------
  |  Branch (227:9): [True: 0, False: 141k]
  ------------------
  228|      0|        return NULL;
  229|       |
  230|   141k|    method = methdata->method_from_algorithm(name_id, algodef, prov);
  231|       |
  232|       |    /*
  233|       |     * Flag to indicate that there was actual construction errors.  This
  234|       |     * helps inner_evp_generic_fetch() determine what error it should
  235|       |     * record on inaccessible algorithms.
  236|       |     */
  237|   141k|    if (method == NULL)
  ------------------
  |  Branch (237:9): [True: 0, False: 141k]
  ------------------
  238|      0|        methdata->flag_construct_error_occurred = 1;
  239|       |
  240|   141k|    return method;
  241|   141k|}
evp_fetch.c:destruct_evp_method:
  244|   141k|{
  245|   141k|    struct evp_method_data_st *methdata = data;
  246|       |
  247|   141k|    methdata->destruct_method(method);
  248|   141k|}
evp_fetch.c:dealloc_tmp_evp_method_store:
   61|   331k|{
   62|   331k|    OSSL_TRACE1(QUERY, "Deallocating the tmp_store %p\n", store);
  ------------------
  |  |  293|   331k|    OSSL_TRACEV(category, (trc_out, format, arg1))
  |  |  ------------------
  |  |  |  |  285|   331k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   63|   331k|    if (store != NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 331k]
  ------------------
   64|      0|        ossl_method_store_free(store);
   65|   331k|}
evp_fetch.c:get_evp_method_store:
   68|   643k|{
   69|   643k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX);
  ------------------
  |  |   96|   643k|#define OSSL_LIB_CTX_EVP_METHOD_STORE_INDEX 0
  ------------------
   70|   643k|}
evp_fetch.c:filter_on_operation_id:
  623|    536|{
  624|    536|    struct filter_data_st *data = arg;
  625|       |
  626|    536|    if ((id & METHOD_ID_OPERATION_MASK) == data->operation_id)
  ------------------
  |  |  111|    536|#define METHOD_ID_OPERATION_MASK 0x000000FF
  ------------------
  |  Branch (626:9): [True: 80, False: 456]
  ------------------
  627|     80|        data->user_fn(method, data->user_arg);
  628|    536|}

EVP_CIPHER_get_type:
  255|  96.6k|{
  256|  96.6k|    int nid;
  257|  96.6k|    nid = EVP_CIPHER_get_nid(cipher);
  258|       |
  259|  96.6k|    switch (nid) {
  260|       |
  261|  1.58k|    case NID_rc2_cbc:
  ------------------
  |  | 1303|  1.58k|#define NID_rc2_cbc             37
  ------------------
  |  Branch (261:5): [True: 1.58k, False: 95.0k]
  ------------------
  262|  2.64k|    case NID_rc2_64_cbc:
  ------------------
  |  | 1324|  2.64k|#define NID_rc2_64_cbc          166
  ------------------
  |  Branch (262:5): [True: 1.05k, False: 95.5k]
  ------------------
  263|  3.69k|    case NID_rc2_40_cbc:
  ------------------
  |  | 1320|  3.69k|#define NID_rc2_40_cbc          98
  ------------------
  |  Branch (263:5): [True: 1.05k, False: 95.5k]
  ------------------
  264|       |
  265|  3.69k|        return NID_rc2_cbc;
  ------------------
  |  | 1303|  3.69k|#define NID_rc2_cbc             37
  ------------------
  266|       |
  267|    528|    case NID_rc4:
  ------------------
  |  | 1328|    528|#define NID_rc4         5
  ------------------
  |  Branch (267:5): [True: 528, False: 96.0k]
  ------------------
  268|  1.05k|    case NID_rc4_40:
  ------------------
  |  | 1333|  1.05k|#define NID_rc4_40              97
  ------------------
  |  Branch (268:5): [True: 528, False: 96.0k]
  ------------------
  269|       |
  270|  1.05k|        return NID_rc4;
  ------------------
  |  | 1328|  1.05k|#define NID_rc4         5
  ------------------
  271|       |
  272|    528|    case NID_aes_128_cfb128:
  ------------------
  |  | 3112|    528|#define NID_aes_128_cfb128              421
  ------------------
  |  Branch (272:5): [True: 528, False: 96.0k]
  ------------------
  273|  1.05k|    case NID_aes_128_cfb8:
  ------------------
  |  | 3233|  1.05k|#define NID_aes_128_cfb8                653
  ------------------
  |  Branch (273:5): [True: 528, False: 96.0k]
  ------------------
  274|  1.58k|    case NID_aes_128_cfb1:
  ------------------
  |  | 3221|  1.58k|#define NID_aes_128_cfb1                650
  ------------------
  |  Branch (274:5): [True: 528, False: 96.0k]
  ------------------
  275|       |
  276|  1.58k|        return NID_aes_128_cfb128;
  ------------------
  |  | 3112|  1.58k|#define NID_aes_128_cfb128              421
  ------------------
  277|       |
  278|    528|    case NID_aes_192_cfb128:
  ------------------
  |  | 3150|    528|#define NID_aes_192_cfb128              425
  ------------------
  |  Branch (278:5): [True: 528, False: 96.0k]
  ------------------
  279|  1.05k|    case NID_aes_192_cfb8:
  ------------------
  |  | 3237|  1.05k|#define NID_aes_192_cfb8                654
  ------------------
  |  Branch (279:5): [True: 528, False: 96.0k]
  ------------------
  280|  1.58k|    case NID_aes_192_cfb1:
  ------------------
  |  | 3225|  1.58k|#define NID_aes_192_cfb1                651
  ------------------
  |  Branch (280:5): [True: 528, False: 96.0k]
  ------------------
  281|       |
  282|  1.58k|        return NID_aes_192_cfb128;
  ------------------
  |  | 3150|  1.58k|#define NID_aes_192_cfb128              425
  ------------------
  283|       |
  284|    528|    case NID_aes_256_cfb128:
  ------------------
  |  | 3188|    528|#define NID_aes_256_cfb128              429
  ------------------
  |  Branch (284:5): [True: 528, False: 96.0k]
  ------------------
  285|  1.05k|    case NID_aes_256_cfb8:
  ------------------
  |  | 3241|  1.05k|#define NID_aes_256_cfb8                655
  ------------------
  |  Branch (285:5): [True: 528, False: 96.0k]
  ------------------
  286|  1.58k|    case NID_aes_256_cfb1:
  ------------------
  |  | 3229|  1.58k|#define NID_aes_256_cfb1                652
  ------------------
  |  Branch (286:5): [True: 528, False: 96.0k]
  ------------------
  287|       |
  288|  1.58k|        return NID_aes_256_cfb128;
  ------------------
  |  | 3188|  1.58k|#define NID_aes_256_cfb128              429
  ------------------
  289|       |
  290|    528|    case NID_des_cfb64:
  ------------------
  |  | 2282|    528|#define NID_des_cfb64           30
  ------------------
  |  Branch (290:5): [True: 528, False: 96.0k]
  ------------------
  291|  1.05k|    case NID_des_cfb8:
  ------------------
  |  | 3273|  1.05k|#define NID_des_cfb8            657
  ------------------
  |  Branch (291:5): [True: 528, False: 96.0k]
  ------------------
  292|  1.58k|    case NID_des_cfb1:
  ------------------
  |  | 3269|  1.58k|#define NID_des_cfb1            656
  ------------------
  |  Branch (292:5): [True: 528, False: 96.0k]
  ------------------
  293|       |
  294|  1.58k|        return NID_des_cfb64;
  ------------------
  |  | 2282|  1.58k|#define NID_des_cfb64           30
  ------------------
  295|       |
  296|    528|    case NID_des_ede3_cfb64:
  ------------------
  |  | 2323|    528|#define NID_des_ede3_cfb64              61
  ------------------
  |  Branch (296:5): [True: 528, False: 96.0k]
  ------------------
  297|  1.05k|    case NID_des_ede3_cfb8:
  ------------------
  |  | 3281|  1.05k|#define NID_des_ede3_cfb8               659
  ------------------
  |  Branch (297:5): [True: 528, False: 96.0k]
  ------------------
  298|  1.58k|    case NID_des_ede3_cfb1:
  ------------------
  |  | 3277|  1.58k|#define NID_des_ede3_cfb1               658
  ------------------
  |  Branch (298:5): [True: 528, False: 96.0k]
  ------------------
  299|       |
  300|  1.58k|        return NID_des_cfb64;
  ------------------
  |  | 2282|  1.58k|#define NID_des_cfb64           30
  ------------------
  301|       |
  302|  83.9k|    default:
  ------------------
  |  Branch (302:5): [True: 83.9k, False: 12.6k]
  ------------------
  303|       |#ifdef FIPS_MODULE
  304|       |        return NID_undef;
  305|       |#else
  306|  83.9k|    {
  307|       |        /* Check it has an OID and it is valid */
  308|  83.9k|        ASN1_OBJECT *otmp = OBJ_nid2obj(nid);
  309|       |
  310|  83.9k|        if (OBJ_get0_data(otmp) == NULL)
  ------------------
  |  Branch (310:13): [True: 25.3k, False: 58.6k]
  ------------------
  311|  25.3k|            nid = NID_undef;
  ------------------
  |  |   18|  25.3k|#define NID_undef                       0
  ------------------
  312|  83.9k|        ASN1_OBJECT_free(otmp);
  313|  83.9k|        return nid;
  314|  1.05k|    }
  315|  96.6k|#endif
  316|  96.6k|    }
  317|  96.6k|}
evp_cipher_cache_constants:
  320|  68.6k|{
  321|  68.6k|    int ok, aead = 0, custom_iv = 0, cts = 0, multiblock = 0, randkey = 0;
  322|  68.6k|    int encrypt_then_mac = 0;
  323|  68.6k|    size_t ivlen = 0;
  324|  68.6k|    size_t blksz = 0;
  325|  68.6k|    size_t keylen = 0;
  326|  68.6k|    unsigned int mode = 0;
  327|  68.6k|    OSSL_PARAM params[11];
  328|       |
  329|  68.6k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_BLOCK_SIZE, &blksz);
  ------------------
  |  |  189|  68.6k|# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
  ------------------
  330|  68.6k|    params[1] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN, &ivlen);
  ------------------
  |  |  199|  68.6k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  331|  68.6k|    params[2] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &keylen);
  ------------------
  |  |  200|  68.6k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  332|  68.6k|    params[3] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_MODE, &mode);
  ------------------
  |  |  201|  68.6k|# define OSSL_CIPHER_PARAM_MODE "mode"
  ------------------
  333|  68.6k|    params[4] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_AEAD, &aead);
  ------------------
  |  |  175|  68.6k|# define OSSL_CIPHER_PARAM_AEAD "aead"
  ------------------
  334|  68.6k|    params[5] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CUSTOM_IV,
  ------------------
  |  |  192|  68.6k|# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
  ------------------
  335|  68.6k|        &custom_iv);
  336|  68.6k|    params[6] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_CTS, &cts);
  ------------------
  |  |  190|  68.6k|# define OSSL_CIPHER_PARAM_CTS "cts"
  ------------------
  337|  68.6k|    params[7] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK,
  ------------------
  |  |  209|  68.6k|# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
  ------------------
  338|  68.6k|        &multiblock);
  339|  68.6k|    params[8] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_HAS_RAND_KEY,
  ------------------
  |  |  197|  68.6k|# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
  ------------------
  340|  68.6k|        &randkey);
  341|  68.6k|    params[9] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC,
  ------------------
  |  |  194|  68.6k|# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
  ------------------
  342|  68.6k|        &encrypt_then_mac);
  343|  68.6k|    params[10] = OSSL_PARAM_construct_end();
  344|  68.6k|    ok = evp_do_ciph_getparams(cipher, params) > 0;
  345|  68.6k|    if (ok) {
  ------------------
  |  Branch (345:9): [True: 68.6k, False: 0]
  ------------------
  346|  68.6k|        cipher->block_size = (int)blksz;
  347|  68.6k|        cipher->iv_len = (int)ivlen;
  348|  68.6k|        cipher->key_len = (int)keylen;
  349|  68.6k|        cipher->flags = mode;
  350|  68.6k|        if (aead)
  ------------------
  |  Branch (350:13): [True: 14.7k, False: 53.8k]
  ------------------
  351|  14.7k|            cipher->flags |= EVP_CIPH_FLAG_AEAD_CIPHER;
  ------------------
  |  |  357|  14.7k|#define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000
  ------------------
  352|  68.6k|        if (custom_iv)
  ------------------
  |  Branch (352:13): [True: 21.6k, False: 46.9k]
  ------------------
  353|  21.6k|            cipher->flags |= EVP_CIPH_CUSTOM_IV;
  ------------------
  |  |  327|  21.6k|#define EVP_CIPH_CUSTOM_IV 0x10
  ------------------
  354|  68.6k|        if (cts)
  ------------------
  |  Branch (354:13): [True: 3.16k, False: 65.4k]
  ------------------
  355|  3.16k|            cipher->flags |= EVP_CIPH_FLAG_CTS;
  ------------------
  |  |  355|  3.16k|#define EVP_CIPH_FLAG_CTS 0x4000
  ------------------
  356|  68.6k|        if (multiblock)
  ------------------
  |  Branch (356:13): [True: 2.11k, False: 66.5k]
  ------------------
  357|  2.11k|            cipher->flags |= EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK;
  ------------------
  |  |  358|  2.11k|#define EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK 0x400000
  ------------------
  358|  68.6k|        if (cipher->ccipher != NULL)
  ------------------
  |  Branch (358:13): [True: 62.3k, False: 6.33k]
  ------------------
  359|  62.3k|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_CIPHER;
  ------------------
  |  |  356|  62.3k|#define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000
  ------------------
  360|  68.6k|        if (randkey)
  ------------------
  |  Branch (360:13): [True: 5.80k, False: 62.8k]
  ------------------
  361|  5.80k|            cipher->flags |= EVP_CIPH_RAND_KEY;
  ------------------
  |  |  337|  5.80k|#define EVP_CIPH_RAND_KEY 0x200
  ------------------
  362|  68.6k|        if (encrypt_then_mac)
  ------------------
  |  Branch (362:13): [True: 0, False: 68.6k]
  ------------------
  363|      0|            cipher->flags |= EVP_CIPH_FLAG_ENC_THEN_MAC;
  ------------------
  |  |  368|      0|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  364|  68.6k|        if (OSSL_PARAM_locate_const(EVP_CIPHER_gettable_ctx_params(cipher),
  ------------------
  |  Branch (364:13): [True: 0, False: 68.6k]
  ------------------
  365|  68.6k|                OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS))
  ------------------
  |  |  187|  68.6k|# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
  |  |  ------------------
  |  |  |  |  126|  68.6k|# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
  |  |  ------------------
  ------------------
  366|      0|            cipher->flags |= EVP_CIPH_FLAG_CUSTOM_ASN1;
  ------------------
  |  |  362|      0|#define EVP_CIPH_FLAG_CUSTOM_ASN1 0x1000000
  ------------------
  367|  68.6k|    }
  368|  68.6k|    return ok;
  369|  68.6k|}
EVP_CIPHER_get_iv_length:
  491|  1.50k|{
  492|  1.50k|    return (cipher == NULL) ? 0 : cipher->iv_len;
  ------------------
  |  Branch (492:12): [True: 0, False: 1.50k]
  ------------------
  493|  1.50k|}
EVP_CIPHER_CTX_get_iv_length:
  496|  24.7k|{
  497|  24.7k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (497:9): [True: 0, False: 24.7k]
  ------------------
  498|      0|        return 0;
  499|       |
  500|  24.7k|    if (ctx->iv_len < 0) {
  ------------------
  |  Branch (500:9): [True: 1.50k, False: 23.2k]
  ------------------
  501|  1.50k|        int rv, len = EVP_CIPHER_get_iv_length(ctx->cipher);
  502|  1.50k|        size_t v = len;
  503|  1.50k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.50k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  1.50k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  504|       |
  505|  1.50k|        if (ctx->cipher->get_ctx_params != NULL) {
  ------------------
  |  Branch (505:13): [True: 1.50k, False: 0]
  ------------------
  506|  1.50k|            params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_IVLEN,
  ------------------
  |  |  199|  1.50k|# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
  ------------------
  507|  1.50k|                &v);
  508|  1.50k|            rv = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  509|  1.50k|            if (rv > 0) {
  ------------------
  |  Branch (509:17): [True: 1.50k, False: 0]
  ------------------
  510|  1.50k|                if (OSSL_PARAM_modified(params)
  ------------------
  |  Branch (510:21): [True: 1.50k, False: 0]
  ------------------
  511|  1.50k|                    && !OSSL_PARAM_get_int(params, &len))
  ------------------
  |  Branch (511:24): [True: 0, False: 1.50k]
  ------------------
  512|      0|                    return -1;
  513|  1.50k|            } else if (rv != EVP_CTRL_RET_UNSUPPORTED) {
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  |  Branch (513:24): [True: 0, False: 0]
  ------------------
  514|      0|                return -1;
  515|      0|            }
  516|  1.50k|        }
  517|       |        /* Code below to be removed when legacy support is dropped. */
  518|      0|        else if ((EVP_CIPHER_get_flags(ctx->cipher)
  ------------------
  |  Branch (518:18): [True: 0, False: 0]
  ------------------
  519|      0|                     & EVP_CIPH_CUSTOM_IV_LENGTH)
  ------------------
  |  |  341|      0|#define EVP_CIPH_CUSTOM_IV_LENGTH 0x800
  ------------------
  520|      0|            != 0) {
  521|      0|            rv = EVP_CIPHER_CTX_ctrl((EVP_CIPHER_CTX *)ctx, EVP_CTRL_GET_IVLEN,
  ------------------
  |  |  442|      0|#define EVP_CTRL_GET_IVLEN 0x25
  ------------------
  522|      0|                0, &len);
  523|      0|            if (rv <= 0)
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|                return -1;
  525|      0|        }
  526|       |        /*-
  527|       |         * Casting away the const is annoying but required here.  We need to
  528|       |         * cache the result for performance reasons.
  529|       |         */
  530|  1.50k|        ((EVP_CIPHER_CTX *)ctx)->iv_len = len;
  531|  1.50k|    }
  532|  24.7k|    return ctx->iv_len;
  533|  24.7k|}
EVP_CIPHER_get_key_length:
  638|  1.50k|{
  639|  1.50k|    return cipher->key_len;
  640|  1.50k|}
EVP_CIPHER_CTX_get_key_length:
  643|  66.0k|{
  644|  66.0k|    if (ctx->cipher == NULL)
  ------------------
  |  Branch (644:9): [True: 0, False: 66.0k]
  ------------------
  645|      0|        return 0;
  646|       |
  647|  66.0k|    if (ctx->key_len <= 0 && ctx->cipher->prov != NULL) {
  ------------------
  |  Branch (647:9): [True: 4.50k, False: 61.5k]
  |  Branch (647:30): [True: 4.50k, False: 0]
  ------------------
  648|  4.50k|        int ok;
  649|  4.50k|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.50k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.50k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  650|  4.50k|        size_t len;
  651|       |
  652|  4.50k|        params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_KEYLEN, &len);
  ------------------
  |  |  200|  4.50k|# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
  ------------------
  653|  4.50k|        ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params);
  654|  4.50k|        if (ok <= 0)
  ------------------
  |  Branch (654:13): [True: 0, False: 4.50k]
  ------------------
  655|      0|            return EVP_CTRL_RET_UNSUPPORTED;
  ------------------
  |  |   13|      0|#define EVP_CTRL_RET_UNSUPPORTED -1
  ------------------
  656|       |
  657|       |        /*-
  658|       |         * The if branch should never be taken since EVP_MAX_KEY_LENGTH is
  659|       |         * less than INT_MAX but best to be safe.
  660|       |         *
  661|       |         * Casting away the const is annoying but required here.  We need to
  662|       |         * cache the result for performance reasons.
  663|       |         */
  664|  4.50k|        if (!OSSL_PARAM_get_int(params, &((EVP_CIPHER_CTX *)ctx)->key_len))
  ------------------
  |  Branch (664:13): [True: 0, False: 4.50k]
  ------------------
  665|      0|            return -1;
  666|  4.50k|        ((EVP_CIPHER_CTX *)ctx)->key_len = (int)len;
  667|  4.50k|    }
  668|  66.0k|    return ctx->key_len;
  669|  66.0k|}
EVP_CIPHER_get_nid:
  672|   167k|{
  673|   167k|    return (cipher == NULL) ? NID_undef : cipher->nid;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (673:12): [True: 0, False: 167k]
  ------------------
  674|   167k|}
EVP_CIPHER_get0_provider:
  728|  97.5k|{
  729|  97.5k|    return cipher->prov;
  730|  97.5k|}
EVP_MD_is_a:
  738|  11.0k|{
  739|  11.0k|    if (md == NULL)
  ------------------
  |  Branch (739:9): [True: 0, False: 11.0k]
  ------------------
  740|      0|        return 0;
  741|  11.0k|    if (md->prov != NULL)
  ------------------
  |  Branch (741:9): [True: 0, False: 11.0k]
  ------------------
  742|      0|        return evp_is_a(md->prov, md->name_id, NULL, name);
  743|  11.0k|    return evp_is_a(NULL, 0, EVP_MD_get0_name(md), name);
  744|  11.0k|}
EVP_MD_get0_name:
  763|  22.1k|{
  764|  22.1k|    if (md == NULL)
  ------------------
  |  Branch (764:9): [True: 0, False: 22.1k]
  ------------------
  765|      0|        return NULL;
  766|  22.1k|    if (md->type_name != NULL)
  ------------------
  |  Branch (766:9): [True: 0, False: 22.1k]
  ------------------
  767|      0|        return md->type_name;
  768|  22.1k|#ifndef FIPS_MODULE
  769|  22.1k|    return OBJ_nid2sn(EVP_MD_nid(md));
  ------------------
  |  |  554|  22.1k|#define EVP_MD_nid EVP_MD_get_type
  ------------------
  770|       |#else
  771|       |    return NULL;
  772|       |#endif
  773|  22.1k|}
EVP_MD_get0_provider:
  786|  29.6k|{
  787|  29.6k|    return md->prov;
  788|  29.6k|}
EVP_MD_get_type:
  791|   116k|{
  792|   116k|    return md->type;
  793|   116k|}
EVP_MD_get_size:
  810|   109k|{
  811|   109k|    if (md == NULL) {
  ------------------
  |  Branch (811:9): [True: 0, False: 109k]
  ------------------
  812|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_MESSAGE_DIGEST_IS_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  813|      0|        return -1;
  814|      0|    }
  815|   109k|    return md->md_size;
  816|   109k|}
EVP_MD_xof:
  819|  8.64k|{
  820|  8.64k|    return md != NULL && ((EVP_MD_get_flags(md) & EVP_MD_FLAG_XOF) != 0);
  ------------------
  |  |  179|  8.64k|#define EVP_MD_FLAG_XOF 0x0002
  ------------------
  |  Branch (820:12): [True: 8.64k, False: 0]
  |  Branch (820:26): [True: 7.41k, False: 1.23k]
  ------------------
  821|  8.64k|}
EVP_MD_get_flags:
  824|  8.64k|{
  825|  8.64k|    return md->flags;
  826|  8.64k|}
evp_md_free_int:
  862|  14.2k|{
  863|  14.2k|    OPENSSL_free(md->type_name);
  ------------------
  |  |  131|  14.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  864|  14.2k|    ossl_provider_free(md->prov);
  865|  14.2k|    CRYPTO_FREE_REF(&md->refcnt);
  866|  14.2k|    OPENSSL_free(md);
  ------------------
  |  |  131|  14.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  867|  14.2k|}
EVP_MD_CTX_get0_md:
 1014|  54.4k|{
 1015|  54.4k|    if (ctx == NULL)
  ------------------
  |  Branch (1015:9): [True: 0, False: 54.4k]
  ------------------
 1016|      0|        return NULL;
 1017|  54.4k|    return ctx->reqdigest;
 1018|  54.4k|}
EVP_MD_CTX_get_size_ex:
 1033|  45.8k|{
 1034|  45.8k|    EVP_MD_CTX *c = (EVP_MD_CTX *)ctx;
 1035|  45.8k|    const OSSL_PARAM *gettables;
 1036|       |
 1037|  45.8k|    gettables = EVP_MD_CTX_gettable_params(c);
 1038|  45.8k|    if (gettables != NULL
  ------------------
  |  Branch (1038:9): [True: 0, False: 45.8k]
  ------------------
 1039|      0|        && OSSL_PARAM_locate_const(gettables,
  ------------------
  |  Branch (1039:12): [True: 0, False: 0]
  ------------------
 1040|      0|               OSSL_DIGEST_PARAM_SIZE)
  ------------------
  |  |  229|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
 1041|      0|            != NULL) {
 1042|      0|        OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
                      OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|      0|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1043|      0|        size_t sz = 0;
 1044|       |
 1045|       |        /*
 1046|       |         * For XOF's EVP_MD_get_size() returns 0
 1047|       |         * So try to get the xoflen instead. This will return -1 if the
 1048|       |         * xof length has not been set.
 1049|       |         */
 1050|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_DIGEST_PARAM_SIZE, &sz);
  ------------------
  |  |  229|      0|# define OSSL_DIGEST_PARAM_SIZE "size"
  ------------------
 1051|      0|        if (EVP_MD_CTX_get_params(c, params) != 1
  ------------------
  |  Branch (1051:13): [True: 0, False: 0]
  ------------------
 1052|      0|            || sz > INT_MAX
  ------------------
  |  Branch (1052:16): [True: 0, False: 0]
  ------------------
 1053|      0|            || sz == 0)
  ------------------
  |  Branch (1053:16): [True: 0, False: 0]
  ------------------
 1054|      0|            return -1;
 1055|      0|        return (int)sz;
 1056|      0|    }
 1057|       |    /* Normal digests have a constant fixed size output */
 1058|  45.8k|    return EVP_MD_get_size(EVP_MD_CTX_get0_md(ctx));
 1059|  45.8k|}
EVP_MD_CTX_set_flags:
 1106|  55.7k|{
 1107|  55.7k|    ctx->flags |= flags;
 1108|  55.7k|}
EVP_MD_CTX_clear_flags:
 1111|  64.3k|{
 1112|  64.3k|    ctx->flags &= ~flags;
 1113|  64.3k|}
EVP_MD_CTX_test_flags:
 1116|  44.6k|{
 1117|  44.6k|    return (ctx->flags & flags);
 1118|  44.6k|}
EVP_PKEY_CTX_set_group_name:
 1155|  2.46k|{
 1156|  2.46k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  2.46k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  2.46k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1157|       |
 1158|  2.46k|    if (ctx == NULL || !EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  753|  2.46k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  2.46k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  2.46k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  2.46k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1158:9): [True: 0, False: 2.46k]
  |  Branch (1158:24): [True: 0, False: 2.46k]
  ------------------
 1159|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_COMMAND_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1160|       |        /* Uses the same return values as EVP_PKEY_CTX_ctrl */
 1161|      0|        return -2;
 1162|      0|    }
 1163|       |
 1164|  2.46k|    if (name == NULL)
  ------------------
  |  Branch (1164:9): [True: 0, False: 2.46k]
  ------------------
 1165|      0|        return -1;
 1166|       |
 1167|  2.46k|    params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|  2.46k|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1168|  2.46k|        (char *)name, 0);
 1169|  2.46k|    return EVP_PKEY_CTX_set_params(ctx, params);
 1170|  2.46k|}
EVP_PKEY_Q_keygen:
 1221|  2.47k|{
 1222|  2.47k|    va_list args;
 1223|  2.47k|    size_t bits;
 1224|  2.47k|    char *name;
 1225|  2.47k|    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  2.47k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  2.47k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1226|  2.47k|    EVP_PKEY *ret = NULL;
 1227|       |
 1228|  2.47k|    va_start(args, type);
 1229|       |
 1230|  2.47k|    if (OPENSSL_strcasecmp(type, "RSA") == 0) {
  ------------------
  |  Branch (1230:9): [True: 0, False: 2.47k]
  ------------------
 1231|      0|        bits = va_arg(args, size_t);
 1232|      0|        params[0] = OSSL_PARAM_construct_size_t(OSSL_PKEY_PARAM_RSA_BITS, &bits);
  ------------------
  |  |  442|      0|# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
  |  |  ------------------
  |  |  |  |  366|      0|# define OSSL_PKEY_PARAM_BITS "bits"
  |  |  ------------------
  ------------------
 1233|  2.47k|    } else if (OPENSSL_strcasecmp(type, "EC") == 0) {
  ------------------
  |  Branch (1233:16): [True: 0, False: 2.47k]
  ------------------
 1234|      0|        name = va_arg(args, char *);
 1235|      0|        params[0] = OSSL_PARAM_construct_utf8_string(OSSL_PKEY_PARAM_GROUP_NAME,
  ------------------
  |  |  420|      0|# define OSSL_PKEY_PARAM_GROUP_NAME "group"
  ------------------
 1236|      0|            name, 0);
 1237|      0|    }
 1238|       |
 1239|  2.47k|    ret = evp_pkey_keygen(libctx, type, propq, params);
 1240|       |
 1241|       |    va_end(args);
 1242|  2.47k|    return ret;
 1243|  2.47k|}
evp_lib.c:evp_pkey_keygen:
 1206|  2.47k|{
 1207|  2.47k|    EVP_PKEY *pkey = NULL;
 1208|  2.47k|    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new_from_name(libctx, name, propq);
 1209|       |
 1210|  2.47k|    if (ctx != NULL
  ------------------
  |  Branch (1210:9): [True: 2.47k, False: 0]
  ------------------
 1211|  2.47k|        && EVP_PKEY_keygen_init(ctx) > 0
  ------------------
  |  Branch (1211:12): [True: 2.47k, False: 0]
  ------------------
 1212|  2.47k|        && EVP_PKEY_CTX_set_params(ctx, params))
  ------------------
  |  Branch (1212:12): [True: 2.47k, False: 0]
  ------------------
 1213|  2.47k|        (void)EVP_PKEY_generate(ctx, &pkey);
 1214|       |
 1215|  2.47k|    EVP_PKEY_CTX_free(ctx);
 1216|  2.47k|    return pkey;
 1217|  2.47k|}

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

EVP_PKEY_type:
   64|   327k|{
   65|   327k|#ifndef OPENSSL_NO_DEPRECATED_3_6
   66|   327k|    int ret;
   67|   327k|    const EVP_PKEY_ASN1_METHOD *ameth;
   68|   327k|    ENGINE *e;
   69|       |
   70|   327k|    ameth = EVP_PKEY_asn1_find(&e, type);
   71|   327k|    if (ameth)
  ------------------
  |  Branch (71:9): [True: 245k, False: 82.0k]
  ------------------
   72|   245k|        ret = ameth->pkey_id;
   73|  82.0k|    else
   74|  82.0k|        ret = NID_undef;
  ------------------
  |  |   18|  82.0k|#define NID_undef                       0
  ------------------
   75|   327k|#ifndef OPENSSL_NO_ENGINE
   76|   327k|    ENGINE_finish(e);
   77|   327k|#endif
   78|   327k|    return ret;
   79|       |#else
   80|       |    size_t i;
   81|       |
   82|       |    for (i = 0; i < OSSL_NELEM(base_id_conversion); i++) {
   83|       |        if (type == base_id_conversion[i].pkey_id)
   84|       |            return base_id_conversion[i].pkey_base_id;
   85|       |    }
   86|       |    return NID_undef;
   87|       |#endif
   88|   327k|}

EVP_RAND_enable_locking:
   95|    500|{
   96|    500|    if (rand->meth->enable_locking != NULL)
  ------------------
  |  Branch (96:9): [True: 500, False: 0]
  ------------------
   97|    500|        return rand->meth->enable_locking(rand->algctx);
   98|    500|    ERR_raise(ERR_LIB_EVP, EVP_R_LOCKING_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   99|      0|    return 0;
  100|    500|}
EVP_RAND_fetch:
  284|  2.00k|{
  285|  2.00k|    return evp_generic_fetch(libctx, OSSL_OP_RAND, algorithm, properties,
  ------------------
  |  |  287|  2.00k|#define OSSL_OP_RAND 5
  ------------------
  286|  2.00k|        evp_rand_from_algorithm, evp_rand_up_ref,
  287|  2.00k|        evp_rand_free);
  288|  2.00k|}
EVP_RAND_up_ref:
  291|  2.00k|{
  292|  2.00k|    return evp_rand_up_ref(rand);
  293|  2.00k|}
EVP_RAND_free:
  296|  4.00k|{
  297|  4.00k|    evp_rand_free(rand);
  298|  4.00k|}
EVP_RAND_get0_provider:
  321|  3.00k|{
  322|  3.00k|    return rand->prov;
  323|  3.00k|}
EVP_RAND_CTX_up_ref:
  333|  1.50k|{
  334|  1.50k|    int ref = 0;
  335|       |
  336|  1.50k|    return CRYPTO_UP_REF(&ctx->refcnt, &ref);
  337|  1.50k|}
EVP_RAND_CTX_new:
  340|  2.00k|{
  341|  2.00k|    EVP_RAND_CTX *ctx;
  342|  2.00k|    void *parent_ctx = NULL;
  343|  2.00k|    const OSSL_DISPATCH *parent_dispatch = NULL;
  344|       |
  345|  2.00k|    if (rand == NULL) {
  ------------------
  |  Branch (345:9): [True: 0, False: 2.00k]
  ------------------
  346|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_NULL_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|        return NULL;
  348|      0|    }
  349|       |
  350|  2.00k|    ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|  2.00k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|  2.00k|    if (ctx == NULL)
  ------------------
  |  Branch (351:9): [True: 0, False: 2.00k]
  ------------------
  352|      0|        return NULL;
  353|  2.00k|    if (!CRYPTO_NEW_REF(&ctx->refcnt, 1)) {
  ------------------
  |  Branch (353:9): [True: 0, False: 2.00k]
  ------------------
  354|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  355|      0|        return NULL;
  356|      0|    }
  357|  2.00k|    if (parent != NULL) {
  ------------------
  |  Branch (357:9): [True: 1.50k, False: 500]
  ------------------
  358|  1.50k|        if (!EVP_RAND_CTX_up_ref(parent)) {
  ------------------
  |  Branch (358:13): [True: 0, False: 1.50k]
  ------------------
  359|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|            CRYPTO_FREE_REF(&ctx->refcnt);
  361|      0|            OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      0|            return NULL;
  363|      0|        }
  364|  1.50k|        parent_ctx = parent->algctx;
  365|  1.50k|        parent_dispatch = parent->meth->dispatch;
  366|  1.50k|    }
  367|  2.00k|    if ((ctx->algctx = rand->newctx(ossl_provider_ctx(rand->prov), parent_ctx,
  ------------------
  |  Branch (367:9): [True: 0, False: 2.00k]
  ------------------
  368|  2.00k|             parent_dispatch))
  369|  2.00k|            == NULL
  370|  2.00k|        || !EVP_RAND_up_ref(rand)) {
  ------------------
  |  Branch (370:12): [True: 0, False: 2.00k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        rand->freectx(ctx->algctx);
  373|      0|        CRYPTO_FREE_REF(&ctx->refcnt);
  374|      0|        OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  375|      0|        EVP_RAND_CTX_free(parent);
  376|      0|        return NULL;
  377|      0|    }
  378|  2.00k|    ctx->meth = rand;
  379|  2.00k|    ctx->parent = parent;
  380|  2.00k|    return ctx;
  381|  2.00k|}
EVP_RAND_CTX_free:
  384|  4.39k|{
  385|  4.39k|    int ref = 0;
  386|  4.39k|    EVP_RAND_CTX *parent;
  387|       |
  388|  4.39k|    if (ctx == NULL)
  ------------------
  |  Branch (388:9): [True: 890, False: 3.50k]
  ------------------
  389|    890|        return;
  390|       |
  391|  3.50k|    CRYPTO_DOWN_REF(&ctx->refcnt, &ref);
  392|  3.50k|    if (ref > 0)
  ------------------
  |  Branch (392:9): [True: 1.50k, False: 2.00k]
  ------------------
  393|  1.50k|        return;
  394|  2.00k|    parent = ctx->parent;
  395|  2.00k|    ctx->meth->freectx(ctx->algctx);
  396|  2.00k|    ctx->algctx = NULL;
  397|  2.00k|    EVP_RAND_free(ctx->meth);
  398|  2.00k|    CRYPTO_FREE_REF(&ctx->refcnt);
  399|  2.00k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  2.00k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|  2.00k|    EVP_RAND_CTX_free(parent);
  401|  2.00k|}
EVP_RAND_CTX_get_params:
  415|  9.99k|{
  416|  9.99k|    int res;
  417|       |
  418|  9.99k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (418:9): [True: 0, False: 9.99k]
  ------------------
  419|      0|        return 0;
  420|  9.99k|    res = evp_rand_get_ctx_params_locked(ctx, params);
  421|  9.99k|    evp_rand_unlock(ctx);
  422|  9.99k|    return res;
  423|  9.99k|}
EVP_RAND_CTX_settable_params:
  482|  1.50k|{
  483|  1.50k|    void *provctx;
  484|       |
  485|  1.50k|    if (ctx->meth->settable_ctx_params == NULL)
  ------------------
  |  Branch (485:9): [True: 0, False: 1.50k]
  ------------------
  486|      0|        return NULL;
  487|  1.50k|    provctx = ossl_provider_ctx(EVP_RAND_get0_provider(ctx->meth));
  488|  1.50k|    return ctx->meth->settable_ctx_params(ctx->algctx, provctx);
  489|  1.50k|}
EVP_RAND_instantiate:
  522|  2.00k|{
  523|  2.00k|    int res;
  524|       |
  525|  2.00k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (525:9): [True: 0, False: 2.00k]
  ------------------
  526|      0|        return 0;
  527|  2.00k|    res = evp_rand_instantiate_locked(ctx, strength, prediction_resistance,
  528|  2.00k|        pstr, pstr_len, params);
  529|  2.00k|    evp_rand_unlock(ctx);
  530|  2.00k|    return res;
  531|  2.00k|}
EVP_RAND_generate:
  584|  22.7k|{
  585|  22.7k|    int res;
  586|       |
  587|  22.7k|    if (!evp_rand_lock(ctx))
  ------------------
  |  Branch (587:9): [True: 0, False: 22.7k]
  ------------------
  588|      0|        return 0;
  589|  22.7k|    res = evp_rand_generate_locked(ctx, out, outlen, strength,
  590|  22.7k|        prediction_resistance, addin, addin_len);
  591|  22.7k|    evp_rand_unlock(ctx);
  592|  22.7k|    return res;
  593|  22.7k|}
EVP_RAND_get_state:
  668|  9.99k|{
  669|  9.99k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  9.99k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  9.99k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  670|  9.99k|    int state;
  671|       |
  672|  9.99k|    params[0] = OSSL_PARAM_construct_int(OSSL_RAND_PARAM_STATE, &state);
  ------------------
  |  |  541|  9.99k|# define OSSL_RAND_PARAM_STATE "state"
  ------------------
  673|  9.99k|    if (!EVP_RAND_CTX_get_params(ctx, params))
  ------------------
  |  Branch (673:9): [True: 0, False: 9.99k]
  ------------------
  674|      0|        state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  675|  9.99k|    return state;
  676|  9.99k|}
evp_rand.c:evp_rand_from_algorithm:
  120|  2.55k|{
  121|  2.55k|    const OSSL_DISPATCH *fns = algodef->implementation;
  122|  2.55k|    EVP_RAND *rand = NULL;
  123|  2.55k|    int fnrandcnt = 0, fnctxcnt = 0, fnlockcnt = 0, fnenablelockcnt = 0;
  124|       |#ifdef FIPS_MODULE
  125|       |    int fnzeroizecnt = 0;
  126|       |#endif
  127|       |
  128|  2.55k|    if ((rand = evp_rand_new()) == NULL) {
  ------------------
  |  Branch (128:9): [True: 0, False: 2.55k]
  ------------------
  129|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  130|      0|        return NULL;
  131|      0|    }
  132|  2.55k|    rand->name_id = name_id;
  133|  2.55k|    if ((rand->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (133:9): [True: 0, False: 2.55k]
  ------------------
  134|      0|        evp_rand_free(rand);
  135|      0|        return NULL;
  136|      0|    }
  137|  2.55k|    rand->description = algodef->algorithm_description;
  138|  2.55k|    rand->dispatch = fns;
  139|  42.2k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (139:12): [True: 39.7k, False: 2.55k]
  ------------------
  140|  39.7k|        switch (fns->function_id) {
  ------------------
  |  Branch (140:17): [True: 39.7k, False: 0]
  ------------------
  141|  2.55k|        case OSSL_FUNC_RAND_NEWCTX:
  ------------------
  |  |  535|  2.55k|#define OSSL_FUNC_RAND_NEWCTX 1
  ------------------
  |  Branch (141:9): [True: 2.55k, False: 37.1k]
  ------------------
  142|  2.55k|            if (rand->newctx != NULL)
  ------------------
  |  Branch (142:17): [True: 0, False: 2.55k]
  ------------------
  143|      0|                break;
  144|  2.55k|            rand->newctx = OSSL_FUNC_rand_newctx(fns);
  145|  2.55k|            fnctxcnt++;
  146|  2.55k|            break;
  147|  2.55k|        case OSSL_FUNC_RAND_FREECTX:
  ------------------
  |  |  536|  2.55k|#define OSSL_FUNC_RAND_FREECTX 2
  ------------------
  |  Branch (147:9): [True: 2.55k, False: 37.1k]
  ------------------
  148|  2.55k|            if (rand->freectx != NULL)
  ------------------
  |  Branch (148:17): [True: 0, False: 2.55k]
  ------------------
  149|      0|                break;
  150|  2.55k|            rand->freectx = OSSL_FUNC_rand_freectx(fns);
  151|  2.55k|            fnctxcnt++;
  152|  2.55k|            break;
  153|  2.55k|        case OSSL_FUNC_RAND_INSTANTIATE:
  ------------------
  |  |  537|  2.55k|#define OSSL_FUNC_RAND_INSTANTIATE 3
  ------------------
  |  Branch (153:9): [True: 2.55k, False: 37.1k]
  ------------------
  154|  2.55k|            if (rand->instantiate != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 2.55k]
  ------------------
  155|      0|                break;
  156|  2.55k|            rand->instantiate = OSSL_FUNC_rand_instantiate(fns);
  157|  2.55k|            fnrandcnt++;
  158|  2.55k|            break;
  159|  2.55k|        case OSSL_FUNC_RAND_UNINSTANTIATE:
  ------------------
  |  |  538|  2.55k|#define OSSL_FUNC_RAND_UNINSTANTIATE 4
  ------------------
  |  Branch (159:9): [True: 2.55k, False: 37.1k]
  ------------------
  160|  2.55k|            if (rand->uninstantiate != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 2.55k]
  ------------------
  161|      0|                break;
  162|  2.55k|            rand->uninstantiate = OSSL_FUNC_rand_uninstantiate(fns);
  163|  2.55k|            fnrandcnt++;
  164|  2.55k|            break;
  165|  2.55k|        case OSSL_FUNC_RAND_GENERATE:
  ------------------
  |  |  539|  2.55k|#define OSSL_FUNC_RAND_GENERATE 5
  ------------------
  |  Branch (165:9): [True: 2.55k, False: 37.1k]
  ------------------
  166|  2.55k|            if (rand->generate != NULL)
  ------------------
  |  Branch (166:17): [True: 0, False: 2.55k]
  ------------------
  167|      0|                break;
  168|  2.55k|            rand->generate = OSSL_FUNC_rand_generate(fns);
  169|  2.55k|            fnrandcnt++;
  170|  2.55k|            break;
  171|  2.55k|        case OSSL_FUNC_RAND_RESEED:
  ------------------
  |  |  540|  2.55k|#define OSSL_FUNC_RAND_RESEED 6
  ------------------
  |  Branch (171:9): [True: 2.55k, False: 37.1k]
  ------------------
  172|  2.55k|            if (rand->reseed != NULL)
  ------------------
  |  Branch (172:17): [True: 0, False: 2.55k]
  ------------------
  173|      0|                break;
  174|  2.55k|            rand->reseed = OSSL_FUNC_rand_reseed(fns);
  175|  2.55k|            break;
  176|    500|        case OSSL_FUNC_RAND_NONCE:
  ------------------
  |  |  541|    500|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (176:9): [True: 500, False: 39.2k]
  ------------------
  177|    500|            if (rand->nonce != NULL)
  ------------------
  |  Branch (177:17): [True: 0, False: 500]
  ------------------
  178|      0|                break;
  179|    500|            rand->nonce = OSSL_FUNC_rand_nonce(fns);
  180|    500|            break;
  181|  2.55k|        case OSSL_FUNC_RAND_ENABLE_LOCKING:
  ------------------
  |  |  542|  2.55k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (181:9): [True: 2.55k, False: 37.1k]
  ------------------
  182|  2.55k|            if (rand->enable_locking != NULL)
  ------------------
  |  Branch (182:17): [True: 0, False: 2.55k]
  ------------------
  183|      0|                break;
  184|  2.55k|            rand->enable_locking = OSSL_FUNC_rand_enable_locking(fns);
  185|  2.55k|            fnenablelockcnt++;
  186|  2.55k|            break;
  187|  2.55k|        case OSSL_FUNC_RAND_LOCK:
  ------------------
  |  |  543|  2.55k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (187:9): [True: 2.55k, False: 37.1k]
  ------------------
  188|  2.55k|            if (rand->lock != NULL)
  ------------------
  |  Branch (188:17): [True: 0, False: 2.55k]
  ------------------
  189|      0|                break;
  190|  2.55k|            rand->lock = OSSL_FUNC_rand_lock(fns);
  191|  2.55k|            fnlockcnt++;
  192|  2.55k|            break;
  193|  2.55k|        case OSSL_FUNC_RAND_UNLOCK:
  ------------------
  |  |  544|  2.55k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (193:9): [True: 2.55k, False: 37.1k]
  ------------------
  194|  2.55k|            if (rand->unlock != NULL)
  ------------------
  |  Branch (194:17): [True: 0, False: 2.55k]
  ------------------
  195|      0|                break;
  196|  2.55k|            rand->unlock = OSSL_FUNC_rand_unlock(fns);
  197|  2.55k|            fnlockcnt++;
  198|  2.55k|            break;
  199|      0|        case OSSL_FUNC_RAND_GETTABLE_PARAMS:
  ------------------
  |  |  545|      0|#define OSSL_FUNC_RAND_GETTABLE_PARAMS 11
  ------------------
  |  Branch (199:9): [True: 0, False: 39.7k]
  ------------------
  200|      0|            if (rand->gettable_params != NULL)
  ------------------
  |  Branch (200:17): [True: 0, False: 0]
  ------------------
  201|      0|                break;
  202|      0|            rand->gettable_params = OSSL_FUNC_rand_gettable_params(fns);
  203|      0|            break;
  204|  2.55k|        case OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  546|  2.55k|#define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS 12
  ------------------
  |  Branch (204:9): [True: 2.55k, False: 37.1k]
  ------------------
  205|  2.55k|            if (rand->gettable_ctx_params != NULL)
  ------------------
  |  Branch (205:17): [True: 0, False: 2.55k]
  ------------------
  206|      0|                break;
  207|  2.55k|            rand->gettable_ctx_params = OSSL_FUNC_rand_gettable_ctx_params(fns);
  208|  2.55k|            break;
  209|  2.00k|        case OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  547|  2.00k|#define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS 13
  ------------------
  |  Branch (209:9): [True: 2.00k, False: 37.7k]
  ------------------
  210|  2.00k|            if (rand->settable_ctx_params != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 2.00k]
  ------------------
  211|      0|                break;
  212|  2.00k|            rand->settable_ctx_params = OSSL_FUNC_rand_settable_ctx_params(fns);
  213|  2.00k|            break;
  214|      0|        case OSSL_FUNC_RAND_GET_PARAMS:
  ------------------
  |  |  548|      0|#define OSSL_FUNC_RAND_GET_PARAMS 14
  ------------------
  |  Branch (214:9): [True: 0, False: 39.7k]
  ------------------
  215|      0|            if (rand->get_params != NULL)
  ------------------
  |  Branch (215:17): [True: 0, False: 0]
  ------------------
  216|      0|                break;
  217|      0|            rand->get_params = OSSL_FUNC_rand_get_params(fns);
  218|      0|            break;
  219|  2.55k|        case OSSL_FUNC_RAND_GET_CTX_PARAMS:
  ------------------
  |  |  549|  2.55k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (219:9): [True: 2.55k, False: 37.1k]
  ------------------
  220|  2.55k|            if (rand->get_ctx_params != NULL)
  ------------------
  |  Branch (220:17): [True: 0, False: 2.55k]
  ------------------
  221|      0|                break;
  222|  2.55k|            rand->get_ctx_params = OSSL_FUNC_rand_get_ctx_params(fns);
  223|  2.55k|            fnctxcnt++;
  224|  2.55k|            break;
  225|  2.00k|        case OSSL_FUNC_RAND_SET_CTX_PARAMS:
  ------------------
  |  |  550|  2.00k|#define OSSL_FUNC_RAND_SET_CTX_PARAMS 16
  ------------------
  |  Branch (225:9): [True: 2.00k, False: 37.7k]
  ------------------
  226|  2.00k|            if (rand->set_ctx_params != NULL)
  ------------------
  |  Branch (226:17): [True: 0, False: 2.00k]
  ------------------
  227|      0|                break;
  228|  2.00k|            rand->set_ctx_params = OSSL_FUNC_rand_set_ctx_params(fns);
  229|  2.00k|            break;
  230|  2.55k|        case OSSL_FUNC_RAND_VERIFY_ZEROIZATION:
  ------------------
  |  |  551|  2.55k|#define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 17
  ------------------
  |  Branch (230:9): [True: 2.55k, False: 37.1k]
  ------------------
  231|  2.55k|            if (rand->verify_zeroization != NULL)
  ------------------
  |  Branch (231:17): [True: 0, False: 2.55k]
  ------------------
  232|      0|                break;
  233|  2.55k|            rand->verify_zeroization = OSSL_FUNC_rand_verify_zeroization(fns);
  234|       |#ifdef FIPS_MODULE
  235|       |            fnzeroizecnt++;
  236|       |#endif
  237|  2.55k|            break;
  238|  2.55k|        case OSSL_FUNC_RAND_GET_SEED:
  ------------------
  |  |  552|  2.55k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (238:9): [True: 2.55k, False: 37.1k]
  ------------------
  239|  2.55k|            if (rand->get_seed != NULL)
  ------------------
  |  Branch (239:17): [True: 0, False: 2.55k]
  ------------------
  240|      0|                break;
  241|  2.55k|            rand->get_seed = OSSL_FUNC_rand_get_seed(fns);
  242|  2.55k|            break;
  243|  2.05k|        case OSSL_FUNC_RAND_CLEAR_SEED:
  ------------------
  |  |  553|  2.05k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (243:9): [True: 2.05k, False: 37.6k]
  ------------------
  244|  2.05k|            if (rand->clear_seed != NULL)
  ------------------
  |  Branch (244:17): [True: 0, False: 2.05k]
  ------------------
  245|      0|                break;
  246|  2.05k|            rand->clear_seed = OSSL_FUNC_rand_clear_seed(fns);
  247|  2.05k|            break;
  248|  39.7k|        }
  249|  39.7k|    }
  250|       |    /*
  251|       |     * In order to be a consistent set of functions we must have at least
  252|       |     * a complete set of "rand" functions and a complete set of context
  253|       |     * management functions.  In FIPS mode, we also require the zeroization
  254|       |     * verification function.
  255|       |     *
  256|       |     * In addition, if locking can be enabled, we need a complete set of
  257|       |     * locking functions.
  258|       |     */
  259|  2.55k|    if (fnrandcnt != 3
  ------------------
  |  Branch (259:9): [True: 0, False: 2.55k]
  ------------------
  260|  2.55k|        || fnctxcnt != 3
  ------------------
  |  Branch (260:12): [True: 0, False: 2.55k]
  ------------------
  261|  2.55k|        || (fnenablelockcnt != 0 && fnenablelockcnt != 1)
  ------------------
  |  Branch (261:13): [True: 2.55k, False: 0]
  |  Branch (261:37): [True: 0, False: 2.55k]
  ------------------
  262|  2.55k|        || (fnlockcnt != 0 && fnlockcnt != 2)
  ------------------
  |  Branch (262:13): [True: 2.55k, False: 0]
  |  Branch (262:31): [True: 0, False: 2.55k]
  ------------------
  263|       |#ifdef FIPS_MODULE
  264|       |        || fnzeroizecnt != 1
  265|       |#endif
  266|  2.55k|    ) {
  267|      0|        evp_rand_free(rand);
  268|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return NULL;
  270|      0|    }
  271|       |
  272|  2.55k|    if (prov != NULL && !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (272:9): [True: 2.55k, False: 0]
  |  Branch (272:25): [True: 0, False: 2.55k]
  ------------------
  273|      0|        evp_rand_free(rand);
  274|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  275|      0|        return NULL;
  276|      0|    }
  277|  2.55k|    rand->prov = prov;
  278|       |
  279|  2.55k|    return rand;
  280|  2.55k|}
evp_rand.c:evp_rand_new:
   80|  2.55k|{
   81|  2.55k|    EVP_RAND *rand = OPENSSL_zalloc(sizeof(*rand));
  ------------------
  |  |  108|  2.55k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|       |
   83|  2.55k|    if (rand == NULL)
  ------------------
  |  Branch (83:9): [True: 0, False: 2.55k]
  ------------------
   84|      0|        return NULL;
   85|       |
   86|  2.55k|    if (!CRYPTO_NEW_REF(&rand->refcnt, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 2.55k]
  ------------------
   87|      0|        OPENSSL_free(rand);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        return NULL;
   89|      0|    }
   90|  2.55k|    return rand;
   91|  2.55k|}
evp_rand.c:evp_rand_up_ref:
   54|  7.55k|{
   55|  7.55k|    EVP_RAND *rand = (EVP_RAND *)vrand;
   56|  7.55k|    int ref = 0;
   57|       |
   58|  7.55k|    if (rand != NULL)
  ------------------
  |  Branch (58:9): [True: 7.55k, False: 0]
  ------------------
   59|  7.55k|        return CRYPTO_UP_REF(&rand->refcnt, &ref);
   60|      0|    return 1;
   61|  7.55k|}
evp_rand.c:evp_rand_free:
   64|  10.1k|{
   65|  10.1k|    EVP_RAND *rand = (EVP_RAND *)vrand;
   66|  10.1k|    int ref = 0;
   67|       |
   68|  10.1k|    if (rand == NULL)
  ------------------
  |  Branch (68:9): [True: 0, False: 10.1k]
  ------------------
   69|      0|        return;
   70|  10.1k|    CRYPTO_DOWN_REF(&rand->refcnt, &ref);
   71|  10.1k|    if (ref > 0)
  ------------------
  |  Branch (71:9): [True: 7.55k, False: 2.55k]
  ------------------
   72|  7.55k|        return;
   73|  2.55k|    OPENSSL_free(rand->type_name);
  ------------------
  |  |  131|  2.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|  2.55k|    ossl_provider_free(rand->prov);
   75|  2.55k|    CRYPTO_FREE_REF(&rand->refcnt);
   76|  2.55k|    OPENSSL_free(rand);
  ------------------
  |  |  131|  2.55k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  2.55k|}
evp_rand.c:evp_rand_lock:
  104|  34.7k|{
  105|  34.7k|    if (rand->meth->lock != NULL)
  ------------------
  |  Branch (105:9): [True: 34.7k, False: 0]
  ------------------
  106|  34.7k|        return rand->meth->lock(rand->algctx);
  107|      0|    return 1;
  108|  34.7k|}
evp_rand.c:evp_rand_get_ctx_params_locked:
  410|  32.7k|{
  411|  32.7k|    return ctx->meth->get_ctx_params(ctx->algctx, params);
  412|  32.7k|}
evp_rand.c:evp_rand_unlock:
  112|  34.7k|{
  113|  34.7k|    if (rand->meth->unlock != NULL)
  ------------------
  |  Branch (113:9): [True: 34.7k, False: 0]
  ------------------
  114|  34.7k|        rand->meth->unlock(rand->algctx);
  115|  34.7k|}
evp_rand.c:evp_rand_instantiate_locked:
  513|  2.00k|{
  514|  2.00k|    return ctx->meth->instantiate(ctx->algctx, strength, prediction_resistance,
  515|  2.00k|        pstr, pstr_len, params);
  516|  2.00k|}
evp_rand.c:evp_rand_generate_locked:
  554|  22.7k|{
  555|  22.7k|    size_t chunk, max_request = 0;
  556|  22.7k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  22.7k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  22.7k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  557|       |
  558|  22.7k|    params[0] = OSSL_PARAM_construct_size_t(OSSL_RAND_PARAM_MAX_REQUEST,
  ------------------
  |  |  540|  22.7k|# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
  ------------------
  559|  22.7k|        &max_request);
  560|  22.7k|    if (!evp_rand_get_ctx_params_locked(ctx, params)
  ------------------
  |  Branch (560:9): [True: 0, False: 22.7k]
  ------------------
  561|  22.7k|        || max_request == 0) {
  ------------------
  |  Branch (561:12): [True: 0, False: 22.7k]
  ------------------
  562|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_GET_MAXIMUM_REQUEST_SIZE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  563|      0|        return 0;
  564|      0|    }
  565|  45.5k|    for (; outlen > 0; outlen -= chunk, out += chunk) {
  ------------------
  |  Branch (565:12): [True: 22.7k, False: 22.7k]
  ------------------
  566|  22.7k|        chunk = outlen > max_request ? max_request : outlen;
  ------------------
  |  Branch (566:17): [True: 0, False: 22.7k]
  ------------------
  567|  22.7k|        if (!ctx->meth->generate(ctx->algctx, out, chunk, strength,
  ------------------
  |  Branch (567:13): [True: 0, False: 22.7k]
  ------------------
  568|  22.7k|                prediction_resistance, addin, addin_len)) {
  569|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_GENERATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  570|      0|            return 0;
  571|      0|        }
  572|       |        /*
  573|       |         * Prediction resistance is only relevant the first time around,
  574|       |         * subsequently, the DRBG has already been properly reseeded.
  575|       |         */
  576|  22.7k|        prediction_resistance = 0;
  577|  22.7k|    }
  578|  22.7k|    return 1;
  579|  22.7k|}

EVP_KEYEXCH_free:
  162|  12.5k|{
  163|  12.5k|    int i;
  164|       |
  165|  12.5k|    if (exchange == NULL)
  ------------------
  |  Branch (165:9): [True: 0, False: 12.5k]
  ------------------
  166|      0|        return;
  167|  12.5k|    CRYPTO_DOWN_REF(&exchange->refcnt, &i);
  168|  12.5k|    if (i > 0)
  ------------------
  |  Branch (168:9): [True: 8.82k, False: 3.69k]
  ------------------
  169|  8.82k|        return;
  170|  3.69k|    OPENSSL_free(exchange->type_name);
  ------------------
  |  |  131|  3.69k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  171|  3.69k|    ossl_provider_free(exchange->prov);
  172|  3.69k|    CRYPTO_FREE_REF(&exchange->refcnt);
  173|  3.69k|    OPENSSL_free(exchange);
  ------------------
  |  |  131|  3.69k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  174|  3.69k|}
EVP_KEYEXCH_up_ref:
  177|  8.82k|{
  178|  8.82k|    int ref = 0;
  179|       |
  180|  8.82k|    CRYPTO_UP_REF(&exchange->refcnt, &ref);
  181|  8.82k|    return 1;
  182|  8.82k|}
EVP_KEYEXCH_fetch:
  191|  4.18k|{
  192|  4.18k|    return evp_generic_fetch(ctx, OSSL_OP_KEYEXCH, algorithm, properties,
  ------------------
  |  |  289|  4.18k|#define OSSL_OP_KEYEXCH 11
  ------------------
  193|  4.18k|        evp_keyexch_from_algorithm,
  194|  4.18k|        evp_keyexch_up_ref,
  195|  4.18k|        evp_keyexch_free);
  196|  4.18k|}
exchange.c:evp_keyexch_from_algorithm:
   53|  3.69k|{
   54|  3.69k|    const OSSL_DISPATCH *fns = algodef->implementation;
   55|  3.69k|    EVP_KEYEXCH *exchange = NULL;
   56|  3.69k|    int fncnt = 0, sparamfncnt = 0, gparamfncnt = 0, derive_found = 0;
   57|       |
   58|  3.69k|    if ((exchange = evp_keyexch_new(prov)) == NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 3.69k]
  ------------------
   59|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   60|      0|        goto err;
   61|      0|    }
   62|       |
   63|  3.69k|    exchange->name_id = name_id;
   64|  3.69k|    if ((exchange->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 3.69k]
  ------------------
   65|      0|        goto err;
   66|  3.69k|    exchange->description = algodef->algorithm_description;
   67|       |
   68|  37.4k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (68:12): [True: 33.7k, False: 3.69k]
  ------------------
   69|  33.7k|        switch (fns->function_id) {
  ------------------
  |  Branch (69:17): [True: 33.7k, False: 0]
  ------------------
   70|  3.69k|        case OSSL_FUNC_KEYEXCH_NEWCTX:
  ------------------
  |  |  761|  3.69k|#define OSSL_FUNC_KEYEXCH_NEWCTX 1
  ------------------
  |  Branch (70:9): [True: 3.69k, False: 30.0k]
  ------------------
   71|  3.69k|            if (exchange->newctx != NULL)
  ------------------
  |  Branch (71:17): [True: 0, False: 3.69k]
  ------------------
   72|      0|                break;
   73|  3.69k|            exchange->newctx = OSSL_FUNC_keyexch_newctx(fns);
   74|  3.69k|            fncnt++;
   75|  3.69k|            break;
   76|  3.69k|        case OSSL_FUNC_KEYEXCH_INIT:
  ------------------
  |  |  762|  3.69k|#define OSSL_FUNC_KEYEXCH_INIT 2
  ------------------
  |  Branch (76:9): [True: 3.69k, False: 30.0k]
  ------------------
   77|  3.69k|            if (exchange->init != NULL)
  ------------------
  |  Branch (77:17): [True: 0, False: 3.69k]
  ------------------
   78|      0|                break;
   79|  3.69k|            exchange->init = OSSL_FUNC_keyexch_init(fns);
   80|  3.69k|            fncnt++;
   81|  3.69k|            break;
   82|  2.11k|        case OSSL_FUNC_KEYEXCH_SET_PEER:
  ------------------
  |  |  764|  2.11k|#define OSSL_FUNC_KEYEXCH_SET_PEER 4
  ------------------
  |  Branch (82:9): [True: 2.11k, False: 31.6k]
  ------------------
   83|  2.11k|            if (exchange->set_peer != NULL)
  ------------------
  |  Branch (83:17): [True: 0, False: 2.11k]
  ------------------
   84|      0|                break;
   85|  2.11k|            exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns);
   86|  2.11k|            break;
   87|  3.69k|        case OSSL_FUNC_KEYEXCH_DERIVE:
  ------------------
  |  |  763|  3.69k|#define OSSL_FUNC_KEYEXCH_DERIVE 3
  ------------------
  |  Branch (87:9): [True: 3.69k, False: 30.0k]
  ------------------
   88|  3.69k|            if (exchange->derive != NULL)
  ------------------
  |  Branch (88:17): [True: 0, False: 3.69k]
  ------------------
   89|      0|                break;
   90|  3.69k|            exchange->derive = OSSL_FUNC_keyexch_derive(fns);
   91|  3.69k|            derive_found = 1;
   92|  3.69k|            break;
   93|  3.69k|        case OSSL_FUNC_KEYEXCH_FREECTX:
  ------------------
  |  |  765|  3.69k|#define OSSL_FUNC_KEYEXCH_FREECTX 5
  ------------------
  |  Branch (93:9): [True: 3.69k, False: 30.0k]
  ------------------
   94|  3.69k|            if (exchange->freectx != NULL)
  ------------------
  |  Branch (94:17): [True: 0, False: 3.69k]
  ------------------
   95|      0|                break;
   96|  3.69k|            exchange->freectx = OSSL_FUNC_keyexch_freectx(fns);
   97|  3.69k|            fncnt++;
   98|  3.69k|            break;
   99|  3.69k|        case OSSL_FUNC_KEYEXCH_DUPCTX:
  ------------------
  |  |  766|  3.69k|#define OSSL_FUNC_KEYEXCH_DUPCTX 6
  ------------------
  |  Branch (99:9): [True: 3.69k, False: 30.0k]
  ------------------
  100|  3.69k|            if (exchange->dupctx != NULL)
  ------------------
  |  Branch (100:17): [True: 0, False: 3.69k]
  ------------------
  101|      0|                break;
  102|  3.69k|            exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns);
  103|  3.69k|            break;
  104|  3.69k|        case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS:
  ------------------
  |  |  769|  3.69k|#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
  ------------------
  |  Branch (104:9): [True: 3.69k, False: 30.0k]
  ------------------
  105|  3.69k|            if (exchange->get_ctx_params != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 3.69k]
  ------------------
  106|      0|                break;
  107|  3.69k|            exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns);
  108|  3.69k|            gparamfncnt++;
  109|  3.69k|            break;
  110|  3.69k|        case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  770|  3.69k|#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
  ------------------
  |  Branch (110:9): [True: 3.69k, False: 30.0k]
  ------------------
  111|  3.69k|            if (exchange->gettable_ctx_params != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 3.69k]
  ------------------
  112|      0|                break;
  113|  3.69k|            exchange->gettable_ctx_params
  114|  3.69k|                = OSSL_FUNC_keyexch_gettable_ctx_params(fns);
  115|  3.69k|            gparamfncnt++;
  116|  3.69k|            break;
  117|  2.64k|        case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS:
  ------------------
  |  |  767|  2.64k|#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
  ------------------
  |  Branch (117:9): [True: 2.64k, False: 31.1k]
  ------------------
  118|  2.64k|            if (exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (118:17): [True: 0, False: 2.64k]
  ------------------
  119|      0|                break;
  120|  2.64k|            exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns);
  121|  2.64k|            sparamfncnt++;
  122|  2.64k|            break;
  123|  2.64k|        case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  768|  2.64k|#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
  ------------------
  |  Branch (123:9): [True: 2.64k, False: 31.1k]
  ------------------
  124|  2.64k|            if (exchange->settable_ctx_params != NULL)
  ------------------
  |  Branch (124:17): [True: 0, False: 2.64k]
  ------------------
  125|      0|                break;
  126|  2.64k|            exchange->settable_ctx_params
  127|  2.64k|                = OSSL_FUNC_keyexch_settable_ctx_params(fns);
  128|  2.64k|            sparamfncnt++;
  129|  2.64k|            break;
  130|    528|        case OSSL_FUNC_KEYEXCH_DERIVE_SKEY:
  ------------------
  |  |  771|    528|#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
  ------------------
  |  Branch (130:9): [True: 528, False: 33.2k]
  ------------------
  131|    528|            if (exchange->derive_skey != NULL)
  ------------------
  |  Branch (131:17): [True: 0, False: 528]
  ------------------
  132|      0|                break;
  133|    528|            exchange->derive_skey = OSSL_FUNC_keyexch_derive_skey(fns);
  134|    528|            derive_found = 1;
  135|    528|            break;
  136|  33.7k|        }
  137|  33.7k|    }
  138|  3.69k|    fncnt += derive_found;
  139|  3.69k|    if (fncnt != 4
  ------------------
  |  Branch (139:9): [True: 0, False: 3.69k]
  ------------------
  140|  3.69k|        || (gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (140:13): [True: 3.69k, False: 0]
  |  Branch (140:33): [True: 0, False: 3.69k]
  ------------------
  141|  3.69k|        || (sparamfncnt != 0 && sparamfncnt != 2)) {
  ------------------
  |  Branch (141:13): [True: 2.64k, False: 1.05k]
  |  Branch (141:33): [True: 0, False: 2.64k]
  ------------------
  142|       |        /*
  143|       |         * In order to be a consistent set of functions we must have at least
  144|       |         * a complete set of "exchange" functions: init, derive, newctx,
  145|       |         * and freectx. The set_ctx_params and settable_ctx_params functions are
  146|       |         * optional, but if one of them is present then the other one must also
  147|       |         * be present. Same goes for get_ctx_params and gettable_ctx_params.
  148|       |         * The dupctx and set_peer functions are optional.
  149|       |         */
  150|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  151|      0|        goto err;
  152|      0|    }
  153|       |
  154|  3.69k|    return exchange;
  155|       |
  156|      0|err:
  157|      0|    EVP_KEYEXCH_free(exchange);
  158|       |    return NULL;
  159|  3.69k|}
exchange.c:evp_keyexch_new:
   33|  3.69k|{
   34|  3.69k|    EVP_KEYEXCH *exchange = OPENSSL_zalloc(sizeof(EVP_KEYEXCH));
  ------------------
  |  |  108|  3.69k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|       |
   36|  3.69k|    if (exchange == NULL)
  ------------------
  |  Branch (36:9): [True: 0, False: 3.69k]
  ------------------
   37|      0|        return NULL;
   38|       |
   39|  3.69k|    if (!CRYPTO_NEW_REF(&exchange->refcnt, 1)
  ------------------
  |  Branch (39:9): [True: 0, False: 3.69k]
  ------------------
   40|  3.69k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (40:12): [True: 0, False: 3.69k]
  ------------------
   41|      0|        CRYPTO_FREE_REF(&exchange->refcnt);
   42|      0|        OPENSSL_free(exchange);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   43|      0|        return NULL;
   44|      0|    }
   45|  3.69k|    exchange->prov = prov;
   46|       |
   47|  3.69k|    return exchange;
   48|  3.69k|}
exchange.c:evp_keyexch_up_ref:
   28|  8.82k|{
   29|  8.82k|    return EVP_KEYEXCH_up_ref(data);
   30|  8.82k|}
exchange.c:evp_keyexch_free:
   23|  8.39k|{
   24|  8.39k|    EVP_KEYEXCH_free(data);
   25|  8.39k|}

evp_keymgmt_util_assign_pkey:
   62|   195k|{
   63|   195k|    if (pkey == NULL || keymgmt == NULL || keydata == NULL
  ------------------
  |  Branch (63:9): [True: 0, False: 195k]
  |  Branch (63:25): [True: 0, False: 195k]
  |  Branch (63:44): [True: 0, False: 195k]
  ------------------
   64|   195k|        || !EVP_PKEY_set_type_by_keymgmt(pkey, keymgmt)) {
  ------------------
  |  Branch (64:12): [True: 0, False: 195k]
  ------------------
   65|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|      0|    }
   68|   195k|    pkey->keydata = keydata;
   69|   195k|    evp_keymgmt_util_cache_keyinfo(pkey);
   70|   195k|    return 1;
   71|   195k|}
evp_keymgmt_util_make_pkey:
   74|   190k|{
   75|   190k|    EVP_PKEY *pkey = NULL;
   76|       |
   77|   190k|    if (keymgmt == NULL
  ------------------
  |  Branch (77:9): [True: 0, False: 190k]
  ------------------
   78|   190k|        || keydata == NULL
  ------------------
  |  Branch (78:12): [True: 0, False: 190k]
  ------------------
   79|   190k|        || (pkey = EVP_PKEY_new()) == NULL
  ------------------
  |  Branch (79:12): [True: 0, False: 190k]
  ------------------
   80|   190k|        || !evp_keymgmt_util_assign_pkey(pkey, keymgmt, keydata)) {
  ------------------
  |  Branch (80:12): [True: 0, False: 190k]
  ------------------
   81|      0|        EVP_PKEY_free(pkey);
   82|      0|        return NULL;
   83|      0|    }
   84|   190k|    return pkey;
   85|   190k|}
evp_keymgmt_util_export:
   89|  2.47k|{
   90|  2.47k|    if (pk == NULL || export_cb == NULL)
  ------------------
  |  Branch (90:9): [True: 0, False: 2.47k]
  |  Branch (90:23): [True: 0, False: 2.47k]
  ------------------
   91|      0|        return 0;
   92|  2.47k|    return evp_keymgmt_export(pk->keymgmt, pk->keydata, selection,
   93|  2.47k|        export_cb, export_cbarg);
   94|  2.47k|}
evp_keymgmt_util_clear_operation_cache:
  223|   388k|{
  224|   388k|    if (pk != NULL) {
  ------------------
  |  Branch (224:9): [True: 388k, False: 0]
  ------------------
  225|   388k|        sk_OP_CACHE_ELEM_pop_free(pk->operation_cache, op_cache_free);
  226|   388k|        pk->operation_cache = NULL;
  227|   388k|    }
  228|       |
  229|   388k|    return 1;
  230|   388k|}
evp_keymgmt_util_cache_keyinfo:
  290|   195k|{
  291|       |    /*
  292|       |     * Cache information about the provider "origin" key.
  293|       |     *
  294|       |     * This services functions like EVP_PKEY_get_size, EVP_PKEY_get_bits, etc
  295|       |     */
  296|   195k|    if (pk->keydata != NULL) {
  ------------------
  |  Branch (296:9): [True: 195k, False: 0]
  ------------------
  297|   195k|        int bits = 0;
  298|   195k|        int security_bits = 0;
  299|   195k|        int security_category = -1;
  300|   195k|        int size = 0;
  301|   195k|        OSSL_PARAM params[5];
  302|       |
  303|   195k|        params[0] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_BITS, &bits);
  ------------------
  |  |  366|   195k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  304|   195k|        params[1] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_BITS,
  ------------------
  |  |  495|   195k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  305|   195k|            &security_bits);
  306|   195k|        params[2] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_SECURITY_CATEGORY,
  ------------------
  |  |  496|   195k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  133|   195k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  307|   195k|            &security_category);
  308|   195k|        params[3] = OSSL_PARAM_construct_int(OSSL_PKEY_PARAM_MAX_SIZE, &size);
  ------------------
  |  |  424|   195k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  309|   195k|        params[4] = OSSL_PARAM_construct_end();
  310|   195k|        if (evp_keymgmt_get_params(pk->keymgmt, pk->keydata, params)) {
  ------------------
  |  Branch (310:13): [True: 195k, False: 0]
  ------------------
  311|   195k|            pk->cache.size = size;
  312|   195k|            pk->cache.bits = bits;
  313|   195k|            pk->cache.security_bits = security_bits;
  314|   195k|            pk->cache.security_category = security_category;
  315|   195k|        }
  316|   195k|    }
  317|   195k|}
evp_keymgmt_util_gen:
  517|  4.93k|{
  518|  4.93k|    void *keydata = NULL;
  519|       |
  520|  4.93k|    if ((keydata = evp_keymgmt_gen(keymgmt, genctx, cb, cbarg)) == NULL
  ------------------
  |  Branch (520:9): [True: 0, False: 4.93k]
  ------------------
  521|  4.93k|        || !evp_keymgmt_util_assign_pkey(target, keymgmt, keydata)) {
  ------------------
  |  Branch (521:12): [True: 0, False: 4.93k]
  ------------------
  522|      0|        evp_keymgmt_freedata(keymgmt, keydata);
  523|      0|        keydata = NULL;
  524|      0|    }
  525|       |
  526|  4.93k|    return keydata;
  527|  4.93k|}

EVP_KEYMGMT_fetch:
  279|   188k|{
  280|   188k|    return evp_generic_fetch(ctx, OSSL_OP_KEYMGMT, algorithm, properties,
  ------------------
  |  |  288|   188k|#define OSSL_OP_KEYMGMT 10
  ------------------
  281|   188k|        keymgmt_from_algorithm,
  282|   188k|        evp_keymgmt_up_ref,
  283|   188k|        evp_keymgmt_free);
  284|   188k|}
EVP_KEYMGMT_up_ref:
  287|   846k|{
  288|   846k|    int ref = 0;
  289|       |
  290|   846k|    CRYPTO_UP_REF(&keymgmt->refcnt, &ref);
  291|   846k|    return 1;
  292|   846k|}
EVP_KEYMGMT_free:
  295|   867k|{
  296|   867k|    int ref = 0;
  297|       |
  298|   867k|    if (keymgmt == NULL)
  ------------------
  |  Branch (298:9): [True: 0, False: 867k]
  ------------------
  299|      0|        return;
  300|       |
  301|   867k|    CRYPTO_DOWN_REF(&keymgmt->refcnt, &ref);
  302|   867k|    if (ref > 0)
  ------------------
  |  Branch (302:9): [True: 846k, False: 21.1k]
  ------------------
  303|   846k|        return;
  304|  21.1k|    OPENSSL_free(keymgmt->type_name);
  ------------------
  |  |  131|  21.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  305|  21.1k|    ossl_provider_free(keymgmt->prov);
  306|  21.1k|    CRYPTO_FREE_REF(&keymgmt->refcnt);
  307|  21.1k|    OPENSSL_free(keymgmt);
  ------------------
  |  |  131|  21.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  308|  21.1k|}
EVP_KEYMGMT_get0_provider:
  311|   201k|{
  312|   201k|    return keymgmt->prov;
  313|   201k|}
evp_keymgmt_get_legacy_alg:
  321|  58.6k|{
  322|  58.6k|    return keymgmt->legacy_alg;
  323|  58.6k|}
EVP_KEYMGMT_is_a:
  336|   201k|{
  337|   201k|    return keymgmt != NULL
  ------------------
  |  Branch (337:12): [True: 201k, False: 0]
  ------------------
  338|   201k|        && evp_is_a(keymgmt->prov, keymgmt->name_id, NULL, name);
  ------------------
  |  Branch (338:12): [True: 201k, False: 0]
  ------------------
  339|   201k|}
EVP_KEYMGMT_do_all_provided:
  344|      2|{
  345|      2|    evp_generic_do_all(libctx, OSSL_OP_KEYMGMT,
  ------------------
  |  |  288|      2|#define OSSL_OP_KEYMGMT 10
  ------------------
  346|      2|        (void (*)(void *, void *))fn, arg,
  347|      2|        keymgmt_from_algorithm,
  348|      2|        evp_keymgmt_up_ref,
  349|      2|        evp_keymgmt_free);
  350|      2|}
EVP_KEYMGMT_names_do_all:
  355|   216k|{
  356|   216k|    if (keymgmt->prov != NULL)
  ------------------
  |  Branch (356:9): [True: 216k, False: 0]
  ------------------
  357|   216k|        return evp_names_do_all(keymgmt->prov, keymgmt->name_id, fn, data);
  358|       |
  359|      0|    return 1;
  360|   216k|}
evp_keymgmt_freedata:
  380|   195k|{
  381|       |    /* This is mandatory, no need to check for its presence */
  382|   195k|    keymgmt->free(keydata);
  383|   195k|}
evp_keymgmt_gen_init:
  387|  4.93k|{
  388|  4.93k|    void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt));
  389|       |
  390|  4.93k|    if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (390:9): [True: 0, False: 4.93k]
  ------------------
  391|      0|        return NULL;
  392|  4.93k|    return keymgmt->gen_init(provctx, selection, params);
  393|  4.93k|}
evp_keymgmt_gen_set_params:
  411|  4.93k|{
  412|  4.93k|    if (keymgmt->gen_set_params == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 4.93k]
  ------------------
  413|      0|        return 0;
  414|  4.93k|    return keymgmt->gen_set_params(genctx, params);
  415|  4.93k|}
evp_keymgmt_gen:
  445|  4.93k|{
  446|  4.93k|    void *ret;
  447|  4.93k|    const char *desc = keymgmt->description != NULL ? keymgmt->description : "";
  ------------------
  |  Branch (447:24): [True: 4.93k, False: 0]
  ------------------
  448|       |
  449|  4.93k|    if (keymgmt->gen == NULL) {
  ------------------
  |  Branch (449:9): [True: 0, False: 4.93k]
  ------------------
  450|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED,
  ------------------
  |  |  108|      0|#define EVP_R_PROVIDER_KEYMGMT_NOT_SUPPORTED 236
  ------------------
  451|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  452|      0|        return NULL;
  453|      0|    }
  454|       |
  455|  4.93k|    ERR_set_mark();
  456|  4.93k|    ret = keymgmt->gen(genctx, cb, cbarg);
  457|  4.93k|    if (ret == NULL && ERR_count_to_mark() == 0)
  ------------------
  |  Branch (457:9): [True: 0, False: 4.93k]
  |  Branch (457:24): [True: 0, False: 0]
  ------------------
  458|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_PROVIDER_KEYMGMT_FAILURE,
  ------------------
  |  |  107|      0|#define EVP_R_PROVIDER_KEYMGMT_FAILURE 233
  ------------------
  459|      0|            "%s key generation:%s", keymgmt->type_name, desc);
  460|  4.93k|    ERR_clear_last_mark();
  461|  4.93k|    return ret;
  462|  4.93k|}
evp_keymgmt_gen_cleanup:
  465|  4.93k|{
  466|  4.93k|    if (keymgmt->gen_cleanup != NULL)
  ------------------
  |  Branch (466:9): [True: 4.93k, False: 0]
  ------------------
  467|  4.93k|        keymgmt->gen_cleanup(genctx);
  468|  4.93k|}
evp_keymgmt_has_load:
  471|   381k|{
  472|   381k|    return keymgmt != NULL && keymgmt->load != NULL;
  ------------------
  |  Branch (472:12): [True: 381k, False: 0]
  |  Branch (472:31): [True: 381k, False: 0]
  ------------------
  473|   381k|}
evp_keymgmt_load:
  477|   190k|{
  478|   190k|    if (evp_keymgmt_has_load(keymgmt))
  ------------------
  |  Branch (478:9): [True: 190k, False: 0]
  ------------------
  479|   190k|        return keymgmt->load(objref, objref_sz);
  480|      0|    return NULL;
  481|   190k|}
evp_keymgmt_get_params:
  485|   200k|{
  486|   200k|    if (keymgmt->get_params == NULL)
  ------------------
  |  Branch (486:9): [True: 0, False: 200k]
  ------------------
  487|      0|        return 1;
  488|   200k|    return keymgmt->get_params(keydata, params);
  489|   200k|}
evp_keymgmt_export:
  564|  2.47k|{
  565|  2.47k|    if (keymgmt->export == NULL)
  ------------------
  |  Branch (565:9): [True: 0, False: 2.47k]
  ------------------
  566|      0|        return 0;
  567|  2.47k|    return keymgmt->export(keydata, selection, param_cb, cbarg);
  568|  2.47k|}
keymgmt_meth.c:keymgmt_from_algorithm:
   66|  21.1k|{
   67|  21.1k|    const OSSL_DISPATCH *fns = algodef->implementation;
   68|  21.1k|    EVP_KEYMGMT *keymgmt = NULL;
   69|  21.1k|    int setparamfncnt = 0, getparamfncnt = 0;
   70|  21.1k|    int setgenparamfncnt = 0;
   71|  21.1k|    int importfncnt = 0, exportfncnt = 0;
   72|  21.1k|    int importtypesfncnt = 0, exporttypesfncnt = 0;
   73|  21.1k|    int getgenparamfncnt = 0;
   74|       |
   75|  21.1k|    if ((keymgmt = keymgmt_new()) == NULL)
  ------------------
  |  Branch (75:9): [True: 0, False: 21.1k]
  ------------------
   76|      0|        return NULL;
   77|       |
   78|  21.1k|    keymgmt->name_id = name_id;
   79|  21.1k|    if ((keymgmt->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
  ------------------
  |  Branch (79:9): [True: 0, False: 21.1k]
  ------------------
   80|      0|        EVP_KEYMGMT_free(keymgmt);
   81|      0|        return NULL;
   82|      0|    }
   83|  21.1k|    keymgmt->description = algodef->algorithm_description;
   84|       |
   85|   393k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (85:12): [True: 372k, False: 21.1k]
  ------------------
   86|   372k|        switch (fns->function_id) {
  ------------------
  |  Branch (86:17): [True: 372k, False: 0]
  ------------------
   87|  21.1k|        case OSSL_FUNC_KEYMGMT_NEW:
  ------------------
  |  |  658|  21.1k|#define OSSL_FUNC_KEYMGMT_NEW 1
  ------------------
  |  Branch (87:9): [True: 21.1k, False: 351k]
  ------------------
   88|  21.1k|            if (keymgmt->new == NULL)
  ------------------
  |  Branch (88:17): [True: 21.1k, False: 0]
  ------------------
   89|  21.1k|                keymgmt->new = OSSL_FUNC_keymgmt_new(fns);
   90|  21.1k|            break;
   91|  19.5k|        case OSSL_FUNC_KEYMGMT_GEN_INIT:
  ------------------
  |  |  662|  19.5k|#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
  ------------------
  |  Branch (91:9): [True: 19.5k, False: 353k]
  ------------------
   92|  19.5k|            if (keymgmt->gen_init == NULL)
  ------------------
  |  Branch (92:17): [True: 19.5k, False: 0]
  ------------------
   93|  19.5k|                keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns);
   94|  19.5k|            break;
   95|  2.64k|        case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE:
  ------------------
  |  |  663|  2.64k|#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
  ------------------
  |  Branch (95:9): [True: 2.64k, False: 370k]
  ------------------
   96|  2.64k|            if (keymgmt->gen_set_template == NULL)
  ------------------
  |  Branch (96:17): [True: 2.64k, False: 0]
  ------------------
   97|  2.64k|                keymgmt->gen_set_template = OSSL_FUNC_keymgmt_gen_set_template(fns);
   98|  2.64k|            break;
   99|  19.5k|        case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS:
  ------------------
  |  |  664|  19.5k|#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
  ------------------
  |  Branch (99:9): [True: 19.5k, False: 353k]
  ------------------
  100|  19.5k|            if (keymgmt->gen_set_params == NULL) {
  ------------------
  |  Branch (100:17): [True: 19.5k, False: 0]
  ------------------
  101|  19.5k|                setgenparamfncnt++;
  102|  19.5k|                keymgmt->gen_set_params = OSSL_FUNC_keymgmt_gen_set_params(fns);
  103|  19.5k|            }
  104|  19.5k|            break;
  105|  19.5k|        case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS:
  ------------------
  |  |  665|  19.5k|#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
  ------------------
  |  Branch (105:9): [True: 19.5k, False: 353k]
  ------------------
  106|  19.5k|            if (keymgmt->gen_settable_params == NULL) {
  ------------------
  |  Branch (106:17): [True: 19.5k, False: 0]
  ------------------
  107|  19.5k|                setgenparamfncnt++;
  108|  19.5k|                keymgmt->gen_settable_params = OSSL_FUNC_keymgmt_gen_settable_params(fns);
  109|  19.5k|            }
  110|  19.5k|            break;
  111|  1.05k|        case OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS:
  ------------------
  |  |  668|  1.05k|#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
  ------------------
  |  Branch (111:9): [True: 1.05k, False: 371k]
  ------------------
  112|  1.05k|            if (keymgmt->gen_get_params == NULL) {
  ------------------
  |  Branch (112:17): [True: 1.05k, False: 0]
  ------------------
  113|  1.05k|                getgenparamfncnt++;
  114|  1.05k|                keymgmt->gen_get_params = OSSL_FUNC_keymgmt_gen_get_params(fns);
  115|  1.05k|            }
  116|  1.05k|            break;
  117|  1.05k|        case OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS:
  ------------------
  |  |  669|  1.05k|#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
  ------------------
  |  Branch (117:9): [True: 1.05k, False: 371k]
  ------------------
  118|  1.05k|            if (keymgmt->gen_gettable_params == NULL) {
  ------------------
  |  Branch (118:17): [True: 1.05k, False: 0]
  ------------------
  119|  1.05k|                getgenparamfncnt++;
  120|  1.05k|                keymgmt->gen_gettable_params = OSSL_FUNC_keymgmt_gen_gettable_params(fns);
  121|  1.05k|            }
  122|  1.05k|            break;
  123|  19.5k|        case OSSL_FUNC_KEYMGMT_GEN:
  ------------------
  |  |  666|  19.5k|#define OSSL_FUNC_KEYMGMT_GEN 6
  ------------------
  |  Branch (123:9): [True: 19.5k, False: 353k]
  ------------------
  124|  19.5k|            if (keymgmt->gen == NULL)
  ------------------
  |  Branch (124:17): [True: 19.5k, False: 0]
  ------------------
  125|  19.5k|                keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns);
  126|  19.5k|            break;
  127|  19.5k|        case OSSL_FUNC_KEYMGMT_GEN_CLEANUP:
  ------------------
  |  |  667|  19.5k|#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
  ------------------
  |  Branch (127:9): [True: 19.5k, False: 353k]
  ------------------
  128|  19.5k|            if (keymgmt->gen_cleanup == NULL)
  ------------------
  |  Branch (128:17): [True: 19.5k, False: 0]
  ------------------
  129|  19.5k|                keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns);
  130|  19.5k|            break;
  131|  21.1k|        case OSSL_FUNC_KEYMGMT_FREE:
  ------------------
  |  |  694|  21.1k|#define OSSL_FUNC_KEYMGMT_FREE 10
  ------------------
  |  Branch (131:9): [True: 21.1k, False: 351k]
  ------------------
  132|  21.1k|            if (keymgmt->free == NULL)
  ------------------
  |  Branch (132:17): [True: 21.1k, False: 0]
  ------------------
  133|  21.1k|                keymgmt->free = OSSL_FUNC_keymgmt_free(fns);
  134|  21.1k|            break;
  135|  15.3k|        case OSSL_FUNC_KEYMGMT_LOAD:
  ------------------
  |  |  689|  15.3k|#define OSSL_FUNC_KEYMGMT_LOAD 8
  ------------------
  |  Branch (135:9): [True: 15.3k, False: 357k]
  ------------------
  136|  15.3k|            if (keymgmt->load == NULL)
  ------------------
  |  Branch (136:17): [True: 15.3k, False: 0]
  ------------------
  137|  15.3k|                keymgmt->load = OSSL_FUNC_keymgmt_load(fns);
  138|  15.3k|            break;
  139|  19.5k|        case OSSL_FUNC_KEYMGMT_GET_PARAMS:
  ------------------
  |  |  698|  19.5k|#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
  ------------------
  |  Branch (139:9): [True: 19.5k, False: 353k]
  ------------------
  140|  19.5k|            if (keymgmt->get_params == NULL) {
  ------------------
  |  Branch (140:17): [True: 19.5k, False: 0]
  ------------------
  141|  19.5k|                getparamfncnt++;
  142|  19.5k|                keymgmt->get_params = OSSL_FUNC_keymgmt_get_params(fns);
  143|  19.5k|            }
  144|  19.5k|            break;
  145|  19.5k|        case OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS:
  ------------------
  |  |  699|  19.5k|#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
  ------------------
  |  Branch (145:9): [True: 19.5k, False: 353k]
  ------------------
  146|  19.5k|            if (keymgmt->gettable_params == NULL) {
  ------------------
  |  Branch (146:17): [True: 19.5k, False: 0]
  ------------------
  147|  19.5k|                getparamfncnt++;
  148|  19.5k|                keymgmt->gettable_params = OSSL_FUNC_keymgmt_gettable_params(fns);
  149|  19.5k|            }
  150|  19.5k|            break;
  151|  10.0k|        case OSSL_FUNC_KEYMGMT_SET_PARAMS:
  ------------------
  |  |  705|  10.0k|#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
  ------------------
  |  Branch (151:9): [True: 10.0k, False: 362k]
  ------------------
  152|  10.0k|            if (keymgmt->set_params == NULL) {
  ------------------
  |  Branch (152:17): [True: 10.0k, False: 0]
  ------------------
  153|  10.0k|                setparamfncnt++;
  154|  10.0k|                keymgmt->set_params = OSSL_FUNC_keymgmt_set_params(fns);
  155|  10.0k|            }
  156|  10.0k|            break;
  157|  10.0k|        case OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS:
  ------------------
  |  |  706|  10.0k|#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
  ------------------
  |  Branch (157:9): [True: 10.0k, False: 362k]
  ------------------
  158|  10.0k|            if (keymgmt->settable_params == NULL) {
  ------------------
  |  Branch (158:17): [True: 10.0k, False: 0]
  ------------------
  159|  10.0k|                setparamfncnt++;
  160|  10.0k|                keymgmt->settable_params = OSSL_FUNC_keymgmt_settable_params(fns);
  161|  10.0k|            }
  162|  10.0k|            break;
  163|  2.11k|        case OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME:
  ------------------
  |  |  713|  2.11k|#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
  ------------------
  |  Branch (163:9): [True: 2.11k, False: 370k]
  ------------------
  164|  2.11k|            if (keymgmt->query_operation_name == NULL)
  ------------------
  |  Branch (164:17): [True: 2.11k, False: 0]
  ------------------
  165|  2.11k|                keymgmt->query_operation_name = OSSL_FUNC_keymgmt_query_operation_name(fns);
  166|  2.11k|            break;
  167|  21.1k|        case OSSL_FUNC_KEYMGMT_HAS:
  ------------------
  |  |  718|  21.1k|#define OSSL_FUNC_KEYMGMT_HAS 21
  ------------------
  |  Branch (167:9): [True: 21.1k, False: 351k]
  ------------------
  168|  21.1k|            if (keymgmt->has == NULL)
  ------------------
  |  Branch (168:17): [True: 21.1k, False: 0]
  ------------------
  169|  21.1k|                keymgmt->has = OSSL_FUNC_keymgmt_has(fns);
  170|  21.1k|            break;
  171|  17.4k|        case OSSL_FUNC_KEYMGMT_DUP:
  ------------------
  |  |  747|  17.4k|#define OSSL_FUNC_KEYMGMT_DUP 44
  ------------------
  |  Branch (171:9): [True: 17.4k, False: 355k]
  ------------------
  172|  17.4k|            if (keymgmt->dup == NULL)
  ------------------
  |  Branch (172:17): [True: 17.4k, False: 0]
  ------------------
  173|  17.4k|                keymgmt->dup = OSSL_FUNC_keymgmt_dup(fns);
  174|  17.4k|            break;
  175|  15.3k|        case OSSL_FUNC_KEYMGMT_VALIDATE:
  ------------------
  |  |  722|  15.3k|#define OSSL_FUNC_KEYMGMT_VALIDATE 22
  ------------------
  |  Branch (175:9): [True: 15.3k, False: 357k]
  ------------------
  176|  15.3k|            if (keymgmt->validate == NULL)
  ------------------
  |  Branch (176:17): [True: 15.3k, False: 0]
  ------------------
  177|  15.3k|                keymgmt->validate = OSSL_FUNC_keymgmt_validate(fns);
  178|  15.3k|            break;
  179|  19.5k|        case OSSL_FUNC_KEYMGMT_MATCH:
  ------------------
  |  |  726|  19.5k|#define OSSL_FUNC_KEYMGMT_MATCH 23
  ------------------
  |  Branch (179:9): [True: 19.5k, False: 353k]
  ------------------
  180|  19.5k|            if (keymgmt->match == NULL)
  ------------------
  |  Branch (180:17): [True: 19.5k, False: 0]
  ------------------
  181|  19.5k|                keymgmt->match = OSSL_FUNC_keymgmt_match(fns);
  182|  19.5k|            break;
  183|  19.5k|        case OSSL_FUNC_KEYMGMT_IMPORT:
  ------------------
  |  |  732|  19.5k|#define OSSL_FUNC_KEYMGMT_IMPORT 40
  ------------------
  |  Branch (183:9): [True: 19.5k, False: 353k]
  ------------------
  184|  19.5k|            if (keymgmt->import == NULL) {
  ------------------
  |  Branch (184:17): [True: 19.5k, False: 0]
  ------------------
  185|  19.5k|                importfncnt++;
  186|  19.5k|                keymgmt->import = OSSL_FUNC_keymgmt_import(fns);
  187|  19.5k|            }
  188|  19.5k|            break;
  189|  19.5k|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES:
  ------------------
  |  |  733|  19.5k|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
  ------------------
  |  Branch (189:9): [True: 19.5k, False: 353k]
  ------------------
  190|  19.5k|            if (keymgmt->import_types == NULL) {
  ------------------
  |  Branch (190:17): [True: 19.5k, False: 0]
  ------------------
  191|  19.5k|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (191:21): [True: 19.5k, False: 0]
  ------------------
  192|  19.5k|                    importfncnt++;
  193|  19.5k|                importtypesfncnt++;
  194|  19.5k|                keymgmt->import_types = OSSL_FUNC_keymgmt_import_types(fns);
  195|  19.5k|            }
  196|  19.5k|            break;
  197|      0|        case OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX:
  ------------------
  |  |  752|      0|#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
  ------------------
  |  Branch (197:9): [True: 0, False: 372k]
  ------------------
  198|      0|            if (keymgmt->import_types_ex == NULL) {
  ------------------
  |  Branch (198:17): [True: 0, False: 0]
  ------------------
  199|      0|                if (importtypesfncnt == 0)
  ------------------
  |  Branch (199:21): [True: 0, False: 0]
  ------------------
  200|      0|                    importfncnt++;
  201|      0|                importtypesfncnt++;
  202|      0|                keymgmt->import_types_ex = OSSL_FUNC_keymgmt_import_types_ex(fns);
  203|      0|            }
  204|      0|            break;
  205|  19.5k|        case OSSL_FUNC_KEYMGMT_EXPORT:
  ------------------
  |  |  734|  19.5k|#define OSSL_FUNC_KEYMGMT_EXPORT 42
  ------------------
  |  Branch (205:9): [True: 19.5k, False: 353k]
  ------------------
  206|  19.5k|            if (keymgmt->export == NULL) {
  ------------------
  |  Branch (206:17): [True: 19.5k, False: 0]
  ------------------
  207|  19.5k|                exportfncnt++;
  208|  19.5k|                keymgmt->export = OSSL_FUNC_keymgmt_export(fns);
  209|  19.5k|            }
  210|  19.5k|            break;
  211|  19.5k|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES:
  ------------------
  |  |  735|  19.5k|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
  ------------------
  |  Branch (211:9): [True: 19.5k, False: 353k]
  ------------------
  212|  19.5k|            if (keymgmt->export_types == NULL) {
  ------------------
  |  Branch (212:17): [True: 19.5k, False: 0]
  ------------------
  213|  19.5k|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (213:21): [True: 19.5k, False: 0]
  ------------------
  214|  19.5k|                    exportfncnt++;
  215|  19.5k|                exporttypesfncnt++;
  216|  19.5k|                keymgmt->export_types = OSSL_FUNC_keymgmt_export_types(fns);
  217|  19.5k|            }
  218|  19.5k|            break;
  219|      0|        case OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX:
  ------------------
  |  |  753|      0|#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
  ------------------
  |  Branch (219:9): [True: 0, False: 372k]
  ------------------
  220|      0|            if (keymgmt->export_types_ex == NULL) {
  ------------------
  |  Branch (220:17): [True: 0, False: 0]
  ------------------
  221|      0|                if (exporttypesfncnt == 0)
  ------------------
  |  Branch (221:21): [True: 0, False: 0]
  ------------------
  222|      0|                    exportfncnt++;
  223|      0|                exporttypesfncnt++;
  224|      0|                keymgmt->export_types_ex = OSSL_FUNC_keymgmt_export_types_ex(fns);
  225|      0|            }
  226|      0|            break;
  227|   372k|        }
  228|   372k|    }
  229|       |    /*
  230|       |     * Try to check that the method is sensible.
  231|       |     * At least one constructor and the destructor are MANDATORY
  232|       |     * The functions 'has' is MANDATORY
  233|       |     * It makes no sense being able to free stuff if you can't create it.
  234|       |     * It makes no sense providing OSSL_PARAM descriptors for import and
  235|       |     * export if you can't import or export.
  236|       |     */
  237|  21.1k|    if (keymgmt->free == NULL
  ------------------
  |  Branch (237:9): [True: 0, False: 21.1k]
  ------------------
  238|  21.1k|        || (keymgmt->new == NULL
  ------------------
  |  Branch (238:13): [True: 0, False: 21.1k]
  ------------------
  239|      0|            && keymgmt->gen == NULL
  ------------------
  |  Branch (239:16): [True: 0, False: 0]
  ------------------
  240|      0|            && keymgmt->load == NULL)
  ------------------
  |  Branch (240:16): [True: 0, False: 0]
  ------------------
  241|  21.1k|        || keymgmt->has == NULL
  ------------------
  |  Branch (241:12): [True: 0, False: 21.1k]
  ------------------
  242|  21.1k|        || (getparamfncnt != 0 && getparamfncnt != 2)
  ------------------
  |  Branch (242:13): [True: 19.5k, False: 1.58k]
  |  Branch (242:35): [True: 0, False: 19.5k]
  ------------------
  243|  21.1k|        || (setparamfncnt != 0 && setparamfncnt != 2)
  ------------------
  |  Branch (243:13): [True: 10.0k, False: 11.0k]
  |  Branch (243:35): [True: 0, False: 10.0k]
  ------------------
  244|  21.1k|        || (setgenparamfncnt != 0 && setgenparamfncnt != 2)
  ------------------
  |  Branch (244:13): [True: 19.5k, False: 1.58k]
  |  Branch (244:38): [True: 0, False: 19.5k]
  ------------------
  245|  21.1k|        || (getgenparamfncnt != 0 && getgenparamfncnt != 2)
  ------------------
  |  Branch (245:13): [True: 1.05k, False: 20.0k]
  |  Branch (245:38): [True: 0, False: 1.05k]
  ------------------
  246|  21.1k|        || (importfncnt != 0 && importfncnt != 2)
  ------------------
  |  Branch (246:13): [True: 19.5k, False: 1.58k]
  |  Branch (246:33): [True: 0, False: 19.5k]
  ------------------
  247|  21.1k|        || (exportfncnt != 0 && exportfncnt != 2)
  ------------------
  |  Branch (247:13): [True: 19.5k, False: 1.58k]
  |  Branch (247:33): [True: 0, False: 19.5k]
  ------------------
  248|  21.1k|        || (keymgmt->gen != NULL
  ------------------
  |  Branch (248:13): [True: 19.5k, False: 1.58k]
  ------------------
  249|  19.5k|            && (keymgmt->gen_init == NULL
  ------------------
  |  Branch (249:17): [True: 0, False: 19.5k]
  ------------------
  250|  19.5k|                || keymgmt->gen_cleanup == NULL))) {
  ------------------
  |  Branch (250:20): [True: 0, False: 19.5k]
  ------------------
  251|      0|        EVP_KEYMGMT_free(keymgmt);
  252|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|        return NULL;
  254|      0|    }
  255|  21.1k|    keymgmt->prov = prov;
  256|  21.1k|    if (prov != NULL)
  ------------------
  |  Branch (256:9): [True: 21.1k, False: 0]
  ------------------
  257|  21.1k|        ossl_provider_up_ref(prov);
  258|       |
  259|  21.1k|#ifndef FIPS_MODULE
  260|  21.1k|    keymgmt->legacy_alg = get_legacy_alg_type_from_keymgmt(keymgmt);
  261|  21.1k|#endif
  262|       |
  263|  21.1k|    return keymgmt;
  264|  21.1k|}
keymgmt_meth.c:keymgmt_new:
   31|  21.1k|{
   32|  21.1k|    EVP_KEYMGMT *keymgmt = NULL;
   33|       |
   34|  21.1k|    if ((keymgmt = OPENSSL_zalloc(sizeof(*keymgmt))) == NULL)
  ------------------
  |  |  108|  21.1k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (34:9): [True: 0, False: 21.1k]
  ------------------
   35|      0|        return NULL;
   36|  21.1k|    if (!CRYPTO_NEW_REF(&keymgmt->refcnt, 1)) {
  ------------------
  |  Branch (36:9): [True: 0, False: 21.1k]
  ------------------
   37|      0|        EVP_KEYMGMT_free(keymgmt);
   38|      0|        return NULL;
   39|      0|    }
   40|  21.1k|    return keymgmt;
   41|  21.1k|}
keymgmt_meth.c:get_legacy_alg_type_from_keymgmt:
   54|  21.1k|{
   55|  21.1k|    int type = NID_undef;
  ------------------
  |  |   18|  21.1k|#define NID_undef                       0
  ------------------
   56|       |
   57|  21.1k|    EVP_KEYMGMT_names_do_all(keymgmt, help_get_legacy_alg_type_from_keymgmt,
   58|  21.1k|        &type);
   59|  21.1k|    return type;
   60|  21.1k|}
keymgmt_meth.c:help_get_legacy_alg_type_from_keymgmt:
   46|  56.4k|{
   47|  56.4k|    int *type = arg;
   48|       |
   49|  56.4k|    if (*type == NID_undef)
  ------------------
  |  |   18|  56.4k|#define NID_undef                       0
  ------------------
  |  Branch (49:9): [True: 44.3k, False: 12.1k]
  ------------------
   50|  44.3k|        *type = evp_pkey_name2type(keytype);
   51|  56.4k|}
keymgmt_meth.c:evp_keymgmt_up_ref:
   26|   217k|{
   27|   217k|    return EVP_KEYMGMT_up_ref(data);
   28|   217k|}
keymgmt_meth.c:evp_keymgmt_free:
   21|  52.0k|{
   22|  52.0k|    EVP_KEYMGMT_free(data);
   23|  52.0k|}

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

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

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

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

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

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

EVP_sha1:
  101|  11.0k|{
  102|  11.0k|    return &sha1_md;
  103|  11.0k|}
EVP_sha224:
  116|      1|{
  117|      1|    return &sha224_md;
  118|      1|}
EVP_sha256:
  131|  32.2k|{
  132|  32.2k|    return &sha256_md;
  133|  32.2k|}
EVP_sha512_224:
  146|      1|{
  147|      1|    return &sha512_224_md;
  148|      1|}
EVP_sha512_256:
  161|      1|{
  162|      1|    return &sha512_256_md;
  163|      1|}
EVP_sha384:
  176|      1|{
  177|      1|    return &sha384_md;
  178|      1|}
EVP_sha512:
  191|      1|{
  192|      1|    return &sha512_md;
  193|      1|}

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

EVP_MAC_CTX_free:
   40|  7.89k|{
   41|  7.89k|    if (ctx == NULL)
  ------------------
  |  Branch (41:9): [True: 7.89k, False: 0]
  ------------------
   42|  7.89k|        return;
   43|      0|    ctx->meth->freectx(ctx->algctx);
   44|      0|    ctx->algctx = NULL;
   45|       |    /* refcnt-- */
   46|      0|    EVP_MAC_free(ctx->meth);
   47|      0|    OPENSSL_free(ctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|      0|}

EVP_add_cipher:
   20|    144|{
   21|    144|    int r;
   22|       |
   23|    144|    if (c == NULL)
  ------------------
  |  Branch (23:9): [True: 0, False: 144]
  ------------------
   24|      0|        return 0;
   25|       |
   26|    144|    r = OBJ_NAME_add(OBJ_nid2sn(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    144|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
   27|    144|        (const char *)c);
   28|    144|    if (r == 0)
  ------------------
  |  Branch (28:9): [True: 0, False: 144]
  ------------------
   29|      0|        return 0;
   30|    144|    r = OBJ_NAME_add(OBJ_nid2ln(c->nid), OBJ_NAME_TYPE_CIPHER_METH,
  ------------------
  |  |   26|    144|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
   31|    144|        (const char *)c);
   32|    144|    return r;
   33|    144|}
EVP_add_digest:
   36|     22|{
   37|     22|    int r;
   38|     22|    const char *name;
   39|       |
   40|     22|    name = OBJ_nid2sn(md->type);
   41|     22|    r = OBJ_NAME_add(name, OBJ_NAME_TYPE_MD_METH, (const char *)md);
  ------------------
  |  |   25|     22|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
   42|     22|    if (r == 0)
  ------------------
  |  Branch (42:9): [True: 0, False: 22]
  ------------------
   43|      0|        return 0;
   44|     22|    r = OBJ_NAME_add(OBJ_nid2ln(md->type), OBJ_NAME_TYPE_MD_METH,
  ------------------
  |  |   25|     22|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
   45|     22|        (const char *)md);
   46|     22|    if (r == 0)
  ------------------
  |  Branch (46:9): [True: 0, False: 22]
  ------------------
   47|      0|        return 0;
   48|       |
   49|     22|    if (md->pkey_type && md->type != md->pkey_type) {
  ------------------
  |  Branch (49:9): [True: 17, False: 5]
  |  Branch (49:26): [True: 16, False: 1]
  ------------------
   50|     16|        r = OBJ_NAME_add(OBJ_nid2sn(md->pkey_type),
   51|     16|            OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     16|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
                          OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     16|#define OBJ_NAME_ALIAS 0x8000
  ------------------
   52|     16|        if (r == 0)
  ------------------
  |  Branch (52:13): [True: 0, False: 16]
  ------------------
   53|      0|            return 0;
   54|     16|        r = OBJ_NAME_add(OBJ_nid2ln(md->pkey_type),
   55|     16|            OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   25|     16|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
                          OBJ_NAME_TYPE_MD_METH | OBJ_NAME_ALIAS, name);
  ------------------
  |  |   33|     16|#define OBJ_NAME_ALIAS 0x8000
  ------------------
   56|     16|    }
   57|     22|    return r;
   58|     22|}
EVP_get_digestbyname:
  131|  8.96k|{
  132|       |    return evp_get_digestbyname_ex(NULL, name);
  133|  8.96k|}
evp_get_digestbyname_ex:
  136|  8.96k|{
  137|  8.96k|    const EVP_MD *dp;
  138|  8.96k|    OSSL_NAMEMAP *namemap;
  139|  8.96k|    int id;
  140|  8.96k|    int do_retry = 1;
  141|       |
  142|  8.96k|    if (!OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL))
  ------------------
  |  |  507|  8.96k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
  |  Branch (142:9): [True: 0, False: 8.96k]
  ------------------
  143|      0|        return NULL;
  144|       |
  145|  8.96k|    dp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|  8.96k|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  146|       |
  147|  8.96k|    if (dp != NULL)
  ------------------
  |  Branch (147:9): [True: 8.96k, False: 0]
  ------------------
  148|  8.96k|        return dp;
  149|       |
  150|       |    /*
  151|       |     * It's not in the method database, but it might be there under a different
  152|       |     * name. So we check for aliases in the EVP namemap and try all of those
  153|       |     * in turn.
  154|       |     */
  155|       |
  156|      0|    namemap = ossl_namemap_stored(libctx);
  157|      0|retry:
  158|      0|    id = ossl_namemap_name2num(namemap, name);
  159|      0|    if (id == 0) {
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|      0|        EVP_MD *fetched_md;
  161|       |
  162|       |        /* Try to fetch it because the name might not be known yet. */
  163|      0|        if (!do_retry)
  ------------------
  |  Branch (163:13): [True: 0, False: 0]
  ------------------
  164|      0|            return NULL;
  165|      0|        do_retry = 0;
  166|      0|        ERR_set_mark();
  167|      0|        fetched_md = EVP_MD_fetch(libctx, name, NULL);
  168|      0|        EVP_MD_free(fetched_md);
  169|      0|        ERR_pop_to_mark();
  170|      0|        goto retry;
  171|      0|    }
  172|       |
  173|      0|    if (!ossl_namemap_doall_names(namemap, id, digest_from_name, &dp))
  ------------------
  |  Branch (173:9): [True: 0, False: 0]
  ------------------
  174|      0|        return NULL;
  175|       |
  176|      0|    return dp;
  177|      0|}
evp_cleanup_int:
  180|      1|{
  181|      1|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_KDF_METH);
  ------------------
  |  |   30|      1|#define OBJ_NAME_TYPE_KDF_METH 0x06
  ------------------
  182|      1|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_CIPHER_METH);
  ------------------
  |  |   26|      1|#define OBJ_NAME_TYPE_CIPHER_METH 0x02
  ------------------
  183|      1|    OBJ_NAME_cleanup(OBJ_NAME_TYPE_MD_METH);
  ------------------
  |  |   25|      1|#define OBJ_NAME_TYPE_MD_METH 0x01
  ------------------
  184|       |    /*
  185|       |     * The above calls will only clean out the contents of the name hash
  186|       |     * table, but not the hash table itself.  The following line does that
  187|       |     * part.  -- Richard Levitte
  188|       |     */
  189|      1|    OBJ_NAME_cleanup(-1);
  190|       |
  191|      1|    EVP_PBE_cleanup();
  192|      1|    OBJ_sigid_free();
  193|       |
  194|      1|    evp_app_cleanup_int();
  195|      1|}

evp_pkey_get0_RSA_int:
   41|   138k|{
   42|   138k|    if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   63|   138k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   276k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
                  if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) {
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 138k]
  |  Branch (42:39): [True: 0, False: 0]
  ------------------
   43|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_AN_RSA_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|   138k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   47|   138k|}
EVP_PKEY_get1_RSA:
   55|   138k|{
   56|   138k|    RSA *ret = evp_pkey_get0_RSA_int(pkey);
   57|       |
   58|   138k|    if (ret != NULL && !RSA_up_ref(ret))
  ------------------
  |  Branch (58:9): [True: 138k, False: 0]
  |  Branch (58:24): [True: 0, False: 138k]
  ------------------
   59|      0|        ret = NULL;
   60|       |
   61|   138k|    return ret;
   62|   138k|}
evp_pkey_get0_EC_KEY_int:
   77|  52.2k|{
   78|  52.2k|    if (EVP_PKEY_get_base_id(pkey) != EVP_PKEY_EC) {
  ------------------
  |  |   73|  52.2k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  52.2k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (78:9): [True: 0, False: 52.2k]
  ------------------
   79|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_EXPECTING_A_EC_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   80|      0|        return NULL;
   81|      0|    }
   82|  52.2k|    return evp_pkey_get_legacy((EVP_PKEY *)pkey);
   83|  52.2k|}
EVP_PKEY_get1_EC_KEY:
   91|  52.2k|{
   92|  52.2k|    EC_KEY *ret = evp_pkey_get0_EC_KEY_int(pkey);
   93|       |
   94|  52.2k|    if (ret != NULL && !EC_KEY_up_ref(ret))
  ------------------
  |  Branch (94:9): [True: 52.2k, False: 0]
  |  Branch (94:24): [True: 0, False: 52.2k]
  ------------------
   95|      0|        ret = NULL;
   96|  52.2k|    return ret;
   97|  52.2k|}

EVP_PKEY_set_type:
  722|   435k|{
  723|   435k|    return pkey_set_type(pkey, NULL, type, NULL, -1, NULL);
  724|   435k|}
EVP_PKEY_assign:
  792|   190k|{
  793|   190k|#ifndef OPENSSL_NO_EC
  794|   190k|    int pktype;
  795|       |
  796|   190k|    pktype = EVP_PKEY_type(type);
  797|   190k|    if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   73|   190k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   381k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if ((key != NULL) && (pktype == EVP_PKEY_EC || pktype == EVP_PKEY_SM2)) {
  ------------------
  |  |   74|   138k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|   138k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (797:9): [True: 190k, False: 0]
  |  Branch (797:27): [True: 52.2k, False: 138k]
  |  Branch (797:52): [True: 0, False: 138k]
  ------------------
  798|  52.2k|        const EC_GROUP *group = EC_KEY_get0_group(key);
  799|       |
  800|  52.2k|        if (group != NULL) {
  ------------------
  |  Branch (800:13): [True: 52.2k, False: 0]
  ------------------
  801|  52.2k|            int curve = EC_GROUP_get_curve_name(group);
  802|       |
  803|       |            /*
  804|       |             * Regardless of what is requested the SM2 curve must be SM2 type,
  805|       |             * and non SM2 curves are EC type.
  806|       |             */
  807|  52.2k|            if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  | 1255|   104k|#define NID_sm2         1172
  ------------------
                          if (curve == NID_sm2 && pktype == EVP_PKEY_EC)
  ------------------
  |  |   73|      0|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (807:17): [True: 0, False: 52.2k]
  |  Branch (807:37): [True: 0, False: 0]
  ------------------
  808|      0|                type = EVP_PKEY_SM2;
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  809|  52.2k|            else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  | 1255|   104k|#define NID_sm2         1172
  ------------------
                          else if (curve != NID_sm2 && pktype == EVP_PKEY_SM2)
  ------------------
  |  |   74|  52.2k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|  52.2k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (809:22): [True: 52.2k, False: 0]
  |  Branch (809:42): [True: 0, False: 52.2k]
  ------------------
  810|      0|                type = EVP_PKEY_EC;
  ------------------
  |  |   73|      0|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  811|  52.2k|        }
  812|  52.2k|    }
  813|   190k|#endif
  814|       |
  815|   190k|    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  ------------------
  |  Branch (815:9): [True: 0, False: 190k]
  |  Branch (815:25): [True: 0, False: 190k]
  ------------------
  816|      0|        return 0;
  817|       |
  818|   190k|    pkey->pkey.ptr = key;
  819|   190k|    detect_foreign_key(pkey);
  820|       |
  821|       |    return (key != NULL);
  822|   190k|}
EVP_PKEY_get_id:
 1024|  52.2k|{
 1025|  52.2k|    return pkey->type;
 1026|  52.2k|}
EVP_PKEY_get_base_id:
 1029|  52.2k|{
 1030|  52.2k|    return EVP_PKEY_type(pkey->type);
 1031|  52.2k|}
evp_pkey_name2type:
 1061|  49.2k|{
 1062|  49.2k|    int type;
 1063|  49.2k|    size_t i;
 1064|       |
 1065|   598k|    for (i = 0; i < OSSL_NELEM(standard_name2type); i++) {
  ------------------
  |  |   14|   598k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1065:17): [True: 555k, False: 43.1k]
  ------------------
 1066|   555k|        if (OPENSSL_strcasecmp(name, standard_name2type[i].ptr) == 0)
  ------------------
  |  Branch (1066:13): [True: 6.15k, False: 549k]
  ------------------
 1067|  6.15k|            return (int)standard_name2type[i].id;
 1068|   555k|    }
 1069|       |
 1070|  43.1k|    if ((type = EVP_PKEY_type(OBJ_sn2nid(name))) != NID_undef)
  ------------------
  |  |   18|  43.1k|#define NID_undef                       0
  ------------------
  |  Branch (1070:9): [True: 2.11k, False: 41.0k]
  ------------------
 1071|  2.11k|        return type;
 1072|  41.0k|    return EVP_PKEY_type(OBJ_ln2nid(name));
 1073|  43.1k|}
EVP_PKEY_is_a:
 1088|  11.0k|{
 1089|  11.0k|    if (pkey == NULL)
  ------------------
  |  Branch (1089:9): [True: 0, False: 11.0k]
  ------------------
 1090|      0|        return 0;
 1091|  11.0k|    if (pkey->keymgmt == NULL)
  ------------------
  |  Branch (1091:9): [True: 0, False: 11.0k]
  ------------------
 1092|      0|        return pkey->type == evp_pkey_name2type(name);
 1093|  11.0k|    return EVP_KEYMGMT_is_a(pkey->keymgmt, name);
 1094|  11.0k|}
EVP_PKEY_get1_encoded_public_key:
 1442|  2.46k|{
 1443|  2.46k|    if (pkey == NULL)
  ------------------
  |  Branch (1443:9): [True: 0, False: 2.46k]
  ------------------
 1444|      0|        return 0;
 1445|  2.46k|#ifndef FIPS_MODULE
 1446|  2.46k|    if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  652|  2.46k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (652:5): [True: 2.46k, False: 0]
  |  |  ------------------
  ------------------
 1447|  2.46k|#endif
 1448|  2.46k|    {
 1449|  2.46k|        size_t return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  2.46k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
 1450|  2.46k|        unsigned char *buf;
 1451|       |
 1452|       |        /*
 1453|       |         * We know that this is going to fail, but it will give us a size
 1454|       |         * to allocate.
 1455|       |         */
 1456|  2.46k|        EVP_PKEY_get_octet_string_param(pkey,
 1457|  2.46k|            OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  398|  2.46k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1458|  2.46k|            NULL, 0, &return_size);
 1459|  2.46k|        if (return_size == OSSL_PARAM_UNMODIFIED)
  ------------------
  |  |   22|  2.46k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (1459:13): [True: 0, False: 2.46k]
  ------------------
 1460|      0|            return 0;
 1461|       |
 1462|  2.46k|        *ppub = NULL;
 1463|  2.46k|        buf = OPENSSL_malloc(return_size);
  ------------------
  |  |  106|  2.46k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1464|  2.46k|        if (buf == NULL)
  ------------------
  |  Branch (1464:13): [True: 0, False: 2.46k]
  ------------------
 1465|      0|            return 0;
 1466|       |
 1467|  2.46k|        if (!EVP_PKEY_get_octet_string_param(pkey,
  ------------------
  |  Branch (1467:13): [True: 0, False: 2.46k]
  ------------------
 1468|  2.46k|                OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY,
  ------------------
  |  |  398|  2.46k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
 1469|  2.46k|                buf, return_size, NULL)) {
 1470|      0|            OPENSSL_free(buf);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|      0|            return 0;
 1472|      0|        }
 1473|  2.46k|        *ppub = buf;
 1474|  2.46k|        return return_size;
 1475|  2.46k|    }
 1476|       |
 1477|      0|#ifndef FIPS_MODULE
 1478|      0|    {
 1479|      0|        int rv = evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_GET1_TLS_ENCPT, 0, ppub);
  ------------------
  |  | 1615|      0|#define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa
  ------------------
 1480|      0|        if (rv <= 0)
  ------------------
  |  Branch (1480:13): [True: 0, False: 0]
  ------------------
 1481|      0|            return 0;
 1482|      0|        return rv;
 1483|      0|    }
 1484|      0|#endif /* !FIPS_MODULE */
 1485|      0|}
EVP_PKEY_new:
 1490|   388k|{
 1491|   388k|    EVP_PKEY *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   388k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1492|       |
 1493|   388k|    if (ret == NULL)
  ------------------
  |  Branch (1493:9): [True: 0, False: 388k]
  ------------------
 1494|      0|        return NULL;
 1495|       |
 1496|   388k|    ret->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   388k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   388k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1497|   388k|    ret->save_type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   388k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   388k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1498|       |
 1499|   388k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (1499:9): [True: 0, False: 388k]
  ------------------
 1500|      0|        goto err;
 1501|       |
 1502|   388k|    ret->lock = CRYPTO_THREAD_lock_new();
 1503|   388k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (1503:9): [True: 0, False: 388k]
  ------------------
 1504|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1505|      0|        goto err;
 1506|      0|    }
 1507|       |
 1508|   388k|#ifndef FIPS_MODULE
 1509|   388k|    ret->save_parameters = 1;
 1510|   388k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, ret, &ret->ex_data)) {
  ------------------
  |  |  268|   388k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
  |  Branch (1510:9): [True: 0, False: 388k]
  ------------------
 1511|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1512|      0|        goto err;
 1513|      0|    }
 1514|   388k|#endif
 1515|   388k|    return ret;
 1516|       |
 1517|      0|err:
 1518|      0|    CRYPTO_FREE_REF(&ret->references);
 1519|      0|    CRYPTO_THREAD_lock_free(ret->lock);
 1520|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1521|       |    return NULL;
 1522|   388k|}
EVP_PKEY_set_type_by_keymgmt:
 1675|   195k|{
 1676|   195k|#ifndef FIPS_MODULE
 1677|   195k|#define EVP_PKEY_TYPE_STR str[0]
 1678|   195k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
 1679|       |    /*
 1680|       |     * Find at most two strings that have an associated EVP_PKEY_ASN1_METHOD
 1681|       |     * Ideally, only one should be found.  If two (or more) are found, the
 1682|       |     * match is ambiguous.  This should never happen, but...
 1683|       |     */
 1684|   195k|    const char *str[2] = { NULL, NULL };
 1685|       |
 1686|   195k|    if (!EVP_KEYMGMT_names_do_all(keymgmt, find_ameth, &str)
  ------------------
  |  Branch (1686:9): [True: 0, False: 195k]
  ------------------
 1687|   195k|        || str[1] != NULL) {
  ------------------
  |  Branch (1687:12): [True: 0, False: 195k]
  ------------------
 1688|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1689|      0|        return 0;
 1690|      0|    }
 1691|       |#else
 1692|       |#define EVP_PKEY_TYPE_STR NULL
 1693|       |#define EVP_PKEY_TYPE_STRLEN -1
 1694|       |#endif
 1695|   195k|    return pkey_set_type(pkey, NULL, EVP_PKEY_NONE,
  ------------------
  |  |   62|   195k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   195k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1696|   195k|        EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1677|   195k|#define EVP_PKEY_TYPE_STR str[0]
  ------------------
                      EVP_PKEY_TYPE_STR, EVP_PKEY_TYPE_STRLEN,
  ------------------
  |  | 1678|   195k|#define EVP_PKEY_TYPE_STRLEN (str[0] == NULL ? -1 : (int)strlen(str[0]))
  |  |  ------------------
  |  |  |  Branch (1678:31): [True: 2.47k, False: 193k]
  |  |  ------------------
  ------------------
 1697|   195k|        keymgmt);
 1698|       |
 1699|   195k|#undef EVP_PKEY_TYPE_STR
 1700|   195k|#undef EVP_PKEY_TYPE_STRLEN
 1701|   195k|}
EVP_PKEY_up_ref:
 1704|   244k|{
 1705|   244k|    int i;
 1706|       |
 1707|   244k|    if (CRYPTO_UP_REF(&pkey->references, &i) <= 0)
  ------------------
  |  Branch (1707:9): [True: 0, False: 244k]
  ------------------
 1708|      0|        return 0;
 1709|       |
 1710|   244k|    REF_PRINT_COUNT("EVP_PKEY", i, pkey);
  ------------------
  |  |  301|   244k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   244k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   244k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   244k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1711|   244k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   244k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 244k]
  |  |  ------------------
  ------------------
 1712|   244k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (1712:13): [True: 244k, False: 0]
  ------------------
 1713|   244k|}
evp_pkey_free_legacy:
 1778|   393k|{
 1779|   393k|    const EVP_PKEY_ASN1_METHOD *ameth = x->ameth;
 1780|   393k|    ENGINE *tmpe = NULL;
 1781|       |
 1782|   393k|    if (ameth == NULL && x->legacy_cache_pkey.ptr != NULL)
  ------------------
  |  Branch (1782:9): [True: 200k, False: 192k]
  |  Branch (1782:26): [True: 0, False: 200k]
  ------------------
 1783|      0|        ameth = EVP_PKEY_asn1_find(&tmpe, x->type);
 1784|       |
 1785|   393k|    if (ameth != NULL) {
  ------------------
  |  Branch (1785:9): [True: 192k, False: 200k]
  ------------------
 1786|   192k|        if (x->legacy_cache_pkey.ptr != NULL) {
  ------------------
  |  Branch (1786:13): [True: 0, False: 192k]
  ------------------
 1787|       |            /*
 1788|       |             * We should never have both a legacy origin key, and a key in the
 1789|       |             * legacy cache.
 1790|       |             */
 1791|      0|            assert(x->pkey.ptr == NULL);
  ------------------
  |  Branch (1791:13): [True: 0, False: 0]
  |  Branch (1791:13): [True: 0, False: 0]
  ------------------
 1792|       |            /*
 1793|       |             * For the purposes of freeing we make the legacy cache look like
 1794|       |             * a legacy origin key.
 1795|       |             */
 1796|      0|            x->pkey = x->legacy_cache_pkey;
 1797|      0|            x->legacy_cache_pkey.ptr = NULL;
 1798|      0|        }
 1799|   192k|        if (ameth->pkey_free != NULL)
  ------------------
  |  Branch (1799:13): [True: 192k, False: 0]
  ------------------
 1800|   192k|            ameth->pkey_free(x);
 1801|   192k|        x->pkey.ptr = NULL;
 1802|   192k|    }
 1803|   393k|#ifndef OPENSSL_NO_ENGINE
 1804|   393k|    ENGINE_finish(tmpe);
 1805|   393k|    ENGINE_finish(x->engine);
 1806|   393k|    x->engine = NULL;
 1807|   393k|    ENGINE_finish(x->pmeth_engine);
 1808|       |    x->pmeth_engine = NULL;
 1809|   393k|#endif
 1810|   393k|}
EVP_PKEY_free:
 1831|  1.12M|{
 1832|  1.12M|    int i;
 1833|       |
 1834|  1.12M|    if (x == NULL)
  ------------------
  |  Branch (1834:9): [True: 497k, False: 632k]
  ------------------
 1835|   497k|        return;
 1836|       |
 1837|   632k|    CRYPTO_DOWN_REF(&x->references, &i);
 1838|   632k|    REF_PRINT_COUNT("EVP_PKEY", i, x);
  ------------------
  |  |  301|   632k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   632k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   632k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   632k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1839|   632k|    if (i > 0)
  ------------------
  |  Branch (1839:9): [True: 244k, False: 388k]
  ------------------
 1840|   244k|        return;
 1841|   388k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   388k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 388k]
  |  |  ------------------
  ------------------
 1842|   388k|    evp_pkey_free_it(x);
 1843|   388k|#ifndef FIPS_MODULE
 1844|   388k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EVP_PKEY, x, &x->ex_data);
  ------------------
  |  |  268|   388k|#define CRYPTO_EX_INDEX_EVP_PKEY 17
  ------------------
 1845|   388k|#endif
 1846|   388k|    CRYPTO_THREAD_lock_free(x->lock);
 1847|   388k|    CRYPTO_FREE_REF(&x->references);
 1848|   388k|#ifndef FIPS_MODULE
 1849|   388k|    sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
  ------------------
  |  |  287|   388k|#define sk_X509_ATTRIBUTE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ATTRIBUTE_sk_type(sk), ossl_check_X509_ATTRIBUTE_freefunc_type(freefunc))
  ------------------
 1850|   388k|#endif
 1851|   388k|    OPENSSL_free(x);
  ------------------
  |  |  131|   388k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1852|   388k|}
evp_pkey_get_legacy:
 2155|   190k|{
 2156|   190k|    EVP_PKEY *tmp_copy = NULL;
 2157|   190k|    void *ret = NULL;
 2158|       |
 2159|   190k|    if (!ossl_assert(pk != NULL))
  ------------------
  |  |   52|   190k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   190k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2159:9): [True: 0, False: 190k]
  ------------------
 2160|      0|        return NULL;
 2161|       |
 2162|       |    /*
 2163|       |     * If this isn't an assigned provider side key, we just use any existing
 2164|       |     * origin legacy key.
 2165|       |     */
 2166|   190k|    if (!evp_pkey_is_assigned(pk))
  ------------------
  |  |  644|   190k|    ((pk)->pkey.ptr != NULL || (pk)->keydata != NULL)
  |  |  ------------------
  |  |  |  Branch (644:6): [True: 190k, False: 0]
  |  |  |  Branch (644:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2167|      0|        return NULL;
 2168|   190k|    if (!evp_pkey_is_provided(pk))
  ------------------
  |  |  652|   190k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (2168:9): [True: 190k, False: 0]
  ------------------
 2169|   190k|        return pk->pkey.ptr;
 2170|       |
 2171|      0|    if (!CRYPTO_THREAD_read_lock(pk->lock))
  ------------------
  |  Branch (2171:9): [True: 0, False: 0]
  ------------------
 2172|      0|        return NULL;
 2173|       |
 2174|      0|    ret = pk->legacy_cache_pkey.ptr;
 2175|       |
 2176|      0|    if (!CRYPTO_THREAD_unlock(pk->lock))
  ------------------
  |  Branch (2176:9): [True: 0, False: 0]
  ------------------
 2177|      0|        return NULL;
 2178|       |
 2179|      0|    if (ret != NULL)
  ------------------
  |  Branch (2179:9): [True: 0, False: 0]
  ------------------
 2180|      0|        return ret;
 2181|       |
 2182|      0|    if (!evp_pkey_copy_downgraded(&tmp_copy, pk))
  ------------------
  |  Branch (2182:9): [True: 0, False: 0]
  ------------------
 2183|      0|        goto err;
 2184|       |
 2185|      0|    if (!CRYPTO_THREAD_write_lock(pk->lock))
  ------------------
  |  Branch (2185:9): [True: 0, False: 0]
  ------------------
 2186|      0|        goto err;
 2187|       |
 2188|       |    /* Check again in case some other thread has updated it in the meantime */
 2189|      0|    ret = pk->legacy_cache_pkey.ptr;
 2190|      0|    if (ret == NULL) {
  ------------------
  |  Branch (2190:9): [True: 0, False: 0]
  ------------------
 2191|       |        /* Steal the legacy key reference from the temporary copy */
 2192|      0|        ret = pk->legacy_cache_pkey.ptr = tmp_copy->pkey.ptr;
 2193|      0|        tmp_copy->pkey.ptr = NULL;
 2194|      0|    }
 2195|       |
 2196|      0|    if (!CRYPTO_THREAD_unlock(pk->lock)) {
  ------------------
  |  Branch (2196:9): [True: 0, False: 0]
  ------------------
 2197|      0|        ret = NULL;
 2198|      0|        goto err;
 2199|      0|    }
 2200|       |
 2201|      0|err:
 2202|      0|    EVP_PKEY_free(tmp_copy);
 2203|       |
 2204|      0|    return ret;
 2205|      0|}
EVP_PKEY_get_octet_string_param:
 2260|  4.92k|{
 2261|  4.92k|    OSSL_PARAM params[2];
 2262|  4.92k|    int ret1 = 0, ret2 = 0;
 2263|       |
 2264|  4.92k|    if (key_name == NULL)
  ------------------
  |  Branch (2264:9): [True: 0, False: 4.92k]
  ------------------
 2265|      0|        return 0;
 2266|       |
 2267|  4.92k|    params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);
 2268|  4.92k|    params[1] = OSSL_PARAM_construct_end();
 2269|  4.92k|    if ((ret1 = EVP_PKEY_get_params(pkey, params)))
  ------------------
  |  Branch (2269:9): [True: 4.92k, False: 0]
  ------------------
 2270|  4.92k|        ret2 = OSSL_PARAM_modified(params);
 2271|  4.92k|    if (ret2 && out_len != NULL)
  ------------------
  |  Branch (2271:9): [True: 4.92k, False: 0]
  |  Branch (2271:17): [True: 2.46k, False: 2.46k]
  ------------------
 2272|  2.46k|        *out_len = params[0].return_size;
 2273|  4.92k|    return ret1 && ret2;
  ------------------
  |  Branch (2273:12): [True: 4.92k, False: 0]
  |  Branch (2273:20): [True: 4.92k, False: 0]
  ------------------
 2274|  4.92k|}
EVP_PKEY_get_params:
 2446|  4.92k|{
 2447|  4.92k|    if (pkey != NULL) {
  ------------------
  |  Branch (2447:9): [True: 4.92k, False: 0]
  ------------------
 2448|  4.92k|        if (evp_pkey_is_provided(pkey))
  ------------------
  |  |  652|  4.92k|    ((pk)->keymgmt != NULL)
  |  |  ------------------
  |  |  |  Branch (652:5): [True: 4.92k, False: 0]
  |  |  ------------------
  ------------------
 2449|  4.92k|            return evp_keymgmt_get_params(pkey->keymgmt, pkey->keydata, params) > 0;
 2450|      0|#ifndef FIPS_MODULE
 2451|      0|        else if (evp_pkey_is_legacy(pkey))
  ------------------
  |  |  650|      0|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (650:6): [True: 0, False: 0]
  |  |  |  Branch (650:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2452|      0|            return evp_pkey_get_params_to_ctrl(pkey, params) > 0;
 2453|  4.92k|#endif
 2454|  4.92k|    }
 2455|  4.92k|    ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2456|      0|    return 0;
 2457|  4.92k|}
p_lib.c:detect_foreign_key:
  758|   190k|{
  759|   190k|    switch (pkey->type) {
  760|   138k|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|   138k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   138k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (760:5): [True: 138k, False: 52.2k]
  ------------------
  761|   138k|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|   138k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   138k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (761:5): [True: 0, False: 190k]
  ------------------
  762|   138k|        pkey->foreign = pkey->pkey.rsa != NULL
  ------------------
  |  Branch (762:25): [True: 138k, False: 0]
  ------------------
  763|   138k|            && ossl_rsa_is_foreign(pkey->pkey.rsa);
  ------------------
  |  Branch (763:16): [True: 0, False: 138k]
  ------------------
  764|   138k|        break;
  765|      0|#ifndef OPENSSL_NO_EC
  766|      0|    case EVP_PKEY_SM2:
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (766:5): [True: 0, False: 190k]
  ------------------
  767|      0|        break;
  768|  52.2k|    case EVP_PKEY_EC:
  ------------------
  |  |   73|  52.2k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|  52.2k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
  |  Branch (768:5): [True: 52.2k, False: 138k]
  ------------------
  769|  52.2k|        pkey->foreign = pkey->pkey.ec != NULL
  ------------------
  |  Branch (769:25): [True: 52.2k, False: 0]
  ------------------
  770|  52.2k|            && ossl_ec_key_is_foreign(pkey->pkey.ec);
  ------------------
  |  Branch (770:16): [True: 0, False: 52.2k]
  ------------------
  771|  52.2k|        break;
  772|      0|#endif
  773|      0|#ifndef OPENSSL_NO_DSA
  774|      0|    case EVP_PKEY_DSA:
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (774:5): [True: 0, False: 190k]
  ------------------
  775|      0|        pkey->foreign = pkey->pkey.dsa != NULL
  ------------------
  |  Branch (775:25): [True: 0, False: 0]
  ------------------
  776|      0|            && ossl_dsa_is_foreign(pkey->pkey.dsa);
  ------------------
  |  Branch (776:16): [True: 0, False: 0]
  ------------------
  777|      0|        break;
  778|      0|#endif
  779|      0|#ifndef OPENSSL_NO_DH
  780|      0|    case EVP_PKEY_DH:
  ------------------
  |  |   71|      0|#define EVP_PKEY_DH NID_dhKeyAgreement
  |  |  ------------------
  |  |  |  |  621|      0|#define NID_dhKeyAgreement              28
  |  |  ------------------
  ------------------
  |  Branch (780:5): [True: 0, False: 190k]
  ------------------
  781|      0|        pkey->foreign = pkey->pkey.dh != NULL
  ------------------
  |  Branch (781:25): [True: 0, False: 0]
  ------------------
  782|      0|            && ossl_dh_is_foreign(pkey->pkey.dh);
  ------------------
  |  Branch (782:16): [True: 0, False: 0]
  ------------------
  783|      0|        break;
  784|      0|#endif
  785|      0|    default:
  ------------------
  |  Branch (785:5): [True: 0, False: 190k]
  ------------------
  786|      0|        pkey->foreign = 0;
  787|      0|        break;
  788|   190k|    }
  789|   190k|}
p_lib.c:pkey_set_type:
 1539|  1.35M|{
 1540|  1.35M|#ifndef FIPS_MODULE
 1541|  1.35M|    const EVP_PKEY_ASN1_METHOD *ameth = NULL;
 1542|  1.35M|    ENGINE **eptr = (e == NULL) ? &e : NULL;
  ------------------
  |  Branch (1542:21): [True: 1.35M, False: 0]
  ------------------
 1543|  1.35M|#endif
 1544|       |
 1545|       |    /*
 1546|       |     * The setups can't set both legacy and provider side methods.
 1547|       |     * It is forbidden
 1548|       |     */
 1549|  1.35M|    if (!ossl_assert(type == EVP_PKEY_NONE || keymgmt == NULL)
  ------------------
  |  |   52|  2.70M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 917k, False: 435k]
  |  |  |  Branch (52:41): [True: 435k, False: 0]
  |  |  ------------------
  |  |   53|  2.70M|    __FILE__, __LINE__)
  ------------------
  |  Branch (1549:9): [True: 0, False: 1.35M]
  ------------------
 1550|  1.35M|        || !ossl_assert(e == NULL || keymgmt == NULL)) {
  ------------------
  |  |   52|  1.35M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 1.35M, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  1.35M|    __FILE__, __LINE__)
  ------------------
  |  Branch (1550:12): [True: 0, False: 1.35M]
  ------------------
 1551|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1552|      0|        return 0;
 1553|      0|    }
 1554|       |
 1555|  1.35M|    if (pkey != NULL) {
  ------------------
  |  Branch (1555:9): [True: 630k, False: 721k]
  ------------------
 1556|   630k|        int free_it = 0;
 1557|       |
 1558|   630k|#ifndef FIPS_MODULE
 1559|   630k|        free_it = free_it || pkey->pkey.ptr != NULL;
  ------------------
  |  Branch (1559:19): [True: 0, False: 630k]
  |  Branch (1559:30): [True: 0, False: 630k]
  ------------------
 1560|   630k|#endif
 1561|   630k|        free_it = free_it || pkey->keydata != NULL;
  ------------------
  |  Branch (1561:19): [True: 0, False: 630k]
  |  Branch (1561:30): [True: 0, False: 630k]
  ------------------
 1562|   630k|        if (free_it)
  ------------------
  |  Branch (1562:13): [True: 0, False: 630k]
  ------------------
 1563|      0|            evp_pkey_free_it(pkey);
 1564|   630k|#ifndef FIPS_MODULE
 1565|       |        /*
 1566|       |         * If key type matches and a method exists then this lookup has
 1567|       |         * succeeded once so just indicate success.
 1568|       |         */
 1569|   630k|        if (pkey->type != EVP_PKEY_NONE
  ------------------
  |  |   62|   630k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|  1.26M|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1569:13): [True: 242k, False: 388k]
  ------------------
 1570|   242k|            && type == pkey->save_type
  ------------------
  |  Branch (1570:16): [True: 229k, False: 12.4k]
  ------------------
 1571|   229k|            && pkey->ameth != NULL)
  ------------------
  |  Branch (1571:16): [True: 229k, False: 0]
  ------------------
 1572|   229k|            return 1;
 1573|   400k|#ifndef OPENSSL_NO_ENGINE
 1574|       |        /* If we have ENGINEs release them */
 1575|   400k|        ENGINE_finish(pkey->engine);
 1576|   400k|        pkey->engine = NULL;
 1577|   400k|        ENGINE_finish(pkey->pmeth_engine);
 1578|   400k|        pkey->pmeth_engine = NULL;
 1579|   400k|#endif
 1580|   400k|#endif
 1581|   400k|    }
 1582|  1.12M|#ifndef FIPS_MODULE
 1583|  1.12M|    if (str != NULL)
  ------------------
  |  Branch (1583:9): [True: 914k, False: 207k]
  ------------------
 1584|   914k|        ameth = EVP_PKEY_asn1_find_str(eptr, str, len);
 1585|   207k|    else if (type != EVP_PKEY_NONE)
  ------------------
  |  |   62|   207k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   207k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1585:14): [True: 205k, False: 2.47k]
  ------------------
 1586|   205k|        ameth = EVP_PKEY_asn1_find(eptr, type);
 1587|  1.12M|#ifndef OPENSSL_NO_ENGINE
 1588|  1.12M|    if (pkey == NULL && eptr != NULL)
  ------------------
  |  Branch (1588:9): [True: 721k, False: 400k]
  |  Branch (1588:25): [True: 721k, False: 0]
  ------------------
 1589|   721k|        ENGINE_finish(e);
 1590|  1.12M|#endif
 1591|  1.12M|#endif
 1592|       |
 1593|  1.12M|    {
 1594|  1.12M|        int check = 1;
 1595|       |
 1596|  1.12M|#ifndef FIPS_MODULE
 1597|  1.12M|        check = check && ameth == NULL;
  ------------------
  |  Branch (1597:17): [True: 1.12M, False: 0]
  |  Branch (1597:26): [True: 530k, False: 591k]
  ------------------
 1598|  1.12M|#endif
 1599|  1.12M|        check = check && keymgmt == NULL;
  ------------------
  |  Branch (1599:17): [True: 530k, False: 591k]
  |  Branch (1599:26): [True: 528k, False: 2.47k]
  ------------------
 1600|  1.12M|        if (check) {
  ------------------
  |  Branch (1600:13): [True: 528k, False: 593k]
  ------------------
 1601|   528k|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|   528k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|   528k|    (ERR_new(),                                                  \
  |  |  |  |  407|   528k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|   528k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|   528k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1602|   528k|            return 0;
 1603|   528k|        }
 1604|  1.12M|    }
 1605|   593k|    if (pkey != NULL) {
  ------------------
  |  Branch (1605:9): [True: 400k, False: 193k]
  ------------------
 1606|   400k|        if (keymgmt != NULL && !EVP_KEYMGMT_up_ref(keymgmt)) {
  ------------------
  |  Branch (1606:13): [True: 195k, False: 205k]
  |  Branch (1606:32): [True: 0, False: 195k]
  ------------------
 1607|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1608|      0|            return 0;
 1609|      0|        }
 1610|       |
 1611|   400k|        pkey->keymgmt = keymgmt;
 1612|       |
 1613|   400k|        pkey->save_type = type;
 1614|   400k|        pkey->type = type;
 1615|       |
 1616|   400k|#ifndef FIPS_MODULE
 1617|       |        /*
 1618|       |         * If the internal "origin" key is provider side, don't save |ameth|.
 1619|       |         * The main reason is that |ameth| is one factor to detect that the
 1620|       |         * internal "origin" key is a legacy one.
 1621|       |         */
 1622|   400k|        if (keymgmt == NULL)
  ------------------
  |  Branch (1622:13): [True: 205k, False: 195k]
  ------------------
 1623|   205k|            pkey->ameth = ameth;
 1624|       |
 1625|       |        /*
 1626|       |         * The EVP_PKEY_ASN1_METHOD |pkey_id| retains its legacy key purpose
 1627|       |         * for any key type that has a legacy implementation, regardless of
 1628|       |         * if the internal key is a legacy or a provider side one.  When
 1629|       |         * there is no legacy implementation for the key, the type becomes
 1630|       |         * EVP_PKEY_KEYMGMT, which indicates that one should be cautious
 1631|       |         * with functions that expect legacy internal keys.
 1632|       |         */
 1633|   400k|        if (ameth != NULL) {
  ------------------
  |  Branch (1633:13): [True: 398k, False: 2.47k]
  ------------------
 1634|   398k|            if (type == EVP_PKEY_NONE)
  ------------------
  |  |   62|   398k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   398k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1634:17): [True: 193k, False: 205k]
  ------------------
 1635|   193k|                pkey->type = ameth->pkey_id;
 1636|   398k|        } else {
 1637|  2.47k|            pkey->type = EVP_PKEY_KEYMGMT;
  ------------------
  |  |  103|  2.47k|#define EVP_PKEY_KEYMGMT -1
  ------------------
 1638|  2.47k|        }
 1639|   400k|#ifndef OPENSSL_NO_ENGINE
 1640|   400k|        if (eptr == NULL && e != NULL && !ENGINE_init(e)) {
  ------------------
  |  Branch (1640:13): [True: 0, False: 400k]
  |  Branch (1640:29): [True: 0, False: 0]
  |  Branch (1640:42): [True: 0, False: 0]
  ------------------
 1641|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1642|      0|            return 0;
 1643|      0|        }
 1644|   400k|#endif
 1645|   400k|        pkey->engine = e;
 1646|   400k|#endif
 1647|   400k|    }
 1648|   593k|    return 1;
 1649|   593k|}
p_lib.c:find_ameth:
 1653|   721k|{
 1654|   721k|    const char **str = data;
 1655|       |
 1656|       |    /*
 1657|       |     * The error messages from pkey_set_type() are uninteresting here,
 1658|       |     * and misleading.
 1659|       |     */
 1660|   721k|    ERR_set_mark();
 1661|       |
 1662|   721k|    if (pkey_set_type(NULL, NULL, EVP_PKEY_NONE, name, (int)strlen(name),
  ------------------
  |  |   62|   721k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   721k|#define NID_undef                       0
  |  |  ------------------
  ------------------
  |  Branch (1662:9): [True: 193k, False: 528k]
  ------------------
 1663|   721k|            NULL)) {
 1664|   193k|        if (str[0] == NULL)
  ------------------
  |  Branch (1664:13): [True: 193k, False: 0]
  ------------------
 1665|   193k|            str[0] = name;
 1666|      0|        else if (str[1] == NULL)
  ------------------
  |  Branch (1666:18): [True: 0, False: 0]
  ------------------
 1667|      0|            str[1] = name;
 1668|   193k|    }
 1669|       |
 1670|   721k|    ERR_pop_to_mark();
 1671|   721k|}
p_lib.c:evp_pkey_free_it:
 1814|   388k|{
 1815|       |    /* internal function; x is never NULL */
 1816|   388k|    evp_keymgmt_util_clear_operation_cache(x);
 1817|   388k|#ifndef FIPS_MODULE
 1818|   388k|    evp_pkey_free_legacy(x);
 1819|   388k|#endif
 1820|       |
 1821|   388k|    if (x->keymgmt != NULL) {
  ------------------
  |  Branch (1821:9): [True: 195k, False: 192k]
  ------------------
 1822|   195k|        evp_keymgmt_freedata(x->keymgmt, x->keydata);
 1823|   195k|        EVP_KEYMGMT_free(x->keymgmt);
 1824|   195k|        x->keymgmt = NULL;
 1825|   195k|        x->keydata = NULL;
 1826|   195k|    }
 1827|   388k|    x->type = EVP_PKEY_NONE;
  ------------------
  |  |   62|   388k|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|   388k|#define NID_undef                       0
  |  |  ------------------
  ------------------
 1828|   388k|}

EVP_PKEY_keygen_init:
   98|  4.93k|{
   99|  4.93k|    return gen_init(ctx, EVP_PKEY_OP_KEYGEN);
  ------------------
  |  | 1763|  4.93k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  100|  4.93k|}
EVP_PKEY_generate:
  127|  4.93k|{
  128|  4.93k|    int ret = 0;
  129|  4.93k|    EVP_PKEY *allocated_pkey = NULL;
  130|       |    /* Legacy compatible keygen callback info, only used with provider impls */
  131|  4.93k|    int gentmp[2];
  132|       |
  133|  4.93k|    if (ppkey == NULL)
  ------------------
  |  Branch (133:9): [True: 0, False: 4.93k]
  ------------------
  134|      0|        return -1;
  135|       |
  136|  4.93k|    if (ctx == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 4.93k]
  ------------------
  137|      0|        goto not_supported;
  138|       |
  139|  4.93k|    if ((ctx->operation & EVP_PKEY_OP_TYPE_GEN) == 0)
  ------------------
  |  | 1799|  4.93k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1762|  4.93k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  ------------------
  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  ------------------
  |  |  |  | 1763|  4.93k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  ------------------
  ------------------
  |  Branch (139:9): [True: 0, False: 4.93k]
  ------------------
  140|      0|        goto not_initialized;
  141|       |
  142|  4.93k|    if (*ppkey == NULL)
  ------------------
  |  Branch (142:9): [True: 4.93k, False: 0]
  ------------------
  143|  4.93k|        *ppkey = allocated_pkey = EVP_PKEY_new();
  144|       |
  145|  4.93k|    if (*ppkey == NULL) {
  ------------------
  |  Branch (145:9): [True: 0, False: 4.93k]
  ------------------
  146|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  147|      0|        return -1;
  148|      0|    }
  149|       |
  150|  4.93k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (150:9): [True: 0, False: 4.93k]
  ------------------
  151|      0|        goto legacy;
  152|       |
  153|       |    /*
  154|       |     * Assigning gentmp to ctx->keygen_info is something our legacy
  155|       |     * implementations do.  Because the provider implementations aren't
  156|       |     * allowed to reach into our EVP_PKEY_CTX, we need to provide similar
  157|       |     * space for backward compatibility.  It's ok that we attach a local
  158|       |     * variable, as it should only be useful in the calls down from here.
  159|       |     * This is cleared as soon as it isn't useful any more, i.e. directly
  160|       |     * after the evp_keymgmt_util_gen() call.
  161|       |     */
  162|  4.93k|    ctx->keygen_info = gentmp;
  163|  4.93k|    ctx->keygen_info_count = 2;
  164|       |
  165|  4.93k|    ret = 1;
  166|  4.93k|    if (ctx->pkey != NULL) {
  ------------------
  |  Branch (166:9): [True: 0, False: 4.93k]
  ------------------
  167|      0|        EVP_KEYMGMT *tmp_keymgmt = ctx->keymgmt;
  168|      0|        void *keydata = evp_pkey_export_to_provider(ctx->pkey, ctx->libctx,
  169|      0|            &tmp_keymgmt, ctx->propquery);
  170|       |
  171|      0|        if (tmp_keymgmt == NULL)
  ------------------
  |  Branch (171:13): [True: 0, False: 0]
  ------------------
  172|      0|            goto not_supported;
  173|       |        /*
  174|       |         * It's ok if keydata is NULL here.  The backend is expected to deal
  175|       |         * with that as it sees fit.
  176|       |         */
  177|      0|        ret = evp_keymgmt_gen_set_template(ctx->keymgmt,
  178|      0|            ctx->op.keymgmt.genctx, keydata);
  179|      0|    }
  180|       |
  181|       |    /*
  182|       |     * the returned value from evp_keymgmt_util_gen() is cached in *ppkey,
  183|       |     * so we do not need to save it, just check it.
  184|       |     */
  185|  4.93k|    ret = ret
  ------------------
  |  Branch (185:11): [True: 4.93k, False: 0]
  ------------------
  186|  4.93k|        && (evp_keymgmt_util_gen(*ppkey, ctx->keymgmt, ctx->op.keymgmt.genctx,
  ------------------
  |  Branch (186:12): [True: 4.93k, False: 0]
  ------------------
  187|  4.93k|                ossl_callback_to_pkey_gencb, ctx)
  188|  4.93k|            != NULL);
  189|       |
  190|  4.93k|    ctx->keygen_info = NULL;
  191|       |
  192|  4.93k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_DEPRECATED_3_6)
  193|       |    /* In case |*ppkey| was originally a legacy key */
  194|  4.93k|    if (ret)
  ------------------
  |  Branch (194:9): [True: 4.93k, False: 0]
  ------------------
  195|  4.93k|        evp_pkey_free_legacy(*ppkey);
  196|  4.93k|#endif
  197|       |
  198|       |    /*
  199|       |     * Because we still have legacy keys
  200|       |     */
  201|  4.93k|    (*ppkey)->type = ctx->legacy_keytype;
  202|       |
  203|  4.93k|    goto end;
  204|       |
  205|      0|legacy:
  206|       |#ifdef FIPS_MODULE
  207|       |    goto not_supported;
  208|       |#else
  209|       |    /*
  210|       |     * If we get here then we're using legacy paramgen/keygen. In that case
  211|       |     * the pkey in ctx (if there is one) had better not be provided (because the
  212|       |     * legacy methods may not know how to handle it). However we can only get
  213|       |     * here if ctx->op.keymgmt.genctx == NULL, but that should never be the case
  214|       |     * if ctx->pkey is provided because we don't allow this when we initialise
  215|       |     * the ctx.
  216|       |     */
  217|      0|    if (ctx->pkey != NULL && !ossl_assert(!evp_pkey_is_provided(ctx->pkey)))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (217:9): [True: 0, False: 0]
  |  Branch (217:30): [True: 0, False: 0]
  ------------------
  218|      0|        goto not_accessible;
  219|       |
  220|      0|    switch (ctx->operation) {
  221|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (221:5): [True: 0, False: 0]
  ------------------
  222|      0|        ret = ctx->pmeth->paramgen(ctx, *ppkey);
  223|      0|        break;
  224|      0|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1763|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (224:5): [True: 0, False: 0]
  ------------------
  225|      0|        ret = ctx->pmeth->keygen(ctx, *ppkey);
  226|      0|        break;
  227|      0|    default:
  ------------------
  |  Branch (227:5): [True: 0, False: 0]
  ------------------
  228|      0|        goto not_supported;
  229|      0|    }
  230|      0|#endif
  231|       |
  232|  4.93k|end:
  233|  4.93k|    if (ret <= 0) {
  ------------------
  |  Branch (233:9): [True: 0, False: 4.93k]
  ------------------
  234|      0|        if (allocated_pkey != NULL)
  ------------------
  |  Branch (234:13): [True: 0, False: 0]
  ------------------
  235|      0|            *ppkey = NULL;
  236|      0|        EVP_PKEY_free(allocated_pkey);
  237|      0|    }
  238|  4.93k|    return ret;
  239|       |
  240|      0|not_supported:
  241|      0|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  242|      0|    ret = -2;
  243|      0|    goto end;
  244|      0|not_initialized:
  245|      0|    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  246|      0|    ret = -1;
  247|      0|    goto end;
  248|      0|#ifndef FIPS_MODULE
  249|      0|not_accessible:
  250|       |    ERR_raise(ERR_LIB_EVP, EVP_R_INACCESSIBLE_DOMAIN_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|      0|    ret = -1;
  252|      0|    goto end;
  253|      0|#endif
  254|      0|}
EVP_PKEY_keygen:
  266|  2.46k|{
  267|  2.46k|    if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
  ------------------
  |  | 1763|  2.46k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (267:9): [True: 0, False: 2.46k]
  ------------------
  268|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_INITIALIZED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  269|      0|        return -1;
  270|      0|    }
  271|  2.46k|    return EVP_PKEY_generate(ctx, ppkey);
  272|  2.46k|}
EVP_PKEY_export:
  437|  2.47k|{
  438|  2.47k|    if (pkey == NULL) {
  ------------------
  |  Branch (438:9): [True: 0, False: 2.47k]
  ------------------
  439|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  440|      0|        return 0;
  441|      0|    }
  442|  2.47k|#ifndef FIPS_MODULE
  443|  2.47k|    if (evp_pkey_is_legacy(pkey)) {
  ------------------
  |  |  650|  2.47k|    ((pk)->type != EVP_PKEY_NONE && (pk)->keymgmt == NULL)
  |  |  ------------------
  |  |  |  |   62|  2.47k|#define EVP_PKEY_NONE NID_undef
  |  |  |  |  ------------------
  |  |  |  |  |  |   18|  4.94k|#define NID_undef                       0
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (650:6): [True: 2.47k, False: 0]
  |  |  |  Branch (650:37): [True: 0, False: 2.47k]
  |  |  ------------------
  ------------------
  444|      0|        struct fake_import_data_st data;
  445|       |
  446|      0|        data.export_cb = export_cb;
  447|      0|        data.export_cbarg = export_cbarg;
  448|       |
  449|       |        /*
  450|       |         * We don't need to care about libctx or propq here, as we're only
  451|       |         * interested in the resulting OSSL_PARAM array.
  452|       |         */
  453|      0|        return pkey->ameth->export_to(pkey, &data, pkey_fake_import,
  454|      0|            NULL, NULL);
  455|      0|    }
  456|  2.47k|#endif
  457|  2.47k|    return evp_keymgmt_util_export(pkey, selection, export_cb, export_cbarg);
  458|  2.47k|}
pmeth_gn.c:gen_init:
   26|  4.93k|{
   27|  4.93k|    int ret = 0;
   28|       |
   29|  4.93k|    if (ctx == NULL)
  ------------------
  |  Branch (29:9): [True: 0, False: 4.93k]
  ------------------
   30|      0|        goto not_supported;
   31|       |
   32|  4.93k|    evp_pkey_ctx_free_old_ops(ctx);
   33|  4.93k|    ctx->operation = operation;
   34|       |
   35|  4.93k|    if (ctx->keymgmt == NULL || ctx->keymgmt->gen_init == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 4.93k]
  |  Branch (35:33): [True: 0, False: 4.93k]
  ------------------
   36|      0|        goto legacy;
   37|       |
   38|  4.93k|    switch (operation) {
  ------------------
  |  Branch (38:13): [True: 4.93k, False: 0]
  ------------------
   39|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (39:5): [True: 0, False: 4.93k]
  ------------------
   40|      0|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt,
   41|      0|            OSSL_KEYMGMT_SELECT_ALL_PARAMETERS, NULL);
  ------------------
  |  |  647|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  648|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  643|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
   42|      0|        break;
   43|  4.93k|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1763|  4.93k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (43:5): [True: 4.93k, False: 0]
  ------------------
   44|  4.93k|        ctx->op.keymgmt.genctx = evp_keymgmt_gen_init(ctx->keymgmt, OSSL_KEYMGMT_SELECT_KEYPAIR,
  ------------------
  |  |  650|  4.93k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  4.93k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  4.93k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
   45|  4.93k|            NULL);
   46|  4.93k|        break;
   47|  4.93k|    }
   48|       |
   49|  4.93k|    if (ctx->op.keymgmt.genctx == NULL)
  ------------------
  |  Branch (49:9): [True: 0, False: 4.93k]
  ------------------
   50|  4.93k|        ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   51|  4.93k|    else
   52|  4.93k|        ret = 1;
   53|  4.93k|    goto end;
   54|       |
   55|      0|legacy:
   56|       |#ifdef FIPS_MODULE
   57|       |    goto not_supported;
   58|       |#else
   59|      0|    if (ctx->pmeth == NULL
  ------------------
  |  Branch (59:9): [True: 0, False: 0]
  ------------------
   60|      0|        || (operation == EVP_PKEY_OP_PARAMGEN
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (60:13): [True: 0, False: 0]
  ------------------
   61|      0|            && ctx->pmeth->paramgen == NULL)
  ------------------
  |  Branch (61:16): [True: 0, False: 0]
  ------------------
   62|      0|        || (operation == EVP_PKEY_OP_KEYGEN
  ------------------
  |  | 1763|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (62:13): [True: 0, False: 0]
  ------------------
   63|      0|            && ctx->pmeth->keygen == NULL))
  ------------------
  |  Branch (63:16): [True: 0, False: 0]
  ------------------
   64|      0|        goto not_supported;
   65|       |
   66|      0|    ret = 1;
   67|      0|    switch (operation) {
  ------------------
  |  Branch (67:13): [True: 0, False: 0]
  ------------------
   68|      0|    case EVP_PKEY_OP_PARAMGEN:
  ------------------
  |  | 1762|      0|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  ------------------
  |  Branch (68:5): [True: 0, False: 0]
  ------------------
   69|      0|        if (ctx->pmeth->paramgen_init != NULL)
  ------------------
  |  Branch (69:13): [True: 0, False: 0]
  ------------------
   70|      0|            ret = ctx->pmeth->paramgen_init(ctx);
   71|      0|        break;
   72|      0|    case EVP_PKEY_OP_KEYGEN:
  ------------------
  |  | 1763|      0|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  ------------------
  |  Branch (72:5): [True: 0, False: 0]
  ------------------
   73|      0|        if (ctx->pmeth->keygen_init != NULL)
  ------------------
  |  Branch (73:13): [True: 0, False: 0]
  ------------------
   74|      0|            ret = ctx->pmeth->keygen_init(ctx);
   75|      0|        break;
   76|      0|    }
   77|      0|#endif
   78|       |
   79|  4.93k|end:
   80|  4.93k|    if (ret <= 0 && ctx != NULL) {
  ------------------
  |  Branch (80:9): [True: 0, False: 4.93k]
  |  Branch (80:21): [True: 0, False: 0]
  ------------------
   81|      0|        evp_pkey_ctx_free_old_ops(ctx);
   82|      0|        ctx->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1761|      0|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
   83|      0|    }
   84|  4.93k|    return ret;
   85|       |
   86|      0|not_supported:
   87|       |    ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   88|      0|    ret = -2;
   89|      0|    goto end;
   90|      0|}

evp_pkey_ctx_state:
  139|  4.93k|{
  140|  4.93k|    if (ctx->operation == EVP_PKEY_OP_UNDEFINED)
  ------------------
  |  | 1761|  4.93k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  |  Branch (140:9): [True: 0, False: 4.93k]
  ------------------
  141|      0|        return EVP_PKEY_STATE_UNKNOWN;
  ------------------
  |  |  950|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
  142|       |
  143|  4.93k|    if ((EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  747|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1790|  4.93k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1772|  4.93k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (747:5): [True: 0, False: 4.93k]
  |  |  ------------------
  ------------------
  144|      0|            && ctx->op.kex.algctx != NULL)
  ------------------
  |  Branch (144:16): [True: 0, False: 0]
  ------------------
  145|  4.93k|        || (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  744|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|  4.93k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|  4.93k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|  4.93k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|  4.93k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|  4.93k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|  4.93k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|  4.93k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|  4.93k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|  4.93k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|  4.93k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|  4.93k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 4.93k]
  |  |  ------------------
  ------------------
  146|      0|            && ctx->op.sig.algctx != NULL)
  ------------------
  |  Branch (146:16): [True: 0, False: 0]
  ------------------
  147|  4.93k|        || (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  750|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1787|  4.93k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1770|  4.93k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1771|  4.93k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (750:5): [True: 0, False: 4.93k]
  |  |  ------------------
  ------------------
  148|      0|            && ctx->op.ciph.algctx != NULL)
  ------------------
  |  Branch (148:16): [True: 0, False: 0]
  ------------------
  149|  4.93k|        || (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  753|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  4.93k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  4.93k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  4.93k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (753:5): [True: 4.93k, False: 0]
  |  |  ------------------
  ------------------
  150|  4.93k|            && ctx->op.keymgmt.genctx != NULL)
  ------------------
  |  Branch (150:16): [True: 4.93k, False: 0]
  ------------------
  151|      0|        || (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  759|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1796|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1773|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1774|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  152|      0|            && ctx->op.encap.algctx != NULL))
  ------------------
  |  Branch (152:16): [True: 0, False: 0]
  ------------------
  153|  4.93k|        return EVP_PKEY_STATE_PROVIDER;
  ------------------
  |  |  952|  4.93k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  154|       |
  155|      0|    return EVP_PKEY_STATE_LEGACY;
  ------------------
  |  |  951|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
  156|  4.93k|}
EVP_PKEY_CTX_new_from_name:
  348|  4.93k|{
  349|  4.93k|    return int_ctx_new(libctx, NULL, NULL, name, propquery, -1);
  350|  4.93k|}
EVP_PKEY_CTX_new_from_pkey:
  354|  53.7k|{
  355|  53.7k|    return int_ctx_new(libctx, pkey, NULL, NULL, propquery, -1);
  356|  53.7k|}
evp_pkey_ctx_free_old_ops:
  359|  63.5k|{
  360|  63.5k|    if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)) {
  ------------------
  |  |  744|  63.5k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|  63.5k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|  63.5k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|  63.5k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|  63.5k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|  63.5k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|  63.5k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|  63.5k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|  63.5k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|  63.5k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|  63.5k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|  63.5k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 63.5k]
  |  |  ------------------
  ------------------
  361|      0|        if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  |  Branch (361:43): [True: 0, False: 0]
  ------------------
  362|      0|            ctx->op.sig.signature->freectx(ctx->op.sig.algctx);
  363|      0|        EVP_SIGNATURE_free(ctx->op.sig.signature);
  364|      0|        ctx->op.sig.algctx = NULL;
  365|      0|        ctx->op.sig.signature = NULL;
  366|  63.5k|    } else if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)) {
  ------------------
  |  |  747|  63.5k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1790|  63.5k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1772|  63.5k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (747:5): [True: 0, False: 63.5k]
  |  |  ------------------
  ------------------
  367|      0|        if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  |  Branch (367:43): [True: 0, False: 0]
  ------------------
  368|      0|            ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
  369|      0|        EVP_KEYEXCH_free(ctx->op.kex.exchange);
  370|      0|        ctx->op.kex.algctx = NULL;
  371|      0|        ctx->op.kex.exchange = NULL;
  372|  63.5k|    } else if (EVP_PKEY_CTX_IS_KEM_OP(ctx)) {
  ------------------
  |  |  759|  63.5k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1796|  63.5k|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1773|  63.5k|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1774|  63.5k|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 0, False: 63.5k]
  |  |  ------------------
  ------------------
  373|      0|        if (ctx->op.encap.algctx != NULL && ctx->op.encap.kem != NULL)
  ------------------
  |  Branch (373:13): [True: 0, False: 0]
  |  Branch (373:45): [True: 0, False: 0]
  ------------------
  374|      0|            ctx->op.encap.kem->freectx(ctx->op.encap.algctx);
  375|      0|        EVP_KEM_free(ctx->op.encap.kem);
  376|      0|        ctx->op.encap.algctx = NULL;
  377|      0|        ctx->op.encap.kem = NULL;
  378|  63.5k|    } else if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)) {
  ------------------
  |  |  750|  63.5k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1787|  63.5k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1770|  63.5k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1771|  63.5k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (750:5): [True: 0, False: 63.5k]
  |  |  ------------------
  ------------------
  379|      0|        if (ctx->op.ciph.algctx != NULL && ctx->op.ciph.cipher != NULL)
  ------------------
  |  Branch (379:13): [True: 0, False: 0]
  |  Branch (379:44): [True: 0, False: 0]
  ------------------
  380|      0|            ctx->op.ciph.cipher->freectx(ctx->op.ciph.algctx);
  381|      0|        EVP_ASYM_CIPHER_free(ctx->op.ciph.cipher);
  382|      0|        ctx->op.ciph.algctx = NULL;
  383|      0|        ctx->op.ciph.cipher = NULL;
  384|  63.5k|    } else if (EVP_PKEY_CTX_IS_GEN_OP(ctx)) {
  ------------------
  |  |  753|  63.5k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  63.5k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  63.5k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  63.5k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (753:5): [True: 4.93k, False: 58.6k]
  |  |  ------------------
  ------------------
  385|  4.93k|        if (ctx->op.keymgmt.genctx != NULL && ctx->keymgmt != NULL)
  ------------------
  |  Branch (385:13): [True: 4.93k, False: 0]
  |  Branch (385:47): [True: 4.93k, False: 0]
  ------------------
  386|  4.93k|            evp_keymgmt_gen_cleanup(ctx->keymgmt, ctx->op.keymgmt.genctx);
  387|  4.93k|    }
  388|  63.5k|}
EVP_PKEY_CTX_free:
  391|   103k|{
  392|   103k|    if (ctx == NULL)
  ------------------
  |  Branch (392:9): [True: 44.6k, False: 58.6k]
  ------------------
  393|  44.6k|        return;
  394|  58.6k|    if (ctx->pmeth && ctx->pmeth->cleanup)
  ------------------
  |  Branch (394:9): [True: 0, False: 58.6k]
  |  Branch (394:23): [True: 0, False: 0]
  ------------------
  395|      0|        ctx->pmeth->cleanup(ctx);
  396|       |
  397|  58.6k|    evp_pkey_ctx_free_old_ops(ctx);
  398|  58.6k|#ifndef FIPS_MODULE
  399|  58.6k|    evp_pkey_ctx_free_all_cached_data(ctx);
  400|  58.6k|#endif
  401|  58.6k|    EVP_KEYMGMT_free(ctx->keymgmt);
  402|       |
  403|  58.6k|    OPENSSL_free(ctx->propquery);
  ------------------
  |  |  131|  58.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  404|  58.6k|    EVP_PKEY_free(ctx->pkey);
  405|  58.6k|    EVP_PKEY_free(ctx->peerkey);
  406|  58.6k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  407|  58.6k|    ENGINE_finish(ctx->engine);
  408|  58.6k|#endif
  409|  58.6k|    BN_free(ctx->rsa_pubexp);
  410|  58.6k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  58.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  411|  58.6k|}
evp_app_cleanup_int:
  632|      1|{
  633|      1|    if (app_pkey_methods != NULL)
  ------------------
  |  Branch (633:9): [True: 0, False: 1]
  ------------------
  634|      0|        sk_EVP_PKEY_METHOD_pop_free(app_pkey_methods, EVP_PKEY_meth_free);
  635|      1|}
EVP_PKEY_CTX_set_params:
  678|  4.93k|{
  679|  4.93k|    switch (evp_pkey_ctx_state(ctx)) {
  ------------------
  |  Branch (679:13): [True: 4.93k, False: 0]
  ------------------
  680|  4.93k|    case EVP_PKEY_STATE_PROVIDER:
  ------------------
  |  |  952|  4.93k|#define EVP_PKEY_STATE_PROVIDER 2
  ------------------
  |  Branch (680:5): [True: 4.93k, False: 0]
  ------------------
  681|  4.93k|        if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
  ------------------
  |  |  747|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_DERIVE) != 0)
  |  |  ------------------
  |  |  |  | 1790|  4.93k|    (EVP_PKEY_OP_DERIVE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1772|  4.93k|#define EVP_PKEY_OP_DERIVE (1 << 11)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (747:5): [True: 0, False: 4.93k]
  |  |  ------------------
  ------------------
  682|      0|            && ctx->op.kex.exchange != NULL
  ------------------
  |  Branch (682:16): [True: 0, False: 0]
  ------------------
  683|      0|            && ctx->op.kex.exchange->set_ctx_params != NULL)
  ------------------
  |  Branch (683:16): [True: 0, False: 0]
  ------------------
  684|      0|            return ctx->op.kex.exchange->set_ctx_params(ctx->op.kex.algctx,
  685|      0|                params);
  686|  4.93k|        if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
  ------------------
  |  |  744|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_SIG) != 0)
  |  |  ------------------
  |  |  |  | 1781|  4.93k|    (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1765|  4.93k|#define EVP_PKEY_OP_SIGN (1 << 4)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_SIGNMSG          \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1775|  4.93k|#define EVP_PKEY_OP_SIGNMSG (1 << 14)
  |  |  |  |  ------------------
  |  |  |  | 1782|  4.93k|        | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1766|  4.93k|#define EVP_PKEY_OP_VERIFY (1 << 5)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYMSG \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1776|  4.93k|#define EVP_PKEY_OP_VERIFYMSG (1 << 15)
  |  |  |  |  ------------------
  |  |  |  | 1783|  4.93k|        | EVP_PKEY_OP_VERIFYRECOVER                  \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1767|  4.93k|#define EVP_PKEY_OP_VERIFYRECOVER (1 << 6)
  |  |  |  |  ------------------
  |  |  |  | 1784|  4.93k|        | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1768|  4.93k|#define EVP_PKEY_OP_SIGNCTX (1 << 7)
  |  |  |  |  ------------------
  |  |  |  |                       | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1769|  4.93k|#define EVP_PKEY_OP_VERIFYCTX (1 << 8)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (744:5): [True: 0, False: 4.93k]
  |  |  ------------------
  ------------------
  687|      0|            && ctx->op.sig.signature != NULL
  ------------------
  |  Branch (687:16): [True: 0, False: 0]
  ------------------
  688|      0|            && ctx->op.sig.signature->set_ctx_params != NULL)
  ------------------
  |  Branch (688:16): [True: 0, False: 0]
  ------------------
  689|      0|            return ctx->op.sig.signature->set_ctx_params(ctx->op.sig.algctx,
  690|      0|                params);
  691|  4.93k|        if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
  ------------------
  |  |  750|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_CRYPT) != 0)
  |  |  ------------------
  |  |  |  | 1787|  4.93k|    (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1770|  4.93k|#define EVP_PKEY_OP_ENCRYPT (1 << 9)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1771|  4.93k|#define EVP_PKEY_OP_DECRYPT (1 << 10)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (750:5): [True: 0, False: 4.93k]
  |  |  ------------------
  ------------------
  692|      0|            && ctx->op.ciph.cipher != NULL
  ------------------
  |  Branch (692:16): [True: 0, False: 0]
  ------------------
  693|      0|            && ctx->op.ciph.cipher->set_ctx_params != NULL)
  ------------------
  |  Branch (693:16): [True: 0, False: 0]
  ------------------
  694|      0|            return ctx->op.ciph.cipher->set_ctx_params(ctx->op.ciph.algctx,
  695|      0|                params);
  696|  4.93k|        if (EVP_PKEY_CTX_IS_GEN_OP(ctx)
  ------------------
  |  |  753|  9.86k|    (((ctx)->operation & EVP_PKEY_OP_TYPE_GEN) != 0)
  |  |  ------------------
  |  |  |  | 1799|  4.93k|    (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1762|  4.93k|#define EVP_PKEY_OP_PARAMGEN (1 << 1)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1763|  4.93k|#define EVP_PKEY_OP_KEYGEN (1 << 2)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (753:5): [True: 4.93k, False: 0]
  |  |  ------------------
  ------------------
  697|  4.93k|            && ctx->keymgmt != NULL
  ------------------
  |  Branch (697:16): [True: 4.93k, False: 0]
  ------------------
  698|  4.93k|            && ctx->keymgmt->gen_set_params != NULL)
  ------------------
  |  Branch (698:16): [True: 4.93k, False: 0]
  ------------------
  699|  4.93k|            return evp_keymgmt_gen_set_params(ctx->keymgmt, ctx->op.keymgmt.genctx,
  700|  4.93k|                params);
  701|      0|        if (EVP_PKEY_CTX_IS_KEM_OP(ctx)
  ------------------
  |  |  759|      0|    (((ctx)->operation & EVP_PKEY_OP_TYPE_KEM) != 0)
  |  |  ------------------
  |  |  |  | 1796|      0|    (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1773|      0|#define EVP_PKEY_OP_ENCAPSULATE (1 << 12)
  |  |  |  |  ------------------
  |  |  |  |                   (EVP_PKEY_OP_ENCAPSULATE | EVP_PKEY_OP_DECAPSULATE)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1774|      0|#define EVP_PKEY_OP_DECAPSULATE (1 << 13)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (759:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  702|      0|            && ctx->op.encap.kem != NULL
  ------------------
  |  Branch (702:16): [True: 0, False: 0]
  ------------------
  703|      0|            && ctx->op.encap.kem->set_ctx_params != NULL)
  ------------------
  |  Branch (703:16): [True: 0, False: 0]
  ------------------
  704|      0|            return ctx->op.encap.kem->set_ctx_params(ctx->op.encap.algctx,
  705|      0|                params);
  706|      0|        break;
  707|      0|    case EVP_PKEY_STATE_UNKNOWN:
  ------------------
  |  |  950|      0|#define EVP_PKEY_STATE_UNKNOWN 0
  ------------------
  |  Branch (707:5): [True: 0, False: 4.93k]
  ------------------
  708|      0|        break;
  709|      0|#ifndef FIPS_MODULE
  710|      0|    case EVP_PKEY_STATE_LEGACY:
  ------------------
  |  |  951|      0|#define EVP_PKEY_STATE_LEGACY 1
  ------------------
  |  Branch (710:5): [True: 0, False: 4.93k]
  ------------------
  711|      0|        return evp_pkey_ctx_set_params_to_ctrl(ctx, params);
  712|  4.93k|#endif
  713|  4.93k|    }
  714|      0|    return 0;
  715|  4.93k|}
pmeth_lib.c:evp_pkey_meth_find_added_by_application:
   93|  56.2k|{
   94|  56.2k|    if (app_pkey_methods != NULL) {
  ------------------
  |  Branch (94:9): [True: 0, False: 56.2k]
  ------------------
   95|      0|        int idx;
   96|      0|        EVP_PKEY_METHOD tmp;
   97|       |
   98|      0|        tmp.pkey_id = type;
   99|      0|        idx = sk_EVP_PKEY_METHOD_find(app_pkey_methods, &tmp);
  100|      0|        if (idx >= 0)
  ------------------
  |  Branch (100:13): [True: 0, False: 0]
  ------------------
  101|      0|            return sk_EVP_PKEY_METHOD_value(app_pkey_methods, idx);
  102|      0|    }
  103|  56.2k|    return NULL;
  104|  56.2k|}
pmeth_lib.c:int_ctx_new:
  163|  58.6k|{
  164|  58.6k|    EVP_PKEY_CTX *ret = NULL;
  165|  58.6k|    const EVP_PKEY_METHOD *pmeth = NULL, *app_pmeth = NULL;
  166|  58.6k|    EVP_KEYMGMT *keymgmt = NULL;
  167|       |
  168|       |    /* Code below to be removed when legacy support is dropped. */
  169|       |    /* BEGIN legacy */
  170|  58.6k|    if (id == -1) {
  ------------------
  |  Branch (170:9): [True: 58.6k, False: 0]
  ------------------
  171|  58.6k|        if (pkey != NULL && !evp_pkey_is_provided(pkey)) {
  ------------------
  |  |  652|  53.7k|    ((pk)->keymgmt != NULL)
  ------------------
  |  Branch (171:13): [True: 53.7k, False: 4.93k]
  |  Branch (171:29): [True: 53.7k, False: 0]
  ------------------
  172|  53.7k|            id = pkey->type;
  173|  53.7k|        } else {
  174|  4.93k|            if (pkey != NULL) {
  ------------------
  |  Branch (174:17): [True: 0, False: 4.93k]
  ------------------
  175|       |                /* Must be provided if we get here */
  176|      0|                keytype = EVP_KEYMGMT_get0_name(pkey->keymgmt);
  177|      0|            }
  178|  4.93k|#ifndef FIPS_MODULE
  179|  4.93k|            if (keytype != NULL) {
  ------------------
  |  Branch (179:17): [True: 4.93k, False: 0]
  ------------------
  180|  4.93k|                id = evp_pkey_name2type(keytype);
  181|  4.93k|                if (id == NID_undef)
  ------------------
  |  |   18|  4.93k|#define NID_undef                       0
  ------------------
  |  Branch (181:21): [True: 2.47k, False: 2.46k]
  ------------------
  182|  2.47k|                    id = -1;
  183|  4.93k|            }
  184|  4.93k|#endif
  185|  4.93k|        }
  186|  58.6k|    }
  187|       |    /* If no ID was found here, we can only resort to find a keymgmt */
  188|  58.6k|    if (id == -1) {
  ------------------
  |  Branch (188:9): [True: 2.47k, False: 56.2k]
  ------------------
  189|  2.47k|#ifndef FIPS_MODULE
  190|       |        /* Using engine with a key without id will not work */
  191|  2.47k|        if (e != NULL) {
  ------------------
  |  Branch (191:13): [True: 0, False: 2.47k]
  ------------------
  192|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  193|      0|            return NULL;
  194|      0|        }
  195|  2.47k|#endif
  196|  2.47k|        goto common;
  197|  2.47k|    }
  198|       |
  199|  56.2k|#ifndef FIPS_MODULE
  200|       |    /*
  201|       |     * Here, we extract what information we can for the purpose of
  202|       |     * supporting usage with implementations from providers, to make
  203|       |     * for a smooth transition from legacy stuff to provider based stuff.
  204|       |     *
  205|       |     * If an engine is given, this is entirely legacy, and we should not
  206|       |     * pretend anything else, so we clear the name.
  207|       |     */
  208|  56.2k|    if (e != NULL)
  ------------------
  |  Branch (208:9): [True: 0, False: 56.2k]
  ------------------
  209|      0|        keytype = NULL;
  210|  56.2k|    if (e == NULL && (pkey == NULL || pkey->foreign == 0))
  ------------------
  |  Branch (210:9): [True: 56.2k, False: 0]
  |  Branch (210:23): [True: 2.46k, False: 53.7k]
  |  Branch (210:39): [True: 53.7k, False: 0]
  ------------------
  211|  56.2k|        keytype = OBJ_nid2sn(id);
  212|       |
  213|  56.2k|#ifndef OPENSSL_NO_ENGINE
  214|  56.2k|    if (e == NULL && pkey != NULL)
  ------------------
  |  Branch (214:9): [True: 56.2k, False: 0]
  |  Branch (214:22): [True: 53.7k, False: 2.46k]
  ------------------
  215|  53.7k|        e = pkey->pmeth_engine != NULL ? pkey->pmeth_engine : pkey->engine;
  ------------------
  |  Branch (215:13): [True: 0, False: 53.7k]
  ------------------
  216|       |    /* Try to find an ENGINE which implements this method */
  217|  56.2k|    if (e != NULL) {
  ------------------
  |  Branch (217:9): [True: 0, False: 56.2k]
  ------------------
  218|      0|        if (!ENGINE_init(e)) {
  ------------------
  |  Branch (218:13): [True: 0, False: 0]
  ------------------
  219|      0|            ERR_raise(ERR_LIB_EVP, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  220|      0|            return NULL;
  221|      0|        }
  222|  56.2k|    } else {
  223|  56.2k|        e = ENGINE_get_pkey_meth_engine(id);
  224|  56.2k|    }
  225|       |
  226|       |    /*
  227|       |     * If an ENGINE handled this method look it up. Otherwise use internal
  228|       |     * tables.
  229|       |     */
  230|  56.2k|    if (e != NULL)
  ------------------
  |  Branch (230:9): [True: 0, False: 56.2k]
  ------------------
  231|      0|        pmeth = ENGINE_get_pkey_meth(e, id);
  232|  56.2k|    else
  233|  56.2k|#endif /* OPENSSL_NO_ENGINE */
  234|  56.2k|        if (pkey != NULL && pkey->foreign)
  ------------------
  |  Branch (234:13): [True: 53.7k, False: 2.46k]
  |  Branch (234:29): [True: 0, False: 53.7k]
  ------------------
  235|      0|            pmeth = EVP_PKEY_meth_find(id);
  236|  56.2k|        else
  237|  56.2k|            app_pmeth = pmeth = evp_pkey_meth_find_added_by_application(id);
  238|       |
  239|       |        /* END legacy */
  240|  56.2k|#endif /* FIPS_MODULE */
  241|  58.6k|common:
  242|       |    /*
  243|       |     * If there's no engine and no app supplied pmeth and there's a name, we try
  244|       |     * fetching a provider implementation.
  245|       |     */
  246|  58.6k|    if (e == NULL && app_pmeth == NULL && keytype != NULL) {
  ------------------
  |  Branch (246:9): [True: 58.6k, False: 0]
  |  Branch (246:22): [True: 58.6k, False: 0]
  |  Branch (246:43): [True: 58.6k, False: 0]
  ------------------
  247|       |        /*
  248|       |         * If |pkey| is given and is provided, we take a reference to its
  249|       |         * keymgmt.  Otherwise, we fetch one for the keytype we got. This
  250|       |         * is to ensure that operation init functions can access what they
  251|       |         * need through this single pointer.
  252|       |         */
  253|  58.6k|        if (pkey != NULL && pkey->keymgmt != NULL) {
  ------------------
  |  Branch (253:13): [True: 53.7k, False: 4.93k]
  |  Branch (253:29): [True: 0, False: 53.7k]
  ------------------
  254|      0|            if (!EVP_KEYMGMT_up_ref(pkey->keymgmt))
  ------------------
  |  Branch (254:17): [True: 0, False: 0]
  ------------------
  255|      0|                ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  256|      0|            else
  257|      0|                keymgmt = pkey->keymgmt;
  258|  58.6k|        } else {
  259|  58.6k|            keymgmt = EVP_KEYMGMT_fetch(libctx, keytype, propquery);
  260|  58.6k|        }
  261|  58.6k|        if (keymgmt == NULL)
  ------------------
  |  Branch (261:13): [True: 56, False: 58.6k]
  ------------------
  262|     56|            return NULL; /* EVP_KEYMGMT_fetch() recorded an error */
  263|       |
  264|  58.6k|#ifndef FIPS_MODULE
  265|       |        /*
  266|       |         * Chase down the legacy NID, as that might be needed for diverse
  267|       |         * purposes, such as ensure that EVP_PKEY_type() can return sensible
  268|       |         * values. We go through all keymgmt names, because the keytype
  269|       |         * that's passed to this function doesn't necessarily translate
  270|       |         * directly.
  271|       |         */
  272|  58.6k|        if (keymgmt != NULL) {
  ------------------
  |  Branch (272:13): [True: 58.6k, False: 0]
  ------------------
  273|  58.6k|            int tmp_id = evp_keymgmt_get_legacy_alg(keymgmt);
  274|       |
  275|  58.6k|            if (tmp_id != NID_undef) {
  ------------------
  |  |   18|  58.6k|#define NID_undef                       0
  ------------------
  |  Branch (275:17): [True: 56.1k, False: 2.47k]
  ------------------
  276|  56.1k|                if (id == -1) {
  ------------------
  |  Branch (276:21): [True: 0, False: 56.1k]
  ------------------
  277|      0|                    id = tmp_id;
  278|  56.1k|                } else {
  279|       |                    /*
  280|       |                     * It really really shouldn't differ.  If it still does,
  281|       |                     * something is very wrong.
  282|       |                     */
  283|  56.1k|                    if (!ossl_assert(id == tmp_id)) {
  ------------------
  |  |   52|  56.1k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  56.1k|    __FILE__, __LINE__)
  ------------------
  |  Branch (283:25): [True: 0, False: 56.1k]
  ------------------
  284|      0|                        ERR_raise(ERR_LIB_EVP, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|                        EVP_KEYMGMT_free(keymgmt);
  286|      0|                        return NULL;
  287|      0|                    }
  288|  56.1k|                }
  289|  56.1k|            }
  290|  58.6k|        }
  291|  58.6k|#endif
  292|  58.6k|    }
  293|       |
  294|  58.6k|    if (pmeth == NULL && keymgmt == NULL) {
  ------------------
  |  Branch (294:9): [True: 58.6k, False: 0]
  |  Branch (294:26): [True: 0, False: 58.6k]
  ------------------
  295|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  296|  58.6k|    } else {
  297|  58.6k|        ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  58.6k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  298|  58.6k|    }
  299|       |
  300|  58.6k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  301|  58.6k|    if ((ret == NULL || pmeth == NULL) && e != NULL)
  ------------------
  |  Branch (301:10): [True: 0, False: 58.6k]
  |  Branch (301:25): [True: 58.6k, False: 0]
  |  Branch (301:43): [True: 0, False: 58.6k]
  ------------------
  302|      0|        ENGINE_finish(e);
  303|  58.6k|#endif
  304|       |
  305|  58.6k|    if (ret == NULL) {
  ------------------
  |  Branch (305:9): [True: 0, False: 58.6k]
  ------------------
  306|      0|        EVP_KEYMGMT_free(keymgmt);
  307|      0|        return NULL;
  308|      0|    }
  309|  58.6k|    if (propquery != NULL) {
  ------------------
  |  Branch (309:9): [True: 13.6k, False: 44.9k]
  ------------------
  310|  13.6k|        ret->propquery = OPENSSL_strdup(propquery);
  ------------------
  |  |  135|  13.6k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  311|  13.6k|        if (ret->propquery == NULL) {
  ------------------
  |  Branch (311:13): [True: 0, False: 13.6k]
  ------------------
  312|      0|            OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  313|      0|            EVP_KEYMGMT_free(keymgmt);
  314|      0|            return NULL;
  315|      0|        }
  316|  13.6k|    }
  317|  58.6k|    ret->libctx = libctx;
  318|  58.6k|    ret->keytype = keytype;
  319|  58.6k|    ret->keymgmt = keymgmt;
  320|  58.6k|    ret->legacy_keytype = id;
  321|  58.6k|    ret->engine = e;
  322|  58.6k|    ret->pmeth = pmeth;
  323|  58.6k|    ret->operation = EVP_PKEY_OP_UNDEFINED;
  ------------------
  |  | 1761|  58.6k|#define EVP_PKEY_OP_UNDEFINED 0
  ------------------
  324|       |
  325|  58.6k|    if (pkey != NULL && !EVP_PKEY_up_ref(pkey)) {
  ------------------
  |  Branch (325:9): [True: 53.6k, False: 4.93k]
  |  Branch (325:25): [True: 0, False: 53.6k]
  ------------------
  326|      0|        EVP_PKEY_CTX_free(ret);
  327|      0|        return NULL;
  328|      0|    }
  329|       |
  330|  58.6k|    ret->pkey = pkey;
  331|       |
  332|  58.6k|    if (pmeth != NULL && pmeth->init != NULL) {
  ------------------
  |  Branch (332:9): [True: 0, False: 58.6k]
  |  Branch (332:26): [True: 0, False: 0]
  ------------------
  333|      0|        if (pmeth->init(ret) <= 0) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|      0|            ret->pmeth = NULL;
  335|      0|            EVP_PKEY_CTX_free(ret);
  336|      0|            return NULL;
  337|      0|        }
  338|      0|    }
  339|       |
  340|  58.6k|    return ret;
  341|  58.6k|}
pmeth_lib.c:decode_cmd:
 1431|  58.6k|{
 1432|  58.6k|    if (cmd == -1) {
  ------------------
  |  Branch (1432:9): [True: 0, False: 58.6k]
  ------------------
 1433|       |        /*
 1434|       |         * The consequence of the assertion not being true is that this
 1435|       |         * function will return -1, which will cause the calling functions
 1436|       |         * to signal that the command is unsupported...  in non-debug mode.
 1437|       |         */
 1438|      0|        if (ossl_assert(name != NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
 1439|      0|            if (strcmp(name, "distid") == 0 || strcmp(name, "hexdistid") == 0)
  ------------------
  |  Branch (1439:17): [True: 0, False: 0]
  |  Branch (1439:48): [True: 0, False: 0]
  ------------------
 1440|      0|                cmd = EVP_PKEY_CTRL_SET1_ID;
  ------------------
  |  | 1824|      0|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1441|      0|    }
 1442|       |
 1443|  58.6k|    return cmd;
 1444|  58.6k|}
pmeth_lib.c:evp_pkey_ctx_free_cached_data:
 1517|  58.6k|{
 1518|  58.6k|    cmd = decode_cmd(cmd, name);
 1519|  58.6k|    switch (cmd) {
  ------------------
  |  Branch (1519:13): [True: 58.6k, False: 0]
  ------------------
 1520|  58.6k|    case EVP_PKEY_CTRL_SET1_ID:
  ------------------
  |  | 1824|  58.6k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
  |  Branch (1520:5): [True: 58.6k, False: 0]
  ------------------
 1521|  58.6k|        OPENSSL_free(ctx->cached_parameters.dist_id);
  ------------------
  |  |  131|  58.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1522|  58.6k|        OPENSSL_free(ctx->cached_parameters.dist_id_name);
  ------------------
  |  |  131|  58.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1523|  58.6k|        ctx->cached_parameters.dist_id = NULL;
 1524|       |        ctx->cached_parameters.dist_id_name = NULL;
 1525|  58.6k|        break;
 1526|  58.6k|    }
 1527|  58.6k|}
pmeth_lib.c:evp_pkey_ctx_free_all_cached_data:
 1530|  58.6k|{
 1531|  58.6k|    evp_pkey_ctx_free_cached_data(ctx, EVP_PKEY_CTRL_SET1_ID, NULL);
  ------------------
  |  | 1824|  58.6k|#define EVP_PKEY_CTRL_SET1_ID 15
  ------------------
 1532|  58.6k|}

EVP_SIGNATURE_free:
  456|  67.4k|{
  457|  67.4k|    int i;
  458|       |
  459|  67.4k|    if (signature == NULL)
  ------------------
  |  Branch (459:9): [True: 0, False: 67.4k]
  ------------------
  460|      0|        return;
  461|  67.4k|    CRYPTO_DOWN_REF(&signature->refcnt, &i);
  462|  67.4k|    if (i > 0)
  ------------------
  |  Branch (462:9): [True: 36.2k, False: 31.1k]
  ------------------
  463|  36.2k|        return;
  464|  31.1k|    OPENSSL_free(signature->type_name);
  ------------------
  |  |  131|  31.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  31.1k|    ossl_provider_free(signature->prov);
  466|  31.1k|    CRYPTO_FREE_REF(&signature->refcnt);
  467|  31.1k|    OPENSSL_free(signature);
  ------------------
  |  |  131|  31.1k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  468|  31.1k|}
EVP_SIGNATURE_up_ref:
  471|  36.2k|{
  472|  36.2k|    int ref = 0;
  473|       |
  474|  36.2k|    CRYPTO_UP_REF(&signature->refcnt, &ref);
  475|  36.2k|    return 1;
  476|  36.2k|}
EVP_SIGNATURE_fetch:
  485|  4.18k|{
  486|  4.18k|    return evp_generic_fetch(ctx, OSSL_OP_SIGNATURE, algorithm, properties,
  ------------------
  |  |  290|  4.18k|#define OSSL_OP_SIGNATURE 12
  ------------------
  487|  4.18k|        evp_signature_from_algorithm,
  488|  4.18k|        evp_signature_up_ref,
  489|  4.18k|        evp_signature_free);
  490|  4.18k|}
signature.c:evp_signature_from_algorithm:
   55|  31.1k|{
   56|  31.1k|    const OSSL_DISPATCH *fns = algodef->implementation;
   57|  31.1k|    EVP_SIGNATURE *signature = NULL;
   58|  31.1k|    const char *desc;
   59|       |    /* Counts newctx / freectx */
   60|  31.1k|    int ctxfncnt = 0;
   61|       |    /* Counts all init functions  */
   62|  31.1k|    int initfncnt = 0;
   63|       |    /* Counts all parameter functions */
   64|  31.1k|    int gparamfncnt = 0, sparamfncnt = 0, gmdparamfncnt = 0, smdparamfncnt = 0;
   65|  31.1k|    int valid = 0;
   66|       |
   67|  31.1k|    if ((signature = evp_signature_new(prov)) == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 31.1k]
  ------------------
   68|      0|        ERR_raise(ERR_LIB_EVP, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|      0|        goto err;
   70|      0|    }
   71|       |
   72|  31.1k|    signature->name_id = name_id;
   73|  31.1k|    if ((signature->type_name = ossl_algorithm_get1_first_name(algodef)) == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 31.1k]
  ------------------
   74|      0|        goto err;
   75|  31.1k|    signature->description = algodef->algorithm_description;
   76|  31.1k|    desc = signature->description != NULL ? signature->description : "";
  ------------------
  |  Branch (76:12): [True: 6.33k, False: 24.8k]
  ------------------
   77|       |
   78|   570k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (78:12): [True: 539k, False: 31.1k]
  ------------------
   79|   539k|        switch (fns->function_id) {
  ------------------
  |  Branch (79:17): [True: 539k, False: 0]
  ------------------
   80|  31.1k|        case OSSL_FUNC_SIGNATURE_NEWCTX:
  ------------------
  |  |  789|  31.1k|#define OSSL_FUNC_SIGNATURE_NEWCTX 1
  ------------------
  |  Branch (80:9): [True: 31.1k, False: 507k]
  ------------------
   81|  31.1k|            if (signature->newctx != NULL)
  ------------------
  |  Branch (81:17): [True: 0, False: 31.1k]
  ------------------
   82|      0|                break;
   83|  31.1k|            signature->newctx = OSSL_FUNC_signature_newctx(fns);
   84|  31.1k|            ctxfncnt++;
   85|  31.1k|            break;
   86|  22.1k|        case OSSL_FUNC_SIGNATURE_SIGN_INIT:
  ------------------
  |  |  790|  22.1k|#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
  ------------------
  |  Branch (86:9): [True: 22.1k, False: 516k]
  ------------------
   87|  22.1k|            if (signature->sign_init != NULL)
  ------------------
  |  Branch (87:17): [True: 1.05k, False: 21.1k]
  ------------------
   88|  1.05k|                break;
   89|  21.1k|            signature->sign_init = OSSL_FUNC_signature_sign_init(fns);
   90|  21.1k|            initfncnt++;
   91|  21.1k|            break;
   92|  29.0k|        case OSSL_FUNC_SIGNATURE_SIGN:
  ------------------
  |  |  791|  29.0k|#define OSSL_FUNC_SIGNATURE_SIGN 3
  ------------------
  |  Branch (92:9): [True: 29.0k, False: 510k]
  ------------------
   93|  29.0k|            if (signature->sign != NULL)
  ------------------
  |  Branch (93:17): [True: 0, False: 29.0k]
  ------------------
   94|      0|                break;
   95|  29.0k|            signature->sign = OSSL_FUNC_signature_sign(fns);
   96|  29.0k|            break;
   97|  26.9k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT:
  ------------------
  |  |  815|  26.9k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
  ------------------
  |  Branch (97:9): [True: 26.9k, False: 512k]
  ------------------
   98|  26.9k|            if (signature->sign_message_init != NULL)
  ------------------
  |  Branch (98:17): [True: 0, False: 26.9k]
  ------------------
   99|      0|                break;
  100|  26.9k|            signature->sign_message_init
  101|  26.9k|                = OSSL_FUNC_signature_sign_message_init(fns);
  102|  26.9k|            initfncnt++;
  103|  26.9k|            break;
  104|  17.9k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE:
  ------------------
  |  |  816|  17.9k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
  ------------------
  |  Branch (104:9): [True: 17.9k, False: 521k]
  ------------------
  105|  17.9k|            if (signature->sign_message_update != NULL)
  ------------------
  |  Branch (105:17): [True: 0, False: 17.9k]
  ------------------
  106|      0|                break;
  107|  17.9k|            signature->sign_message_update
  108|  17.9k|                = OSSL_FUNC_signature_sign_message_update(fns);
  109|  17.9k|            break;
  110|  17.9k|        case OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL:
  ------------------
  |  |  817|  17.9k|#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
  ------------------
  |  Branch (110:9): [True: 17.9k, False: 521k]
  ------------------
  111|  17.9k|            if (signature->sign_message_final != NULL)
  ------------------
  |  Branch (111:17): [True: 0, False: 17.9k]
  ------------------
  112|      0|                break;
  113|  17.9k|            signature->sign_message_final
  114|  17.9k|                = OSSL_FUNC_signature_sign_message_final(fns);
  115|  17.9k|            break;
  116|  22.1k|        case OSSL_FUNC_SIGNATURE_VERIFY_INIT:
  ------------------
  |  |  792|  22.1k|#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
  ------------------
  |  Branch (116:9): [True: 22.1k, False: 516k]
  ------------------
  117|  22.1k|            if (signature->verify_init != NULL)
  ------------------
  |  Branch (117:17): [True: 1.05k, False: 21.1k]
  ------------------
  118|  1.05k|                break;
  119|  21.1k|            signature->verify_init = OSSL_FUNC_signature_verify_init(fns);
  120|  21.1k|            initfncnt++;
  121|  21.1k|            break;
  122|  29.0k|        case OSSL_FUNC_SIGNATURE_VERIFY:
  ------------------
  |  |  793|  29.0k|#define OSSL_FUNC_SIGNATURE_VERIFY 5
  ------------------
  |  Branch (122:9): [True: 29.0k, False: 510k]
  ------------------
  123|  29.0k|            if (signature->verify != NULL)
  ------------------
  |  Branch (123:17): [True: 0, False: 29.0k]
  ------------------
  124|      0|                break;
  125|  29.0k|            signature->verify = OSSL_FUNC_signature_verify(fns);
  126|  29.0k|            break;
  127|  26.9k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT:
  ------------------
  |  |  818|  26.9k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
  ------------------
  |  Branch (127:9): [True: 26.9k, False: 512k]
  ------------------
  128|  26.9k|            if (signature->verify_message_init != NULL)
  ------------------
  |  Branch (128:17): [True: 0, False: 26.9k]
  ------------------
  129|      0|                break;
  130|  26.9k|            signature->verify_message_init
  131|  26.9k|                = OSSL_FUNC_signature_verify_message_init(fns);
  132|  26.9k|            initfncnt++;
  133|  26.9k|            break;
  134|  17.9k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE:
  ------------------
  |  |  819|  17.9k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
  ------------------
  |  Branch (134:9): [True: 17.9k, False: 521k]
  ------------------
  135|  17.9k|            if (signature->verify_message_update != NULL)
  ------------------
  |  Branch (135:17): [True: 0, False: 17.9k]
  ------------------
  136|      0|                break;
  137|  17.9k|            signature->verify_message_update
  138|  17.9k|                = OSSL_FUNC_signature_verify_message_update(fns);
  139|  17.9k|            break;
  140|  17.9k|        case OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL:
  ------------------
  |  |  820|  17.9k|#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
  ------------------
  |  Branch (140:9): [True: 17.9k, False: 521k]
  ------------------
  141|  17.9k|            if (signature->verify_message_final != NULL)
  ------------------
  |  Branch (141:17): [True: 0, False: 17.9k]
  ------------------
  142|      0|                break;
  143|  17.9k|            signature->verify_message_final
  144|  17.9k|                = OSSL_FUNC_signature_verify_message_final(fns);
  145|  17.9k|            break;
  146|  7.39k|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT:
  ------------------
  |  |  794|  7.39k|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
  ------------------
  |  Branch (146:9): [True: 7.39k, False: 531k]
  ------------------
  147|  7.39k|            if (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (147:17): [True: 0, False: 7.39k]
  ------------------
  148|      0|                break;
  149|  7.39k|            signature->verify_recover_init
  150|  7.39k|                = OSSL_FUNC_signature_verify_recover_init(fns);
  151|  7.39k|            initfncnt++;
  152|  7.39k|            break;
  153|  7.39k|        case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER:
  ------------------
  |  |  795|  7.39k|#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
  ------------------
  |  Branch (153:9): [True: 7.39k, False: 531k]
  ------------------
  154|  7.39k|            if (signature->verify_recover != NULL)
  ------------------
  |  Branch (154:17): [True: 0, False: 7.39k]
  ------------------
  155|      0|                break;
  156|  7.39k|            signature->verify_recover
  157|  7.39k|                = OSSL_FUNC_signature_verify_recover(fns);
  158|  7.39k|            break;
  159|  13.2k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT:
  ------------------
  |  |  796|  13.2k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
  ------------------
  |  Branch (159:9): [True: 13.2k, False: 525k]
  ------------------
  160|  13.2k|            if (signature->digest_sign_init != NULL)
  ------------------
  |  Branch (160:17): [True: 0, False: 13.2k]
  ------------------
  161|      0|                break;
  162|  13.2k|            signature->digest_sign_init
  163|  13.2k|                = OSSL_FUNC_signature_digest_sign_init(fns);
  164|  13.2k|            initfncnt++;
  165|  13.2k|            break;
  166|  4.22k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE:
  ------------------
  |  |  797|  4.22k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
  ------------------
  |  Branch (166:9): [True: 4.22k, False: 534k]
  ------------------
  167|  4.22k|            if (signature->digest_sign_update != NULL)
  ------------------
  |  Branch (167:17): [True: 0, False: 4.22k]
  ------------------
  168|      0|                break;
  169|  4.22k|            signature->digest_sign_update
  170|  4.22k|                = OSSL_FUNC_signature_digest_sign_update(fns);
  171|  4.22k|            break;
  172|  4.22k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL:
  ------------------
  |  |  798|  4.22k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
  ------------------
  |  Branch (172:9): [True: 4.22k, False: 534k]
  ------------------
  173|  4.22k|            if (signature->digest_sign_final != NULL)
  ------------------
  |  Branch (173:17): [True: 0, False: 4.22k]
  ------------------
  174|      0|                break;
  175|  4.22k|            signature->digest_sign_final
  176|  4.22k|                = OSSL_FUNC_signature_digest_sign_final(fns);
  177|  4.22k|            break;
  178|  8.97k|        case OSSL_FUNC_SIGNATURE_DIGEST_SIGN:
  ------------------
  |  |  799|  8.97k|#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
  ------------------
  |  Branch (178:9): [True: 8.97k, False: 530k]
  ------------------
  179|  8.97k|            if (signature->digest_sign != NULL)
  ------------------
  |  Branch (179:17): [True: 0, False: 8.97k]
  ------------------
  180|      0|                break;
  181|  8.97k|            signature->digest_sign
  182|  8.97k|                = OSSL_FUNC_signature_digest_sign(fns);
  183|  8.97k|            break;
  184|  11.0k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT:
  ------------------
  |  |  800|  11.0k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
  ------------------
  |  Branch (184:9): [True: 11.0k, False: 528k]
  ------------------
  185|  11.0k|            if (signature->digest_verify_init != NULL)
  ------------------
  |  Branch (185:17): [True: 0, False: 11.0k]
  ------------------
  186|      0|                break;
  187|  11.0k|            signature->digest_verify_init
  188|  11.0k|                = OSSL_FUNC_signature_digest_verify_init(fns);
  189|  11.0k|            initfncnt++;
  190|  11.0k|            break;
  191|  2.11k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE:
  ------------------
  |  |  801|  2.11k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
  ------------------
  |  Branch (191:9): [True: 2.11k, False: 536k]
  ------------------
  192|  2.11k|            if (signature->digest_verify_update != NULL)
  ------------------
  |  Branch (192:17): [True: 0, False: 2.11k]
  ------------------
  193|      0|                break;
  194|  2.11k|            signature->digest_verify_update
  195|  2.11k|                = OSSL_FUNC_signature_digest_verify_update(fns);
  196|  2.11k|            break;
  197|  2.11k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL:
  ------------------
  |  |  802|  2.11k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
  ------------------
  |  Branch (197:9): [True: 2.11k, False: 536k]
  ------------------
  198|  2.11k|            if (signature->digest_verify_final != NULL)
  ------------------
  |  Branch (198:17): [True: 0, False: 2.11k]
  ------------------
  199|      0|                break;
  200|  2.11k|            signature->digest_verify_final
  201|  2.11k|                = OSSL_FUNC_signature_digest_verify_final(fns);
  202|  2.11k|            break;
  203|  8.97k|        case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY:
  ------------------
  |  |  803|  8.97k|#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
  ------------------
  |  Branch (203:9): [True: 8.97k, False: 530k]
  ------------------
  204|  8.97k|            if (signature->digest_verify != NULL)
  ------------------
  |  Branch (204:17): [True: 0, False: 8.97k]
  ------------------
  205|      0|                break;
  206|  8.97k|            signature->digest_verify
  207|  8.97k|                = OSSL_FUNC_signature_digest_verify(fns);
  208|  8.97k|            break;
  209|  31.1k|        case OSSL_FUNC_SIGNATURE_FREECTX:
  ------------------
  |  |  804|  31.1k|#define OSSL_FUNC_SIGNATURE_FREECTX 16
  ------------------
  |  Branch (209:9): [True: 31.1k, False: 507k]
  ------------------
  210|  31.1k|            if (signature->freectx != NULL)
  ------------------
  |  Branch (210:17): [True: 0, False: 31.1k]
  ------------------
  211|      0|                break;
  212|  31.1k|            signature->freectx = OSSL_FUNC_signature_freectx(fns);
  213|  31.1k|            ctxfncnt++;
  214|  31.1k|            break;
  215|  31.1k|        case OSSL_FUNC_SIGNATURE_DUPCTX:
  ------------------
  |  |  805|  31.1k|#define OSSL_FUNC_SIGNATURE_DUPCTX 17
  ------------------
  |  Branch (215:9): [True: 31.1k, False: 507k]
  ------------------
  216|  31.1k|            if (signature->dupctx != NULL)
  ------------------
  |  Branch (216:17): [True: 0, False: 31.1k]
  ------------------
  217|      0|                break;
  218|  31.1k|            signature->dupctx = OSSL_FUNC_signature_dupctx(fns);
  219|  31.1k|            break;
  220|  29.0k|        case OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS:
  ------------------
  |  |  806|  29.0k|#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
  ------------------
  |  Branch (220:9): [True: 29.0k, False: 510k]
  ------------------
  221|  29.0k|            if (signature->get_ctx_params != NULL)
  ------------------
  |  Branch (221:17): [True: 0, False: 29.0k]
  ------------------
  222|      0|                break;
  223|  29.0k|            signature->get_ctx_params
  224|  29.0k|                = OSSL_FUNC_signature_get_ctx_params(fns);
  225|  29.0k|            gparamfncnt++;
  226|  29.0k|            break;
  227|  29.0k|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS:
  ------------------
  |  |  807|  29.0k|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
  ------------------
  |  Branch (227:9): [True: 29.0k, False: 510k]
  ------------------
  228|  29.0k|            if (signature->gettable_ctx_params != NULL)
  ------------------
  |  Branch (228:17): [True: 0, False: 29.0k]
  ------------------
  229|      0|                break;
  230|  29.0k|            signature->gettable_ctx_params
  231|  29.0k|                = OSSL_FUNC_signature_gettable_ctx_params(fns);
  232|  29.0k|            gparamfncnt++;
  233|  29.0k|            break;
  234|  31.1k|        case OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS:
  ------------------
  |  |  808|  31.1k|#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
  ------------------
  |  Branch (234:9): [True: 31.1k, False: 507k]
  ------------------
  235|  31.1k|            if (signature->set_ctx_params != NULL)
  ------------------
  |  Branch (235:17): [True: 0, False: 31.1k]
  ------------------
  236|      0|                break;
  237|  31.1k|            signature->set_ctx_params
  238|  31.1k|                = OSSL_FUNC_signature_set_ctx_params(fns);
  239|  31.1k|            sparamfncnt++;
  240|  31.1k|            break;
  241|  31.1k|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS:
  ------------------
  |  |  809|  31.1k|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
  ------------------
  |  Branch (241:9): [True: 31.1k, False: 507k]
  ------------------
  242|  31.1k|            if (signature->settable_ctx_params != NULL)
  ------------------
  |  Branch (242:17): [True: 0, False: 31.1k]
  ------------------
  243|      0|                break;
  244|  31.1k|            signature->settable_ctx_params
  245|  31.1k|                = OSSL_FUNC_signature_settable_ctx_params(fns);
  246|  31.1k|            sparamfncnt++;
  247|  31.1k|            break;
  248|  2.11k|        case OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS:
  ------------------
  |  |  810|  2.11k|#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
  ------------------
  |  Branch (248:9): [True: 2.11k, False: 536k]
  ------------------
  249|  2.11k|            if (signature->get_ctx_md_params != NULL)
  ------------------
  |  Branch (249:17): [True: 0, False: 2.11k]
  ------------------
  250|      0|                break;
  251|  2.11k|            signature->get_ctx_md_params
  252|  2.11k|                = OSSL_FUNC_signature_get_ctx_md_params(fns);
  253|  2.11k|            gmdparamfncnt++;
  254|  2.11k|            break;
  255|  2.11k|        case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  811|  2.11k|#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
  ------------------
  |  Branch (255:9): [True: 2.11k, False: 536k]
  ------------------
  256|  2.11k|            if (signature->gettable_ctx_md_params != NULL)
  ------------------
  |  Branch (256:17): [True: 0, False: 2.11k]
  ------------------
  257|      0|                break;
  258|  2.11k|            signature->gettable_ctx_md_params
  259|  2.11k|                = OSSL_FUNC_signature_gettable_ctx_md_params(fns);
  260|  2.11k|            gmdparamfncnt++;
  261|  2.11k|            break;
  262|  2.11k|        case OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS:
  ------------------
  |  |  812|  2.11k|#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
  ------------------
  |  Branch (262:9): [True: 2.11k, False: 536k]
  ------------------
  263|  2.11k|            if (signature->set_ctx_md_params != NULL)
  ------------------
  |  Branch (263:17): [True: 0, False: 2.11k]
  ------------------
  264|      0|                break;
  265|  2.11k|            signature->set_ctx_md_params
  266|  2.11k|                = OSSL_FUNC_signature_set_ctx_md_params(fns);
  267|  2.11k|            smdparamfncnt++;
  268|  2.11k|            break;
  269|  2.11k|        case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS:
  ------------------
  |  |  813|  2.11k|#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
  ------------------
  |  Branch (269:9): [True: 2.11k, False: 536k]
  ------------------
  270|  2.11k|            if (signature->settable_ctx_md_params != NULL)
  ------------------
  |  Branch (270:17): [True: 0, False: 2.11k]
  ------------------
  271|      0|                break;
  272|  2.11k|            signature->settable_ctx_md_params
  273|  2.11k|                = OSSL_FUNC_signature_settable_ctx_md_params(fns);
  274|  2.11k|            smdparamfncnt++;
  275|  2.11k|            break;
  276|  19.0k|        case OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES:
  ------------------
  |  |  814|  19.0k|#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
  ------------------
  |  Branch (276:9): [True: 19.0k, False: 520k]
  ------------------
  277|  19.0k|            if (signature->query_key_types != NULL)
  ------------------
  |  Branch (277:17): [True: 0, False: 19.0k]
  ------------------
  278|      0|                break;
  279|  19.0k|            signature->query_key_types
  280|  19.0k|                = OSSL_FUNC_signature_query_key_types(fns);
  281|  19.0k|            break;
  282|   539k|        }
  283|   539k|    }
  284|       |    /*
  285|       |     * In order to be a consistent set of functions we must have at least
  286|       |     * a set of context functions (newctx and freectx) as well as a set of
  287|       |     * "signature" functions.  Because there's an overlap between some sets
  288|       |     * of functions, counters don't always cut it, we must test known
  289|       |     * combinations.
  290|       |     * We start by assuming the implementation is valid, and then look for
  291|       |     * reasons it's not.
  292|       |     */
  293|  31.1k|    valid = 1;
  294|       |    /* Start with the ones where counters say enough */
  295|  31.1k|    if (ctxfncnt != 2) {
  ------------------
  |  Branch (295:9): [True: 0, False: 31.1k]
  ------------------
  296|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  297|      0|            "missing %s newctx or freectx:%s", signature->type_name, desc);
  298|      0|        valid = 0;
  299|      0|    }
  300|  31.1k|    if (valid
  ------------------
  |  Branch (300:9): [True: 31.1k, False: 0]
  ------------------
  301|  31.1k|        && ((gparamfncnt != 0 && gparamfncnt != 2)
  ------------------
  |  Branch (301:14): [True: 29.0k, False: 2.11k]
  |  Branch (301:34): [True: 0, False: 29.0k]
  ------------------
  302|  31.1k|            || (sparamfncnt != 0 && sparamfncnt != 2)
  ------------------
  |  Branch (302:17): [True: 31.1k, False: 0]
  |  Branch (302:37): [True: 0, False: 31.1k]
  ------------------
  303|  31.1k|            || (gmdparamfncnt != 0 && gmdparamfncnt != 2)
  ------------------
  |  Branch (303:17): [True: 2.11k, False: 29.0k]
  |  Branch (303:39): [True: 0, False: 2.11k]
  ------------------
  304|  31.1k|            || (smdparamfncnt != 0 && smdparamfncnt != 2))) {
  ------------------
  |  Branch (304:17): [True: 2.11k, False: 29.0k]
  |  Branch (304:39): [True: 0, False: 2.11k]
  ------------------
  305|       |        /*
  306|       |         * Params functions are optional, but if defined, they must
  307|       |         * be pairwise complete sets, i.e. a getter must have an
  308|       |         * associated gettable, etc
  309|       |         */
  310|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  311|      0|            "missing %s params getter or setter:%s", signature->type_name, desc);
  312|      0|        valid = 0;
  313|      0|    }
  314|  31.1k|    if (valid && initfncnt == 0) {
  ------------------
  |  Branch (314:9): [True: 31.1k, False: 0]
  |  Branch (314:18): [True: 0, False: 31.1k]
  ------------------
  315|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  316|      0|            "missing %s init:%s", signature->type_name, desc);
  317|      0|        valid = 0;
  318|      0|    }
  319|       |
  320|       |    /* Now we check for function combinations */
  321|  31.1k|    if (valid
  ------------------
  |  Branch (321:9): [True: 31.1k, False: 0]
  ------------------
  322|  31.1k|        && ((signature->sign_init != NULL
  ------------------
  |  Branch (322:14): [True: 21.1k, False: 10.0k]
  ------------------
  323|  21.1k|                && signature->sign == NULL)
  ------------------
  |  Branch (323:20): [True: 0, False: 21.1k]
  ------------------
  324|  31.1k|            || (signature->sign_message_init != NULL
  ------------------
  |  Branch (324:17): [True: 26.9k, False: 4.22k]
  ------------------
  325|  26.9k|                && signature->sign == NULL
  ------------------
  |  Branch (325:20): [True: 0, False: 26.9k]
  ------------------
  326|      0|                && (signature->sign_message_update == NULL
  ------------------
  |  Branch (326:21): [True: 0, False: 0]
  ------------------
  327|      0|                    || signature->sign_message_final == NULL)))) {
  ------------------
  |  Branch (327:24): [True: 0, False: 0]
  ------------------
  328|       |        /* sign_init function(s) with no signing function?  That's weird */
  329|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  330|      0|            "missing %s signing function:%s", signature->type_name, desc);
  331|      0|        valid = 0;
  332|      0|    }
  333|  31.1k|    if (valid
  ------------------
  |  Branch (333:9): [True: 31.1k, False: 0]
  ------------------
  334|  31.1k|        && (signature->sign != NULL
  ------------------
  |  Branch (334:13): [True: 29.0k, False: 2.11k]
  ------------------
  335|  2.11k|            || signature->sign_message_update != NULL
  ------------------
  |  Branch (335:16): [True: 0, False: 2.11k]
  ------------------
  336|  2.11k|            || signature->sign_message_final != NULL)
  ------------------
  |  Branch (336:16): [True: 0, False: 2.11k]
  ------------------
  337|  29.0k|        && signature->sign_init == NULL
  ------------------
  |  Branch (337:12): [True: 7.92k, False: 21.1k]
  ------------------
  338|  7.92k|        && signature->sign_message_init == NULL) {
  ------------------
  |  Branch (338:12): [True: 0, False: 7.92k]
  ------------------
  339|       |        /* signing function(s) with no sign_init? That's odd */
  340|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  341|      0|            "missing %s sign_init or sign_message_init:%s", signature->type_name, desc);
  342|      0|        valid = 0;
  343|      0|    }
  344|       |
  345|  31.1k|    if (valid
  ------------------
  |  Branch (345:9): [True: 31.1k, False: 0]
  ------------------
  346|  31.1k|        && ((signature->verify_init != NULL
  ------------------
  |  Branch (346:14): [True: 21.1k, False: 10.0k]
  ------------------
  347|  21.1k|                && signature->verify == NULL)
  ------------------
  |  Branch (347:20): [True: 0, False: 21.1k]
  ------------------
  348|  31.1k|            || (signature->verify_message_init != NULL
  ------------------
  |  Branch (348:17): [True: 26.9k, False: 4.22k]
  ------------------
  349|  26.9k|                && signature->verify == NULL
  ------------------
  |  Branch (349:20): [True: 0, False: 26.9k]
  ------------------
  350|      0|                && (signature->verify_message_update == NULL
  ------------------
  |  Branch (350:21): [True: 0, False: 0]
  ------------------
  351|      0|                    || signature->verify_message_final == NULL)))) {
  ------------------
  |  Branch (351:24): [True: 0, False: 0]
  ------------------
  352|       |        /* verify_init function(s) with no verification function?  That's weird */
  353|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  354|      0|            "missing %s verification function:%s", signature->type_name, desc);
  355|      0|        valid = 0;
  356|      0|    }
  357|  31.1k|    if (valid
  ------------------
  |  Branch (357:9): [True: 31.1k, False: 0]
  ------------------
  358|  31.1k|        && (signature->verify != NULL
  ------------------
  |  Branch (358:13): [True: 29.0k, False: 2.11k]
  ------------------
  359|  2.11k|            || signature->verify_message_update != NULL
  ------------------
  |  Branch (359:16): [True: 0, False: 2.11k]
  ------------------
  360|  2.11k|            || signature->verify_message_final != NULL)
  ------------------
  |  Branch (360:16): [True: 0, False: 2.11k]
  ------------------
  361|  29.0k|        && signature->verify_init == NULL
  ------------------
  |  Branch (361:12): [True: 7.92k, False: 21.1k]
  ------------------
  362|  7.92k|        && signature->verify_message_init == NULL) {
  ------------------
  |  Branch (362:12): [True: 0, False: 7.92k]
  ------------------
  363|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  364|      0|            "missing %s verify_init or verify_message_init:%s",
  365|      0|            signature->type_name, desc);
  366|       |        /* verification function(s) with no verify_init? That's odd */
  367|      0|        valid = 0;
  368|      0|    }
  369|       |
  370|  31.1k|    if (valid
  ------------------
  |  Branch (370:9): [True: 31.1k, False: 0]
  ------------------
  371|  31.1k|        && (signature->verify_recover_init != NULL)
  ------------------
  |  Branch (371:12): [True: 7.39k, False: 23.7k]
  ------------------
  372|  7.39k|        && (signature->verify_recover == NULL)) {
  ------------------
  |  Branch (372:12): [True: 0, False: 7.39k]
  ------------------
  373|       |        /* verify_recover_init function with no verify_recover?  How quaint */
  374|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  375|      0|            "missing %s verify_recover:%s", signature->type_name, desc);
  376|      0|        valid = 0;
  377|      0|    }
  378|       |
  379|  31.1k|    if (valid
  ------------------
  |  Branch (379:9): [True: 31.1k, False: 0]
  ------------------
  380|  31.1k|        && (signature->digest_sign_init != NULL
  ------------------
  |  Branch (380:13): [True: 13.2k, False: 17.9k]
  ------------------
  381|  13.2k|            && signature->digest_sign == NULL
  ------------------
  |  Branch (381:16): [True: 4.22k, False: 8.97k]
  ------------------
  382|  4.22k|            && (signature->digest_sign_update == NULL
  ------------------
  |  Branch (382:17): [True: 0, False: 4.22k]
  ------------------
  383|  4.22k|                || signature->digest_sign_final == NULL))) {
  ------------------
  |  Branch (383:20): [True: 0, False: 4.22k]
  ------------------
  384|       |        /* You can't have a digest_sign_init without *some* performing functions */
  385|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  386|      0|            "missing %s digest_sign function:%s", signature->type_name, desc);
  387|      0|        valid = 0;
  388|      0|    }
  389|       |
  390|  31.1k|    if (valid
  ------------------
  |  Branch (390:9): [True: 31.1k, False: 0]
  ------------------
  391|  31.1k|        && ((signature->digest_verify_init != NULL
  ------------------
  |  Branch (391:14): [True: 11.0k, False: 20.0k]
  ------------------
  392|  11.0k|            && signature->digest_verify == NULL
  ------------------
  |  Branch (392:16): [True: 2.11k, False: 8.97k]
  ------------------
  393|  2.11k|            && (signature->digest_verify_update == NULL
  ------------------
  |  Branch (393:17): [True: 0, False: 2.11k]
  ------------------
  394|  2.11k|                || signature->digest_verify_final == NULL)))) {
  ------------------
  |  Branch (394:20): [True: 0, False: 2.11k]
  ------------------
  395|       |        /* You can't have a digest_verify_init without *some* performing functions */
  396|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  397|      0|            "missing %s digest_verify function:%s", signature->type_name, desc);
  398|      0|        valid = 0;
  399|      0|    }
  400|       |
  401|  31.1k|    if (!valid)
  ------------------
  |  Branch (401:9): [True: 0, False: 31.1k]
  ------------------
  402|      0|        goto err;
  403|       |
  404|  31.1k|    if ((signature->digest_sign != NULL
  ------------------
  |  Branch (404:10): [True: 8.97k, False: 22.1k]
  ------------------
  405|  22.1k|            || signature->digest_sign_update != NULL
  ------------------
  |  Branch (405:16): [True: 4.22k, False: 17.9k]
  ------------------
  406|  17.9k|            || signature->digest_sign_final != NULL)
  ------------------
  |  Branch (406:16): [True: 0, False: 17.9k]
  ------------------
  407|  13.2k|        && signature->digest_sign_init == NULL) {
  ------------------
  |  Branch (407:12): [True: 0, False: 13.2k]
  ------------------
  408|       |        /* digest signing function(s) with no digest_sign_init? That's odd */
  409|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  410|      0|            "missing %s digest_sign_init:%s", signature->type_name, desc);
  411|      0|        goto err;
  412|      0|    }
  413|       |
  414|  31.1k|    if ((signature->digest_verify != NULL
  ------------------
  |  Branch (414:10): [True: 8.97k, False: 22.1k]
  ------------------
  415|  22.1k|            || signature->digest_verify_update != NULL
  ------------------
  |  Branch (415:16): [True: 2.11k, False: 20.0k]
  ------------------
  416|  20.0k|            || signature->digest_verify_final != NULL)
  ------------------
  |  Branch (416:16): [True: 0, False: 20.0k]
  ------------------
  417|  11.0k|        && signature->digest_verify_init == NULL) {
  ------------------
  |  Branch (417:12): [True: 0, False: 11.0k]
  ------------------
  418|       |        /* digest verification function(s) with no digest_verify_init? That's odd */
  419|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  420|      0|            "missing %s digest_verify_init:%s", signature->type_name, desc);
  421|      0|        goto err;
  422|      0|    }
  423|       |
  424|  31.1k|    if ((signature->sign_message_update == NULL) != (signature->sign_message_final == NULL)) {
  ------------------
  |  Branch (424:9): [True: 0, False: 31.1k]
  ------------------
  425|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  426|      0|            "only one of %s message signing update and final available:%s",
  427|      0|            signature->type_name, desc);
  428|      0|        goto err;
  429|      0|    }
  430|  31.1k|    if ((signature->verify_message_update == NULL) != (signature->verify_message_final == NULL)) {
  ------------------
  |  Branch (430:9): [True: 0, False: 31.1k]
  ------------------
  431|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  432|      0|            "only one of %s message verification update and final available:%s",
  433|      0|            signature->type_name, desc);
  434|      0|        goto err;
  435|      0|    }
  436|  31.1k|    if ((signature->digest_sign_update == NULL) != (signature->digest_sign_final == NULL)) {
  ------------------
  |  Branch (436:9): [True: 0, False: 31.1k]
  ------------------
  437|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  438|      0|            "only one of %s digest signing update and final available:%s",
  439|      0|            signature->type_name, desc);
  440|      0|        goto err;
  441|      0|    }
  442|  31.1k|    if ((signature->digest_verify_update == NULL) != (signature->digest_verify_final == NULL)) {
  ------------------
  |  Branch (442:9): [True: 0, False: 31.1k]
  ------------------
  443|      0|        ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   78|      0|#define ERR_LIB_EVP 6
  ------------------
                      ERR_raise_data(ERR_LIB_EVP, EVP_R_INVALID_PROVIDER_FUNCTIONS,
  ------------------
  |  |   70|      0|#define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
  ------------------
  444|      0|            "only one of %s digest verification update and final available:%s",
  445|      0|            signature->type_name, desc);
  446|      0|        goto err;
  447|      0|    }
  448|       |
  449|  31.1k|    return signature;
  450|      0|err:
  451|      0|    EVP_SIGNATURE_free(signature);
  452|       |    return NULL;
  453|  31.1k|}
signature.c:evp_signature_new:
   34|  31.1k|{
   35|  31.1k|    EVP_SIGNATURE *signature = OPENSSL_zalloc(sizeof(EVP_SIGNATURE));
  ------------------
  |  |  108|  31.1k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   36|       |
   37|  31.1k|    if (signature == NULL)
  ------------------
  |  Branch (37:9): [True: 0, False: 31.1k]
  ------------------
   38|      0|        return NULL;
   39|       |
   40|  31.1k|    if (!CRYPTO_NEW_REF(&signature->refcnt, 1)
  ------------------
  |  Branch (40:9): [True: 0, False: 31.1k]
  ------------------
   41|  31.1k|        || !ossl_provider_up_ref(prov)) {
  ------------------
  |  Branch (41:12): [True: 0, False: 31.1k]
  ------------------
   42|      0|        CRYPTO_FREE_REF(&signature->refcnt);
   43|      0|        OPENSSL_free(signature);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   44|      0|        return NULL;
   45|      0|    }
   46|       |
   47|  31.1k|    signature->prov = prov;
   48|       |
   49|  31.1k|    return signature;
   50|  31.1k|}
signature.c:evp_signature_up_ref:
   29|  36.2k|{
   30|  36.2k|    return EVP_SIGNATURE_up_ref(data);
   31|  36.2k|}
signature.c:evp_signature_free:
   24|  63.3k|{
   25|  63.3k|    EVP_SIGNATURE_free(data);
   26|  63.3k|}

ossl_do_ex_data_init:
   15|    695|{
   16|    695|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   17|       |
   18|    695|    if (global == NULL)
  ------------------
  |  Branch (18:9): [True: 0, False: 695]
  ------------------
   19|      0|        return 0;
   20|       |
   21|    695|    global->ex_data_lock = CRYPTO_THREAD_lock_new();
   22|       |    return global->ex_data_lock != NULL;
   23|    695|}
ossl_crypto_cleanup_all_ex_data_int:
   73|    695|{
   74|    695|    int i;
   75|    695|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
   76|       |
   77|    695|    if (global == NULL)
  ------------------
  |  Branch (77:9): [True: 0, False: 695]
  ------------------
   78|      0|        return;
   79|       |
   80|  13.2k|    for (i = 0; i < CRYPTO_EX_INDEX__COUNT; ++i) {
  ------------------
  |  |  269|  13.2k|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (80:17): [True: 12.5k, False: 695]
  ------------------
   81|  12.5k|        EX_CALLBACKS *ip = &global->ex_data[i];
   82|       |
   83|  12.5k|        sk_EX_CALLBACK_pop_free(ip->meth, cleanup_cb);
   84|  12.5k|        ip->meth = NULL;
   85|  12.5k|    }
   86|       |
   87|    695|    CRYPTO_THREAD_lock_free(global->ex_data_lock);
   88|       |    global->ex_data_lock = NULL;
   89|    695|}
ossl_crypto_get_ex_new_index_ex:
  154|      2|{
  155|      2|    int toret = -1;
  156|      2|    EX_CALLBACK *a;
  157|      2|    EX_CALLBACKS *ip;
  158|      2|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  159|       |
  160|      2|    if (global == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 2]
  ------------------
  161|      0|        return -1;
  162|       |
  163|      2|    ip = get_and_lock(global, class_index, 0);
  164|      2|    if (ip == NULL)
  ------------------
  |  Branch (164:9): [True: 0, False: 2]
  ------------------
  165|      0|        return -1;
  166|       |
  167|      2|    if (ip->meth == NULL) {
  ------------------
  |  Branch (167:9): [True: 2, False: 0]
  ------------------
  168|      2|        ip->meth = sk_EX_CALLBACK_new_null();
  169|       |        /* We push an initial value on the stack because the SSL
  170|       |         * "app_data" routines use ex_data index zero.  See RT 3710. */
  171|      2|        if (ip->meth == NULL
  ------------------
  |  Branch (171:13): [True: 0, False: 2]
  ------------------
  172|      2|            || !sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (172:16): [True: 0, False: 2]
  ------------------
  173|      0|            sk_EX_CALLBACK_free(ip->meth);
  174|      0|            ip->meth = NULL;
  175|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  176|      0|            goto err;
  177|      0|        }
  178|      2|    }
  179|       |
  180|      2|    a = (EX_CALLBACK *)OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  106|      2|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  181|      2|    if (a == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 2]
  ------------------
  182|      0|        goto err;
  183|      2|    a->argl = argl;
  184|      2|    a->argp = argp;
  185|      2|    a->new_func = new_func;
  186|      2|    a->dup_func = dup_func;
  187|      2|    a->free_func = free_func;
  188|      2|    a->priority = priority;
  189|       |
  190|      2|    if (!sk_EX_CALLBACK_push(ip->meth, NULL)) {
  ------------------
  |  Branch (190:9): [True: 0, False: 2]
  ------------------
  191|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  192|      0|        OPENSSL_free(a);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  193|      0|        goto err;
  194|      0|    }
  195|      2|    toret = sk_EX_CALLBACK_num(ip->meth) - 1;
  196|      2|    (void)sk_EX_CALLBACK_set(ip->meth, toret, a);
  197|       |
  198|      2|err:
  199|      2|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  200|      2|    return toret;
  201|      2|}
CRYPTO_get_ex_new_index:
  206|      2|{
  207|       |    return ossl_crypto_get_ex_new_index_ex(NULL, class_index, argl, argp,
  208|      2|        new_func, dup_func, free_func, 0);
  209|      2|}
ossl_crypto_new_ex_data_ex:
  220|  2.12M|{
  221|  2.12M|    int mx, i;
  222|  2.12M|    void *ptr;
  223|  2.12M|    EX_CALLBACK **storage = NULL;
  224|  2.12M|    EX_CALLBACK *stack[10];
  225|  2.12M|    EX_CALLBACKS *ip;
  226|  2.12M|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ctx);
  227|       |
  228|  2.12M|    if (global == NULL)
  ------------------
  |  Branch (228:9): [True: 0, False: 2.12M]
  ------------------
  229|      0|        return 0;
  230|       |
  231|  2.12M|    ip = get_and_lock(global, class_index, 1);
  232|  2.12M|    if (ip == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 2.12M]
  ------------------
  233|      0|        return 0;
  234|       |
  235|  2.12M|    ad->ctx = ctx;
  236|  2.12M|    ad->sk = NULL;
  237|  2.12M|    mx = sk_EX_CALLBACK_num(ip->meth);
  238|  2.12M|    if (mx > 0) {
  ------------------
  |  Branch (238:9): [True: 724, False: 2.12M]
  ------------------
  239|    724|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|    724|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (239:13): [True: 724, False: 0]
  ------------------
  240|    724|            storage = stack;
  241|      0|        else
  242|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|    724|        if (storage != NULL)
  ------------------
  |  Branch (243:13): [True: 724, False: 0]
  ------------------
  244|  2.17k|            for (i = 0; i < mx; i++)
  ------------------
  |  Branch (244:25): [True: 1.44k, False: 724]
  ------------------
  245|  1.44k|                storage[i] = sk_EX_CALLBACK_value(ip->meth, i);
  246|    724|    }
  247|  2.12M|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  248|       |
  249|  2.12M|    if (mx > 0 && storage == NULL)
  ------------------
  |  Branch (249:9): [True: 724, False: 2.12M]
  |  Branch (249:19): [True: 0, False: 724]
  ------------------
  250|      0|        return 0;
  251|  2.12M|    for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (251:17): [True: 1.44k, False: 2.12M]
  ------------------
  252|  1.44k|        if (storage[i] != NULL && storage[i]->new_func != NULL) {
  ------------------
  |  Branch (252:13): [True: 724, False: 724]
  |  Branch (252:35): [True: 0, False: 724]
  ------------------
  253|      0|            ptr = CRYPTO_get_ex_data(ad, i);
  254|      0|            storage[i]->new_func(obj, ptr, ad, i,
  255|      0|                storage[i]->argl, storage[i]->argp);
  256|      0|        }
  257|  1.44k|    }
  258|  2.12M|    if (storage != stack)
  ------------------
  |  Branch (258:9): [True: 2.12M, False: 724]
  ------------------
  259|  2.12M|        OPENSSL_free(storage);
  ------------------
  |  |  131|  2.12M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  260|  2.12M|    return 1;
  261|  2.12M|}
CRYPTO_new_ex_data:
  264|  2.12M|{
  265|       |    return ossl_crypto_new_ex_data_ex(NULL, class_index, obj, ad);
  266|  2.12M|}
CRYPTO_free_ex_data:
  367|  2.12M|{
  368|  2.12M|    int mx, i;
  369|  2.12M|    EX_CALLBACKS *ip;
  370|  2.12M|    void *ptr;
  371|  2.12M|    const EX_CALLBACK *f;
  372|  2.12M|    struct ex_callback_entry stack[10];
  373|  2.12M|    struct ex_callback_entry *storage = NULL;
  374|  2.12M|    OSSL_EX_DATA_GLOBAL *global = ossl_lib_ctx_get_ex_data_global(ad->ctx);
  375|       |
  376|  2.12M|    if (global == NULL)
  ------------------
  |  Branch (376:9): [True: 0, False: 2.12M]
  ------------------
  377|      0|        goto err;
  378|       |
  379|  2.12M|    ip = get_and_lock(global, class_index, 1);
  380|  2.12M|    if (ip == NULL)
  ------------------
  |  Branch (380:9): [True: 0, False: 2.12M]
  ------------------
  381|      0|        goto err;
  382|       |
  383|  2.12M|    mx = sk_EX_CALLBACK_num(ip->meth);
  384|  2.12M|    if (mx > 0) {
  ------------------
  |  Branch (384:9): [True: 728, False: 2.12M]
  ------------------
  385|    728|        if (mx < (int)OSSL_NELEM(stack))
  ------------------
  |  |   14|    728|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (385:13): [True: 728, False: 0]
  ------------------
  386|    728|            storage = stack;
  387|      0|        else
  388|      0|            storage = OPENSSL_malloc_array(mx, sizeof(*storage));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|    728|        if (storage != NULL)
  ------------------
  |  Branch (389:13): [True: 728, False: 0]
  ------------------
  390|  2.18k|            for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (390:25): [True: 1.45k, False: 728]
  ------------------
  391|  1.45k|                storage[i].excb = sk_EX_CALLBACK_value(ip->meth, i);
  392|  1.45k|                storage[i].index = i;
  393|  1.45k|            }
  394|    728|    }
  395|  2.12M|    CRYPTO_THREAD_unlock(global->ex_data_lock);
  396|       |
  397|  2.12M|    if (storage != NULL) {
  ------------------
  |  Branch (397:9): [True: 728, False: 2.12M]
  ------------------
  398|       |        /* Sort according to priority. High priority first */
  399|    728|        qsort(storage, mx, sizeof(*storage), ex_callback_compare);
  400|  2.18k|        for (i = 0; i < mx; i++) {
  ------------------
  |  Branch (400:21): [True: 1.45k, False: 728]
  ------------------
  401|  1.45k|            f = storage[i].excb;
  402|       |
  403|  1.45k|            if (f != NULL && f->free_func != NULL) {
  ------------------
  |  Branch (403:17): [True: 728, False: 728]
  |  Branch (403:30): [True: 728, False: 0]
  ------------------
  404|    728|                ptr = CRYPTO_get_ex_data(ad, storage[i].index);
  405|    728|                f->free_func(obj, ptr, ad, storage[i].index, f->argl, f->argp);
  406|    728|            }
  407|  1.45k|        }
  408|    728|    }
  409|       |
  410|  2.12M|    if (storage != stack)
  ------------------
  |  Branch (410:9): [True: 2.12M, False: 728]
  ------------------
  411|  2.12M|        OPENSSL_free(storage);
  ------------------
  |  |  131|  2.12M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  412|  2.12M|err:
  413|  2.12M|    sk_void_free(ad->sk);
  ------------------
  |  |  225|  2.12M|#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
  ------------------
  414|  2.12M|    ad->sk = NULL;
  415|       |    ad->ctx = NULL;
  416|  2.12M|}
CRYPTO_set_ex_data:
  469|  2.04k|{
  470|  2.04k|    int i;
  471|       |
  472|  2.04k|    if (ad->sk == NULL) {
  ------------------
  |  Branch (472:9): [True: 2.04k, False: 0]
  ------------------
  473|  2.04k|        if ((ad->sk = sk_void_new_null()) == NULL) {
  ------------------
  |  |  222|  2.04k|#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (473:13): [True: 0, False: 2.04k]
  ------------------
  474|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  475|      0|            return 0;
  476|      0|        }
  477|  2.04k|    }
  478|       |
  479|  4.80k|    for (i = sk_void_num(ad->sk); i <= idx; ++i) {
  ------------------
  |  |  219|  2.04k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (479:35): [True: 2.76k, False: 2.04k]
  ------------------
  480|  2.76k|        if (!sk_void_push(ad->sk, NULL)) {
  ------------------
  |  |  229|  2.76k|#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
  ------------------
  |  Branch (480:13): [True: 0, False: 2.76k]
  ------------------
  481|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  482|      0|            return 0;
  483|      0|        }
  484|  2.76k|    }
  485|  2.04k|    if (sk_void_set(ad->sk, idx, val) != val) {
  ------------------
  |  |  235|  2.04k|#define sk_void_set(sk, idx, ptr) ((void *)OPENSSL_sk_set(ossl_check_void_sk_type(sk), (idx), ossl_check_void_type(ptr)))
  ------------------
  |  Branch (485:9): [True: 0, False: 2.04k]
  ------------------
  486|       |        /* Probably the index is out of bounds */
  487|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  488|      0|        return 0;
  489|      0|    }
  490|  2.04k|    return 1;
  491|  2.04k|}
CRYPTO_get_ex_data:
  498|  5.07k|{
  499|  5.07k|    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))
  ------------------
  |  |  219|  3.62k|#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
  ------------------
  |  Branch (499:9): [True: 1.45k, False: 3.62k]
  |  Branch (499:27): [True: 0, False: 3.62k]
  ------------------
  500|  1.45k|        return NULL;
  501|  3.62k|    return sk_void_value(ad->sk, idx);
  ------------------
  |  |  220|  3.62k|#define sk_void_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_void_sk_type(sk), (idx)))
  ------------------
  502|  5.07k|}
ex_data.c:cleanup_cb:
   62|      2|{
   63|      2|    OPENSSL_free(funcs);
  ------------------
  |  |  131|      2|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   64|      2|}
ex_data.c:get_and_lock:
   33|  4.24M|{
   34|  4.24M|    EX_CALLBACKS *ip;
   35|       |
   36|  4.24M|    if (class_index < 0 || class_index >= CRYPTO_EX_INDEX__COUNT) {
  ------------------
  |  |  269|  4.24M|#define CRYPTO_EX_INDEX__COUNT 18
  ------------------
  |  Branch (36:9): [True: 0, False: 4.24M]
  |  Branch (36:28): [True: 0, False: 4.24M]
  ------------------
   37|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   38|      0|        return NULL;
   39|      0|    }
   40|       |
   41|  4.24M|    if (global->ex_data_lock == NULL) {
  ------------------
  |  Branch (41:9): [True: 0, False: 4.24M]
  ------------------
   42|       |        /*
   43|       |         * If we get here, someone (who?) cleaned up the lock, so just
   44|       |         * treat it as an error.
   45|       |         */
   46|      0|        return NULL;
   47|      0|    }
   48|       |
   49|  4.24M|    if (read) {
  ------------------
  |  Branch (49:9): [True: 4.24M, False: 2]
  ------------------
   50|  4.24M|        if (!CRYPTO_THREAD_read_lock(global->ex_data_lock))
  ------------------
  |  Branch (50:13): [True: 0, False: 4.24M]
  ------------------
   51|      0|            return NULL;
   52|  4.24M|    } else {
   53|      2|        if (!CRYPTO_THREAD_write_lock(global->ex_data_lock))
  ------------------
  |  Branch (53:13): [True: 0, False: 2]
  ------------------
   54|      0|            return NULL;
   55|      2|    }
   56|       |
   57|  4.24M|    ip = &global->ex_data[class_index];
   58|  4.24M|    return ip;
   59|  4.24M|}
ex_data.c:ex_callback_compare:
  346|    728|{
  347|    728|    const struct ex_callback_entry *ap = (const struct ex_callback_entry *)a;
  348|    728|    const struct ex_callback_entry *bp = (const struct ex_callback_entry *)b;
  349|       |
  350|    728|    if (ap->excb == bp->excb)
  ------------------
  |  Branch (350:9): [True: 0, False: 728]
  ------------------
  351|      0|        return 0;
  352|       |
  353|    728|    if (ap->excb == NULL)
  ------------------
  |  Branch (353:9): [True: 728, False: 0]
  ------------------
  354|    728|        return 1;
  355|      0|    if (bp->excb == NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 0]
  ------------------
  356|      0|        return -1;
  357|      0|    if (ap->excb->priority == bp->excb->priority)
  ------------------
  |  Branch (357:9): [True: 0, False: 0]
  ------------------
  358|      0|        return 0;
  359|      0|    return ap->excb->priority > bp->excb->priority ? -1 : 1;
  ------------------
  |  Branch (359:12): [True: 0, False: 0]
  ------------------
  360|      0|}

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

ossl_fnv1a_hash:
   14|  3.07M|{
   15|  3.07M|    uint64_t hash = 0xcbf29ce484222325ULL;
   16|  3.07M|    size_t i;
   17|       |
   18|   199M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (18:17): [True: 196M, False: 3.07M]
  ------------------
   19|   196M|        hash ^= key[i];
   20|   196M|        hash *= 0x00000100000001B3ULL;
   21|   196M|    }
   22|  3.07M|    return hash;
   23|  3.07M|}

ossl_ht_new:
  178|    695|{
  179|    695|    HT *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  180|       |
  181|    695|    if (new == NULL)
  ------------------
  |  Branch (181:9): [True: 0, False: 695]
  ------------------
  182|      0|        return NULL;
  183|       |
  184|    695|    new->atomic_lock = CRYPTO_THREAD_lock_new();
  185|    695|    if (new->atomic_lock == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 695]
  ------------------
  186|      0|        goto err;
  187|       |
  188|    695|    memcpy(&new->config, conf, sizeof(*conf));
  189|       |
  190|    695|    if (new->config.init_neighborhoods != 0) {
  ------------------
  |  Branch (190:9): [True: 695, False: 0]
  ------------------
  191|    695|        new->wpd.neighborhood_len = new->config.init_neighborhoods;
  192|       |        /* round up to the next power of 2 */
  193|    695|        new->wpd.neighborhood_len--;
  194|    695|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 1;
  195|    695|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 2;
  196|    695|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 4;
  197|    695|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 8;
  198|    695|        new->wpd.neighborhood_len |= new->wpd.neighborhood_len >> 16;
  199|    695|        new->wpd.neighborhood_len++;
  200|    695|    } else {
  201|      0|        new->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   97|      0|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|      0|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  202|      0|    }
  203|       |
  204|    695|    if (new->config.ht_free_fn == NULL)
  ------------------
  |  Branch (204:9): [True: 695, False: 0]
  ------------------
  205|    695|        new->config.ht_free_fn = internal_free_nop;
  206|       |
  207|    695|    new->md = OPENSSL_zalloc(sizeof(*new->md));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|    695|    if (new->md == NULL)
  ------------------
  |  Branch (208:9): [True: 0, False: 695]
  ------------------
  209|      0|        goto err;
  210|       |
  211|    695|    new->md->neighborhoods = alloc_new_neighborhood_list(new->wpd.neighborhood_len,
  212|    695|        &new->md->neighborhood_ptr_to_free);
  213|    695|    if (new->md->neighborhoods == NULL)
  ------------------
  |  Branch (213:9): [True: 0, False: 695]
  ------------------
  214|      0|        goto err;
  215|    695|    new->md->neighborhood_mask = new->wpd.neighborhood_len - 1;
  216|       |
  217|    695|    new->lock = ossl_rcu_lock_new(1, conf->ctx);
  218|    695|    if (new->lock == NULL)
  ------------------
  |  Branch (218:9): [True: 0, False: 695]
  ------------------
  219|      0|        goto err;
  220|       |
  221|    695|    if (new->config.ht_hash_fn == NULL)
  ------------------
  |  Branch (221:9): [True: 695, False: 0]
  ------------------
  222|    695|        new->config.ht_hash_fn = ossl_fnv1a_hash;
  223|       |
  224|    695|    return new;
  225|       |
  226|      0|err:
  227|      0|    CRYPTO_THREAD_lock_free(new->atomic_lock);
  228|      0|    ossl_rcu_lock_free(new->lock);
  229|      0|    if (new->md != NULL)
  ------------------
  |  Branch (229:9): [True: 0, False: 0]
  ------------------
  230|      0|        OPENSSL_free(new->md->neighborhood_ptr_to_free);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  231|      0|    OPENSSL_free(new->md);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  232|      0|    OPENSSL_free(new);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|       |    return NULL;
  234|    695|}
ossl_ht_write_lock:
  247|    695|{
  248|    695|    ossl_rcu_write_lock(htable->lock);
  249|    695|    htable->wpd.need_sync = 0;
  250|    695|}
ossl_ht_write_unlock:
  253|    695|{
  254|    695|    int need_sync = htable->wpd.need_sync;
  255|       |
  256|    695|    htable->wpd.need_sync = 0;
  257|    695|    ossl_rcu_write_unlock(htable->lock);
  258|    695|    if (need_sync)
  ------------------
  |  Branch (258:9): [True: 695, False: 0]
  ------------------
  259|    695|        ossl_synchronize_rcu(htable->lock);
  260|    695|}
ossl_ht_free:
  321|    695|{
  322|    695|    if (h == NULL)
  ------------------
  |  Branch (322:9): [True: 0, False: 695]
  ------------------
  323|      0|        return;
  324|       |
  325|    695|    ossl_ht_write_lock(h);
  326|    695|    ossl_ht_flush_internal(h);
  327|    695|    ossl_ht_write_unlock(h);
  328|       |    /* Freeing the lock does a final sync for us */
  329|    695|    CRYPTO_THREAD_lock_free(h->atomic_lock);
  330|    695|    ossl_rcu_lock_free(h->lock);
  331|    695|    OPENSSL_free(h->md->neighborhood_ptr_to_free);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  332|    695|    OPENSSL_free(h->md);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|    695|    OPENSSL_free(h);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  334|    695|    return;
  335|    695|}
ossl_ht_insert:
  628|   310k|{
  629|   310k|    struct ht_internal_value_st *newval = NULL;
  630|   310k|    uint64_t hash;
  631|   310k|    int rc = 0;
  632|   310k|    int i;
  633|       |
  634|   310k|    if (data->value == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 310k]
  ------------------
  635|      0|        goto out;
  636|       |
  637|   310k|    rc = -1;
  638|   310k|    newval = alloc_new_value(h, key, data->value, data->type_id);
  639|   310k|    if (newval == NULL)
  ------------------
  |  Branch (639:9): [True: 0, False: 310k]
  ------------------
  640|      0|        goto out;
  641|       |
  642|       |    /*
  643|       |     * we have to take our lock here to prevent other changes
  644|       |     * to the bucket list
  645|       |     */
  646|   310k|    hash = h->config.ht_hash_fn(key->keybuf, key->keysize);
  647|       |
  648|   310k|    for (i = 0;
  649|   310k|        (rc = ossl_ht_insert_locked(h, hash, newval, olddata)) == -1
  ------------------
  |  Branch (649:9): [True: 0, False: 310k]
  ------------------
  650|      0|        && i < 4;
  ------------------
  |  Branch (650:12): [True: 0, False: 0]
  ------------------
  651|   310k|        ++i)
  652|      0|        if (!grow_hashtable(h, h->wpd.neighborhood_len)) {
  ------------------
  |  Branch (652:13): [True: 0, False: 0]
  ------------------
  653|      0|            rc = -1;
  654|      0|            break;
  655|      0|        }
  656|       |
  657|   310k|    if (rc <= 0)
  ------------------
  |  Branch (657:9): [True: 0, False: 310k]
  ------------------
  658|      0|        free_value(newval);
  659|       |
  660|   310k|out:
  661|   310k|    return rc;
  662|   310k|}
ossl_ht_get:
  665|  2.76M|{
  666|  2.76M|    struct ht_mutable_data_st *md;
  667|  2.76M|    uint64_t hash;
  668|  2.76M|    uint64_t neigh_idx_start;
  669|  2.76M|    uint64_t neigh_idx;
  670|  2.76M|    struct ht_internal_value_st *ival = NULL;
  671|  2.76M|    size_t j;
  672|  2.76M|    uint64_t ehash;
  673|  2.76M|    int lockless_reads = h->config.lockless_reads;
  674|       |
  675|  2.76M|    hash = h->config.ht_hash_fn(key->keybuf, key->keysize);
  676|       |
  677|  2.76M|    md = ossl_rcu_deref(&h->md);
  ------------------
  |  |   30|  2.76M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  678|  2.76M|    neigh_idx = neigh_idx_start = hash & md->neighborhood_mask;
  679|  2.77M|    do {
  680|  2.77M|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   83|  2.77M|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  681|  3.58M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  105|  3.58M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  102|  3.58M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (681:21): [True: 3.57M, False: 13.2k]
  ------------------
  682|  3.57M|            ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   30|  3.57M|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  683|  3.57M|            if (ival == NULL) {
  ------------------
  |  Branch (683:17): [True: 532k, False: 3.04M]
  ------------------
  684|   532k|                if (lockless_reads)
  ------------------
  |  Branch (684:21): [True: 532k, False: 0]
  ------------------
  685|       |                    /* lockless_reads implies no deletion, we can break out */
  686|   532k|                    return NULL;
  687|      0|                continue;
  688|   532k|            }
  689|  3.04M|            if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (689:17): [True: 0, False: 3.04M]
  ------------------
  690|  3.04M|                    &ehash, h->atomic_lock))
  691|      0|                return NULL;
  692|  3.04M|            if (compare_hash(hash, ehash) && match_key(&ival->value.key, key))
  ------------------
  |  Branch (692:17): [True: 2.23M, False: 811k]
  |  Branch (692:46): [True: 2.23M, False: 0]
  ------------------
  693|  2.23M|                return (HT_VALUE *)ival;
  694|  3.04M|        }
  695|  13.2k|        if (!lockless_reads)
  ------------------
  |  Branch (695:13): [True: 0, False: 13.2k]
  ------------------
  696|      0|            break;
  697|       |        /* Continue search in subsequent neighborhoods */
  698|  13.2k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  699|  13.2k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (699:14): [True: 13.2k, False: 0]
  ------------------
  700|       |
  701|      0|    return NULL;
  702|  2.76M|}
hashtable.c:internal_free_nop:
  173|   310k|{
  174|   310k|    return;
  175|   310k|}
hashtable.c:alloc_new_neighborhood_list:
  156|  1.39k|{
  157|  1.39k|    struct ht_neighborhood_st *ret;
  158|       |
  159|  1.39k|    ret = OPENSSL_aligned_alloc_array(len, sizeof(struct ht_neighborhood_st),
  ------------------
  |  |  117|  1.39k|    CRYPTO_aligned_alloc_array(num, size, alignment, freeptr,      \
  |  |  118|  1.39k|        OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  160|  1.39k|        CACHE_LINE_BYTES, freeptr);
  161|       |
  162|       |    /* fall back to regular malloc */
  163|  1.39k|    if (ret == NULL) {
  ------------------
  |  Branch (163:9): [True: 0, False: 1.39k]
  ------------------
  164|      0|        ret = *freeptr = OPENSSL_malloc_array(len, sizeof(struct ht_neighborhood_st));
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  165|      0|        if (ret == NULL)
  ------------------
  |  Branch (165:13): [True: 0, False: 0]
  ------------------
  166|      0|            return NULL;
  167|      0|    }
  168|  1.39k|    memset(ret, 0, sizeof(struct ht_neighborhood_st) * len);
  169|  1.39k|    return ret;
  170|  1.39k|}
hashtable.c:ossl_ht_flush_internal:
  285|    695|{
  286|    695|    struct ht_mutable_data_st *newmd = NULL;
  287|    695|    struct ht_mutable_data_st *oldmd = NULL;
  288|       |
  289|    695|    newmd = OPENSSL_zalloc(sizeof(*newmd));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  290|    695|    if (newmd == NULL)
  ------------------
  |  Branch (290:9): [True: 0, False: 695]
  ------------------
  291|      0|        return 0;
  292|       |
  293|    695|    newmd->neighborhoods = alloc_new_neighborhood_list(DEFAULT_NEIGH_LEN,
  ------------------
  |  |   97|    695|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|    695|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  294|    695|        &newmd->neighborhood_ptr_to_free);
  295|    695|    if (newmd->neighborhoods == NULL) {
  ------------------
  |  Branch (295:9): [True: 0, False: 695]
  ------------------
  296|      0|        OPENSSL_free(newmd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|      0|        return 0;
  298|      0|    }
  299|       |
  300|    695|    newmd->neighborhood_mask = DEFAULT_NEIGH_LEN - 1;
  ------------------
  |  |   97|    695|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|    695|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  301|       |
  302|       |    /* Swap the old and new mutable data sets */
  303|    695|    oldmd = ossl_rcu_deref(&h->md);
  ------------------
  |  |   30|    695|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  304|    695|    ossl_rcu_assign_ptr(&h->md, &newmd);
  ------------------
  |  |   31|    695|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  305|       |
  306|       |    /* Set the number of entries to 0 */
  307|    695|    h->wpd.value_count = 0;
  308|    695|    h->wpd.neighborhood_len = DEFAULT_NEIGH_LEN;
  ------------------
  |  |   97|    695|#define DEFAULT_NEIGH_LEN (1 << DEFAULT_NEIGH_LEN_LOG)
  |  |  ------------------
  |  |  |  |   96|    695|#define DEFAULT_NEIGH_LEN_LOG 4
  |  |  ------------------
  ------------------
  309|       |
  310|    695|    ossl_rcu_call(h->lock, free_oldmd, oldmd);
  311|    695|    h->wpd.need_sync = 1;
  312|    695|    return 1;
  313|    695|}
hashtable.c:free_oldmd:
  263|    695|{
  264|    695|    struct ht_mutable_data_st *oldmd = arg;
  265|    695|    size_t i, j;
  266|    695|    size_t neighborhood_len = (size_t)oldmd->neighborhood_mask + 1;
  267|    695|    struct ht_internal_value_st *v;
  268|       |
  269|   356k|    for (i = 0; i < neighborhood_len; i++) {
  ------------------
  |  Branch (269:17): [True: 355k, False: 695]
  ------------------
  270|   355k|        PREFETCH_NEIGHBORHOOD(oldmd->neighborhoods[i + 1]);
  ------------------
  |  |   83|   355k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  271|  1.77M|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  105|  1.77M|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  102|  1.77M|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (271:21): [True: 1.42M, False: 355k]
  ------------------
  272|  1.42M|            if (oldmd->neighborhoods[i].entries[j].value != NULL) {
  ------------------
  |  Branch (272:17): [True: 310k, False: 1.11M]
  ------------------
  273|   310k|                v = oldmd->neighborhoods[i].entries[j].value;
  274|   310k|                v->ht->config.ht_free_fn((HT_VALUE *)v);
  275|   310k|                free_value(v);
  276|   310k|            }
  277|  1.42M|        }
  278|   355k|    }
  279|       |
  280|    695|    OPENSSL_free(oldmd->neighborhood_ptr_to_free);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|    695|    OPENSSL_free(oldmd);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  282|    695|}
hashtable.c:alloc_new_value:
  597|   310k|{
  598|   310k|    struct ht_internal_value_st *tmp;
  599|   310k|    size_t nvsize = sizeof(*tmp);
  600|       |
  601|   310k|    if (h->config.collision_check == 1)
  ------------------
  |  Branch (601:9): [True: 310k, False: 0]
  ------------------
  602|   310k|        nvsize += key->keysize;
  603|       |
  604|   310k|    tmp = OPENSSL_malloc(nvsize);
  ------------------
  |  |  106|   310k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  605|       |
  606|   310k|    if (tmp == NULL)
  ------------------
  |  Branch (606:9): [True: 0, False: 310k]
  ------------------
  607|      0|        return NULL;
  608|       |
  609|   310k|    tmp->ht = h;
  610|   310k|    tmp->value.value = data;
  611|   310k|    tmp->value.type_id = type;
  612|   310k|    tmp->value.key.keybuf = NULL;
  613|   310k|    if (h->config.collision_check) {
  ------------------
  |  Branch (613:9): [True: 310k, False: 0]
  ------------------
  614|   310k|        tmp->value.key.keybuf = (uint8_t *)(tmp + 1);
  615|   310k|        tmp->value.key.keysize = key->keysize;
  616|   310k|        memcpy(tmp->value.key.keybuf, key->keybuf, key->keysize);
  617|   310k|    }
  618|       |
  619|   310k|    return tmp;
  620|   310k|}
hashtable.c:ossl_ht_insert_locked:
  533|   310k|{
  534|   310k|    struct ht_mutable_data_st *md = h->md;
  535|   310k|    uint64_t neigh_idx_start = hash & md->neighborhood_mask;
  536|   310k|    uint64_t neigh_idx = neigh_idx_start;
  537|   310k|    size_t j;
  538|   310k|    uint64_t ihash;
  539|   310k|    HT_VALUE *ival;
  540|   310k|    size_t empty_idx = SIZE_MAX;
  541|   310k|    int lockless_reads = h->config.lockless_reads;
  542|       |
  543|   314k|    do {
  544|   314k|        PREFETCH_NEIGHBORHOOD(md->neighborhoods[neigh_idx]);
  ------------------
  |  |   83|   314k|#define PREFETCH_NEIGHBORHOOD(x) __builtin_prefetch(x.entries)
  ------------------
  545|       |
  546|   492k|        for (j = 0; j < NEIGHBORHOOD_LEN; j++) {
  ------------------
  |  |  105|   492k|#define NEIGHBORHOOD_LEN (CACHE_LINE_BYTES / sizeof(struct ht_neighborhood_entry_st))
  |  |  ------------------
  |  |  |  |  102|   492k|#define CACHE_LINE_BYTES 64
  |  |  ------------------
  ------------------
  |  Branch (546:21): [True: 489k, False: 3.69k]
  ------------------
  547|   489k|            ival = ossl_rcu_deref(&md->neighborhoods[neigh_idx].entries[j].value);
  ------------------
  |  |   30|   489k|#define ossl_rcu_deref(p) ossl_rcu_uptr_deref((void **)p)
  ------------------
  548|   489k|            if (ival == NULL) {
  ------------------
  |  Branch (548:17): [True: 310k, False: 178k]
  ------------------
  549|   310k|                empty_idx = j;
  550|       |                /* lockless_reads implies no deletion, we can break out */
  551|   310k|                if (lockless_reads)
  ------------------
  |  Branch (551:21): [True: 310k, False: 0]
  ------------------
  552|   310k|                    goto not_found;
  553|      0|                continue;
  554|   310k|            }
  555|   178k|            if (!CRYPTO_atomic_load(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (555:17): [True: 0, False: 178k]
  ------------------
  556|   178k|                    &ihash, h->atomic_lock))
  557|      0|                return 0;
  558|   178k|            if (compare_hash(hash, ihash) && match_key(&newval->value.key, &ival->key)) {
  ------------------
  |  Branch (558:17): [True: 0, False: 178k]
  |  Branch (558:46): [True: 0, False: 0]
  ------------------
  559|      0|                if (olddata == NULL) {
  ------------------
  |  Branch (559:21): [True: 0, False: 0]
  ------------------
  560|       |                    /* This would insert a duplicate -> fail */
  561|      0|                    return 0;
  562|      0|                }
  563|       |                /* Do a replacement */
  564|      0|                if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[j].hash,
  ------------------
  |  Branch (564:21): [True: 0, False: 0]
  ------------------
  565|      0|                        hash, h->atomic_lock))
  566|      0|                    return 0;
  567|      0|                *olddata = (HT_VALUE *)md->neighborhoods[neigh_idx].entries[j].value;
  568|      0|                ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[j].value,
  ------------------
  |  |   31|      0|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  569|      0|                    &newval);
  570|      0|                ossl_rcu_call(h->lock, free_old_ht_value, *olddata);
  571|      0|                h->wpd.need_sync = 1;
  572|      0|                return 1;
  573|      0|            }
  574|   178k|        }
  575|  3.69k|        if (!lockless_reads)
  ------------------
  |  Branch (575:13): [True: 0, False: 3.69k]
  ------------------
  576|      0|            break;
  577|       |        /* Continue search in subsequent neighborhoods */
  578|  3.69k|        neigh_idx = (neigh_idx + 1) & md->neighborhood_mask;
  579|  3.69k|    } while (neigh_idx != neigh_idx_start);
  ------------------
  |  Branch (579:14): [True: 3.69k, False: 0]
  ------------------
  580|       |
  581|   310k|not_found:
  582|       |    /* If we get to here, its just an insert */
  583|   310k|    if (empty_idx == SIZE_MAX)
  ------------------
  |  Branch (583:9): [True: 0, False: 310k]
  ------------------
  584|      0|        return -1; /* out of space */
  585|   310k|    if (!CRYPTO_atomic_store(&md->neighborhoods[neigh_idx].entries[empty_idx].hash,
  ------------------
  |  Branch (585:9): [True: 0, False: 310k]
  ------------------
  586|   310k|            hash, h->atomic_lock))
  587|      0|        return 0;
  588|   310k|    h->wpd.value_count++;
  589|   310k|    ossl_rcu_assign_ptr(&md->neighborhoods[neigh_idx].entries[empty_idx].value,
  ------------------
  |  |   31|   310k|#define ossl_rcu_assign_ptr(p, v) ossl_rcu_assign_uptr((void **)p, (void **)v)
  ------------------
  590|   310k|        &newval);
  591|   310k|    return 1;
  592|   310k|}
hashtable.c:free_value:
  623|   310k|{
  624|   310k|    OPENSSL_free(v);
  ------------------
  |  |  131|   310k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  625|   310k|}
hashtable.c:compare_hash:
  406|  3.22M|{
  407|  3.22M|    return (hash1 == hash2);
  408|  3.22M|}
hashtable.c:match_key:
  517|  2.23M|{
  518|       |    /*
  519|       |     * keys match if they are both present, the same size
  520|       |     * and compare equal in memory
  521|       |     */
  522|  2.23M|    PREFETCH(a->keybuf);
  ------------------
  |  |   84|  2.23M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  523|  2.23M|    PREFETCH(b->keybuf);
  ------------------
  |  |   84|  2.23M|#define PREFETCH(x) __builtin_prefetch(x)
  ------------------
  524|  2.23M|    if (a->keybuf != NULL && b->keybuf != NULL && a->keysize == b->keysize)
  ------------------
  |  Branch (524:9): [True: 2.23M, False: 0]
  |  Branch (524:30): [True: 2.23M, False: 0]
  |  Branch (524:51): [True: 2.23M, False: 0]
  ------------------
  525|  2.23M|        return !memcmp(a->keybuf, b->keybuf, a->keysize);
  526|       |
  527|      0|    return 1;
  528|  2.23M|}

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

ossl_indicator_set_callback_new:
   21|    695|{
   22|    695|    INDICATOR_CB *cb;
   23|       |
   24|    695|    cb = OPENSSL_zalloc(sizeof(*cb));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   25|    695|    return cb;
   26|    695|}
ossl_indicator_set_callback_free:
   29|    695|{
   30|    695|    OPENSSL_free(cb);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   31|    695|}

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

ossl_init_thread:
  266|      5|{
  267|      5|    if (CRYPTO_THREAD_compare_id(recursion_guard,
  ------------------
  |  Branch (267:9): [True: 1, False: 4]
  ------------------
  268|      5|            CRYPTO_THREAD_get_current_id()))
  269|      1|        return 1;
  270|      4|    if (!RUN_ONCE(&ossl_init_thread_runonce, ossl_init_thread_once))
  ------------------
  |  |  130|      4|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 4, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (270:9): [True: 0, False: 4]
  ------------------
  271|      0|        return 0;
  272|      4|    return 1;
  273|      4|}
ossl_cleanup_thread:
  276|      1|{
  277|       |    init_thread_deregister(NULL, 1);
  278|      1|    CRYPTO_THREAD_cleanup_local(&destructor_key.value);
  279|      1|    destructor_key.sane = -1;
  280|      1|}
OPENSSL_thread_stop:
  294|      1|{
  295|      1|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (295:9): [True: 1, False: 0]
  ------------------
  296|      1|        THREAD_EVENT_HANDLER **hands = clear_thread_local(NULL);
  297|       |
  298|      1|        init_thread_stop(NULL, hands);
  299|       |
  300|      1|        init_thread_remove_handlers(hands);
  301|      1|        OPENSSL_free(hands);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  302|       |
  303|      1|        CRYPTO_THREAD_clean_local();
  304|      1|    }
  305|      1|}
ossl_ctx_thread_stop:
  308|    695|{
  309|    695|    if (destructor_key.sane != -1) {
  ------------------
  |  Branch (309:9): [True: 695, False: 0]
  ------------------
  310|    695|        THREAD_EVENT_HANDLER **hands = fetch_thread_local(ctx);
  311|       |
  312|    695|        init_thread_stop(ctx, hands);
  313|    695|    }
  314|    695|}
ossl_init_thread_start:
  419|    501|{
  420|    501|    THREAD_EVENT_HANDLER **hands;
  421|    501|    THREAD_EVENT_HANDLER *hand;
  422|    501|    OSSL_LIB_CTX *ctx = NULL;
  423|       |#ifdef FIPS_MODULE
  424|       |    /*
  425|       |     * In FIPS mode the list of THREAD_EVENT_HANDLERs is unique per combination
  426|       |     * of OSSL_LIB_CTX and thread. This is because in FIPS mode each
  427|       |     * OSSL_LIB_CTX gets informed about thread stop events individually.
  428|       |     */
  429|       |
  430|       |    ctx = arg;
  431|       |#endif
  432|       |
  433|    501|    hands = alloc_thread_local(ctx);
  434|       |
  435|    501|    if (hands == NULL)
  ------------------
  |  Branch (435:9): [True: 0, False: 501]
  ------------------
  436|      0|        return 0;
  437|       |
  438|       |#ifdef FIPS_MODULE
  439|       |    if (*hands == NULL) {
  440|       |        /*
  441|       |         * We've not yet registered any handlers for this thread. We need to get
  442|       |         * libcrypto to tell us about later thread stop events. c_thread_start
  443|       |         * is a callback to libcrypto defined in fipsprov.c
  444|       |         */
  445|       |        if (!ossl_thread_register_fips(ctx))
  446|       |            return 0;
  447|       |    }
  448|       |#endif
  449|       |
  450|    501|    hand = OPENSSL_malloc(sizeof(*hand));
  ------------------
  |  |  106|    501|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|    501|    if (hand == NULL)
  ------------------
  |  Branch (451:9): [True: 0, False: 501]
  ------------------
  452|      0|        return 0;
  453|       |
  454|    501|    hand->handfn = handfn;
  455|    501|    hand->arg = arg;
  456|    501|#ifndef FIPS_MODULE
  457|    501|    hand->index = index;
  458|    501|#endif
  459|    501|    hand->next = *hands;
  460|    501|    *hands = hand;
  461|       |
  462|    501|    return 1;
  463|    501|}
ossl_init_thread_deregister:
  519|    931|{
  520|    931|    return init_thread_deregister(index, 0);
  521|    931|}
initthread.c:ossl_init_thread_once:
  250|      1|{
  251|       |    /* CRYPTO_THREAD_init_local() can call ossl_init_threads() again */
  252|      1|    recursion_guard = CRYPTO_THREAD_get_current_id();
  253|      1|    if (!CRYPTO_THREAD_init_local(&destructor_key.value,
  ------------------
  |  Branch (253:9): [True: 0, False: 1]
  ------------------
  254|      1|            init_thread_destructor))
  255|      0|        return 0;
  256|       |
  257|       |#if defined(OPENSSL_SYS_TANDEM)
  258|       |    memset(&recursion_guard, 0, sizeof(recursion_guard));
  259|       |#else
  260|      1|    recursion_guard = (CRYPTO_THREAD_ID)0;
  261|      1|#endif
  262|      1|    return 1;
  263|      1|}
initthread.c:clear_thread_local:
  166|      1|{
  167|      1|    return manage_thread_local(ctx, 0, 0);
  168|      1|}
initthread.c:manage_thread_local:
  137|  1.19k|{
  138|  1.19k|    THREAD_EVENT_HANDLER **hands = get_thread_event_handler(ctx);
  139|       |
  140|  1.19k|    if (alloc) {
  ------------------
  |  Branch (140:9): [True: 501, False: 696]
  ------------------
  141|    501|        if (hands == NULL) {
  ------------------
  |  Branch (141:13): [True: 1, False: 500]
  ------------------
  142|       |
  143|      1|            if ((hands = OPENSSL_zalloc(sizeof(*hands))) == NULL)
  ------------------
  |  |  108|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (143:17): [True: 0, False: 1]
  ------------------
  144|      0|                return NULL;
  145|       |
  146|      1|            if (!set_thread_event_handler(ctx, hands)) {
  ------------------
  |  Branch (146:17): [True: 0, False: 1]
  ------------------
  147|      0|                OPENSSL_free(hands);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|      0|                return NULL;
  149|      0|            }
  150|      1|#ifndef FIPS_MODULE
  151|      1|            if (!init_thread_push_handlers(hands)) {
  ------------------
  |  Branch (151:17): [True: 0, False: 1]
  ------------------
  152|      0|                set_thread_event_handler(ctx, NULL);
  153|      0|                OPENSSL_free(hands);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|      0|                return NULL;
  155|      0|            }
  156|      1|#endif
  157|      1|        }
  158|    696|    } else if (!keep) {
  ------------------
  |  Branch (158:16): [True: 1, False: 695]
  ------------------
  159|      1|        set_thread_event_handler(ctx, NULL);
  160|      1|    }
  161|       |
  162|  1.19k|    return hands;
  163|  1.19k|}
initthread.c:get_thread_event_handler:
  114|  1.19k|{
  115|       |#ifdef FIPS_MODULE
  116|       |    return CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx);
  117|       |#else
  118|  1.19k|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (118:9): [True: 1.19k, False: 0]
  ------------------
  119|  1.19k|        return CRYPTO_THREAD_get_local(&destructor_key.value);
  120|      0|    return NULL;
  121|  1.19k|#endif
  122|  1.19k|}
initthread.c:set_thread_event_handler:
  125|      2|{
  126|       |#ifdef FIPS_MODULE
  127|       |    return CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_TEVENT_KEY, ctx, hands);
  128|       |#else
  129|      2|    if (destructor_key.sane != -1)
  ------------------
  |  Branch (129:9): [True: 2, False: 0]
  ------------------
  130|      2|        return CRYPTO_THREAD_set_local(&destructor_key.value, hands);
  131|      0|    return 0;
  132|      2|#endif
  133|      2|}
initthread.c:init_thread_push_handlers:
  192|      1|{
  193|      1|    int ret;
  194|      1|    GLOBAL_TEVENT_REGISTER *gtr;
  195|       |
  196|      1|    gtr = get_global_tevent_register();
  197|      1|    if (gtr == NULL)
  ------------------
  |  Branch (197:9): [True: 0, False: 1]
  ------------------
  198|      0|        return 0;
  199|       |
  200|      1|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (200:9): [True: 0, False: 1]
  ------------------
  201|      0|        return 0;
  202|      1|    ret = (sk_THREAD_EVENT_HANDLER_PTR_push(gtr->skhands, hands) != 0);
  203|      1|    CRYPTO_THREAD_unlock(gtr->lock);
  204|       |
  205|      1|    return ret;
  206|      1|}
initthread.c:get_global_tevent_register:
   79|  1.62k|{
   80|  1.62k|    if (!RUN_ONCE(&tevent_register_runonce, create_global_tevent_register))
  ------------------
  |  |  130|  1.62k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1.62k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (80:9): [True: 0, False: 1.62k]
  ------------------
   81|      0|        return NULL;
   82|  1.62k|    return glob_tevent_reg;
   83|  1.62k|}
initthread.c:create_global_tevent_register:
   60|      1|{
   61|      1|    glob_tevent_reg = OPENSSL_zalloc(sizeof(*glob_tevent_reg));
  ------------------
  |  |  108|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   62|      1|    if (glob_tevent_reg == NULL)
  ------------------
  |  Branch (62:9): [True: 0, False: 1]
  ------------------
   63|      0|        return 0;
   64|       |
   65|      1|    glob_tevent_reg->skhands = sk_THREAD_EVENT_HANDLER_PTR_new_null();
   66|      1|    glob_tevent_reg->lock = CRYPTO_THREAD_lock_new();
   67|      1|    if (glob_tevent_reg->skhands == NULL || glob_tevent_reg->lock == NULL) {
  ------------------
  |  Branch (67:9): [True: 0, False: 1]
  |  Branch (67:45): [True: 0, False: 1]
  ------------------
   68|      0|        sk_THREAD_EVENT_HANDLER_PTR_free(glob_tevent_reg->skhands);
   69|      0|        CRYPTO_THREAD_lock_free(glob_tevent_reg->lock);
   70|      0|        OPENSSL_free(glob_tevent_reg);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|      0|        glob_tevent_reg = NULL;
   72|      0|        return 0;
   73|      0|    }
   74|       |
   75|      1|    return 1;
   76|      1|}
initthread.c:init_thread_remove_handlers:
  209|      1|{
  210|      1|    GLOBAL_TEVENT_REGISTER *gtr;
  211|      1|    int i;
  212|       |
  213|      1|    gtr = get_global_tevent_register();
  214|      1|    if (gtr == NULL)
  ------------------
  |  Branch (214:9): [True: 0, False: 1]
  ------------------
  215|      0|        return;
  216|      1|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (216:9): [True: 0, False: 1]
  ------------------
  217|      0|        return;
  218|      1|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (218:17): [True: 1, False: 0]
  ------------------
  219|      1|        THREAD_EVENT_HANDLER **hands
  220|      1|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  221|       |
  222|      1|        if (hands == handsin) {
  ------------------
  |  Branch (222:13): [True: 1, False: 0]
  ------------------
  223|      1|            sk_THREAD_EVENT_HANDLER_PTR_delete(gtr->skhands, i);
  224|      1|            CRYPTO_THREAD_unlock(gtr->lock);
  225|      1|            return;
  226|      1|        }
  227|      1|    }
  228|      0|    CRYPTO_THREAD_unlock(gtr->lock);
  229|      0|    return;
  230|      1|}
initthread.c:fetch_thread_local:
  171|    695|{
  172|    695|    return manage_thread_local(ctx, 0, 1);
  173|    695|}
initthread.c:init_thread_stop:
  375|    696|{
  376|    696|    THREAD_EVENT_HANDLER *curr, *prev = NULL, *tmp;
  377|    696|#ifndef FIPS_MODULE
  378|    696|    GLOBAL_TEVENT_REGISTER *gtr;
  379|    696|#endif
  380|       |
  381|       |    /* Can't do much about this */
  382|    696|    if (hands == NULL)
  ------------------
  |  Branch (382:9): [True: 1, False: 695]
  ------------------
  383|      1|        return;
  384|       |
  385|    695|#ifndef FIPS_MODULE
  386|    695|    gtr = get_global_tevent_register();
  387|    695|    if (gtr == NULL)
  ------------------
  |  Branch (387:9): [True: 0, False: 695]
  ------------------
  388|      0|        return;
  389|       |
  390|    695|    if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (390:9): [True: 0, False: 695]
  ------------------
  391|      0|        return;
  392|    695|#endif
  393|       |
  394|    695|    curr = *hands;
  395|  2.58k|    while (curr != NULL) {
  ------------------
  |  Branch (395:12): [True: 1.88k, False: 695]
  ------------------
  396|  1.88k|        if (arg != NULL && curr->arg != arg) {
  ------------------
  |  Branch (396:13): [True: 1.88k, False: 2]
  |  Branch (396:28): [True: 1.38k, False: 499]
  ------------------
  397|  1.38k|            prev = curr;
  398|  1.38k|            curr = curr->next;
  399|  1.38k|            continue;
  400|  1.38k|        }
  401|    501|        curr->handfn(curr->arg);
  402|    501|        if (prev == NULL)
  ------------------
  |  Branch (402:13): [True: 501, False: 0]
  ------------------
  403|    501|            *hands = curr->next;
  404|      0|        else
  405|      0|            prev->next = curr->next;
  406|       |
  407|    501|        tmp = curr;
  408|    501|        curr = curr->next;
  409|       |
  410|    501|        OPENSSL_free(tmp);
  ------------------
  |  |  131|    501|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  411|    501|    }
  412|    695|#ifndef FIPS_MODULE
  413|    695|    CRYPTO_THREAD_unlock(gtr->lock);
  414|    695|#endif
  415|    695|}
initthread.c:alloc_thread_local:
  176|    501|{
  177|    501|    return manage_thread_local(ctx, 1, 0);
  178|    501|}
initthread.c:init_thread_deregister:
  467|    932|{
  468|    932|    GLOBAL_TEVENT_REGISTER *gtr;
  469|    932|    int i;
  470|       |
  471|    932|    gtr = get_global_tevent_register();
  472|    932|    if (gtr == NULL)
  ------------------
  |  Branch (472:9): [True: 0, False: 932]
  ------------------
  473|      0|        return 0;
  474|    932|    if (!all) {
  ------------------
  |  Branch (474:9): [True: 931, False: 1]
  ------------------
  475|    931|        if (!CRYPTO_THREAD_write_lock(gtr->lock))
  ------------------
  |  Branch (475:13): [True: 0, False: 931]
  ------------------
  476|      0|            return 0;
  477|    931|    } else {
  478|      1|        glob_tevent_reg = NULL;
  479|      1|    }
  480|  1.86k|    for (i = 0; i < sk_THREAD_EVENT_HANDLER_PTR_num(gtr->skhands); i++) {
  ------------------
  |  Branch (480:17): [True: 930, False: 932]
  ------------------
  481|    930|        THREAD_EVENT_HANDLER **hands
  482|    930|            = sk_THREAD_EVENT_HANDLER_PTR_value(gtr->skhands, i);
  483|    930|        THREAD_EVENT_HANDLER *curr = NULL, *prev = NULL, *tmp;
  484|       |
  485|    930|        if (hands == NULL) {
  ------------------
  |  Branch (485:13): [True: 0, False: 930]
  ------------------
  486|      0|            if (!all)
  ------------------
  |  Branch (486:17): [True: 0, False: 0]
  ------------------
  487|      0|                CRYPTO_THREAD_unlock(gtr->lock);
  488|      0|            return 0;
  489|      0|        }
  490|    930|        curr = *hands;
  491|  2.79k|        while (curr != NULL) {
  ------------------
  |  Branch (491:16): [True: 1.86k, False: 930]
  ------------------
  492|  1.86k|            if (all || curr->index == index) {
  ------------------
  |  Branch (492:17): [True: 0, False: 1.86k]
  |  Branch (492:24): [True: 0, False: 1.86k]
  ------------------
  493|      0|                if (prev != NULL)
  ------------------
  |  Branch (493:21): [True: 0, False: 0]
  ------------------
  494|      0|                    prev->next = curr->next;
  495|      0|                else
  496|      0|                    *hands = curr->next;
  497|      0|                tmp = curr;
  498|      0|                curr = curr->next;
  499|      0|                OPENSSL_free(tmp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  500|      0|                continue;
  501|      0|            }
  502|  1.86k|            prev = curr;
  503|  1.86k|            curr = curr->next;
  504|  1.86k|        }
  505|    930|        if (all)
  ------------------
  |  Branch (505:13): [True: 0, False: 930]
  ------------------
  506|      0|            OPENSSL_free(hands);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  507|    930|    }
  508|    932|    if (all) {
  ------------------
  |  Branch (508:9): [True: 1, False: 931]
  ------------------
  509|      1|        CRYPTO_THREAD_lock_free(gtr->lock);
  510|      1|        sk_THREAD_EVENT_HANDLER_PTR_free(gtr->skhands);
  511|      1|        OPENSSL_free(gtr);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  512|    931|    } else {
  513|    931|        CRYPTO_THREAD_unlock(gtr->lock);
  514|    931|    }
  515|    932|    return 1;
  516|    932|}

OPENSSL_LH_set_thunks:
   52|   146k|{
   53|       |
   54|   146k|    if (lh == NULL)
  ------------------
  |  Branch (54:9): [True: 0, False: 146k]
  ------------------
   55|      0|        return NULL;
   56|   146k|    lh->compw = cw;
   57|   146k|    lh->hashw = hw;
   58|   146k|    lh->daw = daw;
   59|   146k|    lh->daaw = daaw;
   60|   146k|    return lh;
   61|   146k|}
OPENSSL_LH_new:
   64|   146k|{
   65|   146k|    OPENSSL_LHASH *ret;
   66|       |
   67|   146k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|   146k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (67:9): [True: 0, False: 146k]
  ------------------
   68|      0|        return NULL;
   69|   146k|    if ((ret->b = OPENSSL_calloc(MIN_NODES, sizeof(*ret->b))) == NULL)
  ------------------
  |  |  112|   146k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (69:9): [True: 0, False: 146k]
  ------------------
   70|      0|        goto err;
   71|   146k|    ret->comp = ((c == NULL) ? (OPENSSL_LH_COMPFUNC)strcmp : c);
  ------------------
  |  Branch (71:18): [True: 0, False: 146k]
  ------------------
   72|   146k|    ret->hash = ((h == NULL) ? (OPENSSL_LH_HASHFUNC)OPENSSL_LH_strhash : h);
  ------------------
  |  Branch (72:18): [True: 0, False: 146k]
  ------------------
   73|   146k|    ret->num_nodes = MIN_NODES / 2;
  ------------------
  |  |   39|   146k|#define MIN_NODES 16
  ------------------
   74|   146k|    ret->num_alloc_nodes = MIN_NODES;
  ------------------
  |  |   39|   146k|#define MIN_NODES 16
  ------------------
   75|   146k|    ret->pmax = MIN_NODES / 2;
  ------------------
  |  |   39|   146k|#define MIN_NODES 16
  ------------------
   76|   146k|    ret->up_load = UP_LOAD;
  ------------------
  |  |   40|   146k|#define UP_LOAD (2 * LH_LOAD_MULT) /* load times 256 (default 2) */
  |  |  ------------------
  |  |  |  |   92|   146k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   77|   146k|    ret->down_load = DOWN_LOAD;
  ------------------
  |  |   41|   146k|#define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */
  |  |  ------------------
  |  |  |  |   92|   146k|#define LH_LOAD_MULT 256
  |  |  ------------------
  ------------------
   78|   146k|    return ret;
   79|       |
   80|      0|err:
   81|      0|    OPENSSL_free(ret->b);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   82|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   83|       |    return NULL;
   84|   146k|}
OPENSSL_LH_free:
   87|   146k|{
   88|   146k|    if (lh == NULL)
  ------------------
  |  Branch (88:9): [True: 1, False: 146k]
  ------------------
   89|      1|        return;
   90|       |
   91|   146k|    OPENSSL_LH_flush(lh);
   92|   146k|    OPENSSL_free(lh->b);
  ------------------
  |  |  131|   146k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|   146k|    OPENSSL_free(lh);
  ------------------
  |  |  131|   146k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|   146k|}
OPENSSL_LH_flush:
   97|   146k|{
   98|   146k|    unsigned int i;
   99|   146k|    OPENSSL_LH_NODE *n, *nn;
  100|       |
  101|   146k|    if (lh == NULL)
  ------------------
  |  Branch (101:9): [True: 0, False: 146k]
  ------------------
  102|      0|        return;
  103|       |
  104|  1.32M|    for (i = 0; i < lh->num_nodes; i++) {
  ------------------
  |  Branch (104:17): [True: 1.17M, False: 146k]
  ------------------
  105|  1.17M|        n = lh->b[i];
  106|  1.20M|        while (n != NULL) {
  ------------------
  |  Branch (106:16): [True: 35.6k, False: 1.17M]
  ------------------
  107|  35.6k|            nn = n->next;
  108|  35.6k|            OPENSSL_free(n);
  ------------------
  |  |  131|  35.6k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  109|  35.6k|            n = nn;
  110|  35.6k|        }
  111|  1.17M|        lh->b[i] = NULL;
  112|  1.17M|    }
  113|       |
  114|   146k|    lh->num_items = 0;
  115|   146k|}
OPENSSL_LH_insert:
  118|  39.0k|{
  119|  39.0k|    unsigned long hash;
  120|  39.0k|    OPENSSL_LH_NODE *nn, **rn;
  121|  39.0k|    void *ret;
  122|       |
  123|  39.0k|    lh->error = 0;
  124|  39.0k|    if ((lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)) && !expand(lh))
  ------------------
  |  |   92|  39.0k|#define LH_LOAD_MULT 256
  ------------------
  |  Branch (124:9): [True: 1.39k, False: 37.6k]
  |  Branch (124:76): [True: 0, False: 1.39k]
  ------------------
  125|      0|        return NULL; /* 'lh->error++' already done in 'expand' */
  126|       |
  127|  39.0k|    rn = getrn(lh, data, &hash);
  128|       |
  129|  39.0k|    if (*rn == NULL) {
  ------------------
  |  Branch (129:9): [True: 35.9k, False: 3.13k]
  ------------------
  130|  35.9k|        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
  ------------------
  |  |  106|  35.9k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (130:13): [True: 0, False: 35.9k]
  ------------------
  131|      0|            lh->error++;
  132|      0|            return NULL;
  133|      0|        }
  134|  35.9k|        nn->data = data;
  135|  35.9k|        nn->next = NULL;
  136|  35.9k|        nn->hash = hash;
  137|  35.9k|        *rn = nn;
  138|  35.9k|        ret = NULL;
  139|  35.9k|        lh->num_items++;
  140|  35.9k|    } else { /* replace same key */
  141|  3.13k|        ret = (*rn)->data;
  142|  3.13k|        (*rn)->data = data;
  143|  3.13k|    }
  144|  39.0k|    return ret;
  145|  39.0k|}
OPENSSL_LH_delete:
  148|    242|{
  149|    242|    unsigned long hash;
  150|    242|    OPENSSL_LH_NODE *nn, **rn;
  151|    242|    void *ret;
  152|       |
  153|    242|    lh->error = 0;
  154|    242|    rn = getrn(lh, data, &hash);
  155|       |
  156|    242|    if (*rn == NULL) {
  ------------------
  |  Branch (156:9): [True: 0, False: 242]
  ------------------
  157|      0|        return NULL;
  158|    242|    } else {
  159|    242|        nn = *rn;
  160|    242|        *rn = nn->next;
  161|    242|        ret = nn->data;
  162|    242|        OPENSSL_free(nn);
  ------------------
  |  |  131|    242|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  163|    242|    }
  164|       |
  165|    242|    lh->num_items--;
  166|    242|    if ((lh->num_nodes > MIN_NODES) && (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  ------------------
  |  |   39|    242|#define MIN_NODES 16
  ------------------
                  if ((lh->num_nodes > MIN_NODES) && (lh->down_load >= (lh->num_items * LH_LOAD_MULT / lh->num_nodes)))
  ------------------
  |  |   92|    242|#define LH_LOAD_MULT 256
  ------------------
  |  Branch (166:9): [True: 242, False: 0]
  |  Branch (166:40): [True: 1, False: 241]
  ------------------
  167|      1|        contract(lh);
  168|       |
  169|    242|    return ret;
  170|    242|}
OPENSSL_LH_retrieve:
  173|  1.75M|{
  174|  1.75M|    unsigned long hash;
  175|  1.75M|    OPENSSL_LH_NODE **rn;
  176|       |
  177|  1.75M|    if (lh->error != 0)
  ------------------
  |  Branch (177:9): [True: 0, False: 1.75M]
  ------------------
  178|      0|        lh->error = 0;
  179|       |
  180|  1.75M|    rn = getrn(lh, data, &hash);
  181|       |
  182|  1.75M|    return *rn == NULL ? NULL : (*rn)->data;
  ------------------
  |  Branch (182:12): [True: 755k, False: 1.00M]
  ------------------
  183|  1.75M|}
OPENSSL_LH_doall:
  216|   144k|{
  217|   144k|    if (lh == NULL)
  ------------------
  |  Branch (217:9): [True: 0, False: 144k]
  ------------------
  218|      0|        return;
  219|       |
  220|   144k|    doall_util_fn(lh, 0, lh->daw, func, (OPENSSL_LH_DOALL_FUNCARG)NULL,
  221|   144k|        (OPENSSL_LH_DOALL_FUNCARG_THUNK)NULL, NULL);
  222|   144k|}
OPENSSL_LH_doall_arg_thunk:
  237|  1.05k|{
  238|  1.05k|    doall_util_fn(lh, 1, (OPENSSL_LH_DOALL_FUNC_THUNK)NULL,
  239|       |        (OPENSSL_LH_DOALL_FUNC)NULL, fn, daaw, arg);
  240|  1.05k|}
OPENSSL_LH_strhash:
  360|  1.21M|{
  361|  1.21M|    unsigned long ret = 0;
  362|  1.21M|    long n;
  363|  1.21M|    unsigned long v;
  364|  1.21M|    int r;
  365|       |
  366|  1.21M|    if ((c == NULL) || (*c == '\0'))
  ------------------
  |  Branch (366:9): [True: 0, False: 1.21M]
  |  Branch (366:24): [True: 242k, False: 975k]
  ------------------
  367|   242k|        return ret;
  368|       |
  369|   975k|    n = 0x100;
  370|  47.7M|    while (*c) {
  ------------------
  |  Branch (370:12): [True: 46.7M, False: 975k]
  ------------------
  371|  46.7M|        v = n | (*c);
  372|  46.7M|        n += 0x100;
  373|  46.7M|        r = (int)((v >> 2) ^ v) & 0x0f;
  374|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  375|  46.7M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  376|  46.7M|        ret &= 0xFFFFFFFFL;
  377|  46.7M|        ret ^= v * v;
  378|  46.7M|        c++;
  379|  46.7M|    }
  380|   975k|    return (ret >> 16) ^ ret;
  381|  1.21M|}
ossl_lh_strcasehash:
  398|   925k|{
  399|   925k|    unsigned long ret = 0;
  400|   925k|    long n;
  401|   925k|    unsigned long v;
  402|   925k|    int r;
  403|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  404|       |    const long int case_adjust = ~0x40;
  405|       |#else
  406|   925k|    const long int case_adjust = ~0x20;
  407|   925k|#endif
  408|       |
  409|   925k|    if (c == NULL || *c == '\0')
  ------------------
  |  Branch (409:9): [True: 0, False: 925k]
  |  Branch (409:22): [True: 0, False: 925k]
  ------------------
  410|      0|        return ret;
  411|       |
  412|  12.2M|    for (n = 0x100; *c != '\0'; n += 0x100) {
  ------------------
  |  Branch (412:21): [True: 11.3M, False: 925k]
  ------------------
  413|  11.3M|        v = n | (case_adjust & *c);
  414|  11.3M|        r = (int)((v >> 2) ^ v) & 0x0f;
  415|       |        /* cast to uint64_t to avoid 32 bit shift of 32 bit value */
  416|  11.3M|        ret = (ret << r) | (unsigned long)((uint64_t)ret >> (32 - r));
  417|  11.3M|        ret &= 0xFFFFFFFFL;
  418|  11.3M|        ret ^= v * v;
  419|  11.3M|        c++;
  420|  11.3M|    }
  421|   925k|    return (ret >> 16) ^ ret;
  422|   925k|}
OPENSSL_LH_num_items:
  425|    152|{
  426|    152|    return lh ? lh->num_items : 0;
  ------------------
  |  Branch (426:12): [True: 152, False: 0]
  ------------------
  427|    152|}
OPENSSL_LH_get_down_load:
  430|  2.09k|{
  431|  2.09k|    return lh->down_load;
  432|  2.09k|}
OPENSSL_LH_set_down_load:
  435|  4.19k|{
  436|  4.19k|    lh->down_load = down_load;
  437|  4.19k|}
OPENSSL_LH_error:
  440|  34.0k|{
  441|  34.0k|    return lh->error;
  442|  34.0k|}
lhash.c:doall_util_fn:
  191|   145k|{
  192|   145k|    int i;
  193|   145k|    OPENSSL_LH_NODE *a, *n;
  194|       |
  195|   145k|    if (lh == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 145k]
  ------------------
  196|      0|        return;
  197|       |
  198|       |    /*
  199|       |     * reverse the order so we search from 'top to bottom' We were having
  200|       |     * memory leaks otherwise
  201|       |     */
  202|  1.43M|    for (i = lh->num_nodes - 1; i >= 0; i--) {
  ------------------
  |  Branch (202:33): [True: 1.28M, False: 145k]
  ------------------
  203|  1.28M|        a = lh->b[i];
  204|  1.57M|        while (a != NULL) {
  ------------------
  |  Branch (204:16): [True: 289k, False: 1.28M]
  ------------------
  205|   289k|            n = a->next;
  206|   289k|            if (use_arg)
  ------------------
  |  Branch (206:17): [True: 255k, False: 34.3k]
  ------------------
  207|   255k|                wfunc_arg(a->data, arg, func_arg);
  208|  34.3k|            else
  209|  34.3k|                wfunc(a->data, func);
  210|   289k|            a = n;
  211|   289k|        }
  212|  1.28M|    }
  213|   145k|}
lhash.c:expand:
  243|  1.39k|{
  244|  1.39k|    OPENSSL_LH_NODE **n, **n1, **n2, *np;
  245|  1.39k|    unsigned int p, pmax, nni, j;
  246|  1.39k|    unsigned long hash;
  247|       |
  248|  1.39k|    nni = lh->num_alloc_nodes;
  249|  1.39k|    p = lh->p;
  250|  1.39k|    pmax = lh->pmax;
  251|  1.39k|    if (p + 1 >= pmax) {
  ------------------
  |  Branch (251:9): [True: 23, False: 1.37k]
  ------------------
  252|     23|        j = nni * 2;
  253|     23|        n = OPENSSL_realloc_array(lh->b, j, sizeof(OPENSSL_LH_NODE *));
  ------------------
  |  |  124|     23|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|     23|        if (n == NULL) {
  ------------------
  |  Branch (254:13): [True: 0, False: 23]
  ------------------
  255|      0|            lh->error++;
  256|      0|            return 0;
  257|      0|        }
  258|     23|        lh->b = n;
  259|     23|        memset(n + nni, 0, sizeof(*n) * (j - nni));
  260|     23|        lh->pmax = nni;
  261|     23|        lh->num_alloc_nodes = j;
  262|     23|        lh->p = 0;
  263|  1.37k|    } else {
  264|  1.37k|        lh->p++;
  265|  1.37k|    }
  266|       |
  267|  1.39k|    lh->num_nodes++;
  268|  1.39k|    n1 = &(lh->b[p]);
  269|  1.39k|    n2 = &(lh->b[p + pmax]);
  270|  1.39k|    *n2 = NULL;
  271|       |
  272|  5.43k|    for (np = *n1; np != NULL;) {
  ------------------
  |  Branch (272:20): [True: 4.04k, False: 1.39k]
  ------------------
  273|  4.04k|        hash = np->hash;
  274|  4.04k|        if ((hash % nni) != p) { /* move it */
  ------------------
  |  Branch (274:13): [True: 982, False: 3.05k]
  ------------------
  275|    982|            *n1 = (*n1)->next;
  276|    982|            np->next = *n2;
  277|    982|            *n2 = np;
  278|    982|        } else
  279|  3.05k|            n1 = &((*n1)->next);
  280|  4.04k|        np = *n1;
  281|  4.04k|    }
  282|       |
  283|  1.39k|    return 1;
  284|  1.39k|}
lhash.c:contract:
  287|      1|{
  288|      1|    OPENSSL_LH_NODE **n, *n1, *np;
  289|       |
  290|      1|    np = lh->b[lh->p + lh->pmax - 1];
  291|      1|    lh->b[lh->p + lh->pmax - 1] = NULL; /* 24/07-92 - eay - weird but :-( */
  292|      1|    if (lh->p == 0) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1]
  ------------------
  293|      0|        n = OPENSSL_realloc_array(lh->b, lh->pmax, sizeof(OPENSSL_LH_NODE *));
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  294|      0|        if (n == NULL) {
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|       |            /* fputs("realloc error in lhash", stderr); */
  296|      0|            lh->error++;
  297|      0|        } else {
  298|      0|            lh->b = n;
  299|      0|        }
  300|      0|        lh->num_alloc_nodes /= 2;
  301|      0|        lh->pmax /= 2;
  302|      0|        lh->p = lh->pmax - 1;
  303|      0|    } else
  304|      1|        lh->p--;
  305|       |
  306|      1|    lh->num_nodes--;
  307|       |
  308|      1|    n1 = lh->b[(int)lh->p];
  309|      1|    if (n1 == NULL)
  ------------------
  |  Branch (309:9): [True: 1, False: 0]
  ------------------
  310|      1|        lh->b[(int)lh->p] = np;
  311|      0|    else {
  312|      0|        while (n1->next != NULL)
  ------------------
  |  Branch (312:16): [True: 0, False: 0]
  ------------------
  313|      0|            n1 = n1->next;
  314|      0|        n1->next = np;
  315|      0|    }
  316|      1|}
lhash.c:getrn:
  320|  1.79M|{
  321|  1.79M|    OPENSSL_LH_NODE **ret, *n1;
  322|  1.79M|    unsigned long hash, nn;
  323|       |
  324|  1.79M|    if (lh->hashw != NULL)
  ------------------
  |  Branch (324:9): [True: 1.79M, False: 0]
  ------------------
  325|  1.79M|        hash = lh->hashw(data, lh->hash);
  326|      0|    else
  327|      0|        hash = lh->hash(data);
  328|       |
  329|  1.79M|    *rhash = hash;
  330|       |
  331|  1.79M|    nn = hash % lh->pmax;
  332|  1.79M|    if (nn < lh->p)
  ------------------
  |  Branch (332:9): [True: 400k, False: 1.39M]
  ------------------
  333|   400k|        nn = hash % lh->num_alloc_nodes;
  334|       |
  335|  1.79M|    ret = &(lh->b[(int)nn]);
  336|  2.99M|    for (n1 = *ret; n1 != NULL; n1 = n1->next) {
  ------------------
  |  Branch (336:21): [True: 2.20M, False: 791k]
  ------------------
  337|  2.20M|        if (n1->hash != hash) {
  ------------------
  |  Branch (337:13): [True: 1.20M, False: 1.00M]
  ------------------
  338|  1.20M|            ret = &(n1->next);
  339|  1.20M|            continue;
  340|  1.20M|        }
  341|       |
  342|  1.00M|        if (lh->compw != NULL) {
  ------------------
  |  Branch (342:13): [True: 1.00M, False: 0]
  ------------------
  343|  1.00M|            if (lh->compw(n1->data, data, lh->comp) == 0)
  ------------------
  |  Branch (343:17): [True: 1.00M, False: 470]
  ------------------
  344|  1.00M|                break;
  345|  1.00M|        } else {
  346|      0|            if (lh->comp(n1->data, data) == 0)
  ------------------
  |  Branch (346:17): [True: 0, False: 0]
  ------------------
  347|      0|                break;
  348|      0|        }
  349|    470|        ret = &(n1->next);
  350|    470|    }
  351|  1.79M|    return ret;
  352|  1.79M|}

MD5_Init:
   30|  2.81k|{
   31|  2.81k|    memset(c, 0, sizeof(*c));
   32|  2.81k|    c->A = INIT_DATA_A;
  ------------------
  |  |   24|  2.81k|#define INIT_DATA_A (unsigned long)0x67452301L
  ------------------
   33|  2.81k|    c->B = INIT_DATA_B;
  ------------------
  |  |   25|  2.81k|#define INIT_DATA_B (unsigned long)0xefcdab89L
  ------------------
   34|  2.81k|    c->C = INIT_DATA_C;
  ------------------
  |  |   26|  2.81k|#define INIT_DATA_C (unsigned long)0x98badcfeL
  ------------------
   35|  2.81k|    c->D = INIT_DATA_D;
  ------------------
  |  |   27|  2.81k|#define INIT_DATA_D (unsigned long)0x10325476L
  ------------------
   36|  2.81k|    return 1;
   37|  2.81k|}

CRYPTO_malloc:
  190|  53.3M|{
  191|  53.3M|    void *ptr;
  192|       |
  193|  53.3M|    INCREMENT(malloc_count);
  194|  53.3M|    if (malloc_impl != CRYPTO_malloc) {
  ------------------
  |  Branch (194:9): [True: 0, False: 53.3M]
  ------------------
  195|      0|        ptr = malloc_impl(num, file, line);
  196|      0|        if (ptr != NULL || num == 0)
  ------------------
  |  Branch (196:13): [True: 0, False: 0]
  |  Branch (196:28): [True: 0, False: 0]
  ------------------
  197|      0|            return ptr;
  198|      0|        goto err;
  199|      0|    }
  200|       |
  201|  53.3M|    if (ossl_unlikely(num == 0))
  ------------------
  |  |   23|  53.3M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 53.3M]
  |  |  ------------------
  ------------------
  202|      0|        return NULL;
  203|       |
  204|  53.3M|    FAILTEST();
  205|  53.3M|    if (allow_customize) {
  ------------------
  |  Branch (205:9): [True: 1, False: 53.3M]
  ------------------
  206|       |        /*
  207|       |         * Disallow customization after the first allocation. We only set this
  208|       |         * if necessary to avoid a store to the same cache line on every
  209|       |         * allocation.
  210|       |         */
  211|      1|        allow_customize = 0;
  212|      1|    }
  213|       |
  214|  53.3M|    ptr = malloc(num);
  215|  53.3M|    if (ossl_likely(ptr != NULL))
  ------------------
  |  |   22|  53.3M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 53.3M, False: 0]
  |  |  ------------------
  ------------------
  216|  53.3M|        return ptr;
  217|      0|err:
  218|      0|    ossl_report_alloc_err(file, line);
  219|       |    return NULL;
  220|  53.3M|}
CRYPTO_zalloc:
  223|  36.6M|{
  224|  36.6M|    void *ret;
  225|       |
  226|  36.6M|    ret = CRYPTO_malloc(num, file, line);
  227|  36.6M|    if (ret != NULL)
  ------------------
  |  Branch (227:9): [True: 36.6M, False: 0]
  ------------------
  228|  36.6M|        memset(ret, 0, num);
  229|       |
  230|  36.6M|    return ret;
  231|  36.6M|}
CRYPTO_aligned_alloc:
  235|  1.39k|{
  236|  1.39k|    size_t alloc_bytes;
  237|  1.39k|    void *ret;
  238|       |
  239|  1.39k|    *freeptr = NULL;
  240|       |
  241|       |#if defined(OPENSSL_SMALL_FOOTPRINT)
  242|       |    return NULL;
  243|       |#endif
  244|       |
  245|       |    /* Ensure that alignment is a power of two */
  246|  1.39k|    if (alignment == 0 || (alignment & (alignment - 1)) != 0) {
  ------------------
  |  Branch (246:9): [True: 0, False: 1.39k]
  |  Branch (246:27): [True: 0, False: 1.39k]
  ------------------
  247|      0|        ossl_report_alloc_err_inv(file, line);
  248|      0|        return NULL;
  249|      0|    }
  250|       |
  251|       |    /* Allow non-malloc() allocations as long as no malloc_impl is provided. */
  252|  1.39k|    if (malloc_impl == CRYPTO_malloc) {
  ------------------
  |  Branch (252:9): [True: 1.39k, False: 0]
  ------------------
  253|  1.39k|#if defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
  254|  1.39k|        int memalign_ret;
  255|       |
  256|       |        /* posix_memalign() requires alignment to be at least sizeof(void *) */
  257|  1.39k|        if (alignment < sizeof(void *))
  ------------------
  |  Branch (257:13): [True: 0, False: 1.39k]
  ------------------
  258|      0|            alignment = sizeof(void *);
  259|       |
  260|  1.39k|        if ((memalign_ret = posix_memalign(&ret, alignment, num))) {
  ------------------
  |  Branch (260:13): [True: 0, False: 1.39k]
  ------------------
  261|      0|            ret = NULL;
  262|      0|            switch (memalign_ret) {
  ------------------
  |  Branch (262:21): [True: 0, False: 0]
  ------------------
  263|      0|            case EINVAL:
  ------------------
  |  Branch (263:13): [True: 0, False: 0]
  ------------------
  264|      0|                ossl_report_alloc_err_inv(file, line);
  265|      0|                break;
  266|      0|            case ENOMEM:
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|                ossl_report_alloc_err(file, line);
  268|      0|                break;
  269|      0|            }
  270|      0|        }
  271|  1.39k|        *freeptr = ret;
  272|  1.39k|        return ret;
  273|  1.39k|#endif
  274|  1.39k|    }
  275|       |
  276|       |    /* we have to do this the hard way */
  277|       |
  278|       |    /*
  279|       |     * Note: Windows supports an _aligned_malloc call, but we choose
  280|       |     * not to use it here, because allocations from that function
  281|       |     * require that they be freed via _aligned_free.  Given that
  282|       |     * we can't differentiate plain malloc blocks from blocks obtained
  283|       |     * via _aligned_malloc, just avoid its use entirely
  284|       |     */
  285|       |
  286|      0|    if (ossl_unlikely(!ossl_size_add(num, alignment, &alloc_bytes, file, line)))
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  287|      0|        return NULL;
  288|       |
  289|       |    /*
  290|       |     * Step 1: Allocate an amount of memory that is <alignment>
  291|       |     * bytes bigger than requested
  292|       |     */
  293|      0|    *freeptr = CRYPTO_malloc(alloc_bytes, file, line);
  294|      0|    if (*freeptr == NULL)
  ------------------
  |  Branch (294:9): [True: 0, False: 0]
  ------------------
  295|      0|        return NULL;
  296|       |
  297|       |    /*
  298|       |     * Step 2: Add <alignment - 1> bytes to the pointer
  299|       |     * This will cross the alignment boundary that is
  300|       |     * requested
  301|       |     */
  302|      0|    ret = (void *)((char *)*freeptr + (alignment - 1));
  303|       |
  304|       |    /*
  305|       |     * Step 3: Use the alignment as a mask to translate the
  306|       |     * least significant bits of the allocation at the alignment
  307|       |     * boundary to 0.  ret now holds a pointer to the memory
  308|       |     * buffer at the requested alignment
  309|       |     * NOTE: It is a documented requirement that alignment be a
  310|       |     * power of 2, which is what allows this to work
  311|       |     */
  312|      0|    ret = (void *)((uintptr_t)ret & (uintptr_t)(~(alignment - 1)));
  313|      0|    return ret;
  314|      0|}
CRYPTO_realloc:
  317|  4.02M|{
  318|  4.02M|    void *ret;
  319|       |
  320|  4.02M|    INCREMENT(realloc_count);
  321|  4.02M|    if (realloc_impl != CRYPTO_realloc) {
  ------------------
  |  Branch (321:9): [True: 0, False: 4.02M]
  ------------------
  322|      0|        ret = realloc_impl(str, num, file, line);
  323|       |
  324|      0|        if (num == 0 || ret != NULL)
  ------------------
  |  Branch (324:13): [True: 0, False: 0]
  |  Branch (324:25): [True: 0, False: 0]
  ------------------
  325|      0|            return ret;
  326|       |
  327|      0|        goto err;
  328|      0|    }
  329|       |
  330|  4.02M|    if (str == NULL)
  ------------------
  |  Branch (330:9): [True: 3.52M, False: 497k]
  ------------------
  331|  3.52M|        return CRYPTO_malloc(num, file, line);
  332|       |
  333|   497k|    if (num == 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 497k]
  ------------------
  334|      0|        CRYPTO_free(str, file, line);
  335|      0|        return NULL;
  336|      0|    }
  337|       |
  338|   497k|    FAILTEST();
  339|   497k|    ret = realloc(str, num);
  340|       |
  341|   497k|err:
  342|   497k|    if (num != 0 && ret == NULL)
  ------------------
  |  Branch (342:9): [True: 497k, False: 0]
  |  Branch (342:21): [True: 0, False: 497k]
  ------------------
  343|      0|        ossl_report_alloc_err(file, line);
  344|       |
  345|   497k|    return ret;
  346|   497k|}
CRYPTO_clear_realloc:
  350|  2.26M|{
  351|  2.26M|    void *ret = NULL;
  352|       |
  353|  2.26M|    if (str == NULL)
  ------------------
  |  Branch (353:9): [True: 573k, False: 1.68M]
  ------------------
  354|   573k|        return CRYPTO_malloc(num, file, line);
  355|       |
  356|  1.68M|    if (num == 0) {
  ------------------
  |  Branch (356:9): [True: 0, False: 1.68M]
  ------------------
  357|      0|        CRYPTO_clear_free(str, old_len, file, line);
  358|      0|        return NULL;
  359|      0|    }
  360|       |
  361|       |    /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */
  362|  1.68M|    if (num < old_len) {
  ------------------
  |  Branch (362:9): [True: 0, False: 1.68M]
  ------------------
  363|      0|        OPENSSL_cleanse((char *)str + num, old_len - num);
  364|      0|        return str;
  365|      0|    }
  366|       |
  367|  1.68M|    ret = CRYPTO_malloc(num, file, line);
  368|  1.68M|    if (ret != NULL) {
  ------------------
  |  Branch (368:9): [True: 1.68M, False: 0]
  ------------------
  369|  1.68M|        memcpy(ret, str, old_len);
  370|  1.68M|        CRYPTO_clear_free(str, old_len, file, line);
  371|  1.68M|    }
  372|  1.68M|    return ret;
  373|  1.68M|}
CRYPTO_free:
  376|  69.8M|{
  377|  69.8M|    INCREMENT(free_count);
  378|  69.8M|    if (free_impl != CRYPTO_free) {
  ------------------
  |  Branch (378:9): [True: 0, False: 69.8M]
  ------------------
  379|      0|        free_impl(str, file, line);
  380|      0|        return;
  381|      0|    }
  382|       |
  383|  69.8M|    free(str);
  384|  69.8M|}
CRYPTO_clear_free:
  387|  5.04M|{
  388|  5.04M|    if (str == NULL)
  ------------------
  |  Branch (388:9): [True: 396k, False: 4.64M]
  ------------------
  389|   396k|        return;
  390|  4.64M|    if (num)
  ------------------
  |  Branch (390:9): [True: 4.64M, False: 0]
  ------------------
  391|  4.64M|        OPENSSL_cleanse(str, num);
  392|  4.64M|    CRYPTO_free(str, file, line);
  393|  4.64M|}

CRYPTO_secure_malloc_done:
  131|      1|{
  132|      1|#ifndef OPENSSL_NO_SECURE_MEMORY
  133|      1|    if (secure_mem_used == 0) {
  ------------------
  |  Branch (133:9): [True: 1, False: 0]
  ------------------
  134|      1|        sh_done();
  135|      1|        secure_mem_initialized = 0;
  136|      1|        CRYPTO_THREAD_lock_free(sec_malloc_lock);
  137|      1|        sec_malloc_lock = NULL;
  138|      1|        return 1;
  139|      1|    }
  140|      0|#endif /* OPENSSL_NO_SECURE_MEMORY */
  141|      0|    return 0;
  142|      1|}
CRYPTO_secure_malloc:
  154|  3.23k|{
  155|  3.23k|#ifndef OPENSSL_NO_SECURE_MEMORY
  156|  3.23k|    void *ret = NULL;
  157|  3.23k|    size_t actual_size;
  158|  3.23k|    int reason = CRYPTO_R_SECURE_MALLOC_FAILURE;
  ------------------
  |  |   45|  3.23k|#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
  ------------------
  159|       |
  160|  3.23k|    if (!secure_mem_initialized) {
  ------------------
  |  Branch (160:9): [True: 3.23k, False: 0]
  ------------------
  161|  3.23k|        return CRYPTO_malloc(num, file, line);
  162|  3.23k|    }
  163|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 0]
  ------------------
  164|      0|        reason = ERR_R_CRYPTO_LIB;
  ------------------
  |  |  328|      0|#define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  |  |  ------------------
  |  |               #define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  165|      0|        goto err;
  166|      0|    }
  167|      0|    ret = sh_malloc(num);
  168|      0|    actual_size = ret ? sh_actual_size(ret) : 0;
  ------------------
  |  Branch (168:19): [True: 0, False: 0]
  ------------------
  169|      0|    secure_mem_used += actual_size;
  170|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  171|      0|err:
  172|      0|    if (ret == NULL && (file != NULL || line != 0)) {
  ------------------
  |  Branch (172:9): [True: 0, False: 0]
  |  Branch (172:25): [True: 0, False: 0]
  |  Branch (172:41): [True: 0, False: 0]
  ------------------
  173|      0|        ERR_new();
  174|      0|        ERR_set_debug(file, line, NULL);
  175|      0|        ERR_set_error(ERR_LIB_CRYPTO, reason, NULL);
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
  176|      0|    }
  177|      0|    return ret;
  178|       |#else
  179|       |    return CRYPTO_malloc(num, file, line);
  180|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  181|      0|}
CRYPTO_secure_zalloc:
  184|  6.52k|{
  185|  6.52k|#ifndef OPENSSL_NO_SECURE_MEMORY
  186|  6.52k|    if (secure_mem_initialized)
  ------------------
  |  Branch (186:9): [True: 0, False: 6.52k]
  ------------------
  187|       |        /* CRYPTO_secure_malloc() zeroes allocations when it is implemented */
  188|      0|        return CRYPTO_secure_malloc(num, file, line);
  189|  6.52k|#endif
  190|  6.52k|    return CRYPTO_zalloc(num, file, line);
  191|  6.52k|}
CRYPTO_secure_free:
  194|  2.09k|{
  195|  2.09k|#ifndef OPENSSL_NO_SECURE_MEMORY
  196|  2.09k|    size_t actual_size;
  197|       |
  198|  2.09k|    if (ptr == NULL)
  ------------------
  |  Branch (198:9): [True: 28, False: 2.06k]
  ------------------
  199|     28|        return;
  200|  2.06k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (200:9): [True: 2.06k, False: 0]
  ------------------
  201|  2.06k|        CRYPTO_free(ptr, file, line);
  202|  2.06k|        return;
  203|  2.06k|    }
  204|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock))
  ------------------
  |  Branch (204:9): [True: 0, False: 0]
  ------------------
  205|      0|        return;
  206|      0|    actual_size = sh_actual_size(ptr);
  207|      0|    CLEAR(ptr, actual_size);
  ------------------
  |  |   81|      0|#define CLEAR(p, s) OPENSSL_cleanse(p, s)
  ------------------
  208|      0|    secure_mem_used -= actual_size;
  209|      0|    sh_free(ptr);
  210|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  211|       |#else
  212|       |    CRYPTO_free(ptr, file, line);
  213|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  214|      0|}
CRYPTO_secure_clear_free:
  218|  13.1k|{
  219|  13.1k|#ifndef OPENSSL_NO_SECURE_MEMORY
  220|  13.1k|    size_t actual_size;
  221|       |
  222|  13.1k|    if (ptr == NULL)
  ------------------
  |  Branch (222:9): [True: 5.44k, False: 7.69k]
  ------------------
  223|  5.44k|        return;
  224|  7.69k|    if (!CRYPTO_secure_allocated(ptr)) {
  ------------------
  |  Branch (224:9): [True: 7.69k, False: 0]
  ------------------
  225|  7.69k|        OPENSSL_cleanse(ptr, num);
  226|  7.69k|        CRYPTO_free(ptr, file, line);
  227|  7.69k|        return;
  228|  7.69k|    }
  229|      0|    if (!CRYPTO_THREAD_write_lock(sec_malloc_lock))
  ------------------
  |  Branch (229:9): [True: 0, False: 0]
  ------------------
  230|      0|        return;
  231|      0|    actual_size = sh_actual_size(ptr);
  232|      0|    CLEAR(ptr, actual_size);
  ------------------
  |  |   81|      0|#define CLEAR(p, s) OPENSSL_cleanse(p, s)
  ------------------
  233|      0|    secure_mem_used -= actual_size;
  234|      0|    sh_free(ptr);
  235|      0|    CRYPTO_THREAD_unlock(sec_malloc_lock);
  236|       |#else
  237|       |    if (ptr == NULL)
  238|       |        return;
  239|       |    OPENSSL_cleanse(ptr, num);
  240|       |    CRYPTO_free(ptr, file, line);
  241|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  242|      0|}
CRYPTO_secure_allocated:
  245|  12.2k|{
  246|  12.2k|#ifndef OPENSSL_NO_SECURE_MEMORY
  247|  12.2k|    if (!secure_mem_initialized)
  ------------------
  |  Branch (247:9): [True: 12.2k, False: 0]
  ------------------
  248|  12.2k|        return 0;
  249|       |    /*
  250|       |     * Only read accesses to the arena take place in sh_allocated() and this
  251|       |     * is only changed by the sh_init() and sh_done() calls which are not
  252|       |     * locked.  Hence, it is safe to make this check without a lock too.
  253|       |     */
  254|      0|    return sh_allocated(ptr);
  255|       |#else
  256|       |    return 0;
  257|       |#endif /* OPENSSL_NO_SECURE_MEMORY */
  258|  12.2k|}
mem_sec.c:sh_done:
  594|      1|{
  595|      1|    OPENSSL_free(sh.freelist);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  596|      1|    OPENSSL_free(sh.bittable);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  597|      1|    OPENSSL_free(sh.bitmalloc);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  598|      1|#if !defined(_WIN32)
  599|      1|    if (sh.map_result != MAP_FAILED && sh.map_size)
  ------------------
  |  Branch (599:9): [True: 1, False: 0]
  |  Branch (599:40): [True: 0, False: 1]
  ------------------
  600|      0|        munmap(sh.map_result, sh.map_size);
  601|       |#else
  602|       |    if (sh.map_result != NULL && sh.map_size)
  603|       |        VirtualFree(sh.map_result, 0, MEM_RELEASE);
  604|       |#endif
  605|      1|    memset(&sh, 0, sizeof(sh));
  606|      1|}

ossl_ml_kem_key_reset:
 1903|  1.23k|{
 1904|       |    /*
 1905|       |     * seedbuf can be allocated and contain |z| and |d| if the key is
 1906|       |     * being created from a private key encoding.  Similarly a pending
 1907|       |     * serialised (encoded) private key may be queued up to load.
 1908|       |     * Clear and free that data now.
 1909|       |     */
 1910|  1.23k|    if (key->seedbuf != NULL)
  ------------------
  |  Branch (1910:9): [True: 0, False: 1.23k]
  ------------------
 1911|      0|        OPENSSL_secure_clear_free(key->seedbuf, ML_KEM_SEED_BYTES);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1912|  1.23k|    if (ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  1.23k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 1913|      0|        OPENSSL_secure_clear_free(key->encoded_dk, key->vinfo->prvkey_bytes);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1914|       |
 1915|       |    /*-
 1916|       |     * Cleanse any sensitive data:
 1917|       |     * - The private vector |s| is immediately followed by the FO failure
 1918|       |     *   secret |z|, and seed |d|, we can cleanse all three in one call.
 1919|       |     */
 1920|  1.23k|    if (key->t != NULL) {
  ------------------
  |  Branch (1920:9): [True: 1.23k, False: 0]
  ------------------
 1921|  1.23k|        if (ossl_ml_kem_have_prvkey(key))
  ------------------
  |  |  208|  1.23k|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
 1922|  1.23k|            OPENSSL_secure_clear_free(key->s, key->vinfo->prvalloc);
  ------------------
  |  |  149|  1.23k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1923|  1.23k|        OPENSSL_free(key->t);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1924|  1.23k|    }
 1925|       |    key->d = key->z = key->seedbuf = key->encoded_dk = (uint8_t *)(key->s = key->m = key->t = NULL);
 1926|  1.23k|}
ossl_ml_kem_get_vinfo:
 1937|  2.47k|{
 1938|  2.47k|    switch (evp_type) {
  ------------------
  |  Branch (1938:13): [True: 2.47k, False: 0]
  ------------------
 1939|      0|    case EVP_PKEY_ML_KEM_512:
  ------------------
  |  |   93|      0|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  ------------------
  |  |  |  | 6636|      0|#define NID_ML_KEM_512          1454
  |  |  ------------------
  ------------------
  |  Branch (1939:5): [True: 0, False: 2.47k]
  ------------------
 1940|      0|        return &vinfo_map[ML_KEM_512_VINFO];
  ------------------
  |  |  177|      0|#define ML_KEM_512_VINFO 0
  ------------------
 1941|  2.47k|    case EVP_PKEY_ML_KEM_768:
  ------------------
  |  |  103|  2.47k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6641|  2.47k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
  |  Branch (1941:5): [True: 2.47k, False: 0]
  ------------------
 1942|  2.47k|        return &vinfo_map[ML_KEM_768_VINFO];
  ------------------
  |  |  178|  2.47k|#define ML_KEM_768_VINFO 1
  ------------------
 1943|      0|    case EVP_PKEY_ML_KEM_1024:
  ------------------
  |  |  113|      0|#define EVP_PKEY_ML_KEM_1024 NID_ML_KEM_1024
  |  |  ------------------
  |  |  |  | 6646|      0|#define NID_ML_KEM_1024         1456
  |  |  ------------------
  ------------------
  |  Branch (1943:5): [True: 0, False: 2.47k]
  ------------------
 1944|      0|        return &vinfo_map[ML_KEM_1024_VINFO];
  ------------------
  |  |  179|      0|#define ML_KEM_1024_VINFO 2
  ------------------
 1945|  2.47k|    }
 1946|      0|    return NULL;
 1947|  2.47k|}
ossl_ml_kem_key_new:
 1951|  1.23k|{
 1952|  1.23k|    const ML_KEM_VINFO *vinfo = ossl_ml_kem_get_vinfo(evp_type);
 1953|  1.23k|    ML_KEM_KEY *key;
 1954|       |
 1955|  1.23k|    if (vinfo == NULL) {
  ------------------
  |  Branch (1955:9): [True: 0, False: 1.23k]
  ------------------
 1956|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1957|      0|            "unsupported ML-KEM key type: %d", evp_type);
 1958|      0|        return NULL;
 1959|      0|    }
 1960|       |
 1961|  1.23k|    if ((key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  106|  1.23k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1961:9): [True: 0, False: 1.23k]
  ------------------
 1962|      0|        return NULL;
 1963|       |
 1964|  1.23k|    key->vinfo = vinfo;
 1965|  1.23k|    key->libctx = libctx;
 1966|  1.23k|    key->prov_flags = ML_KEM_KEY_PROV_FLAGS_DEFAULT;
  ------------------
  |  |  132|  1.23k|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  123|  1.23k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  125|  1.23k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_PREFER_SEED | ML_KEM_KEY_RETAIN_SEED)
  |  |  ------------------
  |  |  |  |  126|  1.23k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  |  |  ------------------
  ------------------
 1967|  1.23k|    key->shake128_md = EVP_MD_fetch(libctx, "SHAKE128", properties);
 1968|  1.23k|    key->shake256_md = EVP_MD_fetch(libctx, "SHAKE256", properties);
 1969|  1.23k|    key->sha3_256_md = EVP_MD_fetch(libctx, "SHA3-256", properties);
 1970|  1.23k|    key->sha3_512_md = EVP_MD_fetch(libctx, "SHA3-512", properties);
 1971|  1.23k|    key->d = key->z = key->rho = key->pkhash = key->encoded_dk = key->seedbuf = NULL;
 1972|  1.23k|    key->s = key->m = key->t = NULL;
 1973|       |
 1974|  1.23k|    if (key->shake128_md != NULL
  ------------------
  |  Branch (1974:9): [True: 1.23k, False: 0]
  ------------------
 1975|  1.23k|        && key->shake256_md != NULL
  ------------------
  |  Branch (1975:12): [True: 1.23k, False: 0]
  ------------------
 1976|  1.23k|        && key->sha3_256_md != NULL
  ------------------
  |  Branch (1976:12): [True: 1.23k, False: 0]
  ------------------
 1977|  1.23k|        && key->sha3_512_md != NULL)
  ------------------
  |  Branch (1977:12): [True: 1.23k, False: 0]
  ------------------
 1978|  1.23k|        return key;
 1979|       |
 1980|      0|    ossl_ml_kem_key_free(key);
 1981|      0|    ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                  ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1982|      0|        "missing SHA3 digest algorithms while creating %s key",
 1983|      0|        vinfo->algorithm_name);
 1984|       |    return NULL;
 1985|  1.23k|}
ossl_ml_kem_key_free:
 2053|  1.23k|{
 2054|  1.23k|    if (key == NULL)
  ------------------
  |  Branch (2054:9): [True: 0, False: 1.23k]
  ------------------
 2055|      0|        return;
 2056|       |
 2057|  1.23k|    EVP_MD_free(key->shake128_md);
 2058|  1.23k|    EVP_MD_free(key->shake256_md);
 2059|  1.23k|    EVP_MD_free(key->sha3_256_md);
 2060|  1.23k|    EVP_MD_free(key->sha3_512_md);
 2061|       |
 2062|  1.23k|    ossl_ml_kem_key_reset(key);
 2063|  1.23k|    OPENSSL_free(key);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2064|  1.23k|}
ossl_ml_kem_encode_public_key:
 2069|  1.23k|{
 2070|  1.23k|    if (!ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  2.47k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (2070:9): [True: 0, False: 1.23k]
  ------------------
 2071|  1.23k|        || len != key->vinfo->pubkey_bytes)
  ------------------
  |  Branch (2071:12): [True: 0, False: 1.23k]
  ------------------
 2072|      0|        return 0;
 2073|  1.23k|    encode_pubkey(out, key);
 2074|  1.23k|    return 1;
 2075|  1.23k|}
ossl_ml_kem_genkey:
 2191|  1.23k|{
 2192|  1.23k|    uint8_t seed[ML_KEM_SEED_BYTES];
 2193|  1.23k|    EVP_MD_CTX *mdctx = NULL;
 2194|  1.23k|    const ML_KEM_VINFO *vinfo;
 2195|  1.23k|    int ret = 0;
 2196|       |
 2197|  1.23k|    if (key == NULL
  ------------------
  |  Branch (2197:9): [True: 0, False: 1.23k]
  ------------------
 2198|  1.23k|        || ossl_ml_kem_have_pubkey(key)
  ------------------
  |  |  207|  2.47k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 2199|  1.23k|        || ossl_ml_kem_have_dkenc(key))
  ------------------
  |  |  210|  1.23k|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 2200|      0|        return 0;
 2201|  1.23k|    vinfo = key->vinfo;
 2202|       |
 2203|  1.23k|    if (pubenc != NULL && publen != vinfo->pubkey_bytes)
  ------------------
  |  Branch (2203:9): [True: 0, False: 1.23k]
  |  Branch (2203:27): [True: 0, False: 0]
  ------------------
 2204|      0|        return 0;
 2205|       |
 2206|  1.23k|    if (key->seedbuf != NULL) {
  ------------------
  |  Branch (2206:9): [True: 0, False: 1.23k]
  ------------------
 2207|      0|        if (!ossl_ml_kem_encode_seed(seed, sizeof(seed), key))
  ------------------
  |  Branch (2207:13): [True: 0, False: 0]
  ------------------
 2208|      0|            return 0;
 2209|      0|        ossl_ml_kem_key_reset(key);
 2210|  1.23k|    } else if (RAND_priv_bytes_ex(key->libctx, seed, sizeof(seed),
  ------------------
  |  Branch (2210:16): [True: 0, False: 1.23k]
  ------------------
 2211|  1.23k|                   key->vinfo->secbits)
 2212|  1.23k|        <= 0) {
 2213|      0|        return 0;
 2214|      0|    }
 2215|       |
 2216|  1.23k|    if ((mdctx = EVP_MD_CTX_new()) == NULL)
  ------------------
  |  Branch (2216:9): [True: 0, False: 1.23k]
  ------------------
 2217|      0|        return 0;
 2218|       |
 2219|       |    /*
 2220|       |     * Data derived from (d, z) defaults secret, and to avoid side-channel
 2221|       |     * leaks should not influence control flow.
 2222|       |     */
 2223|  1.23k|    CONSTTIME_SECRET(seed, ML_KEM_SEED_BYTES);
 2224|       |
 2225|  1.23k|    if (add_storage(OPENSSL_malloc(vinfo->puballoc),
  ------------------
  |  |  106|  1.23k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (2225:9): [True: 1.23k, False: 0]
  ------------------
 2226|  1.23k|            OPENSSL_secure_malloc(vinfo->prvalloc), 1, key))
  ------------------
  |  |  139|  1.23k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2227|  1.23k|        ret = genkey(seed, mdctx, pubenc, key);
 2228|  1.23k|    OPENSSL_cleanse(seed, sizeof(seed));
 2229|       |
 2230|       |    /* Declassify secret inputs and derived outputs before returning control */
 2231|  1.23k|    CONSTTIME_DECLASSIFY(seed, ML_KEM_SEED_BYTES);
 2232|       |
 2233|  1.23k|    EVP_MD_CTX_free(mdctx);
 2234|  1.23k|    if (!ret) {
  ------------------
  |  Branch (2234:9): [True: 0, False: 1.23k]
  ------------------
 2235|      0|        ossl_ml_kem_key_reset(key);
 2236|      0|        return 0;
 2237|      0|    }
 2238|       |
 2239|       |    /* The public components are already declassified */
 2240|  1.23k|    CONSTTIME_DECLASSIFY(key->s, vinfo->rank * sizeof(scalar));
 2241|  1.23k|    CONSTTIME_DECLASSIFY(key->z, 2 * ML_KEM_RANDOM_BYTES);
 2242|  1.23k|    return 1;
 2243|  1.23k|}
ml_kem.c:add_storage:
 1862|  1.23k|{
 1863|  1.23k|    int rank = key->vinfo->rank;
 1864|       |
 1865|  1.23k|    if (pub == NULL || (private && priv == NULL)) {
  ------------------
  |  Branch (1865:9): [True: 0, False: 1.23k]
  |  Branch (1865:25): [True: 1.23k, False: 0]
  |  Branch (1865:36): [True: 0, False: 1.23k]
  ------------------
 1866|       |        /*
 1867|       |         * One of these could be allocated correctly. It is legal to call free with a NULL
 1868|       |         * pointer, so always attempt to free both allocations here
 1869|       |         */
 1870|      0|        OPENSSL_free(pub);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1871|      0|        OPENSSL_secure_free(priv);
  ------------------
  |  |  147|      0|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1872|      0|        return 0;
 1873|      0|    }
 1874|       |
 1875|       |    /*
 1876|       |     * We're adding key material, set up rho and pkhash to point to the rho_pkhash buffer
 1877|       |     */
 1878|  1.23k|    memset(key->rho_pkhash, 0, sizeof(key->rho_pkhash));
 1879|  1.23k|    key->rho = key->rho_pkhash;
 1880|  1.23k|    key->pkhash = key->rho_pkhash + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1881|  1.23k|    key->d = key->z = NULL;
 1882|       |
 1883|       |    /* A public key needs space for |t| and |m| */
 1884|  1.23k|    key->m = (key->t = pub) + rank;
 1885|       |
 1886|       |    /*
 1887|       |     * A private key also needs space for |s| and |z|.
 1888|       |     * The |z| buffer always includes additional space for |d|, but a key's |d|
 1889|       |     * pointer is left NULL when parsed from the NIST format, which omits that
 1890|       |     * information.  Only keys generated from a (d, z) seed pair will have a
 1891|       |     * non-NULL |d| pointer.
 1892|       |     */
 1893|  1.23k|    if (private)
  ------------------
  |  Branch (1893:9): [True: 1.23k, False: 0]
  ------------------
 1894|  1.23k|        key->z = (uint8_t *)(rank + (key->s = priv));
 1895|  1.23k|    return 1;
 1896|  1.23k|}
ml_kem.c:encode_pubkey:
 1568|  1.23k|{
 1569|  1.23k|    const uint8_t *rho = key->rho;
 1570|  1.23k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1571|       |
 1572|  1.23k|    vector_encode(out, key->t, 12, vinfo->rank);
 1573|  1.23k|    memcpy(out + vinfo->vector_bytes, rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1574|  1.23k|}
ml_kem.c:vector_encode:
 1221|  1.23k|{
 1222|  1.23k|    int stride = bits * DEGREE / 8;
  ------------------
  |  |   41|  1.23k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  1.23k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1223|       |
 1224|  4.94k|    for (; rank-- > 0; out += stride)
  ------------------
  |  Branch (1224:12): [True: 3.70k, False: 1.23k]
  ------------------
 1225|  3.70k|        scalar_encode(out, a++, bits);
 1226|  1.23k|}
ml_kem.c:scalar_encode:
  973|  7.41k|{
  974|  7.41k|    const uint16_t *curr = s->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  7.41k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  7.41k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  975|  7.41k|    uint64_t accum = 0, element;
  976|  7.41k|    int used = 0;
  977|       |
  978|  1.89M|    do {
  979|  1.89M|        element = *curr++;
  980|  1.89M|        if (used + bits < 64) {
  ------------------
  |  Branch (980:13): [True: 1.54M, False: 355k]
  ------------------
  981|  1.54M|            accum |= element << used;
  982|  1.54M|            used += bits;
  983|  1.54M|        } else if (used + bits > 64) {
  ------------------
  |  Branch (983:20): [True: 237k, False: 118k]
  ------------------
  984|   237k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  985|   237k|            accum = element >> (64 - used);
  986|   237k|            used = (used + bits) - 64;
  987|   237k|        } else {
  988|   118k|            out = OPENSSL_store_u64_le(out, accum | (element << used));
  989|   118k|            accum = 0;
  990|   118k|            used = 0;
  991|   118k|        }
  992|  1.89M|    } while (curr < end);
  ------------------
  |  Branch (992:14): [True: 1.88M, False: 7.41k]
  ------------------
  993|  7.41k|}
ml_kem.c:single_keccak:
  672|  8.64k|{
  673|  8.64k|    unsigned int sz = (unsigned int)outlen;
  674|       |
  675|  8.64k|    if (!EVP_DigestUpdate(mdctx, in, inlen))
  ------------------
  |  Branch (675:9): [True: 0, False: 8.64k]
  ------------------
  676|      0|        return 0;
  677|  8.64k|    if (EVP_MD_xof(EVP_MD_CTX_get0_md(mdctx)))
  ------------------
  |  Branch (677:9): [True: 7.41k, False: 1.23k]
  ------------------
  678|  7.41k|        return EVP_DigestFinalXOF(mdctx, out, outlen);
  679|  1.23k|    return EVP_DigestFinal_ex(mdctx, out, &sz)
  ------------------
  |  Branch (679:12): [True: 1.23k, False: 0]
  ------------------
  680|  1.23k|        && ossl_assert((size_t)sz == outlen);
  ------------------
  |  |   52|  1.23k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 1.23k, False: 0]
  |  |  ------------------
  |  |   53|  1.23k|    __FILE__, __LINE__)
  ------------------
  681|  8.64k|}
ml_kem.c:matrix_expand:
 1317|  1.23k|{
 1318|  1.23k|    scalar *out = key->m;
 1319|  1.23k|    uint8_t input[ML_KEM_RANDOM_BYTES + 2];
 1320|  1.23k|    int rank = key->vinfo->rank;
 1321|  1.23k|    int i, j;
 1322|       |
 1323|  1.23k|    memcpy(input, key->rho, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1324|  4.94k|    for (i = 0; i < rank; i++) {
  ------------------
  |  Branch (1324:17): [True: 3.70k, False: 1.23k]
  ------------------
 1325|  14.8k|        for (j = 0; j < rank; j++) {
  ------------------
  |  Branch (1325:21): [True: 11.1k, False: 3.70k]
  ------------------
 1326|  11.1k|            input[ML_KEM_RANDOM_BYTES] = i;
  ------------------
  |  |   47|  11.1k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1327|  11.1k|            input[ML_KEM_RANDOM_BYTES + 1] = j;
  ------------------
  |  |   47|  11.1k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1328|  11.1k|            if (!EVP_DigestInit_ex(mdctx, key->shake128_md, NULL)
  ------------------
  |  Branch (1328:17): [True: 0, False: 11.1k]
  ------------------
 1329|  11.1k|                || !EVP_DigestUpdate(mdctx, input, sizeof(input))
  ------------------
  |  Branch (1329:20): [True: 0, False: 11.1k]
  ------------------
 1330|  11.1k|                || !sample_scalar(out++, mdctx))
  ------------------
  |  Branch (1330:20): [True: 0, False: 11.1k]
  ------------------
 1331|      0|                return 0;
 1332|  11.1k|        }
 1333|  3.70k|    }
 1334|  1.23k|    return 1;
 1335|  1.23k|}
ml_kem.c:sample_scalar:
  767|  11.1k|{
  768|  11.1k|    uint16_t *curr = out->c, *endout = curr + DEGREE;
  ------------------
  |  |   41|  11.1k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  11.1k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  769|  11.1k|    uint8_t buf[SCALAR_SAMPLING_BUFSIZE], *in;
  770|  11.1k|    uint8_t *endin = buf + sizeof(buf);
  771|  11.1k|    uint16_t d;
  772|  11.1k|    uint8_t b1, b2, b3;
  773|       |
  774|  33.4k|    do {
  775|  33.4k|        if (!EVP_DigestSqueeze(mdctx, in = buf, sizeof(buf)))
  ------------------
  |  Branch (775:13): [True: 0, False: 33.4k]
  ------------------
  776|      0|            return 0;
  777|  1.75M|        do {
  778|  1.75M|            b1 = *in++;
  779|  1.75M|            b2 = *in++;
  780|  1.75M|            b3 = *in++;
  781|       |
  782|  1.75M|            if (curr >= endout)
  ------------------
  |  Branch (782:17): [True: 5.50k, False: 1.75M]
  ------------------
  783|  5.50k|                break;
  784|  1.75M|            if ((d = ((b2 & 0x0f) << 8) + b1) < kPrime)
  ------------------
  |  Branch (784:17): [True: 1.42M, False: 328k]
  ------------------
  785|  1.42M|                *curr++ = d;
  786|  1.75M|            if (curr >= endout)
  ------------------
  |  Branch (786:17): [True: 5.57k, False: 1.74M]
  ------------------
  787|  5.57k|                break;
  788|  1.74M|            if ((d = (b3 << 4) + (b2 >> 4)) < kPrime)
  ------------------
  |  Branch (788:17): [True: 1.42M, False: 328k]
  ------------------
  789|  1.42M|                *curr++ = d;
  790|  1.74M|        } while (in < endin);
  ------------------
  |  Branch (790:18): [True: 1.72M, False: 22.3k]
  ------------------
  791|  33.4k|    } while (curr < endout);
  ------------------
  |  Branch (791:14): [True: 22.3k, False: 11.1k]
  ------------------
  792|  11.1k|    return 1;
  793|  11.1k|}
ml_kem.c:genkey:
 1693|  1.23k|{
 1694|  1.23k|    uint8_t hashed[2 * ML_KEM_RANDOM_BYTES];
 1695|  1.23k|    const uint8_t *const sigma = hashed + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1696|  1.23k|    uint8_t augmented_seed[ML_KEM_RANDOM_BYTES + 1];
 1697|  1.23k|    const ML_KEM_VINFO *vinfo = key->vinfo;
 1698|  1.23k|    CBD_FUNC cbd_1 = CBD1(vinfo->evp_type);
  ------------------
  |  | 1470|  1.23k|#define CBD1(evp_type) ((evp_type) == EVP_PKEY_ML_KEM_512 ? cbd_3 : cbd_2)
  |  |  ------------------
  |  |  |  |   93|  1.23k|#define EVP_PKEY_ML_KEM_512 NID_ML_KEM_512
  |  |  |  |  ------------------
  |  |  |  |  |  | 6636|  1.23k|#define NID_ML_KEM_512          1454
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (1470:25): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
 1699|  1.23k|    int rank = vinfo->rank;
 1700|  1.23k|    uint8_t counter = 0;
 1701|  1.23k|    int ret = 0;
 1702|       |
 1703|       |    /*
 1704|       |     * Use the "d" seed salted with the rank to derive the public and private
 1705|       |     * seeds rho and sigma.
 1706|       |     */
 1707|  1.23k|    memcpy(augmented_seed, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1708|  1.23k|    augmented_seed[ML_KEM_RANDOM_BYTES] = (uint8_t)rank;
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1709|  1.23k|    if (!hash_g(hashed, augmented_seed, sizeof(augmented_seed), mdctx, key))
  ------------------
  |  Branch (1709:9): [True: 0, False: 1.23k]
  ------------------
 1710|      0|        goto end;
 1711|  1.23k|    memcpy(key->rho, hashed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1712|       |    /* The |rho| matrix seed is public */
 1713|  1.23k|    CONSTTIME_DECLASSIFY(key->rho, ML_KEM_RANDOM_BYTES);
 1714|       |
 1715|       |    /* FIPS 203 |e| vector is initial value of key->t */
 1716|  1.23k|    if (!matrix_expand(mdctx, key)
  ------------------
  |  Branch (1716:9): [True: 0, False: 1.23k]
  ------------------
 1717|  1.23k|        || !gencbd_vector_ntt(key->s, cbd_1, &counter, sigma, rank, mdctx, key)
  ------------------
  |  Branch (1717:12): [True: 0, False: 1.23k]
  ------------------
 1718|  1.23k|        || !gencbd_vector_ntt(key->t, cbd_1, &counter, sigma, rank, mdctx, key))
  ------------------
  |  Branch (1718:12): [True: 0, False: 1.23k]
  ------------------
 1719|      0|        goto end;
 1720|       |
 1721|       |    /* To |e| we now add the product of transpose |m| and |s|, giving |t|. */
 1722|  1.23k|    matrix_mult_transpose_add(key->t, key->m, key->s, rank);
 1723|       |    /* The |t| vector is public */
 1724|  1.23k|    CONSTTIME_DECLASSIFY(key->t, vinfo->rank * sizeof(scalar));
 1725|       |
 1726|  1.23k|    if (pubenc == NULL) {
  ------------------
  |  Branch (1726:9): [True: 1.23k, False: 0]
  ------------------
 1727|       |        /* Incremental digest of public key without in-full serialisation. */
 1728|  1.23k|        if (!hash_h_pubkey(key->pkhash, mdctx, key))
  ------------------
  |  Branch (1728:13): [True: 0, False: 1.23k]
  ------------------
 1729|      0|            goto end;
 1730|  1.23k|    } else {
 1731|      0|        encode_pubkey(pubenc, key);
 1732|      0|        if (!hash_h(key->pkhash, pubenc, vinfo->pubkey_bytes, mdctx, key))
  ------------------
  |  Branch (1732:13): [True: 0, False: 0]
  ------------------
 1733|      0|            goto end;
 1734|      0|    }
 1735|       |
 1736|       |    /* Save |z| portion of seed for "implicit rejection" on failure. */
 1737|  1.23k|    memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
                  memcpy(key->z, seed + ML_KEM_RANDOM_BYTES, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1738|       |
 1739|       |    /* Optionally save the |d| portion of the seed */
 1740|  1.23k|    key->d = key->z + ML_KEM_RANDOM_BYTES;
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1741|  1.23k|    if (key->prov_flags & ML_KEM_KEY_RETAIN_SEED) {
  ------------------
  |  |  126|  1.23k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  |  Branch (1741:9): [True: 1.23k, False: 0]
  ------------------
 1742|  1.23k|        memcpy(key->d, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1743|  1.23k|    } else {
 1744|      0|        OPENSSL_cleanse(key->d, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1745|      0|        key->d = NULL;
 1746|      0|    }
 1747|       |
 1748|  1.23k|    ret = 1;
 1749|  1.23k|end:
 1750|  1.23k|    OPENSSL_cleanse((void *)augmented_seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1751|  1.23k|    OPENSSL_cleanse((void *)sigma, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1752|  1.23k|    if (ret == 0) {
  ------------------
  |  Branch (1752:9): [True: 0, False: 1.23k]
  ------------------
 1753|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1754|      0|            "internal error while generating %s private key",
 1755|      0|            vinfo->algorithm_name);
 1756|      0|    }
 1757|  1.23k|    return ret;
 1758|  1.23k|}
ml_kem.c:prf:
  689|  7.41k|{
  690|  7.41k|    return EVP_DigestInit_ex(mdctx, key->shake256_md, NULL)
  ------------------
  |  Branch (690:12): [True: 7.41k, False: 0]
  ------------------
  691|  7.41k|        && single_keccak(out, len, in, ML_KEM_RANDOM_BYTES + 1, mdctx);
  ------------------
  |  |   47|  7.41k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (691:12): [True: 7.41k, False: 0]
  ------------------
  692|  7.41k|}
ml_kem.c:cbd_2:
 1347|  7.41k|{
 1348|  7.41k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  7.41k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  7.41k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
 1349|  7.41k|    uint8_t randbuf[4 * DEGREE / 8], *r = randbuf; /* 64 * eta slots */
 1350|  7.41k|    uint16_t value, mask;
 1351|  7.41k|    uint8_t b;
 1352|       |
 1353|  7.41k|    if (!prf(randbuf, sizeof(randbuf), in, mdctx, key))
  ------------------
  |  Branch (1353:9): [True: 0, False: 7.41k]
  ------------------
 1354|      0|        return 0;
 1355|       |
 1356|   948k|    do {
 1357|   948k|        b = *r++;
 1358|       |
 1359|       |        /*
 1360|       |         * Add |kPrime| if |value| underflowed.  See |constish_time_non_zero|
 1361|       |         * for a discussion on why the value barrier is by default omitted.
 1362|       |         * While this could have been written reduce_once(value + kPrime), this
 1363|       |         * is one extra addition and small range of |value| tempts some
 1364|       |         * versions of Clang to emit a branch.
 1365|       |         */
 1366|   948k|        value = bit0(b) + bitn(1, b);
  ------------------
  |  |   34|   948k|#define bit0(b) ((b) & 1)
  ------------------
                      value = bit0(b) + bitn(1, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1367|   948k|        value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(2, b) + bitn(3, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1368|   948k|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|   948k|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1369|   948k|        *curr++ = value + (kPrime & mask);
 1370|       |
 1371|   948k|        value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value = bitn(4, b) + bitn(5, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1372|   948k|        value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
                      value -= bitn(6, b) + bitn(7, b);
  ------------------
  |  |   35|   948k|#define bitn(n, b) (((b) >> n) & 1)
  ------------------
 1373|   948k|        mask = constish_time_non_zero(value >> 15);
  ------------------
  |  |   70|   948k|#define constish_time_non_zero(b) (0u - (b))
  ------------------
 1374|   948k|        *curr++ = value + (kPrime & mask);
 1375|   948k|    } while (curr < end);
  ------------------
  |  Branch (1375:14): [True: 941k, False: 7.41k]
  ------------------
 1376|  7.41k|    return 1;
 1377|  7.41k|}
ml_kem.c:hash_g:
  738|  1.23k|{
  739|  1.23k|    return EVP_DigestInit_ex(mdctx, key->sha3_512_md, NULL)
  ------------------
  |  Branch (739:12): [True: 1.23k, False: 0]
  ------------------
  740|  1.23k|        && single_keccak(out, ML_KEM_SEED_BYTES, in, len, mdctx);
  ------------------
  |  |   48|  1.23k|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (740:12): [True: 1.23k, False: 0]
  ------------------
  741|  1.23k|}
ml_kem.c:gencbd_vector_ntt:
 1456|  2.47k|{
 1457|  2.47k|    uint8_t input[ML_KEM_RANDOM_BYTES + 1];
 1458|       |
 1459|  2.47k|    memcpy(input, seed, ML_KEM_RANDOM_BYTES);
  ------------------
  |  |   47|  2.47k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1460|  7.41k|    do {
 1461|  7.41k|        input[ML_KEM_RANDOM_BYTES] = (*counter)++;
  ------------------
  |  |   47|  7.41k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
 1462|  7.41k|        if (!cbd(out, input, mdctx, key))
  ------------------
  |  Branch (1462:13): [True: 0, False: 7.41k]
  ------------------
 1463|      0|            return 0;
 1464|  7.41k|        scalar_ntt(out++);
 1465|  7.41k|    } while (--rank > 0);
  ------------------
  |  Branch (1465:14): [True: 4.94k, False: 2.47k]
  ------------------
 1466|  2.47k|    return 1;
 1467|  2.47k|}
ml_kem.c:scalar_ntt:
  846|  7.41k|{
  847|  7.41k|    const uint16_t *roots = kNTTRoots;
  848|  7.41k|    uint16_t *end = s->c + DEGREE;
  ------------------
  |  |   41|  7.41k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  7.41k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  849|  7.41k|    int offset = DEGREE / 2;
  ------------------
  |  |   41|  7.41k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  7.41k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  850|       |
  851|  51.8k|    do {
  852|  51.8k|        uint16_t *curr = s->c, *peer;
  853|       |
  854|   941k|        do {
  855|   941k|            uint16_t *pause = curr + offset, even, odd;
  856|   941k|            uint32_t zeta = *++roots;
  857|       |
  858|   941k|            peer = pause;
  859|  6.63M|            do {
  860|  6.63M|                even = *curr;
  861|  6.63M|                odd = reduce(*peer * zeta);
  862|  6.63M|                *peer++ = reduce_once(even - odd + kPrime);
  863|  6.63M|                *curr++ = reduce_once(odd + even);
  864|  6.63M|            } while (curr < pause);
  ------------------
  |  Branch (864:22): [True: 5.69M, False: 941k]
  ------------------
  865|   941k|        } while ((curr = peer) < end);
  ------------------
  |  Branch (865:18): [True: 889k, False: 51.8k]
  ------------------
  866|  51.8k|    } while ((offset >>= 1) >= 2);
  ------------------
  |  Branch (866:14): [True: 44.4k, False: 7.41k]
  ------------------
  867|  7.41k|}
ml_kem.c:reduce:
  817|  10.9M|{
  818|  10.9M|    uint64_t product = (uint64_t)x * kBarrettMultiplier;
  819|  10.9M|    uint32_t quotient = (uint32_t)(product >> kBarrettShift);
  820|  10.9M|    uint32_t remainder = x - quotient * kPrime;
  821|       |
  822|  10.9M|    return reduce_once(remainder);
  823|  10.9M|}
ml_kem.c:reduce_once:
  803|  24.1M|{
  804|  24.1M|    const uint16_t subtracted = x - kPrime;
  805|  24.1M|    uint16_t mask = constish_time_non_zero(subtracted >> 15);
  ------------------
  |  |   70|  24.1M|#define constish_time_non_zero(b) (0u - (b))
  ------------------
  806|       |
  807|  24.1M|    return (mask & x) | (~mask & subtracted);
  808|  24.1M|}
ml_kem.c:matrix_mult_transpose_add:
 1298|  1.23k|{
 1299|  1.23k|    const scalar *mc = m, *mr, *ar;
 1300|  1.23k|    int i, j;
 1301|       |
 1302|  4.94k|    for (i = rank; i-- > 0; ++out) {
  ------------------
  |  Branch (1302:20): [True: 3.70k, False: 1.23k]
  ------------------
 1303|  3.70k|        scalar_mult_add(out, mr = mc++, ar = a);
 1304|  11.1k|        for (j = rank; --j > 0;)
  ------------------
  |  Branch (1304:24): [True: 7.41k, False: 3.70k]
  ------------------
 1305|  7.41k|            scalar_mult_add(out, (mr += rank), ++ar);
 1306|  3.70k|    }
 1307|  1.23k|}
ml_kem.c:scalar_mult_add:
  951|  11.1k|{
  952|  11.1k|    uint16_t *curr = out->c, *end = curr + DEGREE;
  ------------------
  |  |   41|  11.1k|#define DEGREE ML_KEM_DEGREE
  |  |  ------------------
  |  |  |  |   19|  11.1k|#define ML_KEM_DEGREE 256
  |  |  ------------------
  ------------------
  953|  11.1k|    const uint16_t *lc = lhs->c, *rc = rhs->c;
  954|  11.1k|    const uint16_t *roots = kModRoots;
  955|       |
  956|  1.42M|    do {
  957|  1.42M|        uint32_t l0 = *lc++, r0 = *rc++;
  958|  1.42M|        uint32_t l1 = *lc++, r1 = *rc++;
  959|  1.42M|        uint16_t *c0 = curr++;
  960|  1.42M|        uint16_t *c1 = curr++;
  961|  1.42M|        uint32_t zetapow = *roots++;
  962|       |
  963|  1.42M|        *c0 = reduce(*c0 + l0 * r0 + reduce(l1 * r1) * zetapow);
  964|  1.42M|        *c1 = reduce(*c1 + l0 * r1 + l1 * r0);
  965|  1.42M|    } while (curr < end);
  ------------------
  |  Branch (965:14): [True: 1.41M, False: 11.1k]
  ------------------
  966|  11.1k|}
ml_kem.c:hash_h_pubkey:
  709|  1.23k|{
  710|  1.23k|    const ML_KEM_VINFO *vinfo = key->vinfo;
  711|  1.23k|    const scalar *t = key->t, *end = t + vinfo->rank;
  712|  1.23k|    unsigned int sz;
  713|       |
  714|  1.23k|    if (!EVP_DigestInit_ex(mdctx, key->sha3_256_md, NULL))
  ------------------
  |  Branch (714:9): [True: 0, False: 1.23k]
  ------------------
  715|      0|        return 0;
  716|       |
  717|  3.70k|    do {
  718|  3.70k|        uint8_t buf[3 * DEGREE / 2];
  719|       |
  720|  3.70k|        scalar_encode(buf, t++, 12);
  721|  3.70k|        if (!EVP_DigestUpdate(mdctx, buf, sizeof(buf)))
  ------------------
  |  Branch (721:13): [True: 0, False: 3.70k]
  ------------------
  722|      0|            return 0;
  723|  3.70k|    } while (t < end);
  ------------------
  |  Branch (723:14): [True: 2.47k, False: 1.23k]
  ------------------
  724|       |
  725|  1.23k|    if (!EVP_DigestUpdate(mdctx, key->rho, ML_KEM_RANDOM_BYTES))
  ------------------
  |  |   47|  1.23k|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  ------------------
  |  Branch (725:9): [True: 0, False: 1.23k]
  ------------------
  726|      0|        return 0;
  727|  1.23k|    return EVP_DigestFinal_ex(mdctx, pkhash, &sz)
  ------------------
  |  Branch (727:12): [True: 1.23k, False: 0]
  ------------------
  728|  1.23k|        && ossl_assert(sz == ML_KEM_PKHASH_BYTES);
  ------------------
  |  |   52|  1.23k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:24): [True: 1.23k, False: 0]
  |  |  ------------------
  |  |   53|  1.23k|    __FILE__, __LINE__)
  ------------------
  729|  1.23k|}

CRYPTO_ctr128_encrypt_ctr32:
  155|  24.7k|{
  156|  24.7k|    unsigned int n, ctr32;
  157|       |
  158|  24.7k|    n = *num;
  159|       |
  160|  24.7k|    while (n && len) {
  ------------------
  |  Branch (160:12): [True: 0, False: 24.7k]
  |  Branch (160:17): [True: 0, False: 0]
  ------------------
  161|      0|        *(out++) = *(in++) ^ ecount_buf[n];
  162|      0|        --len;
  163|      0|        n = (n + 1) % 16;
  164|      0|    }
  165|       |
  166|  24.7k|    ctr32 = GETU32(ivec + 12);
  ------------------
  |  |   98|  24.7k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  167|  41.3k|    while (len >= 16) {
  ------------------
  |  Branch (167:12): [True: 16.5k, False: 24.7k]
  ------------------
  168|  16.5k|        size_t blocks = len / 16;
  169|       |        /*
  170|       |         * 1<<28 is just a not-so-small yet not-so-large number...
  171|       |         * Below condition is practically never met, but it has to
  172|       |         * be checked for code correctness.
  173|       |         */
  174|  16.5k|        if (sizeof(size_t) > sizeof(unsigned int) && blocks > (1U << 28))
  ------------------
  |  Branch (174:13): [True: 16.5k, Folded]
  |  Branch (174:54): [True: 0, False: 16.5k]
  ------------------
  175|      0|            blocks = (1U << 28);
  176|       |        /*
  177|       |         * As (*func) operates on 32-bit counter, caller
  178|       |         * has to handle overflow. 'if' below detects the
  179|       |         * overflow, which is then handled by limiting the
  180|       |         * amount of blocks to the exact overflow point...
  181|       |         */
  182|  16.5k|        ctr32 += (u32)blocks;
  183|  16.5k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (183:13): [True: 0, False: 16.5k]
  ------------------
  184|      0|            blocks -= ctr32;
  185|      0|            ctr32 = 0;
  186|      0|        }
  187|  16.5k|        (*func)(in, out, blocks, key, ivec);
  188|       |        /* (*ctr) does not update ivec, caller does: */
  189|  16.5k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  16.5k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  190|       |        /* ... overflow was detected, propagate carry. */
  191|  16.5k|        if (ctr32 == 0)
  ------------------
  |  Branch (191:13): [True: 0, False: 16.5k]
  ------------------
  192|      0|            ctr96_inc(ivec);
  193|  16.5k|        blocks *= 16;
  194|  16.5k|        len -= blocks;
  195|  16.5k|        out += blocks;
  196|  16.5k|        in += blocks;
  197|  16.5k|    }
  198|  24.7k|    if (len) {
  ------------------
  |  Branch (198:9): [True: 8.20k, False: 16.5k]
  ------------------
  199|  8.20k|        memset(ecount_buf, 0, 16);
  200|  8.20k|        (*func)(ecount_buf, ecount_buf, 1, key, ivec);
  201|  8.20k|        ++ctr32;
  202|  8.20k|        PUTU32(ivec + 12, ctr32);
  ------------------
  |  |   99|  8.20k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  203|  8.20k|        if (ctr32 == 0)
  ------------------
  |  Branch (203:13): [True: 0, False: 8.20k]
  ------------------
  204|      0|            ctr96_inc(ivec);
  205|  41.0k|        while (len--) {
  ------------------
  |  Branch (205:16): [True: 32.8k, False: 8.20k]
  ------------------
  206|  32.8k|            out[n] = in[n] ^ ecount_buf[n];
  207|  32.8k|            ++n;
  208|  32.8k|        }
  209|  8.20k|    }
  210|       |
  211|  24.7k|    *num = n;
  212|  24.7k|}

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

CRYPTO_strdup:
   23|   862k|{
   24|   862k|    char *ret;
   25|   862k|    size_t len;
   26|       |
   27|   862k|    if (str == NULL)
  ------------------
  |  Branch (27:9): [True: 53, False: 862k]
  ------------------
   28|     53|        return NULL;
   29|       |
   30|   862k|    len = strlen(str) + 1;
   31|   862k|    ret = CRYPTO_malloc(len, file, line);
   32|   862k|    if (ret != NULL)
  ------------------
  |  Branch (32:9): [True: 862k, False: 0]
  ------------------
   33|   862k|        memcpy(ret, str, len);
   34|   862k|    return ret;
   35|   862k|}
CRYPTO_strndup:
   38|   145k|{
   39|   145k|    size_t maxlen;
   40|   145k|    char *ret;
   41|       |
   42|   145k|    if (str == NULL)
  ------------------
  |  Branch (42:9): [True: 0, False: 145k]
  ------------------
   43|      0|        return NULL;
   44|       |
   45|   145k|    maxlen = OPENSSL_strnlen(str, s);
   46|       |
   47|   145k|    ret = CRYPTO_malloc(maxlen + 1, file, line);
   48|   145k|    if (ret) {
  ------------------
  |  Branch (48:9): [True: 145k, False: 0]
  ------------------
   49|   145k|        memcpy(ret, str, maxlen);
   50|   145k|        ret[maxlen] = CH_ZERO;
  ------------------
  |  |   20|   145k|#define CH_ZERO '\0'
  ------------------
   51|   145k|    }
   52|   145k|    return ret;
   53|   145k|}
CRYPTO_memdup:
   56|  5.91k|{
   57|  5.91k|    void *ret;
   58|       |
   59|  5.91k|    if (data == NULL || siz >= INT_MAX)
  ------------------
  |  Branch (59:9): [True: 0, False: 5.91k]
  |  Branch (59:25): [True: 0, False: 5.91k]
  ------------------
   60|      0|        return NULL;
   61|       |
   62|  5.91k|    ret = CRYPTO_malloc(siz, file, line);
   63|  5.91k|    if (ret == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 5.91k]
  ------------------
   64|      0|        return NULL;
   65|  5.91k|    return memcpy(ret, data, siz);
   66|  5.91k|}
OPENSSL_strnlen:
   69|   293k|{
   70|   293k|    const char *p;
   71|       |
   72|  42.7M|    for (p = str; maxlen-- != 0 && *p != CH_ZERO; ++p)
  ------------------
  |  |   20|  42.5M|#define CH_ZERO '\0'
  ------------------
  |  Branch (72:19): [True: 42.5M, False: 145k]
  |  Branch (72:36): [True: 42.4M, False: 147k]
  ------------------
   73|  42.4M|        ;
   74|       |
   75|   293k|    return p - str;
   76|   293k|}
OPENSSL_strlcpy:
   79|  1.11M|{
   80|  1.11M|    size_t l = 0;
   81|  8.23M|    for (; size > 1 && *src; size--) {
  ------------------
  |  Branch (81:12): [True: 8.23M, False: 0]
  |  Branch (81:24): [True: 7.11M, False: 1.11M]
  ------------------
   82|  7.11M|        *dst++ = *src++;
   83|  7.11M|        l++;
   84|  7.11M|    }
   85|  1.11M|    if (size)
  ------------------
  |  Branch (85:9): [True: 1.11M, False: 0]
  ------------------
   86|  1.11M|        *dst = CH_ZERO;
  ------------------
  |  |   20|  1.11M|#define CH_ZERO '\0'
  ------------------
   87|  1.11M|    return l + strlen(src);
   88|  1.11M|}
OPENSSL_strlcat:
   91|     20|{
   92|     20|    size_t l = 0;
   93|    130|    for (; size > 0 && *dst; size--, dst++)
  ------------------
  |  Branch (93:12): [True: 130, False: 0]
  |  Branch (93:24): [True: 110, False: 20]
  ------------------
   94|    110|        l++;
   95|     20|    return l + OPENSSL_strlcpy(dst, src, size);
   96|     20|}
openssl_strerror_r:
  377|     13|{
  378|       |#if defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_WIN32_WCE)
  379|       |    return !strerror_s(buf, buflen, errnum);
  380|       |#elif defined(_GNU_SOURCE)
  381|       |    char *err;
  382|       |
  383|       |    /*
  384|       |     * GNU strerror_r may not actually set buf.
  385|       |     * It can return a pointer to some (immutable) static string in which case
  386|       |     * buf is left unused.
  387|       |     */
  388|       |    err = strerror_r(errnum, buf, buflen);
  389|       |    if (err == NULL || buflen == 0)
  390|       |        return 0;
  391|       |    /*
  392|       |     * If err is statically allocated, err != buf and we need to copy the data.
  393|       |     * If err points somewhere inside buf, OPENSSL_strlcpy can handle this,
  394|       |     * since src and dest are not annotated with __restrict and the function
  395|       |     * reads src byte for byte and writes to dest.
  396|       |     * If err == buf we do not have to copy anything.
  397|       |     */
  398|       |    if (err != buf)
  399|       |        OPENSSL_strlcpy(buf, err, buflen);
  400|       |    return 1;
  401|       |#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
  402|       |    /*
  403|       |     * We can use "real" strerror_r. The OpenSSL version differs in that it
  404|       |     * gives 1 on success and 0 on failure for consistency with other OpenSSL
  405|       |     * functions. Real strerror_r does it the other way around
  406|       |     */
  407|     13|    return !strerror_r(errnum, buf, buflen);
  408|       |#else
  409|       |    char *err;
  410|       |
  411|       |    /* Fall back to non-thread safe strerror()...its all we can do */
  412|       |    if (buflen < 2)
  413|       |        return 0;
  414|       |    err = strerror(errnum);
  415|       |    /* Can this ever happen? */
  416|       |    if (err == NULL)
  417|       |        return 0;
  418|       |    OPENSSL_strlcpy(buf, err, buflen);
  419|       |    return 1;
  420|       |#endif
  421|     13|}
OPENSSL_strcasecmp:
  424|  3.19M|{
  425|  3.19M|    int t;
  426|       |
  427|  22.2M|    while ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) == 0)
  ------------------
  |  Branch (427:12): [True: 20.6M, False: 1.55M]
  ------------------
  428|  20.6M|        if (*s1++ == '\0')
  ------------------
  |  Branch (428:13): [True: 1.63M, False: 19.0M]
  ------------------
  429|  1.63M|            return 0;
  430|  1.55M|    return t;
  431|  3.19M|}
OPENSSL_strncasecmp:
  434|  1.08M|{
  435|  1.08M|    int t;
  436|  1.08M|    size_t i;
  437|       |
  438|  2.16M|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (438:17): [True: 1.77M, False: 391k]
  ------------------
  439|  1.77M|        if ((t = ossl_tolower(*s1) - ossl_tolower(*s2++)) != 0)
  ------------------
  |  Branch (439:13): [True: 696k, False: 1.07M]
  ------------------
  440|   696k|            return t;
  441|  1.07M|        else if (*s1++ == '\0')
  ------------------
  |  Branch (441:18): [True: 0, False: 1.07M]
  ------------------
  442|      0|            return 0;
  443|   391k|    return 0;
  444|  1.08M|}

OBJ_NAME_init:
   64|   303k|{
   65|   303k|    return RUN_ONCE(&init, o_names_init);
  ------------------
  |  |  130|   303k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 303k, False: 0]
  |  |  ------------------
  ------------------
   66|   303k|}
OBJ_NAME_get:
  153|   302k|{
  154|   302k|    OBJ_NAME on, *ret;
  155|   302k|    int num = 0, alias;
  156|   302k|    const char *value = NULL;
  157|       |
  158|   302k|    if (name == NULL)
  ------------------
  |  Branch (158:9): [True: 0, False: 302k]
  ------------------
  159|      0|        return NULL;
  160|   302k|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (160:9): [True: 0, False: 302k]
  ------------------
  161|      0|        return NULL;
  162|   302k|    if (!CRYPTO_THREAD_read_lock(obj_lock))
  ------------------
  |  Branch (162:9): [True: 0, False: 302k]
  ------------------
  163|      0|        return NULL;
  164|       |
  165|   302k|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   302k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  166|   302k|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|   302k|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  167|       |
  168|   302k|    on.name = name;
  169|   302k|    on.type = type;
  170|       |
  171|   352k|    for (;;) {
  172|   352k|        ret = lh_OBJ_NAME_retrieve(names_lh, &on);
  173|   352k|        if (ret == NULL)
  ------------------
  |  Branch (173:13): [True: 82.8k, False: 269k]
  ------------------
  174|  82.8k|            break;
  175|   269k|        if ((ret->alias) && !alias) {
  ------------------
  |  Branch (175:13): [True: 50.1k, False: 219k]
  |  Branch (175:29): [True: 50.1k, False: 0]
  ------------------
  176|  50.1k|            if (++num > 10)
  ------------------
  |  Branch (176:17): [True: 0, False: 50.1k]
  ------------------
  177|      0|                break;
  178|  50.1k|            on.name = ret->data;
  179|   219k|        } else {
  180|   219k|            value = ret->data;
  181|   219k|            break;
  182|   219k|        }
  183|   269k|    }
  184|       |
  185|   302k|    CRYPTO_THREAD_unlock(obj_lock);
  186|   302k|    return value;
  187|   302k|}
OBJ_NAME_add:
  190|    424|{
  191|    424|    OBJ_NAME *onp, *ret;
  192|    424|    int alias, ok = 0;
  193|       |
  194|    424|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (194:9): [True: 0, False: 424]
  ------------------
  195|      0|        return 0;
  196|       |
  197|    424|    alias = type & OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    424|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  198|    424|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    424|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  199|       |
  200|    424|    onp = OPENSSL_malloc(sizeof(*onp));
  ------------------
  |  |  106|    424|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  201|    424|    if (onp == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 424]
  ------------------
  202|      0|        return 0;
  203|       |
  204|    424|    onp->name = name;
  205|    424|    onp->alias = alias;
  206|    424|    onp->type = type;
  207|    424|    onp->data = data;
  208|       |
  209|    424|    if (!CRYPTO_THREAD_write_lock(obj_lock)) {
  ------------------
  |  Branch (209:9): [True: 0, False: 424]
  ------------------
  210|      0|        OPENSSL_free(onp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  211|      0|        return 0;
  212|      0|    }
  213|       |
  214|    424|    ret = lh_OBJ_NAME_insert(names_lh, onp);
  215|    424|    if (ret != NULL) {
  ------------------
  |  Branch (215:9): [True: 182, False: 242]
  ------------------
  216|       |        /* free things */
  217|    182|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (217:13): [True: 0, False: 182]
  ------------------
  218|      0|            && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) {
  ------------------
  |  Branch (218:16): [True: 0, False: 0]
  ------------------
  219|       |            /*
  220|       |             * XXX: I'm not sure I understand why the free function should
  221|       |             * get three arguments... -- Richard Levitte
  222|       |             */
  223|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  224|      0|                ret->type)
  225|      0|                ->free_func(ret->name, ret->type,
  226|      0|                    ret->data);
  227|      0|        }
  228|    182|        OPENSSL_free(ret);
  ------------------
  |  |  131|    182|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  229|    242|    } else {
  230|    242|        if (lh_OBJ_NAME_error(names_lh)) {
  ------------------
  |  Branch (230:13): [True: 0, False: 242]
  ------------------
  231|       |            /* ERROR */
  232|      0|            OPENSSL_free(onp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  233|      0|            goto unlock;
  234|      0|        }
  235|    242|    }
  236|       |
  237|    424|    ok = 1;
  238|       |
  239|    424|unlock:
  240|    424|    CRYPTO_THREAD_unlock(obj_lock);
  241|    424|    return ok;
  242|    424|}
OBJ_NAME_remove:
  245|    242|{
  246|    242|    OBJ_NAME on, *ret;
  247|    242|    int ok = 0;
  248|       |
  249|    242|    if (!OBJ_NAME_init())
  ------------------
  |  Branch (249:9): [True: 0, False: 242]
  ------------------
  250|      0|        return 0;
  251|       |
  252|    242|    if (!CRYPTO_THREAD_write_lock(obj_lock))
  ------------------
  |  Branch (252:9): [True: 0, False: 242]
  ------------------
  253|      0|        return 0;
  254|       |
  255|    242|    type &= ~OBJ_NAME_ALIAS;
  ------------------
  |  |   33|    242|#define OBJ_NAME_ALIAS 0x8000
  ------------------
  256|    242|    on.name = name;
  257|    242|    on.type = type;
  258|    242|    ret = lh_OBJ_NAME_delete(names_lh, &on);
  259|    242|    if (ret != NULL) {
  ------------------
  |  Branch (259:9): [True: 242, False: 0]
  ------------------
  260|       |        /* free things */
  261|    242|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (261:13): [True: 0, False: 242]
  ------------------
  262|      0|            && (sk_NAME_FUNCS_num(name_funcs_stack) > ret->type)) {
  ------------------
  |  Branch (262:16): [True: 0, False: 0]
  ------------------
  263|       |            /*
  264|       |             * XXX: I'm not sure I understand why the free function should
  265|       |             * get three arguments... -- Richard Levitte
  266|       |             */
  267|      0|            sk_NAME_FUNCS_value(name_funcs_stack,
  268|      0|                ret->type)
  269|      0|                ->free_func(ret->name, ret->type,
  270|      0|                    ret->data);
  271|      0|        }
  272|    242|        OPENSSL_free(ret);
  ------------------
  |  |  131|    242|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  273|    242|        ok = 1;
  274|    242|    }
  275|       |
  276|    242|    CRYPTO_THREAD_unlock(obj_lock);
  277|    242|    return ok;
  278|    242|}
OBJ_NAME_do_all:
  296|  1.05k|{
  297|  1.05k|    OBJ_DOALL d;
  298|       |
  299|  1.05k|    d.type = type;
  300|  1.05k|    d.fn = fn;
  301|  1.05k|    d.arg = arg;
  302|       |
  303|  1.05k|    lh_OBJ_NAME_doall_OBJ_DOALL(names_lh, do_all_fn, &d);
  304|  1.05k|}
OBJ_NAME_cleanup:
  370|      4|{
  371|      4|    unsigned long down_load;
  372|       |
  373|      4|    if (names_lh == NULL)
  ------------------
  |  Branch (373:9): [True: 0, False: 4]
  ------------------
  374|      0|        return;
  375|       |
  376|      4|    free_type = type;
  377|      4|    down_load = lh_OBJ_NAME_get_down_load(names_lh);
  378|      4|    lh_OBJ_NAME_set_down_load(names_lh, 0);
  379|       |
  380|      4|    lh_OBJ_NAME_doall(names_lh, names_lh_free_doall);
  381|      4|    if (type < 0) {
  ------------------
  |  Branch (381:9): [True: 1, False: 3]
  ------------------
  382|      1|        lh_OBJ_NAME_free(names_lh);
  383|      1|        sk_NAME_FUNCS_pop_free(name_funcs_stack, name_funcs_free);
  384|      1|        CRYPTO_THREAD_lock_free(obj_lock);
  385|      1|        names_lh = NULL;
  386|      1|        name_funcs_stack = NULL;
  387|      1|        obj_lock = NULL;
  388|      1|    } else
  389|      3|        lh_OBJ_NAME_set_down_load(names_lh, down_load);
  390|      4|}
o_names.c:o_names_init:
   51|      1|{
   52|      1|    names_lh = NULL;
   53|      1|    obj_lock = CRYPTO_THREAD_lock_new();
   54|      1|    if (obj_lock != NULL)
  ------------------
  |  Branch (54:9): [True: 1, False: 0]
  ------------------
   55|      1|        names_lh = lh_OBJ_NAME_new(obj_name_hash, obj_name_cmp);
   56|      1|    if (names_lh == NULL) {
  ------------------
  |  Branch (56:9): [True: 0, False: 1]
  ------------------
   57|      0|        CRYPTO_THREAD_lock_free(obj_lock);
   58|      0|        obj_lock = NULL;
   59|      0|    }
   60|      1|    return names_lh != NULL && obj_lock != NULL;
  ------------------
  |  Branch (60:12): [True: 1, False: 0]
  |  Branch (60:32): [True: 1, False: 0]
  ------------------
   61|      1|}
o_names.c:obj_name_hash:
  137|   353k|{
  138|   353k|    unsigned long ret;
  139|       |
  140|   353k|    if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 353k]
  ------------------
  141|      0|        && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) {
  ------------------
  |  Branch (141:12): [True: 0, False: 0]
  ------------------
  142|      0|        ret = sk_NAME_FUNCS_value(name_funcs_stack,
  143|      0|            a->type)
  144|      0|                  ->hash_func(a->name);
  145|   353k|    } else {
  146|   353k|        ret = ossl_lh_strcasehash(a->name);
  147|   353k|    }
  148|   353k|    ret ^= a->type;
  149|   353k|    return ret;
  150|   353k|}
o_names.c:obj_name_cmp:
  120|   270k|{
  121|   270k|    int ret;
  122|       |
  123|   270k|    ret = a->type - b->type;
  124|   270k|    if (ret == 0) {
  ------------------
  |  Branch (124:9): [True: 270k, False: 0]
  ------------------
  125|   270k|        if ((name_funcs_stack != NULL)
  ------------------
  |  Branch (125:13): [True: 0, False: 270k]
  ------------------
  126|      0|            && (sk_NAME_FUNCS_num(name_funcs_stack) > a->type)) {
  ------------------
  |  Branch (126:16): [True: 0, False: 0]
  ------------------
  127|      0|            ret = sk_NAME_FUNCS_value(name_funcs_stack,
  128|      0|                a->type)
  129|      0|                      ->cmp_func(a->name, b->name);
  130|      0|        } else
  131|   270k|            ret = OPENSSL_strcasecmp(a->name, b->name);
  132|   270k|    }
  133|   270k|    return ret;
  134|   270k|}
o_names.c:do_all_fn:
  287|   255k|{
  288|   255k|    if (name->type == d->type)
  ------------------
  |  Branch (288:9): [True: 127k, False: 127k]
  ------------------
  289|   127k|        d->fn(name, d->arg);
  290|   255k|}
o_names.c:names_lh_free_doall:
  356|    543|{
  357|    543|    if (onp == NULL)
  ------------------
  |  Branch (357:9): [True: 0, False: 543]
  ------------------
  358|      0|        return;
  359|       |
  360|    543|    if (free_type < 0 || free_type == onp->type)
  ------------------
  |  Branch (360:9): [True: 0, False: 543]
  |  Branch (360:26): [True: 242, False: 301]
  ------------------
  361|    242|        OBJ_NAME_remove(onp->name, onp->type);
  362|    543|}

ossl_obj_cleanup_int:
  229|      1|{
  230|      1|    if (added != NULL) {
  ------------------
  |  Branch (230:9): [True: 1, False: 0]
  ------------------
  231|      1|        lh_ADDED_OBJ_set_down_load(added, 0);
  232|      1|        lh_ADDED_OBJ_doall(added, cleanup1_doall); /* zero counters */
  233|      1|        lh_ADDED_OBJ_doall(added, cleanup2_doall); /* set counters */
  234|      1|        lh_ADDED_OBJ_doall(added, cleanup3_doall); /* free objects */
  235|      1|        lh_ADDED_OBJ_free(added);
  236|       |        added = NULL;
  237|      1|    }
  238|      1|    objs_free_locks();
  239|      1|}
OBJ_nid2obj:
  258|  8.57M|{
  259|  8.57M|    ADDED_OBJ ad, *adp = NULL;
  260|  8.57M|    ASN1_OBJECT ob;
  261|       |
  262|  8.57M|    if (n == NID_undef
  ------------------
  |  |   18|  17.1M|#define NID_undef                       0
  ------------------
  |  Branch (262:9): [True: 4.33M, False: 4.23M]
  ------------------
  263|  4.23M|        || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  | 1358|  8.47M|#define NUM_NID 1501
  ------------------
                      || (n > 0 && n < NUM_NID && nid_objs[n].nid != NID_undef))
  ------------------
  |  |   18|  4.23M|#define NID_undef                       0
  ------------------
  |  Branch (263:13): [True: 4.23M, False: 0]
  |  Branch (263:22): [True: 4.23M, False: 0]
  |  Branch (263:37): [True: 4.23M, False: 0]
  ------------------
  264|  8.57M|        return (ASN1_OBJECT *)&(nid_objs[n]);
  265|       |
  266|      0|    ad.type = ADDED_NID;
  ------------------
  |  |   33|      0|#define ADDED_NID 3
  ------------------
  267|      0|    ad.obj = &ob;
  268|      0|    ob.nid = n;
  269|      0|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (269:9): [True: 0, False: 0]
  ------------------
  270|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  271|      0|        return NULL;
  272|      0|    }
  273|      0|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  274|      0|    ossl_obj_unlock();
  275|      0|    if (adp != NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 0]
  ------------------
  276|      0|        return adp->obj;
  277|       |
  278|      0|    ERR_raise(ERR_LIB_OBJ, OBJ_R_UNKNOWN_NID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  279|       |    return NULL;
  280|      0|}
OBJ_nid2sn:
  283|   325k|{
  284|   325k|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  285|       |
  286|   325k|    return ob == NULL ? NULL : ob->sn;
  ------------------
  |  Branch (286:12): [True: 0, False: 325k]
  ------------------
  287|   325k|}
OBJ_nid2ln:
  290|   494k|{
  291|   494k|    ASN1_OBJECT *ob = OBJ_nid2obj(n);
  292|       |
  293|   494k|    return ob == NULL ? NULL : ob->ln;
  ------------------
  |  Branch (293:12): [True: 0, False: 494k]
  ------------------
  294|   494k|}
OBJ_txt2obj:
  348|  49.5k|{
  349|  49.5k|    int nid = NID_undef;
  ------------------
  |  |   18|  49.5k|#define NID_undef                       0
  ------------------
  350|  49.5k|    ASN1_OBJECT *op = NULL;
  351|  49.5k|    unsigned char *buf;
  352|  49.5k|    unsigned char *p;
  353|  49.5k|    const unsigned char *cp;
  354|  49.5k|    int i, j;
  355|       |
  356|  49.5k|    if (!no_name) {
  ------------------
  |  Branch (356:9): [True: 43.3k, False: 6.19k]
  ------------------
  357|  43.3k|        if ((nid = OBJ_sn2nid(s)) != NID_undef
  ------------------
  |  |   18|  86.7k|#define NID_undef                       0
  ------------------
  |  Branch (357:13): [True: 0, False: 43.3k]
  ------------------
  358|  43.3k|            || (nid = OBJ_ln2nid(s)) != NID_undef) {
  ------------------
  |  |   18|  43.3k|#define NID_undef                       0
  ------------------
  |  Branch (358:16): [True: 43.3k, False: 0]
  ------------------
  359|  43.3k|            return OBJ_nid2obj(nid);
  360|  43.3k|        }
  361|      0|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  ------------------
  362|      0|            ERR_raise(ERR_LIB_OBJ, OBJ_R_UNKNOWN_OBJECT_NAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  363|      0|            return NULL;
  364|      0|        }
  365|      0|    }
  366|       |
  367|       |    /* Work out size of content octets */
  368|  6.19k|    i = a2d_ASN1_OBJECT(NULL, 0, s, -1);
  369|  6.19k|    if (i <= 0)
  ------------------
  |  Branch (369:9): [True: 0, False: 6.19k]
  ------------------
  370|      0|        return NULL;
  371|       |
  372|       |    /* Work out total size */
  373|  6.19k|    j = ASN1_object_size(0, i, V_ASN1_OBJECT);
  ------------------
  |  |   70|  6.19k|#define V_ASN1_OBJECT 6
  ------------------
  374|  6.19k|    if (j < 0)
  ------------------
  |  Branch (374:9): [True: 0, False: 6.19k]
  ------------------
  375|      0|        return NULL;
  376|       |
  377|  6.19k|    if ((buf = OPENSSL_malloc(j)) == NULL)
  ------------------
  |  |  106|  6.19k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (377:9): [True: 0, False: 6.19k]
  ------------------
  378|      0|        return NULL;
  379|       |
  380|  6.19k|    p = buf;
  381|       |    /* Write out tag+length */
  382|  6.19k|    ASN1_put_object(&p, 0, i, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
  ------------------
  |  |   70|  6.19k|#define V_ASN1_OBJECT 6
  ------------------
                  ASN1_put_object(&p, 0, i, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
  ------------------
  |  |   49|  6.19k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  383|       |    /* Write out contents */
  384|  6.19k|    a2d_ASN1_OBJECT(p, i, s, -1);
  385|       |
  386|  6.19k|    cp = buf;
  387|  6.19k|    op = d2i_ASN1_OBJECT(NULL, &cp, j);
  388|  6.19k|    OPENSSL_free(buf);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|  6.19k|    return op;
  390|  6.19k|}
OBJ_obj2txt:
  393|   492k|{
  394|   492k|    int i, n = 0, len, nid, first, use_bn;
  395|   492k|    BIGNUM *bl;
  396|   492k|    unsigned long l;
  397|   492k|    const unsigned char *p;
  398|   492k|    char tbuf[DECIMAL_SIZE(i) + DECIMAL_SIZE(l) + 2];
  399|   492k|    const char *s;
  400|       |
  401|       |    /* Ensure that, at every state, |buf| is NUL-terminated. */
  402|   492k|    if (buf != NULL && buf_len > 0)
  ------------------
  |  Branch (402:9): [True: 492k, False: 0]
  |  Branch (402:24): [True: 492k, False: 0]
  ------------------
  403|   492k|        buf[0] = '\0';
  404|       |
  405|   492k|    if (a == NULL || a->data == NULL)
  ------------------
  |  Branch (405:9): [True: 0, False: 492k]
  |  Branch (405:22): [True: 528, False: 491k]
  ------------------
  406|    528|        return 0;
  407|       |
  408|   491k|    if (!no_name && (nid = OBJ_obj2nid(a)) != NID_undef) {
  ------------------
  |  |   18|   381k|#define NID_undef                       0
  ------------------
  |  Branch (408:9): [True: 381k, False: 110k]
  |  Branch (408:21): [True: 381k, False: 0]
  ------------------
  409|   381k|        s = OBJ_nid2ln(nid);
  410|   381k|        if (s == NULL)
  ------------------
  |  Branch (410:13): [True: 0, False: 381k]
  ------------------
  411|      0|            s = OBJ_nid2sn(nid);
  412|   381k|        if (s != NULL) {
  ------------------
  |  Branch (412:13): [True: 381k, False: 0]
  ------------------
  413|   381k|            if (buf != NULL)
  ------------------
  |  Branch (413:17): [True: 381k, False: 0]
  ------------------
  414|   381k|                OPENSSL_strlcpy(buf, s, buf_len);
  415|   381k|            return (int)strlen(s);
  416|   381k|        }
  417|   381k|    }
  418|       |
  419|   110k|    len = a->length;
  420|   110k|    p = a->data;
  421|       |
  422|   110k|    first = 1;
  423|   110k|    bl = NULL;
  424|       |
  425|       |    /*
  426|       |     * RFC 2578 (STD 58) says this about OBJECT IDENTIFIERs:
  427|       |     *
  428|       |     * > 3.5. OBJECT IDENTIFIER values
  429|       |     * >
  430|       |     * > An OBJECT IDENTIFIER value is an ordered list of non-negative
  431|       |     * > numbers. For the SMIv2, each number in the list is referred to as a
  432|       |     * > sub-identifier, there are at most 128 sub-identifiers in a value,
  433|       |     * > and each sub-identifier has a maximum value of 2^32-1 (4294967295
  434|       |     * > decimal).
  435|       |     *
  436|       |     * So a legitimate OID according to this RFC is at most (32 * 128 / 7),
  437|       |     * i.e. 586 bytes long.
  438|       |     *
  439|       |     * Ref: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5
  440|       |     */
  441|   110k|    if (len > 586)
  ------------------
  |  Branch (441:9): [True: 0, False: 110k]
  ------------------
  442|      0|        goto err;
  443|       |
  444|   839k|    while (len > 0) {
  ------------------
  |  Branch (444:12): [True: 729k, False: 110k]
  ------------------
  445|   729k|        l = 0;
  446|   729k|        use_bn = 0;
  447|   899k|        for (;;) {
  448|   899k|            unsigned char c = *p++;
  449|       |
  450|   899k|            len--;
  451|   899k|            if (len == 0 && (c & 0x80) != 0)
  ------------------
  |  Branch (451:17): [True: 110k, False: 788k]
  |  Branch (451:29): [True: 0, False: 110k]
  ------------------
  452|      0|                goto err;
  453|   899k|            if (use_bn) {
  ------------------
  |  Branch (453:17): [True: 0, False: 899k]
  ------------------
  454|      0|                if (!BN_add_word(bl, c & 0x7f))
  ------------------
  |  Branch (454:21): [True: 0, False: 0]
  ------------------
  455|      0|                    goto err;
  456|   899k|            } else {
  457|   899k|                l |= c & 0x7f;
  458|   899k|            }
  459|   899k|            if ((c & 0x80) == 0)
  ------------------
  |  Branch (459:17): [True: 729k, False: 170k]
  ------------------
  460|   729k|                break;
  461|   170k|            if (!use_bn && l > (ULONG_MAX >> 7L)) {
  ------------------
  |  Branch (461:17): [True: 170k, False: 0]
  |  Branch (461:28): [True: 0, False: 170k]
  ------------------
  462|      0|                if (bl == NULL && (bl = BN_new()) == NULL)
  ------------------
  |  Branch (462:21): [True: 0, False: 0]
  |  Branch (462:35): [True: 0, False: 0]
  ------------------
  463|      0|                    goto err;
  464|      0|                if (!BN_set_word(bl, l))
  ------------------
  |  Branch (464:21): [True: 0, False: 0]
  ------------------
  465|      0|                    goto err;
  466|      0|                use_bn = 1;
  467|      0|            }
  468|   170k|            if (use_bn) {
  ------------------
  |  Branch (468:17): [True: 0, False: 170k]
  ------------------
  469|      0|                if (!BN_lshift(bl, bl, 7))
  ------------------
  |  Branch (469:21): [True: 0, False: 0]
  ------------------
  470|      0|                    goto err;
  471|   170k|            } else {
  472|   170k|                l <<= 7L;
  473|   170k|            }
  474|   170k|        }
  475|       |
  476|   729k|        if (first) {
  ------------------
  |  Branch (476:13): [True: 110k, False: 618k]
  ------------------
  477|   110k|            first = 0;
  478|   110k|            if (l >= 80) {
  ------------------
  |  Branch (478:17): [True: 42.7k, False: 67.5k]
  ------------------
  479|  42.7k|                i = 2;
  480|  42.7k|                if (use_bn) {
  ------------------
  |  Branch (480:21): [True: 0, False: 42.7k]
  ------------------
  481|      0|                    if (!BN_sub_word(bl, 80))
  ------------------
  |  Branch (481:25): [True: 0, False: 0]
  ------------------
  482|      0|                        goto err;
  483|  42.7k|                } else {
  484|  42.7k|                    l -= 80;
  485|  42.7k|                }
  486|  67.5k|            } else {
  487|  67.5k|                i = (int)(l / 40);
  488|  67.5k|                l -= (long)(i * 40);
  489|  67.5k|            }
  490|   110k|            if (buf != NULL && buf_len > 1) {
  ------------------
  |  Branch (490:17): [True: 110k, False: 0]
  |  Branch (490:32): [True: 110k, False: 0]
  ------------------
  491|   110k|                *buf++ = i + '0';
  492|   110k|                *buf = '\0';
  493|   110k|                buf_len--;
  494|   110k|            }
  495|   110k|            n++;
  496|   110k|        }
  497|       |
  498|   729k|        if (use_bn) {
  ------------------
  |  Branch (498:13): [True: 0, False: 729k]
  ------------------
  499|      0|            char *bndec;
  500|      0|            bndec = BN_bn2dec(bl);
  501|      0|            if (!bndec)
  ------------------
  |  Branch (501:17): [True: 0, False: 0]
  ------------------
  502|      0|                goto err;
  503|      0|            i = (int)strlen(bndec);
  504|      0|            if (buf != NULL) {
  ------------------
  |  Branch (504:17): [True: 0, False: 0]
  ------------------
  505|      0|                if (buf_len > 1) {
  ------------------
  |  Branch (505:21): [True: 0, False: 0]
  ------------------
  506|      0|                    *buf++ = '.';
  507|      0|                    *buf = '\0';
  508|      0|                    buf_len--;
  509|      0|                }
  510|      0|                OPENSSL_strlcpy(buf, bndec, buf_len);
  511|      0|                if (i > buf_len) {
  ------------------
  |  Branch (511:21): [True: 0, False: 0]
  ------------------
  512|      0|                    buf += buf_len;
  513|      0|                    buf_len = 0;
  514|      0|                } else {
  515|      0|                    buf += i;
  516|      0|                    buf_len -= i;
  517|      0|                }
  518|      0|            }
  519|      0|            n++;
  520|      0|            n += i;
  521|      0|            OPENSSL_free(bndec);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  522|   729k|        } else {
  523|   729k|            BIO_snprintf(tbuf, sizeof(tbuf), ".%lu", l);
  524|   729k|            i = (int)strlen(tbuf);
  525|   729k|            if (buf && buf_len > 0) {
  ------------------
  |  Branch (525:17): [True: 729k, False: 0]
  |  Branch (525:24): [True: 729k, False: 0]
  ------------------
  526|   729k|                OPENSSL_strlcpy(buf, tbuf, buf_len);
  527|   729k|                if (i > buf_len) {
  ------------------
  |  Branch (527:21): [True: 0, False: 729k]
  ------------------
  528|      0|                    buf += buf_len;
  529|      0|                    buf_len = 0;
  530|   729k|                } else {
  531|   729k|                    buf += i;
  532|   729k|                    buf_len -= i;
  533|   729k|                }
  534|   729k|            }
  535|   729k|            n += i;
  536|   729k|            l = 0;
  537|   729k|        }
  538|   729k|    }
  539|       |
  540|   110k|    BN_free(bl);
  541|   110k|    return n;
  542|       |
  543|      0|err:
  544|      0|    BN_free(bl);
  545|      0|    return -1;
  546|   110k|}
OBJ_txt2nid:
  549|  43.3k|{
  550|  43.3k|    ASN1_OBJECT *obj = OBJ_txt2obj(s, 0);
  551|  43.3k|    int nid = NID_undef;
  ------------------
  |  |   18|  43.3k|#define NID_undef                       0
  ------------------
  552|       |
  553|  43.3k|    if (obj != NULL) {
  ------------------
  |  Branch (553:9): [True: 43.3k, False: 0]
  ------------------
  554|  43.3k|        nid = OBJ_obj2nid(obj);
  555|  43.3k|        ASN1_OBJECT_free(obj);
  556|  43.3k|    }
  557|  43.3k|    return nid;
  558|  43.3k|}
OBJ_ln2nid:
  561|  84.3k|{
  562|  84.3k|    ASN1_OBJECT o;
  563|  84.3k|    const ASN1_OBJECT *oo = &o;
  564|  84.3k|    ADDED_OBJ ad, *adp;
  565|  84.3k|    const unsigned int *op;
  566|  84.3k|    int nid = NID_undef;
  ------------------
  |  |   18|  84.3k|#define NID_undef                       0
  ------------------
  567|       |
  568|  84.3k|    o.ln = s;
  569|  84.3k|    op = OBJ_bsearch_ln(&oo, ln_objs, NUM_LN);
  ------------------
  |  | 4359|  84.3k|#define NUM_LN 1492
  ------------------
  570|  84.3k|    if (op != NULL)
  ------------------
  |  Branch (570:9): [True: 54.1k, False: 30.2k]
  ------------------
  571|  54.1k|        return nid_objs[*op].nid;
  572|  30.2k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (572:9): [True: 0, False: 30.2k]
  ------------------
  573|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  574|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  575|      0|    }
  576|  30.2k|    ad.type = ADDED_LNAME;
  ------------------
  |  |   32|  30.2k|#define ADDED_LNAME 2
  ------------------
  577|  30.2k|    ad.obj = &o;
  578|  30.2k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  579|  30.2k|    if (adp != NULL)
  ------------------
  |  Branch (579:9): [True: 0, False: 30.2k]
  ------------------
  580|      0|        nid = adp->obj->nid;
  581|  30.2k|    ossl_obj_unlock();
  582|  30.2k|    return nid;
  583|  30.2k|}
OBJ_sn2nid:
  586|  92.6k|{
  587|  92.6k|    ASN1_OBJECT o;
  588|  92.6k|    const ASN1_OBJECT *oo = &o;
  589|  92.6k|    ADDED_OBJ ad, *adp;
  590|  92.6k|    const unsigned int *op;
  591|  92.6k|    int nid = NID_undef;
  ------------------
  |  |   18|  92.6k|#define NID_undef                       0
  ------------------
  592|       |
  593|  92.6k|    o.sn = s;
  594|  92.6k|    op = OBJ_bsearch_sn(&oo, sn_objs, NUM_SN);
  ------------------
  |  | 2863|  92.6k|#define NUM_SN 1492
  ------------------
  595|  92.6k|    if (op != NULL)
  ------------------
  |  Branch (595:9): [True: 14.2k, False: 78.4k]
  ------------------
  596|  14.2k|        return nid_objs[*op].nid;
  597|  78.4k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (597:9): [True: 0, False: 78.4k]
  ------------------
  598|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  599|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  600|      0|    }
  601|  78.4k|    ad.type = ADDED_SNAME;
  ------------------
  |  |   31|  78.4k|#define ADDED_SNAME 1
  ------------------
  602|  78.4k|    ad.obj = &o;
  603|  78.4k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  604|  78.4k|    if (adp != NULL)
  ------------------
  |  Branch (604:9): [True: 0, False: 78.4k]
  ------------------
  605|      0|        nid = adp->obj->nid;
  606|  78.4k|    ossl_obj_unlock();
  607|  78.4k|    return nid;
  608|  78.4k|}
OBJ_bsearch_:
  612|  3.94M|{
  613|  3.94M|    return OBJ_bsearch_ex_(key, base, num, size, cmp, 0);
  614|  3.94M|}
OBJ_bsearch_ex_:
  620|  3.94M|{
  621|  3.94M|    const char *p = ossl_bsearch(key, base, num, size, cmp, flags);
  622|       |
  623|       |#ifdef CHARSET_EBCDIC
  624|       |    /*
  625|       |     * THIS IS A KLUDGE - Because the *_obj is sorted in ASCII order, and I
  626|       |     * don't have perl (yet), we revert to a *LINEAR* search when the object
  627|       |     * wasn't found in the binary search.
  628|       |     */
  629|       |    if (p == NULL) {
  630|       |        const char *base_ = base;
  631|       |        int l, h, i = 0, c = 0;
  632|       |        char *p1;
  633|       |
  634|       |        for (i = 0; i < num; ++i) {
  635|       |            p1 = &(base_[i * size]);
  636|       |            c = (*cmp)(key, p1);
  637|       |            if (c == 0
  638|       |                || (c < 0 && (flags & OBJ_BSEARCH_VALUE_ON_NOMATCH)))
  639|       |                return p1;
  640|       |        }
  641|       |    }
  642|       |#endif
  643|  3.94M|    return p;
  644|  3.94M|}
OBJ_create:
  700|  6.19k|{
  701|  6.19k|    ASN1_OBJECT *tmpoid = NULL;
  702|  6.19k|    int ok = NID_undef;
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  703|       |
  704|       |    /* With no arguments at all, nothing can be done */
  705|  6.19k|    if (oid == NULL && sn == NULL && ln == NULL) {
  ------------------
  |  Branch (705:9): [True: 0, False: 6.19k]
  |  Branch (705:24): [True: 0, False: 0]
  |  Branch (705:38): [True: 0, False: 0]
  ------------------
  706|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  707|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  708|      0|    }
  709|       |
  710|       |    /* Check to see if short or long name already present */
  711|  6.19k|    if ((sn != NULL && OBJ_sn2nid(sn) != NID_undef)
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  |  Branch (711:10): [True: 6.19k, False: 0]
  |  Branch (711:24): [True: 0, False: 6.19k]
  ------------------
  712|  6.19k|        || (ln != NULL && OBJ_ln2nid(ln) != NID_undef)) {
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (712:13): [True: 0, False: 6.19k]
  |  Branch (712:27): [True: 0, False: 0]
  ------------------
  713|      0|        ERR_raise(ERR_LIB_OBJ, OBJ_R_OID_EXISTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  714|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  715|      0|    }
  716|       |
  717|  6.19k|    if (oid != NULL) {
  ------------------
  |  Branch (717:9): [True: 6.19k, False: 0]
  ------------------
  718|       |        /* Convert numerical OID string to an ASN1_OBJECT structure */
  719|  6.19k|        tmpoid = OBJ_txt2obj(oid, 1);
  720|  6.19k|        if (tmpoid == NULL)
  ------------------
  |  Branch (720:13): [True: 0, False: 6.19k]
  ------------------
  721|      0|            return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  722|  6.19k|    } else {
  723|       |        /* Create a no-OID ASN1_OBJECT */
  724|      0|        tmpoid = ASN1_OBJECT_new();
  725|      0|        if (tmpoid == NULL) {
  ------------------
  |  Branch (725:13): [True: 0, False: 0]
  ------------------
  726|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  727|      0|            return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  728|      0|        }
  729|      0|    }
  730|       |
  731|       |    /* If NID is not NID_undef then object already exists */
  732|  6.19k|    if (oid != NULL
  ------------------
  |  Branch (732:9): [True: 6.19k, False: 0]
  ------------------
  733|  6.19k|        && ossl_obj_obj2nid(tmpoid) != NID_undef) {
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  |  Branch (733:12): [True: 6.19k, False: 0]
  ------------------
  734|  6.19k|        ERR_raise(ERR_LIB_OBJ, OBJ_R_OID_EXISTS);
  ------------------
  |  |  404|  6.19k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|  6.19k|    (ERR_new(),                                                  \
  |  |  |  |  407|  6.19k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  6.19k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|  6.19k|        ERR_set_error)
  |  |  ------------------
  ------------------
  735|  6.19k|        goto err;
  736|  6.19k|    }
  737|       |
  738|      0|    tmpoid->nid = NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  739|      0|    tmpoid->sn = (char *)sn;
  740|      0|    tmpoid->ln = (char *)ln;
  741|       |
  742|      0|    ok = add_object(tmpoid, 1);
  743|       |
  744|      0|    tmpoid->sn = NULL;
  745|      0|    tmpoid->ln = NULL;
  746|       |
  747|  6.19k|err:
  748|  6.19k|    ASN1_OBJECT_free(tmpoid);
  749|  6.19k|    return ok;
  750|      0|}
OBJ_length:
  753|  47.0k|{
  754|  47.0k|    if (obj == NULL)
  ------------------
  |  Branch (754:9): [True: 0, False: 47.0k]
  ------------------
  755|      0|        return 0;
  756|  47.0k|    return obj->length;
  757|  47.0k|}
OBJ_get0_data:
  760|  83.9k|{
  761|  83.9k|    if (obj == NULL)
  ------------------
  |  Branch (761:9): [True: 0, False: 83.9k]
  ------------------
  762|      0|        return NULL;
  763|  83.9k|    return obj->data;
  764|  83.9k|}
OBJ_obj2nid:
  868|  4.95M|{
  869|  4.95M|    return ossl_obj_obj2nid(a);
  870|  4.95M|}
obj_dat.c:objs_free_locks:
   53|      1|{
   54|      1|    CRYPTO_THREAD_lock_free(ossl_obj_lock);
   55|      1|    ossl_obj_lock = NULL;
   56|       |#ifdef TSAN_REQUIRES_LOCKING
   57|       |    CRYPTO_THREAD_lock_free(ossl_obj_nid_lock);
   58|       |    ossl_obj_nid_lock = NULL;
   59|       |#endif
   60|      1|}
obj_dat.c:ossl_obj_read_lock:
  101|   133k|{
  102|   133k|    if (!ossl_init_added_api())
  ------------------
  |  Branch (102:9): [True: 0, False: 133k]
  ------------------
  103|      0|        return 0;
  104|   133k|    return CRYPTO_THREAD_read_lock(ossl_obj_lock);
  105|   133k|}
obj_dat.c:ossl_init_added_api:
   85|   133k|{
   86|   133k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   87|       |    /* Make sure we've loaded config before checking for any "added" objects */
   88|   133k|    OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  510|   133k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   89|   133k|#endif
   90|   133k|    return RUN_ONCE(&ossl_obj_api_init, obj_api_initialise);
  ------------------
  |  |  130|   133k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 133k, False: 0]
  |  |  ------------------
  ------------------
   91|   133k|}
obj_dat.c:obj_api_initialise:
   63|      1|{
   64|      1|    ossl_obj_lock = CRYPTO_THREAD_lock_new();
   65|      1|    if (ossl_obj_lock == NULL)
  ------------------
  |  Branch (65:9): [True: 0, False: 1]
  ------------------
   66|      0|        return 0;
   67|       |
   68|       |#ifdef TSAN_REQUIRES_LOCKING
   69|       |    ossl_obj_nid_lock = CRYPTO_THREAD_lock_new();
   70|       |    if (ossl_obj_nid_lock == NULL) {
   71|       |        objs_free_locks();
   72|       |        return 0;
   73|       |    }
   74|       |#endif
   75|      1|    added = lh_ADDED_OBJ_new(added_obj_hash, added_obj_cmp);
   76|      1|    if (added == NULL) {
  ------------------
  |  Branch (76:9): [True: 0, False: 1]
  ------------------
   77|      0|        objs_free_locks();
   78|      0|        return 0;
   79|      0|    }
   80|       |
   81|      1|    return 1;
   82|      1|}
obj_dat.c:added_obj_hash:
  127|   133k|{
  128|   133k|    const ASN1_OBJECT *a;
  129|   133k|    int i;
  130|   133k|    unsigned long ret = 0;
  131|   133k|    unsigned char *p;
  132|       |
  133|   133k|    a = ca->obj;
  134|   133k|    switch (ca->type) {
  135|  25.2k|    case ADDED_DATA:
  ------------------
  |  |   30|  25.2k|#define ADDED_DATA 0
  ------------------
  |  Branch (135:5): [True: 25.2k, False: 108k]
  ------------------
  136|  25.2k|        ret = (unsigned long)a->length << 20UL;
  137|  25.2k|        p = (unsigned char *)a->data;
  138|   252k|        for (i = 0; i < a->length; i++)
  ------------------
  |  Branch (138:21): [True: 227k, False: 25.2k]
  ------------------
  139|   227k|            ret ^= p[i] << ((i * 3) % 24);
  140|  25.2k|        break;
  141|  78.4k|    case ADDED_SNAME:
  ------------------
  |  |   31|  78.4k|#define ADDED_SNAME 1
  ------------------
  |  Branch (141:5): [True: 78.4k, False: 55.5k]
  ------------------
  142|  78.4k|        ret = OPENSSL_LH_strhash(a->sn);
  143|  78.4k|        break;
  144|  30.2k|    case ADDED_LNAME:
  ------------------
  |  |   32|  30.2k|#define ADDED_LNAME 2
  ------------------
  |  Branch (144:5): [True: 30.2k, False: 103k]
  ------------------
  145|  30.2k|        ret = OPENSSL_LH_strhash(a->ln);
  146|  30.2k|        break;
  147|      0|    case ADDED_NID:
  ------------------
  |  |   33|      0|#define ADDED_NID 3
  ------------------
  |  Branch (147:5): [True: 0, False: 133k]
  ------------------
  148|      0|        ret = a->nid;
  149|      0|        break;
  150|      0|    default:
  ------------------
  |  Branch (150:5): [True: 0, False: 133k]
  ------------------
  151|       |        /* abort(); */
  152|      0|        return 0;
  153|   133k|    }
  154|   133k|    ret &= 0x3fffffffL;
  155|   133k|    ret |= ((unsigned long)ca->type) << 30L;
  156|   133k|    return ret;
  157|   133k|}
obj_dat.c:ossl_obj_unlock:
  108|   133k|{
  109|   133k|    CRYPTO_THREAD_unlock(ossl_obj_lock);
  110|   133k|}
obj_dat.c:ln_cmp:
  120|   845k|{
  121|   845k|    return strcmp((*a)->ln, nid_objs[*b].ln);
  122|   845k|}
obj_dat.c:sn_cmp:
  113|   994k|{
  114|   994k|    return strcmp((*a)->sn, nid_objs[*b].sn);
  115|   994k|}
obj_dat.c:ossl_obj_obj2nid:
  313|  4.96M|{
  314|  4.96M|    int nid = NID_undef;
  ------------------
  |  |   18|  4.96M|#define NID_undef                       0
  ------------------
  315|  4.96M|    const unsigned int *op;
  316|  4.96M|    ADDED_OBJ ad, *adp;
  317|       |
  318|  4.96M|    if (a == NULL)
  ------------------
  |  Branch (318:9): [True: 0, False: 4.96M]
  ------------------
  319|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  320|  4.96M|    if (a->nid != NID_undef)
  ------------------
  |  |   18|  4.96M|#define NID_undef                       0
  ------------------
  |  Branch (320:9): [True: 1.81M, False: 3.14M]
  ------------------
  321|  1.81M|        return a->nid;
  322|  3.14M|    if (a->length == 0)
  ------------------
  |  Branch (322:9): [True: 0, False: 3.14M]
  ------------------
  323|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  324|       |
  325|  3.14M|    op = OBJ_bsearch_obj(&a, obj_objs, NUM_OBJ);
  ------------------
  |  | 5855|  3.14M|#define NUM_OBJ 1349
  ------------------
  326|  3.14M|    if (op != NULL)
  ------------------
  |  Branch (326:9): [True: 3.12M, False: 25.2k]
  ------------------
  327|  3.12M|        return nid_objs[*op].nid;
  328|  25.2k|    if (!ossl_obj_read_lock()) {
  ------------------
  |  Branch (328:9): [True: 0, False: 25.2k]
  ------------------
  329|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  330|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  331|      0|    }
  332|  25.2k|    ad.type = ADDED_DATA;
  ------------------
  |  |   30|  25.2k|#define ADDED_DATA 0
  ------------------
  333|  25.2k|    ad.obj = (ASN1_OBJECT *)a; /* casting away const is harmless here */
  334|  25.2k|    adp = lh_ADDED_OBJ_retrieve(added, &ad);
  335|  25.2k|    if (adp != NULL)
  ------------------
  |  Branch (335:9): [True: 0, False: 25.2k]
  ------------------
  336|      0|        nid = adp->obj->nid;
  337|  25.2k|    ossl_obj_unlock();
  338|  25.2k|    return nid;
  339|  25.2k|}
obj_dat.c:obj_cmp:
  297|  31.2M|{
  298|  31.2M|    int j;
  299|  31.2M|    const ASN1_OBJECT *a = *ap;
  300|  31.2M|    const ASN1_OBJECT *b = &nid_objs[*bp];
  301|       |
  302|  31.2M|    j = (a->length - b->length);
  303|  31.2M|    if (j)
  ------------------
  |  Branch (303:9): [True: 9.83M, False: 21.3M]
  ------------------
  304|  9.83M|        return j;
  305|  21.3M|    if (a->length == 0)
  ------------------
  |  Branch (305:9): [True: 0, False: 21.3M]
  ------------------
  306|      0|        return 0;
  307|  21.3M|    return memcmp(a->data, b->data, a->length);
  308|  21.3M|}

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

OBJ_dup:
   17|  1.36M|{
   18|  1.36M|    ASN1_OBJECT *r;
   19|       |
   20|  1.36M|    if (o == NULL)
  ------------------
  |  Branch (20:9): [True: 0, False: 1.36M]
  ------------------
   21|      0|        return NULL;
   22|       |    /* If object isn't dynamic it's an internal OID which is never freed */
   23|  1.36M|    if (!(o->flags & ASN1_OBJECT_FLAG_DYNAMIC))
  ------------------
  |  |  110|  1.36M|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
  |  Branch (23:9): [True: 1.36M, False: 0]
  ------------------
   24|  1.36M|        return (ASN1_OBJECT *)o;
   25|       |
   26|      0|    r = ASN1_OBJECT_new();
   27|      0|    if (r == NULL) {
  ------------------
  |  Branch (27:9): [True: 0, False: 0]
  ------------------
   28|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   29|      0|        return NULL;
   30|      0|    }
   31|       |
   32|       |    /* Set dynamic flags so everything gets freed up on error */
   33|       |
   34|      0|    r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  110|      0|#define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */
  ------------------
                  r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  112|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */
  ------------------
                  r->flags = o->flags | (ASN1_OBJECT_FLAG_DYNAMIC | ASN1_OBJECT_FLAG_DYNAMIC_STRINGS | ASN1_OBJECT_FLAG_DYNAMIC_DATA);
  ------------------
  |  |  113|      0|#define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */
  ------------------
   35|       |
   36|      0|    if (o->length > 0 && (r->data = OPENSSL_memdup(o->data, o->length)) == NULL)
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (36:9): [True: 0, False: 0]
  |  Branch (36:26): [True: 0, False: 0]
  ------------------
   37|      0|        goto err;
   38|       |
   39|      0|    r->length = o->length;
   40|      0|    r->nid = o->nid;
   41|       |
   42|      0|    if (o->ln != NULL && (r->ln = OPENSSL_strdup(o->ln)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (42:9): [True: 0, False: 0]
  |  Branch (42:26): [True: 0, False: 0]
  ------------------
   43|      0|        goto err;
   44|       |
   45|      0|    if (o->sn != NULL && (r->sn = OPENSSL_strdup(o->sn)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (45:9): [True: 0, False: 0]
  |  Branch (45:26): [True: 0, False: 0]
  ------------------
   46|      0|        goto err;
   47|       |
   48|      0|    return r;
   49|      0|err:
   50|      0|    ASN1_OBJECT_free(r);
   51|       |    return NULL;
   52|      0|}

OBJ_find_sigid_algs:
  104|  22.1k|{
  105|  22.1k|    return ossl_obj_find_sigid_algs(signid, pdig_nid, ppkey_nid, 1);
  106|  22.1k|}
OBJ_add_sigid:
  148|  6.19k|{
  149|  6.19k|    nid_triple *ntr;
  150|  6.19k|    int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
                  int dnid = NID_undef, pnid = NID_undef, ret = 0;
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  151|       |
  152|  6.19k|    if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  12.3k|#define NID_undef                       0
  ------------------
                  if (signid == NID_undef || pkey_id == NID_undef)
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  |  Branch (152:9): [True: 0, False: 6.19k]
  |  Branch (152:32): [True: 0, False: 6.19k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  6.19k|    if (!obj_sig_init())
  ------------------
  |  Branch (155:9): [True: 0, False: 6.19k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  6.19k|    if ((ntr = OPENSSL_malloc(sizeof(*ntr))) == NULL)
  ------------------
  |  |  106|  6.19k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (158:9): [True: 0, False: 6.19k]
  ------------------
  159|      0|        return 0;
  160|  6.19k|    ntr->sign_id = signid;
  161|  6.19k|    ntr->hash_id = dig_id;
  162|  6.19k|    ntr->pkey_id = pkey_id;
  163|       |
  164|  6.19k|    if (!CRYPTO_THREAD_write_lock(sig_lock)) {
  ------------------
  |  Branch (164:9): [True: 0, False: 6.19k]
  ------------------
  165|      0|        ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|        OPENSSL_free(ntr);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|      0|        return 0;
  168|      0|    }
  169|       |
  170|       |    /* Check that the entry doesn't exist or exists as desired */
  171|  6.19k|    if (ossl_obj_find_sigid_algs(signid, &dnid, &pnid, 0)) {
  ------------------
  |  Branch (171:9): [True: 6.19k, False: 0]
  ------------------
  172|  6.19k|        ret = dnid == dig_id && pnid == pkey_id;
  ------------------
  |  Branch (172:15): [True: 6.19k, False: 0]
  |  Branch (172:33): [True: 6.19k, False: 0]
  ------------------
  173|  6.19k|        goto err;
  174|  6.19k|    }
  175|       |
  176|      0|    if (sig_app == NULL) {
  ------------------
  |  Branch (176:9): [True: 0, False: 0]
  ------------------
  177|      0|        sig_app = sk_nid_triple_new(sig_sk_cmp);
  178|      0|        if (sig_app == NULL)
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  ------------------
  179|      0|            goto err;
  180|      0|    }
  181|      0|    if (sigx_app == NULL) {
  ------------------
  |  Branch (181:9): [True: 0, False: 0]
  ------------------
  182|      0|        sigx_app = sk_nid_triple_new(sigx_cmp);
  183|      0|        if (sigx_app == NULL)
  ------------------
  |  Branch (183:13): [True: 0, False: 0]
  ------------------
  184|      0|            goto err;
  185|      0|    }
  186|       |
  187|       |    /*
  188|       |     * Better might be to find where to insert the element and insert it there.
  189|       |     * This would avoid the sorting steps below.
  190|       |     */
  191|      0|    if (!sk_nid_triple_push(sig_app, ntr))
  ------------------
  |  Branch (191:9): [True: 0, False: 0]
  ------------------
  192|      0|        goto err;
  193|      0|    if (!sk_nid_triple_push(sigx_app, ntr)) {
  ------------------
  |  Branch (193:9): [True: 0, False: 0]
  ------------------
  194|      0|        ntr = NULL; /* This is referenced by sig_app still */
  195|      0|        goto err;
  196|      0|    }
  197|       |
  198|      0|    sk_nid_triple_sort(sig_app);
  199|      0|    sk_nid_triple_sort(sigx_app);
  200|       |
  201|      0|    ntr = NULL;
  202|      0|    ret = 1;
  203|  6.19k|err:
  204|  6.19k|    OPENSSL_free(ntr);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  205|  6.19k|    CRYPTO_THREAD_unlock(sig_lock);
  206|  6.19k|    return ret;
  207|      0|}
OBJ_sigid_free:
  215|      1|{
  216|      1|    sk_nid_triple_pop_free(sig_app, sid_free);
  217|      1|    sk_nid_triple_free(sigx_app);
  218|      1|    CRYPTO_THREAD_lock_free(sig_lock);
  219|      1|    sig_app = NULL;
  220|      1|    sigx_app = NULL;
  221|       |    sig_lock = NULL;
  222|      1|}
obj_xref.c:ossl_obj_find_sigid_algs:
   68|  28.3k|{
   69|  28.3k|    nid_triple tmp;
   70|  28.3k|    const nid_triple *rv;
   71|  28.3k|    int idx;
   72|       |
   73|  28.3k|    if (signid == NID_undef)
  ------------------
  |  |   18|  28.3k|#define NID_undef                       0
  ------------------
  |  Branch (73:9): [True: 0, False: 28.3k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  28.3k|    tmp.sign_id = signid;
   77|  28.3k|    rv = OBJ_bsearch_sig(&tmp, sigoid_srt, OSSL_NELEM(sigoid_srt));
  ------------------
  |  |   14|  28.3k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
   78|  28.3k|    if (rv == NULL) {
  ------------------
  |  Branch (78:9): [True: 0, False: 28.3k]
  ------------------
   79|      0|        if (!obj_sig_init())
  ------------------
  |  Branch (79:13): [True: 0, False: 0]
  ------------------
   80|      0|            return 0;
   81|      0|        if (lock && !CRYPTO_THREAD_read_lock(sig_lock)) {
  ------------------
  |  Branch (81:13): [True: 0, False: 0]
  |  Branch (81:21): [True: 0, False: 0]
  ------------------
   82|      0|            ERR_raise(ERR_LIB_OBJ, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   83|      0|            return 0;
   84|      0|        }
   85|      0|        if (sig_app != NULL) {
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  ------------------
   86|      0|            idx = sk_nid_triple_find(sig_app, &tmp);
   87|      0|            if (idx >= 0)
  ------------------
  |  Branch (87:17): [True: 0, False: 0]
  ------------------
   88|      0|                rv = sk_nid_triple_value(sig_app, idx);
   89|      0|        }
   90|      0|        if (lock)
  ------------------
  |  Branch (90:13): [True: 0, False: 0]
  ------------------
   91|      0|            CRYPTO_THREAD_unlock(sig_lock);
   92|      0|        if (rv == NULL)
  ------------------
  |  Branch (92:13): [True: 0, False: 0]
  ------------------
   93|      0|            return 0;
   94|      0|    }
   95|       |
   96|  28.3k|    if (pdig_nid != NULL)
  ------------------
  |  Branch (96:9): [True: 17.2k, False: 11.0k]
  ------------------
   97|  17.2k|        *pdig_nid = rv->hash_id;
   98|  28.3k|    if (ppkey_nid != NULL)
  ------------------
  |  Branch (98:9): [True: 28.3k, False: 0]
  ------------------
   99|  28.3k|        *ppkey_nid = rv->pkey_id;
  100|  28.3k|    return 1;
  101|  28.3k|}
obj_xref.c:sig_cmp:
   20|   148k|{
   21|   148k|    return a->sign_id - b->sign_id;
   22|   148k|}
obj_xref.c:obj_sig_init:
   62|  6.19k|{
   63|  6.19k|    return RUN_ONCE(&sig_init, o_sig_init);
  ------------------
  |  |  130|  6.19k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 6.19k, False: 0]
  |  |  ------------------
  ------------------
   64|  6.19k|}
obj_xref.c:o_sig_init:
   56|      1|{
   57|      1|    sig_lock = CRYPTO_THREAD_lock_new();
   58|       |    return sig_lock != NULL;
   59|      1|}

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

WPACKET_allocate_bytes:
   20|   570k|{
   21|   570k|    if (!WPACKET_reserve_bytes(pkt, len, allocbytes))
  ------------------
  |  Branch (21:9): [True: 0, False: 570k]
  ------------------
   22|      0|        return 0;
   23|       |
   24|   570k|    pkt->written += len;
   25|   570k|    pkt->curr += len;
   26|   570k|    return 1;
   27|   570k|}
WPACKET_reserve_bytes:
   47|   573k|{
   48|       |    /* Internal API, so should not fail */
   49|   573k|    if (!ossl_assert(pkt->subs != NULL && len != 0))
  ------------------
  |  |   52|  1.14M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 573k, False: 0]
  |  |  |  Branch (52:41): [True: 573k, False: 0]
  |  |  ------------------
  |  |   53|   573k|    __FILE__, __LINE__)
  ------------------
  |  Branch (49:9): [True: 0, False: 573k]
  ------------------
   50|      0|        return 0;
   51|       |
   52|   573k|    if (pkt->maxsize - pkt->written < len)
  ------------------
  |  Branch (52:9): [True: 0, False: 573k]
  ------------------
   53|      0|        return 0;
   54|       |
   55|   573k|    if (pkt->buf != NULL && (pkt->buf->length - pkt->written < len)) {
  ------------------
  |  Branch (55:9): [True: 141k, False: 432k]
  |  Branch (55:29): [True: 0, False: 141k]
  ------------------
   56|      0|        size_t newlen;
   57|      0|        size_t reflen;
   58|       |
   59|      0|        reflen = (len > pkt->buf->length) ? len : pkt->buf->length;
  ------------------
  |  Branch (59:18): [True: 0, False: 0]
  ------------------
   60|       |
   61|      0|        if (reflen > SIZE_MAX / 2) {
  ------------------
  |  Branch (61:13): [True: 0, False: 0]
  ------------------
   62|      0|            newlen = SIZE_MAX;
   63|      0|        } else {
   64|      0|            newlen = reflen * 2;
   65|      0|            if (newlen < DEFAULT_BUF_SIZE)
  ------------------
  |  |   17|      0|#define DEFAULT_BUF_SIZE 256
  ------------------
  |  Branch (65:17): [True: 0, False: 0]
  ------------------
   66|      0|                newlen = DEFAULT_BUF_SIZE;
  ------------------
  |  |   17|      0|#define DEFAULT_BUF_SIZE 256
  ------------------
   67|      0|        }
   68|      0|        if (BUF_MEM_grow(pkt->buf, newlen) == 0)
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|            return 0;
   70|      0|    }
   71|   573k|    if (allocbytes != NULL) {
  ------------------
  |  Branch (71:9): [True: 570k, False: 2.35k]
  ------------------
   72|   570k|        *allocbytes = WPACKET_get_curr(pkt);
   73|   570k|        if (pkt->endfirst && *allocbytes != NULL)
  ------------------
  |  Branch (73:13): [True: 0, False: 570k]
  |  Branch (73:30): [True: 0, False: 0]
  ------------------
   74|      0|            *allocbytes -= len;
   75|   570k|    }
   76|       |
   77|   573k|    return 1;
   78|   573k|}
WPACKET_init_static_len:
  131|  2.35k|{
  132|  2.35k|    size_t max = maxmaxsize(lenbytes);
  133|       |
  134|       |    /* Internal API, so should not fail */
  135|  2.35k|    if (!ossl_assert(buf != NULL && len > 0))
  ------------------
  |  |   52|  4.71k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 2.35k, False: 0]
  |  |  |  Branch (52:41): [True: 2.35k, False: 0]
  |  |  ------------------
  |  |   53|  2.35k|    __FILE__, __LINE__)
  ------------------
  |  Branch (135:9): [True: 0, False: 2.35k]
  ------------------
  136|      0|        return 0;
  137|       |
  138|  2.35k|    pkt->staticbuf = buf;
  139|  2.35k|    pkt->buf = NULL;
  140|  2.35k|    pkt->maxsize = (max < len) ? max : len;
  ------------------
  |  Branch (140:20): [True: 0, False: 2.35k]
  ------------------
  141|  2.35k|    pkt->endfirst = 0;
  142|       |
  143|  2.35k|    return wpacket_intern_init_len(pkt, lenbytes);
  144|  2.35k|}
WPACKET_init_len:
  161|  1.30k|{
  162|       |    /* Internal API, so should not fail */
  163|  1.30k|    if (!ossl_assert(buf != NULL))
  ------------------
  |  |   52|  1.30k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.30k|    __FILE__, __LINE__)
  ------------------
  |  Branch (163:9): [True: 0, False: 1.30k]
  ------------------
  164|      0|        return 0;
  165|       |
  166|  1.30k|    pkt->staticbuf = NULL;
  167|  1.30k|    pkt->buf = buf;
  168|  1.30k|    pkt->maxsize = maxmaxsize(lenbytes);
  169|  1.30k|    pkt->endfirst = 0;
  170|       |
  171|  1.30k|    return wpacket_intern_init_len(pkt, lenbytes);
  172|  1.30k|}
WPACKET_init:
  175|  1.30k|{
  176|  1.30k|    return WPACKET_init_len(pkt, buf, 0);
  177|  1.30k|}
WPACKET_init_null:
  180|  52.2k|{
  181|  52.2k|    pkt->staticbuf = NULL;
  182|  52.2k|    pkt->buf = NULL;
  183|  52.2k|    pkt->maxsize = maxmaxsize(lenbytes);
  184|  52.2k|    pkt->endfirst = 0;
  185|       |
  186|  52.2k|    return wpacket_intern_init_len(pkt, 0);
  187|  52.2k|}
WPACKET_set_flags:
  200|  2.48k|{
  201|       |    /* Internal API, so should not fail */
  202|  2.48k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|  2.48k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.48k|    __FILE__, __LINE__)
  ------------------
  |  Branch (202:9): [True: 0, False: 2.48k]
  ------------------
  203|      0|        return 0;
  204|       |
  205|  2.48k|    pkt->subs->flags = flags;
  206|       |
  207|  2.48k|    return 1;
  208|  2.48k|}
WPACKET_close:
  336|   187k|{
  337|       |    /*
  338|       |     * Internal API, so should not fail - but we do negative testing of this
  339|       |     * so no assert (otherwise the tests fail)
  340|       |     */
  341|   187k|    if (pkt->subs == NULL || pkt->subs->parent == NULL)
  ------------------
  |  Branch (341:9): [True: 0, False: 187k]
  |  Branch (341:30): [True: 0, False: 187k]
  ------------------
  342|      0|        return 0;
  343|       |
  344|   187k|    return wpacket_intern_close(pkt, pkt->subs, 1);
  345|   187k|}
WPACKET_finish:
  348|  55.8k|{
  349|  55.8k|    int ret;
  350|       |
  351|       |    /*
  352|       |     * Internal API, so should not fail - but we do negative testing of this
  353|       |     * so no assert (otherwise the tests fail)
  354|       |     */
  355|  55.8k|    if (pkt->subs == NULL || pkt->subs->parent != NULL)
  ------------------
  |  Branch (355:9): [True: 0, False: 55.8k]
  |  Branch (355:30): [True: 0, False: 55.8k]
  ------------------
  356|      0|        return 0;
  357|       |
  358|  55.8k|    ret = wpacket_intern_close(pkt, pkt->subs, 1);
  359|  55.8k|    if (ret) {
  ------------------
  |  Branch (359:9): [True: 55.8k, False: 0]
  ------------------
  360|  55.8k|        OPENSSL_free(pkt->subs);
  ------------------
  |  |  131|  55.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  361|  55.8k|        pkt->subs = NULL;
  362|  55.8k|    }
  363|       |
  364|  55.8k|    return ret;
  365|  55.8k|}
WPACKET_start_sub_packet_len__:
  368|   187k|{
  369|   187k|    WPACKET_SUB *sub;
  370|   187k|    unsigned char *lenchars;
  371|       |
  372|       |    /* Internal API, so should not fail */
  373|   187k|    if (!ossl_assert(pkt->subs != NULL))
  ------------------
  |  |   52|   187k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   187k|    __FILE__, __LINE__)
  ------------------
  |  Branch (373:9): [True: 0, False: 187k]
  ------------------
  374|      0|        return 0;
  375|       |
  376|       |    /* We don't support lenbytes greater than 0 when doing endfirst writing */
  377|   187k|    if (lenbytes > 0 && pkt->endfirst)
  ------------------
  |  Branch (377:9): [True: 31.1k, False: 156k]
  |  Branch (377:25): [True: 0, False: 31.1k]
  ------------------
  378|      0|        return 0;
  379|       |
  380|   187k|    if ((sub = OPENSSL_zalloc(sizeof(*sub))) == NULL)
  ------------------
  |  |  108|   187k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (380:9): [True: 0, False: 187k]
  ------------------
  381|      0|        return 0;
  382|       |
  383|   187k|    sub->parent = pkt->subs;
  384|   187k|    pkt->subs = sub;
  385|   187k|    sub->pwritten = pkt->written + lenbytes;
  386|   187k|    sub->lenbytes = lenbytes;
  387|       |
  388|   187k|    if (lenbytes == 0) {
  ------------------
  |  Branch (388:9): [True: 156k, False: 31.1k]
  ------------------
  389|   156k|        sub->packet_len = 0;
  390|   156k|        return 1;
  391|   156k|    }
  392|       |
  393|  31.1k|    sub->packet_len = pkt->written;
  394|       |
  395|  31.1k|    if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars))
  ------------------
  |  Branch (395:9): [True: 0, False: 31.1k]
  ------------------
  396|      0|        return 0;
  397|       |
  398|  31.1k|    return 1;
  399|  31.1k|}
WPACKET_start_sub_packet:
  402|   156k|{
  403|   156k|    return WPACKET_start_sub_packet_len__(pkt, 0);
  404|   156k|}
WPACKET_put_bytes__:
  407|   422k|{
  408|   422k|    unsigned char *data;
  409|       |
  410|       |    /* Internal API, so should not fail */
  411|   422k|    if (!ossl_assert(size <= sizeof(uint64_t))
  ------------------
  |  |   52|   845k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   845k|    __FILE__, __LINE__)
  ------------------
  |  Branch (411:9): [True: 0, False: 422k]
  ------------------
  412|   422k|        || !WPACKET_allocate_bytes(pkt, size, &data)
  ------------------
  |  Branch (412:12): [True: 0, False: 422k]
  ------------------
  413|   422k|        || !put_value(data, val, size))
  ------------------
  |  Branch (413:12): [True: 0, False: 422k]
  ------------------
  414|      0|        return 0;
  415|       |
  416|   422k|    return 1;
  417|   422k|}
WPACKET_memcpy:
  461|  9.93k|{
  462|  9.93k|    unsigned char *dest;
  463|       |
  464|  9.93k|    if (len == 0)
  ------------------
  |  Branch (464:9): [True: 0, False: 9.93k]
  ------------------
  465|      0|        return 1;
  466|       |
  467|  9.93k|    if (!WPACKET_allocate_bytes(pkt, len, &dest))
  ------------------
  |  Branch (467:9): [True: 0, False: 9.93k]
  ------------------
  468|      0|        return 0;
  469|       |
  470|  9.93k|    if (dest != NULL)
  ------------------
  |  Branch (470:9): [True: 9.93k, False: 0]
  ------------------
  471|  9.93k|        memcpy(dest, src, len);
  472|       |
  473|  9.93k|    return 1;
  474|  9.93k|}
WPACKET_sub_memcpy__:
  478|  4.96k|{
  479|  4.96k|    if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
  ------------------
  |  Branch (479:9): [True: 0, False: 4.96k]
  ------------------
  480|  4.96k|        || !WPACKET_memcpy(pkt, src, len)
  ------------------
  |  Branch (480:12): [True: 0, False: 4.96k]
  ------------------
  481|  4.96k|        || !WPACKET_close(pkt))
  ------------------
  |  Branch (481:12): [True: 0, False: 4.96k]
  ------------------
  482|      0|        return 0;
  483|       |
  484|  4.96k|    return 1;
  485|  4.96k|}
WPACKET_get_total_written:
  488|  53.4k|{
  489|       |    /* Internal API, so should not fail */
  490|  53.4k|    if (!ossl_assert(written != NULL))
  ------------------
  |  |   52|  53.4k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  53.4k|    __FILE__, __LINE__)
  ------------------
  |  Branch (490:9): [True: 0, False: 53.4k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|  53.4k|    *written = pkt->written;
  494|       |
  495|  53.4k|    return 1;
  496|  53.4k|}
WPACKET_get_length:
  499|  58.1k|{
  500|       |    /* Internal API, so should not fail */
  501|  58.1k|    if (!ossl_assert(pkt->subs != NULL && len != NULL))
  ------------------
  |  |   52|   116k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 58.1k, False: 0]
  |  |  |  Branch (52:41): [True: 58.1k, False: 0]
  |  |  ------------------
  |  |   53|  58.1k|    __FILE__, __LINE__)
  ------------------
  |  Branch (501:9): [True: 0, False: 58.1k]
  ------------------
  502|      0|        return 0;
  503|       |
  504|  58.1k|    *len = pkt->written - pkt->subs->pwritten;
  505|       |
  506|  58.1k|    return 1;
  507|  58.1k|}
WPACKET_get_curr:
  510|   570k|{
  511|   570k|    unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|   570k|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 11.7k, False: 558k]
  |  |  ------------------
  |  |   41|   570k|        ? (p)->staticbuf                            \
  |  |   42|   570k|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 141k, False: 417k]
  |  |  ------------------
  |  |   43|   558k|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|   558k|                  : NULL))
  ------------------
  512|       |
  513|   570k|    if (buf == NULL)
  ------------------
  |  Branch (513:9): [True: 417k, False: 152k]
  ------------------
  514|   417k|        return NULL;
  515|       |
  516|   152k|    if (pkt->endfirst)
  ------------------
  |  Branch (516:9): [True: 0, False: 152k]
  ------------------
  517|      0|        return buf + pkt->maxsize - pkt->curr;
  518|       |
  519|   152k|    return buf + pkt->curr;
  520|   152k|}
WPACKET_is_null_buf:
  523|  52.2k|{
  524|  52.2k|    return pkt->buf == NULL && pkt->staticbuf == NULL;
  ------------------
  |  Branch (524:12): [True: 52.2k, False: 0]
  |  Branch (524:32): [True: 52.2k, False: 0]
  ------------------
  525|  52.2k|}
WPACKET_cleanup:
  528|  2.42k|{
  529|  2.42k|    WPACKET_SUB *sub, *parent;
  530|       |
  531|  2.63k|    for (sub = pkt->subs; sub != NULL; sub = parent) {
  ------------------
  |  Branch (531:27): [True: 209, False: 2.42k]
  ------------------
  532|    209|        parent = sub->parent;
  533|    209|        OPENSSL_free(sub);
  ------------------
  |  |  131|    209|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  534|    209|    }
  535|       |    pkt->subs = NULL;
  536|  2.42k|}
packet.c:maxmaxsize:
   96|  55.9k|{
   97|  55.9k|    if (lenbytes >= sizeof(size_t) || lenbytes == 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 55.9k]
  |  Branch (97:39): [True: 55.9k, False: 0]
  ------------------
   98|  55.9k|        return SIZE_MAX;
   99|       |
  100|      0|    return ((size_t)1 << (lenbytes * 8)) - 1 + lenbytes;
  101|  55.9k|}
packet.c:wpacket_intern_init_len:
  104|  55.9k|{
  105|  55.9k|    unsigned char *lenchars;
  106|       |
  107|  55.9k|    pkt->curr = 0;
  108|  55.9k|    pkt->written = 0;
  109|       |
  110|  55.9k|    if ((pkt->subs = OPENSSL_zalloc(sizeof(*pkt->subs))) == NULL)
  ------------------
  |  |  108|  55.9k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (110:9): [True: 0, False: 55.9k]
  ------------------
  111|      0|        return 0;
  112|       |
  113|  55.9k|    if (lenbytes == 0)
  ------------------
  |  Branch (113:9): [True: 55.9k, False: 0]
  ------------------
  114|  55.9k|        return 1;
  115|       |
  116|      0|    pkt->subs->pwritten = lenbytes;
  117|      0|    pkt->subs->lenbytes = lenbytes;
  118|       |
  119|      0|    if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars)) {
  ------------------
  |  Branch (119:9): [True: 0, False: 0]
  ------------------
  120|      0|        OPENSSL_free(pkt->subs);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|      0|        pkt->subs = NULL;
  122|      0|        return 0;
  123|      0|    }
  124|      0|    pkt->subs->packet_len = 0;
  125|       |
  126|      0|    return 1;
  127|      0|}
packet.c:wpacket_intern_close:
  251|   243k|{
  252|   243k|    size_t packlen = pkt->written - sub->pwritten;
  253|       |
  254|   243k|    if (packlen == 0
  ------------------
  |  Branch (254:9): [True: 1.24k, False: 242k]
  ------------------
  255|  1.24k|        && (sub->flags & WPACKET_FLAGS_NON_ZERO_LENGTH) != 0)
  ------------------
  |  |  697|  1.24k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (255:12): [True: 0, False: 1.24k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|   243k|    if (packlen == 0
  ------------------
  |  Branch (258:9): [True: 1.24k, False: 242k]
  ------------------
  259|  1.24k|        && sub->flags & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) {
  ------------------
  |  |  703|  1.24k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  |  Branch (259:12): [True: 0, False: 1.24k]
  ------------------
  260|       |        /* We can't handle this case. Return an error */
  261|      0|        if (!doclose)
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            return 0;
  263|       |
  264|       |        /* Deallocate any bytes allocated for the length of the WPACKET */
  265|      0|        if ((pkt->curr - sub->lenbytes) == sub->packet_len) {
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|            pkt->written -= sub->lenbytes;
  267|      0|            pkt->curr -= sub->lenbytes;
  268|      0|        }
  269|       |
  270|       |        /* Don't write out the packet length */
  271|      0|        sub->packet_len = 0;
  272|      0|        sub->lenbytes = 0;
  273|      0|    }
  274|       |
  275|       |    /* Write out the WPACKET length if needed */
  276|   243k|    if (sub->lenbytes > 0) {
  ------------------
  |  Branch (276:9): [True: 30.9k, False: 212k]
  ------------------
  277|  30.9k|        unsigned char *buf = GETBUF(pkt);
  ------------------
  |  |   40|  30.9k|#define GETBUF(p) (((p)->staticbuf != NULL)         \
  |  |  ------------------
  |  |  |  Branch (40:20): [True: 2.35k, False: 28.6k]
  |  |  ------------------
  |  |   41|  30.9k|        ? (p)->staticbuf                            \
  |  |   42|  30.9k|        : ((p)->buf != NULL                         \
  |  |  ------------------
  |  |  |  Branch (42:12): [True: 28.6k, False: 0]
  |  |  ------------------
  |  |   43|  28.6k|                  ? (unsigned char *)(p)->buf->data \
  |  |   44|  28.6k|                  : NULL))
  ------------------
  278|       |
  279|  30.9k|        if (buf != NULL) {
  ------------------
  |  Branch (279:13): [True: 30.9k, False: 0]
  ------------------
  280|  30.9k|#if !defined OPENSSL_NO_QUIC && !defined FIPS_MODULE
  281|  30.9k|            if ((sub->flags & WPACKET_FLAGS_QUIC_VLINT) == 0) {
  ------------------
  |  |  706|  30.9k|#define WPACKET_FLAGS_QUIC_VLINT 4
  ------------------
  |  Branch (281:17): [True: 30.9k, False: 0]
  ------------------
  282|  30.9k|                if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  ------------------
  |  Branch (282:21): [True: 0, False: 30.9k]
  ------------------
  283|      0|                    return 0;
  284|  30.9k|            } else {
  285|      0|                if (!put_quic_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  ------------------
  |  Branch (285:21): [True: 0, False: 0]
  ------------------
  286|      0|                    return 0;
  287|      0|            }
  288|       |#else
  289|       |            if (!put_value(&buf[sub->packet_len], packlen, sub->lenbytes))
  290|       |                return 0;
  291|       |#endif
  292|  30.9k|        }
  293|   212k|    } else if (pkt->endfirst && sub->parent != NULL
  ------------------
  |  Branch (293:16): [True: 0, False: 212k]
  |  Branch (293:33): [True: 0, False: 0]
  ------------------
  294|      0|        && (packlen != 0
  ------------------
  |  Branch (294:13): [True: 0, False: 0]
  ------------------
  295|      0|            || (sub->flags
  ------------------
  |  Branch (295:16): [True: 0, False: 0]
  ------------------
  296|      0|                   & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH)
  ------------------
  |  |  703|      0|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  297|      0|                == 0)) {
  298|      0|        size_t tmplen = packlen;
  299|      0|        size_t numlenbytes = 1;
  300|       |
  301|      0|        while ((tmplen = tmplen >> 8) > 0)
  ------------------
  |  Branch (301:16): [True: 0, False: 0]
  ------------------
  302|      0|            numlenbytes++;
  303|      0|        if (!WPACKET_put_bytes__(pkt, packlen, numlenbytes))
  ------------------
  |  Branch (303:13): [True: 0, False: 0]
  ------------------
  304|      0|            return 0;
  305|      0|        if (packlen > 0x7f) {
  ------------------
  |  Branch (305:13): [True: 0, False: 0]
  ------------------
  306|      0|            numlenbytes |= 0x80;
  307|      0|            if (!WPACKET_put_bytes_u8(pkt, numlenbytes))
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  ------------------
  308|      0|                return 0;
  309|      0|        }
  310|      0|    }
  311|       |
  312|   243k|    if (doclose) {
  ------------------
  |  Branch (312:9): [True: 243k, False: 0]
  ------------------
  313|   243k|        pkt->subs = sub->parent;
  314|   243k|        OPENSSL_free(sub);
  ------------------
  |  |  131|   243k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  315|   243k|    }
  316|       |
  317|   243k|    return 1;
  318|   243k|}
packet.c:put_value:
  212|   453k|{
  213|   453k|    if (data == NULL)
  ------------------
  |  Branch (213:9): [True: 313k, False: 140k]
  ------------------
  214|   313k|        return 1;
  215|       |
  216|   408k|    for (data += len - 1; len > 0; len--) {
  ------------------
  |  Branch (216:27): [True: 268k, False: 140k]
  ------------------
  217|   268k|        *data = (unsigned char)(value & 0xff);
  218|   268k|        data--;
  219|   268k|        value >>= 8;
  220|   268k|    }
  221|       |
  222|       |    /* Check whether we could fit the value in the assigned number of bytes */
  223|   140k|    if (value > 0)
  ------------------
  |  Branch (223:9): [True: 0, False: 140k]
  ------------------
  224|      0|        return 0;
  225|       |
  226|   140k|    return 1;
  227|   140k|}

OSSL_PARAM_BLD_new:
   92|  2.47k|{
   93|  2.47k|    OSSL_PARAM_BLD *r = OPENSSL_zalloc(sizeof(OSSL_PARAM_BLD));
  ------------------
  |  |  108|  2.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|       |
   95|  2.47k|    if (r != NULL) {
  ------------------
  |  Branch (95:9): [True: 2.47k, False: 0]
  ------------------
   96|  2.47k|        r->params = sk_OSSL_PARAM_BLD_DEF_new_null();
   97|  2.47k|        if (r->params == NULL) {
  ------------------
  |  Branch (97:13): [True: 0, False: 2.47k]
  ------------------
   98|      0|            OPENSSL_free(r);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |            r = NULL;
  100|      0|        }
  101|  2.47k|    }
  102|  2.47k|    return r;
  103|  2.47k|}
OSSL_PARAM_BLD_free:
  114|  2.47k|{
  115|  2.47k|    if (bld == NULL)
  ------------------
  |  Branch (115:9): [True: 0, False: 2.47k]
  ------------------
  116|      0|        return;
  117|  2.47k|    free_all_params(bld);
  118|  2.47k|    sk_OSSL_PARAM_BLD_DEF_free(bld->params);
  119|  2.47k|    OPENSSL_free(bld);
  ------------------
  |  |  131|  2.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  120|  2.47k|}
OSSL_PARAM_BLD_push_octet_string:
  364|  2.47k|{
  365|  2.47k|    OSSL_PARAM_BLD_DEF *pd;
  366|  2.47k|    int secure;
  367|       |
  368|  2.47k|    if (bld == NULL || key == NULL || buf == NULL) {
  ------------------
  |  Branch (368:9): [True: 0, False: 2.47k]
  |  Branch (368:24): [True: 0, False: 2.47k]
  |  Branch (368:39): [True: 0, False: 2.47k]
  ------------------
  369|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  370|      0|        return 0;
  371|      0|    }
  372|       |
  373|  2.47k|    secure = CRYPTO_secure_allocated(buf);
  374|  2.47k|    pd = param_push(bld, key, bsize, bsize, OSSL_PARAM_OCTET_STRING, secure);
  ------------------
  |  |  123|  2.47k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  375|  2.47k|    if (pd == NULL)
  ------------------
  |  Branch (375:9): [True: 0, False: 2.47k]
  ------------------
  376|      0|        return 0;
  377|  2.47k|    pd->string = buf;
  378|  2.47k|    return 1;
  379|  2.47k|}
OSSL_PARAM_BLD_to_param:
  452|  2.47k|{
  453|  2.47k|    OSSL_PARAM_ALIGNED_BLOCK *blk, *s = NULL;
  454|  2.47k|    OSSL_PARAM *params, *last;
  455|  2.47k|    int num;
  456|  2.47k|    size_t p_blks, total, ss;
  457|       |
  458|  2.47k|    if (bld == NULL) {
  ------------------
  |  Branch (458:9): [True: 0, False: 2.47k]
  ------------------
  459|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        return 0;
  461|      0|    }
  462|       |
  463|  2.47k|    num = sk_OSSL_PARAM_BLD_DEF_num(bld->params);
  464|  2.47k|    p_blks = ossl_param_bytes_to_blocks((1 + num) * sizeof(*params));
  465|  2.47k|    total = OSSL_PARAM_ALIGN_SIZE * (p_blks + bld->total_blocks);
  ------------------
  |  |   22|  2.47k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
  466|  2.47k|    ss = OSSL_PARAM_ALIGN_SIZE * bld->secure_blocks;
  ------------------
  |  |   22|  2.47k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
  467|       |
  468|  2.47k|    if (ss > 0) {
  ------------------
  |  Branch (468:9): [True: 0, False: 2.47k]
  ------------------
  469|      0|        s = OPENSSL_secure_malloc(ss);
  ------------------
  |  |  139|      0|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  470|      0|        if (s == NULL) {
  ------------------
  |  Branch (470:13): [True: 0, False: 0]
  ------------------
  471|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_SECURE_MALLOC_FAILURE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  472|      0|            return NULL;
  473|      0|        }
  474|      0|    }
  475|  2.47k|    params = OPENSSL_malloc(total);
  ------------------
  |  |  106|  2.47k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  476|  2.47k|    if (params == NULL) {
  ------------------
  |  Branch (476:9): [True: 0, False: 2.47k]
  ------------------
  477|      0|        OPENSSL_secure_free(s);
  ------------------
  |  |  147|      0|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  478|      0|        return NULL;
  479|      0|    }
  480|  2.47k|    blk = p_blks + (OSSL_PARAM_ALIGNED_BLOCK *)(params);
  481|  2.47k|    last = param_bld_convert(bld, params, blk, s);
  482|  2.47k|    ossl_param_set_secure_block(last, s, ss);
  483|       |
  484|       |    /* Reset builder for reuse */
  485|  2.47k|    bld->total_blocks = 0;
  486|  2.47k|    bld->secure_blocks = 0;
  487|  2.47k|    free_all_params(bld);
  488|  2.47k|    return params;
  489|  2.47k|}
param_build.c:free_all_params:
  106|  4.94k|{
  107|  4.94k|    int i, n = sk_OSSL_PARAM_BLD_DEF_num(bld->params);
  108|       |
  109|  7.41k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (109:17): [True: 2.47k, False: 4.94k]
  ------------------
  110|  2.47k|        OPENSSL_free(sk_OSSL_PARAM_BLD_DEF_pop(bld->params));
  ------------------
  |  |  131|  2.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|  4.94k|}
param_build.c:param_push:
   54|  2.47k|{
   55|  2.47k|    OSSL_PARAM_BLD_DEF *pd = OPENSSL_zalloc(sizeof(*pd));
  ------------------
  |  |  108|  2.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|       |
   57|  2.47k|    if (pd == NULL)
  ------------------
  |  Branch (57:9): [True: 0, False: 2.47k]
  ------------------
   58|      0|        return NULL;
   59|  2.47k|    pd->key = key;
   60|  2.47k|    pd->type = type;
   61|  2.47k|    pd->size = size;
   62|  2.47k|    pd->alloc_blocks = ossl_param_bytes_to_blocks(alloc);
   63|  2.47k|    if ((pd->secure = secure) != 0)
  ------------------
  |  Branch (63:9): [True: 0, False: 2.47k]
  ------------------
   64|      0|        bld->secure_blocks += pd->alloc_blocks;
   65|  2.47k|    else
   66|  2.47k|        bld->total_blocks += pd->alloc_blocks;
   67|  2.47k|    if (sk_OSSL_PARAM_BLD_DEF_push(bld->params, pd) <= 0) {
  ------------------
  |  Branch (67:9): [True: 0, False: 2.47k]
  ------------------
   68|      0|        OPENSSL_free(pd);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   69|       |        pd = NULL;
   70|      0|    }
   71|  2.47k|    return pd;
   72|  2.47k|}
param_build.c:param_bld_convert:
  401|  2.47k|{
  402|  2.47k|    int i, num = sk_OSSL_PARAM_BLD_DEF_num(bld->params);
  403|  2.47k|    OSSL_PARAM_BLD_DEF *pd;
  404|  2.47k|    void *p;
  405|       |
  406|  4.94k|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (406:17): [True: 2.47k, False: 2.47k]
  ------------------
  407|  2.47k|        pd = sk_OSSL_PARAM_BLD_DEF_value(bld->params, i);
  408|  2.47k|        param[i].key = pd->key;
  409|  2.47k|        param[i].data_type = pd->type;
  410|  2.47k|        param[i].data_size = pd->size;
  411|  2.47k|        param[i].return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  2.47k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  412|       |
  413|  2.47k|        if (pd->secure) {
  ------------------
  |  Branch (413:13): [True: 0, False: 2.47k]
  ------------------
  414|      0|            p = secure;
  415|      0|            secure += pd->alloc_blocks;
  416|  2.47k|        } else {
  417|  2.47k|            p = blk;
  418|  2.47k|            blk += pd->alloc_blocks;
  419|  2.47k|        }
  420|  2.47k|        param[i].data = p;
  421|  2.47k|        if (pd->bn != NULL) {
  ------------------
  |  Branch (421:13): [True: 0, False: 2.47k]
  ------------------
  422|       |            /* BIGNUM */
  423|      0|            if (pd->type == OSSL_PARAM_UNSIGNED_INTEGER)
  ------------------
  |  |  107|      0|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (423:17): [True: 0, False: 0]
  ------------------
  424|      0|                BN_bn2nativepad(pd->bn, (unsigned char *)p, (int)pd->size);
  425|      0|            else
  426|      0|                BN_signed_bn2native(pd->bn, (unsigned char *)p, (int)pd->size);
  427|  2.47k|        } else if (pd->type == OSSL_PARAM_OCTET_PTR
  ------------------
  |  |  160|  4.94k|#define OSSL_PARAM_OCTET_PTR 7
  ------------------
  |  Branch (427:20): [True: 0, False: 2.47k]
  ------------------
  428|  2.47k|            || pd->type == OSSL_PARAM_UTF8_PTR) {
  ------------------
  |  |  141|  2.47k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
  |  Branch (428:16): [True: 0, False: 2.47k]
  ------------------
  429|       |            /* PTR */
  430|      0|            *(const void **)p = pd->string;
  431|  2.47k|        } else if (pd->type == OSSL_PARAM_OCTET_STRING
  ------------------
  |  |  123|  4.94k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (431:20): [True: 2.47k, False: 0]
  ------------------
  432|  2.47k|            || pd->type == OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (432:16): [True: 0, False: 0]
  ------------------
  433|  2.47k|            if (pd->string != NULL)
  ------------------
  |  Branch (433:17): [True: 2.47k, False: 0]
  ------------------
  434|  2.47k|                memcpy(p, pd->string, pd->size);
  435|      0|            else
  436|      0|                memset(p, 0, pd->size);
  437|  2.47k|            if (pd->type == OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|  2.47k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (437:17): [True: 0, False: 2.47k]
  ------------------
  438|      0|                ((char *)p)[pd->size] = '\0';
  439|  2.47k|        } else {
  440|       |            /* Number, but could also be a NULL BIGNUM */
  441|      0|            if (pd->size > sizeof(pd->num))
  ------------------
  |  Branch (441:17): [True: 0, False: 0]
  ------------------
  442|      0|                memset(p, 0, pd->size);
  443|      0|            else if (pd->size > 0)
  ------------------
  |  Branch (443:22): [True: 0, False: 0]
  ------------------
  444|      0|                memcpy(p, &pd->num, pd->size);
  445|      0|        }
  446|  2.47k|    }
  447|  2.47k|    param[i] = OSSL_PARAM_construct_end();
  448|  2.47k|    return param + i;
  449|  2.47k|}

ossl_param_build_set_int:
   24|   104k|{
   25|   104k|    if (bld != NULL)
  ------------------
  |  Branch (25:9): [True: 0, False: 104k]
  ------------------
   26|      0|        return OSSL_PARAM_BLD_push_int(bld, key, num);
   27|   104k|    p = OSSL_PARAM_locate(p, key);
   28|   104k|    if (p != NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 104k]
  ------------------
   29|      0|        return OSSL_PARAM_set_int(p, num);
   30|   104k|    return 1;
   31|   104k|}
ossl_param_build_set_utf8_string:
   46|   261k|{
   47|   261k|    if (bld != NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 261k]
  ------------------
   48|      0|        return OSSL_PARAM_BLD_push_utf8_string(bld, key, buf, 0);
   49|   261k|    p = OSSL_PARAM_locate(p, key);
   50|   261k|    if (p != NULL)
  ------------------
  |  Branch (50:9): [True: 0, False: 261k]
  ------------------
   51|      0|        return OSSL_PARAM_set_utf8_string(p, buf);
   52|   261k|    return 1;
   53|   261k|}
ossl_param_build_set_octet_string:
   59|  12.2k|{
   60|  12.2k|    if (bld != NULL)
  ------------------
  |  Branch (60:9): [True: 2.47k, False: 9.82k]
  ------------------
   61|  2.47k|        return OSSL_PARAM_BLD_push_octet_string(bld, key, data, data_len);
   62|       |
   63|  9.82k|    p = OSSL_PARAM_locate(p, key);
   64|  9.82k|    if (p != NULL)
  ------------------
  |  Branch (64:9): [True: 0, False: 9.82k]
  ------------------
   65|      0|        return OSSL_PARAM_set_octet_string(p, data, data_len);
   66|  9.82k|    return 1;
   67|  9.82k|}
ossl_param_build_set_bn:
   88|   276k|{
   89|   276k|    if (bld != NULL)
  ------------------
  |  Branch (89:9): [True: 0, False: 276k]
  ------------------
   90|      0|        return OSSL_PARAM_BLD_push_BN(bld, key, bn);
   91|       |
   92|   276k|    p = OSSL_PARAM_locate(p, key);
   93|   276k|    if (p != NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 276k]
  ------------------
   94|      0|        return OSSL_PARAM_set_BN(p, bn) > 0;
   95|   276k|    return 1;
   96|   276k|}

OSSL_PARAM_locate:
   55|  5.44M|{
   56|  5.44M|    if (ossl_likely(p != NULL && key != NULL))
  ------------------
  |  |   22|  10.8M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 5.43M, False: 9.82k]
  |  |  |  Branch (22:44): [True: 5.43M, False: 9.82k]
  |  |  |  Branch (22:44): [True: 5.43M, False: 0]
  |  |  ------------------
  ------------------
   57|  22.7M|        for (; p->key != NULL; p++)
  ------------------
  |  Branch (57:16): [True: 20.7M, False: 2.01M]
  ------------------
   58|  20.7M|            if (strcmp(key, p->key) == 0)
  ------------------
  |  Branch (58:17): [True: 3.42M, False: 17.3M]
  ------------------
   59|  3.42M|                return p;
   60|  2.02M|    return NULL;
   61|  5.44M|}
OSSL_PARAM_locate_const:
   64|  3.37M|{
   65|  3.37M|    return OSSL_PARAM_locate((OSSL_PARAM *)p, key);
   66|  3.37M|}
OSSL_PARAM_modified:
   82|  10.1k|{
   83|  10.1k|    return p != NULL && p->return_size != OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  10.1k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
  |  Branch (83:12): [True: 10.1k, False: 0]
  |  Branch (83:25): [True: 6.42k, False: 3.70k]
  ------------------
   84|  10.1k|}
OSSL_PARAM_get_int:
  268|   526k|{
  269|   526k|#ifndef OPENSSL_SMALL_FOOTPRINT
  270|   526k|    switch (sizeof(int)) {
  ------------------
  |  Branch (270:13): [True: 526k, Folded]
  ------------------
  271|   526k|    case sizeof(int32_t):
  ------------------
  |  Branch (271:5): [True: 526k, False: 0]
  ------------------
  272|   526k|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
  273|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (273:5): [True: 0, False: 526k]
  ------------------
  274|      0|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
  275|   526k|    }
  276|      0|#endif
  277|      0|    return general_get_int(p, val, sizeof(*val));
  278|   526k|}
OSSL_PARAM_set_int:
  281|  1.23M|{
  282|  1.23M|#ifndef OPENSSL_SMALL_FOOTPRINT
  283|  1.23M|    switch (sizeof(int)) {
  ------------------
  |  Branch (283:13): [True: 1.23M, Folded]
  ------------------
  284|  1.23M|    case sizeof(int32_t):
  ------------------
  |  Branch (284:5): [True: 1.23M, False: 0]
  ------------------
  285|  1.23M|        return OSSL_PARAM_set_int32(p, (int32_t)val);
  286|      0|    case sizeof(int64_t):
  ------------------
  |  Branch (286:5): [True: 0, False: 1.23M]
  ------------------
  287|      0|        return OSSL_PARAM_set_int64(p, (int64_t)val);
  288|  1.23M|    }
  289|      0|#endif
  290|      0|    return general_set_int(p, &val, sizeof(val));
  291|  1.23M|}
OSSL_PARAM_construct_int:
  294|  1.64M|{
  295|  1.64M|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(int));
  ------------------
  |  |  106|  1.64M|#define OSSL_PARAM_INTEGER 1
  ------------------
  296|  1.64M|}
OSSL_PARAM_get_uint:
  299|   384k|{
  300|   384k|#ifndef OPENSSL_SMALL_FOOTPRINT
  301|   384k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (301:13): [True: 384k, Folded]
  ------------------
  302|   384k|    case sizeof(uint32_t):
  ------------------
  |  Branch (302:5): [True: 384k, False: 0]
  ------------------
  303|   384k|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
  304|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (304:5): [True: 0, False: 384k]
  ------------------
  305|      0|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
  306|   384k|    }
  307|      0|#endif
  308|      0|    return general_get_uint(p, val, sizeof(*val));
  309|   384k|}
OSSL_PARAM_set_uint:
  312|  93.4k|{
  313|  93.4k|#ifndef OPENSSL_SMALL_FOOTPRINT
  314|  93.4k|    switch (sizeof(unsigned int)) {
  ------------------
  |  Branch (314:13): [True: 93.4k, Folded]
  ------------------
  315|  93.4k|    case sizeof(uint32_t):
  ------------------
  |  Branch (315:5): [True: 93.4k, False: 0]
  ------------------
  316|  93.4k|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
  317|      0|    case sizeof(uint64_t):
  ------------------
  |  Branch (317:5): [True: 0, False: 93.4k]
  ------------------
  318|      0|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
  319|  93.4k|    }
  320|      0|#endif
  321|      0|    return general_set_uint(p, &val, sizeof(val));
  322|  93.4k|}
OSSL_PARAM_construct_uint:
  325|  99.9k|{
  326|  99.9k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  99.9k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  327|  99.9k|        sizeof(unsigned int));
  328|  99.9k|}
OSSL_PARAM_get_int32:
  394|   526k|{
  395|   526k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (395:9): [True: 0, False: 526k]
  |  Branch (395:24): [True: 0, False: 526k]
  ------------------
  396|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  397|      0|        return 0;
  398|      0|    }
  399|       |
  400|   526k|    if (p->data == NULL) {
  ------------------
  |  Branch (400:9): [True: 0, False: 526k]
  ------------------
  401|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  402|      0|        return 0;
  403|      0|    }
  404|       |
  405|   526k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   526k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (405:9): [True: 520k, False: 6.00k]
  ------------------
  406|   520k|#ifndef OPENSSL_SMALL_FOOTPRINT
  407|   520k|        int64_t i64;
  408|       |
  409|   520k|        switch (p->data_size) {
  ------------------
  |  Branch (409:17): [True: 520k, False: 0]
  ------------------
  410|   520k|        case sizeof(int32_t):
  ------------------
  |  Branch (410:9): [True: 520k, False: 0]
  ------------------
  411|   520k|            *val = *(const int32_t *)p->data;
  412|   520k|            return 1;
  413|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (413:9): [True: 0, False: 520k]
  ------------------
  414|      0|            i64 = *(const int64_t *)p->data;
  415|      0|            if (i64 >= INT32_MIN && i64 <= INT32_MAX) {
  ------------------
  |  Branch (415:17): [True: 0, False: 0]
  |  Branch (415:37): [True: 0, False: 0]
  ------------------
  416|      0|                *val = (int32_t)i64;
  417|      0|                return 1;
  418|      0|            }
  419|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  420|      0|            return 0;
  421|   520k|        }
  422|      0|#endif
  423|      0|        return general_get_int(p, val, sizeof(*val));
  424|       |
  425|   520k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|  6.00k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (425:16): [True: 6.00k, False: 0]
  ------------------
  426|  6.00k|#ifndef OPENSSL_SMALL_FOOTPRINT
  427|  6.00k|        uint32_t u32;
  428|  6.00k|        uint64_t u64;
  429|       |
  430|  6.00k|        switch (p->data_size) {
  ------------------
  |  Branch (430:17): [True: 6.00k, False: 0]
  ------------------
  431|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (431:9): [True: 0, False: 6.00k]
  ------------------
  432|      0|            u32 = *(const uint32_t *)p->data;
  433|      0|            if (u32 <= INT32_MAX) {
  ------------------
  |  Branch (433:17): [True: 0, False: 0]
  ------------------
  434|      0|                *val = (int32_t)u32;
  435|      0|                return 1;
  436|      0|            }
  437|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  438|      0|            return 0;
  439|  6.00k|        case sizeof(uint64_t):
  ------------------
  |  Branch (439:9): [True: 6.00k, False: 0]
  ------------------
  440|  6.00k|            u64 = *(const uint64_t *)p->data;
  441|  6.00k|            if (u64 <= INT32_MAX) {
  ------------------
  |  Branch (441:17): [True: 6.00k, False: 0]
  ------------------
  442|  6.00k|                *val = (int32_t)u64;
  443|  6.00k|                return 1;
  444|  6.00k|            }
  445|      0|            err_out_of_range;
  ------------------
  |  |   26|  6.00k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  446|      0|            return 0;
  447|  6.00k|        }
  448|      0|#endif
  449|      0|        return general_get_int(p, val, sizeof(*val));
  450|       |
  451|  6.00k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (451:16): [True: 0, False: 0]
  ------------------
  452|      0|#ifndef OPENSSL_SYS_UEFI
  453|      0|        double d;
  454|       |
  455|      0|        switch (p->data_size) {
  ------------------
  |  Branch (455:17): [True: 0, False: 0]
  ------------------
  456|      0|        case sizeof(double):
  ------------------
  |  Branch (456:9): [True: 0, False: 0]
  ------------------
  457|      0|            d = *(const double *)p->data;
  458|      0|            if (d >= INT32_MIN && d <= INT32_MAX && d == (int32_t)d) {
  ------------------
  |  Branch (458:17): [True: 0, False: 0]
  |  Branch (458:35): [True: 0, False: 0]
  |  Branch (458:53): [True: 0, False: 0]
  ------------------
  459|      0|                *val = (int32_t)d;
  460|      0|                return 1;
  461|      0|            }
  462|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  463|      0|            return 0;
  464|      0|        }
  465|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  466|      0|        return 0;
  467|      0|#endif
  468|      0|    }
  469|      0|    err_bad_type;
  ------------------
  |  |   36|   526k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  470|      0|    return 0;
  471|   526k|}
OSSL_PARAM_set_int32:
  474|  1.23M|{
  475|  1.23M|    if (p == NULL) {
  ------------------
  |  Branch (475:9): [True: 0, False: 1.23M]
  ------------------
  476|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|      0|        return 0;
  478|      0|    }
  479|  1.23M|    p->return_size = 0;
  480|  1.23M|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  1.23M|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (480:9): [True: 1.22M, False: 3.00k]
  ------------------
  481|  1.22M|#ifndef OPENSSL_SMALL_FOOTPRINT
  482|  1.22M|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  483|  1.22M|        if (p->data == NULL)
  ------------------
  |  Branch (483:13): [True: 0, False: 1.22M]
  ------------------
  484|      0|            return 1;
  485|  1.22M|        switch (p->data_size) {
  ------------------
  |  Branch (485:17): [True: 1.22M, False: 0]
  ------------------
  486|  1.22M|        case sizeof(int32_t):
  ------------------
  |  Branch (486:9): [True: 1.22M, False: 0]
  ------------------
  487|  1.22M|            *(int32_t *)p->data = val;
  488|  1.22M|            return 1;
  489|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (489:9): [True: 0, False: 1.22M]
  ------------------
  490|      0|            p->return_size = sizeof(int64_t);
  491|      0|            *(int64_t *)p->data = (int64_t)val;
  492|      0|            return 1;
  493|  1.22M|        }
  494|      0|#endif
  495|      0|        return general_set_int(p, &val, sizeof(val));
  496|  1.22M|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER && val >= 0) {
  ------------------
  |  |  107|  6.00k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (496:16): [True: 3.00k, False: 0]
  |  Branch (496:63): [True: 3.00k, False: 0]
  ------------------
  497|  3.00k|#ifndef OPENSSL_SMALL_FOOTPRINT
  498|  3.00k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  499|  3.00k|        if (p->data == NULL)
  ------------------
  |  Branch (499:13): [True: 0, False: 3.00k]
  ------------------
  500|      0|            return 1;
  501|  3.00k|        switch (p->data_size) {
  ------------------
  |  Branch (501:17): [True: 3.00k, False: 0]
  ------------------
  502|  3.00k|        case sizeof(uint32_t):
  ------------------
  |  Branch (502:9): [True: 3.00k, False: 0]
  ------------------
  503|  3.00k|            *(uint32_t *)p->data = (uint32_t)val;
  504|  3.00k|            return 1;
  505|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (505:9): [True: 0, False: 3.00k]
  ------------------
  506|      0|            p->return_size = sizeof(uint64_t);
  507|      0|            *(uint64_t *)p->data = (uint64_t)val;
  508|      0|            return 1;
  509|  3.00k|        }
  510|      0|#endif
  511|      0|        return general_set_int(p, &val, sizeof(val));
  512|  3.00k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (512:16): [True: 0, False: 0]
  ------------------
  513|      0|#ifndef OPENSSL_SYS_UEFI
  514|      0|        uint32_t u32;
  515|      0|        unsigned int shift;
  516|       |
  517|      0|        p->return_size = sizeof(double);
  518|      0|        if (p->data == NULL)
  ------------------
  |  Branch (518:13): [True: 0, False: 0]
  ------------------
  519|      0|            return 1;
  520|      0|        switch (p->data_size) {
  ------------------
  |  Branch (520:17): [True: 0, False: 0]
  ------------------
  521|      0|        case sizeof(double):
  ------------------
  |  Branch (521:9): [True: 0, False: 0]
  ------------------
  522|      0|            shift = real_shift();
  523|      0|            if (shift < 8 * sizeof(val) - 1) {
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|                u32 = val < 0 ? -val : val;
  ------------------
  |  Branch (524:23): [True: 0, False: 0]
  ------------------
  525|      0|                if ((u32 >> shift) != 0) {
  ------------------
  |  Branch (525:21): [True: 0, False: 0]
  ------------------
  526|      0|                    err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  527|      0|                    return 0;
  528|      0|                }
  529|      0|            }
  530|      0|            *(double *)p->data = (double)val;
  531|      0|            return 1;
  532|      0|        }
  533|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  534|      0|        return 0;
  535|      0|#endif
  536|      0|    }
  537|      0|    err_bad_type;
  ------------------
  |  |   36|  1.23M|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|    return 0;
  539|  1.23M|}
OSSL_PARAM_get_uint32:
  548|   392k|{
  549|   392k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (549:9): [True: 0, False: 392k]
  |  Branch (549:24): [True: 0, False: 392k]
  ------------------
  550|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  551|      0|        return 0;
  552|      0|    }
  553|       |
  554|   392k|    if (p->data == NULL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 392k]
  ------------------
  555|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  556|      0|        return 0;
  557|      0|    }
  558|       |
  559|   392k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   392k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (559:9): [True: 268k, False: 123k]
  ------------------
  560|   268k|#ifndef OPENSSL_SMALL_FOOTPRINT
  561|   268k|        uint64_t u64;
  562|       |
  563|   268k|        switch (p->data_size) {
  ------------------
  |  Branch (563:17): [True: 268k, False: 0]
  ------------------
  564|   268k|        case sizeof(uint32_t):
  ------------------
  |  Branch (564:9): [True: 268k, False: 0]
  ------------------
  565|   268k|            *val = *(const uint32_t *)p->data;
  566|   268k|            return 1;
  567|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (567:9): [True: 0, False: 268k]
  ------------------
  568|      0|            u64 = *(const uint64_t *)p->data;
  569|      0|            if (u64 <= UINT32_MAX) {
  ------------------
  |  Branch (569:17): [True: 0, False: 0]
  ------------------
  570|      0|                *val = (uint32_t)u64;
  571|      0|                return 1;
  572|      0|            }
  573|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  574|      0|            return 0;
  575|   268k|        }
  576|      0|#endif
  577|      0|        return general_get_uint(p, val, sizeof(*val));
  578|   268k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|   123k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (578:16): [True: 123k, False: 0]
  ------------------
  579|   123k|#ifndef OPENSSL_SMALL_FOOTPRINT
  580|   123k|        int32_t i32;
  581|   123k|        int64_t i64;
  582|       |
  583|   123k|        switch (p->data_size) {
  ------------------
  |  Branch (583:17): [True: 123k, False: 0]
  ------------------
  584|   123k|        case sizeof(int32_t):
  ------------------
  |  Branch (584:9): [True: 123k, False: 0]
  ------------------
  585|   123k|            i32 = *(const int32_t *)p->data;
  586|   123k|            if (i32 >= 0) {
  ------------------
  |  Branch (586:17): [True: 123k, False: 0]
  ------------------
  587|   123k|                *val = i32;
  588|   123k|                return 1;
  589|   123k|            }
  590|      0|            err_unsigned_negative;
  ------------------
  |  |   23|   123k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  591|      0|            return 0;
  592|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (592:9): [True: 0, False: 123k]
  ------------------
  593|      0|            i64 = *(const int64_t *)p->data;
  594|      0|            if (i64 >= 0 && i64 <= UINT32_MAX) {
  ------------------
  |  Branch (594:17): [True: 0, False: 0]
  |  Branch (594:29): [True: 0, False: 0]
  ------------------
  595|      0|                *val = (uint32_t)i64;
  596|      0|                return 1;
  597|      0|            }
  598|      0|            if (i64 < 0)
  ------------------
  |  Branch (598:17): [True: 0, False: 0]
  ------------------
  599|      0|                err_unsigned_negative;
  ------------------
  |  |   23|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  600|      0|            else
  601|      0|                err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  602|      0|            return 0;
  603|   123k|        }
  604|      0|#endif
  605|      0|        return general_get_uint(p, val, sizeof(*val));
  606|   123k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (606:16): [True: 0, False: 0]
  ------------------
  607|      0|#ifndef OPENSSL_SYS_UEFI
  608|      0|        double d;
  609|       |
  610|      0|        switch (p->data_size) {
  ------------------
  |  Branch (610:17): [True: 0, False: 0]
  ------------------
  611|      0|        case sizeof(double):
  ------------------
  |  Branch (611:9): [True: 0, False: 0]
  ------------------
  612|      0|            d = *(const double *)p->data;
  613|      0|            if (d >= 0 && d <= UINT32_MAX && d == (uint32_t)d) {
  ------------------
  |  Branch (613:17): [True: 0, False: 0]
  |  Branch (613:27): [True: 0, False: 0]
  |  Branch (613:46): [True: 0, False: 0]
  ------------------
  614|      0|                *val = (uint32_t)d;
  615|      0|                return 1;
  616|      0|            }
  617|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  618|      0|            return 0;
  619|      0|        }
  620|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|      0|        return 0;
  622|      0|#endif
  623|      0|    }
  624|      0|    err_bad_type;
  ------------------
  |  |   36|   392k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|      0|    return 0;
  626|   392k|}
OSSL_PARAM_set_uint32:
  629|  93.4k|{
  630|  93.4k|    if (p == NULL) {
  ------------------
  |  Branch (630:9): [True: 0, False: 93.4k]
  ------------------
  631|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  632|      0|        return 0;
  633|      0|    }
  634|  93.4k|    p->return_size = 0;
  635|       |
  636|  93.4k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|  93.4k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (636:9): [True: 93.4k, False: 0]
  ------------------
  637|  93.4k|#ifndef OPENSSL_SMALL_FOOTPRINT
  638|  93.4k|        p->return_size = sizeof(uint32_t); /* Minimum expected size */
  639|  93.4k|        if (p->data == NULL)
  ------------------
  |  Branch (639:13): [True: 0, False: 93.4k]
  ------------------
  640|      0|            return 1;
  641|  93.4k|        switch (p->data_size) {
  ------------------
  |  Branch (641:17): [True: 93.4k, False: 0]
  ------------------
  642|  93.4k|        case sizeof(uint32_t):
  ------------------
  |  Branch (642:9): [True: 93.4k, False: 0]
  ------------------
  643|  93.4k|            *(uint32_t *)p->data = val;
  644|  93.4k|            return 1;
  645|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (645:9): [True: 0, False: 93.4k]
  ------------------
  646|      0|            p->return_size = sizeof(uint64_t);
  647|      0|            *(uint64_t *)p->data = val;
  648|      0|            return 1;
  649|  93.4k|        }
  650|      0|#endif
  651|      0|        return general_set_uint(p, &val, sizeof(val));
  652|  93.4k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|      0|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (652:16): [True: 0, False: 0]
  ------------------
  653|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  654|      0|        p->return_size = sizeof(int32_t); /* Minimum expected size */
  655|      0|        if (p->data == NULL)
  ------------------
  |  Branch (655:13): [True: 0, False: 0]
  ------------------
  656|      0|            return 1;
  657|      0|        switch (p->data_size) {
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  ------------------
  658|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (658:9): [True: 0, False: 0]
  ------------------
  659|      0|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (659:17): [True: 0, False: 0]
  ------------------
  660|      0|                *(int32_t *)p->data = (int32_t)val;
  661|      0|                return 1;
  662|      0|            }
  663|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  664|      0|            return 0;
  665|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (665:9): [True: 0, False: 0]
  ------------------
  666|      0|            p->return_size = sizeof(int64_t);
  667|      0|            *(int64_t *)p->data = (int64_t)val;
  668|      0|            return 1;
  669|      0|        }
  670|      0|#endif
  671|      0|        return general_set_uint(p, &val, sizeof(val));
  672|      0|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (672:16): [True: 0, False: 0]
  ------------------
  673|      0|#ifndef OPENSSL_SYS_UEFI
  674|      0|        unsigned int shift;
  675|       |
  676|      0|        if (p->data == NULL) {
  ------------------
  |  Branch (676:13): [True: 0, False: 0]
  ------------------
  677|      0|            p->return_size = sizeof(double);
  678|      0|            return 1;
  679|      0|        }
  680|      0|        switch (p->data_size) {
  ------------------
  |  Branch (680:17): [True: 0, False: 0]
  ------------------
  681|      0|        case sizeof(double):
  ------------------
  |  Branch (681:9): [True: 0, False: 0]
  ------------------
  682|      0|            shift = real_shift();
  683|      0|            if (shift < 8 * sizeof(val) && (val >> shift) != 0) {
  ------------------
  |  Branch (683:17): [True: 0, False: 0]
  |  Branch (683:44): [True: 0, False: 0]
  ------------------
  684|      0|                err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  685|      0|                return 0;
  686|      0|            }
  687|      0|            *(double *)p->data = (double)val;
  688|      0|            p->return_size = sizeof(double);
  689|      0|            return 1;
  690|      0|        }
  691|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  692|      0|        return 0;
  693|      0|#endif
  694|      0|    }
  695|      0|    err_bad_type;
  ------------------
  |  |   36|  93.4k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  696|      0|    return 0;
  697|  93.4k|}
OSSL_PARAM_construct_uint32:
  700|  7.89k|{
  701|  7.89k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  7.89k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  702|  7.89k|        sizeof(uint32_t));
  703|  7.89k|}
OSSL_PARAM_get_int64:
  706|  1.50k|{
  707|  1.50k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (707:9): [True: 0, False: 1.50k]
  |  Branch (707:24): [True: 0, False: 1.50k]
  ------------------
  708|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  709|      0|        return 0;
  710|      0|    }
  711|       |
  712|  1.50k|    if (p->data == NULL) {
  ------------------
  |  Branch (712:9): [True: 0, False: 1.50k]
  ------------------
  713|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  714|      0|        return 0;
  715|      0|    }
  716|       |
  717|  1.50k|    if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  1.50k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (717:9): [True: 1.50k, False: 0]
  ------------------
  718|  1.50k|#ifndef OPENSSL_SMALL_FOOTPRINT
  719|  1.50k|        switch (p->data_size) {
  ------------------
  |  Branch (719:17): [True: 1.50k, False: 0]
  ------------------
  720|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (720:9): [True: 0, False: 1.50k]
  ------------------
  721|      0|            *val = *(const int32_t *)p->data;
  722|      0|            return 1;
  723|  1.50k|        case sizeof(int64_t):
  ------------------
  |  Branch (723:9): [True: 1.50k, False: 0]
  ------------------
  724|  1.50k|            *val = *(const int64_t *)p->data;
  725|  1.50k|            return 1;
  726|  1.50k|        }
  727|      0|#endif
  728|      0|        return general_get_int(p, val, sizeof(*val));
  729|  1.50k|    } else if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|      0|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (729:16): [True: 0, False: 0]
  ------------------
  730|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  731|      0|        uint64_t u64;
  732|       |
  733|      0|        switch (p->data_size) {
  ------------------
  |  Branch (733:17): [True: 0, False: 0]
  ------------------
  734|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (734:9): [True: 0, False: 0]
  ------------------
  735|      0|            *val = *(const uint32_t *)p->data;
  736|      0|            return 1;
  737|      0|        case sizeof(uint64_t):
  ------------------
  |  Branch (737:9): [True: 0, False: 0]
  ------------------
  738|      0|            u64 = *(const uint64_t *)p->data;
  739|      0|            if (u64 <= INT64_MAX) {
  ------------------
  |  Branch (739:17): [True: 0, False: 0]
  ------------------
  740|      0|                *val = (int64_t)u64;
  741|      0|                return 1;
  742|      0|            }
  743|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  744|      0|            return 0;
  745|      0|        }
  746|      0|#endif
  747|      0|        return general_get_int(p, val, sizeof(*val));
  748|      0|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (748:16): [True: 0, False: 0]
  ------------------
  749|      0|#ifndef OPENSSL_SYS_UEFI
  750|      0|        double d;
  751|       |
  752|      0|        switch (p->data_size) {
  ------------------
  |  Branch (752:17): [True: 0, False: 0]
  ------------------
  753|      0|        case sizeof(double):
  ------------------
  |  Branch (753:9): [True: 0, False: 0]
  ------------------
  754|      0|            d = *(const double *)p->data;
  755|      0|            if (d >= INT64_MIN
  ------------------
  |  Branch (755:17): [True: 0, False: 0]
  ------------------
  756|       |                /*
  757|       |                 * By subtracting 65535 (2^16-1) we cancel the low order
  758|       |                 * 15 bits of INT64_MAX to avoid using imprecise floating
  759|       |                 * point values.
  760|       |                 */
  761|      0|                && d < (double)(INT64_MAX - 65535) + 65536.0
  ------------------
  |  Branch (761:20): [True: 0, False: 0]
  ------------------
  762|      0|                && d == (int64_t)d) {
  ------------------
  |  Branch (762:20): [True: 0, False: 0]
  ------------------
  763|      0|                *val = (int64_t)d;
  764|      0|                return 1;
  765|      0|            }
  766|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  767|      0|            return 0;
  768|      0|        }
  769|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  770|      0|        return 0;
  771|      0|#endif
  772|      0|    }
  773|      0|    err_bad_type;
  ------------------
  |  |   36|  1.50k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  774|      0|    return 0;
  775|  1.50k|}
OSSL_PARAM_get_uint64:
  861|  27.1k|{
  862|  27.1k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (862:9): [True: 0, False: 27.1k]
  |  Branch (862:24): [True: 0, False: 27.1k]
  ------------------
  863|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  864|      0|        return 0;
  865|      0|    }
  866|       |
  867|  27.1k|    if (p->data == NULL) {
  ------------------
  |  Branch (867:9): [True: 0, False: 27.1k]
  ------------------
  868|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  869|      0|        return 0;
  870|      0|    }
  871|       |
  872|  27.1k|    if (ossl_likely(p->data_type == OSSL_PARAM_UNSIGNED_INTEGER)) {
  ------------------
  |  |   22|  27.1k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 27.1k, False: 0]
  |  |  ------------------
  ------------------
  873|  27.1k|#ifndef OPENSSL_SMALL_FOOTPRINT
  874|  27.1k|        switch (p->data_size) {
  ------------------
  |  Branch (874:17): [True: 27.1k, False: 0]
  ------------------
  875|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (875:9): [True: 0, False: 27.1k]
  ------------------
  876|      0|            *val = *(const uint32_t *)p->data;
  877|      0|            return 1;
  878|  27.1k|        case sizeof(uint64_t):
  ------------------
  |  Branch (878:9): [True: 27.1k, False: 0]
  ------------------
  879|  27.1k|            *val = *(const uint64_t *)p->data;
  880|  27.1k|            return 1;
  881|  27.1k|        }
  882|      0|#endif
  883|      0|        return general_get_uint(p, val, sizeof(*val));
  884|  27.1k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|      0|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (884:16): [True: 0, False: 0]
  ------------------
  885|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  886|      0|        int32_t i32;
  887|      0|        int64_t i64;
  888|       |
  889|      0|        switch (p->data_size) {
  ------------------
  |  Branch (889:17): [True: 0, False: 0]
  ------------------
  890|      0|        case sizeof(int32_t):
  ------------------
  |  Branch (890:9): [True: 0, False: 0]
  ------------------
  891|      0|            i32 = *(const int32_t *)p->data;
  892|      0|            if (i32 >= 0) {
  ------------------
  |  Branch (892:17): [True: 0, False: 0]
  ------------------
  893|      0|                *val = (uint64_t)i32;
  894|      0|                return 1;
  895|      0|            }
  896|      0|            err_unsigned_negative;
  ------------------
  |  |   23|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  897|      0|            return 0;
  898|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (898:9): [True: 0, False: 0]
  ------------------
  899|      0|            i64 = *(const int64_t *)p->data;
  900|      0|            if (i64 >= 0) {
  ------------------
  |  Branch (900:17): [True: 0, False: 0]
  ------------------
  901|      0|                *val = (uint64_t)i64;
  902|      0|                return 1;
  903|      0|            }
  904|      0|            err_unsigned_negative;
  ------------------
  |  |   23|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   24|      0|        CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED)
  ------------------
  905|      0|            return 0;
  906|      0|        }
  907|      0|#endif
  908|      0|        return general_get_uint(p, val, sizeof(*val));
  909|      0|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (909:16): [True: 0, False: 0]
  ------------------
  910|      0|#ifndef OPENSSL_SYS_UEFI
  911|      0|        double d;
  912|       |
  913|      0|        switch (p->data_size) {
  ------------------
  |  Branch (913:17): [True: 0, False: 0]
  ------------------
  914|      0|        case sizeof(double):
  ------------------
  |  Branch (914:9): [True: 0, False: 0]
  ------------------
  915|      0|            d = *(const double *)p->data;
  916|      0|            if (d >= 0
  ------------------
  |  Branch (916:17): [True: 0, False: 0]
  ------------------
  917|       |                /*
  918|       |                 * By subtracting 65535 (2^16-1) we cancel the low order
  919|       |                 * 15 bits of UINT64_MAX to avoid using imprecise floating
  920|       |                 * point values.
  921|       |                 */
  922|      0|                && d < (double)(UINT64_MAX - 65535) + 65536.0
  ------------------
  |  Branch (922:20): [True: 0, False: 0]
  ------------------
  923|      0|                && d == (uint64_t)d) {
  ------------------
  |  Branch (923:20): [True: 0, False: 0]
  ------------------
  924|      0|                *val = (uint64_t)d;
  925|      0|                return 1;
  926|      0|            }
  927|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
  928|      0|            return 0;
  929|      0|        }
  930|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  931|      0|        return 0;
  932|      0|#endif
  933|      0|    }
  934|      0|    err_bad_type;
  ------------------
  |  |   36|  27.1k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  935|      0|    return 0;
  936|  27.1k|}
OSSL_PARAM_set_uint64:
  939|   268k|{
  940|   268k|    if (p == NULL) {
  ------------------
  |  Branch (940:9): [True: 0, False: 268k]
  ------------------
  941|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  942|      0|        return 0;
  943|      0|    }
  944|   268k|    p->return_size = 0;
  945|       |
  946|   268k|    if (p->data_type == OSSL_PARAM_UNSIGNED_INTEGER) {
  ------------------
  |  |  107|   268k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
  |  Branch (946:9): [True: 263k, False: 4.94k]
  ------------------
  947|   263k|#ifndef OPENSSL_SMALL_FOOTPRINT
  948|   263k|        if (p->data == NULL) {
  ------------------
  |  Branch (948:13): [True: 0, False: 263k]
  ------------------
  949|      0|            p->return_size = sizeof(uint64_t); /* Expected size */
  950|      0|            return 1;
  951|      0|        }
  952|   263k|        switch (p->data_size) {
  ------------------
  |  Branch (952:17): [True: 263k, False: 0]
  ------------------
  953|      0|        case sizeof(uint32_t):
  ------------------
  |  Branch (953:9): [True: 0, False: 263k]
  ------------------
  954|      0|            if (val <= UINT32_MAX) {
  ------------------
  |  Branch (954:17): [True: 0, False: 0]
  ------------------
  955|      0|                p->return_size = sizeof(uint32_t);
  956|      0|                *(uint32_t *)p->data = (uint32_t)val;
  957|      0|                return 1;
  958|      0|            }
  959|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  960|      0|            return 0;
  961|   263k|        case sizeof(uint64_t):
  ------------------
  |  Branch (961:9): [True: 263k, False: 0]
  ------------------
  962|   263k|            p->return_size = sizeof(uint64_t);
  963|   263k|            *(uint64_t *)p->data = val;
  964|   263k|            return 1;
  965|   263k|        }
  966|      0|#endif
  967|      0|        return general_set_uint(p, &val, sizeof(val));
  968|   263k|    } else if (p->data_type == OSSL_PARAM_INTEGER) {
  ------------------
  |  |  106|  4.94k|#define OSSL_PARAM_INTEGER 1
  ------------------
  |  Branch (968:16): [True: 4.94k, False: 0]
  ------------------
  969|  4.94k|#ifndef OPENSSL_SMALL_FOOTPRINT
  970|  4.94k|        if (p->data == NULL) {
  ------------------
  |  Branch (970:13): [True: 0, False: 4.94k]
  ------------------
  971|      0|            p->return_size = sizeof(int64_t); /* Expected size */
  972|      0|            return 1;
  973|      0|        }
  974|  4.94k|        switch (p->data_size) {
  ------------------
  |  Branch (974:17): [True: 4.94k, False: 0]
  ------------------
  975|  4.94k|        case sizeof(int32_t):
  ------------------
  |  Branch (975:9): [True: 4.94k, False: 0]
  ------------------
  976|  4.94k|            if (val <= INT32_MAX) {
  ------------------
  |  Branch (976:17): [True: 4.94k, False: 0]
  ------------------
  977|  4.94k|                p->return_size = sizeof(int32_t);
  978|  4.94k|                *(int32_t *)p->data = (int32_t)val;
  979|  4.94k|                return 1;
  980|  4.94k|            }
  981|      0|            err_out_of_range;
  ------------------
  |  |   26|  4.94k|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  982|      0|            return 0;
  983|      0|        case sizeof(int64_t):
  ------------------
  |  Branch (983:9): [True: 0, False: 4.94k]
  ------------------
  984|      0|            if (val <= INT64_MAX) {
  ------------------
  |  Branch (984:17): [True: 0, False: 0]
  ------------------
  985|      0|                p->return_size = sizeof(int64_t);
  986|      0|                *(int64_t *)p->data = (int64_t)val;
  987|      0|                return 1;
  988|      0|            }
  989|      0|            err_out_of_range;
  ------------------
  |  |   26|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   27|      0|        CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION)
  ------------------
  990|      0|            return 0;
  991|  4.94k|        }
  992|      0|#endif
  993|      0|        return general_set_uint(p, &val, sizeof(val));
  994|  4.94k|    } else if (p->data_type == OSSL_PARAM_REAL) {
  ------------------
  |  |  112|      0|#define OSSL_PARAM_REAL 3
  ------------------
  |  Branch (994:16): [True: 0, False: 0]
  ------------------
  995|      0|#ifndef OPENSSL_SYS_UEFI
  996|      0|        switch (p->data_size) {
  ------------------
  |  Branch (996:17): [True: 0, False: 0]
  ------------------
  997|      0|        case sizeof(double):
  ------------------
  |  Branch (997:9): [True: 0, False: 0]
  ------------------
  998|      0|            if ((val >> real_shift()) == 0) {
  ------------------
  |  Branch (998:17): [True: 0, False: 0]
  ------------------
  999|      0|                p->return_size = sizeof(double);
 1000|      0|                *(double *)p->data = (double)val;
 1001|      0|                return 1;
 1002|      0|            }
 1003|      0|            err_inexact;
  ------------------
  |  |   29|      0|    ERR_raise(ERR_LIB_CRYPTO, \
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   30|      0|        CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY)
  ------------------
 1004|      0|            return 0;
 1005|      0|        }
 1006|      0|        err_unsupported_real;
  ------------------
  |  |   40|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1007|      0|        return 0;
 1008|      0|#endif
 1009|      0|    }
 1010|      0|    err_bad_type;
  ------------------
  |  |   36|   268k|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1011|      0|    return 0;
 1012|   268k|}
OSSL_PARAM_construct_uint64:
 1015|  7.89k|{
 1016|  7.89k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|  7.89k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1017|  7.89k|        sizeof(uint64_t));
 1018|  7.89k|}
OSSL_PARAM_get_size_t:
 1021|  19.2k|{
 1022|  19.2k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1023|  19.2k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1023:13): [True: 19.2k, Folded]
  ------------------
 1024|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1024:5): [True: 0, False: 19.2k]
  ------------------
 1025|      0|        return OSSL_PARAM_get_uint32(p, (uint32_t *)val);
 1026|  19.2k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1026:5): [True: 19.2k, False: 0]
  ------------------
 1027|  19.2k|        return OSSL_PARAM_get_uint64(p, (uint64_t *)val);
 1028|  19.2k|    }
 1029|      0|#endif
 1030|      0|    return general_get_uint(p, val, sizeof(*val));
 1031|  19.2k|}
OSSL_PARAM_set_size_t:
 1034|   268k|{
 1035|   268k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1036|   268k|    switch (sizeof(size_t)) {
  ------------------
  |  Branch (1036:13): [True: 268k, Folded]
  ------------------
 1037|      0|    case sizeof(uint32_t):
  ------------------
  |  Branch (1037:5): [True: 0, False: 268k]
  ------------------
 1038|      0|        return OSSL_PARAM_set_uint32(p, (uint32_t)val);
 1039|   268k|    case sizeof(uint64_t):
  ------------------
  |  Branch (1039:5): [True: 268k, False: 0]
  ------------------
 1040|   268k|        return OSSL_PARAM_set_uint64(p, (uint64_t)val);
 1041|   268k|    }
 1042|      0|#endif
 1043|      0|    return general_set_uint(p, &val, sizeof(val));
 1044|   268k|}
OSSL_PARAM_construct_size_t:
 1047|   282k|{
 1048|   282k|    return ossl_param_construct(key, OSSL_PARAM_UNSIGNED_INTEGER, buf,
  ------------------
  |  |  107|   282k|#define OSSL_PARAM_UNSIGNED_INTEGER 2
  ------------------
 1049|   282k|        sizeof(size_t));
 1050|   282k|}
OSSL_PARAM_get_time_t:
 1053|  1.50k|{
 1054|  1.50k|#ifndef OPENSSL_SMALL_FOOTPRINT
 1055|  1.50k|    switch (sizeof(time_t)) {
  ------------------
  |  Branch (1055:13): [True: 1.50k, Folded]
  ------------------
 1056|      0|    case sizeof(int32_t):
  ------------------
  |  Branch (1056:5): [True: 0, False: 1.50k]
  ------------------
 1057|      0|        return OSSL_PARAM_get_int32(p, (int32_t *)val);
 1058|  1.50k|    case sizeof(int64_t):
  ------------------
  |  Branch (1058:5): [True: 1.50k, False: 0]
  ------------------
 1059|  1.50k|        return OSSL_PARAM_get_int64(p, (int64_t *)val);
 1060|  1.50k|    }
 1061|      0|#endif
 1062|      0|    return general_get_int(p, val, sizeof(*val));
 1063|  1.50k|}
OSSL_PARAM_construct_time_t:
 1079|  1.50k|{
 1080|  1.50k|    return ossl_param_construct(key, OSSL_PARAM_INTEGER, buf, sizeof(time_t));
  ------------------
  |  |  106|  1.50k|#define OSSL_PARAM_INTEGER 1
  ------------------
 1081|  1.50k|}
OSSL_PARAM_get_utf8_string:
 1381|   381k|{
 1382|   381k|    int ret = get_string_internal(p, (void **)val, &max_len, NULL,
 1383|   381k|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|   381k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1384|       |
 1385|       |    /*
 1386|       |     * We try to ensure that the copied string is terminated with a
 1387|       |     * NUL byte.  That should be easy, just place a NUL byte at
 1388|       |     * |((char*)*val)[p->data_size]|.
 1389|       |     * Unfortunately, we have seen cases where |p->data_size| doesn't
 1390|       |     * correctly reflect the length of the string, and just happens
 1391|       |     * to be out of bounds according to |max_len|, so in that case, we
 1392|       |     * make the extra step of trying to find the true length of the
 1393|       |     * string that |p->data| points at, and use that as an index to
 1394|       |     * place the NUL byte in |*val|.
 1395|       |     */
 1396|   381k|    size_t data_length = p->data_size;
 1397|       |
 1398|   381k|    if (ret == 0)
  ------------------
  |  Branch (1398:9): [True: 0, False: 381k]
  ------------------
 1399|      0|        return 0;
 1400|   381k|    if (data_length >= max_len)
  ------------------
  |  Branch (1400:9): [True: 0, False: 381k]
  ------------------
 1401|      0|        data_length = OPENSSL_strnlen(p->data, data_length);
 1402|   381k|    if (data_length >= max_len) {
  ------------------
  |  Branch (1402:9): [True: 0, False: 381k]
  ------------------
 1403|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1404|      0|        return 0; /* No space for a terminating NUL byte */
 1405|      0|    }
 1406|   381k|    (*val)[data_length] = '\0';
 1407|       |
 1408|   381k|    return ret;
 1409|   381k|}
OSSL_PARAM_get_octet_string:
 1413|  2.47k|{
 1414|  2.47k|    return get_string_internal(p, val, &max_len, used_len,
 1415|  2.47k|        OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  2.47k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1416|  2.47k|}
OSSL_PARAM_set_octet_string:
 1452|  2.45k|{
 1453|  2.45k|    if (p == NULL || val == NULL) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 2.45k]
  |  Branch (1453:22): [True: 0, False: 2.45k]
  ------------------
 1454|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|      0|        return 0;
 1456|      0|    }
 1457|  2.45k|    p->return_size = 0;
 1458|  2.45k|    return set_string_internal(p, val, len, OSSL_PARAM_OCTET_STRING);
  ------------------
  |  |  123|  2.45k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1459|  2.45k|}
OSSL_PARAM_construct_utf8_string:
 1463|   958k|{
 1464|   958k|    if (buf != NULL && bsize == 0)
  ------------------
  |  Branch (1464:9): [True: 958k, False: 0]
  |  Branch (1464:24): [True: 958k, False: 0]
  ------------------
 1465|   958k|        bsize = strlen(buf);
 1466|   958k|    return ossl_param_construct(key, OSSL_PARAM_UTF8_STRING, buf, bsize);
  ------------------
  |  |  117|   958k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1467|   958k|}
OSSL_PARAM_construct_octet_string:
 1471|   386k|{
 1472|   386k|    return ossl_param_construct(key, OSSL_PARAM_OCTET_STRING, buf, bsize);
  ------------------
  |  |  123|   386k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
 1473|   386k|}
OSSL_PARAM_construct_end:
 1665|   720k|{
 1666|   720k|    OSSL_PARAM end = OSSL_PARAM_END;
  ------------------
  |  |   25|   720k|    { NULL, 0, NULL, 0, 0 }
  ------------------
 1667|       |
 1668|   720k|    return end;
 1669|   720k|}
OSSL_PARAM_get_utf8_string_ptr:
 1694|   572k|{
 1695|   572k|    return get_string_ptr_internal(p, (const void **)val, NULL,
 1696|   572k|        OSSL_PARAM_UTF8_PTR,
  ------------------
  |  |  141|   572k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
 1697|   572k|        OSSL_PARAM_UTF8_STRING);
  ------------------
  |  |  117|   572k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
 1698|   572k|}
params.c:ossl_param_construct:
   70|  3.39M|{
   71|  3.39M|    OSSL_PARAM res;
   72|       |
   73|  3.39M|    res.key = key;
   74|  3.39M|    res.data_type = data_type;
   75|  3.39M|    res.data = data;
   76|  3.39M|    res.data_size = data_size;
   77|  3.39M|    res.return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  3.39M|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   78|  3.39M|    return res;
   79|  3.39M|}
params.c:get_string_internal:
 1333|   383k|{
 1334|   383k|    size_t sz, alloc_sz;
 1335|       |
 1336|   383k|    if ((val == NULL && used_len == NULL) || p == NULL) {
  ------------------
  |  Branch (1336:10): [True: 0, False: 383k]
  |  Branch (1336:25): [True: 0, False: 0]
  |  Branch (1336:46): [True: 0, False: 383k]
  ------------------
 1337|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1338|      0|        return 0;
 1339|      0|    }
 1340|   383k|    if (p->data_type != type) {
  ------------------
  |  Branch (1340:9): [True: 0, False: 383k]
  ------------------
 1341|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1342|      0|        return 0;
 1343|      0|    }
 1344|       |
 1345|   383k|    sz = p->data_size;
 1346|       |    /*
 1347|       |     * If the input size is 0, or the input string needs NUL byte
 1348|       |     * termination, allocate an extra byte.
 1349|       |     */
 1350|   383k|    alloc_sz = sz + (type == OSSL_PARAM_UTF8_STRING || sz == 0);
  ------------------
  |  |  117|   767k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1350:22): [True: 381k, False: 2.47k]
  |  Branch (1350:56): [True: 0, False: 2.47k]
  ------------------
 1351|       |
 1352|   383k|    if (used_len != NULL)
  ------------------
  |  Branch (1352:9): [True: 2.47k, False: 381k]
  ------------------
 1353|  2.47k|        *used_len = sz;
 1354|       |
 1355|   383k|    if (p->data == NULL) {
  ------------------
  |  Branch (1355:9): [True: 0, False: 383k]
  ------------------
 1356|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1357|      0|        return 0;
 1358|      0|    }
 1359|       |
 1360|   383k|    if (val == NULL)
  ------------------
  |  Branch (1360:9): [True: 0, False: 383k]
  ------------------
 1361|      0|        return 1;
 1362|       |
 1363|   383k|    if (*val == NULL) {
  ------------------
  |  Branch (1363:9): [True: 381k, False: 2.47k]
  ------------------
 1364|   381k|        char *const q = OPENSSL_malloc(alloc_sz);
  ------------------
  |  |  106|   381k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1365|       |
 1366|   381k|        if (q == NULL)
  ------------------
  |  Branch (1366:13): [True: 0, False: 381k]
  ------------------
 1367|      0|            return 0;
 1368|   381k|        *val = q;
 1369|   381k|        *max_len = alloc_sz;
 1370|   381k|    }
 1371|       |
 1372|   383k|    if (*max_len < sz) {
  ------------------
  |  Branch (1372:9): [True: 0, False: 383k]
  ------------------
 1373|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1374|      0|        return 0;
 1375|      0|    }
 1376|   383k|    memcpy(*val, p->data, sz);
 1377|   383k|    return 1;
 1378|   383k|}
params.c:set_string_internal:
 1420|  2.45k|{
 1421|  2.45k|    if (p->data_type != type) {
  ------------------
  |  Branch (1421:9): [True: 0, False: 2.45k]
  ------------------
 1422|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1423|      0|        return 0;
 1424|      0|    }
 1425|  2.45k|    p->return_size = len;
 1426|  2.45k|    if (p->data == NULL)
  ------------------
  |  Branch (1426:9): [True: 1.22k, False: 1.22k]
  ------------------
 1427|  1.22k|        return 1;
 1428|  1.22k|    if (p->data_size < len) {
  ------------------
  |  Branch (1428:9): [True: 0, False: 1.22k]
  ------------------
 1429|      0|        err_too_small;
  ------------------
  |  |   34|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_SMALL_BUFFER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1430|      0|        return 0;
 1431|      0|    }
 1432|       |
 1433|  1.22k|    memcpy(p->data, val, len);
 1434|       |    /* If possible within the size of p->data, add a NUL terminator byte */
 1435|  1.22k|    if (type == OSSL_PARAM_UTF8_STRING && p->data_size > len)
  ------------------
  |  |  117|  2.45k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1435:9): [True: 0, False: 1.22k]
  |  Branch (1435:43): [True: 0, False: 0]
  ------------------
 1436|      0|        ((char *)p->data)[len] = '\0';
 1437|  1.22k|    return 1;
 1438|  1.22k|}
params.c:get_string_ptr_internal:
 1674|   572k|{
 1675|   572k|    if (val == NULL || p == NULL) {
  ------------------
  |  Branch (1675:9): [True: 0, False: 572k]
  |  Branch (1675:24): [True: 0, False: 572k]
  ------------------
 1676|      0|        err_null_argument;
  ------------------
  |  |   38|      0|    ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1677|      0|        return 0;
 1678|      0|    }
 1679|       |
 1680|   572k|    if (p->data_type == ref_type)
  ------------------
  |  Branch (1680:9): [True: 0, False: 572k]
  ------------------
 1681|      0|        return get_ptr_internal_skip_checks(p, (const void **)val, used_len);
 1682|       |
 1683|   572k|    if (p->data_type != type) {
  ------------------
  |  Branch (1683:9): [True: 0, False: 572k]
  ------------------
 1684|      0|        err_bad_type;
  ------------------
  |  |   36|      0|    ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE)
  |  |  ------------------
  |  |  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  408|      0|        ERR_set_error)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1685|      0|        return 0;
 1686|      0|    }
 1687|   572k|    if (used_len != NULL)
  ------------------
  |  Branch (1687:9): [True: 0, False: 572k]
  ------------------
 1688|      0|        *used_len = p->data_size;
 1689|   572k|    *val = p->data;
 1690|   572k|    return 1;
 1691|   572k|}

ossl_param_bytes_to_blocks:
   31|  4.94k|{
   32|  4.94k|    return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  4.94k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
                  return (bytes + OSSL_PARAM_ALIGN_SIZE - 1) / OSSL_PARAM_ALIGN_SIZE;
  ------------------
  |  |   22|  4.94k|#define OSSL_PARAM_ALIGN_SIZE sizeof(OSSL_PARAM_ALIGNED_BLOCK)
  ------------------
   33|  4.94k|}
ossl_param_set_secure_block:
   56|  2.47k|{
   57|  2.47k|    last->key = NULL;
   58|  2.47k|    last->data_size = secure_buffer_sz;
   59|  2.47k|    last->data = secure_buffer;
   60|  2.47k|    last->data_type = OSSL_PARAM_ALLOCATED_END;
  ------------------
  |  |   16|  2.47k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
   61|  2.47k|}
OSSL_PARAM_free:
  233|  2.47k|{
  234|  2.47k|    if (params != NULL) {
  ------------------
  |  Branch (234:9): [True: 2.47k, False: 0]
  ------------------
  235|  2.47k|        OSSL_PARAM *p;
  236|       |
  237|  4.94k|        for (p = params; p->key != NULL; p++)
  ------------------
  |  Branch (237:26): [True: 2.47k, False: 2.47k]
  ------------------
  238|  2.47k|            ;
  239|  2.47k|        if (p->data_type == OSSL_PARAM_ALLOCATED_END)
  ------------------
  |  |   16|  2.47k|#define OSSL_PARAM_ALLOCATED_END 127
  ------------------
  |  Branch (239:13): [True: 2.47k, False: 0]
  ------------------
  240|  2.47k|            OPENSSL_secure_clear_free(p->data, p->data_size);
  ------------------
  |  |  149|  2.47k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  241|  2.47k|        OPENSSL_free(params);
  ------------------
  |  |  131|  2.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  242|  2.47k|    }
  243|  2.47k|}

ossl_pw_clear_passphrase_data:
   17|   190k|{
   18|   190k|    if (data != NULL) {
  ------------------
  |  Branch (18:9): [True: 190k, False: 0]
  ------------------
   19|   190k|        if (data->type == is_expl_passphrase)
  ------------------
  |  Branch (19:13): [True: 0, False: 190k]
  ------------------
   20|      0|            OPENSSL_clear_free(data->_.expl_passphrase.passphrase_copy,
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|   190k|                data->_.expl_passphrase.passphrase_len);
   22|   190k|        ossl_pw_clear_passphrase_cache(data);
   23|   190k|        memset(data, 0, sizeof(*data));
   24|   190k|    }
   25|   190k|}
ossl_pw_clear_passphrase_cache:
   28|   381k|{
   29|   381k|    OPENSSL_clear_free(data->cached_passphrase, data->cached_passphrase_len);
  ------------------
  |  |  129|   381k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   30|       |    data->cached_passphrase = NULL;
   31|   381k|}
ossl_pw_enable_passphrase_caching:
   94|   190k|{
   95|   190k|    data->flag_cache_passphrase = 1;
   96|   190k|    return 1;
   97|   190k|}

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

PEM_X509_INFO_read_bio_ex:
   56|  1.31k|{
   57|  1.31k|    X509_INFO *xi = NULL;
   58|  1.31k|    char *name = NULL, *header = NULL, *str;
   59|  1.31k|    void *pp;
   60|  1.31k|    unsigned char *data = NULL;
   61|  1.31k|    const unsigned char *p;
   62|  1.31k|    long len, error = 0;
   63|  1.31k|    int ok = 0;
   64|  1.31k|    STACK_OF(X509_INFO) *ret = NULL;
  ------------------
  |  |   33|  1.31k|#define STACK_OF(type) struct stack_st_##type
  ------------------
   65|  1.31k|    unsigned int i, raw, ptype;
   66|  1.31k|    d2i_of_void *d2i = 0;
   67|       |
   68|  1.31k|    if (sk == NULL) {
  ------------------
  |  Branch (68:9): [True: 1.31k, False: 0]
  ------------------
   69|  1.31k|        if ((ret = sk_X509_INFO_new_null()) == NULL) {
  ------------------
  |  |  400|  1.31k|#define sk_X509_INFO_new_null() ((STACK_OF(X509_INFO) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (69:13): [True: 0, False: 1.31k]
  ------------------
   70|      0|            ERR_raise(ERR_LIB_PEM, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|            goto err;
   72|      0|        }
   73|  1.31k|    } else
   74|      0|        ret = sk;
   75|       |
   76|  1.31k|    if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (76:9): [True: 0, False: 1.31k]
  ------------------
   77|      0|        goto err;
   78|   191k|    for (;;) {
   79|   191k|        raw = 0;
   80|   191k|        ptype = 0;
   81|   191k|        ERR_set_mark();
   82|   191k|        i = PEM_read_bio(bp, &name, &header, &data, &len);
   83|   191k|        if (i == 0) {
  ------------------
  |  Branch (83:13): [True: 1.31k, False: 190k]
  ------------------
   84|  1.31k|            error = ERR_GET_REASON(ERR_peek_last_error());
   85|  1.31k|            if (error == PEM_R_NO_START_LINE) {
  ------------------
  |  |   44|  1.31k|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (85:17): [True: 1.31k, False: 0]
  ------------------
   86|  1.31k|                ERR_pop_to_mark();
   87|  1.31k|                break;
   88|  1.31k|            }
   89|      0|            ERR_clear_last_mark();
   90|      0|            goto err;
   91|  1.31k|        }
   92|   190k|        ERR_clear_last_mark();
   93|   380k|    start:
   94|   380k|        if (strcmp(name, PEM_STRING_X509) == 0
  ------------------
  |  |   36|   380k|#define PEM_STRING_X509 "CERTIFICATE"
  ------------------
  |  Branch (94:13): [True: 380k, False: 0]
  ------------------
   95|      0|            || strcmp(name, PEM_STRING_X509_OLD) == 0
  ------------------
  |  |   35|      0|#define PEM_STRING_X509_OLD "X509 CERTIFICATE"
  ------------------
  |  Branch (95:16): [True: 0, False: 0]
  ------------------
   96|   380k|            || strcmp(name, PEM_STRING_X509_TRUSTED) == 0) {
  ------------------
  |  |   37|      0|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (96:16): [True: 0, False: 0]
  ------------------
   97|   380k|            if (xi->x509 != NULL) {
  ------------------
  |  Branch (97:17): [True: 189k, False: 190k]
  ------------------
   98|   189k|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|   189k|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (98:21): [True: 0, False: 189k]
  ------------------
   99|      0|                    goto err;
  100|   189k|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (100:21): [True: 0, False: 189k]
  ------------------
  101|      0|                    goto err;
  102|   189k|                goto start;
  103|   189k|            }
  104|   190k|            if ((strcmp(name, PEM_STRING_X509_TRUSTED) == 0))
  ------------------
  |  |   37|   190k|#define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE"
  ------------------
  |  Branch (104:17): [True: 0, False: 190k]
  ------------------
  105|      0|                d2i = (D2I_OF(void))d2i_X509_AUX;
  106|   190k|            else
  107|   190k|                d2i = (D2I_OF(void))d2i_X509;
  108|   190k|            xi->x509 = X509_new_ex(libctx, propq);
  109|   190k|            if (xi->x509 == NULL)
  ------------------
  |  Branch (109:17): [True: 0, False: 190k]
  ------------------
  110|      0|                goto err;
  111|   190k|            pp = &(xi->x509);
  112|   190k|        } else if (strcmp(name, PEM_STRING_X509_CRL) == 0) {
  ------------------
  |  |   40|      0|#define PEM_STRING_X509_CRL "X509 CRL"
  ------------------
  |  Branch (112:20): [True: 0, False: 0]
  ------------------
  113|      0|            d2i = (D2I_OF(void))d2i_X509_CRL;
  114|      0|            if (xi->crl != NULL) {
  ------------------
  |  Branch (114:17): [True: 0, False: 0]
  ------------------
  115|      0|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|      0|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (115:21): [True: 0, False: 0]
  ------------------
  116|      0|                    goto err;
  117|      0|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (117:21): [True: 0, False: 0]
  ------------------
  118|      0|                    goto err;
  119|      0|                goto start;
  120|      0|            }
  121|      0|            pp = &(xi->crl);
  122|      0|        } else if ((str = strstr(name, PEM_STRING_PKCS8INF)) != NULL) {
  ------------------
  |  |   50|      0|#define PEM_STRING_PKCS8INF "PRIVATE KEY"
  ------------------
  |  Branch (122:20): [True: 0, False: 0]
  ------------------
  123|      0|            if (xi->x_pkey != NULL) {
  ------------------
  |  Branch (123:17): [True: 0, False: 0]
  ------------------
  124|      0|                if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|      0|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (124:21): [True: 0, False: 0]
  ------------------
  125|      0|                    goto err;
  126|      0|                if ((xi = X509_INFO_new()) == NULL)
  ------------------
  |  Branch (126:21): [True: 0, False: 0]
  ------------------
  127|      0|                    goto err;
  128|      0|                goto start;
  129|      0|            }
  130|      0|            if (str == name || strcmp(name, PEM_STRING_PKCS8) == 0) {
  ------------------
  |  |   49|      0|#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
  ------------------
  |  Branch (130:17): [True: 0, False: 0]
  |  Branch (130:32): [True: 0, False: 0]
  ------------------
  131|      0|                ptype = EVP_PKEY_NONE;
  ------------------
  |  |   62|      0|#define EVP_PKEY_NONE NID_undef
  |  |  ------------------
  |  |  |  |   18|      0|#define NID_undef                       0
  |  |  ------------------
  ------------------
  132|      0|            } else {
  133|       |                /* chop " PRIVATE KEY" */
  134|      0|                *--str = '\0';
  135|      0|                ptype = evp_pkey_name2type(name);
  136|      0|            }
  137|      0|            xi->enc_data = NULL;
  138|      0|            xi->enc_len = 0;
  139|       |
  140|      0|            d2i = (D2I_OF(void))d2i_AutoPrivateKey;
  141|      0|            xi->x_pkey = X509_PKEY_new();
  142|      0|            if (xi->x_pkey == NULL)
  ------------------
  |  Branch (142:17): [True: 0, False: 0]
  ------------------
  143|      0|                goto err;
  144|      0|            pp = &xi->x_pkey->dec_pkey;
  145|      0|            if ((int)strlen(header) > 10 /* assume encrypted */
  ------------------
  |  Branch (145:17): [True: 0, False: 0]
  ------------------
  146|      0|                || strcmp(name, PEM_STRING_PKCS8) == 0)
  ------------------
  |  |   49|      0|#define PEM_STRING_PKCS8 "ENCRYPTED PRIVATE KEY"
  ------------------
  |  Branch (146:20): [True: 0, False: 0]
  ------------------
  147|      0|                raw = 1;
  148|      0|        } else { /* unknown */
  149|      0|            d2i = NULL;
  150|      0|            pp = NULL;
  151|      0|        }
  152|       |
  153|   190k|        if (d2i != NULL) {
  ------------------
  |  Branch (153:13): [True: 190k, False: 0]
  ------------------
  154|   190k|            if (!raw) {
  ------------------
  |  Branch (154:17): [True: 190k, False: 0]
  ------------------
  155|   190k|                EVP_CIPHER_INFO cipher;
  156|       |
  157|   190k|                if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (157:21): [True: 0, False: 190k]
  ------------------
  158|      0|                    goto err;
  159|   190k|                if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (159:21): [True: 0, False: 190k]
  ------------------
  160|      0|                    goto err;
  161|   190k|                p = data;
  162|   190k|                if (ptype) {
  ------------------
  |  Branch (162:21): [True: 0, False: 190k]
  ------------------
  163|      0|                    if (d2i_PrivateKey_ex(ptype, pp, &p, len,
  ------------------
  |  Branch (163:25): [True: 0, False: 0]
  ------------------
  164|      0|                            libctx, propq)
  165|      0|                        == NULL) {
  166|      0|                        ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  167|      0|                        goto err;
  168|      0|                    }
  169|   190k|                } else if (d2i(pp, &p, len) == NULL) {
  ------------------
  |  Branch (169:28): [True: 0, False: 190k]
  ------------------
  170|      0|                    ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  171|      0|                    goto err;
  172|      0|                }
  173|   190k|            } else { /* encrypted key data */
  174|      0|                if (!PEM_get_EVP_CIPHER_INFO(header, &xi->enc_cipher))
  ------------------
  |  Branch (174:21): [True: 0, False: 0]
  ------------------
  175|      0|                    goto err;
  176|      0|                xi->enc_data = (char *)data;
  177|      0|                xi->enc_len = (int)len;
  178|      0|                data = NULL;
  179|      0|            }
  180|   190k|        }
  181|   190k|        OPENSSL_free(name);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  182|   190k|        name = NULL;
  183|   190k|        OPENSSL_free(header);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|   190k|        header = NULL;
  185|   190k|        OPENSSL_free(data);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  186|   190k|        data = NULL;
  187|   190k|    }
  188|       |
  189|       |    /*
  190|       |     * if the last one hasn't been pushed yet and there is anything in it
  191|       |     * then add it to the stack ...
  192|       |     */
  193|  1.31k|    if ((xi->x509 != NULL) || (xi->crl != NULL) || (xi->x_pkey != NULL) || (xi->enc_data != NULL)) {
  ------------------
  |  Branch (193:9): [True: 1.30k, False: 10]
  |  Branch (193:31): [True: 0, False: 10]
  |  Branch (193:52): [True: 0, False: 10]
  |  Branch (193:76): [True: 0, False: 10]
  ------------------
  194|  1.30k|        if (!sk_X509_INFO_push(ret, xi))
  ------------------
  |  |  407|  1.30k|#define sk_X509_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_type(ptr))
  ------------------
  |  Branch (194:13): [True: 0, False: 1.30k]
  ------------------
  195|      0|            goto err;
  196|  1.30k|        xi = NULL;
  197|  1.30k|    }
  198|  1.31k|    ok = 1;
  199|  1.31k|err:
  200|  1.31k|    X509_INFO_free(xi);
  201|  1.31k|    if (!ok) {
  ------------------
  |  Branch (201:9): [True: 0, False: 1.31k]
  ------------------
  202|      0|        for (i = 0; ((int)i) < sk_X509_INFO_num(ret); i++) {
  ------------------
  |  |  397|      0|#define sk_X509_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_X509_INFO_sk_type(sk))
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|            xi = sk_X509_INFO_value(ret, i);
  ------------------
  |  |  398|      0|#define sk_X509_INFO_value(sk, idx) ((X509_INFO *)OPENSSL_sk_value(ossl_check_const_X509_INFO_sk_type(sk), (idx)))
  ------------------
  204|      0|            X509_INFO_free(xi);
  205|      0|        }
  206|      0|        if (ret != sk)
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            sk_X509_INFO_free(ret);
  ------------------
  |  |  403|      0|#define sk_X509_INFO_free(sk) OPENSSL_sk_free(ossl_check_X509_INFO_sk_type(sk))
  ------------------
  208|      0|        ret = NULL;
  209|      0|    }
  210|       |
  211|  1.31k|    OPENSSL_free(name);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  212|  1.31k|    OPENSSL_free(header);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  213|  1.31k|    OPENSSL_free(data);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  214|  1.31k|    return ret;
  215|  1.31k|}

PEM_bytes_read_bio:
  289|     15|{
  290|     15|    return pem_bytes_read_bio_flags(pdata, plen, pnm, name, bp, cb, u,
  291|     15|        PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  382|     15|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  292|     15|}
PEM_do_header:
  447|   190k|{
  448|   190k|    int ok;
  449|   190k|    int keylen;
  450|   190k|    long len = *plen;
  451|   190k|    int ilen = (int)len; /* EVP_DecryptUpdate etc. take int lengths */
  452|   190k|    EVP_CIPHER_CTX *ctx;
  453|   190k|    unsigned char key[EVP_MAX_KEY_LENGTH];
  454|   190k|    char buf[PEM_BUFSIZE];
  455|       |
  456|   190k|#if LONG_MAX > INT_MAX
  457|       |    /* Check that we did not truncate the length */
  458|   190k|    if (len > INT_MAX) {
  ------------------
  |  Branch (458:9): [True: 0, False: 190k]
  ------------------
  459|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_HEADER_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  460|      0|        return 0;
  461|      0|    }
  462|   190k|#endif
  463|       |
  464|   190k|    if (cipher->cipher == NULL)
  ------------------
  |  Branch (464:9): [True: 190k, False: 0]
  ------------------
  465|   190k|        return 1;
  466|      0|    if (callback == NULL)
  ------------------
  |  Branch (466:9): [True: 0, False: 0]
  ------------------
  467|      0|        keylen = PEM_def_callback(buf, PEM_BUFSIZE, 0, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  468|      0|    else
  469|      0|        keylen = callback(buf, PEM_BUFSIZE, 0, u);
  ------------------
  |  |   33|      0|#define PEM_BUFSIZE 1024
  ------------------
  470|      0|    if (keylen < 0) {
  ------------------
  |  Branch (470:9): [True: 0, False: 0]
  ------------------
  471|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_PASSWORD_READ);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  472|      0|        return 0;
  473|      0|    }
  474|       |#ifdef CHARSET_EBCDIC
  475|       |    /* Convert the pass phrase from EBCDIC */
  476|       |    ebcdic2ascii(buf, buf, keylen);
  477|       |#endif
  478|       |
  479|      0|    if (!EVP_BytesToKey(cipher->cipher, EVP_md5(), &(cipher->iv[0]),
  ------------------
  |  Branch (479:9): [True: 0, False: 0]
  ------------------
  480|      0|            (unsigned char *)buf, keylen, 1, key, NULL))
  481|      0|        return 0;
  482|       |
  483|      0|    ctx = EVP_CIPHER_CTX_new();
  484|      0|    if (ctx == NULL)
  ------------------
  |  Branch (484:9): [True: 0, False: 0]
  ------------------
  485|      0|        return 0;
  486|       |
  487|      0|    ok = EVP_DecryptInit_ex(ctx, cipher->cipher, NULL, key, &(cipher->iv[0]));
  488|      0|    if (ok)
  ------------------
  |  Branch (488:9): [True: 0, False: 0]
  ------------------
  489|      0|        ok = EVP_DecryptUpdate(ctx, data, &ilen, data, ilen);
  490|      0|    if (ok) {
  ------------------
  |  Branch (490:9): [True: 0, False: 0]
  ------------------
  491|       |        /* Squirrel away the length of data decrypted so far. */
  492|      0|        *plen = ilen;
  493|      0|        ok = EVP_DecryptFinal_ex(ctx, &(data[ilen]), &ilen);
  494|      0|    }
  495|      0|    if (ok)
  ------------------
  |  Branch (495:9): [True: 0, False: 0]
  ------------------
  496|      0|        *plen += ilen;
  497|      0|    else
  498|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_DECRYPT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|       |
  500|      0|    EVP_CIPHER_CTX_free(ctx);
  501|      0|    OPENSSL_cleanse((char *)buf, sizeof(buf));
  502|      0|    OPENSSL_cleanse((char *)key, sizeof(key));
  503|      0|    return ok;
  504|      0|}
PEM_get_EVP_CIPHER_INFO:
  522|   190k|{
  523|   190k|    const EVP_CIPHER *enc = NULL;
  524|   190k|    int ivlen;
  525|   190k|    char *dekinfostart, c;
  526|       |
  527|   190k|    cipher->cipher = NULL;
  528|   190k|    memset(cipher->iv, 0, sizeof(cipher->iv));
  529|   190k|    if ((header == NULL) || (*header == '\0') || (*header == '\n'))
  ------------------
  |  Branch (529:9): [True: 0, False: 190k]
  |  Branch (529:29): [True: 190k, False: 0]
  |  Branch (529:50): [True: 0, False: 0]
  ------------------
  530|   190k|        return 1;
  531|       |
  532|      0|    if (!CHECK_AND_SKIP_PREFIX(header, PROC_TYPE)) {
  ------------------
  |  |   61|      0|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (532:9): [True: 0, False: 0]
  ------------------
  533|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_PROC_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  534|      0|        return 0;
  535|      0|    }
  536|      0|    header += strspn(header, " \t");
  537|       |
  538|      0|    if (*header++ != '4' || *header++ != ',')
  ------------------
  |  Branch (538:9): [True: 0, False: 0]
  |  Branch (538:29): [True: 0, False: 0]
  ------------------
  539|      0|        return 0;
  540|      0|    header += strspn(header, " \t");
  541|       |
  542|       |    /* We expect "ENCRYPTED" followed by optional white-space + line break */
  543|      0|    if (!CHECK_AND_SKIP_PREFIX(header, ENCRYPTED) || strspn(header, " \t\r\n") == 0) {
  ------------------
  |  |   61|      0|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (543:9): [True: 0, False: 0]
  |  Branch (543:54): [True: 0, False: 0]
  ------------------
  544|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_ENCRYPTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  545|      0|        return 0;
  546|      0|    }
  547|      0|    header += strspn(header, " \t\r");
  548|      0|    if (*header++ != '\n') {
  ------------------
  |  Branch (548:9): [True: 0, False: 0]
  ------------------
  549|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_SHORT_HEADER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  550|      0|        return 0;
  551|      0|    }
  552|       |
  553|       |    /*-
  554|       |     * https://tools.ietf.org/html/rfc1421#section-4.6.1.3
  555|       |     * We expect "DEK-Info: algo[,hex-parameters]"
  556|       |     */
  557|      0|    if (!CHECK_AND_SKIP_PREFIX(header, DEK_INFO)) {
  ------------------
  |  |   61|      0|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|      0|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (557:9): [True: 0, False: 0]
  ------------------
  558|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_NOT_DEK_INFO);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  559|      0|        return 0;
  560|      0|    }
  561|      0|    header += strspn(header, " \t");
  562|       |
  563|       |    /*
  564|       |     * DEK-INFO is a comma-separated combination of algorithm name and optional
  565|       |     * parameters.
  566|       |     */
  567|      0|    dekinfostart = header;
  568|      0|    header += strcspn(header, " \t,");
  569|      0|    c = *header;
  570|      0|    *header = '\0';
  571|      0|    cipher->cipher = enc = EVP_get_cipherbyname(dekinfostart);
  572|      0|    *header = c;
  573|      0|    header += strspn(header, " \t");
  574|       |
  575|      0|    if (enc == NULL) {
  ------------------
  |  Branch (575:9): [True: 0, False: 0]
  ------------------
  576|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNSUPPORTED_ENCRYPTION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  577|      0|        return 0;
  578|      0|    }
  579|      0|    ivlen = EVP_CIPHER_get_iv_length(enc);
  580|      0|    if (ivlen > 0 && *header++ != ',') {
  ------------------
  |  Branch (580:9): [True: 0, False: 0]
  |  Branch (580:22): [True: 0, False: 0]
  ------------------
  581|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_MISSING_DEK_IV);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  582|      0|        return 0;
  583|      0|    } else if (ivlen == 0 && *header == ',') {
  ------------------
  |  Branch (583:16): [True: 0, False: 0]
  |  Branch (583:30): [True: 0, False: 0]
  ------------------
  584|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_UNEXPECTED_DEK_IV);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  585|      0|        return 0;
  586|      0|    }
  587|       |
  588|      0|    if (!load_iv(&header, cipher->iv, EVP_CIPHER_get_iv_length(enc)))
  ------------------
  |  Branch (588:9): [True: 0, False: 0]
  ------------------
  589|      0|        return 0;
  590|       |
  591|      0|    return 1;
  592|      0|}
PEM_read_bio_ex:
  946|   192k|{
  947|   192k|    EVP_ENCODE_CTX *ctx = NULL;
  948|   192k|    const BIO_METHOD *bmeth;
  949|   192k|    BIO *headerB = NULL, *dataB = NULL;
  950|   192k|    char *name = NULL;
  951|   192k|    int len, taillen, headerlen, ret = 0;
  952|   192k|    BUF_MEM *buf_mem;
  953|       |
  954|   192k|    *len_out = 0;
  955|   192k|    *name_out = *header = NULL;
  956|   192k|    *data = NULL;
  957|   192k|    if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  382|   192k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
                  if ((flags & PEM_FLAG_EAY_COMPATIBLE) && (flags & PEM_FLAG_ONLY_B64)) {
  ------------------
  |  |  383|   192k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (957:9): [True: 192k, False: 0]
  |  Branch (957:46): [True: 0, False: 192k]
  ------------------
  958|       |        /* These two are mutually incompatible; bail out. */
  959|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  960|      0|        goto end;
  961|      0|    }
  962|   192k|    bmeth = (flags & PEM_FLAG_SECURE) ? BIO_s_secmem() : BIO_s_mem();
  ------------------
  |  |  381|   192k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (962:13): [True: 0, False: 192k]
  ------------------
  963|       |
  964|   192k|    headerB = BIO_new(bmeth);
  965|   192k|    dataB = BIO_new(bmeth);
  966|   192k|    if (headerB == NULL || dataB == NULL) {
  ------------------
  |  Branch (966:9): [True: 0, False: 192k]
  |  Branch (966:28): [True: 0, False: 192k]
  ------------------
  967|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_BIO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  968|      0|        goto end;
  969|      0|    }
  970|       |
  971|   192k|    if (!get_name(bp, &name, flags))
  ------------------
  |  Branch (971:9): [True: 1.33k, False: 190k]
  ------------------
  972|  1.33k|        goto end;
  973|   190k|    if (!get_header_and_data(bp, &headerB, &dataB, name, flags))
  ------------------
  |  Branch (973:9): [True: 0, False: 190k]
  ------------------
  974|      0|        goto end;
  975|       |
  976|   190k|    BIO_get_mem_ptr(dataB, &buf_mem);
  ------------------
  |  |  617|   190k|#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
  |  |  ------------------
  |  |  |  |  449|   190k|#define BIO_C_GET_BUF_MEM_PTR 115
  |  |  ------------------
  |  |  618|   190k|    (char *)(pp))
  ------------------
  977|   190k|    if (buf_mem->length > INT_MAX) {
  ------------------
  |  Branch (977:9): [True: 0, False: 190k]
  ------------------
  978|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_BASE64_DECODE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  979|      0|        goto end;
  980|      0|    }
  981|   190k|    len = (int)buf_mem->length;
  982|       |
  983|       |    /* There was no data in the PEM file */
  984|   190k|    if (len == 0)
  ------------------
  |  Branch (984:9): [True: 0, False: 190k]
  ------------------
  985|      0|        goto end;
  986|       |
  987|   190k|    ctx = EVP_ENCODE_CTX_new();
  988|   190k|    if (ctx == NULL) {
  ------------------
  |  Branch (988:9): [True: 0, False: 190k]
  ------------------
  989|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  990|      0|        goto end;
  991|      0|    }
  992|       |
  993|   190k|    EVP_DecodeInit(ctx);
  994|   190k|    if (EVP_DecodeUpdate(ctx, (unsigned char *)buf_mem->data, &len,
  ------------------
  |  Branch (994:9): [True: 0, False: 190k]
  ------------------
  995|   190k|            (unsigned char *)buf_mem->data, len)
  996|   190k|            < 0
  997|   190k|        || EVP_DecodeFinal(ctx, (unsigned char *)&(buf_mem->data[len]),
  ------------------
  |  Branch (997:12): [True: 0, False: 190k]
  ------------------
  998|   190k|               &taillen)
  999|   190k|            < 0) {
 1000|      0|        ERR_raise(ERR_LIB_PEM, PEM_R_BAD_BASE64_DECODE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1001|      0|        goto end;
 1002|      0|    }
 1003|   190k|    len += taillen;
 1004|   190k|    buf_mem->length = len;
 1005|       |
 1006|   190k|    headerlen = BIO_get_mem_data(headerB, NULL);
  ------------------
  |  |  615|   190k|#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
  |  |  ------------------
  |  |  |  |   92|   190k|#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
  |  |  ------------------
  ------------------
 1007|   190k|    *header = PEM_MALLOC(headerlen + 1, flags);
  ------------------
  |  |  235|   190k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1008|   190k|    *data = PEM_MALLOC(len, flags);
  ------------------
  |  |  235|   190k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1009|   190k|    if (*header == NULL || *data == NULL)
  ------------------
  |  Branch (1009:9): [True: 0, False: 190k]
  |  Branch (1009:28): [True: 0, False: 190k]
  ------------------
 1010|      0|        goto out_free;
 1011|   190k|    if (headerlen != 0 && BIO_read(headerB, *header, headerlen) != headerlen)
  ------------------
  |  Branch (1011:9): [True: 0, False: 190k]
  |  Branch (1011:27): [True: 0, False: 0]
  ------------------
 1012|      0|        goto out_free;
 1013|   190k|    (*header)[headerlen] = '\0';
 1014|   190k|    if (BIO_read(dataB, *data, len) != len)
  ------------------
  |  Branch (1014:9): [True: 0, False: 190k]
  ------------------
 1015|      0|        goto out_free;
 1016|   190k|    *len_out = len;
 1017|   190k|    *name_out = name;
 1018|   190k|    name = NULL;
 1019|   190k|    ret = 1;
 1020|   190k|    goto end;
 1021|       |
 1022|      0|out_free:
 1023|      0|    PEM_FREE(*header, flags, 0);
  ------------------
  |  |  224|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1024|      0|    *header = NULL;
 1025|      0|    PEM_FREE(*data, flags, 0);
  ------------------
  |  |  224|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1026|      0|    *data = NULL;
 1027|   192k|end:
 1028|   192k|    EVP_ENCODE_CTX_free(ctx);
 1029|   192k|    PEM_FREE(name, flags, 0);
  ------------------
  |  |  224|   192k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1030|   192k|    BIO_free(headerB);
 1031|   192k|    BIO_free(dataB);
 1032|   192k|    return ret;
 1033|      0|}
PEM_read_bio:
 1037|   191k|{
 1038|   191k|    return PEM_read_bio_ex(bp, name, header, data, len, PEM_FLAG_EAY_COMPATIBLE);
  ------------------
  |  |  382|   191k|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
 1039|   191k|}
pem_lib.c:pem_bytes_read_bio_flags:
  247|     15|{
  248|     15|    EVP_CIPHER_INFO cipher;
  249|     15|    char *nm = NULL, *header = NULL;
  250|     15|    unsigned char *data = NULL;
  251|     15|    long len = 0;
  252|     15|    int ret = 0;
  253|       |
  254|     15|    do {
  255|     15|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  224|     15|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  256|     15|        PEM_FREE(header, flags, 0);
  ------------------
  |  |  224|     15|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  257|     15|        PEM_FREE(data, flags, len);
  ------------------
  |  |  224|     15|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|     15|        if (!PEM_read_bio_ex(bp, &nm, &header, &data, &len, flags)) {
  ------------------
  |  Branch (258:13): [True: 15, False: 0]
  ------------------
  259|     15|            if (ERR_GET_REASON(ERR_peek_error()) == PEM_R_NO_START_LINE)
  ------------------
  |  |   44|     15|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (259:17): [True: 10, False: 5]
  ------------------
  260|     10|                ERR_add_error_data(2, "Expecting: ", name);
  261|     15|            return 0;
  262|     15|        }
  263|     15|    } while (!check_pem(nm, name));
  ------------------
  |  Branch (263:14): [True: 0, False: 0]
  ------------------
  264|      0|    if (!PEM_get_EVP_CIPHER_INFO(header, &cipher))
  ------------------
  |  Branch (264:9): [True: 0, False: 0]
  ------------------
  265|      0|        goto err;
  266|      0|    if (!PEM_do_header(&cipher, data, &len, cb, u))
  ------------------
  |  Branch (266:9): [True: 0, False: 0]
  ------------------
  267|      0|        goto err;
  268|       |
  269|      0|    *pdata = data;
  270|      0|    *plen = len;
  271|       |
  272|      0|    if (pnm != NULL)
  ------------------
  |  Branch (272:9): [True: 0, False: 0]
  ------------------
  273|      0|        *pnm = nm;
  274|       |
  275|      0|    ret = 1;
  276|       |
  277|      0|err:
  278|      0|    if (!ret || pnm == NULL)
  ------------------
  |  Branch (278:9): [True: 0, False: 0]
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|        PEM_FREE(nm, flags, 0);
  ------------------
  |  |  224|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  280|      0|    PEM_FREE(header, flags, 0);
  ------------------
  |  |  224|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|      0|    if (!ret)
  ------------------
  |  Branch (281:9): [True: 0, False: 0]
  ------------------
  282|      0|        PEM_FREE(data, flags, len);
  ------------------
  |  |  224|      0|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  283|      0|    return ret;
  284|      0|}
pem_lib.c:get_name:
  776|   192k|{
  777|   192k|    char *linebuf;
  778|   192k|    int ret = 0;
  779|   192k|    int len;
  780|   192k|    int first_call = 1;
  781|       |
  782|       |    /*
  783|       |     * Need to hold trailing NUL (accounted for by BIO_gets() and the newline
  784|       |     * that will be added by sanitize_line() (the extra '1').
  785|       |     */
  786|   192k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  235|   192k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  787|   192k|    if (linebuf == NULL)
  ------------------
  |  Branch (787:9): [True: 0, False: 192k]
  ------------------
  788|      0|        return 0;
  789|       |
  790|   192k|    do {
  791|   192k|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  767|   192k|#define LINESIZE 255
  ------------------
  792|       |
  793|   192k|        if (len <= 0) {
  ------------------
  |  Branch (793:13): [True: 1.33k, False: 190k]
  ------------------
  794|  1.33k|            ERR_raise(ERR_LIB_PEM, PEM_R_NO_START_LINE);
  ------------------
  |  |  404|  1.33k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|  1.33k|    (ERR_new(),                                                  \
  |  |  |  |  407|  1.33k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  1.33k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|  1.33k|        ERR_set_error)
  |  |  ------------------
  ------------------
  795|  1.33k|            goto err;
  796|  1.33k|        }
  797|       |
  798|       |        /* Strip trailing garbage and standardize ending. */
  799|   190k|        len = sanitize_line(linebuf, len, flags & ~PEM_FLAG_ONLY_B64, first_call);
  ------------------
  |  |  383|   190k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  800|   190k|        first_call = 0;
  801|       |
  802|       |        /* Allow leading empty or non-matching lines. */
  803|   190k|    } while (!HAS_PREFIX(linebuf, BEGINSTR)
  ------------------
  |  |   58|   381k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (803:14): [True: 0, False: 190k]
  ------------------
  804|   190k|        || len < TAILLEN
  ------------------
  |  |  774|   381k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  771|   190k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  |  Branch (804:12): [True: 0, False: 190k]
  ------------------
  805|   190k|        || !HAS_PREFIX(linebuf + len - TAILLEN, TAILSTR));
  ------------------
  |  |   58|   190k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (805:12): [True: 0, False: 190k]
  ------------------
  806|   190k|    linebuf[len - TAILLEN] = '\0';
  ------------------
  |  |  774|   190k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  771|   190k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  807|   190k|    len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  772|   190k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  769|   190k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
                  len = len - BEGINLEN - TAILLEN + 1;
  ------------------
  |  |  774|   190k|#define TAILLEN ((int)(sizeof(TAILSTR) - 1))
  |  |  ------------------
  |  |  |  |  771|   190k|#define TAILSTR "-----\n"
  |  |  ------------------
  ------------------
  808|   190k|    *name = PEM_MALLOC(len, flags);
  ------------------
  |  |  235|   190k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  809|   190k|    if (*name == NULL)
  ------------------
  |  Branch (809:9): [True: 0, False: 190k]
  ------------------
  810|      0|        goto err;
  811|   190k|    memcpy(*name, linebuf + BEGINLEN, len);
  ------------------
  |  |  772|   190k|#define BEGINLEN ((int)(sizeof(BEGINSTR) - 1))
  |  |  ------------------
  |  |  |  |  769|   190k|#define BEGINSTR "-----BEGIN "
  |  |  ------------------
  ------------------
  812|   190k|    ret = 1;
  813|       |
  814|   192k|err:
  815|   192k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  224|   192k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  816|   192k|    return ret;
  817|   190k|}
pem_lib.c:sanitize_line:
  723|  4.71M|{
  724|  4.71M|    int i;
  725|  4.71M|    if (first_call) {
  ------------------
  |  Branch (725:9): [True: 190k, False: 4.52M]
  ------------------
  726|       |        /* Other BOMs imply unsupported multibyte encoding,
  727|       |         * so don't strip them and let the error raise */
  728|   190k|        const unsigned char utf8_bom[3] = { 0xEF, 0xBB, 0xBF };
  729|       |
  730|   190k|        if (len > 3 && memcmp(linebuf, utf8_bom, 3) == 0) {
  ------------------
  |  Branch (730:13): [True: 190k, False: 0]
  |  Branch (730:24): [True: 0, False: 190k]
  ------------------
  731|      0|            memmove(linebuf, linebuf + 3, len - 3);
  732|      0|            linebuf[len - 3] = 0;
  733|      0|            len -= 3;
  734|      0|        }
  735|   190k|    }
  736|       |
  737|  4.71M|    if (flags & PEM_FLAG_EAY_COMPATIBLE) {
  ------------------
  |  |  382|  4.71M|#define PEM_FLAG_EAY_COMPATIBLE 0x2
  ------------------
  |  Branch (737:9): [True: 4.71M, False: 0]
  ------------------
  738|       |        /* Strip trailing whitespace */
  739|  14.1M|        while ((len >= 0) && (linebuf[len] <= ' '))
  ------------------
  |  Branch (739:16): [True: 14.1M, False: 0]
  |  Branch (739:30): [True: 9.42M, False: 4.71M]
  ------------------
  740|  9.42M|            len--;
  741|       |        /* Go back to whitespace before applying uniform line ending. */
  742|  4.71M|        len++;
  743|  4.71M|    } else if (flags & PEM_FLAG_ONLY_B64) {
  ------------------
  |  |  383|      0|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  |  Branch (743:16): [True: 0, False: 0]
  ------------------
  744|      0|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (744:21): [True: 0, False: 0]
  ------------------
  745|      0|            if (!ossl_isbase64(linebuf[i]) || linebuf[i] == '\n'
  ------------------
  |  |   84|      0|#define ossl_isbase64(c) (ossl_ctype_check((c), CTYPE_MASK_base64))
  |  |  ------------------
  |  |  |  |   37|      0|#define CTYPE_MASK_base64 0x400
  |  |  ------------------
  ------------------
  |  Branch (745:17): [True: 0, False: 0]
  |  Branch (745:47): [True: 0, False: 0]
  ------------------
  746|      0|                || linebuf[i] == '\r')
  ------------------
  |  Branch (746:20): [True: 0, False: 0]
  ------------------
  747|      0|                break;
  748|      0|        }
  749|      0|        len = i;
  750|      0|    } else {
  751|       |        /* EVP_DecodeBlock strips leading and trailing whitespace, so just strip
  752|       |         * control characters in-place and let everything through. */
  753|      0|        for (i = 0; i < len; ++i) {
  ------------------
  |  Branch (753:21): [True: 0, False: 0]
  ------------------
  754|      0|            if (linebuf[i] == '\n' || linebuf[i] == '\r')
  ------------------
  |  Branch (754:17): [True: 0, False: 0]
  |  Branch (754:39): [True: 0, False: 0]
  ------------------
  755|      0|                break;
  756|      0|            if (ossl_iscntrl(linebuf[i]))
  ------------------
  |  |   78|      0|#define ossl_iscntrl(c) (ossl_ctype_check((c), CTYPE_MASK_cntrl))
  |  |  ------------------
  |  |  |  |   33|      0|#define CTYPE_MASK_cntrl 0x40
  |  |  ------------------
  |  |  |  Branch (78:25): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  757|      0|                linebuf[i] = ' ';
  758|      0|        }
  759|      0|        len = i;
  760|      0|    }
  761|       |    /* The caller allocated LINESIZE+1, so this is safe. */
  762|  4.71M|    linebuf[len++] = '\n';
  763|  4.71M|    linebuf[len] = '\0';
  764|  4.71M|    return len;
  765|  4.71M|}
pem_lib.c:get_header_and_data:
  839|   190k|{
  840|   190k|    BIO *tmp = *header;
  841|   190k|    char *linebuf, *p;
  842|   190k|    int len, ret = 0, end = 0, prev_partial_line_read = 0, partial_line_read = 0;
  843|       |    /* 0 if not seen (yet), 1 if reading header, 2 if finished header */
  844|   190k|    enum header_status got_header = MAYBE_HEADER;
  845|   190k|    unsigned int flags_mask;
  846|   190k|    size_t namelen;
  847|       |
  848|       |    /* Need to hold trailing NUL (accounted for by BIO_gets() and the newline
  849|       |     * that will be added by sanitize_line() (the extra '1'). */
  850|   190k|    linebuf = PEM_MALLOC(LINESIZE + 1, flags);
  ------------------
  |  |  235|   190k|    pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_malloc((num), (flags), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  851|   190k|    if (linebuf == NULL)
  ------------------
  |  Branch (851:9): [True: 0, False: 190k]
  ------------------
  852|      0|        return 0;
  853|       |
  854|  4.52M|    while (1) {
  ------------------
  |  Branch (854:12): [True: 4.52M, Folded]
  ------------------
  855|  4.52M|        flags_mask = ~0u;
  856|  4.52M|        len = BIO_gets(bp, linebuf, LINESIZE);
  ------------------
  |  |  767|  4.52M|#define LINESIZE 255
  ------------------
  857|  4.52M|        if (len <= 0) {
  ------------------
  |  Branch (857:13): [True: 0, False: 4.52M]
  ------------------
  858|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  859|      0|            goto err;
  860|      0|        }
  861|       |
  862|       |        /*
  863|       |         * Check if line has been read completely or if only part of the line
  864|       |         * has been read. Keep the previous value to ignore newlines that
  865|       |         * appear due to reading a line up until the char before the newline.
  866|       |         */
  867|  4.52M|        prev_partial_line_read = partial_line_read;
  868|  4.52M|        partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  767|  4.52M|#define LINESIZE 255
  ------------------
                      partial_line_read = len == LINESIZE - 1 && linebuf[LINESIZE - 2] != '\n';
  ------------------
  |  |  767|      0|#define LINESIZE 255
  ------------------
  |  Branch (868:29): [True: 0, False: 4.52M]
  |  Branch (868:52): [True: 0, False: 0]
  ------------------
  869|       |
  870|  4.52M|        if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (870:13): [True: 4.52M, False: 0]
  ------------------
  871|  4.52M|            if (memchr(linebuf, ':', len) != NULL)
  ------------------
  |  Branch (871:17): [True: 0, False: 4.52M]
  ------------------
  872|      0|                got_header = IN_HEADER;
  873|  4.52M|        }
  874|  4.52M|        if (HAS_PREFIX(linebuf, ENDSTR) || got_header == IN_HEADER)
  ------------------
  |  |   58|  9.04M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 190k, False: 4.33M]
  |  |  ------------------
  ------------------
  |  Branch (874:44): [True: 0, False: 4.33M]
  ------------------
  875|   190k|            flags_mask &= ~PEM_FLAG_ONLY_B64;
  ------------------
  |  |  383|   190k|#define PEM_FLAG_ONLY_B64 0x4
  ------------------
  876|  4.52M|        len = sanitize_line(linebuf, len, flags & flags_mask, 0);
  877|       |
  878|       |        /* Check for end of header. */
  879|  4.52M|        if (linebuf[0] == '\n') {
  ------------------
  |  Branch (879:13): [True: 0, False: 4.52M]
  ------------------
  880|       |            /*
  881|       |             * If previous line has been read only partially this newline is a
  882|       |             * regular newline at the end of a line and not an empty line.
  883|       |             */
  884|      0|            if (!prev_partial_line_read) {
  ------------------
  |  Branch (884:17): [True: 0, False: 0]
  ------------------
  885|      0|                if (got_header == POST_HEADER) {
  ------------------
  |  Branch (885:21): [True: 0, False: 0]
  ------------------
  886|       |                    /* Another blank line is an error. */
  887|      0|                    ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  888|      0|                    goto err;
  889|      0|                }
  890|      0|                got_header = POST_HEADER;
  891|      0|                tmp = *data;
  892|      0|            }
  893|      0|            continue;
  894|      0|        }
  895|       |
  896|       |        /* Check for end of stream (which means there is no header). */
  897|  4.52M|        p = linebuf;
  898|  4.52M|        if (CHECK_AND_SKIP_PREFIX(p, ENDSTR)) {
  ------------------
  |  |   61|  4.52M|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|  4.52M|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 190k, False: 4.33M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 190k, False: 4.33M]
  |  |  ------------------
  ------------------
  899|   190k|            namelen = strlen(name);
  900|   190k|            if (strncmp(p, name, namelen) != 0 || !HAS_PREFIX(p + namelen, TAILSTR)) {
  ------------------
  |  |   58|   190k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  ------------------
  |  Branch (900:17): [True: 0, False: 190k]
  |  Branch (900:51): [True: 0, False: 190k]
  ------------------
  901|      0|                ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  902|      0|                goto err;
  903|      0|            }
  904|   190k|            if (got_header == MAYBE_HEADER) {
  ------------------
  |  Branch (904:17): [True: 190k, False: 0]
  ------------------
  905|   190k|                *header = *data;
  906|   190k|                *data = tmp;
  907|   190k|            }
  908|   190k|            break;
  909|  4.33M|        } else if (end) {
  ------------------
  |  Branch (909:20): [True: 0, False: 4.33M]
  ------------------
  910|       |            /* Malformed input; short line not at end of data. */
  911|      0|            ERR_raise(ERR_LIB_PEM, PEM_R_BAD_END_LINE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  912|      0|            goto err;
  913|      0|        }
  914|       |        /*
  915|       |         * Else, a line of text -- could be header or data; we don't
  916|       |         * know yet.  Just pass it through.
  917|       |         */
  918|  4.33M|        if (BIO_puts(tmp, linebuf) < 0)
  ------------------
  |  Branch (918:13): [True: 0, False: 4.33M]
  ------------------
  919|      0|            goto err;
  920|       |        /*
  921|       |         * Only encrypted files need the line length check applied.
  922|       |         */
  923|  4.33M|        if (got_header == POST_HEADER) {
  ------------------
  |  Branch (923:13): [True: 0, False: 4.33M]
  ------------------
  924|       |            /* 65 includes the trailing newline */
  925|      0|            if (len > 65)
  ------------------
  |  Branch (925:17): [True: 0, False: 0]
  ------------------
  926|      0|                goto err;
  927|      0|            if (len < 65)
  ------------------
  |  Branch (927:17): [True: 0, False: 0]
  ------------------
  928|      0|                end = 1;
  929|      0|        }
  930|  4.33M|    }
  931|       |
  932|   190k|    ret = 1;
  933|   190k|err:
  934|   190k|    PEM_FREE(linebuf, flags, LINESIZE + 1);
  ------------------
  |  |  224|   190k|    pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   pem_free((p), (flags), (num), OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  935|   190k|    return ret;
  936|   190k|}
pem_lib.c:pem_malloc:
  238|   954k|{
  239|   954k|    return (flags & PEM_FLAG_SECURE) ? CRYPTO_secure_malloc(num, file, line)
  ------------------
  |  |  381|   954k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (239:12): [True: 0, False: 954k]
  ------------------
  240|   954k|                                     : CRYPTO_malloc(num, file, line);
  241|   954k|}
pem_lib.c:pem_free:
  227|   574k|{
  228|   574k|    if (flags & PEM_FLAG_SECURE)
  ------------------
  |  |  381|   574k|#define PEM_FLAG_SECURE 0x1
  ------------------
  |  Branch (228:9): [True: 0, False: 574k]
  ------------------
  229|      0|        CRYPTO_secure_clear_free(p, num, file, line);
  230|   574k|    else
  231|   574k|        CRYPTO_free(p, file, line);
  232|   574k|}

PEM_ASN1_read_bio:
   22|     15|{
   23|     15|    const unsigned char *p = NULL;
   24|     15|    unsigned char *data = NULL;
   25|     15|    long len;
   26|     15|    char *ret = NULL;
   27|       |
   28|     15|    if (!PEM_bytes_read_bio(&data, &len, NULL, name, bp, cb, u))
  ------------------
  |  Branch (28:9): [True: 15, False: 0]
  ------------------
   29|     15|        return NULL;
   30|      0|    p = data;
   31|      0|    ret = d2i(x, &p, len);
   32|      0|    if (ret == NULL)
  ------------------
  |  Branch (32:9): [True: 0, False: 0]
  ------------------
   33|      0|        ERR_raise(ERR_LIB_PEM, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   34|      0|    OPENSSL_free(data);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   35|      0|    return ret;
   36|     15|}

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

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

ossl_property_defns_free:
   52|    695|{
   53|    695|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns = vproperty_defns;
  ------------------
  |  |  156|    695|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   54|       |
   55|    695|    if (property_defns != NULL) {
  ------------------
  |  Branch (55:9): [True: 695, False: 0]
  ------------------
   56|    695|        lh_PROPERTY_DEFN_ELEM_doall(property_defns,
   57|    695|            &property_defn_free);
   58|    695|        lh_PROPERTY_DEFN_ELEM_free(property_defns);
   59|    695|    }
   60|    695|}
ossl_property_defns_new:
   63|    695|{
   64|    695|    return lh_PROPERTY_DEFN_ELEM_new(&property_defn_hash, &property_defn_cmp);
   65|    695|}
ossl_prop_defn_get:
   68|   141k|{
   69|   141k|    PROPERTY_DEFN_ELEM elem, *r;
   70|   141k|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns;
  ------------------
  |  |  156|   141k|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   71|       |
   72|   141k|    property_defns = ossl_lib_ctx_get_data(ctx,
   73|   141k|        OSSL_LIB_CTX_PROPERTY_DEFN_INDEX);
  ------------------
  |  |   98|   141k|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
   74|   141k|    if (!ossl_assert(property_defns != NULL) || !ossl_lib_ctx_read_lock(ctx))
  ------------------
  |  |   52|   282k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   282k|    __FILE__, __LINE__)
  ------------------
  |  Branch (74:9): [True: 0, False: 141k]
  |  Branch (74:49): [True: 0, False: 141k]
  ------------------
   75|      0|        return NULL;
   76|       |
   77|   141k|    elem.prop = prop;
   78|   141k|    r = lh_PROPERTY_DEFN_ELEM_retrieve(property_defns, &elem);
   79|   141k|    ossl_lib_ctx_unlock(ctx);
   80|   141k|    if (r == NULL || !ossl_assert(r->defn != NULL))
  ------------------
  |  |   52|   140k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   140k|    __FILE__, __LINE__)
  ------------------
  |  Branch (80:9): [True: 596, False: 140k]
  |  Branch (80:22): [True: 0, False: 140k]
  ------------------
   81|    596|        return NULL;
   82|   140k|    return r->defn;
   83|   141k|}
ossl_prop_defn_set:
   92|    596|{
   93|    596|    PROPERTY_DEFN_ELEM elem, *old, *p = NULL;
   94|    596|    size_t len;
   95|    596|    LHASH_OF(PROPERTY_DEFN_ELEM) *property_defns;
  ------------------
  |  |  156|    596|#define LHASH_OF(type) struct lhash_st_##type
  ------------------
   96|    596|    int res = 1;
   97|       |
   98|    596|    property_defns = ossl_lib_ctx_get_data(ctx,
   99|    596|        OSSL_LIB_CTX_PROPERTY_DEFN_INDEX);
  ------------------
  |  |   98|    596|#define OSSL_LIB_CTX_PROPERTY_DEFN_INDEX 2
  ------------------
  100|    596|    if (property_defns == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 596]
  ------------------
  101|      0|        return 0;
  102|       |
  103|    596|    if (prop == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 596]
  ------------------
  104|      0|        return 1;
  105|       |
  106|    596|    if (!ossl_lib_ctx_write_lock(ctx))
  ------------------
  |  Branch (106:9): [True: 0, False: 596]
  ------------------
  107|      0|        return 0;
  108|    596|    elem.prop = prop;
  109|    596|    if (pl == NULL) {
  ------------------
  |  Branch (109:9): [True: 0, False: 596]
  ------------------
  110|      0|        lh_PROPERTY_DEFN_ELEM_delete(property_defns, &elem);
  111|      0|        goto end;
  112|      0|    }
  113|       |    /* check if property definition is in the cache already */
  114|    596|    if ((p = lh_PROPERTY_DEFN_ELEM_retrieve(property_defns, &elem)) != NULL) {
  ------------------
  |  Branch (114:9): [True: 0, False: 596]
  ------------------
  115|      0|        ossl_property_free(*pl);
  116|      0|        *pl = p->defn;
  117|      0|        goto end;
  118|      0|    }
  119|    596|    len = strlen(prop);
  120|    596|    p = OPENSSL_malloc(sizeof(*p) + len);
  ------------------
  |  |  106|    596|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|    596|    if (p != NULL) {
  ------------------
  |  Branch (121:9): [True: 596, False: 0]
  ------------------
  122|    596|        p->prop = p->body;
  123|    596|        p->defn = *pl;
  124|    596|        memcpy(p->body, prop, len + 1);
  125|    596|        old = lh_PROPERTY_DEFN_ELEM_insert(property_defns, p);
  126|    596|        if (!ossl_assert(old == NULL))
  ------------------
  |  |   52|    596|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    596|    __FILE__, __LINE__)
  ------------------
  |  Branch (126:13): [True: 0, False: 596]
  ------------------
  127|       |            /* This should not happen. An existing entry is handled above. */
  128|      0|            goto end;
  129|    596|        if (!lh_PROPERTY_DEFN_ELEM_error(property_defns))
  ------------------
  |  Branch (129:13): [True: 596, False: 0]
  ------------------
  130|    596|            goto end;
  131|    596|    }
  132|      0|    OPENSSL_free(p);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  133|      0|    res = 0;
  134|    596|end:
  135|    596|    ossl_lib_ctx_unlock(ctx);
  136|    596|    return res;
  137|      0|}
defn_cache.c:property_defn_free:
   46|    596|{
   47|    596|    ossl_property_free(elem->defn);
   48|    596|    OPENSSL_free(elem);
  ------------------
  |  |  131|    596|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   49|    596|}
defn_cache.c:property_defn_hash:
   35|   142k|{
   36|   142k|    return OPENSSL_LH_strhash(a->prop);
   37|   142k|}
defn_cache.c:property_defn_cmp:
   41|   140k|{
   42|   140k|    return strcmp(a->prop, b->prop);
   43|   140k|}

ossl_ctx_global_properties_free:
  115|    695|{
  116|    695|    OSSL_GLOBAL_PROPERTIES *globp = vglobp;
  117|       |
  118|    695|    if (globp != NULL) {
  ------------------
  |  Branch (118:9): [True: 695, False: 0]
  ------------------
  119|    695|        ossl_property_free(globp->list);
  120|    695|        OPENSSL_free(globp);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|    695|    }
  122|    695|}
ossl_ctx_global_properties_new:
  125|    695|{
  126|    695|    return OPENSSL_zalloc(sizeof(OSSL_GLOBAL_PROPERTIES));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|    695|}
ossl_ctx_global_properties:
  131|  27.5k|{
  132|  27.5k|    OSSL_GLOBAL_PROPERTIES *globp;
  133|       |
  134|  27.5k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  135|  27.5k|    if (loadconfig && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  510|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (135:9): [True: 0, False: 27.5k]
  |  Branch (135:23): [True: 0, False: 0]
  ------------------
  136|      0|        return NULL;
  137|  27.5k|#endif
  138|  27.5k|    globp = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_GLOBAL_PROPERTIES);
  ------------------
  |  |  112|  27.5k|#define OSSL_LIB_CTX_GLOBAL_PROPERTIES 14
  ------------------
  139|       |
  140|  27.5k|    return globp != NULL ? &globp->list : NULL;
  ------------------
  |  Branch (140:12): [True: 27.5k, False: 0]
  ------------------
  141|  27.5k|}
ossl_method_store_new:
  244|  2.78k|{
  245|  2.78k|    OSSL_METHOD_STORE *res;
  246|       |
  247|  2.78k|    res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  108|  2.78k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  248|  2.78k|    if (res != NULL) {
  ------------------
  |  Branch (248:9): [True: 2.78k, False: 0]
  ------------------
  249|  2.78k|        res->ctx = ctx;
  250|  2.78k|        if ((res->algs = ossl_sa_ALGORITHM_new()) == NULL
  ------------------
  |  Branch (250:13): [True: 0, False: 2.78k]
  ------------------
  251|  2.78k|            || (res->lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (251:16): [True: 0, False: 2.78k]
  ------------------
  252|  2.78k|            || (res->biglock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (252:16): [True: 0, False: 2.78k]
  ------------------
  253|      0|            ossl_method_store_free(res);
  254|      0|            return NULL;
  255|      0|        }
  256|  2.78k|    }
  257|  2.78k|    return res;
  258|  2.78k|}
ossl_method_store_free:
  261|  2.78k|{
  262|  2.78k|    if (store != NULL) {
  ------------------
  |  Branch (262:9): [True: 2.78k, False: 0]
  ------------------
  263|  2.78k|        if (store->algs != NULL)
  ------------------
  |  Branch (263:13): [True: 2.78k, False: 0]
  ------------------
  264|  2.78k|            ossl_sa_ALGORITHM_doall_arg(store->algs, &alg_cleanup, store);
  265|  2.78k|        ossl_sa_ALGORITHM_free(store->algs);
  266|  2.78k|        CRYPTO_THREAD_lock_free(store->lock);
  267|  2.78k|        CRYPTO_THREAD_lock_free(store->biglock);
  268|  2.78k|        OPENSSL_free(store);
  ------------------
  |  |  131|  2.78k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  269|  2.78k|    }
  270|  2.78k|}
ossl_method_lock_store:
  273|  66.2k|{
  274|  66.2k|    return store != NULL ? CRYPTO_THREAD_write_lock(store->biglock) : 0;
  ------------------
  |  Branch (274:12): [True: 66.2k, False: 0]
  ------------------
  275|  66.2k|}
ossl_method_unlock_store:
  278|  66.2k|{
  279|  66.2k|    return store != NULL ? CRYPTO_THREAD_unlock(store->biglock) : 0;
  ------------------
  |  Branch (279:12): [True: 66.2k, False: 0]
  ------------------
  280|  66.2k|}
ossl_method_store_add:
  321|   141k|{
  322|   141k|    ALGORITHM *alg = NULL;
  323|   141k|    IMPLEMENTATION *impl;
  324|   141k|    int ret = 0;
  325|   141k|    int i;
  326|       |
  327|   141k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (327:9): [True: 0, False: 141k]
  |  Branch (327:21): [True: 0, False: 141k]
  |  Branch (327:39): [True: 0, False: 141k]
  ------------------
  328|      0|        return 0;
  329|       |
  330|   141k|    if (properties == NULL)
  ------------------
  |  Branch (330:9): [True: 0, False: 141k]
  ------------------
  331|      0|        properties = "";
  332|       |
  333|   141k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|   141k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   141k|    __FILE__, __LINE__)
  ------------------
  |  Branch (333:9): [True: 0, False: 141k]
  ------------------
  334|      0|        return 0;
  335|       |
  336|       |    /* Create new entry */
  337|   141k|    impl = OPENSSL_malloc(sizeof(*impl));
  ------------------
  |  |  106|   141k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  338|   141k|    if (impl == NULL)
  ------------------
  |  Branch (338:9): [True: 0, False: 141k]
  ------------------
  339|      0|        return 0;
  340|   141k|    impl->method.method = method;
  341|   141k|    impl->method.up_ref = method_up_ref;
  342|   141k|    impl->method.free = method_destruct;
  343|   141k|    if (!ossl_method_up_ref(&impl->method)) {
  ------------------
  |  Branch (343:9): [True: 0, False: 141k]
  ------------------
  344|      0|        OPENSSL_free(impl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  345|      0|        return 0;
  346|      0|    }
  347|   141k|    impl->provider = prov;
  348|       |
  349|       |    /* Insert into the hash table if required */
  350|   141k|    if (!ossl_property_write_lock(store)) {
  ------------------
  |  Branch (350:9): [True: 0, False: 141k]
  ------------------
  351|      0|        impl_free(impl);
  352|      0|        return 0;
  353|      0|    }
  354|       |
  355|       |    /*
  356|       |     * Flush the alg cache of any implementation that already exists
  357|       |     * for this id.
  358|       |     * This is done to ensure that on the next lookup we go through the
  359|       |     * provider comparison in ossl_method_store_fetch.  If we don't do this
  360|       |     * then this new method won't be given a chance to get selected.
  361|       |     * NOTE: This doesn't actually remove the method from the backing store
  362|       |     * It just ensures that we query the backing store when (re)-adding a
  363|       |     * method to the algorithm cache, in case the one selected by the next
  364|       |     * query selects a different implementation
  365|       |     */
  366|   141k|    ossl_method_cache_flush(store, nid);
  367|       |
  368|       |    /*
  369|       |     * Parse the properties associated with this method, and convert it to a
  370|       |     * property list stored against the implementation for later comparison
  371|       |     * during fetch operations
  372|       |     */
  373|   141k|    if ((impl->properties = ossl_prop_defn_get(store->ctx, properties)) == NULL) {
  ------------------
  |  Branch (373:9): [True: 596, False: 140k]
  ------------------
  374|    596|        impl->properties = ossl_parse_property(store->ctx, properties);
  375|    596|        if (impl->properties == NULL)
  ------------------
  |  Branch (375:13): [True: 0, False: 596]
  ------------------
  376|      0|            goto err;
  377|    596|        if (!ossl_prop_defn_set(store->ctx, properties, &impl->properties)) {
  ------------------
  |  Branch (377:13): [True: 0, False: 596]
  ------------------
  378|      0|            ossl_property_free(impl->properties);
  379|      0|            impl->properties = NULL;
  380|      0|            goto err;
  381|      0|        }
  382|    596|    }
  383|       |
  384|       |    /*
  385|       |     * Check if we have an algorithm cache already for this nid.  If so use
  386|       |     * it, otherwise, create it, and insert it into the store
  387|       |     */
  388|   141k|    alg = ossl_method_store_retrieve(store, nid);
  389|   141k|    if (alg == NULL) {
  ------------------
  |  Branch (389:9): [True: 141k, False: 99]
  ------------------
  390|   141k|        if ((alg = OPENSSL_zalloc(sizeof(*alg))) == NULL
  ------------------
  |  |  108|   141k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (390:13): [True: 0, False: 141k]
  ------------------
  391|   141k|            || (alg->impls = sk_IMPLEMENTATION_new_null()) == NULL
  ------------------
  |  Branch (391:16): [True: 0, False: 141k]
  ------------------
  392|   141k|            || (alg->cache = lh_QUERY_new(&query_hash, &query_cmp)) == NULL)
  ------------------
  |  Branch (392:16): [True: 0, False: 141k]
  ------------------
  393|      0|            goto err;
  394|   141k|        alg->nid = nid;
  395|   141k|        if (!ossl_method_store_insert(store, alg))
  ------------------
  |  Branch (395:13): [True: 0, False: 141k]
  ------------------
  396|      0|            goto err;
  397|   141k|        OSSL_TRACE2(QUERY, "Inserted an alg with nid %d into the store %p\n", nid, (void *)store);
  ------------------
  |  |  295|   141k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|   141k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  398|   141k|    }
  399|       |
  400|       |    /* Push onto stack if there isn't one there already */
  401|   141k|    for (i = 0; i < sk_IMPLEMENTATION_num(alg->impls); i++) {
  ------------------
  |  Branch (401:17): [True: 130, False: 141k]
  ------------------
  402|    130|        const IMPLEMENTATION *tmpimpl = sk_IMPLEMENTATION_value(alg->impls, i);
  403|       |
  404|    130|        if (tmpimpl->provider == impl->provider
  ------------------
  |  Branch (404:13): [True: 77, False: 53]
  ------------------
  405|     77|            && tmpimpl->properties == impl->properties)
  ------------------
  |  Branch (405:16): [True: 0, False: 77]
  ------------------
  406|      0|            break;
  407|    130|    }
  408|       |
  409|   141k|    if (i == sk_IMPLEMENTATION_num(alg->impls)
  ------------------
  |  Branch (409:9): [True: 141k, False: 0]
  ------------------
  410|   141k|        && sk_IMPLEMENTATION_push(alg->impls, impl)) {
  ------------------
  |  Branch (410:12): [True: 141k, False: 0]
  ------------------
  411|   141k|        ret = 1;
  412|   141k|#ifndef FIPS_MODULE
  413|   141k|        OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  221|   141k|    do {                           \
  |  |  222|   141k|        BIO *trc_out = NULL;       \
  |  |  223|   141k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 141k]
  |  |  ------------------
  ------------------
  414|      0|        {
  415|      0|            BIO_printf(trc_out, "Adding to method store "
  416|      0|                                "nid: %d\nproperties: %s\nprovider: %s\n",
  417|      0|                nid, properties,
  418|      0|                ossl_provider_name(prov) == NULL ? "none" : ossl_provider_name(prov));
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|        }
  420|   141k|        OSSL_TRACE_END(QUERY);
  ------------------
  |  |  226|   141k|    }                            \
  |  |  227|   141k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 141k]
  |  |  ------------------
  ------------------
  421|   141k|#endif
  422|   141k|    }
  423|   141k|    ossl_property_unlock(store);
  424|   141k|    if (ret == 0)
  ------------------
  |  Branch (424:9): [True: 0, False: 141k]
  ------------------
  425|      0|        impl_free(impl);
  426|   141k|    return ret;
  427|       |
  428|      0|err:
  429|      0|    ossl_property_unlock(store);
  430|       |    alg_cleanup(0, alg, NULL);
  431|      0|    impl_free(impl);
  432|      0|    return 0;
  433|   141k|}
ossl_method_store_remove_all_provided:
  540|    324|{
  541|    324|    struct alg_cleanup_by_provider_data_st data;
  542|       |
  543|    324|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (543:9): [True: 0, False: 324]
  ------------------
  544|      0|        return 0;
  545|    324|    data.prov = prov;
  546|    324|    data.store = store;
  547|    324|    ossl_sa_ALGORITHM_doall_arg(store->algs, &alg_cleanup_by_provider, &data);
  548|    324|    ossl_property_unlock(store);
  549|    324|    return 1;
  550|    324|}
ossl_method_store_do_all:
  581|      6|{
  582|      6|    int i, j;
  583|      6|    int numalgs, numimps;
  584|      6|    STACK_OF(ALGORITHM) *tmpalgs;
  ------------------
  |  |   33|      6|#define STACK_OF(type) struct stack_st_##type
  ------------------
  585|      6|    ALGORITHM *alg;
  586|       |
  587|      6|    if (store != NULL) {
  ------------------
  |  Branch (587:9): [True: 6, False: 0]
  ------------------
  588|       |
  589|      6|        if (!ossl_property_read_lock(store))
  ------------------
  |  Branch (589:13): [True: 0, False: 6]
  ------------------
  590|      0|            return;
  591|       |
  592|      6|        tmpalgs = sk_ALGORITHM_new_reserve(NULL,
  593|      6|            (int)ossl_sa_ALGORITHM_num(store->algs));
  594|      6|        if (tmpalgs == NULL) {
  ------------------
  |  Branch (594:13): [True: 0, False: 6]
  ------------------
  595|      0|            ossl_property_unlock(store);
  596|      0|            return;
  597|      0|        }
  598|       |
  599|      6|        ossl_sa_ALGORITHM_doall_arg(store->algs, alg_copy, tmpalgs);
  600|      6|        ossl_property_unlock(store);
  601|      6|        numalgs = sk_ALGORITHM_num(tmpalgs);
  602|    662|        for (i = 0; i < numalgs; i++) {
  ------------------
  |  Branch (602:21): [True: 656, False: 6]
  ------------------
  603|    656|            alg = sk_ALGORITHM_value(tmpalgs, i);
  604|    656|            numimps = sk_IMPLEMENTATION_num(alg->impls);
  605|  1.49k|            for (j = 0; j < numimps; j++)
  ------------------
  |  Branch (605:25): [True: 840, False: 656]
  ------------------
  606|    840|                alg_do_one(alg, sk_IMPLEMENTATION_value(alg->impls, j), fn, fnarg);
  607|    656|        }
  608|      6|        sk_ALGORITHM_pop_free(tmpalgs, del_tmpalg);
  609|      6|    }
  610|      6|}
ossl_method_store_fetch:
  638|  38.0k|{
  639|  38.0k|    OSSL_PROPERTY_LIST **plp;
  640|  38.0k|    ALGORITHM *alg;
  641|  38.0k|    IMPLEMENTATION *impl, *best_impl = NULL;
  642|  38.0k|    OSSL_PROPERTY_LIST *pq = NULL, *p2 = NULL;
  643|  38.0k|    const OSSL_PROVIDER *prov = prov_rw != NULL ? *prov_rw : NULL;
  ------------------
  |  Branch (643:33): [True: 38.0k, False: 0]
  ------------------
  644|  38.0k|    int ret = 0;
  645|  38.0k|    int j, best = -1, score, optional;
  646|       |
  647|  38.0k|    if (nid <= 0 || method == NULL || store == NULL)
  ------------------
  |  Branch (647:9): [True: 0, False: 38.0k]
  |  Branch (647:21): [True: 0, False: 38.0k]
  |  Branch (647:39): [True: 0, False: 38.0k]
  ------------------
  648|      0|        return 0;
  649|       |
  650|  38.0k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  651|  38.0k|    if (ossl_lib_ctx_is_default(store->ctx)
  ------------------
  |  Branch (651:9): [True: 7.87k, False: 30.1k]
  ------------------
  652|  7.87k|        && !OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
  ------------------
  |  |  510|  7.87k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  |  Branch (652:12): [True: 0, False: 7.87k]
  ------------------
  653|      0|        return 0;
  654|  38.0k|#endif
  655|       |
  656|       |    /* This only needs to be a read lock, because the query won't create anything */
  657|  38.0k|    if (!ossl_property_read_lock(store))
  ------------------
  |  Branch (657:9): [True: 0, False: 38.0k]
  ------------------
  658|      0|        return 0;
  659|       |
  660|  38.0k|    OSSL_TRACE2(QUERY, "Retrieving by nid %d from store %p\n", nid, (void *)store);
  ------------------
  |  |  295|  38.0k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|  38.0k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  661|  38.0k|    alg = ossl_method_store_retrieve(store, nid);
  662|  38.0k|    if (alg == NULL) {
  ------------------
  |  Branch (662:9): [True: 10.4k, False: 27.5k]
  ------------------
  663|  10.4k|        ossl_property_unlock(store);
  664|  10.4k|        OSSL_TRACE2(QUERY, "Failed to retrieve by nid %d from store %p\n", nid, (void *)store);
  ------------------
  |  |  295|  10.4k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|  10.4k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  665|  10.4k|        return 0;
  666|  10.4k|    }
  667|  27.5k|    OSSL_TRACE2(QUERY, "Retrieved by nid %d from store %p\n", nid, (void *)store);
  ------------------
  |  |  295|  27.5k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2))
  |  |  ------------------
  |  |  |  |  285|  27.5k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
  668|       |
  669|       |    /*
  670|       |     * If a property query string is provided, convert it to an
  671|       |     * OSSL_PROPERTY_LIST structure
  672|       |     */
  673|  27.5k|    if (prop_query != NULL)
  ------------------
  |  Branch (673:9): [True: 27.5k, False: 0]
  ------------------
  674|  27.5k|        p2 = pq = ossl_parse_query(store->ctx, prop_query, 0);
  675|       |
  676|       |    /*
  677|       |     * If the library context has default properties specified
  678|       |     * then merge those with the properties passed to this function
  679|       |     */
  680|  27.5k|    plp = ossl_ctx_global_properties(store->ctx, 0);
  681|  27.5k|    if (plp != NULL && *plp != NULL) {
  ------------------
  |  Branch (681:9): [True: 27.5k, False: 0]
  |  Branch (681:24): [True: 0, False: 27.5k]
  ------------------
  682|      0|        if (pq == NULL) {
  ------------------
  |  Branch (682:13): [True: 0, False: 0]
  ------------------
  683|      0|            pq = *plp;
  684|      0|        } else {
  685|      0|            p2 = ossl_property_merge(pq, *plp);
  686|      0|            ossl_property_free(pq);
  687|      0|            if (p2 == NULL)
  ------------------
  |  Branch (687:17): [True: 0, False: 0]
  ------------------
  688|      0|                goto fin;
  689|      0|            pq = p2;
  690|      0|        }
  691|      0|    }
  692|       |
  693|       |    /*
  694|       |     * Search for a provider that provides this implementation.
  695|       |     * If the requested provider is NULL, then any provider will do,
  696|       |     * otherwise we should try to find the one that matches the requested
  697|       |     * provider.  Note that providers are given implicit preference via the
  698|       |     * ordering of the implementation stack
  699|       |     */
  700|  27.5k|    if (pq == NULL) {
  ------------------
  |  Branch (700:9): [True: 19.9k, False: 7.64k]
  ------------------
  701|  19.9k|        for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (701:21): [True: 19.9k, False: 0]
  ------------------
  702|  19.9k|            if ((impl = sk_IMPLEMENTATION_value(alg->impls, j)) != NULL
  ------------------
  |  Branch (702:17): [True: 19.9k, False: 0]
  ------------------
  703|  19.9k|                && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (703:21): [True: 19.9k, False: 0]
  |  Branch (703:37): [True: 0, False: 0]
  ------------------
  704|  19.9k|                best_impl = impl;
  705|  19.9k|                ret = 1;
  706|  19.9k|                break;
  707|  19.9k|            }
  708|  19.9k|        }
  709|  19.9k|        goto fin;
  710|  19.9k|    }
  711|       |
  712|       |    /*
  713|       |     * If there are optional properties specified
  714|       |     * then run the search again, and select the provider that matches the
  715|       |     * most options
  716|       |     */
  717|  7.64k|    optional = ossl_property_has_optional(pq);
  718|  10.2k|    for (j = 0; j < sk_IMPLEMENTATION_num(alg->impls); j++) {
  ------------------
  |  Branch (718:17): [True: 7.64k, False: 2.57k]
  ------------------
  719|  7.64k|        if ((impl = sk_IMPLEMENTATION_value(alg->impls, j)) != NULL
  ------------------
  |  Branch (719:13): [True: 7.64k, False: 0]
  ------------------
  720|  7.64k|            && (prov == NULL || impl->provider == prov)) {
  ------------------
  |  Branch (720:17): [True: 6.64k, False: 1.00k]
  |  Branch (720:33): [True: 1.00k, False: 0]
  ------------------
  721|  7.64k|            score = ossl_property_match_count(pq, impl->properties);
  722|  7.64k|            if (score > best) {
  ------------------
  |  Branch (722:17): [True: 5.15k, False: 2.49k]
  ------------------
  723|  5.15k|                best_impl = impl;
  724|  5.15k|                best = score;
  725|  5.15k|                ret = 1;
  726|  5.15k|                if (!optional)
  ------------------
  |  Branch (726:21): [True: 5.07k, False: 82]
  ------------------
  727|  5.07k|                    goto fin;
  728|  5.15k|            }
  729|  7.64k|        }
  730|  7.64k|    }
  731|  27.5k|fin:
  732|  27.5k|    if (ret && ossl_method_up_ref(&best_impl->method)) {
  ------------------
  |  Branch (732:9): [True: 25.0k, False: 2.49k]
  |  Branch (732:16): [True: 25.0k, False: 0]
  ------------------
  733|  25.0k|        *method = best_impl->method.method;
  734|  25.0k|        if (prov_rw != NULL)
  ------------------
  |  Branch (734:13): [True: 25.0k, False: 0]
  ------------------
  735|  25.0k|            *prov_rw = best_impl->provider;
  736|  25.0k|    } else {
  737|  2.49k|        ret = 0;
  738|  2.49k|    }
  739|       |
  740|  27.5k|#ifndef FIPS_MODULE
  741|  27.5k|    OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  221|  27.5k|    do {                           \
  |  |  222|  27.5k|        BIO *trc_out = NULL;       \
  |  |  223|  27.5k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 27.5k]
  |  |  ------------------
  ------------------
  742|      0|    {
  743|      0|        char buf[512];
  744|      0|        size_t size;
  745|       |
  746|      0|        size = ossl_property_list_to_string(NULL, pq, buf, 512);
  747|      0|        BIO_printf(trc_out, "method store query with properties %s "
  748|      0|                            "resolves to provider %s\n",
  749|      0|            size == 0 ? "none" : buf,
  ------------------
  |  Branch (749:13): [True: 0, False: 0]
  ------------------
  750|      0|            best_impl == NULL ? "none" : ossl_provider_name(best_impl->provider));
  ------------------
  |  Branch (750:13): [True: 0, False: 0]
  ------------------
  751|      0|    }
  752|  27.5k|    OSSL_TRACE_END(QUERY);
  ------------------
  |  |  226|  27.5k|    }                            \
  |  |  227|  27.5k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 27.5k]
  |  |  ------------------
  ------------------
  753|  27.5k|#endif
  754|       |
  755|  27.5k|    ossl_property_unlock(store);
  756|  27.5k|    ossl_property_free(p2);
  757|  27.5k|    return ret;
  758|  7.64k|}
ossl_method_store_cache_flush_all:
  776|    324|{
  777|    324|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (777:9): [True: 0, False: 324]
  ------------------
  778|      0|        return 0;
  779|    324|    ossl_sa_ALGORITHM_doall(store->algs, &impl_cache_flush_alg);
  780|    324|    store->cache_nelem = 0;
  781|    324|    ossl_property_unlock(store);
  782|    324|    return 1;
  783|    324|}
ossl_method_store_cache_get:
  861|   307k|{
  862|   307k|    ALGORITHM *alg;
  863|   307k|    QUERY elem, *r;
  864|   307k|    int res = 0;
  865|       |
  866|   307k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (866:9): [True: 0, False: 307k]
  |  Branch (866:21): [True: 0, False: 307k]
  |  Branch (866:38): [True: 0, False: 307k]
  ------------------
  867|      0|        return 0;
  868|       |
  869|   307k|    if (!ossl_property_read_lock(store))
  ------------------
  |  Branch (869:9): [True: 0, False: 307k]
  ------------------
  870|      0|        return 0;
  871|   307k|    alg = ossl_method_store_retrieve(store, nid);
  872|   307k|    if (alg == NULL)
  ------------------
  |  Branch (872:9): [True: 12.0k, False: 295k]
  ------------------
  873|  12.0k|        goto err;
  874|       |
  875|   295k|    elem.query = prop_query;
  876|   295k|    elem.provider = prov;
  877|   295k|    r = lh_QUERY_retrieve(alg->cache, &elem);
  878|   295k|    if (r == NULL)
  ------------------
  |  Branch (878:9): [True: 24.9k, False: 270k]
  ------------------
  879|  24.9k|        goto err;
  880|   270k|    if (ossl_method_up_ref(&r->method)) {
  ------------------
  |  Branch (880:9): [True: 270k, False: 0]
  ------------------
  881|   270k|        *method = r->method.method;
  882|   270k|        res = 1;
  883|   270k|    }
  884|   307k|err:
  885|   307k|    ossl_property_unlock(store);
  886|   307k|    return res;
  887|   270k|}
ossl_method_store_cache_set:
  893|  25.0k|{
  894|  25.0k|    QUERY elem, *old, *p = NULL;
  895|  25.0k|    ALGORITHM *alg;
  896|  25.0k|    size_t len;
  897|  25.0k|    int res = 1;
  898|       |
  899|  25.0k|    if (nid <= 0 || store == NULL || prop_query == NULL)
  ------------------
  |  Branch (899:9): [True: 0, False: 25.0k]
  |  Branch (899:21): [True: 0, False: 25.0k]
  |  Branch (899:38): [True: 0, False: 25.0k]
  ------------------
  900|      0|        return 0;
  901|       |
  902|  25.0k|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|  25.0k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  25.0k|    __FILE__, __LINE__)
  ------------------
  |  Branch (902:9): [True: 0, False: 25.0k]
  ------------------
  903|      0|        return 0;
  904|       |
  905|  25.0k|    if (!ossl_property_write_lock(store))
  ------------------
  |  Branch (905:9): [True: 0, False: 25.0k]
  ------------------
  906|      0|        return 0;
  907|  25.0k|    if (store->cache_need_flush)
  ------------------
  |  Branch (907:9): [True: 0, False: 25.0k]
  ------------------
  908|      0|        ossl_method_cache_flush_some(store);
  909|  25.0k|    alg = ossl_method_store_retrieve(store, nid);
  910|  25.0k|    if (alg == NULL)
  ------------------
  |  Branch (910:9): [True: 0, False: 25.0k]
  ------------------
  911|      0|        goto err;
  912|       |
  913|  25.0k|    if (method == NULL) {
  ------------------
  |  Branch (913:9): [True: 0, False: 25.0k]
  ------------------
  914|      0|        elem.query = prop_query;
  915|      0|        elem.provider = prov;
  916|      0|        if ((old = lh_QUERY_delete(alg->cache, &elem)) != NULL) {
  ------------------
  |  Branch (916:13): [True: 0, False: 0]
  ------------------
  917|      0|            impl_cache_free(old);
  918|      0|            store->cache_nelem--;
  919|      0|        }
  920|      0|        goto end;
  921|      0|    }
  922|  25.0k|    p = OPENSSL_malloc(sizeof(*p) + (len = strlen(prop_query)));
  ------------------
  |  |  106|  25.0k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  923|  25.0k|    if (p != NULL) {
  ------------------
  |  Branch (923:9): [True: 25.0k, False: 0]
  ------------------
  924|  25.0k|        p->query = p->body;
  925|  25.0k|        p->provider = prov;
  926|  25.0k|        p->method.method = method;
  927|  25.0k|        p->method.up_ref = method_up_ref;
  928|  25.0k|        p->method.free = method_destruct;
  929|  25.0k|        if (!ossl_method_up_ref(&p->method))
  ------------------
  |  Branch (929:13): [True: 0, False: 25.0k]
  ------------------
  930|      0|            goto err;
  931|  25.0k|        memcpy((char *)p->query, prop_query, len + 1);
  932|  25.0k|        if ((old = lh_QUERY_insert(alg->cache, p)) != NULL) {
  ------------------
  |  Branch (932:13): [True: 0, False: 25.0k]
  ------------------
  933|      0|            impl_cache_free(old);
  934|      0|            goto end;
  935|      0|        }
  936|  25.0k|        if (!lh_QUERY_error(alg->cache)) {
  ------------------
  |  Branch (936:13): [True: 25.0k, False: 0]
  ------------------
  937|  25.0k|            if (++store->cache_nelem >= IMPL_CACHE_FLUSH_THRESHOLD)
  ------------------
  |  |   34|  25.0k|#define IMPL_CACHE_FLUSH_THRESHOLD 500
  ------------------
  |  Branch (937:17): [True: 0, False: 25.0k]
  ------------------
  938|      0|                store->cache_need_flush = 1;
  939|  25.0k|            goto end;
  940|  25.0k|        }
  941|      0|        ossl_method_free(&p->method);
  942|      0|    }
  943|      0|err:
  944|      0|    res = 0;
  945|      0|    OPENSSL_free(p);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  946|  25.0k|end:
  947|  25.0k|    ossl_property_unlock(store);
  948|  25.0k|    return res;
  949|      0|}
property.c:alg_cleanup:
  226|   141k|{
  227|   141k|    OSSL_METHOD_STORE *store = arg;
  228|       |
  229|   141k|    if (a != NULL) {
  ------------------
  |  Branch (229:9): [True: 141k, False: 0]
  ------------------
  230|   141k|        sk_IMPLEMENTATION_pop_free(a->impls, &impl_free);
  231|   141k|        lh_QUERY_doall(a->cache, &impl_cache_free);
  232|   141k|        lh_QUERY_free(a->cache);
  233|   141k|        OPENSSL_free(a);
  ------------------
  |  |  131|   141k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  234|   141k|    }
  235|   141k|    if (store != NULL)
  ------------------
  |  Branch (235:9): [True: 141k, False: 0]
  ------------------
  236|   141k|        ossl_sa_ALGORITHM_set(store->algs, idx, NULL);
  237|   141k|}
property.c:ossl_method_up_ref:
  163|   462k|{
  164|   462k|    return (*method->up_ref)(method->method);
  165|   462k|}
property.c:ossl_property_write_lock:
  178|   167k|{
  179|   167k|    return p != NULL ? CRYPTO_THREAD_write_lock(p->lock) : 0;
  ------------------
  |  Branch (179:12): [True: 167k, False: 0]
  ------------------
  180|   167k|}
property.c:impl_free:
  204|   141k|{
  205|   141k|    if (impl != NULL) {
  ------------------
  |  Branch (205:9): [True: 141k, False: 0]
  ------------------
  206|   141k|        ossl_method_free(&impl->method);
  207|   141k|        OPENSSL_free(impl);
  ------------------
  |  |  131|   141k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|   141k|    }
  209|   141k|}
property.c:ossl_method_store_retrieve:
  283|   653k|{
  284|   653k|    return ossl_sa_ALGORITHM_get(store->algs, nid);
  285|   653k|}
property.c:query_hash:
  188|   320k|{
  189|   320k|    return OPENSSL_LH_strhash(a->query);
  190|   320k|}
property.c:query_cmp:
  193|   270k|{
  194|   270k|    int res = strcmp(a->query, b->query);
  195|       |
  196|   270k|    if (res == 0 && a->provider != NULL && b->provider != NULL)
  ------------------
  |  Branch (196:9): [True: 270k, False: 8]
  |  Branch (196:21): [True: 270k, False: 0]
  |  Branch (196:44): [True: 2.00k, False: 268k]
  ------------------
  197|  2.00k|        res = b->provider > a->provider ? 1
  ------------------
  |  Branch (197:15): [True: 0, False: 2.00k]
  ------------------
  198|  2.00k|            : b->provider < a->provider ? -1
  ------------------
  |  Branch (198:15): [True: 0, False: 2.00k]
  ------------------
  199|  2.00k|                                        : 0;
  200|   270k|    return res;
  201|   270k|}
property.c:ossl_method_store_insert:
  288|   141k|{
  289|   141k|    return ossl_sa_ALGORITHM_set(store->algs, alg->nid, alg);
  290|   141k|}
property.c:ossl_property_unlock:
  183|   512k|{
  184|   512k|    return p != 0 ? CRYPTO_THREAD_unlock(p->lock) : 0;
  ------------------
  |  Branch (184:12): [True: 512k, False: 0]
  ------------------
  185|   512k|}
property.c:alg_cleanup_by_provider:
  494|  20.3k|{
  495|  20.3k|    struct alg_cleanup_by_provider_data_st *data = arg;
  496|  20.3k|    int i, count;
  497|       |
  498|       |    /*
  499|       |     * We walk the stack backwards, to avoid having to deal with stack shifts
  500|       |     * caused by deletion
  501|       |     */
  502|  40.6k|    for (count = 0, i = sk_IMPLEMENTATION_num(alg->impls); i-- > 0;) {
  ------------------
  |  Branch (502:60): [True: 20.3k, False: 20.3k]
  ------------------
  503|  20.3k|        IMPLEMENTATION *impl = sk_IMPLEMENTATION_value(alg->impls, i);
  504|       |
  505|  20.3k|        if (impl->provider == data->prov) {
  ------------------
  |  Branch (505:13): [True: 53, False: 20.3k]
  ------------------
  506|     53|#ifndef FIPS_MODULE
  507|     53|            OSSL_TRACE_BEGIN(QUERY)
  ------------------
  |  |  221|     53|    do {                           \
  |  |  222|     53|        BIO *trc_out = NULL;       \
  |  |  223|     53|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 53]
  |  |  ------------------
  ------------------
  508|      0|            {
  509|      0|                char buf[512];
  510|      0|                size_t size;
  511|       |
  512|      0|                size = ossl_property_list_to_string(NULL, impl->properties, buf,
  513|      0|                    sizeof(buf));
  514|      0|                BIO_printf(trc_out, "Removing implementation from "
  515|      0|                                    "query cache\nproperties %s\nprovider %s\n",
  516|      0|                    size == 0 ? "none" : buf,
  ------------------
  |  Branch (516:21): [True: 0, False: 0]
  ------------------
  517|      0|                    ossl_provider_name(impl->provider) == NULL ? "none" : ossl_provider_name(impl->provider));
  ------------------
  |  Branch (517:21): [True: 0, False: 0]
  ------------------
  518|      0|            }
  519|     53|            OSSL_TRACE_END(QUERY);
  ------------------
  |  |  226|     53|    }                            \
  |  |  227|     53|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 53]
  |  |  ------------------
  ------------------
  520|     53|#endif
  521|       |
  522|     53|            (void)sk_IMPLEMENTATION_delete(alg->impls, i);
  523|     53|            count++;
  524|     53|            impl_free(impl);
  525|     53|        }
  526|  20.3k|    }
  527|       |
  528|       |    /*
  529|       |     * If we removed any implementation, we also clear the whole associated
  530|       |     * cache, 'cause that's the sensible thing to do.
  531|       |     * There's no point flushing the cache entries where we didn't remove
  532|       |     * any implementation, though.
  533|       |     */
  534|  20.3k|    if (count > 0)
  ------------------
  |  Branch (534:9): [True: 53, False: 20.2k]
  ------------------
  535|     53|        ossl_method_cache_flush_alg(data->store, alg);
  536|  20.3k|}
property.c:ossl_method_cache_flush_alg:
  762|    152|{
  763|    152|    store->cache_nelem -= lh_QUERY_num_items(alg->cache);
  764|    152|    impl_cache_flush_alg(0, alg);
  765|    152|}
property.c:ossl_property_read_lock:
  173|   345k|{
  174|   345k|    return p != NULL ? CRYPTO_THREAD_read_lock(p->lock) : 0;
  ------------------
  |  Branch (174:12): [True: 345k, False: 0]
  ------------------
  175|   345k|}
property.c:alg_copy:
  560|    656|{
  561|    656|    STACK_OF(ALGORITHM) *newalg = arg;
  ------------------
  |  |   33|    656|#define STACK_OF(type) struct stack_st_##type
  ------------------
  562|       |
  563|    656|    alg = OPENSSL_memdup(alg, sizeof(ALGORITHM));
  ------------------
  |  |  133|    656|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  564|    656|    if (alg == NULL)
  ------------------
  |  Branch (564:9): [True: 0, False: 656]
  ------------------
  565|      0|        return;
  566|       |
  567|    656|    alg->impls = sk_IMPLEMENTATION_dup(alg->impls);
  568|       |
  569|    656|    (void)sk_ALGORITHM_push(newalg, alg);
  570|    656|}
property.c:alg_do_one:
  555|    840|{
  556|    840|    fn(alg->nid, impl->method.method, fnarg);
  557|    840|}
property.c:del_tmpalg:
  573|    656|{
  574|    656|    sk_IMPLEMENTATION_free(alg->impls);
  575|    656|    OPENSSL_free(alg);
  ------------------
  |  |  131|    656|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  576|    656|}
property.c:ossl_method_cache_flush:
  768|   141k|{
  769|   141k|    ALGORITHM *alg = ossl_method_store_retrieve(store, nid);
  770|       |
  771|   141k|    if (alg != NULL)
  ------------------
  |  Branch (771:9): [True: 99, False: 141k]
  ------------------
  772|     99|        ossl_method_cache_flush_alg(store, alg);
  773|   141k|}
property.c:impl_cache_flush_alg:
  220|    152|{
  221|    152|    lh_QUERY_doall(alg->cache, &impl_cache_free);
  222|    152|    lh_QUERY_flush(alg->cache);
  223|    152|}
property.c:impl_cache_free:
  212|  25.0k|{
  213|  25.0k|    if (elem != NULL) {
  ------------------
  |  Branch (213:9): [True: 25.0k, False: 0]
  ------------------
  214|  25.0k|        ossl_method_free(&elem->method);
  215|  25.0k|        OPENSSL_free(elem);
  ------------------
  |  |  131|  25.0k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  216|  25.0k|    }
  217|  25.0k|}
property.c:ossl_method_free:
  168|   166k|{
  169|   166k|    (*method->free)(method->method);
  170|   166k|}

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

ossl_parse_property:
  346|    672|{
  347|    672|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  348|    672|    OSSL_PROPERTY_LIST *res = NULL;
  349|    672|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|    672|#define STACK_OF(type) struct stack_st_##type
  ------------------
  350|    672|    const char *s = defn;
  351|    672|    int done;
  352|       |
  353|    672|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (353:9): [True: 0, False: 672]
  |  Branch (353:22): [True: 0, False: 672]
  ------------------
  354|      0|        return NULL;
  355|       |
  356|    672|    s = skip_space(s);
  357|    672|    done = *s == '\0';
  358|  1.60k|    while (!done) {
  ------------------
  |  Branch (358:12): [True: 937, False: 672]
  ------------------
  359|    937|        const char *start = s;
  360|       |
  361|    937|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  106|    937|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|    937|        if (prop == NULL)
  ------------------
  |  Branch (362:13): [True: 0, False: 937]
  ------------------
  363|      0|            goto err;
  364|    937|        memset(&prop->v, 0, sizeof(prop->v));
  365|    937|        prop->optional = 0;
  366|    937|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (366:13): [True: 0, False: 937]
  ------------------
  367|      0|            goto err;
  368|    937|        prop->oper = OSSL_PROPERTY_OPER_EQ;
  369|    937|        if (prop->name_idx == 0) {
  ------------------
  |  Branch (369:13): [True: 0, False: 937]
  ------------------
  370|      0|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|      0|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|      0|#define PROP_R_PARSE_FAILED 108
  ------------------
  371|      0|                "Unknown name HERE-->%s", start);
  372|      0|            goto err;
  373|      0|        }
  374|    937|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (374:13): [True: 937, False: 0]
  ------------------
  375|    937|            if (!parse_value(ctx, &s, prop, 1)) {
  ------------------
  |  Branch (375:17): [True: 0, False: 937]
  ------------------
  376|      0|                ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |  118|      0|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
  ------------------
  |  |   34|      0|#define PROP_R_NO_VALUE 107
  ------------------
  377|      0|                    "HERE-->%s", start);
  378|      0|                goto err;
  379|      0|            }
  380|    937|        } else {
  381|       |            /* A name alone means a true Boolean */
  382|      0|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  383|      0|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|      0|#define OSSL_PROPERTY_TRUE 1
  ------------------
  384|      0|        }
  385|       |
  386|    937|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (386:13): [True: 0, False: 937]
  ------------------
  387|      0|            goto err;
  388|    937|        prop = NULL;
  389|    937|        done = !match_ch(&s, ',');
  390|    937|    }
  391|    672|    if (*s != '\0') {
  ------------------
  |  Branch (391:9): [True: 0, False: 672]
  ------------------
  392|      0|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  118|      0|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|      0|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  393|      0|            "HERE-->%s", s);
  394|      0|        goto err;
  395|      0|    }
  396|    672|    res = stack_to_property_list(ctx, sk);
  397|       |
  398|    672|err:
  399|    672|    OPENSSL_free(prop);
  ------------------
  |  |  131|    672|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  400|    672|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  401|    672|    return res;
  402|    672|}
ossl_parse_query:
  406|  27.5k|{
  407|  27.5k|    STACK_OF(OSSL_PROPERTY_DEFINITION) *sk;
  ------------------
  |  |   33|  27.5k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  408|  27.5k|    OSSL_PROPERTY_LIST *res = NULL;
  409|  27.5k|    OSSL_PROPERTY_DEFINITION *prop = NULL;
  410|  27.5k|    int done;
  411|       |
  412|  27.5k|    if (s == NULL || (sk = sk_OSSL_PROPERTY_DEFINITION_new(&pd_compare)) == NULL)
  ------------------
  |  Branch (412:9): [True: 0, False: 27.5k]
  |  Branch (412:22): [True: 0, False: 27.5k]
  ------------------
  413|      0|        return NULL;
  414|       |
  415|  27.5k|    s = skip_space(s);
  416|  27.5k|    done = *s == '\0';
  417|   613k|    while (!done) {
  ------------------
  |  Branch (417:12): [True: 589k, False: 24.2k]
  ------------------
  418|   589k|        prop = OPENSSL_malloc(sizeof(*prop));
  ------------------
  |  |  106|   589k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  419|   589k|        if (prop == NULL)
  ------------------
  |  Branch (419:13): [True: 0, False: 589k]
  ------------------
  420|      0|            goto err;
  421|   589k|        memset(&prop->v, 0, sizeof(prop->v));
  422|       |
  423|   589k|        if (match_ch(&s, '-')) {
  ------------------
  |  Branch (423:13): [True: 55.0k, False: 534k]
  ------------------
  424|  55.0k|            prop->oper = OSSL_PROPERTY_OVERRIDE;
  425|  55.0k|            prop->optional = 0;
  426|  55.0k|            if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (426:17): [True: 287, False: 54.7k]
  ------------------
  427|    287|                goto err;
  428|  54.7k|            goto skip_value;
  429|  55.0k|        }
  430|   534k|        prop->optional = match_ch(&s, '?');
  431|   534k|        if (!parse_name(ctx, &s, 1, &prop->name_idx))
  ------------------
  |  Branch (431:13): [True: 3.07k, False: 531k]
  ------------------
  432|  3.07k|            goto err;
  433|       |
  434|   531k|        if (match_ch(&s, '=')) {
  ------------------
  |  Branch (434:13): [True: 128k, False: 402k]
  ------------------
  435|   128k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  436|   402k|        } else if (MATCH(&s, "!=")) {
  ------------------
  |  |   43|   402k|#define MATCH(s, m) match(s, m, sizeof(m) - 1)
  |  |  ------------------
  |  |  |  Branch (43:21): [True: 5.10k, False: 397k]
  |  |  ------------------
  ------------------
  437|  5.10k|            prop->oper = OSSL_PROPERTY_OPER_NE;
  438|   397k|        } else {
  439|       |            /* A name alone is a Boolean comparison for true */
  440|   397k|            prop->oper = OSSL_PROPERTY_OPER_EQ;
  441|   397k|            prop->type = OSSL_PROPERTY_TYPE_STRING;
  442|   397k|            prop->v.str_val = OSSL_PROPERTY_TRUE;
  ------------------
  |  |   39|   397k|#define OSSL_PROPERTY_TRUE 1
  ------------------
  443|   397k|            goto skip_value;
  444|   397k|        }
  445|   133k|        if (!parse_value(ctx, &s, prop, create_values))
  ------------------
  |  Branch (445:13): [True: 59.0k, False: 74.3k]
  ------------------
  446|  59.0k|            prop->type = OSSL_PROPERTY_TYPE_VALUE_UNDEFINED;
  447|       |
  448|   585k|    skip_value:
  449|   585k|        if (!sk_OSSL_PROPERTY_DEFINITION_push(sk, prop))
  ------------------
  |  Branch (449:13): [True: 0, False: 585k]
  ------------------
  450|      0|            goto err;
  451|   585k|        prop = NULL;
  452|   585k|        done = !match_ch(&s, ',');
  453|   585k|    }
  454|  24.2k|    if (*s != '\0') {
  ------------------
  |  Branch (454:9): [True: 13.6k, False: 10.5k]
  ------------------
  455|  13.6k|        ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  406|  13.6k|    (ERR_new(),                                                  \
  |  |  407|  13.6k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  13.6k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  13.6k|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |  118|  13.6k|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
  ------------------
  |  |   37|  13.6k|#define PROP_R_TRAILING_CHARACTERS 110
  ------------------
  456|  13.6k|            "HERE-->%s", s);
  457|  13.6k|        goto err;
  458|  13.6k|    }
  459|  10.5k|    res = stack_to_property_list(ctx, sk);
  460|       |
  461|  27.5k|err:
  462|  27.5k|    OPENSSL_free(prop);
  ------------------
  |  |  131|  27.5k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  463|  27.5k|    sk_OSSL_PROPERTY_DEFINITION_pop_free(sk, &pd_free);
  464|  27.5k|    return res;
  465|  10.5k|}
ossl_property_match_count:
  473|  7.64k|{
  474|  7.64k|    const OSSL_PROPERTY_DEFINITION *const q = query->properties;
  475|  7.64k|    const OSSL_PROPERTY_DEFINITION *const d = defn->properties;
  476|  7.64k|    int i = 0, j = 0, matches = 0;
  477|  7.64k|    OSSL_PROPERTY_OPER oper;
  478|       |
  479|  9.85k|    while (i < query->num_properties) {
  ------------------
  |  Branch (479:12): [True: 4.70k, False: 5.15k]
  ------------------
  480|  4.70k|        if ((oper = q[i].oper) == OSSL_PROPERTY_OVERRIDE) {
  ------------------
  |  Branch (480:13): [True: 130, False: 4.57k]
  ------------------
  481|    130|            i++;
  482|    130|            continue;
  483|    130|        }
  484|  4.57k|        if (j < defn->num_properties) {
  ------------------
  |  Branch (484:13): [True: 3.06k, False: 1.51k]
  ------------------
  485|  3.06k|            if (q[i].name_idx > d[j].name_idx) { /* skip defn, not in query */
  ------------------
  |  Branch (485:17): [True: 890, False: 2.17k]
  ------------------
  486|    890|                j++;
  487|    890|                continue;
  488|    890|            }
  489|  2.17k|            if (q[i].name_idx == d[j].name_idx) { /* both in defn and query */
  ------------------
  |  Branch (489:17): [True: 0, False: 2.17k]
  ------------------
  490|      0|                const int eq = q[i].type == d[j].type
  ------------------
  |  Branch (490:32): [True: 0, False: 0]
  ------------------
  491|      0|                    && memcmp(&q[i].v, &d[j].v, sizeof(q[i].v)) == 0;
  ------------------
  |  Branch (491:24): [True: 0, False: 0]
  ------------------
  492|       |
  493|      0|                if ((eq && oper == OSSL_PROPERTY_OPER_EQ)
  ------------------
  |  Branch (493:22): [True: 0, False: 0]
  |  Branch (493:28): [True: 0, False: 0]
  ------------------
  494|      0|                    || (!eq && oper == OSSL_PROPERTY_OPER_NE))
  ------------------
  |  Branch (494:25): [True: 0, False: 0]
  |  Branch (494:32): [True: 0, False: 0]
  ------------------
  495|      0|                    matches++;
  496|      0|                else if (!q[i].optional)
  ------------------
  |  Branch (496:26): [True: 0, False: 0]
  ------------------
  497|      0|                    return -1;
  498|      0|                i++;
  499|      0|                j++;
  500|      0|                continue;
  501|      0|            }
  502|  2.17k|        }
  503|       |
  504|       |        /*
  505|       |         * Handle the cases of a missing value and a query with no corresponding
  506|       |         * definition.  The former fails for any comparison except inequality,
  507|       |         * the latter is treated as a comparison against the Boolean false.
  508|       |         */
  509|  3.68k|        if (q[i].type == OSSL_PROPERTY_TYPE_VALUE_UNDEFINED) {
  ------------------
  |  Branch (509:13): [True: 1.82k, False: 1.86k]
  ------------------
  510|  1.82k|            if (oper == OSSL_PROPERTY_OPER_NE)
  ------------------
  |  Branch (510:17): [True: 712, False: 1.10k]
  ------------------
  511|    712|                matches++;
  512|  1.10k|            else if (!q[i].optional)
  ------------------
  |  Branch (512:22): [True: 1.06k, False: 41]
  ------------------
  513|  1.06k|                return -1;
  514|  1.86k|        } else if (q[i].type != OSSL_PROPERTY_TYPE_STRING
  ------------------
  |  Branch (514:20): [True: 267, False: 1.59k]
  ------------------
  515|  1.59k|            || (oper == OSSL_PROPERTY_OPER_EQ
  ------------------
  |  Branch (515:17): [True: 1.55k, False: 41]
  ------------------
  516|  1.55k|                && q[i].v.str_val != OSSL_PROPERTY_FALSE)
  ------------------
  |  |   40|  1.55k|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (516:20): [True: 1.55k, False: 0]
  ------------------
  517|     41|            || (oper == OSSL_PROPERTY_OPER_NE
  ------------------
  |  Branch (517:17): [True: 41, False: 0]
  ------------------
  518|  1.82k|                && q[i].v.str_val == OSSL_PROPERTY_FALSE)) {
  ------------------
  |  |   40|     41|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (518:20): [True: 0, False: 41]
  ------------------
  519|  1.82k|            if (!q[i].optional)
  ------------------
  |  Branch (519:17): [True: 1.42k, False: 397]
  ------------------
  520|  1.42k|                return -1;
  521|  1.82k|        } else {
  522|     41|            matches++;
  523|     41|        }
  524|  1.19k|        i++;
  525|  1.19k|    }
  526|  5.15k|    return matches;
  527|  7.64k|}
ossl_property_free:
  530|  28.9k|{
  531|  28.9k|    OPENSSL_free(p);
  ------------------
  |  |  131|  28.9k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  532|  28.9k|}
ossl_property_parse_init:
  575|    695|{
  576|    695|    static const char *const predefined_names[] = {
  577|    695|        "provider", /* Name of provider (default, legacy, fips) */
  578|    695|        "version", /* Version number of this provider */
  579|    695|        "fips", /* FIPS validated or FIPS supporting algorithm */
  580|    695|        "output", /* Output type for encoders */
  581|    695|        "input", /* Input type for decoders */
  582|    695|        "structure", /* Structure name for encoders and decoders */
  583|    695|    };
  584|    695|    size_t i;
  585|       |
  586|  4.86k|    for (i = 0; i < OSSL_NELEM(predefined_names); i++)
  ------------------
  |  |   14|  4.86k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (586:17): [True: 4.17k, False: 695]
  ------------------
  587|  4.17k|        if (ossl_property_name(ctx, predefined_names[i], 1) == 0)
  ------------------
  |  Branch (587:13): [True: 0, False: 4.17k]
  ------------------
  588|      0|            goto err;
  589|       |
  590|       |    /*
  591|       |     * Pre-populate the two Boolean values. We must do them before any other
  592|       |     * values and in this order so that we get the same index as the global
  593|       |     * OSSL_PROPERTY_TRUE and OSSL_PROPERTY_FALSE values
  594|       |     */
  595|    695|    if ((ossl_property_value(ctx, "yes", 1) != OSSL_PROPERTY_TRUE)
  ------------------
  |  |   39|    695|#define OSSL_PROPERTY_TRUE 1
  ------------------
  |  Branch (595:9): [True: 0, False: 695]
  ------------------
  596|    695|        || (ossl_property_value(ctx, "no", 1) != OSSL_PROPERTY_FALSE))
  ------------------
  |  |   40|    695|#define OSSL_PROPERTY_FALSE 2
  ------------------
  |  Branch (596:12): [True: 0, False: 695]
  ------------------
  597|      0|        goto err;
  598|       |
  599|    695|    return 1;
  600|      0|err:
  601|      0|    return 0;
  602|    695|}
property_parse.c:pd_compare:
  289|   642k|{
  290|   642k|    const OSSL_PROPERTY_DEFINITION *pd1 = *p1;
  291|   642k|    const OSSL_PROPERTY_DEFINITION *pd2 = *p2;
  292|       |
  293|   642k|    if (pd1->name_idx < pd2->name_idx)
  ------------------
  |  Branch (293:9): [True: 84.0k, False: 558k]
  ------------------
  294|  84.0k|        return -1;
  295|   558k|    if (pd1->name_idx > pd2->name_idx)
  ------------------
  |  Branch (295:9): [True: 201k, False: 356k]
  ------------------
  296|   201k|        return 1;
  297|   356k|    return 0;
  298|   558k|}
property_parse.c:skip_space:
   26|  1.49M|{
   27|  1.86M|    while (ossl_isspace(*s))
  ------------------
  |  |   82|  1.86M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.86M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 375k, False: 1.49M]
  |  |  ------------------
  ------------------
   28|   375k|        s++;
   29|  1.49M|    return s;
   30|  1.49M|}
property_parse.c:parse_name:
   58|   590k|{
   59|   590k|    char name[100];
   60|   590k|    int err = 0;
   61|   590k|    size_t i = 0;
   62|   590k|    const char *s = *t;
   63|   590k|    int user_name = 0;
   64|       |
   65|   774k|    for (;;) {
   66|   774k|        if (!ossl_isalpha(*s)) {
  ------------------
  |  |   71|   774k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|   774k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|   774k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|   774k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (66:13): [True: 2.87k, False: 771k]
  ------------------
   67|  2.87k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  406|  2.87k|    (ERR_new(),                                                  \
  |  |  407|  2.87k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  2.87k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  2.87k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |  118|  2.87k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
  ------------------
  |  |   30|  2.87k|#define PROP_R_NOT_AN_IDENTIFIER 103
  ------------------
   68|  2.87k|                "HERE-->%s", *t);
   69|  2.87k|            return 0;
   70|  2.87k|        }
   71|  3.36M|        do {
   72|  3.36M|            if (i < sizeof(name) - 1)
  ------------------
  |  Branch (72:17): [True: 3.32M, False: 40.5k]
  ------------------
   73|  3.32M|                name[i++] = ossl_tolower(*s);
   74|  40.5k|            else
   75|  40.5k|                err = 1;
   76|  3.36M|        } while (*++s == '_' || ossl_isalnum(*s));
  ------------------
  |  |   70|  3.34M|#define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum))
  |  |  ------------------
  |  |  |  |   41|  3.34M|#define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|  3.34M|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|  3.34M|#define CTYPE_MASK_lower 0x1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   28|  3.34M|#define CTYPE_MASK_upper 0x2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit)
  |  |  |  |  ------------------
  |  |  |  |  |  |   29|  3.34M|#define CTYPE_MASK_digit 0x4
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (70:25): [True: 2.56M, False: 771k]
  |  |  ------------------
  ------------------
  |  Branch (76:18): [True: 19.6k, False: 3.34M]
  ------------------
   77|   771k|        if (*s != '.')
  ------------------
  |  Branch (77:13): [True: 587k, False: 184k]
  ------------------
   78|   587k|            break;
   79|   184k|        user_name = 1;
   80|   184k|        if (i < sizeof(name) - 1)
  ------------------
  |  Branch (80:13): [True: 183k, False: 533]
  ------------------
   81|   183k|            name[i++] = *s;
   82|    533|        else
   83|    533|            err = 1;
   84|   184k|        s++;
   85|   184k|    }
   86|   587k|    name[i] = '\0';
   87|   587k|    if (err) {
  ------------------
  |  Branch (87:9): [True: 492, False: 586k]
  ------------------
   88|    492|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  406|    492|    (ERR_new(),                                                  \
  |  |  407|    492|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    492|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    492|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  118|    492|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   27|    492|#define PROP_R_NAME_TOO_LONG 100
  ------------------
   89|    492|        return 0;
   90|    492|    }
   91|   586k|    *t = skip_space(s);
   92|   586k|    *idx = ossl_property_name(ctx, name, user_name && create);
  ------------------
  |  Branch (92:42): [True: 125k, False: 460k]
  |  Branch (92:55): [True: 125k, False: 0]
  ------------------
   93|   586k|    return 1;
   94|   587k|}
property_parse.c:match_ch:
   33|  2.24M|{
   34|  2.24M|    const char *s = *t;
   35|       |
   36|  2.24M|    if (*s == m) {
  ------------------
  |  Branch (36:9): [True: 760k, False: 1.48M]
  ------------------
   37|   760k|        *t = skip_space(s + 1);
   38|   760k|        return 1;
   39|   760k|    }
   40|  1.48M|    return 0;
   41|  2.24M|}
property_parse.c:parse_value:
  258|   134k|{
  259|   134k|    const char *s = *t;
  260|   134k|    int r = 0;
  261|       |
  262|   134k|    if (*s == '"' || *s == '\'') {
  ------------------
  |  Branch (262:9): [True: 41, False: 134k]
  |  Branch (262:22): [True: 1.15k, False: 133k]
  ------------------
  263|  1.19k|        s++;
  264|  1.19k|        r = parse_string(ctx, &s, s[-1], res, create);
  265|   133k|    } else if (*s == '+') {
  ------------------
  |  Branch (265:16): [True: 615, False: 132k]
  ------------------
  266|    615|        s++;
  267|    615|        r = parse_number(&s, res);
  268|   132k|    } else if (*s == '-') {
  ------------------
  |  Branch (268:16): [True: 26.8k, False: 105k]
  ------------------
  269|  26.8k|        s++;
  270|  26.8k|        r = parse_number(&s, res);
  271|  26.8k|        res->v.int_val = -res->v.int_val;
  272|   105k|    } else if (*s == '0' && s[1] == 'x') {
  ------------------
  |  Branch (272:16): [True: 33.0k, False: 72.5k]
  |  Branch (272:29): [True: 4.93k, False: 28.0k]
  ------------------
  273|  4.93k|        s += 2;
  274|  4.93k|        r = parse_hex(&s, res);
  275|   100k|    } else if (*s == '0' && ossl_isdigit(s[1])) {
  ------------------
  |  Branch (275:16): [True: 28.0k, False: 72.5k]
  |  Branch (275:29): [True: 23.4k, False: 4.68k]
  ------------------
  276|  23.4k|        s++;
  277|  23.4k|        r = parse_oct(&s, res);
  278|  77.2k|    } else if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (278:16): [True: 23.6k, False: 53.5k]
  ------------------
  279|  23.6k|        return parse_number(t, res);
  280|  53.5k|    } else if (ossl_isalpha(*s))
  ------------------
  |  |   71|  53.5k|#define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha))
  |  |  ------------------
  |  |  |  |   40|  53.5k|#define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  53.5k|#define CTYPE_MASK_lower 0x1
  |  |  |  |  ------------------
  |  |  |  |               #define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  53.5k|#define CTYPE_MASK_upper 0x2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (71:25): [True: 38.0k, False: 15.4k]
  |  |  ------------------
  ------------------
  281|  38.0k|        return parse_unquoted(ctx, t, res, create);
  282|  72.5k|    if (r)
  ------------------
  |  Branch (282:9): [True: 51.1k, False: 21.4k]
  ------------------
  283|  51.1k|        *t = s;
  284|  72.5k|    return r;
  285|   134k|}
property_parse.c:parse_string:
  195|  1.19k|{
  196|  1.19k|    char v[1000];
  197|  1.19k|    const char *s = *t;
  198|  1.19k|    size_t i = 0;
  199|  1.19k|    int err = 0;
  200|       |
  201|   401k|    while (*s != '\0' && *s != delim) {
  ------------------
  |  Branch (201:12): [True: 401k, False: 574]
  |  Branch (201:26): [True: 400k, False: 622]
  ------------------
  202|   400k|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (202:13): [True: 395k, False: 5.37k]
  ------------------
  203|   395k|            v[i++] = *s;
  204|  5.37k|        else
  205|  5.37k|            err = 1;
  206|   400k|        s++;
  207|   400k|    }
  208|  1.19k|    if (*s == '\0') {
  ------------------
  |  Branch (208:9): [True: 574, False: 622]
  ------------------
  209|    574|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  406|    574|    (ERR_new(),                                                  \
  |  |  407|    574|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    574|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    574|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |  118|    574|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMITER,
  ------------------
  |  |   33|    574|#define PROP_R_NO_MATCHING_STRING_DELIMITER 106
  ------------------
  210|    574|            "HERE-->%c%s", delim, *t);
  211|    574|        return 0;
  212|    574|    }
  213|    622|    v[i] = '\0';
  214|    622|    if (err) {
  ------------------
  |  Branch (214:9): [True: 41, False: 581]
  ------------------
  215|     41|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  406|     41|    (ERR_new(),                                                  \
  |  |  407|     41|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     41|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|     41|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  118|     41|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|     41|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  216|    581|    } else {
  217|    581|        res->v.str_val = ossl_property_value(ctx, v, create);
  218|    581|    }
  219|    622|    *t = skip_space(s + 1);
  220|    622|    res->type = OSSL_PROPERTY_TYPE_STRING;
  221|    622|    return !err;
  222|  1.19k|}
property_parse.c:parse_number:
   97|  51.1k|{
   98|  51.1k|    const char *s = *t;
   99|  51.1k|    int64_t v = 0;
  100|       |
  101|   276k|    do {
  102|   276k|        if (!ossl_isdigit(*s)) {
  ------------------
  |  Branch (102:13): [True: 287, False: 276k]
  ------------------
  103|    287|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  406|    287|    (ERR_new(),                                                  \
  |  |  407|    287|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    287|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    287|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  118|    287|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|    287|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  104|    287|                "HERE-->%s", *t);
  105|    287|            return 0;
  106|    287|        }
  107|       |        /* overflow check */
  108|   276k|        if (v > ((INT64_MAX - (*s - '0')) / 10)) {
  ------------------
  |  Branch (108:13): [True: 328, False: 275k]
  ------------------
  109|    328|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|    328|    (ERR_new(),                                                  \
  |  |  407|    328|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    328|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    328|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|    328|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|    328|#define PROP_R_PARSE_FAILED 108
  ------------------
  110|    328|                "Property %s overflows", *t);
  111|    328|            return 0;
  112|    328|        }
  113|   275k|        v = v * 10 + (*s++ - '0');
  114|   275k|    } while (ossl_isdigit(*s));
  ------------------
  |  Branch (114:14): [True: 225k, False: 50.5k]
  ------------------
  115|  50.5k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|   101k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  50.5k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 34.3k, False: 16.1k]
  |  Branch (115:30): [True: 34.0k, False: 335]
  |  Branch (115:44): [True: 820, False: 33.2k]
  ------------------
  116|    820|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  406|    820|    (ERR_new(),                                                  \
  |  |  407|    820|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    820|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    820|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |  118|    820|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
  ------------------
  |  |   32|    820|#define PROP_R_NOT_A_DECIMAL_DIGIT 105
  ------------------
  117|    820|            "HERE-->%s", *t);
  118|    820|        return 0;
  119|    820|    }
  120|  49.7k|    *t = skip_space(s);
  121|  49.7k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  122|  49.7k|    res->v.int_val = v;
  123|  49.7k|    return 1;
  124|  50.5k|}
property_parse.c:parse_hex:
  127|  4.93k|{
  128|  4.93k|    const char *s = *t;
  129|  4.93k|    int64_t v = 0;
  130|  4.93k|    int sval;
  131|       |
  132|  81.0k|    do {
  133|  81.0k|        if (ossl_isdigit(*s)) {
  ------------------
  |  Branch (133:13): [True: 76.5k, False: 4.47k]
  ------------------
  134|  76.5k|            sval = *s - '0';
  135|  76.5k|        } else if (ossl_isxdigit(*s)) {
  ------------------
  |  |   83|  4.47k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  4.47k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 4.38k, False: 82]
  |  |  ------------------
  ------------------
  136|  4.38k|            sval = ossl_tolower(*s) - 'a' + 10;
  137|  4.38k|        } else {
  138|     82|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  406|     82|    (ERR_new(),                                                  \
  |  |  407|     82|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     82|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|     82|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  118|     82|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|     82|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  139|     82|                "%s", *t);
  140|     82|            return 0;
  141|     82|        }
  142|       |
  143|  80.9k|        if (v > ((INT64_MAX - sval) / 16)) {
  ------------------
  |  Branch (143:13): [True: 1.51k, False: 79.4k]
  ------------------
  144|  1.51k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  1.51k|    (ERR_new(),                                                  \
  |  |  407|  1.51k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  1.51k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  1.51k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  1.51k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  1.51k|#define PROP_R_PARSE_FAILED 108
  ------------------
  145|  1.51k|                "Property %s overflows", *t);
  146|  1.51k|            return 0;
  147|  1.51k|        }
  148|       |
  149|  79.4k|        v <<= 4;
  150|  79.4k|        v += sval;
  151|  79.4k|    } while (ossl_isxdigit(*++s));
  ------------------
  |  |   83|  79.4k|#define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit))
  |  |  ------------------
  |  |  |  |   31|  79.4k|#define CTYPE_MASK_xdigit 0x10
  |  |  ------------------
  |  |  |  Branch (83:26): [True: 76.1k, False: 3.33k]
  |  |  ------------------
  ------------------
  152|  3.33k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  6.67k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  3.33k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (152:9): [True: 2.82k, False: 506]
  |  Branch (152:30): [True: 2.78k, False: 41]
  |  Branch (152:44): [True: 492, False: 2.29k]
  ------------------
  153|    492|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  406|    492|    (ERR_new(),                                                  \
  |  |  407|    492|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    492|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    492|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |  118|    492|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
  ------------------
  |  |   29|    492|#define PROP_R_NOT_AN_HEXADECIMAL_DIGIT 102
  ------------------
  154|    492|            "HERE-->%s", *t);
  155|    492|        return 0;
  156|    492|    }
  157|  2.84k|    *t = skip_space(s);
  158|  2.84k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  159|  2.84k|    res->v.int_val = v;
  160|  2.84k|    return 1;
  161|  3.33k|}
property_parse.c:parse_oct:
  164|  23.4k|{
  165|  23.4k|    const char *s = *t;
  166|  23.4k|    int64_t v = 0;
  167|       |
  168|   190k|    do {
  169|   190k|        if (*s == '9' || *s == '8' || !ossl_isdigit(*s)) {
  ------------------
  |  Branch (169:13): [True: 41, False: 190k]
  |  Branch (169:26): [True: 41, False: 190k]
  |  Branch (169:39): [True: 0, False: 190k]
  ------------------
  170|     82|            ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  406|     82|    (ERR_new(),                                                  \
  |  |  407|     82|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     82|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|     82|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  118|     82|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|     82|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  171|     82|                "HERE-->%s", *t);
  172|     82|            return 0;
  173|     82|        }
  174|   190k|        if (v > ((INT64_MAX - (*s - '0')) / 8)) {
  ------------------
  |  Branch (174:13): [True: 1.39k, False: 188k]
  ------------------
  175|  1.39k|            ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  1.39k|    (ERR_new(),                                                  \
  |  |  407|  1.39k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  1.39k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  1.39k|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  1.39k|#define ERR_LIB_PROP 55
  ------------------
                          ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  1.39k|#define PROP_R_PARSE_FAILED 108
  ------------------
  176|  1.39k|                "Property %s overflows", *t);
  177|  1.39k|            return 0;
  178|  1.39k|        }
  179|       |
  180|   188k|        v = (v << 3) + (*s - '0');
  181|   188k|    } while (ossl_isdigit(*++s) && *s != '9' && *s != '8');
  ------------------
  |  Branch (181:14): [True: 166k, False: 21.8k]
  |  Branch (181:36): [True: 166k, False: 41]
  |  Branch (181:49): [True: 166k, False: 41]
  ------------------
  182|  21.9k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  43.8k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  21.9k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (182:9): [True: 17.7k, False: 4.22k]
  |  Branch (182:30): [True: 17.6k, False: 41]
  |  Branch (182:44): [True: 779, False: 16.8k]
  ------------------
  183|    779|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  406|    779|    (ERR_new(),                                                  \
  |  |  407|    779|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    779|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    779|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |  118|    779|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
  ------------------
  |  |   31|    779|#define PROP_R_NOT_AN_OCTAL_DIGIT 104
  ------------------
  184|    779|            "HERE-->%s", *t);
  185|    779|        return 0;
  186|    779|    }
  187|  21.1k|    *t = skip_space(s);
  188|  21.1k|    res->type = OSSL_PROPERTY_TYPE_NUMBER;
  189|  21.1k|    res->v.int_val = v;
  190|  21.1k|    return 1;
  191|  21.9k|}
property_parse.c:parse_unquoted:
  226|  38.0k|{
  227|  38.0k|    char v[1000];
  228|  38.0k|    const char *s = *t;
  229|  38.0k|    size_t i = 0;
  230|  38.0k|    int err = 0;
  231|       |
  232|  38.0k|    if (*s == '\0' || *s == ',')
  ------------------
  |  Branch (232:9): [True: 0, False: 38.0k]
  |  Branch (232:23): [True: 0, False: 38.0k]
  ------------------
  233|      0|        return 0;
  234|  1.16M|    while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   80|  2.33M|#define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print))
  |  |  ------------------
  |  |  |  |   35|  1.16M|#define CTYPE_MASK_print 0x100
  |  |  ------------------
  |  |  |  Branch (80:25): [True: 1.16M, False: 2.94k]
  |  |  ------------------
  ------------------
                  while (ossl_isprint(*s) && !ossl_isspace(*s) && *s != ',') {
  ------------------
  |  |   82|  2.33M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.16M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (234:32): [True: 1.16M, False: 2.95k]
  |  Branch (234:53): [True: 1.13M, False: 32.1k]
  ------------------
  235|  1.13M|        if (i < sizeof(v) - 1)
  ------------------
  |  Branch (235:13): [True: 1.12M, False: 7.50k]
  ------------------
  236|  1.12M|            v[i++] = ossl_tolower(*s);
  237|  7.50k|        else
  238|  7.50k|            err = 1;
  239|  1.13M|        s++;
  240|  1.13M|    }
  241|  38.0k|    if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
  ------------------
  |  |   82|  76.1k|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  38.0k|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  ------------------
  |  Branch (241:9): [True: 34.6k, False: 3.45k]
  |  Branch (241:30): [True: 32.8k, False: 1.79k]
  |  Branch (241:44): [True: 656, False: 32.1k]
  ------------------
  242|    656|        ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  406|    656|    (ERR_new(),                                                  \
  |  |  407|    656|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    656|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    656|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |  118|    656|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
  ------------------
  |  |   28|    656|#define PROP_R_NOT_AN_ASCII_CHARACTER 101
  ------------------
  243|    656|            "HERE-->%s", s);
  244|    656|        return 0;
  245|    656|    }
  246|  37.4k|    v[i] = 0;
  247|  37.4k|    if (err)
  ------------------
  |  Branch (247:9): [True: 356, False: 37.0k]
  ------------------
  248|    356|        ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  406|    356|    (ERR_new(),                                                  \
  |  |  407|    356|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    356|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    356|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |  118|    356|#define ERR_LIB_PROP 55
  ------------------
                      ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
  ------------------
  |  |   36|    356|#define PROP_R_STRING_TOO_LONG 109
  ------------------
  249|  37.0k|    else if ((res->v.str_val = ossl_property_value(ctx, v, create)) == 0)
  ------------------
  |  Branch (249:14): [True: 36.1k, False: 937]
  ------------------
  250|  36.1k|        err = 1;
  251|  37.4k|    *t = skip_space(s);
  252|  37.4k|    res->type = OSSL_PROPERTY_TYPE_STRING;
  253|  37.4k|    return !err;
  254|  38.0k|}
property_parse.c:stack_to_property_list:
  314|  11.1k|{
  315|  11.1k|    const int n = sk_OSSL_PROPERTY_DEFINITION_num(sk);
  316|  11.1k|    OSSL_PROPERTY_LIST *r;
  317|  11.1k|    OSSL_PROPERTY_IDX prev_name_idx = 0;
  318|  11.1k|    int i;
  319|       |
  320|  11.1k|    r = OPENSSL_malloc(sizeof(*r)
  ------------------
  |  |  106|  22.3k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |  |  Branch (106:19): [True: 4.99k, False: 6.19k]
  |  |  ------------------
  ------------------
  321|  11.1k|        + (n <= 0 ? 0 : n - 1) * sizeof(r->properties[0]));
  322|  11.1k|    if (r != NULL) {
  ------------------
  |  Branch (322:9): [True: 11.1k, False: 0]
  ------------------
  323|  11.1k|        sk_OSSL_PROPERTY_DEFINITION_sort(sk);
  324|       |
  325|  11.1k|        r->has_optional = 0;
  326|  19.6k|        for (i = 0; i < n; i++) {
  ------------------
  |  Branch (326:21): [True: 11.2k, False: 8.31k]
  ------------------
  327|  11.2k|            r->properties[i] = *sk_OSSL_PROPERTY_DEFINITION_value(sk, i);
  328|  11.2k|            r->has_optional |= r->properties[i].optional;
  329|       |
  330|       |            /* Check for duplicated names */
  331|  11.2k|            if (i > 0 && r->properties[i].name_idx == prev_name_idx) {
  ------------------
  |  Branch (331:17): [True: 5.09k, False: 6.19k]
  |  Branch (331:26): [True: 2.87k, False: 2.22k]
  ------------------
  332|  2.87k|                OPENSSL_free(r);
  ------------------
  |  |  131|  2.87k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  333|  2.87k|                ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  406|  2.87k|    (ERR_new(),                                                  \
  |  |  407|  2.87k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|  2.87k|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|  2.87k|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |  118|  2.87k|#define ERR_LIB_PROP 55
  ------------------
                              ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
  ------------------
  |  |   35|  2.87k|#define PROP_R_PARSE_FAILED 108
  ------------------
  334|  2.87k|                    "Duplicated name `%s'",
  335|  2.87k|                    ossl_property_name_str(ctx, prev_name_idx));
  336|  2.87k|                return NULL;
  337|  2.87k|            }
  338|  8.42k|            prev_name_idx = r->properties[i].name_idx;
  339|  8.42k|        }
  340|  8.31k|        r->num_properties = n;
  341|  8.31k|    }
  342|  8.31k|    return r;
  343|  11.1k|}
property_parse.c:pd_free:
  301|   586k|{
  302|   586k|    OPENSSL_free(pd);
  ------------------
  |  |  131|   586k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  303|   586k|}
property_parse.c:match:
   46|   402k|{
   47|   402k|    const char *s = *t;
   48|       |
   49|   402k|    if (OPENSSL_strncasecmp(s, m, m_len) == 0) {
  ------------------
  |  Branch (49:9): [True: 5.10k, False: 397k]
  ------------------
   50|  5.10k|        *t = skip_space(s + m_len);
   51|  5.10k|        return 1;
   52|  5.10k|    }
   53|   397k|    return 0;
   54|   402k|}

ossl_property_find_property:
   25|     34|{
   26|     34|    OSSL_PROPERTY_IDX name_idx;
   27|       |
   28|     34|    if (list == NULL || name == NULL
  ------------------
  |  Branch (28:9): [True: 0, False: 34]
  |  Branch (28:25): [True: 0, False: 34]
  ------------------
   29|     34|        || (name_idx = ossl_property_name(libctx, name, 0)) == 0)
  ------------------
  |  Branch (29:12): [True: 0, False: 34]
  ------------------
   30|      0|        return NULL;
   31|       |
   32|     34|    return ossl_bsearch(&name_idx, list->properties, list->num_properties,
   33|     34|        sizeof(*list->properties), &property_idx_cmp, 0);
   34|     34|}
ossl_property_get_string_value:
   43|     26|{
   44|     26|    const char *value = NULL;
   45|       |
   46|     26|    if (prop != NULL && prop->type == OSSL_PROPERTY_TYPE_STRING)
  ------------------
  |  Branch (46:9): [True: 26, False: 0]
  |  Branch (46:25): [True: 26, False: 0]
  ------------------
   47|     26|        value = ossl_property_value_str(libctx, prop->v.str_val);
   48|     26|    return value;
   49|     26|}
ossl_property_has_optional:
   62|  7.64k|{
   63|  7.64k|    return query->has_optional ? 1 : 0;
  ------------------
  |  Branch (63:12): [True: 260, False: 7.38k]
  ------------------
   64|  7.64k|}
property_query.c:property_idx_cmp:
   15|     59|{
   16|     59|    OSSL_PROPERTY_IDX key = *(const OSSL_PROPERTY_IDX *)keyp;
   17|     59|    const OSSL_PROPERTY_DEFINITION *defn = (const OSSL_PROPERTY_DEFINITION *)compare;
   18|       |
   19|     59|    return key - defn->name_idx;
   20|     59|}

ossl_property_string_data_free:
   77|    695|{
   78|    695|    PROPERTY_STRING_DATA *propdata = vpropdata;
   79|       |
   80|    695|    if (propdata == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 695]
  ------------------
   81|      0|        return;
   82|       |
   83|    695|    CRYPTO_THREAD_lock_free(propdata->lock);
   84|    695|    property_table_free(&propdata->prop_names);
   85|    695|    property_table_free(&propdata->prop_values);
   86|    695|#ifndef OPENSSL_SMALL_FOOTPRINT
   87|    695|    sk_OPENSSL_CSTRING_free(propdata->prop_namelist);
  ------------------
  |  |  264|    695|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   88|    695|    sk_OPENSSL_CSTRING_free(propdata->prop_valuelist);
  ------------------
  |  |  264|    695|#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
  ------------------
   89|    695|    propdata->prop_namelist = propdata->prop_valuelist = NULL;
   90|    695|#endif
   91|    695|    propdata->prop_name_idx = propdata->prop_value_idx = 0;
   92|       |
   93|    695|    OPENSSL_free(propdata);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|    695|}
ossl_property_string_data_new:
   97|    695|{
   98|    695|    PROPERTY_STRING_DATA *propdata = OPENSSL_zalloc(sizeof(*propdata));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|       |
  100|    695|    if (propdata == NULL)
  ------------------
  |  Branch (100:9): [True: 0, False: 695]
  ------------------
  101|      0|        return NULL;
  102|       |
  103|    695|    propdata->lock = CRYPTO_THREAD_lock_new();
  104|    695|    propdata->prop_names = lh_PROPERTY_STRING_new(&property_hash,
  105|    695|        &property_cmp);
  106|    695|    propdata->prop_values = lh_PROPERTY_STRING_new(&property_hash,
  107|    695|        &property_cmp);
  108|    695|#ifndef OPENSSL_SMALL_FOOTPRINT
  109|    695|    propdata->prop_namelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  261|    695|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
  ------------------
  110|    695|    propdata->prop_valuelist = sk_OPENSSL_CSTRING_new_null();
  ------------------
  |  |  261|    695|#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
  ------------------
  111|    695|#endif
  112|    695|    if (propdata->lock == NULL
  ------------------
  |  Branch (112:9): [True: 0, False: 695]
  ------------------
  113|    695|#ifndef OPENSSL_SMALL_FOOTPRINT
  114|    695|        || propdata->prop_namelist == NULL
  ------------------
  |  Branch (114:12): [True: 0, False: 695]
  ------------------
  115|    695|        || propdata->prop_valuelist == NULL
  ------------------
  |  Branch (115:12): [True: 0, False: 695]
  ------------------
  116|    695|#endif
  117|    695|        || propdata->prop_names == NULL
  ------------------
  |  Branch (117:12): [True: 0, False: 695]
  ------------------
  118|    695|        || propdata->prop_values == NULL) {
  ------------------
  |  Branch (118:12): [True: 0, False: 695]
  ------------------
  119|      0|        ossl_property_string_data_free(propdata);
  120|      0|        return NULL;
  121|      0|    }
  122|    695|    return propdata;
  123|    695|}
ossl_property_name:
  255|   590k|{
  256|   590k|    return ossl_property_string(ctx, 1, create, s);
  257|   590k|}
ossl_property_name_str:
  260|  2.87k|{
  261|  2.87k|    return ossl_property_str(1, ctx, idx);
  262|  2.87k|}
ossl_property_value:
  266|  39.0k|{
  267|  39.0k|    return ossl_property_string(ctx, 0, create, s);
  268|  39.0k|}
ossl_property_value_str:
  271|     26|{
  272|     26|    return ossl_property_str(0, ctx, idx);
  273|     26|}
property_string.c:property_table_free:
   66|  1.39k|{
   67|  1.39k|    PROP_TABLE *t = *pt;
   68|       |
   69|  1.39k|    if (t != NULL) {
  ------------------
  |  Branch (69:9): [True: 1.39k, False: 0]
  ------------------
   70|  1.39k|        lh_PROPERTY_STRING_doall(t, &property_free);
   71|  1.39k|        lh_PROPERTY_STRING_free(t);
   72|       |        *pt = NULL;
   73|  1.39k|    }
   74|  1.39k|}
property_string.c:property_free:
   61|  8.10k|{
   62|  8.10k|    OPENSSL_free(ps);
  ------------------
  |  |  131|  8.10k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   63|  8.10k|}
property_string.c:property_hash:
   51|   646k|{
   52|   646k|    return OPENSSL_LH_strhash(a->s);
   53|   646k|}
property_string.c:property_cmp:
   56|   125k|{
   57|   125k|    return strcmp(a->s, b->s);
   58|   125k|}
property_string.c:ossl_property_string:
  145|   629k|{
  146|   629k|    PROPERTY_STRING p, *ps, *ps_new;
  147|   629k|    PROP_TABLE *t;
  148|   629k|    OSSL_PROPERTY_IDX *pidx;
  149|   629k|    PROPERTY_STRING_DATA *propdata
  150|   629k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   99|   629k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  151|       |
  152|   629k|    if (propdata == NULL)
  ------------------
  |  Branch (152:9): [True: 0, False: 629k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|   629k|    t = name ? propdata->prop_names : propdata->prop_values;
  ------------------
  |  Branch (155:9): [True: 590k, False: 39.0k]
  ------------------
  156|   629k|    p.s = s;
  157|   629k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (157:9): [True: 0, False: 629k]
  ------------------
  158|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  159|      0|        return 0;
  160|      0|    }
  161|   629k|    ps = lh_PROPERTY_STRING_retrieve(t, &p);
  162|   629k|    if (ps == NULL && create) {
  ------------------
  |  Branch (162:9): [True: 504k, False: 125k]
  |  Branch (162:23): [True: 8.10k, False: 496k]
  ------------------
  163|  8.10k|        CRYPTO_THREAD_unlock(propdata->lock);
  164|  8.10k|        if (!CRYPTO_THREAD_write_lock(propdata->lock)) {
  ------------------
  |  Branch (164:13): [True: 0, False: 8.10k]
  ------------------
  165|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_WRITE_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  166|      0|            return 0;
  167|      0|        }
  168|  8.10k|        pidx = name ? &propdata->prop_name_idx : &propdata->prop_value_idx;
  ------------------
  |  Branch (168:16): [True: 6.11k, False: 1.98k]
  ------------------
  169|  8.10k|        ps = lh_PROPERTY_STRING_retrieve(t, &p);
  170|  8.10k|        if (ps == NULL && (ps_new = new_property_string(s, pidx)) != NULL) {
  ------------------
  |  Branch (170:13): [True: 8.10k, False: 0]
  |  Branch (170:27): [True: 8.10k, False: 0]
  ------------------
  171|  8.10k|#ifndef OPENSSL_SMALL_FOOTPRINT
  172|  8.10k|            STACK_OF(OPENSSL_CSTRING) *slist;
  ------------------
  |  |   33|  8.10k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  173|       |
  174|  8.10k|            slist = name ? propdata->prop_namelist : propdata->prop_valuelist;
  ------------------
  |  Branch (174:21): [True: 6.11k, False: 1.98k]
  ------------------
  175|  8.10k|            if (sk_OPENSSL_CSTRING_push(slist, ps_new->s) <= 0) {
  ------------------
  |  |  268|  8.10k|#define sk_OPENSSL_CSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
  ------------------
  |  Branch (175:17): [True: 0, False: 8.10k]
  ------------------
  176|      0|                property_free(ps_new);
  177|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  178|      0|                return 0;
  179|      0|            }
  180|  8.10k|#endif
  181|  8.10k|            lh_PROPERTY_STRING_insert(t, ps_new);
  182|  8.10k|            if (lh_PROPERTY_STRING_error(t)) {
  ------------------
  |  Branch (182:17): [True: 0, False: 8.10k]
  ------------------
  183|       |                /*-
  184|       |                 * Undo the previous push which means also decrementing the
  185|       |                 * index and freeing the allocated storage.
  186|       |                 */
  187|      0|#ifndef OPENSSL_SMALL_FOOTPRINT
  188|      0|                sk_OPENSSL_CSTRING_pop(slist);
  ------------------
  |  |  270|      0|#define sk_OPENSSL_CSTRING_pop(sk) ((const char *)OPENSSL_sk_pop(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
  ------------------
  189|      0|#endif
  190|      0|                property_free(ps_new);
  191|      0|                --*pidx;
  192|      0|                CRYPTO_THREAD_unlock(propdata->lock);
  193|      0|                return 0;
  194|      0|            }
  195|  8.10k|            ps = ps_new;
  196|  8.10k|        }
  197|  8.10k|    }
  198|   629k|    CRYPTO_THREAD_unlock(propdata->lock);
  199|   629k|    return ps != NULL ? ps->idx : 0;
  ------------------
  |  Branch (199:12): [True: 133k, False: 496k]
  ------------------
  200|   629k|}
property_string.c:new_property_string:
  127|  8.10k|{
  128|  8.10k|    const size_t l = strlen(s);
  129|  8.10k|    PROPERTY_STRING *ps = OPENSSL_malloc(sizeof(*ps) + l);
  ------------------
  |  |  106|  8.10k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|       |
  131|  8.10k|    if (ps != NULL) {
  ------------------
  |  Branch (131:9): [True: 8.10k, False: 0]
  ------------------
  132|  8.10k|        memcpy(ps->body, s, l + 1);
  133|  8.10k|        ps->s = ps->body;
  134|  8.10k|        ps->idx = ++*pidx;
  135|  8.10k|        if (ps->idx == 0) {
  ------------------
  |  Branch (135:13): [True: 0, False: 8.10k]
  ------------------
  136|      0|            OPENSSL_free(ps);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|      0|            return NULL;
  138|      0|        }
  139|  8.10k|    }
  140|  8.10k|    return ps;
  141|  8.10k|}
property_string.c:ossl_property_str:
  219|  2.89k|{
  220|  2.89k|    const char *r;
  221|  2.89k|    PROPERTY_STRING_DATA *propdata
  222|  2.89k|        = ossl_lib_ctx_get_data(ctx, OSSL_LIB_CTX_PROPERTY_STRING_INDEX);
  ------------------
  |  |   99|  2.89k|#define OSSL_LIB_CTX_PROPERTY_STRING_INDEX 3
  ------------------
  223|       |
  224|  2.89k|    if (propdata == NULL)
  ------------------
  |  Branch (224:9): [True: 0, False: 2.89k]
  ------------------
  225|      0|        return NULL;
  226|       |
  227|  2.89k|    if (!CRYPTO_THREAD_read_lock(propdata->lock)) {
  ------------------
  |  Branch (227:9): [True: 0, False: 2.89k]
  ------------------
  228|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_UNABLE_TO_GET_READ_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  229|      0|        return NULL;
  230|      0|    }
  231|       |#ifdef OPENSSL_SMALL_FOOTPRINT
  232|       |    {
  233|       |        struct find_str_st findstr;
  234|       |
  235|       |        findstr.str = NULL;
  236|       |        findstr.idx = idx;
  237|       |
  238|       |        lh_PROPERTY_STRING_doall_arg(name ? propdata->prop_names
  239|       |                                          : propdata->prop_values,
  240|       |            find_str_fn, &findstr);
  241|       |        r = findstr.str;
  242|       |    }
  243|       |#else
  244|  2.89k|    r = sk_OPENSSL_CSTRING_value(name ? propdata->prop_namelist
  ------------------
  |  |  259|  5.79k|#define sk_OPENSSL_CSTRING_value(sk, idx) ((const char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), (idx)))
  |  |  ------------------
  |  |  |  Branch (259:116): [True: 2.87k, False: 26]
  |  |  ------------------
  ------------------
  245|  2.89k|                                      : propdata->prop_valuelist,
  246|  2.89k|        idx - 1);
  247|  2.89k|#endif
  248|  2.89k|    CRYPTO_THREAD_unlock(propdata->lock);
  249|       |
  250|  2.89k|    return r;
  251|  2.89k|}

OSSL_PROVIDER_try_load_ex:
   20|    281|{
   21|    281|    OSSL_PROVIDER *prov = NULL, *actual;
   22|    281|    int isnew = 0;
   23|       |
   24|       |    /* Find it or create it */
   25|    281|    if ((prov = ossl_provider_find(libctx, name, 0)) == NULL) {
  ------------------
  |  Branch (25:9): [True: 236, False: 45]
  ------------------
   26|    236|        if ((prov = ossl_provider_new(libctx, name, NULL, params, 0)) == NULL)
  ------------------
  |  Branch (26:13): [True: 0, False: 236]
  ------------------
   27|      0|            return NULL;
   28|    236|        isnew = 1;
   29|    236|    }
   30|       |
   31|    281|    if (!ossl_provider_activate(prov, 1, 0)) {
  ------------------
  |  Branch (31:9): [True: 155, False: 126]
  ------------------
   32|    155|        ossl_provider_free(prov);
   33|    155|        return NULL;
   34|    155|    }
   35|       |
   36|    126|    actual = prov;
   37|    126|    if (isnew && !ossl_provider_add_to_store(prov, &actual, retain_fallbacks)) {
  ------------------
  |  Branch (37:9): [True: 81, False: 45]
  |  Branch (37:18): [True: 0, False: 81]
  ------------------
   38|      0|        ossl_provider_deactivate(prov, 1);
   39|      0|        ossl_provider_free(prov);
   40|      0|        return NULL;
   41|      0|    }
   42|    126|    if (actual != prov) {
  ------------------
  |  Branch (42:9): [True: 0, False: 126]
  ------------------
   43|      0|        if (!ossl_provider_activate(actual, 1, 0)) {
  ------------------
  |  Branch (43:13): [True: 0, False: 0]
  ------------------
   44|      0|            ossl_provider_free(actual);
   45|      0|            return NULL;
   46|      0|        }
   47|      0|    }
   48|       |
   49|    126|    return actual;
   50|    126|}
OSSL_PROVIDER_try_load:
   54|    281|{
   55|       |    return OSSL_PROVIDER_try_load_ex(libctx, name, NULL, retain_fallbacks);
   56|    281|}
OSSL_PROVIDER_unload:
   72|    126|{
   73|    126|    if (!ossl_provider_deactivate(prov, 1))
  ------------------
  |  Branch (73:9): [True: 0, False: 126]
  ------------------
   74|      0|        return 0;
   75|    126|    ossl_provider_free(prov);
   76|    126|    return 1;
   77|    126|}
OSSL_PROVIDER_get0_provider_ctx:
  104|  1.09M|{
  105|  1.09M|    return ossl_provider_ctx(prov);
  106|  1.09M|}
OSSL_PROVIDER_get_capabilities:
  122|  4.33k|{
  123|  4.33k|    return ossl_provider_get_capabilities(prov, capability, cb, arg);
  124|  4.33k|}
OSSL_PROVIDER_do_all:
  156|  4.18k|{
  157|  4.18k|    return ossl_provider_doall_activated(ctx, cb, cbdata);
  158|  4.18k|}

ossl_child_prov_ctx_new:
   38|    695|{
   39|    695|    return OPENSSL_zalloc(sizeof(struct child_prov_globals));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|    695|}
ossl_child_prov_ctx_free:
   43|    695|{
   44|    695|    struct child_prov_globals *gbl = vgbl;
   45|       |
   46|    695|    CRYPTO_THREAD_lock_free(gbl->lock);
   47|    695|    OPENSSL_free(gbl);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|    695|}

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

ossl_provider_store_free:
  288|    695|{
  289|    695|    struct provider_store_st *store = vstore;
  290|    695|    size_t i;
  291|       |
  292|    695|    if (store == NULL)
  ------------------
  |  Branch (292:9): [True: 0, False: 695]
  ------------------
  293|      0|        return;
  294|    695|    store->freeing = 1;
  295|    695|    OPENSSL_free(store->default_path);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  296|    695|    sk_OSSL_PROVIDER_pop_free(store->providers, provider_deactivate_free);
  297|    695|#ifndef FIPS_MODULE
  298|    695|    sk_OSSL_PROVIDER_CHILD_CB_pop_free(store->child_cbs,
  299|    695|        ossl_provider_child_cb_free);
  300|    695|#endif
  301|    695|    CRYPTO_THREAD_lock_free(store->default_path_lock);
  302|    695|    CRYPTO_THREAD_lock_free(store->lock);
  303|    695|    for (i = 0; i < store->numprovinfo; i++)
  ------------------
  |  Branch (303:17): [True: 0, False: 695]
  ------------------
  304|      0|        ossl_provider_info_clear(&store->provinfo[i]);
  305|    695|    OPENSSL_free(store->provinfo);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  306|    695|    OPENSSL_free(store);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  307|    695|}
ossl_provider_store_new:
  310|    695|{
  311|    695|    struct provider_store_st *store = OPENSSL_zalloc(sizeof(*store));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  312|       |
  313|    695|    if (store == NULL
  ------------------
  |  Branch (313:9): [True: 0, False: 695]
  ------------------
  314|    695|        || (store->providers = sk_OSSL_PROVIDER_new(ossl_provider_cmp)) == NULL
  ------------------
  |  Branch (314:12): [True: 0, False: 695]
  ------------------
  315|    695|        || (store->default_path_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (315:12): [True: 0, False: 695]
  ------------------
  316|    695|#ifndef FIPS_MODULE
  317|    695|        || (store->child_cbs = sk_OSSL_PROVIDER_CHILD_CB_new_null()) == NULL
  ------------------
  |  Branch (317:12): [True: 0, False: 695]
  ------------------
  318|    695|#endif
  319|    695|        || (store->lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (319:12): [True: 0, False: 695]
  ------------------
  320|      0|        ossl_provider_store_free(store);
  321|      0|        return NULL;
  322|      0|    }
  323|    695|    store->libctx = ctx;
  324|    695|    store->use_fallbacks = 1;
  325|       |
  326|    695|    return store;
  327|    695|}
ossl_provider_find:
  401|  2.47k|{
  402|  2.47k|    struct provider_store_st *store = NULL;
  403|  2.47k|    OSSL_PROVIDER *prov = NULL;
  404|       |
  405|  2.47k|    if ((store = get_provider_store(libctx)) != NULL) {
  ------------------
  |  Branch (405:9): [True: 2.47k, False: 0]
  ------------------
  406|  2.47k|        OSSL_PROVIDER tmpl = {
  407|  2.47k|            0,
  408|  2.47k|        };
  409|  2.47k|        int i;
  410|       |
  411|  2.47k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
  412|       |        /*
  413|       |         * Make sure any providers are loaded from config before we try to find
  414|       |         * them.
  415|       |         */
  416|  2.47k|        if (!noconfig) {
  ------------------
  |  Branch (416:13): [True: 975, False: 1.50k]
  ------------------
  417|    975|            if (ossl_lib_ctx_is_default(libctx))
  ------------------
  |  Branch (417:17): [True: 0, False: 975]
  ------------------
  418|      0|                OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  510|      0|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
  419|    975|        }
  420|  2.47k|#endif
  421|       |
  422|  2.47k|        tmpl.name = (char *)name;
  423|  2.47k|        if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (423:13): [True: 0, False: 2.47k]
  ------------------
  424|      0|            return NULL;
  425|  2.47k|        sk_OSSL_PROVIDER_sort(store->providers);
  426|  2.47k|        if ((i = sk_OSSL_PROVIDER_find(store->providers, &tmpl)) != -1)
  ------------------
  |  Branch (426:13): [True: 2.02k, False: 454]
  ------------------
  427|  2.02k|            prov = sk_OSSL_PROVIDER_value(store->providers, i);
  428|  2.47k|        CRYPTO_THREAD_unlock(store->lock);
  429|  2.47k|        if (prov != NULL && !ossl_provider_up_ref(prov))
  ------------------
  |  Branch (429:13): [True: 2.02k, False: 454]
  |  Branch (429:29): [True: 0, False: 2.02k]
  ------------------
  430|      0|            prov = NULL;
  431|  2.47k|    }
  432|       |
  433|  2.47k|    return prov;
  434|  2.47k|}
ossl_provider_up_ref:
  480|   143k|{
  481|   143k|    int ref = 0;
  482|       |
  483|   143k|    if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0)
  ------------------
  |  Branch (483:9): [True: 0, False: 143k]
  ------------------
  484|      0|        return 0;
  485|       |
  486|   143k|#ifndef FIPS_MODULE
  487|   143k|    if (prov->ischild) {
  ------------------
  |  Branch (487:9): [True: 0, False: 143k]
  ------------------
  488|      0|        if (!ossl_provider_up_ref_parent(prov, 0)) {
  ------------------
  |  Branch (488:13): [True: 0, False: 0]
  ------------------
  489|      0|            ossl_provider_free(prov);
  490|      0|            return 0;
  491|      0|        }
  492|      0|    }
  493|   143k|#endif
  494|       |
  495|   143k|    return ref;
  496|   143k|}
ossl_provider_new:
  525|    236|{
  526|    236|    struct provider_store_st *store = NULL;
  527|    236|    OSSL_PROVIDER_INFO template;
  528|    236|    OSSL_PROVIDER *prov = NULL;
  529|       |
  530|    236|    if ((store = get_provider_store(libctx)) == NULL)
  ------------------
  |  Branch (530:9): [True: 0, False: 236]
  ------------------
  531|      0|        return NULL;
  532|       |
  533|    236|    memset(&template, 0, sizeof(template));
  534|    236|    if (init_function == NULL) {
  ------------------
  |  Branch (534:9): [True: 236, False: 0]
  ------------------
  535|    236|        const OSSL_PROVIDER_INFO *p;
  536|    236|        size_t i;
  537|    236|        int chosen = 0;
  538|       |
  539|       |        /* Check if this is a predefined builtin provider */
  540|    800|        for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (540:45): [True: 645, False: 155]
  ------------------
  541|    645|            if (strcmp(p->name, name) != 0)
  ------------------
  |  Branch (541:17): [True: 564, False: 81]
  ------------------
  542|    564|                continue;
  543|       |            /* These compile-time templates always have NULL parameters */
  544|     81|            template = *p;
  545|     81|            chosen = 1;
  546|     81|            break;
  547|    645|        }
  548|    236|        if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (548:13): [True: 0, False: 236]
  ------------------
  549|      0|            return NULL;
  550|    236|        for (i = 0, p = store->provinfo; i < store->numprovinfo; p++, i++) {
  ------------------
  |  Branch (550:42): [True: 0, False: 236]
  ------------------
  551|      0|            if (strcmp(p->name, name) != 0)
  ------------------
  |  Branch (551:17): [True: 0, False: 0]
  ------------------
  552|      0|                continue;
  553|       |            /* For built-in providers, copy just implicit parameters. */
  554|      0|            if (!chosen)
  ------------------
  |  Branch (554:17): [True: 0, False: 0]
  ------------------
  555|      0|                template = *p;
  556|       |            /*
  557|       |             * Explicit parameters override config-file defaults.  If an empty
  558|       |             * parameter set is desired, a non-NULL empty set must be provided.
  559|       |             */
  560|      0|            if (params != NULL || p->parameters == NULL) {
  ------------------
  |  Branch (560:17): [True: 0, False: 0]
  |  Branch (560:35): [True: 0, False: 0]
  ------------------
  561|      0|                template.parameters = NULL;
  562|      0|                break;
  563|      0|            }
  564|       |            /* Always copy to avoid sharing/mutation. */
  565|      0|            template.parameters = sk_INFOPAIR_deep_copy(p->parameters,
  566|      0|                infopair_copy,
  567|      0|                infopair_free);
  568|      0|            if (template.parameters == NULL) {
  ------------------
  |  Branch (568:17): [True: 0, False: 0]
  ------------------
  569|      0|                CRYPTO_THREAD_unlock(store->lock);
  570|      0|                return NULL;
  571|      0|            }
  572|      0|            break;
  573|      0|        }
  574|    236|        CRYPTO_THREAD_unlock(store->lock);
  575|    236|    } else {
  576|      0|        template.init = init_function;
  577|      0|    }
  578|       |
  579|    236|    if (params != NULL) {
  ------------------
  |  Branch (579:9): [True: 0, False: 236]
  ------------------
  580|      0|        int i;
  581|       |
  582|       |        /* Don't leak if already non-NULL */
  583|      0|        if (template.parameters == NULL)
  ------------------
  |  Branch (583:13): [True: 0, False: 0]
  ------------------
  584|      0|            template.parameters = sk_INFOPAIR_new_null();
  585|      0|        if (template.parameters == NULL)
  ------------------
  |  Branch (585:13): [True: 0, False: 0]
  ------------------
  586|      0|            return NULL;
  587|       |
  588|      0|        for (i = 0; params[i].key != NULL; i++) {
  ------------------
  |  Branch (588:21): [True: 0, False: 0]
  ------------------
  589|      0|            if (params[i].data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (589:17): [True: 0, False: 0]
  ------------------
  590|      0|                continue;
  591|      0|            if (ossl_provider_info_add_parameter(&template, params[i].key,
  ------------------
  |  Branch (591:17): [True: 0, False: 0]
  ------------------
  592|      0|                    (char *)params[i].data)
  593|      0|                <= 0) {
  594|      0|                sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  595|      0|                return NULL;
  596|      0|            }
  597|      0|        }
  598|      0|    }
  599|       |
  600|       |    /* provider_new() generates an error, so no need here */
  601|    236|    prov = provider_new(name, template.init, template.parameters);
  602|       |
  603|       |    /* If we copied the parameters, free them */
  604|    236|    if (template.parameters != NULL)
  ------------------
  |  Branch (604:9): [True: 0, False: 236]
  ------------------
  605|      0|        sk_INFOPAIR_pop_free(template.parameters, infopair_free);
  606|       |
  607|    236|    if (prov == NULL)
  ------------------
  |  Branch (607:9): [True: 0, False: 236]
  ------------------
  608|      0|        return NULL;
  609|       |
  610|    236|    if (!ossl_provider_set_module_path(prov, template.path)) {
  ------------------
  |  Branch (610:9): [True: 0, False: 236]
  ------------------
  611|      0|        ossl_provider_free(prov);
  612|      0|        return NULL;
  613|      0|    }
  614|       |
  615|    236|    prov->libctx = libctx;
  616|    236|#ifndef FIPS_MODULE
  617|    236|    prov->error_lib = ERR_get_next_error_library();
  618|    236|#endif
  619|       |
  620|       |    /*
  621|       |     * At this point, the provider is only partially "loaded".  To be
  622|       |     * fully "loaded", ossl_provider_activate() must also be called and it must
  623|       |     * then be added to the provider store.
  624|       |     */
  625|       |
  626|    236|    return prov;
  627|    236|}
ossl_provider_add_to_store:
  654|     81|{
  655|     81|    struct provider_store_st *store;
  656|     81|    int idx;
  657|     81|    OSSL_PROVIDER tmpl = {
  658|     81|        0,
  659|     81|    };
  660|     81|    OSSL_PROVIDER *actualtmp = NULL;
  661|       |
  662|     81|    if (actualprov != NULL)
  ------------------
  |  Branch (662:9): [True: 81, False: 0]
  ------------------
  663|     81|        *actualprov = NULL;
  664|       |
  665|     81|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (665:9): [True: 0, False: 81]
  ------------------
  666|      0|        return 0;
  667|       |
  668|     81|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (668:9): [True: 0, False: 81]
  ------------------
  669|      0|        return 0;
  670|       |
  671|     81|    tmpl.name = (char *)prov->name;
  672|     81|    idx = sk_OSSL_PROVIDER_find(store->providers, &tmpl);
  673|     81|    if (idx == -1)
  ------------------
  |  Branch (673:9): [True: 81, False: 0]
  ------------------
  674|     81|        actualtmp = prov;
  675|      0|    else
  676|      0|        actualtmp = sk_OSSL_PROVIDER_value(store->providers, idx);
  677|       |
  678|     81|    if (idx == -1) {
  ------------------
  |  Branch (678:9): [True: 81, False: 0]
  ------------------
  679|     81|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0)
  ------------------
  |  Branch (679:13): [True: 0, False: 81]
  ------------------
  680|      0|            goto err;
  681|     81|        prov->store = store;
  682|     81|        if (!create_provider_children(prov)) {
  ------------------
  |  Branch (682:13): [True: 0, False: 81]
  ------------------
  683|      0|            sk_OSSL_PROVIDER_delete_ptr(store->providers, prov);
  684|      0|            goto err;
  685|      0|        }
  686|     81|        if (!retain_fallbacks)
  ------------------
  |  Branch (686:13): [True: 0, False: 81]
  ------------------
  687|      0|            store->use_fallbacks = 0;
  688|     81|    }
  689|       |
  690|     81|    CRYPTO_THREAD_unlock(store->lock);
  691|       |
  692|     81|    if (actualprov != NULL) {
  ------------------
  |  Branch (692:9): [True: 81, False: 0]
  ------------------
  693|     81|        if (!ossl_provider_up_ref(actualtmp)) {
  ------------------
  |  Branch (693:13): [True: 0, False: 81]
  ------------------
  694|      0|            ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  695|      0|            actualtmp = NULL;
  696|      0|            return 0;
  697|      0|        }
  698|     81|        *actualprov = actualtmp;
  699|     81|    }
  700|       |
  701|     81|    if (idx >= 0) {
  ------------------
  |  Branch (701:9): [True: 0, False: 81]
  ------------------
  702|       |        /*
  703|       |         * The provider is already in the store. Probably two threads
  704|       |         * independently initialised their own provider objects with the same
  705|       |         * name and raced to put them in the store. This thread lost. We
  706|       |         * deactivate the one we just created and use the one that already
  707|       |         * exists instead.
  708|       |         * If we get here then we know we did not create provider children
  709|       |         * above, so we inform ossl_provider_deactivate not to attempt to remove
  710|       |         * any.
  711|       |         */
  712|      0|        ossl_provider_deactivate(prov, 0);
  713|      0|        ossl_provider_free(prov);
  714|      0|    }
  715|     81|#ifndef FIPS_MODULE
  716|     81|    else {
  717|       |        /*
  718|       |         * This can be done outside the lock. We tolerate other threads getting
  719|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
  720|       |         */
  721|     81|        ossl_decoder_cache_flush(prov->libctx);
  722|     81|    }
  723|     81|#endif
  724|       |
  725|     81|    return 1;
  726|       |
  727|      0|err:
  728|      0|    CRYPTO_THREAD_unlock(store->lock);
  729|      0|    return 0;
  730|     81|}
ossl_provider_free:
  733|   144k|{
  734|   144k|    if (prov != NULL) {
  ------------------
  |  Branch (734:9): [True: 144k, False: 0]
  ------------------
  735|   144k|        int ref = 0;
  736|       |
  737|   144k|        CRYPTO_DOWN_REF(&prov->refcnt, &ref);
  738|       |
  739|       |        /*
  740|       |         * When the refcount drops to zero, we clean up the provider.
  741|       |         * Note that this also does teardown, which may seem late,
  742|       |         * considering that init happens on first activation.  However,
  743|       |         * there may be other structures hanging on to the provider after
  744|       |         * the last deactivation and may therefore need full access to the
  745|       |         * provider's services.  Therefore, we deinit late.
  746|       |         */
  747|   144k|        if (ref == 0) {
  ------------------
  |  Branch (747:13): [True: 931, False: 143k]
  ------------------
  748|    931|            if (prov->flag_initialized) {
  ------------------
  |  Branch (748:17): [True: 776, False: 155]
  ------------------
  749|    776|                ossl_provider_teardown(prov);
  750|    776|#ifndef OPENSSL_NO_ERR
  751|    776|#ifndef FIPS_MODULE
  752|    776|                if (prov->error_strings != NULL) {
  ------------------
  |  Branch (752:21): [True: 0, False: 776]
  ------------------
  753|      0|                    ERR_unload_strings(prov->error_lib, prov->error_strings);
  754|      0|                    OPENSSL_free(prov->error_strings);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  755|      0|                    prov->error_strings = NULL;
  756|      0|                }
  757|    776|#endif
  758|    776|#endif
  759|    776|                OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  131|    776|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  760|    776|                prov->operation_bits = NULL;
  761|    776|                prov->operation_bits_sz = 0;
  762|    776|                prov->flag_initialized = 0;
  763|    776|            }
  764|       |
  765|    931|#ifndef FIPS_MODULE
  766|       |            /*
  767|       |             * We deregister thread handling whether or not the provider was
  768|       |             * initialized. If init was attempted but was not successful then
  769|       |             * the provider may still have registered a thread handler.
  770|       |             */
  771|    931|            ossl_init_thread_deregister(prov);
  772|    931|            DSO_free(prov->module);
  773|    931|#endif
  774|    931|            OPENSSL_free(prov->name);
  ------------------
  |  |  131|    931|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  775|    931|            OPENSSL_free(prov->path);
  ------------------
  |  |  131|    931|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  776|    931|            sk_INFOPAIR_pop_free(prov->parameters, infopair_free);
  777|    931|            CRYPTO_THREAD_lock_free(prov->opbits_lock);
  778|    931|            CRYPTO_THREAD_lock_free(prov->flag_lock);
  779|    931|            CRYPTO_THREAD_lock_free(prov->activatecnt_lock);
  780|    931|            CRYPTO_FREE_REF(&prov->refcnt);
  781|    931|            OPENSSL_free(prov);
  ------------------
  |  |  131|    931|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  782|    931|        }
  783|   143k|#ifndef FIPS_MODULE
  784|   143k|        else if (prov->ischild) {
  ------------------
  |  Branch (784:18): [True: 0, False: 143k]
  ------------------
  785|      0|            ossl_provider_free_parent(prov, 0);
  786|      0|        }
  787|   144k|#endif
  788|   144k|    }
  789|   144k|}
ossl_provider_set_module_path:
  793|    236|{
  794|    236|    OPENSSL_free(prov->path);
  ------------------
  |  |  131|    236|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  795|    236|    prov->path = NULL;
  796|    236|    if (module_path == NULL)
  ------------------
  |  Branch (796:9): [True: 236, False: 0]
  ------------------
  797|    236|        return 1;
  798|      0|    if ((prov->path = OPENSSL_strdup(module_path)) != NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (798:9): [True: 0, False: 0]
  ------------------
  799|      0|        return 1;
  800|      0|    return 0;
  801|      0|}
OSSL_PROVIDER_get_conf_parameters:
  839|  3.70k|{
  840|  3.70k|    int i;
  841|       |
  842|  3.70k|    if (prov->parameters == NULL)
  ------------------
  |  Branch (842:9): [True: 0, False: 3.70k]
  ------------------
  843|      0|        return 1;
  844|       |
  845|  3.70k|    for (i = 0; i < sk_INFOPAIR_num(prov->parameters); i++) {
  ------------------
  |  Branch (845:17): [True: 0, False: 3.70k]
  ------------------
  846|      0|        INFOPAIR *pair = sk_INFOPAIR_value(prov->parameters, i);
  847|      0|        OSSL_PARAM *p = OSSL_PARAM_locate(params, pair->name);
  848|       |
  849|      0|        if (p != NULL
  ------------------
  |  Branch (849:13): [True: 0, False: 0]
  ------------------
  850|      0|            && !OSSL_PARAM_set_utf8_ptr(p, pair->value))
  ------------------
  |  Branch (850:16): [True: 0, False: 0]
  ------------------
  851|      0|            return 0;
  852|      0|    }
  853|  3.70k|    return 1;
  854|  3.70k|}
ossl_provider_activate:
 1396|    281|{
 1397|    281|    int count;
 1398|       |
 1399|    281|    if (prov == NULL)
  ------------------
  |  Branch (1399:9): [True: 0, False: 281]
  ------------------
 1400|      0|        return 0;
 1401|    281|#ifndef FIPS_MODULE
 1402|       |    /*
 1403|       |     * If aschild is true, then we only actually do the activation if the
 1404|       |     * provider is a child. If its not, this is still success.
 1405|       |     */
 1406|    281|    if (aschild && !prov->ischild)
  ------------------
  |  Branch (1406:9): [True: 0, False: 281]
  |  Branch (1406:20): [True: 0, False: 0]
  ------------------
 1407|      0|        return 1;
 1408|    281|#endif
 1409|    281|    if ((count = provider_activate(prov, 1, upcalls)) > 0)
  ------------------
  |  Branch (1409:9): [True: 126, False: 155]
  ------------------
 1410|    126|        return count == 1 ? provider_flush_store_cache(prov) : 1;
  ------------------
  |  Branch (1410:16): [True: 81, False: 45]
  ------------------
 1411|       |
 1412|    155|    return 0;
 1413|    281|}
ossl_provider_deactivate:
 1416|    821|{
 1417|    821|    int count;
 1418|       |
 1419|    821|    if (prov == NULL
  ------------------
  |  Branch (1419:9): [True: 0, False: 821]
  ------------------
 1420|    821|        || (count = provider_deactivate(prov, 1, removechildren)) < 0)
  ------------------
  |  Branch (1420:12): [True: 0, False: 821]
  ------------------
 1421|      0|        return 0;
 1422|    821|    return count == 0 ? provider_remove_store_methods(prov) : 1;
  ------------------
  |  Branch (1422:12): [True: 776, False: 45]
  ------------------
 1423|    821|}
ossl_provider_ctx:
 1426|  1.22M|{
 1427|  1.22M|    return prov != NULL ? prov->provctx : NULL;
  ------------------
  |  Branch (1427:12): [True: 1.22M, False: 0]
  ------------------
 1428|  1.22M|}
ossl_provider_doall_activated:
 1527|  64.2k|{
 1528|  64.2k|    int ret = 0, curr, max, ref = 0;
 1529|  64.2k|    struct provider_store_st *store = get_provider_store(ctx);
 1530|  64.2k|    STACK_OF(OSSL_PROVIDER) *provs = NULL;
  ------------------
  |  |   33|  64.2k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1531|       |
 1532|  64.2k|#if !defined(FIPS_MODULE) && !defined(OPENSSL_NO_AUTOLOAD_CONFIG)
 1533|       |    /*
 1534|       |     * Make sure any providers are loaded from config before we try to use
 1535|       |     * them.
 1536|       |     */
 1537|  64.2k|    if (ossl_lib_ctx_is_default(ctx))
  ------------------
  |  Branch (1537:9): [True: 28.2k, False: 36.0k]
  ------------------
 1538|  28.2k|        OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
  ------------------
  |  |  510|  28.2k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
 1539|  64.2k|#endif
 1540|       |
 1541|  64.2k|    if (store == NULL)
  ------------------
  |  Branch (1541:9): [True: 0, False: 64.2k]
  ------------------
 1542|      0|        return 1;
 1543|  64.2k|    if (!provider_activate_fallbacks(store))
  ------------------
  |  Branch (1543:9): [True: 0, False: 64.2k]
  ------------------
 1544|      0|        return 0;
 1545|       |
 1546|       |    /*
 1547|       |     * Under lock, grab a copy of the provider list and up_ref each
 1548|       |     * provider so that they don't disappear underneath us.
 1549|       |     */
 1550|  64.2k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1550:9): [True: 0, False: 64.2k]
  ------------------
 1551|      0|        return 0;
 1552|  64.2k|    provs = sk_OSSL_PROVIDER_dup(store->providers);
 1553|  64.2k|    if (provs == NULL) {
  ------------------
  |  Branch (1553:9): [True: 0, False: 64.2k]
  ------------------
 1554|      0|        CRYPTO_THREAD_unlock(store->lock);
 1555|      0|        return 0;
 1556|      0|    }
 1557|  64.2k|    max = sk_OSSL_PROVIDER_num(provs);
 1558|       |    /*
 1559|       |     * We work backwards through the stack so that we can safely delete items
 1560|       |     * as we go.
 1561|       |     */
 1562|   133k|    for (curr = max - 1; curr >= 0; curr--) {
  ------------------
  |  Branch (1562:26): [True: 69.6k, False: 64.2k]
  ------------------
 1563|  69.6k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1564|       |
 1565|  69.6k|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1565:13): [True: 0, False: 69.6k]
  ------------------
 1566|      0|            goto err_unlock;
 1567|  69.6k|        if (prov->flag_activated) {
  ------------------
  |  Branch (1567:13): [True: 69.6k, False: 0]
  ------------------
 1568|       |            /*
 1569|       |             * We call CRYPTO_UP_REF directly rather than ossl_provider_up_ref
 1570|       |             * to avoid upping the ref count on the parent provider, which we
 1571|       |             * must not do while holding locks.
 1572|       |             */
 1573|  69.6k|            if (CRYPTO_UP_REF(&prov->refcnt, &ref) <= 0) {
  ------------------
  |  Branch (1573:17): [True: 0, False: 69.6k]
  ------------------
 1574|      0|                CRYPTO_THREAD_unlock(prov->flag_lock);
 1575|      0|                goto err_unlock;
 1576|      0|            }
 1577|       |            /*
 1578|       |             * It's already activated, but we up the activated count to ensure
 1579|       |             * it remains activated until after we've called the user callback.
 1580|       |             * In theory this could mean the parent provider goes inactive,
 1581|       |             * whilst still activated in the child for a short period. That's ok.
 1582|       |             */
 1583|  69.6k|            if (!CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1583:17): [True: 0, False: 69.6k]
  ------------------
 1584|  69.6k|                    prov->activatecnt_lock)) {
 1585|      0|                CRYPTO_DOWN_REF(&prov->refcnt, &ref);
 1586|      0|                CRYPTO_THREAD_unlock(prov->flag_lock);
 1587|      0|                goto err_unlock;
 1588|      0|            }
 1589|  69.6k|        } else {
 1590|      0|            sk_OSSL_PROVIDER_delete(provs, curr);
 1591|      0|            max--;
 1592|      0|        }
 1593|  69.6k|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1594|  69.6k|    }
 1595|  64.2k|    CRYPTO_THREAD_unlock(store->lock);
 1596|       |
 1597|       |    /*
 1598|       |     * Now, we sweep through all providers not under lock
 1599|       |     */
 1600|   133k|    for (curr = 0; curr < max; curr++) {
  ------------------
  |  Branch (1600:20): [True: 69.6k, False: 64.2k]
  ------------------
 1601|  69.6k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1602|       |
 1603|  69.6k|        if (!cb(prov, cbdata)) {
  ------------------
  |  Branch (1603:13): [True: 0, False: 69.6k]
  ------------------
 1604|      0|            curr = -1;
 1605|      0|            goto finish;
 1606|      0|        }
 1607|  69.6k|    }
 1608|  64.2k|    curr = -1;
 1609|       |
 1610|  64.2k|    ret = 1;
 1611|  64.2k|    goto finish;
 1612|       |
 1613|      0|err_unlock:
 1614|      0|    CRYPTO_THREAD_unlock(store->lock);
 1615|  64.2k|finish:
 1616|       |    /*
 1617|       |     * The pop_free call doesn't do what we want on an error condition. We
 1618|       |     * either start from the first item in the stack, or part way through if
 1619|       |     * we only processed some of the items.
 1620|       |     */
 1621|   133k|    for (curr++; curr < max; curr++) {
  ------------------
  |  Branch (1621:18): [True: 69.6k, False: 64.2k]
  ------------------
 1622|  69.6k|        OSSL_PROVIDER *prov = sk_OSSL_PROVIDER_value(provs, curr);
 1623|       |
 1624|  69.6k|        if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &ref,
  ------------------
  |  Branch (1624:13): [True: 0, False: 69.6k]
  ------------------
 1625|  69.6k|                prov->activatecnt_lock)) {
 1626|      0|            ret = 0;
 1627|      0|            continue;
 1628|      0|        }
 1629|  69.6k|        if (ref < 1) {
  ------------------
  |  Branch (1629:13): [True: 0, False: 69.6k]
  ------------------
 1630|       |            /*
 1631|       |             * Looks like we need to deactivate properly. We could just have
 1632|       |             * done this originally, but it involves taking a write lock so
 1633|       |             * we avoid it. We up the count again and do a full deactivation
 1634|       |             */
 1635|      0|            if (CRYPTO_atomic_add(&prov->activatecnt, 1, &ref,
  ------------------
  |  Branch (1635:17): [True: 0, False: 0]
  ------------------
 1636|      0|                    prov->activatecnt_lock))
 1637|      0|                provider_deactivate(prov, 0, 1);
 1638|      0|            else
 1639|      0|                ret = 0;
 1640|      0|        }
 1641|       |        /*
 1642|       |         * As above where we did the up-ref, we don't call ossl_provider_free
 1643|       |         * to avoid making upcalls. There should always be at least one ref
 1644|       |         * to the provider in the store, so this should never drop to 0.
 1645|       |         */
 1646|  69.6k|        if (!CRYPTO_DOWN_REF(&prov->refcnt, &ref)) {
  ------------------
  |  Branch (1646:13): [True: 0, False: 69.6k]
  ------------------
 1647|      0|            ret = 0;
 1648|      0|            continue;
 1649|      0|        }
 1650|       |        /*
 1651|       |         * Not much we can do if this assert ever fails. So we don't use
 1652|       |         * ossl_assert here.
 1653|       |         */
 1654|  69.6k|        assert(ref > 0);
  ------------------
  |  Branch (1654:9): [True: 0, False: 69.6k]
  |  Branch (1654:9): [True: 69.6k, False: 0]
  ------------------
 1655|  69.6k|    }
 1656|  64.2k|    sk_OSSL_PROVIDER_free(provs);
 1657|  64.2k|    return ret;
 1658|  64.2k|}
OSSL_PROVIDER_available:
 1661|    694|{
 1662|    694|    OSSL_PROVIDER *prov = NULL;
 1663|    694|    int available = 0;
 1664|    694|    struct provider_store_st *store = get_provider_store(libctx);
 1665|       |
 1666|    694|    if (store == NULL || !provider_activate_fallbacks(store))
  ------------------
  |  Branch (1666:9): [True: 0, False: 694]
  |  Branch (1666:26): [True: 0, False: 694]
  ------------------
 1667|      0|        return 0;
 1668|       |
 1669|    694|    prov = ossl_provider_find(libctx, name, 0);
 1670|    694|    if (prov != NULL) {
  ------------------
  |  Branch (1670:9): [True: 476, False: 218]
  ------------------
 1671|    476|        if (!CRYPTO_THREAD_read_lock(prov->flag_lock))
  ------------------
  |  Branch (1671:13): [True: 0, False: 476]
  ------------------
 1672|      0|            return 0;
 1673|    476|        available = prov->flag_activated;
 1674|    476|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1675|    476|        ossl_provider_free(prov);
 1676|    476|    }
 1677|    694|    return available;
 1678|    694|}
ossl_provider_name:
 1682|  1.50k|{
 1683|  1.50k|    return prov->name;
 1684|  1.50k|}
ossl_provider_libctx:
 1719|  1.69M|{
 1720|  1.69M|    return prov != NULL ? prov->libctx : NULL;
  ------------------
  |  Branch (1720:12): [True: 1.68M, False: 11.0k]
  ------------------
 1721|  1.69M|}
ossl_provider_teardown:
 1736|    776|{
 1737|    776|    if (prov->teardown != NULL
  ------------------
  |  Branch (1737:9): [True: 758, False: 18]
  ------------------
 1738|    758|#ifndef FIPS_MODULE
 1739|    758|        && !prov->ischild
  ------------------
  |  Branch (1739:12): [True: 758, False: 0]
  ------------------
 1740|    776|#endif
 1741|    776|    ) {
 1742|    758|#ifndef FIPS_MODULE
 1743|    758|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  221|    758|    do {                           \
  |  |  222|    758|        BIO *trc_out = NULL;       \
  |  |  223|    758|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 758]
  |  |  ------------------
  ------------------
 1744|      0|        {
 1745|      0|            BIO_printf(trc_out, "(provider %s) calling teardown\n",
 1746|      0|                ossl_provider_name(prov));
 1747|      0|        }
 1748|    758|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  226|    758|    }                            \
  |  |  227|    758|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 758]
  |  |  ------------------
  ------------------
 1749|    758|#endif
 1750|    758|        prov->teardown(prov->provctx);
 1751|    758|    }
 1752|    776|}
ossl_provider_get_capabilities:
 1907|  4.33k|{
 1908|  4.33k|    if (prov->get_capabilities != NULL) {
  ------------------
  |  Branch (1908:9): [True: 4.18k, False: 152]
  ------------------
 1909|  4.18k|#ifndef FIPS_MODULE
 1910|  4.18k|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  221|  4.18k|    do {                           \
  |  |  222|  4.18k|        BIO *trc_out = NULL;       \
  |  |  223|  4.18k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 4.18k]
  |  |  ------------------
  ------------------
 1911|      0|        {
 1912|      0|            BIO_printf(trc_out,
 1913|      0|                "(provider %s) Calling get_capabilities "
 1914|      0|                "with capabilities %s\n",
 1915|      0|                prov->name,
 1916|      0|                capability == NULL ? "none" : capability);
  ------------------
  |  Branch (1916:17): [True: 0, False: 0]
  ------------------
 1917|      0|        }
 1918|  4.18k|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  226|  4.18k|    }                            \
  |  |  227|  4.18k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 4.18k]
  |  |  ------------------
  ------------------
 1919|  4.18k|#endif
 1920|  4.18k|        return prov->get_capabilities(prov->provctx, capability, cb, arg);
 1921|  4.18k|    }
 1922|    152|    return 1;
 1923|  4.33k|}
ossl_provider_query_operation:
 1946|  66.2k|{
 1947|  66.2k|    const OSSL_ALGORITHM *res;
 1948|       |
 1949|  66.2k|    if (prov->query_operation == NULL) {
  ------------------
  |  Branch (1949:9): [True: 0, False: 66.2k]
  ------------------
 1950|      0|#ifndef FIPS_MODULE
 1951|      0|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  221|      0|    do {                           \
  |  |  222|      0|        BIO *trc_out = NULL;       \
  |  |  223|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1952|      0|        {
 1953|      0|            BIO_printf(trc_out, "provider %s lacks query operation!\n",
 1954|      0|                prov->name);
 1955|      0|        }
 1956|      0|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  226|      0|    }                            \
  |  |  227|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1957|      0|#endif
 1958|      0|        return NULL;
 1959|      0|    }
 1960|       |
 1961|  66.2k|    res = prov->query_operation(prov->provctx, operation_id, no_cache);
 1962|  66.2k|#ifndef FIPS_MODULE
 1963|  66.2k|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  221|  66.2k|    do {                           \
  |  |  222|  66.2k|        BIO *trc_out = NULL;       \
  |  |  223|  66.2k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 66.2k]
  |  |  ------------------
  ------------------
 1964|      0|    {
 1965|      0|        const OSSL_ALGORITHM *idx;
 1966|      0|        if (res != NULL) {
  ------------------
  |  Branch (1966:13): [True: 0, False: 0]
  ------------------
 1967|      0|            BIO_printf(trc_out,
 1968|      0|                "(provider %s) Calling query, available algs are:\n", prov->name);
 1969|       |
 1970|      0|            for (idx = res; idx->algorithm_names != NULL; idx++) {
  ------------------
  |  Branch (1970:29): [True: 0, False: 0]
  ------------------
 1971|      0|                BIO_printf(trc_out,
 1972|      0|                    "(provider %s) names %s, prop_def %s, desc %s\n",
 1973|      0|                    prov->name,
 1974|      0|                    idx->algorithm_names == NULL ? "none" : idx->algorithm_names,
  ------------------
  |  Branch (1974:21): [True: 0, False: 0]
  ------------------
 1975|      0|                    idx->property_definition == NULL ? "none" : idx->property_definition,
  ------------------
  |  Branch (1975:21): [True: 0, False: 0]
  ------------------
 1976|      0|                    idx->algorithm_description == NULL ? "none" : idx->algorithm_description);
  ------------------
  |  Branch (1976:21): [True: 0, False: 0]
  ------------------
 1977|      0|            }
 1978|      0|        } else {
 1979|      0|            BIO_printf(trc_out, "(provider %s) query_operation failed\n", prov->name);
 1980|      0|        }
 1981|      0|    }
 1982|  66.2k|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  226|  66.2k|    }                            \
  |  |  227|  66.2k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 66.2k]
  |  |  ------------------
  ------------------
 1983|  66.2k|#endif
 1984|       |
 1985|       |#if defined(OPENSSL_NO_CACHED_FETCH)
 1986|       |    /* Forcing the non-caching of queries */
 1987|       |    if (no_cache != NULL)
 1988|       |        *no_cache = 1;
 1989|       |#endif
 1990|  66.2k|    return res;
 1991|  66.2k|}
ossl_provider_unquery_operation:
 2010|  66.2k|{
 2011|  66.2k|    if (prov->unquery_operation != NULL) {
  ------------------
  |  Branch (2011:9): [True: 0, False: 66.2k]
  ------------------
 2012|      0|#ifndef FIPS_MODULE
 2013|      0|        OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  221|      0|    do {                           \
  |  |  222|      0|        BIO *trc_out = NULL;       \
  |  |  223|      0|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2014|      0|        {
 2015|      0|            BIO_printf(trc_out,
 2016|      0|                "(provider %s) Calling unquery"
 2017|      0|                " with operation %d\n",
 2018|      0|                prov->name,
 2019|      0|                operation_id);
 2020|      0|        }
 2021|      0|        OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  226|      0|    }                            \
  |  |  227|      0|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 0]
  |  |  ------------------
  ------------------
 2022|      0|#endif
 2023|      0|        prov->unquery_operation(prov->provctx, operation_id, algs);
 2024|      0|    }
 2025|  66.2k|}
ossl_provider_set_operation_bit:
 2028|  3.58k|{
 2029|  3.58k|    size_t byte = bitnum / 8;
 2030|  3.58k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2031|       |
 2032|  3.58k|    if (!CRYPTO_THREAD_write_lock(provider->opbits_lock))
  ------------------
  |  Branch (2032:9): [True: 0, False: 3.58k]
  ------------------
 2033|      0|        return 0;
 2034|  3.58k|    if (provider->operation_bits_sz <= byte) {
  ------------------
  |  Branch (2034:9): [True: 1.20k, False: 2.37k]
  ------------------
 2035|  1.20k|        unsigned char *tmp = OPENSSL_realloc(provider->operation_bits,
  ------------------
  |  |  120|  1.20k|    CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2036|  1.20k|            byte + 1);
 2037|       |
 2038|  1.20k|        if (tmp == NULL) {
  ------------------
  |  Branch (2038:13): [True: 0, False: 1.20k]
  ------------------
 2039|      0|            CRYPTO_THREAD_unlock(provider->opbits_lock);
 2040|      0|            return 0;
 2041|      0|        }
 2042|  1.20k|        provider->operation_bits = tmp;
 2043|  1.20k|        memset(provider->operation_bits + provider->operation_bits_sz,
 2044|  1.20k|            '\0', byte + 1 - provider->operation_bits_sz);
 2045|  1.20k|        provider->operation_bits_sz = byte + 1;
 2046|  1.20k|    }
 2047|  3.58k|    provider->operation_bits[byte] |= bit;
 2048|  3.58k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2049|  3.58k|    return 1;
 2050|  3.58k|}
ossl_provider_test_operation_bit:
 2054|  66.2k|{
 2055|  66.2k|    size_t byte = bitnum / 8;
 2056|  66.2k|    unsigned char bit = (1 << (bitnum % 8)) & 0xFF;
 2057|       |
 2058|  66.2k|    if (!ossl_assert(result != NULL)) {
  ------------------
  |  |   52|  66.2k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  66.2k|    __FILE__, __LINE__)
  ------------------
  |  Branch (2058:9): [True: 0, False: 66.2k]
  ------------------
 2059|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 2060|      0|        return 0;
 2061|      0|    }
 2062|       |
 2063|  66.2k|    *result = 0;
 2064|  66.2k|    if (!CRYPTO_THREAD_read_lock(provider->opbits_lock))
  ------------------
  |  Branch (2064:9): [True: 0, False: 66.2k]
  ------------------
 2065|      0|        return 0;
 2066|  66.2k|    if (provider->operation_bits_sz > byte)
  ------------------
  |  Branch (2066:9): [True: 65.0k, False: 1.20k]
  ------------------
 2067|  65.0k|        *result = ((provider->operation_bits[byte] & bit) != 0);
 2068|  66.2k|    CRYPTO_THREAD_unlock(provider->opbits_lock);
 2069|  66.2k|    return 1;
 2070|  66.2k|}
provider_core.c:provider_deactivate_free:
  237|    776|{
  238|    776|    if (prov->flag_activated)
  ------------------
  |  Branch (238:9): [True: 695, False: 81]
  ------------------
  239|    695|        ossl_provider_deactivate(prov, 1);
  240|    776|    ossl_provider_free(prov);
  241|    776|}
provider_core.c:ossl_provider_cmp:
  204|  2.90k|{
  205|  2.90k|    return strcmp((*a)->name, (*b)->name);
  206|  2.90k|}
provider_core.c:get_provider_store:
  330|  69.5k|{
  331|  69.5k|    struct provider_store_st *store = NULL;
  332|       |
  333|  69.5k|    store = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_PROVIDER_STORE_INDEX);
  ------------------
  |  |   97|  69.5k|#define OSSL_LIB_CTX_PROVIDER_STORE_INDEX 1
  ------------------
  334|  69.5k|    if (store == NULL)
  ------------------
  |  Branch (334:9): [True: 0, False: 69.5k]
  ------------------
  335|       |        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  336|  69.5k|    return store;
  337|  69.5k|}
provider_core.c:provider_new:
  444|    931|{
  445|    931|    OSSL_PROVIDER *prov = NULL;
  446|       |
  447|    931|    if ((prov = OPENSSL_zalloc(sizeof(*prov))) == NULL)
  ------------------
  |  |  108|    931|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (447:9): [True: 0, False: 931]
  ------------------
  448|      0|        return NULL;
  449|    931|    if (!CRYPTO_NEW_REF(&prov->refcnt, 1)) {
  ------------------
  |  Branch (449:9): [True: 0, False: 931]
  ------------------
  450|      0|        OPENSSL_free(prov);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  451|      0|        return NULL;
  452|      0|    }
  453|    931|    if ((prov->activatecnt_lock = CRYPTO_THREAD_lock_new()) == NULL) {
  ------------------
  |  Branch (453:9): [True: 0, False: 931]
  ------------------
  454|      0|        ossl_provider_free(prov);
  455|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  456|      0|        return NULL;
  457|      0|    }
  458|       |
  459|    931|    if ((prov->opbits_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (459:9): [True: 0, False: 931]
  ------------------
  460|    931|        || (prov->flag_lock = CRYPTO_THREAD_lock_new()) == NULL
  ------------------
  |  Branch (460:12): [True: 0, False: 931]
  ------------------
  461|    931|        || (prov->parameters = sk_INFOPAIR_deep_copy(parameters,
  ------------------
  |  Branch (461:12): [True: 0, False: 931]
  ------------------
  462|    931|                infopair_copy,
  463|    931|                infopair_free))
  464|    931|            == NULL) {
  465|      0|        ossl_provider_free(prov);
  466|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|        return NULL;
  468|      0|    }
  469|    931|    if ((prov->name = OPENSSL_strdup(name)) == NULL) {
  ------------------
  |  |  135|    931|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (469:9): [True: 0, False: 931]
  ------------------
  470|      0|        ossl_provider_free(prov);
  471|      0|        return NULL;
  472|      0|    }
  473|       |
  474|    931|    prov->init_function = init_function;
  475|       |
  476|    931|    return prov;
  477|    931|}
provider_core.c:create_provider_children:
  631|     81|{
  632|     81|    int ret = 1;
  633|     81|#ifndef FIPS_MODULE
  634|     81|    struct provider_store_st *store = prov->store;
  635|     81|    OSSL_PROVIDER_CHILD_CB *child_cb;
  636|     81|    int i, max;
  637|       |
  638|     81|    max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
  639|     81|    for (i = 0; i < max; i++) {
  ------------------
  |  Branch (639:17): [True: 0, False: 81]
  ------------------
  640|       |        /*
  641|       |         * This is newly activated (activatecnt == 1), so we need to
  642|       |         * create child providers as necessary.
  643|       |         */
  644|      0|        child_cb = sk_OSSL_PROVIDER_CHILD_CB_value(store->child_cbs, i);
  645|      0|        ret &= child_cb->create_cb((OSSL_CORE_HANDLE *)prov, child_cb->cbdata);
  646|      0|    }
  647|     81|#endif
  648|       |
  649|     81|    return ret;
  650|     81|}
provider_core.c:provider_activate:
 1256|    976|{
 1257|    976|    int count = -1;
 1258|    976|    struct provider_store_st *store;
 1259|    976|    int ret = 1;
 1260|       |
 1261|    976|    store = prov->store;
 1262|       |    /*
 1263|       |     * If the provider hasn't been added to the store, then we don't need
 1264|       |     * any locks because we've not shared it with other threads.
 1265|       |     */
 1266|    976|    if (store == NULL) {
  ------------------
  |  Branch (1266:9): [True: 931, False: 45]
  ------------------
 1267|    931|        lock = 0;
 1268|    931|        if (!provider_init(prov))
  ------------------
  |  Branch (1268:13): [True: 155, False: 776]
  ------------------
 1269|    155|            return -1;
 1270|    931|    }
 1271|       |
 1272|    821|#ifndef FIPS_MODULE
 1273|    821|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1273:9): [True: 0, False: 821]
  ------------------
 1274|      0|        && !ossl_rand_check_random_provider_on_load(prov->libctx, prov))
  ------------------
  |  Branch (1274:12): [True: 0, False: 0]
  ------------------
 1275|      0|        return -1;
 1276|       |
 1277|    821|    if (prov->ischild && upcalls && !ossl_provider_up_ref_parent(prov, 1))
  ------------------
  |  Branch (1277:9): [True: 0, False: 821]
  |  Branch (1277:26): [True: 0, False: 0]
  |  Branch (1277:37): [True: 0, False: 0]
  ------------------
 1278|      0|        return -1;
 1279|    821|#endif
 1280|       |
 1281|    821|    if (lock && !CRYPTO_THREAD_read_lock(store->lock)) {
  ------------------
  |  Branch (1281:9): [True: 45, False: 776]
  |  Branch (1281:17): [True: 0, False: 45]
  ------------------
 1282|      0|#ifndef FIPS_MODULE
 1283|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1283:13): [True: 0, False: 0]
  |  Branch (1283:30): [True: 0, False: 0]
  ------------------
 1284|      0|            ossl_provider_free_parent(prov, 1);
 1285|      0|#endif
 1286|      0|        return -1;
 1287|      0|    }
 1288|       |
 1289|    821|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1289:9): [True: 45, False: 776]
  |  Branch (1289:17): [True: 0, False: 45]
  ------------------
 1290|      0|        CRYPTO_THREAD_unlock(store->lock);
 1291|      0|#ifndef FIPS_MODULE
 1292|      0|        if (prov->ischild && upcalls)
  ------------------
  |  Branch (1292:13): [True: 0, False: 0]
  |  Branch (1292:30): [True: 0, False: 0]
  ------------------
 1293|      0|            ossl_provider_free_parent(prov, 1);
 1294|      0|#endif
 1295|      0|        return -1;
 1296|      0|    }
 1297|    821|    if (CRYPTO_atomic_add(&prov->activatecnt, 1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1297:9): [True: 821, False: 0]
  ------------------
 1298|    821|        prov->flag_activated = 1;
 1299|       |
 1300|    821|        if (count == 1 && store != NULL) {
  ------------------
  |  Branch (1300:13): [True: 776, False: 45]
  |  Branch (1300:27): [True: 0, False: 776]
  ------------------
 1301|      0|            ret = create_provider_children(prov);
 1302|      0|        }
 1303|    821|    }
 1304|    821|    if (lock) {
  ------------------
  |  Branch (1304:9): [True: 45, False: 776]
  ------------------
 1305|     45|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1306|     45|        CRYPTO_THREAD_unlock(store->lock);
 1307|       |        /*
 1308|       |         * This can be done outside the lock. We tolerate other threads getting
 1309|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1310|       |         */
 1311|     45|#ifndef FIPS_MODULE
 1312|     45|        if (count == 1)
  ------------------
  |  Branch (1312:13): [True: 0, False: 45]
  ------------------
 1313|      0|            ossl_decoder_cache_flush(prov->libctx);
 1314|     45|#endif
 1315|     45|    }
 1316|       |
 1317|    821|    if (!ret)
  ------------------
  |  Branch (1317:9): [True: 0, False: 821]
  ------------------
 1318|      0|        return -1;
 1319|       |
 1320|    821|    return count;
 1321|    821|}
provider_core.c:provider_init:
  948|    931|{
  949|    931|    const OSSL_DISPATCH *provider_dispatch = NULL;
  950|    931|    void *tmp_provctx = NULL; /* safety measure */
  951|    931|#ifndef OPENSSL_NO_ERR
  952|    931|#ifndef FIPS_MODULE
  953|    931|    OSSL_FUNC_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
  954|    931|#endif
  955|    931|#endif
  956|    931|    int ok = 0;
  957|       |
  958|    931|    if (!ossl_assert(!prov->flag_initialized)) {
  ------------------
  |  |   52|    931|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    931|    __FILE__, __LINE__)
  ------------------
  |  Branch (958:9): [True: 0, False: 931]
  ------------------
  959|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  960|      0|        goto end;
  961|      0|    }
  962|       |
  963|       |    /*
  964|       |     * If the init function isn't set, it indicates that this provider is
  965|       |     * a loadable module.
  966|       |     */
  967|    931|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (967:9): [True: 155, False: 776]
  ------------------
  968|       |#ifdef FIPS_MODULE
  969|       |        goto end;
  970|       |#else
  971|    155|        if (prov->module == NULL) {
  ------------------
  |  Branch (971:13): [True: 155, False: 0]
  ------------------
  972|    155|            char *allocated_path = NULL;
  973|    155|            const char *module_path = NULL;
  974|    155|            char *merged_path = NULL;
  975|    155|            const char *load_dir = NULL;
  976|    155|            char *allocated_load_dir = NULL;
  977|    155|            struct provider_store_st *store;
  978|       |
  979|    155|            if ((prov->module = DSO_new()) == NULL) {
  ------------------
  |  Branch (979:17): [True: 0, False: 155]
  ------------------
  980|       |                /* DSO_new() generates an error already */
  981|      0|                goto end;
  982|      0|            }
  983|       |
  984|    155|            if ((store = get_provider_store(prov->libctx)) == NULL
  ------------------
  |  Branch (984:17): [True: 0, False: 155]
  ------------------
  985|    155|                || !CRYPTO_THREAD_read_lock(store->default_path_lock))
  ------------------
  |  Branch (985:20): [True: 0, False: 155]
  ------------------
  986|      0|                goto end;
  987|       |
  988|    155|            if (store->default_path != NULL) {
  ------------------
  |  Branch (988:17): [True: 0, False: 155]
  ------------------
  989|      0|                allocated_load_dir = OPENSSL_strdup(store->default_path);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  990|      0|                CRYPTO_THREAD_unlock(store->default_path_lock);
  991|      0|                if (allocated_load_dir == NULL)
  ------------------
  |  Branch (991:21): [True: 0, False: 0]
  ------------------
  992|      0|                    goto end;
  993|      0|                load_dir = allocated_load_dir;
  994|    155|            } else {
  995|    155|                CRYPTO_THREAD_unlock(store->default_path_lock);
  996|    155|            }
  997|       |
  998|    155|            if (load_dir == NULL) {
  ------------------
  |  Branch (998:17): [True: 155, False: 0]
  ------------------
  999|    155|                load_dir = ossl_safe_getenv("OPENSSL_MODULES");
 1000|    155|                if (load_dir == NULL)
  ------------------
  |  Branch (1000:21): [True: 155, False: 0]
  ------------------
 1001|    155|                    load_dir = ossl_get_modulesdir();
 1002|    155|            }
 1003|       |
 1004|    155|            DSO_ctrl(prov->module, DSO_CTRL_SET_FLAGS,
  ------------------
  |  |   19|    155|#define DSO_CTRL_SET_FLAGS 2
  ------------------
 1005|    155|                DSO_FLAG_NAME_TRANSLATION_EXT_ONLY, NULL);
  ------------------
  |  |   41|    155|#define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY 0x02
  ------------------
 1006|       |
 1007|    155|            module_path = prov->path;
 1008|    155|            if (module_path == NULL)
  ------------------
  |  Branch (1008:17): [True: 155, False: 0]
  ------------------
 1009|    155|                module_path = allocated_path = DSO_convert_filename(prov->module, prov->name);
 1010|    155|            if (module_path != NULL)
  ------------------
  |  Branch (1010:17): [True: 155, False: 0]
  ------------------
 1011|    155|                merged_path = DSO_merge(prov->module, module_path, load_dir);
 1012|       |
 1013|    155|            if (merged_path == NULL
  ------------------
  |  Branch (1013:17): [True: 0, False: 155]
  ------------------
 1014|    155|                || (DSO_load(prov->module, merged_path, NULL, 0)) == NULL) {
  ------------------
  |  Branch (1014:20): [True: 155, False: 0]
  ------------------
 1015|    155|                DSO_free(prov->module);
 1016|    155|                prov->module = NULL;
 1017|    155|            }
 1018|       |
 1019|    155|            OPENSSL_free(merged_path);
  ------------------
  |  |  131|    155|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1020|    155|            OPENSSL_free(allocated_path);
  ------------------
  |  |  131|    155|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1021|    155|            OPENSSL_free(allocated_load_dir);
  ------------------
  |  |  131|    155|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1022|    155|        }
 1023|       |
 1024|    155|        if (prov->module == NULL) {
  ------------------
  |  Branch (1024:13): [True: 155, False: 0]
  ------------------
 1025|       |            /* DSO has already recorded errors, this is just a tracepoint */
 1026|    155|            ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  406|    155|    (ERR_new(),                                                  \
  |  |  407|    155|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|    155|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|    155|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |   87|    155|#define ERR_LIB_CRYPTO 15
  ------------------
                          ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_DSO_LIB,
  ------------------
  |  |  336|    155|#define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  100|    155|#define ERR_LIB_DSO 37
  |  |  ------------------
  |  |               #define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|    155|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|    155|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1027|    155|                "name=%s", prov->name);
 1028|    155|            goto end;
 1029|    155|        }
 1030|       |
 1031|      0|        prov->init_function = (OSSL_provider_init_fn *)
 1032|      0|            DSO_bind_func(prov->module, "OSSL_provider_init");
 1033|      0|#endif
 1034|      0|    }
 1035|       |
 1036|       |    /* Check for and call the initialise function for the provider. */
 1037|    776|    if (prov->init_function == NULL) {
  ------------------
  |  Branch (1037:9): [True: 0, False: 776]
  ------------------
 1038|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_UNSUPPORTED,
  ------------------
  |  |  364|      0|#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1039|      0|            "name=%s, provider has no provider init function",
 1040|      0|            prov->name);
 1041|      0|        goto end;
 1042|      0|    }
 1043|    776|#ifndef FIPS_MODULE
 1044|    776|    OSSL_TRACE_BEGIN(PROVIDER)
  ------------------
  |  |  221|    776|    do {                           \
  |  |  222|    776|        BIO *trc_out = NULL;       \
  |  |  223|    776|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 776]
  |  |  ------------------
  ------------------
 1045|      0|    {
 1046|      0|        BIO_printf(trc_out,
 1047|      0|            "(provider %s) initializing\n", prov->name);
 1048|      0|    }
 1049|    776|    OSSL_TRACE_END(PROVIDER);
  ------------------
  |  |  226|    776|    }                            \
  |  |  227|    776|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 776]
  |  |  ------------------
  ------------------
 1050|    776|#endif
 1051|       |
 1052|    776|    if (!prov->init_function((OSSL_CORE_HANDLE *)prov, core_dispatch,
  ------------------
  |  Branch (1052:9): [True: 0, False: 776]
  ------------------
 1053|    776|            &provider_dispatch, &tmp_provctx)) {
 1054|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_INIT_FAIL,
  ------------------
  |  |  357|      0|#define ERR_R_INIT_FAIL (261 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1055|      0|            "name=%s", prov->name);
 1056|      0|        goto end;
 1057|      0|    }
 1058|    776|    prov->provctx = tmp_provctx;
 1059|    776|    prov->dispatch = provider_dispatch;
 1060|       |
 1061|    776|    if (provider_dispatch != NULL) {
  ------------------
  |  Branch (1061:9): [True: 776, False: 0]
  ------------------
 1062|  4.55k|        for (; provider_dispatch->function_id != 0; provider_dispatch++) {
  ------------------
  |  Branch (1062:16): [True: 3.78k, False: 776]
  ------------------
 1063|  3.78k|            switch (provider_dispatch->function_id) {
  ------------------
  |  Branch (1063:21): [True: 3.78k, False: 0]
  ------------------
 1064|    758|            case OSSL_FUNC_PROVIDER_TEARDOWN:
  ------------------
  |  |  234|    758|#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
  ------------------
  |  Branch (1064:13): [True: 758, False: 3.02k]
  ------------------
 1065|    758|                prov->teardown = OSSL_FUNC_provider_teardown(provider_dispatch);
 1066|    758|                break;
 1067|    776|            case OSSL_FUNC_PROVIDER_GETTABLE_PARAMS:
  ------------------
  |  |  236|    776|#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
  ------------------
  |  Branch (1067:13): [True: 776, False: 3.00k]
  ------------------
 1068|    776|                prov->gettable_params = OSSL_FUNC_provider_gettable_params(provider_dispatch);
 1069|    776|                break;
 1070|    776|            case OSSL_FUNC_PROVIDER_GET_PARAMS:
  ------------------
  |  |  239|    776|#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
  ------------------
  |  Branch (1070:13): [True: 776, False: 3.00k]
  ------------------
 1071|    776|                prov->get_params = OSSL_FUNC_provider_get_params(provider_dispatch);
 1072|    776|                break;
 1073|      0|            case OSSL_FUNC_PROVIDER_SELF_TEST:
  ------------------
  |  |  252|      0|#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
  ------------------
  |  Branch (1073:13): [True: 0, False: 3.78k]
  ------------------
 1074|      0|                prov->self_test = OSSL_FUNC_provider_self_test(provider_dispatch);
 1075|      0|                break;
 1076|      0|            case OSSL_FUNC_PROVIDER_RANDOM_BYTES:
  ------------------
  |  |  254|      0|#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
  ------------------
  |  Branch (1076:13): [True: 0, False: 3.78k]
  ------------------
 1077|      0|                prov->random_bytes = OSSL_FUNC_provider_random_bytes(provider_dispatch);
 1078|      0|                break;
 1079|    695|            case OSSL_FUNC_PROVIDER_GET_CAPABILITIES:
  ------------------
  |  |  250|    695|#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
  ------------------
  |  Branch (1079:13): [True: 695, False: 3.08k]
  ------------------
 1080|    695|                prov->get_capabilities = OSSL_FUNC_provider_get_capabilities(provider_dispatch);
 1081|    695|                break;
 1082|    776|            case OSSL_FUNC_PROVIDER_QUERY_OPERATION:
  ------------------
  |  |  241|    776|#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
  ------------------
  |  Branch (1082:13): [True: 776, False: 3.00k]
  ------------------
 1083|    776|                prov->query_operation = OSSL_FUNC_provider_query_operation(provider_dispatch);
 1084|    776|                break;
 1085|      0|            case OSSL_FUNC_PROVIDER_UNQUERY_OPERATION:
  ------------------
  |  |  244|      0|#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
  ------------------
  |  Branch (1085:13): [True: 0, False: 3.78k]
  ------------------
 1086|      0|                prov->unquery_operation = OSSL_FUNC_provider_unquery_operation(provider_dispatch);
 1087|      0|                break;
 1088|      0|#ifndef OPENSSL_NO_ERR
 1089|      0|#ifndef FIPS_MODULE
 1090|      0|            case OSSL_FUNC_PROVIDER_GET_REASON_STRINGS:
  ------------------
  |  |  247|      0|#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
  ------------------
  |  Branch (1090:13): [True: 0, False: 3.78k]
  ------------------
 1091|      0|                p_get_reason_strings = OSSL_FUNC_provider_get_reason_strings(provider_dispatch);
 1092|      0|                break;
 1093|  3.78k|#endif
 1094|  3.78k|#endif
 1095|  3.78k|            }
 1096|  3.78k|        }
 1097|    776|    }
 1098|       |
 1099|    776|#ifndef OPENSSL_NO_ERR
 1100|    776|#ifndef FIPS_MODULE
 1101|    776|    if (p_get_reason_strings != NULL) {
  ------------------
  |  Branch (1101:9): [True: 0, False: 776]
  ------------------
 1102|      0|        const OSSL_ITEM *reasonstrings = p_get_reason_strings(prov->provctx);
 1103|      0|        size_t cnt, cnt2;
 1104|       |
 1105|       |        /*
 1106|       |         * ERR_load_strings() handles ERR_STRING_DATA rather than OSSL_ITEM,
 1107|       |         * although they are essentially the same type.
 1108|       |         * Furthermore, ERR_load_strings() patches the array's error number
 1109|       |         * with the error library number, so we need to make a copy of that
 1110|       |         * array either way.
 1111|       |         */
 1112|      0|        cnt = 0;
 1113|      0|        while (reasonstrings[cnt].id != 0) {
  ------------------
  |  Branch (1113:16): [True: 0, False: 0]
  ------------------
 1114|      0|            if (ERR_GET_LIB(reasonstrings[cnt].id) != 0)
  ------------------
  |  Branch (1114:17): [True: 0, False: 0]
  ------------------
 1115|      0|                goto end;
 1116|      0|            cnt++;
 1117|      0|        }
 1118|      0|        cnt++; /* One for the terminating item */
 1119|       |
 1120|       |        /* Allocate one extra item for the "library" name */
 1121|      0|        prov->error_strings = OPENSSL_calloc(cnt + 1, sizeof(ERR_STRING_DATA));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1122|      0|        if (prov->error_strings == NULL)
  ------------------
  |  Branch (1122:13): [True: 0, False: 0]
  ------------------
 1123|      0|            goto end;
 1124|       |
 1125|       |        /*
 1126|       |         * Set the "library" name.
 1127|       |         */
 1128|      0|        prov->error_strings[0].error = ERR_PACK(prov->error_lib, 0, 0);
  ------------------
  |  |  281|      0|    ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  229|      0|#define ERR_LIB_MASK 0xFF
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  228|      0|#define ERR_LIB_OFFSET 23L
  |  |  ------------------
  |  |                   ((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
  |  |  ------------------
  |  |  |  |  232|      0|#define ERR_REASON_MASK 0X7FFFFF
  |  |  ------------------
  ------------------
 1129|      0|        prov->error_strings[0].string = prov->name;
 1130|       |        /*
 1131|       |         * Copy reasonstrings item 0..cnt-1 to prov->error_trings positions
 1132|       |         * 1..cnt.
 1133|       |         */
 1134|      0|        for (cnt2 = 1; cnt2 <= cnt; cnt2++) {
  ------------------
  |  Branch (1134:24): [True: 0, False: 0]
  ------------------
 1135|      0|            prov->error_strings[cnt2].error = (int)reasonstrings[cnt2 - 1].id;
 1136|      0|            prov->error_strings[cnt2].string = reasonstrings[cnt2 - 1].ptr;
 1137|      0|        }
 1138|       |
 1139|      0|        ERR_load_strings(prov->error_lib, prov->error_strings);
 1140|      0|    }
 1141|    776|#endif
 1142|    776|#endif
 1143|       |
 1144|       |    /* With this flag set, this provider has become fully "loaded". */
 1145|    776|    prov->flag_initialized = 1;
 1146|    776|    ok = 1;
 1147|       |
 1148|    931|end:
 1149|    931|    return ok;
 1150|    776|}
provider_core.c:core_get_params:
 2322|  3.70k|{
 2323|  3.70k|    OSSL_PARAM *p;
 2324|       |    /*
 2325|       |     * We created this object originally and we know it is actually an
 2326|       |     * OSSL_PROVIDER *, so the cast is safe
 2327|       |     */
 2328|  3.70k|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2329|       |
 2330|  3.70k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_VERSION)) != NULL)
  ------------------
  |  |  503|  3.70k|# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
  ------------------
  |  Branch (2330:9): [True: 0, False: 3.70k]
  ------------------
 2331|      0|        OSSL_PARAM_set_utf8_ptr(p, OPENSSL_VERSION_STR);
  ------------------
  |  |   90|      0|# define OPENSSL_VERSION_STR "3.6.2"
  ------------------
 2332|  3.70k|    if ((p = OSSL_PARAM_locate(params, OSSL_PROV_PARAM_CORE_PROV_NAME)) != NULL)
  ------------------
  |  |  502|  3.70k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  |  Branch (2332:9): [True: 0, False: 3.70k]
  ------------------
 2333|      0|        OSSL_PARAM_set_utf8_ptr(p, prov->name);
 2334|       |
 2335|  3.70k|#ifndef FIPS_MODULE
 2336|  3.70k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (2336:9): [True: 0, False: 3.70k]
  ------------------
 2337|  3.70k|             OSSL_PROV_PARAM_CORE_MODULE_FILENAME))
  ------------------
  |  |  501|  3.70k|# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
  ------------------
 2338|  3.70k|        != NULL)
 2339|      0|        OSSL_PARAM_set_utf8_ptr(p, ossl_provider_module_path(prov));
 2340|  3.70k|#endif
 2341|       |
 2342|  3.70k|    return OSSL_PROVIDER_get_conf_parameters(prov, params);
 2343|  3.70k|}
provider_core.c:core_get_libctx:
 2346|    758|{
 2347|       |    /*
 2348|       |     * We created this object originally and we know it is actually an
 2349|       |     * OSSL_PROVIDER *, so the cast is safe
 2350|       |     */
 2351|    758|    OSSL_PROVIDER *prov = (OSSL_PROVIDER *)handle;
 2352|       |
 2353|       |    /*
 2354|       |     * Using ossl_provider_libctx would be wrong as that returns
 2355|       |     * NULL for |prov| == NULL and NULL libctx has a special meaning
 2356|       |     * that does not apply here. Here |prov| == NULL can happen only in
 2357|       |     * case of a coding error.
 2358|       |     */
 2359|    758|    assert(prov != NULL);
  ------------------
  |  Branch (2359:5): [True: 0, False: 758]
  |  Branch (2359:5): [True: 758, False: 0]
  ------------------
 2360|    758|    return (OPENSSL_CORE_CTX *)prov->libctx;
 2361|    758|}
provider_core.c:provider_flush_store_cache:
 1324|     81|{
 1325|     81|    struct provider_store_st *store;
 1326|     81|    int freeing;
 1327|       |
 1328|     81|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1328:9): [True: 0, False: 81]
  ------------------
 1329|      0|        return 0;
 1330|       |
 1331|     81|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1331:9): [True: 0, False: 81]
  ------------------
 1332|      0|        return 0;
 1333|     81|    freeing = store->freeing;
 1334|     81|    CRYPTO_THREAD_unlock(store->lock);
 1335|       |
 1336|     81|    if (!freeing) {
  ------------------
  |  Branch (1336:9): [True: 81, False: 0]
  ------------------
 1337|     81|        int acc
 1338|     81|            = evp_method_store_cache_flush(prov->libctx)
 1339|     81|#ifndef FIPS_MODULE
 1340|     81|            + ossl_encoder_store_cache_flush(prov->libctx)
 1341|     81|            + ossl_decoder_store_cache_flush(prov->libctx)
 1342|     81|            + ossl_store_loader_store_cache_flush(prov->libctx)
 1343|     81|#endif
 1344|     81|            ;
 1345|       |
 1346|     81|#ifndef FIPS_MODULE
 1347|     81|        return acc == 4;
 1348|       |#else
 1349|       |        return acc == 1;
 1350|       |#endif
 1351|     81|    }
 1352|      0|    return 1;
 1353|     81|}
provider_core.c:provider_deactivate:
 1160|    821|{
 1161|    821|    int count;
 1162|    821|    struct provider_store_st *store;
 1163|    821|#ifndef FIPS_MODULE
 1164|    821|    int freeparent = 0;
 1165|    821|#endif
 1166|    821|    int lock = 1;
 1167|       |
 1168|    821|    if (!ossl_assert(prov != NULL))
  ------------------
  |  |   52|    821|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    821|    __FILE__, __LINE__)
  ------------------
  |  Branch (1168:9): [True: 0, False: 821]
  ------------------
 1169|      0|        return -1;
 1170|       |
 1171|    821|#ifndef FIPS_MODULE
 1172|    821|    if (prov->random_bytes != NULL
  ------------------
  |  Branch (1172:9): [True: 0, False: 821]
  ------------------
 1173|      0|        && !ossl_rand_check_random_provider_on_unload(prov->libctx, prov))
  ------------------
  |  Branch (1173:12): [True: 0, False: 0]
  ------------------
 1174|      0|        return -1;
 1175|    821|#endif
 1176|       |
 1177|       |    /*
 1178|       |     * No need to lock if we've got no store because we've not been shared with
 1179|       |     * other threads.
 1180|       |     */
 1181|    821|    store = get_provider_store(prov->libctx);
 1182|    821|    if (store == NULL)
  ------------------
  |  Branch (1182:9): [True: 0, False: 821]
  ------------------
 1183|      0|        lock = 0;
 1184|       |
 1185|    821|    if (lock && !CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1185:9): [True: 821, False: 0]
  |  Branch (1185:17): [True: 0, False: 821]
  ------------------
 1186|      0|        return -1;
 1187|    821|    if (lock && !CRYPTO_THREAD_write_lock(prov->flag_lock)) {
  ------------------
  |  Branch (1187:9): [True: 821, False: 0]
  |  Branch (1187:17): [True: 0, False: 821]
  ------------------
 1188|      0|        CRYPTO_THREAD_unlock(store->lock);
 1189|      0|        return -1;
 1190|      0|    }
 1191|       |
 1192|    821|    if (!CRYPTO_atomic_add(&prov->activatecnt, -1, &count, prov->activatecnt_lock)) {
  ------------------
  |  Branch (1192:9): [True: 0, False: 821]
  ------------------
 1193|      0|        if (lock) {
  ------------------
  |  Branch (1193:13): [True: 0, False: 0]
  ------------------
 1194|      0|            CRYPTO_THREAD_unlock(prov->flag_lock);
 1195|      0|            CRYPTO_THREAD_unlock(store->lock);
 1196|      0|        }
 1197|      0|        return -1;
 1198|      0|    }
 1199|       |
 1200|    821|#ifndef FIPS_MODULE
 1201|    821|    if (count >= 1 && prov->ischild && upcalls) {
  ------------------
  |  Branch (1201:9): [True: 45, False: 776]
  |  Branch (1201:23): [True: 0, False: 45]
  |  Branch (1201:40): [True: 0, False: 0]
  ------------------
 1202|       |        /*
 1203|       |         * We have had a direct activation in this child libctx so we need to
 1204|       |         * now down the ref count in the parent provider. We do the actual down
 1205|       |         * ref outside of the flag_lock, since it could involve getting other
 1206|       |         * locks.
 1207|       |         */
 1208|      0|        freeparent = 1;
 1209|      0|    }
 1210|    821|#endif
 1211|       |
 1212|    821|    if (count < 1)
  ------------------
  |  Branch (1212:9): [True: 776, False: 45]
  ------------------
 1213|    776|        prov->flag_activated = 0;
 1214|     45|#ifndef FIPS_MODULE
 1215|     45|    else
 1216|     45|        removechildren = 0;
 1217|    821|#endif
 1218|       |
 1219|    821|#ifndef FIPS_MODULE
 1220|    821|    if (removechildren && store != NULL) {
  ------------------
  |  Branch (1220:9): [True: 776, False: 45]
  |  Branch (1220:27): [True: 776, False: 0]
  ------------------
 1221|    776|        int i, max = sk_OSSL_PROVIDER_CHILD_CB_num(store->child_cbs);
 1222|    776|        OSSL_PROVIDER_CHILD_CB *child_cb;
 1223|       |
 1224|    776|        for (i = 0; i < max; i++) {
  ------------------
  |  Branch (1224:21): [True: 0, False: 776]
  ------------------
 1225|      0|            child_cb = sk_OSSL_PROVIDER_CHILD_CB_value(store->child_cbs, i);
 1226|      0|            child_cb->remove_cb((OSSL_CORE_HANDLE *)prov, child_cb->cbdata);
 1227|      0|        }
 1228|    776|    }
 1229|    821|#endif
 1230|    821|    if (lock) {
  ------------------
  |  Branch (1230:9): [True: 821, False: 0]
  ------------------
 1231|    821|        CRYPTO_THREAD_unlock(prov->flag_lock);
 1232|    821|        CRYPTO_THREAD_unlock(store->lock);
 1233|       |        /*
 1234|       |         * This can be done outside the lock. We tolerate other threads getting
 1235|       |         * the wrong result briefly when creating OSSL_DECODER_CTXs.
 1236|       |         */
 1237|    821|#ifndef FIPS_MODULE
 1238|    821|        if (count < 1)
  ------------------
  |  Branch (1238:13): [True: 776, False: 45]
  ------------------
 1239|    776|            ossl_decoder_cache_flush(prov->libctx);
 1240|    821|#endif
 1241|    821|    }
 1242|    821|#ifndef FIPS_MODULE
 1243|    821|    if (freeparent)
  ------------------
  |  Branch (1243:9): [True: 0, False: 821]
  ------------------
 1244|      0|        ossl_provider_free_parent(prov, 1);
 1245|    821|#endif
 1246|       |
 1247|       |    /* We don't deinit here, that's done in ossl_provider_free() */
 1248|    821|    return count;
 1249|    821|}
provider_core.c:provider_remove_store_methods:
 1356|    776|{
 1357|    776|    struct provider_store_st *store;
 1358|    776|    int freeing;
 1359|       |
 1360|    776|    if ((store = get_provider_store(prov->libctx)) == NULL)
  ------------------
  |  Branch (1360:9): [True: 0, False: 776]
  ------------------
 1361|      0|        return 0;
 1362|       |
 1363|    776|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1363:9): [True: 0, False: 776]
  ------------------
 1364|      0|        return 0;
 1365|    776|    freeing = store->freeing;
 1366|    776|    CRYPTO_THREAD_unlock(store->lock);
 1367|       |
 1368|    776|    if (!freeing) {
  ------------------
  |  Branch (1368:9): [True: 81, False: 695]
  ------------------
 1369|     81|        int acc;
 1370|       |
 1371|     81|        if (!CRYPTO_THREAD_write_lock(prov->opbits_lock))
  ------------------
  |  Branch (1371:13): [True: 0, False: 81]
  ------------------
 1372|      0|            return 0;
 1373|     81|        OPENSSL_free(prov->operation_bits);
  ------------------
  |  |  131|     81|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1374|     81|        prov->operation_bits = NULL;
 1375|     81|        prov->operation_bits_sz = 0;
 1376|     81|        CRYPTO_THREAD_unlock(prov->opbits_lock);
 1377|       |
 1378|     81|        acc = evp_method_store_remove_all_provided(prov)
 1379|     81|#ifndef FIPS_MODULE
 1380|     81|            + ossl_encoder_store_remove_all_provided(prov)
 1381|     81|            + ossl_decoder_store_remove_all_provided(prov)
 1382|     81|            + ossl_store_loader_store_remove_all_provided(prov)
 1383|     81|#endif
 1384|     81|            ;
 1385|       |
 1386|     81|#ifndef FIPS_MODULE
 1387|     81|        return acc == 4;
 1388|       |#else
 1389|       |        return acc == 1;
 1390|       |#endif
 1391|     81|    }
 1392|    695|    return 1;
 1393|    776|}
provider_core.c:provider_activate_fallbacks:
 1436|  64.9k|{
 1437|  64.9k|    int use_fallbacks;
 1438|  64.9k|    int activated_fallback_count = 0;
 1439|  64.9k|    int ret = 0;
 1440|  64.9k|    const OSSL_PROVIDER_INFO *p;
 1441|       |
 1442|  64.9k|    if (!CRYPTO_THREAD_read_lock(store->lock))
  ------------------
  |  Branch (1442:9): [True: 0, False: 64.9k]
  ------------------
 1443|      0|        return 0;
 1444|  64.9k|    use_fallbacks = store->use_fallbacks;
 1445|  64.9k|    CRYPTO_THREAD_unlock(store->lock);
 1446|  64.9k|    if (!use_fallbacks)
  ------------------
  |  Branch (1446:9): [True: 64.2k, False: 695]
  ------------------
 1447|  64.2k|        return 1;
 1448|       |
 1449|    695|    if (!CRYPTO_THREAD_write_lock(store->lock))
  ------------------
  |  Branch (1449:9): [True: 0, False: 695]
  ------------------
 1450|      0|        return 0;
 1451|       |    /* Check again, just in case another thread changed it */
 1452|    695|    use_fallbacks = store->use_fallbacks;
 1453|    695|    if (!use_fallbacks) {
  ------------------
  |  Branch (1453:9): [True: 0, False: 695]
  ------------------
 1454|      0|        CRYPTO_THREAD_unlock(store->lock);
 1455|      0|        return 1;
 1456|      0|    }
 1457|       |
 1458|  2.78k|    for (p = ossl_predefined_providers; p->name != NULL; p++) {
  ------------------
  |  Branch (1458:41): [True: 2.08k, False: 695]
  ------------------
 1459|  2.08k|        OSSL_PROVIDER *prov = NULL;
 1460|  2.08k|        OSSL_PROVIDER_INFO *info = store->provinfo;
 1461|  2.08k|        STACK_OF(INFOPAIR) *params = NULL;
  ------------------
  |  |   33|  2.08k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1462|  2.08k|        size_t i;
 1463|       |
 1464|  2.08k|        if (!p->is_fallback)
  ------------------
  |  Branch (1464:13): [True: 1.39k, False: 695]
  ------------------
 1465|  1.39k|            continue;
 1466|       |
 1467|    695|        for (i = 0; i < store->numprovinfo; info++, i++) {
  ------------------
  |  Branch (1467:21): [True: 0, False: 695]
  ------------------
 1468|      0|            if (strcmp(info->name, p->name) != 0)
  ------------------
  |  Branch (1468:17): [True: 0, False: 0]
  ------------------
 1469|      0|                continue;
 1470|      0|            params = info->parameters;
 1471|      0|            break;
 1472|      0|        }
 1473|       |
 1474|       |        /*
 1475|       |         * We use the internal constructor directly here,
 1476|       |         * otherwise we get a call loop
 1477|       |         */
 1478|    695|        prov = provider_new(p->name, p->init, params);
 1479|    695|        if (prov == NULL)
  ------------------
  |  Branch (1479:13): [True: 0, False: 695]
  ------------------
 1480|      0|            goto err;
 1481|    695|        prov->libctx = store->libctx;
 1482|    695|#ifndef FIPS_MODULE
 1483|    695|        prov->error_lib = ERR_get_next_error_library();
 1484|    695|#endif
 1485|       |
 1486|       |        /*
 1487|       |         * We are calling provider_activate while holding the store lock. This
 1488|       |         * means the init function will be called while holding a lock. Normally
 1489|       |         * we try to avoid calling a user callback while holding a lock.
 1490|       |         * However, fallbacks are never third party providers so we accept this.
 1491|       |         */
 1492|    695|        if (provider_activate(prov, 0, 0) < 0) {
  ------------------
  |  Branch (1492:13): [True: 0, False: 695]
  ------------------
 1493|      0|            ossl_provider_free(prov);
 1494|      0|            goto err;
 1495|      0|        }
 1496|    695|        prov->store = store;
 1497|    695|        if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0) {
  ------------------
  |  Branch (1497:13): [True: 0, False: 695]
  ------------------
 1498|      0|            ossl_provider_free(prov);
 1499|      0|            goto err;
 1500|      0|        }
 1501|    695|        activated_fallback_count++;
 1502|    695|    }
 1503|       |
 1504|    695|    if (activated_fallback_count > 0) {
  ------------------
  |  Branch (1504:9): [True: 695, False: 0]
  ------------------
 1505|    695|        store->use_fallbacks = 0;
 1506|    695|        ret = 1;
 1507|    695|    }
 1508|    695|err:
 1509|    695|    CRYPTO_THREAD_unlock(store->lock);
 1510|    695|    return ret;
 1511|    695|}

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

ossl_rand_cleanup_int:
  163|      1|{
  164|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  165|      1|    const RAND_METHOD *meth = default_RAND_meth;
  166|       |
  167|      1|    if (!rand_inited)
  ------------------
  |  Branch (167:9): [True: 0, False: 1]
  ------------------
  168|      0|        return;
  169|       |
  170|      1|    if (meth != NULL && meth->cleanup != NULL)
  ------------------
  |  Branch (170:9): [True: 1, False: 0]
  |  Branch (170:25): [True: 0, False: 1]
  ------------------
  171|      0|        meth->cleanup();
  172|      1|    RAND_set_rand_method(NULL);
  173|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  174|      1|    ossl_rand_pool_cleanup();
  175|      1|#ifndef OPENSSL_NO_ENGINE
  176|      1|    CRYPTO_THREAD_lock_free(rand_engine_lock);
  177|      1|    rand_engine_lock = NULL;
  178|      1|#endif /* !OPENSSL_NO_ENGINE */
  179|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  180|      1|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  181|       |    rand_meth_lock = NULL;
  182|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  183|      1|    ossl_release_default_drbg_ctx();
  184|      1|    rand_inited = 0;
  185|      1|}
RAND_set_rand_method:
  265|      1|{
  266|       |    return rand_set_rand_method_internal(meth, NULL);
  267|      1|}
RAND_get_rand_method:
  270|  32.7k|{
  271|  32.7k|    const RAND_METHOD *tmp_meth = NULL;
  272|       |
  273|  32.7k|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|  32.7k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 32.7k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (273:9): [True: 0, False: 32.7k]
  ------------------
  274|      0|        return NULL;
  275|       |
  276|  32.7k|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (276:9): [True: 0, False: 32.7k]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  32.7k|    if (!CRYPTO_THREAD_read_lock(rand_meth_lock))
  ------------------
  |  Branch (279:9): [True: 0, False: 32.7k]
  ------------------
  280|      0|        return NULL;
  281|  32.7k|    tmp_meth = default_RAND_meth;
  282|  32.7k|    CRYPTO_THREAD_unlock(rand_meth_lock);
  283|  32.7k|    if (tmp_meth != NULL)
  ------------------
  |  Branch (283:9): [True: 32.7k, False: 1]
  ------------------
  284|  32.7k|        return tmp_meth;
  285|       |
  286|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (286:9): [True: 0, False: 1]
  ------------------
  287|      0|        return NULL;
  288|      1|    if (default_RAND_meth == NULL) {
  ------------------
  |  Branch (288:9): [True: 1, False: 0]
  ------------------
  289|      1|#ifndef OPENSSL_NO_ENGINE
  290|      1|        ENGINE *e;
  291|       |
  292|       |        /* If we have an engine that can do RAND, use it. */
  293|      1|        if ((e = ENGINE_get_default_RAND()) != NULL
  ------------------
  |  Branch (293:13): [True: 0, False: 1]
  ------------------
  294|      0|            && (tmp_meth = ENGINE_get_RAND(e)) != NULL) {
  ------------------
  |  Branch (294:16): [True: 0, False: 0]
  ------------------
  295|      0|            funct_ref = e;
  296|      0|            default_RAND_meth = tmp_meth;
  297|      1|        } else {
  298|      1|            ENGINE_finish(e);
  299|      1|            default_RAND_meth = &ossl_rand_meth;
  300|      1|        }
  301|       |#else
  302|       |        default_RAND_meth = &ossl_rand_meth;
  303|       |#endif
  304|      1|    }
  305|      1|    tmp_meth = default_RAND_meth;
  306|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  307|      1|    return tmp_meth;
  308|      1|}
RAND_status:
  392|  9.99k|{
  393|  9.99k|    EVP_RAND_CTX *rand;
  394|  9.99k|#ifndef OPENSSL_NO_DEPRECATED_3_0
  395|  9.99k|    const RAND_METHOD *meth = RAND_get_rand_method();
  396|       |
  397|  9.99k|    if (meth != NULL && meth != RAND_OpenSSL())
  ------------------
  |  Branch (397:9): [True: 9.99k, False: 0]
  |  Branch (397:25): [True: 0, False: 9.99k]
  ------------------
  398|      0|        return meth->status != NULL ? meth->status() : 0;
  ------------------
  |  Branch (398:16): [True: 0, False: 0]
  ------------------
  399|  9.99k|#endif
  400|       |
  401|  9.99k|    if ((rand = RAND_get0_primary(NULL)) == NULL)
  ------------------
  |  Branch (401:9): [True: 0, False: 9.99k]
  ------------------
  402|      0|        return 0;
  403|  9.99k|    return EVP_RAND_get_state(rand) == EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|  9.99k|#define EVP_RAND_STATE_READY 1
  ------------------
  404|  9.99k|}
RAND_priv_bytes_ex:
  422|  9.89k|{
  423|  9.89k|    RAND_GLOBAL *dgbl;
  424|  9.89k|    EVP_RAND_CTX *rand;
  425|  9.89k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  426|  9.89k|    const RAND_METHOD *meth = RAND_get_rand_method();
  427|       |
  428|  9.89k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (428:9): [True: 9.89k, False: 0]
  |  Branch (428:25): [True: 0, False: 9.89k]
  ------------------
  429|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (429:13): [True: 0, False: 0]
  ------------------
  430|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  431|      0|            return -1;
  432|      0|        }
  433|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (433:13): [True: 0, False: 0]
  ------------------
  434|      0|            return meth->bytes(buf, (int)num);
  435|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  436|      0|        return -1;
  437|      0|    }
  438|  9.89k|#endif
  439|       |
  440|  9.89k|    dgbl = rand_get_global(ctx);
  441|  9.89k|    if (dgbl == NULL)
  ------------------
  |  Branch (441:9): [True: 0, False: 9.89k]
  ------------------
  442|      0|        return 0;
  443|  9.89k|#ifndef FIPS_MODULE
  444|  9.89k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (444:9): [True: 0, False: 9.89k]
  ------------------
  445|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  446|      0|            OSSL_PROV_RANDOM_PRIVATE,
  ------------------
  |  |  127|      0|#define OSSL_PROV_RANDOM_PRIVATE 1
  ------------------
  447|      0|            buf, num, strength);
  448|  9.89k|#endif /* !FIPS_MODULE */
  449|  9.89k|    rand = rand_get0_private(ctx, dgbl);
  450|  9.89k|    if (rand != NULL)
  ------------------
  |  Branch (450:9): [True: 9.89k, False: 0]
  ------------------
  451|  9.89k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  452|       |
  453|      0|    return 0;
  454|  9.89k|}
RAND_bytes_ex:
  465|  12.8k|{
  466|  12.8k|    RAND_GLOBAL *dgbl;
  467|  12.8k|    EVP_RAND_CTX *rand;
  468|  12.8k|#if !defined(OPENSSL_NO_DEPRECATED_3_0) && !defined(FIPS_MODULE)
  469|  12.8k|    const RAND_METHOD *meth = RAND_get_rand_method();
  470|       |
  471|  12.8k|    if (meth != NULL && meth != RAND_OpenSSL()) {
  ------------------
  |  Branch (471:9): [True: 12.8k, False: 0]
  |  Branch (471:25): [True: 0, False: 12.8k]
  ------------------
  472|      0|        if (num > INT_MAX) {
  ------------------
  |  Branch (472:13): [True: 0, False: 0]
  ------------------
  473|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  474|      0|            return -1;
  475|      0|        }
  476|      0|        if (meth->bytes != NULL)
  ------------------
  |  Branch (476:13): [True: 0, False: 0]
  ------------------
  477|      0|            return meth->bytes(buf, (int)num);
  478|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_FUNC_NOT_IMPLEMENTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  479|      0|        return -1;
  480|      0|    }
  481|  12.8k|#endif
  482|       |
  483|  12.8k|    dgbl = rand_get_global(ctx);
  484|  12.8k|    if (dgbl == NULL)
  ------------------
  |  Branch (484:9): [True: 0, False: 12.8k]
  ------------------
  485|      0|        return 0;
  486|  12.8k|#ifndef FIPS_MODULE
  487|  12.8k|    if (dgbl->random_provider != NULL)
  ------------------
  |  Branch (487:9): [True: 0, False: 12.8k]
  ------------------
  488|      0|        return ossl_provider_random_bytes(dgbl->random_provider,
  489|      0|            OSSL_PROV_RANDOM_PUBLIC,
  ------------------
  |  |  126|      0|#define OSSL_PROV_RANDOM_PUBLIC 0
  ------------------
  490|      0|            buf, num, strength);
  491|  12.8k|#endif /* !FIPS_MODULE */
  492|       |
  493|  12.8k|    rand = rand_get0_public(ctx, dgbl);
  494|  12.8k|    if (rand != NULL)
  ------------------
  |  Branch (494:9): [True: 12.8k, False: 0]
  ------------------
  495|  12.8k|        return EVP_RAND_generate(rand, buf, num, strength, 0, NULL, 0);
  496|       |
  497|      0|    return 0;
  498|  12.8k|}
RAND_bytes:
  501|  8.20k|{
  502|  8.20k|    if (num < 0)
  ------------------
  |  Branch (502:9): [True: 0, False: 8.20k]
  ------------------
  503|      0|        return 0;
  504|  8.20k|    return RAND_bytes_ex(NULL, buf, (size_t)num, 0);
  505|  8.20k|}
ossl_rand_ctx_new:
  512|    695|{
  513|    695|    RAND_GLOBAL *dgbl = OPENSSL_zalloc(sizeof(*dgbl));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  514|       |
  515|    695|    if (dgbl == NULL)
  ------------------
  |  Branch (515:9): [True: 0, False: 695]
  ------------------
  516|      0|        return NULL;
  517|       |
  518|    695|#ifndef FIPS_MODULE
  519|       |    /*
  520|       |     * We need to ensure that base libcrypto thread handling has been
  521|       |     * initialised.
  522|       |     */
  523|    695|    OPENSSL_init_crypto(OPENSSL_INIT_BASE_ONLY, NULL);
  ------------------
  |  |   31|    695|#define OPENSSL_INIT_BASE_ONLY 0x00040000L
  ------------------
  524|       |
  525|       |    /* Prepopulate the random provider name */
  526|    695|    dgbl->random_provider_name = OPENSSL_strdup(random_provider_fips_name);
  ------------------
  |  |  135|    695|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  527|    695|    if (dgbl->random_provider_name == NULL)
  ------------------
  |  Branch (527:9): [True: 0, False: 695]
  ------------------
  528|      0|        goto err0;
  529|    695|#endif
  530|       |
  531|    695|    dgbl->lock = CRYPTO_THREAD_lock_new();
  532|    695|    if (dgbl->lock == NULL)
  ------------------
  |  Branch (532:9): [True: 0, False: 695]
  ------------------
  533|      0|        goto err1;
  534|       |
  535|    695|    return dgbl;
  536|       |
  537|      0|err1:
  538|      0|    CRYPTO_THREAD_lock_free(dgbl->lock);
  539|      0|#ifndef FIPS_MODULE
  540|      0|err0:
  541|      0|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  542|      0|#endif
  543|      0|    OPENSSL_free(dgbl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  544|       |    return NULL;
  545|      0|}
ossl_rand_ctx_free:
  548|    695|{
  549|    695|    RAND_GLOBAL *dgbl = vdgbl;
  550|       |
  551|    695|    if (dgbl == NULL)
  ------------------
  |  Branch (551:9): [True: 0, False: 695]
  ------------------
  552|      0|        return;
  553|       |
  554|    695|    CRYPTO_THREAD_lock_free(dgbl->lock);
  555|    695|    EVP_RAND_CTX_free(dgbl->primary);
  556|    695|    EVP_RAND_CTX_free(dgbl->seed);
  557|    695|#ifndef FIPS_MODULE
  558|    695|    OPENSSL_free(dgbl->random_provider_name);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  559|    695|#endif /* !FIPS_MODULE */
  560|    695|    OPENSSL_free(dgbl->rng_name);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  561|    695|    OPENSSL_free(dgbl->rng_cipher);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  562|    695|    OPENSSL_free(dgbl->rng_digest);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  563|    695|    OPENSSL_free(dgbl->rng_propq);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  564|    695|    OPENSSL_free(dgbl->seed_name);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  565|    695|    OPENSSL_free(dgbl->seed_propq);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  566|       |
  567|    695|    OPENSSL_free(dgbl);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  568|    695|}
RAND_get0_primary:
  814|  9.99k|{
  815|  9.99k|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  816|       |
  817|  9.99k|    return dgbl == NULL ? NULL : rand_get0_primary(ctx, dgbl);
  ------------------
  |  Branch (817:12): [True: 0, False: 9.99k]
  ------------------
  818|  9.99k|}
rand_lib.c:do_rand_init:
  131|      1|{
  132|      1|#ifndef OPENSSL_NO_ENGINE
  133|      1|    rand_engine_lock = CRYPTO_THREAD_lock_new();
  134|      1|    if (rand_engine_lock == NULL)
  ------------------
  |  Branch (134:9): [True: 0, False: 1]
  ------------------
  135|      0|        return 0;
  136|      1|#endif /* !OPENSSL_NO_ENGINE */
  137|       |
  138|      1|#ifndef OPENSSL_NO_DEPRECATED_3_0
  139|      1|    rand_meth_lock = CRYPTO_THREAD_lock_new();
  140|      1|    if (rand_meth_lock == NULL)
  ------------------
  |  Branch (140:9): [True: 0, False: 1]
  ------------------
  141|      0|        goto err;
  142|      1|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  143|       |
  144|      1|    if (!ossl_rand_pool_init())
  ------------------
  |  Branch (144:9): [True: 0, False: 1]
  ------------------
  145|      0|        goto err;
  146|       |
  147|      1|    rand_inited = 1;
  148|      1|    return 1;
  149|       |
  150|      0|err:
  151|      0|#ifndef OPENSSL_NO_DEPRECATED_3_0
  152|      0|    CRYPTO_THREAD_lock_free(rand_meth_lock);
  153|      0|    rand_meth_lock = NULL;
  154|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
  155|      0|#ifndef OPENSSL_NO_ENGINE
  156|      0|    CRYPTO_THREAD_lock_free(rand_engine_lock);
  157|       |    rand_engine_lock = NULL;
  158|      0|#endif /* !OPENSSL_NO_ENGINE */
  159|      0|    return 0;
  160|      1|}
rand_lib.c:rand_set_rand_method_internal:
  249|      1|{
  250|      1|    if (!RUN_ONCE(&rand_init, do_rand_init))
  ------------------
  |  |  130|      1|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 1, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (250:9): [True: 0, False: 1]
  ------------------
  251|      0|        return 0;
  252|       |
  253|      1|    if (!CRYPTO_THREAD_write_lock(rand_meth_lock))
  ------------------
  |  Branch (253:9): [True: 0, False: 1]
  ------------------
  254|      0|        return 0;
  255|      1|#ifndef OPENSSL_NO_ENGINE
  256|      1|    ENGINE_finish(funct_ref);
  257|      1|    funct_ref = e;
  258|      1|#endif
  259|      1|    default_RAND_meth = meth;
  260|      1|    CRYPTO_THREAD_unlock(rand_meth_lock);
  261|      1|    return 1;
  262|      1|}
rand_lib.c:rand_get_global:
   83|  35.2k|{
   84|  35.2k|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_DRBG_INDEX);
  ------------------
  |  |  101|  35.2k|#define OSSL_LIB_CTX_DRBG_INDEX 5
  ------------------
   85|  35.2k|}
rand_lib.c:rand_get0_primary:
  742|  10.9k|{
  743|  10.9k|    EVP_RAND_CTX *ret, *seed, *newseed = NULL, *primary;
  744|       |
  745|  10.9k|    if (dgbl == NULL)
  ------------------
  |  Branch (745:9): [True: 0, False: 10.9k]
  ------------------
  746|      0|        return NULL;
  747|       |
  748|  10.9k|    if (!CRYPTO_THREAD_read_lock(dgbl->lock))
  ------------------
  |  Branch (748:9): [True: 0, False: 10.9k]
  ------------------
  749|      0|        return NULL;
  750|       |
  751|  10.9k|    ret = dgbl->primary;
  752|  10.9k|    seed = dgbl->seed;
  753|  10.9k|    CRYPTO_THREAD_unlock(dgbl->lock);
  754|       |
  755|  10.9k|    if (ret != NULL)
  ------------------
  |  Branch (755:9): [True: 10.4k, False: 500]
  ------------------
  756|  10.4k|        return ret;
  757|       |
  758|    500|#if !defined(FIPS_MODULE) || !defined(OPENSSL_NO_FIPS_JITTER)
  759|       |    /* Create a seed source for libcrypto or jitter enabled FIPS provider */
  760|    500|    if (seed == NULL) {
  ------------------
  |  Branch (760:9): [True: 500, False: 0]
  ------------------
  761|    500|        ERR_set_mark();
  762|    500|        seed = newseed = rand_new_seed(ctx);
  763|    500|        ERR_pop_to_mark();
  764|    500|    }
  765|    500|#endif /* !FIPS_MODULE || !OPENSSL_NO_FIPS_JITTER */
  766|       |
  767|       |#if defined(FIPS_MODULE)
  768|       |    /* The FIPS provider has entropy health tests instead of the primary */
  769|       |    ret = rand_new_crngt(ctx, seed);
  770|       |#else /* FIPS_MODULE */
  771|    500|    ret = rand_new_drbg(ctx, seed, PRIMARY_RESEED_INTERVAL,
  ------------------
  |  |   23|    500|#define PRIMARY_RESEED_INTERVAL (1 << 8)
  ------------------
  772|    500|        PRIMARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   25|    500|#define PRIMARY_RESEED_TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  773|    500|#endif /* FIPS_MODULE */
  774|       |
  775|       |    /*
  776|       |     * The primary DRBG may be shared between multiple threads so we must
  777|       |     * enable locking.
  778|       |     */
  779|    500|    if (ret == NULL || !EVP_RAND_enable_locking(ret)) {
  ------------------
  |  Branch (779:9): [True: 0, False: 500]
  |  Branch (779:24): [True: 0, False: 500]
  ------------------
  780|      0|        if (ret != NULL) {
  ------------------
  |  Branch (780:13): [True: 0, False: 0]
  ------------------
  781|      0|            ERR_raise(ERR_LIB_EVP, EVP_R_UNABLE_TO_ENABLE_LOCKING);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  782|      0|            EVP_RAND_CTX_free(ret);
  783|      0|        }
  784|      0|        if (newseed == NULL)
  ------------------
  |  Branch (784:13): [True: 0, False: 0]
  ------------------
  785|      0|            return NULL;
  786|       |        /* else carry on and store seed */
  787|      0|        ret = NULL;
  788|      0|    }
  789|       |
  790|    500|    if (!CRYPTO_THREAD_write_lock(dgbl->lock))
  ------------------
  |  Branch (790:9): [True: 0, False: 500]
  ------------------
  791|      0|        return NULL;
  792|       |
  793|    500|    primary = dgbl->primary;
  794|    500|    if (primary != NULL) {
  ------------------
  |  Branch (794:9): [True: 0, False: 500]
  ------------------
  795|      0|        CRYPTO_THREAD_unlock(dgbl->lock);
  796|      0|        EVP_RAND_CTX_free(ret);
  797|      0|        EVP_RAND_CTX_free(newseed);
  798|      0|        return primary;
  799|      0|    }
  800|    500|    if (newseed != NULL)
  ------------------
  |  Branch (800:9): [True: 500, False: 0]
  ------------------
  801|    500|        dgbl->seed = newseed;
  802|    500|    dgbl->primary = ret;
  803|    500|    CRYPTO_THREAD_unlock(dgbl->lock);
  804|       |
  805|    500|    return ret;
  806|    500|}
rand_lib.c:rand_new_seed:
  590|    500|{
  591|    500|    EVP_RAND *rand;
  592|    500|    const char *propq;
  593|    500|    char *name;
  594|    500|    EVP_RAND_CTX *ctx = NULL;
  595|    500|#ifdef OPENSSL_NO_FIPS_JITTER
  596|    500|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  597|       |
  598|    500|    if (dgbl == NULL)
  ------------------
  |  Branch (598:9): [True: 0, False: 500]
  ------------------
  599|      0|        return NULL;
  600|    500|    propq = dgbl->seed_propq;
  601|    500|    name = dgbl->seed_name != NULL ? dgbl->seed_name
  ------------------
  |  Branch (601:12): [True: 0, False: 500]
  ------------------
  602|    500|                                   : OPENSSL_MSTR(OPENSSL_DEFAULT_SEED_SRC);
  ------------------
  |  |   19|    500|#define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
  |  |  ------------------
  |  |  |  |   18|  1.00k|#define OPENSSL_MSTR_HELPER(x) #x
  |  |  ------------------
  ------------------
  603|       |#else /* !OPENSSL_NO_FIPS_JITTER */
  604|       |    name = "JITTER";
  605|       |    propq = "";
  606|       |#endif /* OPENSSL_NO_FIPS_JITTER */
  607|       |
  608|    500|    rand = EVP_RAND_fetch(libctx, name, propq);
  609|    500|    if (rand == NULL) {
  ------------------
  |  Branch (609:9): [True: 0, False: 500]
  ------------------
  610|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  611|      0|        goto err;
  612|      0|    }
  613|    500|    ctx = EVP_RAND_CTX_new(rand, NULL);
  614|    500|    EVP_RAND_free(rand);
  615|    500|    if (ctx == NULL) {
  ------------------
  |  Branch (615:9): [True: 0, False: 500]
  ------------------
  616|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  617|      0|        goto err;
  618|      0|    }
  619|    500|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, NULL)) {
  ------------------
  |  Branch (619:9): [True: 0, False: 500]
  ------------------
  620|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  621|      0|        goto err;
  622|      0|    }
  623|    500|    return ctx;
  624|      0|err:
  625|      0|    EVP_RAND_CTX_free(ctx);
  626|       |    return NULL;
  627|    500|}
rand_lib.c:rand_new_drbg:
  650|  1.50k|{
  651|  1.50k|    EVP_RAND *rand;
  652|  1.50k|    RAND_GLOBAL *dgbl = rand_get_global(libctx);
  653|  1.50k|    EVP_RAND_CTX *ctx;
  654|  1.50k|    OSSL_PARAM params[9], *p = params;
  655|  1.50k|    const OSSL_PARAM *settables;
  656|  1.50k|    const char *prov_name;
  657|  1.50k|    char *name, *cipher;
  658|  1.50k|    int use_df = 1;
  659|       |
  660|  1.50k|    if (dgbl == NULL)
  ------------------
  |  Branch (660:9): [True: 0, False: 1.50k]
  ------------------
  661|      0|        return NULL;
  662|  1.50k|    name = dgbl->rng_name != NULL ? dgbl->rng_name : "CTR-DRBG";
  ------------------
  |  Branch (662:12): [True: 0, False: 1.50k]
  ------------------
  663|  1.50k|    rand = EVP_RAND_fetch(libctx, name, dgbl->rng_propq);
  664|  1.50k|    if (rand == NULL) {
  ------------------
  |  Branch (664:9): [True: 0, False: 1.50k]
  ------------------
  665|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_FETCH_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  666|      0|        return NULL;
  667|      0|    }
  668|  1.50k|    prov_name = ossl_provider_name(EVP_RAND_get0_provider(rand));
  669|  1.50k|    ctx = EVP_RAND_CTX_new(rand, parent);
  670|  1.50k|    EVP_RAND_free(rand);
  671|  1.50k|    if (ctx == NULL) {
  ------------------
  |  Branch (671:9): [True: 0, False: 1.50k]
  ------------------
  672|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_UNABLE_TO_CREATE_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  673|      0|        return NULL;
  674|      0|    }
  675|       |
  676|  1.50k|    settables = EVP_RAND_CTX_settable_params(ctx);
  677|  1.50k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_CIPHER)) {
  ------------------
  |  |  233|  1.50k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  127|  1.50k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  |  Branch (677:9): [True: 1.50k, False: 0]
  ------------------
  678|  1.50k|        cipher = dgbl->rng_cipher != NULL ? dgbl->rng_cipher : "AES-256-CTR";
  ------------------
  |  Branch (678:18): [True: 0, False: 1.50k]
  ------------------
  679|  1.50k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_CIPHER,
  ------------------
  |  |  233|  1.50k|# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
  |  |  ------------------
  |  |  |  |  127|  1.50k|# define OSSL_ALG_PARAM_CIPHER "cipher"
  |  |  ------------------
  ------------------
  680|  1.50k|            cipher, 0);
  681|  1.50k|    }
  682|  1.50k|    if (dgbl->rng_digest != NULL
  ------------------
  |  Branch (682:9): [True: 0, False: 1.50k]
  ------------------
  683|      0|        && OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_DIGEST))
  ------------------
  |  |  234|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  128|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  |  Branch (683:12): [True: 0, False: 0]
  ------------------
  684|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_DIGEST,
  ------------------
  |  |  234|      0|# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
  |  |  ------------------
  |  |  |  |  128|      0|# define OSSL_ALG_PARAM_DIGEST "digest"
  |  |  ------------------
  ------------------
  685|      0|            dgbl->rng_digest, 0);
  686|  1.50k|    if (prov_name != NULL)
  ------------------
  |  Branch (686:9): [True: 1.50k, False: 0]
  ------------------
  687|  1.50k|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_PROV_PARAM_CORE_PROV_NAME,
  ------------------
  |  |  502|  1.50k|# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
  ------------------
  688|  1.50k|            (char *)prov_name, 0);
  689|  1.50k|    if (dgbl->rng_propq != NULL)
  ------------------
  |  Branch (689:9): [True: 0, False: 1.50k]
  ------------------
  690|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_DRBG_PARAM_PROPERTIES,
  ------------------
  |  |  248|      0|# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
  |  |  ------------------
  |  |  |  |  132|      0|# define OSSL_ALG_PARAM_PROPERTIES "properties"
  |  |  ------------------
  ------------------
  691|      0|            dgbl->rng_propq, 0);
  692|  1.50k|    if (OSSL_PARAM_locate_const(settables, OSSL_ALG_PARAM_MAC))
  ------------------
  |  |  131|  1.50k|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  |  Branch (692:9): [True: 0, False: 1.50k]
  ------------------
  693|      0|        *p++ = OSSL_PARAM_construct_utf8_string(OSSL_ALG_PARAM_MAC, "HMAC", 0);
  ------------------
  |  |  131|      0|# define OSSL_ALG_PARAM_MAC "mac"
  ------------------
  694|  1.50k|    if (OSSL_PARAM_locate_const(settables, OSSL_DRBG_PARAM_USE_DF))
  ------------------
  |  |  255|  1.50k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  |  Branch (694:9): [True: 1.50k, False: 0]
  ------------------
  695|  1.50k|        *p++ = OSSL_PARAM_construct_int(OSSL_DRBG_PARAM_USE_DF, &use_df);
  ------------------
  |  |  255|  1.50k|# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
  ------------------
  696|  1.50k|    *p++ = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS,
  ------------------
  |  |  251|  1.50k|# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
  ------------------
  697|  1.50k|        &reseed_interval);
  698|  1.50k|    *p++ = OSSL_PARAM_construct_time_t(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL,
  ------------------
  |  |  253|  1.50k|# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
  ------------------
  699|  1.50k|        &reseed_time_interval);
  700|  1.50k|    *p = OSSL_PARAM_construct_end();
  701|  1.50k|    if (!EVP_RAND_instantiate(ctx, 0, 0, NULL, 0, params)) {
  ------------------
  |  Branch (701:9): [True: 0, False: 1.50k]
  ------------------
  702|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  703|      0|        EVP_RAND_CTX_free(ctx);
  704|      0|        return NULL;
  705|      0|    }
  706|  1.50k|    return ctx;
  707|  1.50k|}
rand_lib.c:rand_get0_public:
  821|  12.8k|{
  822|  12.8k|    EVP_RAND_CTX *rand, *primary;
  823|  12.8k|    OSSL_LIB_CTX *origctx = ctx;
  824|       |
  825|  12.8k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  826|       |
  827|  12.8k|    if (ctx == NULL)
  ------------------
  |  Branch (827:9): [True: 0, False: 12.8k]
  ------------------
  828|      0|        return NULL;
  829|       |
  830|  12.8k|    if (dgbl == NULL)
  ------------------
  |  Branch (830:9): [True: 0, False: 12.8k]
  ------------------
  831|      0|        return NULL;
  832|       |
  833|  12.8k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  834|  12.8k|    if (rand == NULL) {
  ------------------
  |  Branch (834:9): [True: 500, False: 12.3k]
  ------------------
  835|    500|        primary = rand_get0_primary(origctx, dgbl);
  836|    500|        if (primary == NULL)
  ------------------
  |  Branch (836:13): [True: 0, False: 500]
  ------------------
  837|      0|            return NULL;
  838|       |
  839|       |        /*
  840|       |         * If the private is also NULL then this is the first time we've
  841|       |         * used this thread.
  842|       |         */
  843|    500|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx) == NULL
  ------------------
  |  Branch (843:13): [True: 500, False: 0]
  ------------------
  844|    500|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (844:16): [True: 0, False: 500]
  ------------------
  845|      0|            return NULL;
  846|    500|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    500|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  847|    500|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    500|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  848|    500|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, rand)) {
  ------------------
  |  Branch (848:13): [True: 0, False: 500]
  ------------------
  849|      0|            EVP_RAND_CTX_free(rand);
  850|      0|            rand = NULL;
  851|      0|        }
  852|    500|    }
  853|  12.8k|    return rand;
  854|  12.8k|}
rand_lib.c:rand_delete_thread_state:
  571|    500|{
  572|    500|    OSSL_LIB_CTX *ctx = arg;
  573|    500|    RAND_GLOBAL *dgbl = rand_get_global(ctx);
  574|    500|    EVP_RAND_CTX *rand;
  575|       |
  576|    500|    if (dgbl == NULL)
  ------------------
  |  Branch (576:9): [True: 0, False: 500]
  ------------------
  577|      0|        return;
  578|       |
  579|    500|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx);
  580|    500|    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx, NULL);
  581|    500|    EVP_RAND_CTX_free(rand);
  582|       |
  583|    500|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  584|       |    CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, NULL);
  585|    500|    EVP_RAND_CTX_free(rand);
  586|    500|}
rand_lib.c:rand_get0_private:
  868|  9.89k|{
  869|  9.89k|    EVP_RAND_CTX *rand, *primary;
  870|  9.89k|    OSSL_LIB_CTX *origctx = ctx;
  871|       |
  872|  9.89k|    ctx = ossl_lib_ctx_get_concrete(ctx);
  873|  9.89k|    if (ctx == NULL)
  ------------------
  |  Branch (873:9): [True: 0, False: 9.89k]
  ------------------
  874|      0|        return NULL;
  875|       |
  876|  9.89k|    rand = CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx);
  877|  9.89k|    if (rand == NULL) {
  ------------------
  |  Branch (877:9): [True: 500, False: 9.39k]
  ------------------
  878|    500|        primary = rand_get0_primary(origctx, dgbl);
  879|    500|        if (primary == NULL)
  ------------------
  |  Branch (879:13): [True: 0, False: 500]
  ------------------
  880|      0|            return NULL;
  881|       |
  882|       |        /*
  883|       |         * If the public is also NULL then this is the first time we've
  884|       |         * used this thread.
  885|       |         */
  886|    500|        if (CRYPTO_THREAD_get_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PUB_KEY, ctx) == NULL
  ------------------
  |  Branch (886:13): [True: 0, False: 500]
  ------------------
  887|      0|            && !ossl_init_thread_start(NULL, ctx, rand_delete_thread_state))
  ------------------
  |  Branch (887:16): [True: 0, False: 0]
  ------------------
  888|      0|            return NULL;
  889|    500|        rand = rand_new_drbg(ctx, primary, SECONDARY_RESEED_INTERVAL,
  ------------------
  |  |   24|    500|#define SECONDARY_RESEED_INTERVAL (1 << 16)
  ------------------
  890|    500|            SECONDARY_RESEED_TIME_INTERVAL);
  ------------------
  |  |   26|    500|#define SECONDARY_RESEED_TIME_INTERVAL (7 * 60) /* 7 minutes */
  ------------------
  891|    500|        if (!CRYPTO_THREAD_set_local_ex(CRYPTO_THREAD_LOCAL_DRBG_PRIV_KEY, ctx, rand)) {
  ------------------
  |  Branch (891:13): [True: 0, False: 500]
  ------------------
  892|      0|            EVP_RAND_CTX_free(rand);
  893|      0|            rand = NULL;
  894|      0|        }
  895|    500|    }
  896|  9.89k|    return rand;
  897|  9.89k|}

RAND_OpenSSL:
   63|  32.7k|{
   64|  32.7k|    return &ossl_rand_meth;
   65|  32.7k|}

ossl_rand_pool_new:
   24|    500|{
   25|    500|    RAND_POOL *pool = OPENSSL_zalloc(sizeof(*pool));
  ------------------
  |  |  108|    500|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   26|    500|    size_t min_alloc_size = RAND_POOL_MIN_ALLOCATION(secure);
  ------------------
  |  |   59|    500|#define RAND_POOL_MIN_ALLOCATION(secure) ((secure) ? 16 : 48)
  |  |  ------------------
  |  |  |  Branch (59:43): [True: 500, False: 0]
  |  |  ------------------
  ------------------
   27|       |
   28|    500|    if (pool == NULL)
  ------------------
  |  Branch (28:9): [True: 0, False: 500]
  ------------------
   29|      0|        return NULL;
   30|       |
   31|    500|    pool->min_len = min_len;
   32|    500|    pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? RAND_POOL_MAX_LENGTH : max_len;
  ------------------
  |  |   36|    500|#define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   35|    500|#define RAND_POOL_FACTOR 256
  |  |  ------------------
  |  |               #define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   37|    500|#define RAND_DRBG_STRENGTH 256
  |  |  ------------------
  ------------------
                  pool->max_len = (max_len > RAND_POOL_MAX_LENGTH) ? RAND_POOL_MAX_LENGTH : max_len;
  ------------------
  |  |   36|    500|#define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   35|    500|#define RAND_POOL_FACTOR 256
  |  |  ------------------
  |  |               #define RAND_POOL_MAX_LENGTH (RAND_POOL_FACTOR * 3 * (RAND_DRBG_STRENGTH / 16))
  |  |  ------------------
  |  |  |  |   37|    500|#define RAND_DRBG_STRENGTH 256
  |  |  ------------------
  ------------------
  |  Branch (32:21): [True: 500, False: 0]
  ------------------
   33|    500|    pool->alloc_len = min_len < min_alloc_size ? min_alloc_size : min_len;
  ------------------
  |  Branch (33:23): [True: 0, False: 500]
  ------------------
   34|    500|    if (pool->alloc_len > pool->max_len)
  ------------------
  |  Branch (34:9): [True: 0, False: 500]
  ------------------
   35|      0|        pool->alloc_len = pool->max_len;
   36|       |
   37|    500|    if (secure)
  ------------------
  |  Branch (37:9): [True: 500, False: 0]
  ------------------
   38|    500|        pool->buffer = OPENSSL_secure_zalloc(pool->alloc_len);
  ------------------
  |  |  141|    500|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|      0|    else
   40|      0|        pool->buffer = OPENSSL_zalloc(pool->alloc_len);
  ------------------
  |  |  108|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   41|       |
   42|    500|    if (pool->buffer == NULL)
  ------------------
  |  Branch (42:9): [True: 0, False: 500]
  ------------------
   43|      0|        goto err;
   44|       |
   45|    500|    pool->entropy_requested = entropy_requested;
   46|    500|    pool->secure = secure;
   47|    500|    return pool;
   48|       |
   49|      0|err:
   50|      0|    OPENSSL_free(pool);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   51|       |    return NULL;
   52|    500|}
ossl_rand_pool_free:
   88|    500|{
   89|    500|    if (pool == NULL)
  ------------------
  |  Branch (89:9): [True: 0, False: 500]
  ------------------
   90|      0|        return;
   91|       |
   92|       |    /*
   93|       |     * Although it would be advisable from a cryptographical viewpoint,
   94|       |     * we are not allowed to clear attached buffers, since they are passed
   95|       |     * to ossl_rand_pool_attach() as `const unsigned char*`.
   96|       |     * (see corresponding comment in ossl_rand_pool_attach()).
   97|       |     */
   98|    500|    if (!pool->attached) {
  ------------------
  |  Branch (98:9): [True: 500, False: 0]
  ------------------
   99|    500|        if (pool->secure)
  ------------------
  |  Branch (99:13): [True: 500, False: 0]
  ------------------
  100|    500|            OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  149|    500|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  101|      0|        else
  102|      0|            OPENSSL_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|    500|    }
  104|       |
  105|    500|    OPENSSL_free(pool);
  ------------------
  |  |  131|    500|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  106|    500|}
ossl_rand_pool_length:
  128|    500|{
  129|    500|    return pool->len;
  130|    500|}
ossl_rand_pool_detach:
  139|    500|{
  140|    500|    unsigned char *ret = pool->buffer;
  141|       |    pool->buffer = NULL;
  142|    500|    pool->entropy = 0;
  143|    500|    return ret;
  144|    500|}
ossl_rand_pool_entropy_available:
  173|    500|{
  174|    500|    if (pool->entropy < pool->entropy_requested)
  ------------------
  |  Branch (174:9): [True: 0, False: 500]
  ------------------
  175|      0|        return 0;
  176|       |
  177|    500|    if (pool->len < pool->min_len)
  ------------------
  |  Branch (177:9): [True: 0, False: 500]
  ------------------
  178|      0|        return 0;
  179|       |
  180|    500|    return pool->entropy;
  181|    500|}
ossl_rand_pool_entropy_needed:
  189|    500|{
  190|    500|    if (pool->entropy < pool->entropy_requested)
  ------------------
  |  Branch (190:9): [True: 500, False: 0]
  ------------------
  191|    500|        return pool->entropy_requested - pool->entropy;
  192|       |
  193|      0|    return 0;
  194|    500|}
ossl_rand_pool_bytes_needed:
  237|    500|{
  238|    500|    size_t bytes_needed;
  239|    500|    size_t entropy_needed = ossl_rand_pool_entropy_needed(pool);
  240|       |
  241|    500|    if (entropy_factor < 1) {
  ------------------
  |  Branch (241:9): [True: 0, False: 500]
  ------------------
  242|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_ARGUMENT_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|      0|        return 0;
  244|      0|    }
  245|       |
  246|    500|    bytes_needed = ENTROPY_TO_BYTES(entropy_needed, entropy_factor);
  ------------------
  |  |  162|    500|    (((bits) * (entropy_factor) + 7) / 8)
  ------------------
  247|       |
  248|    500|    if (bytes_needed > pool->max_len - pool->len) {
  ------------------
  |  Branch (248:9): [True: 0, False: 500]
  ------------------
  249|       |        /* not enough space left */
  250|      0|        ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
  ------------------
  |  |   99|      0|#define ERR_LIB_RAND 36
  ------------------
                      ERR_raise_data(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW,
  ------------------
  |  |   53|      0|#define RAND_R_RANDOM_POOL_OVERFLOW 125
  ------------------
  251|      0|            "entropy_factor=%u, entropy_needed=%zu, bytes_needed=%zu,"
  252|      0|            "pool->max_len=%zu, pool->len=%zu",
  253|      0|            entropy_factor, entropy_needed, bytes_needed,
  254|      0|            pool->max_len, pool->len);
  255|      0|        return 0;
  256|      0|    }
  257|       |
  258|    500|    if (pool->len < pool->min_len && bytes_needed < pool->min_len - pool->len)
  ------------------
  |  Branch (258:9): [True: 500, False: 0]
  |  Branch (258:38): [True: 0, False: 500]
  ------------------
  259|       |        /* to meet the min_len requirement */
  260|      0|        bytes_needed = pool->min_len - pool->len;
  261|       |
  262|       |    /*
  263|       |     * Make sure the buffer is large enough for the requested amount
  264|       |     * of data. This guarantees that existing code patterns where
  265|       |     * ossl_rand_pool_add_begin, ossl_rand_pool_add_end or ossl_rand_pool_add
  266|       |     * are used to collect entropy data without any error handling
  267|       |     * whatsoever, continue to be valid.
  268|       |     * Furthermore if the allocation here fails once, make sure that
  269|       |     * we don't fall back to a less secure or even blocking random source,
  270|       |     * as that could happen by the existing code patterns.
  271|       |     * This is not a concern for additional data, therefore that
  272|       |     * is not needed if rand_pool_grow fails in other places.
  273|       |     */
  274|    500|    if (!rand_pool_grow(pool, bytes_needed)) {
  ------------------
  |  Branch (274:9): [True: 0, False: 500]
  ------------------
  275|       |        /* persistent error for this pool */
  276|      0|        pool->max_len = pool->len = 0;
  277|      0|        return 0;
  278|      0|    }
  279|       |
  280|    500|    return bytes_needed;
  281|    500|}
ossl_rand_pool_add_begin:
  354|    500|{
  355|    500|    if (len == 0)
  ------------------
  |  Branch (355:9): [True: 0, False: 500]
  ------------------
  356|      0|        return NULL;
  357|       |
  358|    500|    if (len > pool->max_len - pool->len) {
  ------------------
  |  Branch (358:9): [True: 0, False: 500]
  ------------------
  359|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|        return NULL;
  361|      0|    }
  362|       |
  363|    500|    if (pool->buffer == NULL) {
  ------------------
  |  Branch (363:9): [True: 0, False: 500]
  ------------------
  364|      0|        ERR_raise(ERR_LIB_RAND, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  365|      0|        return NULL;
  366|      0|    }
  367|       |
  368|       |    /*
  369|       |     * As long as the allocation request stays within the limits given
  370|       |     * by ossl_rand_pool_bytes_needed this rand_pool_grow below is guaranteed
  371|       |     * to succeed, thus no allocation happens.
  372|       |     * We have that only for cases when a pool is used to collect
  373|       |     * additional data. Then the buffer might need to grow here,
  374|       |     * and of course the caller is responsible to check the return
  375|       |     * value of this function.
  376|       |     */
  377|    500|    if (!rand_pool_grow(pool, len))
  ------------------
  |  Branch (377:9): [True: 0, False: 500]
  ------------------
  378|      0|        return NULL;
  379|       |
  380|    500|    return pool->buffer + pool->len;
  381|    500|}
ossl_rand_pool_add_end:
  393|    500|{
  394|    500|    if (len > pool->alloc_len - pool->len) {
  ------------------
  |  Branch (394:9): [True: 0, False: 500]
  ------------------
  395|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_OVERFLOW);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  396|      0|        return 0;
  397|      0|    }
  398|       |
  399|    500|    if (len > 0) {
  ------------------
  |  Branch (399:9): [True: 500, False: 0]
  ------------------
  400|    500|        pool->len += len;
  401|    500|        pool->entropy += entropy;
  402|    500|    }
  403|       |
  404|    500|    return 1;
  405|    500|}
ossl_rand_pool_adin_mix_in:
  420|    500|{
  421|    500|    if (adin == NULL || adin_len == 0)
  ------------------
  |  Branch (421:9): [True: 0, False: 500]
  |  Branch (421:25): [True: 0, False: 500]
  ------------------
  422|       |        /* Nothing to mix in -> success */
  423|      0|        return 1;
  424|       |
  425|    500|    if (pool->buffer == NULL) {
  ------------------
  |  Branch (425:9): [True: 0, False: 500]
  ------------------
  426|      0|        ERR_raise(ERR_LIB_RAND, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  427|      0|        return 0;
  428|      0|    }
  429|       |
  430|    500|    if (pool->len == 0) {
  ------------------
  |  Branch (430:9): [True: 0, False: 500]
  ------------------
  431|      0|        ERR_raise(ERR_LIB_RAND, RAND_R_RANDOM_POOL_IS_EMPTY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  432|      0|        return 0;
  433|      0|    }
  434|       |
  435|    500|    if (adin != NULL && adin_len > 0) {
  ------------------
  |  Branch (435:9): [True: 500, False: 0]
  |  Branch (435:25): [True: 500, False: 0]
  ------------------
  436|    500|        size_t i;
  437|       |
  438|       |        /* xor the additional data into the pool */
  439|  4.50k|        for (i = 0; i < adin_len; ++i)
  ------------------
  |  Branch (439:21): [True: 4.00k, False: 500]
  ------------------
  440|  4.00k|            pool->buffer[i % pool->len] ^= adin[i];
  441|    500|    }
  442|       |
  443|    500|    return 1;
  444|    500|}
rand_pool.c:rand_pool_grow:
  198|  1.00k|{
  199|  1.00k|    if (len > pool->alloc_len - pool->len) {
  ------------------
  |  Branch (199:9): [True: 0, False: 1.00k]
  ------------------
  200|      0|        unsigned char *p;
  201|      0|        const size_t limit = pool->max_len / 2;
  202|      0|        size_t newlen = pool->alloc_len;
  203|       |
  204|      0|        if (pool->attached || len > pool->max_len - pool->len) {
  ------------------
  |  Branch (204:13): [True: 0, False: 0]
  |  Branch (204:31): [True: 0, False: 0]
  ------------------
  205|      0|            ERR_raise(ERR_LIB_RAND, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  206|      0|            return 0;
  207|      0|        }
  208|       |
  209|      0|        do
  210|      0|            newlen = newlen < limit ? newlen * 2 : pool->max_len;
  ------------------
  |  Branch (210:22): [True: 0, False: 0]
  ------------------
  211|      0|        while (len > newlen - pool->len);
  ------------------
  |  Branch (211:16): [True: 0, False: 0]
  ------------------
  212|       |
  213|      0|        if (pool->secure)
  ------------------
  |  Branch (213:13): [True: 0, False: 0]
  ------------------
  214|      0|            p = OPENSSL_secure_zalloc(newlen);
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  215|      0|        else
  216|      0|            p = OPENSSL_zalloc(newlen);
  ------------------
  |  |  108|      0|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  217|      0|        if (p == NULL)
  ------------------
  |  Branch (217:13): [True: 0, False: 0]
  ------------------
  218|      0|            return 0;
  219|      0|        memcpy(p, pool->buffer, pool->len);
  220|      0|        if (pool->secure)
  ------------------
  |  Branch (220:13): [True: 0, False: 0]
  ------------------
  221|      0|            OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  222|      0|        else
  223|      0|            OPENSSL_clear_free(pool->buffer, pool->alloc_len);
  ------------------
  |  |  129|      0|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  224|      0|        pool->buffer = p;
  225|      0|        pool->alloc_len = newlen;
  226|      0|    }
  227|  1.00k|    return 1;
  228|  1.00k|}

rsa_ameth.c:rsa_pub_decode:
   77|   138k|{
   78|   138k|    const unsigned char *p;
   79|   138k|    int pklen;
   80|   138k|    X509_ALGOR *alg;
   81|   138k|    RSA *rsa = NULL;
   82|       |
   83|   138k|    if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &alg, pubkey))
  ------------------
  |  Branch (83:9): [True: 0, False: 138k]
  ------------------
   84|      0|        return 0;
   85|   138k|    if ((rsa = d2i_RSAPublicKey(NULL, &p, pklen)) == NULL)
  ------------------
  |  Branch (85:9): [True: 0, False: 138k]
  ------------------
   86|      0|        return 0;
   87|   138k|    if (!ossl_rsa_param_decode(rsa, alg)) {
  ------------------
  |  Branch (87:9): [True: 0, False: 138k]
  ------------------
   88|      0|        RSA_free(rsa);
   89|      0|        return 0;
   90|      0|    }
   91|       |
   92|   138k|    RSA_clear_flags(rsa, RSA_FLAG_TYPE_MASK);
  ------------------
  |  |  117|   138k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
   93|   138k|    switch (pkey->ameth->pkey_id) {
   94|   138k|    case EVP_PKEY_RSA:
  ------------------
  |  |   63|   138k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   138k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  |  Branch (94:5): [True: 138k, False: 0]
  ------------------
   95|   138k|        RSA_set_flags(rsa, RSA_FLAG_TYPE_RSA);
  ------------------
  |  |  118|   138k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
   96|   138k|        break;
   97|      0|    case EVP_PKEY_RSA_PSS:
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (97:5): [True: 0, False: 138k]
  ------------------
   98|      0|        RSA_set_flags(rsa, RSA_FLAG_TYPE_RSASSAPSS);
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
   99|      0|        break;
  100|      0|    default:
  ------------------
  |  Branch (100:5): [True: 0, False: 138k]
  ------------------
  101|       |        /* Leave the type bits zero */
  102|      0|        break;
  103|   138k|    }
  104|       |
  105|   138k|    if (!EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, rsa)) {
  ------------------
  |  Branch (105:9): [True: 0, False: 138k]
  ------------------
  106|      0|        RSA_free(rsa);
  107|      0|        return 0;
  108|      0|    }
  109|   138k|    return 1;
  110|   138k|}
rsa_ameth.c:int_rsa_free:
  201|   138k|{
  202|   138k|    RSA_free(pkey->pkey.rsa);
  203|   138k|}

rsa_asn1.c:rsa_cb:
   30|   415k|{
   31|   415k|    if (operation == ASN1_OP_NEW_PRE) {
  ------------------
  |  |  731|   415k|#define ASN1_OP_NEW_PRE 0
  ------------------
  |  Branch (31:9): [True: 138k, False: 276k]
  ------------------
   32|   138k|        *pval = (ASN1_VALUE *)RSA_new();
   33|   138k|        if (*pval != NULL)
  ------------------
  |  Branch (33:13): [True: 138k, False: 0]
  ------------------
   34|   138k|            return 2;
   35|      0|        return 0;
   36|   276k|    } else if (operation == ASN1_OP_FREE_PRE) {
  ------------------
  |  |  733|   276k|#define ASN1_OP_FREE_PRE 2
  ------------------
  |  Branch (36:16): [True: 0, False: 276k]
  ------------------
   37|      0|        RSA_free((RSA *)*pval);
   38|      0|        *pval = NULL;
   39|      0|        return 2;
   40|   276k|    } else if (operation == ASN1_OP_D2I_POST) {
  ------------------
  |  |  736|   276k|#define ASN1_OP_D2I_POST 5
  ------------------
  |  Branch (40:16): [True: 138k, False: 138k]
  ------------------
   41|   138k|        if (((RSA *)*pval)->version != RSA_ASN1_VERSION_MULTI) {
  ------------------
  |  |   60|   138k|#define RSA_ASN1_VERSION_MULTI 1
  ------------------
  |  Branch (41:13): [True: 138k, False: 0]
  ------------------
   42|       |            /* not a multi-prime key, skip */
   43|   138k|            return 1;
   44|   138k|        }
   45|      0|        return (ossl_rsa_multip_calc_product((RSA *)*pval) == 1) ? 2 : 0;
  ------------------
  |  Branch (45:16): [True: 0, False: 0]
  ------------------
   46|   138k|    }
   47|   138k|    return 1;
   48|   415k|}

ossl_rsa_todata:
  262|   138k|{
  263|   138k|    int ret = 0;
  264|   138k|    const BIGNUM *rsa_d = NULL, *rsa_n = NULL, *rsa_e = NULL;
  265|   138k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   138k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  266|   138k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   138k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  267|   138k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   138k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  268|       |
  269|   138k|    if (rsa == NULL || factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (269:9): [True: 0, False: 138k]
  |  Branch (269:24): [True: 0, False: 138k]
  |  Branch (269:43): [True: 0, False: 138k]
  |  Branch (269:59): [True: 0, False: 138k]
  ------------------
  270|      0|        goto err;
  271|       |
  272|   138k|    RSA_get0_key(rsa, &rsa_n, &rsa_e, &rsa_d);
  273|   138k|    ossl_rsa_get0_all_params(rsa, factors, exps, coeffs);
  274|       |
  275|   138k|    if (!ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_N, rsa_n)
  ------------------
  |  |  482|   138k|# define OSSL_PKEY_PARAM_RSA_N "n"
  ------------------
  |  Branch (275:9): [True: 0, False: 138k]
  ------------------
  276|   138k|        || !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_E, rsa_e))
  ------------------
  |  |  457|   138k|# define OSSL_PKEY_PARAM_RSA_E "e"
  ------------------
  |  Branch (276:12): [True: 0, False: 138k]
  ------------------
  277|      0|        goto err;
  278|       |
  279|       |    /* Check private key data integrity */
  280|   138k|    if (include_private && rsa_d != NULL) {
  ------------------
  |  Branch (280:9): [True: 138k, False: 0]
  |  Branch (280:28): [True: 0, False: 138k]
  ------------------
  281|       |
  282|      0|        if (!ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_RSA_D,
  ------------------
  |  |  453|      0|# define OSSL_PKEY_PARAM_RSA_D "d"
  ------------------
  |  Branch (282:13): [True: 0, False: 0]
  ------------------
  283|      0|                rsa_d)
  284|      0|            || !ossl_param_build_set_multi_key_bn(bld, params,
  ------------------
  |  Branch (284:16): [True: 0, False: 0]
  ------------------
  285|      0|                ossl_rsa_mp_factor_names,
  286|      0|                factors)
  287|      0|            || !ossl_param_build_set_multi_key_bn(bld, params,
  ------------------
  |  Branch (287:16): [True: 0, False: 0]
  ------------------
  288|      0|                ossl_rsa_mp_exp_names, exps)
  289|      0|            || !ossl_param_build_set_multi_key_bn(bld, params,
  ------------------
  |  Branch (289:16): [True: 0, False: 0]
  ------------------
  290|      0|                ossl_rsa_mp_coeff_names,
  291|      0|                coeffs))
  292|      0|            goto err;
  293|      0|    }
  294|       |
  295|       |#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
  296|       |    /* The acvp test results are not meant for export so check for bld == NULL */
  297|       |    if (bld == NULL)
  298|       |        ossl_rsa_acvp_test_get_params(rsa, params);
  299|       |#endif
  300|   138k|    ret = 1;
  301|   138k|err:
  302|   138k|    sk_BIGNUM_const_free(factors);
  303|   138k|    sk_BIGNUM_const_free(exps);
  304|   138k|    sk_BIGNUM_const_free(coeffs);
  305|   138k|    return ret;
  306|   138k|}
ossl_rsa_is_foreign:
  452|   138k|{
  453|   138k|#ifndef FIPS_MODULE
  454|   138k|    if (rsa->engine != NULL || RSA_get_method(rsa) != RSA_PKCS1_OpenSSL())
  ------------------
  |  Branch (454:9): [True: 0, False: 138k]
  |  Branch (454:32): [True: 0, False: 138k]
  ------------------
  455|      0|        return 1;
  456|   138k|#endif
  457|   138k|    return 0;
  458|   138k|}
ossl_rsa_param_decode:
  653|   138k|{
  654|   138k|    RSA_PSS_PARAMS *pss;
  655|   138k|    const ASN1_OBJECT *algoid;
  656|   138k|    const void *algp;
  657|   138k|    int algptype;
  658|       |
  659|   138k|    X509_ALGOR_get0(&algoid, &algptype, &algp, alg);
  660|   138k|    if (OBJ_obj2nid(algoid) != EVP_PKEY_RSA_PSS)
  ------------------
  |  |   65|   138k|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|   138k|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  |  Branch (660:9): [True: 138k, False: 0]
  ------------------
  661|   138k|        return 1;
  662|      0|    if (algptype == V_ASN1_UNDEF)
  ------------------
  |  |   62|      0|#define V_ASN1_UNDEF -1
  ------------------
  |  Branch (662:9): [True: 0, False: 0]
  ------------------
  663|      0|        return 1;
  664|      0|    if (algptype != V_ASN1_SEQUENCE) {
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  |  Branch (664:9): [True: 0, False: 0]
  ------------------
  665|      0|        ERR_raise(ERR_LIB_RSA, RSA_R_INVALID_PSS_PARAMETERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  666|      0|        return 0;
  667|      0|    }
  668|      0|    if ((pss = ossl_rsa_pss_decode(alg)) == NULL
  ------------------
  |  Branch (668:9): [True: 0, False: 0]
  ------------------
  669|      0|        || !ossl_rsa_set0_pss_params(rsa, pss)) {
  ------------------
  |  Branch (669:12): [True: 0, False: 0]
  ------------------
  670|      0|        RSA_PSS_PARAMS_free(pss);
  671|      0|        return 0;
  672|      0|    }
  673|      0|    if (!ossl_rsa_sync_to_pss_params_30(rsa))
  ------------------
  |  Branch (673:9): [True: 0, False: 0]
  ------------------
  674|      0|        return 0;
  675|      0|    return 1;
  676|      0|}

RSA_bits:
   24|   138k|{
   25|   138k|    return BN_num_bits(r->n);
   26|   138k|}
RSA_size:
   29|   138k|{
   30|   138k|    return BN_num_bytes(r->n);
  ------------------
  |  |  188|   138k|#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
  ------------------
   31|   138k|}

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

RSA_new:
   36|   138k|{
   37|   138k|    return rsa_new_intern(NULL, NULL);
   38|   138k|}
RSA_get_method:
   41|   138k|{
   42|   138k|    return rsa->meth;
   43|   138k|}
RSA_free:
  142|   415k|{
  143|   415k|    int i;
  144|       |
  145|   415k|    if (r == NULL)
  ------------------
  |  Branch (145:9): [True: 138k, False: 276k]
  ------------------
  146|   138k|        return;
  147|       |
  148|   276k|    CRYPTO_DOWN_REF(&r->references, &i);
  149|   276k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   276k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   276k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   276k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   276k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  150|   276k|    if (i > 0)
  ------------------
  |  Branch (150:9): [True: 138k, False: 138k]
  ------------------
  151|   138k|        return;
  152|   138k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|   138k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 138k]
  |  |  ------------------
  ------------------
  153|       |
  154|   138k|    if (r->meth != NULL && r->meth->finish != NULL)
  ------------------
  |  Branch (154:9): [True: 138k, False: 0]
  |  Branch (154:28): [True: 138k, False: 0]
  ------------------
  155|   138k|        r->meth->finish(r);
  156|   138k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  157|   138k|    ENGINE_finish(r->engine);
  158|   138k|#endif
  159|       |
  160|   138k|#ifndef FIPS_MODULE
  161|   138k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
  ------------------
  |  |  259|   138k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  162|   138k|#endif
  163|       |
  164|   138k|    CRYPTO_THREAD_lock_free(r->lock);
  165|   138k|    CRYPTO_FREE_REF(&r->references);
  166|       |
  167|       |#ifdef OPENSSL_PEDANTIC_ZEROIZATION
  168|       |    BN_clear_free(r->n);
  169|       |    BN_clear_free(r->e);
  170|       |#else
  171|   138k|    BN_free(r->n);
  172|   138k|    BN_free(r->e);
  173|   138k|#endif
  174|   138k|    BN_clear_free(r->d);
  175|   138k|    BN_clear_free(r->p);
  176|   138k|    BN_clear_free(r->q);
  177|   138k|    BN_clear_free(r->dmp1);
  178|   138k|    BN_clear_free(r->dmq1);
  179|   138k|    BN_clear_free(r->iqmp);
  180|       |
  181|       |#if defined(FIPS_MODULE) && !defined(OPENSSL_NO_ACVP_TESTS)
  182|       |    ossl_rsa_acvp_test_free(r->acvp_test);
  183|       |#endif
  184|       |
  185|   138k|#ifndef FIPS_MODULE
  186|   138k|    RSA_PSS_PARAMS_free(r->pss);
  187|   138k|    sk_RSA_PRIME_INFO_pop_free(r->prime_infos, ossl_rsa_multip_info_free);
  188|   138k|#endif
  189|   138k|    ossl_rsa_free_blinding(r);
  190|   138k|    OPENSSL_free(r);
  ------------------
  |  |  131|   138k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|   138k|}
RSA_up_ref:
  194|   138k|{
  195|   138k|    int i;
  196|       |
  197|   138k|    if (CRYPTO_UP_REF(&r->references, &i) <= 0)
  ------------------
  |  Branch (197:9): [True: 0, False: 138k]
  ------------------
  198|      0|        return 0;
  199|       |
  200|   138k|    REF_PRINT_COUNT("RSA", i, r);
  ------------------
  |  |  301|   138k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   138k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   138k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   138k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|   138k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   138k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 138k]
  |  |  ------------------
  ------------------
  202|   138k|    return i > 1 ? 1 : 0;
  ------------------
  |  Branch (202:12): [True: 138k, False: 0]
  ------------------
  203|   138k|}
ossl_rsa_set0_libctx:
  211|   138k|{
  212|   138k|    r->libctx = libctx;
  213|   138k|}
ossl_ifc_ffc_compute_security_bits:
  327|   138k|{
  328|   138k|    uint64_t x;
  329|   138k|    uint32_t lx;
  330|   138k|    uint16_t y, cap;
  331|       |
  332|       |    /*
  333|       |     * Look for common values as listed in standards.
  334|       |     * These values are not exactly equal to the results from the formulae in
  335|       |     * the standards but are defined to be canonical.
  336|       |     */
  337|   138k|    switch (n) {
  ------------------
  |  Branch (337:13): [True: 138k, False: 0]
  ------------------
  338|  56.1k|    case 2048: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (338:5): [True: 56.1k, False: 82.2k]
  ------------------
  339|  56.1k|        return 112;
  340|      0|    case 3072: /* SP 800-56B rev 2 Appendix D and FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (340:5): [True: 0, False: 138k]
  ------------------
  341|      0|        return 128;
  342|  82.2k|    case 4096: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (342:5): [True: 82.2k, False: 56.1k]
  ------------------
  343|  82.2k|        return 152;
  344|      0|    case 6144: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (344:5): [True: 0, False: 138k]
  ------------------
  345|      0|        return 176;
  346|      0|    case 7680: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (346:5): [True: 0, False: 138k]
  ------------------
  347|      0|        return 192;
  348|      0|    case 8192: /* SP 800-56B rev 2 Appendix D */
  ------------------
  |  Branch (348:5): [True: 0, False: 138k]
  ------------------
  349|      0|        return 200;
  350|      0|    case 15360: /* FIPS 140-2 IG 7.5 */
  ------------------
  |  Branch (350:5): [True: 0, False: 138k]
  ------------------
  351|      0|        return 256;
  352|   138k|    }
  353|       |
  354|       |    /*
  355|       |     * The first incorrect result (i.e. not accurate or off by one low) occurs
  356|       |     * for n = 699668.  The true value here is 1200.  Instead of using this n
  357|       |     * as the check threshold, the smallest n such that the correct result is
  358|       |     * 1200 is used instead.
  359|       |     */
  360|      0|    if (n >= 687737)
  ------------------
  |  Branch (360:9): [True: 0, False: 0]
  ------------------
  361|      0|        return 1200;
  362|      0|    if (n < 8)
  ------------------
  |  Branch (362:9): [True: 0, False: 0]
  ------------------
  363|      0|        return 0;
  364|       |
  365|       |    /*
  366|       |     * To ensure that the output is non-decreasing with respect to n,
  367|       |     * a cap needs to be applied to the two values where the function over
  368|       |     * estimates the strength (according to the above fast path).
  369|       |     */
  370|      0|    if (n <= 7680)
  ------------------
  |  Branch (370:9): [True: 0, False: 0]
  ------------------
  371|      0|        cap = 192;
  372|      0|    else if (n <= 15360)
  ------------------
  |  Branch (372:14): [True: 0, False: 0]
  ------------------
  373|      0|        cap = 256;
  374|      0|    else
  375|      0|        cap = 1200;
  376|       |
  377|      0|    x = n * (uint64_t)log_2;
  378|      0|    lx = ilog_e(x);
  379|      0|    y = (uint16_t)((mul2(c1_923, icbrt64(mul2(mul2(x, lx), lx))) - c4_690)
  380|      0|        / log_2);
  381|      0|    y = (y + 4) & ~7;
  382|      0|    if (y > cap)
  ------------------
  |  Branch (382:9): [True: 0, False: 0]
  ------------------
  383|      0|        y = cap;
  384|      0|    return y;
  385|      0|}
RSA_security_bits:
  388|   138k|{
  389|   138k|    int bits = BN_num_bits(rsa->n);
  390|       |
  391|   138k|#ifndef FIPS_MODULE
  392|   138k|    if (rsa->version == RSA_ASN1_VERSION_MULTI) {
  ------------------
  |  |   60|   138k|#define RSA_ASN1_VERSION_MULTI 1
  ------------------
  |  Branch (392:9): [True: 0, False: 138k]
  ------------------
  393|       |        /* This ought to mean that we have private key at hand. */
  394|      0|        int ex_primes = sk_RSA_PRIME_INFO_num(rsa->prime_infos);
  395|       |
  396|      0|        if (ex_primes <= 0 || (ex_primes + 2) > ossl_rsa_multip_cap(bits))
  ------------------
  |  Branch (396:13): [True: 0, False: 0]
  |  Branch (396:31): [True: 0, False: 0]
  ------------------
  397|      0|            return 0;
  398|      0|    }
  399|   138k|#endif
  400|   138k|    return ossl_ifc_ffc_compute_security_bits(bits);
  401|   138k|}
RSA_get0_key:
  558|   138k|{
  559|   138k|    if (n != NULL)
  ------------------
  |  Branch (559:9): [True: 138k, False: 0]
  ------------------
  560|   138k|        *n = r->n;
  561|   138k|    if (e != NULL)
  ------------------
  |  Branch (561:9): [True: 138k, False: 0]
  ------------------
  562|   138k|        *e = r->e;
  563|   138k|    if (d != NULL)
  ------------------
  |  Branch (563:9): [True: 138k, False: 0]
  ------------------
  564|   138k|        *d = r->d;
  565|   138k|}
RSA_get0_n:
  648|   415k|{
  649|   415k|    return r->n;
  650|   415k|}
RSA_get0_d:
  658|   138k|{
  659|   138k|    return r->d;
  660|   138k|}
RSA_get0_p:
  663|   276k|{
  664|   276k|    return r->p;
  665|   276k|}
ossl_rsa_get0_pss_params_30:
  710|   138k|{
  711|   138k|    return &r->pss_params;
  712|   138k|}
RSA_clear_flags:
  715|   138k|{
  716|   138k|    r->flags &= ~flags;
  717|   138k|}
RSA_test_flags:
  720|   415k|{
  721|   415k|    return r->flags & flags;
  722|   415k|}
RSA_set_flags:
  725|   138k|{
  726|   138k|    r->flags |= flags;
  727|   138k|}
ossl_rsa_get0_all_params:
  879|   276k|{
  880|   276k|#ifndef FIPS_MODULE
  881|   276k|    RSA_PRIME_INFO *pinfo;
  882|   276k|    int i, pnum;
  883|   276k|#endif
  884|       |
  885|   276k|    if (r == NULL)
  ------------------
  |  Branch (885:9): [True: 0, False: 276k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|       |    /* If |p| is NULL, there are no CRT parameters */
  889|   276k|    if (RSA_get0_p(r) == NULL)
  ------------------
  |  Branch (889:9): [True: 276k, False: 0]
  ------------------
  890|   276k|        return 1;
  891|       |
  892|      0|    sk_BIGNUM_const_push(primes, RSA_get0_p(r));
  893|      0|    sk_BIGNUM_const_push(primes, RSA_get0_q(r));
  894|      0|    sk_BIGNUM_const_push(exps, RSA_get0_dmp1(r));
  895|      0|    sk_BIGNUM_const_push(exps, RSA_get0_dmq1(r));
  896|      0|    sk_BIGNUM_const_push(coeffs, RSA_get0_iqmp(r));
  897|       |
  898|      0|#ifndef FIPS_MODULE
  899|      0|    pnum = RSA_get_multi_prime_extra_count(r);
  900|      0|    for (i = 0; i < pnum; i++) {
  ------------------
  |  Branch (900:17): [True: 0, False: 0]
  ------------------
  901|      0|        pinfo = sk_RSA_PRIME_INFO_value(r->prime_infos, i);
  902|      0|        sk_BIGNUM_const_push(primes, pinfo->r);
  903|      0|        sk_BIGNUM_const_push(exps, pinfo->d);
  904|      0|        sk_BIGNUM_const_push(coeffs, pinfo->t);
  905|      0|    }
  906|      0|#endif
  907|       |
  908|      0|    return 1;
  909|   276k|}
ossl_rsa_check_factors:
  913|   138k|{
  914|   138k|    int valid = 0;
  915|   138k|    int n, i, bits;
  916|   138k|    STACK_OF(BIGNUM_const) *factors = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   138k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  917|   138k|    STACK_OF(BIGNUM_const) *exps = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   138k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  918|   138k|    STACK_OF(BIGNUM_const) *coeffs = sk_BIGNUM_const_new_null();
  ------------------
  |  |   33|   138k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  919|       |
  920|   138k|    if (factors == NULL || exps == NULL || coeffs == NULL)
  ------------------
  |  Branch (920:9): [True: 0, False: 138k]
  |  Branch (920:28): [True: 0, False: 138k]
  |  Branch (920:44): [True: 0, False: 138k]
  ------------------
  921|      0|        goto done;
  922|       |
  923|       |    /*
  924|       |     * Simple sanity check for RSA key. All RSA key parameters
  925|       |     * must be less-than/equal-to RSA parameter n.
  926|       |     */
  927|   138k|    ossl_rsa_get0_all_params(r, factors, exps, coeffs);
  928|   138k|    n = safe_BN_num_bits(RSA_get0_n(r));
  ------------------
  |  |  911|   138k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 138k]
  |  |  ------------------
  ------------------
  929|       |
  930|   138k|    if (safe_BN_num_bits(RSA_get0_d(r)) > n)
  ------------------
  |  |  911|   138k|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 138k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (930:9): [True: 0, False: 138k]
  ------------------
  931|      0|        goto done;
  932|       |
  933|   138k|    for (i = 0; i < sk_BIGNUM_const_num(exps); i++) {
  ------------------
  |  Branch (933:17): [True: 0, False: 138k]
  ------------------
  934|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(exps, i));
  ------------------
  |  |  911|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  935|      0|        if (bits > n)
  ------------------
  |  Branch (935:13): [True: 0, False: 0]
  ------------------
  936|      0|            goto done;
  937|      0|    }
  938|       |
  939|   138k|    for (i = 0; i < sk_BIGNUM_const_num(factors); i++) {
  ------------------
  |  Branch (939:17): [True: 0, False: 138k]
  ------------------
  940|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(factors, i));
  ------------------
  |  |  911|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  941|      0|        if (bits > n)
  ------------------
  |  Branch (941:13): [True: 0, False: 0]
  ------------------
  942|      0|            goto done;
  943|      0|    }
  944|       |
  945|   138k|    for (i = 0; i < sk_BIGNUM_const_num(coeffs); i++) {
  ------------------
  |  Branch (945:17): [True: 0, False: 138k]
  ------------------
  946|      0|        bits = safe_BN_num_bits(sk_BIGNUM_const_value(coeffs, i));
  ------------------
  |  |  911|      0|#define safe_BN_num_bits(_k_) (((_k_) == NULL) ? 0 : BN_num_bits((_k_)))
  |  |  ------------------
  |  |  |  Branch (911:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  947|      0|        if (bits > n)
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|            goto done;
  949|      0|    }
  950|       |
  951|   138k|    valid = 1;
  952|       |
  953|   138k|done:
  954|   138k|    sk_BIGNUM_const_free(factors);
  955|   138k|    sk_BIGNUM_const_free(exps);
  956|   138k|    sk_BIGNUM_const_free(coeffs);
  957|       |
  958|   138k|    return valid;
  959|   138k|}
rsa_lib.c:rsa_new_intern:
   77|   138k|{
   78|   138k|    RSA *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   138k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|       |
   80|   138k|    if (ret == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 138k]
  ------------------
   81|      0|        return NULL;
   82|       |
   83|   138k|    ret->lock = CRYPTO_THREAD_lock_new();
   84|   138k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (84:9): [True: 0, False: 138k]
  ------------------
   85|      0|        ERR_raise(ERR_LIB_RSA, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   86|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   87|      0|        return NULL;
   88|      0|    }
   89|       |
   90|   138k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (90:9): [True: 0, False: 138k]
  ------------------
   91|      0|        CRYPTO_THREAD_lock_free(ret->lock);
   92|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|      0|        return NULL;
   94|      0|    }
   95|       |
   96|   138k|    ret->blindings_sa = ossl_rsa_alloc_blinding();
   97|   138k|    if (ret->blindings_sa == NULL)
  ------------------
  |  Branch (97:9): [True: 0, False: 138k]
  ------------------
   98|      0|        goto err;
   99|       |
  100|   138k|    ret->libctx = libctx;
  101|   138k|    ret->meth = RSA_get_default_method();
  102|   138k|#if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODULE)
  103|   138k|    ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
  ------------------
  |  |  476|   138k|#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
  ------------------
  104|   138k|    if (engine) {
  ------------------
  |  Branch (104:9): [True: 0, False: 138k]
  ------------------
  105|      0|        if (!ENGINE_init(engine)) {
  ------------------
  |  Branch (105:13): [True: 0, False: 0]
  ------------------
  106|      0|            ERR_raise(ERR_LIB_RSA, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  107|      0|            goto err;
  108|      0|        }
  109|      0|        ret->engine = engine;
  110|   138k|    } else {
  111|   138k|        ret->engine = ENGINE_get_default_RSA();
  112|   138k|    }
  113|   138k|    if (ret->engine) {
  ------------------
  |  Branch (113:9): [True: 0, False: 138k]
  ------------------
  114|      0|        ret->meth = ENGINE_get_RSA(ret->engine);
  115|      0|        if (ret->meth == NULL) {
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  ------------------
  116|      0|            ERR_raise(ERR_LIB_RSA, ERR_R_ENGINE_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|            goto err;
  118|      0|        }
  119|      0|    }
  120|   138k|#endif
  121|       |
  122|   138k|    ret->flags = ret->meth->flags & ~RSA_FLAG_NON_FIPS_ALLOW;
  ------------------
  |  |  476|   138k|#define RSA_FLAG_NON_FIPS_ALLOW 0x0400
  ------------------
  123|   138k|#ifndef FIPS_MODULE
  124|   138k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data)) {
  ------------------
  |  |  259|   138k|#define CRYPTO_EX_INDEX_RSA 9
  ------------------
  |  Branch (124:9): [True: 0, False: 138k]
  ------------------
  125|      0|        goto err;
  126|      0|    }
  127|   138k|#endif
  128|       |
  129|   138k|    if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
  ------------------
  |  Branch (129:9): [True: 138k, False: 0]
  |  Branch (129:38): [True: 0, False: 138k]
  ------------------
  130|      0|        ERR_raise(ERR_LIB_RSA, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  131|      0|        goto err;
  132|      0|    }
  133|       |
  134|   138k|    return ret;
  135|       |
  136|      0|err:
  137|      0|    RSA_free(ret);
  138|       |    return NULL;
  139|   138k|}

RSA_get_default_method:
   92|   138k|{
   93|   138k|    return default_RSA_meth;
   94|   138k|}
RSA_PKCS1_OpenSSL:
   97|   138k|{
   98|   138k|    return &rsa_pkcs1_ossl_meth;
   99|   138k|}
ossl_rsa_free_blinding:
  243|   138k|{
  244|   138k|    SPARSE_ARRAY_OF(BN_BLINDING) *blindings = rsa->blindings_sa;
  ------------------
  |  |   21|   138k|#define SPARSE_ARRAY_OF(type) struct sparse_array_st_##type
  ------------------
  245|       |
  246|       |    ossl_sa_BN_BLINDING_doall_arg(blindings, free_bn_blinding, NULL);
  247|   138k|    ossl_sa_BN_BLINDING_free(blindings);
  248|   138k|}
ossl_rsa_alloc_blinding:
  251|   138k|{
  252|   138k|    return ossl_sa_BN_BLINDING_new();
  253|   138k|}
rsa_ossl.c:rsa_ossl_init:
 1160|   138k|{
 1161|   138k|    rsa->flags |= RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE;
  ------------------
  |  |   65|   138k|#define RSA_FLAG_CACHE_PUBLIC 0x0002
  ------------------
                  rsa->flags |= RSA_FLAG_CACHE_PUBLIC | RSA_FLAG_CACHE_PRIVATE;
  ------------------
  |  |   66|   138k|#define RSA_FLAG_CACHE_PRIVATE 0x0004
  ------------------
 1162|   138k|    return 1;
 1163|   138k|}
rsa_ossl.c:rsa_ossl_finish:
 1166|   138k|{
 1167|   138k|#ifndef FIPS_MODULE
 1168|   138k|    int i;
 1169|   138k|    RSA_PRIME_INFO *pinfo;
 1170|       |
 1171|   138k|    for (i = 0; i < sk_RSA_PRIME_INFO_num(rsa->prime_infos); i++) {
  ------------------
  |  Branch (1171:17): [True: 0, False: 138k]
  ------------------
 1172|      0|        pinfo = sk_RSA_PRIME_INFO_value(rsa->prime_infos, i);
 1173|      0|        BN_MONT_CTX_free(pinfo->m);
 1174|      0|    }
 1175|   138k|#endif
 1176|       |
 1177|   138k|    BN_MONT_CTX_free(rsa->_method_mod_n);
 1178|   138k|    BN_MONT_CTX_free(rsa->_method_mod_p);
 1179|   138k|    BN_MONT_CTX_free(rsa->_method_mod_q);
 1180|   138k|    return 1;
 1181|   138k|}

ossl_self_test_set_callback_new:
   35|    695|{
   36|    695|    SELF_TEST_CB *stcb;
   37|       |
   38|    695|    stcb = OPENSSL_zalloc(sizeof(*stcb));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|    695|    return stcb;
   40|    695|}
ossl_self_test_set_callback_free:
   43|    695|{
   44|    695|    OPENSSL_free(stcb);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   45|    695|}

SHA256_Init:
   43|  32.2k|{
   44|  32.2k|    memset(c, 0, sizeof(*c));
   45|  32.2k|    c->h[0] = 0x6a09e667UL;
   46|  32.2k|    c->h[1] = 0xbb67ae85UL;
   47|  32.2k|    c->h[2] = 0x3c6ef372UL;
   48|  32.2k|    c->h[3] = 0xa54ff53aUL;
   49|  32.2k|    c->h[4] = 0x510e527fUL;
   50|  32.2k|    c->h[5] = 0x9b05688cUL;
   51|  32.2k|    c->h[6] = 0x1f83d9abUL;
   52|  32.2k|    c->h[7] = 0x5be0cd19UL;
   53|  32.2k|    c->md_len = SHA256_DIGEST_LENGTH;
  ------------------
  |  |   86|  32.2k|#define SHA256_DIGEST_LENGTH 32
  ------------------
   54|  32.2k|    return 1;
   55|  32.2k|}

ossl_sha3_reset:
   19|  25.9k|{
   20|       |#if defined(__s390x__) && defined(OPENSSL_CPUID_OBJ)
   21|       |    if (!(OPENSSL_s390xcap_P.stfle[1] & S390X_CAPBIT(S390X_MSA12)))
   22|       |#endif
   23|  25.9k|        memset(ctx->A, 0, sizeof(ctx->A));
   24|  25.9k|    ctx->bufsz = 0;
   25|  25.9k|    ctx->xof_state = XOF_STATE_INIT;
  ------------------
  |  |   35|  25.9k|#define XOF_STATE_INIT 0
  ------------------
   26|  25.9k|}
ossl_sha3_init:
   29|  4.94k|{
   30|  4.94k|    size_t bsz = SHA3_BLOCKSIZE(bitlen);
  ------------------
  |  |   21|  4.94k|#define SHA3_BLOCKSIZE(bitlen) (KECCAK1600_WIDTH - bitlen * 2) / 8
  |  |  ------------------
  |  |  |  |   18|  4.94k|#define KECCAK1600_WIDTH 1600
  |  |  ------------------
  ------------------
   31|       |
   32|  4.94k|    if (bsz <= sizeof(ctx->buf)) {
  ------------------
  |  Branch (32:9): [True: 4.94k, False: 0]
  ------------------
   33|  4.94k|        ossl_sha3_reset(ctx);
   34|  4.94k|        ctx->block_size = bsz;
   35|  4.94k|        ctx->md_size = bitlen / 8;
   36|  4.94k|        ctx->pad = pad;
   37|  4.94k|        return 1;
   38|  4.94k|    }
   39|       |
   40|      0|    return 0;
   41|  4.94k|}
ossl_keccak_init:
   44|  2.47k|{
   45|  2.47k|    int ret = ossl_sha3_init(ctx, pad, bitlen);
   46|       |
   47|  2.47k|    if (ret)
  ------------------
  |  Branch (47:9): [True: 2.47k, False: 0]
  ------------------
   48|  2.47k|        ctx->md_size = mdlen / 8;
   49|  2.47k|    return ret;
   50|  2.47k|}
ossl_sha3_final:
  104|  9.88k|{
  105|  9.88k|    size_t bsz = ctx->block_size;
  106|  9.88k|    size_t num = ctx->bufsz;
  107|       |
  108|  9.88k|    if (outlen == 0)
  ------------------
  |  Branch (108:9): [True: 0, False: 9.88k]
  ------------------
  109|      0|        return 1;
  110|  9.88k|    if (ctx->xof_state == XOF_STATE_SQUEEZE
  ------------------
  |  |   38|  19.7k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (110:9): [True: 0, False: 9.88k]
  ------------------
  111|  9.88k|        || ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  9.88k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (111:12): [True: 0, False: 9.88k]
  ------------------
  112|      0|        return 0;
  113|       |
  114|       |    /*
  115|       |     * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  116|       |     * in which case both byte operations below are performed on
  117|       |     * same byte...
  118|       |     */
  119|  9.88k|    memset(ctx->buf + num, 0, bsz - num);
  120|  9.88k|    ctx->buf[num] = ctx->pad;
  121|  9.88k|    ctx->buf[bsz - 1] |= 0x80;
  122|       |
  123|  9.88k|    (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  124|       |
  125|  9.88k|    ctx->xof_state = XOF_STATE_FINAL;
  ------------------
  |  |   37|  9.88k|#define XOF_STATE_FINAL 2
  ------------------
  126|  9.88k|    SHA3_squeeze(ctx->A, out, outlen, bsz, 0);
  127|  9.88k|    return 1;
  128|  9.88k|}
ossl_sha3_squeeze:
  141|  33.4k|{
  142|  33.4k|    size_t bsz = ctx->block_size;
  143|  33.4k|    size_t num = ctx->bufsz;
  144|  33.4k|    size_t len;
  145|  33.4k|    int next = 1;
  146|       |
  147|  33.4k|    if (outlen == 0)
  ------------------
  |  Branch (147:9): [True: 0, False: 33.4k]
  ------------------
  148|      0|        return 1;
  149|       |
  150|  33.4k|    if (ctx->xof_state == XOF_STATE_FINAL)
  ------------------
  |  |   37|  33.4k|#define XOF_STATE_FINAL 2
  ------------------
  |  Branch (150:9): [True: 0, False: 33.4k]
  ------------------
  151|      0|        return 0;
  152|       |
  153|       |    /*
  154|       |     * On the first squeeze call, finish the absorb process,
  155|       |     * by adding the trailing padding and then doing
  156|       |     * a final absorb.
  157|       |     */
  158|  33.4k|    if (ctx->xof_state != XOF_STATE_SQUEEZE) {
  ------------------
  |  |   38|  33.4k|#define XOF_STATE_SQUEEZE 3
  ------------------
  |  Branch (158:9): [True: 11.1k, False: 22.3k]
  ------------------
  159|       |        /*
  160|       |         * Pad the data with 10*1. Note that |num| can be |bsz - 1|
  161|       |         * in which case both byte operations below are performed on
  162|       |         * same byte...
  163|       |         */
  164|  11.1k|        memset(ctx->buf + num, 0, bsz - num);
  165|  11.1k|        ctx->buf[num] = ctx->pad;
  166|  11.1k|        ctx->buf[bsz - 1] |= 0x80;
  167|  11.1k|        (void)SHA3_absorb(ctx->A, ctx->buf, bsz, bsz);
  168|  11.1k|        ctx->xof_state = XOF_STATE_SQUEEZE;
  ------------------
  |  |   38|  11.1k|#define XOF_STATE_SQUEEZE 3
  ------------------
  169|  11.1k|        num = ctx->bufsz = 0;
  170|  11.1k|        next = 0;
  171|  11.1k|    }
  172|       |
  173|       |    /*
  174|       |     * Step 1. Consume any bytes left over from a previous squeeze
  175|       |     * (See Step 4 below).
  176|       |     */
  177|  33.4k|    if (num != 0) {
  ------------------
  |  Branch (177:9): [True: 0, False: 33.4k]
  ------------------
  178|      0|        if (outlen > ctx->bufsz)
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  ------------------
  179|      0|            len = ctx->bufsz;
  180|      0|        else
  181|      0|            len = outlen;
  182|      0|        memcpy(out, ctx->buf + bsz - ctx->bufsz, len);
  183|      0|        out += len;
  184|      0|        outlen -= len;
  185|      0|        ctx->bufsz -= len;
  186|      0|    }
  187|  33.4k|    if (outlen == 0)
  ------------------
  |  Branch (187:9): [True: 0, False: 33.4k]
  ------------------
  188|      0|        return 1;
  189|       |
  190|       |    /* Step 2. Copy full sized squeezed blocks to the output buffer directly */
  191|  33.4k|    if (outlen >= bsz) {
  ------------------
  |  Branch (191:9): [True: 33.4k, False: 0]
  ------------------
  192|  33.4k|        len = bsz * (outlen / bsz);
  193|  33.4k|        SHA3_squeeze(ctx->A, out, len, bsz, next);
  194|  33.4k|        next = 1;
  195|  33.4k|        out += len;
  196|  33.4k|        outlen -= len;
  197|  33.4k|    }
  198|  33.4k|    if (outlen > 0) {
  ------------------
  |  Branch (198:9): [True: 0, False: 33.4k]
  ------------------
  199|       |        /* Step 3. Squeeze one more block into a buffer */
  200|      0|        SHA3_squeeze(ctx->A, ctx->buf, bsz, bsz, next);
  201|      0|        memcpy(out, ctx->buf, outlen);
  202|       |        /* Step 4. Remember the leftover part of the squeezed block */
  203|      0|        ctx->bufsz = bsz - outlen;
  204|      0|    }
  205|       |
  206|  33.4k|    return 1;
  207|  33.4k|}

SHA1_Init:
   60|  11.0k|{
   61|  11.0k|    memset(c, 0, sizeof(*c));
   62|  11.0k|    c->h0 = INIT_DATA_h0;
  ------------------
  |  |   53|  11.0k|#define INIT_DATA_h0 0x67452301UL
  ------------------
   63|  11.0k|    c->h1 = INIT_DATA_h1;
  ------------------
  |  |   54|  11.0k|#define INIT_DATA_h1 0xefcdab89UL
  ------------------
   64|  11.0k|    c->h2 = INIT_DATA_h2;
  ------------------
  |  |   55|  11.0k|#define INIT_DATA_h2 0x98badcfeUL
  ------------------
   65|  11.0k|    c->h3 = INIT_DATA_h3;
  ------------------
  |  |   56|  11.0k|#define INIT_DATA_h3 0x10325476UL
  ------------------
   66|  11.0k|    c->h4 = INIT_DATA_h4;
  ------------------
  |  |   57|  11.0k|#define INIT_DATA_h4 0xc3d2e1f0UL
  ------------------
   67|  11.0k|    return 1;
   68|  11.0k|}

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

EVP_sm3:
   28|      1|{
   29|      1|    return &sm3_md;
   30|      1|}

ossl_sa_new:
   59|   141k|{
   60|   141k|    OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
  ------------------
  |  |  108|   141k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   61|       |
   62|   141k|    return res;
   63|   141k|}
ossl_sa_free:
  111|   141k|{
  112|   141k|    if (sa != NULL) {
  ------------------
  |  Branch (112:9): [True: 141k, False: 0]
  ------------------
  113|   141k|        sa_doall(sa, &sa_free_node, NULL, NULL);
  114|   141k|        OPENSSL_free(sa);
  ------------------
  |  |  131|   141k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  115|   141k|    }
  116|   141k|}
ossl_sa_doall:
  135|    324|{
  136|    324|    struct trampoline_st tramp;
  137|       |
  138|    324|    tramp.func = leaf;
  139|    324|    if (sa != NULL)
  ------------------
  |  Branch (139:9): [True: 324, False: 0]
  ------------------
  140|    324|        sa_doall(sa, NULL, &trampoline, &tramp);
  141|    324|}
ossl_sa_doall_arg:
  146|   141k|{
  147|   141k|    if (sa != NULL)
  ------------------
  |  Branch (147:9): [True: 141k, False: 0]
  ------------------
  148|   141k|        sa_doall(sa, NULL, leaf, arg);
  149|   141k|}
ossl_sa_num:
  152|      6|{
  153|      6|    return sa == NULL ? 0 : sa->nelem;
  ------------------
  |  Branch (153:12): [True: 0, False: 6]
  ------------------
  154|      6|}
ossl_sa_get:
  157|  9.96M|{
  158|  9.96M|    int level;
  159|  9.96M|    void **p, *r = NULL;
  160|       |
  161|  9.96M|    if (sa == NULL || sa->nelem == 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 9.96M]
  |  Branch (161:23): [True: 1.58k, False: 9.96M]
  ------------------
  162|  1.58k|        return NULL;
  163|       |
  164|  9.96M|    if (n <= sa->top) {
  ------------------
  |  Branch (164:9): [True: 9.82M, False: 142k]
  ------------------
  165|  9.82M|        p = sa->nodes;
  166|  11.4M|        for (level = sa->levels - 1; p != NULL && level > 0; level--)
  ------------------
  |  Branch (166:38): [True: 11.3M, False: 129k]
  |  Branch (166:51): [True: 1.66M, False: 9.69M]
  ------------------
  167|  1.66M|            p = (void **)p[(n >> (OPENSSL_SA_BLOCK_BITS * level))
  ------------------
  |  |   34|  1.66M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  168|  1.66M|                & SA_BLOCK_MASK];
  ------------------
  |  |   46|  1.66M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  1.66M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  1.66M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  169|  9.82M|        r = p == NULL ? NULL : p[n & SA_BLOCK_MASK];
  ------------------
  |  |   46|  9.69M|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|  9.69M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  9.69M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (169:13): [True: 129k, False: 9.69M]
  ------------------
  170|  9.82M|    }
  171|  9.96M|    return r;
  172|  9.96M|}
ossl_sa_set:
  180|   284k|{
  181|   284k|    int i, level = 1;
  182|   284k|    ossl_uintmax_t n = posn;
  183|   284k|    void **p;
  184|       |
  185|   284k|    if (sa == NULL)
  ------------------
  |  Branch (185:9): [True: 0, False: 284k]
  ------------------
  186|      0|        return 0;
  187|       |
  188|  1.14M|    for (level = 1; level < SA_BLOCK_MAX_LEVELS; level++)
  ------------------
  |  |   47|  1.14M|#define SA_BLOCK_MAX_LEVELS (((int)sizeof(ossl_uintmax_t) * 8 \
  |  |   48|  1.14M|                                 + OPENSSL_SA_BLOCK_BITS - 1) \
  |  |  ------------------
  |  |  |  |   34|  1.14M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  |  |   49|  1.14M|    / OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  1.14M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (188:21): [True: 1.14M, False: 0]
  ------------------
  189|  1.14M|        if ((n >>= OPENSSL_SA_BLOCK_BITS) == 0)
  ------------------
  |  |   34|  1.14M|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
  |  Branch (189:13): [True: 284k, False: 856k]
  ------------------
  190|   284k|            break;
  191|       |
  192|   286k|    for (; sa->levels < level; sa->levels++) {
  ------------------
  |  Branch (192:12): [True: 2.13k, False: 284k]
  ------------------
  193|  2.13k|        p = alloc_node();
  194|  2.13k|        if (p == NULL)
  ------------------
  |  Branch (194:13): [True: 0, False: 2.13k]
  ------------------
  195|      0|            return 0;
  196|  2.13k|        p[0] = sa->nodes;
  197|  2.13k|        sa->nodes = p;
  198|  2.13k|    }
  199|   284k|    if (sa->top < posn)
  ------------------
  |  Branch (199:9): [True: 71.6k, False: 213k]
  ------------------
  200|  71.6k|        sa->top = posn;
  201|       |
  202|   284k|    p = sa->nodes;
  203|  1.15M|    for (level = sa->levels - 1; level > 0; level--) {
  ------------------
  |  Branch (203:34): [True: 870k, False: 284k]
  ------------------
  204|   870k|        i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   34|   870k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
                      i = (posn >> (OPENSSL_SA_BLOCK_BITS * level)) & SA_BLOCK_MASK;
  ------------------
  |  |   46|   870k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   870k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   870k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|   870k|        if (p[i] == NULL && (p[i] = alloc_node()) == NULL)
  ------------------
  |  Branch (205:13): [True: 259k, False: 611k]
  |  Branch (205:29): [True: 0, False: 259k]
  ------------------
  206|      0|            return 0;
  207|   870k|        p = p[i];
  208|   870k|    }
  209|   284k|    p += posn & SA_BLOCK_MASK;
  ------------------
  |  |   46|   284k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   284k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   284k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  210|   284k|    if (val == NULL && *p != NULL)
  ------------------
  |  Branch (210:9): [True: 142k, False: 142k]
  |  Branch (210:24): [True: 142k, False: 0]
  ------------------
  211|   142k|        sa->nelem--;
  212|   142k|    else if (val != NULL && *p == NULL)
  ------------------
  |  Branch (212:14): [True: 142k, False: 0]
  |  Branch (212:29): [True: 142k, False: 3]
  ------------------
  213|   142k|        sa->nelem++;
  214|   284k|    *p = val;
  215|   284k|    return 1;
  216|   284k|}
sparse_array.c:sa_doall:
   67|   283k|{
   68|   283k|    int i[SA_BLOCK_MAX_LEVELS];
   69|   283k|    void *nodes[SA_BLOCK_MAX_LEVELS];
   70|   283k|    ossl_uintmax_t idx = 0;
   71|   283k|    int l = 0;
   72|       |
   73|   283k|    i[0] = 0;
   74|   283k|    nodes[0] = sa->nodes;
   75|  14.5M|    while (l >= 0) {
  ------------------
  |  Branch (75:12): [True: 14.3M, False: 283k]
  ------------------
   76|  14.3M|        const int n = i[l];
   77|  14.3M|        void **const p = nodes[l];
   78|       |
   79|  14.3M|        if (n >= SA_BLOCK_MAX) {
  ------------------
  |  |   45|  14.3M|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  ------------------
  |  |  |  |   34|  14.3M|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  ------------------
  ------------------
  |  Branch (79:13): [True: 841k, False: 13.4M]
  ------------------
   80|   841k|            if (p != NULL && node != NULL)
  ------------------
  |  Branch (80:17): [True: 559k, False: 281k]
  |  Branch (80:30): [True: 261k, False: 298k]
  ------------------
   81|   261k|                (*node)(p);
   82|   841k|            l--;
   83|   841k|            idx >>= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|   841k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   84|  13.4M|        } else {
   85|  13.4M|            i[l] = n + 1;
   86|  13.4M|            if (p != NULL && p[n] != NULL) {
  ------------------
  |  Branch (86:17): [True: 8.95M, False: 4.51M]
  |  Branch (86:30): [True: 720k, False: 8.23M]
  ------------------
   87|   720k|                idx = (idx & ~SA_BLOCK_MASK) | n;
  ------------------
  |  |   46|   720k|#define SA_BLOCK_MASK (SA_BLOCK_MAX - 1)
  |  |  ------------------
  |  |  |  |   45|   720k|#define SA_BLOCK_MAX (1 << OPENSSL_SA_BLOCK_BITS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   720k|#define OPENSSL_SA_BLOCK_BITS 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   88|   720k|                if (l < sa->levels - 1) {
  ------------------
  |  Branch (88:21): [True: 558k, False: 162k]
  ------------------
   89|   558k|                    i[++l] = 0;
   90|   558k|                    nodes[l] = p[n];
   91|   558k|                    idx <<= OPENSSL_SA_BLOCK_BITS;
  ------------------
  |  |   34|   558k|#define OPENSSL_SA_BLOCK_BITS 4
  ------------------
   92|   558k|                } else if (leaf != NULL) {
  ------------------
  |  Branch (92:28): [True: 162k, False: 0]
  ------------------
   93|   162k|                    (*leaf)(idx, p[n], arg);
   94|   162k|                }
   95|   720k|            }
   96|  13.4M|        }
   97|  14.3M|    }
   98|   283k|}
sparse_array.c:sa_free_node:
  101|   261k|{
  102|   261k|    OPENSSL_free(p);
  ------------------
  |  |  131|   261k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|   261k|}
sparse_array.c:alloc_node:
  175|   261k|{
  176|   261k|    return OPENSSL_calloc(SA_BLOCK_MAX, sizeof(void *));
  ------------------
  |  |  112|   261k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  177|   261k|}

ossl_err_load_SSL_strings:
  629|      1|{
  630|      1|#ifndef OPENSSL_NO_ERR
  631|      1|    if (ERR_reason_error_string(SSL_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (631:9): [True: 1, False: 0]
  ------------------
  632|      1|        ERR_load_strings_const(SSL_str_reasons);
  633|      1|#endif
  634|      1|    return 1;
  635|      1|}

OPENSSL_sk_set_cmp_func:
   39|  2.66k|{
   40|  2.66k|    OPENSSL_sk_compfunc old = sk->comp;
   41|       |
   42|  2.66k|    if (sk->comp != c)
  ------------------
  |  Branch (42:9): [True: 2.66k, False: 0]
  ------------------
   43|  2.66k|        sk->sorted = 0;
   44|  2.66k|    sk->comp = c;
   45|       |
   46|  2.66k|    return old;
   47|  2.66k|}
OPENSSL_sk_dup:
   50|   368k|{
   51|   368k|    OPENSSL_STACK *ret;
   52|       |
   53|   368k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  106|   368k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (53:9): [True: 0, False: 368k]
  ------------------
   54|      0|        goto err;
   55|       |
   56|   368k|    if (sk == NULL) {
  ------------------
  |  Branch (56:9): [True: 1, False: 368k]
  ------------------
   57|      1|        ret->num = 0;
   58|      1|        ret->sorted = 0;
   59|      1|        ret->comp = NULL;
   60|   368k|    } else {
   61|       |        /* direct structure assignment */
   62|   368k|        *ret = *sk;
   63|   368k|    }
   64|       |
   65|   368k|    if (sk == NULL || sk->num == 0) {
  ------------------
  |  Branch (65:9): [True: 1, False: 368k]
  |  Branch (65:23): [True: 61, False: 368k]
  ------------------
   66|       |        /* postpone |ret->data| allocation */
   67|     62|        ret->data = NULL;
   68|     62|        ret->num_alloc = 0;
   69|     62|        return ret;
   70|     62|    }
   71|       |
   72|       |    /* duplicate |sk->data| content */
   73|   368k|    ret->data = OPENSSL_malloc_array(sk->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  110|   368k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   74|   368k|    if (ret->data == NULL)
  ------------------
  |  Branch (74:9): [True: 0, False: 368k]
  ------------------
   75|      0|        goto err;
   76|   368k|    memcpy(ret->data, sk->data, sizeof(void *) * sk->num);
   77|   368k|    return ret;
   78|       |
   79|      0|err:
   80|      0|    OPENSSL_sk_free(ret);
   81|       |    return NULL;
   82|   368k|}
OPENSSL_sk_deep_copy:
   87|   382k|{
   88|   382k|    OPENSSL_STACK *ret;
   89|   382k|    int i;
   90|       |
   91|   382k|    if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  106|   382k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (91:9): [True: 0, False: 382k]
  ------------------
   92|      0|        goto err;
   93|       |
   94|   382k|    if (sk == NULL) {
  ------------------
  |  Branch (94:9): [True: 931, False: 381k]
  ------------------
   95|    931|        ret->num = 0;
   96|    931|        ret->sorted = 0;
   97|    931|        ret->comp = NULL;
   98|   381k|    } else {
   99|       |        /* direct structure assignment */
  100|   381k|        *ret = *sk;
  101|   381k|    }
  102|       |
  103|   382k|    if (sk == NULL || sk->num == 0) {
  ------------------
  |  Branch (103:9): [True: 931, False: 381k]
  |  Branch (103:23): [True: 0, False: 381k]
  ------------------
  104|       |        /* postpone |ret| data allocation */
  105|    931|        ret->data = NULL;
  106|    931|        ret->num_alloc = 0;
  107|    931|        return ret;
  108|    931|    }
  109|       |
  110|   381k|    ret->num_alloc = sk->num > min_nodes ? sk->num : min_nodes;
  ------------------
  |  Branch (110:22): [True: 190k, False: 190k]
  ------------------
  111|   381k|    ret->data = OPENSSL_calloc(ret->num_alloc, sizeof(*ret->data));
  ------------------
  |  |  112|   381k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|   381k|    if (ret->data == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 381k]
  ------------------
  113|      0|        goto err;
  114|       |
  115|  1.71M|    for (i = 0; i < ret->num; ++i) {
  ------------------
  |  Branch (115:17): [True: 1.33M, False: 381k]
  ------------------
  116|  1.33M|        if (sk->data[i] == NULL)
  ------------------
  |  Branch (116:13): [True: 0, False: 1.33M]
  ------------------
  117|      0|            continue;
  118|  1.33M|        if ((ret->data[i] = copy_func(sk->data[i])) == NULL) {
  ------------------
  |  Branch (118:13): [True: 0, False: 1.33M]
  ------------------
  119|      0|            while (--i >= 0)
  ------------------
  |  Branch (119:20): [True: 0, False: 0]
  ------------------
  120|      0|                if (ret->data[i] != NULL)
  ------------------
  |  Branch (120:21): [True: 0, False: 0]
  ------------------
  121|      0|                    free_func((void *)ret->data[i]);
  122|      0|            goto err;
  123|      0|        }
  124|  1.33M|    }
  125|   381k|    return ret;
  126|       |
  127|      0|err:
  128|      0|    OPENSSL_sk_free(ret);
  129|       |    return NULL;
  130|   381k|}
OPENSSL_sk_new_null:
  133|  5.58M|{
  134|       |    return OPENSSL_sk_new_reserve(NULL, 0);
  135|  5.58M|}
OPENSSL_sk_new:
  138|  34.5k|{
  139|  34.5k|    return OPENSSL_sk_new_reserve(c, 0);
  140|  34.5k|}
OPENSSL_sk_new_reserve:
  229|  5.61M|{
  230|  5.61M|    OPENSSL_STACK *st = OPENSSL_zalloc(sizeof(OPENSSL_STACK));
  ------------------
  |  |  108|  5.61M|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  231|       |
  232|  5.61M|    if (st == NULL)
  ------------------
  |  Branch (232:9): [True: 0, False: 5.61M]
  ------------------
  233|      0|        return NULL;
  234|       |
  235|  5.61M|    st->comp = c;
  236|       |
  237|  5.61M|    if (n <= 0)
  ------------------
  |  Branch (237:9): [True: 5.61M, False: 6]
  ------------------
  238|  5.61M|        return st;
  239|       |
  240|      6|    if (!sk_reserve(st, n, 1)) {
  ------------------
  |  Branch (240:9): [True: 0, False: 6]
  ------------------
  241|      0|        OPENSSL_sk_free(st);
  242|      0|        return NULL;
  243|      0|    }
  244|       |
  245|      6|    return st;
  246|      6|}
OPENSSL_sk_set_thunks:
  261|  1.89M|{
  262|  1.89M|    if (st != NULL)
  ------------------
  |  Branch (262:9): [True: 1.35M, False: 542k]
  ------------------
  263|  1.35M|        st->free_thunk = f_thunk;
  264|       |
  265|  1.89M|    return st;
  266|  1.89M|}
OPENSSL_sk_insert:
  269|  9.26M|{
  270|  9.26M|    if (st == NULL) {
  ------------------
  |  Branch (270:9): [True: 0, False: 9.26M]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        return 0;
  273|      0|    }
  274|  9.26M|    if (st->num == max_nodes) {
  ------------------
  |  Branch (274:9): [True: 0, False: 9.26M]
  ------------------
  275|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|      0|        return 0;
  277|      0|    }
  278|       |
  279|  9.26M|    if (!sk_reserve(st, 1, 0))
  ------------------
  |  Branch (279:9): [True: 0, False: 9.26M]
  ------------------
  280|      0|        return 0;
  281|       |
  282|  9.26M|    if ((loc >= st->num) || (loc < 0)) {
  ------------------
  |  Branch (282:9): [True: 9.26M, False: 108]
  |  Branch (282:29): [True: 0, False: 108]
  ------------------
  283|  9.26M|        st->data[st->num] = data;
  284|  9.26M|    } else {
  285|    108|        memmove(&st->data[loc + 1], &st->data[loc],
  286|    108|            sizeof(st->data[0]) * (st->num - loc));
  287|    108|        st->data[loc] = data;
  288|    108|    }
  289|  9.26M|    st->num++;
  290|  9.26M|    st->sorted = 0;
  291|  9.26M|    return st->num;
  292|  9.26M|}
OPENSSL_sk_delete_ptr:
  307|      2|{
  308|      2|    int i;
  309|       |
  310|      2|    if (st == NULL)
  ------------------
  |  Branch (310:9): [True: 0, False: 2]
  ------------------
  311|      0|        return NULL;
  312|       |
  313|      2|    for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (313:17): [True: 1, False: 1]
  ------------------
  314|      1|        if (st->data[i] == p)
  ------------------
  |  Branch (314:13): [True: 1, False: 0]
  ------------------
  315|      1|            return internal_delete(st, i);
  316|      1|    return NULL;
  317|      2|}
OPENSSL_sk_delete:
  320|    342|{
  321|    342|    if (st == NULL || loc < 0 || loc >= st->num)
  ------------------
  |  Branch (321:9): [True: 0, False: 342]
  |  Branch (321:23): [True: 0, False: 342]
  |  Branch (321:34): [True: 0, False: 342]
  ------------------
  322|      0|        return NULL;
  323|       |
  324|    342|    return internal_delete(st, loc);
  325|    342|}
OPENSSL_sk_find:
  393|   193k|{
  394|   193k|    return internal_find(st, data, OSSL_BSEARCH_FIRST_VALUE_ON_MATCH, NULL);
  ------------------
  |  |  150|   193k|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  395|   193k|}
OPENSSL_sk_push:
  408|  9.26M|{
  409|  9.26M|    if (st == NULL)
  ------------------
  |  Branch (409:9): [True: 0, False: 9.26M]
  ------------------
  410|      0|        return 0;
  411|  9.26M|    return OPENSSL_sk_insert(st, data, st->num);
  412|  9.26M|}
OPENSSL_sk_unshift:
  415|    107|{
  416|    107|    return OPENSSL_sk_insert(st, data, 0);
  417|    107|}
OPENSSL_sk_pop:
  427|  2.47k|{
  428|  2.47k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (428:9): [True: 0, False: 2.47k]
  |  Branch (428:23): [True: 0, False: 2.47k]
  ------------------
  429|      0|        return NULL;
  430|  2.47k|    return internal_delete(st, st->num - 1);
  431|  2.47k|}
OPENSSL_sk_pop_free:
  442|  4.98M|{
  443|  4.98M|    int i;
  444|       |
  445|  4.98M|    if (st == NULL)
  ------------------
  |  Branch (445:9): [True: 1.38M, False: 3.59M]
  ------------------
  446|  1.38M|        return;
  447|       |
  448|  11.9M|    for (i = 0; i < st->num; i++) {
  ------------------
  |  Branch (448:17): [True: 8.34M, False: 3.59M]
  ------------------
  449|  8.34M|        if (st->data[i] != NULL) {
  ------------------
  |  Branch (449:13): [True: 8.34M, False: 2]
  ------------------
  450|  8.34M|            if (st->free_thunk != NULL)
  ------------------
  |  Branch (450:17): [True: 4.93M, False: 3.41M]
  ------------------
  451|  4.93M|                st->free_thunk(func, (void *)st->data[i]);
  452|  3.41M|            else
  453|  3.41M|                func((void *)st->data[i]);
  454|  8.34M|        }
  455|  8.34M|    }
  456|  3.59M|    OPENSSL_sk_free(st);
  457|  3.59M|}
OPENSSL_sk_free:
  460|  9.27M|{
  461|  9.27M|    if (st == NULL)
  ------------------
  |  Branch (461:9): [True: 2.90M, False: 6.37M]
  ------------------
  462|  2.90M|        return;
  463|  6.37M|    OPENSSL_free(st->data);
  ------------------
  |  |  131|  6.37M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  464|  6.37M|    OPENSSL_free(st);
  ------------------
  |  |  131|  6.37M|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  6.37M|}
OPENSSL_sk_num:
  468|  29.6M|{
  469|  29.6M|    return st == NULL ? -1 : st->num;
  ------------------
  |  Branch (469:12): [True: 5.16M, False: 24.4M]
  ------------------
  470|  29.6M|}
OPENSSL_sk_value:
  473|  15.9M|{
  474|  15.9M|    if (st == NULL || i < 0 || i >= st->num)
  ------------------
  |  Branch (474:9): [True: 0, False: 15.9M]
  |  Branch (474:23): [True: 2.87k, False: 15.9M]
  |  Branch (474:32): [True: 0, False: 15.9M]
  ------------------
  475|  2.87k|        return NULL;
  476|  15.9M|    return (void *)st->data[i];
  477|  15.9M|}
OPENSSL_sk_set:
  480|  1.36M|{
  481|  1.36M|    if (st == NULL) {
  ------------------
  |  Branch (481:9): [True: 0, False: 1.36M]
  ------------------
  482|      0|        ERR_raise(ERR_LIB_CRYPTO, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  483|      0|        return NULL;
  484|      0|    }
  485|  1.36M|    if (i < 0 || i >= st->num) {
  ------------------
  |  Branch (485:9): [True: 0, False: 1.36M]
  |  Branch (485:18): [True: 0, False: 1.36M]
  ------------------
  486|      0|        ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   87|      0|#define ERR_LIB_CRYPTO 15
  ------------------
                      ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  487|      0|            "i=%d", i);
  488|      0|        return NULL;
  489|      0|    }
  490|  1.36M|    st->data[i] = data;
  491|  1.36M|    st->sorted = 0;
  492|  1.36M|    return (void *)st->data[i];
  493|  1.36M|}
OPENSSL_sk_sort:
  496|  16.3k|{
  497|  16.3k|    if (st != NULL && !st->sorted && st->comp != NULL) {
  ------------------
  |  Branch (497:9): [True: 16.3k, False: 0]
  |  Branch (497:23): [True: 14.6k, False: 1.70k]
  |  Branch (497:38): [True: 14.6k, False: 0]
  ------------------
  498|  14.6k|        if (st->num > 1)
  ------------------
  |  Branch (498:13): [True: 6.47k, False: 8.15k]
  ------------------
  499|  6.47k|            qsort(st->data, st->num, sizeof(void *), st->comp);
  500|  14.6k|        st->sorted = 1; /* empty or single-element stack is considered sorted */
  501|  14.6k|    }
  502|  16.3k|}
stack.c:sk_reserve:
  180|  9.26M|{
  181|  9.26M|    const void **tmpdata;
  182|  9.26M|    int num_alloc;
  183|       |
  184|       |    /* Check to see the reservation isn't exceeding the hard limit */
  185|  9.26M|    if (n > max_nodes - st->num) {
  ------------------
  |  Branch (185:9): [True: 0, False: 9.26M]
  ------------------
  186|      0|        ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|      0|        return 0;
  188|      0|    }
  189|       |
  190|       |    /* Figure out the new size */
  191|  9.26M|    num_alloc = st->num + n;
  192|  9.26M|    if (num_alloc < min_nodes)
  ------------------
  |  Branch (192:9): [True: 7.24M, False: 2.02M]
  ------------------
  193|  7.24M|        num_alloc = min_nodes;
  194|       |
  195|       |    /* If |st->data| allocation was postponed */
  196|  9.26M|    if (st->data == NULL) {
  ------------------
  |  Branch (196:9): [True: 4.38M, False: 4.87M]
  ------------------
  197|       |        /*
  198|       |         * At this point, |st->num_alloc| and |st->num| are 0;
  199|       |         * so |num_alloc| value is |n| or |min_nodes| if greater than |n|.
  200|       |         */
  201|  4.38M|        if ((st->data = OPENSSL_calloc(num_alloc, sizeof(void *))) == NULL)
  ------------------
  |  |  112|  4.38M|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (201:13): [True: 0, False: 4.38M]
  ------------------
  202|      0|            return 0;
  203|  4.38M|        st->num_alloc = num_alloc;
  204|  4.38M|        return 1;
  205|  4.38M|    }
  206|       |
  207|  4.87M|    if (!exact) {
  ------------------
  |  Branch (207:9): [True: 4.87M, False: 0]
  ------------------
  208|  4.87M|        if (num_alloc <= st->num_alloc)
  ------------------
  |  Branch (208:13): [True: 4.52M, False: 354k]
  ------------------
  209|  4.52M|            return 1;
  210|   354k|        num_alloc = compute_growth(num_alloc, st->num_alloc);
  211|   354k|        if (num_alloc == 0) {
  ------------------
  |  Branch (211:13): [True: 0, False: 354k]
  ------------------
  212|      0|            ERR_raise(ERR_LIB_CRYPTO, CRYPTO_R_TOO_MANY_RECORDS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|            return 0;
  214|      0|        }
  215|   354k|    } else if (num_alloc == st->num_alloc) {
  ------------------
  |  Branch (215:16): [True: 0, False: 0]
  ------------------
  216|      0|        return 1;
  217|      0|    }
  218|       |
  219|   354k|    tmpdata = OPENSSL_realloc_array((void *)st->data, num_alloc, sizeof(void *));
  ------------------
  |  |  124|   354k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  220|   354k|    if (tmpdata == NULL)
  ------------------
  |  Branch (220:9): [True: 0, False: 354k]
  ------------------
  221|      0|        return 0;
  222|       |
  223|   354k|    st->data = tmpdata;
  224|   354k|    st->num_alloc = num_alloc;
  225|   354k|    return 1;
  226|   354k|}
stack.c:compute_growth:
  162|   354k|{
  163|   354k|    int err = 0;
  164|       |
  165|   709k|    while (current < target) {
  ------------------
  |  Branch (165:12): [True: 354k, False: 354k]
  ------------------
  166|   354k|        if (current >= max_nodes)
  ------------------
  |  Branch (166:13): [True: 0, False: 354k]
  ------------------
  167|      0|            return 0;
  168|       |
  169|   354k|        current = safe_muldiv_int(current, 8, 5, &err);
  170|   354k|        if (err != 0)
  ------------------
  |  Branch (170:13): [True: 0, False: 354k]
  ------------------
  171|      0|            return 0;
  172|   354k|        if (current >= max_nodes)
  ------------------
  |  Branch (172:13): [True: 0, False: 354k]
  ------------------
  173|      0|            current = max_nodes;
  174|   354k|    }
  175|   354k|    return current;
  176|   354k|}
stack.c:internal_delete:
  295|  2.81k|{
  296|  2.81k|    const void *ret = st->data[loc];
  297|       |
  298|  2.81k|    if (loc != st->num - 1)
  ------------------
  |  Branch (298:9): [True: 299, False: 2.51k]
  ------------------
  299|    299|        memmove(&st->data[loc], &st->data[loc + 1],
  300|    299|            sizeof(st->data[0]) * (st->num - loc - 1));
  301|  2.81k|    st->num--;
  302|       |
  303|  2.81k|    return (void *)ret;
  304|  2.81k|}
stack.c:internal_find:
  329|   193k|{
  330|   193k|    const void *r;
  331|   193k|    int i, count = 0;
  332|   193k|    int *pnum = pnum_matched;
  333|       |
  334|   193k|    if (st == NULL || st->num == 0)
  ------------------
  |  Branch (334:9): [True: 0, False: 193k]
  |  Branch (334:23): [True: 1.26k, False: 191k]
  ------------------
  335|  1.26k|        return -1;
  336|       |
  337|   191k|    if (pnum == NULL)
  ------------------
  |  Branch (337:9): [True: 191k, False: 0]
  ------------------
  338|   191k|        pnum = &count;
  339|       |
  340|   191k|    if (st->comp == NULL) {
  ------------------
  |  Branch (340:9): [True: 0, False: 191k]
  ------------------
  341|      0|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (341:21): [True: 0, False: 0]
  ------------------
  342|      0|            if (st->data[i] == data) {
  ------------------
  |  Branch (342:17): [True: 0, False: 0]
  ------------------
  343|      0|                *pnum = 1;
  344|      0|                return i;
  345|      0|            }
  346|      0|        *pnum = 0;
  347|      0|        return -1;
  348|      0|    }
  349|       |
  350|   191k|    if (data == NULL)
  ------------------
  |  Branch (350:9): [True: 0, False: 191k]
  ------------------
  351|      0|        return -1;
  352|       |
  353|   191k|    if (!st->sorted) {
  ------------------
  |  Branch (353:9): [True: 189k, False: 2.55k]
  ------------------
  354|   189k|        int res = -1;
  355|       |
  356|  14.0M|        for (i = 0; i < st->num; i++)
  ------------------
  |  Branch (356:21): [True: 13.8M, False: 183k]
  ------------------
  357|  13.8M|            if (st->comp(&data, st->data + i) == 0) {
  ------------------
  |  Branch (357:17): [True: 5.54k, False: 13.8M]
  ------------------
  358|  5.54k|                if (res == -1)
  ------------------
  |  Branch (358:21): [True: 5.54k, False: 0]
  ------------------
  359|  5.54k|                    res = i;
  360|  5.54k|                ++*pnum;
  361|       |                /* Check if only one result is wanted and exit if so */
  362|  5.54k|                if (pnum_matched == NULL)
  ------------------
  |  Branch (362:21): [True: 5.54k, False: 0]
  ------------------
  363|  5.54k|                    return i;
  364|  5.54k|            }
  365|   183k|        if (res == -1)
  ------------------
  |  Branch (365:13): [True: 183k, False: 0]
  ------------------
  366|   183k|            *pnum = 0;
  367|   183k|        return res;
  368|   189k|    }
  369|       |
  370|  2.55k|    if (pnum_matched != NULL)
  ------------------
  |  Branch (370:9): [True: 0, False: 2.55k]
  ------------------
  371|      0|        ret_val_options |= OSSL_BSEARCH_FIRST_VALUE_ON_MATCH;
  ------------------
  |  |  150|      0|#define OSSL_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
  ------------------
  372|  2.55k|    r = ossl_bsearch(&data, st->data, st->num, sizeof(void *), st->comp,
  373|  2.55k|        ret_val_options);
  374|       |
  375|  2.55k|    if (pnum_matched != NULL) {
  ------------------
  |  Branch (375:9): [True: 0, False: 2.55k]
  ------------------
  376|      0|        *pnum = 0;
  377|      0|        if (r != NULL) {
  ------------------
  |  Branch (377:13): [True: 0, False: 0]
  ------------------
  378|      0|            const void **p = (const void **)r;
  379|       |
  380|      0|            while (p < st->data + st->num) {
  ------------------
  |  Branch (380:20): [True: 0, False: 0]
  ------------------
  381|      0|                if (st->comp(&data, p) != 0)
  ------------------
  |  Branch (381:21): [True: 0, False: 0]
  ------------------
  382|      0|                    break;
  383|      0|                ++*pnum;
  384|      0|                ++p;
  385|      0|            }
  386|      0|        }
  387|      0|    }
  388|       |
  389|  2.55k|    return r == NULL ? -1 : (int)((const void **)r - st->data);
  ------------------
  |  Branch (389:12): [True: 535, False: 2.02k]
  ------------------
  390|   191k|}

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

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

ossl_store_loader_store_cache_flush:
  388|     81|{
  389|     81|    OSSL_METHOD_STORE *store = get_loader_store(libctx);
  390|       |
  391|     81|    if (store != NULL)
  ------------------
  |  Branch (391:9): [True: 81, False: 0]
  ------------------
  392|     81|        return ossl_method_store_cache_flush_all(store);
  393|      0|    return 1;
  394|     81|}
ossl_store_loader_store_remove_all_provided:
  397|     81|{
  398|     81|    OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
  399|     81|    OSSL_METHOD_STORE *store = get_loader_store(libctx);
  400|       |
  401|     81|    if (store != NULL)
  ------------------
  |  Branch (401:9): [True: 81, False: 0]
  ------------------
  402|     81|        return ossl_method_store_remove_all_provided(store, prov);
  403|      0|    return 1;
  404|     81|}
store_meth.c:get_loader_store:
  109|    162|{
  110|    162|    return ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX);
  ------------------
  |  |  113|    162|#define OSSL_LIB_CTX_STORE_LOADER_STORE_INDEX 15
  ------------------
  111|    162|}

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

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

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

CRYPTO_THREAD_get_local_ex:
  259|  9.31M|{
  260|  9.31M|    MASTER_KEY_ENTRY *mkey;
  261|  9.31M|    CTX_TABLE_ENTRY ctxd;
  262|       |
  263|  9.31M|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   25|  9.31M|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (263:11): [True: 9.28M, False: 24.7k]
  ------------------
  264|       |    /*
  265|       |     * Make sure the master key has been initialized
  266|       |     * NOTE: We use CRYPTO_THREAD_run_once here, rather than the
  267|       |     * RUN_ONCE macros.  We do this because this code is included both in
  268|       |     * libcrypto, and in fips.[dll|dylib|so].  FIPS attempts to avoid doing
  269|       |     * one time initialization of global data, and so suppresses the definition
  270|       |     * of RUN_ONCE, etc, meaning the build breaks if we were to use that with
  271|       |     * fips-enabled.  However, this is a special case in which we want/need
  272|       |     * this one bit of global data to be initialized in both the fips provider
  273|       |     * and in libcrypto, so we use CRYPTO_THREAD_run_one directly, which is
  274|       |     * always defined.
  275|       |     */
  276|  9.31M|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (276:9): [True: 0, False: 9.31M]
  ------------------
  277|      0|        return NULL;
  278|       |
  279|  9.31M|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  9.31M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  9.31M|    __FILE__, __LINE__)
  ------------------
  |  Branch (279:9): [True: 0, False: 9.31M]
  ------------------
  280|      0|        return NULL;
  281|       |
  282|       |    /*
  283|       |     * Get our master table sparse array, indexed by key id
  284|       |     */
  285|  9.31M|    mkey = CRYPTO_THREAD_get_local(&master_key);
  286|  9.31M|    if (mkey == NULL)
  ------------------
  |  Branch (286:9): [True: 1, False: 9.31M]
  ------------------
  287|      1|        return NULL;
  288|       |
  289|       |    /*
  290|       |     * Get the specific data entry in the master key
  291|       |     * table for the key id we are searching for
  292|       |     */
  293|  9.31M|    if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (293:9): [True: 3, False: 9.31M]
  ------------------
  294|      3|        return NULL;
  295|       |
  296|       |    /*
  297|       |     * If we find an entry above, that will be a sparse array,
  298|       |     * indexed by OSSL_LIB_CTX.
  299|       |     * Note: Because we're using sparse arrays here, we can do an easy
  300|       |     * trick, since we know all OSSL_LIB_CTX pointers are unique.  By casting
  301|       |     * the pointer to a unitptr_t, we can use that as an ordinal index into
  302|       |     * the sparse array.
  303|       |     */
  304|  9.31M|    ctxd = ossl_sa_CTX_TABLE_ENTRY_get(mkey[id].ctx_table, (uintptr_t)ctx);
  305|       |
  306|       |    /*
  307|       |     * If we find an entry for the passed in context, return its data pointer
  308|       |     */
  309|  9.31M|    return ctxd;
  310|  9.31M|}
CRYPTO_THREAD_set_local_ex:
  338|  2.00k|{
  339|  2.00k|    MASTER_KEY_ENTRY *mkey;
  340|       |
  341|  2.00k|    ctx = (ctx == CRYPTO_THREAD_NO_CONTEXT) ? NULL : ossl_lib_ctx_get_concrete(ctx);
  ------------------
  |  |   25|  2.00k|#define CRYPTO_THREAD_NO_CONTEXT (void *)1
  ------------------
  |  Branch (341:11): [True: 5, False: 2.00k]
  ------------------
  342|       |    /*
  343|       |     * Make sure our master key is initialized
  344|       |     * See notes above on the use of CRYPTO_THREAD_run_once here
  345|       |     */
  346|  2.00k|    if (!CRYPTO_THREAD_run_once(&master_once, init_master_key))
  ------------------
  |  Branch (346:9): [True: 0, False: 2.00k]
  ------------------
  347|      0|        return 0;
  348|       |
  349|  2.00k|    if (!ossl_assert(id < CRYPTO_THREAD_LOCAL_KEY_MAX))
  ------------------
  |  |   52|  2.00k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.00k|    __FILE__, __LINE__)
  ------------------
  |  Branch (349:9): [True: 0, False: 2.00k]
  ------------------
  350|      0|        return 0;
  351|       |
  352|       |    /*
  353|       |     * Get our local master key data, which will be
  354|       |     * a sparse array indexed by the id parameter
  355|       |     */
  356|  2.00k|    mkey = CRYPTO_THREAD_get_local(&master_key);
  357|  2.00k|    if (mkey == NULL) {
  ------------------
  |  Branch (357:9): [True: 1, False: 2.00k]
  ------------------
  358|       |        /*
  359|       |         * we didn't find one, but that's ok, just initialize it now
  360|       |         */
  361|      1|        mkey = OPENSSL_calloc(CRYPTO_THREAD_LOCAL_KEY_MAX,
  ------------------
  |  |  112|      1|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  362|      1|            sizeof(MASTER_KEY_ENTRY));
  363|      1|        if (mkey == NULL)
  ------------------
  |  Branch (363:13): [True: 0, False: 1]
  ------------------
  364|      0|            return 0;
  365|       |        /*
  366|       |         * make sure to assign it to our master key thread-local storage
  367|       |         */
  368|      1|        if (!CRYPTO_THREAD_set_local(&master_key, mkey)) {
  ------------------
  |  Branch (368:13): [True: 0, False: 1]
  ------------------
  369|      0|            OPENSSL_free(mkey);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|      0|            return 0;
  371|      0|        }
  372|      1|    }
  373|       |
  374|       |    /*
  375|       |     * Find the entry that we are looking for using our id index
  376|       |     */
  377|  2.00k|    if (mkey[id].ctx_table == NULL) {
  ------------------
  |  Branch (377:9): [True: 3, False: 2.00k]
  ------------------
  378|       |
  379|       |        /*
  380|       |         * Didn't find it, that's ok, just add it now
  381|       |         */
  382|      3|        mkey[id].ctx_table = ossl_sa_CTX_TABLE_ENTRY_new();
  383|      3|        if (mkey[id].ctx_table == NULL)
  ------------------
  |  Branch (383:13): [True: 0, False: 3]
  ------------------
  384|      0|            return 0;
  385|      3|    }
  386|       |
  387|       |    /*
  388|       |     * Now go look up our per context entry, using the OSSL_LIB_CTX pointer
  389|       |     * that we've been provided.  Note we cast the pointer to a uintptr_t so
  390|       |     * as to use it as an index in the sparse array
  391|       |     *
  392|       |     * Assign to the entry in the table so that we can find it later
  393|       |     */
  394|  2.00k|    return ossl_sa_CTX_TABLE_ENTRY_set(mkey[id].ctx_table,
  395|  2.00k|        (uintptr_t)ctx, data);
  396|  2.00k|}
CRYPTO_THREAD_clean_local:
  399|      1|{
  400|      1|    MASTER_KEY_ENTRY *mkey;
  401|       |
  402|       |    /*
  403|       |     * If we never initialized the master key, there
  404|       |     * is no data to clean, so we are done here
  405|       |     */
  406|      1|    if (master_key_init == 0)
  ------------------
  |  Branch (406:9): [True: 0, False: 1]
  ------------------
  407|      0|        return;
  408|       |
  409|      1|    mkey = CRYPTO_THREAD_get_local(&master_key);
  410|      1|    if (mkey != NULL) {
  ------------------
  |  Branch (410:9): [True: 1, False: 0]
  ------------------
  411|      1|        clean_master_key(mkey);
  412|       |        CRYPTO_THREAD_set_local(&master_key, NULL);
  413|      1|    }
  414|      1|}
threads_common.c:init_master_key:
  216|      1|{
  217|       |    /*
  218|       |     * Note: We assign a cleanup function here, which is atypical for
  219|       |     * uses of CRYPTO_THREAD_init_local.  This is because, nominally
  220|       |     * we expect that the use of ossl_init_thread_start will be used
  221|       |     * to notify openssl of exiting threads.  However, in this case
  222|       |     * we want the metadata for this interface (the sparse arrays) to
  223|       |     * stay valid until the thread actually exits, which is what the
  224|       |     * clean_master_key function does.  Data held in the sparse arrays
  225|       |     * (that is assigned via CRYPTO_THREAD_set_local_ex), are still expected
  226|       |     * to be cleaned via the ossl_init_thread_start/stop api.
  227|       |     */
  228|      1|    if (!CRYPTO_THREAD_init_local(&master_key, clean_master_key))
  ------------------
  |  Branch (228:9): [True: 0, False: 1]
  ------------------
  229|      0|        return;
  230|       |
  231|       |    /*
  232|       |     * Indicate that the key has been set up.
  233|       |     */
  234|      1|    master_key_init = 1;
  235|      1|}
threads_common.c:clean_master_key:
  191|      1|{
  192|      1|    MASTER_KEY_ENTRY *mkey = data;
  193|      1|    int i;
  194|       |
  195|      1|    if (data == NULL)
  ------------------
  |  Branch (195:9): [True: 0, False: 1]
  ------------------
  196|      0|        return;
  197|       |
  198|      9|    for (i = 0; i < CRYPTO_THREAD_LOCAL_KEY_MAX; i++) {
  ------------------
  |  Branch (198:17): [True: 8, False: 1]
  ------------------
  199|      8|        if (mkey[i].ctx_table != NULL)
  ------------------
  |  Branch (199:13): [True: 3, False: 5]
  ------------------
  200|      3|            clean_master_key_id(&mkey[i]);
  201|      8|    }
  202|      1|    OPENSSL_free(mkey);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|      1|}
threads_common.c:clean_master_key_id:
  173|      3|{
  174|      3|    ossl_sa_CTX_TABLE_ENTRY_free(entry->ctx_table);
  175|      3|}

ossl_rcu_write_lock:
  482|    697|{
  483|    697|    pthread_mutex_lock(&lock->write_lock);
  484|    697|    TSAN_FAKE_UNLOCK(&lock->write_lock);
  485|    697|}
ossl_rcu_write_unlock:
  488|    697|{
  489|    697|    TSAN_FAKE_LOCK(&lock->write_lock);
  490|    697|    pthread_mutex_unlock(&lock->write_lock);
  491|    697|}
ossl_synchronize_rcu:
  494|  1.39k|{
  495|  1.39k|    struct rcu_qp *qp;
  496|  1.39k|    uint64_t count;
  497|  1.39k|    uint32_t curr_id;
  498|  1.39k|    struct rcu_cb_item *cb_items, *tmpcb;
  499|       |
  500|  1.39k|    pthread_mutex_lock(&lock->write_lock);
  501|  1.39k|    cb_items = lock->cb_items;
  502|  1.39k|    lock->cb_items = NULL;
  503|  1.39k|    pthread_mutex_unlock(&lock->write_lock);
  504|       |
  505|  1.39k|    qp = update_qp(lock, &curr_id);
  506|       |
  507|       |    /* retire in order */
  508|  1.39k|    pthread_mutex_lock(&lock->prior_lock);
  509|  1.39k|    while (lock->next_to_retire != curr_id)
  ------------------
  |  Branch (509:12): [True: 0, False: 1.39k]
  ------------------
  510|      0|        pthread_cond_wait(&lock->prior_signal, &lock->prior_lock);
  511|       |
  512|       |    /*
  513|       |     * wait for the reader count to reach zero
  514|       |     * Note the use of __ATOMIC_ACQUIRE here to ensure that any
  515|       |     * prior __ATOMIC_RELEASE write operation in ossl_rcu_read_unlock
  516|       |     * is visible prior to our read
  517|       |     * however this is likely just necessary to silence a tsan warning
  518|       |     * because the read side should not do any write operation
  519|       |     * outside the atomic itself
  520|       |     */
  521|  1.39k|    do {
  522|  1.39k|        count = ATOMIC_LOAD_N(uint64_t, &qp->users, __ATOMIC_ACQUIRE);
  ------------------
  |  |  129|  1.39k|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  523|  1.39k|    } while (count != (uint64_t)0);
  ------------------
  |  Branch (523:14): [True: 0, False: 1.39k]
  ------------------
  524|       |
  525|  1.39k|    lock->next_to_retire++;
  526|  1.39k|    pthread_cond_broadcast(&lock->prior_signal);
  527|  1.39k|    pthread_mutex_unlock(&lock->prior_lock);
  528|       |
  529|  1.39k|    retire_qp(lock, qp);
  530|       |
  531|       |    /* handle any callbacks that we have */
  532|  2.08k|    while (cb_items != NULL) {
  ------------------
  |  Branch (532:12): [True: 695, False: 1.39k]
  ------------------
  533|    695|        tmpcb = cb_items;
  534|    695|        cb_items = cb_items->next;
  535|    695|        tmpcb->fn(tmpcb->data);
  536|    695|        OPENSSL_free(tmpcb);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  537|    695|    }
  538|  1.39k|}
ossl_rcu_call:
  545|    695|{
  546|    695|    struct rcu_cb_item *new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  547|       |
  548|    695|    if (new == NULL)
  ------------------
  |  Branch (548:9): [True: 0, False: 695]
  ------------------
  549|      0|        return 0;
  550|       |
  551|    695|    new->data = data;
  552|    695|    new->fn = cb;
  553|       |
  554|    695|    new->next = lock->cb_items;
  555|    695|    lock->cb_items = new;
  556|       |
  557|    695|    return 1;
  558|    695|}
ossl_rcu_uptr_deref:
  561|  6.82M|{
  562|  6.82M|    return ATOMIC_LOAD_N(pvoid, p, __ATOMIC_ACQUIRE);
  ------------------
  |  |  129|  6.82M|#define ATOMIC_LOAD_N(t, p, o) __atomic_load_n(p, o)
  ------------------
  563|  6.82M|}
ossl_rcu_assign_uptr:
  566|   311k|{
  567|   311k|    ATOMIC_STORE(pvoid, p, v, __ATOMIC_RELEASE);
  ------------------
  |  |  131|   311k|#define ATOMIC_STORE(t, p, v, o) __atomic_store(p, v, o)
  ------------------
  568|   311k|}
ossl_rcu_lock_new:
  571|    696|{
  572|    696|    struct rcu_lock_st *new;
  573|    696|    pthread_mutex_t *mutexes[3] = { NULL };
  574|    696|    pthread_cond_t *conds[2] = { NULL };
  575|    696|    int i;
  576|       |
  577|       |    /*
  578|       |     * We need a minimum of 2 qp's
  579|       |     */
  580|    696|    if (num_writers < 2)
  ------------------
  |  Branch (580:9): [True: 696, False: 0]
  ------------------
  581|    696|        num_writers = 2;
  582|       |
  583|    696|    ctx = ossl_lib_ctx_get_concrete(ctx);
  584|    696|    if (ctx == NULL)
  ------------------
  |  Branch (584:9): [True: 0, False: 696]
  ------------------
  585|      0|        return 0;
  586|       |
  587|    696|    new = OPENSSL_zalloc(sizeof(*new));
  ------------------
  |  |  108|    696|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  588|    696|    if (new == NULL)
  ------------------
  |  Branch (588:9): [True: 0, False: 696]
  ------------------
  589|      0|        return NULL;
  590|       |
  591|    696|    new->ctx = ctx;
  592|    696|    i = 0;
  593|    696|    mutexes[i] = pthread_mutex_init(&new->write_lock, NULL) == 0 ? &new->write_lock : NULL;
  ------------------
  |  Branch (593:18): [True: 696, False: 0]
  ------------------
  594|    696|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (594:9): [True: 0, False: 696]
  ------------------
  595|      0|        goto err;
  596|    696|    mutexes[i] = pthread_mutex_init(&new->prior_lock, NULL) == 0 ? &new->prior_lock : NULL;
  ------------------
  |  Branch (596:18): [True: 696, False: 0]
  ------------------
  597|    696|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (597:9): [True: 0, False: 696]
  ------------------
  598|      0|        goto err;
  599|    696|    mutexes[i] = pthread_mutex_init(&new->alloc_lock, NULL) == 0 ? &new->alloc_lock : NULL;
  ------------------
  |  Branch (599:18): [True: 696, False: 0]
  ------------------
  600|    696|    if (mutexes[i++] == NULL)
  ------------------
  |  Branch (600:9): [True: 0, False: 696]
  ------------------
  601|      0|        goto err;
  602|    696|    conds[i - 3] = pthread_cond_init(&new->prior_signal, NULL) == 0 ? &new->prior_signal : NULL;
  ------------------
  |  Branch (602:20): [True: 696, False: 0]
  ------------------
  603|    696|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (603:9): [True: 0, False: 696]
  ------------------
  604|      0|        goto err;
  605|    696|    i++;
  606|    696|    conds[i - 3] = pthread_cond_init(&new->alloc_signal, NULL) == 0 ? &new->alloc_signal : NULL;
  ------------------
  |  Branch (606:20): [True: 696, False: 0]
  ------------------
  607|    696|    if (conds[i - 3] == NULL)
  ------------------
  |  Branch (607:9): [True: 0, False: 696]
  ------------------
  608|      0|        goto err;
  609|    696|    i++;
  610|    696|    new->qp_group = allocate_new_qp_group(new, num_writers);
  611|    696|    if (new->qp_group == NULL)
  ------------------
  |  Branch (611:9): [True: 0, False: 696]
  ------------------
  612|      0|        goto err;
  613|       |
  614|    696|    return new;
  615|       |
  616|      0|err:
  617|      0|    for (i = 0; i < 3; i++)
  ------------------
  |  Branch (617:17): [True: 0, False: 0]
  ------------------
  618|      0|        if (mutexes[i] != NULL)
  ------------------
  |  Branch (618:13): [True: 0, False: 0]
  ------------------
  619|      0|            pthread_mutex_destroy(mutexes[i]);
  620|      0|    for (i = 0; i < 2; i++)
  ------------------
  |  Branch (620:17): [True: 0, False: 0]
  ------------------
  621|      0|        if (conds[i] != NULL)
  ------------------
  |  Branch (621:13): [True: 0, False: 0]
  ------------------
  622|      0|            pthread_cond_destroy(conds[i]);
  623|      0|    OPENSSL_free(new->qp_group);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  624|      0|    OPENSSL_free(new);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  625|       |    return NULL;
  626|    696|}
ossl_rcu_lock_free:
  629|    696|{
  630|    696|    struct rcu_lock_st *rlock = (struct rcu_lock_st *)lock;
  631|       |
  632|    696|    if (lock == NULL)
  ------------------
  |  Branch (632:9): [True: 0, False: 696]
  ------------------
  633|      0|        return;
  634|       |
  635|       |    /* make sure we're synchronized */
  636|    696|    ossl_synchronize_rcu(rlock);
  637|       |
  638|    696|    OPENSSL_free(rlock->qp_group);
  ------------------
  |  |  131|    696|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  639|       |    /*
  640|       |     * Some targets (BSD) allocate heap when initializing
  641|       |     * a mutex or condition, to prevent leaks, those need
  642|       |     * to be destroyed here
  643|       |     */
  644|    696|    pthread_mutex_destroy(&rlock->write_lock);
  645|    696|    pthread_mutex_destroy(&rlock->prior_lock);
  646|    696|    pthread_mutex_destroy(&rlock->alloc_lock);
  647|    696|    pthread_cond_destroy(&rlock->prior_signal);
  648|    696|    pthread_cond_destroy(&rlock->alloc_signal);
  649|       |
  650|       |    /* There should only be a single qp left now */
  651|    696|    OPENSSL_free(rlock);
  ------------------
  |  |  131|    696|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  652|    696|}
CRYPTO_THREAD_lock_new:
  901|   740k|{
  902|   740k|#ifdef USE_RWLOCK
  903|   740k|    CRYPTO_RWLOCK *lock;
  904|       |
  905|   740k|    ossl_init_rwlock_contention_data();
  906|       |
  907|   740k|    if ((lock = OPENSSL_zalloc(sizeof(pthread_rwlock_t))) == NULL)
  ------------------
  |  |  108|   740k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (907:9): [True: 0, False: 740k]
  ------------------
  908|       |        /* Don't set error, to avoid recursion blowup. */
  909|      0|        return NULL;
  910|       |
  911|   740k|    if (pthread_rwlock_init(lock, NULL) != 0) {
  ------------------
  |  Branch (911:9): [True: 0, False: 740k]
  ------------------
  912|      0|        OPENSSL_free(lock);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  913|      0|        return NULL;
  914|      0|    }
  915|       |#else
  916|       |    pthread_mutexattr_t attr;
  917|       |    CRYPTO_RWLOCK *lock;
  918|       |
  919|       |    if ((lock = OPENSSL_zalloc(sizeof(pthread_mutex_t))) == NULL)
  920|       |        /* Don't set error, to avoid recursion blowup. */
  921|       |        return NULL;
  922|       |
  923|       |    /*
  924|       |     * We don't use recursive mutexes, but try to catch errors if we do.
  925|       |     */
  926|       |    pthread_mutexattr_init(&attr);
  927|       |#if !defined(__TANDEM) && !defined(_SPT_MODEL_)
  928|       |#if !defined(NDEBUG) && !defined(OPENSSL_NO_MUTEX_ERRORCHECK)
  929|       |    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
  930|       |#endif
  931|       |#else
  932|       |    /* The SPT Thread Library does not define MUTEX attributes. */
  933|       |#endif
  934|       |
  935|       |    if (pthread_mutex_init(lock, &attr) != 0) {
  936|       |        pthread_mutexattr_destroy(&attr);
  937|       |        OPENSSL_free(lock);
  938|       |        return NULL;
  939|       |    }
  940|       |
  941|       |    pthread_mutexattr_destroy(&attr);
  942|       |#endif
  943|       |
  944|   740k|    return lock;
  945|   740k|}
CRYPTO_THREAD_read_lock:
  948|  7.55M|{
  949|  7.55M|#ifdef USE_RWLOCK
  950|  7.55M|    if (!ossl_assert(ossl_rwlock_rdlock(lock) == 0))
  ------------------
  |  |   52|  7.55M|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.55M|    __FILE__, __LINE__)
  ------------------
  |  Branch (950:9): [True: 0, False: 7.55M]
  ------------------
  951|      0|        return 0;
  952|       |#else
  953|       |    if (pthread_mutex_lock(lock) != 0) {
  954|       |        assert(errno != EDEADLK && errno != EBUSY);
  955|       |        return 0;
  956|       |    }
  957|       |#endif
  958|       |
  959|  7.55M|    return 1;
  960|  7.55M|}
CRYPTO_THREAD_write_lock:
  963|   954k|{
  964|   954k|#ifdef USE_RWLOCK
  965|   954k|    if (!ossl_assert(ossl_rwlock_wrlock(lock) == 0))
  ------------------
  |  |   52|   954k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   954k|    __FILE__, __LINE__)
  ------------------
  |  Branch (965:9): [True: 0, False: 954k]
  ------------------
  966|      0|        return 0;
  967|       |#else
  968|       |    if (pthread_mutex_lock(lock) != 0) {
  969|       |        assert(errno != EDEADLK && errno != EBUSY);
  970|       |        return 0;
  971|       |    }
  972|       |#endif
  973|       |
  974|   954k|    return 1;
  975|   954k|}
CRYPTO_THREAD_unlock:
  978|  8.50M|{
  979|  8.50M|#ifdef USE_RWLOCK
  980|  8.50M|    if (ossl_rwlock_unlock(lock) != 0)
  ------------------
  |  Branch (980:9): [True: 0, False: 8.50M]
  ------------------
  981|      0|        return 0;
  982|       |#else
  983|       |    if (pthread_mutex_unlock(lock) != 0) {
  984|       |        assert(errno != EPERM);
  985|       |        return 0;
  986|       |    }
  987|       |#endif
  988|       |
  989|  8.50M|    return 1;
  990|  8.50M|}
CRYPTO_THREAD_lock_free:
  993|   742k|{
  994|   742k|    if (lock == NULL)
  ------------------
  |  Branch (994:9): [True: 1.69k, False: 740k]
  ------------------
  995|  1.69k|        return;
  996|       |
  997|   740k|#ifdef USE_RWLOCK
  998|   740k|    pthread_rwlock_destroy(lock);
  999|       |#else
 1000|       |    pthread_mutex_destroy(lock);
 1001|       |#endif
 1002|   740k|    OPENSSL_free(lock);
  ------------------
  |  |  131|   740k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1003|       |
 1004|   740k|    return;
 1005|   742k|}
CRYPTO_THREAD_run_once:
 1008|  25.2M|{
 1009|  25.2M|    if (ossl_unlikely(pthread_once(once, init) != 0))
  ------------------
  |  |   23|  25.2M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.2M]
  |  |  ------------------
  ------------------
 1010|      0|        return 0;
 1011|       |
 1012|  25.2M|    return 1;
 1013|  25.2M|}
CRYPTO_THREAD_init_local:
 1016|      4|{
 1017|       |
 1018|      4|#ifndef FIPS_MODULE
 1019|      4|    if (!ossl_init_thread())
  ------------------
  |  Branch (1019:9): [True: 0, False: 4]
  ------------------
 1020|      0|        return 0;
 1021|      4|#endif
 1022|       |
 1023|      4|    if (pthread_key_create(key, cleanup) != 0)
  ------------------
  |  Branch (1023:9): [True: 0, False: 4]
  ------------------
 1024|      0|        return 0;
 1025|       |
 1026|      4|    return 1;
 1027|      4|}
CRYPTO_THREAD_get_local:
 1030|  14.5M|{
 1031|  14.5M|    return pthread_getspecific(*key);
 1032|  14.5M|}
CRYPTO_THREAD_set_local:
 1035|      5|{
 1036|      5|    if (pthread_setspecific(*key, val) != 0)
  ------------------
  |  Branch (1036:9): [True: 0, False: 5]
  ------------------
 1037|      0|        return 0;
 1038|       |
 1039|      5|    return 1;
 1040|      5|}
CRYPTO_THREAD_cleanup_local:
 1043|      3|{
 1044|      3|    if (pthread_key_delete(*key) != 0)
  ------------------
  |  Branch (1044:9): [True: 0, False: 3]
  ------------------
 1045|      0|        return 0;
 1046|       |
 1047|      3|    return 1;
 1048|      3|}
CRYPTO_THREAD_get_current_id:
 1051|      6|{
 1052|      6|    return pthread_self();
 1053|      6|}
CRYPTO_THREAD_compare_id:
 1056|      5|{
 1057|      5|    return pthread_equal(a, b);
 1058|      5|}
CRYPTO_atomic_add:
 1061|   140k|{
 1062|   140k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1063|   140k|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1063:9): [True: 140k, Folded]
  ------------------
 1064|   140k|        *ret = __atomic_add_fetch(val, amount, __ATOMIC_ACQ_REL);
 1065|   140k|        return 1;
 1066|   140k|    }
 1067|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1068|       |    /* This will work for all future Solaris versions. */
 1069|       |    if (ret != NULL) {
 1070|       |        *ret = atomic_add_int_nv((volatile unsigned int *)val, amount);
 1071|       |        return 1;
 1072|       |    }
 1073|       |#endif
 1074|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  |  Branch (1074:25): [True: 0, False: 0]
  ------------------
 1075|      0|        return 0;
 1076|       |
 1077|      0|    *val += amount;
 1078|      0|    *ret = *val;
 1079|       |
 1080|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1080:9): [True: 0, False: 0]
  ------------------
 1081|      0|        return 0;
 1082|       |
 1083|      0|    return 1;
 1084|      0|}
CRYPTO_atomic_or:
 1140|      3|{
 1141|      3|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1142|      3|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1142:9): [True: 3, Folded]
  ------------------
 1143|      3|        *ret = __atomic_or_fetch(val, op, __ATOMIC_ACQ_REL);
 1144|      3|        return 1;
 1145|      3|    }
 1146|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1147|       |    /* This will work for all future Solaris versions. */
 1148|       |    if (ret != NULL) {
 1149|       |        *ret = atomic_or_64_nv(val, op);
 1150|       |        return 1;
 1151|       |    }
 1152|       |#endif
 1153|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1153:9): [True: 0, False: 0]
  |  Branch (1153:25): [True: 0, False: 0]
  ------------------
 1154|      0|        return 0;
 1155|      0|    *val |= op;
 1156|      0|    *ret = *val;
 1157|       |
 1158|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1158:9): [True: 0, False: 0]
  ------------------
 1159|      0|        return 0;
 1160|       |
 1161|      0|    return 1;
 1162|      0|}
CRYPTO_atomic_load:
 1165|  13.8M|{
 1166|  13.8M|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1167|  13.8M|    if (__atomic_is_lock_free(sizeof(*val), val)) {
  ------------------
  |  Branch (1167:9): [True: 13.8M, Folded]
  ------------------
 1168|  13.8M|        __atomic_load(val, ret, __ATOMIC_ACQUIRE);
 1169|  13.8M|        return 1;
 1170|  13.8M|    }
 1171|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1172|       |    /* This will work for all future Solaris versions. */
 1173|       |    if (ret != NULL) {
 1174|       |        *ret = atomic_or_64_nv(val, 0);
 1175|       |        return 1;
 1176|       |    }
 1177|       |#endif
 1178|      0|    if (lock == NULL || !CRYPTO_THREAD_read_lock(lock))
  ------------------
  |  Branch (1178:9): [True: 0, False: 0]
  |  Branch (1178:25): [True: 0, False: 0]
  ------------------
 1179|      0|        return 0;
 1180|      0|    *ret = *val;
 1181|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1181:9): [True: 0, False: 0]
  ------------------
 1182|      0|        return 0;
 1183|       |
 1184|      0|    return 1;
 1185|      0|}
CRYPTO_atomic_store:
 1188|   310k|{
 1189|   310k|#if defined(__GNUC__) && defined(__ATOMIC_ACQ_REL) && !defined(BROKEN_CLANG_ATOMICS)
 1190|   310k|    if (__atomic_is_lock_free(sizeof(*dst), dst)) {
  ------------------
  |  Branch (1190:9): [True: 310k, Folded]
  ------------------
 1191|   310k|        __atomic_store(dst, &val, __ATOMIC_RELEASE);
 1192|   310k|        return 1;
 1193|   310k|    }
 1194|       |#elif defined(__sun) && (defined(__SunOS_5_10) || defined(__SunOS_5_11))
 1195|       |    /* This will work for all future Solaris versions. */
 1196|       |    if (dst != NULL) {
 1197|       |        atomic_swap_64(dst, val);
 1198|       |        return 1;
 1199|       |    }
 1200|       |#endif
 1201|      0|    if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
  ------------------
  |  Branch (1201:9): [True: 0, False: 0]
  |  Branch (1201:25): [True: 0, False: 0]
  ------------------
 1202|      0|        return 0;
 1203|      0|    *dst = val;
 1204|      0|    if (!CRYPTO_THREAD_unlock(lock))
  ------------------
  |  Branch (1204:9): [True: 0, False: 0]
  ------------------
 1205|      0|        return 0;
 1206|       |
 1207|      0|    return 1;
 1208|      0|}
openssl_get_fork_id:
 1241|  26.2k|{
 1242|  26.2k|    return getpid();
 1243|  26.2k|}
threads_pthread.c:update_qp:
  419|  1.39k|{
  420|  1.39k|    uint32_t current_idx;
  421|       |
  422|  1.39k|    pthread_mutex_lock(&lock->alloc_lock);
  423|       |
  424|       |    /*
  425|       |     * we need at least one qp to be available with one
  426|       |     * left over, so that readers can start working on
  427|       |     * one that isn't yet being waited on
  428|       |     */
  429|  1.39k|    while (lock->group_count - lock->writers_alloced < 2)
  ------------------
  |  Branch (429:12): [True: 0, False: 1.39k]
  ------------------
  430|       |        /* we have to wait for one to be free */
  431|      0|        pthread_cond_wait(&lock->alloc_signal, &lock->alloc_lock);
  432|       |
  433|  1.39k|    current_idx = lock->current_alloc_idx;
  434|       |
  435|       |    /* Allocate the qp */
  436|  1.39k|    lock->writers_alloced++;
  437|       |
  438|       |    /* increment the allocation index */
  439|  1.39k|    lock->current_alloc_idx = (lock->current_alloc_idx + 1) % lock->group_count;
  440|       |
  441|  1.39k|    *curr_id = lock->id_ctr;
  442|  1.39k|    lock->id_ctr++;
  443|       |
  444|       |    /*
  445|       |     * make the current state of everything visible by this release
  446|       |     * when get_hold_current_qp acquires the next qp
  447|       |     */
  448|  1.39k|    ATOMIC_STORE_N(uint32_t, &lock->reader_idx, lock->current_alloc_idx,
  ------------------
  |  |  130|  1.39k|#define ATOMIC_STORE_N(t, p, v, o) __atomic_store_n(p, v, o)
  ------------------
  449|  1.39k|        __ATOMIC_RELEASE);
  450|       |
  451|       |    /*
  452|       |     * this should make sure that the new value of reader_idx is visible in
  453|       |     * get_hold_current_qp, directly after incrementing the users count
  454|       |     */
  455|  1.39k|    ATOMIC_ADD_FETCH(&lock->qp_group[current_idx].users, (uint64_t)0,
  ------------------
  |  |  132|  1.39k|#define ATOMIC_ADD_FETCH(p, v, o) __atomic_add_fetch(p, v, o)
  ------------------
  456|  1.39k|        __ATOMIC_RELEASE);
  457|       |
  458|       |    /* wake up any waiters */
  459|  1.39k|    pthread_cond_signal(&lock->alloc_signal);
  460|  1.39k|    pthread_mutex_unlock(&lock->alloc_lock);
  461|  1.39k|    return &lock->qp_group[current_idx];
  462|  1.39k|}
threads_pthread.c:retire_qp:
  465|  1.39k|{
  466|  1.39k|    pthread_mutex_lock(&lock->alloc_lock);
  467|  1.39k|    lock->writers_alloced--;
  468|  1.39k|    pthread_cond_signal(&lock->alloc_signal);
  469|  1.39k|    pthread_mutex_unlock(&lock->alloc_lock);
  470|  1.39k|}
threads_pthread.c:allocate_new_qp_group:
  474|    696|{
  475|    696|    struct rcu_qp *new = OPENSSL_calloc(count, sizeof(*new));
  ------------------
  |  |  112|    696|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  476|       |
  477|    696|    lock->group_count = count;
  478|    696|    return new;
  479|    696|}
threads_pthread.c:ossl_init_rwlock_contention_data:
  880|   740k|{
  881|   740k|}
threads_pthread.c:ossl_rwlock_rdlock:
  884|  7.55M|{
  885|  7.55M|    return pthread_rwlock_rdlock(rwlock);
  886|  7.55M|}
threads_pthread.c:ossl_rwlock_wrlock:
  889|   954k|{
  890|   954k|    return pthread_rwlock_wrlock(rwlock);
  891|   954k|}
threads_pthread.c:ossl_rwlock_unlock:
  894|  8.50M|{
  895|  8.50M|    return pthread_rwlock_unlock(rwlock);
  896|  8.50M|}

ossl_time_now:
   16|  2.54k|{
   17|  2.54k|    OSSL_TIME r;
   18|       |
   19|       |#if defined(_WIN32) && !defined(OPENSSL_SYS_UEFI)
   20|       |    SYSTEMTIME st;
   21|       |    union {
   22|       |        unsigned __int64 ul;
   23|       |        FILETIME ft;
   24|       |    } now;
   25|       |
   26|       |    GetSystemTime(&st);
   27|       |    SystemTimeToFileTime(&st, &now.ft);
   28|       |    /* re-bias to 1/1/1970 */
   29|       |#ifdef __MINGW32__
   30|       |    now.ul -= 116444736000000000ULL;
   31|       |#else
   32|       |    now.ul -= 116444736000000000UI64;
   33|       |#endif
   34|       |    r.t = ((uint64_t)now.ul) * (OSSL_TIME_SECOND / 10000000);
   35|       |#else /* defined(_WIN32) */
   36|  2.54k|    struct timeval t;
   37|       |
   38|  2.54k|    if (gettimeofday(&t, NULL) < 0) {
  ------------------
  |  Branch (38:9): [True: 0, False: 2.54k]
  ------------------
   39|      0|        ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
                      ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
   40|      0|            "calling gettimeofday()");
   41|      0|        return ossl_time_zero();
   42|      0|    }
   43|  2.54k|    if (t.tv_sec <= 0)
  ------------------
  |  Branch (43:9): [True: 0, False: 2.54k]
  ------------------
   44|      0|        r.t = t.tv_usec <= 0 ? 0 : t.tv_usec * OSSL_TIME_US;
  ------------------
  |  |   37|      0|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|      0|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|      0|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (44:15): [True: 0, False: 0]
  ------------------
   45|  2.54k|    else
   46|  2.54k|        r.t = ((uint64_t)t.tv_sec * 1000000 + t.tv_usec) * OSSL_TIME_US;
  ------------------
  |  |   37|  2.54k|#define OSSL_TIME_US (OSSL_TIME_MS / 1000)
  |  |  ------------------
  |  |  |  |   34|  2.54k|#define OSSL_TIME_MS (OSSL_TIME_SECOND / 1000)
  |  |  |  |  ------------------
  |  |  |  |  |  |   31|  2.54k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   47|  2.54k|#endif /* defined(_WIN32) */
   48|  2.54k|    return r;
   49|  2.54k|}

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

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

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

X509_LOOKUP_hash_dir:
   78|  1.30k|{
   79|  1.30k|    return &x509_dir_lookup;
   80|  1.30k|}
by_dir.c:new_dir:
  109|  1.26k|{
  110|  1.26k|    BY_DIR *a = OPENSSL_malloc(sizeof(*a));
  ------------------
  |  |  106|  1.26k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  111|       |
  112|  1.26k|    if (a == NULL)
  ------------------
  |  Branch (112:9): [True: 0, False: 1.26k]
  ------------------
  113|      0|        return 0;
  114|       |
  115|  1.26k|    if ((a->buffer = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 1.26k]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_X509, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  1.26k|    a->dirs = NULL;
  120|  1.26k|    a->lock = CRYPTO_THREAD_lock_new();
  121|  1.26k|    if (a->lock == NULL) {
  ------------------
  |  Branch (121:9): [True: 0, False: 1.26k]
  ------------------
  122|      0|        BUF_MEM_free(a->buffer);
  123|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  124|      0|        goto err;
  125|      0|    }
  126|  1.26k|    lu->method_data = a;
  127|  1.26k|    return 1;
  128|       |
  129|      0|err:
  130|      0|    OPENSSL_free(a);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  131|      0|    return 0;
  132|  1.26k|}
by_dir.c:free_dir:
  157|  1.26k|{
  158|  1.26k|    BY_DIR *a = (BY_DIR *)lu->method_data;
  159|       |
  160|  1.26k|    sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free);
  161|  1.26k|    BUF_MEM_free(a->buffer);
  162|  1.26k|    CRYPTO_THREAD_lock_free(a->lock);
  163|  1.26k|    OPENSSL_free(a);
  ------------------
  |  |  131|  1.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  164|  1.26k|}
by_dir.c:by_dir_entry_free:
  150|  2.82k|{
  151|  2.82k|    OPENSSL_free(ent->dir);
  ------------------
  |  |  131|  2.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  2.82k|    sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free);
  153|  2.82k|    OPENSSL_free(ent);
  ------------------
  |  |  131|  2.82k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  154|  2.82k|}
by_dir.c:dir_ctrl:
   84|  1.30k|{
   85|  1.30k|    int ret = 0;
   86|  1.30k|    BY_DIR *ld = (BY_DIR *)ctx->method_data;
   87|       |
   88|  1.30k|    switch (cmd) {
  ------------------
  |  Branch (88:13): [True: 1.30k, False: 0]
  ------------------
   89|  1.30k|    case X509_L_ADD_DIR:
  ------------------
  |  |  284|  1.30k|#define X509_L_ADD_DIR 2
  ------------------
  |  Branch (89:5): [True: 1.30k, False: 0]
  ------------------
   90|  1.30k|        if (argl == X509_FILETYPE_DEFAULT) {
  ------------------
  |  |  170|  1.30k|#define X509_FILETYPE_DEFAULT 3
  ------------------
  |  Branch (90:13): [True: 0, False: 1.30k]
  ------------------
   91|      0|            const char *dir = ossl_safe_getenv(X509_get_default_cert_dir_env());
   92|       |
   93|      0|            if (dir)
  ------------------
  |  Branch (93:17): [True: 0, False: 0]
  ------------------
   94|      0|                ret = add_cert_dir(ld, dir, X509_FILETYPE_PEM);
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   95|      0|            else
   96|      0|                ret = add_cert_dir(ld, X509_get_default_cert_dir(),
   97|      0|                    X509_FILETYPE_PEM);
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   98|      0|            if (!ret) {
  ------------------
  |  Branch (98:17): [True: 0, False: 0]
  ------------------
   99|      0|                ERR_raise(ERR_LIB_X509, X509_R_LOADING_CERT_DIR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  100|      0|            }
  101|      0|        } else
  102|  1.30k|            ret = add_cert_dir(ld, argp, (int)argl);
  103|  1.30k|        break;
  104|  1.30k|    }
  105|  1.30k|    return ret;
  106|  1.30k|}
by_dir.c:add_cert_dir:
  167|  1.30k|{
  168|  1.30k|    int j;
  169|  1.30k|    size_t len;
  170|  1.30k|    const char *s, *ss, *p;
  171|       |
  172|  1.30k|    if (dir == NULL || *dir == '\0') {
  ------------------
  |  Branch (172:9): [True: 0, False: 1.30k]
  |  Branch (172:24): [True: 8, False: 1.29k]
  ------------------
  173|      8|        ERR_raise(ERR_LIB_X509, X509_R_INVALID_DIRECTORY);
  ------------------
  |  |  404|      8|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      8|    (ERR_new(),                                                  \
  |  |  |  |  407|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      8|        ERR_set_error)
  |  |  ------------------
  ------------------
  174|      8|        return 0;
  175|      8|    }
  176|       |
  177|  1.29k|    s = dir;
  178|  1.29k|    p = s;
  179|  37.8k|    do {
  180|  37.8k|        if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) {
  ------------------
  |  |  213|  37.8k|#define LIST_SEPARATOR_CHAR ':'
  ------------------
  |  Branch (180:13): [True: 3.11k, False: 34.7k]
  |  Branch (180:44): [True: 1.29k, False: 33.4k]
  ------------------
  181|  4.41k|            BY_DIR_ENTRY *ent;
  182|       |
  183|  4.41k|            ss = s;
  184|  4.41k|            s = p + 1;
  185|  4.41k|            len = p - ss;
  186|  4.41k|            if (len == 0)
  ------------------
  |  Branch (186:17): [True: 1.06k, False: 3.34k]
  ------------------
  187|  1.06k|                continue;
  188|  36.4k|            for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {
  ------------------
  |  Branch (188:25): [True: 33.5k, False: 2.82k]
  ------------------
  189|  33.5k|                ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
  190|  33.5k|                if (strlen(ent->dir) == len && strncmp(ent->dir, ss, len) == 0)
  ------------------
  |  Branch (190:21): [True: 4.01k, False: 29.5k]
  |  Branch (190:48): [True: 518, False: 3.49k]
  ------------------
  191|    518|                    break;
  192|  33.5k|            }
  193|  3.34k|            if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
  ------------------
  |  Branch (193:17): [True: 518, False: 2.82k]
  ------------------
  194|    518|                continue;
  195|  2.82k|            if (ctx->dirs == NULL) {
  ------------------
  |  Branch (195:17): [True: 1.26k, False: 1.56k]
  ------------------
  196|  1.26k|                ctx->dirs = sk_BY_DIR_ENTRY_new_null();
  197|  1.26k|                if (!ctx->dirs) {
  ------------------
  |  Branch (197:21): [True: 0, False: 1.26k]
  ------------------
  198|      0|                    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  199|      0|                    return 0;
  200|      0|                }
  201|  1.26k|            }
  202|  2.82k|            ent = OPENSSL_malloc(sizeof(*ent));
  ------------------
  |  |  106|  2.82k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  203|  2.82k|            if (ent == NULL)
  ------------------
  |  Branch (203:17): [True: 0, False: 2.82k]
  ------------------
  204|      0|                return 0;
  205|  2.82k|            ent->dir_type = type;
  206|  2.82k|            ent->hashes = sk_BY_DIR_HASH_new(by_dir_hash_cmp);
  207|  2.82k|            ent->dir = OPENSSL_strndup(ss, len);
  ------------------
  |  |  137|  2.82k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  208|  2.82k|            if (ent->dir == NULL || ent->hashes == NULL) {
  ------------------
  |  Branch (208:17): [True: 0, False: 2.82k]
  |  Branch (208:37): [True: 0, False: 2.82k]
  ------------------
  209|      0|                by_dir_entry_free(ent);
  210|      0|                return 0;
  211|      0|            }
  212|  2.82k|            if (!sk_BY_DIR_ENTRY_push(ctx->dirs, ent)) {
  ------------------
  |  Branch (212:17): [True: 0, False: 2.82k]
  ------------------
  213|      0|                by_dir_entry_free(ent);
  214|      0|                ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  215|      0|                return 0;
  216|      0|            }
  217|  2.82k|        }
  218|  37.8k|    } while (*p++ != '\0');
  ------------------
  |  Branch (218:14): [True: 36.5k, False: 1.29k]
  ------------------
  219|  1.29k|    return 1;
  220|  1.29k|}

X509_LOOKUP_file:
   42|  1.45k|{
   43|  1.45k|    return &x509_file_lookup;
   44|  1.45k|}
X509_load_crl_file:
  173|     79|{
  174|     79|    BIO *in = NULL;
  175|     79|    int count = 0;
  176|     79|    X509_CRL *x = NULL;
  177|       |
  178|     79|    if (file == NULL) {
  ------------------
  |  Branch (178:9): [True: 0, False: 79]
  ------------------
  179|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  180|      0|        goto err;
  181|      0|    }
  182|       |
  183|     79|    in = BIO_new(BIO_s_file());
  184|       |
  185|     79|    if ((in == NULL) || (BIO_read_filename(in, file) <= 0)) {
  ------------------
  |  |  586|     79|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  442|     79|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  587|     79|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|     79|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|     79|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (185:9): [True: 0, False: 79]
  |  Branch (185:25): [True: 66, False: 13]
  ------------------
  186|     66|        ERR_raise(ERR_LIB_X509, ERR_R_BIO_LIB);
  ------------------
  |  |  404|     66|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     66|    (ERR_new(),                                                  \
  |  |  |  |  407|     66|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     66|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     66|        ERR_set_error)
  |  |  ------------------
  ------------------
  187|     66|        goto err;
  188|     66|    }
  189|       |
  190|     13|    if (type == X509_FILETYPE_PEM) {
  ------------------
  |  |  168|     13|#define X509_FILETYPE_PEM 1
  ------------------
  |  Branch (190:9): [True: 13, False: 0]
  ------------------
  191|     13|        for (;;) {
  192|     13|            x = PEM_read_bio_X509_CRL(in, NULL, NULL, "");
  193|     13|            if (x == NULL) {
  ------------------
  |  Branch (193:17): [True: 13, False: 0]
  ------------------
  194|     13|                if ((ERR_GET_REASON(ERR_peek_last_error()) == PEM_R_NO_START_LINE) && (count > 0)) {
  ------------------
  |  |   44|     13|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (194:21): [True: 13, False: 0]
  |  Branch (194:87): [True: 0, False: 13]
  ------------------
  195|      0|                    ERR_clear_error();
  196|      0|                    break;
  197|     13|                } else {
  198|     13|                    if (count == 0) {
  ------------------
  |  Branch (198:25): [True: 13, False: 0]
  ------------------
  199|     13|                        ERR_raise(ERR_LIB_X509, X509_R_NO_CRL_FOUND);
  ------------------
  |  |  404|     13|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     13|    (ERR_new(),                                                  \
  |  |  |  |  407|     13|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     13|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     13|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|     13|                    } else {
  201|      0|                        ERR_raise(ERR_LIB_X509, ERR_R_PEM_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  202|      0|                        count = 0;
  203|      0|                    }
  204|     13|                    goto err;
  205|     13|                }
  206|     13|            }
  207|      0|            if (!X509_STORE_add_crl(ctx->store_ctx, x)) {
  ------------------
  |  Branch (207:17): [True: 0, False: 0]
  ------------------
  208|      0|                count = 0;
  209|      0|                goto err;
  210|      0|            }
  211|      0|            count++;
  212|      0|            X509_CRL_free(x);
  213|      0|            x = NULL;
  214|      0|        }
  215|     13|    } else if (type == X509_FILETYPE_ASN1) {
  ------------------
  |  |  169|      0|#define X509_FILETYPE_ASN1 2
  ------------------
  |  Branch (215:16): [True: 0, False: 0]
  ------------------
  216|      0|        x = d2i_X509_CRL_bio(in, NULL);
  217|      0|        if (x == NULL) {
  ------------------
  |  Branch (217:13): [True: 0, False: 0]
  ------------------
  218|      0|            ERR_raise(ERR_LIB_X509, X509_R_NO_CRL_FOUND);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  219|      0|            goto err;
  220|      0|        }
  221|      0|        count = X509_STORE_add_crl(ctx->store_ctx, x);
  222|      0|    } else {
  223|      0|        ERR_raise(ERR_LIB_X509, X509_R_BAD_X509_FILETYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  224|      0|        goto err;
  225|      0|    }
  226|     79|err:
  227|     79|    X509_CRL_free(x);
  228|     79|    BIO_free(in);
  229|     79|    return count;
  230|     13|}
X509_load_cert_crl_file_ex:
  234|  1.37k|{
  235|  1.37k|    STACK_OF(X509_INFO) *inf = NULL;
  ------------------
  |  |   33|  1.37k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  236|  1.37k|    X509_INFO *itmp = NULL;
  237|  1.37k|    BIO *in = NULL;
  238|  1.37k|    int i, count = 0;
  239|       |
  240|  1.37k|    if (type != X509_FILETYPE_PEM)
  ------------------
  |  |  168|  1.37k|#define X509_FILETYPE_PEM 1
  ------------------
  |  Branch (240:9): [True: 0, False: 1.37k]
  ------------------
  241|      0|        return X509_load_cert_file_ex(ctx, file, type, libctx, propq);
  242|       |#if defined(OPENSSL_SYS_WINDOWS)
  243|       |    in = BIO_new_file(file, "rb");
  244|       |#else
  245|  1.37k|    in = BIO_new_file(file, "r");
  246|  1.37k|#endif
  247|  1.37k|    if (in == NULL) {
  ------------------
  |  Branch (247:9): [True: 62, False: 1.31k]
  ------------------
  248|     62|        ERR_raise(ERR_LIB_X509, ERR_R_BIO_LIB);
  ------------------
  |  |  404|     62|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     62|    (ERR_new(),                                                  \
  |  |  |  |  407|     62|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     62|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     62|        ERR_set_error)
  |  |  ------------------
  ------------------
  249|     62|        return 0;
  250|     62|    }
  251|  1.31k|    inf = PEM_X509_INFO_read_bio_ex(in, NULL, NULL, "", libctx, propq);
  252|  1.31k|    BIO_free(in);
  253|  1.31k|    if (inf == NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 1.31k]
  ------------------
  254|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PEM_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  255|      0|        return 0;
  256|      0|    }
  257|   191k|    for (i = 0; i < sk_X509_INFO_num(inf); i++) {
  ------------------
  |  |  397|   191k|#define sk_X509_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_X509_INFO_sk_type(sk))
  ------------------
  |  Branch (257:17): [True: 190k, False: 1.31k]
  ------------------
  258|   190k|        itmp = sk_X509_INFO_value(inf, i);
  ------------------
  |  |  398|   190k|#define sk_X509_INFO_value(sk, idx) ((X509_INFO *)OPENSSL_sk_value(ossl_check_const_X509_INFO_sk_type(sk), (idx)))
  ------------------
  259|   190k|        if (itmp->x509) {
  ------------------
  |  Branch (259:13): [True: 190k, False: 0]
  ------------------
  260|   190k|            if (!X509_STORE_add_cert(ctx->store_ctx, itmp->x509)) {
  ------------------
  |  Branch (260:17): [True: 0, False: 190k]
  ------------------
  261|      0|                count = 0;
  262|      0|                goto err;
  263|      0|            }
  264|   190k|            count++;
  265|   190k|        }
  266|   190k|        if (itmp->crl) {
  ------------------
  |  Branch (266:13): [True: 0, False: 190k]
  ------------------
  267|      0|            if (!X509_STORE_add_crl(ctx->store_ctx, itmp->crl)) {
  ------------------
  |  Branch (267:17): [True: 0, False: 0]
  ------------------
  268|      0|                count = 0;
  269|      0|                goto err;
  270|      0|            }
  271|      0|            count++;
  272|      0|        }
  273|   190k|    }
  274|  1.31k|    if (count == 0)
  ------------------
  |  Branch (274:9): [True: 10, False: 1.30k]
  ------------------
  275|  1.31k|        ERR_raise(ERR_LIB_X509, X509_R_NO_CERTIFICATE_OR_CRL_FOUND);
  ------------------
  |  |  404|     10|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     10|    (ERR_new(),                                                  \
  |  |  |  |  407|     10|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     10|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     10|        ERR_set_error)
  |  |  ------------------
  ------------------
  276|  1.31k|err:
  277|  1.31k|    sk_X509_INFO_pop_free(inf, X509_INFO_free);
  ------------------
  |  |  411|  1.31k|#define sk_X509_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_INFO_sk_type(sk), ossl_check_X509_INFO_freefunc_type(freefunc))
  ------------------
  278|  1.31k|    return count;
  279|  1.31k|}
by_file.c:by_file_ctrl_ex:
   49|  1.37k|{
   50|  1.37k|    int ok = 0;
   51|  1.37k|    const char *file;
   52|       |
   53|  1.37k|    switch (cmd) {
  ------------------
  |  Branch (53:13): [True: 1.37k, False: 0]
  ------------------
   54|  1.37k|    case X509_L_FILE_LOAD:
  ------------------
  |  |  283|  1.37k|#define X509_L_FILE_LOAD 1
  ------------------
  |  Branch (54:5): [True: 1.37k, False: 0]
  ------------------
   55|  1.37k|        if (argl == X509_FILETYPE_DEFAULT) {
  ------------------
  |  |  170|  1.37k|#define X509_FILETYPE_DEFAULT 3
  ------------------
  |  Branch (55:13): [True: 0, False: 1.37k]
  ------------------
   56|      0|            file = ossl_safe_getenv(X509_get_default_cert_file_env());
   57|      0|            if (file)
  ------------------
  |  Branch (57:17): [True: 0, False: 0]
  ------------------
   58|      0|                ok = (X509_load_cert_crl_file_ex(ctx, file, X509_FILETYPE_PEM,
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   59|      0|                          libctx, propq)
   60|      0|                    != 0);
   61|      0|            else
   62|      0|                ok = (X509_load_cert_crl_file_ex(
   63|      0|                          ctx, X509_get_default_cert_file(),
   64|      0|                          X509_FILETYPE_PEM, libctx, propq)
  ------------------
  |  |  168|      0|#define X509_FILETYPE_PEM 1
  ------------------
   65|      0|                    != 0);
   66|       |
   67|      0|            if (!ok)
  ------------------
  |  Branch (67:17): [True: 0, False: 0]
  ------------------
   68|      0|                ERR_raise(ERR_LIB_X509, X509_R_LOADING_DEFAULTS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   69|  1.37k|        } else {
   70|  1.37k|            if (argl == X509_FILETYPE_PEM)
  ------------------
  |  |  168|  1.37k|#define X509_FILETYPE_PEM 1
  ------------------
  |  Branch (70:17): [True: 1.37k, False: 0]
  ------------------
   71|  1.37k|                ok = (X509_load_cert_crl_file_ex(ctx, argp, X509_FILETYPE_PEM,
  ------------------
  |  |  168|  1.37k|#define X509_FILETYPE_PEM 1
  ------------------
   72|  1.37k|                          libctx, propq)
   73|  1.37k|                    != 0);
   74|      0|            else
   75|      0|                ok = (X509_load_cert_file_ex(ctx, argp, (int)argl, libctx,
   76|      0|                          propq)
   77|      0|                    != 0);
   78|  1.37k|        }
   79|  1.37k|        break;
   80|  1.37k|    }
   81|  1.37k|    return ok;
   82|  1.37k|}

ossl_policy_cache_free:
  178|   381k|{
  179|   381k|    if (!cache)
  ------------------
  |  Branch (179:9): [True: 381k, False: 0]
  ------------------
  180|   381k|        return;
  181|      0|    ossl_policy_data_free(cache->anyPolicy);
  182|      0|    sk_X509_POLICY_DATA_pop_free(cache->data, ossl_policy_data_free);
  183|      0|    OPENSSL_free(cache);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|      0|}

OSSL_STACK_OF_X509_free:
   26|  46.8k|{
   27|  46.8k|    sk_X509_pop_free(certs, X509_free);
  ------------------
  |  |   96|  46.8k|#define sk_X509_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_sk_type(sk), ossl_check_X509_freefunc_type(freefunc))
  ------------------
   28|  46.8k|}

v3_crld.c:dpn_cb:
  308|  7.75k|{
  309|  7.75k|    DIST_POINT_NAME *dpn = (DIST_POINT_NAME *)*pval;
  310|       |
  311|  7.75k|    switch (operation) {
  ------------------
  |  Branch (311:13): [True: 2.58k, False: 5.16k]
  ------------------
  312|  1.29k|    case ASN1_OP_NEW_POST:
  ------------------
  |  |  732|  1.29k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (312:5): [True: 1.29k, False: 6.46k]
  ------------------
  313|  1.29k|        dpn->dpname = NULL;
  314|  1.29k|        break;
  315|       |
  316|  1.29k|    case ASN1_OP_FREE_POST:
  ------------------
  |  |  734|  1.29k|#define ASN1_OP_FREE_POST 3
  ------------------
  |  Branch (316:5): [True: 1.29k, False: 6.46k]
  ------------------
  317|  1.29k|        X509_NAME_free(dpn->dpname);
  318|  1.29k|        break;
  319|  7.75k|    }
  320|  7.75k|    return 1;
  321|  7.75k|}

X509V3_EXT_get_nid:
   53|  36.5k|{
   54|  36.5k|    X509V3_EXT_METHOD tmp;
   55|  36.5k|    const X509V3_EXT_METHOD *t = &tmp, *const * ret;
   56|  36.5k|    int idx;
   57|       |
   58|  36.5k|    if (nid < 0)
  ------------------
  |  Branch (58:9): [True: 0, False: 36.5k]
  ------------------
   59|      0|        return NULL;
   60|  36.5k|    tmp.ext_nid = nid;
   61|  36.5k|    ret = OBJ_bsearch_ext(&t, standard_exts, STANDARD_EXTENSION_COUNT);
  ------------------
  |  |   99|  36.5k|#define STANDARD_EXTENSION_COUNT OSSL_NELEM(standard_exts)
  |  |  ------------------
  |  |  |  |   14|  36.5k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
   62|  36.5k|    if (ret)
  ------------------
  |  Branch (62:9): [True: 36.5k, False: 0]
  ------------------
   63|  36.5k|        return *ret;
   64|      0|    if (!ext_list)
  ------------------
  |  Branch (64:9): [True: 0, False: 0]
  ------------------
   65|      0|        return NULL;
   66|       |    /* Ideally, this would be done under a lock */
   67|      0|    sk_X509V3_EXT_METHOD_sort(ext_list);
  ------------------
  |  |  135|      0|#define sk_X509V3_EXT_METHOD_sort(sk) OPENSSL_sk_sort(ossl_check_X509V3_EXT_METHOD_sk_type(sk))
  ------------------
   68|      0|    idx = sk_X509V3_EXT_METHOD_find(ext_list, &tmp);
  ------------------
  |  |  132|      0|#define sk_X509V3_EXT_METHOD_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr))
  ------------------
   69|       |    /* A failure to locate the item is handled by the value method */
   70|      0|    return sk_X509V3_EXT_METHOD_value(ext_list, idx);
  ------------------
  |  |  116|      0|#define sk_X509V3_EXT_METHOD_value(sk, idx) ((X509V3_EXT_METHOD *)OPENSSL_sk_value(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk), (idx)))
  ------------------
   71|      0|}
X509V3_EXT_get:
   74|  36.5k|{
   75|  36.5k|    int nid;
   76|  36.5k|    if ((nid = OBJ_obj2nid(X509_EXTENSION_get_object(ext))) == NID_undef)
  ------------------
  |  |   18|  36.5k|#define NID_undef                       0
  ------------------
  |  Branch (76:9): [True: 0, False: 36.5k]
  ------------------
   77|      0|        return NULL;
   78|  36.5k|    return X509V3_EXT_get_nid(nid);
   79|  36.5k|}
X509V3_EXT_d2i:
  135|  36.5k|{
  136|  36.5k|    const X509V3_EXT_METHOD *method;
  137|  36.5k|    const unsigned char *p;
  138|  36.5k|    ASN1_STRING *extvalue;
  139|  36.5k|    int extlen;
  140|       |
  141|  36.5k|    if ((method = X509V3_EXT_get(ext)) == NULL)
  ------------------
  |  Branch (141:9): [True: 0, False: 36.5k]
  ------------------
  142|      0|        return NULL;
  143|  36.5k|    extvalue = X509_EXTENSION_get_data(ext);
  144|  36.5k|    p = ASN1_STRING_get0_data(extvalue);
  145|  36.5k|    extlen = ASN1_STRING_length(extvalue);
  146|  36.5k|    if (method->it)
  ------------------
  |  Branch (146:9): [True: 36.5k, False: 0]
  ------------------
  147|  36.5k|        return ASN1_item_d2i(NULL, &p, extlen, ASN1_ITEM_ptr(method->it));
  ------------------
  |  |  428|  36.5k|#define ASN1_ITEM_ptr(iptr) (iptr())
  ------------------
  148|      0|    return method->d2i(NULL, &p, extlen);
  149|  36.5k|}
X509V3_get_d2i:
  169|   133k|{
  170|   133k|    int lastpos, i;
  171|   133k|    X509_EXTENSION *ex, *found_ex = NULL;
  172|       |
  173|   133k|    if (!x) {
  ------------------
  |  Branch (173:9): [True: 0, False: 133k]
  ------------------
  174|      0|        if (idx)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            *idx = -1;
  176|      0|        if (crit)
  ------------------
  |  Branch (176:13): [True: 0, False: 0]
  ------------------
  177|      0|            *crit = -1;
  178|      0|        return NULL;
  179|      0|    }
  180|   133k|    if (idx)
  ------------------
  |  Branch (180:9): [True: 0, False: 133k]
  ------------------
  181|      0|        lastpos = *idx + 1;
  182|   133k|    else
  183|   133k|        lastpos = 0;
  184|   133k|    if (lastpos < 0)
  ------------------
  |  Branch (184:9): [True: 0, False: 133k]
  ------------------
  185|      0|        lastpos = 0;
  186|   591k|    for (i = lastpos; i < sk_X509_EXTENSION_num(x); i++) {
  ------------------
  |  |  242|   591k|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (186:23): [True: 458k, False: 133k]
  ------------------
  187|   458k|        ex = sk_X509_EXTENSION_value(x, i);
  ------------------
  |  |  243|   458k|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
  188|   458k|        if (OBJ_obj2nid(X509_EXTENSION_get_object(ex)) == nid) {
  ------------------
  |  Branch (188:13): [True: 36.5k, False: 422k]
  ------------------
  189|  36.5k|            if (idx) {
  ------------------
  |  Branch (189:17): [True: 0, False: 36.5k]
  ------------------
  190|      0|                *idx = i;
  191|      0|                found_ex = ex;
  192|      0|                break;
  193|  36.5k|            } else if (found_ex) {
  ------------------
  |  Branch (193:24): [True: 0, False: 36.5k]
  ------------------
  194|       |                /* Found more than one */
  195|      0|                if (crit)
  ------------------
  |  Branch (195:21): [True: 0, False: 0]
  ------------------
  196|      0|                    *crit = -2;
  197|      0|                return NULL;
  198|      0|            }
  199|  36.5k|            found_ex = ex;
  200|  36.5k|        }
  201|   458k|    }
  202|   133k|    if (found_ex) {
  ------------------
  |  Branch (202:9): [True: 36.5k, False: 96.5k]
  ------------------
  203|       |        /* Found it */
  204|  36.5k|        if (crit)
  ------------------
  |  Branch (204:13): [True: 36.5k, False: 0]
  ------------------
  205|  36.5k|            *crit = X509_EXTENSION_get_critical(found_ex);
  206|  36.5k|        return X509V3_EXT_d2i(found_ex);
  207|  36.5k|    }
  208|       |
  209|       |    /* Extension not found */
  210|  96.5k|    if (idx)
  ------------------
  |  Branch (210:9): [True: 0, False: 96.5k]
  ------------------
  211|      0|        *idx = -1;
  212|  96.5k|    if (crit)
  ------------------
  |  Branch (212:9): [True: 96.5k, False: 0]
  ------------------
  213|  96.5k|        *crit = -1;
  214|       |    return NULL;
  215|   133k|}
v3_lib.c:ext_cmp:
   41|   184k|{
   42|   184k|    return ((*a)->ext_nid - (*b)->ext_nid);
   43|   184k|}

X509_check_purpose:
   89|  11.0k|{
   90|  11.0k|    int idx;
   91|  11.0k|    const X509_PURPOSE *pt;
   92|       |
   93|  11.0k|    if (!ossl_x509v3_cache_extensions(x))
  ------------------
  |  Branch (93:9): [True: 0, False: 11.0k]
  ------------------
   94|      0|        return -1;
   95|  11.0k|    if (id == -1)
  ------------------
  |  Branch (95:9): [True: 11.0k, False: 0]
  ------------------
   96|  11.0k|        return 1;
   97|       |
   98|      0|    idx = X509_PURPOSE_get_by_id(id);
   99|      0|    if (idx == -1)
  ------------------
  |  Branch (99:9): [True: 0, False: 0]
  ------------------
  100|      0|        return -1;
  101|      0|    pt = X509_PURPOSE_get0(idx);
  102|      0|    return pt->check_purpose(pt, x, non_leaf);
  103|      0|}
X509_supported_extension:
  310|  21.1k|{
  311|       |    /*
  312|       |     * This table is a list of the NIDs of supported extensions: that is
  313|       |     * those which are used by the verify process. If an extension is
  314|       |     * critical and doesn't appear in this list then the verify process will
  315|       |     * normally reject the certificate. The list must be kept in numerical
  316|       |     * order because it will be searched using bsearch.
  317|       |     */
  318|  21.1k|    static const int supported_nids[] = {
  319|  21.1k|        NID_netscape_cert_type, /* 71 */
  ------------------
  |  | 2945|  21.1k|#define NID_netscape_cert_type          71
  ------------------
  320|  21.1k|        NID_key_usage, /* 83 */
  ------------------
  |  | 2685|  21.1k|#define NID_key_usage           83
  ------------------
  321|  21.1k|        NID_subject_alt_name, /* 85 */
  ------------------
  |  | 2695|  21.1k|#define NID_subject_alt_name            85
  ------------------
  322|  21.1k|        NID_basic_constraints, /* 87 */
  ------------------
  |  | 2705|  21.1k|#define NID_basic_constraints           87
  ------------------
  323|  21.1k|        NID_certificate_policies, /* 89 */
  ------------------
  |  | 2750|  21.1k|#define NID_certificate_policies                89
  ------------------
  324|  21.1k|        NID_crl_distribution_points, /* 103 */
  ------------------
  |  | 2745|  21.1k|#define NID_crl_distribution_points             103
  ------------------
  325|  21.1k|        NID_ext_key_usage, /* 126 */
  ------------------
  |  | 2775|  21.1k|#define NID_ext_key_usage               126
  ------------------
  326|  21.1k|#ifndef OPENSSL_NO_RFC3779
  327|  21.1k|        NID_sbgp_ipAddrBlock, /* 290 */
  ------------------
  |  | 1626|  21.1k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  328|  21.1k|        NID_sbgp_autonomousSysNum, /* 291 */
  ------------------
  |  | 1630|  21.1k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  329|  21.1k|#endif
  330|  21.1k|        NID_id_pkix_OCSP_noCheck, /* 369 */
  ------------------
  |  | 2224|  21.1k|#define NID_id_pkix_OCSP_noCheck                369
  ------------------
  331|  21.1k|        NID_policy_constraints, /* 401 */
  ------------------
  |  | 2770|  21.1k|#define NID_policy_constraints          401
  ------------------
  332|  21.1k|        NID_proxyCertInfo, /* 663 */
  ------------------
  |  | 1648|  21.1k|#define NID_proxyCertInfo               663
  ------------------
  333|  21.1k|        NID_name_constraints, /* 666 */
  ------------------
  |  | 2740|  21.1k|#define NID_name_constraints            666
  ------------------
  334|  21.1k|        NID_policy_mappings, /* 747 */
  ------------------
  |  | 2760|  21.1k|#define NID_policy_mappings             747
  ------------------
  335|  21.1k|        NID_inhibit_any_policy /* 748 */
  ------------------
  |  | 2830|  21.1k|#define NID_inhibit_any_policy          748
  ------------------
  336|  21.1k|    };
  337|       |
  338|  21.1k|    int ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  339|       |
  340|  21.1k|    if (ex_nid == NID_undef)
  ------------------
  |  |   18|  21.1k|#define NID_undef                       0
  ------------------
  |  Branch (340:9): [True: 0, False: 21.1k]
  ------------------
  341|      0|        return 0;
  342|       |
  343|  21.1k|    if (OBJ_bsearch_nid(&ex_nid, supported_nids, OSSL_NELEM(supported_nids)))
  ------------------
  |  |   14|  21.1k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (343:9): [True: 21.1k, False: 0]
  ------------------
  344|  21.1k|        return 1;
  345|      0|    return 0;
  346|  21.1k|}
ossl_x509v3_cache_extensions:
  441|  11.0k|{
  442|  11.0k|    BASIC_CONSTRAINTS *bs;
  443|  11.0k|    PROXY_CERT_INFO_EXTENSION *pci;
  444|  11.0k|    ASN1_BIT_STRING *usage;
  445|  11.0k|    ASN1_BIT_STRING *ns;
  446|  11.0k|    EXTENDED_KEY_USAGE *extusage;
  447|  11.0k|    int i;
  448|  11.0k|    int res;
  449|       |
  450|  11.0k|#ifdef tsan_ld_acq
  451|       |    /* Fast lock-free check, see end of the function for details. */
  452|  11.0k|    if (tsan_ld_acq((TSAN_QUALIFIER int *)&x->ex_cached))
  ------------------
  |  |   64|  11.0k|#define tsan_ld_acq(ptr) atomic_load_explicit((ptr), memory_order_acquire)
  |  |  ------------------
  |  |  |  Branch (64:26): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
  453|      0|        return (x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  454|  11.0k|#endif
  455|       |
  456|  11.0k|    if (!CRYPTO_THREAD_write_lock(x->lock))
  ------------------
  |  Branch (456:9): [True: 0, False: 11.0k]
  ------------------
  457|      0|        return 0;
  458|  11.0k|    if ((x->ex_flags & EXFLAG_SET) != 0) { /* Cert has already been processed */
  ------------------
  |  |  678|  11.0k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (458:9): [True: 0, False: 11.0k]
  ------------------
  459|      0|        CRYPTO_THREAD_unlock(x->lock);
  460|      0|        return (x->ex_flags & EXFLAG_INVALID) == 0;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  461|      0|    }
  462|       |
  463|  11.0k|    ERR_set_mark();
  464|       |
  465|       |    /* Cache the SHA1 digest of the cert */
  466|  11.0k|    if (!X509_digest(x, EVP_sha1(), x->sha1_hash, NULL))
  ------------------
  |  Branch (466:9): [True: 0, False: 11.0k]
  ------------------
  467|      0|        x->ex_flags |= EXFLAG_NO_FINGERPRINT;
  ------------------
  |  |  690|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  468|       |
  469|       |    /* V1 should mean no extensions ... */
  470|  11.0k|    if (X509_get_version(x) == X509_VERSION_1)
  ------------------
  |  |  845|  11.0k|#define X509_VERSION_1 0
  ------------------
  |  Branch (470:9): [True: 0, False: 11.0k]
  ------------------
  471|      0|        x->ex_flags |= EXFLAG_V1;
  ------------------
  |  |  675|      0|#define EXFLAG_V1 0x40
  ------------------
  472|       |
  473|       |    /* Handle basic constraints */
  474|  11.0k|    x->ex_pathlen = -1;
  475|  11.0k|    if ((bs = X509_get_ext_d2i(x, NID_basic_constraints, &i, NULL)) != NULL) {
  ------------------
  |  | 2705|  11.0k|#define NID_basic_constraints           87
  ------------------
  |  Branch (475:9): [True: 11.0k, False: 0]
  ------------------
  476|  11.0k|        if (bs->ca)
  ------------------
  |  Branch (476:13): [True: 11.0k, False: 0]
  ------------------
  477|  11.0k|            x->ex_flags |= EXFLAG_CA;
  ------------------
  |  |  673|  11.0k|#define EXFLAG_CA 0x10
  ------------------
  478|  11.0k|        if (bs->pathlen != NULL) {
  ------------------
  |  Branch (478:13): [True: 228, False: 10.8k]
  ------------------
  479|       |            /*
  480|       |             * The error case !bs->ca is checked by check_chain()
  481|       |             * in case ctx->param->flags & X509_V_FLAG_X509_STRICT
  482|       |             */
  483|    228|            if (bs->pathlen->type == V_ASN1_NEG_INTEGER) {
  ------------------
  |  |  100|    228|#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
  |  |  ------------------
  |  |  |  |   99|    228|#define V_ASN1_NEG 0x100
  |  |  ------------------
  ------------------
  |  Branch (483:17): [True: 0, False: 228]
  ------------------
  484|      0|                ERR_raise(ERR_LIB_X509V3, X509V3_R_NEGATIVE_PATHLEN);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  485|      0|                x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  486|    228|            } else {
  487|    228|                x->ex_pathlen = ASN1_INTEGER_get(bs->pathlen);
  488|    228|            }
  489|    228|        }
  490|  11.0k|        BASIC_CONSTRAINTS_free(bs);
  491|  11.0k|        x->ex_flags |= EXFLAG_BCONS;
  ------------------
  |  |  668|  11.0k|#define EXFLAG_BCONS 0x1
  ------------------
  492|  11.0k|    } else if (i != -1) {
  ------------------
  |  Branch (492:16): [True: 0, False: 0]
  ------------------
  493|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  494|      0|    }
  495|       |
  496|       |    /* Handle proxy certificates */
  497|  11.0k|    if ((pci = X509_get_ext_d2i(x, NID_proxyCertInfo, &i, NULL)) != NULL) {
  ------------------
  |  | 1648|  11.0k|#define NID_proxyCertInfo               663
  ------------------
  |  Branch (497:9): [True: 0, False: 11.0k]
  ------------------
  498|      0|        if ((x->ex_flags & EXFLAG_CA) != 0
  ------------------
  |  |  673|      0|#define EXFLAG_CA 0x10
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|            || X509_get_ext_by_NID(x, NID_subject_alt_name, -1) >= 0
  ------------------
  |  | 2695|      0|#define NID_subject_alt_name            85
  ------------------
  |  Branch (499:16): [True: 0, False: 0]
  ------------------
  500|      0|            || X509_get_ext_by_NID(x, NID_issuer_alt_name, -1) >= 0) {
  ------------------
  |  | 2700|      0|#define NID_issuer_alt_name             86
  ------------------
  |  Branch (500:16): [True: 0, False: 0]
  ------------------
  501|      0|            x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  502|      0|        }
  503|      0|        if (pci->pcPathLengthConstraint != NULL)
  ------------------
  |  Branch (503:13): [True: 0, False: 0]
  ------------------
  504|      0|            x->ex_pcpathlen = ASN1_INTEGER_get(pci->pcPathLengthConstraint);
  505|      0|        else
  506|      0|            x->ex_pcpathlen = -1;
  507|      0|        PROXY_CERT_INFO_EXTENSION_free(pci);
  508|      0|        x->ex_flags |= EXFLAG_PROXY;
  ------------------
  |  |  680|      0|#define EXFLAG_PROXY 0x400
  ------------------
  509|  11.0k|    } else if (i != -1) {
  ------------------
  |  Branch (509:16): [True: 0, False: 11.0k]
  ------------------
  510|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  511|      0|    }
  512|       |
  513|       |    /* Handle (basic) key usage */
  514|  11.0k|    if ((usage = X509_get_ext_d2i(x, NID_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2685|  11.0k|#define NID_key_usage           83
  ------------------
  |  Branch (514:9): [True: 10.8k, False: 228]
  ------------------
  515|  10.8k|        x->ex_kusage = 0;
  516|  10.8k|        if (usage->length > 0) {
  ------------------
  |  Branch (516:13): [True: 10.8k, False: 0]
  ------------------
  517|  10.8k|            x->ex_kusage = usage->data[0];
  518|  10.8k|            if (usage->length > 1)
  ------------------
  |  Branch (518:17): [True: 152, False: 10.7k]
  ------------------
  519|    152|                x->ex_kusage |= usage->data[1] << 8;
  520|  10.8k|        }
  521|  10.8k|        x->ex_flags |= EXFLAG_KUSAGE;
  ------------------
  |  |  669|  10.8k|#define EXFLAG_KUSAGE 0x2
  ------------------
  522|  10.8k|        ASN1_BIT_STRING_free(usage);
  523|       |        /* Check for empty key usage according to RFC 5280 section 4.2.1.3 */
  524|  10.8k|        if (x->ex_kusage == 0) {
  ------------------
  |  Branch (524:13): [True: 0, False: 10.8k]
  ------------------
  525|      0|            ERR_raise(ERR_LIB_X509V3, X509V3_R_EMPTY_KEY_USAGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  526|      0|            x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  527|      0|        }
  528|  10.8k|    } else if (i != -1) {
  ------------------
  |  Branch (528:16): [True: 0, False: 228]
  ------------------
  529|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  530|      0|    }
  531|       |
  532|       |    /* Handle extended key usage */
  533|  11.0k|    x->ex_xkusage = 0;
  534|  11.0k|    if ((extusage = X509_get_ext_d2i(x, NID_ext_key_usage, &i, NULL)) != NULL) {
  ------------------
  |  | 2775|  11.0k|#define NID_ext_key_usage               126
  ------------------
  |  Branch (534:9): [True: 0, False: 11.0k]
  ------------------
  535|      0|        x->ex_flags |= EXFLAG_XKUSAGE;
  ------------------
  |  |  670|      0|#define EXFLAG_XKUSAGE 0x4
  ------------------
  536|      0|        for (i = 0; i < sk_ASN1_OBJECT_num(extusage); i++) {
  ------------------
  |  |  622|      0|#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
  ------------------
  |  Branch (536:21): [True: 0, False: 0]
  ------------------
  537|      0|            switch (OBJ_obj2nid(sk_ASN1_OBJECT_value(extusage, i))) {
  ------------------
  |  |  623|      0|#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
  ------------------
  538|      0|            case NID_server_auth:
  ------------------
  |  | 1680|      0|#define NID_server_auth         129
  ------------------
  |  Branch (538:13): [True: 0, False: 0]
  ------------------
  539|      0|                x->ex_xkusage |= XKU_SSL_SERVER;
  ------------------
  |  |  712|      0|#define XKU_SSL_SERVER 0x1
  ------------------
  540|      0|                break;
  541|      0|            case NID_client_auth:
  ------------------
  |  | 1685|      0|#define NID_client_auth         130
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|      0|                x->ex_xkusage |= XKU_SSL_CLIENT;
  ------------------
  |  |  713|      0|#define XKU_SSL_CLIENT 0x2
  ------------------
  543|      0|                break;
  544|      0|            case NID_email_protect:
  ------------------
  |  | 1695|      0|#define NID_email_protect               132
  ------------------
  |  Branch (544:13): [True: 0, False: 0]
  ------------------
  545|      0|                x->ex_xkusage |= XKU_SMIME;
  ------------------
  |  |  714|      0|#define XKU_SMIME 0x4
  ------------------
  546|      0|                break;
  547|      0|            case NID_code_sign:
  ------------------
  |  | 1690|      0|#define NID_code_sign           131
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  ------------------
  548|      0|                x->ex_xkusage |= XKU_CODE_SIGN;
  ------------------
  |  |  715|      0|#define XKU_CODE_SIGN 0x8
  ------------------
  549|      0|                break;
  550|      0|            case NID_ms_sgc:
  ------------------
  |  | 1379|      0|#define NID_ms_sgc              137
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  ------------------
  551|      0|            case NID_ns_sgc:
  ------------------
  |  | 2990|      0|#define NID_ns_sgc              139
  ------------------
  |  Branch (551:13): [True: 0, False: 0]
  ------------------
  552|      0|                x->ex_xkusage |= XKU_SGC;
  ------------------
  |  |  716|      0|#define XKU_SGC 0x10 /* Netscape or MS Server-Gated Crypto */
  ------------------
  553|      0|                break;
  554|      0|            case NID_OCSP_sign:
  ------------------
  |  | 1720|      0|#define NID_OCSP_sign           180
  ------------------
  |  Branch (554:13): [True: 0, False: 0]
  ------------------
  555|      0|                x->ex_xkusage |= XKU_OCSP_SIGN;
  ------------------
  |  |  717|      0|#define XKU_OCSP_SIGN 0x20
  ------------------
  556|      0|                break;
  557|      0|            case NID_time_stamp:
  ------------------
  |  | 1715|      0|#define NID_time_stamp          133
  ------------------
  |  Branch (557:13): [True: 0, False: 0]
  ------------------
  558|      0|                x->ex_xkusage |= XKU_TIMESTAMP;
  ------------------
  |  |  718|      0|#define XKU_TIMESTAMP 0x40
  ------------------
  559|      0|                break;
  560|      0|            case NID_dvcs:
  ------------------
  |  | 1725|      0|#define NID_dvcs                297
  ------------------
  |  Branch (560:13): [True: 0, False: 0]
  ------------------
  561|      0|                x->ex_xkusage |= XKU_DVCS;
  ------------------
  |  |  719|      0|#define XKU_DVCS 0x80
  ------------------
  562|      0|                break;
  563|      0|            case NID_anyExtendedKeyUsage:
  ------------------
  |  | 2925|      0|#define NID_anyExtendedKeyUsage         910
  ------------------
  |  Branch (563:13): [True: 0, False: 0]
  ------------------
  564|      0|                x->ex_xkusage |= XKU_ANYEKU;
  ------------------
  |  |  720|      0|#define XKU_ANYEKU 0x100
  ------------------
  565|      0|                break;
  566|      0|            default:
  ------------------
  |  Branch (566:13): [True: 0, False: 0]
  ------------------
  567|       |                /* Ignore unknown extended key usage */
  568|      0|                break;
  569|      0|            }
  570|      0|        }
  571|      0|        sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free);
  ------------------
  |  |  636|      0|#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
  ------------------
  572|  11.0k|    } else if (i != -1) {
  ------------------
  |  Branch (572:16): [True: 0, False: 11.0k]
  ------------------
  573|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  574|      0|    }
  575|       |
  576|       |    /* Handle legacy Netscape extension */
  577|  11.0k|    if ((ns = X509_get_ext_d2i(x, NID_netscape_cert_type, &i, NULL)) != NULL) {
  ------------------
  |  | 2945|  11.0k|#define NID_netscape_cert_type          71
  ------------------
  |  Branch (577:9): [True: 76, False: 11.0k]
  ------------------
  578|     76|        if (ns->length > 0)
  ------------------
  |  Branch (578:13): [True: 76, False: 0]
  ------------------
  579|     76|            x->ex_nscert = ns->data[0];
  580|      0|        else
  581|      0|            x->ex_nscert = 0;
  582|     76|        x->ex_flags |= EXFLAG_NSCERT;
  ------------------
  |  |  671|     76|#define EXFLAG_NSCERT 0x8
  ------------------
  583|     76|        ASN1_BIT_STRING_free(ns);
  584|  11.0k|    } else if (i != -1) {
  ------------------
  |  Branch (584:16): [True: 0, False: 11.0k]
  ------------------
  585|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  586|      0|    }
  587|       |
  588|       |    /* Handle subject key identifier and issuer/authority key identifier */
  589|  11.0k|    x->skid = X509_get_ext_d2i(x, NID_subject_key_identifier, &i, NULL);
  ------------------
  |  | 2680|  11.0k|#define NID_subject_key_identifier              82
  ------------------
  590|  11.0k|    if (x->skid == NULL && i != -1)
  ------------------
  |  Branch (590:9): [True: 76, False: 11.0k]
  |  Branch (590:28): [True: 0, False: 76]
  ------------------
  591|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  592|       |
  593|  11.0k|    x->akid = X509_get_ext_d2i(x, NID_authority_key_identifier, &i, NULL);
  ------------------
  |  | 2765|  11.0k|#define NID_authority_key_identifier            90
  ------------------
  594|  11.0k|    if (x->akid == NULL && i != -1)
  ------------------
  |  Branch (594:9): [True: 8.66k, False: 2.43k]
  |  Branch (594:28): [True: 0, False: 8.66k]
  ------------------
  595|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  596|       |
  597|       |    /* Check if subject name matches issuer */
  598|  11.0k|    if (X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x)) == 0) {
  ------------------
  |  Branch (598:9): [True: 11.0k, False: 0]
  ------------------
  599|  11.0k|        x->ex_flags |= EXFLAG_SI; /* Cert is self-issued */
  ------------------
  |  |  674|  11.0k|#define EXFLAG_SI 0x20 /* self-issued, maybe not self-signed */
  ------------------
  600|  11.0k|        if (X509_check_akid(x, x->akid) == X509_V_OK /* SKID matches AKID */
  ------------------
  |  |  312|  22.1k|#define X509_V_OK 0
  ------------------
  |  Branch (600:13): [True: 11.0k, False: 0]
  ------------------
  601|  11.0k|            /* .. and the signature alg matches the PUBKEY alg: */
  602|  11.0k|            && check_sig_alg_match(X509_get0_pubkey(x), x) == X509_V_OK)
  ------------------
  |  |  312|  11.0k|#define X509_V_OK 0
  ------------------
  |  Branch (602:16): [True: 11.0k, False: 0]
  ------------------
  603|  11.0k|            x->ex_flags |= EXFLAG_SS; /* indicate self-signed */
  ------------------
  |  |  684|  11.0k|#define EXFLAG_SS 0x2000 /* cert is apparently self-signed */
  ------------------
  604|       |        /* This is very related to ossl_x509_likely_issued(x, x) == X509_V_OK */
  605|  11.0k|    }
  606|       |
  607|       |    /* Handle subject alternative names and various other extensions */
  608|  11.0k|    x->altname = X509_get_ext_d2i(x, NID_subject_alt_name, &i, NULL);
  ------------------
  |  | 2695|  11.0k|#define NID_subject_alt_name            85
  ------------------
  609|  11.0k|    if (x->altname == NULL && i != -1)
  ------------------
  |  Branch (609:9): [True: 10.8k, False: 228]
  |  Branch (609:31): [True: 0, False: 10.8k]
  ------------------
  610|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  611|  11.0k|    x->nc = X509_get_ext_d2i(x, NID_name_constraints, &i, NULL);
  ------------------
  |  | 2740|  11.0k|#define NID_name_constraints            666
  ------------------
  612|  11.0k|    if (x->nc == NULL && i != -1)
  ------------------
  |  Branch (612:9): [True: 11.0k, False: 0]
  |  Branch (612:26): [True: 0, False: 11.0k]
  ------------------
  613|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  614|       |
  615|       |    /* Handle CRL distribution point entries */
  616|  11.0k|    res = setup_crldp(x);
  617|  11.0k|    if (res == 0)
  ------------------
  |  Branch (617:9): [True: 0, False: 11.0k]
  ------------------
  618|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  619|       |
  620|  11.0k|#ifndef OPENSSL_NO_RFC3779
  621|  11.0k|    x->rfc3779_addr = X509_get_ext_d2i(x, NID_sbgp_ipAddrBlock, &i, NULL);
  ------------------
  |  | 1626|  11.0k|#define NID_sbgp_ipAddrBlock            290
  ------------------
  622|  11.0k|    if (x->rfc3779_addr == NULL && i != -1)
  ------------------
  |  Branch (622:9): [True: 11.0k, False: 0]
  |  Branch (622:36): [True: 0, False: 11.0k]
  ------------------
  623|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  624|  11.0k|    x->rfc3779_asid = X509_get_ext_d2i(x, NID_sbgp_autonomousSysNum, &i, NULL);
  ------------------
  |  | 1630|  11.0k|#define NID_sbgp_autonomousSysNum               291
  ------------------
  625|  11.0k|    if (x->rfc3779_asid == NULL && i != -1)
  ------------------
  |  Branch (625:9): [True: 11.0k, False: 0]
  |  Branch (625:36): [True: 0, False: 11.0k]
  ------------------
  626|      0|        x->ex_flags |= EXFLAG_INVALID;
  ------------------
  |  |  676|      0|#define EXFLAG_INVALID 0x80
  ------------------
  627|  11.0k|#endif
  628|  49.3k|    for (i = 0; i < X509_get_ext_count(x); i++) {
  ------------------
  |  Branch (628:17): [True: 38.2k, False: 11.0k]
  ------------------
  629|  38.2k|        X509_EXTENSION *ex = X509_get_ext(x, i);
  630|  38.2k|        int nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex));
  631|       |
  632|  38.2k|        if (nid == NID_freshest_crl)
  ------------------
  |  | 2805|  38.2k|#define NID_freshest_crl                857
  ------------------
  |  Branch (632:13): [True: 0, False: 38.2k]
  ------------------
  633|      0|            x->ex_flags |= EXFLAG_FRESHEST;
  ------------------
  |  |  683|      0|#define EXFLAG_FRESHEST 0x1000
  ------------------
  634|  38.2k|        if (!X509_EXTENSION_get_critical(ex))
  ------------------
  |  Branch (634:13): [True: 17.1k, False: 21.1k]
  ------------------
  635|  17.1k|            continue;
  636|  21.1k|        if (!X509_supported_extension(ex)) {
  ------------------
  |  Branch (636:13): [True: 0, False: 21.1k]
  ------------------
  637|      0|            x->ex_flags |= EXFLAG_CRITICAL;
  ------------------
  |  |  679|      0|#define EXFLAG_CRITICAL 0x200
  ------------------
  638|      0|            break;
  639|      0|        }
  640|  21.1k|        switch (nid) {
  641|  10.8k|        case NID_basic_constraints:
  ------------------
  |  | 2705|  10.8k|#define NID_basic_constraints           87
  ------------------
  |  Branch (641:9): [True: 10.8k, False: 10.2k]
  ------------------
  642|  10.8k|            x->ex_flags |= EXFLAG_BCONS_CRITICAL;
  ------------------
  |  |  686|  10.8k|#define EXFLAG_BCONS_CRITICAL 0x10000
  ------------------
  643|  10.8k|            break;
  644|      0|        case NID_authority_key_identifier:
  ------------------
  |  | 2765|      0|#define NID_authority_key_identifier            90
  ------------------
  |  Branch (644:9): [True: 0, False: 21.1k]
  ------------------
  645|      0|            x->ex_flags |= EXFLAG_AKID_CRITICAL;
  ------------------
  |  |  687|      0|#define EXFLAG_AKID_CRITICAL 0x20000
  ------------------
  646|      0|            break;
  647|      0|        case NID_subject_key_identifier:
  ------------------
  |  | 2680|      0|#define NID_subject_key_identifier              82
  ------------------
  |  Branch (647:9): [True: 0, False: 21.1k]
  ------------------
  648|      0|            x->ex_flags |= EXFLAG_SKID_CRITICAL;
  ------------------
  |  |  688|      0|#define EXFLAG_SKID_CRITICAL 0x40000
  ------------------
  649|      0|            break;
  650|      0|        case NID_subject_alt_name:
  ------------------
  |  | 2695|      0|#define NID_subject_alt_name            85
  ------------------
  |  Branch (650:9): [True: 0, False: 21.1k]
  ------------------
  651|      0|            x->ex_flags |= EXFLAG_SAN_CRITICAL;
  ------------------
  |  |  689|      0|#define EXFLAG_SAN_CRITICAL 0x80000
  ------------------
  652|      0|            break;
  653|  10.2k|        default:
  ------------------
  |  Branch (653:9): [True: 10.2k, False: 10.8k]
  ------------------
  654|  10.2k|            break;
  655|  21.1k|        }
  656|  21.1k|    }
  657|       |
  658|       |    /* Set x->siginf, ignoring errors due to unsupported algos */
  659|  11.0k|    (void)ossl_x509_init_sig_info(x);
  660|       |
  661|  11.0k|    x->ex_flags |= EXFLAG_SET; /* Indicate that cert has been processed */
  ------------------
  |  |  678|  11.0k|#define EXFLAG_SET 0x100
  ------------------
  662|  11.0k|#ifdef tsan_st_rel
  663|  11.0k|    tsan_st_rel((TSAN_QUALIFIER int *)&x->ex_cached, 1);
  ------------------
  |  |   65|  11.0k|#define tsan_st_rel(ptr, val) atomic_store_explicit((ptr), (val), memory_order_release)
  ------------------
  664|       |    /*
  665|       |     * Above store triggers fast lock-free check in the beginning of the
  666|       |     * function. But one has to ensure that the structure is "stable", i.e.
  667|       |     * all stores are visible on all processors. Hence the release fence.
  668|       |     */
  669|  11.0k|#endif
  670|  11.0k|    ERR_pop_to_mark();
  671|       |
  672|  11.0k|    if ((x->ex_flags & EXFLAG_INVALID) == 0) {
  ------------------
  |  |  676|  11.0k|#define EXFLAG_INVALID 0x80
  ------------------
  |  Branch (672:9): [True: 11.0k, False: 0]
  ------------------
  673|  11.0k|        CRYPTO_THREAD_unlock(x->lock);
  674|  11.0k|        return 1;
  675|  11.0k|    }
  676|      0|    CRYPTO_THREAD_unlock(x->lock);
  677|       |    ERR_raise(ERR_LIB_X509V3, X509V3_R_INVALID_CERTIFICATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  678|      0|    return 0;
  679|  11.0k|}
X509_check_akid:
 1041|  11.0k|{
 1042|  11.0k|    if (akid == NULL)
  ------------------
  |  Branch (1042:9): [True: 8.66k, False: 2.43k]
  ------------------
 1043|  8.66k|        return X509_V_OK;
  ------------------
  |  |  312|  8.66k|#define X509_V_OK 0
  ------------------
 1044|       |
 1045|       |    /* Check key ids (if present) */
 1046|  2.43k|    if (akid->keyid && issuer->skid && ASN1_OCTET_STRING_cmp(akid->keyid, issuer->skid))
  ------------------
  |  Branch (1046:9): [True: 2.43k, False: 0]
  |  Branch (1046:24): [True: 2.43k, False: 0]
  |  Branch (1046:40): [True: 0, False: 2.43k]
  ------------------
 1047|      0|        return X509_V_ERR_AKID_SKID_MISMATCH;
  ------------------
  |  |  344|      0|#define X509_V_ERR_AKID_SKID_MISMATCH 30
  ------------------
 1048|       |    /* Check serial number */
 1049|  2.43k|    if (akid->serial && ASN1_INTEGER_cmp(X509_get0_serialNumber(issuer), akid->serial))
  ------------------
  |  Branch (1049:9): [True: 380, False: 2.05k]
  |  Branch (1049:25): [True: 0, False: 380]
  ------------------
 1050|      0|        return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1051|       |    /* Check issuer name */
 1052|  2.43k|    if (akid->issuer) {
  ------------------
  |  Branch (1052:9): [True: 380, False: 2.05k]
  ------------------
 1053|       |        /*
 1054|       |         * Ugh, for some peculiar reason AKID includes SEQUENCE OF
 1055|       |         * GeneralName. So look for a DirName. There may be more than one but
 1056|       |         * we only take any notice of the first.
 1057|       |         */
 1058|    380|        GENERAL_NAMES *gens = akid->issuer;
 1059|    380|        GENERAL_NAME *gen;
 1060|    380|        X509_NAME *nm = NULL;
 1061|    380|        int i;
 1062|       |
 1063|    380|        for (i = 0; i < sk_GENERAL_NAME_num(gens); i++) {
  ------------------
  |  |  242|    380|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (1063:21): [True: 380, False: 0]
  ------------------
 1064|    380|            gen = sk_GENERAL_NAME_value(gens, i);
  ------------------
  |  |  243|    380|#define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
  ------------------
 1065|    380|            if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|    380|#define GEN_DIRNAME 4
  ------------------
  |  Branch (1065:17): [True: 380, False: 0]
  ------------------
 1066|    380|                nm = gen->d.dirn;
 1067|    380|                break;
 1068|    380|            }
 1069|    380|        }
 1070|    380|        if (nm != NULL && X509_NAME_cmp(nm, X509_get_issuer_name(issuer)) != 0)
  ------------------
  |  Branch (1070:13): [True: 380, False: 0]
  |  Branch (1070:27): [True: 0, False: 380]
  ------------------
 1071|      0|            return X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH;
  ------------------
  |  |  345|      0|#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
  ------------------
 1072|    380|    }
 1073|  2.43k|    return X509_V_OK;
  ------------------
  |  |  312|  2.43k|#define X509_V_OK 0
  ------------------
 1074|  2.43k|}
v3_purp.c:nid_cmp:
  302|  52.5k|{
  303|  52.5k|    return *a - *b;
  304|  52.5k|}
v3_purp.c:check_sig_alg_match:
  410|  11.0k|{
  411|  11.0k|    int subj_sig_nid;
  412|       |
  413|  11.0k|    if (issuer_key == NULL)
  ------------------
  |  Branch (413:9): [True: 0, False: 11.0k]
  ------------------
  414|      0|        return X509_V_ERR_NO_ISSUER_PUBLIC_KEY;
  ------------------
  |  |  336|      0|#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY 24
  ------------------
  415|  11.0k|    if (OBJ_find_sigid_algs(OBJ_obj2nid(subject->cert_info.signature.algorithm),
  ------------------
  |  Branch (415:9): [True: 0, False: 11.0k]
  ------------------
  416|  11.0k|            NULL, &subj_sig_nid)
  417|  11.0k|        == 0)
  418|      0|        return X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM;
  ------------------
  |  |  402|      0|#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM 76
  ------------------
  419|  11.0k|    if (EVP_PKEY_is_a(issuer_key, OBJ_nid2sn(subj_sig_nid))
  ------------------
  |  Branch (419:9): [True: 11.0k, False: 0]
  ------------------
  420|      0|        || (EVP_PKEY_is_a(issuer_key, "RSA") && subj_sig_nid == NID_rsassaPss))
  ------------------
  |  |  583|      0|#define NID_rsassaPss           912
  ------------------
  |  Branch (420:13): [True: 0, False: 0]
  |  Branch (420:49): [True: 0, False: 0]
  ------------------
  421|  11.0k|        return X509_V_OK;
  ------------------
  |  |  312|  11.0k|#define X509_V_OK 0
  ------------------
  422|      0|    return X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH;
  ------------------
  |  |  403|      0|#define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH 77
  ------------------
  423|  11.0k|}
v3_purp.c:setup_crldp:
  392|  11.0k|{
  393|  11.0k|    int i;
  394|       |
  395|  11.0k|    x->crldp = X509_get_ext_d2i(x, NID_crl_distribution_points, &i, NULL);
  ------------------
  |  | 2745|  11.0k|#define NID_crl_distribution_points             103
  ------------------
  396|  11.0k|    if (x->crldp == NULL && i != -1)
  ------------------
  |  Branch (396:9): [True: 10.2k, False: 836]
  |  Branch (396:29): [True: 0, False: 10.2k]
  ------------------
  397|      0|        return 0;
  398|       |
  399|  12.3k|    for (i = 0; i < sk_DIST_POINT_num(x->crldp); i++) {
  ------------------
  |  |  339|  12.3k|#define sk_DIST_POINT_num(sk) OPENSSL_sk_num(ossl_check_const_DIST_POINT_sk_type(sk))
  ------------------
  |  Branch (399:17): [True: 1.29k, False: 11.0k]
  ------------------
  400|  1.29k|        int res = setup_dp(x, sk_DIST_POINT_value(x->crldp, i));
  ------------------
  |  |  340|  1.29k|#define sk_DIST_POINT_value(sk, idx) ((DIST_POINT *)OPENSSL_sk_value(ossl_check_const_DIST_POINT_sk_type(sk), (idx)))
  ------------------
  401|       |
  402|  1.29k|        if (res < 1)
  ------------------
  |  Branch (402:13): [True: 0, False: 1.29k]
  ------------------
  403|      0|            return res;
  404|  1.29k|    }
  405|  11.0k|    return 1;
  406|  11.0k|}
v3_purp.c:setup_dp:
  350|  1.29k|{
  351|  1.29k|    const X509_NAME *iname = NULL;
  352|  1.29k|    int i;
  353|       |
  354|  1.29k|    if (dp->distpoint == NULL && sk_GENERAL_NAME_num(dp->CRLissuer) <= 0) {
  ------------------
  |  |  242|      0|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (354:9): [True: 0, False: 1.29k]
  |  Branch (354:34): [True: 0, False: 0]
  ------------------
  355|      0|        ERR_raise(ERR_LIB_X509, X509_R_INVALID_DISTPOINT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  356|      0|        return 0;
  357|      0|    }
  358|  1.29k|    if (dp->reasons != NULL) {
  ------------------
  |  Branch (358:9): [True: 0, False: 1.29k]
  ------------------
  359|      0|        if (dp->reasons->length > 0)
  ------------------
  |  Branch (359:13): [True: 0, False: 0]
  ------------------
  360|      0|            dp->dp_reasons = dp->reasons->data[0];
  361|      0|        if (dp->reasons->length > 1)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  ------------------
  362|      0|            dp->dp_reasons |= (dp->reasons->data[1] << 8);
  363|      0|        dp->dp_reasons &= CRLDP_ALL_REASONS;
  ------------------
  |  |  316|      0|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  364|  1.29k|    } else {
  365|  1.29k|        dp->dp_reasons = CRLDP_ALL_REASONS;
  ------------------
  |  |  316|  1.29k|#define CRLDP_ALL_REASONS 0x807f
  ------------------
  366|  1.29k|    }
  367|  1.29k|    if (dp->distpoint == NULL || dp->distpoint->type != 1)
  ------------------
  |  Branch (367:9): [True: 0, False: 1.29k]
  |  Branch (367:34): [True: 1.29k, False: 0]
  ------------------
  368|  1.29k|        return 1;
  369|       |
  370|       |    /* Handle name fragment given by nameRelativeToCRLIssuer */
  371|       |    /*
  372|       |     * Note that the below way of determining iname is not really compliant
  373|       |     * with https://tools.ietf.org/html/rfc5280#section-4.2.1.13
  374|       |     * According to it, sk_GENERAL_NAME_num(dp->CRLissuer) MUST be <= 1
  375|       |     * and any CRLissuer could be of type different to GEN_DIRNAME.
  376|       |     */
  377|      0|    for (i = 0; i < sk_GENERAL_NAME_num(dp->CRLissuer); i++) {
  ------------------
  |  |  242|      0|#define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
  ------------------
  |  Branch (377:17): [True: 0, False: 0]
  ------------------
  378|      0|        GENERAL_NAME *gen = sk_GENERAL_NAME_value(dp->CRLissuer, i);
  ------------------
  |  |  243|      0|#define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
  ------------------
  379|       |
  380|      0|        if (gen->type == GEN_DIRNAME) {
  ------------------
  |  |  180|      0|#define GEN_DIRNAME 4
  ------------------
  |  Branch (380:13): [True: 0, False: 0]
  ------------------
  381|      0|            iname = gen->d.directoryName;
  382|      0|            break;
  383|      0|        }
  384|      0|    }
  385|      0|    if (iname == NULL)
  ------------------
  |  Branch (385:9): [True: 0, False: 0]
  ------------------
  386|      0|        iname = X509_get_issuer_name(x);
  387|      0|    return DIST_POINT_set_dpname(dp->distpoint, iname) ? 1 : -1;
  ------------------
  |  Branch (387:12): [True: 0, False: 0]
  ------------------
  388|  1.29k|}

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

X509_subject_name_cmp:
   78|  13.8M|{
   79|  13.8M|    return X509_NAME_cmp(a->cert_info.subject, b->cert_info.subject);
   80|  13.8M|}
X509_get_issuer_name:
  101|  11.4k|{
  102|  11.4k|    return a->cert_info.issuer;
  103|  11.4k|}
X509_get_subject_name:
  118|  11.0k|{
  119|  11.0k|    return a->cert_info.subject;
  120|  11.0k|}
X509_get0_serialNumber:
  128|    380|{
  129|    380|    return &a->cert_info.serialNumber;
  130|    380|}
X509_cmp:
  153|  5.54k|{
  154|  5.54k|    int rv = 0;
  155|       |
  156|  5.54k|    if (a == b) /* for efficiency */
  ------------------
  |  Branch (156:9): [True: 0, False: 5.54k]
  ------------------
  157|      0|        return 0;
  158|       |
  159|       |    /* attempt to compute cert hash */
  160|  5.54k|    (void)X509_check_purpose((X509 *)a, -1, 0);
  161|  5.54k|    (void)X509_check_purpose((X509 *)b, -1, 0);
  162|       |
  163|  5.54k|    if ((a->ex_flags & EXFLAG_NO_FINGERPRINT) == 0
  ------------------
  |  |  690|  5.54k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (163:9): [True: 5.54k, False: 0]
  ------------------
  164|  5.54k|        && (b->ex_flags & EXFLAG_NO_FINGERPRINT) == 0)
  ------------------
  |  |  690|  5.54k|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (164:12): [True: 5.54k, False: 0]
  ------------------
  165|  5.54k|        rv = memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH);
  ------------------
  |  |   26|  5.54k|#define SHA_DIGEST_LENGTH 20
  ------------------
  166|  5.54k|    if (rv != 0)
  ------------------
  |  Branch (166:9): [True: 0, False: 5.54k]
  ------------------
  167|      0|        return rv < 0 ? -1 : 1;
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|       |
  169|       |    /* Check for match against stored encoding too */
  170|  5.54k|    if (!a->cert_info.enc.modified && !b->cert_info.enc.modified) {
  ------------------
  |  Branch (170:9): [True: 5.54k, False: 0]
  |  Branch (170:39): [True: 5.54k, False: 0]
  ------------------
  171|  5.54k|        if (a->cert_info.enc.len < b->cert_info.enc.len)
  ------------------
  |  Branch (171:13): [True: 0, False: 5.54k]
  ------------------
  172|      0|            return -1;
  173|  5.54k|        if (a->cert_info.enc.len > b->cert_info.enc.len)
  ------------------
  |  Branch (173:13): [True: 0, False: 5.54k]
  ------------------
  174|      0|            return 1;
  175|  5.54k|        rv = memcmp(a->cert_info.enc.enc,
  176|  5.54k|            b->cert_info.enc.enc, a->cert_info.enc.len);
  177|  5.54k|    }
  178|  5.54k|    return rv < 0 ? -1 : rv > 0;
  ------------------
  |  Branch (178:12): [True: 0, False: 5.54k]
  ------------------
  179|  5.54k|}
X509_NAME_cmp:
  256|  13.8M|{
  257|  13.8M|    int ret;
  258|       |
  259|  13.8M|    if (b == NULL)
  ------------------
  |  Branch (259:9): [True: 0, False: 13.8M]
  ------------------
  260|      0|        return a != NULL;
  261|  13.8M|    if (a == NULL)
  ------------------
  |  Branch (261:9): [True: 0, False: 13.8M]
  ------------------
  262|      0|        return -1;
  263|       |
  264|       |    /* Ensure canonical encoding is present and up to date */
  265|  13.8M|    if (a->canon_enc == NULL || a->modified) {
  ------------------
  |  Branch (265:9): [True: 0, False: 13.8M]
  |  Branch (265:33): [True: 0, False: 13.8M]
  ------------------
  266|      0|        ret = i2d_X509_NAME((X509_NAME *)a, NULL);
  267|      0|        if (ret < 0)
  ------------------
  |  Branch (267:13): [True: 0, False: 0]
  ------------------
  268|      0|            return -2;
  269|      0|    }
  270|       |
  271|  13.8M|    if (b->canon_enc == NULL || b->modified) {
  ------------------
  |  Branch (271:9): [True: 0, False: 13.8M]
  |  Branch (271:33): [True: 0, False: 13.8M]
  ------------------
  272|      0|        ret = i2d_X509_NAME((X509_NAME *)b, NULL);
  273|      0|        if (ret < 0)
  ------------------
  |  Branch (273:13): [True: 0, False: 0]
  ------------------
  274|      0|            return -2;
  275|      0|    }
  276|       |
  277|  13.8M|    ret = a->canon_enclen - b->canon_enclen;
  278|  13.8M|    if (ret == 0 && a->canon_enclen == 0)
  ------------------
  |  Branch (278:9): [True: 253k, False: 13.5M]
  |  Branch (278:21): [True: 0, False: 253k]
  ------------------
  279|      0|        return 0;
  280|       |
  281|  13.8M|    if (ret == 0) {
  ------------------
  |  Branch (281:9): [True: 253k, False: 13.5M]
  ------------------
  282|   253k|        if (a->canon_enc == NULL || b->canon_enc == NULL)
  ------------------
  |  Branch (282:13): [True: 0, False: 253k]
  |  Branch (282:37): [True: 0, False: 253k]
  ------------------
  283|      0|            return -2;
  284|   253k|        ret = memcmp(a->canon_enc, b->canon_enc, a->canon_enclen);
  285|   253k|    }
  286|       |
  287|  13.8M|    return ret < 0 ? -1 : ret > 0;
  ------------------
  |  Branch (287:12): [True: 6.04M, False: 7.80M]
  ------------------
  288|  13.8M|}
X509_get0_pubkey:
  379|  11.0k|{
  380|  11.0k|    if (x == NULL)
  ------------------
  |  Branch (380:9): [True: 0, False: 11.0k]
  ------------------
  381|      0|        return NULL;
  382|  11.0k|    return X509_PUBKEY_get0(x->cert_info.key);
  383|  11.0k|}

X509_STORE_load_file_ex:
   52|  1.37k|{
   53|  1.37k|    X509_LOOKUP *lookup;
   54|       |
   55|  1.37k|    if (file == NULL
  ------------------
  |  Branch (55:9): [True: 0, False: 1.37k]
  ------------------
   56|  1.37k|        || (lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_file())) == NULL
  ------------------
  |  Branch (56:12): [True: 0, False: 1.37k]
  ------------------
   57|  1.37k|        || X509_LOOKUP_load_file_ex(lookup, file, X509_FILETYPE_PEM, libctx,
  ------------------
  |  |  301|  1.37k|    X509_LOOKUP_ctrl_ex((x), X509_L_FILE_LOAD, (name), (long)(type), NULL, \
  |  |  ------------------
  |  |  |  |  283|  1.37k|#define X509_L_FILE_LOAD 1
  |  |  ------------------
  |  |  302|  1.37k|        (libctx), (propq))
  ------------------
  |  Branch (57:12): [True: 72, False: 1.30k]
  ------------------
   58|  1.37k|               propq)
   59|  1.37k|            <= 0)
   60|     72|        return 0;
   61|       |
   62|  1.30k|    return 1;
   63|  1.37k|}
X509_STORE_load_file:
   66|  1.37k|{
   67|  1.37k|    return X509_STORE_load_file_ex(ctx, file, NULL, NULL);
   68|  1.37k|}
X509_STORE_load_path:
   71|  1.30k|{
   72|  1.30k|    X509_LOOKUP *lookup;
   73|       |
   74|  1.30k|    if (path == NULL
  ------------------
  |  Branch (74:9): [True: 0, False: 1.30k]
  ------------------
   75|  1.30k|        || (lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir())) == NULL
  ------------------
  |  Branch (75:12): [True: 0, False: 1.30k]
  ------------------
   76|  1.30k|        || X509_LOOKUP_add_dir(lookup, path, X509_FILETYPE_PEM) <= 0)
  ------------------
  |  |  292|  1.30k|    X509_LOOKUP_ctrl((x), X509_L_ADD_DIR, (name), (long)(type), NULL)
  |  |  ------------------
  |  |  |  |  284|  1.30k|#define X509_L_ADD_DIR 2
  |  |  ------------------
  ------------------
  |  Branch (76:12): [True: 8, False: 1.29k]
  ------------------
   77|      8|        return 0;
   78|       |
   79|  1.29k|    return 1;
   80|  1.30k|}

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

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

X509_get_ext_count:
   79|  49.3k|{
   80|  49.3k|    return X509v3_get_ext_count(x->cert_info.extensions);
   81|  49.3k|}
X509_get_ext:
   99|  38.2k|{
  100|  38.2k|    return X509v3_get_ext(x->cert_info.extensions, loc);
  101|  38.2k|}
X509_get_ext_d2i:
  114|   133k|{
  115|   133k|    return X509V3_get_d2i(x->cert_info.extensions, nid, crit, idx);
  116|   133k|}

X509_LOOKUP_new:
   19|  2.58k|{
   20|  2.58k|    X509_LOOKUP *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.58k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   21|       |
   22|  2.58k|    if (ret == NULL)
  ------------------
  |  Branch (22:9): [True: 0, False: 2.58k]
  ------------------
   23|      0|        return NULL;
   24|       |
   25|  2.58k|    ret->method = method;
   26|  2.58k|    if (method->new_item != NULL && method->new_item(ret) == 0) {
  ------------------
  |  Branch (26:9): [True: 1.26k, False: 1.31k]
  |  Branch (26:37): [True: 0, False: 1.26k]
  ------------------
   27|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   28|      0|        return NULL;
   29|      0|    }
   30|  2.58k|    return ret;
   31|  2.58k|}
X509_LOOKUP_free:
   34|  2.58k|{
   35|  2.58k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 2.58k]
  ------------------
   36|      0|        return;
   37|  2.58k|    if ((ctx->method != NULL) && (ctx->method->free != NULL))
  ------------------
  |  Branch (37:9): [True: 2.58k, False: 0]
  |  Branch (37:34): [True: 1.26k, False: 1.31k]
  ------------------
   38|  1.26k|        (*ctx->method->free)(ctx);
   39|  2.58k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|  2.58k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   40|  2.58k|}
X509_STORE_lock:
   43|   190k|{
   44|   190k|    return CRYPTO_THREAD_write_lock(xs->lock);
   45|   190k|}
X509_STORE_unlock:
   53|   190k|{
   54|   190k|    return CRYPTO_THREAD_unlock(xs->lock);
   55|   190k|}
X509_LOOKUP_shutdown:
   68|  2.58k|{
   69|  2.58k|    if (ctx->method == NULL)
  ------------------
  |  Branch (69:9): [True: 0, False: 2.58k]
  ------------------
   70|      0|        return 0;
   71|  2.58k|    if (ctx->method->shutdown != NULL)
  ------------------
  |  Branch (71:9): [True: 0, False: 2.58k]
  ------------------
   72|      0|        return ctx->method->shutdown(ctx);
   73|  2.58k|    else
   74|  2.58k|        return 1;
   75|  2.58k|}
X509_LOOKUP_ctrl_ex:
   79|  2.68k|{
   80|  2.68k|    if (ctx->method == NULL)
  ------------------
  |  Branch (80:9): [True: 0, False: 2.68k]
  ------------------
   81|      0|        return -1;
   82|  2.68k|    if (ctx->method->ctrl_ex != NULL)
  ------------------
  |  Branch (82:9): [True: 1.37k, False: 1.30k]
  ------------------
   83|  1.37k|        return ctx->method->ctrl_ex(ctx, cmd, argc, argl, ret, libctx, propq);
   84|  1.30k|    if (ctx->method->ctrl != NULL)
  ------------------
  |  Branch (84:9): [True: 1.30k, False: 0]
  ------------------
   85|  1.30k|        return ctx->method->ctrl(ctx, cmd, argc, argl, ret);
   86|      0|    return 1;
   87|  1.30k|}
X509_LOOKUP_ctrl:
   91|  1.30k|{
   92|  1.30k|    return X509_LOOKUP_ctrl_ex(ctx, cmd, argc, argl, ret, NULL, NULL);
   93|  1.30k|}
X509_STORE_new:
  183|  2.09k|{
  184|  2.09k|    X509_STORE *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.09k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  185|       |
  186|  2.09k|    if (ret == NULL)
  ------------------
  |  Branch (186:9): [True: 0, False: 2.09k]
  ------------------
  187|      0|        return NULL;
  188|  2.09k|    if ((ret->objs = sk_X509_OBJECT_new(x509_object_cmp)) == NULL) {
  ------------------
  |  |  103|  2.09k|#define sk_X509_OBJECT_new(cmp) ((STACK_OF(X509_OBJECT) *)OPENSSL_sk_new(ossl_check_X509_OBJECT_compfunc_type(cmp)))
  ------------------
  |  Branch (188:9): [True: 0, False: 2.09k]
  ------------------
  189|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  190|      0|        goto err;
  191|      0|    }
  192|  2.09k|    ret->cache = 1;
  193|  2.09k|    if ((ret->get_cert_methods = sk_X509_LOOKUP_new_null()) == NULL) {
  ------------------
  |  |   78|  2.09k|#define sk_X509_LOOKUP_new_null() ((STACK_OF(X509_LOOKUP) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (193:9): [True: 0, False: 2.09k]
  ------------------
  194|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  195|      0|        goto err;
  196|      0|    }
  197|       |
  198|  2.09k|    if ((ret->param = X509_VERIFY_PARAM_new()) == NULL) {
  ------------------
  |  Branch (198:9): [True: 0, False: 2.09k]
  ------------------
  199|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  200|      0|        goto err;
  201|      0|    }
  202|  2.09k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data)) {
  ------------------
  |  |  254|  2.09k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  |  Branch (202:9): [True: 0, False: 2.09k]
  ------------------
  203|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  204|      0|        goto err;
  205|      0|    }
  206|       |
  207|  2.09k|    ret->lock = CRYPTO_THREAD_lock_new();
  208|  2.09k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (208:9): [True: 0, False: 2.09k]
  ------------------
  209|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  210|      0|        goto err;
  211|      0|    }
  212|       |
  213|  2.09k|    if (!CRYPTO_NEW_REF(&ret->references, 1))
  ------------------
  |  Branch (213:9): [True: 0, False: 2.09k]
  ------------------
  214|      0|        goto err;
  215|  2.09k|    return ret;
  216|       |
  217|      0|err:
  218|      0|    X509_VERIFY_PARAM_free(ret->param);
  219|      0|    sk_X509_OBJECT_free(ret->objs);
  ------------------
  |  |  107|      0|#define sk_X509_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_X509_OBJECT_sk_type(sk))
  ------------------
  220|      0|    sk_X509_LOOKUP_free(ret->get_cert_methods);
  ------------------
  |  |   81|      0|#define sk_X509_LOOKUP_free(sk) OPENSSL_sk_free(ossl_check_X509_LOOKUP_sk_type(sk))
  ------------------
  221|      0|    CRYPTO_THREAD_lock_free(ret->lock);
  222|      0|    OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  223|       |    return NULL;
  224|  2.09k|}
X509_STORE_free:
  227|  8.91k|{
  228|  8.91k|    int i;
  229|  8.91k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  8.91k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  230|  8.91k|    X509_LOOKUP *lu;
  231|       |
  232|  8.91k|    if (xs == NULL)
  ------------------
  |  Branch (232:9): [True: 6.81k, False: 2.09k]
  ------------------
  233|  6.81k|        return;
  234|  2.09k|    CRYPTO_DOWN_REF(&xs->references, &i);
  235|  2.09k|    REF_PRINT_COUNT("X509_STORE", i, xs);
  ------------------
  |  |  301|  2.09k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  2.09k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  2.09k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  2.09k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|  2.09k|    if (i > 0)
  ------------------
  |  Branch (236:9): [True: 0, False: 2.09k]
  ------------------
  237|      0|        return;
  238|  2.09k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.09k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
  239|       |
  240|  2.09k|    sk = xs->get_cert_methods;
  241|  4.67k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  4.67k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (241:17): [True: 2.58k, False: 2.09k]
  ------------------
  242|  2.58k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  2.58k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  243|  2.58k|        X509_LOOKUP_shutdown(lu);
  244|  2.58k|        X509_LOOKUP_free(lu);
  245|  2.58k|    }
  246|  2.09k|    sk_X509_LOOKUP_free(sk);
  ------------------
  |  |   81|  2.09k|#define sk_X509_LOOKUP_free(sk) OPENSSL_sk_free(ossl_check_X509_LOOKUP_sk_type(sk))
  ------------------
  247|  2.09k|    sk_X509_OBJECT_pop_free(xs->objs, X509_OBJECT_free);
  ------------------
  |  |  115|  2.09k|#define sk_X509_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_freefunc_type(freefunc))
  ------------------
  248|       |
  249|  2.09k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, xs, &xs->ex_data);
  ------------------
  |  |  254|  2.09k|#define CRYPTO_EX_INDEX_X509_STORE 4
  ------------------
  250|  2.09k|    X509_VERIFY_PARAM_free(xs->param);
  251|  2.09k|    CRYPTO_THREAD_lock_free(xs->lock);
  252|  2.09k|    CRYPTO_FREE_REF(&xs->references);
  253|  2.09k|    OPENSSL_free(xs);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  254|  2.09k|}
X509_STORE_add_lookup:
  269|  2.76k|{
  270|  2.76k|    int i;
  271|  2.76k|    STACK_OF(X509_LOOKUP) *sk;
  ------------------
  |  |   33|  2.76k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  272|  2.76k|    X509_LOOKUP *lu;
  273|       |
  274|  2.76k|    sk = xs->get_cert_methods;
  275|  4.06k|    for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
  ------------------
  |  |   75|  4.06k|#define sk_X509_LOOKUP_num(sk) OPENSSL_sk_num(ossl_check_const_X509_LOOKUP_sk_type(sk))
  ------------------
  |  Branch (275:17): [True: 1.48k, False: 2.58k]
  ------------------
  276|  1.48k|        lu = sk_X509_LOOKUP_value(sk, i);
  ------------------
  |  |   76|  1.48k|#define sk_X509_LOOKUP_value(sk, idx) ((X509_LOOKUP *)OPENSSL_sk_value(ossl_check_const_X509_LOOKUP_sk_type(sk), (idx)))
  ------------------
  277|  1.48k|        if (m == lu->method) {
  ------------------
  |  Branch (277:13): [True: 183, False: 1.30k]
  ------------------
  278|    183|            return lu;
  279|    183|        }
  280|  1.48k|    }
  281|       |    /* a new one */
  282|  2.58k|    lu = X509_LOOKUP_new(m);
  283|  2.58k|    if (lu == NULL) {
  ------------------
  |  Branch (283:9): [True: 0, False: 2.58k]
  ------------------
  284|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|        return NULL;
  286|      0|    }
  287|       |
  288|  2.58k|    lu->store_ctx = xs;
  289|  2.58k|    if (sk_X509_LOOKUP_push(xs->get_cert_methods, lu))
  ------------------
  |  |   85|  2.58k|#define sk_X509_LOOKUP_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_LOOKUP_sk_type(sk), ossl_check_X509_LOOKUP_type(ptr))
  |  |  ------------------
  |  |  |  Branch (85:38): [True: 2.58k, False: 0]
  |  |  ------------------
  ------------------
  290|  2.58k|        return lu;
  291|       |    /* sk_X509_LOOKUP_push() failed */
  292|  2.58k|    ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  293|      0|    X509_LOOKUP_free(lu);
  294|       |    return NULL;
  295|  2.58k|}
X509_STORE_add_cert:
  430|   190k|{
  431|   190k|    if (!x509_store_add(xs, x, 0)) {
  ------------------
  |  Branch (431:9): [True: 0, False: 190k]
  ------------------
  432|      0|        ERR_raise(ERR_LIB_X509, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  433|      0|        return 0;
  434|      0|    }
  435|   190k|    return 1;
  436|   190k|}
X509_OBJECT_up_ref_count:
  448|   190k|{
  449|   190k|    switch (a->type) {
  ------------------
  |  Branch (449:13): [True: 190k, False: 0]
  ------------------
  450|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (450:5): [True: 0, False: 190k]
  ------------------
  451|      0|        break;
  452|   190k|    case X509_LU_X509:
  ------------------
  |  Branch (452:5): [True: 190k, False: 0]
  ------------------
  453|   190k|        return X509_up_ref(a->data.x509);
  454|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (454:5): [True: 0, False: 190k]
  ------------------
  455|      0|        return X509_CRL_up_ref(a->data.crl);
  456|   190k|    }
  457|      0|    return 1;
  458|   190k|}
X509_OBJECT_new:
  480|   190k|{
  481|   190k|    X509_OBJECT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  482|       |
  483|   190k|    if (ret == NULL)
  ------------------
  |  Branch (483:9): [True: 0, False: 190k]
  ------------------
  484|      0|        return NULL;
  485|   190k|    ret->type = X509_LU_NONE;
  486|   190k|    return ret;
  487|   190k|}
X509_OBJECT_free:
  528|   190k|{
  529|   190k|    x509_object_free_internal(a);
  530|   190k|    OPENSSL_free(a);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  531|   190k|}
X509_OBJECT_retrieve_match:
  751|   190k|{
  752|   190k|    int idx, i, num;
  753|   190k|    X509_OBJECT *obj;
  754|       |
  755|   190k|    idx = sk_X509_OBJECT_find(h, x);
  ------------------
  |  |  118|   190k|#define sk_X509_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  756|   190k|    if (idx < 0)
  ------------------
  |  Branch (756:9): [True: 185k, False: 5.54k]
  ------------------
  757|   185k|        return NULL;
  758|  5.54k|    if ((x->type != X509_LU_X509) && (x->type != X509_LU_CRL))
  ------------------
  |  Branch (758:9): [True: 0, False: 5.54k]
  |  Branch (758:38): [True: 0, False: 0]
  ------------------
  759|      0|        return sk_X509_OBJECT_value(h, idx);
  ------------------
  |  |  102|      0|#define sk_X509_OBJECT_value(sk, idx) ((X509_OBJECT *)OPENSSL_sk_value(ossl_check_const_X509_OBJECT_sk_type(sk), (idx)))
  ------------------
  760|  5.54k|    for (i = idx, num = sk_X509_OBJECT_num(h); i < num; i++) {
  ------------------
  |  |  101|  5.54k|#define sk_X509_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_X509_OBJECT_sk_type(sk))
  ------------------
  |  Branch (760:48): [True: 5.54k, False: 0]
  ------------------
  761|  5.54k|        obj = sk_X509_OBJECT_value(h, i);
  ------------------
  |  |  102|  5.54k|#define sk_X509_OBJECT_value(sk, idx) ((X509_OBJECT *)OPENSSL_sk_value(ossl_check_const_X509_OBJECT_sk_type(sk), (idx)))
  ------------------
  762|  5.54k|        if (x509_object_cmp((const X509_OBJECT **)&obj,
  ------------------
  |  Branch (762:13): [True: 0, False: 5.54k]
  ------------------
  763|  5.54k|                (const X509_OBJECT **)&x))
  764|      0|            return NULL;
  765|  5.54k|        if (x->type == X509_LU_X509) {
  ------------------
  |  Branch (765:13): [True: 5.54k, False: 0]
  ------------------
  766|  5.54k|            if (!X509_cmp(obj->data.x509, x->data.x509))
  ------------------
  |  Branch (766:17): [True: 5.54k, False: 0]
  ------------------
  767|  5.54k|                return obj;
  768|  5.54k|        } else if (x->type == X509_LU_CRL) {
  ------------------
  |  Branch (768:20): [True: 0, False: 0]
  ------------------
  769|      0|            if (X509_CRL_match(obj->data.crl, x->data.crl) == 0)
  ------------------
  |  Branch (769:17): [True: 0, False: 0]
  ------------------
  770|      0|                return obj;
  771|      0|        } else {
  772|      0|            return obj;
  773|      0|        }
  774|  5.54k|    }
  775|      0|    return NULL;
  776|  5.54k|}
X509_STORE_set_flags:
  779|  1.22k|{
  780|  1.22k|    return X509_VERIFY_PARAM_set_flags(xs->param, flags);
  781|  1.22k|}
x509_lu.c:x509_object_cmp:
  162|  13.8M|{
  163|  13.8M|    int ret;
  164|       |
  165|  13.8M|    ret = ((*a)->type - (*b)->type);
  166|  13.8M|    if (ret)
  ------------------
  |  Branch (166:9): [True: 0, False: 13.8M]
  ------------------
  167|      0|        return ret;
  168|  13.8M|    switch ((*a)->type) {
  ------------------
  |  Branch (168:13): [True: 13.8M, False: 0]
  ------------------
  169|  13.8M|    case X509_LU_X509:
  ------------------
  |  Branch (169:5): [True: 13.8M, False: 0]
  ------------------
  170|  13.8M|        ret = X509_subject_name_cmp((*a)->data.x509, (*b)->data.x509);
  171|  13.8M|        break;
  172|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (172:5): [True: 0, False: 13.8M]
  ------------------
  173|      0|        ret = X509_CRL_cmp((*a)->data.crl, (*b)->data.crl);
  174|      0|        break;
  175|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (175:5): [True: 0, False: 13.8M]
  ------------------
  176|       |        /* abort(); */
  177|      0|        return 0;
  178|  13.8M|    }
  179|  13.8M|    return ret;
  180|  13.8M|}
x509_lu.c:x509_store_add:
  387|   190k|{
  388|   190k|    X509_OBJECT *obj;
  389|   190k|    int ret = 0, added = 0;
  390|       |
  391|   190k|    if (x == NULL)
  ------------------
  |  Branch (391:9): [True: 0, False: 190k]
  ------------------
  392|      0|        return 0;
  393|   190k|    obj = X509_OBJECT_new();
  394|   190k|    if (obj == NULL)
  ------------------
  |  Branch (394:9): [True: 0, False: 190k]
  ------------------
  395|      0|        return 0;
  396|       |
  397|   190k|    if (crl) {
  ------------------
  |  Branch (397:9): [True: 0, False: 190k]
  ------------------
  398|      0|        obj->type = X509_LU_CRL;
  399|      0|        obj->data.crl = (X509_CRL *)x;
  400|   190k|    } else {
  401|   190k|        obj->type = X509_LU_X509;
  402|   190k|        obj->data.x509 = (X509 *)x;
  403|   190k|    }
  404|   190k|    if (!X509_OBJECT_up_ref_count(obj)) {
  ------------------
  |  Branch (404:9): [True: 0, False: 190k]
  ------------------
  405|      0|        obj->type = X509_LU_NONE;
  406|      0|        X509_OBJECT_free(obj);
  407|      0|        return 0;
  408|      0|    }
  409|       |
  410|   190k|    if (!X509_STORE_lock(store)) {
  ------------------
  |  Branch (410:9): [True: 0, False: 190k]
  ------------------
  411|      0|        X509_OBJECT_free(obj);
  412|      0|        return 0;
  413|      0|    }
  414|       |
  415|   190k|    if (X509_OBJECT_retrieve_match(store->objs, obj)) {
  ------------------
  |  Branch (415:9): [True: 5.54k, False: 185k]
  ------------------
  416|  5.54k|        ret = 1;
  417|   185k|    } else {
  418|   185k|        added = sk_X509_OBJECT_push(store->objs, obj);
  ------------------
  |  |  111|   185k|#define sk_X509_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_OBJECT_sk_type(sk), ossl_check_X509_OBJECT_type(ptr))
  ------------------
  419|   185k|        ret = added != 0;
  420|   185k|    }
  421|   190k|    X509_STORE_unlock(store);
  422|       |
  423|   190k|    if (added == 0) /* obj not pushed */
  ------------------
  |  Branch (423:9): [True: 5.54k, False: 185k]
  ------------------
  424|  5.54k|        X509_OBJECT_free(obj);
  425|       |
  426|   190k|    return ret;
  427|   190k|}
x509_lu.c:x509_object_free_internal:
  490|   190k|{
  491|   190k|    if (a == NULL)
  ------------------
  |  Branch (491:9): [True: 0, False: 190k]
  ------------------
  492|      0|        return;
  493|   190k|    switch (a->type) {
  ------------------
  |  Branch (493:13): [True: 190k, False: 0]
  ------------------
  494|      0|    case X509_LU_NONE:
  ------------------
  |  Branch (494:5): [True: 0, False: 190k]
  ------------------
  495|      0|        break;
  496|   190k|    case X509_LU_X509:
  ------------------
  |  Branch (496:5): [True: 190k, False: 0]
  ------------------
  497|   190k|        X509_free(a->data.x509);
  498|   190k|        break;
  499|      0|    case X509_LU_CRL:
  ------------------
  |  Branch (499:5): [True: 0, False: 190k]
  ------------------
  500|      0|        X509_CRL_free(a->data.crl);
  501|      0|        break;
  502|   190k|    }
  503|   190k|}

X509_up_ref:
  121|   190k|{
  122|   190k|    int i;
  123|       |
  124|   190k|    if (CRYPTO_UP_REF(&x->references, &i) <= 0)
  ------------------
  |  Branch (124:9): [True: 0, False: 190k]
  ------------------
  125|      0|        return 0;
  126|       |
  127|   190k|    REF_PRINT_COUNT("X509", i, x);
  ------------------
  |  |  301|   190k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|   190k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|   190k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|   190k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  128|   190k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|   190k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 190k]
  |  |  ------------------
  ------------------
  129|   190k|    return i > 1;
  130|   190k|}
X509_get_version:
  133|  11.0k|{
  134|  11.0k|    return ASN1_INTEGER_get(x->cert_info.version);
  135|  11.0k|}
ossl_x509_init_sig_info:
  306|  11.0k|{
  307|  11.0k|    return x509_sig_info_init(&x->siginf, &x->sig_alg, &x->signature,
  308|  11.0k|        X509_PUBKEY_get0(x->cert_info.key));
  309|  11.0k|}
x509_set.c:x509_sig_info_init:
  219|  11.0k|{
  220|  11.0k|    int pknid, mdnid, md_size;
  221|  11.0k|    const EVP_MD *md;
  222|  11.0k|    const EVP_PKEY_ASN1_METHOD *ameth;
  223|       |
  224|  11.0k|    siginf->mdnid = NID_undef;
  ------------------
  |  |   18|  11.0k|#define NID_undef                       0
  ------------------
  225|  11.0k|    siginf->pknid = NID_undef;
  ------------------
  |  |   18|  11.0k|#define NID_undef                       0
  ------------------
  226|  11.0k|    siginf->secbits = -1;
  227|  11.0k|    siginf->flags = 0;
  228|  11.0k|    if (!OBJ_find_sigid_algs(OBJ_obj2nid(alg->algorithm), &mdnid, &pknid)
  ------------------
  |  Branch (228:9): [True: 0, False: 11.0k]
  ------------------
  229|  11.0k|        || pknid == NID_undef) {
  ------------------
  |  |   18|  11.0k|#define NID_undef                       0
  ------------------
  |  Branch (229:12): [True: 0, False: 11.0k]
  ------------------
  230|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNKNOWN_SIGID_ALGS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  231|      0|        return 0;
  232|      0|    }
  233|  11.0k|    siginf->mdnid = mdnid;
  234|  11.0k|    siginf->pknid = pknid;
  235|       |
  236|  11.0k|    switch (mdnid) {
  237|      0|    case NID_undef:
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (237:5): [True: 0, False: 11.0k]
  ------------------
  238|       |        /* If we have one, use a custom handler for this algorithm */
  239|      0|        ameth = EVP_PKEY_asn1_find(NULL, pknid);
  240|      0|        if (ameth != NULL && ameth->siginf_set != NULL
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  |  Branch (240:30): [True: 0, False: 0]
  ------------------
  241|      0|            && ameth->siginf_set(siginf, alg, sig))
  ------------------
  |  Branch (241:16): [True: 0, False: 0]
  ------------------
  242|      0|            break;
  243|      0|        if (pubkey != NULL) {
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|            int secbits;
  245|       |
  246|      0|            secbits = EVP_PKEY_get_security_bits(pubkey);
  247|      0|            if (secbits != 0) {
  ------------------
  |  Branch (247:17): [True: 0, False: 0]
  ------------------
  248|      0|                siginf->secbits = secbits;
  249|      0|                break;
  250|      0|            }
  251|      0|        }
  252|      0|        ERR_raise(ERR_LIB_X509, X509_R_ERROR_USING_SIGINF_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  253|      0|        return 0;
  254|       |        /*
  255|       |         * SHA1 and MD5 are known to be broken. Reduce security bits so that
  256|       |         * they're no longer accepted at security level 1.
  257|       |         * The real values don't really matter as long as they're lower than 80,
  258|       |         * which is our security level 1.
  259|       |         */
  260|  2.12k|    case NID_sha1:
  ------------------
  |  | 2344|  2.12k|#define NID_sha1                64
  ------------------
  |  Branch (260:5): [True: 2.12k, False: 8.96k]
  ------------------
  261|       |        /*
  262|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack
  263|       |         * for SHA1 at2^63.4
  264|       |         */
  265|  2.12k|        siginf->secbits = 63;
  266|  2.12k|        break;
  267|      0|    case NID_md5:
  ------------------
  |  | 1238|      0|#define NID_md5         4
  ------------------
  |  Branch (267:5): [True: 0, False: 11.0k]
  ------------------
  268|       |        /*
  269|       |         * https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf
  270|       |         * puts a chosen-prefix attack for MD5 at 2^39.
  271|       |         */
  272|      0|        siginf->secbits = 39;
  273|      0|        break;
  274|      0|    case NID_id_GostR3411_94:
  ------------------
  |  | 4569|      0|#define NID_id_GostR3411_94             809
  ------------------
  |  Branch (274:5): [True: 0, False: 11.0k]
  ------------------
  275|       |        /*
  276|       |         * There is a collision attack on GOST R 34.11-94 at 2^105, see
  277|       |         * https://link.springer.com/chapter/10.1007%2F978-3-540-85174-5_10
  278|       |         */
  279|      0|        siginf->secbits = 105;
  280|      0|        break;
  281|  8.96k|    default:
  ------------------
  |  Branch (281:5): [True: 8.96k, False: 2.12k]
  ------------------
  282|       |        /* Security bits: half number of bits in digest */
  283|  8.96k|        if ((md = EVP_get_digestbynid(mdnid)) == NULL) {
  ------------------
  |  |  547|  8.96k|#define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))
  ------------------
  |  Branch (283:13): [True: 0, False: 8.96k]
  ------------------
  284|      0|            ERR_raise(ERR_LIB_X509, X509_R_ERROR_GETTING_MD_BY_NID);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  285|      0|            return 0;
  286|      0|        }
  287|  8.96k|        md_size = EVP_MD_get_size(md);
  288|  8.96k|        if (md_size <= 0)
  ------------------
  |  Branch (288:13): [True: 0, False: 8.96k]
  ------------------
  289|      0|            return 0;
  290|  8.96k|        siginf->secbits = md_size * 4;
  291|  8.96k|        break;
  292|  11.0k|    }
  293|  11.0k|    switch (mdnid) {
  ------------------
  |  Branch (293:13): [True: 11.0k, False: 0]
  ------------------
  294|  2.12k|    case NID_sha1:
  ------------------
  |  | 2344|  2.12k|#define NID_sha1                64
  ------------------
  |  Branch (294:5): [True: 2.12k, False: 8.96k]
  ------------------
  295|  7.22k|    case NID_sha256:
  ------------------
  |  | 3287|  7.22k|#define NID_sha256              672
  ------------------
  |  Branch (295:5): [True: 5.09k, False: 6.00k]
  ------------------
  296|  10.9k|    case NID_sha384:
  ------------------
  |  | 3292|  10.9k|#define NID_sha384              673
  ------------------
  |  Branch (296:5): [True: 3.72k, False: 7.37k]
  ------------------
  297|  11.0k|    case NID_sha512:
  ------------------
  |  | 3297|  11.0k|#define NID_sha512              674
  ------------------
  |  Branch (297:5): [True: 152, False: 10.9k]
  ------------------
  298|  11.0k|        siginf->flags |= X509_SIG_INFO_TLS;
  ------------------
  |  |  166|  11.0k|#define X509_SIG_INFO_TLS 0x2
  ------------------
  299|  11.0k|    }
  300|  11.0k|    siginf->flags |= X509_SIG_INFO_VALID;
  ------------------
  |  |  164|  11.0k|#define X509_SIG_INFO_VALID 0x1
  ------------------
  301|  11.0k|    return 1;
  302|  11.0k|}

X509v3_get_ext_count:
   21|  49.3k|{
   22|  49.3k|    int ret;
   23|       |
   24|  49.3k|    if (x == NULL)
  ------------------
  |  Branch (24:9): [True: 0, False: 49.3k]
  ------------------
   25|      0|        return 0;
   26|  49.3k|    ret = sk_X509_EXTENSION_num(x);
  ------------------
  |  |  242|  49.3k|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
   27|  49.3k|    return ret > 0 ? ret : 0;
  ------------------
  |  Branch (27:12): [True: 49.3k, False: 0]
  ------------------
   28|  49.3k|}
X509v3_get_ext:
   84|  38.2k|{
   85|  38.2k|    if (x == NULL || sk_X509_EXTENSION_num(x) <= loc || loc < 0)
  ------------------
  |  |  242|  38.2k|#define sk_X509_EXTENSION_num(sk) OPENSSL_sk_num(ossl_check_const_X509_EXTENSION_sk_type(sk))
  ------------------
  |  Branch (85:9): [True: 0, False: 38.2k]
  |  Branch (85:22): [True: 0, False: 38.2k]
  |  Branch (85:57): [True: 0, False: 38.2k]
  ------------------
   86|      0|        return NULL;
   87|  38.2k|    else
   88|  38.2k|        return sk_X509_EXTENSION_value(x, loc);
  ------------------
  |  |  243|  38.2k|#define sk_X509_EXTENSION_value(sk, idx) ((X509_EXTENSION *)OPENSSL_sk_value(ossl_check_const_X509_EXTENSION_sk_type(sk), (idx)))
  ------------------
   89|  38.2k|}
X509_EXTENSION_get_object:
  253|   554k|{
  254|   554k|    if (ex == NULL)
  ------------------
  |  Branch (254:9): [True: 0, False: 554k]
  ------------------
  255|      0|        return NULL;
  256|   554k|    return ex->object;
  257|   554k|}
X509_EXTENSION_get_data:
  260|  36.5k|{
  261|  36.5k|    if (ex == NULL)
  ------------------
  |  Branch (261:9): [True: 0, False: 36.5k]
  ------------------
  262|      0|        return NULL;
  263|  36.5k|    return &ex->value;
  264|  36.5k|}
X509_EXTENSION_get_critical:
  267|  74.7k|{
  268|  74.7k|    if (ex == NULL)
  ------------------
  |  Branch (268:9): [True: 0, False: 74.7k]
  ------------------
  269|      0|        return 0;
  270|  74.7k|    if (ex->critical > 0)
  ------------------
  |  Branch (270:9): [True: 42.2k, False: 32.5k]
  ------------------
  271|  42.2k|        return 1;
  272|  32.5k|    return 0;
  273|  74.7k|}

X509_VERIFY_PARAM_new:
   82|  5.47k|{
   83|  5.47k|    X509_VERIFY_PARAM *param;
   84|       |
   85|  5.47k|    param = OPENSSL_zalloc(sizeof(*param));
  ------------------
  |  |  108|  5.47k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   86|  5.47k|    if (param == NULL)
  ------------------
  |  Branch (86:9): [True: 0, False: 5.47k]
  ------------------
   87|      0|        return NULL;
   88|  5.47k|    param->trust = X509_TRUST_DEFAULT;
  ------------------
  |  |  195|  5.47k|#define X509_TRUST_DEFAULT 0 /* Only valid in purpose settings */
  ------------------
   89|       |    /* param->inh_flags = X509_VP_FLAG_DEFAULT; */
   90|  5.47k|    param->depth = -1;
   91|  5.47k|    param->auth_level = -1; /* -1 means unset, 0 is explicit */
   92|  5.47k|    return param;
   93|  5.47k|}
X509_VERIFY_PARAM_free:
   96|  5.50k|{
   97|  5.50k|    if (param == NULL)
  ------------------
  |  Branch (97:9): [True: 28, False: 5.47k]
  ------------------
   98|     28|        return;
   99|  5.47k|    sk_ASN1_OBJECT_pop_free(param->policies, ASN1_OBJECT_free);
  ------------------
  |  |  636|  5.47k|#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
  ------------------
  100|  5.47k|    sk_OPENSSL_STRING_pop_free(param->hosts, str_free);
  ------------------
  |  |  246|  5.47k|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
  101|  5.47k|    OPENSSL_free(param->peername);
  ------------------
  |  |  131|  5.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  102|  5.47k|    OPENSSL_free(param->email);
  ------------------
  |  |  131|  5.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  103|  5.47k|    OPENSSL_free(param->ip);
  ------------------
  |  |  131|  5.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  104|  5.47k|    OPENSSL_free(param);
  ------------------
  |  |  131|  5.47k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  105|  5.47k|}
X509_VERIFY_PARAM_inherit:
  152|  1.31k|{
  153|  1.31k|    unsigned long inh_flags;
  154|  1.31k|    int to_default, to_overwrite;
  155|       |
  156|  1.31k|    if (src == NULL)
  ------------------
  |  Branch (156:9): [True: 0, False: 1.31k]
  ------------------
  157|      0|        return 1;
  158|  1.31k|    inh_flags = dest->inh_flags | src->inh_flags;
  159|       |
  160|  1.31k|    if ((inh_flags & X509_VP_FLAG_ONCE) != 0)
  ------------------
  |  |  493|  1.31k|#define X509_VP_FLAG_ONCE 0x10
  ------------------
  |  Branch (160:9): [True: 0, False: 1.31k]
  ------------------
  161|      0|        dest->inh_flags = 0;
  162|       |
  163|  1.31k|    if ((inh_flags & X509_VP_FLAG_LOCKED) != 0)
  ------------------
  |  |  492|  1.31k|#define X509_VP_FLAG_LOCKED 0x8
  ------------------
  |  Branch (163:9): [True: 0, False: 1.31k]
  ------------------
  164|      0|        return 1;
  165|       |
  166|  1.31k|    to_default = (inh_flags & X509_VP_FLAG_DEFAULT) != 0;
  ------------------
  |  |  489|  1.31k|#define X509_VP_FLAG_DEFAULT 0x1
  ------------------
  167|  1.31k|    to_overwrite = (inh_flags & X509_VP_FLAG_OVERWRITE) != 0;
  ------------------
  |  |  490|  1.31k|#define X509_VP_FLAG_OVERWRITE 0x2
  ------------------
  168|       |
  169|  1.31k|    x509_verify_param_copy(purpose, 0);
  ------------------
  |  |  147|  1.31k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.31k|        dest->field = src->field;
  ------------------
  170|  1.31k|    x509_verify_param_copy(trust, X509_TRUST_DEFAULT);
  ------------------
  |  |  147|  1.31k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.31k|        dest->field = src->field;
  ------------------
  171|  1.31k|    x509_verify_param_copy(depth, -1);
  ------------------
  |  |  147|  1.31k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.31k|        dest->field = src->field;
  ------------------
  172|  1.31k|    x509_verify_param_copy(auth_level, -1);
  ------------------
  |  |  147|  1.31k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.31k|        dest->field = src->field;
  ------------------
  173|       |
  174|       |    /* If overwrite or check time not set, copy across */
  175|       |
  176|  1.31k|    if (to_overwrite || (dest->flags & X509_V_FLAG_USE_CHECK_TIME) == 0) {
  ------------------
  |  |  438|  1.31k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  |  Branch (176:9): [True: 0, False: 1.31k]
  |  Branch (176:25): [True: 1.31k, False: 0]
  ------------------
  177|  1.31k|        dest->check_time = src->check_time;
  178|  1.31k|        dest->flags &= ~X509_V_FLAG_USE_CHECK_TIME;
  ------------------
  |  |  438|  1.31k|#define X509_V_FLAG_USE_CHECK_TIME 0x2
  ------------------
  179|       |        /* Don't need to copy flag: that is done below */
  180|  1.31k|    }
  181|       |
  182|  1.31k|    if ((inh_flags & X509_VP_FLAG_RESET_FLAGS) != 0)
  ------------------
  |  |  491|  1.31k|#define X509_VP_FLAG_RESET_FLAGS 0x4
  ------------------
  |  Branch (182:9): [True: 0, False: 1.31k]
  ------------------
  183|      0|        dest->flags = 0;
  184|       |
  185|  1.31k|    dest->flags |= src->flags;
  186|       |
  187|  1.31k|    if (test_x509_verify_param_copy(policies, NULL)) {
  ------------------
  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  188|      0|        if (!X509_VERIFY_PARAM_set1_policies(dest, src->policies))
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            return 0;
  190|      0|    }
  191|       |
  192|  1.31k|    x509_verify_param_copy(hostflags, 0);
  ------------------
  |  |  147|  1.31k|    if (test_x509_verify_param_copy(field, def)) \
  |  |  ------------------
  |  |  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  148|  1.31k|        dest->field = src->field;
  ------------------
  193|       |
  194|  1.31k|    if (test_x509_verify_param_copy(hosts, NULL)) {
  ------------------
  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  195|      0|        sk_OPENSSL_STRING_pop_free(dest->hosts, str_free);
  ------------------
  |  |  246|      0|#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
  ------------------
  196|      0|        dest->hosts = NULL;
  197|      0|        if (src->hosts != NULL) {
  ------------------
  |  Branch (197:13): [True: 0, False: 0]
  ------------------
  198|      0|            dest->hosts = sk_OPENSSL_STRING_deep_copy(src->hosts, str_copy, str_free);
  ------------------
  |  |  255|      0|#define sk_OPENSSL_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_STRING_freefunc_type(freefunc)))
  ------------------
  199|      0|            if (dest->hosts == NULL)
  ------------------
  |  Branch (199:17): [True: 0, False: 0]
  ------------------
  200|      0|                return 0;
  201|      0|        }
  202|      0|    }
  203|       |
  204|  1.31k|    if (test_x509_verify_param_copy(email, NULL)) {
  ------------------
  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  205|      0|        if (!X509_VERIFY_PARAM_set1_email(dest, src->email, src->emaillen))
  ------------------
  |  Branch (205:13): [True: 0, False: 0]
  ------------------
  206|      0|            return 0;
  207|      0|    }
  208|       |
  209|  1.31k|    if (test_x509_verify_param_copy(ip, NULL)) {
  ------------------
  |  |  142|  1.31k|    (to_overwrite || (src->field != def && (to_default || dest->field == def)))
  |  |  ------------------
  |  |  |  Branch (142:6): [True: 0, False: 1.31k]
  |  |  |  Branch (142:23): [True: 0, False: 1.31k]
  |  |  |  Branch (142:45): [True: 0, False: 0]
  |  |  |  Branch (142:59): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  210|      0|        if (!X509_VERIFY_PARAM_set1_ip(dest, src->ip, src->iplen))
  ------------------
  |  Branch (210:13): [True: 0, False: 0]
  ------------------
  211|      0|            return 0;
  212|      0|    }
  213|       |
  214|  1.31k|    return 1;
  215|  1.31k|}
X509_VERIFY_PARAM_set_flags:
  267|  1.22k|{
  268|  1.22k|    param->flags |= flags;
  269|  1.22k|    if ((flags & X509_V_FLAG_POLICY_MASK) != 0)
  ------------------
  |  |  496|  1.22k|#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \
  |  |  ------------------
  |  |  |  |  450|  1.22k|#define X509_V_FLAG_POLICY_CHECK 0x80
  |  |  ------------------
  |  |  497|  1.22k|    | X509_V_FLAG_EXPLICIT_POLICY                         \
  |  |  ------------------
  |  |  |  |  452|  1.22k|#define X509_V_FLAG_EXPLICIT_POLICY 0x100
  |  |  ------------------
  |  |  498|  1.22k|    | X509_V_FLAG_INHIBIT_ANY                             \
  |  |  ------------------
  |  |  |  |  454|  1.22k|#define X509_V_FLAG_INHIBIT_ANY 0x200
  |  |  ------------------
  |  |  499|  1.22k|    | X509_V_FLAG_INHIBIT_MAP)
  |  |  ------------------
  |  |  |  |  456|  1.22k|#define X509_V_FLAG_INHIBIT_MAP 0x400
  |  |  ------------------
  ------------------
  |  Branch (269:9): [True: 0, False: 1.22k]
  ------------------
  270|      0|        param->flags |= X509_V_FLAG_POLICY_CHECK;
  ------------------
  |  |  450|      0|#define X509_V_FLAG_POLICY_CHECK 0x80
  ------------------
  271|  1.22k|    return 1;
  272|  1.22k|}
X509_VERIFY_PARAM_move_peername:
  423|  2.63k|{
  424|  2.63k|    char *peername = (from != NULL) ? from->peername : NULL;
  ------------------
  |  Branch (424:22): [True: 0, False: 2.63k]
  ------------------
  425|       |
  426|  2.63k|    if (to->peername != peername) {
  ------------------
  |  Branch (426:9): [True: 0, False: 2.63k]
  ------------------
  427|      0|        OPENSSL_free(to->peername);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  428|      0|        to->peername = peername;
  429|      0|    }
  430|  2.63k|    if (from != NULL)
  ------------------
  |  Branch (430:9): [True: 0, False: 2.63k]
  ------------------
  431|      0|        from->peername = NULL;
  432|  2.63k|}

X509_digest:
  500|  11.0k|{
  501|  11.0k|    if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  | 2342|  11.0k|#define SN_sha1         "SHA1"
  ------------------
                  if (EVP_MD_is_a(md, SN_sha1) && (cert->ex_flags & EXFLAG_SET) != 0
  ------------------
  |  |  678|  11.0k|#define EXFLAG_SET 0x100
  ------------------
  |  Branch (501:9): [True: 11.0k, False: 0]
  |  Branch (501:37): [True: 0, False: 11.0k]
  ------------------
  502|      0|        && (cert->ex_flags & EXFLAG_NO_FINGERPRINT) == 0) {
  ------------------
  |  |  690|      0|#define EXFLAG_NO_FINGERPRINT 0x100000
  ------------------
  |  Branch (502:12): [True: 0, False: 0]
  ------------------
  503|       |        /* Asking for SHA1 and we already computed it. */
  504|      0|        if (len != NULL)
  ------------------
  |  Branch (504:13): [True: 0, False: 0]
  ------------------
  505|      0|            *len = sizeof(cert->sha1_hash);
  506|      0|        memcpy(data, cert->sha1_hash, sizeof(cert->sha1_hash));
  507|      0|        return 1;
  508|      0|    }
  509|  11.0k|    return ossl_asn1_item_digest_ex(ASN1_ITEM_rptr(X509), md, (char *)cert,
  ------------------
  |  |  433|  11.0k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  510|  11.0k|        data, len, cert->libctx, cert->propq);
  511|  11.0k|}

x_name.c:x509_name_ex_new:
   91|   763k|{
   92|   763k|    X509_NAME *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|   763k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   93|       |
   94|   763k|    if (ret == NULL)
  ------------------
  |  Branch (94:9): [True: 0, False: 763k]
  ------------------
   95|      0|        return 0;
   96|   763k|    if ((ret->entries = sk_X509_NAME_ENTRY_new_null()) == NULL) {
  ------------------
  |  |  212|   763k|#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (96:9): [True: 0, False: 763k]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        goto err;
   99|      0|    }
  100|   763k|    if ((ret->bytes = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (100:9): [True: 0, False: 763k]
  ------------------
  101|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  102|      0|        goto err;
  103|      0|    }
  104|   763k|    ret->modified = 1;
  105|   763k|    *val = (ASN1_VALUE *)ret;
  106|   763k|    return 1;
  107|       |
  108|      0|err:
  109|      0|    if (ret) {
  ------------------
  |  Branch (109:9): [True: 0, False: 0]
  ------------------
  110|      0|        sk_X509_NAME_ENTRY_free(ret->entries);
  ------------------
  |  |  215|      0|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  111|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  112|      0|    }
  113|      0|    return 0;
  114|   763k|}
x_name.c:x509_name_ex_free:
  117|   763k|{
  118|   763k|    X509_NAME *a;
  119|       |
  120|   763k|    if (pval == NULL || *pval == NULL)
  ------------------
  |  Branch (120:9): [True: 0, False: 763k]
  |  Branch (120:25): [True: 0, False: 763k]
  ------------------
  121|      0|        return;
  122|   763k|    a = (X509_NAME *)*pval;
  123|       |
  124|   763k|    BUF_MEM_free(a->bytes);
  125|   763k|    sk_X509_NAME_ENTRY_pop_free(a->entries, X509_NAME_ENTRY_free);
  ------------------
  |  |  223|   763k|#define sk_X509_NAME_ENTRY_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_freefunc_type(freefunc))
  ------------------
  126|   763k|    OPENSSL_free(a->canon_enc);
  ------------------
  |  |  131|   763k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|   763k|    OPENSSL_free(a);
  ------------------
  |  |  131|   763k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|       |    *pval = NULL;
  129|   763k|}
x_name.c:x509_name_ex_d2i:
  145|   381k|{
  146|   381k|    const unsigned char *p = *in, *q;
  147|   381k|    union {
  148|   381k|        STACK_OF(STACK_OF_X509_NAME_ENTRY) *s;
  149|   381k|        ASN1_VALUE *a;
  150|   381k|    } intname = {
  151|   381k|        NULL
  152|   381k|    };
  153|   381k|    union {
  154|   381k|        X509_NAME *x;
  155|   381k|        ASN1_VALUE *a;
  156|   381k|    } nm = {
  157|   381k|        NULL
  158|   381k|    };
  159|   381k|    int i, j, ret;
  160|   381k|    STACK_OF(X509_NAME_ENTRY) *entries;
  ------------------
  |  |   33|   381k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  161|   381k|    X509_NAME_ENTRY *entry;
  162|       |
  163|   381k|    if (len > X509_NAME_MAX)
  ------------------
  |  |   24|   381k|#define X509_NAME_MAX (1024 * 1024)
  ------------------
  |  Branch (163:9): [True: 0, False: 381k]
  ------------------
  164|      0|        len = X509_NAME_MAX;
  ------------------
  |  |   24|      0|#define X509_NAME_MAX (1024 * 1024)
  ------------------
  165|   381k|    q = p;
  166|       |
  167|       |    /* Get internal representation of Name */
  168|   381k|    ret = ASN1_item_ex_d2i(&intname.a,
  169|   381k|        &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  170|   381k|        tag, aclass, opt, ctx);
  171|       |
  172|   381k|    if (ret <= 0)
  ------------------
  |  Branch (172:9): [True: 0, False: 381k]
  ------------------
  173|      0|        return ret;
  174|       |
  175|   381k|    if (*val)
  ------------------
  |  Branch (175:9): [True: 381k, False: 456]
  ------------------
  176|   381k|        x509_name_ex_free(val, NULL);
  177|   381k|    if (!x509_name_ex_new(&nm.a, NULL))
  ------------------
  |  Branch (177:9): [True: 0, False: 381k]
  ------------------
  178|      0|        goto err;
  179|       |    /* We've decoded it: now cache encoding */
  180|   381k|    if (!BUF_MEM_grow(nm.x->bytes, p - q))
  ------------------
  |  Branch (180:9): [True: 0, False: 381k]
  ------------------
  181|      0|        goto err;
  182|   381k|    memcpy(nm.x->bytes->data, q, p - q);
  183|       |
  184|       |    /* Convert internal representation to X509_NAME structure */
  185|  1.74M|    for (i = 0; i < sk_STACK_OF_X509_NAME_ENTRY_num(intname.s); i++) {
  ------------------
  |  Branch (185:17): [True: 1.36M, False: 381k]
  ------------------
  186|  1.36M|        entries = sk_STACK_OF_X509_NAME_ENTRY_value(intname.s, i);
  187|  2.72M|        for (j = 0; j < sk_X509_NAME_ENTRY_num(entries); j++) {
  ------------------
  |  |  209|  2.72M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (187:21): [True: 1.36M, False: 1.36M]
  ------------------
  188|  1.36M|            entry = sk_X509_NAME_ENTRY_value(entries, j);
  ------------------
  |  |  210|  1.36M|#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
  ------------------
  189|  1.36M|            entry->set = i;
  190|  1.36M|            if (!sk_X509_NAME_ENTRY_push(nm.x->entries, entry))
  ------------------
  |  |  219|  1.36M|#define sk_X509_NAME_ENTRY_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
  ------------------
  |  Branch (190:17): [True: 0, False: 1.36M]
  ------------------
  191|      0|                goto err;
  192|  1.36M|            (void)sk_X509_NAME_ENTRY_set(entries, j, NULL);
  ------------------
  |  |  225|  1.36M|#define sk_X509_NAME_ENTRY_set(sk, idx, ptr) ((X509_NAME_ENTRY *)OPENSSL_sk_set(ossl_check_X509_NAME_ENTRY_sk_type(sk), (idx), ossl_check_X509_NAME_ENTRY_type(ptr)))
  ------------------
  193|  1.36M|        }
  194|  1.36M|    }
  195|   381k|    ret = x509_name_canon(nm.x);
  196|   381k|    if (!ret)
  ------------------
  |  Branch (196:9): [True: 0, False: 381k]
  ------------------
  197|      0|        goto err;
  198|   381k|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,
  199|   381k|        local_sk_X509_NAME_ENTRY_free);
  200|   381k|    nm.x->modified = 0;
  201|   381k|    *val = nm.a;
  202|   381k|    *in = p;
  203|   381k|    return ret;
  204|       |
  205|      0|err:
  206|      0|    if (nm.x != NULL)
  ------------------
  |  Branch (206:9): [True: 0, False: 0]
  ------------------
  207|      0|        X509_NAME_free(nm.x);
  208|      0|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname.s,
  209|      0|        local_sk_X509_NAME_ENTRY_pop_free);
  210|       |    ERR_raise(ERR_LIB_ASN1, ERR_R_NESTED_ASN1_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  211|      0|    return 0;
  212|   381k|}
x_name.c:x509_name_canon:
  312|   381k|{
  313|   381k|    unsigned char *p;
  314|   381k|    STACK_OF(STACK_OF_X509_NAME_ENTRY) *intname;
  ------------------
  |  |   33|   381k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  315|   381k|    STACK_OF(X509_NAME_ENTRY) *entries = NULL;
  ------------------
  |  |   33|   381k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  316|   381k|    X509_NAME_ENTRY *entry, *tmpentry = NULL;
  317|   381k|    int i, set = -1, ret = 0, len;
  318|       |
  319|   381k|    OPENSSL_free(a->canon_enc);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  320|   381k|    a->canon_enc = NULL;
  321|       |    /* Special case: empty X509_NAME => null encoding */
  322|   381k|    if (sk_X509_NAME_ENTRY_num(a->entries) == 0) {
  ------------------
  |  |  209|   381k|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (322:9): [True: 0, False: 381k]
  ------------------
  323|      0|        a->canon_enclen = 0;
  324|      0|        return 1;
  325|      0|    }
  326|   381k|    intname = sk_STACK_OF_X509_NAME_ENTRY_new_null();
  327|   381k|    if (intname == NULL) {
  ------------------
  |  Branch (327:9): [True: 0, False: 381k]
  ------------------
  328|      0|        ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  329|      0|        goto err;
  330|      0|    }
  331|  1.74M|    for (i = 0; i < sk_X509_NAME_ENTRY_num(a->entries); i++) {
  ------------------
  |  |  209|  1.74M|#define sk_X509_NAME_ENTRY_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  |  Branch (331:17): [True: 1.36M, False: 381k]
  ------------------
  332|  1.36M|        entry = sk_X509_NAME_ENTRY_value(a->entries, i);
  ------------------
  |  |  210|  1.36M|#define sk_X509_NAME_ENTRY_value(sk, idx) ((X509_NAME_ENTRY *)OPENSSL_sk_value(ossl_check_const_X509_NAME_ENTRY_sk_type(sk), (idx)))
  ------------------
  333|  1.36M|        if (entry->set != set) {
  ------------------
  |  Branch (333:13): [True: 1.36M, False: 0]
  ------------------
  334|  1.36M|            entries = sk_X509_NAME_ENTRY_new_null();
  ------------------
  |  |  212|  1.36M|#define sk_X509_NAME_ENTRY_new_null() ((STACK_OF(X509_NAME_ENTRY) *)OPENSSL_sk_new_null())
  ------------------
  335|  1.36M|            if (entries == NULL)
  ------------------
  |  Branch (335:17): [True: 0, False: 1.36M]
  ------------------
  336|      0|                goto err;
  337|  1.36M|            if (!sk_STACK_OF_X509_NAME_ENTRY_push(intname, entries)) {
  ------------------
  |  Branch (337:17): [True: 0, False: 1.36M]
  ------------------
  338|      0|                sk_X509_NAME_ENTRY_free(entries);
  ------------------
  |  |  215|      0|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  339|      0|                ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  340|      0|                goto err;
  341|      0|            }
  342|  1.36M|            set = entry->set;
  343|  1.36M|        }
  344|  1.36M|        tmpentry = X509_NAME_ENTRY_new();
  345|  1.36M|        if (tmpentry == NULL) {
  ------------------
  |  Branch (345:13): [True: 0, False: 1.36M]
  ------------------
  346|      0|            ERR_raise(ERR_LIB_X509, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  347|      0|            goto err;
  348|      0|        }
  349|  1.36M|        tmpentry->object = OBJ_dup(entry->object);
  350|  1.36M|        if (tmpentry->object == NULL) {
  ------------------
  |  Branch (350:13): [True: 0, False: 1.36M]
  ------------------
  351|      0|            ERR_raise(ERR_LIB_X509, ERR_R_OBJ_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  352|      0|            goto err;
  353|      0|        }
  354|  1.36M|        if (!asn1_string_canon(tmpentry->value, entry->value))
  ------------------
  |  Branch (354:13): [True: 0, False: 1.36M]
  ------------------
  355|      0|            goto err;
  356|  1.36M|        if (!sk_X509_NAME_ENTRY_push(entries, tmpentry)) {
  ------------------
  |  |  219|  1.36M|#define sk_X509_NAME_ENTRY_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_type(ptr))
  ------------------
  |  Branch (356:13): [True: 0, False: 1.36M]
  ------------------
  357|      0|            ERR_raise(ERR_LIB_X509, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  358|      0|            goto err;
  359|      0|        }
  360|  1.36M|        tmpentry = NULL;
  361|  1.36M|    }
  362|       |
  363|       |    /* Finally generate encoding */
  364|   381k|    len = i2d_name_canon(intname, NULL);
  365|   381k|    if (len < 0)
  ------------------
  |  Branch (365:9): [True: 0, False: 381k]
  ------------------
  366|      0|        goto err;
  367|   381k|    a->canon_enclen = len;
  368|       |
  369|   381k|    p = OPENSSL_malloc(a->canon_enclen);
  ------------------
  |  |  106|   381k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  370|   381k|    if (p == NULL)
  ------------------
  |  Branch (370:9): [True: 0, False: 381k]
  ------------------
  371|      0|        goto err;
  372|       |
  373|   381k|    a->canon_enc = p;
  374|       |
  375|   381k|    i2d_name_canon(intname, &p);
  376|       |
  377|   381k|    ret = 1;
  378|       |
  379|   381k|err:
  380|   381k|    X509_NAME_ENTRY_free(tmpentry);
  381|   381k|    sk_STACK_OF_X509_NAME_ENTRY_pop_free(intname,
  382|   381k|        local_sk_X509_NAME_ENTRY_pop_free);
  383|   381k|    return ret;
  384|   381k|}
x_name.c:asn1_string_canon:
  394|  1.36M|{
  395|  1.36M|    unsigned char *to, *from;
  396|  1.36M|    int len, i;
  397|       |
  398|       |    /* If type not in bitmask just copy string across */
  399|  1.36M|    if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON)) {
  ------------------
  |  |  389|  1.36M|    (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  119|  1.36M|#define B_ASN1_UTF8STRING 0x2000
  |  |  ------------------
  |  |                   (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  117|  1.36M|#define B_ASN1_BMPSTRING 0x0800
  |  |  ------------------
  |  |                   (B_ASN1_UTF8STRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING     \
  |  |  ------------------
  |  |  |  |  114|  1.36M|#define B_ASN1_UNIVERSALSTRING 0x0100
  |  |  ------------------
  |  |  390|  1.36M|        | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  105|  1.36M|#define B_ASN1_PRINTABLESTRING 0x0002
  |  |  ------------------
  |  |                       | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  106|  1.36M|#define B_ASN1_T61STRING 0x0004
  |  |  ------------------
  |  |                       | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING \
  |  |  ------------------
  |  |  |  |  109|  1.36M|#define B_ASN1_IA5STRING 0x0010
  |  |  ------------------
  |  |  391|  1.36M|        | B_ASN1_VISIBLESTRING)
  |  |  ------------------
  |  |  |  |  112|  1.36M|#define B_ASN1_VISIBLESTRING 0x0040
  |  |  ------------------
  ------------------
  |  Branch (399:9): [True: 0, False: 1.36M]
  ------------------
  400|      0|        if (!ASN1_STRING_copy(out, in))
  ------------------
  |  Branch (400:13): [True: 0, False: 0]
  ------------------
  401|      0|            return 0;
  402|      0|        return 1;
  403|      0|    }
  404|       |
  405|  1.36M|    out->type = V_ASN1_UTF8STRING;
  ------------------
  |  |   75|  1.36M|#define V_ASN1_UTF8STRING 12
  ------------------
  406|  1.36M|    out->length = ASN1_STRING_to_UTF8(&out->data, in);
  407|  1.36M|    if (out->length == -1)
  ------------------
  |  Branch (407:9): [True: 0, False: 1.36M]
  ------------------
  408|      0|        return 0;
  409|       |
  410|  1.36M|    to = out->data;
  411|  1.36M|    from = to;
  412|       |
  413|  1.36M|    len = out->length;
  414|       |
  415|       |    /*
  416|       |     * Convert string in place to canonical form. Ultimately we may need to
  417|       |     * handle a wider range of characters but for now ignore anything with
  418|       |     * MSB set and rely on the ossl_isspace() to fail on bad characters without
  419|       |     * needing isascii or range checks as well.
  420|       |     */
  421|       |
  422|       |    /* Ignore leading spaces */
  423|  1.36M|    while (len > 0 && ossl_isspace(*from)) {
  ------------------
  |  |   82|  1.36M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.36M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
  |  Branch (423:12): [True: 1.36M, False: 0]
  ------------------
  424|      0|        from++;
  425|      0|        len--;
  426|      0|    }
  427|       |
  428|  1.36M|    to = from + len;
  429|       |
  430|       |    /* Ignore trailing spaces */
  431|  1.36M|    while (len > 0 && ossl_isspace(to[-1])) {
  ------------------
  |  |   82|  1.36M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  1.36M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 1.36M]
  |  |  ------------------
  ------------------
  |  Branch (431:12): [True: 1.36M, False: 0]
  ------------------
  432|      0|        to--;
  433|      0|        len--;
  434|      0|    }
  435|       |
  436|  1.36M|    to = out->data;
  437|       |
  438|  1.36M|    i = 0;
  439|  23.1M|    while (i < len) {
  ------------------
  |  Branch (439:12): [True: 21.7M, False: 1.36M]
  ------------------
  440|       |        /* If not ASCII set just copy across */
  441|  21.7M|        if (!ossl_isascii(*from)) {
  ------------------
  |  |   75|  21.7M|#define ossl_isascii(c) (((c) & ~127) == 0)
  ------------------
  |  Branch (441:13): [True: 41.7k, False: 21.7M]
  ------------------
  442|  41.7k|            *to++ = *from++;
  443|  41.7k|            i++;
  444|  41.7k|        }
  445|       |        /* Collapse multiple spaces */
  446|  21.7M|        else if (ossl_isspace(*from)) {
  ------------------
  |  |   82|  21.7M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  21.7M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 2.10M, False: 19.6M]
  |  |  ------------------
  ------------------
  447|       |            /* Copy one space across */
  448|  2.10M|            *to++ = ' ';
  449|       |            /*
  450|       |             * Ignore subsequent spaces. Note: don't need to check len here
  451|       |             * because we know the last character is a non-space so we can't
  452|       |             * overflow.
  453|       |             */
  454|  2.10M|            do {
  455|  2.10M|                from++;
  456|  2.10M|                i++;
  457|  2.10M|            } while (ossl_isspace(*from));
  ------------------
  |  |   82|  2.10M|#define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space))
  |  |  ------------------
  |  |  |  |   30|  2.10M|#define CTYPE_MASK_space 0x8
  |  |  ------------------
  |  |  |  Branch (82:25): [True: 0, False: 2.10M]
  |  |  ------------------
  ------------------
  458|  19.6M|        } else {
  459|  19.6M|            *to++ = ossl_tolower(*from);
  460|  19.6M|            from++;
  461|  19.6M|            i++;
  462|  19.6M|        }
  463|  21.7M|    }
  464|       |
  465|  1.36M|    out->length = (int)(to - out->data);
  466|       |
  467|  1.36M|    return 1;
  468|  1.36M|}
x_name.c:i2d_name_canon:
  472|   763k|{
  473|   763k|    int i, len, ltmp;
  474|   763k|    const ASN1_VALUE *v;
  475|   763k|    STACK_OF(ASN1_VALUE) *intname = (STACK_OF(ASN1_VALUE) *)_intname;
  ------------------
  |  |   33|   763k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  476|       |
  477|   763k|    len = 0;
  478|  3.49M|    for (i = 0; i < sk_ASN1_VALUE_num(intname); i++) {
  ------------------
  |  |  887|  3.49M|#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
  ------------------
  |  Branch (478:17): [True: 2.72M, False: 763k]
  ------------------
  479|  2.72M|        v = sk_ASN1_VALUE_value(intname, i);
  ------------------
  |  |  888|  2.72M|#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
  ------------------
  480|  2.72M|        ltmp = ASN1_item_ex_i2d(&v, in,
  481|  2.72M|            ASN1_ITEM_rptr(X509_NAME_ENTRIES), -1, -1);
  ------------------
  |  |  433|  2.72M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  482|  2.72M|        if (ltmp < 0 || len > INT_MAX - ltmp)
  ------------------
  |  Branch (482:13): [True: 0, False: 2.72M]
  |  Branch (482:25): [True: 0, False: 2.72M]
  ------------------
  483|      0|            return -1;
  484|  2.72M|        len += ltmp;
  485|  2.72M|    }
  486|   763k|    return len;
  487|   763k|}
x_name.c:local_sk_X509_NAME_ENTRY_free:
  132|  1.36M|{
  133|  1.36M|    sk_X509_NAME_ENTRY_free(ne);
  ------------------
  |  |  215|  1.36M|#define sk_X509_NAME_ENTRY_free(sk) OPENSSL_sk_free(ossl_check_X509_NAME_ENTRY_sk_type(sk))
  ------------------
  134|  1.36M|}
x_name.c:local_sk_X509_NAME_ENTRY_pop_free:
  137|  1.36M|{
  138|  1.36M|    sk_X509_NAME_ENTRY_pop_free(ne, X509_NAME_ENTRY_free);
  ------------------
  |  |  223|  1.36M|#define sk_X509_NAME_ENTRY_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_ENTRY_sk_type(sk), ossl_check_X509_NAME_ENTRY_freefunc_type(freefunc))
  ------------------
  139|  1.36M|}

ossl_d2i_X509_PUBKEY_INTERNAL:
   70|   190k|{
   71|   190k|    X509_PUBKEY *xpub = OPENSSL_zalloc(sizeof(*xpub));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|       |
   73|   190k|    if (xpub == NULL)
  ------------------
  |  Branch (73:9): [True: 0, False: 190k]
  ------------------
   74|      0|        return NULL;
   75|   190k|    return (X509_PUBKEY *)ASN1_item_d2i_ex((ASN1_VALUE **)&xpub, pp, len,
   76|   190k|        ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  433|   190k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   77|   190k|        libctx, propq);
   78|   190k|}
ossl_X509_PUBKEY_INTERNAL_free:
   81|   381k|{
   82|   381k|    ASN1_item_free((ASN1_VALUE *)xpub, ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL));
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
   83|   381k|}
X509_PUBKEY_get0:
  458|   212k|{
  459|   212k|    if (key == NULL) {
  ------------------
  |  Branch (459:9): [True: 0, False: 212k]
  ------------------
  460|      0|        ERR_raise(ERR_LIB_X509, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  461|      0|        return NULL;
  462|      0|    }
  463|       |
  464|   212k|    if (key->pkey == NULL) {
  ------------------
  |  Branch (464:9): [True: 0, False: 212k]
  ------------------
  465|       |        /* We failed to decode the key when we loaded it, or it was never set */
  466|      0|        ERR_raise(ERR_LIB_EVP, EVP_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  467|      0|        return NULL;
  468|      0|    }
  469|       |
  470|   212k|    return key->pkey;
  471|   212k|}
X509_PUBKEY_get:
  474|   190k|{
  475|   190k|    EVP_PKEY *ret = X509_PUBKEY_get0(key);
  476|       |
  477|   190k|    if (ret != NULL && !EVP_PKEY_up_ref(ret)) {
  ------------------
  |  Branch (477:9): [True: 190k, False: 0]
  |  Branch (477:24): [True: 0, False: 190k]
  ------------------
  478|      0|        ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  479|       |        ret = NULL;
  480|      0|    }
  481|   190k|    return ret;
  482|   190k|}
ossl_d2i_PUBKEY_legacy:
  537|   190k|{
  538|   190k|    return d2i_PUBKEY_int(a, pp, length, NULL, NULL, 1, d2i_X509_PUBKEY);
  539|   190k|}
d2i_RSA_PUBKEY:
  606|   138k|{
  607|   138k|    EVP_PKEY *pkey;
  608|   138k|    RSA *key = NULL;
  609|   138k|    const unsigned char *q;
  610|       |
  611|   138k|    q = *pp;
  612|   138k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  613|   138k|    if (pkey == NULL)
  ------------------
  |  Branch (613:9): [True: 0, False: 138k]
  ------------------
  614|      0|        return NULL;
  615|   138k|    key = EVP_PKEY_get1_RSA(pkey);
  616|   138k|    EVP_PKEY_free(pkey);
  617|   138k|    if (key == NULL)
  ------------------
  |  Branch (617:9): [True: 0, False: 138k]
  ------------------
  618|      0|        return NULL;
  619|   138k|    *pp = q;
  620|   138k|    if (a != NULL) {
  ------------------
  |  Branch (620:9): [True: 0, False: 138k]
  ------------------
  621|      0|        RSA_free(*a);
  622|      0|        *a = key;
  623|      0|    }
  624|   138k|    return key;
  625|   138k|}
d2i_EC_PUBKEY:
  797|  52.2k|{
  798|  52.2k|    EVP_PKEY *pkey;
  799|  52.2k|    EC_KEY *key = NULL;
  800|  52.2k|    const unsigned char *q;
  801|  52.2k|    int type;
  802|       |
  803|  52.2k|    q = *pp;
  804|  52.2k|    pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length);
  805|  52.2k|    if (pkey == NULL)
  ------------------
  |  Branch (805:9): [True: 0, False: 52.2k]
  ------------------
  806|      0|        return NULL;
  807|  52.2k|    type = EVP_PKEY_get_id(pkey);
  808|  52.2k|    if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   73|  52.2k|#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey
  |  |  ------------------
  |  |  |  |  178|   104k|#define NID_X9_62_id_ecPublicKey                408
  |  |  ------------------
  ------------------
                  if (type == EVP_PKEY_EC || type == EVP_PKEY_SM2)
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (808:9): [True: 52.2k, False: 0]
  |  Branch (808:32): [True: 0, False: 0]
  ------------------
  809|  52.2k|        key = EVP_PKEY_get1_EC_KEY(pkey);
  810|  52.2k|    EVP_PKEY_free(pkey);
  811|  52.2k|    if (key == NULL)
  ------------------
  |  Branch (811:9): [True: 0, False: 52.2k]
  ------------------
  812|      0|        return NULL;
  813|  52.2k|    *pp = q;
  814|  52.2k|    if (a != NULL) {
  ------------------
  |  Branch (814:9): [True: 0, False: 52.2k]
  ------------------
  815|      0|        EC_KEY_free(*a);
  816|      0|        *a = key;
  817|      0|    }
  818|  52.2k|    return key;
  819|  52.2k|}
X509_PUBKEY_get0_param:
 1031|   381k|{
 1032|   381k|    if (ppkalg)
  ------------------
  |  Branch (1032:9): [True: 0, False: 381k]
  ------------------
 1033|      0|        *ppkalg = pub->algor->algorithm;
 1034|   381k|    if (pk) {
  ------------------
  |  Branch (1034:9): [True: 190k, False: 190k]
  ------------------
 1035|   190k|        *pk = pub->public_key->data;
 1036|   190k|        *ppklen = pub->public_key->length;
 1037|   190k|    }
 1038|   381k|    if (pa)
  ------------------
  |  Branch (1038:9): [True: 381k, False: 0]
  ------------------
 1039|   381k|        *pa = pub->algor;
 1040|   381k|    return 1;
 1041|   381k|}
ossl_x509_PUBKEY_get0_libctx:
 1073|  52.2k|{
 1074|  52.2k|    if (plibctx)
  ------------------
  |  Branch (1074:9): [True: 52.2k, False: 0]
  ------------------
 1075|  52.2k|        *plibctx = key->libctx;
 1076|  52.2k|    if (ppropq)
  ------------------
  |  Branch (1076:9): [True: 52.2k, False: 0]
  ------------------
 1077|  52.2k|        *ppropq = key->propq;
 1078|  52.2k|    return 1;
 1079|  52.2k|}
x_pubkey.c:x509_pubkey_ex_new_ex:
  111|   190k|{
  112|   190k|    X509_PUBKEY *ret;
  113|       |
  114|   190k|    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL)
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (114:9): [True: 0, False: 190k]
  ------------------
  115|      0|        return 0;
  116|   190k|    if (!x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL)
  ------------------
  |  Branch (116:9): [True: 0, False: 190k]
  ------------------
  117|   190k|        || !x509_pubkey_set0_libctx(ret, libctx, propq)) {
  ------------------
  |  Branch (117:12): [True: 0, False: 190k]
  ------------------
  118|      0|        x509_pubkey_ex_free((ASN1_VALUE **)&ret, NULL);
  119|      0|        ret = NULL;
  120|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|   190k|    } else {
  122|   190k|        *pval = (ASN1_VALUE *)ret;
  123|   190k|    }
  124|       |
  125|       |    return ret != NULL;
  126|   190k|}
x_pubkey.c:x509_pubkey_ex_populate:
  100|   572k|{
  101|   572k|    X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval;
  102|       |
  103|   572k|    return (pubkey->algor != NULL
  ------------------
  |  Branch (103:13): [True: 190k, False: 381k]
  ------------------
  104|   381k|               || (pubkey->algor = X509_ALGOR_new()) != NULL)
  ------------------
  |  Branch (104:19): [True: 381k, False: 0]
  ------------------
  105|   572k|        && (pubkey->public_key != NULL
  ------------------
  |  Branch (105:13): [True: 190k, False: 381k]
  ------------------
  106|   381k|            || (pubkey->public_key = ASN1_BIT_STRING_new()) != NULL);
  ------------------
  |  Branch (106:16): [True: 381k, False: 0]
  ------------------
  107|   572k|}
x_pubkey.c:x509_pubkey_ex_d2i_ex:
  133|   381k|{
  134|   381k|    const unsigned char *in_saved = *in;
  135|   381k|    size_t publen;
  136|   381k|    X509_PUBKEY *pubkey;
  137|   381k|    int ret;
  138|   381k|    OSSL_DECODER_CTX *dctx = NULL;
  139|   381k|    unsigned char *tmpbuf = NULL;
  140|       |
  141|   381k|    if (*pval == NULL && !x509_pubkey_ex_new_ex(pval, it, libctx, propq))
  ------------------
  |  Branch (141:9): [True: 0, False: 381k]
  |  Branch (141:26): [True: 0, False: 0]
  ------------------
  142|      0|        return 0;
  143|   381k|    if (!x509_pubkey_ex_populate(pval, NULL)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 381k]
  ------------------
  144|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  145|      0|        return 0;
  146|      0|    }
  147|       |
  148|       |    /* This ensures that |*in| advances properly no matter what */
  149|   381k|    if ((ret = asn1_item_embed_d2i(pval, in, len,
  ------------------
  |  Branch (149:9): [True: 0, False: 381k]
  ------------------
  150|   381k|             ASN1_ITEM_rptr(X509_PUBKEY_INTERNAL),
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  151|   381k|             tag, aclass, opt, ctx, 0,
  152|   381k|             NULL, NULL))
  153|   381k|        <= 0) {
  154|      0|        x509_pubkey_ex_free(pval, it);
  155|      0|        return ret;
  156|      0|    }
  157|       |
  158|   381k|    publen = *in - in_saved;
  159|   381k|    if (!ossl_assert(publen > 0)) {
  ------------------
  |  |   52|   381k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|   381k|    __FILE__, __LINE__)
  ------------------
  |  Branch (159:9): [True: 0, False: 381k]
  ------------------
  160|      0|        ERR_raise(ERR_LIB_ASN1, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  161|      0|        return 0;
  162|      0|    }
  163|       |
  164|   381k|    pubkey = (X509_PUBKEY *)*pval;
  165|   381k|    EVP_PKEY_free(pubkey->pkey);
  166|   381k|    pubkey->pkey = NULL;
  167|       |
  168|       |    /*
  169|       |     * Opportunistically decode the key but remove any non fatal errors
  170|       |     * from the queue. Subsequent explicit attempts to decode/use the key
  171|       |     * will return an appropriate error.
  172|       |     */
  173|   381k|    ERR_set_mark();
  174|       |
  175|       |    /*
  176|       |     * Try to decode with legacy method first.  This ensures that engines
  177|       |     * aren't overridden by providers.
  178|       |     */
  179|   381k|    if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) {
  ------------------
  |  Branch (179:9): [True: 0, False: 381k]
  ------------------
  180|       |        /* -1 indicates a fatal error, like malloc failure */
  181|      0|        ERR_clear_last_mark();
  182|      0|        goto end;
  183|      0|    }
  184|       |
  185|       |    /* Try to decode it into an EVP_PKEY with OSSL_DECODER */
  186|   381k|    if (ret <= 0 && !pubkey->flag_force_legacy) {
  ------------------
  |  Branch (186:9): [True: 190k, False: 190k]
  |  Branch (186:21): [True: 190k, False: 0]
  ------------------
  187|   190k|        const unsigned char *p;
  188|   190k|        char txtoidname[OSSL_MAX_NAME_SIZE];
  189|   190k|        size_t slen = publen;
  190|       |
  191|       |        /*
  192|       |         * The decoders don't know how to handle anything other than Universal
  193|       |         * class so we modify the data accordingly.
  194|       |         */
  195|   190k|        if (aclass != V_ASN1_UNIVERSAL) {
  ------------------
  |  |   49|   190k|#define V_ASN1_UNIVERSAL 0x00
  ------------------
  |  Branch (195:13): [True: 0, False: 190k]
  ------------------
  196|      0|            tmpbuf = OPENSSL_memdup(in_saved, publen);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|      0|            if (tmpbuf == NULL)
  ------------------
  |  Branch (197:17): [True: 0, False: 0]
  ------------------
  198|      0|                return 0;
  199|      0|            in_saved = tmpbuf;
  200|      0|            *tmpbuf = V_ASN1_CONSTRUCTED | V_ASN1_SEQUENCE;
  ------------------
  |  |   54|      0|#define V_ASN1_CONSTRUCTED 0x20
  ------------------
                          *tmpbuf = V_ASN1_CONSTRUCTED | V_ASN1_SEQUENCE;
  ------------------
  |  |   76|      0|#define V_ASN1_SEQUENCE 16
  ------------------
  201|      0|        }
  202|   190k|        p = in_saved;
  203|       |
  204|   190k|        if (OBJ_obj2txt(txtoidname, sizeof(txtoidname),
  ------------------
  |  Branch (204:13): [True: 0, False: 190k]
  ------------------
  205|   190k|                pubkey->algor->algorithm, 0)
  206|   190k|            <= 0) {
  207|      0|            ERR_clear_last_mark();
  208|      0|            goto end;
  209|      0|        }
  210|   190k|        if ((dctx = OSSL_DECODER_CTX_new_for_pkey(&pubkey->pkey,
  ------------------
  |  Branch (210:13): [True: 190k, False: 0]
  ------------------
  211|   190k|                 "DER", "SubjectPublicKeyInfo",
  212|   190k|                 txtoidname, EVP_PKEY_PUBLIC_KEY,
  ------------------
  |  |  111|   190k|    (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  107|   190k|    (OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
  |  |  |  |  ------------------
  |  |  |  |  |  |  647|   190k|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  642|   190k|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  648|   190k|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  643|   190k|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   (EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|   190k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  213|   190k|                 pubkey->libctx,
  214|   190k|                 pubkey->propq))
  215|   190k|            != NULL)
  216|       |            /*
  217|       |             * As said higher up, we're being opportunistic.  In other words,
  218|       |             * we don't care if we fail.
  219|       |             */
  220|   190k|            if (OSSL_DECODER_from_data(dctx, &p, &slen)) {
  ------------------
  |  Branch (220:17): [True: 190k, False: 0]
  ------------------
  221|   190k|                if (slen != 0) {
  ------------------
  |  Branch (221:21): [True: 0, False: 190k]
  ------------------
  222|       |                    /*
  223|       |                     * If we successfully decoded then we *must* consume all the
  224|       |                     * bytes.
  225|       |                     */
  226|      0|                    ERR_clear_last_mark();
  227|      0|                    ERR_raise(ERR_LIB_ASN1, EVP_R_DECODE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|                    goto end;
  229|      0|                }
  230|   190k|            }
  231|   190k|    }
  232|       |
  233|   381k|    ERR_pop_to_mark();
  234|   381k|    ret = 1;
  235|   381k|end:
  236|   381k|    OSSL_DECODER_CTX_free(dctx);
  237|   381k|    OPENSSL_free(tmpbuf);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  238|   381k|    return ret;
  239|   381k|}
x_pubkey.c:x509_pubkey_set0_libctx:
   49|   381k|{
   50|   381k|    if (x != NULL) {
  ------------------
  |  Branch (50:9): [True: 381k, False: 0]
  ------------------
   51|   381k|        x->libctx = libctx;
   52|   381k|        OPENSSL_free(x->propq);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   53|   381k|        x->propq = NULL;
   54|   381k|        if (propq != NULL) {
  ------------------
  |  Branch (54:13): [True: 1, False: 381k]
  ------------------
   55|      1|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   56|      1|            if (x->propq == NULL)
  ------------------
  |  Branch (56:17): [True: 0, False: 1]
  ------------------
   57|      0|                return 0;
   58|      1|        }
   59|   381k|    }
   60|   381k|    return 1;
   61|   381k|}
x_pubkey.c:x509_pubkey_ex_free:
   86|   381k|{
   87|   381k|    X509_PUBKEY *pubkey;
   88|       |
   89|   381k|    if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) {
  ------------------
  |  Branch (89:9): [True: 381k, False: 0]
  |  Branch (89:25): [True: 381k, False: 0]
  ------------------
   90|   381k|        X509_ALGOR_free(pubkey->algor);
   91|   381k|        ASN1_BIT_STRING_free(pubkey->public_key);
   92|   381k|        EVP_PKEY_free(pubkey->pkey);
   93|   381k|        OPENSSL_free(pubkey->propq);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   94|   381k|        OPENSSL_free(pubkey);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   95|       |        *pval = NULL;
   96|   381k|    }
   97|   381k|}
x_pubkey.c:x509_pubkey_decode:
  407|   381k|{
  408|   381k|    EVP_PKEY *pkey;
  409|   381k|    int nid;
  410|       |
  411|   381k|    nid = OBJ_obj2nid(key->algor->algorithm);
  412|   381k|    if (!key->flag_force_legacy) {
  ------------------
  |  Branch (412:9): [True: 190k, False: 190k]
  ------------------
  413|   190k|#ifndef OPENSSL_NO_ENGINE
  414|   190k|        ENGINE *e = NULL;
  415|       |
  416|   190k|        e = ENGINE_get_pkey_meth_engine(nid);
  417|   190k|        if (e == NULL)
  ------------------
  |  Branch (417:13): [True: 190k, False: 0]
  ------------------
  418|   190k|            return 0;
  419|      0|        ENGINE_finish(e);
  420|       |#else
  421|       |        return 0;
  422|       |#endif
  423|      0|    }
  424|       |
  425|   190k|    pkey = EVP_PKEY_new();
  426|   190k|    if (pkey == NULL) {
  ------------------
  |  Branch (426:9): [True: 0, False: 190k]
  ------------------
  427|      0|        ERR_raise(ERR_LIB_X509, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  428|      0|        return -1;
  429|      0|    }
  430|       |
  431|   190k|    if (!EVP_PKEY_set_type(pkey, nid)) {
  ------------------
  |  Branch (431:9): [True: 0, False: 190k]
  ------------------
  432|      0|        ERR_raise(ERR_LIB_X509, X509_R_UNSUPPORTED_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  433|      0|        goto error;
  434|      0|    }
  435|       |
  436|   190k|    if (pkey->ameth->pub_decode) {
  ------------------
  |  Branch (436:9): [True: 190k, False: 0]
  ------------------
  437|       |        /*
  438|       |         * Treat any failure of pub_decode as a decode error. In
  439|       |         * future we could have different return codes for decode
  440|       |         * errors and fatal errors such as malloc failure.
  441|       |         */
  442|   190k|        if (!pkey->ameth->pub_decode(pkey, key))
  ------------------
  |  Branch (442:13): [True: 0, False: 190k]
  ------------------
  443|      0|            goto error;
  444|   190k|    } else {
  445|      0|        ERR_raise(ERR_LIB_X509, X509_R_METHOD_NOT_SUPPORTED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  446|      0|        goto error;
  447|      0|    }
  448|       |
  449|   190k|    *ppkey = pkey;
  450|   190k|    return 1;
  451|       |
  452|      0|error:
  453|      0|    EVP_PKEY_free(pkey);
  454|      0|    return 0;
  455|   190k|}
x_pubkey.c:d2i_PUBKEY_int:
  495|   190k|{
  496|   190k|    X509_PUBKEY *xpk, *xpk2 = NULL, **pxpk = NULL;
  497|   190k|    EVP_PKEY *pktmp = NULL;
  498|   190k|    const unsigned char *q;
  499|       |
  500|   190k|    q = *pp;
  501|       |
  502|       |    /*
  503|       |     * If libctx or propq are non-NULL, we take advantage of the reuse
  504|       |     * feature.  It's not generally recommended, but is safe enough for
  505|       |     * newly created structures.
  506|       |     */
  507|   190k|    if (libctx != NULL || propq != NULL || force_legacy) {
  ------------------
  |  Branch (507:9): [True: 0, False: 190k]
  |  Branch (507:27): [True: 0, False: 190k]
  |  Branch (507:44): [True: 190k, False: 0]
  ------------------
  508|   190k|        xpk2 = OPENSSL_zalloc(sizeof(*xpk2));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  509|   190k|        if (xpk2 == NULL)
  ------------------
  |  Branch (509:13): [True: 0, False: 190k]
  ------------------
  510|      0|            return NULL;
  511|   190k|        if (!x509_pubkey_set0_libctx(xpk2, libctx, propq))
  ------------------
  |  Branch (511:13): [True: 0, False: 190k]
  ------------------
  512|      0|            goto end;
  513|   190k|        xpk2->flag_force_legacy = !!force_legacy;
  514|   190k|        pxpk = &xpk2;
  515|   190k|    }
  516|   190k|    xpk = d2i_x509_pubkey(pxpk, &q, length);
  517|   190k|    if (xpk == NULL)
  ------------------
  |  Branch (517:9): [True: 0, False: 190k]
  ------------------
  518|      0|        goto end;
  519|   190k|    pktmp = X509_PUBKEY_get(xpk);
  520|   190k|    X509_PUBKEY_free(xpk);
  521|   190k|    xpk2 = NULL; /* We know that xpk == xpk2 */
  522|   190k|    if (pktmp == NULL)
  ------------------
  |  Branch (522:9): [True: 0, False: 190k]
  ------------------
  523|      0|        goto end;
  524|   190k|    *pp = q;
  525|   190k|    if (a != NULL) {
  ------------------
  |  Branch (525:9): [True: 0, False: 190k]
  ------------------
  526|      0|        EVP_PKEY_free(*a);
  527|      0|        *a = pktmp;
  528|      0|    }
  529|   190k|end:
  530|   190k|    X509_PUBKEY_free(xpk2);
  531|   190k|    return pktmp;
  532|   190k|}

ossl_x509_set0_libctx:
  141|   190k|{
  142|   190k|    if (x != NULL) {
  ------------------
  |  Branch (142:9): [True: 190k, False: 0]
  ------------------
  143|   190k|        x->libctx = libctx;
  144|   190k|        OPENSSL_free(x->propq);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  145|   190k|        x->propq = NULL;
  146|   190k|        if (propq != NULL) {
  ------------------
  |  Branch (146:13): [True: 1, False: 190k]
  ------------------
  147|      1|            x->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|      1|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  148|      1|            if (x->propq == NULL)
  ------------------
  |  Branch (148:17): [True: 0, False: 1]
  ------------------
  149|      0|                return 0;
  150|      1|        }
  151|   190k|    }
  152|   190k|    return 1;
  153|   190k|}
X509_new_ex:
  156|   190k|{
  157|   190k|    X509 *cert = NULL;
  158|       |
  159|   190k|    cert = (X509 *)ASN1_item_new_ex(X509_it(), libctx, propq);
  160|   190k|    if (!ossl_x509_set0_libctx(cert, libctx, propq)) {
  ------------------
  |  Branch (160:9): [True: 0, False: 190k]
  ------------------
  161|      0|        X509_free(cert);
  162|       |        cert = NULL;
  163|      0|    }
  164|   190k|    return cert;
  165|   190k|}
x_x509.c:x509_cb:
   38|  1.17M|{
   39|  1.17M|    X509 *ret = (X509 *)*pval;
   40|       |
   41|  1.17M|    switch (operation) {
   42|       |
   43|   190k|    case ASN1_OP_D2I_PRE:
  ------------------
  |  |  735|   190k|#define ASN1_OP_D2I_PRE 4
  ------------------
  |  Branch (43:5): [True: 190k, False: 986k]
  ------------------
   44|   190k|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
  ------------------
  |  |  253|   190k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
   45|   190k|        X509_CERT_AUX_free(ret->aux);
   46|   190k|        ASN1_OCTET_STRING_free(ret->skid);
   47|   190k|        AUTHORITY_KEYID_free(ret->akid);
   48|   190k|        CRL_DIST_POINTS_free(ret->crldp);
   49|   190k|        ossl_policy_cache_free(ret->policy_cache);
   50|   190k|        GENERAL_NAMES_free(ret->altname);
   51|   190k|        NAME_CONSTRAINTS_free(ret->nc);
   52|   190k|#ifndef OPENSSL_NO_RFC3779
   53|   190k|        sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1263|   190k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
   54|   190k|        ASIdentifiers_free(ret->rfc3779_asid);
   55|   190k|#endif
   56|   190k|        ASN1_OCTET_STRING_free(ret->distinguishing_id);
   57|       |
   58|       |        /* fall through */
   59|       |
   60|   381k|    case ASN1_OP_NEW_POST:
  ------------------
  |  |  732|   381k|#define ASN1_OP_NEW_POST 1
  ------------------
  |  Branch (60:5): [True: 190k, False: 986k]
  ------------------
   61|   381k|        ret->ex_cached = 0;
   62|   381k|        ret->ex_kusage = 0;
   63|   381k|        ret->ex_xkusage = 0;
   64|   381k|        ret->ex_nscert = 0;
   65|   381k|        ret->ex_flags = 0;
   66|   381k|        ret->ex_pathlen = -1;
   67|   381k|        ret->ex_pcpathlen = -1;
   68|   381k|        ret->skid = NULL;
   69|   381k|        ret->akid = NULL;
   70|   381k|        ret->policy_cache = NULL;
   71|   381k|        ret->altname = NULL;
   72|   381k|        ret->nc = NULL;
   73|   381k|#ifndef OPENSSL_NO_RFC3779
   74|   381k|        ret->rfc3779_addr = NULL;
   75|   381k|        ret->rfc3779_asid = NULL;
   76|   381k|#endif
   77|   381k|        ret->distinguishing_id = NULL;
   78|   381k|        ret->aux = NULL;
   79|   381k|        ret->crldp = NULL;
   80|   381k|        if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data))
  ------------------
  |  |  253|   381k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
  |  Branch (80:13): [True: 0, False: 381k]
  ------------------
   81|      0|            return 0;
   82|   381k|        break;
   83|       |
   84|   381k|    case ASN1_OP_FREE_POST:
  ------------------
  |  |  734|   190k|#define ASN1_OP_FREE_POST 3
  ------------------
  |  Branch (84:5): [True: 190k, False: 986k]
  ------------------
   85|   190k|        CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509, ret, &ret->ex_data);
  ------------------
  |  |  253|   190k|#define CRYPTO_EX_INDEX_X509 3
  ------------------
   86|   190k|        X509_CERT_AUX_free(ret->aux);
   87|   190k|        ASN1_OCTET_STRING_free(ret->skid);
   88|   190k|        AUTHORITY_KEYID_free(ret->akid);
   89|   190k|        CRL_DIST_POINTS_free(ret->crldp);
   90|   190k|        ossl_policy_cache_free(ret->policy_cache);
   91|   190k|        GENERAL_NAMES_free(ret->altname);
   92|   190k|        NAME_CONSTRAINTS_free(ret->nc);
   93|   190k|#ifndef OPENSSL_NO_RFC3779
   94|   190k|        sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
  ------------------
  |  | 1263|   190k|#define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_freefunc_type(freefunc))
  ------------------
   95|   190k|        ASIdentifiers_free(ret->rfc3779_asid);
   96|   190k|#endif
   97|   190k|        ASN1_OCTET_STRING_free(ret->distinguishing_id);
   98|   190k|        OPENSSL_free(ret->propq);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   99|   190k|        break;
  100|       |
  101|      0|    case ASN1_OP_DUP_POST: {
  ------------------
  |  |  746|      0|#define ASN1_OP_DUP_POST 15
  ------------------
  |  Branch (101:5): [True: 0, False: 1.17M]
  ------------------
  102|      0|        X509 *old = exarg;
  103|       |
  104|      0|        if (!ossl_x509_set0_libctx(ret, old->libctx, old->propq))
  ------------------
  |  Branch (104:13): [True: 0, False: 0]
  ------------------
  105|      0|            return 0;
  106|      0|    } break;
  107|      0|    case ASN1_OP_GET0_LIBCTX: {
  ------------------
  |  |  747|      0|#define ASN1_OP_GET0_LIBCTX 16
  ------------------
  |  Branch (107:5): [True: 0, False: 1.17M]
  ------------------
  108|      0|        OSSL_LIB_CTX **libctx = exarg;
  109|       |
  110|      0|        *libctx = ret->libctx;
  111|      0|    } break;
  112|       |
  113|      0|    case ASN1_OP_GET0_PROPQ: {
  ------------------
  |  |  748|      0|#define ASN1_OP_GET0_PROPQ 17
  ------------------
  |  Branch (113:5): [True: 0, False: 1.17M]
  ------------------
  114|      0|        const char **propq = exarg;
  115|       |
  116|      0|        *propq = ret->propq;
  117|      0|    } break;
  118|       |
  119|   605k|    default:
  ------------------
  |  Branch (119:5): [True: 605k, False: 572k]
  ------------------
  120|   605k|        break;
  121|  1.17M|    }
  122|       |
  123|  1.17M|    return 1;
  124|  1.17M|}

engine_load_padlock_int:
   46|      1|{
   47|       |/* On non-x86 CPUs it just returns. */
   48|      1|#ifdef COMPILE_PADLOCKENG
   49|      1|    ENGINE *toadd = ENGINE_padlock();
   50|      1|    if (!toadd)
  ------------------
  |  Branch (50:9): [True: 0, False: 1]
  ------------------
   51|      0|        return;
   52|      1|    ERR_set_mark();
   53|      1|    ENGINE_add(toadd);
   54|       |    /*
   55|       |     * If the "add" worked, it gets a structural reference. So either way, we
   56|       |     * release our just-created reference.
   57|       |     */
   58|      1|    ENGINE_free(toadd);
   59|       |    /*
   60|       |     * If the "add" didn't work, it was probably a conflict because it was
   61|       |     * already added (eg. someone calling ENGINE_load_blah then calling
   62|       |     * ENGINE_load_builtin_engines() perhaps).
   63|       |     */
   64|      1|    ERR_pop_to_mark();
   65|      1|#endif
   66|      1|}
e_padlock.c:ENGINE_padlock:
  123|      1|{
  124|      1|    ENGINE *eng = ENGINE_new();
  125|       |
  126|      1|    if (eng == NULL) {
  ------------------
  |  Branch (126:9): [True: 0, False: 1]
  ------------------
  127|      0|        return NULL;
  128|      0|    }
  129|       |
  130|      1|    if (!padlock_bind_helper(eng)) {
  ------------------
  |  Branch (130:9): [True: 0, False: 1]
  ------------------
  131|      0|        ENGINE_free(eng);
  132|      0|        return NULL;
  133|      0|    }
  134|       |
  135|      1|    return eng;
  136|      1|}
e_padlock.c:padlock_bind_helper:
   95|      1|{
   96|       |    /* Check available features */
   97|      1|    padlock_available();
   98|       |
   99|       |    /*
  100|       |     * RNG is currently disabled for reasons discussed in commentary just
  101|       |     * before padlock_rand_bytes function.
  102|       |     */
  103|      1|    padlock_use_rng = 0;
  104|       |
  105|       |    /* Generate a nice engine name with available features */
  106|      1|    BIO_snprintf(padlock_name, sizeof(padlock_name),
  107|      1|        "VIA PadLock (%s, %s)",
  108|      1|        padlock_use_rng ? "RNG" : "no-RNG",
  ------------------
  |  Branch (108:9): [True: 0, False: 1]
  ------------------
  109|      1|        padlock_use_ace ? "ACE" : "no-ACE");
  ------------------
  |  Branch (109:9): [True: 0, False: 1]
  ------------------
  110|       |
  111|       |    /* Register everything or return with an error */
  112|      1|    if (!ENGINE_set_id(e, padlock_id) || !ENGINE_set_name(e, padlock_name) || !ENGINE_set_init_function(e, padlock_init) || (padlock_use_ace && !ENGINE_set_ciphers(e, padlock_ciphers)) || (padlock_use_rng && !ENGINE_set_RAND(e, &padlock_rand))) {
  ------------------
  |  Branch (112:9): [True: 0, False: 1]
  |  Branch (112:42): [True: 0, False: 1]
  |  Branch (112:79): [True: 0, False: 1]
  |  Branch (112:126): [True: 0, False: 1]
  |  Branch (112:145): [True: 0, False: 0]
  |  Branch (112:190): [True: 0, False: 1]
  |  Branch (112:209): [True: 0, False: 0]
  ------------------
  113|      0|        return 0;
  114|      0|    }
  115|       |
  116|       |    /* Everything looks good */
  117|      1|    return 1;
  118|      1|}
e_padlock.c:padlock_available:
  241|      1|{
  242|      1|    unsigned int edx = padlock_capability();
  243|       |
  244|       |    /* Fill up some flags */
  245|      1|    padlock_use_ace = ((edx & (0x3 << 6)) == (0x3 << 6));
  246|      1|    padlock_use_rng = ((edx & (0x3 << 2)) == (0x3 << 2));
  247|       |
  248|      1|    return padlock_use_ace + padlock_use_rng;
  249|      1|}
e_padlock.c:padlock_init:
  141|      4|{
  142|      4|    return (padlock_use_rng || padlock_use_ace);
  ------------------
  |  Branch (142:13): [True: 0, False: 4]
  |  Branch (142:32): [True: 0, False: 4]
  ------------------
  143|      4|}

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

MD5_Update:
  158|  2.81k|{
  159|  2.81k|    const unsigned char *data = data_;
  160|  2.81k|    unsigned char *p;
  161|  2.81k|    HASH_LONG l;
  ------------------
  |  |   29|  2.81k|#define HASH_LONG MD5_LONG
  |  |  ------------------
  |  |  |  |   36|  2.81k|#define MD5_LONG unsigned int
  |  |  ------------------
  ------------------
  162|  2.81k|    size_t n;
  163|       |
  164|  2.81k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  165|      0|        return 1;
  166|       |
  167|  2.81k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  168|  2.81k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|  2.81k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  169|      0|        c->Nh++;
  170|  2.81k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  171|       |                                      * 16-bit */
  172|  2.81k|    c->Nl = l;
  173|       |
  174|  2.81k|    n = c->num;
  175|  2.81k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|  2.81k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 2.81k]
  |  |  ------------------
  ------------------
  176|      0|        p = (unsigned char *)c->data;
  177|       |
  178|      0|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   31|      0|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|      0|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   31|      0|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|      0|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  |  Branch (178:35): [True: 0, False: 0]
  ------------------
  179|      0|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   31|      0|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|      0|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  180|      0|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   47|      0|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|      0|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  181|      0|            n = HASH_CBLOCK - n;
  ------------------
  |  |   31|      0|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|      0|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  182|      0|            data += n;
  183|      0|            len -= n;
  184|      0|            c->num = 0;
  185|       |            /*
  186|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  187|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  188|       |             * will get properly cleansed on finalisation so this isn't a
  189|       |             * security problem.
  190|       |             */
  191|      0|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   31|      0|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|      0|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  192|      0|        } else {
  193|      0|            memcpy(p + n, data, len);
  194|      0|            c->num += (unsigned int)len;
  195|      0|            return 1;
  196|      0|        }
  197|      0|    }
  198|       |
  199|  2.81k|    n = len / HASH_CBLOCK;
  ------------------
  |  |   31|  2.81k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  2.81k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  200|  2.81k|    if (n > 0) {
  ------------------
  |  Branch (200:9): [True: 1.15k, False: 1.66k]
  ------------------
  201|  1.15k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |   47|  1.15k|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|  1.15k|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  202|  1.15k|        n *= HASH_CBLOCK;
  ------------------
  |  |   31|  1.15k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  1.15k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  203|  1.15k|        data += n;
  204|  1.15k|        len -= n;
  205|  1.15k|    }
  206|       |
  207|  2.81k|    if (len != 0) {
  ------------------
  |  Branch (207:9): [True: 2.65k, False: 162]
  ------------------
  208|  2.65k|        p = (unsigned char *)c->data;
  209|  2.65k|        c->num = (unsigned int)len;
  210|  2.65k|        memcpy(p, data, len);
  211|  2.65k|    }
  212|  2.81k|    return 1;
  213|  2.81k|}
MD5_Final:
  221|  2.81k|{
  222|  2.81k|    unsigned char *p = (unsigned char *)c->data;
  223|  2.81k|    size_t n = c->num;
  224|       |
  225|  2.81k|    p[n] = 0x80; /* there is always room for one */
  226|  2.81k|    n++;
  227|       |
  228|  2.81k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   31|  2.81k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  2.81k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  |  Branch (228:9): [True: 456, False: 2.36k]
  ------------------
  229|    456|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   31|    456|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|    456|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  230|    456|        n = 0;
  231|    456|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   47|    456|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|    456|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  232|    456|    }
  233|  2.81k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   31|  2.81k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  2.81k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  234|       |
  235|  2.81k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   31|  2.81k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  2.81k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  236|       |#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  237|       |    (void)HOST_l2c(c->Nh, p);
  238|       |    (void)HOST_l2c(c->Nl, p);
  239|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  240|  2.81k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  145|  2.81k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  146|  2.81k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  147|  2.81k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  148|  2.81k|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  149|  2.81k|    l)
  ------------------
  241|  2.81k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  145|  2.81k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  146|  2.81k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  147|  2.81k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  148|  2.81k|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  149|  2.81k|    l)
  ------------------
  242|  2.81k|#endif
  243|  2.81k|    p -= HASH_CBLOCK;
  ------------------
  |  |   31|  2.81k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  2.81k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  244|  2.81k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   47|  2.81k|#define HASH_BLOCK_DATA_ORDER md5_block_data_order
  |  |  ------------------
  |  |  |  |   17|  2.81k|#define md5_block_data_order ossl_md5_block_asm_data_order
  |  |  ------------------
  ------------------
  245|  2.81k|    c->num = 0;
  246|  2.81k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   31|  2.81k|#define HASH_CBLOCK MD5_CBLOCK
  |  |  ------------------
  |  |  |  |   38|  2.81k|#define MD5_CBLOCK 64
  |  |  ------------------
  ------------------
  247|       |
  248|       |#ifndef HASH_MAKE_STRING
  249|       |#error "HASH_MAKE_STRING must be defined!"
  250|       |#else
  251|  2.81k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   36|  2.81k|    do {                         \
  |  |   37|  2.81k|        unsigned long ll;        \
  |  |   38|  2.81k|        ll = (c)->A;             \
  |  |   39|  2.81k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|  2.81k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|  2.81k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|  2.81k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|  2.81k|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|  2.81k|    l)
  |  |  ------------------
  |  |   40|  2.81k|        ll = (c)->B;             \
  |  |   41|  2.81k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|  2.81k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|  2.81k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|  2.81k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|  2.81k|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|  2.81k|    l)
  |  |  ------------------
  |  |   42|  2.81k|        ll = (c)->C;             \
  |  |   43|  2.81k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|  2.81k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|  2.81k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|  2.81k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|  2.81k|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|  2.81k|    l)
  |  |  ------------------
  |  |   44|  2.81k|        ll = (c)->D;             \
  |  |   45|  2.81k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  145|  2.81k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l)) & 0xff), \
  |  |  |  |  146|  2.81k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                \
  |  |  |  |  147|  2.81k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),               \
  |  |  |  |  148|  2.81k|    *((c)++) = (unsigned char)(((l) >> 24) & 0xff),               \
  |  |  |  |  149|  2.81k|    l)
  |  |  ------------------
  |  |   46|  2.81k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (46:14): [Folded, False: 2.81k]
  |  |  ------------------
  ------------------
  252|  2.81k|#endif
  253|       |
  254|  2.81k|    return 1;
  255|  2.81k|}
SHA1_Update:
  158|  11.0k|{
  159|  11.0k|    const unsigned char *data = data_;
  160|  11.0k|    unsigned char *p;
  161|  11.0k|    HASH_LONG l;
  ------------------
  |  |   19|  11.0k|#define HASH_LONG SHA_LONG
  |  |  ------------------
  |  |  |  |   34|  11.0k|#define SHA_LONG unsigned int
  |  |  ------------------
  ------------------
  162|  11.0k|    size_t n;
  163|       |
  164|  11.0k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  11.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
  165|      0|        return 1;
  166|       |
  167|  11.0k|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  168|  11.0k|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|  11.0k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
  169|      0|        c->Nh++;
  170|  11.0k|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  171|       |                                      * 16-bit */
  172|  11.0k|    c->Nl = l;
  173|       |
  174|  11.0k|    n = c->num;
  175|  11.0k|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|  11.0k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 11.0k]
  |  |  ------------------
  ------------------
  176|      0|        p = (unsigned char *)c->data;
  177|       |
  178|      0|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (178:13): [True: 0, False: 0]
  |  Branch (178:35): [True: 0, False: 0]
  ------------------
  179|      0|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  180|      0|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   41|      0|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  181|      0|            n = HASH_CBLOCK - n;
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|      0|            data += n;
  183|      0|            len -= n;
  184|      0|            c->num = 0;
  185|       |            /*
  186|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  187|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  188|       |             * will get properly cleansed on finalisation so this isn't a
  189|       |             * security problem.
  190|       |             */
  191|      0|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   21|      0|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|      0|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|      0|        } else {
  193|      0|            memcpy(p + n, data, len);
  194|      0|            c->num += (unsigned int)len;
  195|      0|            return 1;
  196|      0|        }
  197|      0|    }
  198|       |
  199|  11.0k|    n = len / HASH_CBLOCK;
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|  11.0k|    if (n > 0) {
  ------------------
  |  Branch (200:9): [True: 11.0k, False: 0]
  ------------------
  201|  11.0k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |   41|  11.0k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  202|  11.0k|        n *= HASH_CBLOCK;
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|  11.0k|        data += n;
  204|  11.0k|        len -= n;
  205|  11.0k|    }
  206|       |
  207|  11.0k|    if (len != 0) {
  ------------------
  |  Branch (207:9): [True: 11.0k, False: 76]
  ------------------
  208|  11.0k|        p = (unsigned char *)c->data;
  209|  11.0k|        c->num = (unsigned int)len;
  210|  11.0k|        memcpy(p, data, len);
  211|  11.0k|    }
  212|  11.0k|    return 1;
  213|  11.0k|}
SHA1_Final:
  221|  11.0k|{
  222|  11.0k|    unsigned char *p = (unsigned char *)c->data;
  223|  11.0k|    size_t n = c->num;
  224|       |
  225|  11.0k|    p[n] = 0x80; /* there is always room for one */
  226|  11.0k|    n++;
  227|       |
  228|  11.0k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (228:9): [True: 1.67k, False: 9.42k]
  ------------------
  229|  1.67k|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   21|  1.67k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  1.67k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.67k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|  1.67k|        n = 0;
  231|  1.67k|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   41|  1.67k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  232|  1.67k|    }
  233|  11.0k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  234|       |
  235|  11.0k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|  11.0k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  237|  11.0k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  11.0k|    l)
  ------------------
  238|  11.0k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  11.0k|    l)
  ------------------
  239|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  240|       |    (void)HOST_l2c(c->Nl, p);
  241|       |    (void)HOST_l2c(c->Nh, p);
  242|       |#endif
  243|  11.0k|    p -= HASH_CBLOCK;
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|  11.0k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |   41|  11.0k|#define HASH_BLOCK_DATA_ORDER sha1_block_data_order
  ------------------
  245|  11.0k|    c->num = 0;
  246|  11.0k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   21|  11.0k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  11.0k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  11.0k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|       |
  248|       |#ifndef HASH_MAKE_STRING
  249|       |#error "HASH_MAKE_STRING must be defined!"
  250|       |#else
  251|  11.0k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   23|  11.0k|    do {                         \
  |  |   24|  11.0k|        unsigned long ll;        \
  |  |   25|  11.0k|        ll = (c)->h0;            \
  |  |   26|  11.0k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  11.0k|    l)
  |  |  ------------------
  |  |   27|  11.0k|        ll = (c)->h1;            \
  |  |   28|  11.0k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  11.0k|    l)
  |  |  ------------------
  |  |   29|  11.0k|        ll = (c)->h2;            \
  |  |   30|  11.0k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  11.0k|    l)
  |  |  ------------------
  |  |   31|  11.0k|        ll = (c)->h3;            \
  |  |   32|  11.0k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  11.0k|    l)
  |  |  ------------------
  |  |   33|  11.0k|        ll = (c)->h4;            \
  |  |   34|  11.0k|        (void)HOST_l2c(ll, (s)); \
  |  |  ------------------
  |  |  |  |  133|  11.0k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|  11.0k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|  11.0k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|  11.0k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|  11.0k|    l)
  |  |  ------------------
  |  |   35|  11.0k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (35:14): [Folded, False: 11.0k]
  |  |  ------------------
  ------------------
  252|  11.0k|#endif
  253|       |
  254|  11.0k|    return 1;
  255|  11.0k|}
SHA256_Update:
  158|  1.74M|{
  159|  1.74M|    const unsigned char *data = data_;
  160|  1.74M|    unsigned char *p;
  161|  1.74M|    HASH_LONG l;
  ------------------
  |  |   76|  1.74M|#define HASH_LONG SHA_LONG
  |  |  ------------------
  |  |  |  |   34|  1.74M|#define SHA_LONG unsigned int
  |  |  ------------------
  ------------------
  162|  1.74M|    size_t n;
  163|       |
  164|  1.74M|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  1.74M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.74M]
  |  |  ------------------
  ------------------
  165|      0|        return 1;
  166|       |
  167|  1.74M|    l = (c->Nl + (((HASH_LONG)len) << 3)) & 0xffffffffUL;
  168|  1.74M|    if (ossl_unlikely(l < c->Nl)) /* overflow */
  ------------------
  |  |   23|  1.74M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.74M]
  |  |  ------------------
  ------------------
  169|      0|        c->Nh++;
  170|  1.74M|    c->Nh += (HASH_LONG)(len >> 29); /* might cause compiler warning on
  171|       |                                      * 16-bit */
  172|  1.74M|    c->Nl = l;
  173|       |
  174|  1.74M|    n = c->num;
  175|  1.74M|    if (ossl_likely(n != 0)) {
  ------------------
  |  |   22|  1.74M|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.68M, False: 56.3k]
  |  |  ------------------
  ------------------
  176|  1.68M|        p = (unsigned char *)c->data;
  177|       |
  178|  1.68M|        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|  1.68M|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  3.37M|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.68M|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  ------------------
  |  |   78|  1.68M|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  1.68M|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.68M|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (178:13): [True: 0, False: 1.68M]
  |  Branch (178:35): [True: 26.8k, False: 1.66M]
  ------------------
  179|  26.8k|            memcpy(p + n, data, HASH_CBLOCK - n);
  ------------------
  |  |   78|  26.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  26.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  26.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  180|  26.8k|            HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  125|  26.8k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  181|  26.8k|            n = HASH_CBLOCK - n;
  ------------------
  |  |   78|  26.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  26.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  26.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|  26.8k|            data += n;
  183|  26.8k|            len -= n;
  184|  26.8k|            c->num = 0;
  185|       |            /*
  186|       |             * We use memset rather than OPENSSL_cleanse() here deliberately.
  187|       |             * Using OPENSSL_cleanse() here could be a performance issue. It
  188|       |             * will get properly cleansed on finalisation so this isn't a
  189|       |             * security problem.
  190|       |             */
  191|  26.8k|            memset(p, 0, HASH_CBLOCK); /* keep it zeroed */
  ------------------
  |  |   78|  26.8k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  26.8k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  26.8k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|  1.66M|        } else {
  193|  1.66M|            memcpy(p + n, data, len);
  194|  1.66M|            c->num += (unsigned int)len;
  195|  1.66M|            return 1;
  196|  1.66M|        }
  197|  1.68M|    }
  198|       |
  199|  83.1k|    n = len / HASH_CBLOCK;
  ------------------
  |  |   78|  83.1k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  83.1k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  83.1k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|  83.1k|    if (n > 0) {
  ------------------
  |  Branch (200:9): [True: 5.58k, False: 77.5k]
  ------------------
  201|  5.58k|        HASH_BLOCK_DATA_ORDER(c, data, n);
  ------------------
  |  |  125|  5.58k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  202|  5.58k|        n *= HASH_CBLOCK;
  ------------------
  |  |   78|  5.58k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  5.58k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  5.58k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  203|  5.58k|        data += n;
  204|  5.58k|        len -= n;
  205|  5.58k|    }
  206|       |
  207|  83.1k|    if (len != 0) {
  ------------------
  |  Branch (207:9): [True: 56.2k, False: 26.9k]
  ------------------
  208|  56.2k|        p = (unsigned char *)c->data;
  209|  56.2k|        c->num = (unsigned int)len;
  210|  56.2k|        memcpy(p, data, len);
  211|  56.2k|    }
  212|  83.1k|    return 1;
  213|  1.74M|}
SHA256_Final:
  221|  32.2k|{
  222|  32.2k|    unsigned char *p = (unsigned char *)c->data;
  223|  32.2k|    size_t n = c->num;
  224|       |
  225|  32.2k|    p[n] = 0x80; /* there is always room for one */
  226|  32.2k|    n++;
  227|       |
  228|  32.2k|    if (n > (HASH_CBLOCK - 8)) {
  ------------------
  |  |   78|  32.2k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.2k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.2k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (228:9): [True: 2.56k, False: 29.7k]
  ------------------
  229|  2.56k|        memset(p + n, 0, HASH_CBLOCK - n);
  ------------------
  |  |   78|  2.56k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  2.56k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  2.56k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  230|  2.56k|        n = 0;
  231|  2.56k|        HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  125|  2.56k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  232|  2.56k|    }
  233|  32.2k|    memset(p + n, 0, HASH_CBLOCK - 8 - n);
  ------------------
  |  |   78|  32.2k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.2k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.2k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  234|       |
  235|  32.2k|    p += HASH_CBLOCK - 8;
  ------------------
  |  |   78|  32.2k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.2k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.2k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  236|  32.2k|#if defined(DATA_ORDER_IS_BIG_ENDIAN)
  237|  32.2k|    (void)HOST_l2c(c->Nh, p);
  ------------------
  |  |  133|  32.2k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  32.2k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  32.2k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  32.2k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  32.2k|    l)
  ------------------
  238|  32.2k|    (void)HOST_l2c(c->Nl, p);
  ------------------
  |  |  133|  32.2k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  134|  32.2k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  135|  32.2k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  136|  32.2k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  137|  32.2k|    l)
  ------------------
  239|       |#elif defined(DATA_ORDER_IS_LITTLE_ENDIAN)
  240|       |    (void)HOST_l2c(c->Nl, p);
  241|       |    (void)HOST_l2c(c->Nh, p);
  242|       |#endif
  243|  32.2k|    p -= HASH_CBLOCK;
  ------------------
  |  |   78|  32.2k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.2k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.2k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  244|  32.2k|    HASH_BLOCK_DATA_ORDER(c, p, 1);
  ------------------
  |  |  125|  32.2k|#define HASH_BLOCK_DATA_ORDER sha256_block_data_order
  ------------------
  245|  32.2k|    c->num = 0;
  246|  32.2k|    OPENSSL_cleanse(p, HASH_CBLOCK);
  ------------------
  |  |   78|  32.2k|#define HASH_CBLOCK SHA_CBLOCK
  |  |  ------------------
  |  |  |  |   37|  32.2k|#define SHA_CBLOCK (SHA_LBLOCK * 4) /* SHA treats input data as a      \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  32.2k|#define SHA_LBLOCK 16
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  247|       |
  248|       |#ifndef HASH_MAKE_STRING
  249|       |#error "HASH_MAKE_STRING must be defined!"
  250|       |#else
  251|  32.2k|    HASH_MAKE_STRING(c, md);
  ------------------
  |  |   89|  32.2k|    do {                                                            \
  |  |   90|  32.2k|        unsigned long ll;                                           \
  |  |   91|  32.2k|        unsigned int nn;                                            \
  |  |   92|  32.2k|        switch ((c)->md_len) {                                      \
  |  |   93|      0|        case SHA256_192_DIGEST_LENGTH:                              \
  |  |  ------------------
  |  |  |  |   84|      0|#define SHA256_192_DIGEST_LENGTH 24
  |  |  ------------------
  |  |  |  Branch (93:9): [True: 0, False: 32.2k]
  |  |  ------------------
  |  |   94|      0|            for (nn = 0; nn < SHA256_192_DIGEST_LENGTH / 4; nn++) { \
  |  |  ------------------
  |  |  |  |   84|      0|#define SHA256_192_DIGEST_LENGTH 24
  |  |  ------------------
  |  |  |  Branch (94:26): [True: 0, False: 0]
  |  |  ------------------
  |  |   95|      0|                ll = (c)->h[nn];                                    \
  |  |   96|      0|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|      0|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|      0|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|      0|    l)
  |  |  ------------------
  |  |   97|      0|            }                                                       \
  |  |   98|      0|            break;                                                  \
  |  |   99|      0|        case SHA224_DIGEST_LENGTH:                                  \
  |  |  ------------------
  |  |  |  |   85|      0|#define SHA224_DIGEST_LENGTH 28
  |  |  ------------------
  |  |  |  Branch (99:9): [True: 0, False: 32.2k]
  |  |  ------------------
  |  |  100|      0|            for (nn = 0; nn < SHA224_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   85|      0|#define SHA224_DIGEST_LENGTH 28
  |  |  ------------------
  |  |  |  Branch (100:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  101|      0|                ll = (c)->h[nn];                                    \
  |  |  102|      0|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|      0|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|      0|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|      0|    l)
  |  |  ------------------
  |  |  103|      0|            }                                                       \
  |  |  104|      0|            break;                                                  \
  |  |  105|  32.2k|        case SHA256_DIGEST_LENGTH:                                  \
  |  |  ------------------
  |  |  |  |   86|  32.2k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (105:9): [True: 32.2k, False: 0]
  |  |  ------------------
  |  |  106|   290k|            for (nn = 0; nn < SHA256_DIGEST_LENGTH / 4; nn++) {     \
  |  |  ------------------
  |  |  |  |   86|   290k|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (106:26): [True: 258k, False: 32.2k]
  |  |  ------------------
  |  |  107|   258k|                ll = (c)->h[nn];                                    \
  |  |  108|   258k|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|   258k|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|   258k|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|   258k|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|   258k|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|   258k|    l)
  |  |  ------------------
  |  |  109|   258k|            }                                                       \
  |  |  110|  32.2k|            break;                                                  \
  |  |  111|      0|        default:                                                    \
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 32.2k]
  |  |  ------------------
  |  |  112|      0|            if ((c)->md_len > SHA256_DIGEST_LENGTH)                 \
  |  |  ------------------
  |  |  |  |   86|      0|#define SHA256_DIGEST_LENGTH 32
  |  |  ------------------
  |  |  |  Branch (112:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  113|      0|                return 0;                                           \
  |  |  114|      0|            for (nn = 0; nn < (c)->md_len / 4; nn++) {              \
  |  |  ------------------
  |  |  |  Branch (114:26): [True: 0, False: 0]
  |  |  ------------------
  |  |  115|      0|                ll = (c)->h[nn];                                    \
  |  |  116|      0|                (void)HOST_l2c(ll, (s));                            \
  |  |  ------------------
  |  |  |  |  133|      0|#define HOST_l2c(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  |  |  134|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                     \
  |  |  |  |  135|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                      \
  |  |  |  |  136|      0|    *((c)++) = (unsigned char)(((l)) & 0xff),                           \
  |  |  |  |  137|      0|    l)
  |  |  ------------------
  |  |  117|      0|            }                                                       \
  |  |  118|      0|            break;                                                  \
  |  |  119|  32.2k|        }                                                           \
  |  |  120|  32.2k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (120:14): [Folded, False: 32.2k]
  |  |  ------------------
  ------------------
  252|  32.2k|#endif
  253|       |
  254|  32.2k|    return 1;
  255|  32.2k|}

threads_common.c:ossl_sa_CTX_TABLE_ENTRY_get:
   60|  9.31M|    {                                                                                                              \
   61|  9.31M|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|  9.31M|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_new:
   26|      3|    {                                                                                                              \
   27|      3|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|      3|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_set:
   66|  2.00k|    {                                                                                                              \
   67|  2.00k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|  2.00k|    }                                                                                                              \
threads_common.c:ossl_sa_CTX_TABLE_ENTRY_free:
   31|      3|    {                                                                                                              \
   32|      3|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|      3|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_new:
   26|  2.78k|    {                                                                                                              \
   27|  2.78k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|  2.78k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall_arg:
   55|  3.11k|    {                                                                                                              \
   56|  3.11k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|  3.11k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|  3.11k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_set:
   66|   282k|    {                                                                                                              \
   67|   282k|        return ossl_sa_set((OPENSSL_SA *)sa, n, (void *)val);                                                      \
   68|   282k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_free:
   31|  2.78k|    {                                                                                                              \
   32|  2.78k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|  2.78k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_get:
   60|   653k|    {                                                                                                              \
   61|   653k|        return (type *)ossl_sa_get((OPENSSL_SA *)sa, n);                                                           \
   62|   653k|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_num:
   41|      6|    {                                                                                                              \
   42|      6|        return ossl_sa_num((OPENSSL_SA *)sa);                                                                      \
   43|      6|    }                                                                                                              \
property.c:ossl_sa_ALGORITHM_doall:
   47|    324|    {                                                                                                              \
   48|    324|        ossl_sa_doall((OPENSSL_SA *)sa,                                                                            \
   49|    324|            (void (*)(ossl_uintmax_t, void *))leaf);                                                               \
   50|    324|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_doall_arg:
   55|   138k|    {                                                                                                              \
   56|   138k|        ossl_sa_doall_arg((OPENSSL_SA *)sa,                                                                        \
   57|   138k|            (void (*)(ossl_uintmax_t, void *, void *))leaf, arg);                                                  \
   58|   138k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_free:
   31|   138k|    {                                                                                                              \
   32|   138k|        ossl_sa_free((OPENSSL_SA *)sa);                                                                            \
   33|   138k|    }                                                                                                              \
rsa_ossl.c:ossl_sa_BN_BLINDING_new:
   26|   138k|    {                                                                                                              \
   27|   138k|        return (SPARSE_ARRAY_OF(type) *)ossl_sa_new();                                                             \
   28|   138k|    }                                                                                                              \

s3_lib.c:ossl_assert_int:
   45|  2.61k|{
   46|  2.61k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.61k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.61k|    return expr;
   50|  2.61k|}
ssl_cert.c:ossl_assert_int:
   45|  2.09k|{
   46|  2.09k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.09k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.09k|    return expr;
   50|  2.09k|}
ssl_ciph.c:ossl_assert_int:
   45|  14.4k|{
   46|  14.4k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 14.4k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  14.4k|    return expr;
   50|  14.4k|}
ssl_lib.c:ossl_assert_int:
   45|  1.31k|{
   46|  1.31k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.31k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.31k|    return expr;
   50|  1.31k|}
rec_layer_s3.c:ossl_assert_int:
   45|  7.89k|{
   46|  7.89k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.89k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.89k|    return expr;
   50|  7.89k|}
tls_common.c:ossl_assert_int:
   45|  7.29k|{
   46|  7.29k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 7.29k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  7.29k|    return expr;
   50|  7.29k|}
statem.c:ossl_assert_int:
   45|    119|{
   46|    119|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 119]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|    119|    return expr;
   50|    119|}
bio_print.c:ossl_assert_int:
   45|  60.3M|{
   46|  60.3M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 60.3M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  60.3M|    return expr;
   50|  60.3M|}
decoder_lib.c:ossl_assert_int:
   45|   953k|{
   46|   953k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 953k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   953k|    return expr;
   50|   953k|}
decoder_meth.c:ossl_assert_int:
   45|  1.99M|{
   46|  1.99M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.99M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.99M|    return expr;
   50|  1.99M|}
digest.c:ossl_assert_int:
   45|  19.7k|{
   46|  19.7k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 19.7k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  19.7k|    return expr;
   50|  19.7k|}
evp_enc.c:ossl_assert_int:
   45|  93.8k|{
   46|  93.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 93.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  93.8k|    return expr;
   50|  93.8k|}
evp_fetch.c:ossl_assert_int:
   45|  1.35M|{
   46|  1.35M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.35M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.35M|    return expr;
   50|  1.35M|}
p_lib.c:ossl_assert_int:
   45|  2.89M|{
   46|  2.89M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.89M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.89M|    return expr;
   50|  2.89M|}
pmeth_lib.c:ossl_assert_int:
   45|  56.1k|{
   46|  56.1k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 56.1k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  56.1k|    return expr;
   50|  56.1k|}
core_algorithm.c:ossl_assert_int:
   45|  1.00k|{
   46|  1.00k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.00k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.00k|    return expr;
   50|  1.00k|}
core_fetch.c:ossl_assert_int:
   45|  69.8k|{
   46|  69.8k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 69.8k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  69.8k|    return expr;
   50|  69.8k|}
core_namemap.c:ossl_assert_int:
   45|   318k|{
   46|   318k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 318k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   318k|    return expr;
   50|   318k|}
packet.c:ossl_assert_int:
   45|  1.30M|{
   46|  1.30M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 1.30M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  1.30M|    return expr;
   50|  1.30M|}
provider_core.c:ossl_assert_int:
   45|  68.0k|{
   46|  68.0k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 68.0k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  68.0k|    return expr;
   50|  68.0k|}
threads_common.c:ossl_assert_int:
   45|  9.31M|{
   46|  9.31M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 9.31M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  9.31M|    return expr;
   50|  9.31M|}
threads_pthread.c:ossl_assert_int:
   45|  8.50M|{
   46|  8.50M|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 8.50M]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  8.50M|    return expr;
   50|  8.50M|}
defn_cache.c:ossl_assert_int:
   45|   282k|{
   46|   282k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 282k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   282k|    return expr;
   50|   282k|}
property.c:ossl_assert_int:
   45|   166k|{
   46|   166k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 166k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   166k|    return expr;
   50|   166k|}
x_pubkey.c:ossl_assert_int:
   45|   381k|{
   46|   381k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 381k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|   381k|    return expr;
   50|   381k|}
drbg_ctr.c:ossl_assert_int:
   45|  6.50k|{
   46|  6.50k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 6.50k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  6.50k|    return expr;
   50|  6.50k|}
ml_kem.c:ossl_assert_int:
   45|  2.47k|{
   46|  2.47k|    if (!expr)
  ------------------
  |  Branch (46:9): [True: 0, False: 2.47k]
  ------------------
   47|      0|        OPENSSL_die(exprstr, file, line);
   48|       |
   49|  2.47k|    return expr;
   50|  2.47k|}

core_namemap.c:ossl_ht_strcase:
  264|  3.07M|{
  265|  3.07M|    int i;
  266|       |#if defined(CHARSET_EBCDIC) && !defined(CHARSET_EBCDIC_TEST)
  267|       |    const long int case_adjust = ~0x40;
  268|       |#else
  269|  3.07M|    const long int case_adjust = ~0x20;
  270|  3.07M|#endif
  271|       |
  272|  3.07M|    if (src == NULL)
  ------------------
  |  Branch (272:9): [True: 0, False: 3.07M]
  ------------------
  273|      0|        return;
  274|       |
  275|  35.3M|    for (i = 0; src[i] != '\0' && i < len; i++)
  ------------------
  |  Branch (275:17): [True: 32.4M, False: 2.97M]
  |  Branch (275:35): [True: 32.3M, False: 98.2k]
  ------------------
  276|  32.3M|        tgt[i] = case_adjust & src[i];
  277|  3.07M|}

array_alloc.c:ossl_size_mul:
   79|  10.1M|{
   80|  10.1M|    int err = 0;
   81|  10.1M|    *bytes = safe_mul_size_t(num, size, &err);
   82|       |
   83|  10.1M|    if (ossl_unlikely(err != 0)) {
  ------------------
  |  |   23|  10.1M|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 10.1M]
  |  |  ------------------
  ------------------
   84|      0|        ossl_report_alloc_err_of(file, line);
   85|       |
   86|      0|        return false;
   87|      0|    }
   88|       |
   89|  10.1M|    return true;
   90|  10.1M|}

rec_layer_s3.c:PACKET_buf_init:
   72|     48|{
   73|       |    /* Sanity check for negative values. */
   74|     48|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 48]
  ------------------
   75|      0|        return 0;
   76|       |
   77|     48|    pkt->curr = buf;
   78|     48|    pkt->remaining = len;
   79|     48|    return 1;
   80|     48|}
rec_layer_s3.c:PACKET_get_1:
  320|     95|{
  321|     95|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 2, False: 93]
  ------------------
  322|      2|        return 0;
  323|       |
  324|     93|    packet_forward(pkt, 1);
  325|       |
  326|     93|    return 1;
  327|     95|}
rec_layer_s3.c:PACKET_peek_1:
  309|     95|{
  310|     95|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 2, False: 93]
  ------------------
  311|      2|        return 0;
  312|       |
  313|     93|    *data = *pkt->curr;
  314|       |
  315|     93|    return 1;
  316|     95|}
rec_layer_s3.c:packet_forward:
   31|     93|{
   32|     93|    pkt->curr += len;
   33|     93|    pkt->remaining -= len;
   34|     93|}
rec_layer_s3.c:PACKET_remaining:
   40|    141|{
   41|    141|    return pkt->remaining;
   42|    141|}
tls_common.c:PACKET_buf_init:
   72|    420|{
   73|       |    /* Sanity check for negative values. */
   74|    420|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 420]
  ------------------
   75|      0|        return 0;
   76|       |
   77|    420|    pkt->curr = buf;
   78|    420|    pkt->remaining = len;
   79|    420|    return 1;
   80|    420|}
tls_common.c:PACKET_get_net_2_len:
  162|    840|{
  163|    840|    unsigned int i;
  164|    840|    int ret = PACKET_get_net_2(pkt, &i);
  165|       |
  166|    840|    if (ret)
  ------------------
  |  Branch (166:9): [True: 840, False: 0]
  ------------------
  167|    840|        *data = (size_t)i;
  168|       |
  169|    840|    return ret;
  170|    840|}
tls_common.c:PACKET_get_1:
  320|    840|{
  321|    840|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 0, False: 840]
  ------------------
  322|      0|        return 0;
  323|       |
  324|    840|    packet_forward(pkt, 1);
  325|       |
  326|    840|    return 1;
  327|    840|}
tls_common.c:PACKET_peek_1:
  309|    840|{
  310|    840|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 0, False: 840]
  ------------------
  311|      0|        return 0;
  312|       |
  313|    840|    *data = *pkt->curr;
  314|       |
  315|    840|    return 1;
  316|    840|}
tls_common.c:PACKET_remaining:
   40|  2.10k|{
   41|  2.10k|    return pkt->remaining;
   42|  2.10k|}
tls_common.c:packet_forward:
   31|  2.10k|{
   32|  2.10k|    pkt->curr += len;
   33|  2.10k|    pkt->remaining -= len;
   34|  2.10k|}
tls_common.c:PACKET_get_net_2:
  151|  1.26k|{
  152|  1.26k|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (152:9): [True: 0, False: 1.26k]
  ------------------
  153|      0|        return 0;
  154|       |
  155|  1.26k|    packet_forward(pkt, 2);
  156|       |
  157|  1.26k|    return 1;
  158|  1.26k|}
tls_common.c:PACKET_peek_net_2:
  138|  1.26k|{
  139|  1.26k|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (139:9): [True: 0, False: 1.26k]
  ------------------
  140|      0|        return 0;
  141|       |
  142|  1.26k|    *data = ((unsigned int)(*pkt->curr)) << 8;
  143|  1.26k|    *data |= *(pkt->curr + 1);
  144|       |
  145|  1.26k|    return 1;
  146|  1.26k|}
statem.c:PACKET_buf_init:
   72|     50|{
   73|       |    /* Sanity check for negative values. */
   74|     50|    if (len > (size_t)(SIZE_MAX / 2))
  ------------------
  |  Branch (74:9): [True: 0, False: 50]
  ------------------
   75|      0|        return 0;
   76|       |
   77|     50|    pkt->curr = buf;
   78|     50|    pkt->remaining = len;
   79|     50|    return 1;
   80|     50|}
statem_clnt.c:PACKET_forward:
  516|      1|{
  517|      1|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (517:9): [True: 0, False: 1]
  ------------------
  518|      0|        return 0;
  519|       |
  520|      1|    packet_forward(pkt, len);
  521|       |
  522|      1|    return 1;
  523|      1|}
statem_clnt.c:packet_forward:
   31|    168|{
   32|    168|    pkt->curr += len;
   33|    168|    pkt->remaining -= len;
   34|    168|}
statem_clnt.c:PACKET_get_length_prefixed_1:
  534|     45|{
  535|     45|    unsigned int length;
  536|     45|    const unsigned char *data;
  537|     45|    PACKET tmp = *pkt;
  538|     45|    if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) {
  ------------------
  |  Branch (538:9): [True: 1, False: 44]
  |  Branch (538:41): [True: 15, False: 29]
  ------------------
  539|     16|        return 0;
  540|     16|    }
  541|       |
  542|     29|    *pkt = tmp;
  543|     29|    subpkt->curr = data;
  544|     29|    subpkt->remaining = length;
  545|       |
  546|     29|    return 1;
  547|     45|}
statem_clnt.c:PACKET_remaining:
   40|    289|{
   41|    289|    return pkt->remaining;
   42|    289|}
statem_clnt.c:PACKET_copy_bytes:
  429|     48|{
  430|     48|    if (!PACKET_peek_copy_bytes(pkt, data, len))
  ------------------
  |  Branch (430:9): [True: 4, False: 44]
  ------------------
  431|      4|        return 0;
  432|       |
  433|     44|    packet_forward(pkt, len);
  434|       |
  435|     44|    return 1;
  436|     48|}
statem_clnt.c:PACKET_peek_copy_bytes:
  414|     48|{
  415|     48|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (415:9): [True: 4, False: 44]
  ------------------
  416|      4|        return 0;
  417|       |
  418|     44|    memcpy(data, pkt->curr, len);
  419|       |
  420|     44|    return 1;
  421|     48|}
statem_clnt.c:PACKET_get_net_2:
  151|     50|{
  152|     50|    if (!PACKET_peek_net_2(pkt, data))
  ------------------
  |  Branch (152:9): [True: 1, False: 49]
  ------------------
  153|      1|        return 0;
  154|       |
  155|     49|    packet_forward(pkt, 2);
  156|       |
  157|     49|    return 1;
  158|     50|}
statem_clnt.c:PACKET_peek_net_2:
  138|     50|{
  139|     50|    if (PACKET_remaining(pkt) < 2)
  ------------------
  |  Branch (139:9): [True: 1, False: 49]
  ------------------
  140|      1|        return 0;
  141|       |
  142|     49|    *data = ((unsigned int)(*pkt->curr)) << 8;
  143|     49|    *data |= *(pkt->curr + 1);
  144|       |
  145|     49|    return 1;
  146|     50|}
statem_clnt.c:PACKET_data:
   60|     40|{
   61|     40|    return pkt->curr;
   62|     40|}
statem_clnt.c:PACKET_get_bytes:
  401|     73|{
  402|     73|    if (!PACKET_peek_bytes(pkt, data, len))
  ------------------
  |  Branch (402:9): [True: 43, False: 30]
  ------------------
  403|     43|        return 0;
  404|       |
  405|     30|    packet_forward(pkt, len);
  406|       |
  407|     30|    return 1;
  408|     73|}
statem_clnt.c:PACKET_peek_bytes:
  383|     73|{
  384|     73|    if (PACKET_remaining(pkt) < len)
  ------------------
  |  Branch (384:9): [True: 43, False: 30]
  ------------------
  385|     43|        return 0;
  386|       |
  387|     30|    *data = pkt->curr;
  388|       |
  389|     30|    return 1;
  390|     73|}
statem_clnt.c:PACKET_get_1:
  320|     46|{
  321|     46|    if (!PACKET_peek_1(pkt, data))
  ------------------
  |  Branch (321:9): [True: 2, False: 44]
  ------------------
  322|      2|        return 0;
  323|       |
  324|     44|    packet_forward(pkt, 1);
  325|       |
  326|     44|    return 1;
  327|     46|}
statem_clnt.c:PACKET_peek_1:
  309|     46|{
  310|     46|    if (!PACKET_remaining(pkt))
  ------------------
  |  Branch (310:9): [True: 2, False: 44]
  ------------------
  311|      2|        return 0;
  312|       |
  313|     44|    *data = *pkt->curr;
  314|       |
  315|     44|    return 1;
  316|     46|}

ssl_cert.c:CRYPTO_NEW_REF:
  280|  3.40k|{
  281|  3.40k|    refcnt->val = n;
  282|  3.40k|    return 1;
  283|  3.40k|}
ssl_cert.c:CRYPTO_DOWN_REF:
   56|  3.40k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  3.40k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  3.40k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.40k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  3.40k|#endif
   68|  3.40k|    return 1;
   69|  3.40k|}
ssl_cert.c:CRYPTO_FREE_REF:
  286|  3.40k|{
  287|  3.40k|}
ssl_lib.c:CRYPTO_NEW_REF:
  280|  3.40k|{
  281|  3.40k|    refcnt->val = n;
  282|  3.40k|    return 1;
  283|  3.40k|}
ssl_lib.c:CRYPTO_FREE_REF:
  286|  3.40k|{
  287|  3.40k|}
ssl_lib.c:CRYPTO_UP_REF:
   40|  2.63k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  2.63k|    return 1;
   43|  2.63k|}
ssl_lib.c:CRYPTO_DOWN_REF:
   56|  6.04k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  6.04k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  6.04k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.40k, False: 2.63k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  6.04k|#endif
   68|  6.04k|    return 1;
   69|  6.04k|}
ssl_sess.c:CRYPTO_NEW_REF:
  280|  1.30k|{
  281|  1.30k|    refcnt->val = n;
  282|  1.30k|    return 1;
  283|  1.30k|}
ssl_sess.c:CRYPTO_FREE_REF:
  286|  1.30k|{
  287|  1.30k|}
ssl_sess.c:CRYPTO_DOWN_REF:
   56|  1.30k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  1.30k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.30k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.30k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.30k|#endif
   68|  1.30k|    return 1;
   69|  1.30k|}
tasn_utl.c:CRYPTO_NEW_REF:
  280|   190k|{
  281|   190k|    refcnt->val = n;
  282|   190k|    return 1;
  283|   190k|}
tasn_utl.c:CRYPTO_FREE_REF:
  286|   190k|{
  287|   190k|}
tasn_utl.c:CRYPTO_DOWN_REF:
   56|   381k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   381k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   381k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 190k, False: 190k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   381k|#endif
   68|   381k|    return 1;
   69|   381k|}
bio_lib.c:CRYPTO_NEW_REF:
  280|  1.15M|{
  281|  1.15M|    refcnt->val = n;
  282|  1.15M|    return 1;
  283|  1.15M|}
bio_lib.c:CRYPTO_FREE_REF:
  286|  1.15M|{
  287|  1.15M|}
bio_lib.c:CRYPTO_DOWN_REF:
   56|  1.55M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  1.55M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.55M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 1.15M, False: 394k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.55M|#endif
   68|  1.55M|    return 1;
   69|  1.55M|}
bio_lib.c:CRYPTO_UP_REF:
   40|   394k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   394k|    return 1;
   43|   394k|}
bio_lib.c:CRYPTO_GET_REF:
   72|  2.63k|{
   73|       |    *ret = atomic_load_explicit(&refcnt->val, memory_order_acquire);
   74|  2.63k|    return 1;
   75|  2.63k|}
dso_lib.c:CRYPTO_NEW_REF:
  280|    879|{
  281|    879|    refcnt->val = n;
  282|    879|    return 1;
  283|    879|}
dso_lib.c:CRYPTO_DOWN_REF:
   56|    879|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|    879|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|    879|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 879, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|    879|#endif
   68|    879|    return 1;
   69|    879|}
dso_lib.c:CRYPTO_FREE_REF:
  286|    879|{
  287|    879|}
ec_key.c:CRYPTO_DOWN_REF:
   56|   104k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   104k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   104k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 52.2k, False: 52.2k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   104k|#endif
   68|   104k|    return 1;
   69|   104k|}
ec_key.c:CRYPTO_FREE_REF:
  286|  52.2k|{
  287|  52.2k|}
ec_key.c:CRYPTO_UP_REF:
   40|  52.2k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  52.2k|    return 1;
   43|  52.2k|}
ec_kmeth.c:CRYPTO_NEW_REF:
  280|  52.2k|{
  281|  52.2k|    refcnt->val = n;
  282|  52.2k|    return 1;
  283|  52.2k|}
decoder_meth.c:CRYPTO_UP_REF:
   40|  1.09M|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  1.09M|    return 1;
   43|  1.09M|}
decoder_meth.c:CRYPTO_DOWN_REF:
   56|  1.09M|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  1.09M|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  1.09M|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 76, False: 1.09M]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  1.09M|#endif
   68|  1.09M|    return 1;
   69|  1.09M|}
decoder_meth.c:CRYPTO_FREE_REF:
  286|     76|{
  287|     76|}
decoder_meth.c:CRYPTO_NEW_REF:
  280|     76|{
  281|     76|    refcnt->val = n;
  282|     76|    return 1;
  283|     76|}
eng_init.c:CRYPTO_UP_REF:
   40|      5|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|      5|    return 1;
   43|      5|}
eng_lib.c:CRYPTO_NEW_REF:
  280|    728|{
  281|    728|    refcnt->val = n;
  282|    728|    return 1;
  283|    728|}
eng_lib.c:CRYPTO_FREE_REF:
  286|    728|{
  287|    728|}
eng_lib.c:CRYPTO_DOWN_REF:
   56|    746|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|    746|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|    746|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 728, False: 18]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|    746|#endif
   68|    746|    return 1;
   69|    746|}
eng_list.c:CRYPTO_UP_REF:
   40|     13|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|     13|    return 1;
   43|     13|}
digest.c:CRYPTO_NEW_REF:
  280|  14.2k|{
  281|  14.2k|    refcnt->val = n;
  282|  14.2k|    return 1;
  283|  14.2k|}
digest.c:CRYPTO_UP_REF:
   40|   102k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   102k|    return 1;
   43|   102k|}
digest.c:CRYPTO_DOWN_REF:
   56|   116k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   116k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   116k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 14.2k, False: 102k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   116k|#endif
   68|   116k|    return 1;
   69|   116k|}
evp_enc.c:CRYPTO_NEW_REF:
  280|  68.6k|{
  281|  68.6k|    refcnt->val = n;
  282|  68.6k|    return 1;
  283|  68.6k|}
evp_enc.c:CRYPTO_UP_REF:
   40|   112k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   112k|    return 1;
   43|   112k|}
evp_enc.c:CRYPTO_FREE_REF:
  286|  68.6k|{
  287|  68.6k|}
evp_enc.c:CRYPTO_DOWN_REF:
   56|   180k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   180k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   180k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 68.6k, False: 112k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   180k|#endif
   68|   180k|    return 1;
   69|   180k|}
evp_lib.c:CRYPTO_FREE_REF:
  286|  14.2k|{
  287|  14.2k|}
exchange.c:CRYPTO_DOWN_REF:
   56|  12.5k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  12.5k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  12.5k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 3.69k, False: 8.82k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  12.5k|#endif
   68|  12.5k|    return 1;
   69|  12.5k|}
exchange.c:CRYPTO_FREE_REF:
  286|  3.69k|{
  287|  3.69k|}
exchange.c:CRYPTO_UP_REF:
   40|  8.82k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  8.82k|    return 1;
   43|  8.82k|}
exchange.c:CRYPTO_NEW_REF:
  280|  3.69k|{
  281|  3.69k|    refcnt->val = n;
  282|  3.69k|    return 1;
  283|  3.69k|}
keymgmt_meth.c:CRYPTO_NEW_REF:
  280|  21.1k|{
  281|  21.1k|    refcnt->val = n;
  282|  21.1k|    return 1;
  283|  21.1k|}
keymgmt_meth.c:CRYPTO_UP_REF:
   40|   846k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   846k|    return 1;
   43|   846k|}
keymgmt_meth.c:CRYPTO_DOWN_REF:
   56|   867k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   867k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   867k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 21.1k, False: 846k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   867k|#endif
   68|   867k|    return 1;
   69|   867k|}
keymgmt_meth.c:CRYPTO_FREE_REF:
  286|  21.1k|{
  287|  21.1k|}
p_lib.c:CRYPTO_NEW_REF:
  280|   388k|{
  281|   388k|    refcnt->val = n;
  282|   388k|    return 1;
  283|   388k|}
p_lib.c:CRYPTO_FREE_REF:
  286|   388k|{
  287|   388k|}
p_lib.c:CRYPTO_UP_REF:
   40|   244k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   244k|    return 1;
   43|   244k|}
p_lib.c:CRYPTO_DOWN_REF:
   56|   632k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   632k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   632k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 388k, False: 244k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   632k|#endif
   68|   632k|    return 1;
   69|   632k|}
signature.c:CRYPTO_DOWN_REF:
   56|  67.4k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  67.4k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  67.4k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 31.1k, False: 36.2k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  67.4k|#endif
   68|  67.4k|    return 1;
   69|  67.4k|}
signature.c:CRYPTO_FREE_REF:
  286|  31.1k|{
  287|  31.1k|}
signature.c:CRYPTO_UP_REF:
   40|  36.2k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  36.2k|    return 1;
   43|  36.2k|}
signature.c:CRYPTO_NEW_REF:
  280|  31.1k|{
  281|  31.1k|    refcnt->val = n;
  282|  31.1k|    return 1;
  283|  31.1k|}
provider_core.c:CRYPTO_UP_REF:
   40|   213k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   213k|    return 1;
   43|   213k|}
provider_core.c:CRYPTO_NEW_REF:
  280|    931|{
  281|    931|    refcnt->val = n;
  282|    931|    return 1;
  283|    931|}
provider_core.c:CRYPTO_DOWN_REF:
   56|   214k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   214k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   214k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 931, False: 213k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   214k|#endif
   68|   214k|    return 1;
   69|   214k|}
provider_core.c:CRYPTO_FREE_REF:
  286|    931|{
  287|    931|}
rsa_lib.c:CRYPTO_NEW_REF:
  280|   138k|{
  281|   138k|    refcnt->val = n;
  282|   138k|    return 1;
  283|   138k|}
rsa_lib.c:CRYPTO_DOWN_REF:
   56|   276k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   276k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   276k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 138k, False: 138k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   276k|#endif
   68|   276k|    return 1;
   69|   276k|}
rsa_lib.c:CRYPTO_FREE_REF:
  286|   138k|{
  287|   138k|}
rsa_lib.c:CRYPTO_UP_REF:
   40|   138k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   138k|    return 1;
   43|   138k|}
x509_lu.c:CRYPTO_NEW_REF:
  280|  2.09k|{
  281|  2.09k|    refcnt->val = n;
  282|  2.09k|    return 1;
  283|  2.09k|}
x509_lu.c:CRYPTO_DOWN_REF:
   56|  2.09k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  2.09k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.09k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.09k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.09k|#endif
   68|  2.09k|    return 1;
   69|  2.09k|}
x509_lu.c:CRYPTO_FREE_REF:
  286|  2.09k|{
  287|  2.09k|}
x509_set.c:CRYPTO_UP_REF:
   40|   190k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   190k|    return 1;
   43|   190k|}
ossl_core_bio.c:CRYPTO_UP_REF:
   40|   381k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|   381k|    return 1;
   43|   381k|}
ossl_core_bio.c:CRYPTO_DOWN_REF:
   56|   762k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|   762k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|   762k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 381k, False: 381k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|   762k|#endif
   68|   762k|    return 1;
   69|   762k|}
ossl_core_bio.c:CRYPTO_FREE_REF:
  286|   381k|{
  287|   381k|}
ossl_core_bio.c:CRYPTO_NEW_REF:
  280|   381k|{
  281|   381k|    refcnt->val = n;
  282|   381k|    return 1;
  283|   381k|}
ecx_key.c:CRYPTO_NEW_REF:
  280|  2.46k|{
  281|  2.46k|    refcnt->val = n;
  282|  2.46k|    return 1;
  283|  2.46k|}
ecx_key.c:CRYPTO_FREE_REF:
  286|  2.46k|{
  287|  2.46k|}
ecx_key.c:CRYPTO_DOWN_REF:
   56|  2.46k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  2.46k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  2.46k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 2.46k, False: 0]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  2.46k|#endif
   68|  2.46k|    return 1;
   69|  2.46k|}
evp_rand.c:CRYPTO_UP_REF:
   40|  9.05k|{
   41|       |    *ret = atomic_fetch_add_explicit(&refcnt->val, 1, memory_order_relaxed) + 1;
   42|  9.05k|    return 1;
   43|  9.05k|}
evp_rand.c:CRYPTO_NEW_REF:
  280|  4.55k|{
  281|  4.55k|    refcnt->val = n;
  282|  4.55k|    return 1;
  283|  4.55k|}
evp_rand.c:CRYPTO_FREE_REF:
  286|  4.55k|{
  287|  4.55k|}
evp_rand.c:CRYPTO_DOWN_REF:
   56|  13.6k|{
   57|       |#ifdef OSSL_TSAN_BUILD
   58|       |    /*
   59|       |     * TSAN requires acq_rel as it indicates a false positive error when
   60|       |     * the object that contains the refcount is freed otherwise.
   61|       |     */
   62|       |    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_acq_rel) - 1;
   63|       |#else
   64|  13.6k|    *ret = atomic_fetch_sub_explicit(&refcnt->val, 1, memory_order_release) - 1;
   65|  13.6k|    if (*ret == 0)
  ------------------
  |  Branch (65:9): [True: 4.55k, False: 9.05k]
  ------------------
   66|       |        atomic_thread_fence(memory_order_acquire);
   67|  13.6k|#endif
   68|  13.6k|    return 1;
   69|  13.6k|}

ssl_sess.c:safe_add_time:
   51|  2.61k|    {                                                                \
   52|  2.61k|        type r;                                                      \
   53|  2.61k|                                                                     \
   54|  2.61k|        if (!__builtin_add_overflow(a, b, &r))                       \
  ------------------
  |  Branch (54:13): [True: 2.61k, False: 0]
  ------------------
   55|  2.61k|            return r;                                                \
   56|  2.61k|        *err |= 1;                                                   \
   57|      0|        return a + b;                                                \
   58|  2.61k|    }
array_alloc.c:safe_mul_size_t:
  151|  10.1M|    {                                                                \
  152|  10.1M|        type r;                                                      \
  153|  10.1M|                                                                     \
  154|  10.1M|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (154:13): [True: 10.1M, False: 0]
  ------------------
  155|  10.1M|            return r;                                                \
  156|  10.1M|        *err |= 1;                                                   \
  157|      0|        return a * b;                                                \
  158|  10.1M|    }
stack.c:safe_muldiv_int:
  324|   354k|    {                                                                   \
  325|   354k|        int e2 = 0;                                                     \
  326|   354k|        type q, r, x, y;                                                \
  327|   354k|                                                                        \
  328|   354k|        if (c == 0) {                                                   \
  ------------------
  |  Branch (328:13): [True: 0, False: 354k]
  ------------------
  329|      0|            *err |= 1;                                                  \
  330|      0|            return a == 0 || b == 0 ? 0 : max;                          \
  ------------------
  |  Branch (330:20): [True: 0, False: 0]
  |  Branch (330:30): [True: 0, False: 0]
  ------------------
  331|      0|        }                                                               \
  332|   354k|        x = safe_mul_##type_name(a, b, &e2);                            \
  333|   354k|        if (!e2)                                                        \
  ------------------
  |  Branch (333:13): [True: 354k, False: 0]
  ------------------
  334|   354k|            return safe_div_##type_name(x, c, err);                     \
  335|   354k|        if (b > a) {                                                    \
  ------------------
  |  Branch (335:13): [True: 0, False: 0]
  ------------------
  336|      0|            x = b;                                                      \
  337|      0|            b = a;                                                      \
  338|      0|            a = x;                                                      \
  339|      0|        }                                                               \
  340|      0|        q = safe_div_##type_name(a, c, err);                            \
  341|      0|        r = safe_mod_##type_name(a, c, err);                            \
  342|      0|        x = safe_mul_##type_name(r, b, err);                            \
  343|      0|        y = safe_mul_##type_name(q, b, err);                            \
  344|      0|        q = safe_div_##type_name(x, c, err);                            \
  345|      0|        return safe_add_##type_name(y, q, err);                         \
  346|   354k|    }
stack.c:safe_mul_int:
  138|   354k|    {                                                                \
  139|   354k|        type r;                                                      \
  140|   354k|                                                                     \
  141|   354k|        if (!__builtin_mul_overflow(a, b, &r))                       \
  ------------------
  |  Branch (141:13): [True: 354k, False: 0]
  ------------------
  142|   354k|            return r;                                                \
  143|   354k|        *err |= 1;                                                   \
  144|      0|        return (a < 0) ^ (b < 0) ? min : max;                        \
  ------------------
  |  Branch (144:16): [True: 0, False: 0]
  ------------------
  145|   354k|    }
stack.c:safe_div_int:
  201|   354k|    {                                                                \
  202|   354k|        if (b == 0) {                                                \
  ------------------
  |  Branch (202:13): [True: 0, False: 354k]
  ------------------
  203|      0|            *err |= 1;                                               \
  204|      0|            return a < 0 ? min : max;                                \
  ------------------
  |  Branch (204:20): [True: 0, False: 0]
  ------------------
  205|      0|        }                                                            \
  206|   354k|        if (b == -1 && a == min) {                                   \
  ------------------
  |  Branch (206:13): [True: 0, False: 354k]
  |  Branch (206:24): [True: 0, False: 0]
  ------------------
  207|      0|            *err |= 1;                                               \
  208|      0|            return max;                                              \
  209|      0|        }                                                            \
  210|   354k|        return a / b;                                                \
  211|   354k|    }

ssl_cert.c:ssl_x509_store_ctx_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
ssl_init.c:ossl_init_ssl_base_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
conf_mod.c:do_init_module_list_lock_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
do_engine_lock_init_ossl_:
   41|      1|    {                              \
   42|      1|        init##_ossl_ret_ = init(); \
   43|      1|    }                              \
err.c:do_err_strings_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
context.c:default_context_do_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_base_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_register_atexit_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_load_crypto_nodelete_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_load_crypto_strings_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_load_ssl_strings_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_add_all_ciphers_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_add_all_digests_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_config_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_engine_rdrand_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_engine_dynamic_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
init.c:ossl_init_engine_padlock_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
initthread.c:ossl_init_thread_once_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
initthread.c:create_global_tevent_register_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
o_names.c:o_names_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
obj_dat.c:obj_api_initialise_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
obj_xref.c:o_sig_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \
rand_lib.c:do_rand_init_ossl_:
   73|      1|    {                                \
   74|      1|        init##_ossl_ret_ = init();   \
   75|      1|    }                                \

ssl_sess.c:ossl_time_add:
  169|  2.61k|{
  170|  2.61k|    OSSL_TIME r;
  171|  2.61k|    int err = 0;
  172|       |
  173|  2.61k|    r.t = safe_add_time(a.t, b.t, &err);
  174|  2.61k|    return err ? ossl_time_infinite() : r;
  ------------------
  |  Branch (174:12): [True: 0, False: 2.61k]
  ------------------
  175|  2.61k|}
ssl_sess.c:ossl_ticks2time:
   59|  2.61k|{
   60|  2.61k|    OSSL_TIME r;
   61|       |
   62|  2.61k|    r.t = ticks;
   63|  2.61k|    return r;
   64|  2.61k|}
ssl_sess.c:ossl_time_is_zero:
  157|  1.30k|{
  158|  1.30k|    return ossl_time_compare(t, ossl_time_zero()) == 0;
  159|  1.30k|}
ssl_sess.c:ossl_time_compare:
  147|  1.30k|{
  148|  1.30k|    if (a.t > b.t)
  ------------------
  |  Branch (148:9): [True: 1.30k, False: 0]
  ------------------
  149|  1.30k|        return 1;
  150|      0|    if (a.t < b.t)
  ------------------
  |  Branch (150:9): [True: 0, False: 0]
  ------------------
  151|      0|        return -1;
  152|      0|    return 0;
  153|      0|}
ssl_sess.c:ossl_time_zero:
   79|  1.30k|{
   80|  1.30k|    return ossl_ticks2time(0);
   81|  1.30k|}
ssl_sess.c:ossl_time_from_time_t:
  137|  2.09k|{
  138|  2.09k|    OSSL_TIME ot;
  139|       |
  140|  2.09k|    ot.t = t;
  141|  2.09k|    ot.t *= OSSL_TIME_SECOND;
  ------------------
  |  |   31|  2.09k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  ------------------
  142|  2.09k|    return ot;
  143|  2.09k|}
t1_lib.c:ossl_ticks2time:
   59|  2.09k|{
   60|  2.09k|    OSSL_TIME r;
   61|       |
   62|  2.09k|    r.t = ticks;
   63|  2.09k|    return r;
   64|  2.09k|}

a_mbstr.c:is_unicode_valid:
   27|  28.7M|{
   28|  28.7M|    return value <= UNICODE_MAX && !is_unicode_surrogate(value);
  ------------------
  |  Branch (28:12): [True: 28.7M, False: 0]
  |  Branch (28:36): [True: 28.7M, False: 0]
  ------------------
   29|  28.7M|}
a_mbstr.c:is_unicode_surrogate:
   22|  28.7M|{
   23|  28.7M|    return value >= SURROGATE_MIN && value <= SURROGATE_MAX;
  ------------------
  |  Branch (23:12): [True: 0, False: 28.7M]
  |  Branch (23:38): [True: 0, False: 0]
  ------------------
   24|  28.7M|}

ASN1_TYPE_new:
  800|   848k|    {                                                               \
  801|   848k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  433|   848k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|   848k|    }                                                               \
X509_ALGOR_new:
  800|   381k|    {                                                               \
  801|   381k|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|   381k|    }                                                               \
X509_ALGOR_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
RSAPublicKey_it:
  241|   138k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   138k|    {                                  \
  |  |   98|   138k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   138k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   138k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   138k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   138k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   138k|        tname##_seq_tt,                                 \
  245|   138k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   138k|        &tname##_aux,                                   \
  247|   138k|        sizeof(stname),                                 \
  248|   138k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   138k|    }                         \
  |  |  105|   138k|    ;                         \
  |  |  106|   138k|    return &local_it;         \
  |  |  107|   138k|    }
  ------------------
RSA_PSS_PARAMS_it:
  241|   138k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   138k|    {                                  \
  |  |   98|   138k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   138k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   138k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   138k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   138k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   138k|        tname##_seq_tt,                                 \
  245|   138k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   138k|        &tname##_aux,                                   \
  247|   138k|        sizeof(stname),                                 \
  248|   138k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   138k|    }                         \
  |  |  105|   138k|    ;                         \
  |  |  106|   138k|    return &local_it;         \
  |  |  107|   138k|    }
  ------------------
RSA_PSS_PARAMS_free:
  804|   138k|    {                                                               \
  805|   138k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   138k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   138k|    }
d2i_RSAPublicKey:
  814|   138k|    {                                                                                      \
  815|   138k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  433|   138k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   138k|    }                                                                                      \
GENERAL_NAMES_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
NAME_CONSTRAINTS_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
X509_CRL_it:
  241|   190k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   190k|    {                                  \
  |  |   98|   190k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   190k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   190k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   190k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   190k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   190k|        tname##_seq_tt,                                 \
  245|   190k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   190k|        &tname##_aux,                                   \
  247|   190k|        sizeof(stname),                                 \
  248|   190k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   190k|    }                         \
  |  |  105|   190k|    ;                         \
  |  |  106|   190k|    return &local_it;         \
  |  |  107|   190k|    }
  ------------------
X509_CRL_free:
  804|   190k|    {                                                               \
  805|   190k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   190k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   190k|    }
X509_NAME_ENTRY_new:
  800|  1.36M|    {                                                               \
  801|  1.36M|        return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));     \
  ------------------
  |  |  433|  1.36M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  802|  1.36M|    }                                                               \
X509_NAME_ENTRY_free:
  804|  3.11M|    {                                                               \
  805|  3.11M|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|  3.11M|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  3.11M|    }
X509_NAME_free:
  804|  1.29k|    {                                                               \
  805|  1.29k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|  1.29k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  1.29k|    }
d2i_X509_PUBKEY:
  814|   190k|    {                                                                                      \
  815|   190k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  433|   190k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   190k|    }                                                                                      \
X509_PUBKEY_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
X509_CINF_it:
  241|   605k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   605k|    {                                  \
  |  |   98|   605k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   605k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   605k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   605k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   605k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   605k|        tname##_seq_tt,                                 \
  245|   605k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   605k|        &tname##_aux,                                   \
  247|   605k|        sizeof(stname),                                 \
  248|   605k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   605k|    }                         \
  |  |  105|   605k|    ;                         \
  |  |  106|   605k|    return &local_it;         \
  |  |  107|   605k|    }
  ------------------
X509_it:
  241|   819k|    ASN1_ITEM_start(tname)                              \
  ------------------
  |  |   97|   819k|    {                                  \
  |  |   98|   819k|        static const ASN1_ITEM local_it = {
  ------------------
  242|   819k|        ASN1_ITYPE_SEQUENCE,                            \
  ------------------
  |  |   83|   819k|#define ASN1_ITYPE_SEQUENCE 0x1
  ------------------
  243|   819k|        V_ASN1_SEQUENCE,                                \
  ------------------
  |  |   76|   819k|#define V_ASN1_SEQUENCE 16
  ------------------
  244|   819k|        tname##_seq_tt,                                 \
  245|   819k|        sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
  246|   819k|        &tname##_aux,                                   \
  247|   819k|        sizeof(stname),                                 \
  248|   819k|        #tname ASN1_ITEM_end(tname)
  ------------------
  |  |  104|   819k|    }                         \
  |  |  105|   819k|    ;                         \
  |  |  106|   819k|    return &local_it;         \
  |  |  107|   819k|    }
  ------------------
d2i_X509:
  814|   190k|    {                                                                                      \
  815|   190k|        return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
  ------------------
  |  |  433|   190k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  816|   190k|    }                                                                                      \
X509_free:
  804|   427k|    {                                                               \
  805|   427k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   427k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   427k|    }
X509_CERT_AUX_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
AUTHORITY_KEYID_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
ASIdentifiers_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }
BASIC_CONSTRAINTS_free:
  804|  11.0k|    {                                                               \
  805|  11.0k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|  11.0k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|  11.0k|    }
CRL_DIST_POINTS_free:
  804|   381k|    {                                                               \
  805|   381k|        ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));    \
  ------------------
  |  |  433|   381k|#define ASN1_ITEM_rptr(ref) (ref##_it())
  ------------------
  806|   381k|    }

ml_kem.c:OPENSSL_store_u64_le:
  160|   355k|{
  161|   355k|#ifdef OSSL_HTOLE64
  162|   355k|    uint64_t t = OSSL_HTOLE64(val);
  ------------------
  |  |   52|   355k|#define OSSL_HTOLE64(x) htole64(x)
  ------------------
  163|       |
  164|   355k|    memcpy(out, (unsigned char *)&t, 8);
  165|   355k|    return out + 8;
  166|       |#else
  167|       |    *out++ = (val & 0xff);
  168|       |    *out++ = (val >> 8) & 0xff;
  169|       |    *out++ = (val >> 16) & 0xff;
  170|       |    *out++ = (val >> 24) & 0xff;
  171|       |    *out++ = (val >> 32) & 0xff;
  172|       |    *out++ = (val >> 40) & 0xff;
  173|       |    *out++ = (val >> 48) & 0xff;
  174|       |    *out++ = (val >> 56) & 0xff;
  175|       |    return out;
  176|       |#endif
  177|   355k|}

tls_common.c:OSSL_FUNC_rlayer_skip_early_data:
   60|  7.89k|    {                                                  \
   61|  7.89k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.89k|    }
tls_common.c:OSSL_FUNC_rlayer_security:
   60|  7.89k|    {                                                  \
   61|  7.89k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.89k|    }
decoder_meth.c:OSSL_FUNC_decoder_newctx:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_freectx:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_set_ctx_params:
   60|     74|    {                                                  \
   61|     74|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     74|    }
decoder_meth.c:OSSL_FUNC_decoder_settable_ctx_params:
   60|     74|    {                                                  \
   61|     74|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     74|    }
decoder_meth.c:OSSL_FUNC_decoder_does_selection:
   60|     73|    {                                                  \
   61|     73|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     73|    }
decoder_meth.c:OSSL_FUNC_decoder_decode:
   60|     76|    {                                                  \
   61|     76|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     76|    }
decoder_meth.c:OSSL_FUNC_decoder_export_object:
   60|     73|    {                                                  \
   61|     73|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     73|    }
digest.c:OSSL_FUNC_digest_newctx:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_init:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_update:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_final:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_squeeze:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
digest.c:OSSL_FUNC_digest_freectx:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_dupctx:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_get_params:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_set_ctx_params:
   60|  4.22k|    {                                                  \
   61|  4.22k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.22k|    }
digest.c:OSSL_FUNC_digest_get_ctx_params:
   60|  3.16k|    {                                                  \
   61|  3.16k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.16k|    }
digest.c:OSSL_FUNC_digest_gettable_params:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
digest.c:OSSL_FUNC_digest_settable_ctx_params:
   60|  4.22k|    {                                                  \
   61|  4.22k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.22k|    }
digest.c:OSSL_FUNC_digest_gettable_ctx_params:
   60|  3.16k|    {                                                  \
   61|  3.16k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.16k|    }
digest.c:OSSL_FUNC_digest_copyctx:
   60|  14.2k|    {                                                  \
   61|  14.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  14.2k|    }
evp_enc.c:OSSL_FUNC_cipher_newctx:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_init:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_init:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_encrypt_skey_init:
   60|  35.9k|    {                                                  \
   61|  35.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  35.9k|    }
evp_enc.c:OSSL_FUNC_cipher_decrypt_skey_init:
   60|  35.9k|    {                                                  \
   61|  35.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  35.9k|    }
evp_enc.c:OSSL_FUNC_cipher_update:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_final:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_cipher:
   60|  62.3k|    {                                                  \
   61|  62.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  62.3k|    }
evp_enc.c:OSSL_FUNC_cipher_freectx:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_dupctx:
   60|  68.1k|    {                                                  \
   61|  68.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.1k|    }
evp_enc.c:OSSL_FUNC_cipher_get_params:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_get_ctx_params:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_set_ctx_params:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_params:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_gettable_ctx_params:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
evp_enc.c:OSSL_FUNC_cipher_settable_ctx_params:
   60|  68.6k|    {                                                  \
   61|  68.6k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  68.6k|    }
exchange.c:OSSL_FUNC_keyexch_newctx:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_init:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_set_peer:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
exchange.c:OSSL_FUNC_keyexch_derive:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_freectx:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_dupctx:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_get_ctx_params:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_gettable_ctx_params:
   60|  3.69k|    {                                                  \
   61|  3.69k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  3.69k|    }
exchange.c:OSSL_FUNC_keyexch_set_ctx_params:
   60|  2.64k|    {                                                  \
   61|  2.64k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.64k|    }
exchange.c:OSSL_FUNC_keyexch_settable_ctx_params:
   60|  2.64k|    {                                                  \
   61|  2.64k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.64k|    }
exchange.c:OSSL_FUNC_keyexch_derive_skey:
   60|    528|    {                                                  \
   61|    528|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    528|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_new:
   60|  21.1k|    {                                                  \
   61|  21.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_init:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_template:
   60|  2.64k|    {                                                  \
   61|  2.64k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.64k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_set_params:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_settable_params:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_get_params:
   60|  1.05k|    {                                                  \
   61|  1.05k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.05k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_gettable_params:
   60|  1.05k|    {                                                  \
   61|  1.05k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.05k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gen_cleanup:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_free:
   60|  21.1k|    {                                                  \
   61|  21.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_load:
   60|  15.3k|    {                                                  \
   61|  15.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  15.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_get_params:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_gettable_params:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_set_params:
   60|  10.0k|    {                                                  \
   61|  10.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.0k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_settable_params:
   60|  10.0k|    {                                                  \
   61|  10.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  10.0k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_query_operation_name:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_has:
   60|  21.1k|    {                                                  \
   61|  21.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.1k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_dup:
   60|  17.4k|    {                                                  \
   61|  17.4k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.4k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_validate:
   60|  15.3k|    {                                                  \
   61|  15.3k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  15.3k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_match:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_import_types:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
keymgmt_meth.c:OSSL_FUNC_keymgmt_export_types:
   60|  19.5k|    {                                                  \
   61|  19.5k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.5k|    }
signature.c:OSSL_FUNC_signature_newctx:
   60|  31.1k|    {                                                  \
   61|  31.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.1k|    }
signature.c:OSSL_FUNC_signature_sign_init:
   60|  21.1k|    {                                                  \
   61|  21.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.1k|    }
signature.c:OSSL_FUNC_signature_sign:
   60|  29.0k|    {                                                  \
   61|  29.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.0k|    }
signature.c:OSSL_FUNC_signature_sign_message_init:
   60|  26.9k|    {                                                  \
   61|  26.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.9k|    }
signature.c:OSSL_FUNC_signature_sign_message_update:
   60|  17.9k|    {                                                  \
   61|  17.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.9k|    }
signature.c:OSSL_FUNC_signature_sign_message_final:
   60|  17.9k|    {                                                  \
   61|  17.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.9k|    }
signature.c:OSSL_FUNC_signature_verify_init:
   60|  21.1k|    {                                                  \
   61|  21.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  21.1k|    }
signature.c:OSSL_FUNC_signature_verify:
   60|  29.0k|    {                                                  \
   61|  29.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.0k|    }
signature.c:OSSL_FUNC_signature_verify_message_init:
   60|  26.9k|    {                                                  \
   61|  26.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  26.9k|    }
signature.c:OSSL_FUNC_signature_verify_message_update:
   60|  17.9k|    {                                                  \
   61|  17.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.9k|    }
signature.c:OSSL_FUNC_signature_verify_message_final:
   60|  17.9k|    {                                                  \
   61|  17.9k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  17.9k|    }
signature.c:OSSL_FUNC_signature_verify_recover_init:
   60|  7.39k|    {                                                  \
   61|  7.39k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.39k|    }
signature.c:OSSL_FUNC_signature_verify_recover:
   60|  7.39k|    {                                                  \
   61|  7.39k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  7.39k|    }
signature.c:OSSL_FUNC_signature_digest_sign_init:
   60|  13.2k|    {                                                  \
   61|  13.2k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  13.2k|    }
signature.c:OSSL_FUNC_signature_digest_sign_update:
   60|  4.22k|    {                                                  \
   61|  4.22k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.22k|    }
signature.c:OSSL_FUNC_signature_digest_sign_final:
   60|  4.22k|    {                                                  \
   61|  4.22k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  4.22k|    }
signature.c:OSSL_FUNC_signature_digest_sign:
   60|  8.97k|    {                                                  \
   61|  8.97k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  8.97k|    }
signature.c:OSSL_FUNC_signature_digest_verify_init:
   60|  11.0k|    {                                                  \
   61|  11.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  11.0k|    }
signature.c:OSSL_FUNC_signature_digest_verify_update:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
signature.c:OSSL_FUNC_signature_digest_verify_final:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
signature.c:OSSL_FUNC_signature_digest_verify:
   60|  8.97k|    {                                                  \
   61|  8.97k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  8.97k|    }
signature.c:OSSL_FUNC_signature_freectx:
   60|  31.1k|    {                                                  \
   61|  31.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.1k|    }
signature.c:OSSL_FUNC_signature_dupctx:
   60|  31.1k|    {                                                  \
   61|  31.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.1k|    }
signature.c:OSSL_FUNC_signature_get_ctx_params:
   60|  29.0k|    {                                                  \
   61|  29.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.0k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_params:
   60|  29.0k|    {                                                  \
   61|  29.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  29.0k|    }
signature.c:OSSL_FUNC_signature_set_ctx_params:
   60|  31.1k|    {                                                  \
   61|  31.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.1k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_params:
   60|  31.1k|    {                                                  \
   61|  31.1k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  31.1k|    }
signature.c:OSSL_FUNC_signature_get_ctx_md_params:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
signature.c:OSSL_FUNC_signature_gettable_ctx_md_params:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
signature.c:OSSL_FUNC_signature_set_ctx_md_params:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
signature.c:OSSL_FUNC_signature_settable_ctx_md_params:
   60|  2.11k|    {                                                  \
   61|  2.11k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.11k|    }
signature.c:OSSL_FUNC_signature_query_key_types:
   60|  19.0k|    {                                                  \
   61|  19.0k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  19.0k|    }
provider_core.c:OSSL_FUNC_provider_teardown:
   60|    758|    {                                                  \
   61|    758|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    758|    }
provider_core.c:OSSL_FUNC_provider_gettable_params:
   60|    776|    {                                                  \
   61|    776|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    776|    }
provider_core.c:OSSL_FUNC_provider_get_params:
   60|    776|    {                                                  \
   61|    776|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    776|    }
provider_core.c:OSSL_FUNC_provider_get_capabilities:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_core.c:OSSL_FUNC_provider_query_operation:
   60|    776|    {                                                  \
   61|    776|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    776|    }
baseprov.c:OSSL_FUNC_core_gettable_params:
   60|     63|    {                                                  \
   61|     63|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     63|    }
baseprov.c:OSSL_FUNC_core_get_params:
   60|     63|    {                                                  \
   61|     63|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     63|    }
baseprov.c:OSSL_FUNC_core_get_libctx:
   60|     63|    {                                                  \
   61|     63|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|     63|    }
defltprov.c:OSSL_FUNC_core_gettable_params:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
defltprov.c:OSSL_FUNC_core_get_params:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
defltprov.c:OSSL_FUNC_core_get_libctx:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
bio_prov.c:OSSL_FUNC_BIO_new_file:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_new_membuf:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_read_ex:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_write_ex:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_gets:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_puts:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_ctrl:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_up_ref:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_free:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
bio_prov.c:OSSL_FUNC_BIO_vprintf:
   60|      1|    {                                                  \
   61|      1|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|      1|    }
provider_seeding.c:OSSL_FUNC_get_entropy:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_get_user_entropy:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_cleanup_entropy:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_entropy:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_get_nonce:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_get_user_nonce:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_cleanup_nonce:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
provider_seeding.c:OSSL_FUNC_cleanup_user_nonce:
   60|    695|    {                                                  \
   61|    695|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    695|    }
drbg.c:OSSL_FUNC_rand_enable_locking:
   60|  1.50k|    {                                                  \
   61|  1.50k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.50k|    }
drbg.c:OSSL_FUNC_rand_lock:
   60|  1.50k|    {                                                  \
   61|  1.50k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.50k|    }
drbg.c:OSSL_FUNC_rand_unlock:
   60|  1.50k|    {                                                  \
   61|  1.50k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.50k|    }
drbg.c:OSSL_FUNC_rand_get_ctx_params:
   60|  1.50k|    {                                                  \
   61|  1.50k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.50k|    }
drbg.c:OSSL_FUNC_rand_get_seed:
   60|  1.50k|    {                                                  \
   61|  1.50k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.50k|    }
drbg.c:OSSL_FUNC_rand_clear_seed:
   60|  1.50k|    {                                                  \
   61|  1.50k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  1.50k|    }
evp_rand.c:OSSL_FUNC_rand_newctx:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_freectx:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_instantiate:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_uninstantiate:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_generate:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_reseed:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_nonce:
   60|    500|    {                                                  \
   61|    500|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|    500|    }
evp_rand.c:OSSL_FUNC_rand_enable_locking:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_lock:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_unlock:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_gettable_ctx_params:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_settable_ctx_params:
   60|  2.00k|    {                                                  \
   61|  2.00k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.00k|    }
evp_rand.c:OSSL_FUNC_rand_get_ctx_params:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_set_ctx_params:
   60|  2.00k|    {                                                  \
   61|  2.00k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.00k|    }
evp_rand.c:OSSL_FUNC_rand_verify_zeroization:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_get_seed:
   60|  2.55k|    {                                                  \
   61|  2.55k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.55k|    }
evp_rand.c:OSSL_FUNC_rand_clear_seed:
   60|  2.05k|    {                                                  \
   61|  2.05k|        return (OSSL_FUNC_##name##_fn *)opf->function; \
   62|  2.05k|    }

ssl_lib.c:ERR_GET_LIB:
  244|  1.22k|{
  245|  1.22k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  1.22k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  1.22k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 1.22k]
  |  |  ------------------
  ------------------
  246|      0|        return ERR_LIB_SYS;
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
  247|  1.22k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  228|  1.22k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  229|  1.22k|#define ERR_LIB_MASK 0xFF
  ------------------
  248|  1.22k|}
conf_mod.c:ERR_GET_REASON:
  258|      1|{
  259|      1|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|      1|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|      1|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 1]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|      1|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|      1|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|      1|}
err.c:ERR_GET_LIB:
  244|  12.0k|{
  245|  12.0k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  12.0k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  12.0k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 26, False: 12.0k]
  |  |  ------------------
  ------------------
  246|     26|        return ERR_LIB_SYS;
  ------------------
  |  |   74|     26|#define ERR_LIB_SYS 2
  ------------------
  247|  12.0k|    return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  228|  12.0k|#define ERR_LIB_OFFSET 23L
  ------------------
                  return (errcode >> ERR_LIB_OFFSET) & ERR_LIB_MASK;
  ------------------
  |  |  229|  12.0k|#define ERR_LIB_MASK 0xFF
  ------------------
  248|  12.0k|}
err.c:ERR_GET_REASON:
  258|  2.87k|{
  259|  2.87k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  2.87k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  2.87k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 13, False: 2.86k]
  |  |  ------------------
  ------------------
  260|     13|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|     13|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|  2.86k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|  2.86k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|  2.87k|}
pem_info.c:ERR_GET_REASON:
  258|  1.31k|{
  259|  1.31k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|  1.31k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|  1.31k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 1.31k]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|  1.31k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|  1.31k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|  1.31k|}
pem_lib.c:ERR_GET_REASON:
  258|     15|{
  259|     15|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|     15|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|     15|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 15]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|     15|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|     15|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|     15|}
by_file.c:ERR_GET_REASON:
  258|     13|{
  259|     13|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|     13|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|     13|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 13]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|     13|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|     13|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|     13|}
a_d2i_fp.c:ERR_GET_REASON:
  258|   381k|{
  259|   381k|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|   381k|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|   381k|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 381k]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|   381k|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|   381k|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|   381k|}
conf_def.c:ERR_GET_REASON:
  258|    695|{
  259|    695|    if (ERR_SYSTEM_ERROR(errcode))
  ------------------
  |  |  241|    695|#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
  |  |  ------------------
  |  |  |  |  220|    695|#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
  |  |  ------------------
  |  |  |  Branch (241:35): [True: 0, False: 695]
  |  |  ------------------
  ------------------
  260|      0|        return errcode & ERR_SYSTEM_MASK;
  ------------------
  |  |  221|      0|#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
  ------------------
  261|    695|    return errcode & ERR_REASON_MASK;
  ------------------
  |  |  232|    695|#define ERR_REASON_MASK 0X7FFFFF
  ------------------
  262|    695|}

ssl_lib.c:lh_SSL_SESSION_new:
  334|  2.09k|    {                                                                                                                      \
  335|  2.09k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  2.09k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  2.09k|            lh_##type##_doall_thunk,                                                                                       \
  338|  2.09k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  2.09k|    }                                                                                                                      \
ssl_lib.c:lh_SSL_SESSION_free:
  271|  2.09k|    {                                                                                                                      \
  272|  2.09k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  2.09k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_get_down_load:
  306|  2.09k|    {                                                                                                                      \
  307|  2.09k|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|  2.09k|    }                                                                                                                      \
ssl_sess.c:lh_SSL_SESSION_set_down_load:
  311|  4.18k|    {                                                                                                                      \
  312|  4.18k|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|  4.18k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_new:
  334|    695|    {                                                                                                                      \
  335|    695|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    695|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    695|            lh_##type##_doall_thunk,                                                                                       \
  338|    695|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    695|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_hfn_thunk:
  260|   190k|    {                                                                                                                      \
  261|   190k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   190k|        return hfn_conv((const type *)data);                                                                               \
  263|   190k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_cfn_thunk:
  265|   190k|    {                                                                                                                      \
  266|   190k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   190k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   190k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall_thunk:
  316|      2|    {                                                                                                                      \
  317|      2|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|      2|        doall_conv((type *)node);                                                                                          \
  319|      2|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_doall:
  328|    857|    {                                                                                                                      \
  329|    857|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|    857|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_free:
  271|    695|    {                                                                                                                      \
  272|    695|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    695|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_flush:
  276|    162|    {                                                                                                                      \
  277|    162|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|    162|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_retrieve:
  291|   190k|    {                                                                                                                      \
  292|   190k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   190k|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_insert:
  281|      2|    {                                                                                                                      \
  282|      2|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|      2|    }                                                                                                                      \
decoder_pkey.c:lh_DECODER_CACHE_ENTRY_error:
  296|      2|    {                                                                                                                      \
  297|      2|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|      2|    }                                                                                                                      \
err.c:ossl_check_ERR_STRING_DATA_lh_type:
  208|  7.78k|    {                                                                                                          \
  209|  7.78k|        return (OPENSSL_LHASH *)lh;                                                                            \
  210|  7.78k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type:
  218|      1|    {                                                                                                          \
  219|      1|        return (OPENSSL_LH_HASHFUNC)hfn;                                                                       \
  220|      1|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type:
  213|      1|    {                                                                                                          \
  214|      1|        return (OPENSSL_LH_COMPFUNC)cmp;                                                                       \
  215|      1|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_hash_thunk:
  172|  7.78k|    {                                                                                                          \
  173|  7.78k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                        \
  174|  7.78k|        return hfn_conv((const type *)data);                                                                   \
  175|  7.78k|    }                                                                                                          \
err.c:lh_ERR_STRING_DATA_comp_thunk:
  177|  6.24k|    {                                                                                                          \
  178|  6.24k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                \
  179|  6.24k|        return cfn_conv((const type *)da, (const type *)db);                                                   \
  180|  6.24k|    }                                                                                                          \
err.c:ossl_check_ERR_STRING_DATA_lh_plain_type:
  193|  4.85k|    {                                                                                                          \
  194|  4.85k|        return ptr;                                                                                            \
  195|  4.85k|    }                                                                                                          \
err.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type:
  198|  2.93k|    {                                                                                                          \
  199|  2.93k|        return ptr;                                                                                            \
  200|  2.93k|    }                                                                                                          \
o_names.c:lh_OBJ_NAME_new:
  334|      1|    {                                                                                                                      \
  335|      1|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      1|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      1|            lh_##type##_doall_thunk,                                                                                       \
  338|      1|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      1|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_hfn_thunk:
  260|   353k|    {                                                                                                                      \
  261|   353k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   353k|        return hfn_conv((const type *)data);                                                                               \
  263|   353k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_cfn_thunk:
  265|   270k|    {                                                                                                                      \
  266|   270k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   270k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   270k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_thunk:
  316|    543|    {                                                                                                                      \
  317|    543|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|    543|        doall_conv((type *)node);                                                                                          \
  319|    543|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_retrieve:
  291|   352k|    {                                                                                                                      \
  292|   352k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   352k|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_insert:
  281|    424|    {                                                                                                                      \
  282|    424|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|    424|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_error:
  296|    242|    {                                                                                                                      \
  297|    242|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|    242|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_delete:
  286|    242|    {                                                                                                                      \
  287|    242|        return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d);                                                          \
  288|    242|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL:
  371|  1.05k|    {                                                                                       \
  372|  1.05k|        OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh,                                     \
  373|  1.05k|            lh_##type##_doall_##argtype##_thunk,                                            \
  374|  1.05k|            (OPENSSL_LH_DOALL_FUNCARG)fn,                                                   \
  375|  1.05k|            (void *)arg);                                                                   \
  376|  1.05k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_doall_OBJ_DOALL_thunk:
  363|   255k|    {                                                                                       \
  364|   255k|        void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn;     \
  365|   255k|        fn_conv((cbargtype *)node, (argtype *)arg);                                         \
  366|   255k|    }                                                                                       \
o_names.c:lh_OBJ_NAME_get_down_load:
  306|      4|    {                                                                                                                      \
  307|      4|        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh);                                                              \
  308|      4|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_set_down_load:
  311|      7|    {                                                                                                                      \
  312|      7|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|      7|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_doall:
  328|      4|    {                                                                                                                      \
  329|      4|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|      4|    }                                                                                                                      \
o_names.c:lh_OBJ_NAME_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_set_down_load:
  311|      1|    {                                                                                                                      \
  312|      1|        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl);                                                                 \
  313|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_doall:
  328|      3|    {                                                                                                                      \
  329|      3|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|      3|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_new:
  334|      1|    {                                                                                                                      \
  335|      1|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      1|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      1|            lh_##type##_doall_thunk,                                                                                       \
  338|      1|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      1|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_hfn_thunk:
  260|   133k|    {                                                                                                                      \
  261|   133k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   133k|        return hfn_conv((const type *)data);                                                                               \
  263|   133k|    }                                                                                                                      \
obj_dat.c:lh_ADDED_OBJ_retrieve:
  291|   133k|    {                                                                                                                      \
  292|   133k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   133k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall:
  328|    695|    {                                                                                                                      \
  329|    695|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|    695|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_free:
  271|    695|    {                                                                                                                      \
  272|    695|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|    695|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_new:
  334|    695|    {                                                                                                                      \
  335|    695|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|    695|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|    695|            lh_##type##_doall_thunk,                                                                                       \
  338|    695|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|    695|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_hfn_thunk:
  260|   142k|    {                                                                                                                      \
  261|   142k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   142k|        return hfn_conv((const type *)data);                                                                               \
  263|   142k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_cfn_thunk:
  265|   140k|    {                                                                                                                      \
  266|   140k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   140k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   140k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_doall_thunk:
  316|    596|    {                                                                                                                      \
  317|    596|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|    596|        doall_conv((type *)node);                                                                                          \
  319|    596|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_retrieve:
  291|   142k|    {                                                                                                                      \
  292|   142k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   142k|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_insert:
  281|    596|    {                                                                                                                      \
  282|    596|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|    596|    }                                                                                                                      \
defn_cache.c:lh_PROPERTY_DEFN_ELEM_error:
  296|    596|    {                                                                                                                      \
  297|    596|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|    596|    }                                                                                                                      \
property.c:lh_QUERY_doall:
  328|   141k|    {                                                                                                                      \
  329|   141k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|   141k|    }                                                                                                                      \
property.c:lh_QUERY_free:
  271|   141k|    {                                                                                                                      \
  272|   141k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|   141k|    }                                                                                                                      \
property.c:lh_QUERY_new:
  334|   141k|    {                                                                                                                      \
  335|   141k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|   141k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|   141k|            lh_##type##_doall_thunk,                                                                                       \
  338|   141k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|   141k|    }                                                                                                                      \
property.c:lh_QUERY_hfn_thunk:
  260|   320k|    {                                                                                                                      \
  261|   320k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   320k|        return hfn_conv((const type *)data);                                                                               \
  263|   320k|    }                                                                                                                      \
property.c:lh_QUERY_cfn_thunk:
  265|   270k|    {                                                                                                                      \
  266|   270k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   270k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   270k|    }                                                                                                                      \
property.c:lh_QUERY_doall_thunk:
  316|  25.0k|    {                                                                                                                      \
  317|  25.0k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  25.0k|        doall_conv((type *)node);                                                                                          \
  319|  25.0k|    }                                                                                                                      \
property.c:lh_QUERY_num_items:
  301|    152|    {                                                                                                                      \
  302|    152|        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh);                                                                  \
  303|    152|    }                                                                                                                      \
property.c:lh_QUERY_flush:
  276|    152|    {                                                                                                                      \
  277|    152|        OPENSSL_LH_flush((OPENSSL_LHASH *)lh);                                                                             \
  278|    152|    }                                                                                                                      \
property.c:lh_QUERY_retrieve:
  291|   295k|    {                                                                                                                      \
  292|   295k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   295k|    }                                                                                                                      \
property.c:lh_QUERY_insert:
  281|  25.0k|    {                                                                                                                      \
  282|  25.0k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  25.0k|    }                                                                                                                      \
property.c:lh_QUERY_error:
  296|  25.0k|    {                                                                                                                      \
  297|  25.0k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  25.0k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall:
  328|  1.39k|    {                                                                                                                      \
  329|  1.39k|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|  1.39k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_free:
  271|  1.39k|    {                                                                                                                      \
  272|  1.39k|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|  1.39k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_new:
  334|  1.39k|    {                                                                                                                      \
  335|  1.39k|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|  1.39k|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|  1.39k|            lh_##type##_doall_thunk,                                                                                       \
  338|  1.39k|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|  1.39k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_hfn_thunk:
  260|   646k|    {                                                                                                                      \
  261|   646k|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|   646k|        return hfn_conv((const type *)data);                                                                               \
  263|   646k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_cfn_thunk:
  265|   125k|    {                                                                                                                      \
  266|   125k|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|   125k|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|   125k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_doall_thunk:
  316|  8.10k|    {                                                                                                                      \
  317|  8.10k|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|  8.10k|        doall_conv((type *)node);                                                                                          \
  319|  8.10k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_retrieve:
  291|   638k|    {                                                                                                                      \
  292|   638k|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|   638k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_insert:
  281|  8.10k|    {                                                                                                                      \
  282|  8.10k|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|  8.10k|    }                                                                                                                      \
property_string.c:lh_PROPERTY_STRING_error:
  296|  8.10k|    {                                                                                                                      \
  297|  8.10k|        return OPENSSL_LH_error((OPENSSL_LHASH *)lh);                                                                      \
  298|  8.10k|    }                                                                                                                      \
store_register.c:lh_OSSL_STORE_LOADER_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_new:
  334|      1|    {                                                                                                                      \
  335|      1|        return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
  336|      1|            lh_##type##_hfn_thunk, lh_##type##_cfn_thunk,                                                                  \
  337|      1|            lh_##type##_doall_thunk,                                                                                       \
  338|      1|            lh_##type##_doall_arg_thunk);                                                                                  \
  339|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_hfn_thunk:
  260|      4|    {                                                                                                                      \
  261|      4|        unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn;                                    \
  262|      4|        return hfn_conv((const type *)data);                                                                               \
  263|      4|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_cfn_thunk:
  265|      2|    {                                                                                                                      \
  266|      2|        int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn;                            \
  267|      2|        return cfn_conv((const type *)da, (const type *)db);                                                               \
  268|      2|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_doall_thunk:
  316|      1|    {                                                                                                                      \
  317|      1|        void (*doall_conv)(type *) = (void (*)(type *))doall;                                                              \
  318|      1|        doall_conv((type *)node);                                                                                          \
  319|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_free:
  271|      1|    {                                                                                                                      \
  272|      1|        OPENSSL_LH_free((OPENSSL_LHASH *)lh);                                                                              \
  273|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_retrieve:
  291|      3|    {                                                                                                                      \
  292|      3|        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d);                                                        \
  293|      3|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_insert:
  281|      1|    {                                                                                                                      \
  282|      1|        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d);                                                          \
  283|      1|    }                                                                                                                      \
eng_table.c:lh_ENGINE_PILE_doall:
  328|      1|    {                                                                                                                      \
  329|      1|        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall);                                               \
  330|      1|    }                                                                                                                      \

ameth_lib.c:OBJ_bsearch_ameth:
  128|   532k|    {                                                                      \
  129|   532k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|   532k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|   532k|    }                                                                      \
ameth_lib.c:ameth_cmp_BSEARCH_CMP_FN:
  122|  1.64M|    {                                                                      \
  123|  1.64M|        type1 const *a = a_;                                               \
  124|  1.64M|        type2 const *b = b_;                                               \
  125|  1.64M|        return nm##_cmp(a, b);                                             \
  126|  1.64M|    }                                                                      \
obj_dat.c:OBJ_bsearch_ln:
  128|  84.3k|    {                                                                      \
  129|  84.3k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  84.3k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  84.3k|    }                                                                      \
obj_dat.c:ln_cmp_BSEARCH_CMP_FN:
  122|   845k|    {                                                                      \
  123|   845k|        type1 const *a = a_;                                               \
  124|   845k|        type2 const *b = b_;                                               \
  125|   845k|        return nm##_cmp(a, b);                                             \
  126|   845k|    }                                                                      \
obj_dat.c:OBJ_bsearch_sn:
  128|  92.6k|    {                                                                      \
  129|  92.6k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  92.6k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  92.6k|    }                                                                      \
obj_dat.c:sn_cmp_BSEARCH_CMP_FN:
  122|   994k|    {                                                                      \
  123|   994k|        type1 const *a = a_;                                               \
  124|   994k|        type2 const *b = b_;                                               \
  125|   994k|        return nm##_cmp(a, b);                                             \
  126|   994k|    }                                                                      \
obj_dat.c:OBJ_bsearch_obj:
  128|  3.14M|    {                                                                      \
  129|  3.14M|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  3.14M|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  3.14M|    }                                                                      \
obj_dat.c:obj_cmp_BSEARCH_CMP_FN:
  122|  31.2M|    {                                                                      \
  123|  31.2M|        type1 const *a = a_;                                               \
  124|  31.2M|        type2 const *b = b_;                                               \
  125|  31.2M|        return nm##_cmp(a, b);                                             \
  126|  31.2M|    }                                                                      \
obj_xref.c:OBJ_bsearch_sig:
  128|  28.3k|    {                                                                      \
  129|  28.3k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  28.3k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  28.3k|    }                                                                      \
obj_xref.c:sig_cmp_BSEARCH_CMP_FN:
  122|   148k|    {                                                                      \
  123|   148k|        type1 const *a = a_;                                               \
  124|   148k|        type2 const *b = b_;                                               \
  125|   148k|        return nm##_cmp(a, b);                                             \
  126|   148k|    }                                                                      \
v3_lib.c:OBJ_bsearch_ext:
  128|  36.5k|    {                                                                      \
  129|  36.5k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  36.5k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  36.5k|    }                                                                      \
v3_lib.c:ext_cmp_BSEARCH_CMP_FN:
  122|   184k|    {                                                                      \
  123|   184k|        type1 const *a = a_;                                               \
  124|   184k|        type2 const *b = b_;                                               \
  125|   184k|        return nm##_cmp(a, b);                                             \
  126|   184k|    }                                                                      \
v3_purp.c:OBJ_bsearch_nid:
  128|  21.1k|    {                                                                      \
  129|  21.1k|        return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2),        \
  130|  21.1k|            nm##_cmp_BSEARCH_CMP_FN);                                      \
  131|  21.1k|    }                                                                      \
v3_purp.c:nid_cmp_BSEARCH_CMP_FN:
  122|  52.5k|    {                                                                      \
  123|  52.5k|        type1 const *a = a_;                                               \
  124|  52.5k|        type2 const *b = b_;                                               \
  125|  52.5k|        return nm##_cmp(a, b);                                             \
  126|  52.5k|    }                                                                      \

PEM_read_bio_X509_AUX:
  151|      2|    {                                                                \
  152|      2|        return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
  153|      2|            (void **)x, cb, u);                                      \
  154|      2|    }
PEM_read_bio_X509_CRL:
  151|     13|    {                                                                \
  152|     13|        return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
  153|     13|            (void **)x, cb, u);                                      \
  154|     13|    }

s3_lib.c:ossl_check_X509_NAME_sk_type:
   55|  6.58k|    {                                                                                                           \
   56|  6.58k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  6.58k|    }                                                                                                           \
s3_lib.c:ossl_check_X509_NAME_freefunc_type:
   67|  6.58k|    {                                                                                                           \
   68|  6.58k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  6.58k|    }
ssl_ciph.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|  23.8k|    {                                                                                                           \
   52|  23.8k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  23.8k|    }                                                                                                           \
ssl_ciph.c:ossl_check_SSL_CIPHER_sk_type:
   55|   155k|    {                                                                                                           \
   56|   155k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   155k|    }                                                                                                           \
ssl_ciph.c:ossl_check_SSL_CIPHER_type:
   47|   142k|    {                                                                                                           \
   48|   142k|        return ptr;                                                                                             \
   49|   142k|    }                                                                                                           \
ssl_ciph.c:ossl_check_SSL_CIPHER_compfunc_type:
   59|  2.66k|    {                                                                                                           \
   60|  2.66k|        return (OPENSSL_sk_compfunc)cmp;                                                                        \
   61|  2.66k|    }                                                                                                           \
ssl_lib.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|   314k|    {                                                                                                           \
   52|   314k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   314k|    }                                                                                                           \
ssl_lib.c:sk_danetls_record_pop_free:
  147|  1.31k|    {                                                                                                                      \
  148|  1.31k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.31k|                                                                                                                           \
  150|  1.31k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.31k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.31k|                                                                                                                           \
  153|  1.31k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.31k|    }                                                                                                                      \
ssl_lib.c:ossl_check_SSL_CIPHER_sk_type:
   55|  81.4k|    {                                                                                                           \
   56|  81.4k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  81.4k|    }                                                                                                           \
ssl_lib.c:ossl_check_X509_EXTENSION_sk_type:
   55|  1.31k|    {                                                                                                           \
   56|  1.31k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.31k|    }                                                                                                           \
ssl_lib.c:ossl_check_X509_EXTENSION_freefunc_type:
   67|  1.31k|    {                                                                                                           \
   68|  1.31k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.31k|    }
ssl_lib.c:ossl_check_OCSP_RESPID_sk_type:
   55|  1.31k|    {                                                                                                           \
   56|  1.31k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.31k|    }                                                                                                           \
ssl_lib.c:ossl_check_OCSP_RESPID_freefunc_type:
   67|  1.31k|    {                                                                                                           \
   68|  1.31k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.31k|    }
ssl_lib.c:sk_OCSP_RESPONSE_pop_free:
  147|  1.31k|    {                                                                                                                      \
  148|  1.31k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.31k|                                                                                                                           \
  150|  1.31k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.31k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.31k|                                                                                                                           \
  153|  1.31k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.31k|    }                                                                                                                      \
ssl_lib.c:ossl_check_X509_NAME_sk_type:
   55|  6.81k|    {                                                                                                           \
   56|  6.81k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  6.81k|    }                                                                                                           \
ssl_lib.c:ossl_check_X509_NAME_freefunc_type:
   67|  6.81k|    {                                                                                                           \
   68|  6.81k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  6.81k|    }
ssl_lib.c:ossl_check_SRTP_PROTECTION_PROFILE_sk_type:
   55|  3.40k|    {                                                                                                           \
   56|  3.40k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  3.40k|    }                                                                                                           \
ssl_lib.c:ossl_check_SSL_CIPHER_type:
   47|  69.9k|    {                                                                                                           \
   48|  69.9k|        return ptr;                                                                                             \
   49|  69.9k|    }                                                                                                           \
ssl_sess.c:sk_SSL_SESSION_new_null:
   98|  2.09k|    {                                                                                                                      \
   99|  2.09k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|  2.09k|    }                                                                                                                      \
ssl_sess.c:sk_SSL_SESSION_pop_free:
  147|  2.09k|    {                                                                                                                      \
  148|  2.09k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  2.09k|                                                                                                                           \
  150|  2.09k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  2.09k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  2.09k|                                                                                                                           \
  153|  2.09k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  2.09k|    }                                                                                                                      \
extensions.c:ossl_check_const_X509_NAME_sk_type:
   51|  1.23k|    {                                                                                                           \
   52|  1.23k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  1.23k|    }                                                                                                           \
extensions_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|  4.96k|    {                                                                                                           \
   52|  4.96k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  4.96k|    }                                                                                                           \
extensions_clnt.c:ossl_check_SSL_CIPHER_sk_type:
   55|  2.48k|    {                                                                                                           \
   56|  2.48k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  2.48k|    }                                                                                                           \
statem_clnt.c:ossl_check_const_SSL_CIPHER_sk_type:
   51|   150k|    {                                                                                                           \
   52|   150k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   150k|    }                                                                                                           \
tasn_dec.c:ossl_check_ASN1_VALUE_sk_type:
   55|  3.38M|    {                                                                                                           \
   56|  3.38M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  3.38M|    }                                                                                                           \
tasn_dec.c:ossl_check_ASN1_VALUE_type:
   47|  3.38M|    {                                                                                                           \
   48|  3.38M|        return ptr;                                                                                             \
   49|  3.38M|    }                                                                                                           \
tasn_enc.c:sk_const_ASN1_VALUE_num:
   82|  9.55M|    {                                                                                                                      \
   83|  9.55M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  9.55M|    }                                                                                                                      \
tasn_enc.c:sk_const_ASN1_VALUE_value:
   86|  4.09M|    {                                                                                                                      \
   87|  4.09M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  4.09M|    }                                                                                                                      \
tasn_fre.c:ossl_check_const_ASN1_VALUE_sk_type:
   51|  2.28M|    {                                                                                                           \
   52|  2.28M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  2.28M|    }                                                                                                           \
tasn_fre.c:ossl_check_ASN1_VALUE_sk_type:
   55|   961k|    {                                                                                                           \
   56|   961k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   961k|    }                                                                                                           \
conf_mod.c:sk_CONF_IMODULE_free:
  114|      2|    {                                                                                                                      \
  115|      2|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      2|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_dup:
  184|      1|    {                                                                                                                      \
  185|      1|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  186|      1|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_num:
   82|      2|    {                                                                                                                      \
   83|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      2|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_free:
  114|      3|    {                                                                                                                      \
  115|      3|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      3|    }                                                                                                                      \
conf_mod.c:sk_CONF_MODULE_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
conf_mod.c:sk_CONF_IMODULE_num:
   82|      1|    {                                                                                                                      \
   83|      1|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      1|    }                                                                                                                      \
ct_log.c:ossl_check_CTLOG_sk_type:
   55|  2.09k|    {                                                                                                           \
   56|  2.09k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  2.09k|    }                                                                                                           \
ct_log.c:ossl_check_CTLOG_freefunc_type:
   67|  2.09k|    {                                                                                                           \
   68|  2.09k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  2.09k|    }
ct_sct.c:ossl_check_SCT_sk_type:
   55|  1.31k|    {                                                                                                           \
   56|  1.31k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.31k|    }                                                                                                           \
ct_sct.c:ossl_check_SCT_freefunc_type:
   67|  1.31k|    {                                                                                                           \
   68|  1.31k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.31k|    }
dso_lib.c:ossl_check_void_sk_type:
   55|    879|    {                                                                                                           \
   56|    879|        return (OPENSSL_STACK *)sk;                                                                             \
   57|    879|    }                                                                                                           \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_push:
  131|     11|    {                                                                                                                      \
  132|     11|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|     11|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_push:
  131|    152|    {                                                                                                                      \
  132|    152|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|    152|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_num:
   82|      2|    {                                                                                                                      \
   83|      2|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_num:
   82|   381k|    {                                                                                                                      \
   83|   381k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   381k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_set_cmp_func:
  196|      4|    {                                                                                                                      \
  197|      4|        return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare);             \
  198|      4|    }
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_value:
   86|  1.47M|    {                                                                                                                      \
   87|  1.47M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  1.47M|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_INSTANCE_sort:
  176|      2|    {                                                                                                                      \
  177|      2|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  178|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_value:
   86|  1.67k|    {                                                                                                                      \
   87|  1.67k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  1.67k|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_pop_free:
  147|      2|    {                                                                                                                      \
  148|      2|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      2|                                                                                                                           \
  150|      2|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      2|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      2|                                                                                                                           \
  153|      2|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      2|    }                                                                                                                      \
decoder_lib.c:sk_OSSL_DECODER_freefunc_thunk:
   77|    152|    {                                                                                                                      \
   78|    152|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|    152|        freefunc((t3 *)ptr);                                                                                               \
   80|    152|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_pop_free:
  147|   190k|    {                                                                                                                      \
  148|   190k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   190k|                                                                                                                           \
  150|   190k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   190k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   190k|                                                                                                                           \
  153|   190k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   190k|    }                                                                                                                      \
decoder_meth.c:sk_OSSL_DECODER_INSTANCE_freefunc_thunk:
   77|  1.09M|    {                                                                                                                      \
   78|  1.09M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  1.09M|        freefunc((t3 *)ptr);                                                                                               \
   80|  1.09M|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_push:
  131|      3|    {                                                                                                                      \
  132|      3|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      3|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_num:
   82|   190k|    {                                                                                                                      \
   83|   190k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   190k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_value:
   86|   190k|    {                                                                                                                      \
   87|   190k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   190k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_pop_free:
  147|   190k|    {                                                                                                                      \
  148|   190k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   190k|                                                                                                                           \
  150|   190k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   190k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   190k|                                                                                                                           \
  153|   190k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   190k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_freefunc_thunk:
   77|   242k|    {                                                                                                                      \
   78|   242k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   242k|        freefunc((t3 *)ptr);                                                                                               \
   80|   242k|    }                                                                                                                      \
decoder_pkey.c:sk_OSSL_DECODER_INSTANCE_deep_copy:
  190|   190k|    {                                                                                                                      \
  191|   190k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  192|   190k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  193|   190k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  194|   190k|    }                                                                                                                      \
decoder_pkey.c:sk_EVP_KEYMGMT_deep_copy:
  190|   190k|    {                                                                                                                      \
  191|   190k|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  192|   190k|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  193|   190k|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  194|   190k|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_insert:
  156|      1|    {                                                                                                                      \
  157|      1|        return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx);                                             \
  158|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_push:
  131|      1|    {                                                                                                                      \
  132|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
eng_lib.c:sk_ENGINE_CLEANUP_ITEM_freefunc_thunk:
   77|      2|    {                                                                                                                      \
   78|      2|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|      2|        freefunc((t3 *)ptr);                                                                                               \
   80|      2|    }                                                                                                                      \
keymgmt_lib.c:sk_OP_CACHE_ELEM_pop_free:
  147|   388k|    {                                                                                                                      \
  148|   388k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   388k|                                                                                                                           \
  150|   388k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   388k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   388k|                                                                                                                           \
  153|   388k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   388k|    }                                                                                                                      \
p_lib.c:ossl_check_X509_ATTRIBUTE_sk_type:
   55|   388k|    {                                                                                                           \
   56|   388k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   388k|    }                                                                                                           \
p_lib.c:ossl_check_X509_ATTRIBUTE_freefunc_type:
   67|   388k|    {                                                                                                           \
   68|   388k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|   388k|    }
core_namemap.c:sk_NAMES_value:
   86|   476k|    {                                                                                                                      \
   87|   476k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   476k|    }                                                                                                                      \
core_namemap.c:ossl_check_const_OPENSSL_STRING_sk_type:
   51|  2.48M|    {                                                                                                           \
   52|  2.48M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  2.48M|    }                                                                                                           \
core_namemap.c:ossl_check_OPENSSL_STRING_sk_type:
   55|   744k|    {                                                                                                           \
   56|   744k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   744k|    }                                                                                                           \
core_namemap.c:ossl_check_OPENSSL_STRING_type:
   47|   310k|    {                                                                                                           \
   48|   310k|        return ptr;                                                                                             \
   49|   310k|    }                                                                                                           \
core_namemap.c:sk_NAMES_push:
  131|   133k|    {                                                                                                                      \
  132|   133k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|   133k|    }                                                                                                                      \
core_namemap.c:sk_NAMES_num:
   82|   133k|    {                                                                                                                      \
   83|   133k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   133k|    }                                                                                                                      \
core_namemap.c:ossl_check_OPENSSL_STRING_freefunc_type:
   67|   133k|    {                                                                                                           \
   68|   133k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|   133k|    }
core_namemap.c:sk_NAMES_new_null:
   98|    695|    {                                                                                                                      \
   99|    695|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|    695|    }                                                                                                                      \
core_namemap.c:sk_NAMES_pop_free:
  147|    695|    {                                                                                                                      \
  148|    695|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    695|                                                                                                                           \
  150|    695|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    695|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    695|                                                                                                                           \
  153|    695|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    695|    }                                                                                                                      \
core_namemap.c:sk_NAMES_freefunc_thunk:
   77|   133k|    {                                                                                                                      \
   78|   133k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   133k|        freefunc((t3 *)ptr);                                                                                               \
   80|   133k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_pop_free:
  147|  12.5k|    {                                                                                                                      \
  148|  12.5k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  12.5k|                                                                                                                           \
  150|  12.5k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  12.5k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  12.5k|                                                                                                                           \
  153|  12.5k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  12.5k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_freefunc_thunk:
   77|      2|    {                                                                                                                      \
   78|      2|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|      2|        freefunc((t3 *)ptr);                                                                                               \
   80|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_num:
   82|  4.24M|    {                                                                                                                      \
   83|  4.24M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  4.24M|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_value:
   86|  2.90k|    {                                                                                                                      \
   87|  2.90k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  2.90k|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_new_null:
   98|      2|    {                                                                                                                      \
   99|      2|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      2|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_push:
  131|      4|    {                                                                                                                      \
  132|      4|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      4|    }                                                                                                                      \
ex_data.c:sk_EX_CALLBACK_set:
  160|      2|    {                                                                                                                      \
  161|      2|        return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr);                                          \
  162|      2|    }                                                                                                                      \
ex_data.c:ossl_check_const_void_sk_type:
   51|  9.28k|    {                                                                                                           \
   52|  9.28k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  9.28k|    }                                                                                                           \
ex_data.c:ossl_check_void_sk_type:
   55|  2.12M|    {                                                                                                           \
   56|  2.12M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  2.12M|    }                                                                                                           \
ex_data.c:ossl_check_void_type:
   47|  4.80k|    {                                                                                                           \
   48|  4.80k|        return ptr;                                                                                             \
   49|  4.80k|    }                                                                                                           \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_free:
  114|      1|    {                                                                                                                      \
  115|      1|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_push:
  131|      1|    {                                                                                                                      \
  132|      1|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      1|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_num:
   82|  1.86k|    {                                                                                                                      \
   83|  1.86k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  1.86k|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_value:
   86|    931|    {                                                                                                                      \
   87|    931|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|    931|    }                                                                                                                      \
initthread.c:sk_THREAD_EVENT_HANDLER_PTR_delete:
  122|      1|    {                                                                                                                      \
  123|      1|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  124|      1|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_new_null:
   98|  2.47k|    {                                                                                                                      \
   99|  2.47k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|  2.47k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_pop:
  139|  2.47k|    {                                                                                                                      \
  140|  2.47k|        return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk);                                                                  \
  141|  2.47k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_free:
  114|  2.47k|    {                                                                                                                      \
  115|  2.47k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|  2.47k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_push:
  131|  2.47k|    {                                                                                                                      \
  132|  2.47k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  2.47k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_num:
   82|  9.88k|    {                                                                                                                      \
   83|  9.88k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  9.88k|    }                                                                                                                      \
param_build.c:sk_OSSL_PARAM_BLD_DEF_value:
   86|  2.47k|    {                                                                                                                      \
   87|  2.47k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  2.47k|    }                                                                                                                      \
provider_conf.c:sk_OSSL_PROVIDER_pop_free:
  147|    695|    {                                                                                                                      \
  148|    695|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    695|                                                                                                                           \
  150|    695|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    695|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    695|                                                                                                                           \
  153|    695|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    695|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_pop_free:
  147|    931|    {                                                                                                                      \
  148|    931|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    931|                                                                                                                           \
  150|    931|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    931|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    931|                                                                                                                           \
  153|    931|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    931|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_pop_free:
  147|    695|    {                                                                                                                      \
  148|    695|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    695|                                                                                                                           \
  150|    695|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    695|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    695|                                                                                                                           \
  153|    695|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    695|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_freefunc_thunk:
   77|    776|    {                                                                                                                      \
   78|    776|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|    776|        freefunc((t3 *)ptr);                                                                                               \
   80|    776|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_pop_free:
  147|    695|    {                                                                                                                      \
  148|    695|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|    695|                                                                                                                           \
  150|    695|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|    695|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|    695|                                                                                                                           \
  153|    695|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|    695|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_new:
   90|    695|    {                                                                                                                      \
   91|    695|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
   92|    695|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
   93|    695|                                                                                                                           \
   94|    695|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
   95|    695|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
   96|    695|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_new_null:
   98|    695|    {                                                                                                                      \
   99|    695|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|    695|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_sort:
  176|  2.47k|    {                                                                                                                      \
  177|  2.47k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  178|  2.47k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_find:
  164|  2.55k|    {                                                                                                                      \
  165|  2.55k|        return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  166|  2.55k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_value:
   86|   210k|    {                                                                                                                      \
   87|   210k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|   210k|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_deep_copy:
  190|    931|    {                                                                                                                      \
  191|    931|        return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk,                                             \
  192|    931|            (OPENSSL_sk_copyfunc)copyfunc,                                                                                 \
  193|    931|            (OPENSSL_sk_freefunc)freefunc);                                                                                \
  194|    931|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_push:
  131|    776|    {                                                                                                                      \
  132|    776|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|    776|    }                                                                                                                      \
provider_core.c:sk_INFOPAIR_num:
   82|  3.70k|    {                                                                                                                      \
   83|  3.70k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  3.70k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_dup:
  184|  64.2k|    {                                                                                                                      \
  185|  64.2k|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  186|  64.2k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_num:
   82|  64.2k|    {                                                                                                                      \
   83|  64.2k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  64.2k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_free:
  114|  64.2k|    {                                                                                                                      \
  115|  64.2k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|  64.2k|    }                                                                                                                      \
provider_core.c:sk_OSSL_PROVIDER_CHILD_CB_num:
   82|    857|    {                                                                                                                      \
   83|    857|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|    857|    }                                                                                                                      \
o_names.c:sk_NAME_FUNCS_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
obj_xref.c:sk_nid_triple_free:
  114|      1|    {                                                                                                                      \
  115|      1|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      1|    }                                                                                                                      \
pem_info.c:ossl_check_X509_INFO_sk_type:
   55|   190k|    {                                                                                                           \
   56|   190k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   190k|    }                                                                                                           \
pem_info.c:ossl_check_X509_INFO_type:
   47|   190k|    {                                                                                                           \
   48|   190k|        return ptr;                                                                                             \
   49|   190k|    }                                                                                                           \
property.c:sk_IMPLEMENTATION_pop_free:
  147|   141k|    {                                                                                                                      \
  148|   141k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   141k|                                                                                                                           \
  150|   141k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   141k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   141k|                                                                                                                           \
  153|   141k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   141k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_freefunc_thunk:
   77|   141k|    {                                                                                                                      \
   78|   141k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   141k|        freefunc((t3 *)ptr);                                                                                               \
   80|   141k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_new_null:
   98|   141k|    {                                                                                                                      \
   99|   141k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   141k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_num:
   82|   334k|    {                                                                                                                      \
   83|   334k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   334k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_value:
   86|  48.9k|    {                                                                                                                      \
   87|  48.9k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  48.9k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_push:
  131|   141k|    {                                                                                                                      \
  132|   141k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|   141k|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_delete:
  122|     53|    {                                                                                                                      \
  123|     53|        return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i);                                                            \
  124|     53|    }                                                                                                                      \
property.c:sk_ALGORITHM_new_reserve:
  102|      6|    {                                                                                                                      \
  103|      6|        OPENSSL_STACK *ret = OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n);                                      \
  104|      6|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  105|      6|                                                                                                                           \
  106|      6|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  107|      6|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
  108|      6|    }                                                                                                                      \
property.c:sk_ALGORITHM_freefunc_thunk:
   77|    656|    {                                                                                                                      \
   78|    656|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|    656|        freefunc((t3 *)ptr);                                                                                               \
   80|    656|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_dup:
  184|    656|    {                                                                                                                      \
  185|    656|        return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk);                                                  \
  186|    656|    }                                                                                                                      \
property.c:sk_ALGORITHM_push:
  131|    656|    {                                                                                                                      \
  132|    656|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|    656|    }                                                                                                                      \
property.c:sk_ALGORITHM_num:
   82|      6|    {                                                                                                                      \
   83|      6|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|      6|    }                                                                                                                      \
property.c:sk_ALGORITHM_value:
   86|    656|    {                                                                                                                      \
   87|    656|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|    656|    }                                                                                                                      \
property.c:sk_ALGORITHM_pop_free:
  147|      6|    {                                                                                                                      \
  148|      6|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      6|                                                                                                                           \
  150|      6|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      6|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      6|                                                                                                                           \
  153|      6|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      6|    }                                                                                                                      \
property.c:sk_IMPLEMENTATION_free:
  114|    656|    {                                                                                                                      \
  115|    656|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|    656|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_new:
   90|  28.2k|    {                                                                                                                      \
   91|  28.2k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
   92|  28.2k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
   93|  28.2k|                                                                                                                           \
   94|  28.2k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
   95|  28.2k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
   96|  28.2k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_freefunc_thunk:
   77|   586k|    {                                                                                                                      \
   78|   586k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|   586k|        freefunc((t3 *)ptr);                                                                                               \
   80|   586k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_push:
  131|   586k|    {                                                                                                                      \
  132|   586k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|   586k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_num:
   82|  11.1k|    {                                                                                                                      \
   83|  11.1k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  11.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_sort:
  176|  11.1k|    {                                                                                                                      \
  177|  11.1k|        OPENSSL_sk_sort((OPENSSL_STACK *)sk);                                                                              \
  178|  11.1k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_value:
   86|  11.2k|    {                                                                                                                      \
   87|  11.2k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  11.2k|    }                                                                                                                      \
property_parse.c:sk_OSSL_PROPERTY_DEFINITION_pop_free:
  147|  28.2k|    {                                                                                                                      \
  148|  28.2k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  28.2k|                                                                                                                           \
  150|  28.2k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  28.2k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  28.2k|                                                                                                                           \
  153|  28.2k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  28.2k|    }                                                                                                                      \
property_string.c:ossl_check_OPENSSL_CSTRING_sk_type:
   55|  9.49k|    {                                                                                                           \
   56|  9.49k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  9.49k|    }                                                                                                           \
property_string.c:ossl_check_OPENSSL_CSTRING_type:
   47|  8.10k|    {                                                                                                           \
   48|  8.10k|        return ptr;                                                                                             \
   49|  8.10k|    }                                                                                                           \
property_string.c:ossl_check_const_OPENSSL_CSTRING_sk_type:
   51|  2.89k|    {                                                                                                           \
   52|  2.89k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  2.89k|    }                                                                                                           \
rsa_backend.c:sk_BIGNUM_const_new_null:
   98|   415k|    {                                                                                                                      \
   99|   415k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   415k|    }                                                                                                                      \
rsa_backend.c:sk_BIGNUM_const_free:
  114|   415k|    {                                                                                                                      \
  115|   415k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|   415k|    }                                                                                                                      \
rsa_lib.c:sk_RSA_PRIME_INFO_pop_free:
  147|   138k|    {                                                                                                                      \
  148|   138k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   138k|                                                                                                                           \
  150|   138k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   138k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   138k|                                                                                                                           \
  153|   138k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   138k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_new_null:
   98|   415k|    {                                                                                                                      \
   99|   415k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   415k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_num:
   82|   415k|    {                                                                                                                      \
   83|   415k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   415k|    }                                                                                                                      \
rsa_lib.c:sk_BIGNUM_const_free:
  114|   415k|    {                                                                                                                      \
  115|   415k|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|   415k|    }                                                                                                                      \
rsa_ossl.c:sk_RSA_PRIME_INFO_num:
   82|   138k|    {                                                                                                                      \
   83|   138k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|   138k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_pop_free:
  147|  1.26k|    {                                                                                                                      \
  148|  1.26k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  1.26k|                                                                                                                           \
  150|  1.26k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  1.26k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  1.26k|                                                                                                                           \
  153|  1.26k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  1.26k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_freefunc_thunk:
   77|  2.82k|    {                                                                                                                      \
   78|  2.82k|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  2.82k|        freefunc((t3 *)ptr);                                                                                               \
   80|  2.82k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_pop_free:
  147|  2.82k|    {                                                                                                                      \
  148|  2.82k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|  2.82k|                                                                                                                           \
  150|  2.82k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|  2.82k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|  2.82k|                                                                                                                           \
  153|  2.82k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|  2.82k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_num:
   82|  39.7k|    {                                                                                                                      \
   83|  39.7k|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  39.7k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_value:
   86|  33.5k|    {                                                                                                                      \
   87|  33.5k|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  33.5k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_new_null:
   98|  1.26k|    {                                                                                                                      \
   99|  1.26k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|  1.26k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_HASH_new:
   90|  2.82k|    {                                                                                                                      \
   91|  2.82k|        OPENSSL_STACK *ret = OPENSSL_sk_new((OPENSSL_sk_compfunc)compare);                                                 \
   92|  2.82k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
   93|  2.82k|                                                                                                                           \
   94|  2.82k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
   95|  2.82k|        return (STACK_OF(t1) *)OPENSSL_sk_set_thunks(ret, f_thunk);                                                        \
   96|  2.82k|    }                                                                                                                      \
by_dir.c:sk_BY_DIR_ENTRY_push:
  131|  2.82k|    {                                                                                                                      \
  132|  2.82k|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  2.82k|    }                                                                                                                      \
by_file.c:ossl_check_const_X509_INFO_sk_type:
   51|   382k|    {                                                                                                           \
   52|   382k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   382k|    }                                                                                                           \
by_file.c:ossl_check_X509_INFO_sk_type:
   55|  1.31k|    {                                                                                                           \
   56|  1.31k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.31k|    }                                                                                                           \
by_file.c:ossl_check_X509_INFO_freefunc_type:
   67|  1.31k|    {                                                                                                           \
   68|  1.31k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  1.31k|    }
t_x509.c:ossl_check_X509_sk_type:
   55|  46.8k|    {                                                                                                           \
   56|  46.8k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  46.8k|    }                                                                                                           \
t_x509.c:ossl_check_X509_freefunc_type:
   67|  46.8k|    {                                                                                                           \
   68|  46.8k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  46.8k|    }
v3_lib.c:ossl_check_const_X509_EXTENSION_sk_type:
   51|  1.05M|    {                                                                                                           \
   52|  1.05M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  1.05M|    }                                                                                                           \
v3_purp.c:ossl_check_const_DIST_POINT_sk_type:
   51|  13.6k|    {                                                                                                           \
   52|  13.6k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  13.6k|    }                                                                                                           \
v3_purp.c:ossl_check_const_GENERAL_NAME_sk_type:
   51|    760|    {                                                                                                           \
   52|    760|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|    760|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_compfunc_type:
   59|  2.09k|    {                                                                                                           \
   60|  2.09k|        return (OPENSSL_sk_compfunc)cmp;                                                                        \
   61|  2.09k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_sk_type:
   55|   377k|    {                                                                                                           \
   56|   377k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   377k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_LOOKUP_sk_type:
   55|  4.67k|    {                                                                                                           \
   56|  4.67k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  4.67k|    }                                                                                                           \
x509_lu.c:ossl_check_const_X509_LOOKUP_sk_type:
   51|  12.8k|    {                                                                                                           \
   52|  12.8k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  12.8k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_freefunc_type:
   67|  2.09k|    {                                                                                                           \
   68|  2.09k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  2.09k|    }
x509_lu.c:ossl_check_X509_LOOKUP_type:
   47|  2.58k|    {                                                                                                           \
   48|  2.58k|        return ptr;                                                                                             \
   49|  2.58k|    }                                                                                                           \
x509_lu.c:ossl_check_const_X509_OBJECT_sk_type:
   51|  11.0k|    {                                                                                                           \
   52|  11.0k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  11.0k|    }                                                                                                           \
x509_lu.c:ossl_check_X509_OBJECT_type:
   47|   375k|    {                                                                                                           \
   48|   375k|        return ptr;                                                                                             \
   49|   375k|    }                                                                                                           \
x509_v3.c:ossl_check_const_X509_EXTENSION_sk_type:
   51|   125k|    {                                                                                                           \
   52|   125k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|   125k|    }                                                                                                           \
x509_vpm.c:ossl_check_ASN1_OBJECT_sk_type:
   55|  5.47k|    {                                                                                                           \
   56|  5.47k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  5.47k|    }                                                                                                           \
x509_vpm.c:ossl_check_ASN1_OBJECT_freefunc_type:
   67|  5.47k|    {                                                                                                           \
   68|  5.47k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  5.47k|    }
x509_vpm.c:ossl_check_OPENSSL_STRING_sk_type:
   55|  5.47k|    {                                                                                                           \
   56|  5.47k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  5.47k|    }                                                                                                           \
x509_vpm.c:ossl_check_OPENSSL_STRING_freefunc_type:
   67|  5.47k|    {                                                                                                           \
   68|  5.47k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  5.47k|    }
x_name.c:ossl_check_X509_NAME_ENTRY_sk_type:
   55|  7.58M|    {                                                                                                           \
   56|  7.58M|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  7.58M|    }                                                                                                           \
x_name.c:ossl_check_X509_NAME_ENTRY_freefunc_type:
   67|  2.12M|    {                                                                                                           \
   68|  2.12M|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|  2.12M|    }
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_num:
   82|  1.74M|    {                                                                                                                      \
   83|  1.74M|        return OPENSSL_sk_num((const OPENSSL_STACK *)sk);                                                                  \
   84|  1.74M|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_value:
   86|  1.36M|    {                                                                                                                      \
   87|  1.36M|        return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx);                                                     \
   88|  1.36M|    }                                                                                                                      \
x_name.c:ossl_check_const_X509_NAME_ENTRY_sk_type:
   51|  7.58M|    {                                                                                                           \
   52|  7.58M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  7.58M|    }                                                                                                           \
x_name.c:ossl_check_X509_NAME_ENTRY_type:
   47|  4.09M|    {                                                                                                           \
   48|  4.09M|        return ptr;                                                                                             \
   49|  4.09M|    }                                                                                                           \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_new_null:
   98|   381k|    {                                                                                                                      \
   99|   381k|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|   381k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_push:
  131|  1.36M|    {                                                                                                                      \
  132|  1.36M|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|  1.36M|    }                                                                                                                      \
x_name.c:ossl_check_const_ASN1_VALUE_sk_type:
   51|  6.22M|    {                                                                                                           \
   52|  6.22M|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  6.22M|    }                                                                                                           \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_pop_free:
  147|   763k|    {                                                                                                                      \
  148|   763k|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|   763k|                                                                                                                           \
  150|   763k|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|   763k|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|   763k|                                                                                                                           \
  153|   763k|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|   763k|    }                                                                                                                      \
x_name.c:sk_STACK_OF_X509_NAME_ENTRY_freefunc_thunk:
   77|  2.72M|    {                                                                                                                      \
   78|  2.72M|        sk_##t1##_freefunc freefunc = (sk_##t1##_freefunc)freefunc_arg;                                                    \
   79|  2.72M|        freefunc((t3 *)ptr);                                                                                               \
   80|  2.72M|    }                                                                                                                      \
x_x509.c:ossl_check_IPAddressFamily_sk_type:
   55|   381k|    {                                                                                                           \
   56|   381k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|   381k|    }                                                                                                           \
x_x509.c:ossl_check_IPAddressFamily_freefunc_type:
   67|   381k|    {                                                                                                           \
   68|   381k|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|   381k|    }
dso_dlfcn.c:ossl_check_const_void_sk_type:
   51|    879|    {                                                                                                           \
   52|    879|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|    879|    }                                                                                                           \
eng_dyn.c:ossl_check_OPENSSL_STRING_freefunc_type:
   67|    724|    {                                                                                                           \
   68|    724|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|    724|    }
eng_dyn.c:ossl_check_const_OPENSSL_STRING_sk_type:
   51|  1.44k|    {                                                                                                           \
   52|  1.44k|        return (const OPENSSL_STACK *)sk;                                                                       \
   53|  1.44k|    }                                                                                                           \
eng_dyn.c:ossl_check_OPENSSL_STRING_sk_type:
   55|  1.44k|    {                                                                                                           \
   56|  1.44k|        return (OPENSSL_STACK *)sk;                                                                             \
   57|  1.44k|    }                                                                                                           \
eng_dyn.c:ossl_check_OPENSSL_STRING_type:
   47|    724|    {                                                                                                           \
   48|    724|        return ptr;                                                                                             \
   49|    724|    }                                                                                                           \
eng_table.c:sk_ENGINE_new_null:
   98|      1|    {                                                                                                                      \
   99|      1|        return (STACK_OF(t1) *)OPENSSL_sk_new_null();                                                                      \
  100|      1|    }                                                                                                                      \
eng_table.c:sk_ENGINE_free:
  114|      1|    {                                                                                                                      \
  115|      1|        OPENSSL_sk_free((OPENSSL_STACK *)sk);                                                                              \
  116|      1|    }                                                                                                                      \
eng_table.c:sk_ENGINE_delete_ptr:
  126|      2|    {                                                                                                                      \
  127|      2|        return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk,                                                            \
  128|      2|            (const void *)ptr);                                                                                            \
  129|      2|    }                                                                                                                      \
eng_table.c:sk_ENGINE_push:
  131|      2|    {                                                                                                                      \
  132|      2|        return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr);                                                    \
  133|      2|    }                                                                                                                      \
evp_pbe.c:sk_EVP_PBE_CTL_pop_free:
  147|      1|    {                                                                                                                      \
  148|      1|        OPENSSL_sk_freefunc_thunk f_thunk;                                                                                 \
  149|      1|                                                                                                                           \
  150|      1|        f_thunk = (OPENSSL_sk_freefunc_thunk)sk_##t1##_freefunc_thunk;                                                     \
  151|      1|        sk = (STACK_OF(t1) *)OPENSSL_sk_set_thunks((OPENSSL_STACK *)sk, f_thunk);                                          \
  152|      1|                                                                                                                           \
  153|      1|        OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc);                                           \
  154|      1|    }                                                                                                                      \
comp_methods.c:ossl_check_SSL_COMP_compfunc_type:
   59|    695|    {                                                                                                           \
   60|    695|        return (OPENSSL_sk_compfunc)cmp;                                                                        \
   61|    695|    }                                                                                                           \
comp_methods.c:ossl_check_SSL_COMP_sk_type:
   55|    695|    {                                                                                                           \
   56|    695|        return (OPENSSL_STACK *)sk;                                                                             \
   57|    695|    }                                                                                                           \
comp_methods.c:ossl_check_SSL_COMP_freefunc_type:
   67|    695|    {                                                                                                           \
   68|    695|        return (OPENSSL_sk_freefunc)fr;                                                                         \
   69|    695|    }

ossl_base_provider_init:
  140|     63|{
  141|     63|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  142|     63|    BIO_METHOD *corebiometh;
  143|       |
  144|     63|    if (!ossl_prov_bio_from_dispatch(in))
  ------------------
  |  Branch (144:9): [True: 0, False: 63]
  ------------------
  145|      0|        return 0;
  146|  3.40k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (146:12): [True: 3.33k, False: 63]
  ------------------
  147|  3.33k|        switch (in->function_id) {
  148|     63|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|     63|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (148:9): [True: 63, False: 3.27k]
  ------------------
  149|     63|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  150|     63|            break;
  151|     63|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|     63|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (151:9): [True: 63, False: 3.27k]
  ------------------
  152|     63|            c_get_params = OSSL_FUNC_core_get_params(in);
  153|     63|            break;
  154|     63|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|     63|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (154:9): [True: 63, False: 3.27k]
  ------------------
  155|     63|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  156|     63|            break;
  157|  3.15k|        default:
  ------------------
  |  Branch (157:9): [True: 3.15k, False: 189]
  ------------------
  158|       |            /* Just ignore anything we don't understand */
  159|  3.15k|            break;
  160|  3.33k|        }
  161|  3.33k|    }
  162|       |
  163|     63|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (163:9): [True: 0, False: 63]
  ------------------
  164|      0|        return 0;
  165|       |
  166|       |    /*
  167|       |     * We want to make sure that all calls from this provider that requires
  168|       |     * a library context use the same context as the one used to call our
  169|       |     * functions.  We do that by passing it along in the provider context.
  170|       |     *
  171|       |     * This only works for built-in providers.  Most providers should
  172|       |     * create their own library context.
  173|       |     */
  174|     63|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (174:9): [True: 0, False: 63]
  ------------------
  175|     63|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (175:12): [True: 0, False: 63]
  ------------------
  176|      0|        ossl_prov_ctx_free(*provctx);
  177|      0|        *provctx = NULL;
  178|      0|        return 0;
  179|      0|    }
  180|     63|    ossl_prov_ctx_set0_libctx(*provctx,
  181|     63|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  182|     63|    ossl_prov_ctx_set0_handle(*provctx, handle);
  183|     63|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  184|     63|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  185|       |
  186|     63|    *out = base_dispatch_table;
  187|       |
  188|     63|    return 1;
  189|     63|}
baseprov.c:base_teardown:
  120|     63|{
  121|     63|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  122|     63|    ossl_prov_ctx_free(provctx);
  123|     63|}
baseprov.c:base_query:
  104|  4.13k|{
  105|  4.13k|    *no_cache = 0;
  106|  4.13k|    switch (operation_id) {
  ------------------
  |  Branch (106:13): [True: 106, False: 4.02k]
  ------------------
  107|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (107:5): [True: 0, False: 4.13k]
  ------------------
  108|      0|        return base_encoder;
  109|      0|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      0|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (109:5): [True: 0, False: 4.13k]
  ------------------
  110|      0|        return base_decoder;
  111|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (111:5): [True: 0, False: 4.13k]
  ------------------
  112|      0|        return base_store;
  113|    106|    case OSSL_OP_RAND:
  ------------------
  |  |  287|    106|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (113:5): [True: 106, False: 4.02k]
  ------------------
  114|    106|        return base_rands;
  115|  4.13k|    }
  116|  4.02k|    return NULL;
  117|  4.13k|}

ossl_prov_bio_from_dispatch:
   27|    758|{
   28|  40.9k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (28:12): [True: 40.1k, False: 758]
  ------------------
   29|  40.1k|        switch (fns->function_id) {
  ------------------
  |  Branch (29:17): [True: 7.58k, False: 32.5k]
  ------------------
   30|    758|        case OSSL_FUNC_BIO_NEW_FILE:
  ------------------
  |  |  151|    758|#define OSSL_FUNC_BIO_NEW_FILE 40
  ------------------
  |  Branch (30:9): [True: 758, False: 39.4k]
  ------------------
   31|    758|            if (c_bio_new_file == NULL)
  ------------------
  |  Branch (31:17): [True: 1, False: 757]
  ------------------
   32|      1|                c_bio_new_file = OSSL_FUNC_BIO_new_file(fns);
   33|    758|            break;
   34|    758|        case OSSL_FUNC_BIO_NEW_MEMBUF:
  ------------------
  |  |  152|    758|#define OSSL_FUNC_BIO_NEW_MEMBUF 41
  ------------------
  |  Branch (34:9): [True: 758, False: 39.4k]
  ------------------
   35|    758|            if (c_bio_new_membuf == NULL)
  ------------------
  |  Branch (35:17): [True: 1, False: 757]
  ------------------
   36|      1|                c_bio_new_membuf = OSSL_FUNC_BIO_new_membuf(fns);
   37|    758|            break;
   38|    758|        case OSSL_FUNC_BIO_READ_EX:
  ------------------
  |  |  153|    758|#define OSSL_FUNC_BIO_READ_EX 42
  ------------------
  |  Branch (38:9): [True: 758, False: 39.4k]
  ------------------
   39|    758|            if (c_bio_read_ex == NULL)
  ------------------
  |  Branch (39:17): [True: 1, False: 757]
  ------------------
   40|      1|                c_bio_read_ex = OSSL_FUNC_BIO_read_ex(fns);
   41|    758|            break;
   42|    758|        case OSSL_FUNC_BIO_WRITE_EX:
  ------------------
  |  |  154|    758|#define OSSL_FUNC_BIO_WRITE_EX 43
  ------------------
  |  Branch (42:9): [True: 758, False: 39.4k]
  ------------------
   43|    758|            if (c_bio_write_ex == NULL)
  ------------------
  |  Branch (43:17): [True: 1, False: 757]
  ------------------
   44|      1|                c_bio_write_ex = OSSL_FUNC_BIO_write_ex(fns);
   45|    758|            break;
   46|    758|        case OSSL_FUNC_BIO_GETS:
  ------------------
  |  |  160|    758|#define OSSL_FUNC_BIO_GETS 49
  ------------------
  |  Branch (46:9): [True: 758, False: 39.4k]
  ------------------
   47|    758|            if (c_bio_gets == NULL)
  ------------------
  |  Branch (47:17): [True: 1, False: 757]
  ------------------
   48|      1|                c_bio_gets = OSSL_FUNC_BIO_gets(fns);
   49|    758|            break;
   50|    758|        case OSSL_FUNC_BIO_PUTS:
  ------------------
  |  |  159|    758|#define OSSL_FUNC_BIO_PUTS 48
  ------------------
  |  Branch (50:9): [True: 758, False: 39.4k]
  ------------------
   51|    758|            if (c_bio_puts == NULL)
  ------------------
  |  Branch (51:17): [True: 1, False: 757]
  ------------------
   52|      1|                c_bio_puts = OSSL_FUNC_BIO_puts(fns);
   53|    758|            break;
   54|    758|        case OSSL_FUNC_BIO_CTRL:
  ------------------
  |  |  161|    758|#define OSSL_FUNC_BIO_CTRL 50
  ------------------
  |  Branch (54:9): [True: 758, False: 39.4k]
  ------------------
   55|    758|            if (c_bio_ctrl == NULL)
  ------------------
  |  Branch (55:17): [True: 1, False: 757]
  ------------------
   56|      1|                c_bio_ctrl = OSSL_FUNC_BIO_ctrl(fns);
   57|    758|            break;
   58|    758|        case OSSL_FUNC_BIO_UP_REF:
  ------------------
  |  |  155|    758|#define OSSL_FUNC_BIO_UP_REF 44
  ------------------
  |  Branch (58:9): [True: 758, False: 39.4k]
  ------------------
   59|    758|            if (c_bio_up_ref == NULL)
  ------------------
  |  Branch (59:17): [True: 1, False: 757]
  ------------------
   60|      1|                c_bio_up_ref = OSSL_FUNC_BIO_up_ref(fns);
   61|    758|            break;
   62|    758|        case OSSL_FUNC_BIO_FREE:
  ------------------
  |  |  156|    758|#define OSSL_FUNC_BIO_FREE 45
  ------------------
  |  Branch (62:9): [True: 758, False: 39.4k]
  ------------------
   63|    758|            if (c_bio_free == NULL)
  ------------------
  |  Branch (63:17): [True: 1, False: 757]
  ------------------
   64|      1|                c_bio_free = OSSL_FUNC_BIO_free(fns);
   65|    758|            break;
   66|    758|        case OSSL_FUNC_BIO_VPRINTF:
  ------------------
  |  |  157|    758|#define OSSL_FUNC_BIO_VPRINTF 46
  ------------------
  |  Branch (66:9): [True: 758, False: 39.4k]
  ------------------
   67|    758|            if (c_bio_vprintf == NULL)
  ------------------
  |  Branch (67:17): [True: 1, False: 757]
  ------------------
   68|      1|                c_bio_vprintf = OSSL_FUNC_BIO_vprintf(fns);
   69|    758|            break;
   70|  40.1k|        }
   71|  40.1k|    }
   72|       |
   73|    758|    return 1;
   74|    758|}
ossl_prov_bio_read_ex:
   92|   762k|{
   93|   762k|    if (c_bio_read_ex == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 762k]
  ------------------
   94|      0|        return 0;
   95|   762k|    return c_bio_read_ex(bio, data, data_len, bytes_read);
   96|   762k|}
ossl_prov_bio_up_ref:
  128|   381k|{
  129|   381k|    if (c_bio_up_ref == NULL)
  ------------------
  |  Branch (129:9): [True: 0, False: 381k]
  ------------------
  130|      0|        return 0;
  131|   381k|    return c_bio_up_ref(bio);
  132|   381k|}
ossl_prov_bio_free:
  135|   381k|{
  136|   381k|    if (c_bio_free == NULL)
  ------------------
  |  Branch (136:9): [True: 0, False: 381k]
  ------------------
  137|      0|        return 0;
  138|   381k|    return c_bio_free(bio);
  139|   381k|}
ossl_bio_prov_init_bio_method:
  207|    758|{
  208|    758|    BIO_METHOD *corebiometh = NULL;
  209|       |
  210|    758|    corebiometh = BIO_meth_new(BIO_TYPE_CORE_TO_PROV, "BIO to Core filter");
  ------------------
  |  |   71|    758|#define BIO_TYPE_CORE_TO_PROV (25 | BIO_TYPE_SOURCE_SINK)
  |  |  ------------------
  |  |  |  |   43|    758|#define BIO_TYPE_SOURCE_SINK 0x0400
  |  |  ------------------
  ------------------
  211|    758|    if (corebiometh == NULL
  ------------------
  |  Branch (211:9): [True: 0, False: 758]
  ------------------
  212|    758|        || !BIO_meth_set_write_ex(corebiometh, bio_core_write_ex)
  ------------------
  |  Branch (212:12): [True: 0, False: 758]
  ------------------
  213|    758|        || !BIO_meth_set_read_ex(corebiometh, bio_core_read_ex)
  ------------------
  |  Branch (213:12): [True: 0, False: 758]
  ------------------
  214|    758|        || !BIO_meth_set_puts(corebiometh, bio_core_puts)
  ------------------
  |  Branch (214:12): [True: 0, False: 758]
  ------------------
  215|    758|        || !BIO_meth_set_gets(corebiometh, bio_core_gets)
  ------------------
  |  Branch (215:12): [True: 0, False: 758]
  ------------------
  216|    758|        || !BIO_meth_set_ctrl(corebiometh, bio_core_ctrl)
  ------------------
  |  Branch (216:12): [True: 0, False: 758]
  ------------------
  217|    758|        || !BIO_meth_set_create(corebiometh, bio_core_new)
  ------------------
  |  Branch (217:12): [True: 0, False: 758]
  ------------------
  218|    758|        || !BIO_meth_set_destroy(corebiometh, bio_core_free)) {
  ------------------
  |  Branch (218:12): [True: 0, False: 758]
  ------------------
  219|      0|        BIO_meth_free(corebiometh);
  220|      0|        return NULL;
  221|      0|    }
  222|       |
  223|    758|    return corebiometh;
  224|    758|}
ossl_bio_new_from_core_bio:
  227|   381k|{
  228|   381k|    BIO *outbio;
  229|   381k|    BIO_METHOD *corebiometh = ossl_prov_ctx_get0_core_bio_method(provctx);
  230|       |
  231|   381k|    if (corebiometh == NULL)
  ------------------
  |  Branch (231:9): [True: 0, False: 381k]
  ------------------
  232|      0|        return NULL;
  233|       |
  234|   381k|    if ((outbio = BIO_new(corebiometh)) == NULL)
  ------------------
  |  Branch (234:9): [True: 0, False: 381k]
  ------------------
  235|      0|        return NULL;
  236|   381k|    if (!ossl_prov_bio_up_ref(corebio)) {
  ------------------
  |  Branch (236:9): [True: 0, False: 381k]
  ------------------
  237|      0|        BIO_free(outbio);
  238|      0|        return NULL;
  239|      0|    }
  240|   381k|    BIO_set_data(outbio, corebio);
  241|   381k|    return outbio;
  242|   381k|}
bio_prov.c:bio_core_read_ex:
  166|   762k|{
  167|   762k|    return ossl_prov_bio_read_ex(BIO_get_data(bio), data, data_len, bytes_read);
  168|   762k|}
bio_prov.c:bio_core_new:
  192|   381k|{
  193|   381k|    BIO_set_init(bio, 1);
  194|       |
  195|   381k|    return 1;
  196|   381k|}
bio_prov.c:bio_core_free:
  199|   381k|{
  200|   381k|    BIO_set_init(bio, 0);
  201|   381k|    ossl_prov_bio_free(BIO_get_data(bio));
  202|       |
  203|   381k|    return 1;
  204|   381k|}

ossl_prov_get_capabilities:
  336|  4.18k|{
  337|  4.18k|    if (OPENSSL_strcasecmp(capability, "TLS-GROUP") == 0)
  ------------------
  |  Branch (337:9): [True: 2.09k, False: 2.09k]
  ------------------
  338|  2.09k|        return tls_group_capability(cb, arg);
  339|  2.09k|    if (OPENSSL_strcasecmp(capability, "TLS-SIGALG") == 0)
  ------------------
  |  Branch (339:9): [True: 2.09k, False: 0]
  ------------------
  340|  2.09k|        return tls_sigalg_capability(cb, arg);
  341|       |
  342|       |    /* We don't support this capability */
  343|      0|    return 0;
  344|  2.09k|}
capabilities.c:tls_group_capability:
  261|  2.09k|{
  262|  2.09k|#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_ML_KEM)
  263|  2.09k|    size_t i;
  264|       |
  265|   125k|    for (i = 0; i < OSSL_NELEM(param_group_list); i++)
  ------------------
  |  |   14|   125k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (265:17): [True: 123k, False: 2.09k]
  ------------------
  266|   123k|        if (!cb(param_group_list[i], arg))
  ------------------
  |  Branch (266:13): [True: 0, False: 123k]
  ------------------
  267|      0|            return 0;
  268|  2.09k|#endif
  269|       |
  270|  2.09k|    return 1;
  271|  2.09k|}
capabilities.c:tls_sigalg_capability:
  323|  2.09k|{
  324|  2.09k|#if !defined(OPENSSL_NO_ML_DSA)
  325|  2.09k|    size_t i;
  326|       |
  327|  8.37k|    for (i = 0; i < OSSL_NELEM(param_sigalg_list); i++)
  ------------------
  |  |   14|  8.37k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (327:17): [True: 6.27k, False: 2.09k]
  ------------------
  328|  6.27k|        if (!cb(param_sigalg_list[i], arg))
  ------------------
  |  Branch (328:13): [True: 0, False: 6.27k]
  ------------------
  329|      0|            return 0;
  330|  2.09k|#endif
  331|  2.09k|    return 1;
  332|  2.09k|}

sha2_prov.c:ossl_param_is_empty:
   30|  11.0k|{
   31|  11.0k|    return params == NULL || params->key == NULL;
  ------------------
  |  Branch (31:12): [True: 11.0k, False: 0]
  |  Branch (31:30): [True: 0, False: 0]
  ------------------
   32|  11.0k|}
ciphercommon.c:ossl_param_is_empty:
   30|  93.8k|{
   31|  93.8k|    return params == NULL || params->key == NULL;
  ------------------
  |  Branch (31:12): [True: 93.8k, False: 0]
  |  Branch (31:30): [True: 0, False: 0]
  ------------------
   32|  93.8k|}

ossl_prov_ctx_new:
   16|    758|{
   17|    758|    return OPENSSL_zalloc(sizeof(PROV_CTX));
  ------------------
  |  |  108|    758|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   18|    758|}
ossl_prov_ctx_free:
   21|    758|{
   22|    758|    OPENSSL_free(ctx);
  ------------------
  |  |  131|    758|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   23|    758|}
ossl_prov_ctx_set0_libctx:
   26|    758|{
   27|    758|    if (ctx != NULL)
  ------------------
  |  Branch (27:9): [True: 758, False: 0]
  ------------------
   28|    758|        ctx->libctx = libctx;
   29|    758|}
ossl_prov_ctx_set0_handle:
   32|    758|{
   33|    758|    if (ctx != NULL)
  ------------------
  |  Branch (33:9): [True: 758, False: 0]
  ------------------
   34|    758|        ctx->handle = handle;
   35|    758|}
ossl_prov_ctx_set0_core_bio_method:
   38|    758|{
   39|    758|    if (ctx != NULL)
  ------------------
  |  Branch (39:9): [True: 758, False: 0]
  ------------------
   40|    758|        ctx->corebiometh = corebiometh;
   41|    758|}
ossl_prov_ctx_set0_core_get_params:
   45|    758|{
   46|    758|    if (ctx != NULL)
  ------------------
  |  Branch (46:9): [True: 758, False: 0]
  ------------------
   47|    758|        ctx->core_get_params = c_get_params;
   48|    758|}
ossl_prov_ctx_get0_libctx:
   51|   392k|{
   52|   392k|    if (ctx == NULL)
  ------------------
  |  Branch (52:9): [True: 0, False: 392k]
  ------------------
   53|      0|        return NULL;
   54|   392k|    return ctx->libctx;
   55|   392k|}
ossl_prov_ctx_get0_core_bio_method:
   65|   382k|{
   66|   382k|    if (ctx == NULL)
  ------------------
  |  Branch (66:9): [True: 0, False: 382k]
  ------------------
   67|      0|        return NULL;
   68|   382k|    return ctx->corebiometh;
   69|   382k|}
ossl_prov_ctx_get_param:
   80|  3.70k|{
   81|  3.70k|    char *val = NULL;
   82|  3.70k|    OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  3.70k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM param[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  3.70k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   83|       |
   84|  3.70k|    if (ctx == NULL
  ------------------
  |  Branch (84:9): [True: 0, False: 3.70k]
  ------------------
   85|  3.70k|        || ctx->handle == NULL
  ------------------
  |  Branch (85:12): [True: 0, False: 3.70k]
  ------------------
   86|  3.70k|        || ctx->core_get_params == NULL)
  ------------------
  |  Branch (86:12): [True: 0, False: 3.70k]
  ------------------
   87|      0|        return defval;
   88|       |
   89|  3.70k|    param[0].key = (char *)name;
   90|  3.70k|    param[0].data_type = OSSL_PARAM_UTF8_PTR;
  ------------------
  |  |  141|  3.70k|#define OSSL_PARAM_UTF8_PTR 6
  ------------------
   91|  3.70k|    param[0].data = (void *)&val;
   92|  3.70k|    param[0].data_size = sizeof(val);
   93|  3.70k|    param[0].return_size = OSSL_PARAM_UNMODIFIED;
  ------------------
  |  |   22|  3.70k|#define OSSL_PARAM_UNMODIFIED ((size_t)-1)
  ------------------
   94|       |
   95|       |    /* Errors are ignored, returning the default value */
   96|  3.70k|    if (ctx->core_get_params(ctx->handle, param)
  ------------------
  |  Branch (96:9): [True: 3.70k, False: 0]
  ------------------
   97|  3.70k|        && OSSL_PARAM_modified(param)
  ------------------
  |  Branch (97:12): [True: 0, False: 3.70k]
  ------------------
   98|      0|        && val != NULL)
  ------------------
  |  Branch (98:12): [True: 0, False: 0]
  ------------------
   99|      0|        return val;
  100|  3.70k|    return defval;
  101|  3.70k|}
ossl_prov_ctx_get_bool_param:
  104|  2.47k|{
  105|  2.47k|    const char *val = ossl_prov_ctx_get_param(ctx, name, NULL);
  106|       |
  107|  2.47k|    if (val != NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 2.47k]
  ------------------
  108|      0|        if ((strcmp(val, "1") == 0)
  ------------------
  |  Branch (108:13): [True: 0, False: 0]
  ------------------
  109|      0|            || (OPENSSL_strcasecmp(val, "yes") == 0)
  ------------------
  |  Branch (109:16): [True: 0, False: 0]
  ------------------
  110|      0|            || (OPENSSL_strcasecmp(val, "true") == 0)
  ------------------
  |  Branch (110:16): [True: 0, False: 0]
  ------------------
  111|      0|            || (OPENSSL_strcasecmp(val, "on") == 0))
  ------------------
  |  Branch (111:16): [True: 0, False: 0]
  ------------------
  112|      0|            return 1;
  113|      0|        else if ((strcmp(val, "0") == 0)
  ------------------
  |  Branch (113:18): [True: 0, False: 0]
  ------------------
  114|      0|            || (OPENSSL_strcasecmp(val, "no") == 0)
  ------------------
  |  Branch (114:16): [True: 0, False: 0]
  ------------------
  115|      0|            || (OPENSSL_strcasecmp(val, "false") == 0)
  ------------------
  |  Branch (115:16): [True: 0, False: 0]
  ------------------
  116|      0|            || (OPENSSL_strcasecmp(val, "off") == 0))
  ------------------
  |  Branch (116:16): [True: 0, False: 0]
  ------------------
  117|      0|            return 0;
  118|      0|    }
  119|  2.47k|    return defval;
  120|  2.47k|}

ossl_err_load_PROV_strings:
  263|      1|{
  264|      1|#ifndef OPENSSL_NO_ERR
  265|      1|    if (ERR_reason_error_string(PROV_str_reasons[0].error) == NULL)
  ------------------
  |  Branch (265:9): [True: 1, False: 0]
  ------------------
  266|      1|        ERR_load_strings_const(PROV_str_reasons);
  267|      1|#endif
  268|      1|    return 1;
  269|      1|}

ossl_prov_seeding_from_dispatch:
   42|    695|{
   43|  37.5k|    for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (43:12): [True: 36.8k, False: 695]
  ------------------
   44|       |        /*
   45|       |         * We do not support the scenario of an application linked against
   46|       |         * multiple versions of libcrypto (e.g. one static and one dynamic), but
   47|       |         * sharing a single fips.so. We do a simple sanity check here.
   48|       |         */
   49|  36.8k|#define set_func(c, f)   \
   50|  36.8k|    do {                 \
   51|  36.8k|        if (c == NULL)   \
   52|  36.8k|            c = f;       \
   53|  36.8k|        else if (c != f) \
   54|  36.8k|            return 0;    \
   55|  36.8k|    } while (0)
   56|  36.8k|        switch (fns->function_id) {
  ------------------
  |  Branch (56:17): [True: 5.56k, False: 31.2k]
  ------------------
   57|    695|        case OSSL_FUNC_GET_ENTROPY:
  ------------------
  |  |  188|    695|#define OSSL_FUNC_GET_ENTROPY 101
  ------------------
  |  Branch (57:9): [True: 695, False: 36.1k]
  ------------------
   58|    695|            set_func(c_get_entropy, OSSL_FUNC_get_entropy(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   59|    695|            break;
   60|    695|        case OSSL_FUNC_GET_USER_ENTROPY:
  ------------------
  |  |  179|    695|#define OSSL_FUNC_GET_USER_ENTROPY 98
  ------------------
  |  Branch (60:9): [True: 695, False: 36.1k]
  ------------------
   61|    695|            set_func(c_get_user_entropy, OSSL_FUNC_get_user_entropy(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   62|    695|            break;
   63|    695|        case OSSL_FUNC_CLEANUP_ENTROPY:
  ------------------
  |  |  189|    695|#define OSSL_FUNC_CLEANUP_ENTROPY 102
  ------------------
  |  Branch (63:9): [True: 695, False: 36.1k]
  ------------------
   64|    695|            set_func(c_cleanup_entropy, OSSL_FUNC_cleanup_entropy(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   65|    695|            break;
   66|    695|        case OSSL_FUNC_CLEANUP_USER_ENTROPY:
  ------------------
  |  |  177|    695|#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
  ------------------
  |  Branch (66:9): [True: 695, False: 36.1k]
  ------------------
   67|    695|            set_func(c_cleanup_user_entropy, OSSL_FUNC_cleanup_user_entropy(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   68|    695|            break;
   69|    695|        case OSSL_FUNC_GET_NONCE:
  ------------------
  |  |  190|    695|#define OSSL_FUNC_GET_NONCE 103
  ------------------
  |  Branch (69:9): [True: 695, False: 36.1k]
  ------------------
   70|    695|            set_func(c_get_nonce, OSSL_FUNC_get_nonce(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   71|    695|            break;
   72|    695|        case OSSL_FUNC_GET_USER_NONCE:
  ------------------
  |  |  180|    695|#define OSSL_FUNC_GET_USER_NONCE 99
  ------------------
  |  Branch (72:9): [True: 695, False: 36.1k]
  ------------------
   73|    695|            set_func(c_get_user_nonce, OSSL_FUNC_get_user_nonce(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   74|    695|            break;
   75|    695|        case OSSL_FUNC_CLEANUP_NONCE:
  ------------------
  |  |  191|    695|#define OSSL_FUNC_CLEANUP_NONCE 104
  ------------------
  |  Branch (75:9): [True: 695, False: 36.1k]
  ------------------
   76|    695|            set_func(c_cleanup_nonce, OSSL_FUNC_cleanup_nonce(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   77|    695|            break;
   78|    695|        case OSSL_FUNC_CLEANUP_USER_NONCE:
  ------------------
  |  |  178|    695|#define OSSL_FUNC_CLEANUP_USER_NONCE 97
  ------------------
  |  Branch (78:9): [True: 695, False: 36.1k]
  ------------------
   79|    695|            set_func(c_cleanup_user_nonce, OSSL_FUNC_cleanup_user_nonce(fns));
  ------------------
  |  |   50|    695|    do {                 \
  |  |   51|    695|        if (c == NULL)   \
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 1, False: 694]
  |  |  ------------------
  |  |   52|    695|            c = f;       \
  |  |   53|    695|        else if (c != f) \
  |  |  ------------------
  |  |  |  Branch (53:18): [True: 0, False: 694]
  |  |  ------------------
  |  |   54|    694|            return 0;    \
  |  |   55|    695|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded, False: 695]
  |  |  ------------------
  ------------------
   80|    695|            break;
   81|  36.8k|        }
   82|  36.8k|#undef set_func
   83|  36.8k|    }
   84|    695|    return 1;
   85|    695|}

ossl_prov_cache_exported_algorithms:
  340|    695|{
  341|    695|    int i, j;
  342|       |
  343|    695|    if (out[0].algorithm_names == NULL) {
  ------------------
  |  Branch (343:9): [True: 1, False: 694]
  ------------------
  344|    140|        for (i = j = 0; in[i].alg.algorithm_names != NULL; ++i) {
  ------------------
  |  Branch (344:25): [True: 139, False: 1]
  ------------------
  345|    139|            if (in[i].capable == NULL || in[i].capable())
  ------------------
  |  Branch (345:17): [True: 126, False: 13]
  |  Branch (345:42): [True: 4, False: 9]
  ------------------
  346|    130|                out[j++] = in[i].alg;
  347|    139|        }
  348|      1|        out[j++] = in[i].alg;
  349|      1|    }
  350|    695|}

ossl_default_provider_init:
  754|    695|{
  755|    695|    OSSL_FUNC_core_get_libctx_fn *c_get_libctx = NULL;
  756|    695|    BIO_METHOD *corebiometh;
  757|       |
  758|    695|    if (!ossl_prov_bio_from_dispatch(in)
  ------------------
  |  Branch (758:9): [True: 0, False: 695]
  ------------------
  759|    695|        || !ossl_prov_seeding_from_dispatch(in))
  ------------------
  |  Branch (759:12): [True: 0, False: 695]
  ------------------
  760|      0|        return 0;
  761|  37.5k|    for (; in->function_id != 0; in++) {
  ------------------
  |  Branch (761:12): [True: 36.8k, False: 695]
  ------------------
  762|  36.8k|        switch (in->function_id) {
  763|    695|        case OSSL_FUNC_CORE_GETTABLE_PARAMS:
  ------------------
  |  |   72|    695|#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
  ------------------
  |  Branch (763:9): [True: 695, False: 36.1k]
  ------------------
  764|    695|            c_gettable_params = OSSL_FUNC_core_gettable_params(in);
  765|    695|            break;
  766|    695|        case OSSL_FUNC_CORE_GET_PARAMS:
  ------------------
  |  |   75|    695|#define OSSL_FUNC_CORE_GET_PARAMS 2
  ------------------
  |  Branch (766:9): [True: 695, False: 36.1k]
  ------------------
  767|    695|            c_get_params = OSSL_FUNC_core_get_params(in);
  768|    695|            break;
  769|    695|        case OSSL_FUNC_CORE_GET_LIBCTX:
  ------------------
  |  |   79|    695|#define OSSL_FUNC_CORE_GET_LIBCTX 4
  ------------------
  |  Branch (769:9): [True: 695, False: 36.1k]
  ------------------
  770|    695|            c_get_libctx = OSSL_FUNC_core_get_libctx(in);
  771|    695|            break;
  772|  34.7k|        default:
  ------------------
  |  Branch (772:9): [True: 34.7k, False: 2.08k]
  ------------------
  773|       |            /* Just ignore anything we don't understand */
  774|  34.7k|            break;
  775|  36.8k|        }
  776|  36.8k|    }
  777|       |
  778|    695|    if (c_get_libctx == NULL)
  ------------------
  |  Branch (778:9): [True: 0, False: 695]
  ------------------
  779|      0|        return 0;
  780|       |
  781|       |    /*
  782|       |     * We want to make sure that all calls from this provider that requires
  783|       |     * a library context use the same context as the one used to call our
  784|       |     * functions.  We do that by passing it along in the provider context.
  785|       |     *
  786|       |     * This only works for built-in providers.  Most providers should
  787|       |     * create their own library context.
  788|       |     */
  789|    695|    if ((*provctx = ossl_prov_ctx_new()) == NULL
  ------------------
  |  Branch (789:9): [True: 0, False: 695]
  ------------------
  790|    695|        || (corebiometh = ossl_bio_prov_init_bio_method()) == NULL) {
  ------------------
  |  Branch (790:12): [True: 0, False: 695]
  ------------------
  791|      0|        ossl_prov_ctx_free(*provctx);
  792|      0|        *provctx = NULL;
  793|      0|        return 0;
  794|      0|    }
  795|    695|    ossl_prov_ctx_set0_libctx(*provctx,
  796|    695|        (OSSL_LIB_CTX *)c_get_libctx(handle));
  797|    695|    ossl_prov_ctx_set0_handle(*provctx, handle);
  798|    695|    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
  799|    695|    ossl_prov_ctx_set0_core_get_params(*provctx, c_get_params);
  800|       |
  801|    695|    *out = deflt_dispatch_table;
  802|    695|    ossl_prov_cache_exported_algorithms(deflt_ciphers, exported_ciphers);
  803|       |
  804|    695|    return 1;
  805|    695|}
defltprov.c:deflt_teardown:
  732|    695|{
  733|    695|    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
  734|    695|    ossl_prov_ctx_free(provctx);
  735|    695|}
defltprov.c:deflt_query:
  696|  61.0k|{
  697|  61.0k|    *no_cache = 0;
  698|  61.0k|    switch (operation_id) {
  ------------------
  |  Branch (698:13): [True: 61.0k, False: 0]
  ------------------
  699|  20.0k|    case OSSL_OP_DIGEST:
  ------------------
  |  |  283|  20.0k|#define OSSL_OP_DIGEST 1
  ------------------
  |  Branch (699:5): [True: 20.0k, False: 40.9k]
  ------------------
  700|  20.0k|        return deflt_digests;
  701|  26.2k|    case OSSL_OP_CIPHER:
  ------------------
  |  |  284|  26.2k|#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
  ------------------
  |  Branch (701:5): [True: 26.2k, False: 34.8k]
  ------------------
  702|  26.2k|        return exported_ciphers;
  703|      0|    case OSSL_OP_MAC:
  ------------------
  |  |  285|      0|#define OSSL_OP_MAC 3
  ------------------
  |  Branch (703:5): [True: 0, False: 61.0k]
  ------------------
  704|      0|        return deflt_macs;
  705|      0|    case OSSL_OP_KDF:
  ------------------
  |  |  286|      0|#define OSSL_OP_KDF 4
  ------------------
  |  Branch (705:5): [True: 0, False: 61.0k]
  ------------------
  706|      0|        return deflt_kdfs;
  707|  1.00k|    case OSSL_OP_RAND:
  ------------------
  |  |  287|  1.00k|#define OSSL_OP_RAND 5
  ------------------
  |  Branch (707:5): [True: 1.00k, False: 60.0k]
  ------------------
  708|  1.00k|        return deflt_rands;
  709|  11.6k|    case OSSL_OP_KEYMGMT:
  ------------------
  |  |  288|  11.6k|#define OSSL_OP_KEYMGMT 10
  ------------------
  |  Branch (709:5): [True: 11.6k, False: 49.4k]
  ------------------
  710|  11.6k|        return deflt_keymgmt;
  711|  1.05k|    case OSSL_OP_KEYEXCH:
  ------------------
  |  |  289|  1.05k|#define OSSL_OP_KEYEXCH 11
  ------------------
  |  Branch (711:5): [True: 1.05k, False: 60.0k]
  ------------------
  712|  1.05k|        return deflt_keyexch;
  713|  1.05k|    case OSSL_OP_SIGNATURE:
  ------------------
  |  |  290|  1.05k|#define OSSL_OP_SIGNATURE 12
  ------------------
  |  Branch (713:5): [True: 1.05k, False: 60.0k]
  ------------------
  714|  1.05k|        return deflt_signature;
  715|      0|    case OSSL_OP_ASYM_CIPHER:
  ------------------
  |  |  291|      0|#define OSSL_OP_ASYM_CIPHER 13
  ------------------
  |  Branch (715:5): [True: 0, False: 61.0k]
  ------------------
  716|      0|        return deflt_asym_cipher;
  717|      0|    case OSSL_OP_KEM:
  ------------------
  |  |  292|      0|#define OSSL_OP_KEM 14
  ------------------
  |  Branch (717:5): [True: 0, False: 61.0k]
  ------------------
  718|      0|        return deflt_asym_kem;
  719|      0|    case OSSL_OP_ENCODER:
  ------------------
  |  |  295|      0|#define OSSL_OP_ENCODER 20
  ------------------
  |  Branch (719:5): [True: 0, False: 61.0k]
  ------------------
  720|      0|        return deflt_encoder;
  721|      4|    case OSSL_OP_DECODER:
  ------------------
  |  |  296|      4|#define OSSL_OP_DECODER 21
  ------------------
  |  Branch (721:5): [True: 4, False: 61.0k]
  ------------------
  722|      4|        return deflt_decoder;
  723|      0|    case OSSL_OP_STORE:
  ------------------
  |  |  297|      0|#define OSSL_OP_STORE 22
  ------------------
  |  Branch (723:5): [True: 0, False: 61.0k]
  ------------------
  724|      0|        return deflt_store;
  725|      0|    case OSSL_OP_SKEYMGMT:
  ------------------
  |  |  293|      0|#define OSSL_OP_SKEYMGMT 15
  ------------------
  |  Branch (725:5): [True: 0, False: 61.0k]
  ------------------
  726|      0|        return deflt_skeymgmt;
  727|  61.0k|    }
  728|      0|    return NULL;
  729|  61.0k|}

cipher_aes.c:aes_freectx:
   28|  4.50k|{
   29|  4.50k|    PROV_AES_CTX *ctx = (PROV_AES_CTX *)vctx;
   30|       |
   31|  4.50k|    ossl_cipher_generic_reset_ctx((PROV_CIPHER_CTX *)vctx);
   32|  4.50k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  129|  4.50k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   33|  4.50k|}

cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha1_get_params:
  401|    528|    {                                                                               \
  402|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    528|            flags, kbits, blkbits, ivbits);                                         \
  404|    528|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_gettable_ctx_params:
  301|  2.11k|{
  302|  2.11k|    return cipher_aes_known_gettable_ctx_params;
  303|  2.11k|}
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha1_get_params:
  401|    528|    {                                                                               \
  402|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    528|            flags, kbits, blkbits, ivbits);                                         \
  404|    528|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_128_cbc_hmac_sha256_get_params:
  401|    528|    {                                                                               \
  402|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    528|            flags, kbits, blkbits, ivbits);                                         \
  404|    528|    }                                                                               \
cipher_aes_cbc_hmac_sha.c:aes_256_cbc_hmac_sha256_get_params:
  401|    528|    {                                                                               \
  402|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_CBC_MODE,            \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  403|    528|            flags, kbits, blkbits, ivbits);                                         \
  404|    528|    }                                                                               \

ossl_cipher_capable_aes_cbc_hmac_sha1_etm:
   14|      3|{
   15|      3|    return 0;
   16|      3|}

ossl_cipher_capable_aes_cbc_hmac_sha1:
   41|      2|{
   42|      2|    return AESNI_CBC_HMAC_SHA_CAPABLE;
  ------------------
  |  |  171|      2|#define AESNI_CBC_HMAC_SHA_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  ------------------
   43|      2|}

ossl_cipher_capable_aes_cbc_hmac_sha256_etm:
   14|      3|{
   15|      3|    return 0;
   16|      3|}

ossl_cipher_capable_aes_cbc_hmac_sha256:
   41|      2|{
   42|      2|    return AESNI_CBC_HMAC_SHA_CAPABLE
  ------------------
  |  |  171|      4|#define AESNI_CBC_HMAC_SHA_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  ------------------
  |  |  |  Branch (171:36): [True: 2, False: 0]
  |  |  ------------------
  ------------------
   43|      2|        && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL);
  ------------------
  |  Branch (43:12): [True: 2, False: 0]
  ------------------
   44|      2|}

ossl_cipher_capable_aes_cbc_hmac_sha512_etm:
   20|      3|{
   21|      3|    return 0;
   22|      3|}

cipher_aes_gcm_siv.c:ossl_aes_128_gcm_siv_get_params:
  288|    528|    {                                                                                                      \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  322|    528|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                                                \
  291|    528|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_gcm_siv_gettable_ctx_params:
  211|  1.58k|{
  212|  1.58k|    return aes_gcm_siv_known_gettable_ctx_params;
  213|  1.58k|}
cipher_aes_gcm_siv.c:ossl_aes_192_gcm_siv_get_params:
  288|    528|    {                                                                                                      \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  322|    528|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                                                \
  291|    528|    }                                                                                                      \
cipher_aes_gcm_siv.c:ossl_aes_256_gcm_siv_get_params:
  288|    528|    {                                                                                                      \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,                            \
  ------------------
  |  |  322|    528|#define EVP_CIPH_GCM_SIV_MODE 0x10005
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                                                \
  291|    528|    }                                                                                                      \

ossl_prov_cipher_hw_aes_ecb:
  139|  3.00k|    {                                                   \
  140|  3.00k|        PROV_CIPHER_HW_select(mode) return &aes_##mode; \
  ------------------
  |  |   79|  3.00k|#define PROV_CIPHER_HW_select(mode)                                            \
  |  |   80|  3.00k|if (AESNI_CAPABLE)                                                             \
  |  |  ------------------
  |  |  |  |  185|  3.00k|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (185:23): [True: 3.00k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|  3.00k|    return &aesni_##mode;
  ------------------
  141|  3.00k|    }
ossl_prov_cipher_hw_aes_ctr:
  139|  1.50k|    {                                                   \
  140|  1.50k|        PROV_CIPHER_HW_select(mode) return &aes_##mode; \
  ------------------
  |  |   79|  1.50k|#define PROV_CIPHER_HW_select(mode)                                            \
  |  |   80|  1.50k|if (AESNI_CAPABLE)                                                             \
  |  |  ------------------
  |  |  |  |  185|  1.50k|#define AESNI_CAPABLE (OPENSSL_ia32cap_P[1] & (1 << (57 - 32)))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (185:23): [True: 1.50k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   81|  1.50k|    return &aesni_##mode;
  ------------------
  141|  1.50k|    }

cipher_aes_hw.c:cipher_hw_aesni_initkey:
   20|  66.0k|{
   21|  66.0k|    int ret;
   22|  66.0k|    PROV_AES_CTX *adat = (PROV_AES_CTX *)dat;
   23|  66.0k|    AES_KEY *ks = &adat->ks.ks;
   24|       |
   25|  66.0k|    dat->ks = ks;
   26|       |
   27|  66.0k|    if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  311|   132k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
                  if ((dat->mode == EVP_CIPH_ECB_MODE || dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  312|  29.2k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (27:10): [True: 36.7k, False: 29.2k]
  |  Branch (27:44): [True: 0, False: 29.2k]
  ------------------
   28|  36.7k|        && !dat->enc) {
  ------------------
  |  Branch (28:12): [True: 0, False: 36.7k]
  ------------------
   29|      0|        ret = aesni_set_decrypt_key(key, (int)(keylen * 8), ks);
   30|      0|        dat->block = (block128_f) aesni_decrypt;
   31|      0|        dat->stream.cbc = dat->mode == EVP_CIPH_CBC_MODE ?
  ------------------
  |  |  312|      0|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (31:27): [True: 0, False: 0]
  ------------------
   32|      0|            (cbc128_f) aesni_cbc_encrypt : NULL;
   33|  66.0k|    } else {
   34|  66.0k|        ret = aesni_set_encrypt_key(key, (int)(keylen * 8), ks);
   35|  66.0k|        dat->block = (block128_f) aesni_encrypt;
   36|  66.0k|        if (dat->mode == EVP_CIPH_CBC_MODE)
  ------------------
  |  |  312|  66.0k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (36:13): [True: 0, False: 66.0k]
  ------------------
   37|      0|            dat->stream.cbc = (cbc128_f) aesni_cbc_encrypt;
   38|  66.0k|        else if (dat->mode == EVP_CIPH_CTR_MODE)
  ------------------
  |  |  315|  66.0k|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  |  Branch (38:18): [True: 29.2k, False: 36.7k]
  ------------------
   39|  29.2k|            dat->stream.ctr = (ctr128_f) aesni_ctr32_encrypt_blocks;
   40|  36.7k|        else
   41|  36.7k|            dat->stream.cbc = NULL;
   42|  66.0k|    }
   43|       |
   44|  66.0k|    if (ret < 0) {
  ------------------
  |  Branch (44:9): [True: 0, False: 66.0k]
  ------------------
   45|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_KEY_SETUP_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   46|      0|        return 0;
   47|      0|    }
   48|       |
   49|  66.0k|    return 1;
   50|  66.0k|}
cipher_aes_hw.c:cipher_hw_aesni_ecb:
   64|  63.2k|{
   65|  63.2k|    if (len < ctx->blocksize)
  ------------------
  |  Branch (65:9): [True: 0, False: 63.2k]
  ------------------
   66|      0|        return 1;
   67|       |
   68|  63.2k|    aesni_ecb_encrypt(in, out, len, ctx->ks, ctx->enc);
   69|       |
   70|  63.2k|    return 1;
   71|  63.2k|}

cipher_aes_ocb.c:aes_256_ocb_get_params:
  527|    528|    {                                                                           \
  528|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  320|    528|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  529|    528|            flags, kbits, blkbits, ivbits);                                     \
  530|    528|    }                                                                           \
cipher_aes_ocb.c:cipher_ocb_gettable_ctx_params:
  486|  1.58k|{
  487|  1.58k|    return cipher_ocb_known_gettable_ctx_params;
  488|  1.58k|}
cipher_aes_ocb.c:aes_192_ocb_get_params:
  527|    528|    {                                                                           \
  528|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  320|    528|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  529|    528|            flags, kbits, blkbits, ivbits);                                     \
  530|    528|    }                                                                           \
cipher_aes_ocb.c:aes_128_ocb_get_params:
  527|    528|    {                                                                           \
  528|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  320|    528|#define EVP_CIPH_OCB_MODE 0x10003
  ------------------
  529|    528|            flags, kbits, blkbits, ivbits);                                     \
  530|    528|    }                                                                           \

cipher_aes_siv.c:aes_128_siv_get_params:
  261|    528|    {                                                                            \
  262|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  321|    528|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  263|    528|            flags, 2 * kbits, blkbits, ivbits);                                  \
  264|    528|    }                                                                            \
cipher_aes_siv.c:aes_siv_gettable_ctx_params:
  186|  1.58k|{
  187|  1.58k|    return aes_siv_known_gettable_ctx_params;
  188|  1.58k|}
cipher_aes_siv.c:aes_192_siv_get_params:
  261|    528|    {                                                                            \
  262|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  321|    528|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  263|    528|            flags, 2 * kbits, blkbits, ivbits);                                  \
  264|    528|    }                                                                            \
cipher_aes_siv.c:aes_256_siv_get_params:
  261|    528|    {                                                                            \
  262|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  321|    528|#define EVP_CIPH_SIV_MODE 0x10004
  ------------------
  263|    528|            flags, 2 * kbits, blkbits, ivbits);                                  \
  264|    528|    }                                                                            \

cipher_aes_wrp.c:aes_256_wrap_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrap_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrap_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappad_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappad_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappad_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrapinv_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrapinv_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrapinv_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_256_wrappadinv_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_192_wrappadinv_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \
cipher_aes_wrp.c:aes_128_wrappadinv_get_params:
  288|    528|    {                                                                           \
  289|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  290|    528|            flags, kbits, blkbits, ivbits);                                     \
  291|    528|    }                                                                           \

cipher_aes_xts.c:aes_256_xts_get_params:
  282|    528|    {                                                                              \
  283|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  318|    528|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  284|    528|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   25|    528|#define AES_XTS_BLOCK_BITS 8
  ------------------
  285|    528|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   24|    528|#define AES_XTS_IV_BITS 128
  ------------------
  286|    528|    }                                                                              \
cipher_aes_xts.c:aes_128_xts_get_params:
  282|    528|    {                                                                              \
  283|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  318|    528|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  284|    528|            flags, 2 * kbits, AES_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   25|    528|#define AES_XTS_BLOCK_BITS 8
  ------------------
  285|    528|            AES_XTS_IV_BITS);                                                      \
  ------------------
  |  |   24|    528|#define AES_XTS_IV_BITS 128
  ------------------
  286|    528|    }                                                                              \

cipher_chacha20.c:chacha20_get_params:
   96|    528|{
   97|    528|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_FLAGS,
  ------------------
  |  |   21|    528|#define CHACHA20_FLAGS (PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|    528|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   98|    528|        CHACHA20_KEYLEN * 8,
  ------------------
  |  |   18|    528|#define CHACHA20_KEYLEN (CHACHA_KEY_SIZE)
  |  |  ------------------
  |  |  |  |   44|    528|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
   99|    528|        CHACHA20_BLKLEN * 8,
  ------------------
  |  |   19|    528|#define CHACHA20_BLKLEN (1)
  ------------------
  100|    528|        CHACHA20_IVLEN * 8);
  ------------------
  |  |   20|    528|#define CHACHA20_IVLEN (CHACHA_CTR_SIZE)
  |  |  ------------------
  |  |  |  |   45|    528|#define CHACHA_CTR_SIZE 16
  |  |  ------------------
  ------------------
  101|    528|}
cipher_chacha20.c:chacha20_gettable_ctx_params:
  141|    528|{
  142|    528|    return chacha20_known_gettable_ctx_params;
  143|    528|}

cipher_chacha20_poly1305.c:chacha20_poly1305_get_params:
   96|  2.59k|{
   97|  2.59k|    return ossl_cipher_generic_get_params(params, 0, CHACHA20_POLY1305_FLAGS,
  ------------------
  |  |   25|  2.59k|#define CHACHA20_POLY1305_FLAGS (PROV_CIPHER_FLAG_AEAD \
  |  |  ------------------
  |  |  |  |   39|  2.59k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  |  |  ------------------
  |  |   26|  2.59k|    | PROV_CIPHER_FLAG_CUSTOM_IV)
  |  |  ------------------
  |  |  |  |   40|  2.59k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  |  |  ------------------
  ------------------
   98|  2.59k|        CHACHA20_POLY1305_KEYLEN * 8,
  ------------------
  |  |   21|  2.59k|#define CHACHA20_POLY1305_KEYLEN CHACHA_KEY_SIZE
  |  |  ------------------
  |  |  |  |   44|  2.59k|#define CHACHA_KEY_SIZE 32
  |  |  ------------------
  ------------------
   99|  2.59k|        CHACHA20_POLY1305_BLKLEN * 8,
  ------------------
  |  |   22|  2.59k|#define CHACHA20_POLY1305_BLKLEN 1
  ------------------
  100|  2.59k|        CHACHA20_POLY1305_IVLEN * 8);
  ------------------
  |  |   16|  2.59k|#define CHACHA20_POLY1305_IVLEN 12
  ------------------
  101|  2.59k|}
cipher_chacha20_poly1305.c:chacha20_poly1305_gettable_ctx_params:
  262|    528|{
  263|    528|    return chacha20_poly1305_get_ctx_params_list;
  264|    528|}

cipher_aes.c:aes_cts_256_cbc_get_params:
   17|    528|    {                                                                            \
   18|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    528|            flags, kbits, blkbits, ivbits);                                      \
   20|    528|    }                                                                            \
cipher_aes.c:aes_cts_192_cbc_get_params:
   17|    528|    {                                                                            \
   18|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    528|            flags, kbits, blkbits, ivbits);                                      \
   20|    528|    }                                                                            \
cipher_aes.c:aes_cts_128_cbc_get_params:
   17|    528|    {                                                                            \
   18|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    528|            flags, kbits, blkbits, ivbits);                                      \
   20|    528|    }                                                                            \
cipher_camellia.c:camellia_cts_256_cbc_get_params:
   17|    528|    {                                                                            \
   18|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    528|            flags, kbits, blkbits, ivbits);                                      \
   20|    528|    }                                                                            \
cipher_camellia.c:camellia_cts_192_cbc_get_params:
   17|    528|    {                                                                            \
   18|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    528|            flags, kbits, blkbits, ivbits);                                      \
   20|    528|    }                                                                            \
cipher_camellia.c:camellia_cts_128_cbc_get_params:
   17|    528|    {                                                                            \
   18|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,  \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   19|    528|            flags, kbits, blkbits, ivbits);                                      \
   20|    528|    }                                                                            \

cipher_null.c:null_get_params:
  104|    528|{
  105|    528|    return ossl_cipher_generic_get_params(params, 0, 0, 0, 8, 0);
  106|    528|}
cipher_null.c:null_gettable_ctx_params:
  118|    528|{
  119|    528|    return null_known_gettable_ctx_params;
  120|    528|}

cipher_sm4_xts.c:sm4_128_xts_get_params:
  246|    528|    {                                                                              \
  247|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,    \
  ------------------
  |  |  318|    528|#define EVP_CIPH_XTS_MODE 0x10001
  ------------------
  248|    528|            flags, 2 * kbits, SM4_XTS_BLOCK_BITS,                                  \
  ------------------
  |  |   20|    528|#define SM4_XTS_BLOCK_BITS 8
  ------------------
  249|    528|            SM4_XTS_IV_BITS);                                                      \
  ------------------
  |  |   19|    528|#define SM4_XTS_IV_BITS 128
  ------------------
  250|    528|    }                                                                              \

cipher_tdes.c:tdes_ede3_ecb_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes.c:tdes_ede3_cbc_get_params:
   44|  2.59k|    {                                                                              \
   45|  2.59k|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  312|  2.59k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   46|  2.59k|            flags, kbits, blkbits, ivbits);                                        \
   47|  2.59k|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_ofb_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_cfb_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_cfb1_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede3_cfb8_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_ecb_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_cbc_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_ofb_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \
cipher_tdes_default.c:tdes_ede2_cfb_get_params:
   44|    528|    {                                                                              \
   45|    528|        return ossl_tdes_get_params(params, EVP_CIPH_##UCMODE##_MODE,              \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
   46|    528|            flags, kbits, blkbits, ivbits);                                        \
   47|    528|    }                                                                              \

ossl_tdes_get_params:
  185|  7.34k|{
  186|       |#ifdef FIPS_MODULE
  187|       |    const int decrypt_only = 1;
  188|       |#else
  189|  7.34k|    const int decrypt_only = 0;
  190|  7.34k|#endif
  191|  7.34k|    OSSL_PARAM *p;
  192|       |
  193|  7.34k|    p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_DECRYPT_ONLY);
  ------------------
  |  |  193|  7.34k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
  194|  7.34k|    if (p != NULL && !OSSL_PARAM_set_int(p, decrypt_only)) {
  ------------------
  |  Branch (194:9): [True: 2.06k, False: 5.28k]
  |  Branch (194:22): [True: 0, False: 2.06k]
  ------------------
  195|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  196|      0|        return 0;
  197|      0|    }
  198|       |
  199|  7.34k|    return ossl_cipher_generic_get_params(params, md, flags,
  200|  7.34k|        kbits, blkbits, ivbits);
  201|  7.34k|}

cipher_tdes_wrap.c:tdes_wrap_get_params:
  181|    528|    {                                                                            \
  182|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_WRAP_MODE, flags, \
  ------------------
  |  |  319|    528|#define EVP_CIPH_WRAP_MODE 0x10002
  ------------------
  183|    528|            kbits, blkbits, ivbits);                                             \
  184|    528|    }                                                                            \

ossl_cipher_generic_get_params:
  205|  97.5k|{
  206|  97.5k|    struct ossl_cipher_generic_get_params_st p;
  207|       |
  208|  97.5k|    if (!ossl_cipher_generic_get_params_decoder(params, &p))
  ------------------
  |  Branch (208:9): [True: 0, False: 97.5k]
  ------------------
  209|      0|        return 0;
  210|       |
  211|  97.5k|    if (p.mode != NULL && !OSSL_PARAM_set_uint(p.mode, md)) {
  ------------------
  |  Branch (211:9): [True: 68.6k, False: 28.9k]
  |  Branch (211:27): [True: 0, False: 68.6k]
  ------------------
  212|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  213|      0|        return 0;
  214|      0|    }
  215|  97.5k|    if (p.aead != NULL
  ------------------
  |  Branch (215:9): [True: 68.6k, False: 28.9k]
  ------------------
  216|  68.6k|        && !OSSL_PARAM_set_int(p.aead, (flags & PROV_CIPHER_FLAG_AEAD) != 0)) {
  ------------------
  |  |   39|  68.6k|#define PROV_CIPHER_FLAG_AEAD 0x0001
  ------------------
  |  Branch (216:12): [True: 0, False: 68.6k]
  ------------------
  217|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  218|      0|        return 0;
  219|      0|    }
  220|  97.5k|    if (p.custiv != NULL
  ------------------
  |  Branch (220:9): [True: 68.6k, False: 28.9k]
  ------------------
  221|  68.6k|        && !OSSL_PARAM_set_int(p.custiv, (flags & PROV_CIPHER_FLAG_CUSTOM_IV) != 0)) {
  ------------------
  |  |   40|  68.6k|#define PROV_CIPHER_FLAG_CUSTOM_IV 0x0002
  ------------------
  |  Branch (221:12): [True: 0, False: 68.6k]
  ------------------
  222|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  223|      0|        return 0;
  224|      0|    }
  225|  97.5k|    if (p.cts != NULL
  ------------------
  |  Branch (225:9): [True: 68.6k, False: 28.9k]
  ------------------
  226|  68.6k|        && !OSSL_PARAM_set_int(p.cts, (flags & PROV_CIPHER_FLAG_CTS) != 0)) {
  ------------------
  |  |   41|  68.6k|#define PROV_CIPHER_FLAG_CTS 0x0004
  ------------------
  |  Branch (226:12): [True: 0, False: 68.6k]
  ------------------
  227|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  228|      0|        return 0;
  229|      0|    }
  230|  97.5k|    if (p.mb != NULL
  ------------------
  |  Branch (230:9): [True: 68.6k, False: 28.9k]
  ------------------
  231|  68.6k|        && !OSSL_PARAM_set_int(p.mb, (flags & PROV_CIPHER_FLAG_TLS1_MULTIBLOCK) != 0)) {
  ------------------
  |  |   42|  68.6k|#define PROV_CIPHER_FLAG_TLS1_MULTIBLOCK 0x0008
  ------------------
  |  Branch (231:12): [True: 0, False: 68.6k]
  ------------------
  232|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  233|      0|        return 0;
  234|      0|    }
  235|  97.5k|    if (p.rand != NULL
  ------------------
  |  Branch (235:9): [True: 68.6k, False: 28.9k]
  ------------------
  236|  68.6k|        && !OSSL_PARAM_set_int(p.rand, (flags & PROV_CIPHER_FLAG_RAND_KEY) != 0)) {
  ------------------
  |  |   43|  68.6k|#define PROV_CIPHER_FLAG_RAND_KEY 0x0010
  ------------------
  |  Branch (236:12): [True: 0, False: 68.6k]
  ------------------
  237|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  238|      0|        return 0;
  239|      0|    }
  240|  97.5k|    if (p.etm != NULL
  ------------------
  |  Branch (240:9): [True: 68.6k, False: 28.9k]
  ------------------
  241|  68.6k|        && !OSSL_PARAM_set_int(p.etm, (flags & EVP_CIPH_FLAG_ENC_THEN_MAC) != 0)) {
  ------------------
  |  |  368|  68.6k|#define EVP_CIPH_FLAG_ENC_THEN_MAC 0x10000000
  ------------------
  |  Branch (241:12): [True: 0, False: 68.6k]
  ------------------
  242|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  243|      0|        return 0;
  244|      0|    }
  245|  97.5k|    if (p.keylen != NULL && !OSSL_PARAM_set_size_t(p.keylen, kbits / 8)) {
  ------------------
  |  Branch (245:9): [True: 68.6k, False: 28.9k]
  |  Branch (245:29): [True: 0, False: 68.6k]
  ------------------
  246|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  247|      0|        return 0;
  248|      0|    }
  249|  97.5k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blkbits / 8)) {
  ------------------
  |  Branch (249:9): [True: 68.6k, False: 28.9k]
  |  Branch (249:28): [True: 0, False: 68.6k]
  ------------------
  250|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  251|      0|        return 0;
  252|      0|    }
  253|  97.5k|    if (p.ivlen != NULL && !OSSL_PARAM_set_size_t(p.ivlen, ivbits / 8)) {
  ------------------
  |  Branch (253:9): [True: 68.6k, False: 28.9k]
  |  Branch (253:28): [True: 0, False: 68.6k]
  ------------------
  254|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  255|      0|        return 0;
  256|      0|    }
  257|  97.5k|    return 1;
  258|  97.5k|}
ossl_cipher_generic_gettable_ctx_params:
  392|  43.8k|{
  393|  43.8k|    return cipher_generic_get_ctx_params_list;
  394|  43.8k|}
ossl_cipher_generic_reset_ctx:
  684|  4.50k|{
  685|  4.50k|    if (ctx != NULL && ctx->alloced) {
  ------------------
  |  Branch (685:9): [True: 4.50k, False: 0]
  |  Branch (685:24): [True: 0, False: 4.50k]
  ------------------
  686|      0|        OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  687|      0|        ctx->alloced = 0;
  688|       |        ctx->tlsmac = NULL;
  689|      0|    }
  690|  4.50k|}
ossl_cipher_generic_einit:
  735|  93.8k|{
  736|  93.8k|    return cipher_generic_init_internal((PROV_CIPHER_CTX *)vctx, key, keylen,
  737|  93.8k|        iv, ivlen, params, 1);
  738|  93.8k|}
ossl_cipher_generic_block_update:
  776|  63.2k|{
  777|  63.2k|    size_t outlint = 0;
  778|  63.2k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  779|  63.2k|    size_t blksz = ctx->blocksize;
  780|  63.2k|    size_t nextblocks;
  781|       |
  782|  63.2k|    if (!ctx->key_set) {
  ------------------
  |  Branch (782:9): [True: 0, False: 63.2k]
  ------------------
  783|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  784|      0|        return 0;
  785|      0|    }
  786|       |
  787|  63.2k|    if (ctx->tlsversion > 0) {
  ------------------
  |  Branch (787:9): [True: 0, False: 63.2k]
  ------------------
  788|       |        /*
  789|       |         * Each update call corresponds to a TLS record and is individually
  790|       |         * padded
  791|       |         */
  792|       |
  793|       |        /* Sanity check inputs */
  794|      0|        if (in == NULL
  ------------------
  |  Branch (794:13): [True: 0, False: 0]
  ------------------
  795|      0|            || in != out
  ------------------
  |  Branch (795:16): [True: 0, False: 0]
  ------------------
  796|      0|            || outsize < inl
  ------------------
  |  Branch (796:16): [True: 0, False: 0]
  ------------------
  797|      0|            || !ctx->pad) {
  ------------------
  |  Branch (797:16): [True: 0, False: 0]
  ------------------
  798|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  799|      0|            return 0;
  800|      0|        }
  801|       |
  802|      0|        if (ctx->enc) {
  ------------------
  |  Branch (802:13): [True: 0, False: 0]
  ------------------
  803|      0|            unsigned char padval;
  804|      0|            size_t padnum, loop;
  805|       |
  806|       |            /* Add padding */
  807|       |
  808|      0|            padnum = blksz - (inl % blksz);
  809|       |
  810|      0|            if (outsize < inl + padnum) {
  ------------------
  |  Branch (810:17): [True: 0, False: 0]
  ------------------
  811|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  812|      0|                return 0;
  813|      0|            }
  814|       |
  815|      0|            if (padnum > MAX_PADDING) {
  ------------------
  |  |  771|      0|#define MAX_PADDING 256
  ------------------
  |  Branch (815:17): [True: 0, False: 0]
  ------------------
  816|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  817|      0|                return 0;
  818|      0|            }
  819|      0|            padval = (unsigned char)(padnum - 1);
  820|      0|            if (ctx->tlsversion == SSL3_VERSION) {
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (820:17): [True: 0, False: 0]
  ------------------
  821|      0|                if (padnum > 1)
  ------------------
  |  Branch (821:21): [True: 0, False: 0]
  ------------------
  822|      0|                    memset(out + inl, 0, padnum - 1);
  823|      0|                *(out + inl + padnum - 1) = padval;
  824|      0|            } else {
  825|       |                /* we need to add 'padnum' padding bytes of value padval */
  826|      0|                for (loop = inl; loop < inl + padnum; loop++)
  ------------------
  |  Branch (826:34): [True: 0, False: 0]
  ------------------
  827|      0|                    out[loop] = padval;
  828|      0|            }
  829|      0|            inl += padnum;
  830|      0|        }
  831|       |
  832|      0|        if ((inl % blksz) != 0) {
  ------------------
  |  Branch (832:13): [True: 0, False: 0]
  ------------------
  833|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  834|      0|            return 0;
  835|      0|        }
  836|       |
  837|       |        /* Shouldn't normally fail */
  838|      0|        if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (838:13): [True: 0, False: 0]
  ------------------
  839|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  840|      0|            return 0;
  841|      0|        }
  842|       |
  843|      0|        if (ctx->alloced) {
  ------------------
  |  Branch (843:13): [True: 0, False: 0]
  ------------------
  844|      0|            OPENSSL_free(ctx->tlsmac);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  845|      0|            ctx->alloced = 0;
  846|      0|            ctx->tlsmac = NULL;
  847|      0|        }
  848|       |
  849|       |        /* This only fails if padding is publicly invalid */
  850|      0|        *outl = inl;
  851|      0|        if (!ctx->enc
  ------------------
  |  Branch (851:13): [True: 0, False: 0]
  ------------------
  852|      0|            && !ossl_cipher_tlsunpadblock(ctx->libctx, ctx->tlsversion,
  ------------------
  |  Branch (852:16): [True: 0, False: 0]
  ------------------
  853|      0|                out, outl,
  854|      0|                blksz, &ctx->tlsmac, &ctx->alloced,
  855|      0|                ctx->tlsmacsize, 0)) {
  856|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  857|      0|            return 0;
  858|      0|        }
  859|      0|        return 1;
  860|      0|    }
  861|       |
  862|  63.2k|    if (ctx->bufsz != 0)
  ------------------
  |  Branch (862:9): [True: 0, False: 63.2k]
  ------------------
  863|      0|        nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz,
  864|      0|            &in, &inl);
  865|  63.2k|    else
  866|  63.2k|        nextblocks = inl & ~(blksz - 1);
  867|       |
  868|       |    /*
  869|       |     * If we're decrypting and we end an update on a block boundary we hold
  870|       |     * the last block back in case this is the last update call and the last
  871|       |     * block is padded.
  872|       |     */
  873|  63.2k|    if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) {
  ------------------
  |  Branch (873:9): [True: 0, False: 63.2k]
  |  Branch (873:33): [True: 0, False: 0]
  |  Branch (873:45): [True: 0, False: 0]
  |  Branch (873:56): [True: 0, False: 0]
  ------------------
  874|      0|        if (outsize < blksz) {
  ------------------
  |  Branch (874:13): [True: 0, False: 0]
  ------------------
  875|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  876|      0|            return 0;
  877|      0|        }
  878|      0|        if (!ctx->hw->cipher(ctx, out, ctx->buf, blksz)) {
  ------------------
  |  Branch (878:13): [True: 0, False: 0]
  ------------------
  879|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  880|      0|            return 0;
  881|      0|        }
  882|      0|        ctx->bufsz = 0;
  883|      0|        outlint = blksz;
  884|      0|        out += blksz;
  885|      0|    }
  886|  63.2k|    if (nextblocks > 0) {
  ------------------
  |  Branch (886:9): [True: 63.2k, False: 0]
  ------------------
  887|  63.2k|        if (!ctx->enc && ctx->pad && nextblocks == inl) {
  ------------------
  |  Branch (887:13): [True: 0, False: 63.2k]
  |  Branch (887:26): [True: 0, False: 0]
  |  Branch (887:38): [True: 0, False: 0]
  ------------------
  888|      0|            if (!ossl_assert(inl >= blksz)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (888:17): [True: 0, False: 0]
  ------------------
  889|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  890|      0|                return 0;
  891|      0|            }
  892|      0|            nextblocks -= blksz;
  893|      0|        }
  894|  63.2k|        outlint += nextblocks;
  895|  63.2k|        if (outsize < outlint) {
  ------------------
  |  Branch (895:13): [True: 0, False: 63.2k]
  ------------------
  896|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  897|      0|            return 0;
  898|      0|        }
  899|  63.2k|    }
  900|  63.2k|    if (nextblocks > 0) {
  ------------------
  |  Branch (900:9): [True: 63.2k, False: 0]
  ------------------
  901|  63.2k|        if (!ctx->hw->cipher(ctx, out, in, nextblocks)) {
  ------------------
  |  Branch (901:13): [True: 0, False: 63.2k]
  ------------------
  902|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  903|      0|            return 0;
  904|      0|        }
  905|  63.2k|        in += nextblocks;
  906|  63.2k|        inl -= nextblocks;
  907|  63.2k|    }
  908|  63.2k|    if (inl != 0
  ------------------
  |  Branch (908:9): [True: 0, False: 63.2k]
  ------------------
  909|      0|        && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) {
  ------------------
  |  Branch (909:12): [True: 0, False: 0]
  ------------------
  910|       |        /* ERR_raise already called */
  911|      0|        return 0;
  912|      0|    }
  913|       |
  914|  63.2k|    *outl = outlint;
  915|  63.2k|    return inl == 0;
  916|  63.2k|}
ossl_cipher_generic_stream_update:
  995|  24.7k|{
  996|  24.7k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
  997|       |
  998|  24.7k|    if (!ctx->key_set) {
  ------------------
  |  Branch (998:9): [True: 0, False: 24.7k]
  ------------------
  999|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_KEY_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1000|      0|        return 0;
 1001|      0|    }
 1002|       |
 1003|  24.7k|    if (inl == 0) {
  ------------------
  |  Branch (1003:9): [True: 0, False: 24.7k]
  ------------------
 1004|      0|        *outl = 0;
 1005|      0|        return 1;
 1006|      0|    }
 1007|       |
 1008|  24.7k|    if (outsize < inl) {
  ------------------
  |  Branch (1008:9): [True: 0, False: 24.7k]
  ------------------
 1009|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1010|      0|        return 0;
 1011|      0|    }
 1012|       |
 1013|  24.7k|    if (!ctx->hw->cipher(ctx, out, in, inl)) {
  ------------------
  |  Branch (1013:9): [True: 0, False: 24.7k]
  ------------------
 1014|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_CIPHER_OPERATION_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1015|      0|        return 0;
 1016|      0|    }
 1017|       |
 1018|  24.7k|    *outl = inl;
 1019|  24.7k|    if (!ctx->enc && ctx->tlsversion > 0) {
  ------------------
  |  Branch (1019:9): [True: 0, False: 24.7k]
  |  Branch (1019:22): [True: 0, False: 0]
  ------------------
 1020|       |        /*
 1021|       |         * Remove any TLS padding. Only used by cipher_aes_cbc_hmac_sha1_hw.c and
 1022|       |         * cipher_aes_cbc_hmac_sha256_hw.c
 1023|       |         */
 1024|      0|        if (ctx->removetlspad) {
  ------------------
  |  Branch (1024:13): [True: 0, False: 0]
  ------------------
 1025|       |            /*
 1026|       |             * We should have already failed in the cipher() call above if this
 1027|       |             * isn't true.
 1028|       |             */
 1029|      0|            if (!ossl_assert(*outl >= (size_t)(out[inl - 1] + 1)))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1029:17): [True: 0, False: 0]
  ------------------
 1030|      0|                return 0;
 1031|       |            /* The actual padding length */
 1032|      0|            *outl -= out[inl - 1] + 1;
 1033|      0|        }
 1034|       |
 1035|       |        /* TLS MAC and explicit IV if relevant. We should have already failed
 1036|       |         * in the cipher() call above if *outl is too short.
 1037|       |         */
 1038|      0|        if (!ossl_assert(*outl >= ctx->removetlsfixed))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (1038:13): [True: 0, False: 0]
  ------------------
 1039|      0|            return 0;
 1040|      0|        *outl -= ctx->removetlsfixed;
 1041|       |
 1042|       |        /* Extract the MAC if there is one */
 1043|      0|        if (ctx->tlsmacsize > 0) {
  ------------------
  |  Branch (1043:13): [True: 0, False: 0]
  ------------------
 1044|      0|            if (*outl < ctx->tlsmacsize)
  ------------------
  |  Branch (1044:17): [True: 0, False: 0]
  ------------------
 1045|      0|                return 0;
 1046|       |
 1047|      0|            ctx->tlsmac = out + *outl - ctx->tlsmacsize;
 1048|      0|            *outl -= ctx->tlsmacsize;
 1049|      0|        }
 1050|      0|    }
 1051|       |
 1052|  24.7k|    return 1;
 1053|  24.7k|}
ossl_cipher_common_get_ctx_params:
 1100|  6.00k|{
 1101|  6.00k|    if (p->ivlen != NULL && !OSSL_PARAM_set_size_t(p->ivlen, ctx->ivlen)) {
  ------------------
  |  Branch (1101:9): [True: 1.50k, False: 4.50k]
  |  Branch (1101:29): [True: 0, False: 1.50k]
  ------------------
 1102|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1103|      0|        return 0;
 1104|      0|    }
 1105|       |
 1106|  6.00k|    if (p->pad != NULL && !OSSL_PARAM_set_uint(p->pad, ctx->pad)) {
  ------------------
  |  Branch (1106:9): [True: 0, False: 6.00k]
  |  Branch (1106:27): [True: 0, False: 0]
  ------------------
 1107|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1108|      0|        return 0;
 1109|      0|    }
 1110|       |
 1111|  6.00k|    if (p->iv != NULL
  ------------------
  |  Branch (1111:9): [True: 0, False: 6.00k]
  ------------------
 1112|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->iv, ctx->oiv, ctx->ivlen)) {
  ------------------
  |  Branch (1112:12): [True: 0, False: 0]
  ------------------
 1113|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1114|      0|        return 0;
 1115|      0|    }
 1116|       |
 1117|  6.00k|    if (p->updiv != NULL
  ------------------
  |  Branch (1117:9): [True: 0, False: 6.00k]
  ------------------
 1118|      0|        && !OSSL_PARAM_set_octet_string_or_ptr(p->updiv, ctx->iv, ctx->ivlen)) {
  ------------------
  |  Branch (1118:12): [True: 0, False: 0]
  ------------------
 1119|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1120|      0|        return 0;
 1121|      0|    }
 1122|       |
 1123|  6.00k|    if (p->num != NULL && !OSSL_PARAM_set_uint(p->num, ctx->num)) {
  ------------------
  |  Branch (1123:9): [True: 0, False: 6.00k]
  |  Branch (1123:27): [True: 0, False: 0]
  ------------------
 1124|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1125|      0|        return 0;
 1126|      0|    }
 1127|       |
 1128|  6.00k|    if (p->keylen != NULL && !OSSL_PARAM_set_size_t(p->keylen, ctx->keylen)) {
  ------------------
  |  Branch (1128:9): [True: 4.50k, False: 1.50k]
  |  Branch (1128:30): [True: 0, False: 4.50k]
  ------------------
 1129|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1130|      0|        return 0;
 1131|      0|    }
 1132|       |
 1133|  6.00k|    if (p->tlsmac != NULL
  ------------------
  |  Branch (1133:9): [True: 0, False: 6.00k]
  ------------------
 1134|      0|        && !OSSL_PARAM_set_octet_ptr(p->tlsmac, ctx->tlsmac, ctx->tlsmacsize)) {
  ------------------
  |  Branch (1134:12): [True: 0, False: 0]
  ------------------
 1135|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1136|      0|        return 0;
 1137|      0|    }
 1138|  6.00k|    return 1;
 1139|  6.00k|}
ossl_cipher_generic_get_ctx_params:
 1142|  6.00k|{
 1143|  6.00k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
 1144|  6.00k|    struct ossl_cipher_get_ctx_param_list_st p;
 1145|       |
 1146|  6.00k|    if (ctx == NULL || !cipher_generic_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (1146:9): [True: 0, False: 6.00k]
  |  Branch (1146:24): [True: 0, False: 6.00k]
  ------------------
 1147|      0|        return 0;
 1148|  6.00k|    return ossl_cipher_common_get_ctx_params(ctx, &p);
 1149|  6.00k|}
ossl_cipher_generic_set_ctx_params:
 1204|  93.8k|{
 1205|  93.8k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
 1206|  93.8k|    struct ossl_cipher_set_ctx_param_list_st p;
 1207|       |
 1208|  93.8k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (1208:9): [True: 93.8k, False: 0]
  ------------------
 1209|  93.8k|        return 1;
 1210|       |
 1211|      0|    if (ctx == NULL || !cipher_generic_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (1211:9): [True: 0, False: 0]
  |  Branch (1211:24): [True: 0, False: 0]
  ------------------
 1212|      0|        return 0;
 1213|      0|    return ossl_cipher_common_set_ctx_params(ctx, &p);
 1214|      0|}
ossl_cipher_generic_initiv:
 1218|  24.7k|{
 1219|  24.7k|    if (ivlen != ctx->ivlen
  ------------------
  |  Branch (1219:9): [True: 0, False: 24.7k]
  ------------------
 1220|  24.7k|        || ivlen > sizeof(ctx->iv)) {
  ------------------
  |  Branch (1220:12): [True: 0, False: 24.7k]
  ------------------
 1221|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_IV_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1222|      0|        return 0;
 1223|      0|    }
 1224|  24.7k|    ctx->iv_set = 1;
 1225|  24.7k|    memcpy(ctx->iv, iv, ivlen);
 1226|  24.7k|    memcpy(ctx->oiv, iv, ivlen);
 1227|  24.7k|    return 1;
 1228|  24.7k|}
ossl_cipher_generic_initkey:
 1234|  4.50k|{
 1235|  4.50k|    PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
 1236|       |
 1237|  4.50k|    if ((flags & PROV_CIPHER_FLAG_INVERSE_CIPHER) != 0)
  ------------------
  |  |   46|  4.50k|#define PROV_CIPHER_FLAG_INVERSE_CIPHER 0x0200
  ------------------
  |  Branch (1237:9): [True: 0, False: 4.50k]
  ------------------
 1238|      0|        ctx->inverse_cipher = 1;
 1239|  4.50k|    if ((flags & PROV_CIPHER_FLAG_VARIABLE_LENGTH) != 0)
  ------------------
  |  |   45|  4.50k|#define PROV_CIPHER_FLAG_VARIABLE_LENGTH 0x0100
  ------------------
  |  Branch (1239:9): [True: 0, False: 4.50k]
  ------------------
 1240|      0|        ctx->variable_keylength = 1;
 1241|       |
 1242|  4.50k|    ctx->pad = 1;
 1243|  4.50k|    ctx->keylen = ((kbits) / 8);
 1244|  4.50k|    ctx->ivlen = ((ivbits) / 8);
 1245|  4.50k|    ctx->hw = hw;
 1246|  4.50k|    ctx->mode = mode;
 1247|  4.50k|    ctx->blocksize = blkbits / 8;
 1248|  4.50k|    if (provctx != NULL)
  ------------------
  |  Branch (1248:9): [True: 4.50k, False: 0]
  ------------------
 1249|  4.50k|        ctx->libctx = PROV_LIBCTX_OF(provctx); /* used for rand */
  ------------------
  |  |   31|  4.50k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
 1250|  4.50k|}
ciphercommon.c:ossl_cipher_generic_get_params_decoder:
   67|  97.5k|{
   68|  97.5k|    const char *s;
   69|       |
   70|  97.5k|    memset(r, 0, sizeof(*r));
   71|  97.5k|    if (p != NULL)
  ------------------
  |  Branch (71:9): [True: 97.5k, False: 0]
  ------------------
   72|   812k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (72:16): [True: 715k, False: 97.5k]
  ------------------
   73|   715k|            switch(s[0]) {
   74|  28.9k|            default:
  ------------------
  |  Branch (74:13): [True: 28.9k, False: 686k]
  ------------------
   75|  28.9k|                break;
   76|  68.6k|            case 'a':
  ------------------
  |  Branch (76:13): [True: 68.6k, False: 646k]
  ------------------
   77|  68.6k|                if (ossl_likely(strcmp("ead", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
   78|       |                    /* OSSL_CIPHER_PARAM_AEAD */
   79|  68.6k|                    if (ossl_unlikely(r->aead != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
   80|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   81|      0|                                       "param %s is repeated", s);
   82|      0|                        return 0;
   83|      0|                    }
   84|  68.6k|                    r->aead = (OSSL_PARAM *)p;
   85|  68.6k|                }
   86|  68.6k|                break;
   87|  68.6k|            case 'b':
  ------------------
  |  Branch (87:13): [True: 68.6k, False: 646k]
  ------------------
   88|  68.6k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
   89|       |                    /* OSSL_CIPHER_PARAM_BLOCK_SIZE */
   90|  68.6k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
   91|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   92|      0|                                       "param %s is repeated", s);
   93|      0|                        return 0;
   94|      0|                    }
   95|  68.6k|                    r->bsize = (OSSL_PARAM *)p;
   96|  68.6k|                }
   97|  68.6k|                break;
   98|   137k|            case 'c':
  ------------------
  |  Branch (98:13): [True: 137k, False: 578k]
  ------------------
   99|   137k|                switch(s[1]) {
  100|      0|                default:
  ------------------
  |  Branch (100:17): [True: 0, False: 137k]
  ------------------
  101|      0|                    break;
  102|  68.6k|                case 't':
  ------------------
  |  Branch (102:17): [True: 68.6k, False: 68.6k]
  ------------------
  103|  68.6k|                    if (ossl_likely(strcmp("s", s + 2) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  104|       |                        /* OSSL_CIPHER_PARAM_CTS */
  105|  68.6k|                        if (ossl_unlikely(r->cts != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  106|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  107|      0|                                           "param %s is repeated", s);
  108|      0|                            return 0;
  109|      0|                        }
  110|  68.6k|                        r->cts = (OSSL_PARAM *)p;
  111|  68.6k|                    }
  112|  68.6k|                    break;
  113|  68.6k|                case 'u':
  ------------------
  |  Branch (113:17): [True: 68.6k, False: 68.6k]
  ------------------
  114|  68.6k|                    if (ossl_likely(strcmp("stom-iv", s + 2) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  115|       |                        /* OSSL_CIPHER_PARAM_CUSTOM_IV */
  116|  68.6k|                        if (ossl_unlikely(r->custiv != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  117|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  118|      0|                                           "param %s is repeated", s);
  119|      0|                            return 0;
  120|      0|                        }
  121|  68.6k|                        r->custiv = (OSSL_PARAM *)p;
  122|  68.6k|                    }
  123|   137k|                }
  124|   137k|                break;
  125|   137k|            case 'e':
  ------------------
  |  Branch (125:13): [True: 68.6k, False: 646k]
  ------------------
  126|  68.6k|                if (ossl_likely(strcmp("ncrypt-then-mac", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  127|       |                    /* OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC */
  128|  68.6k|                    if (ossl_unlikely(r->etm != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  129|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  130|      0|                                       "param %s is repeated", s);
  131|      0|                        return 0;
  132|      0|                    }
  133|  68.6k|                    r->etm = (OSSL_PARAM *)p;
  134|  68.6k|                }
  135|  68.6k|                break;
  136|  68.6k|            case 'h':
  ------------------
  |  Branch (136:13): [True: 68.6k, False: 646k]
  ------------------
  137|  68.6k|                if (ossl_likely(strcmp("as-randkey", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  138|       |                    /* OSSL_CIPHER_PARAM_HAS_RAND_KEY */
  139|  68.6k|                    if (ossl_unlikely(r->rand != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  140|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  141|      0|                                       "param %s is repeated", s);
  142|      0|                        return 0;
  143|      0|                    }
  144|  68.6k|                    r->rand = (OSSL_PARAM *)p;
  145|  68.6k|                }
  146|  68.6k|                break;
  147|  68.6k|            case 'i':
  ------------------
  |  Branch (147:13): [True: 68.6k, False: 646k]
  ------------------
  148|  68.6k|                if (ossl_likely(strcmp("vlen", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  149|       |                    /* OSSL_CIPHER_PARAM_IVLEN */
  150|  68.6k|                    if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  151|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  152|      0|                                       "param %s is repeated", s);
  153|      0|                        return 0;
  154|      0|                    }
  155|  68.6k|                    r->ivlen = (OSSL_PARAM *)p;
  156|  68.6k|                }
  157|  68.6k|                break;
  158|  68.6k|            case 'k':
  ------------------
  |  Branch (158:13): [True: 68.6k, False: 646k]
  ------------------
  159|  68.6k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  160|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  161|  68.6k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  162|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  163|      0|                                       "param %s is repeated", s);
  164|      0|                        return 0;
  165|      0|                    }
  166|  68.6k|                    r->keylen = (OSSL_PARAM *)p;
  167|  68.6k|                }
  168|  68.6k|                break;
  169|  68.6k|            case 'm':
  ------------------
  |  Branch (169:13): [True: 68.6k, False: 646k]
  ------------------
  170|  68.6k|                if (ossl_likely(strcmp("ode", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  171|       |                    /* OSSL_CIPHER_PARAM_MODE */
  172|  68.6k|                    if (ossl_unlikely(r->mode != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  173|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  174|      0|                                       "param %s is repeated", s);
  175|      0|                        return 0;
  176|      0|                    }
  177|  68.6k|                    r->mode = (OSSL_PARAM *)p;
  178|  68.6k|                }
  179|  68.6k|                break;
  180|  68.6k|            case 't':
  ------------------
  |  Branch (180:13): [True: 68.6k, False: 646k]
  ------------------
  181|  68.6k|                if (ossl_likely(strcmp("ls-multi", s + 1) == 0)) {
  ------------------
  |  |   22|  68.6k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 68.6k, False: 0]
  |  |  ------------------
  ------------------
  182|       |                    /* OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK */
  183|  68.6k|                    if (ossl_unlikely(r->mb != NULL)) {
  ------------------
  |  |   23|  68.6k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 68.6k]
  |  |  ------------------
  ------------------
  184|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  185|      0|                                       "param %s is repeated", s);
  186|      0|                        return 0;
  187|      0|                    }
  188|  68.6k|                    r->mb = (OSSL_PARAM *)p;
  189|  68.6k|                }
  190|   715k|            }
  191|  97.5k|    return 1;
  192|  97.5k|}
ciphercommon.c:cipher_generic_init_internal:
  696|  93.8k|{
  697|  93.8k|    ctx->num = 0;
  698|  93.8k|    ctx->bufsz = 0;
  699|  93.8k|    ctx->updated = 0;
  700|  93.8k|    ctx->enc = enc ? 1 : 0;
  ------------------
  |  Branch (700:16): [True: 93.8k, False: 0]
  ------------------
  701|       |
  702|  93.8k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (702:9): [True: 0, False: 93.8k]
  ------------------
  703|      0|        return 0;
  704|       |
  705|  93.8k|    if (iv != NULL && ctx->mode != EVP_CIPH_ECB_MODE) {
  ------------------
  |  |  311|  24.7k|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  |  Branch (705:9): [True: 24.7k, False: 69.0k]
  |  Branch (705:23): [True: 24.7k, False: 0]
  ------------------
  706|  24.7k|        if (!ossl_cipher_generic_initiv(ctx, iv, ivlen))
  ------------------
  |  Branch (706:13): [True: 0, False: 24.7k]
  ------------------
  707|      0|            return 0;
  708|  24.7k|    }
  709|  93.8k|    if (iv == NULL && ctx->iv_set
  ------------------
  |  Branch (709:9): [True: 69.0k, False: 24.7k]
  |  Branch (709:23): [True: 26.2k, False: 42.7k]
  ------------------
  710|  26.2k|        && (ctx->mode == EVP_CIPH_CBC_MODE
  ------------------
  |  |  312|  52.5k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  |  Branch (710:13): [True: 0, False: 26.2k]
  ------------------
  711|  26.2k|            || ctx->mode == EVP_CIPH_CFB_MODE
  ------------------
  |  |  313|  52.5k|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  |  Branch (711:16): [True: 0, False: 26.2k]
  ------------------
  712|  26.2k|            || ctx->mode == EVP_CIPH_OFB_MODE))
  ------------------
  |  |  314|  26.2k|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  |  Branch (712:16): [True: 0, False: 26.2k]
  ------------------
  713|       |        /* reset IV for these modes to keep compatibility with 1.1.1 */
  714|      0|        memcpy(ctx->iv, ctx->oiv, ctx->ivlen);
  715|       |
  716|  93.8k|    if (key != NULL) {
  ------------------
  |  Branch (716:9): [True: 66.0k, False: 27.7k]
  ------------------
  717|  66.0k|        if (ctx->variable_keylength == 0) {
  ------------------
  |  Branch (717:13): [True: 66.0k, False: 0]
  ------------------
  718|  66.0k|            if (keylen != ctx->keylen) {
  ------------------
  |  Branch (718:17): [True: 0, False: 66.0k]
  ------------------
  719|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  720|      0|                return 0;
  721|      0|            }
  722|  66.0k|        } else {
  723|      0|            ctx->keylen = keylen;
  724|      0|        }
  725|  66.0k|        if (!ctx->hw->init(ctx, key, ctx->keylen))
  ------------------
  |  Branch (725:13): [True: 0, False: 66.0k]
  ------------------
  726|      0|            return 0;
  727|  66.0k|        ctx->key_set = 1;
  728|  66.0k|    }
  729|  93.8k|    return ossl_cipher_generic_set_ctx_params(ctx, params);
  730|  93.8k|}
ciphercommon.c:cipher_generic_get_ctx_params_decoder:
  292|  6.00k|{
  293|  6.00k|    const char *s;
  294|       |
  295|  6.00k|    memset(r, 0, sizeof(*r));
  296|  6.00k|    if (p != NULL)
  ------------------
  |  Branch (296:9): [True: 6.00k, False: 0]
  ------------------
  297|  12.0k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (297:16): [True: 6.00k, False: 6.00k]
  ------------------
  298|  6.00k|            switch(s[0]) {
  299|      0|            default:
  ------------------
  |  Branch (299:13): [True: 0, False: 6.00k]
  ------------------
  300|      0|                break;
  301|  1.50k|            case 'i':
  ------------------
  |  Branch (301:13): [True: 1.50k, False: 4.50k]
  ------------------
  302|  1.50k|                switch(s[1]) {
  303|      0|                default:
  ------------------
  |  Branch (303:17): [True: 0, False: 1.50k]
  ------------------
  304|      0|                    break;
  305|  1.50k|                case 'v':
  ------------------
  |  Branch (305:17): [True: 1.50k, False: 0]
  ------------------
  306|  1.50k|                    switch(s[2]) {
  307|      0|                    default:
  ------------------
  |  Branch (307:21): [True: 0, False: 1.50k]
  ------------------
  308|      0|                        break;
  309|  1.50k|                    case 'l':
  ------------------
  |  Branch (309:21): [True: 1.50k, False: 0]
  ------------------
  310|  1.50k|                        if (ossl_likely(strcmp("en", s + 3) == 0)) {
  ------------------
  |  |   22|  1.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.50k, False: 0]
  |  |  ------------------
  ------------------
  311|       |                            /* OSSL_CIPHER_PARAM_IVLEN */
  312|  1.50k|                            if (ossl_unlikely(r->ivlen != NULL)) {
  ------------------
  |  |   23|  1.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.50k]
  |  |  ------------------
  ------------------
  313|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  314|      0|                                               "param %s is repeated", s);
  315|      0|                                return 0;
  316|      0|                            }
  317|  1.50k|                            r->ivlen = (OSSL_PARAM *)p;
  318|  1.50k|                        }
  319|  1.50k|                        break;
  320|  1.50k|                    case '\0':
  ------------------
  |  Branch (320:21): [True: 0, False: 1.50k]
  ------------------
  321|      0|                        if (ossl_unlikely(r->iv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  322|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  323|      0|                                           "param %s is repeated", s);
  324|      0|                            return 0;
  325|      0|                        }
  326|      0|                        r->iv = (OSSL_PARAM *)p;
  327|  1.50k|                    }
  328|  1.50k|                }
  329|  1.50k|                break;
  330|  4.50k|            case 'k':
  ------------------
  |  Branch (330:13): [True: 4.50k, False: 1.50k]
  ------------------
  331|  4.50k|                if (ossl_likely(strcmp("eylen", s + 1) == 0)) {
  ------------------
  |  |   22|  4.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 4.50k, False: 0]
  |  |  ------------------
  ------------------
  332|       |                    /* OSSL_CIPHER_PARAM_KEYLEN */
  333|  4.50k|                    if (ossl_unlikely(r->keylen != NULL)) {
  ------------------
  |  |   23|  4.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 4.50k]
  |  |  ------------------
  ------------------
  334|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  335|      0|                                       "param %s is repeated", s);
  336|      0|                        return 0;
  337|      0|                    }
  338|  4.50k|                    r->keylen = (OSSL_PARAM *)p;
  339|  4.50k|                }
  340|  4.50k|                break;
  341|  4.50k|            case 'n':
  ------------------
  |  Branch (341:13): [True: 0, False: 6.00k]
  ------------------
  342|      0|                if (ossl_likely(strcmp("um", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  343|       |                    /* OSSL_CIPHER_PARAM_NUM */
  344|      0|                    if (ossl_unlikely(r->num != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  345|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  346|      0|                                       "param %s is repeated", s);
  347|      0|                        return 0;
  348|      0|                    }
  349|      0|                    r->num = (OSSL_PARAM *)p;
  350|      0|                }
  351|      0|                break;
  352|      0|            case 'p':
  ------------------
  |  Branch (352:13): [True: 0, False: 6.00k]
  ------------------
  353|      0|                if (ossl_likely(strcmp("adding", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  354|       |                    /* OSSL_CIPHER_PARAM_PADDING */
  355|      0|                    if (ossl_unlikely(r->pad != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  356|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  357|      0|                                       "param %s is repeated", s);
  358|      0|                        return 0;
  359|      0|                    }
  360|      0|                    r->pad = (OSSL_PARAM *)p;
  361|      0|                }
  362|      0|                break;
  363|      0|            case 't':
  ------------------
  |  Branch (363:13): [True: 0, False: 6.00k]
  ------------------
  364|      0|                if (ossl_likely(strcmp("ls-mac", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  365|       |                    /* OSSL_CIPHER_PARAM_TLS_MAC */
  366|      0|                    if (ossl_unlikely(r->tlsmac != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  367|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  368|      0|                                       "param %s is repeated", s);
  369|      0|                        return 0;
  370|      0|                    }
  371|      0|                    r->tlsmac = (OSSL_PARAM *)p;
  372|      0|                }
  373|      0|                break;
  374|      0|            case 'u':
  ------------------
  |  Branch (374:13): [True: 0, False: 6.00k]
  ------------------
  375|      0|                if (ossl_likely(strcmp("pdated-iv", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  376|       |                    /* OSSL_CIPHER_PARAM_UPDATED_IV */
  377|      0|                    if (ossl_unlikely(r->updiv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  378|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  379|      0|                                       "param %s is repeated", s);
  380|      0|                        return 0;
  381|      0|                    }
  382|      0|                    r->updiv = (OSSL_PARAM *)p;
  383|      0|                }
  384|  6.00k|            }
  385|  6.00k|    return 1;
  386|  6.00k|}

ossl_ccm_gettable_ctx_params:
  390|  3.69k|{
  391|  3.69k|    return ossl_cipher_ccm_get_ctx_params_list;
  392|  3.69k|}

ossl_gcm_gettable_ctx_params:
  325|  3.69k|{
  326|  3.69k|    return ossl_cipher_gcm_get_ctx_params_list;
  327|  3.69k|}

ossl_cipher_hw_generic_ctr:
  112|  24.7k|{
  113|  24.7k|    unsigned int num = dat->num;
  114|       |
  115|  24.7k|    if (dat->stream.ctr)
  ------------------
  |  Branch (115:9): [True: 24.7k, False: 0]
  ------------------
  116|  24.7k|        CRYPTO_ctr128_encrypt_ctr32(in, out, len, dat->ks, dat->iv, dat->buf,
  117|  24.7k|            &num, dat->stream.ctr);
  118|      0|    else
  119|      0|        CRYPTO_ctr128_encrypt(in, out, len, dat->ks, dat->iv, dat->buf,
  120|      0|            &num, dat->block);
  121|  24.7k|    dat->num = num;
  122|       |
  123|  24.7k|    return 1;
  124|  24.7k|}

blake2_prov.c:blake2s256_get_params:
  246|    528|    {                                                                                                             \
  247|    528|        return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   19|    528|#define BLAKE2S_BLOCKBYTES 64
  ------------------
                      return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   20|    528|#define BLAKE2S_OUTBYTES 32
  ------------------
  248|    528|    }                                                                                                             \
blake2_prov.c:blake2b512_get_params:
  246|    528|    {                                                                                                             \
  247|    528|        return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   25|    528|#define BLAKE2B_BLOCKBYTES 128
  ------------------
                      return ossl_digest_default_get_params(params, BLAKE##VARIANT##_BLOCKBYTES, BLAKE##VARIANT##_OUTBYTES, 0); \
  ------------------
  |  |   26|    528|#define BLAKE2B_OUTBYTES 64
  ------------------
  248|    528|    }                                                                                                             \

ossl_digest_default_get_params:
  104|  14.2k|{
  105|  14.2k|    struct digest_default_get_params_st p;
  106|       |
  107|  14.2k|    if (!digest_default_get_params_decoder(params, &p))
  ------------------
  |  Branch (107:9): [True: 0, False: 14.2k]
  ------------------
  108|      0|        return 0;
  109|       |
  110|  14.2k|    if (p.bsize != NULL && !OSSL_PARAM_set_size_t(p.bsize, blksz)) {
  ------------------
  |  Branch (110:9): [True: 14.2k, False: 0]
  |  Branch (110:28): [True: 0, False: 14.2k]
  ------------------
  111|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  112|      0|        return 0;
  113|      0|    }
  114|  14.2k|    if (p.size != NULL && !OSSL_PARAM_set_size_t(p.size, paramsz)) {
  ------------------
  |  Branch (114:9): [True: 14.2k, False: 0]
  |  Branch (114:27): [True: 0, False: 14.2k]
  ------------------
  115|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  116|      0|        return 0;
  117|      0|    }
  118|  14.2k|    if (p.xof != NULL
  ------------------
  |  Branch (118:9): [True: 14.2k, False: 0]
  ------------------
  119|  14.2k|        && !OSSL_PARAM_set_int(p.xof, (flags & PROV_DIGEST_FLAG_XOF) != 0)) {
  ------------------
  |  |   19|  14.2k|#define PROV_DIGEST_FLAG_XOF 0x0001
  ------------------
  |  Branch (119:12): [True: 0, False: 14.2k]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        return 0;
  122|      0|    }
  123|  14.2k|    if (p.aldid != NULL
  ------------------
  |  Branch (123:9): [True: 14.2k, False: 0]
  ------------------
  124|  14.2k|        && !OSSL_PARAM_set_int(p.aldid, (flags & PROV_DIGEST_FLAG_ALGID_ABSENT) != 0)) {
  ------------------
  |  |   20|  14.2k|#define PROV_DIGEST_FLAG_ALGID_ABSENT 0x0002
  ------------------
  |  Branch (124:12): [True: 0, False: 14.2k]
  ------------------
  125|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  126|      0|        return 0;
  127|      0|    }
  128|  14.2k|    return 1;
  129|  14.2k|}
digestcommon.c:digest_default_get_params_decoder:
   43|  14.2k|{
   44|  14.2k|    const char *s;
   45|       |
   46|  14.2k|    memset(r, 0, sizeof(*r));
   47|  14.2k|    if (p != NULL)
  ------------------
  |  Branch (47:9): [True: 14.2k, False: 0]
  ------------------
   48|  71.2k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (48:16): [True: 57.0k, False: 14.2k]
  ------------------
   49|  57.0k|            switch(s[0]) {
   50|      0|            default:
  ------------------
  |  Branch (50:13): [True: 0, False: 57.0k]
  ------------------
   51|      0|                break;
   52|  14.2k|            case 'a':
  ------------------
  |  Branch (52:13): [True: 14.2k, False: 42.7k]
  ------------------
   53|  14.2k|                if (ossl_likely(strcmp("lgid-absent", s + 1) == 0)) {
  ------------------
  |  |   22|  14.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 14.2k, False: 0]
  |  |  ------------------
  ------------------
   54|       |                    /* OSSL_DIGEST_PARAM_ALGID_ABSENT */
   55|  14.2k|                    if (ossl_unlikely(r->aldid != NULL)) {
  ------------------
  |  |   23|  14.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 14.2k]
  |  |  ------------------
  ------------------
   56|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   57|      0|                                       "param %s is repeated", s);
   58|      0|                        return 0;
   59|      0|                    }
   60|  14.2k|                    r->aldid = (OSSL_PARAM *)p;
   61|  14.2k|                }
   62|  14.2k|                break;
   63|  14.2k|            case 'b':
  ------------------
  |  Branch (63:13): [True: 14.2k, False: 42.7k]
  ------------------
   64|  14.2k|                if (ossl_likely(strcmp("locksize", s + 1) == 0)) {
  ------------------
  |  |   22|  14.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 14.2k, False: 0]
  |  |  ------------------
  ------------------
   65|       |                    /* OSSL_DIGEST_PARAM_BLOCK_SIZE */
   66|  14.2k|                    if (ossl_unlikely(r->bsize != NULL)) {
  ------------------
  |  |   23|  14.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 14.2k]
  |  |  ------------------
  ------------------
   67|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   68|      0|                                       "param %s is repeated", s);
   69|      0|                        return 0;
   70|      0|                    }
   71|  14.2k|                    r->bsize = (OSSL_PARAM *)p;
   72|  14.2k|                }
   73|  14.2k|                break;
   74|  14.2k|            case 's':
  ------------------
  |  Branch (74:13): [True: 14.2k, False: 42.7k]
  ------------------
   75|  14.2k|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|  14.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 14.2k, False: 0]
  |  |  ------------------
  ------------------
   76|       |                    /* OSSL_DIGEST_PARAM_SIZE */
   77|  14.2k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  14.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 14.2k]
  |  |  ------------------
  ------------------
   78|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   79|      0|                                       "param %s is repeated", s);
   80|      0|                        return 0;
   81|      0|                    }
   82|  14.2k|                    r->size = (OSSL_PARAM *)p;
   83|  14.2k|                }
   84|  14.2k|                break;
   85|  14.2k|            case 'x':
  ------------------
  |  Branch (85:13): [True: 14.2k, False: 42.7k]
  ------------------
   86|  14.2k|                if (ossl_likely(strcmp("of", s + 1) == 0)) {
  ------------------
  |  |   22|  14.2k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 14.2k, False: 0]
  |  |  ------------------
  ------------------
   87|       |                    /* OSSL_DIGEST_PARAM_XOF */
   88|  14.2k|                    if (ossl_unlikely(r->xof != NULL)) {
  ------------------
  |  |   23|  14.2k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 14.2k]
  |  |  ------------------
  ------------------
   89|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   90|      0|                                       "param %s is repeated", s);
   91|      0|                        return 0;
   92|      0|                    }
   93|  14.2k|                    r->xof = (OSSL_PARAM *)p;
   94|  14.2k|                }
   95|  57.0k|            }
   96|  14.2k|    return 1;
   97|  14.2k|}

sha2_prov.c:sha1_set_ctx_params:
   43|  11.0k|{
   44|  11.0k|    const OSSL_PARAM *p;
   45|  11.0k|    SHA_CTX *ctx = (SHA_CTX *)vctx;
   46|       |
   47|  11.0k|    if (ctx == NULL)
  ------------------
  |  Branch (47:9): [True: 0, False: 11.0k]
  ------------------
   48|      0|        return 0;
   49|  11.0k|    if (ossl_param_is_empty(params))
  ------------------
  |  Branch (49:9): [True: 11.0k, False: 0]
  ------------------
   50|  11.0k|        return 1;
   51|       |
   52|      0|    p = OSSL_PARAM_locate_const(params, OSSL_DIGEST_PARAM_SSL3_MS);
  ------------------
  |  |  230|      0|# define OSSL_DIGEST_PARAM_SSL3_MS "ssl3-ms"
  ------------------
   53|      0|    if (p != NULL && p->data_type == OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (53:9): [True: 0, False: 0]
  |  Branch (53:22): [True: 0, False: 0]
  ------------------
   54|      0|        return ossl_sha1_ctrl(ctx, EVP_CTRL_SSL3_MASTER_SECRET,
  ------------------
  |  |  419|      0|#define EVP_CTRL_SSL3_MASTER_SECRET 0x1d
  ------------------
   55|      0|            (int)p->data_size, p->data);
   56|      0|    return 1;
   57|      0|}

sha3_prov.c:generic_sha3_absorb:
  155|  25.9k|{
  156|  25.9k|    KECCAK1600_CTX *ctx = vctx;
  157|       |
  158|  25.9k|    if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   35|  51.8k|#define XOF_STATE_INIT 0
  ------------------
                  if (!(ctx->xof_state == XOF_STATE_INIT || ctx->xof_state == XOF_STATE_ABSORB))
  ------------------
  |  |   36|  4.94k|#define XOF_STATE_ABSORB 1
  ------------------
  |  Branch (158:11): [True: 20.9k, False: 4.94k]
  |  Branch (158:47): [True: 4.94k, False: 0]
  ------------------
  159|      0|        return 0;
  160|  25.9k|    ctx->xof_state = XOF_STATE_ABSORB;
  ------------------
  |  |   36|  25.9k|#define XOF_STATE_ABSORB 1
  ------------------
  161|  25.9k|    return SHA3_absorb(ctx->A, inp, len, ctx->block_size);
  162|  25.9k|}
sha3_prov.c:generic_sha3_final:
  165|  9.88k|{
  166|  9.88k|    return ossl_sha3_final((KECCAK1600_CTX *)vctx, out, outlen);
  167|  9.88k|}
sha3_prov.c:keccak_update:
   79|  24.7k|{
   80|  24.7k|    KECCAK1600_CTX *ctx = vctx;
   81|  24.7k|    const size_t bsz = ctx->block_size;
   82|  24.7k|    size_t num, rem;
   83|       |
   84|  24.7k|    if (ossl_unlikely(len == 0))
  ------------------
  |  |   23|  24.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 24.7k]
  |  |  ------------------
  ------------------
   85|      0|        return 1;
   86|       |
   87|       |    /* Is there anything in the buffer already ? */
   88|  24.7k|    if (ossl_likely((num = ctx->bufsz) != 0)) {
  ------------------
  |  |   22|  24.7k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.70k, False: 20.9k]
  |  |  ------------------
  ------------------
   89|       |        /* Calculate how much space is left in the buffer */
   90|  3.70k|        rem = bsz - num;
   91|       |        /* If the new input does not fill the buffer then just add it */
   92|  3.70k|        if (len < rem) {
  ------------------
  |  Branch (92:13): [True: 1.23k, False: 2.47k]
  ------------------
   93|  1.23k|            memcpy(ctx->buf + num, inp, len);
   94|  1.23k|            ctx->bufsz += len;
   95|  1.23k|            return 1;
   96|  1.23k|        }
   97|       |        /* otherwise fill up the buffer and absorb the buffer */
   98|  2.47k|        memcpy(ctx->buf + num, inp, rem);
   99|       |        /* Update the input pointer */
  100|  2.47k|        inp += rem;
  101|  2.47k|        len -= rem;
  102|  2.47k|        ctx->meth.absorb(ctx, ctx->buf, bsz);
  103|  2.47k|        ctx->bufsz = 0;
  104|  2.47k|    }
  105|       |    /* Absorb the input - rem = leftover part of the input < blocksize) */
  106|  23.4k|    rem = ctx->meth.absorb(ctx, inp, len);
  107|       |    /* Copy the leftover bit of the input into the buffer */
  108|  23.4k|    if (ossl_likely(rem)) {
  ------------------
  |  |   22|  23.4k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 23.4k, False: 0]
  |  |  ------------------
  ------------------
  109|  23.4k|        memcpy(ctx->buf, inp + len - rem, rem);
  110|  23.4k|        ctx->bufsz = rem;
  111|  23.4k|    }
  112|  23.4k|    return 1;
  113|  24.7k|}
sha3_prov.c:keccak_final:
  117|  9.88k|{
  118|  9.88k|    int ret = 1;
  119|  9.88k|    KECCAK1600_CTX *ctx = vctx;
  120|       |
  121|  9.88k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  9.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.88k]
  |  |  ------------------
  ------------------
  122|      0|        return 0;
  123|  9.88k|    if (ossl_unlikely(ctx->md_size == SIZE_MAX)) {
  ------------------
  |  |   23|  9.88k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.88k]
  |  |  ------------------
  ------------------
  124|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  125|      0|        return 0;
  126|      0|    }
  127|  9.88k|    if (ossl_likely(outlen > 0))
  ------------------
  |  |   22|  9.88k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 9.88k, False: 0]
  |  |  ------------------
  ------------------
  128|  9.88k|        ret = ctx->meth.final(ctx, out, ctx->md_size);
  129|       |
  130|  9.88k|    *outl = ctx->md_size;
  131|  9.88k|    return ret;
  132|  9.88k|}
sha3_prov.c:keccak_freectx:
  556|  4.94k|{
  557|  4.94k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  558|       |
  559|  4.94k|    OPENSSL_clear_free(ctx, sizeof(*ctx));
  ------------------
  |  |  129|  4.94k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  560|  4.94k|}
sha3_prov.c:keccak_init:
   64|  20.9k|{
   65|  20.9k|    if (ossl_unlikely(!ossl_prov_is_running()))
  ------------------
  |  |   23|  20.9k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 20.9k]
  |  |  ------------------
  ------------------
   66|      0|        return 0;
   67|       |    /* The newctx() handles most of the ctx fixed setup. */
   68|  20.9k|    ossl_sha3_reset((KECCAK1600_CTX *)vctx);
   69|  20.9k|    return 1;
   70|  20.9k|}
sha3_prov.c:generic_sha3_squeeze:
  170|  33.4k|{
  171|  33.4k|    return ossl_sha3_squeeze((KECCAK1600_CTX *)vctx, out, outlen);
  172|  33.4k|}
sha3_prov.c:shake_squeeze:
  136|  33.4k|{
  137|  33.4k|    int ret = 1;
  138|  33.4k|    KECCAK1600_CTX *ctx = vctx;
  139|       |
  140|  33.4k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (140:9): [True: 0, False: 33.4k]
  ------------------
  141|      0|        return 0;
  142|  33.4k|    if (ctx->meth.squeeze == NULL)
  ------------------
  |  Branch (142:9): [True: 0, False: 33.4k]
  ------------------
  143|      0|        return 0;
  144|  33.4k|    if (outlen > 0)
  ------------------
  |  Branch (144:9): [True: 33.4k, False: 0]
  ------------------
  145|  33.4k|        ret = ctx->meth.squeeze(ctx, out, outlen);
  146|       |
  147|  33.4k|    *outl = outlen;
  148|  33.4k|    return ret;
  149|  33.4k|}
sha3_prov.c:keccak_init_params:
   73|  18.5k|{
   74|  18.5k|    return keccak_init(vctx, NULL)
  ------------------
  |  Branch (74:12): [True: 18.5k, False: 0]
  ------------------
   75|  18.5k|        && shake_set_ctx_params(vctx, params);
  ------------------
  |  Branch (75:12): [True: 18.5k, False: 0]
  ------------------
   76|  18.5k|}
sha3_prov.c:shake_set_ctx_params:
  727|  25.9k|{
  728|  25.9k|    struct shake_set_ctx_params_st p;
  729|  25.9k|    KECCAK1600_CTX *ctx = (KECCAK1600_CTX *)vctx;
  730|       |
  731|  25.9k|    if (ossl_unlikely(ctx == NULL || !shake_set_ctx_params_decoder(params, &p)))
  ------------------
  |  |   23|  51.8k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.9k]
  |  |  |  Branch (23:46): [True: 0, False: 25.9k]
  |  |  |  Branch (23:46): [True: 0, False: 25.9k]
  |  |  ------------------
  ------------------
  732|      0|        return 0;
  733|       |
  734|  25.9k|    if (ossl_unlikely(p.xoflen != NULL
  ------------------
  |  |   23|  33.3k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 25.9k]
  |  |  |  Branch (23:46): [True: 7.41k, False: 18.5k]
  |  |  |  Branch (23:46): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  735|  25.9k|            && !OSSL_PARAM_get_size_t(p.xoflen, &ctx->md_size))) {
  736|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  737|      0|        return 0;
  738|      0|    }
  739|  25.9k|    return 1;
  740|  25.9k|}
sha3_prov.c:shake_set_ctx_params_decoder:
  683|  25.9k|{
  684|  25.9k|    const char *s;
  685|       |
  686|  25.9k|    memset(r, 0, sizeof(*r));
  687|  25.9k|    if (p != NULL)
  ------------------
  |  Branch (687:9): [True: 7.41k, False: 18.5k]
  ------------------
  688|  14.8k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (688:16): [True: 7.41k, False: 7.41k]
  ------------------
  689|  7.41k|            switch(s[0]) {
  690|      0|            default:
  ------------------
  |  Branch (690:13): [True: 0, False: 7.41k]
  ------------------
  691|      0|                break;
  692|      0|            case 's':
  ------------------
  |  Branch (692:13): [True: 0, False: 7.41k]
  ------------------
  693|      0|                if (ossl_likely(strcmp("ize", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  694|       |                    /* OSSL_DIGEST_PARAM_SIZE */
  695|      0|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  696|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  697|      0|                                       "param %s is repeated", s);
  698|      0|                        return 0;
  699|      0|                    }
  700|      0|                    r->xoflen = (OSSL_PARAM *)p;
  701|      0|                }
  702|      0|                break;
  703|  7.41k|            case 'x':
  ------------------
  |  Branch (703:13): [True: 7.41k, False: 0]
  ------------------
  704|  7.41k|                if (ossl_likely(strcmp("oflen", s + 1) == 0)) {
  ------------------
  |  |   22|  7.41k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7.41k, False: 0]
  |  |  ------------------
  ------------------
  705|       |                    /* OSSL_DIGEST_PARAM_XOFLEN */
  706|  7.41k|                    if (ossl_unlikely(r->xoflen != NULL)) {
  ------------------
  |  |   23|  7.41k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7.41k]
  |  |  ------------------
  ------------------
  707|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  708|      0|                                       "param %s is repeated", s);
  709|      0|                        return 0;
  710|      0|                    }
  711|  7.41k|                    r->xoflen = (OSSL_PARAM *)p;
  712|  7.41k|                }
  713|  7.41k|            }
  714|  25.9k|    return 1;
  715|  25.9k|}

decode_der2key.c:der2key_newctx:
  165|   519k|{
  166|   519k|    struct der2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   519k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  167|       |
  168|   519k|    if (ctx != NULL) {
  ------------------
  |  Branch (168:9): [True: 519k, False: 0]
  ------------------
  169|   519k|        ctx->provctx = provctx;
  170|   519k|        ctx->desc = desc;
  171|   519k|    }
  172|   519k|    return ctx;
  173|   519k|}
decode_der2key.c:der2key_freectx:
  237|   519k|{
  238|   519k|    struct der2key_ctx_st *ctx = vctx;
  239|       |
  240|   519k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   519k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  241|   519k|}
decode_der2key.c:PrivateKeyInfo_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:der2key_check_selection:
  245|    138|{
  246|       |    /*
  247|       |     * The selections are kinda sorta "levels", i.e. each selection given
  248|       |     * here is assumed to include those following.
  249|       |     */
  250|    138|    int checks[] = {
  251|    138|        OSSL_KEYMGMT_SELECT_PRIVATE_KEY,
  ------------------
  |  |  640|    138|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  252|    138|        OSSL_KEYMGMT_SELECT_PUBLIC_KEY,
  ------------------
  |  |  641|    138|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  253|    138|        OSSL_KEYMGMT_SELECT_ALL_PARAMETERS
  ------------------
  |  |  647|    138|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  642|    138|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  648|    138|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  643|    138|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  254|    138|    };
  255|    138|    size_t i;
  256|       |
  257|       |    /* The decoder implementations made here support guessing */
  258|    138|    if (selection == 0)
  ------------------
  |  Branch (258:9): [True: 0, False: 138]
  ------------------
  259|      0|        return 1;
  260|       |
  261|    276|    for (i = 0; i < OSSL_NELEM(checks); i++) {
  ------------------
  |  |   14|    276|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (261:17): [True: 276, False: 0]
  ------------------
  262|    276|        int check1 = (selection & checks[i]) != 0;
  263|    276|        int check2 = (desc->selection_mask & checks[i]) != 0;
  264|       |
  265|       |        /*
  266|       |         * If the caller asked for the currently checked bit(s), return
  267|       |         * whether the decoder description says it's supported.
  268|       |         */
  269|    276|        if (check1)
  ------------------
  |  Branch (269:13): [True: 138, False: 138]
  ------------------
  270|    138|            return check2;
  271|    276|    }
  272|       |
  273|       |    /* This should be dead code, but just to be safe... */
  274|      0|    return 0;
  275|    138|}
decode_der2key.c:der2key_decode:
  280|   190k|{
  281|   190k|    struct der2key_ctx_st *ctx = vctx;
  282|   190k|    unsigned char *der = NULL;
  283|   190k|    const unsigned char *derp;
  284|   190k|    long der_len = 0;
  285|   190k|    void *key = NULL;
  286|   190k|    int ok = 0;
  287|       |
  288|   190k|    ctx->selection = selection;
  289|       |    /*
  290|       |     * The caller is allowed to specify 0 as a selection mask, to have the
  291|       |     * structure and key type guessed.  For type-specific structures, this
  292|       |     * is not recommended, as some structures are very similar.
  293|       |     * Note that 0 isn't the same as OSSL_KEYMGMT_SELECT_ALL, as the latter
  294|       |     * signifies a private key structure, where everything else is assumed
  295|       |     * to be present as well.
  296|       |     */
  297|   190k|    if (selection == 0)
  ------------------
  |  Branch (297:9): [True: 0, False: 190k]
  ------------------
  298|      0|        selection = ctx->desc->selection_mask;
  299|   190k|    if ((selection & ctx->desc->selection_mask) == 0) {
  ------------------
  |  Branch (299:9): [True: 0, False: 190k]
  ------------------
  300|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  301|      0|        return 0;
  302|      0|    }
  303|       |
  304|   190k|    ok = ossl_read_der(ctx->provctx, cin, &der, &der_len);
  305|   190k|    if (!ok)
  ------------------
  |  Branch (305:9): [True: 0, False: 190k]
  ------------------
  306|      0|        goto next;
  307|       |
  308|   190k|    ok = 0; /* Assume that we fail */
  309|       |
  310|   190k|    ERR_set_mark();
  311|   190k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  640|   190k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (311:9): [True: 0, False: 190k]
  ------------------
  312|      0|        derp = der;
  313|      0|        if (ctx->desc->d2i_PKCS8 != NULL) {
  ------------------
  |  Branch (313:13): [True: 0, False: 0]
  ------------------
  314|      0|            key = ctx->desc->d2i_PKCS8(&derp, der_len, ctx);
  315|      0|            if (ctx->flag_fatal) {
  ------------------
  |  Branch (315:17): [True: 0, False: 0]
  ------------------
  316|      0|                ERR_clear_last_mark();
  317|      0|                goto end;
  318|      0|            }
  319|      0|        } else if (ctx->desc->d2i_private_key != NULL) {
  ------------------
  |  Branch (319:20): [True: 0, False: 0]
  ------------------
  320|      0|            key = ctx->desc->d2i_private_key(NULL, &derp, der_len);
  321|      0|        }
  322|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (322:13): [True: 0, False: 0]
  |  Branch (322:28): [True: 0, False: 0]
  ------------------
  323|      0|            ERR_clear_last_mark();
  324|      0|            goto next;
  325|      0|        }
  326|      0|    }
  327|   190k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  641|   190k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (327:9): [True: 190k, False: 0]
  |  Branch (327:24): [True: 190k, False: 0]
  ------------------
  328|   190k|        derp = der;
  329|   190k|        if (ctx->desc->d2i_PUBKEY != NULL)
  ------------------
  |  Branch (329:13): [True: 190k, False: 0]
  ------------------
  330|   190k|            key = ctx->desc->d2i_PUBKEY(&derp, der_len, ctx);
  331|      0|        else if (ctx->desc->d2i_public_key != NULL)
  ------------------
  |  Branch (331:18): [True: 0, False: 0]
  ------------------
  332|      0|            key = ctx->desc->d2i_public_key(NULL, &derp, der_len);
  333|   190k|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (333:13): [True: 0, False: 190k]
  |  Branch (333:28): [True: 0, False: 0]
  ------------------
  334|      0|            ERR_clear_last_mark();
  335|      0|            goto next;
  336|      0|        }
  337|   190k|    }
  338|   190k|    if (key == NULL && (selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0) {
  ------------------
  |  |  647|      0|    (OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
  |  |  ------------------
  |  |  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  |  |  ------------------
  |  |  648|      0|        | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
  |  |  ------------------
  |  |  |  |  643|      0|#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
  |  |  ------------------
  ------------------
  |  Branch (338:9): [True: 0, False: 190k]
  |  Branch (338:24): [True: 0, False: 0]
  ------------------
  339|      0|        derp = der;
  340|      0|        if (ctx->desc->d2i_key_params != NULL)
  ------------------
  |  Branch (340:13): [True: 0, False: 0]
  ------------------
  341|      0|            key = ctx->desc->d2i_key_params(NULL, &derp, der_len);
  342|      0|        if (key == NULL && ctx->selection != 0) {
  ------------------
  |  Branch (342:13): [True: 0, False: 0]
  |  Branch (342:28): [True: 0, False: 0]
  ------------------
  343|      0|            ERR_clear_last_mark();
  344|      0|            goto next;
  345|      0|        }
  346|      0|    }
  347|   190k|    if (key == NULL)
  ------------------
  |  Branch (347:9): [True: 0, False: 190k]
  ------------------
  348|      0|        ERR_clear_last_mark();
  349|   190k|    else
  350|   190k|        ERR_pop_to_mark();
  351|       |
  352|       |    /*
  353|       |     * Last minute check to see if this was the correct type of key.  This
  354|       |     * should never lead to a fatal error, i.e. the decoding itself was
  355|       |     * correct, it was just an unexpected key type.  This is generally for
  356|       |     * classes of key types that have subtle variants, like RSA-PSS keys as
  357|       |     * opposed to plain RSA keys.
  358|       |     */
  359|   190k|    if (key != NULL
  ------------------
  |  Branch (359:9): [True: 190k, False: 0]
  ------------------
  360|   190k|        && ctx->desc->check_key != NULL
  ------------------
  |  Branch (360:12): [True: 190k, False: 0]
  ------------------
  361|   190k|        && !ctx->desc->check_key(key, ctx)) {
  ------------------
  |  Branch (361:12): [True: 0, False: 190k]
  ------------------
  362|      0|        ctx->desc->free_key(key);
  363|      0|        key = NULL;
  364|      0|    }
  365|       |
  366|   190k|    if (key != NULL && ctx->desc->adjust_key != NULL)
  ------------------
  |  Branch (366:9): [True: 190k, False: 0]
  |  Branch (366:24): [True: 190k, False: 0]
  ------------------
  367|   190k|        ctx->desc->adjust_key(key, ctx);
  368|       |
  369|   190k|next:
  370|       |    /*
  371|       |     * Indicated that we successfully decoded something, or not at all.
  372|       |     * Ending up "empty handed" is not an error.
  373|       |     */
  374|   190k|    ok = 1;
  375|       |
  376|       |    /*
  377|       |     * We free memory here so it's not held up during the callback, because
  378|       |     * we know the process is recursive and the allocated chunks of memory
  379|       |     * add up.
  380|       |     */
  381|   190k|    OPENSSL_free(der);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  382|   190k|    der = NULL;
  383|       |
  384|   190k|    if (key != NULL) {
  ------------------
  |  Branch (384:9): [True: 190k, False: 0]
  ------------------
  385|   190k|        OSSL_PARAM params[4];
  386|   190k|        int object_type = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   190k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  387|       |
  388|   190k|        params[0] = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &object_type);
  ------------------
  |  |  362|   190k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  389|       |
  390|   190k|#ifndef OPENSSL_NO_SM2
  391|   190k|        if (strcmp(ctx->desc->keytype_name, "EC") == 0
  ------------------
  |  Branch (391:13): [True: 52.2k, False: 138k]
  ------------------
  392|  52.2k|            && (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0)
  ------------------
  |  |  954|  52.2k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  |  Branch (392:16): [True: 0, False: 52.2k]
  ------------------
  393|      0|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  358|      0|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  394|      0|                "SM2", 0);
  395|   190k|        else
  396|   190k|#endif
  397|   190k|            params[1] = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  358|   190k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  398|   190k|                (char *)ctx->desc->keytype_name,
  399|   190k|                0);
  400|       |        /* The address of the key becomes the octet string */
  401|   190k|        params[2] = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_REFERENCE,
  ------------------
  |  |  361|   190k|# define OSSL_OBJECT_PARAM_REFERENCE "reference"
  ------------------
  402|   190k|            &key, sizeof(key));
  403|   190k|        params[3] = OSSL_PARAM_construct_end();
  404|       |
  405|   190k|        ok = data_cb(params, data_cbarg);
  406|   190k|    }
  407|       |
  408|   190k|end:
  409|   190k|    ctx->desc->free_key(key);
  410|   190k|    OPENSSL_free(der);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  411|       |
  412|   190k|    return ok;
  413|   190k|}
decode_der2key.c:SubjectPublicKeyInfo_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:DH_der2dh_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_params_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:DHX_der2dhx_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:DSA_der2dsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:ec_check:
  523|  52.2k|{
  524|       |    /* We're trying to be clever by comparing two truths */
  525|  52.2k|    int ret = 0;
  526|  52.2k|    int sm2 = (EC_KEY_get_flags(key) & EC_FLAG_SM2_RANGE) != 0;
  ------------------
  |  |  954|  52.2k|#define EC_FLAG_SM2_RANGE 0x0004
  ------------------
  527|       |
  528|  52.2k|    if (sm2)
  ------------------
  |  Branch (528:9): [True: 0, False: 52.2k]
  ------------------
  529|      0|        ret = ctx->desc->evp_type == EVP_PKEY_SM2
  ------------------
  |  |   74|      0|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|      0|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  |  Branch (529:15): [True: 0, False: 0]
  ------------------
  530|      0|            || ctx->desc->evp_type == NID_X9_62_id_ecPublicKey;
  ------------------
  |  |  178|      0|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (530:16): [True: 0, False: 0]
  ------------------
  531|  52.2k|    else
  532|  52.2k|        ret = ctx->desc->evp_type != EVP_PKEY_SM2;
  ------------------
  |  |   74|  52.2k|#define EVP_PKEY_SM2 NID_sm2
  |  |  ------------------
  |  |  |  | 1255|  52.2k|#define NID_sm2         1172
  |  |  ------------------
  ------------------
  533|       |
  534|  52.2k|    return ret;
  535|  52.2k|}
decode_der2key.c:ec_adjust:
  538|  52.2k|{
  539|  52.2k|    ossl_ec_key_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|  52.2k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  540|  52.2k|}
decode_der2key.c:PrivateKeyInfo_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_newctx:
 1231|  52.2k|    {                                                                                                                 \
 1232|  52.2k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|  52.2k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:EC_der2ec_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2x448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2x448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed25519_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ed448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ed448_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2sm2_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_newctx:
 1231|  52.2k|    {                                                                                                                 \
 1232|  52.2k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|  52.2k|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2sm2_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_no_pub_der2sm2_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_512_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_512_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_768_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_768_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_kem_1024_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_kem_1024_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_sha2_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_128f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_192f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256s_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2slh_dsa_shake_256f_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:rsa_check:
  949|   138k|{
  950|   138k|    int valid;
  951|       |
  952|   138k|    switch (RSA_test_flags(key, RSA_FLAG_TYPE_MASK)) {
  ------------------
  |  |  117|   138k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  953|   138k|    case RSA_FLAG_TYPE_RSA:
  ------------------
  |  |  118|   138k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  |  Branch (953:5): [True: 138k, False: 0]
  ------------------
  954|   138k|        valid = (ctx->desc->evp_type == EVP_PKEY_RSA);
  ------------------
  |  |   63|   138k|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|   138k|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
  955|   138k|        break;
  956|      0|    case RSA_FLAG_TYPE_RSASSAPSS:
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (956:5): [True: 0, False: 138k]
  ------------------
  957|      0|        valid = (ctx->desc->evp_type == EVP_PKEY_RSA_PSS);
  ------------------
  |  |   65|      0|#define EVP_PKEY_RSA_PSS NID_rsassaPss
  |  |  ------------------
  |  |  |  |  583|      0|#define NID_rsassaPss           912
  |  |  ------------------
  ------------------
  958|      0|        break;
  959|      0|    default:
  ------------------
  |  Branch (959:5): [True: 0, False: 138k]
  ------------------
  960|       |        /* Currently unsupported RSA key type */
  961|      0|        valid = 0;
  962|   138k|    }
  963|       |
  964|   138k|    valid = (valid && ossl_rsa_check_factors(key));
  ------------------
  |  Branch (964:14): [True: 138k, False: 0]
  |  Branch (964:23): [True: 138k, False: 0]
  ------------------
  965|       |
  966|   138k|    return valid;
  967|   138k|}
decode_der2key.c:rsa_adjust:
  970|   138k|{
  971|   138k|    ossl_rsa_set0_libctx(key, PROV_LIBCTX_OF(ctx->provctx));
  ------------------
  |  |   31|   138k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  972|   138k|}
decode_der2key.c:PrivateKeyInfo_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_newctx:
 1231|   138k|    {                                                                                                                 \
 1232|   138k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   138k|    }                                                                                                                 \
decode_der2key.c:rsa_d2i_PUBKEY:
  944|   138k|{
  945|       |    return d2i_RSA_PUBKEY(NULL, der, der_len);
  946|   138k|}
decode_der2key.c:SubjectPublicKeyInfo_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_newctx:
 1231|   138k|    {                                                                                                                 \
 1232|   138k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   138k|    }                                                                                                                 \
decode_der2key.c:type_specific_keypair_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_newctx:
 1231|   138k|    {                                                                                                                 \
 1232|   138k|        return der2key_newctx(provctx, &kind##_##keytype##_desc);                                                     \
 1233|   138k|    }                                                                                                                 \
decode_der2key.c:RSA_der2rsa_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2rsapss_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2rsapss_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_44_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_44_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_65_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_65_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:PrivateKeyInfo_der2ml_dsa_87_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \
decode_der2key.c:SubjectPublicKeyInfo_der2ml_dsa_87_does_selection:
 1236|      2|    {                                                                                                                 \
 1237|      2|        return der2key_check_selection(selection,                                                                     \
 1238|      2|            &kind##_##keytype##_desc);                                                                                \
 1239|      2|    }                                                                                                                 \

decode_epki2pki.c:epki2pki_newctx:
   46|   190k|{
   47|   190k|    struct epki2pki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   48|       |
   49|   190k|    if (ctx != NULL)
  ------------------
  |  Branch (49:9): [True: 190k, False: 0]
  ------------------
   50|   190k|        ctx->provctx = provctx;
   51|   190k|    return ctx;
   52|   190k|}
decode_epki2pki.c:epki2pki_freectx:
   55|   190k|{
   56|   190k|    struct epki2pki_ctx_st *ctx = vctx;
   57|       |
   58|   190k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   59|   190k|}
decode_epki2pki.c:epki2pki_set_ctx_params:
  106|      2|{
  107|      2|    struct epki2pki_ctx_st *ctx = vctx;
  108|      2|    struct epki2pki_set_ctx_params_st p;
  109|      2|    char *str;
  110|       |
  111|      2|    if (ctx == NULL || !epki2pki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (111:9): [True: 0, False: 2]
  |  Branch (111:24): [True: 0, False: 2]
  ------------------
  112|      0|        return 0;
  113|       |
  114|      2|    str = ctx->propq;
  115|      2|    if (p.propq != NULL
  ------------------
  |  Branch (115:9): [True: 0, False: 2]
  ------------------
  116|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (116:12): [True: 0, False: 0]
  ------------------
  117|      0|        return 0;
  118|       |
  119|      2|    return 1;
  120|      2|}
decode_epki2pki.c:epki2pki_set_ctx_params_decoder:
   79|      2|{
   80|      2|    const char *s;
   81|       |
   82|      2|    memset(r, 0, sizeof(*r));
   83|      2|    if (p != NULL)
  ------------------
  |  Branch (83:9): [True: 2, False: 0]
  ------------------
   84|      4|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (84:16): [True: 2, False: 2]
  ------------------
   85|      2|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|      2|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 2]
  |  |  ------------------
  ------------------
   86|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   87|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   88|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   89|      0|                                   "param %s is repeated", s);
   90|      0|                    return 0;
   91|      0|                }
   92|      0|                r->propq = (OSSL_PARAM *)p;
   93|      0|            }
   94|      2|    return 1;
   95|      2|}

decode_msblob2key.c:msblob2key_newctx:
   65|      1|{
   66|      1|    struct msblob2key_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|      1|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|       |
   68|      1|    if (ctx != NULL) {
  ------------------
  |  Branch (68:9): [True: 1, False: 0]
  ------------------
   69|      1|        ctx->provctx = provctx;
   70|      1|        ctx->desc = desc;
   71|      1|    }
   72|      1|    return ctx;
   73|      1|}
decode_msblob2key.c:msblob2key_freectx:
   76|      1|{
   77|      1|    struct msblob2key_ctx_st *ctx = vctx;
   78|       |
   79|      1|    OPENSSL_free(ctx);
  ------------------
  |  |  131|      1|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   80|      1|}
decode_msblob2key.c:msblob2key_does_selection:
   83|      4|{
   84|      4|    if (selection == 0)
  ------------------
  |  Branch (84:9): [True: 0, False: 4]
  ------------------
   85|      0|        return 1;
   86|       |
   87|      4|    if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)) != 0)
  ------------------
  |  |  640|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
                  if ((selection & (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)) != 0)
  ------------------
  |  |  641|      4|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (87:9): [True: 4, False: 0]
  ------------------
   88|      4|        return 1;
   89|       |
   90|      0|    return 0;
   91|      4|}
decode_msblob2key.c:msblob2rsa_newctx:
  262|      1|    {                                                                  \
  263|      1|        return msblob2key_newctx(provctx, &mstype##2##keytype##_desc); \
  264|      1|    }                                                                  \

decode_pem2der.c:pem2der_newctx:
   66|   190k|{
   67|   190k|    struct pem2der_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   68|       |
   69|   190k|    if (ctx != NULL)
  ------------------
  |  Branch (69:9): [True: 190k, False: 0]
  ------------------
   70|   190k|        ctx->provctx = provctx;
   71|   190k|    return ctx;
   72|   190k|}
decode_pem2der.c:pem2der_freectx:
   75|   190k|{
   76|   190k|    struct pem2der_ctx_st *ctx = vctx;
   77|       |
   78|   190k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|   190k|}
decode_pem2der.c:pem2der_set_ctx_params:
  144|      7|{
  145|      7|    struct pem2der_ctx_st *ctx = vctx;
  146|      7|    struct pem2der_set_ctx_params_st p;
  147|      7|    char *str;
  148|       |
  149|      7|    if (ctx == NULL || !pem2der_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (149:9): [True: 0, False: 7]
  |  Branch (149:24): [True: 0, False: 7]
  ------------------
  150|      0|        return 0;
  151|       |
  152|      7|    str = ctx->propq;
  153|      7|    if (p.propq != NULL
  ------------------
  |  Branch (153:9): [True: 0, False: 7]
  ------------------
  154|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (154:12): [True: 0, False: 0]
  ------------------
  155|      0|        return 0;
  156|       |
  157|      7|    str = ctx->data_structure;
  158|      7|    if (p.ds != NULL
  ------------------
  |  Branch (158:9): [True: 7, False: 0]
  ------------------
  159|      7|        && !OSSL_PARAM_get_utf8_string(p.ds, &str, sizeof(ctx->data_structure)))
  ------------------
  |  Branch (159:12): [True: 0, False: 7]
  ------------------
  160|      0|        return 0;
  161|       |
  162|      7|    return 1;
  163|      7|}
decode_pem2der.c:pem2der_set_ctx_params_decoder:
  101|      7|{
  102|      7|    const char *s;
  103|       |
  104|      7|    memset(r, 0, sizeof(*r));
  105|      7|    if (p != NULL)
  ------------------
  |  Branch (105:9): [True: 7, False: 0]
  ------------------
  106|     14|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (106:16): [True: 7, False: 7]
  ------------------
  107|      7|            switch(s[0]) {
  108|      0|            default:
  ------------------
  |  Branch (108:13): [True: 0, False: 7]
  ------------------
  109|      0|                break;
  110|      7|            case 'd':
  ------------------
  |  Branch (110:13): [True: 7, False: 0]
  ------------------
  111|      7|                if (ossl_likely(strcmp("ata-structure", s + 1) == 0)) {
  ------------------
  |  |   22|      7|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 7, False: 0]
  |  |  ------------------
  ------------------
  112|       |                    /* OSSL_OBJECT_PARAM_DATA_STRUCTURE */
  113|      7|                    if (ossl_unlikely(r->ds != NULL)) {
  ------------------
  |  |   23|      7|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 7]
  |  |  ------------------
  ------------------
  114|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  115|      0|                                       "param %s is repeated", s);
  116|      0|                        return 0;
  117|      0|                    }
  118|      7|                    r->ds = (OSSL_PARAM *)p;
  119|      7|                }
  120|      7|                break;
  121|      7|            case 'p':
  ------------------
  |  Branch (121:13): [True: 0, False: 7]
  ------------------
  122|      0|                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  123|       |                    /* OSSL_DECODER_PARAM_PROPERTIES */
  124|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  125|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  126|      0|                                       "param %s is repeated", s);
  127|      0|                        return 0;
  128|      0|                    }
  129|      0|                    r->propq = (OSSL_PARAM *)p;
  130|      0|                }
  131|      7|            }
  132|      7|    return 1;
  133|      7|}

decode_pvk2key.c:pvk2key_does_selection:
  153|      4|{
  154|      4|    if (selection == 0)
  ------------------
  |  Branch (154:9): [True: 0, False: 4]
  ------------------
  155|      0|        return 1;
  156|       |
  157|      4|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0)
  ------------------
  |  |  640|      4|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (157:9): [True: 0, False: 4]
  ------------------
  158|      0|        return 1;
  159|       |
  160|      4|    return 0;
  161|      4|}

ossl_spki2typespki_der_decode:
  144|   190k|{
  145|   190k|    const unsigned char *derp = der;
  146|   190k|    X509_PUBKEY *xpub = NULL;
  147|   190k|    X509_ALGOR *algor = NULL;
  148|   190k|    const ASN1_OBJECT *oid = NULL;
  149|   190k|    char dataname[OSSL_MAX_NAME_SIZE];
  150|   190k|    OSSL_PARAM params[6], *p = params;
  151|   190k|    int objtype = OSSL_OBJECT_PKEY;
  ------------------
  |  |   29|   190k|#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
  ------------------
  152|   190k|    int ok = 0;
  153|       |
  154|   190k|    xpub = ossl_d2i_X509_PUBKEY_INTERNAL(&derp, len, libctx, propq);
  155|       |
  156|   190k|    if (xpub == NULL) {
  ------------------
  |  Branch (156:9): [True: 0, False: 190k]
  ------------------
  157|       |        /* We return "empty handed".  This is not an error. */
  158|      0|        ok = 1;
  159|      0|        goto end;
  160|      0|    }
  161|       |
  162|   190k|    if (!X509_PUBKEY_get0_param(NULL, NULL, NULL, &algor, xpub))
  ------------------
  |  Branch (162:9): [True: 0, False: 190k]
  ------------------
  163|      0|        goto end;
  164|   190k|    X509_ALGOR_get0(&oid, NULL, NULL, algor);
  165|       |
  166|   190k|#ifndef OPENSSL_NO_EC
  167|       |    /* SM2 abuses the EC oid, so this could actually be SM2 */
  168|   190k|    if (OBJ_obj2nid(oid) == NID_X9_62_id_ecPublicKey
  ------------------
  |  |  178|   381k|#define NID_X9_62_id_ecPublicKey                408
  ------------------
  |  Branch (168:9): [True: 52.2k, False: 138k]
  ------------------
  169|  52.2k|        && ossl_x509_algor_is_sm2(algor))
  ------------------
  |  Branch (169:12): [True: 0, False: 52.2k]
  ------------------
  170|      0|        strcpy(dataname, "SM2");
  171|   190k|    else
  172|   190k|#endif
  173|   190k|        if (OBJ_obj2txt(dataname, sizeof(dataname), oid, 0) <= 0)
  ------------------
  |  Branch (173:13): [True: 0, False: 190k]
  ------------------
  174|      0|        goto end;
  175|       |
  176|   190k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  177|   190k|    xpub = NULL;
  178|       |
  179|   190k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_TYPE,
  ------------------
  |  |  358|   190k|# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
  ------------------
  180|   190k|        dataname, 0);
  181|       |
  182|   190k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_INPUT_TYPE,
  ------------------
  |  |  360|   190k|# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
  ------------------
  183|   190k|        "DER", 0);
  184|       |
  185|   190k|    *p++ = OSSL_PARAM_construct_utf8_string(OSSL_OBJECT_PARAM_DATA_STRUCTURE,
  ------------------
  |  |  357|   190k|# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
  ------------------
  186|   190k|        "SubjectPublicKeyInfo",
  187|   190k|        0);
  188|   190k|    *p++ = OSSL_PARAM_construct_octet_string(OSSL_OBJECT_PARAM_DATA, der, len);
  ------------------
  |  |  356|   190k|# define OSSL_OBJECT_PARAM_DATA "data"
  ------------------
  189|   190k|    *p++ = OSSL_PARAM_construct_int(OSSL_OBJECT_PARAM_TYPE, &objtype);
  ------------------
  |  |  362|   190k|# define OSSL_OBJECT_PARAM_TYPE "type"
  ------------------
  190|       |
  191|   190k|    *p = OSSL_PARAM_construct_end();
  192|       |
  193|   190k|    ok = data_cb(params, data_cbarg);
  194|       |
  195|   190k|end:
  196|   190k|    ossl_X509_PUBKEY_INTERNAL_free(xpub);
  197|   190k|    return ok;
  198|   190k|}
decode_spki2typespki.c:spki2typespki_newctx:
   45|   190k|{
   46|   190k|    struct spki2typespki_ctx_st *ctx = OPENSSL_zalloc(sizeof(*ctx));
  ------------------
  |  |  108|   190k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   47|       |
   48|   190k|    if (ctx != NULL)
  ------------------
  |  Branch (48:9): [True: 190k, False: 0]
  ------------------
   49|   190k|        ctx->provctx = provctx;
   50|   190k|    return ctx;
   51|   190k|}
decode_spki2typespki.c:spki2typespki_freectx:
   54|   190k|{
   55|   190k|    struct spki2typespki_ctx_st *ctx = vctx;
   56|       |
   57|   190k|    OPENSSL_free(ctx);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   58|   190k|}
decode_spki2typespki.c:spki2typespki_decode:
  124|   190k|{
  125|   190k|    struct spki2typespki_ctx_st *ctx = vctx;
  126|   190k|    unsigned char *der;
  127|   190k|    long len;
  128|   190k|    int ok = 0;
  129|       |
  130|   190k|    if (!ossl_read_der(ctx->provctx, cin, &der, &len))
  ------------------
  |  Branch (130:9): [True: 0, False: 190k]
  ------------------
  131|      0|        return 1;
  132|       |
  133|   190k|    ok = ossl_spki2typespki_der_decode(der, len, selection, data_cb, data_cbarg,
  134|   190k|        pw_cb, pw_cbarg,
  135|   190k|        PROV_LIBCTX_OF(ctx->provctx), ctx->propq);
  ------------------
  |  |   31|   190k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  136|   190k|    OPENSSL_free(der);
  ------------------
  |  |  131|   190k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|   190k|    return ok;
  138|   190k|}
decode_spki2typespki.c:spki2typespki_set_ctx_params:
  105|      2|{
  106|      2|    struct spki2typespki_ctx_st *ctx = vctx;
  107|      2|    struct spki2typespki_set_ctx_params_st p;
  108|      2|    char *str;
  109|       |
  110|      2|    if (ctx == NULL || !spki2typespki_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (110:9): [True: 0, False: 2]
  |  Branch (110:24): [True: 0, False: 2]
  ------------------
  111|      0|        return 0;
  112|       |
  113|      2|    str = ctx->propq;
  114|      2|    if (p.propq != NULL
  ------------------
  |  Branch (114:9): [True: 0, False: 2]
  ------------------
  115|      0|        && !OSSL_PARAM_get_utf8_string(p.propq, &str, sizeof(ctx->propq)))
  ------------------
  |  Branch (115:12): [True: 0, False: 0]
  ------------------
  116|      0|        return 0;
  117|       |
  118|      2|    return 1;
  119|      2|}
decode_spki2typespki.c:spki2typespki_set_ctx_params_decoder:
   78|      2|{
   79|      2|    const char *s;
   80|       |
   81|      2|    memset(r, 0, sizeof(*r));
   82|      2|    if (p != NULL)
  ------------------
  |  Branch (82:9): [True: 2, False: 0]
  ------------------
   83|      4|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (83:16): [True: 2, False: 2]
  ------------------
   84|      2|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|      2|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 2]
  |  |  ------------------
  ------------------
   85|       |                /* OSSL_DECODER_PARAM_PROPERTIES */
   86|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   87|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
   88|      0|                                   "param %s is repeated", s);
   89|      0|                    return 0;
   90|      0|                }
   91|      0|                r->propq = (OSSL_PARAM *)p;
   92|      0|            }
   93|      2|    return 1;
   94|      2|}

ossl_read_der:
   88|   381k|{
   89|   381k|    BUF_MEM *mem = NULL;
   90|   381k|    BIO *in = ossl_bio_new_from_core_bio(provctx, cin);
   91|   381k|    int ok;
   92|       |
   93|   381k|    if (in == NULL)
  ------------------
  |  Branch (93:9): [True: 0, False: 381k]
  ------------------
   94|      0|        return 0;
   95|   381k|    ok = (asn1_d2i_read_bio(in, &mem) >= 0);
   96|   381k|    if (ok) {
  ------------------
  |  Branch (96:9): [True: 381k, False: 0]
  ------------------
   97|   381k|        *data = (unsigned char *)mem->data;
   98|   381k|        *len = (long)mem->length;
   99|   381k|        OPENSSL_free(mem);
  ------------------
  |  |  131|   381k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  100|   381k|    }
  101|   381k|    BIO_free(in);
  102|   381k|    return ok;
  103|   381k|}

cipher_aes.c:aes_256_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_192_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_256_cbc_get_params:
  198|  2.59k|    {                                                                                   \
  199|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  2.59k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  2.59k|            flags, kbits, blkbits, ivbits);                                             \
  201|  2.59k|    }                                                                                   \
cipher_aes.c:aes_192_cbc_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_cbc_get_params:
  198|  2.59k|    {                                                                                   \
  199|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  2.59k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  2.59k|            flags, kbits, blkbits, ivbits);                                             \
  201|  2.59k|    }                                                                                   \
cipher_aes.c:aes_256_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_192_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_256_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_192_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_256_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_192_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_256_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_192_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_256_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_192_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_128_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aes.c:aes_cbc_cts_gettable_ctx_params:
  348|  1.58k|    {                                                                    \
  349|  1.58k|        return name##_known_gettable_ctx_params;                         \
  350|  1.58k|    }
cipher_aria.c:aria_256_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_256_cbc_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_cbc_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_cbc_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_256_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_256_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_256_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_256_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_256_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_192_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_aria.c:aria_128_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_256_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_192_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_256_cbc_get_params:
  198|  2.59k|    {                                                                                   \
  199|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  2.59k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  2.59k|            flags, kbits, blkbits, ivbits);                                             \
  201|  2.59k|    }                                                                                   \
cipher_camellia.c:camellia_192_cbc_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_cbc_get_params:
  198|  2.59k|    {                                                                                   \
  199|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|  2.59k|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|  2.59k|            flags, kbits, blkbits, ivbits);                                             \
  201|  2.59k|    }                                                                                   \
cipher_camellia.c:camellia_256_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_192_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_ofb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_256_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_192_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_cfb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_256_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_192_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_cfb1_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_256_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_192_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_cfb8_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_256_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_192_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_128_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_camellia.c:camellia_cbc_cts_gettable_ctx_params:
  348|  1.58k|    {                                                                    \
  349|  1.58k|        return name##_known_gettable_ctx_params;                         \
  350|  1.58k|    }
cipher_sm4.c:sm4_128_ecb_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  311|    528|#define EVP_CIPH_ECB_MODE 0x1
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_sm4.c:sm4_128_cbc_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  312|    528|#define EVP_CIPH_CBC_MODE 0x2
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_sm4.c:sm4_128_ctr_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  315|    528|#define EVP_CIPH_CTR_MODE 0x5
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_sm4.c:sm4_128_ofb128_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  314|    528|#define EVP_CIPH_OFB_MODE 0x4
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
cipher_sm4.c:sm4_128_cfb128_get_params:
  198|    528|    {                                                                                   \
  199|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE,         \
  ------------------
  |  |  313|    528|#define EVP_CIPH_CFB_MODE 0x3
  ------------------
  200|    528|            flags, kbits, blkbits, ivbits);                                             \
  201|    528|    }                                                                                   \
ossl_tdes_gettable_ctx_params:
  348|  5.80k|    {                                                                    \
  349|  5.80k|        return name##_known_gettable_ctx_params;                         \
  350|  5.80k|    }

cipher_aes_ccm.c:aes_128_ccm_get_params:
   21|  4.65k|    {                                                                           \
   22|  4.65k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|  4.65k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  4.65k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.65k|    }                                                                           \
cipher_aes_ccm.c:aes_192_ccm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|    528|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_aes_ccm.c:aes_256_ccm_get_params:
   21|  4.65k|    {                                                                           \
   22|  4.65k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|  4.65k|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|  4.65k|            flags, kbits, blkbits, ivbits);                                     \
   24|  4.65k|    }                                                                           \
cipher_aes_gcm.c:aes_128_gcm_get_params:
   21|  2.59k|    {                                                                           \
   22|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|  2.59k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  2.59k|            flags, kbits, blkbits, ivbits);                                     \
   24|  2.59k|    }                                                                           \
cipher_aes_gcm.c:aes_192_gcm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|    528|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_aes_gcm.c:aes_256_gcm_get_params:
   21|  2.59k|    {                                                                           \
   22|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|  2.59k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  2.59k|            flags, kbits, blkbits, ivbits);                                     \
   24|  2.59k|    }                                                                           \
cipher_aria_ccm.c:aria_128_ccm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|    528|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_aria_ccm.c:aria_192_ccm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|    528|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_aria_ccm.c:aria_256_ccm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|    528|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_aria_gcm.c:aria_128_gcm_get_params:
   21|  2.59k|    {                                                                           \
   22|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|  2.59k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  2.59k|            flags, kbits, blkbits, ivbits);                                     \
   24|  2.59k|    }                                                                           \
cipher_aria_gcm.c:aria_192_gcm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|    528|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_aria_gcm.c:aria_256_gcm_get_params:
   21|  2.59k|    {                                                                           \
   22|  2.59k|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|  2.59k|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|  2.59k|            flags, kbits, blkbits, ivbits);                                     \
   24|  2.59k|    }                                                                           \
cipher_sm4_ccm.c:sm4_128_ccm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  317|    528|#define EVP_CIPH_CCM_MODE 0x7
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \
cipher_sm4_gcm.c:sm4_128_gcm_get_params:
   21|    528|    {                                                                           \
   22|    528|        return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
  ------------------
  |  |  316|    528|#define EVP_CIPH_GCM_MODE 0x6
  ------------------
   23|    528|            flags, kbits, blkbits, ivbits);                                     \
   24|    528|    }                                                                           \

md5_prov.c:md5_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
md5_sha1_prov.c:md5_sha1_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
null_prov.c:nullmd_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
ripemd_prov.c:ripemd160_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha1_internal_final:
   44|  11.0k|    {                                                                             \
   45|  11.0k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 11.0k, False: 0]
  |  Branch (45:39): [True: 11.0k, False: 0]
  |  Branch (45:60): [True: 11.0k, False: 0]
  ------------------
   46|  11.0k|            *outl = dgstsize;                                                     \
   47|  11.0k|            return 1;                                                             \
   48|  11.0k|        }                                                                         \
   49|  11.0k|        return 0;                                                                 \
   50|  11.0k|    }
sha2_prov.c:sha1_freectx:
   63|  11.0k|    {                                                                            \
   64|  11.0k|        CTX *ctx = (CTX *)vctx;                                                  \
   65|  11.0k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  129|  11.0k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  11.0k|    }                                                                            \
sha2_prov.c:sha1_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha1_internal_init:
  117|  11.0k|    {                                                                                  \
  118|  11.0k|        return ossl_prov_is_running()                                                  \
  ------------------
  |  Branch (118:16): [True: 11.0k, False: 0]
  ------------------
  119|  11.0k|            && init(ctx)                                                               \
  ------------------
  |  Branch (119:16): [True: 11.0k, False: 0]
  ------------------
  120|  11.0k|            && set_ctx_params(ctx, params);                                            \
  ------------------
  |  Branch (120:16): [True: 11.0k, False: 0]
  ------------------
  121|  11.0k|    }                                                                                  \
sha2_prov.c:sha224_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha256_internal_final:
   44|  32.2k|    {                                                                             \
   45|  32.2k|        if (ossl_prov_is_running() && outsz >= dgstsize && fin(out, ctx)) {       \
  ------------------
  |  Branch (45:13): [True: 32.2k, False: 0]
  |  Branch (45:39): [True: 32.2k, False: 0]
  |  Branch (45:60): [True: 32.2k, False: 0]
  ------------------
   46|  32.2k|            *outl = dgstsize;                                                     \
   47|  32.2k|            return 1;                                                             \
   48|  32.2k|        }                                                                         \
   49|  32.2k|        return 0;                                                                 \
   50|  32.2k|    }
sha2_prov.c:sha256_freectx:
   63|  32.2k|    {                                                                            \
   64|  32.2k|        CTX *ctx = (CTX *)vctx;                                                  \
   65|  32.2k|        OPENSSL_clear_free(ctx, sizeof(*ctx));                                   \
  ------------------
  |  |  129|  32.2k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  32.2k|    }                                                                            \
sha2_prov.c:sha256_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha256_internal_init:
  104|  32.2k|    {                                                                              \
  105|  32.2k|        return ossl_prov_is_running() && init(ctx);                                \
  ------------------
  |  Branch (105:16): [True: 32.2k, False: 0]
  |  Branch (105:42): [True: 32.2k, False: 0]
  ------------------
  106|  32.2k|    }                                                                              \
sha2_prov.c:sha256_192_internal_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha384_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha512_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha512_224_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha2_prov.c:sha512_256_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:sha3_224_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:sha3_256_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:sha3_384_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:sha3_512_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:keccak_224_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:keccak_256_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:keccak_384_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:keccak_512_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:shake_128_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:shake_256_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:keccak_kmac_128_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sha3_prov.c:keccak_kmac_256_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }
sm3_prov.c:sm3_get_params:
   29|    528|    {                                                                            \
   30|    528|        return ossl_digest_default_get_params(params, blksize, dgstsize, flags); \
   31|    528|    }

ec_kmgmt.c:ec_load:
 1423|  52.2k|{
 1424|  52.2k|    return common_load(reference, reference_sz, 0);
 1425|  52.2k|}
ec_kmgmt.c:common_load:
 1405|  52.2k|{
 1406|  52.2k|    EC_KEY *ec = NULL;
 1407|       |
 1408|  52.2k|    if (ossl_prov_is_running() && reference_sz == sizeof(ec)) {
  ------------------
  |  Branch (1408:9): [True: 52.2k, False: 0]
  |  Branch (1408:35): [True: 52.2k, False: 0]
  ------------------
 1409|       |        /* The contents of the reference is the address to our object */
 1410|  52.2k|        ec = *(EC_KEY **)reference;
 1411|       |
 1412|  52.2k|        if (!common_check_sm2(ec, sm2_wanted))
  ------------------
  |  Branch (1412:13): [True: 0, False: 52.2k]
  ------------------
 1413|      0|            return NULL;
 1414|       |
 1415|       |        /* We grabbed, so we detach it */
 1416|  52.2k|        *(EC_KEY **)reference = NULL;
 1417|  52.2k|        return ec;
 1418|  52.2k|    }
 1419|      0|    return NULL;
 1420|  52.2k|}
ec_kmgmt.c:common_check_sm2:
  372|  52.2k|{
  373|  52.2k|    const EC_GROUP *ecg = NULL;
  374|       |
  375|       |    /*
  376|       |     * sm2_wanted: import the keys or domparams only on SM2 Curve
  377|       |     * !sm2_wanted: import the keys or domparams only not on SM2 Curve
  378|       |     */
  379|  52.2k|    if ((ecg = EC_KEY_get0_group(ec)) == NULL
  ------------------
  |  Branch (379:9): [True: 0, False: 52.2k]
  ------------------
  380|  52.2k|        || (sm2_wanted ^ (EC_GROUP_get_curve_name(ecg) == NID_sm2)))
  ------------------
  |  | 1255|  52.2k|#define NID_sm2         1172
  ------------------
  |  Branch (380:12): [True: 0, False: 52.2k]
  ------------------
  381|      0|        return 0;
  382|  52.2k|    return 1;
  383|  52.2k|}
ec_kmgmt.c:ec_freedata:
  296|  52.2k|{
  297|  52.2k|    EC_KEY_free(keydata);
  298|  52.2k|}
ec_kmgmt.c:ec_get_params:
  753|  52.2k|{
  754|  52.2k|    return common_get_params(key, params, 0);
  755|  52.2k|}
ec_kmgmt.c:common_get_params:
  620|  52.2k|{
  621|  52.2k|    int ret = 0;
  622|  52.2k|    EC_KEY *eck = key;
  623|  52.2k|    const EC_GROUP *ecg = NULL;
  624|  52.2k|    OSSL_PARAM *p;
  625|  52.2k|    unsigned char *pub_key = NULL, *genbuf = NULL;
  626|  52.2k|    OSSL_LIB_CTX *libctx;
  627|  52.2k|    const char *propq;
  628|  52.2k|    BN_CTX *bnctx = NULL;
  629|       |
  630|  52.2k|    ecg = EC_KEY_get0_group(eck);
  631|  52.2k|    if (ecg == NULL) {
  ------------------
  |  Branch (631:9): [True: 0, False: 52.2k]
  ------------------
  632|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_NO_PARAMETERS_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  633|      0|        return 0;
  634|      0|    }
  635|       |
  636|  52.2k|    libctx = ossl_ec_key_get_libctx(eck);
  637|  52.2k|    propq = ossl_ec_key_get0_propq(eck);
  638|       |
  639|  52.2k|    bnctx = BN_CTX_new_ex(libctx);
  640|  52.2k|    if (bnctx == NULL)
  ------------------
  |  Branch (640:9): [True: 0, False: 52.2k]
  ------------------
  641|      0|        return 0;
  642|  52.2k|    BN_CTX_start(bnctx);
  643|       |
  644|  52.2k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  424|  52.2k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (644:9): [True: 52.2k, False: 0]
  ------------------
  645|  52.2k|        && !OSSL_PARAM_set_int(p, ECDSA_size(eck)))
  ------------------
  |  Branch (645:12): [True: 0, False: 52.2k]
  ------------------
  646|      0|        goto err;
  647|  52.2k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  366|  52.2k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (647:9): [True: 52.2k, False: 0]
  ------------------
  648|  52.2k|        && !OSSL_PARAM_set_int(p, EC_GROUP_order_bits(ecg)))
  ------------------
  |  Branch (648:12): [True: 0, False: 52.2k]
  ------------------
  649|      0|        goto err;
  650|  52.2k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL) {
  ------------------
  |  |  495|  52.2k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (650:9): [True: 52.2k, False: 0]
  ------------------
  651|  52.2k|        int ecbits, sec_bits;
  652|       |
  653|  52.2k|        ecbits = EC_GROUP_order_bits(ecg);
  654|       |
  655|       |        /*
  656|       |         * The following estimates are based on the values published
  657|       |         * in Table 2 of "NIST Special Publication 800-57 Part 1 Revision 4"
  658|       |         * at http://dx.doi.org/10.6028/NIST.SP.800-57pt1r4 .
  659|       |         *
  660|       |         * Note that the above reference explicitly categorizes algorithms in a
  661|       |         * discrete set of values {80, 112, 128, 192, 256}, and that it is
  662|       |         * relevant only for NIST approved Elliptic Curves, while OpenSSL
  663|       |         * applies the same logic also to other curves.
  664|       |         *
  665|       |         * Classifications produced by other standardazing bodies might differ,
  666|       |         * so the results provided for "bits of security" by this provider are
  667|       |         * to be considered merely indicative, and it is the users'
  668|       |         * responsibility to compare these values against the normative
  669|       |         * references that may be relevant for their intent and purposes.
  670|       |         */
  671|  52.2k|        if (ecbits >= 512)
  ------------------
  |  Branch (671:13): [True: 0, False: 52.2k]
  ------------------
  672|      0|            sec_bits = 256;
  673|  52.2k|        else if (ecbits >= 384)
  ------------------
  |  Branch (673:18): [True: 47.0k, False: 5.22k]
  ------------------
  674|  47.0k|            sec_bits = 192;
  675|  5.22k|        else if (ecbits >= 256)
  ------------------
  |  Branch (675:18): [True: 5.22k, False: 0]
  ------------------
  676|  5.22k|            sec_bits = 128;
  677|      0|        else if (ecbits >= 224)
  ------------------
  |  Branch (677:18): [True: 0, False: 0]
  ------------------
  678|      0|            sec_bits = 112;
  679|      0|        else if (ecbits >= 160)
  ------------------
  |  Branch (679:18): [True: 0, False: 0]
  ------------------
  680|      0|            sec_bits = 80;
  681|      0|        else
  682|      0|            sec_bits = ecbits / 2;
  683|       |
  684|  52.2k|        if (!OSSL_PARAM_set_int(p, sec_bits))
  ------------------
  |  Branch (684:13): [True: 0, False: 52.2k]
  ------------------
  685|      0|            goto err;
  686|  52.2k|    }
  687|  52.2k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  496|  52.2k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  133|  52.2k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (687:9): [True: 52.2k, False: 0]
  ------------------
  688|  52.2k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (688:13): [True: 0, False: 52.2k]
  ------------------
  689|      0|            goto err;
  690|       |
  691|  52.2k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (691:9): [True: 0, False: 52.2k]
  ------------------
  692|  52.2k|             OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS))
  ------------------
  |  |  386|  52.2k|# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
  ------------------
  693|  52.2k|        != NULL) {
  694|      0|        int explicitparams = EC_KEY_decoded_from_explicit_params(eck);
  695|       |
  696|      0|        if (explicitparams < 0
  ------------------
  |  Branch (696:13): [True: 0, False: 0]
  ------------------
  697|      0|            || !OSSL_PARAM_set_int(p, explicitparams))
  ------------------
  |  Branch (697:16): [True: 0, False: 0]
  ------------------
  698|      0|            goto err;
  699|      0|    }
  700|       |
  701|  52.2k|    if (!sm2) {
  ------------------
  |  Branch (701:9): [True: 52.2k, False: 0]
  ------------------
  702|  52.2k|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  370|  52.2k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (702:13): [True: 0, False: 52.2k]
  ------------------
  703|      0|            && !OSSL_PARAM_set_utf8_string(p, EC_DEFAULT_MD))
  ------------------
  |  |   77|      0|#define EC_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (703:16): [True: 0, False: 0]
  ------------------
  704|      0|            goto err;
  705|  52.2k|    } else {
  706|      0|        if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  370|      0|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (706:13): [True: 0, False: 0]
  ------------------
  707|      0|            && !OSSL_PARAM_set_utf8_string(p, SM2_DEFAULT_MD))
  ------------------
  |  |   80|      0|#define SM2_DEFAULT_MD "SM3"
  ------------------
  |  Branch (707:16): [True: 0, False: 0]
  ------------------
  708|      0|            goto err;
  709|      0|    }
  710|       |
  711|       |    /* SM2 doesn't support this PARAM */
  712|  52.2k|    if (!sm2) {
  ------------------
  |  Branch (712:9): [True: 52.2k, False: 0]
  ------------------
  713|  52.2k|        p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_USE_COFACTOR_ECDH);
  ------------------
  |  |  498|  52.2k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  499|  52.2k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  714|  52.2k|        if (p != NULL) {
  ------------------
  |  Branch (714:13): [True: 0, False: 52.2k]
  ------------------
  715|      0|            int ecdh_cofactor_mode = 0;
  716|       |
  717|      0|            ecdh_cofactor_mode = (EC_KEY_get_flags(eck) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  955|      0|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (717:34): [True: 0, False: 0]
  ------------------
  718|       |
  719|      0|            if (!OSSL_PARAM_set_int(p, ecdh_cofactor_mode))
  ------------------
  |  Branch (719:17): [True: 0, False: 0]
  ------------------
  720|      0|                goto err;
  721|      0|        }
  722|  52.2k|    }
  723|  52.2k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (723:9): [True: 0, False: 52.2k]
  ------------------
  724|  52.2k|             OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY))
  ------------------
  |  |  398|  52.2k|# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
  ------------------
  725|  52.2k|        != NULL) {
  726|      0|        const EC_POINT *ecp = EC_KEY_get0_public_key(key);
  727|       |
  728|      0|        if (ecp == NULL) {
  ------------------
  |  Branch (728:13): [True: 0, False: 0]
  ------------------
  729|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_A_PUBLIC_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  730|      0|            goto err;
  731|      0|        }
  732|      0|        p->return_size = EC_POINT_point2oct(ecg, ecp,
  733|      0|            POINT_CONVERSION_UNCOMPRESSED,
  734|      0|            p->data, p->data_size, bnctx);
  735|      0|        if (p->return_size == 0)
  ------------------
  |  Branch (735:13): [True: 0, False: 0]
  ------------------
  736|      0|            goto err;
  737|      0|    }
  738|       |
  739|  52.2k|    ret = ec_get_ecm_params(ecg, params)
  ------------------
  |  Branch (739:11): [True: 52.2k, False: 0]
  ------------------
  740|  52.2k|        && ossl_ec_group_todata(ecg, NULL, params, libctx, propq, bnctx,
  ------------------
  |  Branch (740:12): [True: 52.2k, False: 0]
  ------------------
  741|  52.2k|            &genbuf)
  742|  52.2k|        && key_to_params(eck, NULL, params, 1, &pub_key)
  ------------------
  |  Branch (742:12): [True: 52.2k, False: 0]
  ------------------
  743|  52.2k|        && otherparams_to_params(eck, NULL, params);
  ------------------
  |  Branch (743:12): [True: 52.2k, False: 0]
  ------------------
  744|  52.2k|err:
  745|  52.2k|    OPENSSL_free(genbuf);
  ------------------
  |  |  131|  52.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  746|  52.2k|    OPENSSL_free(pub_key);
  ------------------
  |  |  131|  52.2k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  747|  52.2k|    BN_CTX_end(bnctx);
  748|  52.2k|    BN_CTX_free(bnctx);
  749|  52.2k|    return ret;
  750|  52.2k|}
ec_kmgmt.c:ec_get_ecm_params:
  569|  52.2k|{
  570|       |#ifdef OPENSSL_NO_EC2M
  571|       |    return 1;
  572|       |#else
  573|  52.2k|    int ret = 0, m;
  574|  52.2k|    unsigned int k1 = 0, k2 = 0, k3 = 0;
  575|  52.2k|    int basis_nid;
  576|  52.2k|    const char *basis_name = NULL;
  577|  52.2k|    int fid = EC_GROUP_get_field_type(group);
  578|       |
  579|  52.2k|    if (fid != NID_X9_62_characteristic_two_field)
  ------------------
  |  |  156|  52.2k|#define NID_X9_62_characteristic_two_field              407
  ------------------
  |  Branch (579:9): [True: 52.2k, False: 0]
  ------------------
  580|  52.2k|        return 1;
  581|       |
  582|      0|    basis_nid = EC_GROUP_get_basis_type(group);
  583|      0|    if (basis_nid == NID_X9_62_tpBasis)
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (583:9): [True: 0, False: 0]
  ------------------
  584|      0|        basis_name = SN_X9_62_tpBasis;
  ------------------
  |  |  167|      0|#define SN_X9_62_tpBasis                "tpBasis"
  ------------------
  585|      0|    else if (basis_nid == NID_X9_62_ppBasis)
  ------------------
  |  |  172|      0|#define NID_X9_62_ppBasis               683
  ------------------
  |  Branch (585:14): [True: 0, False: 0]
  ------------------
  586|      0|        basis_name = SN_X9_62_ppBasis;
  ------------------
  |  |  171|      0|#define SN_X9_62_ppBasis                "ppBasis"
  ------------------
  587|      0|    else
  588|      0|        goto err;
  589|       |
  590|      0|    m = EC_GROUP_get_degree(group);
  591|      0|    if (!ossl_param_build_set_int(NULL, params, OSSL_PKEY_PARAM_EC_CHAR2_M, m)
  ------------------
  |  |  379|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
  ------------------
  |  Branch (591:9): [True: 0, False: 0]
  ------------------
  592|      0|        || !ossl_param_build_set_utf8_string(NULL, params,
  ------------------
  |  Branch (592:12): [True: 0, False: 0]
  ------------------
  593|      0|            OSSL_PKEY_PARAM_EC_CHAR2_TYPE,
  ------------------
  |  |  384|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
  ------------------
  594|      0|            basis_name))
  595|      0|        goto err;
  596|       |
  597|      0|    if (basis_nid == NID_X9_62_tpBasis) {
  ------------------
  |  |  168|      0|#define NID_X9_62_tpBasis               682
  ------------------
  |  Branch (597:9): [True: 0, False: 0]
  ------------------
  598|      0|        if (!EC_GROUP_get_trinomial_basis(group, &k1)
  ------------------
  |  Branch (598:13): [True: 0, False: 0]
  ------------------
  599|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (599:16): [True: 0, False: 0]
  ------------------
  600|      0|                OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS,
  ------------------
  |  |  383|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
  ------------------
  601|      0|                (int)k1))
  602|      0|            goto err;
  603|      0|    } else {
  604|      0|        if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3)
  ------------------
  |  Branch (604:13): [True: 0, False: 0]
  ------------------
  605|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (605:16): [True: 0, False: 0]
  ------------------
  606|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K1, (int)k1)
  ------------------
  |  |  380|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
  ------------------
  607|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (607:16): [True: 0, False: 0]
  ------------------
  608|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K2, (int)k2)
  ------------------
  |  |  381|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
  ------------------
  609|      0|            || !ossl_param_build_set_int(NULL, params,
  ------------------
  |  Branch (609:16): [True: 0, False: 0]
  ------------------
  610|      0|                OSSL_PKEY_PARAM_EC_CHAR2_PP_K3, (int)k3))
  ------------------
  |  |  382|      0|# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
  ------------------
  611|      0|            goto err;
  612|      0|    }
  613|      0|    ret = 1;
  614|      0|err:
  615|      0|    return ret;
  616|      0|#endif /* OPENSSL_NO_EC2M */
  617|      0|}
ec_kmgmt.c:key_to_params:
  116|  52.2k|{
  117|  52.2k|    BIGNUM *x = NULL, *y = NULL;
  118|  52.2k|    const BIGNUM *priv_key = NULL;
  119|  52.2k|    const EC_POINT *pub_point = NULL;
  120|  52.2k|    const EC_GROUP *ecg = NULL;
  121|  52.2k|    size_t pub_key_len = 0;
  122|  52.2k|    int ret = 0;
  123|  52.2k|    BN_CTX *bnctx = NULL;
  124|       |
  125|  52.2k|    if (eckey == NULL
  ------------------
  |  Branch (125:9): [True: 0, False: 52.2k]
  ------------------
  126|  52.2k|        || (ecg = EC_KEY_get0_group(eckey)) == NULL)
  ------------------
  |  Branch (126:12): [True: 0, False: 52.2k]
  ------------------
  127|      0|        return 0;
  128|       |
  129|  52.2k|    priv_key = EC_KEY_get0_private_key(eckey);
  130|  52.2k|    pub_point = EC_KEY_get0_public_key(eckey);
  131|       |
  132|  52.2k|    if (pub_point != NULL) {
  ------------------
  |  Branch (132:9): [True: 52.2k, False: 0]
  ------------------
  133|  52.2k|        OSSL_PARAM *p = NULL, *px = NULL, *py = NULL;
  134|       |        /*
  135|       |         * EC_POINT_point2buf() can generate random numbers in some
  136|       |         * implementations so we need to ensure we use the correct libctx.
  137|       |         */
  138|  52.2k|        bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(eckey));
  139|  52.2k|        if (bnctx == NULL)
  ------------------
  |  Branch (139:13): [True: 0, False: 52.2k]
  ------------------
  140|      0|            goto err;
  141|       |
  142|       |        /* If we are doing a get then check first before decoding the point */
  143|  52.2k|        if (tmpl == NULL) {
  ------------------
  |  Branch (143:13): [True: 52.2k, False: 0]
  ------------------
  144|  52.2k|            p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_PUB_KEY);
  ------------------
  |  |  441|  52.2k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  145|  52.2k|            px = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_X);
  ------------------
  |  |  395|  52.2k|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  146|  52.2k|            py = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_EC_PUB_Y);
  ------------------
  |  |  396|  52.2k|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  147|  52.2k|        }
  148|       |
  149|  52.2k|        if (p != NULL || tmpl != NULL) {
  ------------------
  |  Branch (149:13): [True: 0, False: 52.2k]
  |  Branch (149:26): [True: 0, False: 52.2k]
  ------------------
  150|       |            /* convert pub_point to a octet string according to the SECG standard */
  151|      0|            point_conversion_form_t format = EC_KEY_get_conv_form(eckey);
  152|       |
  153|      0|            if ((pub_key_len = EC_POINT_point2buf(ecg, pub_point,
  ------------------
  |  Branch (153:17): [True: 0, False: 0]
  ------------------
  154|      0|                     format,
  155|      0|                     pub_key, bnctx))
  156|      0|                    == 0
  157|      0|                || !ossl_param_build_set_octet_string(tmpl, p,
  ------------------
  |  Branch (157:20): [True: 0, False: 0]
  ------------------
  158|      0|                    OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  441|      0|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  159|      0|                    *pub_key, pub_key_len))
  160|      0|                goto err;
  161|      0|        }
  162|  52.2k|        if (px != NULL || py != NULL) {
  ------------------
  |  Branch (162:13): [True: 0, False: 52.2k]
  |  Branch (162:27): [True: 0, False: 52.2k]
  ------------------
  163|      0|            if (px != NULL) {
  ------------------
  |  Branch (163:17): [True: 0, False: 0]
  ------------------
  164|      0|                x = BN_CTX_get(bnctx);
  165|      0|                if (x == NULL)
  ------------------
  |  Branch (165:21): [True: 0, False: 0]
  ------------------
  166|      0|                    goto err;
  167|      0|            }
  168|      0|            if (py != NULL) {
  ------------------
  |  Branch (168:17): [True: 0, False: 0]
  ------------------
  169|      0|                y = BN_CTX_get(bnctx);
  170|      0|                if (y == NULL)
  ------------------
  |  Branch (170:21): [True: 0, False: 0]
  ------------------
  171|      0|                    goto err;
  172|      0|            }
  173|       |
  174|      0|            if (!EC_POINT_get_affine_coordinates(ecg, pub_point, x, y, bnctx))
  ------------------
  |  Branch (174:17): [True: 0, False: 0]
  ------------------
  175|      0|                goto err;
  176|      0|            if (px != NULL
  ------------------
  |  Branch (176:17): [True: 0, False: 0]
  ------------------
  177|      0|                && !ossl_param_build_set_bn(tmpl, px,
  ------------------
  |  Branch (177:20): [True: 0, False: 0]
  ------------------
  178|      0|                    OSSL_PKEY_PARAM_EC_PUB_X, x))
  ------------------
  |  |  395|      0|# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
  ------------------
  179|      0|                goto err;
  180|      0|            if (py != NULL
  ------------------
  |  Branch (180:17): [True: 0, False: 0]
  ------------------
  181|      0|                && !ossl_param_build_set_bn(tmpl, py,
  ------------------
  |  Branch (181:20): [True: 0, False: 0]
  ------------------
  182|      0|                    OSSL_PKEY_PARAM_EC_PUB_Y, y))
  ------------------
  |  |  396|      0|# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
  ------------------
  183|      0|                goto err;
  184|      0|        }
  185|  52.2k|    }
  186|       |
  187|  52.2k|    if (priv_key != NULL && include_private) {
  ------------------
  |  Branch (187:9): [True: 0, False: 52.2k]
  |  Branch (187:29): [True: 0, False: 0]
  ------------------
  188|      0|        size_t sz;
  189|      0|        int ecbits;
  190|       |
  191|       |        /*
  192|       |         * Key import/export should never leak the bit length of the secret
  193|       |         * scalar in the key.
  194|       |         *
  195|       |         * For this reason, on export we use padded BIGNUMs with fixed length.
  196|       |         *
  197|       |         * When importing we also should make sure that, even if short lived,
  198|       |         * the newly created BIGNUM is marked with the BN_FLG_CONSTTIME flag as
  199|       |         * soon as possible, so that any processing of this BIGNUM might opt for
  200|       |         * constant time implementations in the backend.
  201|       |         *
  202|       |         * Setting the BN_FLG_CONSTTIME flag alone is never enough, we also have
  203|       |         * to preallocate the BIGNUM internal buffer to a fixed public size big
  204|       |         * enough that operations performed during the processing never trigger
  205|       |         * a realloc which would leak the size of the scalar through memory
  206|       |         * accesses.
  207|       |         *
  208|       |         * Fixed Length
  209|       |         * ------------
  210|       |         *
  211|       |         * The order of the large prime subgroup of the curve is our choice for
  212|       |         * a fixed public size, as that is generally the upper bound for
  213|       |         * generating a private key in EC cryptosystems and should fit all valid
  214|       |         * secret scalars.
  215|       |         *
  216|       |         * For padding on export we just use the bit length of the order
  217|       |         * converted to bytes (rounding up).
  218|       |         *
  219|       |         * For preallocating the BIGNUM storage we look at the number of "words"
  220|       |         * required for the internal representation of the order, and we
  221|       |         * preallocate 2 extra "words" in case any of the subsequent processing
  222|       |         * might temporarily overflow the order length.
  223|       |         */
  224|      0|        ecbits = EC_GROUP_order_bits(ecg);
  225|      0|        if (ecbits <= 0)
  ------------------
  |  Branch (225:13): [True: 0, False: 0]
  ------------------
  226|      0|            goto err;
  227|      0|        sz = (ecbits + 7) / 8;
  228|       |
  229|      0|        if (!ossl_param_build_set_bn_pad(tmpl, params,
  ------------------
  |  Branch (229:13): [True: 0, False: 0]
  ------------------
  230|      0|                OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  439|      0|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  231|      0|                priv_key, sz))
  232|      0|            goto err;
  233|      0|    }
  234|  52.2k|    ret = 1;
  235|  52.2k|err:
  236|  52.2k|    BN_CTX_free(bnctx);
  237|  52.2k|    return ret;
  238|  52.2k|}
ec_kmgmt.c:otherparams_to_params:
  242|  52.2k|{
  243|  52.2k|    int ecdh_cofactor_mode = 0, group_check = 0;
  244|  52.2k|    const char *name = NULL;
  245|  52.2k|    point_conversion_form_t format;
  246|       |
  247|  52.2k|    if (ec == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 52.2k]
  ------------------
  248|      0|        return 0;
  249|       |
  250|  52.2k|    format = EC_KEY_get_conv_form(ec);
  251|  52.2k|    name = ossl_ec_pt_format_id2name((int)format);
  252|  52.2k|    if (name != NULL
  ------------------
  |  Branch (252:9): [True: 52.2k, False: 0]
  ------------------
  253|  52.2k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (253:12): [True: 0, False: 52.2k]
  ------------------
  254|  52.2k|            OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT,
  ------------------
  |  |  394|  52.2k|# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
  ------------------
  255|  52.2k|            name))
  256|      0|        return 0;
  257|       |
  258|  52.2k|    group_check = EC_KEY_get_flags(ec) & EC_FLAG_CHECK_NAMED_GROUP_MASK;
  ------------------
  |  |  959|  52.2k|    (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  956|  52.2k|#define EC_FLAG_CHECK_NAMED_GROUP 0x2000
  |  |  ------------------
  |  |                   (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST)
  |  |  ------------------
  |  |  |  |  957|  52.2k|#define EC_FLAG_CHECK_NAMED_GROUP_NIST 0x4000
  |  |  ------------------
  ------------------
  259|  52.2k|    name = ossl_ec_check_group_type_id2name(group_check);
  260|  52.2k|    if (name != NULL
  ------------------
  |  Branch (260:9): [True: 52.2k, False: 0]
  ------------------
  261|  52.2k|        && !ossl_param_build_set_utf8_string(tmpl, params,
  ------------------
  |  Branch (261:12): [True: 0, False: 52.2k]
  ------------------
  262|  52.2k|            OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE,
  ------------------
  |  |  390|  52.2k|# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
  ------------------
  263|  52.2k|            name))
  264|      0|        return 0;
  265|       |
  266|  52.2k|    if ((EC_KEY_get_enc_flags(ec) & EC_PKEY_NO_PUBKEY) != 0
  ------------------
  |  |  951|  52.2k|#define EC_PKEY_NO_PUBKEY 0x002
  ------------------
  |  Branch (266:9): [True: 0, False: 52.2k]
  ------------------
  267|      0|        && !ossl_param_build_set_int(tmpl, params,
  ------------------
  |  Branch (267:12): [True: 0, False: 0]
  ------------------
  268|      0|            OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0))
  ------------------
  |  |  391|      0|# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
  ------------------
  269|      0|        return 0;
  270|       |
  271|  52.2k|    ecdh_cofactor_mode = (EC_KEY_get_flags(ec) & EC_FLAG_COFACTOR_ECDH) ? 1 : 0;
  ------------------
  |  |  955|  52.2k|#define EC_FLAG_COFACTOR_ECDH 0x1000
  ------------------
  |  Branch (271:26): [True: 0, False: 52.2k]
  ------------------
  272|  52.2k|    return ossl_param_build_set_int(tmpl, params,
  273|  52.2k|        OSSL_PKEY_PARAM_USE_COFACTOR_ECDH,
  ------------------
  |  |  498|  52.2k|# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
  |  |  ------------------
  |  |  |  |  499|  52.2k|# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
  |  |  ------------------
  ------------------
  274|  52.2k|        ecdh_cofactor_mode);
  275|  52.2k|}

ecx_kmgmt.c:x25519_get_params:
  803|  4.91k|{
  804|  4.91k|    return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   33|  4.91k|#define X25519_BITS 253
  ------------------
                  return ecx_get_params(key, params, X25519_BITS, X25519_SECURITY_BITS,
  ------------------
  |  |   34|  4.91k|#define X25519_SECURITY_BITS 128
  ------------------
  805|  4.91k|        X25519_KEYLEN);
  ------------------
  |  |   26|  4.91k|#define X25519_KEYLEN 32
  ------------------
  806|  4.91k|}
ecx_kmgmt.c:ecx_get_params:
  766|  4.91k|{
  767|  4.91k|    ECX_KEY *ecx = key;
  768|  4.91k|    struct ecx_ed_common_get_params_st p;
  769|       |
  770|  4.91k|    if (key == NULL || !ecx_get_params_decoder(params, &p))
  ------------------
  |  Branch (770:9): [True: 0, False: 4.91k]
  |  Branch (770:24): [True: 0, False: 4.91k]
  ------------------
  771|      0|        return 0;
  772|       |
  773|  4.91k|    if (p.encpub != NULL
  ------------------
  |  Branch (773:9): [True: 2.45k, False: 2.46k]
  ------------------
  774|  2.45k|        && !OSSL_PARAM_set_octet_string(p.encpub, ecx->pubkey, ecx->keylen))
  ------------------
  |  Branch (774:12): [True: 0, False: 2.45k]
  ------------------
  775|      0|        return 0;
  776|       |#ifdef FIPS_MODULE
  777|       |    {
  778|       |        /* Currently X25519 and X448 are not approved */
  779|       |        int approved = 0;
  780|       |
  781|       |        if (p.ind != NULL && !OSSL_PARAM_set_int(p.ind, approved))
  782|       |            return 0;
  783|       |    }
  784|       |#endif
  785|       |
  786|  4.91k|    return ecx_ed_common_get_params(key, &p, bits, secbits, size);
  787|  4.91k|}
ecx_kmgmt.c:ecx_get_params_decoder:
  406|  4.91k|{
  407|  4.91k|    const char *s;
  408|       |
  409|  4.91k|    memset(r, 0, sizeof(*r));
  410|  4.91k|    if (p != NULL)
  ------------------
  |  Branch (410:9): [True: 4.91k, False: 0]
  ------------------
  411|  17.2k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (411:16): [True: 12.2k, False: 4.91k]
  ------------------
  412|  12.2k|            switch(s[0]) {
  413|      0|            default:
  ------------------
  |  Branch (413:13): [True: 0, False: 12.2k]
  ------------------
  414|      0|                break;
  415|  2.46k|            case 'b':
  ------------------
  |  Branch (415:13): [True: 2.46k, False: 9.83k]
  ------------------
  416|  2.46k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  2.46k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.46k, False: 0]
  |  |  ------------------
  ------------------
  417|       |                    /* OSSL_PKEY_PARAM_BITS */
  418|  2.46k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  2.46k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.46k]
  |  |  ------------------
  ------------------
  419|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  420|      0|                                       "param %s is repeated", s);
  421|      0|                        return 0;
  422|      0|                    }
  423|  2.46k|                    r->bits = (OSSL_PARAM *)p;
  424|  2.46k|                }
  425|  2.46k|                break;
  426|  2.46k|            case 'e':
  ------------------
  |  Branch (426:13): [True: 2.45k, False: 9.84k]
  ------------------
  427|  2.45k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  2.45k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.45k, False: 0]
  |  |  ------------------
  ------------------
  428|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  429|  2.45k|                    if (ossl_unlikely(r->encpub != NULL)) {
  ------------------
  |  |   23|  2.45k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.45k]
  |  |  ------------------
  ------------------
  430|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  431|      0|                                       "param %s is repeated", s);
  432|      0|                        return 0;
  433|      0|                    }
  434|  2.45k|                    r->encpub = (OSSL_PARAM *)p;
  435|  2.45k|                }
  436|  2.45k|                break;
  437|  2.45k|            case 'f':
  ------------------
  |  Branch (437:13): [True: 0, False: 12.2k]
  ------------------
  438|       |# if defined(FIPS_MODULE)
  439|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  440|       |                    /* OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR */
  441|       |                    if (ossl_unlikely(r->ind != NULL)) {
  442|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  443|       |                                       "param %s is repeated", s);
  444|       |                        return 0;
  445|       |                    }
  446|       |                    r->ind = (OSSL_PARAM *)p;
  447|       |                }
  448|       |# endif
  449|      0|                break;
  450|  2.46k|            case 'm':
  ------------------
  |  Branch (450:13): [True: 2.46k, False: 9.83k]
  ------------------
  451|  2.46k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  2.46k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.46k, False: 0]
  |  |  ------------------
  ------------------
  452|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  453|  2.46k|                    if (ossl_unlikely(r->size != NULL)) {
  ------------------
  |  |   23|  2.46k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.46k]
  |  |  ------------------
  ------------------
  454|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  455|      0|                                       "param %s is repeated", s);
  456|      0|                        return 0;
  457|      0|                    }
  458|  2.46k|                    r->size = (OSSL_PARAM *)p;
  459|  2.46k|                }
  460|  2.46k|                break;
  461|  2.46k|            case 'p':
  ------------------
  |  Branch (461:13): [True: 0, False: 12.2k]
  ------------------
  462|      0|                switch(s[1]) {
  463|      0|                default:
  ------------------
  |  Branch (463:17): [True: 0, False: 0]
  ------------------
  464|      0|                    break;
  465|      0|                case 'r':
  ------------------
  |  Branch (465:17): [True: 0, False: 0]
  ------------------
  466|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  467|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  468|      0|                        if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  469|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  470|      0|                                           "param %s is repeated", s);
  471|      0|                            return 0;
  472|      0|                        }
  473|      0|                        r->priv = (OSSL_PARAM *)p;
  474|      0|                    }
  475|      0|                    break;
  476|      0|                case 'u':
  ------------------
  |  Branch (476:17): [True: 0, False: 0]
  ------------------
  477|      0|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  478|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  479|      0|                        if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  480|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  481|      0|                                           "param %s is repeated", s);
  482|      0|                            return 0;
  483|      0|                        }
  484|      0|                        r->pub = (OSSL_PARAM *)p;
  485|      0|                    }
  486|      0|                }
  487|      0|                break;
  488|  4.92k|            case 's':
  ------------------
  |  Branch (488:13): [True: 4.92k, False: 7.37k]
  ------------------
  489|  4.92k|                switch(s[1]) {
  490|      0|                default:
  ------------------
  |  Branch (490:17): [True: 0, False: 4.92k]
  ------------------
  491|      0|                    break;
  492|  4.92k|                case 'e':
  ------------------
  |  Branch (492:17): [True: 4.92k, False: 0]
  ------------------
  493|  4.92k|                    switch(s[2]) {
  494|      0|                    default:
  ------------------
  |  Branch (494:21): [True: 0, False: 4.92k]
  ------------------
  495|      0|                        break;
  496|  4.92k|                    case 'c':
  ------------------
  |  Branch (496:21): [True: 4.92k, False: 0]
  ------------------
  497|  4.92k|                        switch(s[3]) {
  498|      0|                        default:
  ------------------
  |  Branch (498:25): [True: 0, False: 4.92k]
  ------------------
  499|      0|                            break;
  500|  4.92k|                        case 'u':
  ------------------
  |  Branch (500:25): [True: 4.92k, False: 0]
  ------------------
  501|  4.92k|                            switch(s[4]) {
  502|      0|                            default:
  ------------------
  |  Branch (502:29): [True: 0, False: 4.92k]
  ------------------
  503|      0|                                break;
  504|  4.92k|                            case 'r':
  ------------------
  |  Branch (504:29): [True: 4.92k, False: 0]
  ------------------
  505|  4.92k|                                switch(s[5]) {
  506|      0|                                default:
  ------------------
  |  Branch (506:33): [True: 0, False: 4.92k]
  ------------------
  507|      0|                                    break;
  508|  4.92k|                                case 'i':
  ------------------
  |  Branch (508:33): [True: 4.92k, False: 0]
  ------------------
  509|  4.92k|                                    switch(s[6]) {
  510|      0|                                    default:
  ------------------
  |  Branch (510:37): [True: 0, False: 4.92k]
  ------------------
  511|      0|                                        break;
  512|  4.92k|                                    case 't':
  ------------------
  |  Branch (512:37): [True: 4.92k, False: 0]
  ------------------
  513|  4.92k|                                        switch(s[7]) {
  514|      0|                                        default:
  ------------------
  |  Branch (514:41): [True: 0, False: 4.92k]
  ------------------
  515|      0|                                            break;
  516|  4.92k|                                        case 'y':
  ------------------
  |  Branch (516:41): [True: 4.92k, False: 0]
  ------------------
  517|  4.92k|                                            switch(s[8]) {
  518|      0|                                            default:
  ------------------
  |  Branch (518:45): [True: 0, False: 4.92k]
  ------------------
  519|      0|                                                break;
  520|  4.92k|                                            case '-':
  ------------------
  |  Branch (520:45): [True: 4.92k, False: 0]
  ------------------
  521|  4.92k|                                                switch(s[9]) {
  522|      0|                                                default:
  ------------------
  |  Branch (522:49): [True: 0, False: 4.92k]
  ------------------
  523|      0|                                                    break;
  524|  2.46k|                                                case 'b':
  ------------------
  |  Branch (524:49): [True: 2.46k, False: 2.46k]
  ------------------
  525|  2.46k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  2.46k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.46k, False: 0]
  |  |  ------------------
  ------------------
  526|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  527|  2.46k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  2.46k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.46k]
  |  |  ------------------
  ------------------
  528|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  529|      0|                                                                           "param %s is repeated", s);
  530|      0|                                                            return 0;
  531|      0|                                                        }
  532|  2.46k|                                                        r->secbits = (OSSL_PARAM *)p;
  533|  2.46k|                                                    }
  534|  2.46k|                                                    break;
  535|  2.46k|                                                case 'c':
  ------------------
  |  Branch (535:49): [True: 2.46k, False: 2.46k]
  ------------------
  536|  2.46k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  2.46k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.46k, False: 0]
  |  |  ------------------
  ------------------
  537|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  538|  2.46k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  2.46k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.46k]
  |  |  ------------------
  ------------------
  539|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  540|      0|                                                                           "param %s is repeated", s);
  541|      0|                                                            return 0;
  542|      0|                                                        }
  543|  2.46k|                                                        r->seccat = (OSSL_PARAM *)p;
  544|  2.46k|                                                    }
  545|  4.92k|                                                }
  546|  4.92k|                                            }
  547|  4.92k|                                        }
  548|  4.92k|                                    }
  549|  4.92k|                                }
  550|  4.92k|                            }
  551|  4.92k|                        }
  552|  4.92k|                    }
  553|  4.92k|                }
  554|  12.2k|            }
  555|  4.91k|    return 1;
  556|  4.91k|}
ecx_kmgmt.c:ecx_ed_common_get_params:
  749|  4.91k|{
  750|  4.91k|    ECX_KEY *ecx = key;
  751|       |
  752|  4.91k|    if (p->bits != NULL && !OSSL_PARAM_set_int(p->bits, bits))
  ------------------
  |  Branch (752:9): [True: 2.46k, False: 2.45k]
  |  Branch (752:28): [True: 0, False: 2.46k]
  ------------------
  753|      0|        return 0;
  754|  4.91k|    if (p->secbits != NULL && !OSSL_PARAM_set_int(p->secbits, secbits))
  ------------------
  |  Branch (754:9): [True: 2.46k, False: 2.45k]
  |  Branch (754:31): [True: 0, False: 2.46k]
  ------------------
  755|      0|        return 0;
  756|  4.91k|    if (p->size != NULL && !OSSL_PARAM_set_int(p->size, size))
  ------------------
  |  Branch (756:9): [True: 2.46k, False: 2.45k]
  |  Branch (756:28): [True: 0, False: 2.46k]
  ------------------
  757|      0|        return 0;
  758|  4.91k|    if (p->seccat != NULL && !OSSL_PARAM_set_int(p->seccat, 0))
  ------------------
  |  Branch (758:9): [True: 2.46k, False: 2.45k]
  |  Branch (758:30): [True: 0, False: 2.46k]
  ------------------
  759|      0|        return 0;
  760|  4.91k|    return key_to_params(ecx, NULL, p->pub, p->priv, 1);
  761|  4.91k|}
ecx_kmgmt.c:key_to_params:
  294|  6.14k|{
  295|  6.14k|    if (key == NULL)
  ------------------
  |  Branch (295:9): [True: 0, False: 6.14k]
  ------------------
  296|      0|        return 0;
  297|       |
  298|  6.14k|    if (!ossl_param_build_set_octet_string(tmpl, pub,
  ------------------
  |  Branch (298:9): [True: 0, False: 6.14k]
  ------------------
  299|  6.14k|            OSSL_PKEY_PARAM_PUB_KEY,
  ------------------
  |  |  441|  6.14k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  300|  6.14k|            key->pubkey, key->keylen))
  301|      0|        return 0;
  302|       |
  303|  6.14k|    if (include_private
  ------------------
  |  Branch (303:9): [True: 4.91k, False: 1.23k]
  ------------------
  304|  4.91k|        && key->privkey != NULL
  ------------------
  |  Branch (304:12): [True: 4.91k, False: 0]
  ------------------
  305|  4.91k|        && !ossl_param_build_set_octet_string(tmpl, priv,
  ------------------
  |  Branch (305:12): [True: 0, False: 4.91k]
  ------------------
  306|  4.91k|            OSSL_PKEY_PARAM_PRIV_KEY,
  ------------------
  |  |  439|  4.91k|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  307|  4.91k|            key->privkey, key->keylen))
  308|      0|        return 0;
  309|       |
  310|  6.14k|    return 1;
  311|  6.14k|}
ecx_kmgmt.c:ecx_export:
  315|  1.23k|{
  316|  1.23k|    ECX_KEY *key = keydata;
  317|  1.23k|    OSSL_PARAM_BLD *tmpl;
  318|  1.23k|    OSSL_PARAM *params = NULL;
  319|  1.23k|    int ret = 0;
  320|       |
  321|  1.23k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (321:9): [True: 0, False: 1.23k]
  |  Branch (321:36): [True: 0, False: 1.23k]
  ------------------
  322|      0|        return 0;
  323|       |
  324|  1.23k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (324:9): [True: 0, False: 1.23k]
  ------------------
  325|      0|        return 0;
  326|       |
  327|  1.23k|    tmpl = OSSL_PARAM_BLD_new();
  328|  1.23k|    if (tmpl == NULL)
  ------------------
  |  Branch (328:9): [True: 0, False: 1.23k]
  ------------------
  329|      0|        return 0;
  330|       |
  331|  1.23k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) != 0) {
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (331:9): [True: 1.23k, False: 0]
  ------------------
  332|  1.23k|        int include_private = ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0);
  ------------------
  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  333|       |
  334|  1.23k|        if (!key_to_params(key, tmpl, NULL, NULL, include_private))
  ------------------
  |  Branch (334:13): [True: 0, False: 1.23k]
  ------------------
  335|      0|            goto err;
  336|  1.23k|    }
  337|       |
  338|  1.23k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  339|  1.23k|    if (params == NULL)
  ------------------
  |  Branch (339:9): [True: 0, False: 1.23k]
  ------------------
  340|      0|        goto err;
  341|       |
  342|  1.23k|    ret = param_cb(params, cbarg);
  343|  1.23k|    OSSL_PARAM_free(params);
  344|  1.23k|err:
  345|  1.23k|    OSSL_PARAM_BLD_free(tmpl);
  346|  1.23k|    return ret;
  347|  1.23k|}
ecx_kmgmt.c:x25519_gen_init:
 1021|  2.46k|{
 1022|  2.46k|    return ecx_gen_init(provctx, selection, params, ECX_KEY_TYPE_X25519, "X25519");
 1023|  2.46k|}
ecx_kmgmt.c:ecx_gen_init:
  990|  2.46k|{
  991|  2.46k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(provctx);
  ------------------
  |  |   31|  2.46k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  992|  2.46k|    struct ecx_gen_ctx *gctx = NULL;
  993|       |
  994|  2.46k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (994:9): [True: 0, False: 2.46k]
  ------------------
  995|      0|        return NULL;
  996|       |
  997|  2.46k|    if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL) {
  ------------------
  |  |  108|  2.46k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (997:9): [True: 2.46k, False: 0]
  ------------------
  998|  2.46k|        gctx->libctx = libctx;
  999|  2.46k|        gctx->type = type;
 1000|  2.46k|        gctx->selection = selection;
 1001|       |#ifdef FIPS_MODULE
 1002|       |        /* X25519/X448 are not FIPS approved, (ED25519/ED448 are approved) */
 1003|       |        if (algdesc != NULL
 1004|       |            && !ossl_FIPS_IND_callback(libctx, algdesc, "KeyGen Init")) {
 1005|       |            OPENSSL_free(gctx);
 1006|       |            return NULL;
 1007|       |        }
 1008|       |#endif
 1009|  2.46k|    } else {
 1010|      0|        return NULL;
 1011|      0|    }
 1012|  2.46k|    if (!ecx_gen_set_params(gctx, params)) {
  ------------------
  |  Branch (1012:9): [True: 0, False: 2.46k]
  ------------------
 1013|      0|        ecx_gen_cleanup(gctx);
 1014|       |        gctx = NULL;
 1015|      0|    }
 1016|  2.46k|    return gctx;
 1017|  2.46k|}
ecx_kmgmt.c:ecx_gen_set_params:
 1114|  4.92k|{
 1115|  4.92k|    struct ecx_gen_ctx *gctx = genctx;
 1116|  4.92k|    struct ecx_gen_set_params_st p;
 1117|       |
 1118|  4.92k|    if (gctx == NULL || !ecx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (1118:9): [True: 0, False: 4.92k]
  |  Branch (1118:25): [True: 0, False: 4.92k]
  ------------------
 1119|      0|        return 0;
 1120|       |
 1121|  4.92k|    if (p.group != NULL) {
  ------------------
  |  Branch (1121:9): [True: 1.22k, False: 3.69k]
  ------------------
 1122|  1.22k|        const char *groupname = NULL;
 1123|       |
 1124|       |        /*
 1125|       |         * We optionally allow setting a group name - but each algorithm only
 1126|       |         * support one such name, so all we do is verify that it is the one we
 1127|       |         * expected.
 1128|       |         */
 1129|  1.22k|        switch (gctx->type) {
 1130|  1.22k|        case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (1130:9): [True: 1.22k, False: 0]
  ------------------
 1131|  1.22k|            groupname = "x25519";
 1132|  1.22k|            break;
 1133|      0|        case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (1133:9): [True: 0, False: 1.22k]
  ------------------
 1134|      0|            groupname = "x448";
 1135|      0|            break;
 1136|      0|        default:
  ------------------
  |  Branch (1136:9): [True: 0, False: 1.22k]
  ------------------
 1137|       |            /* We only support this for key exchange at the moment */
 1138|      0|            break;
 1139|  1.22k|        }
 1140|  1.22k|        if (p.group->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  2.45k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1140:13): [True: 0, False: 1.22k]
  ------------------
 1141|  1.22k|            || groupname == NULL
  ------------------
  |  Branch (1141:16): [True: 0, False: 1.22k]
  ------------------
 1142|  1.22k|            || OPENSSL_strcasecmp(p.group->data, groupname) != 0) {
  ------------------
  |  Branch (1142:16): [True: 0, False: 1.22k]
  ------------------
 1143|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1144|      0|            return 0;
 1145|      0|        }
 1146|  1.22k|    }
 1147|       |
 1148|  4.92k|    if (p.kdfpropq != NULL) {
  ------------------
  |  Branch (1148:9): [True: 0, False: 4.92k]
  ------------------
 1149|      0|        if (p.kdfpropq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1149:13): [True: 0, False: 0]
  ------------------
 1150|      0|            return 0;
 1151|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1152|      0|        gctx->propq = OPENSSL_strdup(p.kdfpropq->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1153|      0|        if (gctx->propq == NULL)
  ------------------
  |  Branch (1153:13): [True: 0, False: 0]
  ------------------
 1154|      0|            return 0;
 1155|      0|    }
 1156|       |
 1157|  4.92k|    if (p.ikm != NULL) {
  ------------------
  |  Branch (1157:9): [True: 0, False: 4.92k]
  ------------------
 1158|      0|        if (p.ikm->data_size != 0 && p.ikm->data != NULL) {
  ------------------
  |  Branch (1158:13): [True: 0, False: 0]
  |  Branch (1158:38): [True: 0, False: 0]
  ------------------
 1159|      0|            OPENSSL_free(gctx->dhkem_ikm);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1160|      0|            gctx->dhkem_ikm = NULL;
 1161|      0|            if (!OSSL_PARAM_get_octet_string(p.ikm, (void **)&gctx->dhkem_ikm, 0,
  ------------------
  |  Branch (1161:17): [True: 0, False: 0]
  ------------------
 1162|      0|                    &gctx->dhkem_ikmlen))
 1163|      0|                return 0;
 1164|      0|        }
 1165|      0|    }
 1166|       |
 1167|  4.92k|    return 1;
 1168|  4.92k|}
ecx_kmgmt.c:ecx_gen_set_params_decoder:
 1065|  4.92k|{
 1066|  4.92k|    const char *s;
 1067|       |
 1068|  4.92k|    memset(r, 0, sizeof(*r));
 1069|  4.92k|    if (p != NULL)
  ------------------
  |  Branch (1069:9): [True: 2.46k, False: 2.46k]
  ------------------
 1070|  3.68k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (1070:16): [True: 1.22k, False: 2.46k]
  ------------------
 1071|  1.22k|            switch(s[0]) {
 1072|      0|            default:
  ------------------
  |  Branch (1072:13): [True: 0, False: 1.22k]
  ------------------
 1073|      0|                break;
 1074|      0|            case 'd':
  ------------------
  |  Branch (1074:13): [True: 0, False: 1.22k]
  ------------------
 1075|      0|                if (ossl_likely(strcmp("hkem-ikm", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1076|       |                    /* OSSL_PKEY_PARAM_DHKEM_IKM */
 1077|      0|                    if (ossl_unlikely(r->ikm != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1078|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1079|      0|                                       "param %s is repeated", s);
 1080|      0|                        return 0;
 1081|      0|                    }
 1082|      0|                    r->ikm = (OSSL_PARAM *)p;
 1083|      0|                }
 1084|      0|                break;
 1085|  1.22k|            case 'g':
  ------------------
  |  Branch (1085:13): [True: 1.22k, False: 0]
  ------------------
 1086|  1.22k|                if (ossl_likely(strcmp("roup", s + 1) == 0)) {
  ------------------
  |  |   22|  1.22k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.22k, False: 0]
  |  |  ------------------
  ------------------
 1087|       |                    /* OSSL_PKEY_PARAM_GROUP_NAME */
 1088|  1.22k|                    if (ossl_unlikely(r->group != NULL)) {
  ------------------
  |  |   23|  1.22k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.22k]
  |  |  ------------------
  ------------------
 1089|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1090|      0|                                       "param %s is repeated", s);
 1091|      0|                        return 0;
 1092|      0|                    }
 1093|  1.22k|                    r->group = (OSSL_PARAM *)p;
 1094|  1.22k|                }
 1095|  1.22k|                break;
 1096|  1.22k|            case 'p':
  ------------------
  |  Branch (1096:13): [True: 0, False: 1.22k]
  ------------------
 1097|      0|                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1098|       |                    /* OSSL_KDF_PARAM_PROPERTIES */
 1099|      0|                    if (ossl_unlikely(r->kdfpropq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1100|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1101|      0|                                       "param %s is repeated", s);
 1102|      0|                        return 0;
 1103|      0|                    }
 1104|      0|                    r->kdfpropq = (OSSL_PARAM *)p;
 1105|      0|                }
 1106|  1.22k|            }
 1107|  4.92k|    return 1;
 1108|  4.92k|}
ecx_kmgmt.c:x25519_gen:
 1311|  2.46k|{
 1312|  2.46k|    struct ecx_gen_ctx *gctx = genctx;
 1313|       |
 1314|  2.46k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (1314:9): [True: 0, False: 2.46k]
  ------------------
 1315|      0|        return 0;
 1316|       |
 1317|       |#ifdef S390X_EC_ASM
 1318|       |    if (OPENSSL_s390xcap_P.pcc[1] & S390X_CAPBIT(S390X_SCALAR_MULTIPLY_X25519))
 1319|       |        return s390x_ecx_keygen25519(gctx);
 1320|       |#endif
 1321|  2.46k|    return ecx_gen(gctx);
 1322|  2.46k|}
ecx_kmgmt.c:ecx_gen:
 1245|  2.46k|{
 1246|  2.46k|    ECX_KEY *key;
 1247|  2.46k|    unsigned char *privkey;
 1248|       |
 1249|  2.46k|    if (gctx == NULL)
  ------------------
  |  Branch (1249:9): [True: 0, False: 2.46k]
  ------------------
 1250|      0|        return NULL;
 1251|  2.46k|    if ((key = ossl_ecx_key_new(gctx->libctx, gctx->type, 0,
  ------------------
  |  Branch (1251:9): [True: 0, False: 2.46k]
  ------------------
 1252|  2.46k|             gctx->propq))
 1253|  2.46k|        == NULL) {
 1254|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1255|      0|        return NULL;
 1256|      0|    }
 1257|       |
 1258|       |    /* If we're doing parameter generation then we just return a blank key */
 1259|  2.46k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  2.46k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  2.46k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  2.46k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1259:9): [True: 0, False: 2.46k]
  ------------------
 1260|      0|        return key;
 1261|       |
 1262|  2.46k|    if ((privkey = ossl_ecx_key_allocate_privkey(key)) == NULL) {
  ------------------
  |  Branch (1262:9): [True: 0, False: 2.46k]
  ------------------
 1263|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EC_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1264|      0|        goto err;
 1265|      0|    }
 1266|  2.46k|#ifndef FIPS_MODULE
 1267|  2.46k|    if (gctx->dhkem_ikm != NULL && gctx->dhkem_ikmlen != 0) {
  ------------------
  |  Branch (1267:9): [True: 0, False: 2.46k]
  |  Branch (1267:36): [True: 0, False: 0]
  ------------------
 1268|      0|        if (ecx_key_type_is_ed(gctx->type))
  ------------------
  |  Branch (1268:13): [True: 0, False: 0]
  ------------------
 1269|      0|            goto err;
 1270|      0|        if (!ossl_ecx_dhkem_derive_private(key, privkey,
  ------------------
  |  Branch (1270:13): [True: 0, False: 0]
  ------------------
 1271|      0|                gctx->dhkem_ikm, gctx->dhkem_ikmlen))
 1272|      0|            goto err;
 1273|      0|    } else
 1274|  2.46k|#endif
 1275|  2.46k|    {
 1276|  2.46k|        if (RAND_priv_bytes_ex(gctx->libctx, privkey, key->keylen, 0) <= 0)
  ------------------
  |  Branch (1276:13): [True: 0, False: 2.46k]
  ------------------
 1277|      0|            goto err;
 1278|  2.46k|    }
 1279|       |
 1280|  2.46k|    switch (gctx->type) {
  ------------------
  |  Branch (1280:13): [True: 2.46k, False: 0]
  ------------------
 1281|  2.46k|    case ECX_KEY_TYPE_X25519:
  ------------------
  |  Branch (1281:5): [True: 2.46k, False: 0]
  ------------------
 1282|  2.46k|        privkey[0] &= 248;
 1283|  2.46k|        privkey[X25519_KEYLEN - 1] &= 127;
  ------------------
  |  |   26|  2.46k|#define X25519_KEYLEN 32
  ------------------
 1284|  2.46k|        privkey[X25519_KEYLEN - 1] |= 64;
  ------------------
  |  |   26|  2.46k|#define X25519_KEYLEN 32
  ------------------
 1285|  2.46k|        ossl_x25519_public_from_private(key->pubkey, privkey);
 1286|  2.46k|        break;
 1287|      0|    case ECX_KEY_TYPE_X448:
  ------------------
  |  Branch (1287:5): [True: 0, False: 2.46k]
  ------------------
 1288|      0|        privkey[0] &= 252;
 1289|      0|        privkey[X448_KEYLEN - 1] |= 128;
  ------------------
  |  |   27|      0|#define X448_KEYLEN 56
  ------------------
 1290|      0|        ossl_x448_public_from_private(key->pubkey, privkey);
 1291|      0|        break;
 1292|      0|    case ECX_KEY_TYPE_ED25519:
  ------------------
  |  Branch (1292:5): [True: 0, False: 2.46k]
  ------------------
 1293|      0|        if (!ossl_ed25519_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (1293:13): [True: 0, False: 0]
  ------------------
 1294|      0|                gctx->propq))
 1295|      0|            goto err;
 1296|      0|        break;
 1297|      0|    case ECX_KEY_TYPE_ED448:
  ------------------
  |  Branch (1297:5): [True: 0, False: 2.46k]
  ------------------
 1298|      0|        if (!ossl_ed448_public_from_private(gctx->libctx, key->pubkey, privkey,
  ------------------
  |  Branch (1298:13): [True: 0, False: 0]
  ------------------
 1299|      0|                gctx->propq))
 1300|      0|            goto err;
 1301|      0|        break;
 1302|  2.46k|    }
 1303|  2.46k|    key->haspubkey = 1;
 1304|  2.46k|    return key;
 1305|      0|err:
 1306|      0|    ossl_ecx_key_free(key);
 1307|       |    return NULL;
 1308|  2.46k|}
ecx_kmgmt.c:ecx_gen_cleanup:
 1406|  2.46k|{
 1407|  2.46k|    struct ecx_gen_ctx *gctx = genctx;
 1408|       |
 1409|  2.46k|    if (gctx == NULL)
  ------------------
  |  Branch (1409:9): [True: 0, False: 2.46k]
  ------------------
 1410|      0|        return;
 1411|       |
 1412|  2.46k|    OPENSSL_clear_free(gctx->dhkem_ikm, gctx->dhkem_ikmlen);
  ------------------
  |  |  129|  2.46k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1413|  2.46k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|  2.46k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1414|  2.46k|    OPENSSL_free(gctx);
  ------------------
  |  |  131|  2.46k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1415|  2.46k|}

ossl_prov_ml_kem_new:
  161|  1.23k|{
  162|  1.23k|    ML_KEM_KEY *key;
  163|       |
  164|  1.23k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (164:9): [True: 0, False: 1.23k]
  ------------------
  165|      0|        return NULL;
  166|       |    /*
  167|       |     * When decoding, if the key ends up "loaded" into the same provider, these
  168|       |     * are the correct config settings, otherwise, new values will be assigned
  169|       |     * on import into a different provider.  The "load" API does not pass along
  170|       |     * the provider context.
  171|       |     */
  172|  1.23k|    if ((key = ossl_ml_kem_key_new(PROV_LIBCTX_OF(ctx), propq, evp_type)) != NULL) {
  ------------------
  |  |   31|  1.23k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
  |  Branch (172:9): [True: 1.23k, False: 0]
  ------------------
  173|  1.23k|        const char *pct_type = ossl_prov_ctx_get_param(
  174|  1.23k|            ctx, OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE, "random");
  ------------------
  |  |  432|  1.23k|# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
  ------------------
  175|       |
  176|  1.23k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (176:13): [True: 1.23k, False: 0]
  ------------------
  177|  1.23k|                ctx, OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED, 1))
  ------------------
  |  |  436|  1.23k|# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
  ------------------
  178|  1.23k|            key->prov_flags |= ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|  1.23k|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  179|      0|        else
  180|      0|            key->prov_flags &= ~ML_KEM_KEY_RETAIN_SEED;
  ------------------
  |  |  126|      0|#define ML_KEM_KEY_RETAIN_SEED (1 << 3)
  ------------------
  181|  1.23k|        if (ossl_prov_ctx_get_bool_param(
  ------------------
  |  Branch (181:13): [True: 1.23k, False: 0]
  ------------------
  182|  1.23k|                ctx, OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED, 1))
  ------------------
  |  |  435|  1.23k|# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
  ------------------
  183|  1.23k|            key->prov_flags |= ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|  1.23k|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  184|      0|        else
  185|      0|            key->prov_flags &= ~ML_KEM_KEY_PREFER_SEED;
  ------------------
  |  |  125|      0|#define ML_KEM_KEY_PREFER_SEED (1 << 2)
  ------------------
  186|  1.23k|        if (OPENSSL_strcasecmp(pct_type, "random") == 0)
  ------------------
  |  Branch (186:13): [True: 1.23k, False: 0]
  ------------------
  187|  1.23k|            key->prov_flags |= ML_KEM_KEY_RANDOM_PCT;
  ------------------
  |  |  123|  1.23k|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  ------------------
  188|      0|        else if (OPENSSL_strcasecmp(pct_type, "fixed") == 0)
  ------------------
  |  Branch (188:18): [True: 0, False: 0]
  ------------------
  189|      0|            key->prov_flags |= ML_KEM_KEY_FIXED_PCT;
  ------------------
  |  |  124|      0|#define ML_KEM_KEY_FIXED_PCT (1 << 1)
  ------------------
  190|      0|        else
  191|      0|            key->prov_flags &= ~ML_KEM_KEY_PCT_TYPE;
  ------------------
  |  |  129|      0|    (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_FIXED_PCT)
  |  |  ------------------
  |  |  |  |  123|      0|#define ML_KEM_KEY_RANDOM_PCT (1 << 0)
  |  |  ------------------
  |  |                   (ML_KEM_KEY_RANDOM_PCT | ML_KEM_KEY_FIXED_PCT)
  |  |  ------------------
  |  |  |  |  124|      0|#define ML_KEM_KEY_FIXED_PCT (1 << 1)
  |  |  ------------------
  ------------------
  192|  1.23k|    }
  193|  1.23k|    return key;
  194|  1.23k|}
ml_kem_kmgmt.c:ml_kem_get_params:
  847|  1.23k|{
  848|  1.23k|    ML_KEM_KEY *key = vkey;
  849|  1.23k|    const ML_KEM_VINFO *v;
  850|  1.23k|    struct ml_kem_get_params_st p;
  851|       |
  852|  1.23k|    if (key == NULL || !ml_kem_get_params_decoder(params, &p))
  ------------------
  |  Branch (852:9): [True: 0, False: 1.23k]
  |  Branch (852:24): [True: 0, False: 1.23k]
  ------------------
  853|      0|        return 0;
  854|       |
  855|  1.23k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  1.23k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  856|       |
  857|  1.23k|    if (p.bits != NULL && !OSSL_PARAM_set_size_t(p.bits, v->bits))
  ------------------
  |  Branch (857:9): [True: 1.23k, False: 0]
  |  Branch (857:27): [True: 0, False: 1.23k]
  ------------------
  858|      0|        return 0;
  859|       |
  860|  1.23k|    if (p.secbits != NULL && !OSSL_PARAM_set_size_t(p.secbits, v->secbits))
  ------------------
  |  Branch (860:9): [True: 1.23k, False: 0]
  |  Branch (860:30): [True: 0, False: 1.23k]
  ------------------
  861|      0|        return 0;
  862|       |
  863|  1.23k|    if (p.maxsize != NULL && !OSSL_PARAM_set_size_t(p.maxsize, v->ctext_bytes))
  ------------------
  |  Branch (863:9): [True: 1.23k, False: 0]
  |  Branch (863:30): [True: 0, False: 1.23k]
  ------------------
  864|      0|        return 0;
  865|       |
  866|  1.23k|    if (p.seccat != NULL && !OSSL_PARAM_set_int(p.seccat, v->security_category))
  ------------------
  |  Branch (866:9): [True: 1.23k, False: 0]
  |  Branch (866:29): [True: 0, False: 1.23k]
  ------------------
  867|      0|        return 0;
  868|       |
  869|  1.23k|    if (p.pubkey != NULL && ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|      0|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (869:9): [True: 0, False: 1.23k]
  ------------------
  870|       |        /* Exported to EVP_PKEY_get_raw_public_key() */
  871|      0|        if (!ml_kem_get_key_param(key, p.pubkey, v->pubkey_bytes,
  ------------------
  |  Branch (871:13): [True: 0, False: 0]
  ------------------
  872|      0|                &ossl_ml_kem_encode_public_key))
  873|      0|            return 0;
  874|      0|    }
  875|       |
  876|  1.23k|    if (p.encpubkey != NULL && ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|      0|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  |  |  ------------------
  |  |  |  Branch (207:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (876:9): [True: 0, False: 1.23k]
  ------------------
  877|       |        /* Needed by EVP_PKEY_get1_encoded_public_key() */
  878|      0|        if (!ml_kem_get_key_param(key, p.encpubkey, v->pubkey_bytes,
  ------------------
  |  Branch (878:13): [True: 0, False: 0]
  ------------------
  879|      0|                &ossl_ml_kem_encode_public_key))
  880|      0|            return 0;
  881|      0|    }
  882|       |
  883|  1.23k|    if (p.privkey != NULL && ossl_ml_kem_have_prvkey(key)) {
  ------------------
  |  |  208|      0|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (883:9): [True: 0, False: 1.23k]
  ------------------
  884|       |        /* Exported to EVP_PKEY_get_raw_private_key() */
  885|      0|        if (!ml_kem_get_key_param(key, p.privkey, v->prvkey_bytes,
  ------------------
  |  Branch (885:13): [True: 0, False: 0]
  ------------------
  886|      0|                &ossl_ml_kem_encode_private_key))
  887|      0|            return 0;
  888|      0|    }
  889|       |
  890|  1.23k|    if (p.seed != NULL && ossl_ml_kem_have_seed(key)) {
  ------------------
  |  |  209|      0|#define ossl_ml_kem_have_seed(key) ((key)->d != NULL)
  |  |  ------------------
  |  |  |  Branch (209:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (890:9): [True: 0, False: 1.23k]
  ------------------
  891|       |        /* Exported for import */
  892|      0|        if (!ml_kem_get_key_param(key, p.seed, ML_KEM_SEED_BYTES,
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (892:13): [True: 0, False: 0]
  ------------------
  893|      0|                &ossl_ml_kem_encode_seed))
  894|      0|            return 0;
  895|      0|    }
  896|       |
  897|  1.23k|#ifndef OPENSSL_NO_CMS
  898|  1.23k|    if (p.ri_type != NULL && !OSSL_PARAM_set_int(p.ri_type, CMS_RECIPINFO_KEM))
  ------------------
  |  |  175|      0|#define CMS_RECIPINFO_KEM 5
  ------------------
  |  Branch (898:9): [True: 0, False: 1.23k]
  |  Branch (898:30): [True: 0, False: 0]
  ------------------
  899|      0|        return 0;
  900|       |
  901|  1.23k|    if (p.kemri_kdf_alg != NULL) {
  ------------------
  |  Branch (901:9): [True: 0, False: 1.23k]
  ------------------
  902|      0|        uint8_t aid_buf[OSSL_MAX_ALGORITHM_ID_SIZE];
  903|      0|        int ret;
  904|      0|        size_t aid_len = 0;
  905|      0|        WPACKET pkt;
  906|      0|        uint8_t *aid = NULL;
  907|       |
  908|      0|        ret = WPACKET_init_der(&pkt, aid_buf, sizeof(aid_buf));
  909|      0|        ret &= ossl_DER_w_begin_sequence(&pkt, -1)
  ------------------
  |  Branch (909:16): [True: 0, False: 0]
  ------------------
  910|      0|            && ossl_DER_w_precompiled(&pkt, -1, ossl_der_oid_id_alg_hkdf_with_sha256,
  ------------------
  |  Branch (910:16): [True: 0, False: 0]
  ------------------
  911|      0|                sizeof(ossl_der_oid_id_alg_hkdf_with_sha256))
  912|      0|            && ossl_DER_w_end_sequence(&pkt, -1);
  ------------------
  |  Branch (912:16): [True: 0, False: 0]
  ------------------
  913|      0|        if (ret && WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (913:13): [True: 0, False: 0]
  |  Branch (913:20): [True: 0, False: 0]
  ------------------
  914|      0|            WPACKET_get_total_written(&pkt, &aid_len);
  915|      0|            aid = WPACKET_get_curr(&pkt);
  916|      0|        }
  917|      0|        WPACKET_cleanup(&pkt);
  918|      0|        if (!ret)
  ------------------
  |  Branch (918:13): [True: 0, False: 0]
  ------------------
  919|      0|            return 0;
  920|      0|        if (aid != NULL && aid_len != 0 && !OSSL_PARAM_set_octet_string(p.kemri_kdf_alg, aid, aid_len))
  ------------------
  |  Branch (920:13): [True: 0, False: 0]
  |  Branch (920:28): [True: 0, False: 0]
  |  Branch (920:44): [True: 0, False: 0]
  ------------------
  921|      0|            return 0;
  922|      0|    }
  923|  1.23k|#endif
  924|       |
  925|  1.23k|    return 1;
  926|  1.23k|}
ml_kem_kmgmt.c:ml_kem_get_params_decoder:
  600|  1.23k|{
  601|  1.23k|    const char *s;
  602|       |
  603|  1.23k|    memset(r, 0, sizeof(*r));
  604|  1.23k|    if (p != NULL)
  ------------------
  |  Branch (604:9): [True: 1.23k, False: 0]
  ------------------
  605|  6.17k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (605:16): [True: 4.94k, False: 1.23k]
  ------------------
  606|  4.94k|            switch(s[0]) {
  607|      0|            default:
  ------------------
  |  Branch (607:13): [True: 0, False: 4.94k]
  ------------------
  608|      0|                break;
  609|  1.23k|            case 'b':
  ------------------
  |  Branch (609:13): [True: 1.23k, False: 3.70k]
  ------------------
  610|  1.23k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  611|       |                    /* OSSL_PKEY_PARAM_BITS */
  612|  1.23k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  613|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  614|      0|                                       "param %s is repeated", s);
  615|      0|                        return 0;
  616|      0|                    }
  617|  1.23k|                    r->bits = (OSSL_PARAM *)p;
  618|  1.23k|                }
  619|  1.23k|                break;
  620|  1.23k|            case 'e':
  ------------------
  |  Branch (620:13): [True: 0, False: 4.94k]
  ------------------
  621|      0|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  622|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  623|      0|                    if (ossl_unlikely(r->encpubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  624|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  625|      0|                                       "param %s is repeated", s);
  626|      0|                        return 0;
  627|      0|                    }
  628|      0|                    r->encpubkey = (OSSL_PARAM *)p;
  629|      0|                }
  630|      0|                break;
  631|      0|            case 'k':
  ------------------
  |  Branch (631:13): [True: 0, False: 4.94k]
  ------------------
  632|      0|                if (ossl_likely(strcmp("emri-kdf-alg", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  633|       |                    /* OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM */
  634|      0|                    if (ossl_unlikely(r->kemri_kdf_alg != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  635|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  636|      0|                                       "param %s is repeated", s);
  637|      0|                        return 0;
  638|      0|                    }
  639|      0|                    r->kemri_kdf_alg = (OSSL_PARAM *)p;
  640|      0|                }
  641|      0|                break;
  642|  1.23k|            case 'm':
  ------------------
  |  Branch (642:13): [True: 1.23k, False: 3.70k]
  ------------------
  643|  1.23k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  644|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  645|  1.23k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  646|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  647|      0|                                       "param %s is repeated", s);
  648|      0|                        return 0;
  649|      0|                    }
  650|  1.23k|                    r->maxsize = (OSSL_PARAM *)p;
  651|  1.23k|                }
  652|  1.23k|                break;
  653|  1.23k|            case 'p':
  ------------------
  |  Branch (653:13): [True: 0, False: 4.94k]
  ------------------
  654|      0|                switch(s[1]) {
  655|      0|                default:
  ------------------
  |  Branch (655:17): [True: 0, False: 0]
  ------------------
  656|      0|                    break;
  657|      0|                case 'r':
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  ------------------
  658|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  659|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  660|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  661|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  662|      0|                                           "param %s is repeated", s);
  663|      0|                            return 0;
  664|      0|                        }
  665|      0|                        r->privkey = (OSSL_PARAM *)p;
  666|      0|                    }
  667|      0|                    break;
  668|      0|                case 'u':
  ------------------
  |  Branch (668:17): [True: 0, False: 0]
  ------------------
  669|      0|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  670|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  671|      0|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  672|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  673|      0|                                           "param %s is repeated", s);
  674|      0|                            return 0;
  675|      0|                        }
  676|      0|                        r->pubkey = (OSSL_PARAM *)p;
  677|      0|                    }
  678|      0|                }
  679|      0|                break;
  680|      0|            case 'r':
  ------------------
  |  Branch (680:13): [True: 0, False: 4.94k]
  ------------------
  681|      0|                if (ossl_likely(strcmp("i-type", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  682|       |                    /* OSSL_PKEY_PARAM_CMS_RI_TYPE */
  683|      0|                    if (ossl_unlikely(r->ri_type != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  684|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  685|      0|                                       "param %s is repeated", s);
  686|      0|                        return 0;
  687|      0|                    }
  688|      0|                    r->ri_type = (OSSL_PARAM *)p;
  689|      0|                }
  690|      0|                break;
  691|  2.47k|            case 's':
  ------------------
  |  Branch (691:13): [True: 2.47k, False: 2.47k]
  ------------------
  692|  2.47k|                switch(s[1]) {
  693|      0|                default:
  ------------------
  |  Branch (693:17): [True: 0, False: 2.47k]
  ------------------
  694|      0|                    break;
  695|  2.47k|                case 'e':
  ------------------
  |  Branch (695:17): [True: 2.47k, False: 0]
  ------------------
  696|  2.47k|                    switch(s[2]) {
  697|      0|                    default:
  ------------------
  |  Branch (697:21): [True: 0, False: 2.47k]
  ------------------
  698|      0|                        break;
  699|  2.47k|                    case 'c':
  ------------------
  |  Branch (699:21): [True: 2.47k, False: 0]
  ------------------
  700|  2.47k|                        switch(s[3]) {
  701|      0|                        default:
  ------------------
  |  Branch (701:25): [True: 0, False: 2.47k]
  ------------------
  702|      0|                            break;
  703|  2.47k|                        case 'u':
  ------------------
  |  Branch (703:25): [True: 2.47k, False: 0]
  ------------------
  704|  2.47k|                            switch(s[4]) {
  705|      0|                            default:
  ------------------
  |  Branch (705:29): [True: 0, False: 2.47k]
  ------------------
  706|      0|                                break;
  707|  2.47k|                            case 'r':
  ------------------
  |  Branch (707:29): [True: 2.47k, False: 0]
  ------------------
  708|  2.47k|                                switch(s[5]) {
  709|      0|                                default:
  ------------------
  |  Branch (709:33): [True: 0, False: 2.47k]
  ------------------
  710|      0|                                    break;
  711|  2.47k|                                case 'i':
  ------------------
  |  Branch (711:33): [True: 2.47k, False: 0]
  ------------------
  712|  2.47k|                                    switch(s[6]) {
  713|      0|                                    default:
  ------------------
  |  Branch (713:37): [True: 0, False: 2.47k]
  ------------------
  714|      0|                                        break;
  715|  2.47k|                                    case 't':
  ------------------
  |  Branch (715:37): [True: 2.47k, False: 0]
  ------------------
  716|  2.47k|                                        switch(s[7]) {
  717|      0|                                        default:
  ------------------
  |  Branch (717:41): [True: 0, False: 2.47k]
  ------------------
  718|      0|                                            break;
  719|  2.47k|                                        case 'y':
  ------------------
  |  Branch (719:41): [True: 2.47k, False: 0]
  ------------------
  720|  2.47k|                                            switch(s[8]) {
  721|      0|                                            default:
  ------------------
  |  Branch (721:45): [True: 0, False: 2.47k]
  ------------------
  722|      0|                                                break;
  723|  2.47k|                                            case '-':
  ------------------
  |  Branch (723:45): [True: 2.47k, False: 0]
  ------------------
  724|  2.47k|                                                switch(s[9]) {
  725|      0|                                                default:
  ------------------
  |  Branch (725:49): [True: 0, False: 2.47k]
  ------------------
  726|      0|                                                    break;
  727|  1.23k|                                                case 'b':
  ------------------
  |  Branch (727:49): [True: 1.23k, False: 1.23k]
  ------------------
  728|  1.23k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  729|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  730|  1.23k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  731|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  732|      0|                                                                           "param %s is repeated", s);
  733|      0|                                                            return 0;
  734|      0|                                                        }
  735|  1.23k|                                                        r->secbits = (OSSL_PARAM *)p;
  736|  1.23k|                                                    }
  737|  1.23k|                                                    break;
  738|  1.23k|                                                case 'c':
  ------------------
  |  Branch (738:49): [True: 1.23k, False: 1.23k]
  ------------------
  739|  1.23k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  740|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  741|  1.23k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  742|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  743|      0|                                                                           "param %s is repeated", s);
  744|      0|                                                            return 0;
  745|      0|                                                        }
  746|  1.23k|                                                        r->seccat = (OSSL_PARAM *)p;
  747|  1.23k|                                                    }
  748|  2.47k|                                                }
  749|  2.47k|                                            }
  750|  2.47k|                                        }
  751|  2.47k|                                    }
  752|  2.47k|                                }
  753|  2.47k|                            }
  754|  2.47k|                        }
  755|  2.47k|                        break;
  756|  2.47k|                    case 'e':
  ------------------
  |  Branch (756:21): [True: 0, False: 2.47k]
  ------------------
  757|      0|                        if (ossl_likely(strcmp("d", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  758|       |                            /* OSSL_PKEY_PARAM_ML_KEM_SEED */
  759|      0|                            if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  760|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  761|      0|                                               "param %s is repeated", s);
  762|      0|                                return 0;
  763|      0|                            }
  764|      0|                            r->seed = (OSSL_PARAM *)p;
  765|      0|                        }
  766|  2.47k|                    }
  767|  2.47k|                }
  768|  4.94k|            }
  769|  1.23k|    return 1;
  770|  1.23k|}
ml_kem_kmgmt.c:ml_kem_gen_init:
 1096|  1.23k|{
 1097|  1.23k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
 1098|       |
 1099|       |    /*
 1100|       |     * We can only generate private keys, check that the selection is
 1101|       |     * appropriate.
 1102|       |     */
 1103|  1.23k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (1103:9): [True: 0, False: 1.23k]
  ------------------
 1104|  1.23k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (1104:12): [True: 0, False: 1.23k]
  ------------------
 1105|  1.23k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  108|  1.23k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1105:12): [True: 0, False: 1.23k]
  ------------------
 1106|      0|        return NULL;
 1107|       |
 1108|  1.23k|    gctx->selection = selection;
 1109|  1.23k|    gctx->evp_type = evp_type;
 1110|  1.23k|    gctx->provctx = provctx;
 1111|  1.23k|    if (ml_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (1111:9): [True: 1.23k, False: 0]
  ------------------
 1112|  1.23k|        return gctx;
 1113|       |
 1114|      0|    ml_kem_gen_cleanup(gctx);
 1115|       |    return NULL;
 1116|  1.23k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params:
 1062|  2.47k|{
 1063|  2.47k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1064|  2.47k|    struct ml_kem_gen_set_params_st p;
 1065|       |
 1066|  2.47k|    if (gctx == NULL || !ml_kem_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (1066:9): [True: 0, False: 2.47k]
  |  Branch (1066:25): [True: 0, False: 2.47k]
  ------------------
 1067|      0|        return 0;
 1068|       |
 1069|  2.47k|    if (p.propq != NULL) {
  ------------------
  |  Branch (1069:9): [True: 0, False: 2.47k]
  ------------------
 1070|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1070:13): [True: 0, False: 0]
  ------------------
 1071|      0|            return 0;
 1072|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1073|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1073:13): [True: 0, False: 0]
  ------------------
 1074|      0|            return 0;
 1075|      0|    }
 1076|       |
 1077|  2.47k|    if (p.seed != NULL) {
  ------------------
  |  Branch (1077:9): [True: 0, False: 2.47k]
  ------------------
 1078|      0|        size_t len = ML_KEM_SEED_BYTES;
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
 1079|       |
 1080|      0|        gctx->seed = gctx->seedbuf;
 1081|      0|        if (OSSL_PARAM_get_octet_string(p.seed, (void **)&gctx->seed, len, &len)
  ------------------
  |  Branch (1081:13): [True: 0, False: 0]
  ------------------
 1082|      0|            && len == ML_KEM_SEED_BYTES)
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (1082:16): [True: 0, False: 0]
  ------------------
 1083|      0|            return 1;
 1084|       |
 1085|       |        /* Possibly, but less likely wrong data type */
 1086|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_SEED_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1087|      0|        gctx->seed = NULL;
 1088|      0|        return 0;
 1089|      0|    }
 1090|       |
 1091|  2.47k|    return 1;
 1092|  2.47k|}
ml_kem_kmgmt.c:ml_kem_gen_set_params_decoder:
 1024|  2.47k|{
 1025|  2.47k|    const char *s;
 1026|       |
 1027|  2.47k|    memset(r, 0, sizeof(*r));
 1028|  2.47k|    if (p != NULL)
  ------------------
  |  Branch (1028:9): [True: 1.23k, False: 1.23k]
  ------------------
 1029|  1.23k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (1029:16): [True: 0, False: 1.23k]
  ------------------
 1030|      0|            switch(s[0]) {
 1031|      0|            default:
  ------------------
  |  Branch (1031:13): [True: 0, False: 0]
  ------------------
 1032|      0|                break;
 1033|      0|            case 'p':
  ------------------
  |  Branch (1033:13): [True: 0, False: 0]
  ------------------
 1034|      0|                if (ossl_likely(strcmp("roperties", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1035|       |                    /* OSSL_PKEY_PARAM_PROPERTIES */
 1036|      0|                    if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1037|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1038|      0|                                       "param %s is repeated", s);
 1039|      0|                        return 0;
 1040|      0|                    }
 1041|      0|                    r->propq = (OSSL_PARAM *)p;
 1042|      0|                }
 1043|      0|                break;
 1044|      0|            case 's':
  ------------------
  |  Branch (1044:13): [True: 0, False: 0]
  ------------------
 1045|      0|                if (ossl_likely(strcmp("eed", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1046|       |                    /* OSSL_PKEY_PARAM_ML_DSA_SEED */
 1047|      0|                    if (ossl_unlikely(r->seed != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1048|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1049|      0|                                       "param %s is repeated", s);
 1050|      0|                        return 0;
 1051|      0|                    }
 1052|      0|                    r->seed = (OSSL_PARAM *)p;
 1053|      0|                }
 1054|      0|            }
 1055|  2.47k|    return 1;
 1056|  2.47k|}
ml_kem_kmgmt.c:ml_kem_gen:
 1125|  1.23k|{
 1126|  1.23k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1127|  1.23k|    ML_KEM_KEY *key;
 1128|  1.23k|    uint8_t *nopub = NULL;
 1129|  1.23k|    uint8_t *seed;
 1130|  1.23k|    int genok = 0;
 1131|       |
 1132|  1.23k|    if (gctx == NULL
  ------------------
  |  Branch (1132:9): [True: 0, False: 1.23k]
  ------------------
 1133|  1.23k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (1133:12): [True: 0, False: 1.23k]
  ------------------
 1134|      0|        return NULL;
 1135|  1.23k|    seed = gctx->seed;
 1136|  1.23k|    key = ossl_prov_ml_kem_new(gctx->provctx, gctx->propq, gctx->evp_type);
 1137|  1.23k|    if (key == NULL)
  ------------------
  |  Branch (1137:9): [True: 0, False: 1.23k]
  ------------------
 1138|      0|        return NULL;
 1139|       |
 1140|  1.23k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (1140:9): [True: 0, False: 1.23k]
  ------------------
 1141|      0|        return key;
 1142|       |
 1143|  1.23k|    if (seed != NULL && !ossl_ml_kem_set_seed(seed, ML_KEM_SEED_BYTES, key))
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  |  Branch (1143:9): [True: 0, False: 1.23k]
  |  Branch (1143:25): [True: 0, False: 0]
  ------------------
 1144|      0|        return NULL;
 1145|  1.23k|    genok = ossl_ml_kem_genkey(nopub, 0, key);
 1146|       |
 1147|       |    /* Erase the single-use seed */
 1148|  1.23k|    if (seed != NULL)
  ------------------
  |  Branch (1148:9): [True: 0, False: 1.23k]
  ------------------
 1149|      0|        OPENSSL_cleanse(seed, ML_KEM_SEED_BYTES);
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
 1150|  1.23k|    gctx->seed = NULL;
 1151|       |
 1152|  1.23k|    if (genok) {
  ------------------
  |  Branch (1152:9): [True: 1.23k, False: 0]
  ------------------
 1153|       |#ifdef FIPS_MODULE
 1154|       |        if (!ml_kem_pairwise_test(key, ML_KEM_KEY_FIXED_PCT)) {
 1155|       |            ossl_set_error_state(OSSL_SELF_TEST_TYPE_PCT);
 1156|       |            ossl_ml_kem_key_free(key);
 1157|       |            return NULL;
 1158|       |        }
 1159|       |#endif /* FIPS_MODULE */
 1160|  1.23k|        return key;
 1161|  1.23k|    }
 1162|       |
 1163|      0|    ossl_ml_kem_key_free(key);
 1164|       |    return NULL;
 1165|  1.23k|}
ml_kem_kmgmt.c:ml_kem_gen_cleanup:
 1168|  1.23k|{
 1169|  1.23k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1170|       |
 1171|  1.23k|    if (gctx == NULL)
  ------------------
  |  Branch (1171:9): [True: 0, False: 1.23k]
  ------------------
 1172|      0|        return;
 1173|       |
 1174|  1.23k|    if (gctx->seed != NULL)
  ------------------
  |  Branch (1174:9): [True: 0, False: 1.23k]
  ------------------
 1175|      0|        OPENSSL_cleanse(gctx->seed, ML_KEM_SEED_BYTES);
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
 1176|  1.23k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1177|  1.23k|    OPENSSL_free(gctx);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1178|  1.23k|}
ml_kem_kmgmt.c:ml_kem_export:
  243|  1.23k|{
  244|  1.23k|    ML_KEM_KEY *key = vkey;
  245|  1.23k|    OSSL_PARAM_BLD *tmpl = NULL;
  246|  1.23k|    OSSL_PARAM *params = NULL;
  247|  1.23k|    const ML_KEM_VINFO *v;
  248|  1.23k|    uint8_t *pubenc = NULL, *prvenc = NULL, *seedenc = NULL;
  249|  1.23k|    size_t prvlen = 0, seedlen = 0;
  250|  1.23k|    int ret = 0;
  251|       |
  252|  1.23k|    if (!ossl_prov_is_running() || key == NULL)
  ------------------
  |  Branch (252:9): [True: 0, False: 1.23k]
  |  Branch (252:36): [True: 0, False: 1.23k]
  ------------------
  253|      0|        return 0;
  254|       |
  255|  1.23k|    if ((selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (255:9): [True: 0, False: 1.23k]
  ------------------
  256|      0|        return 0;
  257|       |
  258|  1.23k|    v = ossl_ml_kem_key_vinfo(key);
  ------------------
  |  |  206|  1.23k|#define ossl_ml_kem_key_vinfo(key) ((key)->vinfo)
  ------------------
  259|  1.23k|    if (!ossl_ml_kem_have_pubkey(key)) {
  ------------------
  |  |  207|  1.23k|#define ossl_ml_kem_have_pubkey(key) ((key)->t != NULL)
  ------------------
  |  Branch (259:9): [True: 0, False: 1.23k]
  ------------------
  260|       |        /* Fail when no key material can be returned */
  261|      0|        if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) == 0
  ------------------
  |  |  640|      0|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            || !ossl_ml_kem_decoded_key(key)) {
  ------------------
  |  |  211|      0|#define ossl_ml_kem_decoded_key(key) ((key)->encoded_dk != NULL \
  |  |  ------------------
  |  |  |  Branch (211:39): [True: 0, False: 0]
  |  |  ------------------
  |  |  212|      0|    || ((key)->s == NULL && (key)->d != NULL))
  |  |  ------------------
  |  |  |  Branch (212:9): [True: 0, False: 0]
  |  |  |  Branch (212:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  263|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_KEY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  264|      0|            return 0;
  265|      0|        }
  266|  1.23k|    } else if ((selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY) != 0) {
  ------------------
  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (266:16): [True: 1.23k, False: 0]
  ------------------
  267|  1.23k|        pubenc = OPENSSL_malloc(v->pubkey_bytes);
  ------------------
  |  |  106|  1.23k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  268|  1.23k|        if (pubenc == NULL
  ------------------
  |  Branch (268:13): [True: 0, False: 1.23k]
  ------------------
  269|  1.23k|            || !ossl_ml_kem_encode_public_key(pubenc, v->pubkey_bytes, key))
  ------------------
  |  Branch (269:16): [True: 0, False: 1.23k]
  ------------------
  270|      0|            goto err;
  271|  1.23k|    }
  272|       |
  273|  1.23k|    if ((selection & OSSL_KEYMGMT_SELECT_PRIVATE_KEY) != 0) {
  ------------------
  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (273:9): [True: 0, False: 1.23k]
  ------------------
  274|       |        /*
  275|       |         * The seed and/or private key material are allocated on the secure
  276|       |         * heap if configured, ossl_param_build_set_octet_string(), will then
  277|       |         * also use the secure heap.
  278|       |         */
  279|      0|        if (ossl_ml_kem_have_seed(key)) {
  ------------------
  |  |  209|      0|#define ossl_ml_kem_have_seed(key) ((key)->d != NULL)
  |  |  ------------------
  |  |  |  Branch (209:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  280|      0|            seedlen = ML_KEM_SEED_BYTES;
  ------------------
  |  |   48|      0|#define ML_KEM_SEED_BYTES (ML_KEM_RANDOM_BYTES * 2) /* Keygen (d, z) */
  |  |  ------------------
  |  |  |  |   47|      0|#define ML_KEM_RANDOM_BYTES 32 /* rho, sigma, ... */
  |  |  ------------------
  ------------------
  281|      0|            if ((seedenc = OPENSSL_secure_zalloc(seedlen)) == NULL
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (281:17): [True: 0, False: 0]
  ------------------
  282|      0|                || !ossl_ml_kem_encode_seed(seedenc, seedlen, key))
  ------------------
  |  Branch (282:20): [True: 0, False: 0]
  ------------------
  283|      0|                goto err;
  284|      0|        }
  285|      0|        if (ossl_ml_kem_have_prvkey(key)) {
  ------------------
  |  |  208|      0|#define ossl_ml_kem_have_prvkey(key) ((key)->s != NULL)
  |  |  ------------------
  |  |  |  Branch (208:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  286|      0|            prvlen = v->prvkey_bytes;
  287|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (287:17): [True: 0, False: 0]
  ------------------
  288|      0|                || !ossl_ml_kem_encode_private_key(prvenc, prvlen, key))
  ------------------
  |  Branch (288:20): [True: 0, False: 0]
  ------------------
  289|      0|                goto err;
  290|      0|        } else if (ossl_ml_kem_have_dkenc(key)) {
  ------------------
  |  |  210|      0|#define ossl_ml_kem_have_dkenc(key) ((key)->encoded_dk != NULL)
  |  |  ------------------
  |  |  |  Branch (210:37): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  291|      0|            prvlen = v->prvkey_bytes;
  292|      0|            if ((prvenc = OPENSSL_secure_zalloc(prvlen)) == NULL)
  ------------------
  |  |  141|      0|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (292:17): [True: 0, False: 0]
  ------------------
  293|      0|                goto err;
  294|      0|            memcpy(prvenc, key->encoded_dk, prvlen);
  295|      0|        }
  296|      0|    }
  297|       |
  298|  1.23k|    tmpl = OSSL_PARAM_BLD_new();
  299|  1.23k|    if (tmpl == NULL)
  ------------------
  |  Branch (299:9): [True: 0, False: 1.23k]
  ------------------
  300|      0|        goto err;
  301|       |
  302|       |    /* The (d, z) seed, when available and private keys are requested. */
  303|  1.23k|    if (seedenc != NULL
  ------------------
  |  Branch (303:9): [True: 0, False: 1.23k]
  ------------------
  304|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (304:12): [True: 0, False: 0]
  ------------------
  305|      0|            tmpl, params, OSSL_PKEY_PARAM_ML_KEM_SEED, seedenc, seedlen))
  ------------------
  |  |  437|      0|# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
  ------------------
  306|      0|        goto err;
  307|       |
  308|       |    /* The private key in the FIPS 203 |dk| format, when requested. */
  309|  1.23k|    if (prvenc != NULL
  ------------------
  |  Branch (309:9): [True: 0, False: 1.23k]
  ------------------
  310|      0|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (310:12): [True: 0, False: 0]
  ------------------
  311|      0|            tmpl, params, OSSL_PKEY_PARAM_PRIV_KEY, prvenc, prvlen))
  ------------------
  |  |  439|      0|# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
  ------------------
  312|      0|        goto err;
  313|       |
  314|       |    /* The public key on request; it is always available when either is */
  315|  1.23k|    if (pubenc != NULL
  ------------------
  |  Branch (315:9): [True: 1.23k, False: 0]
  ------------------
  316|  1.23k|        && !ossl_param_build_set_octet_string(
  ------------------
  |  Branch (316:12): [True: 0, False: 1.23k]
  ------------------
  317|  1.23k|            tmpl, params, OSSL_PKEY_PARAM_PUB_KEY, pubenc, v->pubkey_bytes))
  ------------------
  |  |  441|  1.23k|# define OSSL_PKEY_PARAM_PUB_KEY "pub"
  ------------------
  318|      0|        goto err;
  319|       |
  320|  1.23k|    params = OSSL_PARAM_BLD_to_param(tmpl);
  321|  1.23k|    if (params == NULL)
  ------------------
  |  Branch (321:9): [True: 0, False: 1.23k]
  ------------------
  322|      0|        goto err;
  323|       |
  324|  1.23k|    ret = param_cb(params, cbarg);
  325|  1.23k|    OSSL_PARAM_free(params);
  326|       |
  327|  1.23k|err:
  328|  1.23k|    OSSL_PARAM_BLD_free(tmpl);
  329|  1.23k|    OPENSSL_secure_clear_free(seedenc, seedlen);
  ------------------
  |  |  149|  1.23k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  330|  1.23k|    OPENSSL_secure_clear_free(prvenc, prvlen);
  ------------------
  |  |  149|  1.23k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  331|  1.23k|    OPENSSL_free(pubenc);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  332|  1.23k|    return ret;
  333|  1.23k|}
ml_kem_kmgmt.c:ml_kem_768_gen_init:
 1206|  1.23k|    {                                                                                     \
 1207|  1.23k|        return ml_kem_gen_init(provctx, selection, params,                                \
 1208|  1.23k|            EVP_PKEY_ML_KEM_##bits);                                                      \
  ------------------
  |  |  103|  1.23k|#define EVP_PKEY_ML_KEM_768 NID_ML_KEM_768
  |  |  ------------------
  |  |  |  | 6641|  1.23k|#define NID_ML_KEM_768          1455
  |  |  ------------------
  ------------------
 1209|  1.23k|    }                                                                                     \

mlx_kmgmt.c:mlx_kem_key_new:
   80|  1.23k|{
   81|  1.23k|    MLX_KEY *key = NULL;
   82|  1.23k|    unsigned int ml_kem_variant;
   83|       |
   84|  1.23k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (84:9): [True: 0, False: 1.23k]
  ------------------
   85|  1.23k|        || v >= OSSL_NELEM(hybrid_vtable)
  ------------------
  |  |   14|  2.47k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (85:12): [True: 0, False: 1.23k]
  ------------------
   86|  1.23k|        || (key = OPENSSL_malloc(sizeof(*key))) == NULL)
  ------------------
  |  |  106|  1.23k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (86:12): [True: 0, False: 1.23k]
  ------------------
   87|      0|        goto err;
   88|       |
   89|  1.23k|    ml_kem_variant = hybrid_vtable[v].ml_kem_variant;
   90|  1.23k|    key->libctx = libctx;
   91|  1.23k|    key->minfo = ossl_ml_kem_get_vinfo(ml_kem_variant);
   92|  1.23k|    key->xinfo = &hybrid_vtable[v];
   93|  1.23k|    key->xkey = key->mkey = NULL;
   94|  1.23k|    key->state = MLX_HAVE_NOKEYS;
  ------------------
  |  |   39|  1.23k|#define MLX_HAVE_NOKEYS 0
  ------------------
   95|  1.23k|    key->propq = propq;
   96|  1.23k|    return key;
   97|       |
   98|      0|err:
   99|      0|    OPENSSL_free(propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  100|       |    return NULL;
  101|  1.23k|}
mlx_kmgmt.c:mlx_kem_key_free:
   66|  1.23k|{
   67|  1.23k|    MLX_KEY *key = vkey;
   68|       |
   69|  1.23k|    if (key == NULL)
  ------------------
  |  Branch (69:9): [True: 0, False: 1.23k]
  ------------------
   70|      0|        return;
   71|  1.23k|    OPENSSL_free(key->propq);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  1.23k|    EVP_PKEY_free(key->mkey);
   73|  1.23k|    EVP_PKEY_free(key->xkey);
   74|  1.23k|    OPENSSL_free(key);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   75|  1.23k|}
mlx_kmgmt.c:mlx_kem_get_params:
  696|  3.70k|{
  697|  3.70k|    MLX_KEY *key = vkey;
  698|  3.70k|    OSSL_PARAM *pub, *prv = NULL;
  699|  3.70k|    EXPORT_CB_ARG sub_arg;
  700|  3.70k|    int selection;
  701|  3.70k|    struct mlx_get_params_st p;
  702|       |
  703|  3.70k|    if (key == NULL || !mlx_get_params_decoder(params, &p))
  ------------------
  |  Branch (703:9): [True: 0, False: 3.70k]
  |  Branch (703:24): [True: 0, False: 3.70k]
  ------------------
  704|      0|        return 0;
  705|       |
  706|       |    /* The reported "bit" count is those of the ML-KEM key */
  707|  3.70k|    if (p.bits != NULL)
  ------------------
  |  Branch (707:9): [True: 1.23k, False: 2.47k]
  ------------------
  708|  1.23k|        if (!OSSL_PARAM_set_int(p.bits, key->minfo->bits))
  ------------------
  |  Branch (708:13): [True: 0, False: 1.23k]
  ------------------
  709|      0|            return 0;
  710|       |
  711|       |    /* The reported security bits are those of the ML-KEM key */
  712|  3.70k|    if (p.secbits != NULL)
  ------------------
  |  Branch (712:9): [True: 1.23k, False: 2.47k]
  ------------------
  713|  1.23k|        if (!OSSL_PARAM_set_int(p.secbits, key->minfo->secbits))
  ------------------
  |  Branch (713:13): [True: 0, False: 1.23k]
  ------------------
  714|      0|            return 0;
  715|       |
  716|       |    /* The reported security category are those of the ML-KEM key */
  717|  3.70k|    if (p.seccat != NULL)
  ------------------
  |  Branch (717:9): [True: 1.23k, False: 2.47k]
  ------------------
  718|  1.23k|        if (!OSSL_PARAM_set_int(p.seccat, key->minfo->security_category))
  ------------------
  |  Branch (718:13): [True: 0, False: 1.23k]
  ------------------
  719|      0|            return 0;
  720|       |
  721|       |    /* The ciphertext sizes are additive */
  722|  3.70k|    if (p.maxsize != NULL)
  ------------------
  |  Branch (722:9): [True: 1.23k, False: 2.47k]
  ------------------
  723|  1.23k|        if (!OSSL_PARAM_set_size_t(p.maxsize, key->minfo->ctext_bytes + key->xinfo->pubkey_bytes))
  ------------------
  |  Branch (723:13): [True: 0, False: 1.23k]
  ------------------
  724|      0|            return 0;
  725|       |
  726|  3.70k|    if (!mlx_kem_have_pubkey(key))
  ------------------
  |  |   44|  3.70k|#define mlx_kem_have_pubkey(key) ((key)->state > 0)
  ------------------
  |  Branch (726:9): [True: 0, False: 3.70k]
  ------------------
  727|      0|        return 1;
  728|       |
  729|  3.70k|    memset(&sub_arg, 0, sizeof(sub_arg));
  730|  3.70k|    if ((pub = p.pub) != NULL) {
  ------------------
  |  Branch (730:9): [True: 2.47k, False: 1.23k]
  ------------------
  731|  2.47k|        size_t publen = key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes;
  732|       |
  733|  2.47k|        if (pub->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|  2.47k|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (733:13): [True: 0, False: 2.47k]
  ------------------
  734|      0|            return 0;
  735|  2.47k|        pub->return_size = publen;
  736|  2.47k|        if (pub->data == NULL) {
  ------------------
  |  Branch (736:13): [True: 1.23k, False: 1.23k]
  ------------------
  737|  1.23k|            pub = NULL;
  738|  1.23k|        } else if (pub->data_size < publen) {
  ------------------
  |  Branch (738:20): [True: 0, False: 1.23k]
  ------------------
  739|      0|            ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  127|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  740|      0|                "public key output buffer too short: %lu < %lu",
  741|      0|                (unsigned long)pub->data_size,
  742|      0|                (unsigned long)publen);
  743|      0|            return 0;
  744|  1.23k|        } else {
  745|  1.23k|            sub_arg.pubenc = pub->data;
  746|  1.23k|        }
  747|  2.47k|    }
  748|  3.70k|    if (mlx_kem_have_prvkey(key)) {
  ------------------
  |  |   45|  3.70k|#define mlx_kem_have_prvkey(key) ((key)->state > 1)
  |  |  ------------------
  |  |  |  Branch (45:34): [True: 3.70k, False: 0]
  |  |  ------------------
  ------------------
  749|  3.70k|        if ((prv = p.priv) != NULL) {
  ------------------
  |  Branch (749:13): [True: 0, False: 3.70k]
  ------------------
  750|      0|            size_t prvlen = key->minfo->prvkey_bytes + key->xinfo->prvkey_bytes;
  751|       |
  752|      0|            if (prv->data_type != OSSL_PARAM_OCTET_STRING)
  ------------------
  |  |  123|      0|#define OSSL_PARAM_OCTET_STRING 5
  ------------------
  |  Branch (752:17): [True: 0, False: 0]
  ------------------
  753|      0|                return 0;
  754|      0|            prv->return_size = prvlen;
  755|      0|            if (prv->data == NULL) {
  ------------------
  |  Branch (755:17): [True: 0, False: 0]
  ------------------
  756|      0|                prv = NULL;
  757|      0|            } else if (prv->data_size < prvlen) {
  ------------------
  |  Branch (757:24): [True: 0, False: 0]
  ------------------
  758|      0|                ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                              ERR_raise_data(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL,
  ------------------
  |  |  127|      0|#define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
  ------------------
  759|      0|                    "private key output buffer too short: %lu < %lu",
  760|      0|                    (unsigned long)prv->data_size,
  761|      0|                    (unsigned long)prvlen);
  762|      0|                return 0;
  763|      0|            } else {
  764|      0|                sub_arg.prvenc = prv->data;
  765|      0|            }
  766|      0|        }
  767|  3.70k|    }
  768|  3.70k|    if (pub == NULL && prv == NULL)
  ------------------
  |  Branch (768:9): [True: 2.47k, False: 1.23k]
  |  Branch (768:24): [True: 2.47k, False: 0]
  ------------------
  769|  2.47k|        return 1;
  770|       |
  771|  1.23k|    selection = prv == NULL ? 0 : OSSL_KEYMGMT_SELECT_PRIVATE_KEY;
  ------------------
  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  ------------------
  |  Branch (771:17): [True: 1.23k, False: 0]
  ------------------
  772|  1.23k|    selection |= pub == NULL ? 0 : OSSL_KEYMGMT_SELECT_PUBLIC_KEY;
  ------------------
  |  |  641|  2.47k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (772:18): [True: 0, False: 1.23k]
  ------------------
  773|  1.23k|    if (key->xinfo->group_name != NULL)
  ------------------
  |  Branch (773:9): [True: 0, False: 1.23k]
  ------------------
  774|      0|        selection |= OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS;
  ------------------
  |  |  642|      0|#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
  ------------------
  775|       |
  776|       |    /* Extract sub-component key material */
  777|  1.23k|    if (!export_sub(&sub_arg, selection, key))
  ------------------
  |  Branch (777:9): [True: 0, False: 1.23k]
  ------------------
  778|      0|        return 0;
  779|       |
  780|  1.23k|    if ((pub != NULL && sub_arg.pubcount != 2)
  ------------------
  |  Branch (780:10): [True: 1.23k, False: 0]
  |  Branch (780:25): [True: 0, False: 1.23k]
  ------------------
  781|  1.23k|        || (prv != NULL && sub_arg.prvcount != 2))
  ------------------
  |  Branch (781:13): [True: 0, False: 1.23k]
  |  Branch (781:28): [True: 0, False: 0]
  ------------------
  782|      0|        return 0;
  783|       |
  784|  1.23k|    return 1;
  785|  1.23k|}
mlx_kmgmt.c:mlx_get_params_decoder:
  561|  3.70k|{
  562|  3.70k|    const char *s;
  563|       |
  564|  3.70k|    memset(r, 0, sizeof(*r));
  565|  3.70k|    if (p != NULL)
  ------------------
  |  Branch (565:9): [True: 3.70k, False: 0]
  ------------------
  566|  11.1k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (566:16): [True: 7.41k, False: 3.70k]
  ------------------
  567|  7.41k|            switch(s[0]) {
  568|      0|            default:
  ------------------
  |  Branch (568:13): [True: 0, False: 7.41k]
  ------------------
  569|      0|                break;
  570|  1.23k|            case 'b':
  ------------------
  |  Branch (570:13): [True: 1.23k, False: 6.17k]
  ------------------
  571|  1.23k|                if (ossl_likely(strcmp("its", s + 1) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  572|       |                    /* OSSL_PKEY_PARAM_BITS */
  573|  1.23k|                    if (ossl_unlikely(r->bits != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  574|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  575|      0|                                       "param %s is repeated", s);
  576|      0|                        return 0;
  577|      0|                    }
  578|  1.23k|                    r->bits = (OSSL_PARAM *)p;
  579|  1.23k|                }
  580|  1.23k|                break;
  581|  2.47k|            case 'e':
  ------------------
  |  Branch (581:13): [True: 2.47k, False: 4.94k]
  ------------------
  582|  2.47k|                if (ossl_likely(strcmp("ncoded-pub-key", s + 1) == 0)) {
  ------------------
  |  |   22|  2.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.47k, False: 0]
  |  |  ------------------
  ------------------
  583|       |                    /* OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY */
  584|  2.47k|                    if (ossl_unlikely(r->pub != NULL)) {
  ------------------
  |  |   23|  2.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.47k]
  |  |  ------------------
  ------------------
  585|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  586|      0|                                       "param %s is repeated", s);
  587|      0|                        return 0;
  588|      0|                    }
  589|  2.47k|                    r->pub = (OSSL_PARAM *)p;
  590|  2.47k|                }
  591|  2.47k|                break;
  592|  2.47k|            case 'm':
  ------------------
  |  Branch (592:13): [True: 1.23k, False: 6.17k]
  ------------------
  593|  1.23k|                if (ossl_likely(strcmp("ax-size", s + 1) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  594|       |                    /* OSSL_PKEY_PARAM_MAX_SIZE */
  595|  1.23k|                    if (ossl_unlikely(r->maxsize != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  596|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  597|      0|                                       "param %s is repeated", s);
  598|      0|                        return 0;
  599|      0|                    }
  600|  1.23k|                    r->maxsize = (OSSL_PARAM *)p;
  601|  1.23k|                }
  602|  1.23k|                break;
  603|  1.23k|            case 'p':
  ------------------
  |  Branch (603:13): [True: 0, False: 7.41k]
  ------------------
  604|      0|                if (ossl_likely(strcmp("riv", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  605|       |                    /* OSSL_PKEY_PARAM_PRIV_KEY */
  606|      0|                    if (ossl_unlikely(r->priv != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  607|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  608|      0|                                       "param %s is repeated", s);
  609|      0|                        return 0;
  610|      0|                    }
  611|      0|                    r->priv = (OSSL_PARAM *)p;
  612|      0|                }
  613|      0|                break;
  614|  2.47k|            case 's':
  ------------------
  |  Branch (614:13): [True: 2.47k, False: 4.94k]
  ------------------
  615|  2.47k|                switch(s[1]) {
  616|      0|                default:
  ------------------
  |  Branch (616:17): [True: 0, False: 2.47k]
  ------------------
  617|      0|                    break;
  618|  2.47k|                case 'e':
  ------------------
  |  Branch (618:17): [True: 2.47k, False: 0]
  ------------------
  619|  2.47k|                    switch(s[2]) {
  620|      0|                    default:
  ------------------
  |  Branch (620:21): [True: 0, False: 2.47k]
  ------------------
  621|      0|                        break;
  622|  2.47k|                    case 'c':
  ------------------
  |  Branch (622:21): [True: 2.47k, False: 0]
  ------------------
  623|  2.47k|                        switch(s[3]) {
  624|      0|                        default:
  ------------------
  |  Branch (624:25): [True: 0, False: 2.47k]
  ------------------
  625|      0|                            break;
  626|  2.47k|                        case 'u':
  ------------------
  |  Branch (626:25): [True: 2.47k, False: 0]
  ------------------
  627|  2.47k|                            switch(s[4]) {
  628|      0|                            default:
  ------------------
  |  Branch (628:29): [True: 0, False: 2.47k]
  ------------------
  629|      0|                                break;
  630|  2.47k|                            case 'r':
  ------------------
  |  Branch (630:29): [True: 2.47k, False: 0]
  ------------------
  631|  2.47k|                                switch(s[5]) {
  632|      0|                                default:
  ------------------
  |  Branch (632:33): [True: 0, False: 2.47k]
  ------------------
  633|      0|                                    break;
  634|  2.47k|                                case 'i':
  ------------------
  |  Branch (634:33): [True: 2.47k, False: 0]
  ------------------
  635|  2.47k|                                    switch(s[6]) {
  636|      0|                                    default:
  ------------------
  |  Branch (636:37): [True: 0, False: 2.47k]
  ------------------
  637|      0|                                        break;
  638|  2.47k|                                    case 't':
  ------------------
  |  Branch (638:37): [True: 2.47k, False: 0]
  ------------------
  639|  2.47k|                                        switch(s[7]) {
  640|      0|                                        default:
  ------------------
  |  Branch (640:41): [True: 0, False: 2.47k]
  ------------------
  641|      0|                                            break;
  642|  2.47k|                                        case 'y':
  ------------------
  |  Branch (642:41): [True: 2.47k, False: 0]
  ------------------
  643|  2.47k|                                            switch(s[8]) {
  644|      0|                                            default:
  ------------------
  |  Branch (644:45): [True: 0, False: 2.47k]
  ------------------
  645|      0|                                                break;
  646|  2.47k|                                            case '-':
  ------------------
  |  Branch (646:45): [True: 2.47k, False: 0]
  ------------------
  647|  2.47k|                                                switch(s[9]) {
  648|      0|                                                default:
  ------------------
  |  Branch (648:49): [True: 0, False: 2.47k]
  ------------------
  649|      0|                                                    break;
  650|  1.23k|                                                case 'b':
  ------------------
  |  Branch (650:49): [True: 1.23k, False: 1.23k]
  ------------------
  651|  1.23k|                                                    if (ossl_likely(strcmp("its", s + 10) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  652|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_BITS */
  653|  1.23k|                                                        if (ossl_unlikely(r->secbits != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  654|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  655|      0|                                                                           "param %s is repeated", s);
  656|      0|                                                            return 0;
  657|      0|                                                        }
  658|  1.23k|                                                        r->secbits = (OSSL_PARAM *)p;
  659|  1.23k|                                                    }
  660|  1.23k|                                                    break;
  661|  1.23k|                                                case 'c':
  ------------------
  |  Branch (661:49): [True: 1.23k, False: 1.23k]
  ------------------
  662|  1.23k|                                                    if (ossl_likely(strcmp("ategory", s + 10) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.23k, False: 0]
  |  |  ------------------
  ------------------
  663|       |                                                        /* OSSL_PKEY_PARAM_SECURITY_CATEGORY */
  664|  1.23k|                                                        if (ossl_unlikely(r->seccat != NULL)) {
  ------------------
  |  |   23|  1.23k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  665|      0|                                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  666|      0|                                                                           "param %s is repeated", s);
  667|      0|                                                            return 0;
  668|      0|                                                        }
  669|  1.23k|                                                        r->seccat = (OSSL_PARAM *)p;
  670|  1.23k|                                                    }
  671|  2.47k|                                                }
  672|  2.47k|                                            }
  673|  2.47k|                                        }
  674|  2.47k|                                    }
  675|  2.47k|                                }
  676|  2.47k|                            }
  677|  2.47k|                        }
  678|  2.47k|                    }
  679|  2.47k|                }
  680|  7.41k|            }
  681|  3.70k|    return 1;
  682|  3.70k|}
mlx_kmgmt.c:export_sub:
  271|  1.23k|{
  272|  1.23k|    int slot;
  273|       |
  274|       |    /*
  275|       |     * The caller is responsible for initialising only the pubenc and prvenc
  276|       |     * pointer fields, the rest are set here or in the callback.
  277|       |     */
  278|  1.23k|    sub_arg->pubcount = 0;
  279|  1.23k|    sub_arg->prvcount = 0;
  280|       |
  281|  3.70k|    for (slot = 0; slot < 2; ++slot) {
  ------------------
  |  Branch (281:20): [True: 2.47k, False: 1.23k]
  ------------------
  282|  2.47k|        int ml_kem_slot = key->xinfo->ml_kem_slot;
  283|  2.47k|        EVP_PKEY *pkey;
  284|       |
  285|       |        /* Export the parts of each component into its storage slot */
  286|  2.47k|        if (slot == ml_kem_slot) {
  ------------------
  |  Branch (286:13): [True: 1.23k, False: 1.23k]
  ------------------
  287|  1.23k|            pkey = key->mkey;
  288|  1.23k|            sub_arg->algorithm_name = key->minfo->algorithm_name;
  289|  1.23k|            sub_arg->puboff = slot * key->xinfo->pubkey_bytes;
  290|  1.23k|            sub_arg->prvoff = slot * key->xinfo->prvkey_bytes;
  291|  1.23k|            sub_arg->publen = key->minfo->pubkey_bytes;
  292|  1.23k|            sub_arg->prvlen = key->minfo->prvkey_bytes;
  293|  1.23k|        } else {
  294|  1.23k|            pkey = key->xkey;
  295|  1.23k|            sub_arg->algorithm_name = key->xinfo->algorithm_name;
  296|  1.23k|            sub_arg->puboff = (1 - ml_kem_slot) * key->minfo->pubkey_bytes;
  297|  1.23k|            sub_arg->prvoff = (1 - ml_kem_slot) * key->minfo->prvkey_bytes;
  298|  1.23k|            sub_arg->publen = key->xinfo->pubkey_bytes;
  299|  1.23k|            sub_arg->prvlen = key->xinfo->prvkey_bytes;
  300|  1.23k|        }
  301|  2.47k|        if (!EVP_PKEY_export(pkey, selection, export_sub_cb, (void *)sub_arg))
  ------------------
  |  Branch (301:13): [True: 0, False: 2.47k]
  ------------------
  302|      0|            return 0;
  303|  2.47k|    }
  304|  1.23k|    return 1;
  305|  1.23k|}
mlx_kmgmt.c:export_sub_cb:
  225|  2.47k|{
  226|  2.47k|    EXPORT_CB_ARG *sub_arg = varg;
  227|  2.47k|    struct ml_kem_import_export_st p;
  228|  2.47k|    size_t len;
  229|       |
  230|  2.47k|    if (!ml_kem_import_export_decoder(params, &p))
  ------------------
  |  Branch (230:9): [True: 0, False: 2.47k]
  ------------------
  231|      0|        return 0;
  232|       |
  233|       |    /*
  234|       |     * The caller will decide whether anything essential is missing, but, if
  235|       |     * some key material was returned, it should have the right (parameter)
  236|       |     * data type and length.
  237|       |     */
  238|  2.47k|    if (sub_arg->pubenc != NULL && p.pubkey != NULL) {
  ------------------
  |  Branch (238:9): [True: 2.47k, False: 0]
  |  Branch (238:36): [True: 2.47k, False: 0]
  ------------------
  239|  2.47k|        void *pub = sub_arg->pubenc + sub_arg->puboff;
  240|       |
  241|  2.47k|        if (OSSL_PARAM_get_octet_string(p.pubkey, &pub, sub_arg->publen, &len) != 1)
  ------------------
  |  Branch (241:13): [True: 0, False: 2.47k]
  ------------------
  242|      0|            return 0;
  243|  2.47k|        if (len != sub_arg->publen) {
  ------------------
  |  Branch (243:13): [True: 0, False: 2.47k]
  ------------------
  244|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  245|      0|                "Unexpected %s public key length %lu != %lu",
  246|      0|                sub_arg->algorithm_name, (unsigned long)len,
  247|      0|                sub_arg->publen);
  248|      0|            return 0;
  249|      0|        }
  250|  2.47k|        ++sub_arg->pubcount;
  251|  2.47k|    }
  252|  2.47k|    if (sub_arg->prvenc != NULL && p.privkey != NULL) {
  ------------------
  |  Branch (252:9): [True: 0, False: 2.47k]
  |  Branch (252:36): [True: 0, False: 0]
  ------------------
  253|      0|        void *prv = sub_arg->prvenc + sub_arg->prvoff;
  254|       |
  255|      0|        if (OSSL_PARAM_get_octet_string(p.privkey, &prv, sub_arg->prvlen, &len) != 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 0]
  ------------------
  256|      0|            return 0;
  257|      0|        if (len != sub_arg->prvlen) {
  ------------------
  |  Branch (257:13): [True: 0, False: 0]
  ------------------
  258|      0|            ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                          ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|      0|                "Unexpected %s private key length %lu != %lu",
  260|      0|                sub_arg->algorithm_name, (unsigned long)len,
  261|      0|                (unsigned long)sub_arg->publen);
  262|      0|            return 0;
  263|      0|        }
  264|      0|        ++sub_arg->prvcount;
  265|      0|    }
  266|  2.47k|    return 1;
  267|  2.47k|}
mlx_kmgmt.c:ml_kem_import_export_decoder:
  169|  2.47k|{
  170|  2.47k|    const char *s;
  171|       |
  172|  2.47k|    memset(r, 0, sizeof(*r));
  173|  2.47k|    if (p != NULL)
  ------------------
  |  Branch (173:9): [True: 2.47k, False: 0]
  ------------------
  174|  4.94k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (174:16): [True: 2.47k, False: 2.47k]
  ------------------
  175|  2.47k|            switch(s[0]) {
  176|      0|            default:
  ------------------
  |  Branch (176:13): [True: 0, False: 2.47k]
  ------------------
  177|      0|                break;
  178|  2.47k|            case 'p':
  ------------------
  |  Branch (178:13): [True: 2.47k, False: 0]
  ------------------
  179|  2.47k|                switch(s[1]) {
  180|      0|                default:
  ------------------
  |  Branch (180:17): [True: 0, False: 2.47k]
  ------------------
  181|      0|                    break;
  182|      0|                case 'r':
  ------------------
  |  Branch (182:17): [True: 0, False: 2.47k]
  ------------------
  183|      0|                    if (ossl_likely(strcmp("iv", s + 2) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  184|       |                        /* OSSL_PKEY_PARAM_PRIV_KEY */
  185|      0|                        if (ossl_unlikely(r->privkey != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  186|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  187|      0|                                           "param %s is repeated", s);
  188|      0|                            return 0;
  189|      0|                        }
  190|      0|                        r->privkey = (OSSL_PARAM *)p;
  191|      0|                    }
  192|      0|                    break;
  193|  2.47k|                case 'u':
  ------------------
  |  Branch (193:17): [True: 2.47k, False: 0]
  ------------------
  194|  2.47k|                    if (ossl_likely(strcmp("b", s + 2) == 0)) {
  ------------------
  |  |   22|  2.47k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 2.47k, False: 0]
  |  |  ------------------
  ------------------
  195|       |                        /* OSSL_PKEY_PARAM_PUB_KEY */
  196|  2.47k|                        if (ossl_unlikely(r->pubkey != NULL)) {
  ------------------
  |  |   23|  2.47k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 2.47k]
  |  |  ------------------
  ------------------
  197|      0|                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                          ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  198|      0|                                           "param %s is repeated", s);
  199|      0|                            return 0;
  200|      0|                        }
  201|  2.47k|                        r->pubkey = (OSSL_PARAM *)p;
  202|  2.47k|                    }
  203|  2.47k|                }
  204|  2.47k|            }
  205|  2.47k|    return 1;
  206|  2.47k|}
mlx_kmgmt.c:mlx_kem_gen_init:
  947|  1.23k|{
  948|  1.23k|    PROV_ML_KEM_GEN_CTX *gctx = NULL;
  949|       |
  950|       |    /*
  951|       |     * We can only generate private keys, check that the selection is
  952|       |     * appropriate.
  953|       |     */
  954|  1.23k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (954:9): [True: 0, False: 1.23k]
  ------------------
  955|  1.23k|        || (selection & minimal_selection) == 0
  ------------------
  |  Branch (955:12): [True: 0, False: 1.23k]
  ------------------
  956|  1.23k|        || (gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
  ------------------
  |  |  108|  1.23k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (956:12): [True: 0, False: 1.23k]
  ------------------
  957|      0|        return NULL;
  958|       |
  959|  1.23k|    gctx->evp_type = evp_type;
  960|  1.23k|    gctx->libctx = libctx;
  961|  1.23k|    gctx->selection = selection;
  962|  1.23k|    if (mlx_kem_gen_set_params(gctx, params))
  ------------------
  |  Branch (962:9): [True: 1.23k, False: 0]
  ------------------
  963|  1.23k|        return gctx;
  964|       |
  965|      0|    mlx_kem_gen_cleanup(gctx);
  966|       |    return NULL;
  967|  1.23k|}
mlx_kmgmt.c:mlx_kem_gen_set_params:
  928|  2.47k|{
  929|  2.47k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  930|  2.47k|    struct mlx_gen_set_params_st p;
  931|       |
  932|  2.47k|    if (gctx == NULL || !mlx_gen_set_params_decoder(params, &p))
  ------------------
  |  Branch (932:9): [True: 0, False: 2.47k]
  |  Branch (932:25): [True: 0, False: 2.47k]
  ------------------
  933|      0|        return 0;
  934|       |
  935|  2.47k|    if (p.propq != NULL) {
  ------------------
  |  Branch (935:9): [True: 0, False: 2.47k]
  ------------------
  936|      0|        if (p.propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (936:13): [True: 0, False: 0]
  ------------------
  937|      0|            return 0;
  938|      0|        OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  939|      0|        if ((gctx->propq = OPENSSL_strdup(p.propq->data)) == NULL)
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (939:13): [True: 0, False: 0]
  ------------------
  940|      0|            return 0;
  941|      0|    }
  942|  2.47k|    return 1;
  943|  2.47k|}
mlx_kmgmt.c:mlx_gen_set_params_decoder:
  906|  2.47k|{
  907|  2.47k|    const char *s;
  908|       |
  909|  2.47k|    memset(r, 0, sizeof(*r));
  910|  2.47k|    if (p != NULL)
  ------------------
  |  Branch (910:9): [True: 1.23k, False: 1.23k]
  ------------------
  911|  2.47k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (911:16): [True: 1.23k, False: 1.23k]
  ------------------
  912|  1.23k|            if (ossl_likely(strcmp("properties", s + 0) == 0)) {
  ------------------
  |  |   22|  1.23k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 1.23k]
  |  |  ------------------
  ------------------
  913|       |                /* OSSL_PKEY_PARAM_PROPERTIES */
  914|      0|                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  915|      0|                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  916|      0|                                   "param %s is repeated", s);
  917|      0|                    return 0;
  918|      0|                }
  919|      0|                r->propq = (OSSL_PARAM *)p;
  920|      0|            }
  921|  2.47k|    return 1;
  922|  2.47k|}
mlx_kmgmt.c:mlx_kem_gen:
  976|  1.23k|{
  977|  1.23k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
  978|  1.23k|    MLX_KEY *key;
  979|  1.23k|    char *propq;
  980|       |
  981|  1.23k|    if (gctx == NULL
  ------------------
  |  Branch (981:9): [True: 0, False: 1.23k]
  ------------------
  982|  1.23k|        || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
                      || (gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  ------------------
  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  ------------------
  |  Branch (982:12): [True: 0, False: 1.23k]
  ------------------
  983|      0|        return NULL;
  984|       |
  985|       |    /* Lose ownership of propq */
  986|  1.23k|    propq = gctx->propq;
  987|  1.23k|    gctx->propq = NULL;
  988|  1.23k|    if ((key = mlx_kem_key_new(gctx->evp_type, gctx->libctx, propq)) == NULL)
  ------------------
  |  Branch (988:9): [True: 0, False: 1.23k]
  ------------------
  989|      0|        return NULL;
  990|       |
  991|  1.23k|    if ((gctx->selection & OSSL_KEYMGMT_SELECT_KEYPAIR) == 0)
  ------------------
  |  |  650|  1.23k|    (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  640|  1.23k|#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
  |  |  ------------------
  |  |                   (OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
  |  |  ------------------
  |  |  |  |  641|  1.23k|#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
  |  |  ------------------
  ------------------
  |  Branch (991:9): [True: 0, False: 1.23k]
  ------------------
  992|      0|        return key;
  993|       |
  994|       |    /* For now, using the same "propq" for all components */
  995|  1.23k|    key->mkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  996|  1.23k|        key->minfo->algorithm_name);
  997|  1.23k|    key->xkey = EVP_PKEY_Q_keygen(key->libctx, key->propq,
  998|  1.23k|        key->xinfo->algorithm_name,
  999|  1.23k|        key->xinfo->group_name);
 1000|  1.23k|    if (key->mkey != NULL && key->xkey != NULL) {
  ------------------
  |  Branch (1000:9): [True: 1.23k, False: 0]
  |  Branch (1000:30): [True: 1.23k, False: 0]
  ------------------
 1001|  1.23k|        key->state = MLX_HAVE_PRVKEY;
  ------------------
  |  |   41|  1.23k|#define MLX_HAVE_PRVKEY 2
  ------------------
 1002|  1.23k|        return key;
 1003|  1.23k|    }
 1004|       |
 1005|      0|    mlx_kem_key_free(key);
 1006|       |    return NULL;
 1007|  1.23k|}
mlx_kmgmt.c:mlx_kem_gen_cleanup:
 1010|  1.23k|{
 1011|  1.23k|    PROV_ML_KEM_GEN_CTX *gctx = vgctx;
 1012|       |
 1013|  1.23k|    if (gctx == NULL)
  ------------------
  |  Branch (1013:9): [True: 0, False: 1.23k]
  ------------------
 1014|      0|        return;
 1015|  1.23k|    OPENSSL_free(gctx->propq);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1016|  1.23k|    OPENSSL_free(gctx);
  ------------------
  |  |  131|  1.23k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1017|  1.23k|}

rsa_kmgmt.c:rsa_load:
  671|   138k|{
  672|   138k|    return common_load(reference, reference_sz, RSA_FLAG_TYPE_RSA);
  ------------------
  |  |  118|   138k|#define RSA_FLAG_TYPE_RSA 0x0000
  ------------------
  673|   138k|}
rsa_kmgmt.c:common_load:
  653|   138k|{
  654|   138k|    RSA *rsa = NULL;
  655|       |
  656|   138k|    if (ossl_prov_is_running() && reference_sz == sizeof(rsa)) {
  ------------------
  |  Branch (656:9): [True: 138k, False: 0]
  |  Branch (656:35): [True: 138k, False: 0]
  ------------------
  657|       |        /* The contents of the reference is the address to our object */
  658|   138k|        rsa = *(RSA **)reference;
  659|       |
  660|   138k|        if (RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK) != expected_rsa_type)
  ------------------
  |  |  117|   138k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  |  Branch (660:13): [True: 0, False: 138k]
  ------------------
  661|      0|            return NULL;
  662|       |
  663|       |        /* We grabbed, so we detach it */
  664|   138k|        *(RSA **)reference = NULL;
  665|   138k|        return rsa;
  666|   138k|    }
  667|      0|    return NULL;
  668|   138k|}
rsa_kmgmt.c:rsa_freedata:
  111|   138k|{
  112|   138k|    RSA_free(keydata);
  113|   138k|}
rsa_kmgmt.c:rsa_get_params:
  325|   138k|{
  326|   138k|    RSA *rsa = key;
  327|   138k|    const RSA_PSS_PARAMS_30 *pss_params = ossl_rsa_get0_pss_params_30(rsa);
  328|   138k|    int rsa_type = RSA_test_flags(rsa, RSA_FLAG_TYPE_MASK);
  ------------------
  |  |  117|   138k|#define RSA_FLAG_TYPE_MASK 0xF000
  ------------------
  329|   138k|    OSSL_PARAM *p;
  330|   138k|    int empty = RSA_get0_n(rsa) == NULL;
  331|       |
  332|   138k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_BITS)) != NULL
  ------------------
  |  |  366|   138k|# define OSSL_PKEY_PARAM_BITS "bits"
  ------------------
  |  Branch (332:9): [True: 138k, False: 0]
  ------------------
  333|   138k|        && (empty || !OSSL_PARAM_set_int(p, RSA_bits(rsa))))
  ------------------
  |  Branch (333:13): [True: 0, False: 138k]
  |  Branch (333:22): [True: 0, False: 138k]
  ------------------
  334|      0|        return 0;
  335|   138k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_BITS)) != NULL
  ------------------
  |  |  495|   138k|# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
  ------------------
  |  Branch (335:9): [True: 138k, False: 0]
  ------------------
  336|   138k|        && (empty || !OSSL_PARAM_set_int(p, RSA_security_bits(rsa))))
  ------------------
  |  Branch (336:13): [True: 0, False: 138k]
  |  Branch (336:22): [True: 0, False: 138k]
  ------------------
  337|      0|        return 0;
  338|   138k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_MAX_SIZE)) != NULL
  ------------------
  |  |  424|   138k|# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
  ------------------
  |  Branch (338:9): [True: 138k, False: 0]
  ------------------
  339|   138k|        && (empty || !OSSL_PARAM_set_int(p, RSA_size(rsa))))
  ------------------
  |  Branch (339:13): [True: 0, False: 138k]
  |  Branch (339:22): [True: 0, False: 138k]
  ------------------
  340|      0|        return 0;
  341|   138k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_SECURITY_CATEGORY)) != NULL)
  ------------------
  |  |  496|   138k|# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
  |  |  ------------------
  |  |  |  |  133|   138k|# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
  |  |  ------------------
  ------------------
  |  Branch (341:9): [True: 138k, False: 0]
  ------------------
  342|   138k|        if (!OSSL_PARAM_set_int(p, 0))
  ------------------
  |  Branch (342:13): [True: 0, False: 138k]
  ------------------
  343|      0|            return 0;
  344|       |
  345|       |    /*
  346|       |     * For restricted RSA-PSS keys, we ignore the default digest request.
  347|       |     * With RSA-OAEP keys, this may need to be amended.
  348|       |     */
  349|   138k|    if ((p = OSSL_PARAM_locate(params, OSSL_PKEY_PARAM_DEFAULT_DIGEST)) != NULL
  ------------------
  |  |  370|   138k|# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
  ------------------
  |  Branch (349:9): [True: 0, False: 138k]
  ------------------
  350|      0|        && (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|      0|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (350:13): [True: 0, False: 0]
  ------------------
  351|      0|            || ossl_rsa_pss_params_30_is_unrestricted(pss_params))) {
  ------------------
  |  Branch (351:16): [True: 0, False: 0]
  ------------------
  352|      0|        if (!OSSL_PARAM_set_utf8_string(p, RSA_DEFAULT_MD))
  ------------------
  |  |   55|      0|#define RSA_DEFAULT_MD "SHA256"
  ------------------
  |  Branch (352:13): [True: 0, False: 0]
  ------------------
  353|      0|            return 0;
  354|      0|    }
  355|       |
  356|       |    /*
  357|       |     * For non-RSA-PSS keys, we ignore the mandatory digest request.
  358|       |     * With RSA-OAEP keys, this may need to be amended.
  359|       |     */
  360|   138k|    if ((p = OSSL_PARAM_locate(params,
  ------------------
  |  Branch (360:9): [True: 0, False: 138k]
  ------------------
  361|   138k|             OSSL_PKEY_PARAM_MANDATORY_DIGEST))
  ------------------
  |  |  422|   138k|# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
  ------------------
  362|   138k|            != NULL
  363|      0|        && rsa_type == RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   138k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (363:12): [True: 0, False: 0]
  ------------------
  364|      0|        && !ossl_rsa_pss_params_30_is_unrestricted(pss_params)) {
  ------------------
  |  Branch (364:12): [True: 0, False: 0]
  ------------------
  365|      0|        const char *mdname = ossl_rsa_oaeppss_nid2name(ossl_rsa_pss_params_30_hashalg(pss_params));
  366|       |
  367|      0|        if (mdname == NULL || !OSSL_PARAM_set_utf8_string(p, mdname))
  ------------------
  |  Branch (367:13): [True: 0, False: 0]
  |  Branch (367:31): [True: 0, False: 0]
  ------------------
  368|      0|            return 0;
  369|      0|    }
  370|   138k|    return (rsa_type != RSA_FLAG_TYPE_RSASSAPSS
  ------------------
  |  |  119|   276k|#define RSA_FLAG_TYPE_RSASSAPSS 0x1000
  ------------------
  |  Branch (370:13): [True: 138k, False: 0]
  ------------------
  371|      0|               || ossl_rsa_pss_params_30_todata(pss_params, NULL, params))
  ------------------
  |  Branch (371:19): [True: 0, False: 0]
  ------------------
  372|   138k|        && ossl_rsa_todata(rsa, NULL, params, 1);
  ------------------
  |  Branch (372:12): [True: 138k, False: 0]
  ------------------
  373|   138k|}

ossl_drbg_lock:
   54|  65.0k|{
   55|  65.0k|    return 1;
   56|  65.0k|}
ossl_drbg_unlock:
   60|  65.0k|{
   61|  65.0k|}
ossl_drbg_get_seed:
  148|  2.00k|{
  149|  2.00k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  150|  2.00k|    size_t bytes_needed;
  151|  2.00k|    unsigned char *buffer;
  152|       |
  153|       |    /* Figure out how many bytes we need */
  154|  2.00k|    bytes_needed = entropy >= 0 ? (entropy + 7) / 8 : 0;
  ------------------
  |  Branch (154:20): [True: 2.00k, False: 0]
  ------------------
  155|  2.00k|    if (bytes_needed < min_len)
  ------------------
  |  Branch (155:9): [True: 0, False: 2.00k]
  ------------------
  156|      0|        bytes_needed = min_len;
  157|  2.00k|    if (bytes_needed > max_len)
  ------------------
  |  Branch (157:9): [True: 0, False: 2.00k]
  ------------------
  158|      0|        bytes_needed = max_len;
  159|       |
  160|       |    /* Allocate storage */
  161|  2.00k|    buffer = OPENSSL_secure_malloc(bytes_needed);
  ------------------
  |  |  139|  2.00k|    CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  162|  2.00k|    if (buffer == NULL)
  ------------------
  |  Branch (162:9): [True: 0, False: 2.00k]
  ------------------
  163|      0|        return 0;
  164|       |
  165|       |    /*
  166|       |     * Get random data.  Include our DRBG address as
  167|       |     * additional input, in order to provide a distinction between
  168|       |     * different DRBG child instances.
  169|       |     *
  170|       |     * Note: using the sizeof() operator on a pointer triggers
  171|       |     *       a warning in some static code analyzers, but it's
  172|       |     *       intentional and correct here.
  173|       |     */
  174|  2.00k|    if (!ossl_prov_drbg_generate(drbg, buffer, bytes_needed,
  ------------------
  |  Branch (174:9): [True: 0, False: 2.00k]
  ------------------
  175|  2.00k|            drbg->strength, prediction_resistance,
  176|  2.00k|            (unsigned char *)&drbg, sizeof(drbg))) {
  177|      0|        OPENSSL_secure_clear_free(buffer, bytes_needed);
  ------------------
  |  |  149|      0|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  178|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  179|      0|        return 0;
  180|      0|    }
  181|  2.00k|    *pout = buffer;
  182|  2.00k|    return bytes_needed;
  183|  2.00k|}
ossl_drbg_clear_seed:
  188|  2.00k|{
  189|  2.00k|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  149|  2.00k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  190|  2.00k|}
ossl_prov_drbg_nonce_ctx_new:
  272|    695|{
  273|    695|    PROV_DRBG_NONCE_GLOBAL *dngbl = OPENSSL_zalloc(sizeof(*dngbl));
  ------------------
  |  |  108|    695|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  274|       |
  275|    695|    if (dngbl == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 695]
  ------------------
  276|      0|        return NULL;
  277|       |
  278|    695|    dngbl->rand_nonce_lock = CRYPTO_THREAD_lock_new();
  279|    695|    if (dngbl->rand_nonce_lock == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 695]
  ------------------
  280|      0|        OPENSSL_free(dngbl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  281|      0|        return NULL;
  282|      0|    }
  283|       |
  284|    695|    return dngbl;
  285|    695|}
ossl_prov_drbg_nonce_ctx_free:
  288|    695|{
  289|    695|    PROV_DRBG_NONCE_GLOBAL *dngbl = vdngbl;
  290|       |
  291|    695|    if (dngbl == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 695]
  ------------------
  292|      0|        return;
  293|       |
  294|    695|    CRYPTO_THREAD_lock_free(dngbl->rand_nonce_lock);
  295|       |
  296|    695|    OPENSSL_free(dngbl);
  ------------------
  |  |  131|    695|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|    695|}
ossl_prov_drbg_instantiate:
  352|  1.50k|{
  353|  1.50k|    unsigned char *nonce = NULL, *entropy = NULL;
  354|  1.50k|    size_t noncelen = 0, entropylen = 0;
  355|  1.50k|    unsigned int min_entropy;
  356|  1.50k|    size_t min_entropylen, max_entropylen;
  357|       |
  358|  1.50k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (358:9): [True: 0, False: 1.50k]
  ------------------
  359|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  360|      0|        goto end;
  361|      0|    }
  362|  1.50k|    min_entropy = drbg->strength;
  363|  1.50k|    min_entropylen = drbg->min_entropylen;
  364|  1.50k|    max_entropylen = drbg->max_entropylen;
  365|       |
  366|  1.50k|    if (pers == NULL) {
  ------------------
  |  Branch (366:9): [True: 1.50k, False: 0]
  ------------------
  367|  1.50k|        pers = (const unsigned char *)ossl_pers_string;
  368|  1.50k|        perslen = sizeof(ossl_pers_string);
  369|  1.50k|    }
  370|  1.50k|    if (perslen > drbg->max_perslen) {
  ------------------
  |  Branch (370:9): [True: 0, False: 1.50k]
  ------------------
  371|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PERSONALISATION_STRING_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  372|      0|        goto end;
  373|      0|    }
  374|       |
  375|  1.50k|    if (drbg->state != EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1345|  1.50k|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (375:9): [True: 0, False: 1.50k]
  ------------------
  376|      0|        if (drbg->state == EVP_RAND_STATE_ERROR)
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  |  Branch (376:13): [True: 0, False: 0]
  ------------------
  377|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_IN_ERROR_STATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  378|      0|        else
  379|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_ALREADY_INSTANTIATED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  380|      0|        goto end;
  381|      0|    }
  382|       |
  383|  1.50k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|  1.50k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  384|       |
  385|  1.50k|    if (drbg->min_noncelen > 0) {
  ------------------
  |  Branch (385:9): [True: 1.50k, False: 0]
  ------------------
  386|  1.50k|        if (drbg->parent_nonce != NULL) {
  ------------------
  |  Branch (386:13): [True: 0, False: 1.50k]
  ------------------
  387|      0|            noncelen = drbg->parent_nonce(drbg->parent, NULL, drbg->strength,
  388|      0|                drbg->min_noncelen,
  389|      0|                drbg->max_noncelen);
  390|      0|            if (noncelen == 0) {
  ------------------
  |  Branch (390:17): [True: 0, False: 0]
  ------------------
  391|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  392|      0|                goto end;
  393|      0|            }
  394|      0|            nonce = OPENSSL_malloc(noncelen);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  395|      0|            if (nonce == NULL) {
  ------------------
  |  Branch (395:17): [True: 0, False: 0]
  ------------------
  396|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  397|      0|                goto end;
  398|      0|            }
  399|      0|            if (noncelen != drbg->parent_nonce(drbg->parent, nonce, drbg->strength, drbg->min_noncelen, drbg->max_noncelen)) {
  ------------------
  |  Branch (399:17): [True: 0, False: 0]
  ------------------
  400|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  401|      0|                goto end;
  402|      0|            }
  403|      0|#ifndef PROV_RAND_GET_RANDOM_NONCE
  404|  1.50k|        } else if (drbg->parent != NULL) {
  ------------------
  |  Branch (404:20): [True: 1.50k, False: 0]
  ------------------
  405|  1.50k|#endif
  406|       |            /*
  407|       |             * NIST SP800-90Ar1 section 9.1 says you can combine getting
  408|       |             * the entropy and nonce in 1 call by increasing the entropy
  409|       |             * with 50% and increasing the minimum length to accommodate
  410|       |             * the length of the nonce. We do this in case a nonce is
  411|       |             * required and there is no parental nonce capability.
  412|       |             */
  413|  1.50k|            min_entropy += drbg->strength / 2;
  414|  1.50k|            min_entropylen += drbg->min_noncelen;
  415|  1.50k|            max_entropylen += drbg->max_noncelen;
  416|  1.50k|        }
  417|      0|#ifndef PROV_RAND_GET_RANDOM_NONCE
  418|      0|        else { /* parent == NULL */
  419|      0|            noncelen = prov_drbg_get_nonce(drbg, &nonce, drbg->min_noncelen,
  420|      0|                drbg->max_noncelen);
  421|      0|            if (noncelen < drbg->min_noncelen
  ------------------
  |  Branch (421:17): [True: 0, False: 0]
  ------------------
  422|      0|                || noncelen > drbg->max_noncelen) {
  ------------------
  |  Branch (422:20): [True: 0, False: 0]
  ------------------
  423|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_NONCE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  424|      0|                goto end;
  425|      0|            }
  426|      0|        }
  427|  1.50k|#endif
  428|  1.50k|    }
  429|       |
  430|  1.50k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.50k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  431|  1.50k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (431:9): [True: 1.50k, False: 0]
  ------------------
  432|  1.50k|        drbg->reseed_next_counter++;
  433|  1.50k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (433:13): [True: 0, False: 1.50k]
  ------------------
  434|      0|            drbg->reseed_next_counter = 1;
  435|  1.50k|    }
  436|       |
  437|  1.50k|    entropylen = get_entropy(drbg, &entropy, min_entropy,
  438|  1.50k|        min_entropylen, max_entropylen,
  439|  1.50k|        prediction_resistance);
  440|  1.50k|    if (entropylen < min_entropylen
  ------------------
  |  Branch (440:9): [True: 0, False: 1.50k]
  ------------------
  441|  1.50k|        || entropylen > max_entropylen) {
  ------------------
  |  Branch (441:12): [True: 0, False: 1.50k]
  ------------------
  442|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  443|      0|        goto end;
  444|      0|    }
  445|       |
  446|  1.50k|    if (!drbg->instantiate(drbg, entropy, entropylen, nonce, noncelen,
  ------------------
  |  Branch (446:9): [True: 0, False: 1.50k]
  ------------------
  447|  1.50k|            pers, perslen)) {
  448|      0|        cleanup_entropy(drbg, entropy, entropylen);
  449|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_INSTANTIATING_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  450|      0|        goto end;
  451|      0|    }
  452|  1.50k|    cleanup_entropy(drbg, entropy, entropylen);
  453|       |
  454|  1.50k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|  1.50k|#define EVP_RAND_STATE_READY 1
  ------------------
  455|  1.50k|    drbg->generate_counter = 1;
  456|  1.50k|    drbg->reseed_time = time(NULL);
  457|  1.50k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.50k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  458|       |
  459|  1.50k|end:
  460|  1.50k|    if (nonce != NULL)
  ------------------
  |  Branch (460:9): [True: 0, False: 1.50k]
  ------------------
  461|      0|        ossl_prov_cleanup_nonce(drbg->provctx, nonce, noncelen);
  462|  1.50k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1346|  1.50k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (462:9): [True: 1.50k, False: 0]
  ------------------
  463|  1.50k|        return 1;
  464|      0|    return 0;
  465|  1.50k|}
ossl_prov_drbg_generate:
  625|  24.7k|{
  626|  24.7k|    int fork_id;
  627|  24.7k|    int reseed_required = 0;
  628|  24.7k|    int ret = 0;
  629|  24.7k|    time_t reseed_time_interval = drbg->reseed_time_interval;
  630|  24.7k|    time_t now = 0;
  631|       |
  632|  24.7k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (632:9): [True: 0, False: 24.7k]
  ------------------
  633|      0|        return 0;
  634|       |
  635|  24.7k|    fork_id = openssl_get_fork_id();
  636|       |
  637|  24.7k|    if (reseed_time_interval > 0)
  ------------------
  |  Branch (637:9): [True: 24.7k, False: 0]
  ------------------
  638|  24.7k|        now = time(NULL);
  639|       |
  640|  24.7k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (640:9): [True: 2.00k, False: 22.7k]
  |  Branch (640:31): [True: 0, False: 2.00k]
  ------------------
  641|      0|        return 0;
  642|       |
  643|  24.7k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1346|  24.7k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (643:9): [True: 0, False: 24.7k]
  ------------------
  644|       |        /* try to recover from previous errors */
  645|      0|        rand_drbg_restart(drbg);
  646|       |
  647|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  |  Branch (647:13): [True: 0, False: 0]
  ------------------
  648|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_IN_ERROR_STATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  649|      0|            goto err;
  650|      0|        }
  651|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1345|      0|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (651:13): [True: 0, False: 0]
  ------------------
  652|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_INSTANTIATED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  653|      0|            goto err;
  654|      0|        }
  655|      0|    }
  656|  24.7k|    if (strength > drbg->strength) {
  ------------------
  |  Branch (656:9): [True: 0, False: 24.7k]
  ------------------
  657|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_INSUFFICIENT_DRBG_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  658|      0|        goto err;
  659|      0|    }
  660|       |
  661|  24.7k|    if (outlen > drbg->max_request) {
  ------------------
  |  Branch (661:9): [True: 0, False: 24.7k]
  ------------------
  662|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_REQUEST_TOO_LARGE_FOR_DRBG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  663|      0|        goto err;
  664|      0|    }
  665|  24.7k|    if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (665:9): [True: 0, False: 24.7k]
  ------------------
  666|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ADDITIONAL_INPUT_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  667|      0|        goto err;
  668|      0|    }
  669|       |
  670|  24.7k|    if (drbg->fork_id != fork_id) {
  ------------------
  |  Branch (670:9): [True: 0, False: 24.7k]
  ------------------
  671|      0|        drbg->fork_id = fork_id;
  672|      0|        reseed_required = 1;
  673|      0|    }
  674|       |
  675|  24.7k|    if (drbg->reseed_interval > 0) {
  ------------------
  |  Branch (675:9): [True: 24.7k, False: 0]
  ------------------
  676|  24.7k|        if (drbg->generate_counter >= drbg->reseed_interval)
  ------------------
  |  Branch (676:13): [True: 0, False: 24.7k]
  ------------------
  677|      0|            reseed_required = 1;
  678|  24.7k|    }
  679|  24.7k|    if (reseed_time_interval > 0) {
  ------------------
  |  Branch (679:9): [True: 24.7k, False: 0]
  ------------------
  680|  24.7k|        if (now < drbg->reseed_time
  ------------------
  |  Branch (680:13): [True: 0, False: 24.7k]
  ------------------
  681|  24.7k|            || now - drbg->reseed_time >= reseed_time_interval)
  ------------------
  |  Branch (681:16): [True: 0, False: 24.7k]
  ------------------
  682|      0|            reseed_required = 1;
  683|  24.7k|    }
  684|  24.7k|    if (drbg->parent != NULL
  ------------------
  |  Branch (684:9): [True: 24.7k, False: 0]
  ------------------
  685|  24.7k|        && get_parent_reseed_count(drbg) != drbg->parent_reseed_counter)
  ------------------
  |  Branch (685:12): [True: 1.00k, False: 23.7k]
  ------------------
  686|  1.00k|        reseed_required = 1;
  687|       |
  688|  24.7k|    if (reseed_required || prediction_resistance) {
  ------------------
  |  Branch (688:9): [True: 1.00k, False: 23.7k]
  |  Branch (688:28): [True: 0, False: 23.7k]
  ------------------
  689|  1.00k|        if (!ossl_prov_drbg_reseed_unlocked(drbg, prediction_resistance, NULL,
  ------------------
  |  Branch (689:13): [True: 0, False: 1.00k]
  ------------------
  690|  1.00k|                0, adin, adinlen)) {
  691|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_RESEED_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  692|      0|            goto err;
  693|      0|        }
  694|  1.00k|        adin = NULL;
  695|  1.00k|        adinlen = 0;
  696|  1.00k|    }
  697|       |
  698|  24.7k|    if (!drbg->generate(drbg, out, outlen, adin, adinlen)) {
  ------------------
  |  Branch (698:9): [True: 0, False: 24.7k]
  ------------------
  699|      0|        drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  700|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_GENERATE_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  701|      0|        goto err;
  702|      0|    }
  703|       |
  704|  24.7k|    drbg->generate_counter++;
  705|       |
  706|  24.7k|    ret = 1;
  707|  24.7k|err:
  708|  24.7k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (708:9): [True: 2.00k, False: 22.7k]
  ------------------
  709|  2.00k|        CRYPTO_THREAD_unlock(drbg->lock);
  710|       |
  711|  24.7k|    return ret;
  712|  24.7k|}
ossl_drbg_enable_locking:
  759|    500|{
  760|    500|    PROV_DRBG *drbg = vctx;
  761|       |
  762|    500|    if (drbg != NULL && drbg->lock == NULL) {
  ------------------
  |  Branch (762:9): [True: 500, False: 0]
  |  Branch (762:25): [True: 500, False: 0]
  ------------------
  763|    500|        if (drbg->parent_enable_locking != NULL)
  ------------------
  |  Branch (763:13): [True: 500, False: 0]
  ------------------
  764|    500|            if (!drbg->parent_enable_locking(drbg->parent)) {
  ------------------
  |  Branch (764:17): [True: 0, False: 500]
  ------------------
  765|      0|                ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  766|      0|                return 0;
  767|      0|            }
  768|    500|        drbg->lock = CRYPTO_THREAD_lock_new();
  769|    500|        if (drbg->lock == NULL) {
  ------------------
  |  Branch (769:13): [True: 0, False: 500]
  ------------------
  770|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_CREATE_LOCK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  771|      0|            return 0;
  772|      0|        }
  773|    500|    }
  774|    500|    return 1;
  775|    500|}
ossl_rand_drbg_new:
  797|  1.50k|{
  798|  1.50k|    PROV_DRBG *drbg;
  799|  1.50k|    unsigned int p_str;
  800|  1.50k|    const OSSL_DISPATCH *pfunc;
  801|       |
  802|  1.50k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (802:9): [True: 0, False: 1.50k]
  ------------------
  803|      0|        return NULL;
  804|       |
  805|  1.50k|    drbg = OPENSSL_zalloc(sizeof(*drbg));
  ------------------
  |  |  108|  1.50k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  806|  1.50k|    if (drbg == NULL)
  ------------------
  |  Branch (806:9): [True: 0, False: 1.50k]
  ------------------
  807|      0|        return NULL;
  808|       |
  809|  1.50k|    drbg->provctx = provctx;
  810|  1.50k|    drbg->instantiate = instantiate;
  811|  1.50k|    drbg->uninstantiate = uninstantiate;
  812|  1.50k|    drbg->reseed = reseed;
  813|  1.50k|    drbg->generate = generate;
  814|  1.50k|    drbg->fork_id = openssl_get_fork_id();
  815|       |
  816|       |    /* Extract parent's functions */
  817|  1.50k|    drbg->parent = parent;
  818|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL)
  ------------------
  |  |  542|  1.50k|#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
  ------------------
  |  Branch (818:9): [True: 1.50k, False: 0]
  ------------------
  819|  1.50k|        drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc);
  820|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL)
  ------------------
  |  |  543|  1.50k|#define OSSL_FUNC_RAND_LOCK 9
  ------------------
  |  Branch (820:9): [True: 1.50k, False: 0]
  ------------------
  821|  1.50k|        drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc);
  822|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL)
  ------------------
  |  |  544|  1.50k|#define OSSL_FUNC_RAND_UNLOCK 10
  ------------------
  |  Branch (822:9): [True: 1.50k, False: 0]
  ------------------
  823|  1.50k|        drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc);
  824|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL)
  ------------------
  |  |  549|  1.50k|#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
  ------------------
  |  Branch (824:9): [True: 1.50k, False: 0]
  ------------------
  825|  1.50k|        drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc);
  826|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL)
  ------------------
  |  |  541|  1.50k|#define OSSL_FUNC_RAND_NONCE 7
  ------------------
  |  Branch (826:9): [True: 0, False: 1.50k]
  ------------------
  827|      0|        drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc);
  828|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_SEED)) != NULL)
  ------------------
  |  |  552|  1.50k|#define OSSL_FUNC_RAND_GET_SEED 18
  ------------------
  |  Branch (828:9): [True: 1.50k, False: 0]
  ------------------
  829|  1.50k|        drbg->parent_get_seed = OSSL_FUNC_rand_get_seed(pfunc);
  830|  1.50k|    if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_CLEAR_SEED)) != NULL)
  ------------------
  |  |  553|  1.50k|#define OSSL_FUNC_RAND_CLEAR_SEED 19
  ------------------
  |  Branch (830:9): [True: 1.50k, False: 0]
  ------------------
  831|  1.50k|        drbg->parent_clear_seed = OSSL_FUNC_rand_clear_seed(pfunc);
  832|       |
  833|       |    /* Set some default maximums up */
  834|  1.50k|    drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.50k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  835|  1.50k|    drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.50k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  836|  1.50k|    drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.50k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  837|  1.50k|    drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  1.50k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  838|  1.50k|    drbg->generate_counter = 1;
  839|  1.50k|    drbg->reseed_counter = 1;
  840|  1.50k|    drbg->reseed_interval = RESEED_INTERVAL;
  ------------------
  |  |   31|  1.50k|#define RESEED_INTERVAL (1 << 8)
  ------------------
  841|  1.50k|    drbg->reseed_time_interval = TIME_INTERVAL;
  ------------------
  |  |   32|  1.50k|#define TIME_INTERVAL (60 * 60) /* 1 hour */
  ------------------
  842|       |
  843|  1.50k|    if (!dnew(drbg))
  ------------------
  |  Branch (843:9): [True: 0, False: 1.50k]
  ------------------
  844|      0|        goto err;
  845|       |
  846|  1.50k|    if (parent != NULL) {
  ------------------
  |  Branch (846:9): [True: 1.50k, False: 0]
  ------------------
  847|  1.50k|        if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (847:13): [True: 0, False: 1.50k]
  ------------------
  848|      0|            goto err;
  849|  1.50k|        if (drbg->strength > p_str) {
  ------------------
  |  Branch (849:13): [True: 0, False: 1.50k]
  ------------------
  850|       |            /*
  851|       |             * We currently don't support the algorithm from NIST SP 800-90C
  852|       |             * 10.1.2 to use a weaker DRBG as source
  853|       |             */
  854|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_STRENGTH_TOO_WEAK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  855|      0|            goto err;
  856|      0|        }
  857|  1.50k|    }
  858|       |#ifdef TSAN_REQUIRES_LOCKING
  859|       |    if (!ossl_drbg_enable_locking(drbg))
  860|       |        goto err;
  861|       |#endif
  862|  1.50k|    return drbg;
  863|       |
  864|      0|err:
  865|      0|    dfree(drbg);
  866|       |    return NULL;
  867|  1.50k|}
ossl_rand_drbg_free:
  870|  1.50k|{
  871|  1.50k|    if (drbg == NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 1.50k]
  ------------------
  872|      0|        return;
  873|       |
  874|  1.50k|    CRYPTO_THREAD_lock_free(drbg->lock);
  875|  1.50k|    OPENSSL_free(drbg);
  ------------------
  |  |  131|  1.50k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  876|  1.50k|}
ossl_drbg_get_ctx_params:
  884|  12.9k|{
  885|  12.9k|    if (p->state != NULL && !OSSL_PARAM_set_int(p->state, drbg->state))
  ------------------
  |  Branch (885:9): [True: 9.99k, False: 3.00k]
  |  Branch (885:29): [True: 0, False: 9.99k]
  ------------------
  886|      0|        return 0;
  887|       |
  888|  12.9k|    if (p->str != NULL && !OSSL_PARAM_set_int(p->str, drbg->strength))
  ------------------
  |  Branch (888:9): [True: 3.00k, False: 9.99k]
  |  Branch (888:27): [True: 0, False: 3.00k]
  ------------------
  889|      0|        return 0;
  890|       |
  891|  12.9k|    if (p->minentlen != NULL
  ------------------
  |  Branch (891:9): [True: 0, False: 12.9k]
  ------------------
  892|      0|        && !OSSL_PARAM_set_size_t(p->minentlen, drbg->min_entropylen))
  ------------------
  |  Branch (892:12): [True: 0, False: 0]
  ------------------
  893|      0|        return 0;
  894|       |
  895|  12.9k|    if (p->maxentlen != NULL
  ------------------
  |  Branch (895:9): [True: 0, False: 12.9k]
  ------------------
  896|      0|        && !OSSL_PARAM_set_size_t(p->maxentlen, drbg->max_entropylen))
  ------------------
  |  Branch (896:12): [True: 0, False: 0]
  ------------------
  897|      0|        return 0;
  898|       |
  899|  12.9k|    if (p->minnonlen != NULL
  ------------------
  |  Branch (899:9): [True: 0, False: 12.9k]
  ------------------
  900|      0|        && !OSSL_PARAM_set_size_t(p->minnonlen, drbg->min_noncelen))
  ------------------
  |  Branch (900:12): [True: 0, False: 0]
  ------------------
  901|      0|        return 0;
  902|       |
  903|  12.9k|    if (p->maxnonlen != NULL
  ------------------
  |  Branch (903:9): [True: 0, False: 12.9k]
  ------------------
  904|      0|        && !OSSL_PARAM_set_size_t(p->maxnonlen, drbg->max_noncelen))
  ------------------
  |  Branch (904:12): [True: 0, False: 0]
  ------------------
  905|      0|        return 0;
  906|       |
  907|  12.9k|    if (p->maxperlen != NULL
  ------------------
  |  Branch (907:9): [True: 0, False: 12.9k]
  ------------------
  908|      0|        && !OSSL_PARAM_set_size_t(p->maxperlen, drbg->max_perslen))
  ------------------
  |  Branch (908:12): [True: 0, False: 0]
  ------------------
  909|      0|        return 0;
  910|       |
  911|  12.9k|    if (p->maxadlen != NULL
  ------------------
  |  Branch (911:9): [True: 0, False: 12.9k]
  ------------------
  912|      0|        && !OSSL_PARAM_set_size_t(p->maxadlen, drbg->max_adinlen))
  ------------------
  |  Branch (912:12): [True: 0, False: 0]
  ------------------
  913|      0|        return 0;
  914|       |
  915|  12.9k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (915:9): [True: 0, False: 12.9k]
  ------------------
  916|      0|        && !OSSL_PARAM_set_uint(p->reseed_req, drbg->reseed_interval))
  ------------------
  |  Branch (916:12): [True: 0, False: 0]
  ------------------
  917|      0|        return 0;
  918|       |
  919|  12.9k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (919:9): [True: 0, False: 12.9k]
  ------------------
  920|      0|        && !OSSL_PARAM_set_time_t(p->reseed_time, drbg->reseed_time))
  ------------------
  |  Branch (920:12): [True: 0, False: 0]
  ------------------
  921|      0|        return 0;
  922|       |
  923|  12.9k|    if (p->reseed_int != NULL
  ------------------
  |  Branch (923:9): [True: 0, False: 12.9k]
  ------------------
  924|      0|        && !OSSL_PARAM_set_time_t(p->reseed_int, drbg->reseed_time_interval))
  ------------------
  |  Branch (924:12): [True: 0, False: 0]
  ------------------
  925|      0|        return 0;
  926|       |
  927|  12.9k|    if (!OSSL_FIPS_IND_GET_CTX_FROM_PARAM(drbg, p->ind))
  ------------------
  |  |  161|  12.9k|#define OSSL_FIPS_IND_GET_CTX_FROM_PARAM(ctx, params) 1
  ------------------
  |  Branch (927:9): [Folded, False: 12.9k]
  ------------------
  928|      0|        return 0;
  929|       |
  930|  12.9k|    return 1;
  931|  12.9k|}
ossl_drbg_get_ctx_params_no_lock:
  940|  59.5k|{
  941|  59.5k|    size_t cnt = 0;
  942|       |
  943|       |    /* This value never changes once set */
  944|  59.5k|    if (p->maxreq != NULL) {
  ------------------
  |  Branch (944:9): [True: 22.7k, False: 36.7k]
  ------------------
  945|  22.7k|        if (!OSSL_PARAM_set_size_t(p->maxreq, drbg->max_request))
  ------------------
  |  Branch (945:13): [True: 0, False: 22.7k]
  ------------------
  946|      0|            return 0;
  947|  22.7k|        cnt++;
  948|  22.7k|    }
  949|       |
  950|       |    /*
  951|       |     * Can be changed by multiple threads, but we tolerate inaccuracies in this
  952|       |     * value.
  953|       |     */
  954|  59.5k|    if (p->reseed_cnt != NULL) {
  ------------------
  |  Branch (954:9): [True: 23.7k, False: 35.7k]
  ------------------
  955|  23.7k|        if (!OSSL_PARAM_set_uint(p->reseed_cnt, tsan_load(&drbg->reseed_counter)))
  ------------------
  |  |   61|  23.7k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  |  Branch (955:13): [True: 0, False: 23.7k]
  ------------------
  956|      0|            return 0;
  957|  23.7k|        cnt++;
  958|  23.7k|    }
  959|       |
  960|  59.5k|    if (params[cnt].key == NULL)
  ------------------
  |  Branch (960:9): [True: 46.5k, False: 12.9k]
  ------------------
  961|  46.5k|        *complete = 1;
  962|  12.9k|    else
  963|  12.9k|        *complete = 0;
  964|       |
  965|  59.5k|    return 1;
  966|  59.5k|}
ossl_drbg_set_ctx_params:
  970|  1.50k|{
  971|  1.50k|    if (p->reseed_req != NULL
  ------------------
  |  Branch (971:9): [True: 1.50k, False: 0]
  ------------------
  972|  1.50k|        && !OSSL_PARAM_get_uint(p->reseed_req, &drbg->reseed_interval))
  ------------------
  |  Branch (972:12): [True: 0, False: 1.50k]
  ------------------
  973|      0|        return 0;
  974|       |
  975|  1.50k|    if (p->reseed_time != NULL
  ------------------
  |  Branch (975:9): [True: 1.50k, False: 0]
  ------------------
  976|  1.50k|        && !OSSL_PARAM_get_time_t(p->reseed_time, &drbg->reseed_time_interval))
  ------------------
  |  Branch (976:12): [True: 0, False: 1.50k]
  ------------------
  977|      0|        return 0;
  978|       |
  979|  1.50k|    return 1;
  980|  1.50k|}
drbg.c:get_entropy:
  195|  2.50k|{
  196|  2.50k|    size_t bytes;
  197|  2.50k|    unsigned int p_str;
  198|       |
  199|  2.50k|    if (drbg->parent == NULL)
  ------------------
  |  Branch (199:9): [True: 0, False: 2.50k]
  ------------------
  200|       |        /*
  201|       |         * In normal use (i.e. OpenSSL's own uses), this is never called.
  202|       |         * This remains purely for legacy reasons.
  203|       |         */
  204|      0|        return ossl_prov_get_entropy(drbg->provctx, pout, entropy, min_len,
  205|      0|            max_len);
  206|       |
  207|  2.50k|    if (drbg->parent_get_seed == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 2.50k]
  ------------------
  208|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_CANNOT_SUPPLY_ENTROPY_SEED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  209|      0|        return 0;
  210|      0|    }
  211|  2.50k|    if (!get_parent_strength(drbg, &p_str))
  ------------------
  |  Branch (211:9): [True: 0, False: 2.50k]
  ------------------
  212|      0|        return 0;
  213|  2.50k|    if (drbg->strength > p_str) {
  ------------------
  |  Branch (213:9): [True: 0, False: 2.50k]
  ------------------
  214|       |        /*
  215|       |         * We currently don't support the algorithm from NIST SP 800-90C
  216|       |         * 10.1.2 to use a weaker DRBG as source
  217|       |         */
  218|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_STRENGTH_TOO_WEAK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  219|      0|        return 0;
  220|      0|    }
  221|       |
  222|       |    /*
  223|       |     * Our lock is already held, but we need to lock our parent before
  224|       |     * generating bits from it.  Note: taking the lock will be a no-op
  225|       |     * if locking is not required (while drbg->parent->lock == NULL).
  226|       |     */
  227|  2.50k|    if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (227:9): [True: 0, False: 2.50k]
  ------------------
  228|      0|        return 0;
  229|       |    /*
  230|       |     * Get random data from parent.  Include our DRBG address as
  231|       |     * additional input, in order to provide a distinction between
  232|       |     * different DRBG child instances.
  233|       |     *
  234|       |     * Note: using the sizeof() operator on a pointer triggers
  235|       |     *       a warning in some static code analyzers, but it's
  236|       |     *       intentional and correct here.
  237|       |     */
  238|  2.50k|    bytes = drbg->parent_get_seed(drbg->parent, pout,
  239|  2.50k|        entropy > 0 ? entropy : (int)drbg->strength,
  ------------------
  |  Branch (239:9): [True: 2.50k, False: 0]
  ------------------
  240|  2.50k|        min_len, max_len, prediction_resistance,
  241|  2.50k|        (unsigned char *)&drbg, sizeof(drbg));
  242|  2.50k|    ossl_drbg_unlock_parent(drbg);
  243|  2.50k|    return bytes;
  244|  2.50k|}
drbg.c:ossl_drbg_lock_parent:
   64|  34.7k|{
   65|  34.7k|    void *parent = drbg->parent;
   66|       |
   67|  34.7k|    if (parent != NULL
  ------------------
  |  Branch (67:9): [True: 34.7k, False: 0]
  ------------------
   68|  34.7k|        && drbg->parent_lock != NULL
  ------------------
  |  Branch (68:12): [True: 34.7k, False: 0]
  ------------------
   69|  34.7k|        && !drbg->parent_lock(parent)) {
  ------------------
  |  Branch (69:12): [True: 0, False: 34.7k]
  ------------------
   70|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_PARENT_LOCKING_NOT_ENABLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   71|      0|        return 0;
   72|      0|    }
   73|  34.7k|    return 1;
   74|  34.7k|}
drbg.c:ossl_drbg_unlock_parent:
   77|  34.7k|{
   78|  34.7k|    void *parent = drbg->parent;
   79|       |
   80|  34.7k|    if (parent != NULL && drbg->parent_unlock != NULL)
  ------------------
  |  Branch (80:9): [True: 34.7k, False: 0]
  |  Branch (80:27): [True: 34.7k, False: 0]
  ------------------
   81|  34.7k|        drbg->parent_unlock(parent);
   82|  34.7k|}
drbg.c:cleanup_entropy:
  247|  2.50k|{
  248|  2.50k|    if (drbg->parent == NULL) {
  ------------------
  |  Branch (248:9): [True: 0, False: 2.50k]
  ------------------
  249|      0|        ossl_prov_cleanup_entropy(drbg->provctx, out, outlen);
  250|  2.50k|    } else if (drbg->parent_clear_seed != NULL) {
  ------------------
  |  Branch (250:16): [True: 2.50k, False: 0]
  ------------------
  251|  2.50k|        if (!ossl_drbg_lock_parent(drbg))
  ------------------
  |  Branch (251:13): [True: 0, False: 2.50k]
  ------------------
  252|      0|            return;
  253|  2.50k|        drbg->parent_clear_seed(drbg->parent, out, outlen);
  254|  2.50k|        ossl_drbg_unlock_parent(drbg);
  255|  2.50k|    }
  256|  2.50k|}
drbg.c:ossl_prov_drbg_reseed_unlocked:
  486|  1.00k|{
  487|  1.00k|    unsigned char *entropy = NULL;
  488|  1.00k|    size_t entropylen = 0;
  489|       |
  490|  1.00k|    if (!ossl_prov_is_running())
  ------------------
  |  Branch (490:9): [True: 0, False: 1.00k]
  ------------------
  491|      0|        return 0;
  492|       |
  493|  1.00k|    if (drbg->state != EVP_RAND_STATE_READY) {
  ------------------
  |  | 1346|  1.00k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (493:9): [True: 0, False: 1.00k]
  ------------------
  494|       |        /* try to recover from previous errors */
  495|      0|        rand_drbg_restart(drbg);
  496|       |
  497|      0|        if (drbg->state == EVP_RAND_STATE_ERROR) {
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  |  Branch (497:13): [True: 0, False: 0]
  ------------------
  498|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_IN_ERROR_STATE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|            return 0;
  500|      0|        }
  501|      0|        if (drbg->state == EVP_RAND_STATE_UNINITIALISED) {
  ------------------
  |  | 1345|      0|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
  |  Branch (501:13): [True: 0, False: 0]
  ------------------
  502|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_NOT_INSTANTIATED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  503|      0|            return 0;
  504|      0|        }
  505|      0|    }
  506|       |
  507|  1.00k|    if (ent != NULL) {
  ------------------
  |  Branch (507:9): [True: 0, False: 1.00k]
  ------------------
  508|      0|        if (ent_len < drbg->min_entropylen) {
  ------------------
  |  Branch (508:13): [True: 0, False: 0]
  ------------------
  509|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ENTROPY_OUT_OF_RANGE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  511|      0|            return 0;
  512|      0|        }
  513|      0|        if (ent_len > drbg->max_entropylen) {
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            ERR_raise(ERR_LIB_RAND, RAND_R_ENTROPY_INPUT_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  515|      0|            drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|      0|#define EVP_RAND_STATE_ERROR 2
  ------------------
  516|      0|            return 0;
  517|      0|        }
  518|      0|    }
  519|       |
  520|  1.00k|    if (adin == NULL) {
  ------------------
  |  Branch (520:9): [True: 1.00k, False: 0]
  ------------------
  521|  1.00k|        adinlen = 0;
  522|  1.00k|    } else if (adinlen > drbg->max_adinlen) {
  ------------------
  |  Branch (522:16): [True: 0, False: 0]
  ------------------
  523|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ADDITIONAL_INPUT_TOO_LONG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  524|      0|        return 0;
  525|      0|    }
  526|       |
  527|  1.00k|    drbg->state = EVP_RAND_STATE_ERROR;
  ------------------
  |  | 1347|  1.00k|#define EVP_RAND_STATE_ERROR 2
  ------------------
  528|       |
  529|  1.00k|    drbg->reseed_next_counter = tsan_load(&drbg->reseed_counter);
  ------------------
  |  |   61|  1.00k|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  530|  1.00k|    if (drbg->reseed_next_counter) {
  ------------------
  |  Branch (530:9): [True: 1.00k, False: 0]
  ------------------
  531|  1.00k|        drbg->reseed_next_counter++;
  532|  1.00k|        if (!drbg->reseed_next_counter)
  ------------------
  |  Branch (532:13): [True: 0, False: 1.00k]
  ------------------
  533|      0|            drbg->reseed_next_counter = 1;
  534|  1.00k|    }
  535|       |
  536|  1.00k|    if (ent != NULL) {
  ------------------
  |  Branch (536:9): [True: 0, False: 1.00k]
  ------------------
  537|       |#ifdef FIPS_MODULE
  538|       |        /*
  539|       |         * NIST SP-800-90A mandates that entropy *shall not* be provided
  540|       |         * by the consuming application. Instead the data is added as additional
  541|       |         * input.
  542|       |         *
  543|       |         * (NIST SP-800-90Ar1, Sections 9.1 and 9.2)
  544|       |         */
  545|       |        if (!drbg->reseed(drbg, NULL, 0, ent, ent_len)) {
  546|       |            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_RESEED);
  547|       |            return 0;
  548|       |        }
  549|       |#else
  550|      0|        if (!drbg->reseed(drbg, ent, ent_len, adin, adinlen)) {
  ------------------
  |  Branch (550:13): [True: 0, False: 0]
  ------------------
  551|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_RESEED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  552|      0|            return 0;
  553|      0|        }
  554|       |        /* There isn't much point adding the same additional input twice */
  555|      0|        adin = NULL;
  556|      0|        adinlen = 0;
  557|      0|#endif
  558|      0|    }
  559|       |
  560|       |    /* Reseed using our sources in addition */
  561|  1.00k|    entropylen = get_entropy(drbg, &entropy, drbg->strength,
  562|  1.00k|        drbg->min_entropylen, drbg->max_entropylen,
  563|  1.00k|        prediction_resistance);
  564|  1.00k|    if (entropylen < drbg->min_entropylen
  ------------------
  |  Branch (564:9): [True: 0, False: 1.00k]
  ------------------
  565|  1.00k|        || entropylen > drbg->max_entropylen) {
  ------------------
  |  Branch (565:12): [True: 0, False: 1.00k]
  ------------------
  566|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_ERROR_RETRIEVING_ENTROPY);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  567|      0|        goto end;
  568|      0|    }
  569|       |
  570|  1.00k|    if (!drbg->reseed(drbg, entropy, entropylen, adin, adinlen))
  ------------------
  |  Branch (570:9): [True: 0, False: 1.00k]
  ------------------
  571|      0|        goto end;
  572|       |
  573|  1.00k|    drbg->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|  1.00k|#define EVP_RAND_STATE_READY 1
  ------------------
  574|  1.00k|    drbg->generate_counter = 1;
  575|  1.00k|    drbg->reseed_time = time(NULL);
  576|  1.00k|    tsan_store(&drbg->reseed_counter, drbg->reseed_next_counter);
  ------------------
  |  |   62|  1.00k|#define tsan_store(ptr, val) atomic_store_explicit((ptr), (val), memory_order_relaxed)
  ------------------
  577|  1.00k|    if (drbg->parent != NULL)
  ------------------
  |  Branch (577:9): [True: 1.00k, False: 0]
  ------------------
  578|  1.00k|        drbg->parent_reseed_counter = get_parent_reseed_count(drbg);
  579|       |
  580|  1.00k|end:
  581|  1.00k|    cleanup_entropy(drbg, entropy, entropylen);
  582|  1.00k|    if (drbg->state == EVP_RAND_STATE_READY)
  ------------------
  |  | 1346|  1.00k|#define EVP_RAND_STATE_READY 1
  ------------------
  |  Branch (582:9): [True: 1.00k, False: 0]
  ------------------
  583|  1.00k|        return 1;
  584|      0|    return 0;
  585|  1.00k|}
drbg.c:get_parent_reseed_count:
  110|  25.7k|{
  111|  25.7k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  25.7k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  25.7k|    { NULL, 0, NULL, 0, 0 }
  ------------------
  112|  25.7k|    void *parent = drbg->parent;
  113|  25.7k|    unsigned int r = 0;
  114|       |
  115|  25.7k|    *params = OSSL_PARAM_construct_uint(OSSL_DRBG_PARAM_RESEED_COUNTER, &r);
  ------------------
  |  |  250|  25.7k|# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
  ------------------
  116|  25.7k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (116:9): [True: 0, False: 25.7k]
  ------------------
  117|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  118|      0|        goto err;
  119|      0|    }
  120|  25.7k|    if (!drbg->parent_get_ctx_params(parent, params))
  ------------------
  |  Branch (120:9): [True: 0, False: 25.7k]
  ------------------
  121|      0|        r = 0;
  122|  25.7k|    ossl_drbg_unlock_parent(drbg);
  123|  25.7k|    return r;
  124|       |
  125|      0|err:
  126|      0|    r = tsan_load(&drbg->reseed_counter) - 2;
  ------------------
  |  |   61|      0|#define tsan_load(ptr) atomic_load_explicit((ptr), memory_order_relaxed)
  ------------------
  127|      0|    if (r == 0)
  ------------------
  |  Branch (127:9): [True: 0, False: 0]
  ------------------
  128|      0|        r = UINT_MAX;
  129|      0|    return r;
  130|  25.7k|}
drbg.c:find_call:
  748|  10.5k|{
  749|  10.5k|    if (dispatch != NULL)
  ------------------
  |  Branch (749:9): [True: 10.5k, False: 0]
  ------------------
  750|   123k|        while (dispatch->function_id != 0) {
  ------------------
  |  Branch (750:16): [True: 122k, False: 1.50k]
  ------------------
  751|   122k|            if (dispatch->function_id == function)
  ------------------
  |  Branch (751:17): [True: 9.00k, False: 113k]
  ------------------
  752|  9.00k|                return dispatch;
  753|   113k|            dispatch++;
  754|   113k|        }
  755|  1.50k|    return NULL;
  756|  10.5k|}
drbg.c:get_parent_strength:
   85|  4.00k|{
   86|  4.00k|    OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.00k|    { NULL, 0, NULL, 0, 0 }
  ------------------
                  OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
  ------------------
  |  |   25|  4.00k|    { NULL, 0, NULL, 0, 0 }
  ------------------
   87|  4.00k|    void *parent = drbg->parent;
   88|  4.00k|    int res;
   89|       |
   90|  4.00k|    if (drbg->parent_get_ctx_params == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 4.00k]
  ------------------
   91|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   92|      0|        return 0;
   93|      0|    }
   94|       |
   95|  4.00k|    *params = OSSL_PARAM_construct_uint(OSSL_RAND_PARAM_STRENGTH, str);
  ------------------
  |  |  542|  4.00k|# define OSSL_RAND_PARAM_STRENGTH "strength"
  ------------------
   96|  4.00k|    if (!ossl_drbg_lock_parent(drbg)) {
  ------------------
  |  Branch (96:9): [True: 0, False: 4.00k]
  ------------------
   97|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_LOCK_PARENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   98|      0|        return 0;
   99|      0|    }
  100|  4.00k|    res = drbg->parent_get_ctx_params(parent, params);
  101|  4.00k|    ossl_drbg_unlock_parent(drbg);
  102|  4.00k|    if (!res) {
  ------------------
  |  Branch (102:9): [True: 0, False: 4.00k]
  ------------------
  103|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_GET_PARENT_STRENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  104|      0|        return 0;
  105|      0|    }
  106|  4.00k|    return 1;
  107|  4.00k|}

drbg_ctr.c:drbg_ctr_new_wrapper:
  648|  1.50k|{
  649|  1.50k|    return ossl_rand_drbg_new(provctx, parent, parent_dispatch,
  650|  1.50k|        &drbg_ctr_new, &drbg_ctr_free,
  651|  1.50k|        &drbg_ctr_instantiate, &drbg_ctr_uninstantiate,
  652|  1.50k|        &drbg_ctr_reseed, &drbg_ctr_generate);
  653|  1.50k|}
drbg_ctr.c:drbg_ctr_new:
  633|  1.50k|{
  634|  1.50k|    PROV_DRBG_CTR *ctr;
  635|       |
  636|  1.50k|    ctr = OPENSSL_secure_zalloc(sizeof(*ctr));
  ------------------
  |  |  141|  1.50k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  637|  1.50k|    if (ctr == NULL)
  ------------------
  |  Branch (637:9): [True: 0, False: 1.50k]
  ------------------
  638|      0|        return 0;
  639|       |
  640|  1.50k|    ctr->use_df = 1;
  641|  1.50k|    drbg->data = ctr;
  642|  1.50k|    OSSL_FIPS_IND_INIT(drbg)
  643|  1.50k|    return drbg_ctr_init_lengths(drbg);
  644|  1.50k|}
drbg_ctr.c:drbg_ctr_init_lengths:
  539|  3.00k|{
  540|  3.00k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  541|  3.00k|    int res = 1;
  542|       |
  543|       |    /* Maximum number of bits per request = 2^19  = 2^16 bytes */
  544|  3.00k|    drbg->max_request = 1 << 16;
  545|  3.00k|    if (ctr->use_df) {
  ------------------
  |  Branch (545:9): [True: 3.00k, False: 0]
  ------------------
  546|  3.00k|        drbg->min_entropylen = 0;
  547|  3.00k|        drbg->max_entropylen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.00k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  548|  3.00k|        drbg->min_noncelen = 0;
  549|  3.00k|        drbg->max_noncelen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.00k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  550|  3.00k|        drbg->max_perslen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.00k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  551|  3.00k|        drbg->max_adinlen = DRBG_MAX_LENGTH;
  ------------------
  |  |   41|  3.00k|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  552|       |
  553|  3.00k|        if (ctr->keylen > 0) {
  ------------------
  |  Branch (553:13): [True: 1.50k, False: 1.50k]
  ------------------
  554|  1.50k|            drbg->min_entropylen = ctr->keylen;
  555|  1.50k|            drbg->min_noncelen = drbg->min_entropylen / 2;
  556|  1.50k|        }
  557|  3.00k|    } else {
  558|      0|        const size_t len = ctr->keylen > 0 ? drbg->seedlen : DRBG_MAX_LENGTH;
  ------------------
  |  |   41|      0|#define DRBG_MAX_LENGTH INT32_MAX
  ------------------
  |  Branch (558:28): [True: 0, False: 0]
  ------------------
  559|       |
  560|      0|        drbg->min_entropylen = len;
  561|      0|        drbg->max_entropylen = len;
  562|       |        /* Nonce not used */
  563|      0|        drbg->min_noncelen = 0;
  564|      0|        drbg->max_noncelen = 0;
  565|      0|        drbg->max_perslen = len;
  566|      0|        drbg->max_adinlen = len;
  567|      0|    }
  568|  3.00k|    return res;
  569|  3.00k|}
drbg_ctr.c:drbg_ctr_instantiate:
  322|  1.50k|{
  323|  1.50k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  324|       |
  325|  1.50k|    if (entropy == NULL)
  ------------------
  |  Branch (325:9): [True: 0, False: 1.50k]
  ------------------
  326|      0|        return 0;
  327|       |
  328|  1.50k|    memset(ctr->K, 0, sizeof(ctr->K));
  329|  1.50k|    memset(ctr->V, 0, sizeof(ctr->V));
  330|  1.50k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (330:9): [True: 0, False: 1.50k]
  ------------------
  331|      0|        return 0;
  332|       |
  333|  1.50k|    inc_128(ctr);
  334|  1.50k|    if (!ctr_update(drbg, entropy, entropylen, pers, perslen, nonce, noncelen))
  ------------------
  |  Branch (334:9): [True: 0, False: 1.50k]
  ------------------
  335|      0|        return 0;
  336|  1.50k|    return 1;
  337|  1.50k|}
drbg_ctr.c:inc_128:
   71|  87.8k|{
   72|  87.8k|    unsigned char *p = &ctr->V[0];
   73|  87.8k|    u32 n = 16, c = 1;
   74|       |
   75|  1.40M|    do {
   76|  1.40M|        --n;
   77|  1.40M|        c += p[n];
   78|  1.40M|        p[n] = (u8)c;
   79|  1.40M|        c >>= 8;
   80|  1.40M|    } while (n);
  ------------------
  |  Branch (80:14): [True: 1.31M, False: 87.8k]
  ------------------
   81|  87.8k|}
drbg_ctr.c:ctr_update:
  276|  29.2k|{
  277|  29.2k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  278|  29.2k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  29.2k|#define AES_BLOCK_SIZE 16
  ------------------
  279|  29.2k|    unsigned char V_tmp[48], out[48];
  280|  29.2k|    unsigned char len;
  281|       |
  282|       |    /* correct key is already set up. */
  283|  29.2k|    memcpy(V_tmp, ctr->V, 16);
  284|  29.2k|    inc_128(ctr);
  285|  29.2k|    memcpy(V_tmp + 16, ctr->V, 16);
  286|  29.2k|    if (ctr->keylen == 16) {
  ------------------
  |  Branch (286:9): [True: 0, False: 29.2k]
  ------------------
  287|      0|        len = 32;
  288|  29.2k|    } else {
  289|  29.2k|        inc_128(ctr);
  290|  29.2k|        memcpy(V_tmp + 32, ctr->V, 16);
  291|  29.2k|        len = 48;
  292|  29.2k|    }
  293|  29.2k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, out, &outlen, V_tmp, len)
  ------------------
  |  Branch (293:9): [True: 0, False: 29.2k]
  ------------------
  294|  29.2k|        || outlen != len)
  ------------------
  |  Branch (294:12): [True: 0, False: 29.2k]
  ------------------
  295|      0|        return 0;
  296|  29.2k|    memcpy(ctr->K, out, ctr->keylen);
  297|  29.2k|    memcpy(ctr->V, out + ctr->keylen, 16);
  298|       |
  299|  29.2k|    if (ctr->use_df) {
  ------------------
  |  Branch (299:9): [True: 29.2k, False: 0]
  ------------------
  300|       |        /* If no input reuse existing derived value */
  301|  29.2k|        if (in1 != NULL || nonce != NULL || in2 != NULL)
  ------------------
  |  Branch (301:13): [True: 4.50k, False: 24.7k]
  |  Branch (301:28): [True: 0, False: 24.7k]
  |  Branch (301:45): [True: 0, False: 24.7k]
  ------------------
  302|  4.50k|            if (!ctr_df(ctr, in1, in1len, nonce, noncelen, in2, in2len))
  ------------------
  |  Branch (302:17): [True: 0, False: 4.50k]
  ------------------
  303|      0|                return 0;
  304|       |        /* If this a reuse input in1len != 0 */
  305|  29.2k|        if (in1len)
  ------------------
  |  Branch (305:13): [True: 6.50k, False: 22.7k]
  ------------------
  306|  6.50k|            ctr_XOR(ctr, ctr->KX, drbg->seedlen);
  307|  29.2k|    } else {
  308|      0|        ctr_XOR(ctr, in1, in1len);
  309|      0|        ctr_XOR(ctr, in2, in2len);
  310|      0|    }
  311|       |
  312|  29.2k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->K, NULL, -1)
  ------------------
  |  Branch (312:9): [True: 0, False: 29.2k]
  ------------------
  313|  29.2k|        || !EVP_CipherInit_ex(ctr->ctx_ctr, NULL, NULL, ctr->K, NULL, -1))
  ------------------
  |  Branch (313:12): [True: 0, False: 29.2k]
  ------------------
  314|      0|        return 0;
  315|  29.2k|    return 1;
  316|  29.2k|}
drbg_ctr.c:ctr_df:
  213|  4.50k|{
  214|  4.50k|    static unsigned char c80 = 0x80;
  215|  4.50k|    size_t inlen;
  216|  4.50k|    unsigned char *p = ctr->bltmp;
  217|  4.50k|    int outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  218|       |
  219|  4.50k|    if (!ctr_BCC_init(ctr))
  ------------------
  |  Branch (219:9): [True: 0, False: 4.50k]
  ------------------
  220|      0|        return 0;
  221|  4.50k|    if (in1 == NULL)
  ------------------
  |  Branch (221:9): [True: 0, False: 4.50k]
  ------------------
  222|      0|        in1len = 0;
  223|  4.50k|    if (in2 == NULL)
  ------------------
  |  Branch (223:9): [True: 4.50k, False: 0]
  ------------------
  224|  4.50k|        in2len = 0;
  225|  4.50k|    if (in3 == NULL)
  ------------------
  |  Branch (225:9): [True: 3.00k, False: 1.50k]
  ------------------
  226|  3.00k|        in3len = 0;
  227|  4.50k|    inlen = in1len + in2len + in3len;
  228|       |    /* Initialise L||N in temporary block */
  229|  4.50k|    *p++ = (inlen >> 24) & 0xff;
  230|  4.50k|    *p++ = (inlen >> 16) & 0xff;
  231|  4.50k|    *p++ = (inlen >> 8) & 0xff;
  232|  4.50k|    *p++ = inlen & 0xff;
  233|       |
  234|       |    /* NB keylen is at most 32 bytes */
  235|  4.50k|    *p++ = 0;
  236|  4.50k|    *p++ = 0;
  237|  4.50k|    *p++ = 0;
  238|  4.50k|    *p = (unsigned char)((ctr->keylen + 16) & 0xff);
  239|  4.50k|    ctr->bltmp_pos = 8;
  240|  4.50k|    if (!ctr_BCC_update(ctr, in1, in1len)
  ------------------
  |  Branch (240:9): [True: 0, False: 4.50k]
  ------------------
  241|  4.50k|        || !ctr_BCC_update(ctr, in2, in2len)
  ------------------
  |  Branch (241:12): [True: 0, False: 4.50k]
  ------------------
  242|  4.50k|        || !ctr_BCC_update(ctr, in3, in3len)
  ------------------
  |  Branch (242:12): [True: 0, False: 4.50k]
  ------------------
  243|  4.50k|        || !ctr_BCC_update(ctr, &c80, 1)
  ------------------
  |  Branch (243:12): [True: 0, False: 4.50k]
  ------------------
  244|  4.50k|        || !ctr_BCC_final(ctr))
  ------------------
  |  Branch (244:12): [True: 0, False: 4.50k]
  ------------------
  245|      0|        return 0;
  246|       |    /* Set up key K */
  247|  4.50k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb, NULL, NULL, ctr->KX, NULL, -1))
  ------------------
  |  Branch (247:9): [True: 0, False: 4.50k]
  ------------------
  248|      0|        return 0;
  249|       |    /* X follows key K */
  250|  4.50k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX, &outlen, ctr->KX + ctr->keylen,
  ------------------
  |  Branch (250:9): [True: 0, False: 4.50k]
  ------------------
  251|  4.50k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  252|  4.50k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (252:12): [True: 0, False: 4.50k]
  ------------------
  253|      0|        return 0;
  254|  4.50k|    if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 16, &outlen, ctr->KX,
  ------------------
  |  Branch (254:9): [True: 0, False: 4.50k]
  ------------------
  255|  4.50k|            AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  256|  4.50k|        || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (256:12): [True: 0, False: 4.50k]
  ------------------
  257|      0|        return 0;
  258|  4.50k|    if (ctr->keylen != 16)
  ------------------
  |  Branch (258:9): [True: 4.50k, False: 0]
  ------------------
  259|  4.50k|        if (!EVP_CipherUpdate(ctr->ctx_ecb, ctr->KX + 32, &outlen,
  ------------------
  |  Branch (259:13): [True: 0, False: 4.50k]
  ------------------
  260|  4.50k|                ctr->KX + 16, AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  261|  4.50k|            || outlen != AES_BLOCK_SIZE)
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  |  Branch (261:16): [True: 0, False: 4.50k]
  ------------------
  262|      0|            return 0;
  263|  4.50k|    return 1;
  264|  4.50k|}
drbg_ctr.c:ctr_BCC_init:
  150|  4.50k|{
  151|  4.50k|    unsigned char bltmp[48] = { 0 };
  152|  4.50k|    unsigned char num_of_blk;
  153|       |
  154|  4.50k|    memset(ctr->KX, 0, 48);
  155|  4.50k|    num_of_blk = ctr->keylen == 16 ? 2 : 3;
  ------------------
  |  Branch (155:18): [True: 0, False: 4.50k]
  ------------------
  156|  4.50k|    bltmp[(AES_BLOCK_SIZE * 1) + 3] = 1;
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  157|  4.50k|    bltmp[(AES_BLOCK_SIZE * 2) + 3] = 2;
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  158|  4.50k|    return ctr_BCC_block(ctr, ctr->KX, bltmp, num_of_blk * AES_BLOCK_SIZE);
  ------------------
  |  |   26|  4.50k|#define AES_BLOCK_SIZE 16
  ------------------
  159|  4.50k|}
drbg_ctr.c:ctr_BCC_block:
  116|  20.5k|{
  117|  20.5k|    int i, outlen = AES_BLOCK_SIZE;
  ------------------
  |  |   26|  20.5k|#define AES_BLOCK_SIZE 16
  ------------------
  118|       |
  119|  1.00M|    for (i = 0; i < len; i++)
  ------------------
  |  Branch (119:17): [True: 984k, False: 20.5k]
  ------------------
  120|   984k|        out[i] ^= in[i];
  121|       |
  122|  20.5k|    if (!EVP_CipherUpdate(ctr->ctx_df, out, &outlen, out, len)
  ------------------
  |  Branch (122:9): [True: 0, False: 20.5k]
  ------------------
  123|  20.5k|        || outlen != len)
  ------------------
  |  Branch (123:12): [True: 0, False: 20.5k]
  ------------------
  124|      0|        return 0;
  125|  20.5k|    return 1;
  126|  20.5k|}
drbg_ctr.c:ctr_BCC_update:
  166|  18.0k|{
  167|  18.0k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (167:9): [True: 7.50k, False: 10.5k]
  |  Branch (167:23): [True: 0, False: 10.5k]
  ------------------
  168|  7.50k|        return 1;
  169|       |
  170|       |    /* If we have partial block handle it first */
  171|  10.5k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (171:9): [True: 8.50k, False: 2.00k]
  ------------------
  172|  8.50k|        size_t left = 16 - ctr->bltmp_pos;
  173|       |
  174|       |        /* If we now have a complete block process it */
  175|  8.50k|        if (inlen >= left) {
  ------------------
  |  Branch (175:13): [True: 6.00k, False: 2.50k]
  ------------------
  176|  6.00k|            memcpy(ctr->bltmp + ctr->bltmp_pos, in, left);
  177|  6.00k|            if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (177:17): [True: 0, False: 6.00k]
  ------------------
  178|      0|                return 0;
  179|  6.00k|            ctr->bltmp_pos = 0;
  180|  6.00k|            inlen -= left;
  181|  6.00k|            in += left;
  182|  6.00k|        }
  183|  8.50k|    }
  184|       |
  185|       |    /* Process zero or more complete blocks */
  186|  16.0k|    for (; inlen >= 16; in += 16, inlen -= 16) {
  ------------------
  |  Branch (186:12): [True: 5.50k, False: 10.5k]
  ------------------
  187|  5.50k|        if (!ctr_BCC_blocks(ctr, in))
  ------------------
  |  Branch (187:13): [True: 0, False: 5.50k]
  ------------------
  188|      0|            return 0;
  189|  5.50k|    }
  190|       |
  191|       |    /* Copy any remaining partial block to the temporary buffer */
  192|  10.5k|    if (inlen > 0) {
  ------------------
  |  Branch (192:9): [True: 8.50k, False: 2.00k]
  ------------------
  193|  8.50k|        memcpy(ctr->bltmp + ctr->bltmp_pos, in, inlen);
  194|  8.50k|        ctr->bltmp_pos += inlen;
  195|  8.50k|    }
  196|  10.5k|    return 1;
  197|  10.5k|}
drbg_ctr.c:ctr_BCC_blocks:
  132|  16.0k|{
  133|  16.0k|    unsigned char in_tmp[48];
  134|  16.0k|    unsigned char num_of_blk = 2;
  135|       |
  136|  16.0k|    memcpy(in_tmp, in, 16);
  137|  16.0k|    memcpy(in_tmp + 16, in, 16);
  138|  16.0k|    if (ctr->keylen != 16) {
  ------------------
  |  Branch (138:9): [True: 16.0k, False: 0]
  ------------------
  139|  16.0k|        memcpy(in_tmp + 32, in, 16);
  140|  16.0k|        num_of_blk = 3;
  141|  16.0k|    }
  142|  16.0k|    return ctr_BCC_block(ctr, ctr->KX, in_tmp, AES_BLOCK_SIZE * num_of_blk);
  ------------------
  |  |   26|  16.0k|#define AES_BLOCK_SIZE 16
  ------------------
  143|  16.0k|}
drbg_ctr.c:ctr_BCC_final:
  200|  4.50k|{
  201|  4.50k|    if (ctr->bltmp_pos) {
  ------------------
  |  Branch (201:9): [True: 4.50k, False: 0]
  ------------------
  202|  4.50k|        memset(ctr->bltmp + ctr->bltmp_pos, 0, 16 - ctr->bltmp_pos);
  203|  4.50k|        if (!ctr_BCC_blocks(ctr, ctr->bltmp))
  ------------------
  |  Branch (203:13): [True: 0, False: 4.50k]
  ------------------
  204|      0|            return 0;
  205|  4.50k|    }
  206|  4.50k|    return 1;
  207|  4.50k|}
drbg_ctr.c:ctr_XOR:
   84|  6.50k|{
   85|  6.50k|    size_t i, n;
   86|       |
   87|  6.50k|    if (in == NULL || inlen == 0)
  ------------------
  |  Branch (87:9): [True: 0, False: 6.50k]
  |  Branch (87:23): [True: 0, False: 6.50k]
  ------------------
   88|      0|        return;
   89|       |
   90|       |    /*
   91|       |     * Any zero padding will have no effect on the result as we
   92|       |     * are XORing. So just process however much input we have.
   93|       |     */
   94|  6.50k|    n = inlen < ctr->keylen ? inlen : ctr->keylen;
  ------------------
  |  Branch (94:9): [True: 0, False: 6.50k]
  ------------------
   95|  6.50k|    if (!ossl_assert(n <= sizeof(ctr->K)))
  ------------------
  |  |   52|  6.50k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  6.50k|    __FILE__, __LINE__)
  ------------------
  |  Branch (95:9): [True: 0, False: 6.50k]
  ------------------
   96|      0|        return;
   97|   214k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (97:17): [True: 208k, False: 6.50k]
  ------------------
   98|   208k|        ctr->K[i] ^= in[i];
   99|  6.50k|    if (inlen <= ctr->keylen)
  ------------------
  |  Branch (99:9): [True: 0, False: 6.50k]
  ------------------
  100|      0|        return;
  101|       |
  102|  6.50k|    n = inlen - ctr->keylen;
  103|  6.50k|    if (n > 16) {
  ------------------
  |  Branch (103:9): [True: 0, False: 6.50k]
  ------------------
  104|       |        /* Should never happen */
  105|      0|        n = 16;
  106|      0|    }
  107|   110k|    for (i = 0; i < n; i++)
  ------------------
  |  Branch (107:17): [True: 104k, False: 6.50k]
  ------------------
  108|   104k|        ctr->V[i] ^= in[i + ctr->keylen];
  109|  6.50k|}
drbg_ctr.c:drbg_ctr_reseed:
  369|  1.00k|{
  370|  1.00k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  371|       |
  372|  1.00k|    if (entropy == NULL)
  ------------------
  |  Branch (372:9): [True: 0, False: 1.00k]
  ------------------
  373|      0|        return 0;
  374|       |
  375|  1.00k|    inc_128(ctr);
  376|  1.00k|    if (!ctr_update(drbg, entropy, entropylen, adin, adinlen, NULL, 0))
  ------------------
  |  Branch (376:9): [True: 0, False: 1.00k]
  ------------------
  377|      0|        return 0;
  378|  1.00k|    return 1;
  379|  1.00k|}
drbg_ctr.c:drbg_ctr_generate:
  406|  24.7k|{
  407|  24.7k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  408|  24.7k|    unsigned int ctr32, blocks;
  409|  24.7k|    int outl, buflen;
  410|       |
  411|  24.7k|    if (adin != NULL && adinlen != 0) {
  ------------------
  |  Branch (411:9): [True: 2.00k, False: 22.7k]
  |  Branch (411:25): [True: 2.00k, False: 0]
  ------------------
  412|  2.00k|        inc_128(ctr);
  413|       |
  414|  2.00k|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (414:13): [True: 0, False: 2.00k]
  ------------------
  415|      0|            return 0;
  416|       |        /* This means we reuse derived value */
  417|  2.00k|        if (ctr->use_df) {
  ------------------
  |  Branch (417:13): [True: 2.00k, False: 0]
  ------------------
  418|  2.00k|            adin = NULL;
  419|  2.00k|            adinlen = 1;
  420|  2.00k|        }
  421|  22.7k|    } else {
  422|  22.7k|        adinlen = 0;
  423|  22.7k|    }
  424|       |
  425|  24.7k|    inc_128(ctr);
  426|       |
  427|  24.7k|    if (outlen == 0) {
  ------------------
  |  Branch (427:9): [True: 0, False: 24.7k]
  ------------------
  428|      0|        inc_128(ctr);
  429|       |
  430|      0|        if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (430:13): [True: 0, False: 0]
  ------------------
  431|      0|            return 0;
  432|      0|        return 1;
  433|      0|    }
  434|       |
  435|  24.7k|    memset(out, 0, outlen);
  436|       |
  437|  24.7k|    do {
  438|  24.7k|        if (!EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (438:13): [True: 0, False: 24.7k]
  ------------------
  439|  24.7k|                NULL, NULL, NULL, ctr->V, -1))
  440|      0|            return 0;
  441|       |
  442|       |        /*-
  443|       |         * outlen has type size_t while EVP_CipherUpdate takes an
  444|       |         * int argument and thus cannot be guaranteed to process more
  445|       |         * than 2^31-1 bytes at a time. We process such huge generate
  446|       |         * requests in 2^30 byte chunks, which is the greatest multiple
  447|       |         * of AES block size lower than or equal to 2^31-1.
  448|       |         */
  449|  24.7k|        buflen = outlen > (1U << 30) ? (1 << 30) : (int)outlen;
  ------------------
  |  Branch (449:18): [True: 0, False: 24.7k]
  ------------------
  450|  24.7k|        blocks = (buflen + 15) / 16;
  451|       |
  452|  24.7k|        ctr32 = GETU32(ctr->V + 12) + blocks;
  ------------------
  |  |   98|  24.7k|#define GETU32(p) ((u32)(p)[0] << 24 | (u32)(p)[1] << 16 | (u32)(p)[2] << 8 | (u32)(p)[3])
  ------------------
  453|  24.7k|        if (ctr32 < blocks) {
  ------------------
  |  Branch (453:13): [True: 0, False: 24.7k]
  ------------------
  454|       |            /* 32-bit counter overflow into V. */
  455|      0|            if (ctr32 != 0) {
  ------------------
  |  Branch (455:17): [True: 0, False: 0]
  ------------------
  456|      0|                blocks -= ctr32;
  457|      0|                buflen = blocks * 16;
  458|      0|                ctr32 = 0;
  459|      0|            }
  460|      0|            ctr96_inc(ctr->V);
  461|      0|        }
  462|  24.7k|        PUTU32(ctr->V + 12, ctr32);
  ------------------
  |  |   99|  24.7k|#define PUTU32(p, v) ((p)[0] = (u8)((v) >> 24), (p)[1] = (u8)((v) >> 16), (p)[2] = (u8)((v) >> 8), (p)[3] = (u8)(v))
  ------------------
  463|       |
  464|  24.7k|        if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen)
  ------------------
  |  Branch (464:13): [True: 0, False: 24.7k]
  ------------------
  465|  24.7k|            || outl != buflen)
  ------------------
  |  Branch (465:16): [True: 0, False: 24.7k]
  ------------------
  466|      0|            return 0;
  467|       |
  468|  24.7k|        out += buflen;
  469|  24.7k|        outlen -= buflen;
  470|  24.7k|    } while (outlen);
  ------------------
  |  Branch (470:14): [True: 0, False: 24.7k]
  ------------------
  471|       |
  472|  24.7k|    if (!ctr_update(drbg, adin, adinlen, NULL, 0, NULL, 0))
  ------------------
  |  Branch (472:9): [True: 0, False: 24.7k]
  ------------------
  473|      0|        return 0;
  474|  24.7k|    return 1;
  475|  24.7k|}
drbg_ctr.c:drbg_ctr_free:
  656|  1.50k|{
  657|  1.50k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  658|  1.50k|    PROV_DRBG_CTR *ctr;
  659|       |
  660|  1.50k|    if (drbg != NULL && (ctr = (PROV_DRBG_CTR *)drbg->data) != NULL) {
  ------------------
  |  Branch (660:9): [True: 1.50k, False: 0]
  |  Branch (660:25): [True: 1.50k, False: 0]
  ------------------
  661|  1.50k|        EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  662|  1.50k|        EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  663|  1.50k|        EVP_CIPHER_CTX_free(ctr->ctx_df);
  664|  1.50k|        EVP_CIPHER_free(ctr->cipher_ecb);
  665|  1.50k|        EVP_CIPHER_free(ctr->cipher_ctr);
  666|       |
  667|  1.50k|        OPENSSL_secure_clear_free(ctr, sizeof(*ctr));
  ------------------
  |  |  149|  1.50k|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  668|  1.50k|    }
  669|  1.50k|    ossl_rand_drbg_free(drbg);
  670|  1.50k|}
drbg_ctr.c:drbg_ctr_instantiate_wrapper:
  344|  1.50k|{
  345|  1.50k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  346|  1.50k|    struct drbg_set_ctx_params_st p;
  347|  1.50k|    int ret = 0;
  348|       |
  349|  1.50k|    if (drbg == NULL || !drbg_ctr_set_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (349:9): [True: 0, False: 1.50k]
  |  Branch (349:25): [True: 0, False: 1.50k]
  ------------------
  350|      0|        return 0;
  351|       |
  352|  1.50k|    if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock))
  ------------------
  |  Branch (352:9): [True: 0, False: 1.50k]
  |  Branch (352:31): [True: 0, False: 0]
  ------------------
  353|      0|        return 0;
  354|       |
  355|  1.50k|    if (!ossl_prov_is_running()
  ------------------
  |  Branch (355:9): [True: 0, False: 1.50k]
  ------------------
  356|  1.50k|        || !drbg_ctr_set_ctx_params_locked(drbg, &p))
  ------------------
  |  Branch (356:12): [True: 0, False: 1.50k]
  ------------------
  357|      0|        goto err;
  358|  1.50k|    ret = ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
  359|  1.50k|        pstr, pstr_len);
  360|  1.50k|err:
  361|  1.50k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (361:9): [True: 0, False: 1.50k]
  ------------------
  362|      0|        CRYPTO_THREAD_unlock(drbg->lock);
  363|  1.50k|    return ret;
  364|  1.50k|}
drbg_ctr.c:drbg_ctr_set_ctx_params_decoder:
 1180|  1.50k|{
 1181|  1.50k|    const char *s;
 1182|       |
 1183|  1.50k|    memset(r, 0, sizeof(*r));
 1184|  1.50k|    if (p != NULL)
  ------------------
  |  Branch (1184:9): [True: 1.50k, False: 0]
  ------------------
 1185|  9.00k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (1185:16): [True: 7.50k, False: 1.50k]
  ------------------
 1186|  7.50k|            switch(s[0]) {
 1187|      0|            default:
  ------------------
  |  Branch (1187:13): [True: 0, False: 7.50k]
  ------------------
 1188|      0|                break;
 1189|  1.50k|            case 'c':
  ------------------
  |  Branch (1189:13): [True: 1.50k, False: 6.00k]
  ------------------
 1190|  1.50k|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|  1.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.50k, False: 0]
  |  |  ------------------
  ------------------
 1191|       |                    /* OSSL_DRBG_PARAM_CIPHER */
 1192|  1.50k|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|  1.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.50k]
  |  |  ------------------
  ------------------
 1193|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1194|      0|                                       "param %s is repeated", s);
 1195|      0|                        return 0;
 1196|      0|                    }
 1197|  1.50k|                    r->cipher = (OSSL_PARAM *)p;
 1198|  1.50k|                }
 1199|  1.50k|                break;
 1200|  1.50k|            case 'p':
  ------------------
  |  Branch (1200:13): [True: 1.50k, False: 6.00k]
  ------------------
 1201|  1.50k|                switch(s[1]) {
 1202|      0|                default:
  ------------------
  |  Branch (1202:17): [True: 0, False: 1.50k]
  ------------------
 1203|      0|                    break;
 1204|  1.50k|                case 'r':
  ------------------
  |  Branch (1204:17): [True: 1.50k, False: 0]
  ------------------
 1205|  1.50k|                    switch(s[2]) {
 1206|      0|                    default:
  ------------------
  |  Branch (1206:21): [True: 0, False: 1.50k]
  ------------------
 1207|      0|                        break;
 1208|  1.50k|                    case 'o':
  ------------------
  |  Branch (1208:21): [True: 1.50k, False: 0]
  ------------------
 1209|  1.50k|                        switch(s[3]) {
 1210|      0|                        default:
  ------------------
  |  Branch (1210:25): [True: 0, False: 1.50k]
  ------------------
 1211|      0|                            break;
 1212|      0|                        case 'p':
  ------------------
  |  Branch (1212:25): [True: 0, False: 1.50k]
  ------------------
 1213|      0|                            if (ossl_likely(strcmp("erties", s + 4) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1214|       |                                /* OSSL_DRBG_PARAM_PROPERTIES */
 1215|      0|                                if (ossl_unlikely(r->propq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1216|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1217|      0|                                                   "param %s is repeated", s);
 1218|      0|                                    return 0;
 1219|      0|                                }
 1220|      0|                                r->propq = (OSSL_PARAM *)p;
 1221|      0|                            }
 1222|      0|                            break;
 1223|  1.50k|                        case 'v':
  ------------------
  |  Branch (1223:25): [True: 1.50k, False: 0]
  ------------------
 1224|  1.50k|                            if (ossl_likely(strcmp("ider-name", s + 4) == 0)) {
  ------------------
  |  |   22|  1.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.50k, False: 0]
  |  |  ------------------
  ------------------
 1225|       |                                /* OSSL_PROV_PARAM_CORE_PROV_NAME */
 1226|  1.50k|                                if (ossl_unlikely(r->prov != NULL)) {
  ------------------
  |  |   23|  1.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.50k]
  |  |  ------------------
  ------------------
 1227|      0|                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1228|      0|                                                   "param %s is repeated", s);
 1229|      0|                                    return 0;
 1230|      0|                                }
 1231|  1.50k|                                r->prov = (OSSL_PARAM *)p;
 1232|  1.50k|                            }
 1233|  1.50k|                        }
 1234|  1.50k|                    }
 1235|  1.50k|                }
 1236|  1.50k|                break;
 1237|  3.00k|            case 'r':
  ------------------
  |  Branch (1237:13): [True: 3.00k, False: 4.50k]
  ------------------
 1238|  3.00k|                switch(s[1]) {
 1239|      0|                default:
  ------------------
  |  Branch (1239:17): [True: 0, False: 3.00k]
  ------------------
 1240|      0|                    break;
 1241|  3.00k|                case 'e':
  ------------------
  |  Branch (1241:17): [True: 3.00k, False: 0]
  ------------------
 1242|  3.00k|                    switch(s[2]) {
 1243|      0|                    default:
  ------------------
  |  Branch (1243:21): [True: 0, False: 3.00k]
  ------------------
 1244|      0|                        break;
 1245|  3.00k|                    case 's':
  ------------------
  |  Branch (1245:21): [True: 3.00k, False: 0]
  ------------------
 1246|  3.00k|                        switch(s[3]) {
 1247|      0|                        default:
  ------------------
  |  Branch (1247:25): [True: 0, False: 3.00k]
  ------------------
 1248|      0|                            break;
 1249|  3.00k|                        case 'e':
  ------------------
  |  Branch (1249:25): [True: 3.00k, False: 0]
  ------------------
 1250|  3.00k|                            switch(s[4]) {
 1251|      0|                            default:
  ------------------
  |  Branch (1251:29): [True: 0, False: 3.00k]
  ------------------
 1252|      0|                                break;
 1253|  3.00k|                            case 'e':
  ------------------
  |  Branch (1253:29): [True: 3.00k, False: 0]
  ------------------
 1254|  3.00k|                                switch(s[5]) {
 1255|      0|                                default:
  ------------------
  |  Branch (1255:33): [True: 0, False: 3.00k]
  ------------------
 1256|      0|                                    break;
 1257|  3.00k|                                case 'd':
  ------------------
  |  Branch (1257:33): [True: 3.00k, False: 0]
  ------------------
 1258|  3.00k|                                    switch(s[6]) {
 1259|      0|                                    default:
  ------------------
  |  Branch (1259:37): [True: 0, False: 3.00k]
  ------------------
 1260|      0|                                        break;
 1261|  3.00k|                                    case '_':
  ------------------
  |  Branch (1261:37): [True: 3.00k, False: 0]
  ------------------
 1262|  3.00k|                                        switch(s[7]) {
 1263|      0|                                        default:
  ------------------
  |  Branch (1263:41): [True: 0, False: 3.00k]
  ------------------
 1264|      0|                                            break;
 1265|  1.50k|                                        case 'r':
  ------------------
  |  Branch (1265:41): [True: 1.50k, False: 1.50k]
  ------------------
 1266|  1.50k|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|  1.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.50k, False: 0]
  |  |  ------------------
  ------------------
 1267|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
 1268|  1.50k|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|  1.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.50k]
  |  |  ------------------
  ------------------
 1269|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1270|      0|                                                                   "param %s is repeated", s);
 1271|      0|                                                    return 0;
 1272|      0|                                                }
 1273|  1.50k|                                                r->reseed_req = (OSSL_PARAM *)p;
 1274|  1.50k|                                            }
 1275|  1.50k|                                            break;
 1276|  1.50k|                                        case 't':
  ------------------
  |  Branch (1276:41): [True: 1.50k, False: 1.50k]
  ------------------
 1277|  1.50k|                                            if (ossl_likely(strcmp("ime_interval", s + 8) == 0)) {
  ------------------
  |  |   22|  1.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.50k, False: 0]
  |  |  ------------------
  ------------------
 1278|       |                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
 1279|  1.50k|                                                if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|  1.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.50k]
  |  |  ------------------
  ------------------
 1280|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1281|      0|                                                                   "param %s is repeated", s);
 1282|      0|                                                    return 0;
 1283|      0|                                                }
 1284|  1.50k|                                                r->reseed_time = (OSSL_PARAM *)p;
 1285|  1.50k|                                            }
 1286|  3.00k|                                        }
 1287|  3.00k|                                    }
 1288|  3.00k|                                }
 1289|  3.00k|                            }
 1290|  3.00k|                        }
 1291|  3.00k|                    }
 1292|  3.00k|                }
 1293|  3.00k|                break;
 1294|  3.00k|            case 'u':
  ------------------
  |  Branch (1294:13): [True: 1.50k, False: 6.00k]
  ------------------
 1295|  1.50k|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|  1.50k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.50k, False: 0]
  |  |  ------------------
  ------------------
 1296|       |                    /* OSSL_DRBG_PARAM_USE_DF */
 1297|  1.50k|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|  1.50k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.50k]
  |  |  ------------------
  ------------------
 1298|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1299|      0|                                       "param %s is repeated", s);
 1300|      0|                        return 0;
 1301|      0|                    }
 1302|  1.50k|                    r->df = (OSSL_PARAM *)p;
 1303|  1.50k|                }
 1304|  7.50k|            }
 1305|  1.50k|    return 1;
 1306|  1.50k|}
drbg_ctr.c:drbg_ctr_set_ctx_params_locked:
 1063|  1.50k|{
 1064|  1.50k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)ctx->data;
 1065|  1.50k|    OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx);
  ------------------
  |  |   31|  1.50k|    ossl_prov_ctx_get0_libctx((provctx))
  ------------------
 1066|  1.50k|    OSSL_PROVIDER *prov = NULL;
 1067|  1.50k|    char *ecb;
 1068|  1.50k|    const char *propquery = NULL;
 1069|  1.50k|    int i, cipher_init = 0;
 1070|       |
 1071|  1.50k|    if (p->df != NULL && OSSL_PARAM_get_int(p->df, &i)) {
  ------------------
  |  Branch (1071:9): [True: 1.50k, False: 0]
  |  Branch (1071:26): [True: 1.50k, False: 0]
  ------------------
 1072|       |        /* FIPS errors out in the drbg_ctr_init() call later */
 1073|  1.50k|        ctr->use_df = i != 0;
 1074|  1.50k|        cipher_init = 1;
 1075|  1.50k|    }
 1076|       |
 1077|  1.50k|    if (p->propq != NULL) {
  ------------------
  |  Branch (1077:9): [True: 0, False: 1.50k]
  ------------------
 1078|      0|        if (p->propq->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1078:13): [True: 0, False: 0]
  ------------------
 1079|      0|            return 0;
 1080|      0|        propquery = (const char *)p->propq->data;
 1081|      0|    }
 1082|       |
 1083|  1.50k|    if (p->prov != NULL) {
  ------------------
  |  Branch (1083:9): [True: 1.50k, False: 0]
  ------------------
 1084|  1.50k|        if (p->prov->data_type != OSSL_PARAM_UTF8_STRING)
  ------------------
  |  |  117|  1.50k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1084:13): [True: 0, False: 1.50k]
  ------------------
 1085|      0|            return 0;
 1086|  1.50k|        if ((prov = ossl_provider_find(libctx,
  ------------------
  |  Branch (1086:13): [True: 0, False: 1.50k]
  ------------------
 1087|  1.50k|                 (const char *)p->prov->data, 1))
 1088|  1.50k|            == NULL)
 1089|      0|            return 0;
 1090|  1.50k|    }
 1091|       |
 1092|  1.50k|    if (p->cipher != NULL) {
  ------------------
  |  Branch (1092:9): [True: 1.50k, False: 0]
  ------------------
 1093|  1.50k|        const char *base = (const char *)p->cipher->data;
 1094|  1.50k|        size_t ctr_str_len = sizeof("CTR") - 1;
 1095|  1.50k|        size_t ecb_str_len = sizeof("ECB") - 1;
 1096|       |
 1097|  1.50k|        if (p->cipher->data_type != OSSL_PARAM_UTF8_STRING
  ------------------
  |  |  117|  3.00k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (1097:13): [True: 0, False: 1.50k]
  ------------------
 1098|  1.50k|            || p->cipher->data_size < ctr_str_len) {
  ------------------
  |  Branch (1098:16): [True: 0, False: 1.50k]
  ------------------
 1099|      0|            ossl_provider_free(prov);
 1100|      0|            return 0;
 1101|      0|        }
 1102|  1.50k|        if (OPENSSL_strcasecmp("CTR", base + p->cipher->data_size - ctr_str_len) != 0) {
  ------------------
  |  Branch (1102:13): [True: 0, False: 1.50k]
  ------------------
 1103|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_REQUIRE_CTR_MODE_CIPHER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1104|      0|            ossl_provider_free(prov);
 1105|      0|            return 0;
 1106|      0|        }
 1107|  1.50k|        if ((ecb = OPENSSL_strndup(base, p->cipher->data_size)) == NULL) {
  ------------------
  |  |  137|  1.50k|    CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (1107:13): [True: 0, False: 1.50k]
  ------------------
 1108|      0|            ossl_provider_free(prov);
 1109|      0|            return 0;
 1110|      0|        }
 1111|  1.50k|        strcpy(ecb + p->cipher->data_size - ecb_str_len, "ECB");
 1112|  1.50k|        EVP_CIPHER_free(ctr->cipher_ecb);
 1113|  1.50k|        EVP_CIPHER_free(ctr->cipher_ctr);
 1114|       |        /*
 1115|       |         * Try to fetch algorithms from our own provider code, fallback
 1116|       |         * to generic fetch only if that fails
 1117|       |         */
 1118|  1.50k|        (void)ERR_set_mark();
 1119|  1.50k|        ctr->cipher_ctr = evp_cipher_fetch_from_prov(prov, base, NULL);
 1120|  1.50k|        if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (1120:13): [True: 0, False: 1.50k]
  ------------------
 1121|      0|            (void)ERR_pop_to_mark();
 1122|      0|            ctr->cipher_ctr = EVP_CIPHER_fetch(libctx, base, propquery);
 1123|  1.50k|        } else {
 1124|  1.50k|            (void)ERR_clear_last_mark();
 1125|  1.50k|        }
 1126|  1.50k|        (void)ERR_set_mark();
 1127|  1.50k|        ctr->cipher_ecb = evp_cipher_fetch_from_prov(prov, ecb, NULL);
 1128|  1.50k|        if (ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (1128:13): [True: 0, False: 1.50k]
  ------------------
 1129|      0|            (void)ERR_pop_to_mark();
 1130|      0|            ctr->cipher_ecb = EVP_CIPHER_fetch(libctx, ecb, propquery);
 1131|  1.50k|        } else {
 1132|  1.50k|            (void)ERR_clear_last_mark();
 1133|  1.50k|        }
 1134|  1.50k|        OPENSSL_free(ecb);
  ------------------
  |  |  131|  1.50k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1135|  1.50k|        if (ctr->cipher_ctr == NULL || ctr->cipher_ecb == NULL) {
  ------------------
  |  Branch (1135:13): [True: 0, False: 1.50k]
  |  Branch (1135:40): [True: 0, False: 1.50k]
  ------------------
 1136|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_FIND_CIPHERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1137|      0|            ossl_provider_free(prov);
 1138|      0|            return 0;
 1139|      0|        }
 1140|  1.50k|        cipher_init = 1;
 1141|  1.50k|    }
 1142|  1.50k|    ossl_provider_free(prov);
 1143|       |
 1144|  1.50k|    if (cipher_init && !drbg_ctr_init(ctx))
  ------------------
  |  Branch (1144:9): [True: 1.50k, False: 0]
  |  Branch (1144:24): [True: 0, False: 1.50k]
  ------------------
 1145|      0|        return 0;
 1146|       |
 1147|  1.50k|    return ossl_drbg_set_ctx_params(ctx, p);
 1148|  1.50k|}
drbg_ctr.c:drbg_ctr_init:
  572|  1.50k|{
  573|  1.50k|    PROV_DRBG_CTR *ctr = (PROV_DRBG_CTR *)drbg->data;
  574|  1.50k|    size_t keylen;
  575|       |
  576|  1.50k|    if (ctr->cipher_ctr == NULL) {
  ------------------
  |  Branch (576:9): [True: 0, False: 1.50k]
  ------------------
  577|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_MISSING_CIPHER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  578|      0|        return 0;
  579|      0|    }
  580|  1.50k|    ctr->keylen = keylen = EVP_CIPHER_get_key_length(ctr->cipher_ctr);
  581|  1.50k|    if (ctr->ctx_ecb == NULL)
  ------------------
  |  Branch (581:9): [True: 1.50k, False: 0]
  ------------------
  582|  1.50k|        ctr->ctx_ecb = EVP_CIPHER_CTX_new();
  583|  1.50k|    if (ctr->ctx_ctr == NULL)
  ------------------
  |  Branch (583:9): [True: 1.50k, False: 0]
  ------------------
  584|  1.50k|        ctr->ctx_ctr = EVP_CIPHER_CTX_new();
  585|  1.50k|    if (ctr->ctx_ecb == NULL || ctr->ctx_ctr == NULL) {
  ------------------
  |  Branch (585:9): [True: 0, False: 1.50k]
  |  Branch (585:33): [True: 0, False: 1.50k]
  ------------------
  586|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  587|      0|        goto err;
  588|      0|    }
  589|       |
  590|  1.50k|    if (!EVP_CipherInit_ex(ctr->ctx_ecb,
  ------------------
  |  Branch (590:9): [True: 0, False: 1.50k]
  ------------------
  591|  1.50k|            ctr->cipher_ecb, NULL, NULL, NULL, 1)
  592|  1.50k|        || !EVP_CipherInit_ex(ctr->ctx_ctr,
  ------------------
  |  Branch (592:12): [True: 0, False: 1.50k]
  ------------------
  593|  1.50k|            ctr->cipher_ctr, NULL, NULL, NULL, 1)) {
  594|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_UNABLE_TO_INITIALISE_CIPHERS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  595|      0|        goto err;
  596|      0|    }
  597|       |
  598|  1.50k|    drbg->strength = (unsigned int)(keylen * 8);
  599|  1.50k|    drbg->seedlen = keylen + 16;
  600|       |
  601|  1.50k|    if (ctr->use_df) {
  ------------------
  |  Branch (601:9): [True: 1.50k, False: 0]
  ------------------
  602|       |        /* df initialisation */
  603|  1.50k|        static const unsigned char df_key[32] = {
  604|  1.50k|            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  605|  1.50k|            0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
  606|  1.50k|            0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
  607|  1.50k|            0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
  608|  1.50k|        };
  609|       |
  610|  1.50k|        if (ctr->ctx_df == NULL)
  ------------------
  |  Branch (610:13): [True: 1.50k, False: 0]
  ------------------
  611|  1.50k|            ctr->ctx_df = EVP_CIPHER_CTX_new();
  612|  1.50k|        if (ctr->ctx_df == NULL) {
  ------------------
  |  Branch (612:13): [True: 0, False: 1.50k]
  ------------------
  613|      0|            ERR_raise(ERR_LIB_PROV, ERR_R_EVP_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  614|      0|            goto err;
  615|      0|        }
  616|       |        /* Set key schedule for df_key */
  617|  1.50k|        if (!EVP_CipherInit_ex(ctr->ctx_df,
  ------------------
  |  Branch (617:13): [True: 0, False: 1.50k]
  ------------------
  618|  1.50k|                ctr->cipher_ecb, NULL, df_key, NULL, 1)) {
  619|      0|            ERR_raise(ERR_LIB_PROV, PROV_R_DERIVATION_FUNCTION_INIT_FAILED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  620|      0|            goto err;
  621|      0|        }
  622|  1.50k|    }
  623|  1.50k|    return drbg_ctr_init_lengths(drbg);
  624|       |
  625|      0|err:
  626|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ecb);
  627|      0|    EVP_CIPHER_CTX_free(ctr->ctx_ctr);
  628|       |    ctr->ctx_ecb = ctr->ctx_ctr = NULL;
  629|      0|    return 0;
  630|  1.50k|}
drbg_ctr.c:drbg_ctr_generate_wrapper:
  480|  22.7k|{
  481|  22.7k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
  482|       |
  483|  22.7k|    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
  484|  22.7k|        prediction_resistance, adin, adin_len);
  485|  22.7k|}
drbg_ctr.c:drbg_ctr_settable_ctx_params:
 1333|  1.50k|{
 1334|  1.50k|    return drbg_ctr_set_ctx_params_list;
 1335|  1.50k|}
drbg_ctr.c:drbg_ctr_get_ctx_params:
 1017|  59.5k|{
 1018|  59.5k|    PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 1019|  59.5k|    PROV_DRBG_CTR *ctr;
 1020|  59.5k|    struct drbg_ctr_get_ctx_params_st p;
 1021|  59.5k|    int ret = 0, complete = 0;
 1022|       |
 1023|  59.5k|    if (drbg == NULL || !drbg_ctr_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (1023:9): [True: 0, False: 59.5k]
  |  Branch (1023:25): [True: 0, False: 59.5k]
  ------------------
 1024|      0|        return 0;
 1025|       |
 1026|  59.5k|    if (!ossl_drbg_get_ctx_params_no_lock(drbg, &p, params, &complete))
  ------------------
  |  Branch (1026:9): [True: 0, False: 59.5k]
  ------------------
 1027|      0|        return 0;
 1028|       |
 1029|  59.5k|    if (complete)
  ------------------
  |  Branch (1029:9): [True: 46.5k, False: 12.9k]
  ------------------
 1030|  46.5k|        return 1;
 1031|       |
 1032|  12.9k|    ctr = (PROV_DRBG_CTR *)drbg->data;
 1033|       |
 1034|  12.9k|    if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock))
  ------------------
  |  Branch (1034:9): [True: 12.9k, False: 0]
  |  Branch (1034:31): [True: 0, False: 12.9k]
  ------------------
 1035|      0|        return 0;
 1036|       |
 1037|  12.9k|    if (p.df != NULL && !OSSL_PARAM_set_int(p.df, ctr->use_df))
  ------------------
  |  Branch (1037:9): [True: 0, False: 12.9k]
  |  Branch (1037:25): [True: 0, False: 0]
  ------------------
 1038|      0|        goto err;
 1039|       |
 1040|  12.9k|    if (p.cipher != NULL) {
  ------------------
  |  Branch (1040:9): [True: 0, False: 12.9k]
  ------------------
 1041|      0|        if (ctr->cipher_ctr == NULL
  ------------------
  |  Branch (1041:13): [True: 0, False: 0]
  ------------------
 1042|      0|            || !OSSL_PARAM_set_utf8_string(p.cipher,
  ------------------
  |  Branch (1042:16): [True: 0, False: 0]
  ------------------
 1043|      0|                EVP_CIPHER_get0_name(ctr->cipher_ctr)))
 1044|      0|            goto err;
 1045|      0|    }
 1046|       |
 1047|  12.9k|    ret = ossl_drbg_get_ctx_params(drbg, &p);
 1048|  12.9k|err:
 1049|  12.9k|    if (drbg->lock != NULL)
  ------------------
  |  Branch (1049:9): [True: 12.9k, False: 0]
  ------------------
 1050|  12.9k|        CRYPTO_THREAD_unlock(drbg->lock);
 1051|       |
 1052|  12.9k|    return ret;
 1053|  12.9k|}
drbg_ctr.c:drbg_ctr_get_ctx_params_decoder:
  726|  59.5k|{
  727|  59.5k|    const char *s;
  728|       |
  729|  59.5k|    memset(r, 0, sizeof(*r));
  730|  59.5k|    if (p != NULL)
  ------------------
  |  Branch (730:9): [True: 59.5k, False: 0]
  ------------------
  731|   119k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (731:16): [True: 59.5k, False: 59.5k]
  ------------------
  732|  59.5k|            switch(s[0]) {
  733|      0|            default:
  ------------------
  |  Branch (733:13): [True: 0, False: 59.5k]
  ------------------
  734|      0|                break;
  735|      0|            case 'c':
  ------------------
  |  Branch (735:13): [True: 0, False: 59.5k]
  ------------------
  736|      0|                if (ossl_likely(strcmp("ipher", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  737|       |                    /* OSSL_DRBG_PARAM_CIPHER */
  738|      0|                    if (ossl_unlikely(r->cipher != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  739|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  740|      0|                                       "param %s is repeated", s);
  741|      0|                        return 0;
  742|      0|                    }
  743|      0|                    r->cipher = (OSSL_PARAM *)p;
  744|      0|                }
  745|      0|                break;
  746|      0|            case 'f':
  ------------------
  |  Branch (746:13): [True: 0, False: 59.5k]
  ------------------
  747|       |# if defined(FIPS_MODULE)
  748|       |                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
  749|       |                    /* OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR */
  750|       |                    if (ossl_unlikely(r->ind != NULL)) {
  751|       |                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  752|       |                                       "param %s is repeated", s);
  753|       |                        return 0;
  754|       |                    }
  755|       |                    r->ind = (OSSL_PARAM *)p;
  756|       |                }
  757|       |# endif
  758|      0|                break;
  759|  22.7k|            case 'm':
  ------------------
  |  Branch (759:13): [True: 22.7k, False: 36.7k]
  ------------------
  760|  22.7k|                switch(s[1]) {
  761|      0|                default:
  ------------------
  |  Branch (761:17): [True: 0, False: 22.7k]
  ------------------
  762|      0|                    break;
  763|  22.7k|                case 'a':
  ------------------
  |  Branch (763:17): [True: 22.7k, False: 0]
  ------------------
  764|  22.7k|                    switch(s[2]) {
  765|      0|                    default:
  ------------------
  |  Branch (765:21): [True: 0, False: 22.7k]
  ------------------
  766|      0|                        break;
  767|  22.7k|                    case 'x':
  ------------------
  |  Branch (767:21): [True: 22.7k, False: 0]
  ------------------
  768|  22.7k|                        switch(s[3]) {
  769|      0|                        default:
  ------------------
  |  Branch (769:25): [True: 0, False: 22.7k]
  ------------------
  770|      0|                            break;
  771|  22.7k|                        case '_':
  ------------------
  |  Branch (771:25): [True: 22.7k, False: 0]
  ------------------
  772|  22.7k|                            switch(s[4]) {
  773|      0|                            default:
  ------------------
  |  Branch (773:29): [True: 0, False: 22.7k]
  ------------------
  774|      0|                                break;
  775|      0|                            case 'a':
  ------------------
  |  Branch (775:29): [True: 0, False: 22.7k]
  ------------------
  776|      0|                                if (ossl_likely(strcmp("dinlen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  777|       |                                    /* OSSL_DRBG_PARAM_MAX_ADINLEN */
  778|      0|                                    if (ossl_unlikely(r->maxadlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  779|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  780|      0|                                                       "param %s is repeated", s);
  781|      0|                                        return 0;
  782|      0|                                    }
  783|      0|                                    r->maxadlen = (OSSL_PARAM *)p;
  784|      0|                                }
  785|      0|                                break;
  786|      0|                            case 'e':
  ------------------
  |  Branch (786:29): [True: 0, False: 22.7k]
  ------------------
  787|      0|                                if (ossl_likely(strcmp("ntropylen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  788|       |                                    /* OSSL_DRBG_PARAM_MAX_ENTROPYLEN */
  789|      0|                                    if (ossl_unlikely(r->maxentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  790|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  791|      0|                                                       "param %s is repeated", s);
  792|      0|                                        return 0;
  793|      0|                                    }
  794|      0|                                    r->maxentlen = (OSSL_PARAM *)p;
  795|      0|                                }
  796|      0|                                break;
  797|      0|                            case 'n':
  ------------------
  |  Branch (797:29): [True: 0, False: 22.7k]
  ------------------
  798|      0|                                if (ossl_likely(strcmp("oncelen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  799|       |                                    /* OSSL_DRBG_PARAM_MAX_NONCELEN */
  800|      0|                                    if (ossl_unlikely(r->maxnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  801|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  802|      0|                                                       "param %s is repeated", s);
  803|      0|                                        return 0;
  804|      0|                                    }
  805|      0|                                    r->maxnonlen = (OSSL_PARAM *)p;
  806|      0|                                }
  807|      0|                                break;
  808|      0|                            case 'p':
  ------------------
  |  Branch (808:29): [True: 0, False: 22.7k]
  ------------------
  809|      0|                                if (ossl_likely(strcmp("erslen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  810|       |                                    /* OSSL_DRBG_PARAM_MAX_PERSLEN */
  811|      0|                                    if (ossl_unlikely(r->maxperlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  812|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  813|      0|                                                       "param %s is repeated", s);
  814|      0|                                        return 0;
  815|      0|                                    }
  816|      0|                                    r->maxperlen = (OSSL_PARAM *)p;
  817|      0|                                }
  818|      0|                                break;
  819|  22.7k|                            case 'r':
  ------------------
  |  Branch (819:29): [True: 22.7k, False: 0]
  ------------------
  820|  22.7k|                                if (ossl_likely(strcmp("equest", s + 5) == 0)) {
  ------------------
  |  |   22|  22.7k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 22.7k, False: 0]
  |  |  ------------------
  ------------------
  821|       |                                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  822|  22.7k|                                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|  22.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 22.7k]
  |  |  ------------------
  ------------------
  823|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  824|      0|                                                       "param %s is repeated", s);
  825|      0|                                        return 0;
  826|      0|                                    }
  827|  22.7k|                                    r->maxreq = (OSSL_PARAM *)p;
  828|  22.7k|                                }
  829|  22.7k|                            }
  830|  22.7k|                        }
  831|  22.7k|                    }
  832|  22.7k|                    break;
  833|  22.7k|                case 'i':
  ------------------
  |  Branch (833:17): [True: 0, False: 22.7k]
  ------------------
  834|      0|                    switch(s[2]) {
  835|      0|                    default:
  ------------------
  |  Branch (835:21): [True: 0, False: 0]
  ------------------
  836|      0|                        break;
  837|      0|                    case 'n':
  ------------------
  |  Branch (837:21): [True: 0, False: 0]
  ------------------
  838|      0|                        switch(s[3]) {
  839|      0|                        default:
  ------------------
  |  Branch (839:25): [True: 0, False: 0]
  ------------------
  840|      0|                            break;
  841|      0|                        case '_':
  ------------------
  |  Branch (841:25): [True: 0, False: 0]
  ------------------
  842|      0|                            switch(s[4]) {
  843|      0|                            default:
  ------------------
  |  Branch (843:29): [True: 0, False: 0]
  ------------------
  844|      0|                                break;
  845|      0|                            case 'e':
  ------------------
  |  Branch (845:29): [True: 0, False: 0]
  ------------------
  846|      0|                                if (ossl_likely(strcmp("ntropylen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  847|       |                                    /* OSSL_DRBG_PARAM_MIN_ENTROPYLEN */
  848|      0|                                    if (ossl_unlikely(r->minentlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  849|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  850|      0|                                                       "param %s is repeated", s);
  851|      0|                                        return 0;
  852|      0|                                    }
  853|      0|                                    r->minentlen = (OSSL_PARAM *)p;
  854|      0|                                }
  855|      0|                                break;
  856|      0|                            case 'n':
  ------------------
  |  Branch (856:29): [True: 0, False: 0]
  ------------------
  857|      0|                                if (ossl_likely(strcmp("oncelen", s + 5) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  858|       |                                    /* OSSL_DRBG_PARAM_MIN_NONCELEN */
  859|      0|                                    if (ossl_unlikely(r->minnonlen != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  860|      0|                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  861|      0|                                                       "param %s is repeated", s);
  862|      0|                                        return 0;
  863|      0|                                    }
  864|      0|                                    r->minnonlen = (OSSL_PARAM *)p;
  865|      0|                                }
  866|      0|                            }
  867|      0|                        }
  868|      0|                    }
  869|  22.7k|                }
  870|  22.7k|                break;
  871|  23.7k|            case 'r':
  ------------------
  |  Branch (871:13): [True: 23.7k, False: 35.7k]
  ------------------
  872|  23.7k|                switch(s[1]) {
  873|      0|                default:
  ------------------
  |  Branch (873:17): [True: 0, False: 23.7k]
  ------------------
  874|      0|                    break;
  875|  23.7k|                case 'e':
  ------------------
  |  Branch (875:17): [True: 23.7k, False: 0]
  ------------------
  876|  23.7k|                    switch(s[2]) {
  877|      0|                    default:
  ------------------
  |  Branch (877:21): [True: 0, False: 23.7k]
  ------------------
  878|      0|                        break;
  879|  23.7k|                    case 's':
  ------------------
  |  Branch (879:21): [True: 23.7k, False: 0]
  ------------------
  880|  23.7k|                        switch(s[3]) {
  881|      0|                        default:
  ------------------
  |  Branch (881:25): [True: 0, False: 23.7k]
  ------------------
  882|      0|                            break;
  883|  23.7k|                        case 'e':
  ------------------
  |  Branch (883:25): [True: 23.7k, False: 0]
  ------------------
  884|  23.7k|                            switch(s[4]) {
  885|      0|                            default:
  ------------------
  |  Branch (885:29): [True: 0, False: 23.7k]
  ------------------
  886|      0|                                break;
  887|  23.7k|                            case 'e':
  ------------------
  |  Branch (887:29): [True: 23.7k, False: 0]
  ------------------
  888|  23.7k|                                switch(s[5]) {
  889|      0|                                default:
  ------------------
  |  Branch (889:33): [True: 0, False: 23.7k]
  ------------------
  890|      0|                                    break;
  891|  23.7k|                                case 'd':
  ------------------
  |  Branch (891:33): [True: 23.7k, False: 0]
  ------------------
  892|  23.7k|                                    switch(s[6]) {
  893|      0|                                    default:
  ------------------
  |  Branch (893:37): [True: 0, False: 23.7k]
  ------------------
  894|      0|                                        break;
  895|  23.7k|                                    case '_':
  ------------------
  |  Branch (895:37): [True: 23.7k, False: 0]
  ------------------
  896|  23.7k|                                        switch(s[7]) {
  897|      0|                                        default:
  ------------------
  |  Branch (897:41): [True: 0, False: 23.7k]
  ------------------
  898|      0|                                            break;
  899|  23.7k|                                        case 'c':
  ------------------
  |  Branch (899:41): [True: 23.7k, False: 0]
  ------------------
  900|  23.7k|                                            if (ossl_likely(strcmp("ounter", s + 8) == 0)) {
  ------------------
  |  |   22|  23.7k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 23.7k, False: 0]
  |  |  ------------------
  ------------------
  901|       |                                                /* OSSL_DRBG_PARAM_RESEED_COUNTER */
  902|  23.7k|                                                if (ossl_unlikely(r->reseed_cnt != NULL)) {
  ------------------
  |  |   23|  23.7k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 23.7k]
  |  |  ------------------
  ------------------
  903|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  904|      0|                                                                   "param %s is repeated", s);
  905|      0|                                                    return 0;
  906|      0|                                                }
  907|  23.7k|                                                r->reseed_cnt = (OSSL_PARAM *)p;
  908|  23.7k|                                            }
  909|  23.7k|                                            break;
  910|  23.7k|                                        case 'r':
  ------------------
  |  Branch (910:41): [True: 0, False: 23.7k]
  ------------------
  911|      0|                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  912|       |                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
  913|      0|                                                if (ossl_unlikely(r->reseed_req != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  914|      0|                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  915|      0|                                                                   "param %s is repeated", s);
  916|      0|                                                    return 0;
  917|      0|                                                }
  918|      0|                                                r->reseed_req = (OSSL_PARAM *)p;
  919|      0|                                            }
  920|      0|                                            break;
  921|      0|                                        case 't':
  ------------------
  |  Branch (921:41): [True: 0, False: 23.7k]
  ------------------
  922|      0|                                            switch(s[8]) {
  923|      0|                                            default:
  ------------------
  |  Branch (923:45): [True: 0, False: 0]
  ------------------
  924|      0|                                                break;
  925|      0|                                            case 'i':
  ------------------
  |  Branch (925:45): [True: 0, False: 0]
  ------------------
  926|      0|                                                switch(s[9]) {
  927|      0|                                                default:
  ------------------
  |  Branch (927:49): [True: 0, False: 0]
  ------------------
  928|      0|                                                    break;
  929|      0|                                                case 'm':
  ------------------
  |  Branch (929:49): [True: 0, False: 0]
  ------------------
  930|      0|                                                    switch(s[10]) {
  931|      0|                                                    default:
  ------------------
  |  Branch (931:53): [True: 0, False: 0]
  ------------------
  932|      0|                                                        break;
  933|      0|                                                    case 'e':
  ------------------
  |  Branch (933:53): [True: 0, False: 0]
  ------------------
  934|      0|                                                        switch(s[11]) {
  935|      0|                                                        default:
  ------------------
  |  Branch (935:57): [True: 0, False: 0]
  ------------------
  936|      0|                                                            break;
  937|      0|                                                        case '_':
  ------------------
  |  Branch (937:57): [True: 0, False: 0]
  ------------------
  938|      0|                                                            if (ossl_likely(strcmp("interval", s + 12) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  939|       |                                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
  940|      0|                                                                if (ossl_unlikely(r->reseed_int != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  941|      0|                                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                                  ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  942|      0|                                                                                   "param %s is repeated", s);
  943|      0|                                                                    return 0;
  944|      0|                                                                }
  945|      0|                                                                r->reseed_int = (OSSL_PARAM *)p;
  946|      0|                                                            }
  947|      0|                                                            break;
  948|      0|                                                        case '\0':
  ------------------
  |  Branch (948:57): [True: 0, False: 0]
  ------------------
  949|      0|                                                            if (ossl_unlikely(r->reseed_time != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  950|      0|                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  951|      0|                                                                               "param %s is repeated", s);
  952|      0|                                                                return 0;
  953|      0|                                                            }
  954|      0|                                                            r->reseed_time = (OSSL_PARAM *)p;
  955|      0|                                                        }
  956|      0|                                                    }
  957|      0|                                                }
  958|      0|                                            }
  959|  23.7k|                                        }
  960|  23.7k|                                    }
  961|  23.7k|                                }
  962|  23.7k|                            }
  963|  23.7k|                        }
  964|  23.7k|                    }
  965|  23.7k|                }
  966|  23.7k|                break;
  967|  23.7k|            case 's':
  ------------------
  |  Branch (967:13): [True: 12.9k, False: 46.5k]
  ------------------
  968|  12.9k|                switch(s[1]) {
  969|      0|                default:
  ------------------
  |  Branch (969:17): [True: 0, False: 12.9k]
  ------------------
  970|      0|                    break;
  971|  12.9k|                case 't':
  ------------------
  |  Branch (971:17): [True: 12.9k, False: 0]
  ------------------
  972|  12.9k|                    switch(s[2]) {
  973|      0|                    default:
  ------------------
  |  Branch (973:21): [True: 0, False: 12.9k]
  ------------------
  974|      0|                        break;
  975|  9.99k|                    case 'a':
  ------------------
  |  Branch (975:21): [True: 9.99k, False: 3.00k]
  ------------------
  976|  9.99k|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|  9.99k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 9.99k, False: 0]
  |  |  ------------------
  ------------------
  977|       |                            /* OSSL_RAND_PARAM_STATE */
  978|  9.99k|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|  9.99k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 9.99k]
  |  |  ------------------
  ------------------
  979|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  980|      0|                                               "param %s is repeated", s);
  981|      0|                                return 0;
  982|      0|                            }
  983|  9.99k|                            r->state = (OSSL_PARAM *)p;
  984|  9.99k|                        }
  985|  9.99k|                        break;
  986|  9.99k|                    case 'r':
  ------------------
  |  Branch (986:21): [True: 3.00k, False: 9.99k]
  ------------------
  987|  3.00k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  3.00k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 3.00k, False: 0]
  |  |  ------------------
  ------------------
  988|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  989|  3.00k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  3.00k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 3.00k]
  |  |  ------------------
  ------------------
  990|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  991|      0|                                               "param %s is repeated", s);
  992|      0|                                return 0;
  993|      0|                            }
  994|  3.00k|                            r->str = (OSSL_PARAM *)p;
  995|  3.00k|                        }
  996|  12.9k|                    }
  997|  12.9k|                }
  998|  12.9k|                break;
  999|  12.9k|            case 'u':
  ------------------
  |  Branch (999:13): [True: 0, False: 59.5k]
  ------------------
 1000|      0|                if (ossl_likely(strcmp("se_derivation_function", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1001|       |                    /* OSSL_DRBG_PARAM_USE_DF */
 1002|      0|                    if (ossl_unlikely(r->df != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1003|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
 1004|      0|                                       "param %s is repeated", s);
 1005|      0|                        return 0;
 1006|      0|                    }
 1007|      0|                    r->df = (OSSL_PARAM *)p;
 1008|      0|                }
 1009|  59.5k|            }
 1010|  59.5k|    return 1;
 1011|  59.5k|}

seed_src.c:seed_src_new:
   51|    500|{
   52|    500|    PROV_SEED_SRC *s;
   53|       |
   54|    500|    if (parent != NULL) {
  ------------------
  |  Branch (54:9): [True: 0, False: 500]
  ------------------
   55|      0|        ERR_raise(ERR_LIB_PROV, PROV_R_SEED_SOURCES_MUST_NOT_HAVE_A_PARENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   56|      0|        return NULL;
   57|      0|    }
   58|       |
   59|    500|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  108|    500|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   60|    500|    if (s == NULL)
  ------------------
  |  Branch (60:9): [True: 0, False: 500]
  ------------------
   61|      0|        return NULL;
   62|       |
   63|    500|    s->provctx = provctx;
   64|    500|    s->state = EVP_RAND_STATE_UNINITIALISED;
  ------------------
  |  | 1345|    500|#define EVP_RAND_STATE_UNINITIALISED 0
  ------------------
   65|    500|    return s;
   66|    500|}
seed_src.c:seed_src_free:
   69|    500|{
   70|    500|    OPENSSL_free(vseed);
  ------------------
  |  |  131|    500|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   71|    500|}
seed_src.c:seed_src_instantiate:
   77|    500|{
   78|    500|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
   79|       |
   80|    500|    s->state = EVP_RAND_STATE_READY;
  ------------------
  |  | 1346|    500|#define EVP_RAND_STATE_READY 1
  ------------------
   81|    500|    return 1;
   82|    500|}
seed_src.c:seed_src_enable_locking:
  294|    500|{
  295|    500|    return 1;
  296|    500|}
seed_src.c:seed_src_lock:
  299|  4.50k|{
  300|  4.50k|    return 1;
  301|  4.50k|}
seed_src.c:seed_src_unlock:
  304|  4.50k|{
  305|  4.50k|}
seed_src.c:seed_src_get_ctx_params:
  229|  3.00k|{
  230|  3.00k|    PROV_SEED_SRC *s = (PROV_SEED_SRC *)vseed;
  231|  3.00k|    struct seed_src_get_ctx_params_st p;
  232|       |
  233|  3.00k|    if (s == NULL || !seed_src_get_ctx_params_decoder(params, &p))
  ------------------
  |  Branch (233:9): [True: 0, False: 3.00k]
  |  Branch (233:22): [True: 0, False: 3.00k]
  ------------------
  234|      0|        return 0;
  235|       |
  236|  3.00k|    if (p.state != NULL && !OSSL_PARAM_set_int(p.state, s->state))
  ------------------
  |  Branch (236:9): [True: 0, False: 3.00k]
  |  Branch (236:28): [True: 0, False: 0]
  ------------------
  237|      0|        return 0;
  238|       |
  239|  3.00k|    if (p.str != NULL && !OSSL_PARAM_set_uint(p.str, 1024))
  ------------------
  |  Branch (239:9): [True: 1.00k, False: 2.00k]
  |  Branch (239:26): [True: 0, False: 1.00k]
  ------------------
  240|      0|        return 0;
  241|       |
  242|  3.00k|    if (p.maxreq != NULL && !OSSL_PARAM_set_size_t(p.maxreq, 128))
  ------------------
  |  Branch (242:9): [True: 0, False: 3.00k]
  |  Branch (242:29): [True: 0, False: 0]
  ------------------
  243|      0|        return 0;
  244|  3.00k|    return 1;
  245|  3.00k|}
seed_src.c:seed_src_get_ctx_params_decoder:
  170|  3.00k|{
  171|  3.00k|    const char *s;
  172|       |
  173|  3.00k|    memset(r, 0, sizeof(*r));
  174|  3.00k|    if (p != NULL)
  ------------------
  |  Branch (174:9): [True: 3.00k, False: 0]
  ------------------
  175|  6.00k|        for (; (s = p->key) != NULL; p++)
  ------------------
  |  Branch (175:16): [True: 3.00k, False: 3.00k]
  ------------------
  176|  3.00k|            switch(s[0]) {
  177|  2.00k|            default:
  ------------------
  |  Branch (177:13): [True: 2.00k, False: 1.00k]
  ------------------
  178|  2.00k|                break;
  179|  2.00k|            case 'm':
  ------------------
  |  Branch (179:13): [True: 0, False: 3.00k]
  ------------------
  180|      0|                if (ossl_likely(strcmp("ax_request", s + 1) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  181|       |                    /* OSSL_RAND_PARAM_MAX_REQUEST */
  182|      0|                    if (ossl_unlikely(r->maxreq != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  183|      0|                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                      ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  184|      0|                                       "param %s is repeated", s);
  185|      0|                        return 0;
  186|      0|                    }
  187|      0|                    r->maxreq = (OSSL_PARAM *)p;
  188|      0|                }
  189|      0|                break;
  190|  1.00k|            case 's':
  ------------------
  |  Branch (190:13): [True: 1.00k, False: 2.00k]
  ------------------
  191|  1.00k|                switch(s[1]) {
  192|      0|                default:
  ------------------
  |  Branch (192:17): [True: 0, False: 1.00k]
  ------------------
  193|      0|                    break;
  194|  1.00k|                case 't':
  ------------------
  |  Branch (194:17): [True: 1.00k, False: 0]
  ------------------
  195|  1.00k|                    switch(s[2]) {
  196|      0|                    default:
  ------------------
  |  Branch (196:21): [True: 0, False: 1.00k]
  ------------------
  197|      0|                        break;
  198|      0|                    case 'a':
  ------------------
  |  Branch (198:21): [True: 0, False: 1.00k]
  ------------------
  199|      0|                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
  ------------------
  |  |   22|      0|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  200|       |                            /* OSSL_RAND_PARAM_STATE */
  201|      0|                            if (ossl_unlikely(r->state != NULL)) {
  ------------------
  |  |   23|      0|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  202|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  203|      0|                                               "param %s is repeated", s);
  204|      0|                                return 0;
  205|      0|                            }
  206|      0|                            r->state = (OSSL_PARAM *)p;
  207|      0|                        }
  208|      0|                        break;
  209|  1.00k|                    case 'r':
  ------------------
  |  Branch (209:21): [True: 1.00k, False: 0]
  ------------------
  210|  1.00k|                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
  ------------------
  |  |   22|  1.00k|#define ossl_likely(x) __builtin_expect(!!(x), 1)
  |  |  ------------------
  |  |  |  Branch (22:24): [True: 1.00k, False: 0]
  |  |  ------------------
  ------------------
  211|       |                            /* OSSL_RAND_PARAM_STRENGTH */
  212|  1.00k|                            if (ossl_unlikely(r->str != NULL)) {
  ------------------
  |  |   23|  1.00k|#define ossl_unlikely(x) __builtin_expect(!!(x), 0)
  |  |  ------------------
  |  |  |  Branch (23:26): [True: 0, False: 1.00k]
  |  |  ------------------
  ------------------
  213|      0|                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  120|      0|#define ERR_LIB_PROV 57
  ------------------
                                              ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
  ------------------
  |  |  135|      0|#define PROV_R_REPEATED_PARAMETER 252
  ------------------
  214|      0|                                               "param %s is repeated", s);
  215|      0|                                return 0;
  216|      0|                            }
  217|  1.00k|                            r->str = (OSSL_PARAM *)p;
  218|  1.00k|                        }
  219|  1.00k|                    }
  220|  1.00k|                }
  221|  3.00k|            }
  222|  3.00k|    return 1;
  223|  3.00k|}
seed_src.c:seed_get_seed:
  262|    500|{
  263|    500|    size_t ret = 0;
  264|    500|    size_t entropy_available = 0;
  265|    500|    RAND_POOL *pool;
  266|       |
  267|    500|    pool = ossl_rand_pool_new(entropy, 1, min_len, max_len);
  268|    500|    if (pool == NULL) {
  ------------------
  |  Branch (268:9): [True: 0, False: 500]
  ------------------
  269|      0|        ERR_raise(ERR_LIB_PROV, ERR_R_RAND_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  270|      0|        return 0;
  271|      0|    }
  272|       |
  273|       |    /* Get entropy by polling system entropy sources. */
  274|    500|    entropy_available = ossl_pool_acquire_entropy(pool);
  275|       |
  276|    500|    if (entropy_available > 0
  ------------------
  |  Branch (276:9): [True: 500, False: 0]
  ------------------
  277|    500|        && ossl_rand_pool_adin_mix_in(pool, adin, adin_len)) {
  ------------------
  |  Branch (277:12): [True: 500, False: 0]
  ------------------
  278|    500|        ret = ossl_rand_pool_length(pool);
  279|    500|        *pout = ossl_rand_pool_detach(pool);
  280|    500|    } else {
  281|       |        ERR_raise(ERR_LIB_PROV, PROV_R_ENTROPY_SOURCE_STRENGTH_TOO_WEAK);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  282|      0|    }
  283|    500|    ossl_rand_pool_free(pool);
  284|    500|    return ret;
  285|    500|}
seed_src.c:seed_clear_seed:
  289|    500|{
  290|    500|    OPENSSL_secure_clear_free(out, outlen);
  ------------------
  |  |  149|    500|    CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  291|    500|}

ossl_rand_pool_init:
  571|      1|{
  572|      1|    size_t i;
  573|       |
  574|      5|    for (i = 0; i < OSSL_NELEM(random_devices); i++)
  ------------------
  |  |   14|      5|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (574:17): [True: 4, False: 1]
  ------------------
  575|      4|        random_devices[i].fd = -1;
  576|       |
  577|      1|    return 1;
  578|      1|}
ossl_rand_pool_cleanup:
  581|      1|{
  582|      1|    size_t i;
  583|       |
  584|      5|    for (i = 0; i < OSSL_NELEM(random_devices); i++)
  ------------------
  |  |   14|      5|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (584:17): [True: 4, False: 1]
  ------------------
  585|      4|        close_random_device(i);
  586|      1|}
ossl_pool_acquire_entropy:
  631|    500|{
  632|       |#if defined(OPENSSL_RAND_SEED_NONE)
  633|       |    return ossl_rand_pool_entropy_available(pool);
  634|       |#else
  635|    500|    size_t entropy_available = 0;
  636|       |
  637|    500|    (void)entropy_available; /* avoid compiler warning */
  638|       |
  639|    500|#if defined(OPENSSL_RAND_SEED_GETRANDOM)
  640|    500|    {
  641|    500|        size_t bytes_needed;
  642|    500|        unsigned char *buffer;
  643|    500|        ssize_t bytes;
  644|       |        /* Maximum allowed number of consecutive unsuccessful attempts */
  645|    500|        int attempts = 3;
  646|       |
  647|    500|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  648|  1.00k|        while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (648:16): [True: 500, False: 500]
  |  Branch (648:37): [True: 500, False: 0]
  ------------------
  649|    500|            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  650|    500|            bytes = syscall_random(buffer, bytes_needed);
  651|    500|            if (bytes > 0) {
  ------------------
  |  Branch (651:17): [True: 500, False: 0]
  ------------------
  652|    500|                ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  653|    500|                bytes_needed -= bytes;
  654|    500|                attempts = 3; /* reset counter after successful attempt */
  655|    500|            } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (655:24): [True: 0, False: 0]
  |  Branch (655:37): [True: 0, False: 0]
  ------------------
  656|      0|                break;
  657|      0|            }
  658|    500|        }
  659|    500|    }
  660|    500|    entropy_available = ossl_rand_pool_entropy_available(pool);
  661|    500|    if (entropy_available > 0)
  ------------------
  |  Branch (661:9): [True: 500, False: 0]
  ------------------
  662|    500|        return entropy_available;
  663|      0|#endif
  664|       |
  665|      0|#if defined(OPENSSL_RAND_SEED_DEVRANDOM)
  666|      0|    if (wait_random_seeded()) {
  ------------------
  |  Branch (666:9): [True: 0, False: 0]
  ------------------
  667|      0|        size_t bytes_needed;
  668|      0|        unsigned char *buffer;
  669|      0|        size_t i;
  670|       |
  671|      0|        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  672|      0|        for (i = 0; bytes_needed > 0 && i < OSSL_NELEM(random_device_paths);
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (672:21): [True: 0, False: 0]
  |  Branch (672:41): [True: 0, False: 0]
  ------------------
  673|      0|            i++) {
  674|      0|            ssize_t bytes = 0;
  675|       |            /* Maximum number of consecutive unsuccessful attempts */
  676|      0|            int attempts = 3;
  677|      0|            const int fd = get_random_device(i);
  678|       |
  679|      0|            if (fd == -1)
  ------------------
  |  Branch (679:17): [True: 0, False: 0]
  ------------------
  680|      0|                continue;
  681|       |
  682|      0|            while (bytes_needed != 0 && attempts-- > 0) {
  ------------------
  |  Branch (682:20): [True: 0, False: 0]
  |  Branch (682:41): [True: 0, False: 0]
  ------------------
  683|      0|                buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  684|      0|                bytes = read(fd, buffer, bytes_needed);
  685|       |
  686|      0|                if (bytes > 0) {
  ------------------
  |  Branch (686:21): [True: 0, False: 0]
  ------------------
  687|      0|                    ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  688|      0|                    bytes_needed -= bytes;
  689|      0|                    attempts = 3; /* reset counter on successful attempt */
  690|      0|                } else if (bytes < 0 && errno != EINTR) {
  ------------------
  |  Branch (690:28): [True: 0, False: 0]
  |  Branch (690:41): [True: 0, False: 0]
  ------------------
  691|      0|                    break;
  692|      0|                }
  693|      0|            }
  694|      0|            if (bytes < 0 || !keep_random_devices_open)
  ------------------
  |  Branch (694:17): [True: 0, False: 0]
  |  Branch (694:30): [True: 0, False: 0]
  ------------------
  695|      0|                close_random_device(i);
  696|       |
  697|      0|            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  698|      0|        }
  699|      0|        entropy_available = ossl_rand_pool_entropy_available(pool);
  700|      0|        if (entropy_available > 0)
  ------------------
  |  Branch (700:13): [True: 0, False: 0]
  ------------------
  701|      0|            return entropy_available;
  702|      0|    }
  703|      0|#endif
  704|       |
  705|       |#if defined(OPENSSL_RAND_SEED_RDTSC)
  706|       |    entropy_available = ossl_prov_acquire_entropy_from_tsc(pool);
  707|       |    if (entropy_available > 0)
  708|       |        return entropy_available;
  709|       |#endif
  710|       |
  711|       |#if defined(OPENSSL_RAND_SEED_RDCPU)
  712|       |    entropy_available = ossl_prov_acquire_entropy_from_cpu(pool);
  713|       |    if (entropy_available > 0)
  714|       |        return entropy_available;
  715|       |#endif
  716|       |
  717|       |#if defined(OPENSSL_RAND_SEED_EGD)
  718|       |    {
  719|       |        static const char *paths[] = { DEVRANDOM_EGD, NULL };
  720|       |        size_t bytes_needed;
  721|       |        unsigned char *buffer;
  722|       |        int i;
  723|       |
  724|       |        bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/);
  725|       |        for (i = 0; bytes_needed > 0 && paths[i] != NULL; i++) {
  726|       |            size_t bytes = 0;
  727|       |            int num;
  728|       |
  729|       |            buffer = ossl_rand_pool_add_begin(pool, bytes_needed);
  730|       |            num = RAND_query_egd_bytes(paths[i],
  731|       |                buffer, (int)bytes_needed);
  732|       |            if (num == (int)bytes_needed)
  733|       |                bytes = bytes_needed;
  734|       |
  735|       |            ossl_rand_pool_add_end(pool, bytes, 8 * bytes);
  736|       |            bytes_needed = ossl_rand_pool_bytes_needed(pool, 1);
  737|       |        }
  738|       |        entropy_available = ossl_rand_pool_entropy_available(pool);
  739|       |        if (entropy_available > 0)
  740|       |            return entropy_available;
  741|       |    }
  742|       |#endif
  743|       |
  744|      0|    return ossl_rand_pool_entropy_available(pool);
  745|      0|#endif
  746|      0|}
rand_unix.c:close_random_device:
  562|      4|{
  563|      4|    struct random_device *rd = &random_devices[n];
  564|       |
  565|      4|    if (check_random_device(rd))
  ------------------
  |  Branch (565:9): [True: 0, False: 4]
  ------------------
  566|      0|        close(rd->fd);
  567|      4|    rd->fd = -1;
  568|      4|}
rand_unix.c:check_random_device:
  517|      4|{
  518|      4|    struct stat st;
  519|       |
  520|      4|    return rd->fd != -1
  ------------------
  |  Branch (520:12): [True: 0, False: 4]
  ------------------
  521|      0|        && fstat(rd->fd, &st) != -1
  ------------------
  |  Branch (521:12): [True: 0, False: 0]
  ------------------
  522|      0|        && rd->dev == st.st_dev
  ------------------
  |  Branch (522:12): [True: 0, False: 0]
  ------------------
  523|      0|        && rd->ino == st.st_ino
  ------------------
  |  Branch (523:12): [True: 0, False: 0]
  ------------------
  524|      0|        && ((rd->mode ^ st.st_mode) & ~(S_IRWXU | S_IRWXG | S_IRWXO)) == 0
  ------------------
  |  Branch (524:12): [True: 0, False: 0]
  ------------------
  525|      0|        && rd->rdev == st.st_rdev;
  ------------------
  |  Branch (525:12): [True: 0, False: 0]
  ------------------
  526|      4|}
rand_unix.c:syscall_random:
  333|    500|{
  334|       |    /*
  335|       |     * Note: 'buflen' equals the size of the buffer which is used by the
  336|       |     * get_entropy() callback of the RAND_DRBG. It is roughly bounded by
  337|       |     *
  338|       |     *   2 * RAND_POOL_FACTOR * (RAND_DRBG_STRENGTH / 8) = 2^14
  339|       |     *
  340|       |     * which is way below the OSSL_SSIZE_MAX limit. Therefore sign conversion
  341|       |     * between size_t and ssize_t is safe even without a range check.
  342|       |     */
  343|       |
  344|       |    /*
  345|       |     * Do runtime detection to find getentropy().
  346|       |     *
  347|       |     * Known OSs that should support this:
  348|       |     * - Darwin since 16 (OSX 10.12, IOS 10.0).
  349|       |     * - Solaris since 11.3
  350|       |     * - OpenBSD since 5.6
  351|       |     * - Linux since 3.17 with glibc 2.25
  352|       |     *
  353|       |     * Note: Sometimes getentropy() can be provided but not implemented
  354|       |     * internally. So we need to check errno for ENOSYS
  355|       |     */
  356|    500|#if !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__FreeBSD__)
  357|    500|#if defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) && !defined(__hpux)
  358|    500|    extern int getentropy(void *buffer, size_t length) __attribute__((weak));
  359|       |
  360|    500|    if (getentropy != NULL) {
  ------------------
  |  Branch (360:9): [True: 500, False: 0]
  ------------------
  361|    500|        if (getentropy(buf, buflen) == 0)
  ------------------
  |  Branch (361:13): [True: 500, False: 0]
  ------------------
  362|    500|            return (ssize_t)buflen;
  363|      0|        if (errno != ENOSYS)
  ------------------
  |  Branch (363:13): [True: 0, False: 0]
  ------------------
  364|      0|            return -1;
  365|      0|    }
  366|       |#elif defined(OPENSSL_APPLE_CRYPTO_RANDOM)
  367|       |
  368|       |    if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
  369|       |        return (ssize_t)buflen;
  370|       |
  371|       |    return -1;
  372|       |#else
  373|       |    union {
  374|       |        void *p;
  375|       |        int (*f)(void *buffer, size_t length);
  376|       |    } p_getentropy;
  377|       |
  378|       |    /*
  379|       |     * We could cache the result of the lookup, but we normally don't
  380|       |     * call this function often.
  381|       |     */
  382|       |    ERR_set_mark();
  383|       |    p_getentropy.p = DSO_global_lookup("getentropy");
  384|       |    ERR_pop_to_mark();
  385|       |    if (p_getentropy.p != NULL)
  386|       |        return p_getentropy.f(buf, buflen) == 0 ? (ssize_t)buflen : -1;
  387|       |#endif
  388|      0|#endif /* !__DragonFly__ && !__NetBSD__ && !__FreeBSD__ */
  389|       |
  390|       |    /* Linux supports this since version 3.17 */
  391|      0|#if defined(__linux) && defined(__NR_getrandom)
  392|      0|    return syscall(__NR_getrandom, buf, buflen, 0);
  393|       |#elif (defined(__DragonFly__) && __DragonFly_version >= 500700) \
  394|       |    || (defined(__NetBSD__) && __NetBSD_Version >= 1000000000)  \
  395|       |    || (defined(__FreeBSD__) && __FreeBSD_version >= 1200061)
  396|       |    return getrandom(buf, buflen, 0);
  397|       |#elif (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(KERN_ARND)
  398|       |    return sysctl_random(buf, buflen);
  399|       |#elif defined(__wasi__)
  400|       |    if (getentropy(buf, buflen) == 0)
  401|       |        return (ssize_t)buflen;
  402|       |    return -1;
  403|       |#else
  404|       |    errno = ENOSYS;
  405|       |    return -1;
  406|       |#endif
  407|    500|}

ossl_null_provider_init:
   74|     18|{
   75|     18|    *out = null_dispatch_table;
   76|       |
   77|       |    /* Could be anything - we don't use it */
   78|     18|    *provctx = (void *)handle;
   79|     18|    return 1;
   80|     18|}
nullprov.c:null_query:
   57|  1.09k|{
   58|  1.09k|    *no_cache = 0;
   59|       |    return NULL;
   60|  1.09k|}

ossl_prov_is_running:
   20|   529k|{
   21|   529k|    return 1;
   22|   529k|}

SSL_get_srtp_profiles:
  162|  1.24k|{
  163|  1.24k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  1.24k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.24k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.24k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.24k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.24k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.24k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.24k|                             : NULL))
  |  |  ------------------
  ------------------
  164|       |
  165|  1.24k|    if (sc != NULL) {
  ------------------
  |  Branch (165:9): [True: 1.24k, False: 0]
  ------------------
  166|  1.24k|        if (sc->srtp_profiles != NULL) {
  ------------------
  |  Branch (166:13): [True: 0, False: 1.24k]
  ------------------
  167|      0|            return sc->srtp_profiles;
  168|  1.24k|        } else if ((s->ctx != NULL) && (s->ctx->srtp_profiles != NULL)) {
  ------------------
  |  Branch (168:20): [True: 1.24k, False: 0]
  |  Branch (168:40): [True: 0, False: 1.24k]
  ------------------
  169|      0|            return s->ctx->srtp_profiles;
  170|      0|        }
  171|  1.24k|    }
  172|       |
  173|  1.24k|    return NULL;
  174|  1.24k|}

ossl_quic_free_token_store:
 4842|  2.09k|{
 4843|  2.09k|    int refs;
 4844|       |
 4845|  2.09k|    if (hdl == NULL)
  ------------------
  |  Branch (4845:9): [True: 2.09k, False: 0]
  ------------------
 4846|  2.09k|        return;
 4847|       |
 4848|      0|    if (!CRYPTO_DOWN_REF(&hdl->references, &refs))
  ------------------
  |  Branch (4848:9): [True: 0, False: 0]
  ------------------
 4849|      0|        return;
 4850|       |
 4851|      0|    if (refs > 0)
  ------------------
  |  Branch (4851:9): [True: 0, False: 0]
  ------------------
 4852|      0|        return;
 4853|       |
 4854|       |    /* last reference, we can clean up */
 4855|      0|    ossl_crypto_mutex_free(&hdl->mutex);
 4856|      0|    lh_QUIC_TOKEN_doall(hdl->cache, free_this_token);
 4857|      0|    lh_QUIC_TOKEN_free(hdl->cache);
 4858|      0|    CRYPTO_FREE_REF(&hdl->references);
 4859|      0|    OPENSSL_free(hdl);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4860|      0|    return;
 4861|      0|}

ossl_quic_tls_free:
  658|  1.31k|{
  659|  1.31k|    if (qtls == NULL)
  ------------------
  |  Branch (659:9): [True: 1.31k, False: 0]
  ------------------
  660|  1.31k|        return;
  661|      0|    OSSL_ERR_STATE_free(qtls->error_state);
  662|      0|    OPENSSL_free(qtls);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  663|      0|}
ossl_quic_tls_clear:
  864|  2.63k|{
  865|  2.63k|    if (qtls == NULL)
  ------------------
  |  Branch (865:9): [True: 2.63k, False: 0]
  ------------------
  866|  2.63k|        return;
  867|      0|    qtls->local_transport_params_consumed = 0;
  868|      0|}

ossl_tls_buffer_release:
   27|  7.89k|{
   28|  7.89k|    OPENSSL_free(b->buf);
  ------------------
  |  |  131|  7.89k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   29|       |    b->buf = NULL;
   30|  7.89k|}
ossl_rlayer_fatal:
   50|    208|{
   51|    208|    va_list args;
   52|       |
   53|    208|    va_start(args, fmt);
   54|    208|    ERR_vset_error(ERR_LIB_SSL, reason, fmt, args);
  ------------------
  |  |   89|    208|#define ERR_LIB_SSL 20
  ------------------
   55|    208|    va_end(args);
   56|       |
   57|    208|    rl->alert = al;
   58|    208|}
tls_setup_write_buffer:
  144|  2.35k|{
  145|  2.35k|    unsigned char *p;
  146|  2.35k|    size_t maxalign = 0, headerlen;
  147|  2.35k|    TLS_BUFFER *wb;
  148|  2.35k|    size_t currpipe;
  149|  2.35k|    size_t defltlen = 0;
  150|  2.35k|    size_t contenttypelen = 0;
  151|       |
  152|  2.35k|    if (firstlen == 0 || (numwpipes > 1 && nextlen == 0)) {
  ------------------
  |  Branch (152:9): [True: 2.35k, False: 0]
  |  Branch (152:27): [True: 0, False: 0]
  |  Branch (152:44): [True: 0, False: 0]
  ------------------
  153|  2.35k|        if (rl->isdtls)
  ------------------
  |  Branch (153:13): [True: 0, False: 2.35k]
  ------------------
  154|      0|            headerlen = DTLS1_RT_HEADER_LENGTH + 1;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  155|  2.35k|        else
  156|  2.35k|            headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  2.35k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  157|       |
  158|       |        /* TLSv1.3 adds an extra content type byte after payload data */
  159|  2.35k|        if (rl->version == TLS1_3_VERSION)
  ------------------
  |  |   27|  2.35k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (159:13): [True: 1, False: 2.35k]
  ------------------
  160|      1|            contenttypelen = 1;
  161|       |
  162|  2.35k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  163|  2.35k|        maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  2.35k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  164|  2.35k|#endif
  165|       |
  166|  2.35k|        defltlen = maxalign + headerlen + rl->eivlen + rl->max_frag_len
  167|  2.35k|            + contenttypelen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  2.35k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  2.35k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  2.35k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  168|  2.35k|#ifndef OPENSSL_NO_COMP
  169|  2.35k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (169:13): [True: 0, False: 2.35k]
  ------------------
  170|      0|            defltlen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  171|  2.35k|#endif
  172|       |        /*
  173|       |         * We don't need to add eivlen here since empty fragments only occur
  174|       |         * when we don't have an explicit IV. The contenttype byte will also
  175|       |         * always be 0 in these protocol versions
  176|       |         */
  177|  2.35k|        if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0)
  ------------------
  |  |  377|  2.35k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  350|  2.35k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (177:13): [True: 2.35k, False: 5]
  ------------------
  178|  2.35k|            defltlen += headerlen + maxalign + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD;
  ------------------
  |  |  195|  2.35k|    (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  172|  2.35k|#define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
  |  |  ------------------
  |  |                   (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  2.35k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  179|  2.35k|    }
  180|       |
  181|  2.35k|    wb = rl->wbuf;
  182|  4.71k|    for (currpipe = 0; currpipe < numwpipes; currpipe++) {
  ------------------
  |  Branch (182:24): [True: 2.35k, False: 2.35k]
  ------------------
  183|  2.35k|        TLS_BUFFER *thiswb = &wb[currpipe];
  184|  2.35k|        size_t len = (currpipe == 0) ? firstlen : nextlen;
  ------------------
  |  Branch (184:22): [True: 2.35k, False: 0]
  ------------------
  185|       |
  186|  2.35k|        if (len == 0)
  ------------------
  |  Branch (186:13): [True: 2.35k, False: 0]
  ------------------
  187|  2.35k|            len = defltlen;
  188|       |
  189|  2.35k|        if (thiswb->len != len) {
  ------------------
  |  Branch (189:13): [True: 1.31k, False: 1.03k]
  ------------------
  190|  1.31k|            OPENSSL_free(thiswb->buf);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  191|  1.31k|            thiswb->buf = NULL; /* force reallocation */
  192|  1.31k|        }
  193|       |
  194|  2.35k|        p = thiswb->buf;
  195|  2.35k|        if (p == NULL) {
  ------------------
  |  Branch (195:13): [True: 1.31k, False: 1.03k]
  ------------------
  196|  1.31k|            p = OPENSSL_malloc(len);
  ------------------
  |  |  106|  1.31k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  197|  1.31k|            if (p == NULL) {
  ------------------
  |  Branch (197:17): [True: 0, False: 1.31k]
  ------------------
  198|      0|                if (rl->numwpipes < currpipe)
  ------------------
  |  Branch (198:21): [True: 0, False: 0]
  ------------------
  199|      0|                    rl->numwpipes = currpipe;
  200|       |                /*
  201|       |                 * We've got a malloc failure, and we're still initialising
  202|       |                 * buffers. We assume we're so doomed that we won't even be able
  203|       |                 * to send an alert.
  204|       |                 */
  205|      0|                RLAYERfatal(rl, SSL_AD_NO_ALERT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  206|      0|                return 0;
  207|      0|            }
  208|  1.31k|        }
  209|  2.35k|        memset(thiswb, 0, sizeof(TLS_BUFFER));
  210|  2.35k|        thiswb->buf = p;
  211|  2.35k|        thiswb->len = len;
  212|  2.35k|    }
  213|       |
  214|       |    /* Free any previously allocated buffers that we are no longer using */
  215|  2.35k|    tls_release_write_buffer_int(rl, currpipe);
  216|       |
  217|  2.35k|    rl->numwpipes = numwpipes;
  218|       |
  219|  2.35k|    return 1;
  220|  2.35k|}
tls_setup_read_buffer:
  230|  1.24k|{
  231|  1.24k|    unsigned char *p;
  232|  1.24k|    size_t len, maxalign = 0, headerlen;
  233|  1.24k|    TLS_BUFFER *b;
  234|       |
  235|  1.24k|    b = &rl->rbuf;
  236|       |
  237|  1.24k|    if (rl->isdtls)
  ------------------
  |  Branch (237:9): [True: 0, False: 1.24k]
  ------------------
  238|      0|        headerlen = DTLS1_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  239|  1.24k|    else
  240|  1.24k|        headerlen = SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  1.24k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  241|       |
  242|  1.24k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  243|  1.24k|    maxalign = SSL3_ALIGN_PAYLOAD - 1;
  ------------------
  |  |  152|  1.24k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  244|  1.24k|#endif
  245|       |
  246|  1.24k|    if (b->buf == NULL) {
  ------------------
  |  Branch (246:9): [True: 1.24k, False: 0]
  ------------------
  247|  1.24k|        len = rl->max_frag_len
  248|  1.24k|            + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + maxalign;
  ------------------
  |  |  186|  1.24k|#define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
  |  |  ------------------
  |  |  |  |  166|  1.24k|#define SSL3_RT_MAX_MD_SIZE 64
  |  |  ------------------
  ------------------
  249|  1.24k|#ifndef OPENSSL_NO_COMP
  250|  1.24k|        if (tls_allow_compression(rl))
  ------------------
  |  Branch (250:13): [True: 0, False: 1.24k]
  ------------------
  251|      0|            len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
  252|  1.24k|#endif
  253|       |
  254|       |        /* Ensure our buffer is large enough to support all our pipelines */
  255|  1.24k|        if (rl->max_pipelines > 1)
  ------------------
  |  Branch (255:13): [True: 0, False: 1.24k]
  ------------------
  256|      0|            len *= rl->max_pipelines;
  257|       |
  258|  1.24k|        if (b->default_len > len)
  ------------------
  |  Branch (258:13): [True: 1.24k, False: 0]
  ------------------
  259|  1.24k|            len = b->default_len;
  260|       |
  261|  1.24k|        if ((p = OPENSSL_malloc(len)) == NULL) {
  ------------------
  |  |  106|  1.24k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (261:13): [True: 0, False: 1.24k]
  ------------------
  262|       |            /*
  263|       |             * We've got a malloc failure, and we're still initialising buffers.
  264|       |             * We assume we're so doomed that we won't even be able to send an
  265|       |             * alert.
  266|       |             */
  267|      0|            RLAYERfatal(rl, SSL_AD_NO_ALERT, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  268|      0|            return 0;
  269|      0|        }
  270|  1.24k|        b->buf = p;
  271|  1.24k|        b->len = len;
  272|  1.24k|    }
  273|       |
  274|  1.24k|    return 1;
  275|  1.24k|}
tls_default_read_n:
  296|  1.76k|{
  297|       |    /*
  298|       |     * If extend == 0, obtain new n-byte packet; if extend == 1, increase
  299|       |     * packet by another n bytes. The packet will be in the sub-array of
  300|       |     * rl->rbuf.buf specified by rl->packet and rl->packet_length. (If
  301|       |     * rl->read_ahead is set, 'max' bytes may be stored in rbuf [plus
  302|       |     * rl->packet_length bytes if extend == 1].) if clearold == 1, move the
  303|       |     * packet to the start of the buffer; if clearold == 0 then leave any old
  304|       |     * packets where they were
  305|       |     */
  306|  1.76k|    size_t len, left, align = 0;
  307|  1.76k|    unsigned char *pkt;
  308|  1.76k|    TLS_BUFFER *rb;
  309|       |
  310|  1.76k|    if (n == 0)
  ------------------
  |  Branch (310:9): [True: 0, False: 1.76k]
  ------------------
  311|      0|        return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  312|       |
  313|  1.76k|    rb = &rl->rbuf;
  314|  1.76k|    left = rb->left;
  315|  1.76k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
  316|  1.76k|    align = (size_t)rb->buf + SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  1.76k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  317|  1.76k|    align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  1.76k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
                  align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  1.76k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
  318|  1.76k|#endif
  319|       |
  320|  1.76k|    if (!extend) {
  ------------------
  |  Branch (320:9): [True: 1.57k, False: 192]
  ------------------
  321|       |        /* start with empty packet ... */
  322|  1.57k|        if (left == 0)
  ------------------
  |  Branch (322:13): [True: 1.57k, False: 1]
  ------------------
  323|  1.57k|            rb->offset = align;
  324|       |
  325|  1.57k|        rl->packet = rb->buf + rb->offset;
  326|  1.57k|        rl->packet_length = 0;
  327|       |        /* ... now we can act as if 'extend' was set */
  328|  1.57k|    }
  329|       |
  330|  1.76k|    if (!ossl_assert(rl->packet != NULL)) {
  ------------------
  |  |   52|  1.76k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.76k|    __FILE__, __LINE__)
  ------------------
  |  Branch (330:9): [True: 0, False: 1.76k]
  ------------------
  331|       |        /* does not happen */
  332|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  333|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  334|      0|    }
  335|       |
  336|  1.76k|    len = rl->packet_length;
  337|  1.76k|    pkt = rb->buf + align;
  338|       |    /*
  339|       |     * Move any available bytes to front of buffer: 'len' bytes already
  340|       |     * pointed to by 'packet', 'left' extra ones at the end
  341|       |     */
  342|  1.76k|    if (rl->packet != pkt && clearold == 1) {
  ------------------
  |  Branch (342:9): [True: 0, False: 1.76k]
  |  Branch (342:30): [True: 0, False: 0]
  ------------------
  343|      0|        memmove(pkt, rl->packet, len + left);
  344|      0|        rl->packet = pkt;
  345|      0|        rb->offset = len + align;
  346|      0|    }
  347|       |
  348|       |    /*
  349|       |     * For DTLS/UDP reads should not span multiple packets because the read
  350|       |     * operation returns the whole packet at once (as long as it fits into
  351|       |     * the buffer).
  352|       |     */
  353|  1.76k|    if (rl->isdtls) {
  ------------------
  |  Branch (353:9): [True: 0, False: 1.76k]
  ------------------
  354|      0|        if (left == 0 && extend) {
  ------------------
  |  Branch (354:13): [True: 0, False: 0]
  |  Branch (354:26): [True: 0, False: 0]
  ------------------
  355|       |            /*
  356|       |             * We received a record with a header but no body data. This will
  357|       |             * get dumped.
  358|       |             */
  359|      0|            return OSSL_RECORD_RETURN_NON_FATAL_ERR;
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  360|      0|        }
  361|      0|        if (left > 0 && n > left)
  ------------------
  |  Branch (361:13): [True: 0, False: 0]
  |  Branch (361:25): [True: 0, False: 0]
  ------------------
  362|      0|            n = left;
  363|      0|    }
  364|       |
  365|       |    /* if there is enough in the buffer from a previous read, take some */
  366|  1.76k|    if (left >= n) {
  ------------------
  |  Branch (366:9): [True: 0, False: 1.76k]
  ------------------
  367|      0|        rl->packet_length += n;
  368|      0|        rb->left = left - n;
  369|      0|        rb->offset += n;
  370|      0|        *readbytes = n;
  371|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  372|      0|    }
  373|       |
  374|       |    /* else we need to read more data */
  375|       |
  376|  1.76k|    if (n > rb->len - rb->offset) {
  ------------------
  |  Branch (376:9): [True: 0, False: 1.76k]
  ------------------
  377|       |        /* does not happen */
  378|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  379|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  380|      0|    }
  381|       |
  382|       |    /* We always act like read_ahead is set for DTLS */
  383|  1.76k|    if (!rl->read_ahead && !rl->isdtls) {
  ------------------
  |  Branch (383:9): [True: 1.76k, False: 0]
  |  Branch (383:28): [True: 1.76k, False: 0]
  ------------------
  384|       |        /* ignore max parameter */
  385|  1.76k|        max = n;
  386|  1.76k|    } else {
  387|      0|        if (max < n)
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            max = n;
  389|      0|        if (max > rb->len - rb->offset)
  ------------------
  |  Branch (389:13): [True: 0, False: 0]
  ------------------
  390|      0|            max = rb->len - rb->offset;
  391|      0|    }
  392|       |
  393|  2.46k|    while (left < n) {
  ------------------
  |  Branch (393:12): [True: 1.87k, False: 596]
  ------------------
  394|  1.87k|        size_t bioread = 0;
  395|  1.87k|        int ret;
  396|  1.87k|        BIO *bio = rl->prev != NULL ? rl->prev : rl->bio;
  ------------------
  |  Branch (396:20): [True: 0, False: 1.87k]
  ------------------
  397|       |
  398|       |        /*
  399|       |         * Now we have len+left bytes at the front of rl->rbuf.buf and
  400|       |         * need to read in more until we have len + n (up to len + max if
  401|       |         * possible)
  402|       |         */
  403|       |
  404|  1.87k|        clear_sys_error();
  ------------------
  |  |   31|  1.87k|#define clear_sys_error() errno = 0
  ------------------
  405|  1.87k|        if (bio != NULL) {
  ------------------
  |  Branch (405:13): [True: 1.87k, False: 0]
  ------------------
  406|  1.87k|            ret = BIO_read(bio, pkt + len + left, (int)(max - left));
  407|  1.87k|            if (ret > 0) {
  ------------------
  |  Branch (407:17): [True: 704, False: 1.16k]
  ------------------
  408|    704|                bioread = ret;
  409|    704|                ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    704|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  410|  1.16k|            } else if (BIO_should_retry(bio)) {
  ------------------
  |  |  272|  1.16k|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|  1.16k|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (272:29): [True: 248, False: 919]
  |  |  ------------------
  ------------------
  411|    248|                if (rl->prev != NULL) {
  ------------------
  |  Branch (411:21): [True: 0, False: 248]
  ------------------
  412|       |                    /*
  413|       |                     * We were reading from the previous epoch. Now there is no
  414|       |                     * more data, so swap to the actual transport BIO
  415|       |                     */
  416|      0|                    BIO_free(rl->prev);
  417|      0|                    rl->prev = NULL;
  418|      0|                    continue;
  419|      0|                }
  420|    248|                ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|    248|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  421|    919|            } else if (BIO_eof(bio)) {
  ------------------
  |  |  633|    919|#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL)
  |  |  ------------------
  |  |  |  |   91|    919|#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
  |  |  ------------------
  |  |  |  Branch (633:20): [True: 912, False: 7]
  |  |  ------------------
  ------------------
  422|    912|                ret = OSSL_RECORD_RETURN_EOF;
  ------------------
  |  |   49|    912|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  423|    912|            } else {
  424|      7|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      7|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  425|      7|            }
  426|  1.87k|        } else {
  427|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_READ_BIO_NOT_SET);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  428|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  429|      0|        }
  430|       |
  431|  1.87k|        if (ret <= OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  1.87k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (431:13): [True: 1.16k, False: 704]
  ------------------
  432|  1.16k|            rb->left = left;
  433|  1.16k|            if ((rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0 && !rl->isdtls)
  ------------------
  |  |  515|  1.16k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (433:17): [True: 0, False: 1.16k]
  |  Branch (433:63): [True: 0, False: 0]
  ------------------
  434|      0|                if (len + left == 0)
  ------------------
  |  Branch (434:21): [True: 0, False: 0]
  ------------------
  435|      0|                    tls_release_read_buffer(rl);
  436|  1.16k|            return ret;
  437|  1.16k|        }
  438|    704|        left += bioread;
  439|       |        /*
  440|       |         * reads should *never* span multiple packets for DTLS because the
  441|       |         * underlying transport protocol is message oriented as opposed to
  442|       |         * byte oriented as in the TLS case.
  443|       |         */
  444|    704|        if (rl->isdtls) {
  ------------------
  |  Branch (444:13): [True: 0, False: 704]
  ------------------
  445|      0|            if (n > left)
  ------------------
  |  Branch (445:17): [True: 0, False: 0]
  ------------------
  446|      0|                n = left; /* makes the while condition false */
  447|      0|        }
  448|    704|    }
  449|       |
  450|       |    /* done reading, now the book-keeping */
  451|    596|    rb->offset += n;
  452|    596|    rb->left = left - n;
  453|    596|    rl->packet_length += n;
  454|    596|    *readbytes = n;
  455|    596|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    596|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  456|  1.76k|}
tls_get_more_records:
  544|  1.57k|{
  545|  1.57k|    int enc_err, rret;
  546|  1.57k|    int i;
  547|  1.57k|    size_t more, n;
  548|  1.57k|    TLS_RL_RECORD *rr, *thisrr;
  549|  1.57k|    TLS_BUFFER *rbuf;
  550|  1.57k|    unsigned char *p;
  551|  1.57k|    unsigned char md[EVP_MAX_MD_SIZE];
  552|  1.57k|    unsigned int version;
  553|  1.57k|    size_t mac_size = 0;
  554|  1.57k|    int imac_size;
  555|  1.57k|    size_t num_recs = 0, max_recs, j;
  556|  1.57k|    PACKET pkt, sslv2pkt;
  557|  1.57k|    SSL_MAC_BUF *macbufs = NULL;
  558|  1.57k|    int ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|  1.57k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  559|       |
  560|  1.57k|    rr = rl->rrec;
  561|  1.57k|    rbuf = &rl->rbuf;
  562|  1.57k|    if (rbuf->buf == NULL) {
  ------------------
  |  Branch (562:9): [True: 1.24k, False: 332]
  ------------------
  563|  1.24k|        if (!tls_setup_read_buffer(rl)) {
  ------------------
  |  Branch (563:13): [True: 0, False: 1.24k]
  ------------------
  564|       |            /* RLAYERfatal() already called */
  565|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  566|      0|        }
  567|  1.24k|    }
  568|       |
  569|  1.57k|    max_recs = rl->max_pipelines;
  570|       |
  571|  1.57k|    if (max_recs == 0)
  ------------------
  |  Branch (571:9): [True: 1.57k, False: 0]
  ------------------
  572|  1.57k|        max_recs = 1;
  573|       |
  574|  1.57k|    do {
  575|  1.57k|        thisrr = &rr[num_recs];
  576|       |
  577|       |        /* check if we have the header */
  578|  1.57k|        if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  | 1161|  1.57k|#define SSL_ST_READ_BODY 0xF1
  ------------------
                      if ((rl->rstate != SSL_ST_READ_BODY) || (rl->packet_length < SSL3_RT_HEADER_LENGTH)) {
  ------------------
  |  |  139|      1|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (578:13): [True: 1.57k, False: 1]
  |  Branch (578:49): [True: 0, False: 1]
  ------------------
  579|  1.57k|            size_t sslv2len;
  580|  1.57k|            unsigned int type;
  581|       |
  582|  1.57k|            rret = rl->funcs->read_n(rl, SSL3_RT_HEADER_LENGTH,
  ------------------
  |  |  139|  1.57k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  583|  1.57k|                TLS_BUFFER_get_len(rbuf), 0,
  ------------------
  |  |  527|  1.57k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  584|  1.57k|                num_recs == 0 ? 1 : 0, &n);
  ------------------
  |  Branch (584:17): [True: 1.57k, False: 0]
  ------------------
  585|       |
  586|  1.57k|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  1.57k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (586:17): [True: 1.15k, False: 420]
  ------------------
  587|  1.15k|                return rret; /* error or non-blocking */
  588|       |
  589|    420|            rl->rstate = SSL_ST_READ_BODY;
  ------------------
  |  | 1161|    420|#define SSL_ST_READ_BODY 0xF1
  ------------------
  590|       |
  591|    420|            p = rl->packet;
  592|    420|            if (!PACKET_buf_init(&pkt, p, rl->packet_length)) {
  ------------------
  |  Branch (592:17): [True: 0, False: 420]
  ------------------
  593|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  594|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  595|      0|            }
  596|    420|            sslv2pkt = pkt;
  597|    420|            if (!PACKET_get_net_2_len(&sslv2pkt, &sslv2len)
  ------------------
  |  Branch (597:17): [True: 0, False: 420]
  ------------------
  598|    420|                || !PACKET_get_1(&sslv2pkt, &type)) {
  ------------------
  |  Branch (598:20): [True: 0, False: 420]
  ------------------
  599|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  600|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  601|      0|            }
  602|       |            /*
  603|       |             * The first record received by the server may be a V2ClientHello.
  604|       |             */
  605|    420|            if (rl->role == OSSL_RECORD_ROLE_SERVER
  ------------------
  |  |   40|    840|#define OSSL_RECORD_ROLE_SERVER 1
  ------------------
  |  Branch (605:17): [True: 0, False: 420]
  ------------------
  606|      0|                && rl->is_first_record
  ------------------
  |  Branch (606:20): [True: 0, False: 0]
  ------------------
  607|      0|                && (sslv2len & 0x8000) != 0
  ------------------
  |  Branch (607:20): [True: 0, False: 0]
  ------------------
  608|      0|                && (type == SSL2_MT_CLIENT_HELLO)) {
  ------------------
  |  |   25|      0|#define SSL2_MT_CLIENT_HELLO 1
  ------------------
  |  Branch (608:20): [True: 0, False: 0]
  ------------------
  609|       |                /*
  610|       |                 *  SSLv2 style record
  611|       |                 *
  612|       |                 * |num_recs| here will actually always be 0 because
  613|       |                 * |num_recs > 0| only ever occurs when we are processing
  614|       |                 * multiple app data records - which we know isn't the case here
  615|       |                 * because it is an SSLv2ClientHello. We keep it using
  616|       |                 * |num_recs| for the sake of consistency
  617|       |                 */
  618|      0|                thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  619|      0|                thisrr->rec_version = SSL2_VERSION;
  ------------------
  |  |   23|      0|#define SSL2_VERSION 0x0002
  ------------------
  620|       |
  621|      0|                thisrr->length = sslv2len & 0x7fff;
  622|       |
  623|      0|                if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (623:21): [True: 0, False: 0]
  ------------------
  624|       |                    /* RLAYERfatal already called */
  625|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  626|      0|                }
  627|       |
  628|      0|                if (thisrr->length > TLS_BUFFER_get_len(rbuf)
  ------------------
  |  |  527|      0|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
  |  Branch (628:21): [True: 0, False: 0]
  ------------------
  629|      0|                        - SSL2_RT_HEADER_LENGTH) {
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  630|      0|                    RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  631|      0|                        SSL_R_PACKET_LENGTH_TOO_LONG);
  632|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  633|      0|                }
  634|    420|            } else {
  635|       |                /* SSLv3+ style record */
  636|       |
  637|       |                /* Pull apart the header into the TLS_RL_RECORD */
  638|    420|                if (!PACKET_get_1(&pkt, &type)
  ------------------
  |  Branch (638:21): [True: 0, False: 420]
  ------------------
  639|    420|                    || !PACKET_get_net_2(&pkt, &version)
  ------------------
  |  Branch (639:24): [True: 0, False: 420]
  ------------------
  640|    420|                    || !PACKET_get_net_2_len(&pkt, &thisrr->length)) {
  ------------------
  |  Branch (640:24): [True: 0, False: 420]
  ------------------
  641|      0|                    if (rl->msg_callback != NULL)
  ------------------
  |  Branch (641:25): [True: 0, False: 0]
  ------------------
  642|      0|                        rl->msg_callback(0, 0, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  643|      0|                    RLAYERfatal(rl, SSL_AD_DECODE_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  644|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  645|      0|                }
  646|    420|                thisrr->type = type;
  647|    420|                thisrr->rec_version = version;
  648|       |
  649|       |                /*
  650|       |                 * When we call validate_record_header() only records actually
  651|       |                 * received in SSLv2 format should have the record version set
  652|       |                 * to SSL2_VERSION. This way validate_record_header() can know
  653|       |                 * what format the record was in based on the version.
  654|       |                 */
  655|    420|                if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    420|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (655:21): [True: 1, False: 419]
  ------------------
  656|      1|                    RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  391|      1|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      1|    (ERR_new(),                                                  \
  |  |  |  |  394|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      1|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  657|      1|                        SSL_R_WRONG_VERSION_NUMBER);
  658|      1|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      1|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  659|      1|                }
  660|       |
  661|    419|                if (rl->msg_callback != NULL)
  ------------------
  |  Branch (661:21): [True: 0, False: 419]
  ------------------
  662|      0|                    rl->msg_callback(0, version, SSL3_RT_HEADER, p, 5, rl->cbarg);
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
  663|       |
  664|    419|                if (!rl->funcs->validate_record_header(rl, thisrr)) {
  ------------------
  |  Branch (664:21): [True: 207, False: 212]
  ------------------
  665|       |                    /* RLAYERfatal already called */
  666|    207|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|    207|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  667|    207|                }
  668|       |
  669|    212|                if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  527|    212|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
                              if (thisrr->length > TLS_BUFFER_get_len(rbuf) - SSL3_RT_HEADER_LENGTH) {
  ------------------
  |  |  139|    212|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (669:21): [True: 0, False: 212]
  ------------------
  670|      0|                    RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  671|      0|                        SSL_R_PACKET_LENGTH_TOO_LONG);
  672|      0|                    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  673|      0|                }
  674|    212|            }
  675|       |
  676|       |            /* now rl->rstate == SSL_ST_READ_BODY */
  677|    420|        }
  678|       |
  679|       |        /*
  680|       |         * rl->rstate == SSL_ST_READ_BODY, get and decode the data. Calculate
  681|       |         * how much more data we need to read for the rest of the record
  682|       |         */
  683|    213|        if (thisrr->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    213|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (683:13): [True: 0, False: 213]
  ------------------
  684|      0|            more = thisrr->length + SSL2_RT_HEADER_LENGTH
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  685|      0|                - SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|      0|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  686|    213|        } else {
  687|    213|            more = thisrr->length;
  688|    213|        }
  689|       |
  690|    213|        if (more > 0) {
  ------------------
  |  Branch (690:13): [True: 192, False: 21]
  ------------------
  691|       |            /* now rl->packet_length == SSL3_RT_HEADER_LENGTH */
  692|       |
  693|    192|            rret = rl->funcs->read_n(rl, more, more, 1, 0, &n);
  694|    192|            if (rret < OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|    192|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (694:17): [True: 16, False: 176]
  ------------------
  695|     16|                return rret; /* error or non-blocking io */
  696|    192|        }
  697|       |
  698|       |        /* set state for later operations */
  699|    197|        rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1160|    197|#define SSL_ST_READ_HEADER 0xF0
  ------------------
  700|       |
  701|       |        /*
  702|       |         * At this point, rl->packet_length == SSL3_RT_HEADER_LENGTH
  703|       |         * + thisrr->length, or rl->packet_length == SSL2_RT_HEADER_LENGTH
  704|       |         * + thisrr->length and we have that many bytes in rl->packet
  705|       |         */
  706|    197|        if (thisrr->rec_version == SSL2_VERSION)
  ------------------
  |  |   23|    197|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (706:13): [True: 0, False: 197]
  ------------------
  707|      0|            thisrr->input = &(rl->packet[SSL2_RT_HEADER_LENGTH]);
  ------------------
  |  |  529|      0|#define SSL2_RT_HEADER_LENGTH 2
  ------------------
  708|    197|        else
  709|    197|            thisrr->input = &(rl->packet[SSL3_RT_HEADER_LENGTH]);
  ------------------
  |  |  139|    197|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  710|       |
  711|       |        /*
  712|       |         * ok, we can now read from 'rl->packet' data into 'thisrr'.
  713|       |         * thisrr->input points at thisrr->length bytes, which need to be copied
  714|       |         * into thisrr->data by either the decryption or by the decompression.
  715|       |         * When the data is 'copied' into the thisrr->data buffer,
  716|       |         * thisrr->input will be updated to point at the new buffer
  717|       |         */
  718|       |
  719|       |        /*
  720|       |         * We now have - encrypted [ MAC [ compressed [ plain ] ] ]
  721|       |         * thisrr->length bytes of encrypted compressed stuff.
  722|       |         */
  723|       |
  724|       |        /* decrypt in place in 'thisrr->input' */
  725|    197|        thisrr->data = thisrr->input;
  726|    197|        thisrr->orig_len = thisrr->length;
  727|       |
  728|    197|        num_recs++;
  729|       |
  730|       |        /* we have pulled in a full packet so zero things */
  731|    197|        rl->packet_length = 0;
  732|    197|        rl->is_first_record = 0;
  733|    197|    } while (num_recs < max_recs
  ------------------
  |  Branch (733:14): [True: 0, False: 197]
  ------------------
  734|      0|        && thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    197|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (734:12): [True: 0, False: 0]
  ------------------
  735|      0|        && RLAYER_USE_EXPLICIT_IV(rl)
  ------------------
  |  |  397|    197|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (397:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  401|    197|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (401:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  736|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (736:12): [True: 0, False: 0]
  ------------------
  737|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (737:12): [True: 0, False: 0]
  ------------------
  738|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  360|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
  739|      0|            != 0
  740|      0|        && tls_record_app_data_waiting(rl));
  ------------------
  |  Branch (740:12): [True: 0, False: 0]
  ------------------
  741|       |
  742|    197|    if (num_recs == 1
  ------------------
  |  Branch (742:9): [True: 197, False: 0]
  ------------------
  743|    197|        && thisrr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    394|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (743:12): [True: 18, False: 179]
  ------------------
  744|       |        /* The following can happen in tlsany_meth after HRR */
  745|     18|        && rl->version == TLS1_3_VERSION
  ------------------
  |  |   27|    215|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (745:12): [True: 0, False: 18]
  ------------------
  746|      0|        && rl->is_first_handshake) {
  ------------------
  |  Branch (746:12): [True: 0, False: 0]
  ------------------
  747|       |        /*
  748|       |         * CCS messages must be exactly 1 byte long, containing the value 0x01
  749|       |         */
  750|      0|        if (thisrr->length != 1 || thisrr->data[0] != 0x01) {
  ------------------
  |  Branch (750:13): [True: 0, False: 0]
  |  Branch (750:36): [True: 0, False: 0]
  ------------------
  751|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  752|      0|                SSL_R_INVALID_CCS_MESSAGE);
  753|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  754|      0|        }
  755|       |        /*
  756|       |         * CCS messages are ignored in TLSv1.3. We treat it like an empty
  757|       |         * handshake record - but we still call the msg_callback
  758|       |         */
  759|      0|        if (rl->msg_callback != NULL)
  ------------------
  |  Branch (759:13): [True: 0, False: 0]
  ------------------
  760|      0|            rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
                          rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  761|      0|                thisrr->data, 1, rl->cbarg);
  762|      0|        thisrr->type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  763|      0|        if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|      0|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (763:13): [True: 0, False: 0]
  ------------------
  764|      0|            RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  765|      0|                SSL_R_UNEXPECTED_CCS_MESSAGE);
  766|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  767|      0|        }
  768|      0|        rl->num_recs = 0;
  769|      0|        rl->curr_rec = 0;
  770|      0|        rl->num_released = 0;
  771|       |
  772|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  773|      0|    }
  774|       |
  775|    197|    if (rl->md_ctx != NULL) {
  ------------------
  |  Branch (775:9): [True: 0, False: 197]
  ------------------
  776|      0|        const EVP_MD *tmpmd = EVP_MD_CTX_get0_md(rl->md_ctx);
  777|       |
  778|      0|        if (tmpmd != NULL) {
  ------------------
  |  Branch (778:13): [True: 0, False: 0]
  ------------------
  779|      0|            imac_size = EVP_MD_get_size(tmpmd);
  780|      0|            if (!ossl_assert(imac_size > 0 && imac_size <= EVP_MAX_MD_SIZE)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (780:17): [True: 0, False: 0]
  ------------------
  781|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  782|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  783|      0|            }
  784|      0|            mac_size = (size_t)imac_size;
  785|      0|        }
  786|      0|    }
  787|       |
  788|       |    /*
  789|       |     * If in encrypt-then-mac mode calculate mac from encrypted record. All
  790|       |     * the details below are public so no timing details can leak.
  791|       |     */
  792|    197|    if (rl->use_etm && rl->md_ctx != NULL) {
  ------------------
  |  Branch (792:9): [True: 0, False: 197]
  |  Branch (792:24): [True: 0, False: 0]
  ------------------
  793|      0|        unsigned char *mac;
  794|       |
  795|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (795:21): [True: 0, False: 0]
  ------------------
  796|      0|            thisrr = &rr[j];
  797|       |
  798|      0|            if (thisrr->length < mac_size) {
  ------------------
  |  Branch (798:17): [True: 0, False: 0]
  ------------------
  799|      0|                RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  800|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  801|      0|            }
  802|      0|            thisrr->length -= mac_size;
  803|      0|            mac = thisrr->data + thisrr->length;
  804|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  805|      0|            if (i == 0 || CRYPTO_memcmp(md, mac, mac_size) != 0) {
  ------------------
  |  |  319|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (805:17): [True: 0, False: 0]
  |  Branch (805:27): [True: 0, False: 0]
  ------------------
  806|      0|                RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  807|      0|                    SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  808|      0|                return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  809|      0|            }
  810|      0|        }
  811|       |        /*
  812|       |         * We've handled the mac now - there is no MAC inside the encrypted
  813|       |         * record
  814|       |         */
  815|      0|        mac_size = 0;
  816|      0|    }
  817|       |
  818|    197|    if (mac_size > 0) {
  ------------------
  |  Branch (818:9): [True: 0, False: 197]
  ------------------
  819|      0|        macbufs = OPENSSL_calloc(num_recs, sizeof(*macbufs));
  ------------------
  |  |  112|      0|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  820|      0|        if (macbufs == NULL) {
  ------------------
  |  Branch (820:13): [True: 0, False: 0]
  ------------------
  821|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  822|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  823|      0|        }
  824|      0|    }
  825|       |
  826|    197|    ERR_set_mark();
  827|    197|    enc_err = rl->funcs->cipher(rl, rr, num_recs, 0, macbufs, mac_size);
  828|       |
  829|       |    /*-
  830|       |     * enc_err is:
  831|       |     *    0: if the record is publicly invalid, or an internal error, or AEAD
  832|       |     *       decryption failed, or ETM decryption failed.
  833|       |     *    1: Success or MTE decryption failed (MAC will be randomised)
  834|       |     */
  835|    197|    if (enc_err == 0) {
  ------------------
  |  Branch (835:9): [True: 0, False: 197]
  ------------------
  836|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (836:13): [True: 0, False: 0]
  ------------------
  837|       |            /* RLAYERfatal() already got called */
  838|      0|            ERR_clear_last_mark();
  839|      0|            goto end;
  840|      0|        }
  841|      0|        if (num_recs == 1
  ------------------
  |  Branch (841:13): [True: 0, False: 0]
  ------------------
  842|      0|            && rl->skip_early_data != NULL
  ------------------
  |  Branch (842:16): [True: 0, False: 0]
  ------------------
  843|      0|            && rl->skip_early_data(rl->cbarg)) {
  ------------------
  |  Branch (843:16): [True: 0, False: 0]
  ------------------
  844|       |            /*
  845|       |             * Valid early_data that we cannot decrypt will fail here. We treat
  846|       |             * it like an empty record.
  847|       |             */
  848|       |
  849|       |            /*
  850|       |             * Remove any errors from the stack. Decryption failures are normal
  851|       |             * behaviour.
  852|       |             */
  853|      0|            ERR_pop_to_mark();
  854|       |
  855|      0|            thisrr = &rr[0];
  856|       |
  857|      0|            if (!rlayer_early_data_count_ok(rl, thisrr->length,
  ------------------
  |  Branch (857:17): [True: 0, False: 0]
  ------------------
  858|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  616|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  476|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
  859|       |                /* RLAYERfatal() already called */
  860|      0|                goto end;
  861|      0|            }
  862|       |
  863|      0|            thisrr->length = 0;
  864|      0|            rl->num_recs = 0;
  865|      0|            rl->curr_rec = 0;
  866|      0|            rl->num_released = 0;
  867|       |            /* Reset the read sequence */
  868|      0|            memset(rl->sequence, 0, sizeof(rl->sequence));
  869|      0|            ret = 1;
  870|      0|            goto end;
  871|      0|        }
  872|      0|        ERR_clear_last_mark();
  873|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  874|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  875|      0|        goto end;
  876|    197|    } else {
  877|    197|        ERR_clear_last_mark();
  878|    197|    }
  879|    197|    OSSL_TRACE_BEGIN(TLS)
  ------------------
  |  |  221|    197|    do {                           \
  |  |  222|    197|        BIO *trc_out = NULL;       \
  |  |  223|    197|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 197]
  |  |  ------------------
  ------------------
  880|      0|    {
  881|      0|        BIO_printf(trc_out, "dec %lu\n", (unsigned long)rr[0].length);
  882|      0|        BIO_dump_indent(trc_out, rr[0].data, (int)rr[0].length, 4);
  883|      0|    }
  884|    197|    OSSL_TRACE_END(TLS);
  ------------------
  |  |  226|    197|    }                            \
  |  |  227|    197|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 197]
  |  |  ------------------
  ------------------
  885|       |
  886|       |    /* r->length is now the compressed data plus mac */
  887|    197|    if (rl->enc_ctx != NULL
  ------------------
  |  Branch (887:9): [True: 0, False: 197]
  ------------------
  888|      0|        && !rl->use_etm
  ------------------
  |  Branch (888:12): [True: 0, False: 0]
  ------------------
  889|      0|        && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (889:12): [True: 0, False: 0]
  ------------------
  890|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (890:21): [True: 0, False: 0]
  ------------------
  891|      0|            SSL_MAC_BUF *thismb = &macbufs[j];
  892|       |
  893|      0|            thisrr = &rr[j];
  894|       |
  895|      0|            i = rl->funcs->mac(rl, thisrr, md, 0 /* not send */);
  896|      0|            if (i == 0 || thismb == NULL || thismb->mac == NULL
  ------------------
  |  Branch (896:17): [True: 0, False: 0]
  |  Branch (896:27): [True: 0, False: 0]
  |  Branch (896:45): [True: 0, False: 0]
  ------------------
  897|      0|                || CRYPTO_memcmp(md, thismb->mac, (size_t)mac_size) != 0)
  ------------------
  |  |  319|      0|#define CRYPTO_memcmp memcmp
  ------------------
  |  Branch (897:20): [True: 0, False: 0]
  ------------------
  898|      0|                enc_err = 0;
  899|      0|            if (thisrr->length > SSL3_RT_MAX_COMPRESSED_LENGTH + mac_size)
  ------------------
  |  |  203|      0|    (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  |  |  ------------------
  |  |                   (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  |  |  ------------------
  ------------------
  |  Branch (899:17): [True: 0, False: 0]
  ------------------
  900|      0|                enc_err = 0;
  901|      0|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  902|      0|            if (enc_err == 0 && mac_size > 0 && thismb != NULL && thismb->mac != NULL && (md[0] ^ thismb->mac[0]) != 0xFF) {
  ------------------
  |  Branch (902:17): [True: 0, False: 0]
  |  Branch (902:33): [True: 0, False: 0]
  |  Branch (902:49): [True: 0, False: 0]
  |  Branch (902:67): [True: 0, False: 0]
  |  Branch (902:90): [True: 0, False: 0]
  ------------------
  903|      0|                enc_err = 1;
  904|      0|            }
  905|      0|#endif
  906|      0|        }
  907|      0|    }
  908|       |
  909|    197|    if (enc_err == 0) {
  ------------------
  |  Branch (909:9): [True: 0, False: 197]
  ------------------
  910|      0|        if (rl->alert != SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (910:13): [True: 0, False: 0]
  ------------------
  911|       |            /* We already called RLAYERfatal() */
  912|      0|            goto end;
  913|      0|        }
  914|       |        /*
  915|       |         * A separate 'decryption_failed' alert was introduced with TLS 1.0,
  916|       |         * SSL 3.0 only has 'bad_record_mac'.  But unless a decryption
  917|       |         * failure is directly visible from the ciphertext anyway, we should
  918|       |         * not reveal which kind of error occurred -- this might become
  919|       |         * visible to an attacker (e.g. via a logfile)
  920|       |         */
  921|      0|        RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  922|      0|            SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC);
  923|      0|        goto end;
  924|      0|    }
  925|       |
  926|    394|    for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (926:17): [True: 197, False: 197]
  ------------------
  927|    197|        thisrr = &rr[j];
  928|       |
  929|    197|        if (!rl->funcs->post_process_record(rl, thisrr)) {
  ------------------
  |  Branch (929:13): [True: 0, False: 197]
  ------------------
  930|       |            /* RLAYERfatal already called */
  931|      0|            goto end;
  932|      0|        }
  933|       |
  934|       |        /*
  935|       |         * Record overflow checking (e.g. checking if
  936|       |         * thisrr->length > SSL3_RT_MAX_PLAIN_LENGTH) is the responsibility of
  937|       |         * the post_process_record() function above. However we check here if
  938|       |         * the received packet overflows the current Max Fragment Length setting
  939|       |         * if there is one.
  940|       |         * Note: rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH and KTLS are
  941|       |         * mutually exclusive. Also note that with KTLS thisrr->length can
  942|       |         * be > SSL3_RT_MAX_PLAIN_LENGTH (and rl->max_frag_len must be ignored)
  943|       |         */
  944|    197|        if (rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH
  ------------------
  |  |  177|    394|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (944:13): [True: 0, False: 197]
  ------------------
  945|      0|            && thisrr->length > rl->max_frag_len) {
  ------------------
  |  Branch (945:16): [True: 0, False: 0]
  ------------------
  946|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  947|      0|            goto end;
  948|      0|        }
  949|       |
  950|    197|        thisrr->off = 0;
  951|       |        /*-
  952|       |         * So at this point the following is true
  953|       |         * thisrr->type   is the type of record
  954|       |         * thisrr->length == number of bytes in record
  955|       |         * thisrr->off    == offset to first valid byte
  956|       |         * thisrr->data   == where to take bytes from, increment after use :-).
  957|       |         */
  958|       |
  959|       |        /* just read a 0 length packet */
  960|    197|        if (thisrr->length == 0) {
  ------------------
  |  Branch (960:13): [True: 21, False: 176]
  ------------------
  961|     21|            if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
  ------------------
  |  |  527|     21|#define MAX_EMPTY_RECORDS 32
  ------------------
  |  Branch (961:17): [True: 0, False: 21]
  ------------------
  962|      0|                RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  963|      0|                    SSL_R_RECORD_TOO_SMALL);
  964|      0|                goto end;
  965|      0|            }
  966|    176|        } else {
  967|    176|            rl->empty_record_count = 0;
  968|    176|        }
  969|    197|    }
  970|       |
  971|    197|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_EARLY) {
  ------------------
  |  | 2933|    197|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (971:9): [True: 0, False: 197]
  ------------------
  972|      0|        thisrr = &rr[0];
  973|      0|        if (thisrr->type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (973:13): [True: 0, False: 0]
  ------------------
  974|      0|            && !rlayer_early_data_count_ok(rl, thisrr->length, 0, 0)) {
  ------------------
  |  Branch (974:16): [True: 0, False: 0]
  ------------------
  975|       |            /* RLAYERfatal already called */
  976|      0|            goto end;
  977|      0|        }
  978|      0|    }
  979|       |
  980|    197|    rl->num_recs = num_recs;
  981|    197|    rl->curr_rec = 0;
  982|    197|    rl->num_released = 0;
  983|    197|    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    197|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  984|    197|end:
  985|    197|    if (macbufs != NULL) {
  ------------------
  |  Branch (985:9): [True: 0, False: 197]
  ------------------
  986|      0|        for (j = 0; j < num_recs; j++) {
  ------------------
  |  Branch (986:21): [True: 0, False: 0]
  ------------------
  987|      0|            if (macbufs[j].alloced)
  ------------------
  |  Branch (987:17): [True: 0, False: 0]
  ------------------
  988|      0|                OPENSSL_free(macbufs[j].mac);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  989|      0|        }
  990|      0|        OPENSSL_free(macbufs);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  991|      0|    }
  992|    197|    return ret;
  993|    197|}
tls_default_post_process_record:
 1069|    197|{
 1070|    197|    if (rl->compctx != NULL) {
  ------------------
  |  Branch (1070:9): [True: 0, False: 197]
  ------------------
 1071|      0|        if (rec->length > SSL3_RT_MAX_COMPRESSED_LENGTH) {
  ------------------
  |  |  203|      0|    (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  |  |  ------------------
  |  |                   (SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_COMPRESSED_OVERHEAD)
  |  |  ------------------
  |  |  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  |  |  ------------------
  ------------------
  |  Branch (1071:13): [True: 0, False: 0]
  ------------------
 1072|      0|            RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1073|      0|                SSL_R_COMPRESSED_LENGTH_TOO_LONG);
 1074|      0|            return 0;
 1075|      0|        }
 1076|      0|        if (!tls_do_uncompress(rl, rec)) {
  ------------------
  |  Branch (1076:13): [True: 0, False: 0]
  ------------------
 1077|      0|            RLAYERfatal(rl, SSL_AD_DECOMPRESSION_FAILURE,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1078|      0|                SSL_R_BAD_DECOMPRESSION);
 1079|      0|            return 0;
 1080|      0|        }
 1081|      0|    }
 1082|       |
 1083|    197|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    197|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1083:9): [True: 0, False: 197]
  ------------------
 1084|      0|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1085|      0|        return 0;
 1086|      0|    }
 1087|       |
 1088|    197|    return 1;
 1089|    197|}
tls_read_record:
 1124|  1.57k|{
 1125|  1.57k|    TLS_RL_RECORD *rec;
 1126|       |
 1127|       |    /*
 1128|       |     * tls_get_more_records() can return success without actually reading
 1129|       |     * anything useful (i.e. if empty records are read). We loop here until
 1130|       |     * we have something useful. tls_get_more_records() will eventually fail if
 1131|       |     * too many sequential empty records are read.
 1132|       |     */
 1133|  1.76k|    while (rl->curr_rec >= rl->num_recs) {
  ------------------
  |  Branch (1133:12): [True: 1.57k, False: 197]
  ------------------
 1134|  1.57k|        int ret;
 1135|       |
 1136|  1.57k|        if (rl->num_released != rl->num_recs) {
  ------------------
  |  Branch (1136:13): [True: 0, False: 1.57k]
  ------------------
 1137|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_RECORDS_NOT_RELEASED);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1138|      0|            return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1139|      0|        }
 1140|       |
 1141|  1.57k|        ret = rl->funcs->get_more_records(rl);
 1142|       |
 1143|  1.57k|        if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  1.57k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1143:13): [True: 1.37k, False: 197]
  ------------------
 1144|  1.37k|            return ret;
 1145|  1.57k|    }
 1146|       |
 1147|       |    /*
 1148|       |     * We have now got rl->num_recs records buffered in rl->rrec. rl->curr_rec
 1149|       |     * points to the next one to read.
 1150|       |     */
 1151|    197|    rec = &rl->rrec[rl->curr_rec++];
 1152|       |
 1153|    197|    *rechandle = rec;
 1154|    197|    *rversion = rec->rec_version;
 1155|    197|    *type = rec->type;
 1156|    197|    *data = rec->data + rec->off;
 1157|    197|    *datalen = rec->length;
 1158|    197|    if (rl->isdtls) {
  ------------------
  |  Branch (1158:9): [True: 0, False: 197]
  ------------------
 1159|      0|        *epoch = rec->epoch;
 1160|      0|        memcpy(seq_num, rec->seq_num, sizeof(rec->seq_num));
 1161|      0|    }
 1162|       |
 1163|    197|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    197|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1164|  1.57k|}
tls_release_record:
 1167|    408|{
 1168|    408|    TLS_RL_RECORD *rec = &rl->rrec[rl->num_released];
 1169|       |
 1170|    408|    if (!ossl_assert(rl->num_released < rl->curr_rec)
  ------------------
  |  |   52|    816|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    816|    __FILE__, __LINE__)
  ------------------
  |  Branch (1170:9): [True: 0, False: 408]
  ------------------
 1171|    408|        || !ossl_assert(rechandle == rec)) {
  ------------------
  |  |   52|    408|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|    408|    __FILE__, __LINE__)
  ------------------
  |  Branch (1171:12): [True: 0, False: 408]
  ------------------
 1172|       |        /* Should not happen */
 1173|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_INVALID_RECORD);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1174|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1175|      0|    }
 1176|       |
 1177|    408|    if (rec->length < length) {
  ------------------
  |  Branch (1177:9): [True: 0, False: 408]
  ------------------
 1178|       |        /* Should not happen */
 1179|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1180|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1181|      0|    }
 1182|       |
 1183|    408|    if ((rl->options & SSL_OP_CLEANSE_PLAINTEXT) != 0)
  ------------------
  |  |  358|    408|#define SSL_OP_CLEANSE_PLAINTEXT SSL_OP_BIT(1)
  |  |  ------------------
  |  |  |  |  350|    408|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1183:9): [True: 0, False: 408]
  ------------------
 1184|      0|        OPENSSL_cleanse(rec->data + rec->off, length);
 1185|       |
 1186|    408|    rec->off += length;
 1187|    408|    rec->length -= length;
 1188|       |
 1189|    408|    if (rec->length > 0)
  ------------------
  |  Branch (1189:9): [True: 211, False: 197]
  ------------------
 1190|    211|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    211|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1191|       |
 1192|    197|    rl->num_released++;
 1193|       |
 1194|    197|    if (rl->curr_rec == rl->num_released
  ------------------
  |  Branch (1194:9): [True: 197, False: 0]
  ------------------
 1195|    197|        && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0
  ------------------
  |  |  515|    197|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1195:12): [True: 0, False: 197]
  ------------------
 1196|      0|        && TLS_BUFFER_get_left(&rl->rbuf) == 0)
  ------------------
  |  |  528|      0|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1196:12): [True: 0, False: 0]
  ------------------
 1197|      0|        tls_release_read_buffer(rl);
 1198|       |
 1199|    197|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|    197|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1200|    408|}
tls_set_options:
 1203|  7.89k|{
 1204|  7.89k|    const OSSL_PARAM *p;
 1205|       |
 1206|  7.89k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS);
  ------------------
  |  |  332|  7.89k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1207|  7.89k|    if (p != NULL && !OSSL_PARAM_get_uint64(p, &rl->options)) {
  ------------------
  |  Branch (1207:9): [True: 7.89k, False: 0]
  |  Branch (1207:22): [True: 0, False: 7.89k]
  ------------------
 1208|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1209|      0|        return 0;
 1210|      0|    }
 1211|       |
 1212|  7.89k|    p = OSSL_PARAM_locate_const(options, OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE);
  ------------------
  |  |  331|  7.89k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1213|  7.89k|    if (p != NULL && !OSSL_PARAM_get_uint32(p, &rl->mode)) {
  ------------------
  |  Branch (1213:9): [True: 7.89k, False: 0]
  |  Branch (1213:22): [True: 0, False: 7.89k]
  ------------------
 1214|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1215|      0|        return 0;
 1216|      0|    }
 1217|       |
 1218|  7.89k|    if (rl->direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1218:9): [True: 3.94k, False: 3.94k]
  ------------------
 1219|  3.94k|        p = OSSL_PARAM_locate_const(options,
 1220|  3.94k|            OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN);
  ------------------
  |  |  337|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1221|  3.94k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->rbuf.default_len)) {
  ------------------
  |  Branch (1221:13): [True: 3.94k, False: 0]
  |  Branch (1221:26): [True: 0, False: 3.94k]
  ------------------
 1222|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1223|      0|            return 0;
 1224|      0|        }
 1225|  3.94k|    } else {
 1226|  3.94k|        p = OSSL_PARAM_locate_const(options,
 1227|  3.94k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING);
  ------------------
  |  |  327|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1228|  3.94k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->block_padding)) {
  ------------------
  |  Branch (1228:13): [True: 3.94k, False: 0]
  |  Branch (1228:26): [True: 0, False: 3.94k]
  ------------------
 1229|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1230|      0|            return 0;
 1231|      0|        }
 1232|  3.94k|        p = OSSL_PARAM_locate_const(options,
 1233|  3.94k|            OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING);
  ------------------
  |  |  328|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1234|  3.94k|        if (p != NULL && !OSSL_PARAM_get_size_t(p, &rl->hs_padding)) {
  ------------------
  |  Branch (1234:13): [True: 3.94k, False: 0]
  |  Branch (1234:26): [True: 0, False: 3.94k]
  ------------------
 1235|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1236|      0|            return 0;
 1237|      0|        }
 1238|  3.94k|    }
 1239|       |
 1240|  7.89k|    if (rl->level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION) {
  ------------------
  |  | 2935|  7.89k|#define OSSL_RECORD_PROTECTION_LEVEL_APPLICATION 3
  ------------------
  |  Branch (1240:9): [True: 0, False: 7.89k]
  ------------------
 1241|       |        /*
 1242|       |         * We ignore any read_ahead setting prior to the application protection
 1243|       |         * level. Otherwise we may read ahead data in a lower protection level
 1244|       |         * that is destined for a higher protection level. To simplify the logic
 1245|       |         * we don't support that at this stage.
 1246|       |         */
 1247|      0|        p = OSSL_PARAM_locate_const(options,
 1248|      0|            OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD);
  ------------------
  |  |  333|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1249|      0|        if (p != NULL && !OSSL_PARAM_get_int(p, &rl->read_ahead)) {
  ------------------
  |  Branch (1249:13): [True: 0, False: 0]
  |  Branch (1249:26): [True: 0, False: 0]
  ------------------
 1250|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1251|      0|            return 0;
 1252|      0|        }
 1253|      0|    }
 1254|       |
 1255|  7.89k|    return 1;
 1256|  7.89k|}
tls_int_new_record_layer:
 1266|  7.89k|{
 1267|  7.89k|    OSSL_RECORD_LAYER *rl = OPENSSL_zalloc(sizeof(*rl));
  ------------------
  |  |  108|  7.89k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1268|  7.89k|    const OSSL_PARAM *p;
 1269|       |
 1270|  7.89k|    *retrl = NULL;
 1271|       |
 1272|  7.89k|    if (rl == NULL)
  ------------------
  |  Branch (1272:9): [True: 0, False: 7.89k]
  ------------------
 1273|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1274|       |
 1275|       |    /*
 1276|       |     * Default the value for max_frag_len. This may be overridden by the
 1277|       |     * settings
 1278|       |     */
 1279|  7.89k|    rl->max_frag_len = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  7.89k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1280|       |
 1281|       |    /* Loop through all the settings since they must all be understood */
 1282|  7.89k|    if (settings != NULL) {
  ------------------
  |  Branch (1282:9): [True: 7.89k, False: 0]
  ------------------
 1283|  7.89k|        for (p = settings; p->key != NULL; p++) {
  ------------------
  |  Branch (1283:28): [True: 0, False: 7.89k]
  ------------------
 1284|      0|            if (strcmp(p->key, OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM) == 0) {
  ------------------
  |  |  336|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
  ------------------
  |  Branch (1284:17): [True: 0, False: 0]
  ------------------
 1285|      0|                if (!OSSL_PARAM_get_int(p, &rl->use_etm)) {
  ------------------
  |  Branch (1285:21): [True: 0, False: 0]
  ------------------
 1286|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1287|      0|                    goto err;
 1288|      0|                }
 1289|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1289:24): [True: 0, False: 0]
  ------------------
 1290|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN)
  ------------------
  |  |  330|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
  ------------------
 1291|      0|                == 0) {
 1292|      0|                if (!OSSL_PARAM_get_uint(p, &rl->max_frag_len)) {
  ------------------
  |  Branch (1292:21): [True: 0, False: 0]
  ------------------
 1293|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1294|      0|                    goto err;
 1295|      0|                }
 1296|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1296:24): [True: 0, False: 0]
  ------------------
 1297|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA)
  ------------------
  |  |  329|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
  ------------------
 1298|      0|                == 0) {
 1299|      0|                if (!OSSL_PARAM_get_uint32(p, &rl->max_early_data)) {
  ------------------
  |  Branch (1299:21): [True: 0, False: 0]
  ------------------
 1300|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1301|      0|                    goto err;
 1302|      0|                }
 1303|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1303:24): [True: 0, False: 0]
  ------------------
 1304|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC)
  ------------------
  |  |  334|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
  ------------------
 1305|      0|                == 0) {
 1306|      0|                if (!OSSL_PARAM_get_int(p, &rl->stream_mac)) {
  ------------------
  |  Branch (1306:21): [True: 0, False: 0]
  ------------------
 1307|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1308|      0|                    goto err;
 1309|      0|                }
 1310|      0|            } else if (strcmp(p->key,
  ------------------
  |  Branch (1310:24): [True: 0, False: 0]
  ------------------
 1311|      0|                           OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE)
  ------------------
  |  |  335|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
  ------------------
 1312|      0|                == 0) {
 1313|      0|                if (!OSSL_PARAM_get_int(p, &rl->tlstree)) {
  ------------------
  |  Branch (1313:21): [True: 0, False: 0]
  ------------------
 1314|      0|                    ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1315|      0|                    goto err;
 1316|      0|                }
 1317|      0|            } else {
 1318|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_UNKNOWN_MANDATORY_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1319|      0|                goto err;
 1320|      0|            }
 1321|      0|        }
 1322|  7.89k|    }
 1323|       |
 1324|  7.89k|    rl->libctx = libctx;
 1325|  7.89k|    rl->propq = propq;
 1326|       |
 1327|  7.89k|    rl->version = vers;
 1328|  7.89k|    rl->role = role;
 1329|  7.89k|    rl->direction = direction;
 1330|  7.89k|    rl->level = level;
 1331|  7.89k|    rl->taglen = taglen;
 1332|  7.89k|    rl->md = md;
 1333|       |
 1334|  7.89k|    rl->alert = SSL_AD_NO_ALERT;
  ------------------
  |  |   63|  7.89k|#define SSL_AD_NO_ALERT -1
  ------------------
 1335|  7.89k|    rl->rstate = SSL_ST_READ_HEADER;
  ------------------
  |  | 1160|  7.89k|#define SSL_ST_READ_HEADER 0xF0
  ------------------
 1336|       |
 1337|  7.89k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2932|  7.89k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1337:9): [True: 7.89k, False: 0]
  ------------------
 1338|  7.89k|        rl->is_first_record = 1;
 1339|       |
 1340|  7.89k|    if (!tls_set1_bio(rl, transport))
  ------------------
  |  Branch (1340:9): [True: 0, False: 7.89k]
  ------------------
 1341|      0|        goto err;
 1342|       |
 1343|  7.89k|    if (prev != NULL && !BIO_up_ref(prev))
  ------------------
  |  Branch (1343:9): [True: 0, False: 7.89k]
  |  Branch (1343:25): [True: 0, False: 0]
  ------------------
 1344|      0|        goto err;
 1345|  7.89k|    rl->prev = prev;
 1346|       |
 1347|  7.89k|    if (next != NULL && !BIO_up_ref(next))
  ------------------
  |  Branch (1347:9): [True: 3.94k, False: 3.94k]
  |  Branch (1347:25): [True: 0, False: 3.94k]
  ------------------
 1348|      0|        goto err;
 1349|  7.89k|    rl->next = next;
 1350|       |
 1351|  7.89k|    rl->cbarg = cbarg;
 1352|  7.89k|    if (fns != NULL) {
  ------------------
  |  Branch (1352:9): [True: 7.89k, False: 0]
  ------------------
 1353|  23.6k|        for (; fns->function_id != 0; fns++) {
  ------------------
  |  Branch (1353:16): [True: 15.7k, False: 7.89k]
  ------------------
 1354|  15.7k|            switch (fns->function_id) {
 1355|  7.89k|            case OSSL_FUNC_RLAYER_SKIP_EARLY_DATA:
  ------------------
  |  |  185|  7.89k|#define OSSL_FUNC_RLAYER_SKIP_EARLY_DATA 1
  ------------------
  |  Branch (1355:13): [True: 7.89k, False: 7.89k]
  ------------------
 1356|  7.89k|                rl->skip_early_data = OSSL_FUNC_rlayer_skip_early_data(fns);
 1357|  7.89k|                break;
 1358|      0|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  187|      0|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1358:13): [True: 0, False: 15.7k]
  ------------------
 1359|      0|                rl->msg_callback = OSSL_FUNC_rlayer_msg_callback(fns);
 1360|      0|                break;
 1361|  7.89k|            case OSSL_FUNC_RLAYER_SECURITY:
  ------------------
  |  |  189|  7.89k|#define OSSL_FUNC_RLAYER_SECURITY 3
  ------------------
  |  Branch (1361:13): [True: 7.89k, False: 7.89k]
  ------------------
 1362|  7.89k|                rl->security = OSSL_FUNC_rlayer_security(fns);
 1363|  7.89k|                break;
 1364|      0|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  191|      0|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1364:13): [True: 0, False: 15.7k]
  ------------------
 1365|      0|                rl->padding = OSSL_FUNC_rlayer_padding(fns);
 1366|      0|            default:
  ------------------
  |  Branch (1366:13): [True: 0, False: 15.7k]
  ------------------
 1367|       |                /* Just ignore anything we don't understand */
 1368|      0|                break;
 1369|  15.7k|            }
 1370|  15.7k|        }
 1371|  7.89k|    }
 1372|       |
 1373|  7.89k|    if (!tls_set_options(rl, options)) {
  ------------------
  |  Branch (1373:9): [True: 0, False: 7.89k]
  ------------------
 1374|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_FAILED_TO_GET_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1375|      0|        goto err;
 1376|      0|    }
 1377|       |
 1378|  7.89k|    if ((rl->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) == 0
  ------------------
  |  |  377|  7.89k|#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_BIT(11)
  |  |  ------------------
  |  |  |  |  350|  7.89k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1378:9): [True: 7.87k, False: 18]
  ------------------
 1379|  7.87k|        && rl->version <= TLS1_VERSION
  ------------------
  |  |   24|  15.7k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1379:12): [True: 0, False: 7.87k]
  ------------------
 1380|      0|        && !EVP_CIPHER_is_a(ciph, "NULL")
  ------------------
  |  Branch (1380:12): [True: 0, False: 0]
  ------------------
 1381|      0|        && !EVP_CIPHER_is_a(ciph, "RC4")) {
  ------------------
  |  Branch (1381:12): [True: 0, False: 0]
  ------------------
 1382|       |        /*
 1383|       |         * Enable vulnerability countermeasure for CBC ciphers with known-IV
 1384|       |         * problem (http://www.openssl.org/~bodo/tls-cbc.txt)
 1385|       |         */
 1386|      0|        rl->need_empty_fragments = 1;
 1387|      0|    }
 1388|       |
 1389|  7.89k|    *retrl = rl;
 1390|  7.89k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  7.89k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1391|      0|err:
 1392|      0|    tls_int_free(rl);
 1393|      0|    return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1394|  7.89k|}
tls_free:
 1481|  7.89k|{
 1482|  7.89k|    TLS_BUFFER *rbuf;
 1483|  7.89k|    size_t left, written;
 1484|  7.89k|    int ret = 1;
 1485|       |
 1486|  7.89k|    if (rl == NULL)
  ------------------
  |  Branch (1486:9): [True: 0, False: 7.89k]
  ------------------
 1487|      0|        return 1;
 1488|       |
 1489|  7.89k|    rbuf = &rl->rbuf;
 1490|       |
 1491|  7.89k|    left = TLS_BUFFER_get_left(rbuf);
  ------------------
  |  |  528|  7.89k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1492|  7.89k|    if (left > 0) {
  ------------------
  |  Branch (1492:9): [True: 107, False: 7.78k]
  ------------------
 1493|       |        /*
 1494|       |         * This record layer is closing but we still have data left in our
 1495|       |         * buffer. It must be destined for the next epoch - so push it there.
 1496|       |         */
 1497|    107|        ret = BIO_write_ex(rl->next, rbuf->buf + rbuf->offset, left, &written);
 1498|    107|    }
 1499|  7.89k|    tls_int_free(rl);
 1500|       |
 1501|  7.89k|    return ret;
 1502|  7.89k|}
tls_processed_read_pending:
 1510|    197|{
 1511|    197|    return rl->curr_rec < rl->num_recs;
 1512|    197|}
tls_get_max_records_default:
 1530|  1.24k|{
 1531|       |    /*
 1532|       |     * If we have a pipeline capable cipher, and we have been configured to use
 1533|       |     * it, then return the preferred number of pipelines.
 1534|       |     */
 1535|  1.24k|    if (rl->max_pipelines > 0
  ------------------
  |  Branch (1535:9): [True: 0, False: 1.24k]
  ------------------
 1536|      0|        && rl->enc_ctx != NULL
  ------------------
  |  Branch (1536:12): [True: 0, False: 0]
  ------------------
 1537|      0|        && (EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(rl->enc_ctx))
  ------------------
  |  Branch (1537:12): [True: 0, False: 0]
  ------------------
 1538|      0|               & EVP_CIPH_FLAG_PIPELINE)
  ------------------
  |  |  360|      0|#define EVP_CIPH_FLAG_PIPELINE 0X800000
  ------------------
 1539|      0|            != 0
 1540|      0|        && RLAYER_USE_EXPLICIT_IV(rl)) {
  ------------------
  |  |  397|      0|#define RLAYER_USE_EXPLICIT_IV(rl) ((rl)->version == TLS1_1_VERSION \
  |  |  ------------------
  |  |  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  |  |  ------------------
  |  |  |  Branch (397:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  398|      0|    || (rl)->version == TLS1_2_VERSION                              \
  |  |  ------------------
  |  |  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  |  |  ------------------
  |  |  |  Branch (398:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  399|      0|    || (rl)->version == DTLS1_BAD_VER                               \
  |  |  ------------------
  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  ------------------
  |  |  |  Branch (399:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  400|      0|    || (rl)->version == DTLS1_VERSION                               \
  |  |  ------------------
  |  |  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  |  |  ------------------
  |  |  |  Branch (400:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  401|      0|    || (rl)->version == DTLS1_2_VERSION)
  |  |  ------------------
  |  |  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  |  |  ------------------
  |  |  |  Branch (401:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1541|      0|        size_t pipes;
 1542|       |
 1543|      0|        if (len == 0)
  ------------------
  |  Branch (1543:13): [True: 0, False: 0]
  ------------------
 1544|      0|            return 1;
 1545|      0|        pipes = ((len - 1) / *preffrag) + 1;
 1546|       |
 1547|      0|        return (pipes < rl->max_pipelines) ? pipes : rl->max_pipelines;
  ------------------
  |  Branch (1547:16): [True: 0, False: 0]
  ------------------
 1548|      0|    }
 1549|       |
 1550|  1.24k|    return 1;
 1551|  1.24k|}
tls_get_max_records:
 1555|  1.24k|{
 1556|  1.24k|    return rl->funcs->get_max_records(rl, type, len, maxfrag, preffrag);
 1557|  1.24k|}
tls_allocate_write_buffers_default:
 1563|  2.35k|{
 1564|  2.35k|    if (!tls_setup_write_buffer(rl, numtempl, 0, 0)) {
  ------------------
  |  Branch (1564:9): [True: 0, False: 2.35k]
  ------------------
 1565|       |        /* RLAYERfatal() already called */
 1566|      0|        return 0;
 1567|      0|    }
 1568|       |
 1569|  2.35k|    return 1;
 1570|  2.35k|}
tls_initialise_write_packets_default:
 1579|  2.35k|{
 1580|  2.35k|    WPACKET *thispkt;
 1581|  2.35k|    size_t j, align;
 1582|  2.35k|    TLS_BUFFER *wb;
 1583|       |
 1584|  4.71k|    for (j = 0; j < numtempl; j++) {
  ------------------
  |  Branch (1584:17): [True: 2.35k, False: 2.35k]
  ------------------
 1585|  2.35k|        thispkt = &pkt[j];
 1586|  2.35k|        wb = &bufs[j];
 1587|       |
 1588|  2.35k|        wb->type = templates[j].type;
 1589|       |
 1590|  2.35k|#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
 1591|  2.35k|        align = (size_t)TLS_BUFFER_get_buf(wb);
  ------------------
  |  |  525|  2.35k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
 1592|  2.35k|        align += rl->isdtls ? DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
                      align += rl->isdtls ? DTLS1_RT_HEADER_LENGTH : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  4.71k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
  |  Branch (1592:18): [True: 0, False: 2.35k]
  ------------------
 1593|  2.35k|        align = SSL3_ALIGN_PAYLOAD - 1
  ------------------
  |  |  152|  2.35k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1594|  2.35k|            - ((align - 1) % SSL3_ALIGN_PAYLOAD);
  ------------------
  |  |  152|  2.35k|#define SSL3_ALIGN_PAYLOAD 8
  ------------------
 1595|  2.35k|#endif
 1596|  2.35k|        TLS_BUFFER_set_offset(wb, align);
  ------------------
  |  |  532|  2.35k|#define TLS_BUFFER_set_offset(b, o) ((b)->offset = (o))
  ------------------
 1597|       |
 1598|  2.35k|        if (!WPACKET_init_static_len(thispkt, TLS_BUFFER_get_buf(wb),
  ------------------
  |  |  525|  2.35k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
  |  Branch (1598:13): [True: 0, False: 2.35k]
  ------------------
 1599|  2.35k|                TLS_BUFFER_get_len(wb), 0)) {
  ------------------
  |  |  527|  2.35k|#define TLS_BUFFER_get_len(b) ((b)->len)
  ------------------
 1600|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1601|      0|            return 0;
 1602|      0|        }
 1603|  2.35k|        (*wpinited)++;
 1604|  2.35k|        if (!WPACKET_allocate_bytes(thispkt, align, NULL)) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 2.35k]
  ------------------
 1605|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1606|      0|            return 0;
 1607|      0|        }
 1608|  2.35k|    }
 1609|       |
 1610|  2.35k|    return 1;
 1611|  2.35k|}
tls_prepare_record_header_default:
 1618|  2.35k|{
 1619|  2.35k|    size_t maxcomplen;
 1620|       |
 1621|  2.35k|    *recdata = NULL;
 1622|       |
 1623|  2.35k|    maxcomplen = templ->buflen;
 1624|  2.35k|    if (rl->compctx != NULL)
  ------------------
  |  Branch (1624:9): [True: 0, False: 2.35k]
  ------------------
 1625|      0|        maxcomplen += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  ------------------
  |  |  179|      0|#define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
  ------------------
 1626|       |
 1627|  2.35k|    if (!WPACKET_put_bytes_u8(thispkt, rectype)
  ------------------
  |  |  889|  4.71k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1627:9): [True: 0, False: 2.35k]
  ------------------
 1628|  2.35k|        || !WPACKET_put_bytes_u16(thispkt, templ->version)
  ------------------
  |  |  891|  4.71k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1628:12): [True: 0, False: 2.35k]
  ------------------
 1629|  2.35k|        || !WPACKET_start_sub_packet_u16(thispkt)
  ------------------
  |  |  792|  4.71k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1629:12): [True: 0, False: 2.35k]
  ------------------
 1630|  2.35k|        || (rl->eivlen > 0
  ------------------
  |  Branch (1630:13): [True: 0, False: 2.35k]
  ------------------
 1631|      0|            && !WPACKET_allocate_bytes(thispkt, rl->eivlen, NULL))
  ------------------
  |  Branch (1631:16): [True: 0, False: 0]
  ------------------
 1632|  2.35k|        || (maxcomplen > 0
  ------------------
  |  Branch (1632:13): [True: 2.35k, False: 0]
  ------------------
 1633|  2.35k|            && !WPACKET_reserve_bytes(thispkt, maxcomplen,
  ------------------
  |  Branch (1633:16): [True: 0, False: 2.35k]
  ------------------
 1634|  2.35k|                recdata))) {
 1635|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1636|      0|        return 0;
 1637|      0|    }
 1638|       |
 1639|  2.35k|    return 1;
 1640|  2.35k|}
tls_post_encryption_processing_default:
 1696|  2.35k|{
 1697|  2.35k|    size_t origlen, len;
 1698|  2.35k|    size_t headerlen = rl->isdtls ? DTLS1_RT_HEADER_LENGTH
  ------------------
  |  |   41|      0|#define DTLS1_RT_HEADER_LENGTH 13
  ------------------
  |  Branch (1698:24): [True: 0, False: 2.35k]
  ------------------
 1699|  2.35k|                                  : SSL3_RT_HEADER_LENGTH;
  ------------------
  |  |  139|  4.71k|#define SSL3_RT_HEADER_LENGTH 5
  ------------------
 1700|       |
 1701|       |    /* Allocate bytes for the encryption overhead */
 1702|  2.35k|    if (!WPACKET_get_length(thispkt, &origlen)
  ------------------
  |  Branch (1702:9): [True: 0, False: 2.35k]
  ------------------
 1703|       |        /* Check we allowed enough room for the encryption growth */
 1704|  2.35k|        || !ossl_assert(origlen + SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD
  ------------------
  |  |   52|  4.71k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  4.71k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1704:12): [True: 0, False: 2.35k]
  ------------------
 1705|  2.35k|                - mac_size
 1706|  2.35k|            >= thiswr->length)
 1707|       |        /* Encryption should never shrink the data! */
 1708|  2.35k|        || origlen > thiswr->length
  ------------------
  |  Branch (1708:12): [True: 0, False: 2.35k]
  ------------------
 1709|  2.35k|        || (thiswr->length > origlen
  ------------------
  |  Branch (1709:13): [True: 0, False: 2.35k]
  ------------------
 1710|      0|            && !WPACKET_allocate_bytes(thispkt,
  ------------------
  |  Branch (1710:16): [True: 0, False: 0]
  ------------------
 1711|      0|                thiswr->length - origlen,
 1712|      0|                NULL))) {
 1713|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1714|      0|        return 0;
 1715|      0|    }
 1716|  2.35k|    if (rl->use_etm && mac_size != 0) {
  ------------------
  |  Branch (1716:9): [True: 0, False: 2.35k]
  |  Branch (1716:24): [True: 0, False: 0]
  ------------------
 1717|      0|        unsigned char *mac;
 1718|       |
 1719|      0|        if (!WPACKET_allocate_bytes(thispkt, mac_size, &mac)
  ------------------
  |  Branch (1719:13): [True: 0, False: 0]
  ------------------
 1720|      0|            || !rl->funcs->mac(rl, thiswr, mac, 1)) {
  ------------------
  |  Branch (1720:16): [True: 0, False: 0]
  ------------------
 1721|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1722|      0|            return 0;
 1723|      0|        }
 1724|       |
 1725|      0|        TLS_RL_RECORD_add_length(thiswr, mac_size);
  ------------------
  |  |   87|      0|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1726|      0|    }
 1727|       |
 1728|  2.35k|    if (!WPACKET_get_length(thispkt, &len)
  ------------------
  |  Branch (1728:9): [True: 0, False: 2.35k]
  ------------------
 1729|  2.35k|        || !WPACKET_close(thispkt)) {
  ------------------
  |  Branch (1729:12): [True: 0, False: 2.35k]
  ------------------
 1730|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1731|      0|        return 0;
 1732|      0|    }
 1733|       |
 1734|  2.35k|    if (rl->msg_callback != NULL) {
  ------------------
  |  Branch (1734:9): [True: 0, False: 2.35k]
  ------------------
 1735|      0|        unsigned char *recordstart;
 1736|       |
 1737|      0|        recordstart = WPACKET_get_curr(thispkt) - len - headerlen;
 1738|      0|        rl->msg_callback(1, thiswr->rec_version, SSL3_RT_HEADER, recordstart,
  ------------------
  |  |  239|      0|#define SSL3_RT_HEADER 0x100
  ------------------
 1739|      0|            headerlen, rl->cbarg);
 1740|       |
 1741|      0|        if (rl->version == TLS1_3_VERSION && rl->enc_ctx != NULL) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1741:13): [True: 0, False: 0]
  |  Branch (1741:46): [True: 0, False: 0]
  ------------------
 1742|      0|            unsigned char ctype = thistempl->type;
 1743|       |
 1744|      0|            rl->msg_callback(1, thiswr->rec_version, SSL3_RT_INNER_CONTENT_TYPE,
  ------------------
  |  |  240|      0|#define SSL3_RT_INNER_CONTENT_TYPE 0x101
  ------------------
 1745|      0|                &ctype, 1, rl->cbarg);
 1746|      0|        }
 1747|      0|    }
 1748|       |
 1749|  2.35k|    if (!WPACKET_finish(thispkt)) {
  ------------------
  |  Branch (1749:9): [True: 0, False: 2.35k]
  ------------------
 1750|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1751|      0|        return 0;
 1752|      0|    }
 1753|       |
 1754|  2.35k|    TLS_RL_RECORD_add_length(thiswr, headerlen);
  ------------------
  |  |   87|  2.35k|#define TLS_RL_RECORD_add_length(r, l) ((r)->length += (l))
  ------------------
 1755|       |
 1756|  2.35k|    return 1;
 1757|  2.35k|}
tls_write_records_default:
 1762|  2.35k|{
 1763|  2.35k|    WPACKET pkt[SSL_MAX_PIPELINES + 1];
 1764|  2.35k|    TLS_RL_RECORD wr[SSL_MAX_PIPELINES + 1];
 1765|  2.35k|    WPACKET *thispkt;
 1766|  2.35k|    TLS_RL_RECORD *thiswr;
 1767|  2.35k|    int mac_size = 0, ret = 0;
 1768|  2.35k|    size_t wpinited = 0;
 1769|  2.35k|    size_t j, prefix = 0;
 1770|  2.35k|    OSSL_RECORD_TEMPLATE prefixtempl;
 1771|  2.35k|    OSSL_RECORD_TEMPLATE *thistempl;
 1772|       |
 1773|  2.35k|    if (rl->md_ctx != NULL && EVP_MD_CTX_get0_md(rl->md_ctx) != NULL) {
  ------------------
  |  Branch (1773:9): [True: 0, False: 2.35k]
  |  Branch (1773:31): [True: 0, False: 0]
  ------------------
 1774|      0|        mac_size = EVP_MD_CTX_get_size(rl->md_ctx);
  ------------------
  |  |  589|      0|#define EVP_MD_CTX_get_size(e) EVP_MD_CTX_get_size_ex(e)
  ------------------
 1775|      0|        if (mac_size < 0) {
  ------------------
  |  Branch (1775:13): [True: 0, False: 0]
  ------------------
 1776|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1777|      0|            goto err;
 1778|      0|        }
 1779|      0|    }
 1780|       |
 1781|  2.35k|    if (!rl->funcs->allocate_write_buffers(rl, templates, numtempl, &prefix)) {
  ------------------
  |  Branch (1781:9): [True: 0, False: 2.35k]
  ------------------
 1782|       |        /* RLAYERfatal() already called */
 1783|      0|        goto err;
 1784|      0|    }
 1785|       |
 1786|  2.35k|    if (!rl->funcs->initialise_write_packets(rl, templates, numtempl,
  ------------------
  |  Branch (1786:9): [True: 0, False: 2.35k]
  ------------------
 1787|  2.35k|            &prefixtempl, pkt, rl->wbuf,
 1788|  2.35k|            &wpinited)) {
 1789|       |        /* RLAYERfatal() already called */
 1790|      0|        goto err;
 1791|      0|    }
 1792|       |
 1793|       |    /* Clear our TLS_RL_RECORD structures */
 1794|  2.35k|    memset(wr, 0, sizeof(wr));
 1795|  4.71k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1795:17): [True: 2.35k, False: 2.35k]
  ------------------
 1796|  2.35k|        unsigned char *compressdata = NULL;
 1797|  2.35k|        uint8_t rectype;
 1798|       |
 1799|  2.35k|        thispkt = &pkt[j];
 1800|  2.35k|        thiswr = &wr[j];
 1801|  2.35k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1801:21): [True: 0, False: 2.35k]
  ------------------
 1802|       |
 1803|       |        /*
 1804|       |         * Default to the record type as specified in the template unless the
 1805|       |         * protocol implementation says differently.
 1806|       |         */
 1807|  2.35k|        if (rl->funcs->get_record_type != NULL)
  ------------------
  |  Branch (1807:13): [True: 0, False: 2.35k]
  ------------------
 1808|      0|            rectype = rl->funcs->get_record_type(rl, thistempl);
 1809|  2.35k|        else
 1810|  2.35k|            rectype = thistempl->type;
 1811|       |
 1812|  2.35k|        TLS_RL_RECORD_set_type(thiswr, rectype);
  ------------------
  |  |   83|  2.35k|#define TLS_RL_RECORD_set_type(r, t) ((r)->type = (t))
  ------------------
 1813|  2.35k|        TLS_RL_RECORD_set_rec_version(thiswr, thistempl->version);
  ------------------
  |  |   84|  2.35k|#define TLS_RL_RECORD_set_rec_version(r, v) ((r)->rec_version = (v))
  ------------------
 1814|       |
 1815|  2.35k|        if (!rl->funcs->prepare_record_header(rl, thispkt, thistempl, rectype,
  ------------------
  |  Branch (1815:13): [True: 0, False: 2.35k]
  ------------------
 1816|  2.35k|                &compressdata)) {
 1817|       |            /* RLAYERfatal() already called */
 1818|      0|            goto err;
 1819|      0|        }
 1820|       |
 1821|       |        /* lets setup the record stuff. */
 1822|  2.35k|        TLS_RL_RECORD_set_data(thiswr, compressdata);
  ------------------
  |  |   88|  2.35k|#define TLS_RL_RECORD_set_data(r, d) ((r)->data = (d))
  ------------------
 1823|  2.35k|        TLS_RL_RECORD_set_length(thiswr, thistempl->buflen);
  ------------------
  |  |   86|  2.35k|#define TLS_RL_RECORD_set_length(r, l) ((r)->length = (l))
  ------------------
 1824|       |
 1825|  2.35k|        TLS_RL_RECORD_set_input(thiswr, (unsigned char *)thistempl->buf);
  ------------------
  |  |   89|  2.35k|#define TLS_RL_RECORD_set_input(r, i) ((r)->input = (i))
  ------------------
 1826|       |
 1827|       |        /*
 1828|       |         * we now 'read' from thiswr->input, thiswr->length bytes into
 1829|       |         * thiswr->data
 1830|       |         */
 1831|       |
 1832|       |        /* first we compress */
 1833|  2.35k|        if (rl->compctx != NULL) {
  ------------------
  |  Branch (1833:13): [True: 0, False: 2.35k]
  ------------------
 1834|      0|            if (!tls_do_compress(rl, thiswr)
  ------------------
  |  Branch (1834:17): [True: 0, False: 0]
  ------------------
 1835|      0|                || !WPACKET_allocate_bytes(thispkt, thiswr->length, NULL)) {
  ------------------
  |  Branch (1835:20): [True: 0, False: 0]
  ------------------
 1836|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_COMPRESSION_FAILURE);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1837|      0|                goto err;
 1838|      0|            }
 1839|  2.35k|        } else if (compressdata != NULL) {
  ------------------
  |  Branch (1839:20): [True: 2.35k, False: 0]
  ------------------
 1840|  2.35k|            if (!WPACKET_memcpy(thispkt, thiswr->input, thiswr->length)) {
  ------------------
  |  Branch (1840:17): [True: 0, False: 2.35k]
  ------------------
 1841|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1842|      0|                goto err;
 1843|      0|            }
 1844|  2.35k|            TLS_RL_RECORD_reset_input(&wr[j]);
  ------------------
  |  |   90|  2.35k|#define TLS_RL_RECORD_reset_input(r) ((r)->input = (r)->data)
  ------------------
 1845|  2.35k|        }
 1846|       |
 1847|  2.35k|        if (rl->funcs->add_record_padding != NULL
  ------------------
  |  Branch (1847:13): [True: 0, False: 2.35k]
  ------------------
 1848|      0|            && !rl->funcs->add_record_padding(rl, thistempl, thispkt,
  ------------------
  |  Branch (1848:16): [True: 0, False: 0]
  ------------------
 1849|      0|                thiswr)) {
 1850|       |            /* RLAYERfatal() already called */
 1851|      0|            goto err;
 1852|      0|        }
 1853|       |
 1854|  2.35k|        if (!rl->funcs->prepare_for_encryption(rl, mac_size, thispkt, thiswr)) {
  ------------------
  |  Branch (1854:13): [True: 0, False: 2.35k]
  ------------------
 1855|       |            /* RLAYERfatal() already called */
 1856|      0|            goto err;
 1857|      0|        }
 1858|  2.35k|    }
 1859|       |
 1860|  2.35k|    if (prefix) {
  ------------------
  |  Branch (1860:9): [True: 0, False: 2.35k]
  ------------------
 1861|      0|        if (rl->funcs->cipher(rl, wr, 1, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1861:13): [True: 0, False: 0]
  ------------------
 1862|      0|            if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1862:17): [True: 0, False: 0]
  ------------------
 1863|      0|                RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1864|      0|            }
 1865|      0|            goto err;
 1866|      0|        }
 1867|      0|    }
 1868|       |
 1869|  2.35k|    if (rl->funcs->cipher(rl, wr + prefix, numtempl, 1, NULL, mac_size) < 1) {
  ------------------
  |  Branch (1869:9): [True: 0, False: 2.35k]
  ------------------
 1870|      0|        if (rl->alert == SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|      0|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (1870:13): [True: 0, False: 0]
  ------------------
 1871|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1872|      0|        }
 1873|      0|        goto err;
 1874|      0|    }
 1875|       |
 1876|  4.71k|    for (j = 0; j < numtempl + prefix; j++) {
  ------------------
  |  Branch (1876:17): [True: 2.35k, False: 2.35k]
  ------------------
 1877|  2.35k|        thispkt = &pkt[j];
 1878|  2.35k|        thiswr = &wr[j];
 1879|  2.35k|        thistempl = (j < prefix) ? &prefixtempl : &templates[j - prefix];
  ------------------
  |  Branch (1879:21): [True: 0, False: 2.35k]
  ------------------
 1880|       |
 1881|  2.35k|        if (!rl->funcs->post_encryption_processing(rl, mac_size, thistempl,
  ------------------
  |  Branch (1881:13): [True: 0, False: 2.35k]
  ------------------
 1882|  2.35k|                thispkt, thiswr)) {
 1883|       |            /* RLAYERfatal() already called */
 1884|      0|            goto err;
 1885|      0|        }
 1886|       |
 1887|       |        /* now let's set up wb */
 1888|  2.35k|        TLS_BUFFER_set_left(&rl->wbuf[j], TLS_RL_RECORD_get_length(thiswr));
  ------------------
  |  |  529|  2.35k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1889|  2.35k|    }
 1890|       |
 1891|  2.35k|    ret = 1;
 1892|  2.35k|err:
 1893|  4.71k|    for (j = 0; j < wpinited; j++)
  ------------------
  |  Branch (1893:17): [True: 2.35k, False: 2.35k]
  ------------------
 1894|  2.35k|        WPACKET_cleanup(&pkt[j]);
 1895|  2.35k|    return ret;
 1896|  2.35k|}
tls_write_records:
 1900|  2.35k|{
 1901|       |    /* Check we don't have pending data waiting to write */
 1902|  2.35k|    if (!ossl_assert(rl->nextwbuf >= rl->numwpipes
  ------------------
  |  |   52|  2.35k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  ------------------
  |  |  |  Branch (52:41): [True: 2.35k, False: 0]
  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  ------------------
  |  |   53|  2.35k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1902:9): [True: 0, False: 2.35k]
  ------------------
 1903|  2.35k|            || TLS_BUFFER_get_left(&rl->wbuf[rl->nextwbuf]) == 0)) {
 1904|      0|        RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1905|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1906|      0|    }
 1907|       |
 1908|  2.35k|    if (!rl->funcs->write_records(rl, templates, numtempl)) {
  ------------------
  |  Branch (1908:9): [True: 0, False: 2.35k]
  ------------------
 1909|       |        /* RLAYERfatal already called */
 1910|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1911|      0|    }
 1912|       |
 1913|  2.35k|    rl->nextwbuf = 0;
 1914|       |    /* we now just need to write the buffers */
 1915|  2.35k|    return tls_retry_write_records(rl);
 1916|  2.35k|}
tls_retry_write_records:
 1919|  2.35k|{
 1920|  2.35k|    int i, ret;
 1921|  2.35k|    TLS_BUFFER *thiswb;
 1922|  2.35k|    size_t tmpwrit = 0;
 1923|       |
 1924|  2.35k|    if (rl->nextwbuf >= rl->numwpipes)
  ------------------
  |  Branch (1924:9): [True: 0, False: 2.35k]
  ------------------
 1925|      0|        return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1926|       |
 1927|  2.35k|    for (;;) {
 1928|  2.35k|        thiswb = &rl->wbuf[rl->nextwbuf];
 1929|       |
 1930|  2.35k|        clear_sys_error();
  ------------------
  |  |   31|  2.35k|#define clear_sys_error() errno = 0
  ------------------
 1931|  2.35k|        if (rl->bio != NULL) {
  ------------------
  |  Branch (1931:13): [True: 2.35k, False: 0]
  ------------------
 1932|  2.35k|            if (rl->funcs->prepare_write_bio != NULL) {
  ------------------
  |  Branch (1932:17): [True: 0, False: 2.35k]
  ------------------
 1933|      0|                ret = rl->funcs->prepare_write_bio(rl, thiswb->type);
 1934|      0|                if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|      0|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1934:21): [True: 0, False: 0]
  ------------------
 1935|      0|                    return ret;
 1936|      0|            }
 1937|  2.35k|            i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  525|  2.35k|#define TLS_BUFFER_get_buf(b) ((b)->buf)
  ------------------
                          i = BIO_write(rl->bio, (char *)&(TLS_BUFFER_get_buf(thiswb)[TLS_BUFFER_get_offset(thiswb)]),
  ------------------
  |  |  531|  2.35k|#define TLS_BUFFER_get_offset(b) ((b)->offset)
  ------------------
 1938|  2.35k|                (unsigned int)TLS_BUFFER_get_left(thiswb));
  ------------------
  |  |  528|  2.35k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
 1939|  2.35k|            if (i >= 0) {
  ------------------
  |  Branch (1939:17): [True: 2.35k, False: 0]
  ------------------
 1940|  2.35k|                tmpwrit = i;
 1941|  2.35k|                if (i == 0 && BIO_should_retry(rl->bio))
  ------------------
  |  |  272|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (272:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1941:21): [True: 0, False: 2.35k]
  ------------------
 1942|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1943|  2.35k|                else
 1944|  2.35k|                    ret = OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  2.35k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1945|  2.35k|            } else {
 1946|      0|                if (BIO_should_retry(rl->bio)) {
  ------------------
  |  |  272|      0|#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  |  |  |  Branch (272:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1947|      0|                    ret = OSSL_RECORD_RETURN_RETRY;
  ------------------
  |  |   46|      0|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
 1948|      0|                } else {
 1949|      0|                    ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   74|      0|#define ERR_LIB_SYS 2
  ------------------
                                  ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(),
  ------------------
  |  |   30|      0|#define get_last_sys_error() errno
  ------------------
 1950|      0|                        "tls_retry_write_records failure");
 1951|      0|                    ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1952|      0|                }
 1953|      0|            }
 1954|  2.35k|        } else {
 1955|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, SSL_R_BIO_NOT_SET);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
 1956|      0|            ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1957|      0|            i = -1;
 1958|      0|        }
 1959|       |
 1960|       |        /*
 1961|       |         * When an empty fragment is sent on a connection using KTLS,
 1962|       |         * it is sent as a write of zero bytes.  If this zero byte
 1963|       |         * write succeeds, i will be 0 rather than a non-zero value.
 1964|       |         * Treat i == 0 as success rather than an error for zero byte
 1965|       |         * writes to permit this case.
 1966|       |         */
 1967|  2.35k|        if (i >= 0 && tmpwrit == TLS_BUFFER_get_left(thiswb)) {
  ------------------
  |  |  528|  2.35k|#define TLS_BUFFER_get_left(b) ((b)->left)
  ------------------
  |  Branch (1967:13): [True: 2.35k, False: 0]
  |  Branch (1967:23): [True: 2.35k, False: 0]
  ------------------
 1968|  2.35k|            TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  529|  2.35k|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1969|  2.35k|            TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  533|  2.35k|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1970|  2.35k|            if (++(rl->nextwbuf) < rl->numwpipes)
  ------------------
  |  Branch (1970:17): [True: 0, False: 2.35k]
  ------------------
 1971|      0|                continue;
 1972|       |
 1973|  2.35k|            if (rl->nextwbuf == rl->numwpipes
  ------------------
  |  Branch (1973:17): [True: 2.35k, False: 0]
  ------------------
 1974|  2.35k|                && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  515|  2.35k|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1974:20): [True: 0, False: 2.35k]
  ------------------
 1975|      0|                tls_release_write_buffer(rl);
 1976|  2.35k|            return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  2.35k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
 1977|  2.35k|        } else if (i <= 0) {
  ------------------
  |  Branch (1977:20): [True: 0, False: 0]
  ------------------
 1978|      0|            if (rl->isdtls) {
  ------------------
  |  Branch (1978:17): [True: 0, False: 0]
  ------------------
 1979|       |                /*
 1980|       |                 * For DTLS, just drop it. That's kind of the whole point in
 1981|       |                 * using a datagram service
 1982|       |                 */
 1983|      0|                TLS_BUFFER_set_left(thiswb, 0);
  ------------------
  |  |  529|      0|#define TLS_BUFFER_set_left(b, l) ((b)->left = (l))
  ------------------
 1984|      0|                if (++(rl->nextwbuf) == rl->numwpipes
  ------------------
  |  Branch (1984:21): [True: 0, False: 0]
  ------------------
 1985|      0|                    && (rl->mode & SSL_MODE_RELEASE_BUFFERS) != 0)
  ------------------
  |  |  515|      0|#define SSL_MODE_RELEASE_BUFFERS 0x00000010U
  ------------------
  |  Branch (1985:24): [True: 0, False: 0]
  ------------------
 1986|      0|                    tls_release_write_buffer(rl);
 1987|      0|            }
 1988|      0|            return ret;
 1989|      0|        }
 1990|      0|        TLS_BUFFER_add_offset(thiswb, tmpwrit);
  ------------------
  |  |  533|      0|#define TLS_BUFFER_add_offset(b, o) ((b)->offset += (o))
  ------------------
 1991|      0|        TLS_BUFFER_sub_left(thiswb, tmpwrit);
  ------------------
  |  |  530|      0|#define TLS_BUFFER_sub_left(b, l) ((b)->left -= (l))
  ------------------
 1992|      0|    }
 1993|  2.35k|}
tls_get_alert_code:
 1996|    215|{
 1997|    215|    return rl->alert;
 1998|    215|}
tls_set1_bio:
 2001|  13.1k|{
 2002|  13.1k|    if (bio != NULL && !BIO_up_ref(bio))
  ------------------
  |  Branch (2002:9): [True: 7.89k, False: 5.26k]
  |  Branch (2002:24): [True: 0, False: 7.89k]
  ------------------
 2003|      0|        return 0;
 2004|  13.1k|    BIO_free(rl->bio);
 2005|  13.1k|    rl->bio = bio;
 2006|       |
 2007|  13.1k|    return 1;
 2008|  13.1k|}
tls_set_protocol_version:
 2020|      2|{
 2021|      2|    return rl->funcs->set_protocol_version(rl, version);
 2022|      2|}
tls_set_first_handshake:
 2030|  7.89k|{
 2031|  7.89k|    rl->is_first_handshake = first;
 2032|  7.89k|}
tls_common.c:tls_allow_compression:
  114|  3.59k|{
  115|  3.59k|    if (rl->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  394|  3.59k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  350|  3.59k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 3.59k, False: 0]
  ------------------
  116|  3.59k|        return 0;
  117|       |
  118|      0|    return rl->security == NULL
  ------------------
  |  Branch (118:12): [True: 0, False: 0]
  ------------------
  119|      0|        || rl->security(rl->cbarg, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2778|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (119:12): [True: 0, False: 0]
  ------------------
  120|  3.59k|}
tls_common.c:tls_release_write_buffer_int:
  124|  10.2k|{
  125|  10.2k|    TLS_BUFFER *wb;
  126|  10.2k|    size_t pipes;
  127|       |
  128|  10.2k|    pipes = rl->numwpipes;
  129|       |
  130|  11.5k|    while (pipes > start) {
  ------------------
  |  Branch (130:12): [True: 1.31k, False: 10.2k]
  ------------------
  131|  1.31k|        wb = &rl->wbuf[pipes - 1];
  132|       |
  133|  1.31k|        if (TLS_BUFFER_is_app_buffer(wb))
  ------------------
  |  |  535|  1.31k|#define TLS_BUFFER_is_app_buffer(b) ((b)->app_buffer)
  |  |  ------------------
  |  |  |  Branch (535:37): [True: 0, False: 1.31k]
  |  |  ------------------
  ------------------
  134|      0|            TLS_BUFFER_set_app_buffer(wb, 0);
  ------------------
  |  |  534|      0|#define TLS_BUFFER_set_app_buffer(b, l) ((b)->app_buffer = (l))
  ------------------
  135|  1.31k|        else
  136|  1.31k|            OPENSSL_free(wb->buf);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  137|       |        wb->buf = NULL;
  138|  1.31k|        pipes--;
  139|  1.31k|    }
  140|  10.2k|}
tls_common.c:tls_int_free:
 1456|  7.89k|{
 1457|  7.89k|    BIO_free(rl->prev);
 1458|  7.89k|    BIO_free(rl->bio);
 1459|  7.89k|    BIO_free(rl->next);
 1460|  7.89k|    ossl_tls_buffer_release(&rl->rbuf);
 1461|       |
 1462|  7.89k|    tls_release_write_buffer(rl);
 1463|       |
 1464|  7.89k|    EVP_CIPHER_CTX_free(rl->enc_ctx);
 1465|  7.89k|    EVP_MAC_CTX_free(rl->mac_ctx);
 1466|  7.89k|    EVP_MD_CTX_free(rl->md_ctx);
 1467|  7.89k|#ifndef OPENSSL_NO_COMP
 1468|  7.89k|    COMP_CTX_free(rl->compctx);
 1469|  7.89k|#endif
 1470|  7.89k|    OPENSSL_free(rl->iv);
  ------------------
  |  |  131|  7.89k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1471|  7.89k|    OPENSSL_free(rl->nonce);
  ------------------
  |  |  131|  7.89k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1472|  7.89k|    if (rl->version == SSL3_VERSION)
  ------------------
  |  |   23|  7.89k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1472:9): [True: 0, False: 7.89k]
  ------------------
 1473|      0|        OPENSSL_cleanse(rl->mac_secret, sizeof(rl->mac_secret));
 1474|       |
 1475|  7.89k|    TLS_RL_RECORD_release(rl->rrec, SSL_MAX_PIPELINES);
  ------------------
  |  |   71|  7.89k|#define SSL_MAX_PIPELINES 32
  ------------------
 1476|       |
 1477|  7.89k|    OPENSSL_free(rl);
  ------------------
  |  |  131|  7.89k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1478|  7.89k|}
tls_common.c:TLS_RL_RECORD_release:
   33|  7.89k|{
   34|  7.89k|    size_t i;
   35|       |
   36|   260k|    for (i = 0; i < num_recs; i++) {
  ------------------
  |  Branch (36:17): [True: 252k, False: 7.89k]
  ------------------
   37|   252k|        OPENSSL_free(r[i].comp);
  ------------------
  |  |  131|   252k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|       |        r[i].comp = NULL;
   39|   252k|    }
   40|  7.89k|}
tls_common.c:tls_release_write_buffer:
  223|  7.89k|{
  224|  7.89k|    tls_release_write_buffer_int(rl, 0);
  225|       |
  226|  7.89k|    rl->numwpipes = 0;
  227|  7.89k|}
tls_common.c:tls_new_record_layer:
 1410|  7.89k|{
 1411|  7.89k|    int ret;
 1412|       |
 1413|  7.89k|    ret = tls_int_new_record_layer(libctx, propq, vers, role, direction, level,
 1414|  7.89k|        ciph, taglen, md, comp, prev,
 1415|  7.89k|        transport, next, settings,
 1416|  7.89k|        options, fns, cbarg, retrl);
 1417|       |
 1418|  7.89k|    if (ret != OSSL_RECORD_RETURN_SUCCESS)
  ------------------
  |  |   45|  7.89k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1418:9): [True: 0, False: 7.89k]
  ------------------
 1419|      0|        return ret;
 1420|       |
 1421|  7.89k|    switch (vers) {
 1422|  7.89k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  7.89k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (1422:5): [True: 7.89k, False: 0]
  ------------------
 1423|  7.89k|        (*retrl)->funcs = &tls_any_funcs;
 1424|  7.89k|        break;
 1425|      0|    case TLS1_3_VERSION:
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1425:5): [True: 0, False: 7.89k]
  ------------------
 1426|      0|        (*retrl)->funcs = &tls_1_3_funcs;
 1427|      0|        break;
 1428|      0|    case TLS1_2_VERSION:
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1428:5): [True: 0, False: 7.89k]
  ------------------
 1429|      0|    case TLS1_1_VERSION:
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1429:5): [True: 0, False: 7.89k]
  ------------------
 1430|      0|    case TLS1_VERSION:
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1430:5): [True: 0, False: 7.89k]
  ------------------
 1431|      0|        (*retrl)->funcs = &tls_1_funcs;
 1432|      0|        break;
 1433|      0|    case SSL3_VERSION:
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (1433:5): [True: 0, False: 7.89k]
  ------------------
 1434|      0|        (*retrl)->funcs = &ssl_3_0_funcs;
 1435|      0|        break;
 1436|      0|    default:
  ------------------
  |  Branch (1436:5): [True: 0, False: 7.89k]
  ------------------
 1437|       |        /* Should not happen */
 1438|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1439|      0|        ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
 1440|      0|        goto err;
 1441|  7.89k|    }
 1442|       |
 1443|  7.89k|    ret = (*retrl)->funcs->set_crypto_state(*retrl, level, key, keylen, iv,
 1444|  7.89k|        ivlen, mackey, mackeylen, ciph,
 1445|  7.89k|        taglen, mactype, md, comp);
 1446|       |
 1447|  7.89k|err:
 1448|  7.89k|    if (ret != OSSL_RECORD_RETURN_SUCCESS) {
  ------------------
  |  |   45|  7.89k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1448:9): [True: 0, False: 7.89k]
  ------------------
 1449|      0|        tls_int_free(*retrl);
 1450|       |        *retrl = NULL;
 1451|      0|    }
 1452|  7.89k|    return ret;
 1453|  7.89k|}

tlsany_meth.c:tls_any_set_crypto_state:
   26|  7.89k|{
   27|  7.89k|    if (level != OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2932|  7.89k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (27:9): [True: 0, False: 7.89k]
  ------------------
   28|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   29|      0|        return OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
   30|      0|    }
   31|       |
   32|       |    /* No crypto protection at the "NONE" level so nothing to be done */
   33|       |
   34|  7.89k|    return OSSL_RECORD_RETURN_SUCCESS;
  ------------------
  |  |   45|  7.89k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
   35|  7.89k|}
tlsany_meth.c:tls_any_cipher:
   40|  2.55k|{
   41|  2.55k|    return 1;
   42|  2.55k|}
tlsany_meth.c:tls_any_set_protocol_version:
  128|      2|{
  129|      2|    if (rl->version != TLS_ANY_VERSION && rl->version != vers)
  ------------------
  |  |   40|      4|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (129:9): [True: 0, False: 2]
  |  Branch (129:43): [True: 0, False: 0]
  ------------------
  130|      0|        return 0;
  131|      2|    rl->version = vers;
  132|       |
  133|      2|    return 1;
  134|      2|}
tlsany_meth.c:tls_validate_record_header:
   45|    419|{
   46|    419|    if (rec->rec_version == SSL2_VERSION) {
  ------------------
  |  |   23|    419|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (46:9): [True: 0, False: 419]
  ------------------
   47|       |        /* SSLv2 format ClientHello */
   48|      0|        if (!ossl_assert(rl->version == TLS_ANY_VERSION)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (48:13): [True: 0, False: 0]
  ------------------
   49|      0|            RLAYERfatal(rl, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   50|      0|            return 0;
   51|      0|        }
   52|      0|        if (rec->length < MIN_SSL2_RECORD_LEN) {
  ------------------
  |  |   15|      0|#define MIN_SSL2_RECORD_LEN 9
  ------------------
  |  Branch (52:13): [True: 0, False: 0]
  ------------------
   53|      0|            RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_TOO_SHORT);
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   54|      0|            return 0;
   55|      0|        }
   56|    419|    } else {
   57|    419|        if (rl->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|    419|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (57:13): [True: 419, False: 0]
  ------------------
   58|    419|            if ((rec->rec_version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|    419|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (58:17): [True: 206, False: 213]
  ------------------
   59|    206|                if (rl->is_first_record) {
  ------------------
  |  Branch (59:21): [True: 186, False: 20]
  ------------------
   60|    186|                    unsigned char *p;
   61|       |
   62|       |                    /*
   63|       |                     * Go back to start of packet, look at the five bytes that
   64|       |                     * we have.
   65|       |                     */
   66|    186|                    p = rl->packet;
   67|    186|                    if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    372|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 185]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    371|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 184]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    370|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 183]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    369|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 182]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    368|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 181]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    367|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 180]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    366|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 179]
  |  |  ------------------
  ------------------
                                  if (HAS_PREFIX((char *)p, "GET ") || HAS_PREFIX((char *)p, "POST ") || HAS_PREFIX((char *)p, "HEAD ") || HAS_PREFIX((char *)p, "PATCH") || HAS_PREFIX((char *)p, "OPTIO") || HAS_PREFIX((char *)p, "DELET") || HAS_PREFIX((char *)p, "TRACE") || HAS_PREFIX((char *)p, "PUT ")) {
  ------------------
  |  |   58|    179|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 178]
  |  |  ------------------
  ------------------
   68|      8|                        RLAYERfatal(rl, SSL_AD_NO_ALERT, SSL_R_HTTP_REQUEST);
  ------------------
  |  |  391|      8|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      8|    (ERR_new(),                                                  \
  |  |  |  |  394|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      8|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   69|      8|                        return 0;
   70|    178|                    } else if (HAS_PREFIX((char *)p, "CONNE")) {
  ------------------
  |  |   58|    178|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 177]
  |  |  ------------------
  ------------------
   71|      1|                        RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  391|      1|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      1|    (ERR_new(),                                                  \
  |  |  |  |  394|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      1|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   72|      1|                            SSL_R_HTTPS_PROXY_REQUEST);
   73|      1|                        return 0;
   74|      1|                    }
   75|       |
   76|       |                    /* Doesn't look like TLS - don't send an alert */
   77|    186|                    RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  391|    177|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|    177|    (ERR_new(),                                                  \
  |  |  |  |  394|    177|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    177|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|    177|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   78|    177|                        SSL_R_WRONG_VERSION_NUMBER);
   79|    177|                    return 0;
   80|    186|                } else {
   81|     20|                    RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  391|     20|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|     20|    (ERR_new(),                                                  \
  |  |  |  |  394|     20|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     20|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|     20|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
   82|     20|                        SSL_R_WRONG_VERSION_NUMBER);
   83|     20|                    return 0;
   84|     20|                }
   85|    206|            }
   86|    419|        } else if (rl->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (86:20): [True: 0, False: 0]
  ------------------
   87|       |            /*
   88|       |             * In this case we know we are going to negotiate TLSv1.3, but we've
   89|       |             * had an HRR, so we haven't actually done so yet. In TLSv1.3 we
   90|       |             * must ignore the legacy record version in plaintext records.
   91|       |             */
   92|      0|        } else if (rec->rec_version != rl->version) {
  ------------------
  |  Branch (92:20): [True: 0, False: 0]
  ------------------
   93|      0|            if ((rl->version & 0xFF00) == (rec->rec_version & 0xFF00)) {
  ------------------
  |  Branch (93:17): [True: 0, False: 0]
  ------------------
   94|      0|                if (rec->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (94:21): [True: 0, False: 0]
  ------------------
   95|       |                    /*
   96|       |                     * The record is using an incorrect version number,
   97|       |                     * but what we've got appears to be an alert. We
   98|       |                     * haven't read the body yet to check whether its a
   99|       |                     * fatal or not - but chances are it is. We probably
  100|       |                     * shouldn't send a fatal alert back. We'll just
  101|       |                     * end.
  102|       |                     */
  103|      0|                    RLAYERfatal(rl, SSL_AD_NO_ALERT,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  104|      0|                        SSL_R_WRONG_VERSION_NUMBER);
  105|      0|                    return 0;
  106|      0|                }
  107|       |                /* Send back error using their minor version number */
  108|      0|                rl->version = (unsigned short)rec->rec_version;
  109|      0|            }
  110|      0|            RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  391|      0|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      0|    (ERR_new(),                                                  \
  |  |  |  |  394|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      0|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  111|      0|                SSL_R_WRONG_VERSION_NUMBER);
  112|      0|            return 0;
  113|      0|        }
  114|    419|    }
  115|    213|    if (rec->length > SSL3_RT_MAX_PLAIN_LENGTH) {
  ------------------
  |  |  177|    213|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (115:9): [True: 1, False: 212]
  ------------------
  116|       |        /*
  117|       |         * We use SSL_R_DATA_LENGTH_TOO_LONG instead of
  118|       |         * SSL_R_ENCRYPTED_LENGTH_TOO_LONG here because we are the "any" method
  119|       |         * and we know that we are dealing with plaintext data
  120|       |         */
  121|      1|        RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, SSL_R_DATA_LENGTH_TOO_LONG);
  ------------------
  |  |  391|      1|#define RLAYERfatal(rl, al, r) RLAYERfatal_data((rl), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  393|      1|    (ERR_new(),                                                  \
  |  |  |  |  394|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  395|      1|        ossl_rlayer_fatal)
  |  |  ------------------
  ------------------
  122|      1|        return 0;
  123|      1|    }
  124|    212|    return 1;
  125|    213|}
tlsany_meth.c:tls_any_prepare_for_encryption:
  140|  2.35k|{
  141|       |    /* No encryption, so nothing to do */
  142|  2.35k|    return 1;
  143|  2.35k|}

RECORD_LAYER_init:
   28|  1.31k|{
   29|  1.31k|    rl->s = s;
   30|  1.31k|}
RECORD_LAYER_clear:
   33|  5.26k|{
   34|  5.26k|    int ret = 1;
   35|       |
   36|       |    /* Clear any buffered records we no longer need */
   37|  5.36k|    while (rl->curr_rec < rl->num_recs)
  ------------------
  |  Branch (37:12): [True: 100, False: 5.26k]
  ------------------
   38|    100|        ret &= ssl_release_record(rl->s,
   39|    100|            &(rl->tlsrecs[rl->curr_rec++]),
   40|    100|            0);
   41|       |
   42|  5.26k|    rl->wnum = 0;
   43|  5.26k|    memset(rl->handshake_fragment, 0, sizeof(rl->handshake_fragment));
   44|  5.26k|    rl->handshake_fragment_len = 0;
   45|  5.26k|    rl->wpend_tot = 0;
   46|  5.26k|    rl->wpend_type = 0;
   47|  5.26k|    rl->wpend_buf = NULL;
   48|  5.26k|    rl->alert_count = 0;
   49|  5.26k|    rl->num_recs = 0;
   50|  5.26k|    rl->curr_rec = 0;
   51|       |
   52|  5.26k|    BIO_free(rl->rrlnext);
   53|  5.26k|    rl->rrlnext = NULL;
   54|       |
   55|  5.26k|    if (rl->rrlmethod != NULL)
  ------------------
  |  Branch (55:9): [True: 3.94k, False: 1.31k]
  ------------------
   56|  3.94k|        rl->rrlmethod->free(rl->rrl); /* Ignore return value */
   57|  5.26k|    if (rl->wrlmethod != NULL)
  ------------------
  |  Branch (57:9): [True: 3.94k, False: 1.31k]
  ------------------
   58|  3.94k|        rl->wrlmethod->free(rl->wrl); /* Ignore return value */
   59|  5.26k|    BIO_free(rl->rrlnext);
   60|  5.26k|    rl->rrlmethod = NULL;
   61|  5.26k|    rl->wrlmethod = NULL;
   62|  5.26k|    rl->rrlnext = NULL;
   63|  5.26k|    rl->rrl = NULL;
   64|  5.26k|    rl->wrl = NULL;
   65|       |
   66|  5.26k|    if (rl->d)
  ------------------
  |  Branch (66:9): [True: 0, False: 5.26k]
  ------------------
   67|      0|        DTLS_RECORD_LAYER_clear(rl);
   68|       |
   69|  5.26k|    return ret;
   70|  5.26k|}
RECORD_LAYER_reset:
   73|  3.94k|{
   74|  3.94k|    int ret;
   75|       |
   76|  3.94k|    ret = RECORD_LAYER_clear(rl);
   77|       |
   78|       |    /* We try and reset both record layers even if one fails */
   79|  3.94k|    ret &= ssl_set_new_record_layer(rl->s,
   80|  3.94k|        SSL_CONNECTION_IS_DTLS(rl->s)
  ------------------
  |  |  258|  3.94k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.94k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.94k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
   81|  3.94k|            ? DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
   82|  3.94k|            : TLS_ANY_VERSION,
  ------------------
  |  |   40|  3.94k|#define TLS_ANY_VERSION 0x10000
  ------------------
   83|  3.94k|        OSSL_RECORD_DIRECTION_READ,
  ------------------
  |  |   42|  3.94k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
   84|  3.94k|        OSSL_RECORD_PROTECTION_LEVEL_NONE, NULL, 0,
  ------------------
  |  | 2932|  3.94k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
   85|  3.94k|        NULL, 0, NULL, 0, NULL, 0, NULL, 0,
   86|  3.94k|        NID_undef, NULL, NULL, NULL);
  ------------------
  |  |   18|  3.94k|#define NID_undef                       0
  ------------------
   87|       |
   88|  3.94k|    ret &= ssl_set_new_record_layer(rl->s,
   89|  3.94k|        SSL_CONNECTION_IS_DTLS(rl->s)
  ------------------
  |  |  258|  3.94k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.94k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.94k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
   90|  3.94k|            ? DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
   91|  3.94k|            : TLS_ANY_VERSION,
  ------------------
  |  |   40|  3.94k|#define TLS_ANY_VERSION 0x10000
  ------------------
   92|  3.94k|        OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|  3.94k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
   93|  3.94k|        OSSL_RECORD_PROTECTION_LEVEL_NONE, NULL, 0,
  ------------------
  |  | 2932|  3.94k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
   94|  3.94k|        NULL, 0, NULL, 0, NULL, 0, NULL, 0,
   95|  3.94k|        NID_undef, NULL, NULL, NULL);
  ------------------
  |  |   18|  3.94k|#define NID_undef                       0
  ------------------
   96|       |
   97|       |    /* SSLfatal already called in the event of failure */
   98|  3.94k|    return ret;
   99|  3.94k|}
RECORD_LAYER_write_pending:
  115|  2.23k|{
  116|  2.23k|    return rl->wpend_tot > 0;
  117|  2.23k|}
SSL_CTX_set_default_read_buffer_len:
  207|  2.06k|{
  208|  2.06k|    ctx->default_read_buf_len = len;
  209|  2.06k|}
ssl3_write_bytes:
  275|  1.24k|{
  276|  1.24k|    const unsigned char *buf = buf_;
  277|  1.24k|    size_t tot;
  278|  1.24k|    size_t n, max_send_fragment, split_send_fragment, maxpipes;
  279|  1.24k|    int i;
  280|  1.24k|    SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  1.24k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.24k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.24k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.24k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.24k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.24k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.24k|                             : NULL))
  |  |  ------------------
  ------------------
  281|  1.24k|    OSSL_RECORD_TEMPLATE tmpls[SSL_MAX_PIPELINES];
  282|  1.24k|    unsigned int recversion;
  283|       |
  284|  1.24k|    if (s == NULL)
  ------------------
  |  Branch (284:9): [True: 0, False: 1.24k]
  ------------------
  285|      0|        return -1;
  286|       |
  287|  1.24k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|  1.24k|#define SSL_NOTHING 1
  ------------------
  288|  1.24k|    tot = s->rlayer.wnum;
  289|       |    /*
  290|       |     * ensure that if we end up with a smaller value of data to write out
  291|       |     * than the original len from a write which didn't complete for
  292|       |     * non-blocking I/O and also somehow ended up avoiding the check for
  293|       |     * this in tls_write_check_pending/SSL_R_BAD_WRITE_RETRY as it must never be
  294|       |     * possible to end up with (len-tot) as a large number that will then
  295|       |     * promptly send beyond the end of the users buffer ... so we trap and
  296|       |     * report the error in a way the user will notice
  297|       |     */
  298|  1.24k|    if ((len < s->rlayer.wnum)
  ------------------
  |  Branch (298:9): [True: 0, False: 1.24k]
  ------------------
  299|  1.24k|        || ((s->rlayer.wpend_tot != 0)
  ------------------
  |  Branch (299:13): [True: 0, False: 1.24k]
  ------------------
  300|      0|            && (len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) {
  ------------------
  |  Branch (300:16): [True: 0, False: 0]
  ------------------
  301|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  302|      0|        return -1;
  303|      0|    }
  304|       |
  305|  1.24k|    if (s->early_data_state == SSL_EARLY_DATA_WRITING
  ------------------
  |  Branch (305:9): [True: 0, False: 1.24k]
  ------------------
  306|      0|        && !ossl_early_data_count_ok(s, len, 0, 1)) {
  ------------------
  |  Branch (306:12): [True: 0, False: 0]
  ------------------
  307|       |        /* SSLfatal() already called */
  308|      0|        return -1;
  309|      0|    }
  310|       |
  311|  1.24k|    s->rlayer.wnum = 0;
  312|       |
  313|       |    /*
  314|       |     * If we are supposed to be sending a KeyUpdate or NewSessionTicket then go
  315|       |     * into init unless we have writes pending - in which case we should finish
  316|       |     * doing that first.
  317|       |     */
  318|  1.24k|    if (s->rlayer.wpend_tot == 0 && (s->key_update != SSL_KEY_UPDATE_NONE || s->ext.extra_tickets_expected > 0))
  ------------------
  |  | 1048|  2.48k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  |  Branch (318:9): [True: 1.24k, False: 0]
  |  Branch (318:38): [True: 0, False: 1.24k]
  |  Branch (318:78): [True: 0, False: 1.24k]
  ------------------
  319|      0|        ossl_statem_set_in_init(s, 1);
  320|       |
  321|       |    /*
  322|       |     * When writing early data on the server side we could be "in_init" in
  323|       |     * between receiving the EoED and the CF - but we don't want to handle those
  324|       |     * messages yet.
  325|       |     */
  326|  1.24k|    if (SSL_in_init(ssl) && !ossl_statem_get_in_handshake(s)
  ------------------
  |  Branch (326:9): [True: 1.24k, False: 0]
  |  Branch (326:29): [True: 0, False: 1.24k]
  ------------------
  327|      0|        && s->early_data_state != SSL_EARLY_DATA_UNAUTH_WRITING) {
  ------------------
  |  Branch (327:12): [True: 0, False: 0]
  ------------------
  328|      0|        i = s->handshake_func(ssl);
  329|       |        /* SSLfatal() already called */
  330|      0|        if (i < 0)
  ------------------
  |  Branch (330:13): [True: 0, False: 0]
  ------------------
  331|      0|            return i;
  332|      0|        if (i == 0) {
  ------------------
  |  Branch (332:13): [True: 0, False: 0]
  ------------------
  333|      0|            return -1;
  334|      0|        }
  335|      0|    }
  336|       |
  337|  1.24k|    i = tls_write_check_pending(s, type, buf, len);
  338|  1.24k|    if (i < 0) {
  ------------------
  |  Branch (338:9): [True: 0, False: 1.24k]
  ------------------
  339|       |        /* SSLfatal() already called */
  340|      0|        return i;
  341|  1.24k|    } else if (i > 0) {
  ------------------
  |  Branch (341:16): [True: 0, False: 1.24k]
  ------------------
  342|       |        /* Retry needed */
  343|      0|        i = HANDLE_RLAYER_WRITE_RETURN(s,
  ------------------
  |  |  169|      0|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  344|      0|            s->rlayer.wrlmethod->retry_write_records(s->rlayer.wrl));
  345|      0|        if (i <= 0) {
  ------------------
  |  Branch (345:13): [True: 0, False: 0]
  ------------------
  346|      0|            s->rlayer.wnum = tot;
  347|      0|            return i;
  348|      0|        }
  349|      0|        tot += s->rlayer.wpend_tot;
  350|      0|        s->rlayer.wpend_tot = 0;
  351|      0|    } /* else no retry required */
  352|       |
  353|  1.24k|    if (tot == 0) {
  ------------------
  |  Branch (353:9): [True: 1.24k, False: 0]
  ------------------
  354|       |        /*
  355|       |         * We've not previously sent any data for this write so memorize
  356|       |         * arguments so that we can detect bad write retries later
  357|       |         */
  358|  1.24k|        s->rlayer.wpend_tot = 0;
  359|  1.24k|        s->rlayer.wpend_type = type;
  360|  1.24k|        s->rlayer.wpend_buf = buf;
  361|  1.24k|    }
  362|       |
  363|  1.24k|    if (tot == len) { /* done? */
  ------------------
  |  Branch (363:9): [True: 0, False: 1.24k]
  ------------------
  364|      0|        *written = tot;
  365|      0|        return 1;
  366|      0|    }
  367|       |
  368|       |    /* If we have an alert to send, lets send it */
  369|  1.24k|    if (s->s3.alert_dispatch > 0) {
  ------------------
  |  Branch (369:9): [True: 0, False: 1.24k]
  ------------------
  370|      0|        i = ssl->method->ssl_dispatch_alert(ssl);
  371|      0|        if (i <= 0) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|       |            /* SSLfatal() already called if appropriate */
  373|      0|            s->rlayer.wnum = tot;
  374|      0|            return i;
  375|      0|        }
  376|       |        /* if it went, fall through and send more stuff */
  377|      0|    }
  378|       |
  379|  1.24k|    n = (len - tot);
  380|       |
  381|  1.24k|    max_send_fragment = ssl_get_max_send_fragment(s);
  382|  1.24k|    split_send_fragment = ssl_get_split_send_fragment(s);
  383|       |
  384|  1.24k|    if (max_send_fragment == 0
  ------------------
  |  Branch (384:9): [True: 0, False: 1.24k]
  ------------------
  385|  1.24k|        || split_send_fragment == 0
  ------------------
  |  Branch (385:12): [True: 0, False: 1.24k]
  ------------------
  386|  1.24k|        || split_send_fragment > max_send_fragment) {
  ------------------
  |  Branch (386:12): [True: 0, False: 1.24k]
  ------------------
  387|       |        /*
  388|       |         * We should have prevented this when we set/get the split and max send
  389|       |         * fragments so we shouldn't get here
  390|       |         */
  391|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  392|      0|        return -1;
  393|      0|    }
  394|       |
  395|       |    /*
  396|       |     * Some servers hang if initial client hello is larger than 256 bytes
  397|       |     * and record version number > TLS 1.0
  398|       |     */
  399|  1.24k|    recversion = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   27|  1.24k|#define TLS1_3_VERSION 0x0304
  ------------------
                  recversion = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION : s->version;
  ------------------
  |  |   26|  1.23k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (399:18): [True: 1.23k, False: 5]
  ------------------
  400|  1.24k|    if (SSL_get_state(ssl) == TLS_ST_CW_CLNT_HELLO
  ------------------
  |  Branch (400:9): [True: 1.24k, False: 0]
  ------------------
  401|  1.24k|        && !s->renegotiate
  ------------------
  |  Branch (401:12): [True: 1.24k, False: 0]
  ------------------
  402|  1.24k|        && TLS1_get_version(ssl) > TLS1_VERSION
  ------------------
  |  |   52|  1.24k|    ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  |  |  ------------------
  |  |  |  |   42|  1.24k|#define TLS1_VERSION_MAJOR 0x03
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 1.24k, False: 0]
  |  |  ------------------
  ------------------
                      && TLS1_get_version(ssl) > TLS1_VERSION
  ------------------
  |  |   24|  2.48k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (402:12): [True: 1.24k, False: 0]
  ------------------
  403|  1.24k|        && s->hello_retry_request == SSL_HRR_NONE)
  ------------------
  |  Branch (403:12): [True: 1.24k, False: 0]
  ------------------
  404|  1.24k|        recversion = TLS1_VERSION;
  ------------------
  |  |   24|  1.24k|#define TLS1_VERSION 0x0301
  ------------------
  405|       |
  406|  1.24k|    for (;;) {
  407|  1.24k|        size_t tmppipelen, remain;
  408|  1.24k|        size_t j, lensofar = 0;
  409|       |
  410|       |        /*
  411|       |         * Ask the record layer how it would like to split the amount of data
  412|       |         * that we have, and how many of those records it would like in one go.
  413|       |         */
  414|  1.24k|        maxpipes = s->rlayer.wrlmethod->get_max_records(s->rlayer.wrl, type, n,
  415|  1.24k|            max_send_fragment,
  416|  1.24k|            &split_send_fragment);
  417|       |        /*
  418|       |         * If max_pipelines is 0 then this means "undefined" and we default to
  419|       |         * whatever the record layer wants to do. Otherwise we use the smallest
  420|       |         * value from the number requested by the record layer, and max number
  421|       |         * configured by the user.
  422|       |         */
  423|  1.24k|        if (s->max_pipelines > 0 && maxpipes > s->max_pipelines)
  ------------------
  |  Branch (423:13): [True: 0, False: 1.24k]
  |  Branch (423:37): [True: 0, False: 0]
  ------------------
  424|      0|            maxpipes = s->max_pipelines;
  425|       |
  426|  1.24k|        if (maxpipes > SSL_MAX_PIPELINES)
  ------------------
  |  |   71|  1.24k|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (426:13): [True: 0, False: 1.24k]
  ------------------
  427|      0|            maxpipes = SSL_MAX_PIPELINES;
  ------------------
  |  |   71|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  428|       |
  429|  1.24k|        if (split_send_fragment > max_send_fragment) {
  ------------------
  |  Branch (429:13): [True: 0, False: 1.24k]
  ------------------
  430|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  431|      0|            return -1;
  432|      0|        }
  433|       |
  434|  1.24k|        if (n / maxpipes >= split_send_fragment) {
  ------------------
  |  Branch (434:13): [True: 0, False: 1.24k]
  ------------------
  435|       |            /*
  436|       |             * We have enough data to completely fill all available
  437|       |             * pipelines
  438|       |             */
  439|      0|            for (j = 0; j < maxpipes; j++) {
  ------------------
  |  Branch (439:25): [True: 0, False: 0]
  ------------------
  440|      0|                tmpls[j].type = type;
  441|      0|                tmpls[j].version = recversion;
  442|      0|                tmpls[j].buf = &(buf[tot]) + (j * split_send_fragment);
  443|      0|                tmpls[j].buflen = split_send_fragment;
  444|      0|            }
  445|       |            /* Remember how much data we are going to be sending */
  446|      0|            s->rlayer.wpend_tot = maxpipes * split_send_fragment;
  447|  1.24k|        } else {
  448|       |            /* We can partially fill all available pipelines */
  449|  1.24k|            tmppipelen = n / maxpipes;
  450|  1.24k|            remain = n % maxpipes;
  451|       |            /*
  452|       |             * If there is a remainder we add an extra byte to the first few
  453|       |             * pipelines
  454|       |             */
  455|  1.24k|            if (remain > 0)
  ------------------
  |  Branch (455:17): [True: 0, False: 1.24k]
  ------------------
  456|      0|                tmppipelen++;
  457|  2.48k|            for (j = 0; j < maxpipes; j++) {
  ------------------
  |  Branch (457:25): [True: 1.24k, False: 1.24k]
  ------------------
  458|  1.24k|                tmpls[j].type = type;
  459|  1.24k|                tmpls[j].version = recversion;
  460|  1.24k|                tmpls[j].buf = &(buf[tot]) + lensofar;
  461|  1.24k|                tmpls[j].buflen = tmppipelen;
  462|  1.24k|                lensofar += tmppipelen;
  463|  1.24k|                if (j + 1 == remain)
  ------------------
  |  Branch (463:21): [True: 0, False: 1.24k]
  ------------------
  464|      0|                    tmppipelen--;
  465|  1.24k|            }
  466|       |            /* Remember how much data we are going to be sending */
  467|  1.24k|            s->rlayer.wpend_tot = n;
  468|  1.24k|        }
  469|       |
  470|  1.24k|        i = HANDLE_RLAYER_WRITE_RETURN(s,
  ------------------
  |  |  169|  1.24k|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  471|  1.24k|            s->rlayer.wrlmethod->write_records(s->rlayer.wrl, tmpls, maxpipes));
  472|  1.24k|        if (i <= 0) {
  ------------------
  |  Branch (472:13): [True: 0, False: 1.24k]
  ------------------
  473|       |            /* SSLfatal() already called if appropriate */
  474|      0|            s->rlayer.wnum = tot;
  475|      0|            return i;
  476|      0|        }
  477|       |
  478|  1.24k|        if (s->rlayer.wpend_tot == n
  ------------------
  |  Branch (478:13): [True: 1.24k, False: 0]
  ------------------
  479|      0|            || (type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (479:17): [True: 0, False: 0]
  ------------------
  480|  1.24k|                && (s->mode & SSL_MODE_ENABLE_PARTIAL_WRITE) != 0)) {
  ------------------
  |  |  497|      0|#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001U
  ------------------
  |  Branch (480:20): [True: 0, False: 0]
  ------------------
  481|  1.24k|            *written = tot + s->rlayer.wpend_tot;
  482|  1.24k|            s->rlayer.wpend_tot = 0;
  483|  1.24k|            return 1;
  484|  1.24k|        }
  485|       |
  486|      0|        n -= s->rlayer.wpend_tot;
  487|      0|        tot += s->rlayer.wpend_tot;
  488|      0|    }
  489|  1.24k|}
ossl_tls_handle_rlayer_return:
  493|  4.33k|{
  494|  4.33k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  4.33k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  495|       |
  496|  4.33k|    if (ret == OSSL_RECORD_RETURN_RETRY) {
  ------------------
  |  |   46|  4.33k|#define OSSL_RECORD_RETURN_RETRY 0
  ------------------
  |  Branch (496:9): [True: 248, False: 4.08k]
  ------------------
  497|    248|        s->rwstate = writing ? SSL_WRITING : SSL_READING;
  ------------------
  |  |  933|      0|#define SSL_WRITING 2
  ------------------
                      s->rwstate = writing ? SSL_WRITING : SSL_READING;
  ------------------
  |  |  934|    496|#define SSL_READING 3
  ------------------
  |  Branch (497:22): [True: 0, False: 248]
  ------------------
  498|    248|        ret = -1;
  499|  4.08k|    } else {
  500|  4.08k|        s->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|  4.08k|#define SSL_NOTHING 1
  ------------------
  501|  4.08k|        if (ret == OSSL_RECORD_RETURN_EOF) {
  ------------------
  |  |   49|  4.08k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  |  Branch (501:13): [True: 912, False: 3.17k]
  ------------------
  502|    912|            if (writing) {
  ------------------
  |  Branch (502:17): [True: 0, False: 912]
  ------------------
  503|       |                /*
  504|       |                 * This shouldn't happen with a writing operation. We treat it
  505|       |                 * as fatal.
  506|       |                 */
  507|      0|                ERR_new();
  508|      0|                ERR_set_debug(file, line, 0);
  509|      0|                ossl_statem_fatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  | 1243|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
  510|      0|                    ERR_R_INTERNAL_ERROR, NULL);
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  511|      0|                ret = OSSL_RECORD_RETURN_FATAL;
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  512|    912|            } else if ((s->options & SSL_OP_IGNORE_UNEXPECTED_EOF) != 0) {
  ------------------
  |  |  365|    912|#define SSL_OP_IGNORE_UNEXPECTED_EOF SSL_OP_BIT(7)
  |  |  ------------------
  |  |  |  |  350|    912|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (512:24): [True: 0, False: 912]
  ------------------
  513|      0|                SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN);
  ------------------
  |  |  216|      0|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  514|      0|                s->s3.warn_alert = SSL_AD_CLOSE_NOTIFY;
  ------------------
  |  | 1209|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  515|    912|            } else {
  516|    912|                ERR_new();
  517|    912|                ERR_set_debug(file, line, 0);
  518|       |                /*
  519|       |                 * This reason code is part of the API and may be used by
  520|       |                 * applications for control flow decisions.
  521|       |                 */
  522|    912|                ossl_statem_fatal(s, SSL_AD_DECODE_ERROR,
  ------------------
  |  | 1234|    912|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|    912|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  523|    912|                    SSL_R_UNEXPECTED_EOF_WHILE_READING, NULL);
  ------------------
  |  |  337|    912|#define SSL_R_UNEXPECTED_EOF_WHILE_READING 294
  ------------------
  524|    912|            }
  525|  3.17k|        } else if (ret == OSSL_RECORD_RETURN_FATAL) {
  ------------------
  |  |   48|  3.17k|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  |  Branch (525:20): [True: 215, False: 2.96k]
  ------------------
  526|    215|            int al = s->rlayer.rrlmethod->get_alert_code(s->rlayer.rrl);
  527|       |
  528|    215|            if (al != SSL_AD_NO_ALERT) {
  ------------------
  |  |   63|    215|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (528:17): [True: 22, False: 193]
  ------------------
  529|     22|                ERR_new();
  530|     22|                ERR_set_debug(file, line, 0);
  531|     22|                ossl_statem_fatal(s, al, SSL_R_RECORD_LAYER_FAILURE, NULL);
  ------------------
  |  |  246|     22|#define SSL_R_RECORD_LAYER_FAILURE 313
  ------------------
  532|     22|            }
  533|       |            /*
  534|       |             * else some failure but there is no alert code. We don't log an
  535|       |             * error for this. The record layer should have logged an error
  536|       |             * already or, if not, its due to some sys call error which will be
  537|       |             * reported via SSL_ERROR_SYSCALL and errno.
  538|       |             */
  539|    215|        }
  540|       |        /*
  541|       |         * The record layer distinguishes the cases of EOF, non-fatal
  542|       |         * err and retry. Upper layers do not.
  543|       |         * If we got a retry or success then *ret is already correct,
  544|       |         * otherwise we need to convert the return value.
  545|       |         */
  546|  4.08k|        if (ret == OSSL_RECORD_RETURN_NON_FATAL_ERR || ret == OSSL_RECORD_RETURN_EOF)
  ------------------
  |  |   47|  8.17k|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
                      if (ret == OSSL_RECORD_RETURN_NON_FATAL_ERR || ret == OSSL_RECORD_RETURN_EOF)
  ------------------
  |  |   49|  4.08k|#define OSSL_RECORD_RETURN_EOF -3
  ------------------
  |  Branch (546:13): [True: 0, False: 4.08k]
  |  Branch (546:56): [True: 912, False: 3.17k]
  ------------------
  547|    912|            ret = 0;
  548|  3.17k|        else if (ret < OSSL_RECORD_RETURN_NON_FATAL_ERR)
  ------------------
  |  |   47|  3.17k|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  |  Branch (548:18): [True: 215, False: 2.96k]
  ------------------
  549|    215|            ret = -1;
  550|  4.08k|    }
  551|       |
  552|  4.33k|    return ret;
  553|  4.33k|}
ssl_release_record:
  560|    408|{
  561|    408|    assert(rr->length >= length);
  ------------------
  |  Branch (561:5): [True: 0, False: 408]
  |  Branch (561:5): [True: 408, False: 0]
  ------------------
  562|    408|    if (rr->rechandle != NULL) {
  ------------------
  |  Branch (562:9): [True: 408, False: 0]
  ------------------
  563|    408|        if (length == 0)
  ------------------
  |  Branch (563:13): [True: 154, False: 254]
  ------------------
  564|    154|            length = rr->length;
  565|       |        /* The record layer allocated the buffers for this record */
  566|    408|        if (HANDLE_RLAYER_READ_RETURN(s,
  ------------------
  |  |  166|    408|    ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (566:13): [True: 0, False: 408]
  ------------------
  567|    408|                s->rlayer.rrlmethod->release_record(s->rlayer.rrl,
  568|    408|                    rr->rechandle,
  569|    408|                    length))
  570|    408|            <= 0) {
  571|       |            /* RLAYER_fatal already called */
  572|      0|            return 0;
  573|      0|        }
  574|       |
  575|    408|        if (length == rr->length)
  ------------------
  |  Branch (575:13): [True: 197, False: 211]
  ------------------
  576|    197|            s->rlayer.curr_rec++;
  577|    408|    } else if (length == 0 || length == rr->length) {
  ------------------
  |  Branch (577:16): [True: 0, False: 0]
  |  Branch (577:31): [True: 0, False: 0]
  ------------------
  578|       |        /* We allocated the buffers for this record (only happens with DTLS) */
  579|      0|        OPENSSL_free(rr->allocdata);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  580|      0|        rr->allocdata = NULL;
  581|      0|        s->rlayer.curr_rec++;
  582|      0|    }
  583|    408|    rr->length -= length;
  584|    408|    if (rr->length > 0)
  ------------------
  |  Branch (584:9): [True: 211, False: 197]
  ------------------
  585|    211|        rr->off += length;
  586|    197|    else
  587|    197|        rr->off = 0;
  588|       |
  589|    408|    return 1;
  590|    408|}
ssl3_read_bytes:
  625|  1.65k|{
  626|  1.65k|    int i, j, ret;
  627|  1.65k|    size_t n, curr_rec, totalbytes;
  628|  1.65k|    TLS_RECORD *rr;
  629|  1.65k|    void (*cb)(const SSL *ssl, int type2, int val) = NULL;
  630|  1.65k|    int is_tls13;
  631|  1.65k|    SSL_CONNECTION *s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  1.65k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.65k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.65k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.65k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.65k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.65k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.65k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.65k|                             : NULL))
  |  |  ------------------
  ------------------
  632|       |
  633|  1.65k|    is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  265|  1.65k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  3.31k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.65k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  1.65k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 1.65k, False: 0]
  |  |  ------------------
  |  |  266|  1.65k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  1.65k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  3.31k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 1.65k, False: 0]
  |  |  ------------------
  |  |  267|  1.65k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  1.65k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  1.65k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 1.65k]
  |  |  ------------------
  ------------------
  634|       |
  635|  1.65k|    if ((type != 0
  ------------------
  |  Branch (635:10): [True: 1.65k, False: 0]
  ------------------
  636|  1.65k|            && (type != SSL3_RT_APPLICATION_DATA)
  ------------------
  |  |  222|  1.65k|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (636:16): [True: 1.65k, False: 0]
  ------------------
  637|  1.65k|            && (type != SSL3_RT_HANDSHAKE))
  ------------------
  |  |  221|  1.65k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (637:16): [True: 0, False: 1.65k]
  ------------------
  638|  1.65k|        || (peek && (type != SSL3_RT_APPLICATION_DATA))) {
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (638:13): [True: 0, False: 1.65k]
  |  Branch (638:21): [True: 0, False: 0]
  ------------------
  639|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  640|      0|        return -1;
  641|      0|    }
  642|       |
  643|  1.65k|    if ((type == SSL3_RT_HANDSHAKE) && (s->rlayer.handshake_fragment_len > 0))
  ------------------
  |  |  221|  1.65k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (643:9): [True: 1.65k, False: 0]
  |  Branch (643:40): [True: 0, False: 1.65k]
  ------------------
  644|       |    /* (partially) satisfy request from storage */
  645|      0|    {
  646|      0|        unsigned char *src = s->rlayer.handshake_fragment;
  647|      0|        unsigned char *dst = buf;
  648|      0|        unsigned int k;
  649|       |
  650|       |        /* peek == 0 */
  651|      0|        n = 0;
  652|      0|        while ((len > 0) && (s->rlayer.handshake_fragment_len > 0)) {
  ------------------
  |  Branch (652:16): [True: 0, False: 0]
  |  Branch (652:29): [True: 0, False: 0]
  ------------------
  653|      0|            *dst++ = *src++;
  654|      0|            len--;
  655|      0|            s->rlayer.handshake_fragment_len--;
  656|      0|            n++;
  657|      0|        }
  658|       |        /* move any remaining fragment bytes: */
  659|      0|        for (k = 0; k < s->rlayer.handshake_fragment_len; k++)
  ------------------
  |  Branch (659:21): [True: 0, False: 0]
  ------------------
  660|      0|            s->rlayer.handshake_fragment[k] = *src++;
  661|       |
  662|      0|        if (recvd_type != NULL)
  ------------------
  |  Branch (662:13): [True: 0, False: 0]
  ------------------
  663|      0|            *recvd_type = SSL3_RT_HANDSHAKE;
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  664|       |
  665|      0|        *readbytes = n;
  666|      0|        return 1;
  667|      0|    }
  668|       |
  669|       |    /*
  670|       |     * Now s->rlayer.handshake_fragment_len == 0 if type == SSL3_RT_HANDSHAKE.
  671|       |     */
  672|       |
  673|  1.65k|    if (!ossl_statem_get_in_handshake(s) && SSL_in_init(ssl)) {
  ------------------
  |  Branch (673:9): [True: 0, False: 1.65k]
  |  Branch (673:45): [True: 0, False: 0]
  ------------------
  674|       |        /* type == SSL3_RT_APPLICATION_DATA */
  675|      0|        i = s->handshake_func(ssl);
  676|       |        /* SSLfatal() already called */
  677|      0|        if (i < 0)
  ------------------
  |  Branch (677:13): [True: 0, False: 0]
  ------------------
  678|      0|            return i;
  679|      0|        if (i == 0)
  ------------------
  |  Branch (679:13): [True: 0, False: 0]
  ------------------
  680|      0|            return -1;
  681|      0|    }
  682|  1.70k|start:
  683|  1.70k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|  1.70k|#define SSL_NOTHING 1
  ------------------
  684|       |
  685|       |    /*-
  686|       |     * For each record 'i' up to |num_recs]
  687|       |     * rr[i].type     - is the type of record
  688|       |     * rr[i].data,    - data
  689|       |     * rr[i].off,     - offset into 'data' for next read
  690|       |     * rr[i].length,  - number of bytes.
  691|       |     */
  692|       |    /* get new records if necessary */
  693|  1.70k|    if (s->rlayer.curr_rec >= s->rlayer.num_recs) {
  ------------------
  |  Branch (693:9): [True: 1.57k, False: 134]
  ------------------
  694|  1.57k|        s->rlayer.curr_rec = s->rlayer.num_recs = 0;
  695|  1.57k|        do {
  696|  1.57k|            rr = &s->rlayer.tlsrecs[s->rlayer.num_recs];
  697|       |
  698|  1.57k|            ret = HANDLE_RLAYER_READ_RETURN(s,
  ------------------
  |  |  166|  1.57k|    ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 0, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  699|  1.57k|                s->rlayer.rrlmethod->read_record(s->rlayer.rrl,
  700|  1.57k|                    &rr->rechandle,
  701|  1.57k|                    &rr->version, &rr->type,
  702|  1.57k|                    &rr->data, &rr->length,
  703|  1.57k|                    NULL, NULL));
  704|  1.57k|            if (ret <= 0) {
  ------------------
  |  Branch (704:17): [True: 1.37k, False: 197]
  ------------------
  705|       |                /* SSLfatal() already called if appropriate */
  706|  1.37k|                return ret;
  707|  1.37k|            }
  708|    197|            rr->off = 0;
  709|    197|            s->rlayer.num_recs++;
  710|    197|        } while (s->rlayer.rrlmethod->processed_read_pending(s->rlayer.rrl)
  ------------------
  |  Branch (710:18): [True: 0, False: 197]
  ------------------
  711|      0|            && s->rlayer.num_recs < SSL_MAX_PIPELINES);
  ------------------
  |  |   71|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (711:16): [True: 0, False: 0]
  ------------------
  712|  1.57k|    }
  713|    331|    rr = &s->rlayer.tlsrecs[s->rlayer.curr_rec];
  714|       |
  715|    331|    if (s->rlayer.handshake_fragment_len > 0
  ------------------
  |  Branch (715:9): [True: 0, False: 331]
  ------------------
  716|      0|        && rr->type != SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|    331|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (716:12): [True: 0, False: 0]
  ------------------
  717|      0|        && SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  718|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  719|      0|            SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA);
  720|      0|        return -1;
  721|      0|    }
  722|       |
  723|       |    /*
  724|       |     * Reset the count of consecutive warning alerts if we've got a non-empty
  725|       |     * record that isn't an alert.
  726|       |     */
  727|    331|    if (rr->type != SSL3_RT_ALERT && rr->length != 0)
  ------------------
  |  |  220|    662|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (727:9): [True: 283, False: 48]
  |  Branch (727:38): [True: 263, False: 20]
  ------------------
  728|    263|        s->rlayer.alert_count = 0;
  729|       |
  730|       |    /* we now have a packet which can be read and processed */
  731|       |
  732|    331|    if (s->s3.change_cipher_spec /* set when we receive ChangeCipherSpec,
  ------------------
  |  Branch (732:9): [True: 0, False: 331]
  ------------------
  733|       |                                  * reset by ssl3_get_finished */
  734|      0|        && (rr->type != SSL3_RT_HANDSHAKE)) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (734:12): [True: 0, False: 0]
  ------------------
  735|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  736|      0|            SSL_R_DATA_BETWEEN_CCS_AND_FINISHED);
  737|      0|        return -1;
  738|      0|    }
  739|       |
  740|       |    /*
  741|       |     * If the other end has shut down, throw anything we read away (even in
  742|       |     * 'peek' mode)
  743|       |     */
  744|    331|    if (s->shutdown & SSL_RECEIVED_SHUTDOWN) {
  ------------------
  |  |  216|    331|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  |  Branch (744:9): [True: 0, False: 331]
  ------------------
  745|      0|        s->rlayer.curr_rec++;
  746|      0|        s->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|      0|#define SSL_NOTHING 1
  ------------------
  747|      0|        return 0;
  748|      0|    }
  749|       |
  750|    331|    if (type == rr->type
  ------------------
  |  Branch (750:9): [True: 252, False: 79]
  ------------------
  751|     79|        || (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    158|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (751:13): [True: 18, False: 61]
  ------------------
  752|     18|            && type == SSL3_RT_HANDSHAKE && recvd_type != NULL
  ------------------
  |  |  221|     97|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (752:16): [True: 18, False: 0]
  |  Branch (752:45): [True: 17, False: 1]
  ------------------
  753|    269|            && !is_tls13)) {
  ------------------
  |  Branch (753:16): [True: 17, False: 0]
  ------------------
  754|       |        /*
  755|       |         * SSL3_RT_APPLICATION_DATA or
  756|       |         * SSL3_RT_HANDSHAKE or
  757|       |         * SSL3_RT_CHANGE_CIPHER_SPEC
  758|       |         */
  759|       |        /*
  760|       |         * make sure that we are not getting application data when we are
  761|       |         * doing a handshake for the first time
  762|       |         */
  763|    269|        if (SSL_in_init(ssl) && type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    538|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (763:13): [True: 269, False: 0]
  |  Branch (763:33): [True: 0, False: 269]
  ------------------
  764|      0|            && SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  277|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  278|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  765|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_APP_DATA_IN_HANDSHAKE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  766|      0|            return -1;
  767|      0|        }
  768|       |
  769|    269|        if (type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|    538|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (769:13): [True: 269, False: 0]
  ------------------
  770|    269|            && rr->type == SSL3_RT_CHANGE_CIPHER_SPEC
  ------------------
  |  |  219|    538|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (770:16): [True: 17, False: 252]
  ------------------
  771|     17|            && s->rlayer.handshake_fragment_len > 0) {
  ------------------
  |  Branch (771:16): [True: 0, False: 17]
  ------------------
  772|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_CCS_RECEIVED_EARLY);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  773|      0|            return -1;
  774|      0|        }
  775|       |
  776|    269|        if (recvd_type != NULL)
  ------------------
  |  Branch (776:13): [True: 184, False: 85]
  ------------------
  777|    184|            *recvd_type = rr->type;
  778|       |
  779|    269|        if (len == 0) {
  ------------------
  |  Branch (779:13): [True: 0, False: 269]
  ------------------
  780|       |            /*
  781|       |             * Skip a zero length record. This ensures multiple calls to
  782|       |             * SSL_read() with a zero length buffer will eventually cause
  783|       |             * SSL_pending() to report data as being available.
  784|       |             */
  785|      0|            if (rr->length == 0 && !ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (785:17): [True: 0, False: 0]
  |  Branch (785:36): [True: 0, False: 0]
  ------------------
  786|      0|                return -1;
  787|       |
  788|      0|            return 0;
  789|      0|        }
  790|       |
  791|    269|        totalbytes = 0;
  792|    269|        curr_rec = s->rlayer.curr_rec;
  793|    269|        do {
  794|    269|            if (len - totalbytes > rr->length)
  ------------------
  |  Branch (794:17): [True: 57, False: 212]
  ------------------
  795|     57|                n = rr->length;
  796|    212|            else
  797|    212|                n = len - totalbytes;
  798|       |
  799|    269|            memcpy(buf, &(rr->data[rr->off]), n);
  800|    269|            buf += n;
  801|    269|            if (peek) {
  ------------------
  |  Branch (801:17): [True: 0, False: 269]
  ------------------
  802|       |                /* Mark any zero length record as consumed CVE-2016-6305 */
  803|      0|                if (rr->length == 0 && !ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (803:21): [True: 0, False: 0]
  |  Branch (803:40): [True: 0, False: 0]
  ------------------
  804|      0|                    return -1;
  805|    269|            } else {
  806|    269|                if (!ssl_release_record(s, rr, n))
  ------------------
  |  Branch (806:21): [True: 0, False: 269]
  ------------------
  807|      0|                    return -1;
  808|    269|            }
  809|    269|            if (rr->length == 0
  ------------------
  |  Branch (809:17): [True: 58, False: 211]
  ------------------
  810|    211|                || (peek && n == rr->length)) {
  ------------------
  |  Branch (810:21): [True: 0, False: 211]
  |  Branch (810:29): [True: 0, False: 0]
  ------------------
  811|     58|                rr++;
  812|     58|                curr_rec++;
  813|     58|            }
  814|    269|            totalbytes += n;
  815|    269|        } while (type == SSL3_RT_APPLICATION_DATA
  ------------------
  |  |  222|    538|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (815:18): [True: 0, False: 269]
  ------------------
  816|      0|            && curr_rec < s->rlayer.num_recs
  ------------------
  |  Branch (816:16): [True: 0, False: 0]
  ------------------
  817|      0|            && totalbytes < len);
  ------------------
  |  Branch (817:16): [True: 0, False: 0]
  ------------------
  818|    269|        if (totalbytes == 0) {
  ------------------
  |  Branch (818:13): [True: 15, False: 254]
  ------------------
  819|       |            /* We must have read empty records. Get more data */
  820|     15|            goto start;
  821|     15|        }
  822|    254|        *readbytes = totalbytes;
  823|    254|        return 1;
  824|    269|    }
  825|       |
  826|       |    /*
  827|       |     * If we get here, then type != rr->type; if we have a handshake message,
  828|       |     * then it was unexpected (Hello Request or Client Hello) or invalid (we
  829|       |     * were actually expecting a CCS).
  830|       |     */
  831|       |
  832|       |    /*
  833|       |     * Lets just double check that we've not got an SSLv2 record
  834|       |     */
  835|     62|    if (rr->version == SSL2_VERSION) {
  ------------------
  |  |   23|     62|#define SSL2_VERSION 0x0002
  ------------------
  |  Branch (835:9): [True: 0, False: 62]
  ------------------
  836|       |        /*
  837|       |         * Should never happen. ssl3_get_record() should only give us an SSLv2
  838|       |         * record back if this is the first packet and we are looking for an
  839|       |         * initial ClientHello. Therefore |type| should always be equal to
  840|       |         * |rr->type|. If not then something has gone horribly wrong
  841|       |         */
  842|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  843|      0|        return -1;
  844|      0|    }
  845|       |
  846|     62|    if (ssl->method->version == TLS_ANY_VERSION
  ------------------
  |  |   40|    124|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (846:9): [True: 62, False: 0]
  ------------------
  847|     62|        && (s->server || rr->type != SSL3_RT_ALERT)) {
  ------------------
  |  |  220|     62|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (847:13): [True: 0, False: 62]
  |  Branch (847:26): [True: 14, False: 48]
  ------------------
  848|       |        /*
  849|       |         * If we've got this far and still haven't decided on what version
  850|       |         * we're using then this must be a client side alert we're dealing
  851|       |         * with. We shouldn't be receiving anything other than a ClientHello
  852|       |         * if we are a server.
  853|       |         */
  854|     14|        s->version = rr->version;
  855|     14|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  148|     14|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     14|    (ERR_new(),                                                  \
  |  |  |  |  151|     14|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     14|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     14|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  856|     14|        return -1;
  857|     14|    }
  858|       |
  859|       |    /*-
  860|       |     * s->rlayer.handshake_fragment_len == 4  iff  rr->type == SSL3_RT_HANDSHAKE;
  861|       |     * (Possibly rr is 'empty' now, i.e. rr->length may be 0.)
  862|       |     */
  863|       |
  864|     48|    if (rr->type == SSL3_RT_ALERT) {
  ------------------
  |  |  220|     48|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (864:9): [True: 48, False: 0]
  ------------------
  865|     48|        unsigned int alert_level, alert_descr;
  866|     48|        const unsigned char *alert_bytes = rr->data + rr->off;
  867|     48|        PACKET alert;
  868|       |
  869|     48|        if (!PACKET_buf_init(&alert, alert_bytes, rr->length)
  ------------------
  |  Branch (869:13): [True: 0, False: 48]
  ------------------
  870|     48|            || !PACKET_get_1(&alert, &alert_level)
  ------------------
  |  Branch (870:16): [True: 1, False: 47]
  ------------------
  871|     47|            || !PACKET_get_1(&alert, &alert_descr)
  ------------------
  |  Branch (871:16): [True: 1, False: 46]
  ------------------
  872|     46|            || PACKET_remaining(&alert) != 0) {
  ------------------
  |  Branch (872:16): [True: 2, False: 44]
  ------------------
  873|      4|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_INVALID_ALERT);
  ------------------
  |  |  148|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      4|    (ERR_new(),                                                  \
  |  |  |  |  151|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  874|      4|            return -1;
  875|      4|        }
  876|       |
  877|     44|        if (s->msg_callback)
  ------------------
  |  Branch (877:13): [True: 0, False: 44]
  ------------------
  878|      0|            s->msg_callback(0, s->version, SSL3_RT_ALERT, alert_bytes, 2, ssl,
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  879|      0|                s->msg_callback_arg);
  880|       |
  881|     44|        if (s->info_callback != NULL)
  ------------------
  |  Branch (881:13): [True: 0, False: 44]
  ------------------
  882|      0|            cb = s->info_callback;
  883|     44|        else if (ssl->ctx->info_callback != NULL)
  ------------------
  |  Branch (883:18): [True: 0, False: 44]
  ------------------
  884|      0|            cb = ssl->ctx->info_callback;
  885|       |
  886|     44|        if (cb != NULL) {
  ------------------
  |  Branch (886:13): [True: 0, False: 44]
  ------------------
  887|      0|            j = (alert_level << 8) | alert_descr;
  888|      0|            cb(ssl, SSL_CB_READ_ALERT, j);
  ------------------
  |  | 1140|      0|#define SSL_CB_READ_ALERT (SSL_CB_ALERT | SSL_CB_READ)
  |  |  ------------------
  |  |  |  | 1139|      0|#define SSL_CB_ALERT 0x4000 /* used in callback */
  |  |  ------------------
  |  |               #define SSL_CB_READ_ALERT (SSL_CB_ALERT | SSL_CB_READ)
  |  |  ------------------
  |  |  |  | 1137|      0|#define SSL_CB_READ 0x04
  |  |  ------------------
  ------------------
  889|      0|        }
  890|       |
  891|     44|        if ((!is_tls13 && alert_level == SSL3_AL_WARNING)
  ------------------
  |  |  249|     44|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (891:14): [True: 44, False: 0]
  |  Branch (891:27): [True: 35, False: 9]
  ------------------
  892|     35|            || (is_tls13 && alert_descr == SSL_AD_USER_CANCELLED)) {
  ------------------
  |  | 1244|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (892:17): [True: 0, False: 9]
  |  Branch (892:29): [True: 0, False: 0]
  ------------------
  893|     35|            s->s3.warn_alert = alert_descr;
  894|     35|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (894:17): [True: 0, False: 35]
  ------------------
  895|      0|                return -1;
  896|       |
  897|     35|            s->rlayer.alert_count++;
  898|     35|            if (s->rlayer.alert_count == MAX_WARN_ALERT_COUNT) {
  ------------------
  |  |   17|     35|#define MAX_WARN_ALERT_COUNT 5
  ------------------
  |  Branch (898:17): [True: 1, False: 34]
  ------------------
  899|      1|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  900|      1|                    SSL_R_TOO_MANY_WARN_ALERTS);
  901|      1|                return -1;
  902|      1|            }
  903|     35|        }
  904|       |
  905|       |        /*
  906|       |         * Apart from close_notify the only other warning alert in TLSv1.3
  907|       |         * is user_cancelled - which we just ignore.
  908|       |         */
  909|     43|        if (is_tls13 && alert_descr == SSL_AD_USER_CANCELLED) {
  ------------------
  |  | 1244|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (909:13): [True: 0, False: 43]
  |  Branch (909:25): [True: 0, False: 0]
  ------------------
  910|      0|            goto start;
  911|     43|        } else if (alert_descr == SSL_AD_CLOSE_NOTIFY
  ------------------
  |  | 1209|     43|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|     86|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (911:20): [True: 2, False: 41]
  ------------------
  912|      2|            && (is_tls13 || alert_level == SSL3_AL_WARNING)) {
  ------------------
  |  |  249|      2|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (912:17): [True: 0, False: 2]
  |  Branch (912:29): [True: 1, False: 1]
  ------------------
  913|      1|            s->shutdown |= SSL_RECEIVED_SHUTDOWN;
  ------------------
  |  |  216|      1|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  914|      1|            return 0;
  915|     42|        } else if (alert_level == SSL3_AL_FATAL || is_tls13) {
  ------------------
  |  |  250|     84|#define SSL3_AL_FATAL 2
  ------------------
  |  Branch (915:20): [True: 4, False: 38]
  |  Branch (915:52): [True: 0, False: 38]
  ------------------
  916|      4|            s->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|      4|#define SSL_NOTHING 1
  ------------------
  917|      4|            s->s3.fatal_alert = alert_descr;
  918|      4|            SSLfatal_data(s, SSL_AD_NO_ALERT,
  ------------------
  |  |  150|      4|    (ERR_new(),                                                  \
  |  |  151|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      4|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_NO_ALERT,
  ------------------
  |  |   63|      4|#define SSL_AD_NO_ALERT -1
  ------------------
  919|      4|                SSL_AD_REASON_OFFSET + alert_descr,
  ------------------
  |  | 1206|      4|#define SSL_AD_REASON_OFFSET 1000 /* offset to get SSL_R_... value \
  ------------------
  920|      4|                "SSL alert number %d", alert_descr);
  921|      4|            s->shutdown |= SSL_RECEIVED_SHUTDOWN;
  ------------------
  |  |  216|      4|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
  922|      4|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (922:17): [True: 0, False: 4]
  ------------------
  923|      0|                return -1;
  924|      4|            SSL_CTX_remove_session(s->session_ctx, s->session);
  925|      4|            return 0;
  926|     38|        } else if (alert_descr == SSL_AD_NO_RENEGOTIATION) {
  ------------------
  |  | 1245|     38|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|     38|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (926:20): [True: 1, False: 37]
  ------------------
  927|       |            /*
  928|       |             * This is a warning but we receive it if we requested
  929|       |             * renegotiation and the peer denied it. Terminate with a fatal
  930|       |             * alert because if the application tried to renegotiate it
  931|       |             * presumably had a good reason and expects it to succeed. In
  932|       |             * the future we might have a renegotiation where we don't care
  933|       |             * if the peer refused it where we carry on.
  934|       |             */
  935|      1|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_NO_RENEGOTIATION);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  936|      1|            return -1;
  937|     37|        } else if (alert_level == SSL3_AL_WARNING) {
  ------------------
  |  |  249|     37|#define SSL3_AL_WARNING 1
  ------------------
  |  Branch (937:20): [True: 32, False: 5]
  ------------------
  938|       |            /* We ignore any other warning alert in TLSv1.2 and below */
  939|     32|            goto start;
  940|     32|        }
  941|       |
  942|     43|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_UNKNOWN_ALERT_TYPE);
  ------------------
  |  |  148|      5|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      5|    (ERR_new(),                                                  \
  |  |  |  |  151|      5|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      5|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      5|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  943|      5|        return -1;
  944|     43|    }
  945|       |
  946|      0|    if ((s->shutdown & SSL_SENT_SHUTDOWN) != 0) {
  ------------------
  |  |  215|      0|#define SSL_SENT_SHUTDOWN 1
  ------------------
  |  Branch (946:9): [True: 0, False: 0]
  ------------------
  947|      0|        if (rr->type == SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|            BIO *rbio;
  949|       |
  950|       |            /*
  951|       |             * We ignore any handshake messages sent to us unless they are
  952|       |             * TLSv1.3 in which case we want to process them. For all other
  953|       |             * handshake messages we can't do anything reasonable with them
  954|       |             * because we are unable to write any response due to having already
  955|       |             * sent close_notify.
  956|       |             */
  957|      0|            if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  958|      0|                if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (958:21): [True: 0, False: 0]
  ------------------
  959|      0|                    return -1;
  960|       |
  961|      0|                if ((s->mode & SSL_MODE_AUTO_RETRY) != 0)
  ------------------
  |  |  508|      0|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
  |  Branch (961:21): [True: 0, False: 0]
  ------------------
  962|      0|                    goto start;
  963|       |
  964|      0|                s->rwstate = SSL_READING;
  ------------------
  |  |  934|      0|#define SSL_READING 3
  ------------------
  965|      0|                rbio = SSL_get_rbio(ssl);
  966|      0|                BIO_clear_retry_flags(rbio);
  ------------------
  |  |  263|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  967|      0|                BIO_set_retry_read(rbio);
  ------------------
  |  |  257|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  968|      0|                return -1;
  969|      0|            }
  970|      0|        } else {
  971|       |            /*
  972|       |             * The peer is continuing to send application data, but we have
  973|       |             * already sent close_notify. If this was expected we should have
  974|       |             * been called via SSL_read() and this would have been handled
  975|       |             * above.
  976|       |             * No alert sent because we already sent close_notify
  977|       |             */
  978|      0|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (978:17): [True: 0, False: 0]
  ------------------
  979|      0|                return -1;
  980|      0|            SSLfatal(s, SSL_AD_NO_ALERT,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  981|      0|                SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY);
  982|      0|            return -1;
  983|      0|        }
  984|      0|    }
  985|       |
  986|       |    /*
  987|       |     * For handshake data we have 'fragment' storage, so fill that so that we
  988|       |     * can process the header at a fixed place. This is done after the
  989|       |     * "SHUTDOWN" code above to avoid filling the fragment storage with data
  990|       |     * that we're just going to discard.
  991|       |     */
  992|      0|    if (rr->type == SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (992:9): [True: 0, False: 0]
  ------------------
  993|      0|        size_t dest_maxlen = sizeof(s->rlayer.handshake_fragment);
  994|      0|        unsigned char *dest = s->rlayer.handshake_fragment;
  995|      0|        size_t *dest_len = &s->rlayer.handshake_fragment_len;
  996|       |
  997|      0|        n = dest_maxlen - *dest_len; /* available space in 'dest' */
  998|      0|        if (rr->length < n)
  ------------------
  |  Branch (998:13): [True: 0, False: 0]
  ------------------
  999|      0|            n = rr->length; /* available bytes */
 1000|       |
 1001|       |        /* now move 'n' bytes: */
 1002|      0|        if (n > 0) {
  ------------------
  |  Branch (1002:13): [True: 0, False: 0]
  ------------------
 1003|      0|            memcpy(dest + *dest_len, rr->data + rr->off, n);
 1004|      0|            *dest_len += n;
 1005|      0|        }
 1006|       |        /*
 1007|       |         * We release the number of bytes consumed, or the whole record if it
 1008|       |         * is zero length
 1009|       |         */
 1010|      0|        if ((n > 0 || rr->length == 0) && !ssl_release_record(s, rr, n))
  ------------------
  |  Branch (1010:14): [True: 0, False: 0]
  |  Branch (1010:23): [True: 0, False: 0]
  |  Branch (1010:43): [True: 0, False: 0]
  ------------------
 1011|      0|            return -1;
 1012|       |
 1013|      0|        if (*dest_len < dest_maxlen)
  ------------------
  |  Branch (1013:13): [True: 0, False: 0]
  ------------------
 1014|      0|            goto start; /* fragment was too small */
 1015|      0|    }
 1016|       |
 1017|      0|    if (rr->type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1017:9): [True: 0, False: 0]
  ------------------
 1018|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_CCS_RECEIVED_EARLY);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1019|      0|        return -1;
 1020|      0|    }
 1021|       |
 1022|       |    /*
 1023|       |     * Unexpected handshake message (ClientHello, NewSessionTicket (TLS1.3) or
 1024|       |     * protocol violation)
 1025|       |     */
 1026|      0|    if ((s->rlayer.handshake_fragment_len >= 4)
  ------------------
  |  Branch (1026:9): [True: 0, False: 0]
  ------------------
 1027|      0|        && !ossl_statem_get_in_handshake(s)) {
  ------------------
  |  Branch (1027:12): [True: 0, False: 0]
  ------------------
 1028|      0|        int ined = (s->early_data_state == SSL_EARLY_DATA_READING);
 1029|       |
 1030|       |        /* We found handshake data, so we're going back into init */
 1031|      0|        ossl_statem_set_in_init(s, 1);
 1032|       |
 1033|      0|        i = s->handshake_func(ssl);
 1034|       |        /* SSLfatal() already called if appropriate */
 1035|      0|        if (i < 0)
  ------------------
  |  Branch (1035:13): [True: 0, False: 0]
  ------------------
 1036|      0|            return i;
 1037|      0|        if (i == 0) {
  ------------------
  |  Branch (1037:13): [True: 0, False: 0]
  ------------------
 1038|      0|            return -1;
 1039|      0|        }
 1040|       |
 1041|       |        /*
 1042|       |         * If we were actually trying to read early data and we found a
 1043|       |         * handshake message, then we don't want to continue to try and read
 1044|       |         * the application data any more. It won't be "early" now.
 1045|       |         */
 1046|      0|        if (ined)
  ------------------
  |  Branch (1046:13): [True: 0, False: 0]
  ------------------
 1047|      0|            return -1;
 1048|       |
 1049|      0|        if (!(s->mode & SSL_MODE_AUTO_RETRY)) {
  ------------------
  |  |  508|      0|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
  |  Branch (1049:13): [True: 0, False: 0]
  ------------------
 1050|      0|            if (!RECORD_LAYER_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1050:17): [True: 0, False: 0]
  ------------------
 1051|      0|                BIO *bio;
 1052|       |                /*
 1053|       |                 * In the case where we try to read application data, but we
 1054|       |                 * trigger an SSL handshake, we return -1 with the retry
 1055|       |                 * option set.  Otherwise renegotiation may cause nasty
 1056|       |                 * problems in the blocking world
 1057|       |                 */
 1058|      0|                s->rwstate = SSL_READING;
  ------------------
  |  |  934|      0|#define SSL_READING 3
  ------------------
 1059|      0|                bio = SSL_get_rbio(ssl);
 1060|      0|                BIO_clear_retry_flags(bio);
  ------------------
  |  |  263|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
 1061|      0|                BIO_set_retry_read(bio);
  ------------------
  |  |  257|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
 1062|      0|                return -1;
 1063|      0|            }
 1064|      0|        }
 1065|      0|        goto start;
 1066|      0|    }
 1067|       |
 1068|      0|    switch (rr->type) {
 1069|      0|    default:
  ------------------
  |  Branch (1069:5): [True: 0, False: 0]
  ------------------
 1070|       |        /*
 1071|       |         * TLS 1.0 and 1.1 say you SHOULD ignore unrecognised record types, but
 1072|       |         * TLS 1.2 says you MUST send an unexpected message alert. We use the
 1073|       |         * TLS 1.2 behaviour for all protocol versions to prevent issues where
 1074|       |         * no progress is being made and the peer continually sends unrecognised
 1075|       |         * record types, using up resources processing them.
 1076|       |         */
 1077|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_RECORD);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1078|      0|        return -1;
 1079|      0|    case SSL3_RT_CHANGE_CIPHER_SPEC:
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1079:5): [True: 0, False: 0]
  ------------------
 1080|      0|    case SSL3_RT_ALERT:
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  |  Branch (1080:5): [True: 0, False: 0]
  ------------------
 1081|      0|    case SSL3_RT_HANDSHAKE:
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1081:5): [True: 0, False: 0]
  ------------------
 1082|       |        /*
 1083|       |         * we already handled all of these, with the possible exception of
 1084|       |         * SSL3_RT_HANDSHAKE when ossl_statem_get_in_handshake(s) is true, but
 1085|       |         * that should not happen when type != rr->type
 1086|       |         */
 1087|      0|        SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1088|      0|        return -1;
 1089|      0|    case SSL3_RT_APPLICATION_DATA:
  ------------------
  |  |  222|      0|#define SSL3_RT_APPLICATION_DATA 23
  ------------------
  |  Branch (1089:5): [True: 0, False: 0]
  ------------------
 1090|       |        /*
 1091|       |         * At this point, we were expecting handshake data, but have
 1092|       |         * application data.  If the library was running inside ssl3_read()
 1093|       |         * (i.e. in_read_app_data is set) and it makes sense to read
 1094|       |         * application data at this point (session renegotiation not yet
 1095|       |         * started), we will indulge it.
 1096|       |         */
 1097|      0|        if (ossl_statem_app_data_allowed(s)) {
  ------------------
  |  Branch (1097:13): [True: 0, False: 0]
  ------------------
 1098|      0|            s->s3.in_read_app_data = 2;
 1099|      0|            return -1;
 1100|      0|        } else if (ossl_statem_skip_early_data(s)) {
  ------------------
  |  Branch (1100:20): [True: 0, False: 0]
  ------------------
 1101|       |            /*
 1102|       |             * This can happen after a client sends a CH followed by early_data,
 1103|       |             * but the server responds with a HelloRetryRequest. The server
 1104|       |             * reads the next record from the client expecting to find a
 1105|       |             * plaintext ClientHello but gets a record which appears to be
 1106|       |             * application data. The trial decrypt "works" because null
 1107|       |             * decryption was applied. We just skip it and move on to the next
 1108|       |             * record.
 1109|       |             */
 1110|      0|            if (!ossl_early_data_count_ok(s, rr->length,
  ------------------
  |  Branch (1110:17): [True: 0, False: 0]
  ------------------
 1111|      0|                    EARLY_DATA_CIPHERTEXT_OVERHEAD, 0)) {
  ------------------
  |  |  616|      0|#define EARLY_DATA_CIPHERTEXT_OVERHEAD ((6 * (EVP_GCM_TLS_TAG_LEN + 1)) + 2)
  |  |  ------------------
  |  |  |  |  476|      0|#define EVP_GCM_TLS_TAG_LEN 16
  |  |  ------------------
  ------------------
 1112|       |                /* SSLfatal() already called */
 1113|      0|                return -1;
 1114|      0|            }
 1115|      0|            if (!ssl_release_record(s, rr, 0))
  ------------------
  |  Branch (1115:17): [True: 0, False: 0]
  ------------------
 1116|      0|                return -1;
 1117|      0|            goto start;
 1118|      0|        } else {
 1119|       |            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_RECORD);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1120|      0|            return -1;
 1121|      0|        }
 1122|      0|    }
 1123|      0|}
RECORD_LAYER_is_sslv2_record:
 1130|    162|{
 1131|    162|    if (SSL_CONNECTION_IS_DTLS(rl->s))
  ------------------
  |  |  258|    162|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|    162|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|    162|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 162]
  |  |  ------------------
  ------------------
 1132|      0|        return 0;
 1133|    162|    return rl->tlsrecs[0].version == SSL2_VERSION;
  ------------------
  |  |   23|    162|#define SSL2_VERSION 0x0002
  ------------------
 1134|    162|}
ssl_set_new_record_layer:
 1252|  7.89k|{
 1253|  7.89k|    OSSL_PARAM options[5], *opts = options;
 1254|  7.89k|    OSSL_PARAM settings[6], *set = settings;
 1255|  7.89k|    const OSSL_RECORD_METHOD **thismethod;
 1256|  7.89k|    OSSL_RECORD_LAYER **thisrl, *newrl = NULL;
 1257|  7.89k|    BIO *thisbio;
 1258|  7.89k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  7.89k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1259|  7.89k|    const OSSL_RECORD_METHOD *meth;
 1260|  7.89k|    int use_etm, stream_mac = 0, tlstree = 0;
 1261|  7.89k|    unsigned int maxfrag = (direction == OSSL_RECORD_DIRECTION_WRITE)
  ------------------
  |  |   43|  7.89k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (1261:28): [True: 3.94k, False: 3.94k]
  ------------------
 1262|  7.89k|        ? ssl_get_max_send_fragment(s)
 1263|  7.89k|        : SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  3.94k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1264|  7.89k|    int use_early_data = 0;
 1265|  7.89k|    uint32_t max_early_data;
 1266|  7.89k|    COMP_METHOD *compm = (comp == NULL) ? NULL : comp->method;
  ------------------
  |  Branch (1266:26): [True: 7.89k, False: 0]
  ------------------
 1267|       |
 1268|  7.89k|    meth = ssl_select_next_record_layer(s, direction, level);
 1269|       |
 1270|  7.89k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1270:9): [True: 3.94k, False: 3.94k]
  ------------------
 1271|  3.94k|        thismethod = &s->rlayer.rrlmethod;
 1272|  3.94k|        thisrl = &s->rlayer.rrl;
 1273|  3.94k|        thisbio = s->rbio;
 1274|  3.94k|    } else {
 1275|  3.94k|        thismethod = &s->rlayer.wrlmethod;
 1276|  3.94k|        thisrl = &s->rlayer.wrl;
 1277|  3.94k|        thisbio = s->wbio;
 1278|  3.94k|    }
 1279|       |
 1280|  7.89k|    if (meth == NULL)
  ------------------
  |  Branch (1280:9): [True: 0, False: 7.89k]
  ------------------
 1281|      0|        meth = *thismethod;
 1282|       |
 1283|  7.89k|    if (!ossl_assert(meth != NULL)) {
  ------------------
  |  |   52|  7.89k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  7.89k|    __FILE__, __LINE__)
  ------------------
  |  Branch (1283:9): [True: 0, False: 7.89k]
  ------------------
 1284|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1285|      0|        return 0;
 1286|      0|    }
 1287|       |
 1288|       |    /* Parameters that *may* be supported by a record layer if passed */
 1289|  7.89k|    *opts++ = OSSL_PARAM_construct_uint64(OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS,
  ------------------
  |  |  332|  7.89k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
  ------------------
 1290|  7.89k|        &s->options);
 1291|  7.89k|    *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  331|  7.89k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 1292|  7.89k|        &s->mode);
 1293|  7.89k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1293:9): [True: 3.94k, False: 3.94k]
  ------------------
 1294|  3.94k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN,
  ------------------
  |  |  337|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
  ------------------
 1295|  3.94k|            &s->rlayer.default_read_buf_len);
 1296|  3.94k|        *opts++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD,
  ------------------
  |  |  333|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
  ------------------
 1297|  3.94k|            &s->rlayer.read_ahead);
 1298|  3.94k|    } else {
 1299|  3.94k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING,
  ------------------
  |  |  327|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
  ------------------
 1300|  3.94k|            &s->rlayer.block_padding);
 1301|  3.94k|        *opts++ = OSSL_PARAM_construct_size_t(OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING,
  ------------------
  |  |  328|  3.94k|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
  ------------------
 1302|  3.94k|            &s->rlayer.hs_padding);
 1303|  3.94k|    }
 1304|  7.89k|    *opts = OSSL_PARAM_construct_end();
 1305|       |
 1306|       |    /* Parameters that *must* be supported by a record layer if passed */
 1307|  7.89k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1307:9): [True: 3.94k, False: 3.94k]
  ------------------
 1308|  3.94k|        use_etm = SSL_READ_ETM(s) ? 1 : 0;
  ------------------
  |  |  300|  3.94k|#define SSL_READ_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_READ)
  |  |  ------------------
  |  |  |  |  296|  3.94k|#define TLS1_FLAGS_ENCRYPT_THEN_MAC_READ 0x0100
  |  |  ------------------
  |  |  |  Branch (300:25): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
 1309|  3.94k|        if ((s->mac_flags & SSL_MAC_FLAG_READ_MAC_STREAM) != 0)
  ------------------
  |  |  951|  3.94k|#define SSL_MAC_FLAG_READ_MAC_STREAM 1
  ------------------
  |  Branch (1309:13): [True: 0, False: 3.94k]
  ------------------
 1310|      0|            stream_mac = 1;
 1311|       |
 1312|  3.94k|        if ((s->mac_flags & SSL_MAC_FLAG_READ_MAC_TLSTREE) != 0)
  ------------------
  |  |  953|  3.94k|#define SSL_MAC_FLAG_READ_MAC_TLSTREE 4
  ------------------
  |  Branch (1312:13): [True: 0, False: 3.94k]
  ------------------
 1313|      0|            tlstree = 1;
 1314|  3.94k|    } else {
 1315|  3.94k|        use_etm = SSL_WRITE_ETM(s) ? 1 : 0;
  ------------------
  |  |  301|  3.94k|#define SSL_WRITE_ETM(s) (s->s3.flags & TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE)
  |  |  ------------------
  |  |  |  |  302|  3.94k|#define TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE 0x0400
  |  |  ------------------
  |  |  |  Branch (301:26): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
 1316|  3.94k|        if ((s->mac_flags & SSL_MAC_FLAG_WRITE_MAC_STREAM) != 0)
  ------------------
  |  |  952|  3.94k|#define SSL_MAC_FLAG_WRITE_MAC_STREAM 2
  ------------------
  |  Branch (1316:13): [True: 0, False: 3.94k]
  ------------------
 1317|      0|            stream_mac = 1;
 1318|       |
 1319|  3.94k|        if ((s->mac_flags & SSL_MAC_FLAG_WRITE_MAC_TLSTREE) != 0)
  ------------------
  |  |  954|  3.94k|#define SSL_MAC_FLAG_WRITE_MAC_TLSTREE 8
  ------------------
  |  Branch (1319:13): [True: 0, False: 3.94k]
  ------------------
 1320|      0|            tlstree = 1;
 1321|  3.94k|    }
 1322|       |
 1323|  7.89k|    if (use_etm)
  ------------------
  |  Branch (1323:9): [True: 0, False: 7.89k]
  ------------------
 1324|      0|        *set++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM,
  ------------------
  |  |  336|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
  ------------------
 1325|      0|            &use_etm);
 1326|       |
 1327|  7.89k|    if (stream_mac)
  ------------------
  |  Branch (1327:9): [True: 0, False: 7.89k]
  ------------------
 1328|      0|        *set++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC,
  ------------------
  |  |  334|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
  ------------------
 1329|      0|            &stream_mac);
 1330|       |
 1331|  7.89k|    if (tlstree)
  ------------------
  |  Branch (1331:9): [True: 0, False: 7.89k]
  ------------------
 1332|      0|        *set++ = OSSL_PARAM_construct_int(OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE,
  ------------------
  |  |  335|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
  ------------------
 1333|      0|            &tlstree);
 1334|       |
 1335|       |    /*
 1336|       |     * We only need to do this for the read side. The write side should already
 1337|       |     * have the correct value due to the ssl_get_max_send_fragment() call above
 1338|       |     */
 1339|  7.89k|    if (direction == OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  15.7k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1339:9): [True: 3.94k, False: 3.94k]
  ------------------
 1340|  3.94k|        && s->session != NULL
  ------------------
  |  Branch (1340:12): [True: 0, False: 3.94k]
  ------------------
 1341|      0|        && USE_MAX_FRAGMENT_LENGTH_EXT(s->session))
  ------------------
  |  |  296|      0|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  294|      0|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  229|      0|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  232|      0|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:6): [True: 0, False: 0]
  |  |  |  |  |  Branch (294:53): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1342|      0|        maxfrag = GET_MAX_FRAGMENT_LENGTH(s->session);
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 1343|       |
 1344|  7.89k|    if (maxfrag != SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|  7.89k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (1344:9): [True: 0, False: 7.89k]
  ------------------
 1345|      0|        *set++ = OSSL_PARAM_construct_uint(OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN,
  ------------------
  |  |  330|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
  ------------------
 1346|      0|            &maxfrag);
 1347|       |
 1348|       |    /*
 1349|       |     * The record layer must check the amount of early data sent or received
 1350|       |     * using the early keys. A server also needs to worry about rejected early
 1351|       |     * data that might arrive when the handshake keys are in force.
 1352|       |     */
 1353|  7.89k|    if (s->server && direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|      0|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1353:9): [True: 0, False: 7.89k]
  |  Branch (1353:22): [True: 0, False: 0]
  ------------------
 1354|      0|        use_early_data = (level == OSSL_RECORD_PROTECTION_LEVEL_EARLY
  ------------------
  |  | 2933|      0|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
  |  Branch (1354:27): [True: 0, False: 0]
  ------------------
 1355|      0|            || level == OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE);
  ------------------
  |  | 2934|      0|#define OSSL_RECORD_PROTECTION_LEVEL_HANDSHAKE 2
  ------------------
  |  Branch (1355:16): [True: 0, False: 0]
  ------------------
 1356|  7.89k|    } else if (!s->server && direction == OSSL_RECORD_DIRECTION_WRITE) {
  ------------------
  |  |   43|  7.89k|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  |  Branch (1356:16): [True: 7.89k, False: 0]
  |  Branch (1356:30): [True: 3.94k, False: 3.94k]
  ------------------
 1357|  3.94k|        use_early_data = (level == OSSL_RECORD_PROTECTION_LEVEL_EARLY);
  ------------------
  |  | 2933|  3.94k|#define OSSL_RECORD_PROTECTION_LEVEL_EARLY 1
  ------------------
 1358|  3.94k|    }
 1359|  7.89k|    if (use_early_data) {
  ------------------
  |  Branch (1359:9): [True: 0, False: 7.89k]
  ------------------
 1360|      0|        max_early_data = ossl_get_max_early_data(s);
 1361|       |
 1362|      0|        if (max_early_data != 0)
  ------------------
  |  Branch (1362:13): [True: 0, False: 0]
  ------------------
 1363|      0|            *set++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA,
  ------------------
  |  |  329|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
  ------------------
 1364|      0|                &max_early_data);
 1365|      0|    }
 1366|       |
 1367|  7.89k|    *set = OSSL_PARAM_construct_end();
 1368|       |
 1369|  7.89k|    for (;;) {
 1370|  7.89k|        int rlret;
 1371|  7.89k|        BIO *prev = NULL;
 1372|  7.89k|        BIO *next = NULL;
 1373|  7.89k|        unsigned int epoch = 0;
 1374|  7.89k|        OSSL_DISPATCH rlayer_dispatch_tmp[OSSL_NELEM(rlayer_dispatch)];
 1375|  7.89k|        size_t i, j;
 1376|       |
 1377|  7.89k|        if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1377:13): [True: 3.94k, False: 3.94k]
  ------------------
 1378|  3.94k|            prev = s->rlayer.rrlnext;
 1379|  3.94k|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  7.89k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.94k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.94k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
 1380|      0|                && level != OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2932|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1380:20): [True: 0, False: 0]
  ------------------
 1381|      0|                epoch = dtls1_get_epoch(s, SSL3_CC_READ); /* new epoch */
  ------------------
  |  |  342|      0|#define SSL3_CC_READ 0x001
  ------------------
 1382|       |
 1383|  3.94k|#ifndef OPENSSL_NO_DGRAM
 1384|  3.94k|            if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|  3.94k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.94k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.94k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
 1385|      0|                next = BIO_new(BIO_s_dgram_mem());
 1386|  3.94k|            else
 1387|  3.94k|#endif
 1388|  3.94k|                next = BIO_new(BIO_s_mem());
 1389|       |
 1390|  3.94k|            if (next == NULL) {
  ------------------
  |  Branch (1390:17): [True: 0, False: 3.94k]
  ------------------
 1391|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1392|      0|                return 0;
 1393|      0|            }
 1394|  3.94k|            s->rlayer.rrlnext = next;
 1395|  3.94k|        } else {
 1396|  3.94k|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  7.89k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  3.94k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  3.94k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 3.94k]
  |  |  ------------------
  ------------------
 1397|      0|                && level != OSSL_RECORD_PROTECTION_LEVEL_NONE)
  ------------------
  |  | 2932|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1397:20): [True: 0, False: 0]
  ------------------
 1398|      0|                epoch = dtls1_get_epoch(s, SSL3_CC_WRITE); /* new epoch */
  ------------------
  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  ------------------
 1399|  3.94k|        }
 1400|       |
 1401|       |        /*
 1402|       |         * Create a copy of the dispatch array, missing out wrappers for
 1403|       |         * callbacks that we don't need.
 1404|       |         */
 1405|  47.3k|        for (i = 0, j = 0; i < OSSL_NELEM(rlayer_dispatch); i++) {
  ------------------
  |  |   14|  47.3k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1405:28): [True: 39.4k, False: 7.89k]
  ------------------
 1406|  39.4k|            switch (rlayer_dispatch[i].function_id) {
 1407|  7.89k|            case OSSL_FUNC_RLAYER_MSG_CALLBACK:
  ------------------
  |  |  187|  7.89k|#define OSSL_FUNC_RLAYER_MSG_CALLBACK 2
  ------------------
  |  Branch (1407:13): [True: 7.89k, False: 31.5k]
  ------------------
 1408|  7.89k|                if (s->msg_callback == NULL)
  ------------------
  |  Branch (1408:21): [True: 7.89k, False: 0]
  ------------------
 1409|  7.89k|                    continue;
 1410|      0|                break;
 1411|  7.89k|            case OSSL_FUNC_RLAYER_PADDING:
  ------------------
  |  |  191|  7.89k|#define OSSL_FUNC_RLAYER_PADDING 4
  ------------------
  |  Branch (1411:13): [True: 7.89k, False: 31.5k]
  ------------------
 1412|  7.89k|                if (s->rlayer.record_padding_cb == NULL)
  ------------------
  |  Branch (1412:21): [True: 7.89k, False: 0]
  ------------------
 1413|  7.89k|                    continue;
 1414|      0|                break;
 1415|  23.6k|            default:
  ------------------
  |  Branch (1415:13): [True: 23.6k, False: 15.7k]
  ------------------
 1416|  23.6k|                break;
 1417|  39.4k|            }
 1418|  23.6k|            rlayer_dispatch_tmp[j++] = rlayer_dispatch[i];
 1419|  23.6k|        }
 1420|       |
 1421|  7.89k|        rlret = meth->new_record_layer(sctx->libctx, sctx->propq, version,
 1422|  7.89k|            s->server, direction, level, epoch,
 1423|  7.89k|            secret, secretlen, key, keylen, iv,
 1424|  7.89k|            ivlen, mackey, mackeylen, ciph, taglen,
 1425|  7.89k|            mactype, md, compm, kdfdigest, prev,
 1426|  7.89k|            thisbio, next, NULL, NULL, settings,
 1427|  7.89k|            options, rlayer_dispatch_tmp, s,
 1428|  7.89k|            s->rlayer.rlarg, &newrl);
 1429|  7.89k|        BIO_free(prev);
 1430|  7.89k|        switch (rlret) {
 1431|      0|        case OSSL_RECORD_RETURN_FATAL:
  ------------------
  |  |   48|      0|#define OSSL_RECORD_RETURN_FATAL -2
  ------------------
  |  Branch (1431:9): [True: 0, False: 7.89k]
  ------------------
 1432|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_RECORD_LAYER_FAILURE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1433|      0|            return 0;
 1434|       |
 1435|      0|        case OSSL_RECORD_RETURN_NON_FATAL_ERR:
  ------------------
  |  |   47|      0|#define OSSL_RECORD_RETURN_NON_FATAL_ERR -1
  ------------------
  |  Branch (1435:9): [True: 0, False: 7.89k]
  ------------------
 1436|      0|            if (*thismethod != meth && *thismethod != NULL) {
  ------------------
  |  Branch (1436:17): [True: 0, False: 0]
  |  Branch (1436:40): [True: 0, False: 0]
  ------------------
 1437|       |                /*
 1438|       |                 * We tried a new record layer method, but it didn't work out,
 1439|       |                 * so we fallback to the original method and try again
 1440|       |                 */
 1441|      0|                meth = *thismethod;
 1442|      0|                continue;
 1443|      0|            }
 1444|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_RECORD_LAYER);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1445|      0|            return 0;
 1446|       |
 1447|  7.89k|        case OSSL_RECORD_RETURN_SUCCESS:
  ------------------
  |  |   45|  7.89k|#define OSSL_RECORD_RETURN_SUCCESS 1
  ------------------
  |  Branch (1447:9): [True: 7.89k, False: 0]
  ------------------
 1448|  7.89k|            break;
 1449|       |
 1450|      0|        default:
  ------------------
  |  Branch (1450:9): [True: 0, False: 7.89k]
  ------------------
 1451|       |            /* Should not happen */
 1452|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1453|      0|            return 0;
 1454|  7.89k|        }
 1455|  7.89k|        break;
 1456|  7.89k|    }
 1457|       |
 1458|       |    /*
 1459|       |     * Free the old record layer if we have one except in the case of DTLS when
 1460|       |     * writing and there are still buffered sent messages in our queue. In that
 1461|       |     * case the record layer is still referenced by those buffered messages for
 1462|       |     * potential retransmit. Only when those buffered messages get freed do we
 1463|       |     * free the record layer object (see dtls1_hm_fragment_free)
 1464|       |     */
 1465|  7.89k|    if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  15.7k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.89k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  7.89k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1465:9): [True: 7.89k, False: 0]
  ------------------
 1466|      0|        || direction == OSSL_RECORD_DIRECTION_READ
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1466:12): [True: 0, False: 0]
  ------------------
 1467|  7.89k|        || pqueue_peek(s->d1->sent_messages) == NULL) {
  ------------------
  |  Branch (1467:12): [True: 0, False: 0]
  ------------------
 1468|  7.89k|        if (*thismethod != NULL && !(*thismethod)->free(*thisrl)) {
  ------------------
  |  Branch (1468:13): [True: 0, False: 7.89k]
  |  Branch (1468:36): [True: 0, False: 0]
  ------------------
 1469|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1470|      0|            return 0;
 1471|      0|        }
 1472|  7.89k|    }
 1473|       |
 1474|  7.89k|    *thisrl = newrl;
 1475|  7.89k|    *thismethod = meth;
 1476|       |
 1477|  7.89k|    return ssl_post_record_layer_select(s, direction);
 1478|  7.89k|}
ssl_set_record_protocol_version:
 1481|      1|{
 1482|      1|    if (!ossl_assert(s->rlayer.rrlmethod != NULL)
  ------------------
  |  |   52|      2|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      2|    __FILE__, __LINE__)
  ------------------
  |  Branch (1482:9): [True: 0, False: 1]
  ------------------
 1483|      1|        || !ossl_assert(s->rlayer.wrlmethod != NULL))
  ------------------
  |  |   52|      1|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      1|    __FILE__, __LINE__)
  ------------------
  |  Branch (1483:12): [True: 0, False: 1]
  ------------------
 1484|      0|        return 0;
 1485|      1|    s->rlayer.rrlmethod->set_protocol_version(s->rlayer.rrl, s->version);
 1486|      1|    s->rlayer.wrlmethod->set_protocol_version(s->rlayer.wrl, s->version);
 1487|       |
 1488|      1|    return 1;
 1489|      1|}
rec_layer_s3.c:tls_write_check_pending:
  254|  1.24k|{
  255|  1.24k|    if (s->rlayer.wpend_tot == 0)
  ------------------
  |  Branch (255:9): [True: 1.24k, False: 0]
  ------------------
  256|  1.24k|        return 0;
  257|       |
  258|       |    /* We have pending data, so do some sanity checks */
  259|      0|    if ((s->rlayer.wpend_tot > len)
  ------------------
  |  Branch (259:9): [True: 0, False: 0]
  ------------------
  260|      0|        || (!(s->mode & SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER)
  ------------------
  |  |  504|      0|#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002U
  ------------------
  |  Branch (260:13): [True: 0, False: 0]
  ------------------
  261|      0|            && (s->rlayer.wpend_buf != buf))
  ------------------
  |  Branch (261:16): [True: 0, False: 0]
  ------------------
  262|      0|        || (s->rlayer.wpend_type != type)) {
  ------------------
  |  Branch (262:12): [True: 0, False: 0]
  ------------------
  263|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_WRITE_RETRY);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  264|      0|        return -1;
  265|      0|    }
  266|      0|    return 1;
  267|      0|}
rec_layer_s3.c:ssl_select_next_record_layer:
 1187|  7.89k|{
 1188|  7.89k|    if (s->rlayer.custom_rlmethod != NULL)
  ------------------
  |  Branch (1188:9): [True: 0, False: 7.89k]
  ------------------
 1189|      0|        return s->rlayer.custom_rlmethod;
 1190|       |
 1191|  7.89k|    if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE) {
  ------------------
  |  | 2932|  7.89k|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  |  Branch (1191:9): [True: 7.89k, False: 0]
  ------------------
 1192|  7.89k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|  7.89k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  7.89k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  7.89k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 7.89k]
  |  |  ------------------
  ------------------
 1193|      0|            return &ossl_dtls_record_method;
 1194|       |
 1195|  7.89k|        return &ossl_tls_record_method;
 1196|  7.89k|    }
 1197|       |
 1198|       |#ifndef OPENSSL_NO_KTLS
 1199|       |    /* KTLS does not support renegotiation */
 1200|       |    if (level == OSSL_RECORD_PROTECTION_LEVEL_APPLICATION
 1201|       |        && (s->options & SSL_OP_ENABLE_KTLS) != 0
 1202|       |        && (SSL_CONNECTION_IS_TLS13(s) || SSL_IS_FIRST_HANDSHAKE(s)))
 1203|       |        return &ossl_ktls_record_method;
 1204|       |#endif
 1205|       |
 1206|       |    /* Default to the current OSSL_RECORD_METHOD */
 1207|      0|    return direction == OSSL_RECORD_DIRECTION_READ ? s->rlayer.rrlmethod
  ------------------
  |  |   42|      0|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1207:12): [True: 0, False: 0]
  ------------------
 1208|      0|                                                   : s->rlayer.wrlmethod;
 1209|  7.89k|}
rec_layer_s3.c:ssl_post_record_layer_select:
 1212|  7.89k|{
 1213|  7.89k|    const OSSL_RECORD_METHOD *thismethod;
 1214|  7.89k|    OSSL_RECORD_LAYER *thisrl;
 1215|       |
 1216|  7.89k|    if (direction == OSSL_RECORD_DIRECTION_READ) {
  ------------------
  |  |   42|  7.89k|#define OSSL_RECORD_DIRECTION_READ 0
  ------------------
  |  Branch (1216:9): [True: 3.94k, False: 3.94k]
  ------------------
 1217|  3.94k|        thismethod = s->rlayer.rrlmethod;
 1218|  3.94k|        thisrl = s->rlayer.rrl;
 1219|  3.94k|    } else {
 1220|  3.94k|        thismethod = s->rlayer.wrlmethod;
 1221|  3.94k|        thisrl = s->rlayer.wrl;
 1222|  3.94k|    }
 1223|       |
 1224|       |#ifndef OPENSSL_NO_KTLS
 1225|       |    {
 1226|       |        SSL *ssl = SSL_CONNECTION_GET_SSL(s);
 1227|       |
 1228|       |        if (s->rlayer.rrlmethod == &ossl_ktls_record_method) {
 1229|       |            /* KTLS does not support renegotiation so disallow it */
 1230|       |            SSL_set_options(ssl, SSL_OP_NO_RENEGOTIATION);
 1231|       |        }
 1232|       |    }
 1233|       |#endif
 1234|  7.89k|    if (SSL_IS_FIRST_HANDSHAKE(s) && thismethod->set_first_handshake != NULL)
  ------------------
  |  |  277|  15.7k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 7.89k, False: 0]
  |  |  ------------------
  |  |  278|  15.7k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1234:38): [True: 7.89k, False: 0]
  ------------------
 1235|  7.89k|        thismethod->set_first_handshake(thisrl, 1);
 1236|       |
 1237|  7.89k|    if (s->max_pipelines != 0 && thismethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (1237:9): [True: 0, False: 7.89k]
  |  Branch (1237:34): [True: 0, False: 0]
  ------------------
 1238|      0|        thismethod->set_max_pipelines(thisrl, s->max_pipelines);
 1239|       |
 1240|  7.89k|    return 1;
 1241|  7.89k|}

ssl3_cleanup_key_block:
  214|  6.58k|{
  215|  6.58k|    OPENSSL_clear_free(s->s3.tmp.key_block, s->s3.tmp.key_block_length);
  ------------------
  |  |  129|  6.58k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  216|       |    s->s3.tmp.key_block = NULL;
  217|  6.58k|    s->s3.tmp.key_block_length = 0;
  218|  6.58k|}
ssl3_init_finished_mac:
  221|  1.31k|{
  222|  1.31k|    BIO *buf = BIO_new(BIO_s_mem());
  223|       |
  224|  1.31k|    if (buf == NULL) {
  ------------------
  |  Branch (224:9): [True: 0, False: 1.31k]
  ------------------
  225|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BIO_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  226|      0|        return 0;
  227|      0|    }
  228|  1.31k|    ssl3_free_digest_list(s);
  229|  1.31k|    s->s3.handshake_buffer = buf;
  230|       |    (void)BIO_set_close(s->s3.handshake_buffer, BIO_CLOSE);
  ------------------
  |  |  634|  1.31k|#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
  |  |  ------------------
  |  |  |  |   98|  1.31k|#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
  |  |  ------------------
  ------------------
  231|  1.31k|    return 1;
  232|  1.31k|}
ssl3_free_digest_list:
  240|  7.89k|{
  241|  7.89k|    BIO_free(s->s3.handshake_buffer);
  242|  7.89k|    s->s3.handshake_buffer = NULL;
  243|  7.89k|    EVP_MD_CTX_free(s->s3.handshake_dgst);
  244|       |    s->s3.handshake_dgst = NULL;
  245|  7.89k|}
ssl3_finish_mac:
  248|  1.29k|{
  249|  1.29k|    int ret;
  250|       |
  251|  1.29k|    if (s->s3.handshake_dgst == NULL) {
  ------------------
  |  Branch (251:9): [True: 1.29k, False: 0]
  ------------------
  252|       |        /* Note: this writes to a memory BIO so a failure is a fatal error */
  253|  1.29k|        if (len > INT_MAX) {
  ------------------
  |  Branch (253:13): [True: 0, False: 1.29k]
  ------------------
  254|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_OVERFLOW_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  255|      0|            return 0;
  256|      0|        }
  257|  1.29k|        ret = BIO_write(s->s3.handshake_buffer, (void *)buf, (int)len);
  258|  1.29k|        if (ret <= 0 || ret != (int)len) {
  ------------------
  |  Branch (258:13): [True: 0, False: 1.29k]
  |  Branch (258:25): [True: 0, False: 1.29k]
  ------------------
  259|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  260|      0|            return 0;
  261|      0|        }
  262|  1.29k|    } else {
  263|      0|        ret = EVP_DigestUpdate(s->s3.handshake_dgst, buf, len);
  264|      0|        if (!ret) {
  ------------------
  |  Branch (264:13): [True: 0, False: 0]
  ------------------
  265|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  266|      0|            return 0;
  267|      0|        }
  268|      0|    }
  269|  1.29k|    return 1;
  270|  1.29k|}

ssl_sort_cipher_list:
 3730|      1|{
 3731|      1|    qsort(tls13_ciphers, TLS13_NUM_CIPHERS, sizeof(tls13_ciphers[0]),
  ------------------
  |  |   27|      1|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3732|      1|        cipher_compare);
 3733|      1|    qsort(ssl3_ciphers, SSL3_NUM_CIPHERS, sizeof(ssl3_ciphers[0]),
  ------------------
  |  |   28|      1|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3734|      1|        cipher_compare);
 3735|      1|    qsort(ssl3_scsvs, SSL3_NUM_SCSVS, sizeof(ssl3_scsvs[0]), cipher_compare);
  ------------------
  |  |   29|      1|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|      1|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3736|      1|}
ssl3_num_ciphers:
 3777|  3.43k|{
 3778|  3.43k|    return SSL3_NUM_CIPHERS;
  ------------------
  |  |   28|  3.43k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  3.43k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3779|  3.43k|}
ssl3_get_cipher:
 3782|   560k|{
 3783|   560k|    if (u < SSL3_NUM_CIPHERS)
  ------------------
  |  |   28|   560k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   560k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
  |  Branch (3783:9): [True: 560k, False: 0]
  ------------------
 3784|   560k|        return &(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u]);
  ------------------
  |  |   28|   560k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|   560k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 3785|      0|    else
 3786|      0|        return NULL;
 3787|   560k|}
ssl3_set_handshake_header:
 3790|  1.30k|{
 3791|       |    /* No header in the event of a CCS */
 3792|  1.30k|    if (htype == SSL3_MT_CHANGE_CIPHER_SPEC)
  ------------------
  |  |  337|  1.30k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (3792:9): [True: 0, False: 1.30k]
  ------------------
 3793|      0|        return 1;
 3794|       |
 3795|       |    /* Set the content type and 3 bytes for the message len */
 3796|  1.30k|    if (!WPACKET_put_bytes_u8(pkt, htype)
  ------------------
  |  |  889|  2.61k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (3796:9): [True: 0, False: 1.30k]
  ------------------
 3797|  1.30k|        || !WPACKET_start_sub_packet_u24(pkt))
  ------------------
  |  |  794|  1.30k|    WPACKET_start_sub_packet_len__((pkt), 3)
  ------------------
  |  Branch (3797:12): [True: 0, False: 1.30k]
  ------------------
 3798|      0|        return 0;
 3799|       |
 3800|  1.30k|    return 1;
 3801|  1.30k|}
ssl3_handshake_write:
 3804|  1.24k|{
 3805|  1.24k|    return ssl3_do_write(s, SSL3_RT_HANDSHAKE);
  ------------------
  |  |  221|  1.24k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 3806|  1.24k|}
ssl3_new:
 3809|  1.31k|{
 3810|  1.31k|#ifndef OPENSSL_NO_SRP
 3811|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3812|       |
 3813|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (3813:9): [True: 0, False: 1.31k]
  ------------------
 3814|      0|        return 0;
 3815|       |
 3816|  1.31k|    if (!ssl_srp_ctx_init_intern(sc))
  ------------------
  |  Branch (3816:9): [True: 0, False: 1.31k]
  ------------------
 3817|      0|        return 0;
 3818|  1.31k|#endif
 3819|       |
 3820|  1.31k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (3820:9): [True: 0, False: 1.31k]
  ------------------
 3821|      0|        return 0;
 3822|       |
 3823|  1.31k|    return 1;
 3824|  1.31k|}
ssl3_free:
 3827|  1.31k|{
 3828|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3829|  1.31k|    size_t i;
 3830|       |
 3831|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (3831:9): [True: 0, False: 1.31k]
  ------------------
 3832|      0|        return;
 3833|       |
 3834|  1.31k|    ssl3_cleanup_key_block(sc);
 3835|       |
 3836|  1.31k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3837|  1.31k|    sc->s3.peer_tmp = NULL;
 3838|       |
 3839|  3.77k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3839:17): [True: 2.46k, False: 1.31k]
  ------------------
 3840|  2.46k|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3840:13): [True: 2.46k, False: 0]
  ------------------
 3841|  2.46k|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3841:17): [True: 1.23k, False: 1.22k]
  ------------------
 3842|  1.23k|                sc->s3.tmp.pkey = NULL;
 3843|       |
 3844|  2.46k|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3845|  2.46k|            sc->s3.tmp.ks_pkey[i] = NULL;
 3846|  2.46k|        }
 3847|  1.31k|    sc->s3.tmp.num_ks_pkey = 0;
 3848|       |
 3849|  1.31k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3849:9): [True: 0, False: 1.31k]
  ------------------
 3850|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3851|      0|        sc->s3.tmp.pkey = NULL;
 3852|      0|    }
 3853|       |
 3854|  1.31k|    ssl_evp_cipher_free(sc->s3.tmp.new_sym_enc);
 3855|  1.31k|    ssl_evp_md_free(sc->s3.tmp.new_hash);
 3856|       |
 3857|  1.31k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3858|  1.31k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  1.31k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 3859|  1.31k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3860|  1.31k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  129|  1.31k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3861|  1.31k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3862|  1.31k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3863|  1.31k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3864|  1.31k|    ssl3_free_digest_list(sc);
 3865|  1.31k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3866|  1.31k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3867|  1.31k|    ossl_quic_tls_free(sc->qtls);
 3868|       |
 3869|  1.31k|#ifndef OPENSSL_NO_PSK
 3870|  1.31k|    OPENSSL_free(sc->s3.tmp.psk);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3871|  1.31k|#endif
 3872|       |
 3873|  1.31k|#ifndef OPENSSL_NO_SRP
 3874|  1.31k|    ssl_srp_ctx_free_intern(sc);
 3875|  1.31k|#endif
 3876|  1.31k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3877|  1.31k|}
ssl3_clear:
 3880|  5.26k|{
 3881|  5.26k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  5.26k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  5.26k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 5.26k]
  |  |  |  |  ------------------
  |  |  |  |   33|  5.26k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  5.26k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 5.26k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  5.26k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  5.26k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3882|  5.26k|    int flags;
 3883|  5.26k|    size_t i;
 3884|       |
 3885|  5.26k|    if (sc == NULL)
  ------------------
  |  Branch (3885:9): [True: 0, False: 5.26k]
  ------------------
 3886|      0|        return 0;
 3887|       |
 3888|  5.26k|    ssl3_cleanup_key_block(sc);
 3889|  5.26k|    OPENSSL_free(sc->s3.tmp.ctype);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3890|  5.26k|    sk_X509_NAME_pop_free(sc->s3.tmp.peer_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  5.26k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 3891|  5.26k|    OPENSSL_free(sc->s3.tmp.ciphers_raw);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3892|  5.26k|    OPENSSL_clear_free(sc->s3.tmp.pms, sc->s3.tmp.pmslen);
  ------------------
  |  |  129|  5.26k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3893|  5.26k|    OPENSSL_free(sc->s3.tmp.peer_sigalgs);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3894|  5.26k|    OPENSSL_free(sc->s3.tmp.peer_cert_sigalgs);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3895|  5.26k|    OPENSSL_free(sc->s3.tmp.valid_flags);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3896|       |
 3897|  5.26k|    EVP_PKEY_free(sc->s3.peer_tmp);
 3898|       |
 3899|  5.26k|    for (i = 0; i < sc->s3.tmp.num_ks_pkey; i++)
  ------------------
  |  Branch (3899:17): [True: 0, False: 5.26k]
  ------------------
 3900|      0|        if (sc->s3.tmp.ks_pkey[i] != NULL) {
  ------------------
  |  Branch (3900:13): [True: 0, False: 0]
  ------------------
 3901|      0|            if (sc->s3.tmp.pkey == sc->s3.tmp.ks_pkey[i])
  ------------------
  |  Branch (3901:17): [True: 0, False: 0]
  ------------------
 3902|      0|                sc->s3.tmp.pkey = NULL;
 3903|       |
 3904|      0|            EVP_PKEY_free(sc->s3.tmp.ks_pkey[i]);
 3905|      0|            sc->s3.tmp.ks_pkey[i] = NULL;
 3906|      0|        }
 3907|  5.26k|    sc->s3.tmp.num_ks_pkey = 0;
 3908|       |
 3909|  5.26k|    if (sc->s3.tmp.pkey != NULL) {
  ------------------
  |  Branch (3909:9): [True: 0, False: 5.26k]
  ------------------
 3910|      0|        EVP_PKEY_free(sc->s3.tmp.pkey);
 3911|      0|        sc->s3.tmp.pkey = NULL;
 3912|      0|    }
 3913|       |
 3914|  5.26k|    ssl3_free_digest_list(sc);
 3915|       |
 3916|  5.26k|    OPENSSL_free(sc->s3.alpn_selected);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3917|  5.26k|    OPENSSL_free(sc->s3.alpn_proposed);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3918|       |
 3919|       |    /*
 3920|       |     * NULL/zero-out everything in the s3 struct, but remember if we are doing
 3921|       |     * QUIC.
 3922|       |     */
 3923|  5.26k|    flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   29|  5.26k|#define TLS1_FLAGS_QUIC 0x2000
  ------------------
                  flags = sc->s3.flags & (TLS1_FLAGS_QUIC | TLS1_FLAGS_QUIC_INTERNAL);
  ------------------
  |  |   31|  5.26k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  ------------------
 3924|  5.26k|    memset(&sc->s3, 0, sizeof(sc->s3));
 3925|  5.26k|    sc->s3.flags |= flags;
 3926|       |
 3927|  5.26k|    if (!ssl_free_wbio_buffer(sc))
  ------------------
  |  Branch (3927:9): [True: 0, False: 5.26k]
  ------------------
 3928|      0|        return 0;
 3929|       |
 3930|  5.26k|    sc->version = SSL3_VERSION;
  ------------------
  |  |   23|  5.26k|#define SSL3_VERSION 0x0300
  ------------------
 3931|       |
 3932|  5.26k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 3933|  5.26k|    OPENSSL_free(sc->ext.npn);
  ------------------
  |  |  131|  5.26k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3934|  5.26k|    sc->ext.npn = NULL;
 3935|  5.26k|    sc->ext.npn_len = 0;
 3936|  5.26k|#endif
 3937|       |
 3938|  5.26k|    return 1;
 3939|  5.26k|}
ssl3_ctrl:
 3956|     28|{
 3957|     28|    int ret = 0;
 3958|     28|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|     28|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|     28|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 28]
  |  |  |  |  ------------------
  |  |  |  |   33|     28|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|     28|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 28, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|     28|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|     28|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3959|     28|#ifndef OPENSSL_NO_OCSP
 3960|     28|    unsigned char *p = NULL;
 3961|     28|    OCSP_RESPONSE *resp = NULL;
 3962|     28|#endif
 3963|       |
 3964|     28|    if (sc == NULL)
  ------------------
  |  Branch (3964:9): [True: 0, False: 28]
  ------------------
 3965|      0|        return ret;
 3966|       |
 3967|     28|    switch (cmd) {
 3968|      0|    case SSL_CTRL_GET_CLIENT_CERT_REQUEST:
  ------------------
  |  | 1279|      0|#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9
  ------------------
  |  Branch (3968:5): [True: 0, False: 28]
  ------------------
 3969|      0|        break;
 3970|      0|    case SSL_CTRL_GET_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1280|      0|#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10
  ------------------
  |  Branch (3970:5): [True: 0, False: 28]
  ------------------
 3971|      0|        ret = sc->s3.num_renegotiations;
 3972|      0|        break;
 3973|      0|    case SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS:
  ------------------
  |  | 1281|      0|#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
  ------------------
  |  Branch (3973:5): [True: 0, False: 28]
  ------------------
 3974|      0|        ret = sc->s3.num_renegotiations;
 3975|      0|        sc->s3.num_renegotiations = 0;
 3976|      0|        break;
 3977|      0|    case SSL_CTRL_GET_TOTAL_RENEGOTIATIONS:
  ------------------
  |  | 1282|      0|#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
  ------------------
  |  Branch (3977:5): [True: 0, False: 28]
  ------------------
 3978|      0|        ret = sc->s3.total_renegotiations;
 3979|      0|        break;
 3980|      0|    case SSL_CTRL_GET_FLAGS:
  ------------------
  |  | 1283|      0|#define SSL_CTRL_GET_FLAGS 13
  ------------------
  |  Branch (3980:5): [True: 0, False: 28]
  ------------------
 3981|      0|        ret = (int)(sc->s3.flags);
 3982|      0|        break;
 3983|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 3984|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1274|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (3984:5): [True: 0, False: 28]
  ------------------
 3985|      0|        EVP_PKEY *pkdh = NULL;
 3986|      0|        if (parg == NULL) {
  ------------------
  |  Branch (3986:13): [True: 0, False: 0]
  ------------------
 3987|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3988|      0|            return 0;
 3989|      0|        }
 3990|      0|        pkdh = ssl_dh_to_pkey(parg);
 3991|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (3991:13): [True: 0, False: 0]
  ------------------
 3992|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3993|      0|            return 0;
 3994|      0|        }
 3995|      0|        if (!SSL_set0_tmp_dh_pkey(s, pkdh)) {
  ------------------
  |  Branch (3995:13): [True: 0, False: 0]
  ------------------
 3996|      0|            EVP_PKEY_free(pkdh);
 3997|      0|            return 0;
 3998|      0|        }
 3999|      0|        return 1;
 4000|      0|    } break;
 4001|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1276|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (4001:5): [True: 0, False: 28]
  ------------------
 4002|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4003|      0|        return ret;
 4004|      0|    }
 4005|      0|#endif
 4006|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1373|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4006:5): [True: 0, False: 28]
  ------------------
 4007|      0|        sc->cert->dh_tmp_auto = larg;
 4008|      0|        return 1;
 4009|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4010|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1275|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4010:5): [True: 0, False: 28]
  ------------------
 4011|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4011:13): [True: 0, False: 0]
  ------------------
 4012|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4013|      0|            return 0;
 4014|      0|        }
 4015|      0|        return ssl_set_tmp_ecdh_groups(&sc->ext.supportedgroups,
 4016|      0|            &sc->ext.supportedgroups_len,
 4017|      0|            &sc->ext.keyshares,
 4018|      0|            &sc->ext.keyshares_len,
 4019|      0|            &sc->ext.tuples,
 4020|      0|            &sc->ext.tuples_len,
 4021|      0|            parg);
 4022|      0|    }
 4023|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4024|     28|    case SSL_CTRL_SET_TLSEXT_HOSTNAME:
  ------------------
  |  | 1315|     28|#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55
  ------------------
  |  Branch (4024:5): [True: 28, False: 0]
  ------------------
 4025|       |        /*
 4026|       |         * This API is only used for a client to set what SNI it will request
 4027|       |         * from the server, but we currently allow it to be used on servers
 4028|       |         * as well, which is a programming error.  Currently we just clear
 4029|       |         * the field in SSL_do_handshake() for server SSLs, but when we can
 4030|       |         * make ABI-breaking changes, we may want to make use of this API
 4031|       |         * an error on server SSLs.
 4032|       |         */
 4033|     28|        if (larg == TLSEXT_NAMETYPE_host_name) {
  ------------------
  |  |  171|     28|#define TLSEXT_NAMETYPE_host_name 0
  ------------------
  |  Branch (4033:13): [True: 28, False: 0]
  ------------------
 4034|     28|            size_t len;
 4035|       |
 4036|     28|            OPENSSL_free(sc->ext.hostname);
  ------------------
  |  |  131|     28|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4037|     28|            sc->ext.hostname = NULL;
 4038|       |
 4039|     28|            ret = 1;
 4040|     28|            if (parg == NULL)
  ------------------
  |  Branch (4040:17): [True: 0, False: 28]
  ------------------
 4041|      0|                break;
 4042|     28|            len = strlen((char *)parg);
 4043|     28|            if (len == 0 || len > TLSEXT_MAXLEN_host_name) {
  ------------------
  |  |  248|     28|#define TLSEXT_MAXLEN_host_name 255
  ------------------
  |  Branch (4043:17): [True: 0, False: 28]
  |  Branch (4043:29): [True: 0, False: 28]
  ------------------
 4044|      0|                ERR_raise(ERR_LIB_SSL, SSL_R_SSL3_EXT_INVALID_SERVERNAME);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4045|      0|                return 0;
 4046|      0|            }
 4047|     28|            if ((sc->ext.hostname = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  135|     28|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4047:17): [True: 0, False: 28]
  ------------------
 4048|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4049|      0|                return 0;
 4050|      0|            }
 4051|     28|        } else {
 4052|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4053|      0|            return 0;
 4054|      0|        }
 4055|     28|        break;
 4056|     28|    case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
  ------------------
  |  | 1317|      0|#define SSL_CTRL_SET_TLSEXT_DEBUG_ARG 57
  ------------------
  |  Branch (4056:5): [True: 0, False: 28]
  ------------------
 4057|      0|        sc->ext.debug_arg = parg;
 4058|      0|        ret = 1;
 4059|      0|        break;
 4060|       |
 4061|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4061:5): [True: 0, False: 28]
  ------------------
 4062|      0|        ret = sc->ext.status_type;
 4063|      0|        break;
 4064|       |
 4065|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1325|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4065:5): [True: 0, False: 28]
  ------------------
 4066|      0|        sc->ext.status_type = larg;
 4067|      0|        ret = 1;
 4068|      0|        break;
 4069|       |
 4070|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1326|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS 66
  ------------------
  |  Branch (4070:5): [True: 0, False: 28]
  ------------------
 4071|      0|        *(STACK_OF(X509_EXTENSION) **)parg = sc->ext.ocsp.exts;
 4072|      0|        ret = 1;
 4073|      0|        break;
 4074|       |
 4075|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS:
  ------------------
  |  | 1327|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS 67
  ------------------
  |  Branch (4075:5): [True: 0, False: 28]
  ------------------
 4076|      0|        sc->ext.ocsp.exts = parg;
 4077|      0|        ret = 1;
 4078|      0|        break;
 4079|       |
 4080|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1328|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS 68
  ------------------
  |  Branch (4080:5): [True: 0, False: 28]
  ------------------
 4081|      0|        *(STACK_OF(OCSP_RESPID) **)parg = sc->ext.ocsp.ids;
 4082|      0|        ret = 1;
 4083|      0|        break;
 4084|       |
 4085|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS:
  ------------------
  |  | 1329|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS 69
  ------------------
  |  Branch (4085:5): [True: 0, False: 28]
  ------------------
 4086|      0|        sc->ext.ocsp.ids = parg;
 4087|      0|        ret = 1;
 4088|      0|        break;
 4089|       |
 4090|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1330|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP 70
  ------------------
  |  Branch (4090:5): [True: 0, False: 28]
  ------------------
 4091|      0|        *(unsigned char **)parg = NULL;
 4092|      0|        ret = -1;
 4093|       |
 4094|      0|#ifndef OPENSSL_NO_OCSP
 4095|      0|        resp = sk_OCSP_RESPONSE_value(sc->ext.ocsp.resp_ex, 0);
 4096|       |
 4097|      0|        if (resp != NULL) {
  ------------------
  |  Branch (4097:13): [True: 0, False: 0]
  ------------------
 4098|      0|            int resp_len = i2d_OCSP_RESPONSE(resp, &p);
 4099|       |
 4100|      0|            if (resp_len > 0) {
  ------------------
  |  Branch (4100:17): [True: 0, False: 0]
  ------------------
 4101|      0|                OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4102|      0|                *(unsigned char **)parg = sc->ext.ocsp.resp = p;
 4103|      0|                sc->ext.ocsp.resp_len = (size_t)resp_len;
 4104|      0|                ret = resp_len;
 4105|      0|            }
 4106|      0|        }
 4107|      0|#endif
 4108|      0|        break;
 4109|       |
 4110|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP:
  ------------------
  |  | 1331|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP 71
  ------------------
  |  Branch (4110:5): [True: 0, False: 28]
  ------------------
 4111|      0|        ret = 1;
 4112|      0|#ifndef OPENSSL_NO_OCSP
 4113|       |        /*
 4114|       |         * In case of success keep the single value so we do not need to
 4115|       |         * free it immediately.
 4116|       |         * However in the handshake code we only use the extended values.
 4117|       |         */
 4118|      0|        OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4119|      0|        sc->ext.ocsp.resp = NULL;
 4120|      0|        sc->ext.ocsp.resp_len = 0;
 4121|       |
 4122|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4123|      0|        sc->ext.ocsp.resp_ex = NULL;
 4124|       |
 4125|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4125:13): [True: 0, False: 0]
  ------------------
 4126|      0|            sc->ext.ocsp.resp_ex = sk_OCSP_RESPONSE_new_reserve(NULL, 1);
 4127|      0|            if (sc->ext.ocsp.resp_ex == NULL)
  ------------------
  |  Branch (4127:17): [True: 0, False: 0]
  ------------------
 4128|      0|                return 0;
 4129|       |
 4130|      0|            p = parg;
 4131|      0|            resp = d2i_OCSP_RESPONSE(NULL, (const unsigned char **)&p, larg);
 4132|      0|            if (resp != NULL)
  ------------------
  |  Branch (4132:17): [True: 0, False: 0]
  ------------------
 4133|      0|                sk_OCSP_RESPONSE_push(sc->ext.ocsp.resp_ex, resp);
 4134|       |
 4135|      0|            sc->ext.ocsp.resp = parg;
 4136|      0|            sc->ext.ocsp.resp_len = larg;
 4137|      0|        }
 4138|      0|#endif
 4139|      0|        break;
 4140|       |
 4141|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1396|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 142
  ------------------
  |  Branch (4141:5): [True: 0, False: 28]
  ------------------
 4142|      0|#ifndef OPENSSL_NO_OCSP
 4143|      0|        *(STACK_OF(OCSP_RESPONSE) **)parg = sc->ext.ocsp.resp_ex;
 4144|      0|        ret = sk_OCSP_RESPONSE_num(sc->ext.ocsp.resp_ex);
 4145|       |#else
 4146|       |        *(unsigned char **)parg = NULL;
 4147|       |        ret = -1;
 4148|       |#endif
 4149|      0|        break;
 4150|       |
 4151|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX:
  ------------------
  |  | 1397|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP_EX 143
  ------------------
  |  Branch (4151:5): [True: 0, False: 28]
  ------------------
 4152|      0|#ifndef OPENSSL_NO_OCSP
 4153|       |        /*
 4154|       |         * cleanup single values, which might be set somewhere else
 4155|       |         * we only use the extended values
 4156|       |         */
 4157|      0|        if (sc->ext.ocsp.resp != NULL) {
  ------------------
  |  Branch (4157:13): [True: 0, False: 0]
  ------------------
 4158|      0|            OPENSSL_free(sc->ext.ocsp.resp);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4159|      0|            sc->ext.ocsp.resp = NULL;
 4160|      0|            sc->ext.ocsp.resp_len = 0;
 4161|      0|        }
 4162|       |
 4163|      0|        sk_OCSP_RESPONSE_pop_free(sc->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 4164|      0|        sc->ext.ocsp.resp_ex = (STACK_OF(OCSP_RESPONSE) *)parg;
 4165|      0|#endif
 4166|      0|        ret = 1;
 4167|      0|        break;
 4168|       |
 4169|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4169:5): [True: 0, False: 28]
  ------------------
 4170|      0|        if (larg)
  ------------------
  |  Branch (4170:13): [True: 0, False: 0]
  ------------------
 4171|      0|            return ssl_cert_set1_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4172|      0|        else
 4173|      0|            return ssl_cert_set0_chain(sc, NULL, (STACK_OF(X509) *)parg);
 4174|       |
 4175|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4175:5): [True: 0, False: 28]
  ------------------
 4176|      0|        if (larg)
  ------------------
  |  Branch (4176:13): [True: 0, False: 0]
  ------------------
 4177|      0|            return ssl_cert_add1_chain_cert(sc, NULL, (X509 *)parg);
 4178|      0|        else
 4179|      0|            return ssl_cert_add0_chain_cert(sc, NULL, (X509 *)parg);
 4180|       |
 4181|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1370|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4181:5): [True: 0, False: 28]
  ------------------
 4182|      0|        *(STACK_OF(X509) **)parg = sc->cert->key->chain;
 4183|      0|        ret = 1;
 4184|      0|        break;
 4185|       |
 4186|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4186:5): [True: 0, False: 28]
  ------------------
 4187|      0|        return ssl_cert_select_current(sc->cert, (X509 *)parg);
 4188|       |
 4189|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1372|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4189:5): [True: 0, False: 28]
  ------------------
 4190|      0|        if (larg == SSL_CERT_SET_SERVER) {
  ------------------
  |  | 1400|      0|#define SSL_CERT_SET_SERVER 3
  ------------------
  |  Branch (4190:13): [True: 0, False: 0]
  ------------------
 4191|      0|            const SSL_CIPHER *cipher;
 4192|      0|            if (!sc->server)
  ------------------
  |  Branch (4192:17): [True: 0, False: 0]
  ------------------
 4193|      0|                return 0;
 4194|      0|            cipher = sc->s3.tmp.new_cipher;
 4195|      0|            if (cipher == NULL)
  ------------------
  |  Branch (4195:17): [True: 0, False: 0]
  ------------------
 4196|      0|                return 0;
 4197|       |            /*
 4198|       |             * No certificate for unauthenticated ciphersuites or using SRP
 4199|       |             * authentication
 4200|       |             */
 4201|      0|            if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  112|      0|#define SSL_aNULL 0x00000004U
  ------------------
                          if (cipher->algorithm_auth & (SSL_aNULL | SSL_aSRP))
  ------------------
  |  |  120|      0|#define SSL_aSRP 0x00000040U
  ------------------
  |  Branch (4201:17): [True: 0, False: 0]
  ------------------
 4202|      0|                return 2;
 4203|      0|            if (sc->s3.tmp.cert == NULL)
  ------------------
  |  Branch (4203:17): [True: 0, False: 0]
  ------------------
 4204|      0|                return 0;
 4205|      0|            sc->cert->key = sc->s3.tmp.cert;
 4206|      0|            return 1;
 4207|      0|        }
 4208|      0|        return ssl_cert_set_current(sc->cert, larg);
 4209|       |
 4210|      0|    case SSL_CTRL_GET_GROUPS: {
  ------------------
  |  | 1351|      0|#define SSL_CTRL_GET_GROUPS 90
  ------------------
  |  Branch (4210:5): [True: 0, False: 28]
  ------------------
 4211|      0|        uint16_t *clist;
 4212|      0|        size_t clistlen;
 4213|       |
 4214|      0|        if (!sc->session)
  ------------------
  |  Branch (4214:13): [True: 0, False: 0]
  ------------------
 4215|      0|            return 0;
 4216|      0|        clist = sc->ext.peer_supportedgroups;
 4217|      0|        clistlen = sc->ext.peer_supportedgroups_len;
 4218|      0|        if (parg) {
  ------------------
  |  Branch (4218:13): [True: 0, False: 0]
  ------------------
 4219|      0|            size_t i;
 4220|      0|            int *cptr = parg;
 4221|       |
 4222|      0|            for (i = 0; i < clistlen; i++) {
  ------------------
  |  Branch (4222:25): [True: 0, False: 0]
  ------------------
 4223|      0|                const TLS_GROUP_INFO *cinf
 4224|      0|                    = tls1_group_id_lookup(s->ctx, clist[i]);
 4225|       |
 4226|      0|                if (cinf != NULL)
  ------------------
  |  Branch (4226:21): [True: 0, False: 0]
  ------------------
 4227|      0|                    cptr[i] = tls1_group_id2nid(cinf->group_id, 1);
 4228|      0|                else
 4229|      0|                    cptr[i] = TLSEXT_nid_unknown | clist[i];
  ------------------
  |  |  219|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
 4230|      0|            }
 4231|      0|        }
 4232|      0|        return (int)clistlen;
 4233|      0|    }
 4234|       |
 4235|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1352|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4235:5): [True: 0, False: 28]
  ------------------
 4236|      0|        return tls1_set_groups(&sc->ext.supportedgroups,
 4237|      0|            &sc->ext.supportedgroups_len,
 4238|      0|            &sc->ext.keyshares,
 4239|      0|            &sc->ext.keyshares_len,
 4240|      0|            &sc->ext.tuples,
 4241|      0|            &sc->ext.tuples_len,
 4242|      0|            parg, larg);
 4243|       |
 4244|      0|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1353|      0|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4244:5): [True: 0, False: 28]
  ------------------
 4245|      0|        return tls1_set_groups_list(s->ctx,
 4246|      0|            &sc->ext.supportedgroups,
 4247|      0|            &sc->ext.supportedgroups_len,
 4248|      0|            &sc->ext.keyshares,
 4249|      0|            &sc->ext.keyshares_len,
 4250|      0|            &sc->ext.tuples,
 4251|      0|            &sc->ext.tuples_len,
 4252|      0|            parg);
 4253|       |
 4254|      0|    case SSL_CTRL_GET_SHARED_GROUP: {
  ------------------
  |  | 1354|      0|#define SSL_CTRL_GET_SHARED_GROUP 93
  ------------------
  |  Branch (4254:5): [True: 0, False: 28]
  ------------------
 4255|      0|        uint16_t id = tls1_shared_group(sc, larg);
 4256|       |
 4257|      0|        if (larg != -1)
  ------------------
  |  Branch (4257:13): [True: 0, False: 0]
  ------------------
 4258|      0|            return tls1_group_id2nid(id, 1);
 4259|      0|        return id;
 4260|      0|    }
 4261|      0|    case SSL_CTRL_GET_NEGOTIATED_GROUP: {
  ------------------
  |  | 1388|      0|#define SSL_CTRL_GET_NEGOTIATED_GROUP 134
  ------------------
  |  Branch (4261:5): [True: 0, False: 28]
  ------------------
 4262|      0|        unsigned int id;
 4263|       |
 4264|      0|        if (SSL_CONNECTION_IS_TLS13(sc) && sc->s3.did_kex)
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (4264:44): [True: 0, False: 0]
  ------------------
 4265|      0|            id = sc->s3.group_id;
 4266|      0|        else
 4267|      0|            id = (sc->session != NULL) ? sc->session->kex_group : NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  |  Branch (4267:18): [True: 0, False: 0]
  ------------------
 4268|      0|        ret = tls1_group_id2nid(id, 1);
 4269|      0|        break;
 4270|      0|    }
 4271|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1355|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4271:5): [True: 0, False: 28]
  ------------------
 4272|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 0);
 4273|       |
 4274|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4274:5): [True: 0, False: 28]
  ------------------
 4275|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 0);
 4276|       |
 4277|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1359|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4277:5): [True: 0, False: 28]
  ------------------
 4278|      0|        return tls1_set_sigalgs(sc->cert, parg, larg, 1);
 4279|       |
 4280|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1360|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4280:5): [True: 0, False: 28]
  ------------------
 4281|      0|        return tls1_set_sigalgs_list(s->ctx, sc->cert, parg, 1);
 4282|       |
 4283|      0|    case SSL_CTRL_GET_CLIENT_CERT_TYPES: {
  ------------------
  |  | 1361|      0|#define SSL_CTRL_GET_CLIENT_CERT_TYPES 103
  ------------------
  |  Branch (4283:5): [True: 0, False: 28]
  ------------------
 4284|      0|        const unsigned char **pctype = parg;
 4285|      0|        if (sc->server || !sc->s3.tmp.cert_req)
  ------------------
  |  Branch (4285:13): [True: 0, False: 0]
  |  Branch (4285:27): [True: 0, False: 0]
  ------------------
 4286|      0|            return 0;
 4287|      0|        if (pctype)
  ------------------
  |  Branch (4287:13): [True: 0, False: 0]
  ------------------
 4288|      0|            *pctype = sc->s3.tmp.ctype;
 4289|      0|        return (long)sc->s3.tmp.ctype_len;
 4290|      0|    }
 4291|       |
 4292|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1362|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4292:5): [True: 0, False: 28]
  ------------------
 4293|      0|        if (!sc->server)
  ------------------
  |  Branch (4293:13): [True: 0, False: 0]
  ------------------
 4294|      0|            return 0;
 4295|      0|        return ssl3_set_req_cert_type(sc->cert, parg, larg);
 4296|       |
 4297|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1363|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4297:5): [True: 0, False: 28]
  ------------------
 4298|      0|        return ssl_build_cert_chain(sc, NULL, larg);
 4299|       |
 4300|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1364|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4300:5): [True: 0, False: 28]
  ------------------
 4301|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 0, larg);
 4302|       |
 4303|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1365|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4303:5): [True: 0, False: 28]
  ------------------
 4304|      0|        return ssl_cert_set_cert_store(sc->cert, parg, 1, larg);
 4305|       |
 4306|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4306:5): [True: 0, False: 28]
  ------------------
 4307|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 0);
 4308|       |
 4309|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1392|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4309:5): [True: 0, False: 28]
  ------------------
 4310|      0|        return ssl_cert_get_cert_store(sc->cert, parg, 1);
 4311|       |
 4312|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NAME:
  ------------------
  |  | 1395|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NAME 141
  ------------------
  |  Branch (4312:5): [True: 0, False: 28]
  ------------------
 4313|      0|        if (parg == NULL || sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4313:13): [True: 0, False: 0]
  |  Branch (4313:29): [True: 0, False: 0]
  ------------------
 4314|      0|            return 0;
 4315|      0|        *(const char **)parg = sc->s3.tmp.peer_sigalg->name;
 4316|      0|        return 1;
 4317|       |
 4318|      0|    case SSL_CTRL_GET_PEER_SIGNATURE_NID:
  ------------------
  |  | 1366|      0|#define SSL_CTRL_GET_PEER_SIGNATURE_NID 108
  ------------------
  |  Branch (4318:5): [True: 0, False: 28]
  ------------------
 4319|      0|        if (sc->s3.tmp.peer_sigalg == NULL)
  ------------------
  |  Branch (4319:13): [True: 0, False: 0]
  ------------------
 4320|      0|            return 0;
 4321|      0|        *(int *)parg = sc->s3.tmp.peer_sigalg->hash;
 4322|      0|        return 1;
 4323|       |
 4324|      0|    case SSL_CTRL_GET_SIGNATURE_NAME:
  ------------------
  |  | 1394|      0|#define SSL_CTRL_GET_SIGNATURE_NAME 140
  ------------------
  |  Branch (4324:5): [True: 0, False: 28]
  ------------------
 4325|      0|        if (parg == NULL || sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4325:13): [True: 0, False: 0]
  |  Branch (4325:29): [True: 0, False: 0]
  ------------------
 4326|      0|            return 0;
 4327|      0|        *(const char **)parg = sc->s3.tmp.sigalg->name;
 4328|      0|        return 1;
 4329|       |
 4330|      0|    case SSL_CTRL_GET_SIGNATURE_NID:
  ------------------
  |  | 1386|      0|#define SSL_CTRL_GET_SIGNATURE_NID 132
  ------------------
  |  Branch (4330:5): [True: 0, False: 28]
  ------------------
 4331|      0|        if (sc->s3.tmp.sigalg == NULL)
  ------------------
  |  Branch (4331:13): [True: 0, False: 0]
  ------------------
 4332|      0|            return 0;
 4333|      0|        *(int *)parg = sc->s3.tmp.sigalg->hash;
 4334|      0|        return 1;
 4335|       |
 4336|      0|    case SSL_CTRL_GET_PEER_TMP_KEY:
  ------------------
  |  | 1367|      0|#define SSL_CTRL_GET_PEER_TMP_KEY 109
  ------------------
  |  Branch (4336:5): [True: 0, False: 28]
  ------------------
 4337|      0|        if (sc->session == NULL || sc->s3.peer_tmp == NULL) {
  ------------------
  |  Branch (4337:13): [True: 0, False: 0]
  |  Branch (4337:36): [True: 0, False: 0]
  ------------------
 4338|      0|            return 0;
 4339|      0|        } else {
 4340|      0|            if (!EVP_PKEY_up_ref(sc->s3.peer_tmp))
  ------------------
  |  Branch (4340:17): [True: 0, False: 0]
  ------------------
 4341|      0|                return 0;
 4342|       |
 4343|      0|            *(EVP_PKEY **)parg = sc->s3.peer_tmp;
 4344|      0|            return 1;
 4345|      0|        }
 4346|       |
 4347|      0|    case SSL_CTRL_GET_TMP_KEY:
  ------------------
  |  | 1387|      0|#define SSL_CTRL_GET_TMP_KEY 133
  ------------------
  |  Branch (4347:5): [True: 0, False: 28]
  ------------------
 4348|      0|        if (sc->session == NULL || sc->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (4348:13): [True: 0, False: 0]
  |  Branch (4348:36): [True: 0, False: 0]
  ------------------
 4349|      0|            return 0;
 4350|      0|        } else {
 4351|      0|            if (!EVP_PKEY_up_ref(sc->s3.tmp.pkey))
  ------------------
  |  Branch (4351:17): [True: 0, False: 0]
  ------------------
 4352|      0|                return 0;
 4353|       |
 4354|      0|            *(EVP_PKEY **)parg = sc->s3.tmp.pkey;
 4355|      0|            return 1;
 4356|      0|        }
 4357|       |
 4358|      0|    case SSL_CTRL_GET_EC_POINT_FORMATS: {
  ------------------
  |  | 1369|      0|#define SSL_CTRL_GET_EC_POINT_FORMATS 111
  ------------------
  |  Branch (4358:5): [True: 0, False: 28]
  ------------------
 4359|      0|        const unsigned char **pformat = parg;
 4360|       |
 4361|      0|        if (sc->ext.peer_ecpointformats == NULL)
  ------------------
  |  Branch (4361:13): [True: 0, False: 0]
  ------------------
 4362|      0|            return 0;
 4363|      0|        *pformat = sc->ext.peer_ecpointformats;
 4364|      0|        return (int)sc->ext.peer_ecpointformats_len;
 4365|      0|    }
 4366|       |
 4367|      0|    case SSL_CTRL_GET_IANA_GROUPS: {
  ------------------
  |  | 1389|      0|#define SSL_CTRL_GET_IANA_GROUPS 135
  ------------------
  |  Branch (4367:5): [True: 0, False: 28]
  ------------------
 4368|      0|        if (parg != NULL) {
  ------------------
  |  Branch (4368:13): [True: 0, False: 0]
  ------------------
 4369|      0|            *(uint16_t **)parg = (uint16_t *)sc->ext.peer_supportedgroups;
 4370|      0|        }
 4371|      0|        return (int)sc->ext.peer_supportedgroups_len;
 4372|      0|    }
 4373|       |
 4374|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1286|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (4374:5): [True: 0, False: 28]
  ------------------
 4375|      0|        sc->msg_callback_arg = parg;
 4376|      0|        return 1;
 4377|       |
 4378|      0|    default:
  ------------------
  |  Branch (4378:5): [True: 0, False: 28]
  ------------------
 4379|      0|        break;
 4380|     28|    }
 4381|     28|    return ret;
 4382|     28|}
ssl3_ctx_ctrl:
 4420|  2.21k|{
 4421|  2.21k|    switch (cmd) {
 4422|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4423|      0|    case SSL_CTRL_SET_TMP_DH: {
  ------------------
  |  | 1274|      0|#define SSL_CTRL_SET_TMP_DH 3
  ------------------
  |  Branch (4423:5): [True: 0, False: 2.21k]
  ------------------
 4424|      0|        EVP_PKEY *pkdh = NULL;
 4425|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4425:13): [True: 0, False: 0]
  ------------------
 4426|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4427|      0|            return 0;
 4428|      0|        }
 4429|      0|        pkdh = ssl_dh_to_pkey(parg);
 4430|      0|        if (pkdh == NULL) {
  ------------------
  |  Branch (4430:13): [True: 0, False: 0]
  ------------------
 4431|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_DH_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4432|      0|            return 0;
 4433|      0|        }
 4434|      0|        if (!SSL_CTX_set0_tmp_dh_pkey(ctx, pkdh)) {
  ------------------
  |  Branch (4434:13): [True: 0, False: 0]
  ------------------
 4435|      0|            EVP_PKEY_free(pkdh);
 4436|      0|            return 0;
 4437|      0|        }
 4438|      0|        return 1;
 4439|      0|    }
 4440|      0|    case SSL_CTRL_SET_TMP_DH_CB: {
  ------------------
  |  | 1276|      0|#define SSL_CTRL_SET_TMP_DH_CB 6
  ------------------
  |  Branch (4440:5): [True: 0, False: 2.21k]
  ------------------
 4441|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4442|      0|        return 0;
 4443|      0|    }
 4444|      0|#endif
 4445|      0|    case SSL_CTRL_SET_DH_AUTO:
  ------------------
  |  | 1373|      0|#define SSL_CTRL_SET_DH_AUTO 118
  ------------------
  |  Branch (4445:5): [True: 0, False: 2.21k]
  ------------------
 4446|      0|        ctx->cert->dh_tmp_auto = larg;
 4447|      0|        return 1;
 4448|      0|#if !defined(OPENSSL_NO_DEPRECATED_3_0)
 4449|      0|    case SSL_CTRL_SET_TMP_ECDH: {
  ------------------
  |  | 1275|      0|#define SSL_CTRL_SET_TMP_ECDH 4
  ------------------
  |  Branch (4449:5): [True: 0, False: 2.21k]
  ------------------
 4450|      0|        if (parg == NULL) {
  ------------------
  |  Branch (4450:13): [True: 0, False: 0]
  ------------------
 4451|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4452|      0|            return 0;
 4453|      0|        }
 4454|      0|        return ssl_set_tmp_ecdh_groups(&ctx->ext.supportedgroups,
 4455|      0|            &ctx->ext.supportedgroups_len,
 4456|      0|            &ctx->ext.keyshares,
 4457|      0|            &ctx->ext.keyshares_len,
 4458|      0|            &ctx->ext.tuples,
 4459|      0|            &ctx->ext.tuples_len,
 4460|      0|            parg);
 4461|      0|    }
 4462|      0|#endif /* !OPENSSL_NO_DEPRECATED_3_0 */
 4463|      0|    case SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG:
  ------------------
  |  | 1314|      0|#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54
  ------------------
  |  Branch (4463:5): [True: 0, False: 2.21k]
  ------------------
 4464|      0|        ctx->ext.servername_arg = parg;
 4465|      0|        break;
 4466|      0|    case SSL_CTRL_SET_TLSEXT_TICKET_KEYS:
  ------------------
  |  | 1319|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4466:5): [True: 0, False: 2.21k]
  ------------------
 4467|      0|    case SSL_CTRL_GET_TLSEXT_TICKET_KEYS: {
  ------------------
  |  | 1318|      0|#define SSL_CTRL_GET_TLSEXT_TICKET_KEYS 58
  ------------------
  |  Branch (4467:5): [True: 0, False: 2.21k]
  ------------------
 4468|      0|        unsigned char *keys = parg;
 4469|      0|        long tick_keylen = (sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key) + sizeof(ctx->ext.secure->tick_aes_key));
 4470|      0|        if (keys == NULL)
  ------------------
  |  Branch (4470:13): [True: 0, False: 0]
  ------------------
 4471|      0|            return tick_keylen;
 4472|      0|        if (larg != tick_keylen) {
  ------------------
  |  Branch (4472:13): [True: 0, False: 0]
  ------------------
 4473|      0|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_TICKET_KEYS_LENGTH);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4474|      0|            return 0;
 4475|      0|        }
 4476|      0|        if (cmd == SSL_CTRL_SET_TLSEXT_TICKET_KEYS) {
  ------------------
  |  | 1319|      0|#define SSL_CTRL_SET_TLSEXT_TICKET_KEYS 59
  ------------------
  |  Branch (4476:13): [True: 0, False: 0]
  ------------------
 4477|      0|            memcpy(ctx->ext.tick_key_name, keys,
 4478|      0|                sizeof(ctx->ext.tick_key_name));
 4479|      0|            memcpy(ctx->ext.secure->tick_hmac_key,
 4480|      0|                keys + sizeof(ctx->ext.tick_key_name),
 4481|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4482|      0|            memcpy(ctx->ext.secure->tick_aes_key,
 4483|      0|                keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4484|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4485|      0|        } else {
 4486|      0|            memcpy(keys, ctx->ext.tick_key_name,
 4487|      0|                sizeof(ctx->ext.tick_key_name));
 4488|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name),
 4489|      0|                ctx->ext.secure->tick_hmac_key,
 4490|      0|                sizeof(ctx->ext.secure->tick_hmac_key));
 4491|      0|            memcpy(keys + sizeof(ctx->ext.tick_key_name) + sizeof(ctx->ext.secure->tick_hmac_key),
 4492|      0|                ctx->ext.secure->tick_aes_key,
 4493|      0|                sizeof(ctx->ext.secure->tick_aes_key));
 4494|      0|        }
 4495|      0|        return 1;
 4496|      0|    }
 4497|       |
 4498|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1381|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE 127
  ------------------
  |  Branch (4498:5): [True: 0, False: 2.21k]
  ------------------
 4499|      0|        return ctx->ext.status_type;
 4500|       |
 4501|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE:
  ------------------
  |  | 1325|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  ------------------
  |  Branch (4501:5): [True: 0, False: 2.21k]
  ------------------
 4502|      0|        ctx->ext.status_type = larg;
 4503|      0|        break;
 4504|       |
 4505|      0|    case SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1324|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG 64
  ------------------
  |  Branch (4505:5): [True: 0, False: 2.21k]
  ------------------
 4506|      0|        ctx->ext.status_arg = parg;
 4507|      0|        return 1;
 4508|       |
 4509|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG:
  ------------------
  |  | 1383|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG 129
  ------------------
  |  Branch (4509:5): [True: 0, False: 2.21k]
  ------------------
 4510|      0|        *(void **)parg = ctx->ext.status_arg;
 4511|      0|        break;
 4512|       |
 4513|      0|    case SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB:
  ------------------
  |  | 1382|      0|#define SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB 128
  ------------------
  |  Branch (4513:5): [True: 0, False: 2.21k]
  ------------------
 4514|      0|        *(int (**)(SSL *, void *))parg = ctx->ext.status_cb;
 4515|      0|        break;
 4516|       |
 4517|      0|#ifndef OPENSSL_NO_SRP
 4518|     60|    case SSL_CTRL_SET_TLS_EXT_SRP_USERNAME:
  ------------------
  |  | 1339|     60|#define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79
  ------------------
  |  Branch (4518:5): [True: 60, False: 2.15k]
  ------------------
 4519|     60|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   91|     60|#define SSL_kSRP 0x00000020U
  ------------------
 4520|     60|        OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  131|     60|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4521|     60|        ctx->srp_ctx.login = NULL;
 4522|     60|        if (parg == NULL)
  ------------------
  |  Branch (4522:13): [True: 0, False: 60]
  ------------------
 4523|      0|            break;
 4524|     60|        if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1) {
  ------------------
  |  Branch (4524:13): [True: 1, False: 59]
  |  Branch (4524:49): [True: 1, False: 58]
  ------------------
 4525|      2|            ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_SRP_USERNAME);
  ------------------
  |  |  404|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      2|    (ERR_new(),                                                  \
  |  |  |  |  407|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
 4526|      2|            return 0;
 4527|      2|        }
 4528|     58|        if ((ctx->srp_ctx.login = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  135|     58|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4528:13): [True: 0, False: 58]
  ------------------
 4529|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4530|      0|            return 0;
 4531|      0|        }
 4532|     58|        break;
 4533|     58|    case SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD:
  ------------------
  |  | 1341|     58|#define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81
  ------------------
  |  Branch (4533:5): [True: 58, False: 2.15k]
  ------------------
 4534|     58|        ctx->srp_ctx.SRP_give_srp_client_pwd_callback = srp_password_from_info_cb;
 4535|     58|        if (ctx->srp_ctx.info != NULL)
  ------------------
  |  Branch (4535:13): [True: 0, False: 58]
  ------------------
 4536|      0|            OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4537|     58|        if ((ctx->srp_ctx.info = OPENSSL_strdup((char *)parg)) == NULL) {
  ------------------
  |  |  135|     58|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4537:13): [True: 53, False: 5]
  ------------------
 4538|     53|            ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|     53|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     53|    (ERR_new(),                                                  \
  |  |  |  |  407|     53|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     53|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     53|        ERR_set_error)
  |  |  ------------------
  ------------------
 4539|     53|            return 0;
 4540|     53|        }
 4541|      5|        break;
 4542|      5|    case SSL_CTRL_SET_SRP_ARG:
  ------------------
  |  | 1338|      0|#define SSL_CTRL_SET_SRP_ARG 78
  ------------------
  |  Branch (4542:5): [True: 0, False: 2.21k]
  ------------------
 4543|      0|        ctx->srp_ctx.srp_Mask |= SSL_kSRP;
  ------------------
  |  |   91|      0|#define SSL_kSRP 0x00000020U
  ------------------
 4544|      0|        ctx->srp_ctx.SRP_cb_arg = parg;
 4545|      0|        break;
 4546|       |
 4547|      0|    case SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH:
  ------------------
  |  | 1340|      0|#define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH 80
  ------------------
  |  Branch (4547:5): [True: 0, False: 2.21k]
  ------------------
 4548|      0|        ctx->srp_ctx.strength = larg;
 4549|      0|        break;
 4550|      0|#endif
 4551|       |
 4552|      0|    case SSL_CTRL_SET_GROUPS:
  ------------------
  |  | 1352|      0|#define SSL_CTRL_SET_GROUPS 91
  ------------------
  |  Branch (4552:5): [True: 0, False: 2.21k]
  ------------------
 4553|      0|        return tls1_set_groups(&ctx->ext.supportedgroups,
 4554|      0|            &ctx->ext.supportedgroups_len,
 4555|      0|            &ctx->ext.keyshares,
 4556|      0|            &ctx->ext.keyshares_len,
 4557|      0|            &ctx->ext.tuples,
 4558|      0|            &ctx->ext.tuples_len,
 4559|      0|            parg, larg);
 4560|       |
 4561|  2.09k|    case SSL_CTRL_SET_GROUPS_LIST:
  ------------------
  |  | 1353|  2.09k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (4561:5): [True: 2.09k, False: 118]
  ------------------
 4562|  2.09k|        return tls1_set_groups_list(ctx,
 4563|  2.09k|            &ctx->ext.supportedgroups,
 4564|  2.09k|            &ctx->ext.supportedgroups_len,
 4565|  2.09k|            &ctx->ext.keyshares,
 4566|  2.09k|            &ctx->ext.keyshares_len,
 4567|  2.09k|            &ctx->ext.tuples,
 4568|  2.09k|            &ctx->ext.tuples_len,
 4569|  2.09k|            parg);
 4570|       |
 4571|      0|    case SSL_CTRL_GET0_IMPLEMENTED_GROUPS:
  ------------------
  |  | 1393|      0|#define SSL_CTRL_GET0_IMPLEMENTED_GROUPS 139
  ------------------
  |  Branch (4571:5): [True: 0, False: 2.21k]
  ------------------
 4572|      0|        return tls1_get0_implemented_groups(ctx->min_proto_version,
 4573|      0|            ctx->max_proto_version,
 4574|      0|            ctx->group_list,
 4575|      0|            ctx->group_list_len, larg, parg);
 4576|       |
 4577|      0|    case SSL_CTRL_SET_SIGALGS:
  ------------------
  |  | 1355|      0|#define SSL_CTRL_SET_SIGALGS 97
  ------------------
  |  Branch (4577:5): [True: 0, False: 2.21k]
  ------------------
 4578|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 0);
 4579|       |
 4580|      0|    case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (4580:5): [True: 0, False: 2.21k]
  ------------------
 4581|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 0);
 4582|       |
 4583|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS:
  ------------------
  |  | 1359|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS 101
  ------------------
  |  Branch (4583:5): [True: 0, False: 2.21k]
  ------------------
 4584|      0|        return tls1_set_sigalgs(ctx->cert, parg, larg, 1);
 4585|       |
 4586|      0|    case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1360|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (4586:5): [True: 0, False: 2.21k]
  ------------------
 4587|      0|        return tls1_set_sigalgs_list(ctx, ctx->cert, parg, 1);
 4588|       |
 4589|      0|    case SSL_CTRL_SET_CLIENT_CERT_TYPES:
  ------------------
  |  | 1362|      0|#define SSL_CTRL_SET_CLIENT_CERT_TYPES 104
  ------------------
  |  Branch (4589:5): [True: 0, False: 2.21k]
  ------------------
 4590|      0|        return ssl3_set_req_cert_type(ctx->cert, parg, larg);
 4591|       |
 4592|      0|    case SSL_CTRL_BUILD_CERT_CHAIN:
  ------------------
  |  | 1363|      0|#define SSL_CTRL_BUILD_CERT_CHAIN 105
  ------------------
  |  Branch (4592:5): [True: 0, False: 2.21k]
  ------------------
 4593|      0|        return ssl_build_cert_chain(NULL, ctx, larg);
 4594|       |
 4595|      0|    case SSL_CTRL_SET_VERIFY_CERT_STORE:
  ------------------
  |  | 1364|      0|#define SSL_CTRL_SET_VERIFY_CERT_STORE 106
  ------------------
  |  Branch (4595:5): [True: 0, False: 2.21k]
  ------------------
 4596|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 0, larg);
 4597|       |
 4598|      0|    case SSL_CTRL_SET_CHAIN_CERT_STORE:
  ------------------
  |  | 1365|      0|#define SSL_CTRL_SET_CHAIN_CERT_STORE 107
  ------------------
  |  Branch (4598:5): [True: 0, False: 2.21k]
  ------------------
 4599|      0|        return ssl_cert_set_cert_store(ctx->cert, parg, 1, larg);
 4600|       |
 4601|      0|    case SSL_CTRL_GET_VERIFY_CERT_STORE:
  ------------------
  |  | 1391|      0|#define SSL_CTRL_GET_VERIFY_CERT_STORE 137
  ------------------
  |  Branch (4601:5): [True: 0, False: 2.21k]
  ------------------
 4602|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 0);
 4603|       |
 4604|      0|    case SSL_CTRL_GET_CHAIN_CERT_STORE:
  ------------------
  |  | 1392|      0|#define SSL_CTRL_GET_CHAIN_CERT_STORE 138
  ------------------
  |  Branch (4604:5): [True: 0, False: 2.21k]
  ------------------
 4605|      0|        return ssl_cert_get_cert_store(ctx->cert, parg, 1);
 4606|       |
 4607|       |        /* A Thawte special :-) */
 4608|      0|    case SSL_CTRL_EXTRA_CHAIN_CERT:
  ------------------
  |  | 1284|      0|#define SSL_CTRL_EXTRA_CHAIN_CERT 14
  ------------------
  |  Branch (4608:5): [True: 0, False: 2.21k]
  ------------------
 4609|      0|        if (ctx->extra_certs == NULL) {
  ------------------
  |  Branch (4609:13): [True: 0, False: 0]
  ------------------
 4610|      0|            if ((ctx->extra_certs = sk_X509_new_null()) == NULL) {
  ------------------
  |  |   85|      0|#define sk_X509_new_null() ((STACK_OF(X509) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (4610:17): [True: 0, False: 0]
  ------------------
 4611|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4612|      0|                return 0;
 4613|      0|            }
 4614|      0|        }
 4615|      0|        if (!sk_X509_push(ctx->extra_certs, (X509 *)parg)) {
  ------------------
  |  |   92|      0|#define sk_X509_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_sk_type(sk), ossl_check_X509_type(ptr))
  ------------------
  |  Branch (4615:13): [True: 0, False: 0]
  ------------------
 4616|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4617|      0|            return 0;
 4618|      0|        }
 4619|      0|        break;
 4620|       |
 4621|      0|    case SSL_CTRL_GET_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1347|      0|#define SSL_CTRL_GET_EXTRA_CHAIN_CERTS 82
  ------------------
  |  Branch (4621:5): [True: 0, False: 2.21k]
  ------------------
 4622|      0|        if (ctx->extra_certs == NULL && larg == 0)
  ------------------
  |  Branch (4622:13): [True: 0, False: 0]
  |  Branch (4622:41): [True: 0, False: 0]
  ------------------
 4623|      0|            *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4624|      0|        else
 4625|      0|            *(STACK_OF(X509) **)parg = ctx->extra_certs;
 4626|      0|        break;
 4627|       |
 4628|      0|    case SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS:
  ------------------
  |  | 1348|      0|#define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS 83
  ------------------
  |  Branch (4628:5): [True: 0, False: 2.21k]
  ------------------
 4629|      0|        OSSL_STACK_OF_X509_free(ctx->extra_certs);
 4630|      0|        ctx->extra_certs = NULL;
 4631|      0|        break;
 4632|       |
 4633|      0|    case SSL_CTRL_CHAIN:
  ------------------
  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  ------------------
  |  Branch (4633:5): [True: 0, False: 2.21k]
  ------------------
 4634|      0|        if (larg)
  ------------------
  |  Branch (4634:13): [True: 0, False: 0]
  ------------------
 4635|      0|            return ssl_cert_set1_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4636|      0|        else
 4637|      0|            return ssl_cert_set0_chain(NULL, ctx, (STACK_OF(X509) *)parg);
 4638|       |
 4639|      0|    case SSL_CTRL_CHAIN_CERT:
  ------------------
  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  ------------------
  |  Branch (4639:5): [True: 0, False: 2.21k]
  ------------------
 4640|      0|        if (larg)
  ------------------
  |  Branch (4640:13): [True: 0, False: 0]
  ------------------
 4641|      0|            return ssl_cert_add1_chain_cert(NULL, ctx, (X509 *)parg);
 4642|      0|        else
 4643|      0|            return ssl_cert_add0_chain_cert(NULL, ctx, (X509 *)parg);
 4644|       |
 4645|      0|    case SSL_CTRL_GET_CHAIN_CERTS:
  ------------------
  |  | 1370|      0|#define SSL_CTRL_GET_CHAIN_CERTS 115
  ------------------
  |  Branch (4645:5): [True: 0, False: 2.21k]
  ------------------
 4646|      0|        *(STACK_OF(X509) **)parg = ctx->cert->key->chain;
 4647|      0|        break;
 4648|       |
 4649|      0|    case SSL_CTRL_SELECT_CURRENT_CERT:
  ------------------
  |  | 1371|      0|#define SSL_CTRL_SELECT_CURRENT_CERT 116
  ------------------
  |  Branch (4649:5): [True: 0, False: 2.21k]
  ------------------
 4650|      0|        return ssl_cert_select_current(ctx->cert, (X509 *)parg);
 4651|       |
 4652|      0|    case SSL_CTRL_SET_CURRENT_CERT:
  ------------------
  |  | 1372|      0|#define SSL_CTRL_SET_CURRENT_CERT 117
  ------------------
  |  Branch (4652:5): [True: 0, False: 2.21k]
  ------------------
 4653|      0|        return ssl_cert_set_current(ctx->cert, larg);
 4654|       |
 4655|      0|    default:
  ------------------
  |  Branch (4655:5): [True: 0, False: 2.21k]
  ------------------
 4656|      0|        return 0;
 4657|  2.21k|    }
 4658|     63|    return 1;
 4659|  2.21k|}
ssl3_get_cipher_by_std_name:
 4731|  19.4k|{
 4732|  19.4k|    SSL_CIPHER *tbl;
 4733|  19.4k|    SSL_CIPHER *alltabs[] = { tls13_ciphers, ssl3_ciphers, ssl3_scsvs };
 4734|  19.4k|    size_t i, j, tblsize[] = { TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, SSL3_NUM_SCSVS };
  ------------------
  |  |   27|  19.4k|#define TLS13_NUM_CIPHERS OSSL_NELEM(tls13_ciphers)
  |  |  ------------------
  |  |  |  |   14|  19.4k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
                  size_t i, j, tblsize[] = { TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, SSL3_NUM_SCSVS };
  ------------------
  |  |   28|  19.4k|#define SSL3_NUM_CIPHERS OSSL_NELEM(ssl3_ciphers)
  |  |  ------------------
  |  |  |  |   14|  19.4k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
                  size_t i, j, tblsize[] = { TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS, SSL3_NUM_SCSVS };
  ------------------
  |  |   29|  19.4k|#define SSL3_NUM_SCSVS OSSL_NELEM(ssl3_scsvs)
  |  |  ------------------
  |  |  |  |   14|  19.4k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  |  |  ------------------
  ------------------
 4735|       |
 4736|       |    /* this is not efficient, necessary to optimize this? */
 4737|  58.6k|    for (j = 0; j < OSSL_NELEM(alltabs); j++) {
  ------------------
  |  |   14|  58.6k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (4737:17): [True: 45.6k, False: 13.0k]
  ------------------
 4738|  2.67M|        for (i = 0, tbl = alltabs[j]; i < tblsize[j]; i++, tbl++) {
  ------------------
  |  Branch (4738:39): [True: 2.63M, False: 39.2k]
  ------------------
 4739|  2.63M|            if (tbl->stdname == NULL)
  ------------------
  |  Branch (4739:17): [True: 65.3k, False: 2.56M]
  ------------------
 4740|  65.3k|                continue;
 4741|  2.56M|            if (strcmp(stdname, tbl->stdname) == 0) {
  ------------------
  |  Branch (4741:17): [True: 6.38k, False: 2.56M]
  ------------------
 4742|  6.38k|                return tbl;
 4743|  6.38k|            }
 4744|  2.56M|        }
 4745|  45.6k|    }
 4746|  13.0k|    return NULL;
 4747|  19.4k|}
ssl3_put_cipher_by_char:
 4761|  36.3k|{
 4762|  36.3k|    if ((c->id & 0xff000000) != SSL3_CK_CIPHERSUITE_FLAG) {
  ------------------
  |  |  254|  36.3k|#define SSL3_CK_CIPHERSUITE_FLAG 0x03000000
  ------------------
  |  Branch (4762:9): [True: 0, False: 36.3k]
  ------------------
 4763|      0|        *len = 0;
 4764|      0|        return 1;
 4765|      0|    }
 4766|       |
 4767|  36.3k|    if (!WPACKET_put_bytes_u16(pkt, c->id & 0xffff))
  ------------------
  |  |  891|  36.3k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (4767:9): [True: 0, False: 36.3k]
  ------------------
 4768|      0|        return 0;
 4769|       |
 4770|  36.3k|    *len = 2;
 4771|  36.3k|    return 1;
 4772|  36.3k|}
ssl3_renegotiate_check:
 5184|  1.56k|{
 5185|  1.56k|    int ret = 0;
 5186|  1.56k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  1.56k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.56k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.56k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.56k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.56k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.56k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.56k|                             : NULL))
  |  |  ------------------
  ------------------
 5187|       |
 5188|  1.56k|    if (sc == NULL)
  ------------------
  |  Branch (5188:9): [True: 0, False: 1.56k]
  ------------------
 5189|      0|        return 0;
 5190|       |
 5191|  1.56k|    if (sc->s3.renegotiate) {
  ------------------
  |  Branch (5191:9): [True: 0, False: 1.56k]
  ------------------
 5192|      0|        if (!RECORD_LAYER_read_pending(&sc->rlayer)
  ------------------
  |  Branch (5192:13): [True: 0, False: 0]
  ------------------
 5193|      0|            && !RECORD_LAYER_write_pending(&sc->rlayer)
  ------------------
  |  Branch (5193:16): [True: 0, False: 0]
  ------------------
 5194|      0|            && (initok || !SSL_in_init(s))) {
  ------------------
  |  Branch (5194:17): [True: 0, False: 0]
  |  Branch (5194:27): [True: 0, False: 0]
  ------------------
 5195|       |            /*
 5196|       |             * if we are the server, and we have sent a 'RENEGOTIATE'
 5197|       |             * message, we need to set the state machine into the renegotiate
 5198|       |             * state.
 5199|       |             */
 5200|      0|            ossl_statem_set_renegotiate(sc);
 5201|      0|            sc->s3.renegotiate = 0;
 5202|      0|            sc->s3.num_renegotiations++;
 5203|      0|            sc->s3.total_renegotiations++;
 5204|      0|            ret = 1;
 5205|      0|        }
 5206|      0|    }
 5207|  1.56k|    return ret;
 5208|  1.56k|}
ssl_fill_hello_random:
 5241|  1.30k|{
 5242|  1.30k|    int send_time = 0, ret;
 5243|       |
 5244|  1.30k|    if (len < 4)
  ------------------
  |  Branch (5244:9): [True: 0, False: 1.30k]
  ------------------
 5245|      0|        return 0;
 5246|  1.30k|    if (server)
  ------------------
  |  Branch (5246:9): [True: 0, False: 1.30k]
  ------------------
 5247|      0|        send_time = (s->mode & SSL_MODE_SEND_SERVERHELLO_TIME) != 0;
  ------------------
  |  |  522|      0|#define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040U
  ------------------
 5248|  1.30k|    else
 5249|  1.30k|        send_time = (s->mode & SSL_MODE_SEND_CLIENTHELLO_TIME) != 0;
  ------------------
  |  |  521|  1.30k|#define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020U
  ------------------
 5250|  1.30k|    if (send_time) {
  ------------------
  |  Branch (5250:9): [True: 0, False: 1.30k]
  ------------------
 5251|      0|        unsigned long Time = (unsigned long)time(NULL);
 5252|      0|        unsigned char *p = result;
 5253|       |
 5254|      0|        l2n(Time, p);
  ------------------
  |  |  153|      0|#define l2n(l, c) (*((c)++) = (unsigned char)(((l) >> 24) & 0xff), \
  |  |  154|      0|    *((c)++) = (unsigned char)(((l) >> 16) & 0xff),                \
  |  |  155|      0|    *((c)++) = (unsigned char)(((l) >> 8) & 0xff),                 \
  |  |  156|      0|    *((c)++) = (unsigned char)(((l)) & 0xff))
  ------------------
 5255|      0|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, p, len - 4, 0);
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5256|  1.30k|    } else {
 5257|  1.30k|        ret = RAND_bytes_ex(SSL_CONNECTION_GET_CTX(s)->libctx, result, len, 0);
  ------------------
  |  |   26|  1.30k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5258|  1.30k|    }
 5259|       |
 5260|  1.30k|    if (ret > 0) {
  ------------------
  |  Branch (5260:9): [True: 1.30k, False: 0]
  ------------------
 5261|  1.30k|        if (!ossl_assert(sizeof(tls11downgrade) < len)
  ------------------
  |  |   52|  2.61k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.61k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5261:13): [True: 0, False: 1.30k]
  ------------------
 5262|  1.30k|            || !ossl_assert(sizeof(tls12downgrade) < len))
  ------------------
  |  |   52|  1.30k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.30k|    __FILE__, __LINE__)
  ------------------
  |  Branch (5262:16): [True: 0, False: 1.30k]
  ------------------
 5263|      0|            return 0;
 5264|  1.30k|        if (dgrd == DOWNGRADE_TO_1_2)
  ------------------
  |  Branch (5264:13): [True: 0, False: 1.30k]
  ------------------
 5265|      0|            memcpy(result + len - sizeof(tls12downgrade), tls12downgrade,
 5266|      0|                sizeof(tls12downgrade));
 5267|  1.30k|        else if (dgrd == DOWNGRADE_TO_1_1)
  ------------------
  |  Branch (5267:18): [True: 0, False: 1.30k]
  ------------------
 5268|      0|            memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
 5269|      0|                sizeof(tls11downgrade));
 5270|  1.30k|    }
 5271|       |
 5272|  1.30k|    return ret;
 5273|  1.30k|}
ssl_generate_pkey_group:
 5373|  2.46k|{
 5374|  2.46k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  2.46k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 5375|  2.46k|    const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(sctx, id);
 5376|  2.46k|    EVP_PKEY_CTX *pctx = NULL;
 5377|  2.46k|    EVP_PKEY *pkey = NULL;
 5378|       |
 5379|  2.46k|    if (ginf == NULL) {
  ------------------
  |  Branch (5379:9): [True: 0, False: 2.46k]
  ------------------
 5380|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5381|      0|        goto err;
 5382|      0|    }
 5383|       |
 5384|  2.46k|    pctx = EVP_PKEY_CTX_new_from_name(sctx->libctx, ginf->algorithm,
 5385|  2.46k|        sctx->propq);
 5386|       |
 5387|  2.46k|    if (pctx == NULL) {
  ------------------
  |  Branch (5387:9): [True: 0, False: 2.46k]
  ------------------
 5388|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5389|      0|        goto err;
 5390|      0|    }
 5391|  2.46k|    if (EVP_PKEY_keygen_init(pctx) <= 0) {
  ------------------
  |  Branch (5391:9): [True: 0, False: 2.46k]
  ------------------
 5392|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5393|      0|        goto err;
 5394|      0|    }
 5395|  2.46k|    if (EVP_PKEY_CTX_set_group_name(pctx, ginf->realname) <= 0) {
  ------------------
  |  Branch (5395:9): [True: 0, False: 2.46k]
  ------------------
 5396|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5397|      0|        goto err;
 5398|      0|    }
 5399|  2.46k|    if (EVP_PKEY_keygen(pctx, &pkey) <= 0) {
  ------------------
  |  Branch (5399:9): [True: 0, False: 2.46k]
  ------------------
 5400|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EVP_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 5401|      0|        EVP_PKEY_free(pkey);
 5402|      0|        pkey = NULL;
 5403|      0|    }
 5404|       |
 5405|  2.46k|err:
 5406|  2.46k|    EVP_PKEY_CTX_free(pctx);
 5407|  2.46k|    return pkey;
 5408|  2.46k|}
s3_lib.c:cipher_compare:
 3720|    973|{
 3721|    973|    const SSL_CIPHER *ap = (const SSL_CIPHER *)a;
 3722|    973|    const SSL_CIPHER *bp = (const SSL_CIPHER *)b;
 3723|       |
 3724|    973|    if (ap->id == bp->id)
  ------------------
  |  Branch (3724:9): [True: 0, False: 973]
  ------------------
 3725|      0|        return 0;
 3726|    973|    return ap->id < bp->id ? -1 : 1;
  ------------------
  |  Branch (3726:12): [True: 626, False: 347]
  ------------------
 3727|    973|}

ssl3_send_alert:
   46|  1.11k|{
   47|  1.11k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.11k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   48|       |
   49|       |    /* Map tls/ssl alert value to correct one */
   50|  1.11k|    if (SSL_CONNECTION_TREAT_AS_TLS13(s))
  ------------------
  |  |  270|  1.11k|    (SSL_CONNECTION_IS_TLS13(s)                                  \
  |  |  ------------------
  |  |  |  |  265|  2.23k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  258|  2.23k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   27|  1.11k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  | 2190|  1.11k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (265:37): [True: 1.11k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  266|  1.11k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.11k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.23k|#define TLS1_3_VERSION 0x0304
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (266:8): [True: 1.11k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  267|  2.23k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.11k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  |  |  ------------------
  |  |  |  |  |  |   40|  1.11k|#define TLS_ANY_VERSION 0x10000
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (267:8): [True: 0, False: 1.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  271|  1.11k|        || (s)->early_data_state == SSL_EARLY_DATA_CONNECTING    \
  |  |  ------------------
  |  |  |  Branch (271:12): [True: 0, False: 1.11k]
  |  |  ------------------
  |  |  272|  1.11k|        || (s)->early_data_state == SSL_EARLY_DATA_CONNECT_RETRY \
  |  |  ------------------
  |  |  |  Branch (272:12): [True: 0, False: 1.11k]
  |  |  ------------------
  |  |  273|  1.11k|        || (s)->early_data_state == SSL_EARLY_DATA_WRITING       \
  |  |  ------------------
  |  |  |  Branch (273:12): [True: 0, False: 1.11k]
  |  |  ------------------
  |  |  274|  1.11k|        || (s)->early_data_state == SSL_EARLY_DATA_WRITE_RETRY   \
  |  |  ------------------
  |  |  |  Branch (274:12): [True: 0, False: 1.11k]
  |  |  ------------------
  |  |  275|  1.11k|        || (s)->hello_retry_request == SSL_HRR_PENDING)
  |  |  ------------------
  |  |  |  Branch (275:12): [True: 1, False: 1.11k]
  |  |  ------------------
  ------------------
   51|      1|        desc = tls13_alert_code(desc);
   52|  1.11k|    else
   53|  1.11k|        desc = ssl->method->ssl3_enc->alert_value(desc);
   54|  1.11k|    if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
  ------------------
  |  |   23|  2.23k|#define SSL3_VERSION 0x0300
  ------------------
                  if (s->version == SSL3_VERSION && desc == SSL_AD_PROTOCOL_VERSION)
  ------------------
  |  | 1239|      7|#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION
  |  |  ------------------
  |  |  |  |   64|      7|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (54:9): [True: 7, False: 1.10k]
  |  Branch (54:39): [True: 0, False: 7]
  ------------------
   55|      0|        desc = SSL_AD_HANDSHAKE_FAILURE; /* SSL 3.0 does not have
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
   56|       |                                          * protocol_version alerts */
   57|  1.11k|    if (desc < 0)
  ------------------
  |  Branch (57:9): [True: 0, False: 1.11k]
  ------------------
   58|      0|        return -1;
   59|  1.11k|    if (s->shutdown & SSL_SENT_SHUTDOWN && desc != SSL_AD_CLOSE_NOTIFY)
  ------------------
  |  |  215|  2.23k|#define SSL_SENT_SHUTDOWN 1
  ------------------
                  if (s->shutdown & SSL_SENT_SHUTDOWN && desc != SSL_AD_CLOSE_NOTIFY)
  ------------------
  |  | 1209|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (59:9): [True: 0, False: 1.11k]
  |  Branch (59:44): [True: 0, False: 0]
  ------------------
   60|      0|        return -1;
   61|       |    /* If a fatal one, remove from cache */
   62|  1.11k|    if ((level == SSL3_AL_FATAL) && (s->session != NULL))
  ------------------
  |  |  250|  1.11k|#define SSL3_AL_FATAL 2
  ------------------
  |  Branch (62:9): [True: 1.11k, False: 0]
  |  Branch (62:37): [True: 1.10k, False: 7]
  ------------------
   63|  1.10k|        SSL_CTX_remove_session(s->session_ctx, s->session);
   64|       |
   65|  1.11k|    s->s3.alert_dispatch = SSL_ALERT_DISPATCH_PENDING;
  ------------------
  |  |  314|  1.11k|#define SSL_ALERT_DISPATCH_PENDING 1
  ------------------
   66|  1.11k|    s->s3.send_alert[0] = level;
   67|  1.11k|    s->s3.send_alert[1] = desc;
   68|  1.11k|    if (!RECORD_LAYER_write_pending(&s->rlayer)) {
  ------------------
  |  Branch (68:9): [True: 1.11k, False: 0]
  ------------------
   69|       |        /* data still being written out? */
   70|  1.11k|        return ssl->method->ssl_dispatch_alert(ssl);
   71|  1.11k|    }
   72|       |    /*
   73|       |     * else data is still being written out, we will get written some time in
   74|       |     * the future
   75|       |     */
   76|      0|    return -1;
   77|  1.11k|}
ssl3_dispatch_alert:
   80|  1.11k|{
   81|  1.11k|    int i, j;
   82|  1.11k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
   83|  1.11k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.11k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.11k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.11k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.11k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.11k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.11k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.11k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   84|  1.11k|    OSSL_RECORD_TEMPLATE templ;
   85|       |
   86|  1.11k|    if (sc == NULL)
  ------------------
  |  Branch (86:9): [True: 0, False: 1.11k]
  ------------------
   87|      0|        return -1;
   88|       |
   89|  1.11k|    if (sc->rlayer.wrlmethod == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 1.11k]
  ------------------
   90|       |        /* No write record layer so we can't sent and alert. We just ignore it */
   91|      0|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  312|      0|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
   92|      0|        return 1;
   93|      0|    }
   94|       |
   95|  1.11k|    templ.type = SSL3_RT_ALERT;
  ------------------
  |  |  220|  1.11k|#define SSL3_RT_ALERT 21
  ------------------
   96|  1.11k|    templ.version = (sc->version == TLS1_3_VERSION) ? TLS1_2_VERSION
  ------------------
  |  |   27|  1.11k|#define TLS1_3_VERSION 0x0304
  ------------------
                  templ.version = (sc->version == TLS1_3_VERSION) ? TLS1_2_VERSION
  ------------------
  |  |   26|  1.09k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (96:21): [True: 1.09k, False: 17]
  ------------------
   97|  1.11k|                                                    : sc->version;
   98|  1.11k|    if (SSL_get_state(s) == TLS_ST_CW_CLNT_HELLO
  ------------------
  |  Branch (98:9): [True: 1.00k, False: 112]
  ------------------
   99|  1.00k|        && !sc->renegotiate
  ------------------
  |  Branch (99:12): [True: 1.00k, False: 0]
  ------------------
  100|  1.00k|        && TLS1_get_version(s) > TLS1_VERSION
  ------------------
  |  |   52|  1.00k|    ((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
  |  |  ------------------
  |  |  |  |   42|  1.00k|#define TLS1_VERSION_MAJOR 0x03
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 1.00k, False: 0]
  |  |  ------------------
  ------------------
                      && TLS1_get_version(s) > TLS1_VERSION
  ------------------
  |  |   24|  2.12k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (100:12): [True: 999, False: 5]
  ------------------
  101|    999|        && sc->hello_retry_request == SSL_HRR_NONE) {
  ------------------
  |  Branch (101:12): [True: 999, False: 0]
  ------------------
  102|    999|        templ.version = TLS1_VERSION;
  ------------------
  |  |   24|    999|#define TLS1_VERSION 0x0301
  ------------------
  103|    999|    }
  104|  1.11k|    templ.buf = &sc->s3.send_alert[0];
  105|  1.11k|    templ.buflen = 2;
  106|       |
  107|  1.11k|    if (RECORD_LAYER_write_pending(&sc->rlayer)) {
  ------------------
  |  Branch (107:9): [True: 0, False: 1.11k]
  ------------------
  108|      0|        if (sc->s3.alert_dispatch != SSL_ALERT_DISPATCH_RETRY) {
  ------------------
  |  |  316|      0|#define SSL_ALERT_DISPATCH_RETRY 2
  ------------------
  |  Branch (108:13): [True: 0, False: 0]
  ------------------
  109|       |            /*
  110|       |             * We have a write pending but it wasn't from a previous call to
  111|       |             * this function! Can we ever get here? Maybe via API misuse??
  112|       |             * Give up.
  113|       |             */
  114|      0|            sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  312|      0|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  115|      0|            return -1;
  116|      0|        }
  117|       |        /* Retry what we've already got pending */
  118|      0|        i = HANDLE_RLAYER_WRITE_RETURN(sc,
  ------------------
  |  |  169|      0|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  119|      0|            sc->rlayer.wrlmethod->retry_write_records(sc->rlayer.wrl));
  120|      0|        if (i <= 0) {
  ------------------
  |  Branch (120:13): [True: 0, False: 0]
  ------------------
  121|       |            /* Could be NBIO. Keep alert_dispatch as SSL_ALERT_DISPATCH_RETRY */
  122|      0|            return -1;
  123|      0|        }
  124|      0|        sc->rlayer.wpend_tot = 0;
  125|      0|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  312|      0|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  126|      0|        return 1;
  127|      0|    }
  128|       |
  129|  1.11k|    i = HANDLE_RLAYER_WRITE_RETURN(sc,
  ------------------
  |  |  169|  1.11k|    ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   ossl_tls_handle_rlayer_return(s, 1, ret, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  130|  1.11k|        sc->rlayer.wrlmethod->write_records(sc->rlayer.wrl, &templ, 1));
  131|       |
  132|  1.11k|    if (i <= 0) {
  ------------------
  |  Branch (132:9): [True: 0, False: 1.11k]
  ------------------
  133|      0|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_RETRY;
  ------------------
  |  |  316|      0|#define SSL_ALERT_DISPATCH_RETRY 2
  ------------------
  134|      0|        sc->rlayer.wpend_tot = templ.buflen;
  135|      0|        sc->rlayer.wpend_type = templ.type;
  136|      0|        sc->rlayer.wpend_buf = templ.buf;
  137|  1.11k|    } else {
  138|       |        /*
  139|       |         * Alert sent to BIO - now flush. If the message does not get sent due
  140|       |         * to non-blocking IO, we will not worry too much.
  141|       |         */
  142|  1.11k|        (void)BIO_flush(sc->wbio);
  ------------------
  |  |  641|  1.11k|#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
  |  |  ------------------
  |  |  |  |  100|  1.11k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  |  |  ------------------
  ------------------
  143|  1.11k|        sc->s3.alert_dispatch = SSL_ALERT_DISPATCH_NONE;
  ------------------
  |  |  312|  1.11k|#define SSL_ALERT_DISPATCH_NONE 0
  ------------------
  144|       |
  145|  1.11k|        if (sc->msg_callback)
  ------------------
  |  Branch (145:13): [True: 0, False: 1.11k]
  ------------------
  146|      0|            sc->msg_callback(1, sc->version, SSL3_RT_ALERT, sc->s3.send_alert,
  ------------------
  |  |  220|      0|#define SSL3_RT_ALERT 21
  ------------------
  147|      0|                2, s, sc->msg_callback_arg);
  148|       |
  149|  1.11k|        if (sc->info_callback != NULL)
  ------------------
  |  Branch (149:13): [True: 0, False: 1.11k]
  ------------------
  150|      0|            cb = sc->info_callback;
  151|  1.11k|        else if (s->ctx->info_callback != NULL)
  ------------------
  |  Branch (151:18): [True: 0, False: 1.11k]
  ------------------
  152|      0|            cb = s->ctx->info_callback;
  153|       |
  154|  1.11k|        if (cb != NULL) {
  ------------------
  |  Branch (154:13): [True: 0, False: 1.11k]
  ------------------
  155|      0|            j = (sc->s3.send_alert[0] << 8) | sc->s3.send_alert[1];
  156|      0|            cb(s, SSL_CB_WRITE_ALERT, j);
  ------------------
  |  | 1141|      0|#define SSL_CB_WRITE_ALERT (SSL_CB_ALERT | SSL_CB_WRITE)
  |  |  ------------------
  |  |  |  | 1139|      0|#define SSL_CB_ALERT 0x4000 /* used in callback */
  |  |  ------------------
  |  |               #define SSL_CB_WRITE_ALERT (SSL_CB_ALERT | SSL_CB_WRITE)
  |  |  ------------------
  |  |  |  | 1138|      0|#define SSL_CB_WRITE 0x08
  |  |  ------------------
  ------------------
  157|      0|        }
  158|  1.11k|    }
  159|  1.11k|    return i;
  160|  1.11k|}

SSL_get_ex_data_X509_STORE_CTX_idx:
   56|  2.09k|{
   57|       |
   58|  2.09k|    if (!RUN_ONCE(&ssl_x509_store_ctx_once, ssl_x509_store_ctx_init))
  ------------------
  |  |  130|  2.09k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 2.09k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (58:9): [True: 0, False: 2.09k]
  ------------------
   59|      0|        return -1;
   60|  2.09k|    return ssl_x509_store_ctx_idx;
   61|  2.09k|}
ssl_cert_new:
   64|  2.09k|{
   65|  2.09k|    CERT *ret = NULL;
   66|       |
   67|       |    /* Should never happen */
   68|  2.09k|    if (!ossl_assert(ssl_pkey_num >= SSL_PKEY_NUM))
  ------------------
  |  |   52|  2.09k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  2.09k|    __FILE__, __LINE__)
  ------------------
  |  Branch (68:9): [True: 0, False: 2.09k]
  ------------------
   69|      0|        return NULL;
   70|       |
   71|  2.09k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.09k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   72|  2.09k|    if (ret == NULL)
  ------------------
  |  Branch (72:9): [True: 0, False: 2.09k]
  ------------------
   73|      0|        return NULL;
   74|       |
   75|  2.09k|    ret->ssl_pkey_num = ssl_pkey_num;
   76|  2.09k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  112|  2.09k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   77|  2.09k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (77:9): [True: 0, False: 2.09k]
  ------------------
   78|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   79|      0|        return NULL;
   80|      0|    }
   81|       |
   82|  2.09k|    ret->key = &(ret->pkeys[SSL_PKEY_RSA]);
  ------------------
  |  |  319|  2.09k|#define SSL_PKEY_RSA 0
  ------------------
   83|  2.09k|    ret->sec_cb = ssl_security_default_callback;
   84|  2.09k|    ret->sec_level = OPENSSL_TLS_SECURITY_LEVEL;
  ------------------
  |  |   31|  2.09k|#define OPENSSL_TLS_SECURITY_LEVEL 2
  ------------------
   85|  2.09k|    ret->sec_ex = NULL;
   86|  2.09k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (86:9): [True: 0, False: 2.09k]
  ------------------
   87|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   88|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   89|      0|        return NULL;
   90|      0|    }
   91|       |
   92|  2.09k|    return ret;
   93|  2.09k|}
ssl_cert_dup:
   96|  1.31k|{
   97|  1.31k|    CERT *ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  1.31k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   98|  1.31k|    size_t i;
   99|       |#ifndef OPENSSL_NO_COMP_ALG
  100|       |    int j;
  101|       |#endif
  102|       |
  103|  1.31k|    if (ret == NULL)
  ------------------
  |  Branch (103:9): [True: 0, False: 1.31k]
  ------------------
  104|      0|        return NULL;
  105|       |
  106|  1.31k|    ret->ssl_pkey_num = cert->ssl_pkey_num;
  107|  1.31k|    ret->pkeys = OPENSSL_calloc(ret->ssl_pkey_num, sizeof(CERT_PKEY));
  ------------------
  |  |  112|  1.31k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  108|  1.31k|    if (ret->pkeys == NULL) {
  ------------------
  |  Branch (108:9): [True: 0, False: 1.31k]
  ------------------
  109|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|      0|        return NULL;
  111|      0|    }
  112|       |
  113|  1.31k|    ret->key = &ret->pkeys[cert->key - cert->pkeys];
  114|  1.31k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (114:9): [True: 0, False: 1.31k]
  ------------------
  115|      0|        OPENSSL_free(ret->pkeys);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  116|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  117|      0|        return NULL;
  118|      0|    }
  119|       |
  120|  1.31k|    if (cert->dh_tmp != NULL) {
  ------------------
  |  Branch (120:9): [True: 0, False: 1.31k]
  ------------------
  121|      0|        if (!EVP_PKEY_up_ref(cert->dh_tmp))
  ------------------
  |  Branch (121:13): [True: 0, False: 0]
  ------------------
  122|      0|            goto err;
  123|      0|        ret->dh_tmp = cert->dh_tmp;
  124|      0|    }
  125|       |
  126|  1.31k|    ret->dh_tmp_cb = cert->dh_tmp_cb;
  127|  1.31k|    ret->dh_tmp_auto = cert->dh_tmp_auto;
  128|       |
  129|  17.1k|    for (i = 0; i < ret->ssl_pkey_num; i++) {
  ------------------
  |  Branch (129:17): [True: 15.7k, False: 1.31k]
  ------------------
  130|  15.7k|        CERT_PKEY *cpk = cert->pkeys + i;
  131|  15.7k|        CERT_PKEY *rpk = ret->pkeys + i;
  132|       |
  133|  15.7k|        if (cpk->x509 != NULL) {
  ------------------
  |  Branch (133:13): [True: 0, False: 15.7k]
  ------------------
  134|      0|            if (!X509_up_ref(cpk->x509))
  ------------------
  |  Branch (134:17): [True: 0, False: 0]
  ------------------
  135|      0|                goto err;
  136|      0|            rpk->x509 = cpk->x509;
  137|      0|        }
  138|       |
  139|  15.7k|        if (cpk->privatekey != NULL) {
  ------------------
  |  Branch (139:13): [True: 0, False: 15.7k]
  ------------------
  140|      0|            if (!EVP_PKEY_up_ref(cpk->privatekey))
  ------------------
  |  Branch (140:17): [True: 0, False: 0]
  ------------------
  141|      0|                goto err;
  142|      0|            rpk->privatekey = cpk->privatekey;
  143|      0|        }
  144|       |
  145|  15.7k|        if (cpk->chain) {
  ------------------
  |  Branch (145:13): [True: 0, False: 15.7k]
  ------------------
  146|      0|            rpk->chain = X509_chain_up_ref(cpk->chain);
  147|      0|            if (!rpk->chain) {
  ------------------
  |  Branch (147:17): [True: 0, False: 0]
  ------------------
  148|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  149|      0|                goto err;
  150|      0|            }
  151|      0|        }
  152|  15.7k|        if (cpk->serverinfo != NULL) {
  ------------------
  |  Branch (152:13): [True: 0, False: 15.7k]
  ------------------
  153|       |            /* Just copy everything. */
  154|      0|            rpk->serverinfo = OPENSSL_memdup(cpk->serverinfo, cpk->serverinfo_length);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|      0|            if (rpk->serverinfo == NULL)
  ------------------
  |  Branch (155:17): [True: 0, False: 0]
  ------------------
  156|      0|                goto err;
  157|      0|            rpk->serverinfo_length = cpk->serverinfo_length;
  158|      0|        }
  159|       |#ifndef OPENSSL_NO_COMP_ALG
  160|       |        for (j = TLSEXT_comp_cert_none; j < TLSEXT_comp_cert_limit; j++) {
  161|       |            if (cpk->comp_cert[j] != NULL) {
  162|       |                if (!OSSL_COMP_CERT_up_ref(cpk->comp_cert[j]))
  163|       |                    goto err;
  164|       |                rpk->comp_cert[j] = cpk->comp_cert[j];
  165|       |            }
  166|       |        }
  167|       |#endif
  168|  15.7k|    }
  169|       |
  170|       |    /* Configured sigalgs copied across */
  171|  1.31k|    if (cert->conf_sigalgs) {
  ------------------
  |  Branch (171:9): [True: 0, False: 1.31k]
  ------------------
  172|      0|        ret->conf_sigalgs = OPENSSL_malloc_array(cert->conf_sigalgslen,
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  173|      0|            sizeof(*cert->conf_sigalgs));
  174|      0|        if (ret->conf_sigalgs == NULL)
  ------------------
  |  Branch (174:13): [True: 0, False: 0]
  ------------------
  175|      0|            goto err;
  176|      0|        memcpy(ret->conf_sigalgs, cert->conf_sigalgs,
  177|      0|            cert->conf_sigalgslen * sizeof(*cert->conf_sigalgs));
  178|      0|        ret->conf_sigalgslen = cert->conf_sigalgslen;
  179|      0|    } else
  180|  1.31k|        ret->conf_sigalgs = NULL;
  181|       |
  182|  1.31k|    if (cert->client_sigalgs) {
  ------------------
  |  Branch (182:9): [True: 0, False: 1.31k]
  ------------------
  183|      0|        ret->client_sigalgs = OPENSSL_malloc_array(cert->client_sigalgslen,
  ------------------
  |  |  110|      0|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  184|      0|            sizeof(*cert->client_sigalgs));
  185|      0|        if (ret->client_sigalgs == NULL)
  ------------------
  |  Branch (185:13): [True: 0, False: 0]
  ------------------
  186|      0|            goto err;
  187|      0|        memcpy(ret->client_sigalgs, cert->client_sigalgs,
  188|      0|            cert->client_sigalgslen * sizeof(*cert->client_sigalgs));
  189|      0|        ret->client_sigalgslen = cert->client_sigalgslen;
  190|      0|    } else
  191|  1.31k|        ret->client_sigalgs = NULL;
  192|       |    /* Copy any custom client certificate types */
  193|  1.31k|    if (cert->ctype) {
  ------------------
  |  Branch (193:9): [True: 0, False: 1.31k]
  ------------------
  194|      0|        ret->ctype = OPENSSL_memdup(cert->ctype, cert->ctype_len);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  195|      0|        if (ret->ctype == NULL)
  ------------------
  |  Branch (195:13): [True: 0, False: 0]
  ------------------
  196|      0|            goto err;
  197|      0|        ret->ctype_len = cert->ctype_len;
  198|      0|    }
  199|       |
  200|  1.31k|    ret->cert_flags = cert->cert_flags;
  201|       |
  202|  1.31k|    ret->cert_cb = cert->cert_cb;
  203|  1.31k|    ret->cert_cb_arg = cert->cert_cb_arg;
  204|       |
  205|  1.31k|    if (cert->verify_store) {
  ------------------
  |  Branch (205:9): [True: 0, False: 1.31k]
  ------------------
  206|      0|        if (!X509_STORE_up_ref(cert->verify_store))
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|            goto err;
  208|      0|        ret->verify_store = cert->verify_store;
  209|      0|    }
  210|       |
  211|  1.31k|    if (cert->chain_store) {
  ------------------
  |  Branch (211:9): [True: 0, False: 1.31k]
  ------------------
  212|      0|        if (!X509_STORE_up_ref(cert->chain_store))
  ------------------
  |  Branch (212:13): [True: 0, False: 0]
  ------------------
  213|      0|            goto err;
  214|      0|        ret->chain_store = cert->chain_store;
  215|      0|    }
  216|       |
  217|  1.31k|    ret->sec_cb = cert->sec_cb;
  218|  1.31k|    ret->sec_level = cert->sec_level;
  219|  1.31k|    ret->sec_ex = cert->sec_ex;
  220|       |
  221|  1.31k|    if (!custom_exts_copy(&ret->custext, &cert->custext))
  ------------------
  |  Branch (221:9): [True: 0, False: 1.31k]
  ------------------
  222|      0|        goto err;
  223|  1.31k|#ifndef OPENSSL_NO_PSK
  224|  1.31k|    if (cert->psk_identity_hint) {
  ------------------
  |  Branch (224:9): [True: 0, False: 1.31k]
  ------------------
  225|      0|        ret->psk_identity_hint = OPENSSL_strdup(cert->psk_identity_hint);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  226|      0|        if (ret->psk_identity_hint == NULL)
  ------------------
  |  Branch (226:13): [True: 0, False: 0]
  ------------------
  227|      0|            goto err;
  228|      0|    }
  229|  1.31k|#endif
  230|  1.31k|    return ret;
  231|       |
  232|      0|err:
  233|      0|    ssl_cert_free(ret);
  234|       |
  235|       |    return NULL;
  236|  1.31k|}
ssl_cert_clear_certs:
  241|  3.40k|{
  242|  3.40k|    size_t i;
  243|       |#ifndef OPENSSL_NO_COMP_ALG
  244|       |    int j;
  245|       |#endif
  246|       |
  247|  3.40k|    if (c == NULL)
  ------------------
  |  Branch (247:9): [True: 0, False: 3.40k]
  ------------------
  248|      0|        return;
  249|  44.2k|    for (i = 0; i < c->ssl_pkey_num; i++) {
  ------------------
  |  Branch (249:17): [True: 40.8k, False: 3.40k]
  ------------------
  250|  40.8k|        CERT_PKEY *cpk = c->pkeys + i;
  251|  40.8k|        X509_free(cpk->x509);
  252|  40.8k|        cpk->x509 = NULL;
  253|  40.8k|        EVP_PKEY_free(cpk->privatekey);
  254|  40.8k|        cpk->privatekey = NULL;
  255|  40.8k|        OSSL_STACK_OF_X509_free(cpk->chain);
  256|  40.8k|        cpk->chain = NULL;
  257|  40.8k|        OPENSSL_free(cpk->serverinfo);
  ------------------
  |  |  131|  40.8k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  258|  40.8k|        cpk->serverinfo = NULL;
  259|  40.8k|        cpk->serverinfo_length = 0;
  260|       |#ifndef OPENSSL_NO_COMP_ALG
  261|       |        for (j = 0; j < TLSEXT_comp_cert_limit; j++) {
  262|       |            OSSL_COMP_CERT_free(cpk->comp_cert[j]);
  263|       |            cpk->comp_cert[j] = NULL;
  264|       |            cpk->cert_comp_used = 0;
  265|       |        }
  266|       |#endif
  267|  40.8k|    }
  268|  3.40k|}
ssl_cert_free:
  271|  3.40k|{
  272|  3.40k|    int i;
  273|       |
  274|  3.40k|    if (c == NULL)
  ------------------
  |  Branch (274:9): [True: 0, False: 3.40k]
  ------------------
  275|      0|        return;
  276|  3.40k|    CRYPTO_DOWN_REF(&c->references, &i);
  277|  3.40k|    REF_PRINT_COUNT("CERT", i, c);
  ------------------
  |  |  301|  3.40k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  3.40k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  3.40k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  3.40k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  278|  3.40k|    if (i > 0)
  ------------------
  |  Branch (278:9): [True: 0, False: 3.40k]
  ------------------
  279|      0|        return;
  280|  3.40k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  3.40k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 3.40k]
  |  |  ------------------
  ------------------
  281|       |
  282|  3.40k|    EVP_PKEY_free(c->dh_tmp);
  283|       |
  284|  3.40k|    ssl_cert_clear_certs(c);
  285|  3.40k|    OPENSSL_free(c->conf_sigalgs);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  286|  3.40k|    OPENSSL_free(c->client_sigalgs);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  287|  3.40k|    OPENSSL_free(c->ctype);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  288|  3.40k|    X509_STORE_free(c->verify_store);
  289|  3.40k|    X509_STORE_free(c->chain_store);
  290|  3.40k|    custom_exts_free(&c->custext);
  291|  3.40k|#ifndef OPENSSL_NO_PSK
  292|  3.40k|    OPENSSL_free(c->psk_identity_hint);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  293|  3.40k|#endif
  294|  3.40k|    OPENSSL_free(c->pkeys);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  295|  3.40k|    CRYPTO_FREE_REF(&c->references);
  296|  3.40k|    OPENSSL_free(c);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  297|  3.40k|}
SSL_get0_CA_list:
  631|  1.23k|{
  632|  1.23k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  1.23k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  1.23k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.23k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.23k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.23k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.23k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.23k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  633|       |
  634|  1.23k|    if (sc == NULL)
  ------------------
  |  Branch (634:9): [True: 0, False: 1.23k]
  ------------------
  635|      0|        return NULL;
  636|       |
  637|  1.23k|    return sc->ca_names != NULL ? sc->ca_names : s->ctx->ca_names;
  ------------------
  |  Branch (637:12): [True: 0, False: 1.23k]
  ------------------
  638|  1.23k|}
ssl_get_security_level_bits:
 1219|   198k|{
 1220|   198k|    int level;
 1221|       |    /*
 1222|       |     * note that there's a corresponding minbits_table
 1223|       |     * in crypto/x509/x509_vfy.c that's used for checking the security level
 1224|       |     * of RSA and DSA keys
 1225|       |     */
 1226|   198k|    static const int minbits_table[5 + 1] = { 0, 80, 112, 128, 192, 256 };
 1227|       |
 1228|   198k|    if (ctx != NULL)
  ------------------
  |  Branch (1228:9): [True: 0, False: 198k]
  ------------------
 1229|      0|        level = SSL_CTX_get_security_level(ctx);
 1230|   198k|    else
 1231|   198k|        level = SSL_get_security_level(s);
 1232|       |
 1233|   198k|    if (level > 5)
  ------------------
  |  Branch (1233:9): [True: 0, False: 198k]
  ------------------
 1234|      0|        level = 5;
 1235|   198k|    else if (level < 0)
  ------------------
  |  Branch (1235:14): [True: 0, False: 198k]
  ------------------
 1236|      0|        level = 0;
 1237|       |
 1238|   198k|    if (levelp != NULL)
  ------------------
  |  Branch (1238:9): [True: 198k, False: 0]
  ------------------
 1239|   198k|        *levelp = level;
 1240|       |
 1241|   198k|    return minbits_table[level];
 1242|   198k|}
ssl_security:
 1315|   198k|{
 1316|   198k|    return s->cert->sec_cb(SSL_CONNECTION_GET_USER_SSL(s), NULL, op, bits, nid,
  ------------------
  |  |   28|   198k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1317|   198k|        other, s->cert->sec_ex);
 1318|   198k|}
ssl_cert_lookup_by_idx:
 1376|   149k|{
 1377|   149k|    if (idx >= (OSSL_NELEM(ssl_cert_info) + ctx->sigalg_list_len))
  ------------------
  |  |   14|   149k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1377:9): [True: 0, False: 149k]
  ------------------
 1378|      0|        return NULL;
 1379|   149k|    else if (idx >= (OSSL_NELEM(ssl_cert_info)))
  ------------------
  |  |   14|   149k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1379:14): [True: 11.0k, False: 138k]
  ------------------
 1380|  11.0k|        return &(ctx->ssl_cert_info[idx - SSL_PKEY_NUM]);
  ------------------
  |  |  328|  11.0k|#define SSL_PKEY_NUM 9
  ------------------
 1381|   138k|    return &ssl_cert_info[idx];
 1382|   149k|}
ssl_cert.c:ssl_x509_store_ctx_init:
   48|      1|{
   49|      1|    ssl_x509_store_ctx_idx = X509_STORE_CTX_get_ex_new_index(0,
  ------------------
  |  |  774|      1|    CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef)
  |  |  ------------------
  |  |  |  |  255|      1|#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
  |  |  ------------------
  ------------------
   50|      1|        "SSL for verify callback",
   51|      1|        NULL, NULL, NULL);
   52|      1|    return ssl_x509_store_ctx_idx >= 0;
   53|      1|}
ssl_cert.c:ssl_security_default_callback:
 1247|   198k|{
 1248|   198k|    int level, minbits, pfs_mask;
 1249|   198k|    const SSL_CONNECTION *sc;
 1250|       |
 1251|   198k|    minbits = ssl_get_security_level_bits(s, ctx, &level);
 1252|       |
 1253|   198k|    if (level == 0) {
  ------------------
  |  Branch (1253:9): [True: 814, False: 198k]
  ------------------
 1254|       |        /*
 1255|       |         * No EDH keys weaker than 1024-bits even at level 0, otherwise,
 1256|       |         * anything goes.
 1257|       |         */
 1258|    814|        if (op == SSL_SECOP_TMP_DH && bits < 80)
  ------------------
  |  | 2764|  1.62k|#define SSL_SECOP_TMP_DH (7 | SSL_SECOP_OTHER_PKEY)
  |  |  ------------------
  |  |  |  | 2741|    814|#define SSL_SECOP_OTHER_PKEY (4 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1258:13): [True: 0, False: 814]
  |  Branch (1258:39): [True: 0, False: 0]
  ------------------
 1259|      0|            return 0;
 1260|    814|        return 1;
 1261|    814|    }
 1262|   198k|    switch (op) {
 1263|   110k|    case SSL_SECOP_CIPHER_SUPPORTED:
  ------------------
  |  | 2752|   110k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   110k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1263:5): [True: 110k, False: 87.4k]
  ------------------
 1264|   110k|    case SSL_SECOP_CIPHER_SHARED:
  ------------------
  |  | 2754|   110k|#define SSL_SECOP_CIPHER_SHARED (2 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   110k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1264:5): [True: 0, False: 198k]
  ------------------
 1265|   110k|    case SSL_SECOP_CIPHER_CHECK: {
  ------------------
  |  | 2756|   110k|#define SSL_SECOP_CIPHER_CHECK (3 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   110k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (1265:5): [True: 0, False: 198k]
  ------------------
 1266|   110k|        const SSL_CIPHER *c = other;
 1267|       |        /* No ciphers below security level */
 1268|   110k|        if (bits < minbits)
  ------------------
  |  Branch (1268:13): [True: 2.24k, False: 108k]
  ------------------
 1269|  2.24k|            return 0;
 1270|       |        /* No unauthenticated ciphersuites */
 1271|   108k|        if (c->algorithm_auth & SSL_aNULL)
  ------------------
  |  |  112|   108k|#define SSL_aNULL 0x00000004U
  ------------------
  |  Branch (1271:13): [True: 2.35k, False: 106k]
  ------------------
 1272|  2.35k|            return 0;
 1273|       |        /* No MD5 mac ciphersuites */
 1274|   106k|        if (c->algorithm_mac & SSL_MD5)
  ------------------
  |  |  168|   106k|#define SSL_MD5 0x00000001U
  ------------------
  |  Branch (1274:13): [True: 0, False: 106k]
  ------------------
 1275|      0|            return 0;
 1276|       |        /* SHA1 HMAC is 160 bits of security */
 1277|   106k|        if (minbits > 160 && c->algorithm_mac & SSL_SHA1)
  ------------------
  |  |  169|    508|#define SSL_SHA1 0x00000002U
  ------------------
  |  Branch (1277:13): [True: 508, False: 105k]
  |  Branch (1277:30): [True: 156, False: 352]
  ------------------
 1278|    156|            return 0;
 1279|       |        /* Level 3: forward secure ciphersuites only */
 1280|   105k|        pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   83|   105k|#define SSL_kDHE 0x00000002U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   85|   105k|#define SSL_kECDHE 0x00000004U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   95|   105k|#define SSL_kDHEPSK 0x00000100U
  ------------------
                      pfs_mask = SSL_kDHE | SSL_kECDHE | SSL_kDHEPSK | SSL_kECDHEPSK;
  ------------------
  |  |   94|   105k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
 1281|   105k|        if (level >= 3 && c->min_tls != TLS1_3_VERSION && !(c->algorithm_mkey & pfs_mask))
  ------------------
  |  |   27|   106k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1281:13): [True: 724, False: 105k]
  |  Branch (1281:27): [True: 613, False: 111]
  |  Branch (1281:59): [True: 125, False: 488]
  ------------------
 1282|    125|            return 0;
 1283|   105k|        break;
 1284|   105k|    }
 1285|   105k|    case SSL_SECOP_VERSION:
  ------------------
  |  | 2766|  26.5k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  26.5k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1285:5): [True: 26.5k, False: 171k]
  ------------------
 1286|  26.5k|        if ((sc = SSL_CONNECTION_FROM_CONST_SSL(s)) == NULL)
  ------------------
  |  |   41|  26.5k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  26.5k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 26.5k]
  |  |  |  |  ------------------
  |  |  |  |   33|  26.5k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  26.5k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 26.5k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  26.5k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  26.5k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  |  Branch (1286:13): [True: 0, False: 26.5k]
  ------------------
 1287|      0|            return 0;
 1288|  26.5k|        if (!SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  258|  26.5k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  26.5k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  26.5k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (1288:13): [True: 26.5k, False: 0]
  ------------------
 1289|       |            /* SSLv3, TLS v1.0 and TLS v1.1 only allowed at level 0 */
 1290|  26.5k|            if (nid <= TLS1_1_VERSION && level > 0)
  ------------------
  |  |   25|  53.1k|#define TLS1_1_VERSION 0x0302
  ------------------
  |  Branch (1290:17): [True: 2.63k, False: 23.9k]
  |  Branch (1290:42): [True: 2.63k, False: 0]
  ------------------
 1291|  2.63k|                return 0;
 1292|  26.5k|        } else {
 1293|       |            /* DTLS v1.0 only allowed at level 0 */
 1294|      0|            if (DTLS_VERSION_LT(nid, DTLS1_2_VERSION) && level > 0)
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1294:58): [True: 0, False: 0]
  ------------------
 1295|      0|                return 0;
 1296|      0|        }
 1297|  23.9k|        break;
 1298|       |
 1299|  23.9k|    case SSL_SECOP_COMPRESSION:
  ------------------
  |  | 2778|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1299:5): [True: 0, False: 198k]
  ------------------
 1300|      0|        if (level >= 2)
  ------------------
  |  Branch (1300:13): [True: 0, False: 0]
  ------------------
 1301|      0|            return 0;
 1302|      0|        break;
 1303|      0|    case SSL_SECOP_TICKET:
  ------------------
  |  | 2768|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1303:5): [True: 0, False: 198k]
  ------------------
 1304|      0|        if (level >= 3)
  ------------------
  |  Branch (1304:13): [True: 0, False: 0]
  ------------------
 1305|      0|            return 0;
 1306|      0|        break;
 1307|  60.8k|    default:
  ------------------
  |  Branch (1307:5): [True: 60.8k, False: 137k]
  ------------------
 1308|  60.8k|        if (bits < minbits)
  ------------------
  |  Branch (1308:13): [True: 4.07k, False: 56.8k]
  ------------------
 1309|  4.07k|            return 0;
 1310|   198k|    }
 1311|   186k|    return 1;
 1312|   198k|}

ssl_load_ciphers:
  327|  2.09k|{
  328|  2.09k|    size_t i;
  329|  2.09k|    const ssl_cipher_table *t;
  330|  2.09k|    EVP_KEYEXCH *kex = NULL;
  331|  2.09k|    EVP_SIGNATURE *sig = NULL;
  332|       |
  333|  2.09k|    ctx->disabled_enc_mask = 0;
  334|  52.3k|    for (i = 0, t = ssl_cipher_table_cipher; i < SSL_ENC_NUM_IDX; i++, t++) {
  ------------------
  |  |  354|  52.3k|#define SSL_ENC_NUM_IDX 24
  ------------------
  |  Branch (334:46): [True: 50.2k, False: 2.09k]
  ------------------
  335|  50.2k|        if (t->nid != NID_undef) {
  ------------------
  |  |   18|  50.2k|#define NID_undef                       0
  ------------------
  |  Branch (335:13): [True: 48.1k, False: 2.09k]
  ------------------
  336|  48.1k|            const EVP_CIPHER *cipher
  337|  48.1k|                = ssl_evp_cipher_fetch(ctx->libctx, t->nid, ctx->propq);
  338|       |
  339|  48.1k|            ctx->ssl_cipher_methods[i] = cipher;
  340|  48.1k|            if (cipher == NULL)
  ------------------
  |  Branch (340:17): [True: 19.2k, False: 28.9k]
  ------------------
  341|  19.2k|                ctx->disabled_enc_mask |= t->mask;
  342|  48.1k|        }
  343|  50.2k|    }
  344|  2.09k|    ctx->disabled_mac_mask = 0;
  345|  31.3k|    for (i = 0, t = ssl_cipher_table_mac; i < SSL_MD_NUM_IDX; i++, t++) {
  ------------------
  |  |  203|  31.3k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  31.3k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (345:43): [True: 29.3k, False: 2.09k]
  ------------------
  346|  29.3k|        const EVP_MD *md
  347|  29.3k|            = ssl_evp_md_fetch(ctx->libctx, t->nid, ctx->propq);
  348|       |
  349|  29.3k|        ctx->ssl_digest_methods[i] = md;
  350|  29.3k|        if (md == NULL) {
  ------------------
  |  Branch (350:13): [True: 14.8k, False: 14.4k]
  ------------------
  351|  14.8k|            ctx->disabled_mac_mask |= t->mask;
  352|  14.8k|        } else {
  353|  14.4k|            int tmpsize = EVP_MD_get_size(md);
  354|       |
  355|  14.4k|            if (!ossl_assert(tmpsize > 0))
  ------------------
  |  |   52|  14.4k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  14.4k|    __FILE__, __LINE__)
  ------------------
  |  Branch (355:17): [True: 0, False: 14.4k]
  ------------------
  356|      0|                return 0;
  357|  14.4k|            ctx->ssl_mac_secret_size[i] = tmpsize;
  358|  14.4k|        }
  359|  29.3k|    }
  360|       |
  361|  2.09k|    ctx->disabled_mkey_mask = 0;
  362|  2.09k|    ctx->disabled_auth_mask = 0;
  363|       |
  364|       |    /*
  365|       |     * We ignore any errors from the fetches below. They are expected to fail
  366|       |     * if these algorithms are not available.
  367|       |     */
  368|  2.09k|    ERR_set_mark();
  369|  2.09k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "DSA", ctx->propq);
  370|  2.09k|    if (sig == NULL)
  ------------------
  |  Branch (370:9): [True: 28, False: 2.06k]
  ------------------
  371|     28|        ctx->disabled_auth_mask |= SSL_aDSS;
  ------------------
  |  |  110|     28|#define SSL_aDSS 0x00000002U
  ------------------
  372|  2.06k|    else
  373|  2.06k|        EVP_SIGNATURE_free(sig);
  374|  2.09k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "DH", ctx->propq);
  375|  2.09k|    if (kex == NULL)
  ------------------
  |  Branch (375:9): [True: 28, False: 2.06k]
  ------------------
  376|     28|        ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   83|     28|#define SSL_kDHE 0x00000002U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kDHE | SSL_kDHEPSK;
  ------------------
  |  |   95|     28|#define SSL_kDHEPSK 0x00000100U
  ------------------
  377|  2.06k|    else
  378|  2.06k|        EVP_KEYEXCH_free(kex);
  379|  2.09k|    kex = EVP_KEYEXCH_fetch(ctx->libctx, "ECDH", ctx->propq);
  380|  2.09k|    if (kex == NULL)
  ------------------
  |  Branch (380:9): [True: 28, False: 2.06k]
  ------------------
  381|     28|        ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   85|     28|#define SSL_kECDHE 0x00000004U
  ------------------
                      ctx->disabled_mkey_mask |= SSL_kECDHE | SSL_kECDHEPSK;
  ------------------
  |  |   94|     28|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  382|  2.06k|    else
  383|  2.06k|        EVP_KEYEXCH_free(kex);
  384|  2.09k|    sig = EVP_SIGNATURE_fetch(ctx->libctx, "ECDSA", ctx->propq);
  385|  2.09k|    if (sig == NULL)
  ------------------
  |  Branch (385:9): [True: 28, False: 2.06k]
  ------------------
  386|     28|        ctx->disabled_auth_mask |= SSL_aECDSA;
  ------------------
  |  |  114|     28|#define SSL_aECDSA 0x00000008U
  ------------------
  387|  2.06k|    else
  388|  2.06k|        EVP_SIGNATURE_free(sig);
  389|  2.09k|    ERR_pop_to_mark();
  390|       |
  391|       |#ifdef OPENSSL_NO_PSK
  392|       |    ctx->disabled_mkey_mask |= SSL_PSK;
  393|       |    ctx->disabled_auth_mask |= SSL_aPSK;
  394|       |#endif
  395|       |#ifdef OPENSSL_NO_SRP
  396|       |    ctx->disabled_mkey_mask |= SSL_kSRP;
  397|       |#endif
  398|       |
  399|       |    /*
  400|       |     * Check for presence of GOST 34.10 algorithms, and if they are not
  401|       |     * present, disable appropriate auth and key exchange
  402|       |     */
  403|  2.09k|    memcpy(ctx->ssl_mac_pkey_id, default_mac_pkey_id,
  404|  2.09k|        sizeof(ctx->ssl_mac_pkey_id));
  405|       |
  406|  2.09k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = get_optional_pkey_id(SN_id_Gost28147_89_MAC);
  ------------------
  |  |  190|  2.09k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX] = get_optional_pkey_id(SN_id_Gost28147_89_MAC);
  ------------------
  |  | 4607|  2.09k|#define SN_id_Gost28147_89_MAC          "gost-mac"
  ------------------
  407|  2.09k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC_IDX])
  ------------------
  |  |  190|  2.09k|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  |  Branch (407:9): [True: 0, False: 2.09k]
  ------------------
  408|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC_IDX] = 32;
  ------------------
  |  |  190|      0|#define SSL_MD_GOST89MAC_IDX 3
  ------------------
  409|  2.09k|    else
  410|  2.09k|        ctx->disabled_mac_mask |= SSL_GOST89MAC;
  ------------------
  |  |  171|  2.09k|#define SSL_GOST89MAC 0x00000008U
  ------------------
  411|       |
  412|  2.09k|    ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = get_optional_pkey_id(SN_gost_mac_12);
  ------------------
  |  |  194|  2.09k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX] = get_optional_pkey_id(SN_gost_mac_12);
  ------------------
  |  | 4612|  2.09k|#define SN_gost_mac_12          "gost-mac-12"
  ------------------
  413|  2.09k|    if (ctx->ssl_mac_pkey_id[SSL_MD_GOST89MAC12_IDX])
  ------------------
  |  |  194|  2.09k|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  |  Branch (413:9): [True: 0, False: 2.09k]
  ------------------
  414|      0|        ctx->ssl_mac_secret_size[SSL_MD_GOST89MAC12_IDX] = 32;
  ------------------
  |  |  194|      0|#define SSL_MD_GOST89MAC12_IDX 7
  ------------------
  415|  2.09k|    else
  416|  2.09k|        ctx->disabled_mac_mask |= SSL_GOST89MAC12;
  ------------------
  |  |  177|  2.09k|#define SSL_GOST89MAC12 0x00000100U
  ------------------
  417|       |
  418|  2.09k|    ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = get_optional_pkey_id(SN_magma_mac);
  ------------------
  |  |  199|  2.09k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX] = get_optional_pkey_id(SN_magma_mac);
  ------------------
  |  | 5071|  2.09k|#define SN_magma_mac            "magma-mac"
  ------------------
  419|  2.09k|    if (ctx->ssl_mac_pkey_id[SSL_MD_MAGMAOMAC_IDX])
  ------------------
  |  |  199|  2.09k|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  |  Branch (419:9): [True: 0, False: 2.09k]
  ------------------
  420|      0|        ctx->ssl_mac_secret_size[SSL_MD_MAGMAOMAC_IDX] = 32;
  ------------------
  |  |  199|      0|#define SSL_MD_MAGMAOMAC_IDX 12
  ------------------
  421|  2.09k|    else
  422|  2.09k|        ctx->disabled_mac_mask |= SSL_MAGMAOMAC;
  ------------------
  |  |  179|  2.09k|#define SSL_MAGMAOMAC 0x00000400U
  ------------------
  423|       |
  424|  2.09k|    ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = get_optional_pkey_id(SN_kuznyechik_mac);
  ------------------
  |  |  200|  2.09k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
                  ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX] = get_optional_pkey_id(SN_kuznyechik_mac);
  ------------------
  |  | 5053|  2.09k|#define SN_kuznyechik_mac               "kuznyechik-mac"
  ------------------
  425|  2.09k|    if (ctx->ssl_mac_pkey_id[SSL_MD_KUZNYECHIKOMAC_IDX])
  ------------------
  |  |  200|  2.09k|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  |  Branch (425:9): [True: 0, False: 2.09k]
  ------------------
  426|      0|        ctx->ssl_mac_secret_size[SSL_MD_KUZNYECHIKOMAC_IDX] = 32;
  ------------------
  |  |  200|      0|#define SSL_MD_KUZNYECHIKOMAC_IDX 13
  ------------------
  427|  2.09k|    else
  428|  2.09k|        ctx->disabled_mac_mask |= SSL_KUZNYECHIKOMAC;
  ------------------
  |  |  180|  2.09k|#define SSL_KUZNYECHIKOMAC 0x00000800U
  ------------------
  429|       |
  430|  2.09k|    if (!get_optional_pkey_id(SN_id_GostR3410_2001))
  ------------------
  |  | 4577|  2.09k|#define SN_id_GostR3410_2001            "gost2001"
  ------------------
  |  Branch (430:9): [True: 2.09k, False: 0]
  ------------------
  431|  2.09k|        ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  118|  2.09k|#define SSL_aGOST01 0x00000020U
  ------------------
                      ctx->disabled_auth_mask |= SSL_aGOST01 | SSL_aGOST12;
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
  432|  2.09k|    if (!get_optional_pkey_id(SN_id_GostR3410_2012_256))
  ------------------
  |  | 4788|  2.09k|#define SN_id_GostR3410_2012_256                "gost2012_256"
  ------------------
  |  Branch (432:9): [True: 2.09k, False: 0]
  ------------------
  433|  2.09k|        ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
  434|  2.09k|    if (!get_optional_pkey_id(SN_id_GostR3410_2012_512))
  ------------------
  |  | 4793|  2.09k|#define SN_id_GostR3410_2012_512                "gost2012_512"
  ------------------
  |  Branch (434:9): [True: 2.09k, False: 0]
  ------------------
  435|  2.09k|        ctx->disabled_auth_mask |= SSL_aGOST12;
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
  436|       |    /*
  437|       |     * Disable GOST key exchange if no GOST signature algs are available *
  438|       |     */
  439|  2.09k|    if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  118|  2.09k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  118|  2.09k|#define SSL_aGOST01 0x00000020U
  ------------------
                  if ((ctx->disabled_auth_mask & (SSL_aGOST01 | SSL_aGOST12)) == (SSL_aGOST01 | SSL_aGOST12))
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (439:9): [True: 2.09k, False: 0]
  ------------------
  440|  2.09k|        ctx->disabled_mkey_mask |= SSL_kGOST;
  ------------------
  |  |   89|  2.09k|#define SSL_kGOST 0x00000010U
  ------------------
  441|       |
  442|  2.09k|    if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
                  if ((ctx->disabled_auth_mask & SSL_aGOST12) == SSL_aGOST12)
  ------------------
  |  |  122|  2.09k|#define SSL_aGOST12 0x00000080U
  ------------------
  |  Branch (442:9): [True: 2.09k, False: 0]
  ------------------
  443|  2.09k|        ctx->disabled_mkey_mask |= SSL_kGOST18;
  ------------------
  |  |   97|  2.09k|#define SSL_kGOST18 0x00000200U
  ------------------
  444|       |
  445|  2.09k|    return 1;
  446|  2.09k|}
ssl_md:
  595|  40.3k|{
  596|  40.3k|    idx &= SSL_HANDSHAKE_MAC_MASK;
  ------------------
  |  |  208|  40.3k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
  597|  40.3k|    if (idx < 0 || idx >= SSL_MD_NUM_IDX)
  ------------------
  |  |  203|  40.3k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  40.3k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (597:9): [True: 0, False: 40.3k]
  |  Branch (597:20): [True: 0, False: 40.3k]
  ------------------
  598|      0|        return NULL;
  599|  40.3k|    return ctx->ssl_digest_methods[idx];
  600|  40.3k|}
SSL_CTX_set_ciphersuites:
 1386|  2.25k|{
 1387|  2.25k|    int ret = set_ciphersuites(&(ctx->tls13_ciphersuites), str);
 1388|       |
 1389|  2.25k|    if (ret && ctx->cipher_list != NULL)
  ------------------
  |  Branch (1389:9): [True: 2.16k, False: 93]
  |  Branch (1389:16): [True: 68, False: 2.09k]
  ------------------
 1390|     68|        return update_cipher_list(ctx, &ctx->cipher_list, &ctx->cipher_list_by_id,
 1391|     68|            ctx->tls13_ciphersuites);
 1392|       |
 1393|  2.18k|    return ret;
 1394|  2.25k|}
ssl_create_cipher_list:
 1425|  2.93k|{
 1426|  2.93k|    int ok, num_of_ciphers, num_of_alias_max, num_of_group_aliases, i;
 1427|  2.93k|    uint32_t disabled_mkey, disabled_auth, disabled_enc, disabled_mac;
 1428|  2.93k|    STACK_OF(SSL_CIPHER) *cipherstack;
  ------------------
  |  |   33|  2.93k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1429|  2.93k|    const char *rule_p;
 1430|  2.93k|    CIPHER_ORDER *co_list = NULL, *head = NULL, *tail = NULL, *curr;
 1431|  2.93k|    const SSL_CIPHER **ca_list = NULL;
 1432|  2.93k|    const SSL_METHOD *ssl_method = ctx->method;
 1433|       |
 1434|       |    /*
 1435|       |     * Return with error if nothing to do.
 1436|       |     */
 1437|  2.93k|    if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
  ------------------
  |  Branch (1437:9): [True: 0, False: 2.93k]
  |  Branch (1437:29): [True: 0, False: 2.93k]
  |  Branch (1437:52): [True: 0, False: 2.93k]
  ------------------
 1438|      0|        return NULL;
 1439|       |
 1440|  2.93k|    if (!check_suiteb_cipher_list(ssl_method, c, &rule_str))
  ------------------
  |  Branch (1440:9): [True: 0, False: 2.93k]
  ------------------
 1441|      0|        return NULL;
 1442|       |
 1443|       |    /*
 1444|       |     * To reduce the work to do we only want to process the compiled
 1445|       |     * in algorithms, so we first get the mask of disabled ciphers.
 1446|       |     */
 1447|       |
 1448|  2.93k|    disabled_mkey = ctx->disabled_mkey_mask;
 1449|  2.93k|    disabled_auth = ctx->disabled_auth_mask;
 1450|  2.93k|    disabled_enc = ctx->disabled_enc_mask;
 1451|  2.93k|    disabled_mac = ctx->disabled_mac_mask;
 1452|       |
 1453|       |    /*
 1454|       |     * Now we have to collect the available ciphers from the compiled
 1455|       |     * in ciphers. We cannot get more than the number compiled in, so
 1456|       |     * it is used for allocation.
 1457|       |     */
 1458|  2.93k|    num_of_ciphers = ssl_method->num_ciphers();
 1459|       |
 1460|  2.93k|    if (num_of_ciphers > 0) {
  ------------------
  |  Branch (1460:9): [True: 2.93k, False: 0]
  ------------------
 1461|  2.93k|        co_list = OPENSSL_malloc_array(num_of_ciphers, sizeof(*co_list));
  ------------------
  |  |  110|  2.93k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1462|  2.93k|        if (co_list == NULL)
  ------------------
  |  Branch (1462:13): [True: 0, False: 2.93k]
  ------------------
 1463|      0|            return NULL; /* Failure */
 1464|  2.93k|    }
 1465|       |
 1466|  2.93k|    ssl_cipher_collect_ciphers(ssl_method, num_of_ciphers,
 1467|  2.93k|        disabled_mkey, disabled_auth, disabled_enc,
 1468|  2.93k|        disabled_mac, co_list, &head, &tail);
 1469|       |
 1470|       |    /* Now arrange all ciphers by preference. */
 1471|       |
 1472|       |    /*
 1473|       |     * Everything else being equal, prefer ephemeral ECDH over other key
 1474|       |     * exchange mechanisms.
 1475|       |     * For consistency, prefer ECDSA over RSA (though this only matters if the
 1476|       |     * server has both certificates, and is using the DEFAULT, or a client
 1477|       |     * preference).
 1478|       |     */
 1479|  2.93k|    ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |   85|  2.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  114|  2.93k|#define SSL_aECDSA 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, SSL_aECDSA, 0, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  144|  2.93k|#define CIPHER_ADD 1
  ------------------
 1480|  2.93k|        -1, &head, &tail);
 1481|  2.93k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |   85|  2.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head,
  ------------------
  |  |  144|  2.93k|#define CIPHER_ADD 1
  ------------------
 1482|  2.93k|        &tail);
 1483|  2.93k|    ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |   85|  2.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kECDHE, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head,
  ------------------
  |  |  146|  2.93k|#define CIPHER_DEL 3
  ------------------
 1484|  2.93k|        &tail);
 1485|       |
 1486|       |    /* Within each strength group, we prefer GCM over CHACHA... */
 1487|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  155|  2.93k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  142|  2.93k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  143|  2.93k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AESGCM, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  144|  2.93k|#define CIPHER_ADD 1
  ------------------
 1488|  2.93k|        &head, &tail);
 1489|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  159|  2.93k|#define SSL_CHACHA20 (SSL_CHACHA20POLY1305)
  |  |  ------------------
  |  |  |  |  149|  2.93k|#define SSL_CHACHA20POLY1305 0x00080000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_CHACHA20, 0, 0, 0, CIPHER_ADD, -1,
  ------------------
  |  |  144|  2.93k|#define CIPHER_ADD 1
  ------------------
 1490|  2.93k|        &head, &tail);
 1491|       |
 1492|       |    /*
 1493|       |     * ...and generally, our preferred cipher is AES.
 1494|       |     * Note that AEADs will be bumped to take preference after sorting by
 1495|       |     * strength.
 1496|       |     */
 1497|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  157|  2.93k|#define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  136|  2.93k|#define SSL_AES128 0x00000040U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  137|  2.93k|#define SSL_AES256 0x00000080U
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  155|  2.93k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  142|  2.93k|#define SSL_AES128GCM 0x00001000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  |  |  ------------------
  |  |  |  |  |  |  143|  2.93k|#define SSL_AES256GCM 0x00002000U
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SSL_AES (SSL_AES128 | SSL_AES256 | SSL_AESGCM | SSL_AESCCM)
  |  |  ------------------
  |  |  |  |  156|  2.93k|#define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  144|  2.93k|#define SSL_AES128CCM 0x00004000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  145|  2.93k|#define SSL_AES256CCM 0x00008000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  146|  2.93k|#define SSL_AES128CCM8 0x00010000U
  |  |  |  |  ------------------
  |  |  |  |               #define SSL_AESCCM (SSL_AES128CCM | SSL_AES256CCM | SSL_AES128CCM8 | SSL_AES256CCM8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  2.93k|#define SSL_AES256CCM8 0x00020000U
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  155|  2.93k|#define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  142|  2.93k|#define SSL_AES128GCM 0x00001000U
  |  |  ------------------
  |  |               #define SSL_AESGCM (SSL_AES128GCM | SSL_AES256GCM)
  |  |  ------------------
  |  |  |  |  143|  2.93k|#define SSL_AES256GCM 0x00002000U
  |  |  ------------------
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_AES ^ SSL_AESGCM, 0, 0, 0, CIPHER_ADD,
  ------------------
  |  |  144|  2.93k|#define CIPHER_ADD 1
  ------------------
 1498|  2.93k|        -1, &head, &tail);
 1499|       |
 1500|       |    /* Temporarily enable everything else for sorting */
 1501|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ADD, -1, &head, &tail);
  ------------------
  |  |  144|  2.93k|#define CIPHER_ADD 1
  ------------------
 1502|       |
 1503|       |    /* Low priority for MD5 */
 1504|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  168|  2.93k|#define SSL_MD5 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_MD5, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  2.93k|#define CIPHER_ORD 4
  ------------------
 1505|  2.93k|        &tail);
 1506|       |
 1507|       |    /*
 1508|       |     * Move anonymous ciphers to the end.  Usually, these will remain
 1509|       |     * disabled. (For applications that allow them, they aren't too bad, but
 1510|       |     * we prefer authenticated ciphers.)
 1511|       |     */
 1512|  2.93k|    ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  112|  2.93k|#define SSL_aNULL 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, SSL_aNULL, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  2.93k|#define CIPHER_ORD 4
  ------------------
 1513|  2.93k|        &tail);
 1514|       |
 1515|  2.93k|    ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   81|  2.93k|#define SSL_kRSA 0x00000001U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kRSA, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  2.93k|#define CIPHER_ORD 4
  ------------------
 1516|  2.93k|        &tail);
 1517|  2.93k|    ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |   87|  2.93k|#define SSL_kPSK 0x00000008U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kPSK, 0, 0, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  2.93k|#define CIPHER_ORD 4
  ------------------
 1518|  2.93k|        &tail);
 1519|       |
 1520|       |    /* RC4 is sort-of broken -- move to the end */
 1521|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  132|  2.93k|#define SSL_RC4 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, SSL_RC4, 0, 0, 0, CIPHER_ORD, -1, &head,
  ------------------
  |  |  147|  2.93k|#define CIPHER_ORD 4
  ------------------
 1522|  2.93k|        &tail);
 1523|       |
 1524|       |    /*
 1525|       |     * Now sort by symmetric encryption strength.  The above ordering remains
 1526|       |     * in force within each class
 1527|       |     */
 1528|  2.93k|    if (!ssl_cipher_strength_sort(&head, &tail)) {
  ------------------
  |  Branch (1528:9): [True: 0, False: 2.93k]
  ------------------
 1529|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1530|      0|        return NULL;
 1531|      0|    }
 1532|       |
 1533|       |    /*
 1534|       |     * Partially overrule strength sort to prefer TLS 1.2 ciphers/PRFs.
 1535|       |     */
 1536|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |   26|  2.93k|#define TLS1_2_VERSION 0x0303
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, 0, TLS1_2_VERSION, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  153|  2.93k|#define CIPHER_BUMP 6
  ------------------
 1537|  2.93k|        &head, &tail);
 1538|       |
 1539|       |    /*
 1540|       |     * Irrespective of strength, enforce the following order:
 1541|       |     * (EC)DHE + AEAD > (EC)DHE > rest of AEAD > rest.
 1542|       |     * Within each group, ciphers remain sorted by strength and previous
 1543|       |     * preference, i.e.,
 1544|       |     * 1) ECDHE > DHE
 1545|       |     * 2) GCM > CHACHA
 1546|       |     * 3) AES > rest
 1547|       |     * 4) TLS 1.2 > legacy
 1548|       |     *
 1549|       |     * Because we now bump ciphers to the top of the list, we proceed in
 1550|       |     * reverse order of preference.
 1551|       |     */
 1552|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  175|  2.93k|#define SSL_AEAD 0x00000040U
  ------------------
                  ssl_cipher_apply_rule(0, 0, 0, 0, SSL_AEAD, 0, 0, CIPHER_BUMP, -1,
  ------------------
  |  |  153|  2.93k|#define CIPHER_BUMP 6
  ------------------
 1553|  2.93k|        &head, &tail);
 1554|  2.93k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   83|  2.93k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, 0, 0, 0,
  ------------------
  |  |   85|  2.93k|#define SSL_kECDHE 0x00000004U
  ------------------
 1555|  2.93k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  153|  2.93k|#define CIPHER_BUMP 6
  ------------------
 1556|  2.93k|    ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   83|  2.93k|#define SSL_kDHE 0x00000002U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |   85|  2.93k|#define SSL_kECDHE 0x00000004U
  ------------------
                  ssl_cipher_apply_rule(0, SSL_kDHE | SSL_kECDHE, 0, 0, SSL_AEAD, 0, 0,
  ------------------
  |  |  175|  2.93k|#define SSL_AEAD 0x00000040U
  ------------------
 1557|  2.93k|        CIPHER_BUMP, -1, &head, &tail);
  ------------------
  |  |  153|  2.93k|#define CIPHER_BUMP 6
  ------------------
 1558|       |
 1559|       |    /* Now disable everything (maintaining the ordering!) */
 1560|  2.93k|    ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_DEL, -1, &head, &tail);
  ------------------
  |  |  146|  2.93k|#define CIPHER_DEL 3
  ------------------
 1561|       |
 1562|       |    /*
 1563|       |     * We also need cipher aliases for selecting based on the rule_str.
 1564|       |     * There might be two types of entries in the rule_str: 1) names
 1565|       |     * of ciphers themselves 2) aliases for groups of ciphers.
 1566|       |     * For 1) we need the available ciphers and for 2) the cipher
 1567|       |     * groups of cipher_aliases added together in one list (otherwise
 1568|       |     * we would be happy with just the cipher_aliases table).
 1569|       |     */
 1570|  2.93k|    num_of_group_aliases = OSSL_NELEM(cipher_aliases);
  ------------------
  |  |   14|  2.93k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 1571|  2.93k|    num_of_alias_max = num_of_ciphers + num_of_group_aliases + 1;
 1572|  2.93k|    ca_list = OPENSSL_malloc_array(num_of_alias_max, sizeof(*ca_list));
  ------------------
  |  |  110|  2.93k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1573|  2.93k|    if (ca_list == NULL) {
  ------------------
  |  Branch (1573:9): [True: 0, False: 2.93k]
  ------------------
 1574|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1575|      0|        return NULL; /* Failure */
 1576|      0|    }
 1577|  2.93k|    ssl_cipher_collect_aliases(ca_list, num_of_group_aliases,
 1578|  2.93k|        disabled_mkey, disabled_auth, disabled_enc,
 1579|  2.93k|        disabled_mac, head);
 1580|       |
 1581|       |    /*
 1582|       |     * If the rule_string begins with DEFAULT, apply the default rule
 1583|       |     * before using the (possibly available) additional rules.
 1584|       |     */
 1585|  2.93k|    ok = 1;
 1586|  2.93k|    rule_p = rule_str;
 1587|  2.93k|    if (HAS_PREFIX(rule_str, "DEFAULT")) {
  ------------------
  |  |   58|  2.93k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 40, False: 2.89k]
  |  |  ------------------
  ------------------
 1588|     40|        ok = ssl_cipher_process_rulestr(OSSL_default_cipher_list(),
 1589|     40|            &head, &tail, ca_list, c);
 1590|     40|        rule_p += 7;
 1591|     40|        if (*rule_p == ':')
  ------------------
  |  Branch (1591:13): [True: 5, False: 35]
  ------------------
 1592|      5|            rule_p++;
 1593|     40|    }
 1594|       |
 1595|  2.93k|    if (ok && (rule_p[0] != '\0'))
  ------------------
  |  Branch (1595:9): [True: 2.93k, False: 0]
  |  Branch (1595:15): [True: 2.93k, False: 2]
  ------------------
 1596|  2.93k|        ok = ssl_cipher_process_rulestr(rule_p, &head, &tail, ca_list, c);
 1597|       |
 1598|  2.93k|    OPENSSL_free(ca_list); /* Not needed anymore */
  ------------------
  |  |  131|  2.93k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1599|       |
 1600|  2.93k|    if (!ok) { /* Rule processing failure */
  ------------------
  |  Branch (1600:9): [True: 335, False: 2.59k]
  ------------------
 1601|    335|        OPENSSL_free(co_list);
  ------------------
  |  |  131|    335|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1602|    335|        return NULL;
 1603|    335|    }
 1604|       |
 1605|       |    /*
 1606|       |     * Allocate new "cipherstack" for the result, return with error
 1607|       |     * if we cannot get one.
 1608|       |     */
 1609|  2.59k|    if ((cipherstack = sk_SSL_CIPHER_new_null()) == NULL) {
  ------------------
  |  | 1008|  2.59k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (1609:9): [True: 0, False: 2.59k]
  ------------------
 1610|      0|        OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1611|      0|        return NULL;
 1612|      0|    }
 1613|       |
 1614|       |    /* Add TLSv1.3 ciphers first - we always prefer those if possible */
 1615|  10.3k|    for (i = 0; i < sk_SSL_CIPHER_num(tls13_ciphersuites); i++) {
  ------------------
  |  | 1005|  10.3k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1615:17): [True: 7.79k, False: 2.59k]
  ------------------
 1616|  7.79k|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1006|  7.79k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1617|       |
 1618|       |        /* Don't include any TLSv1.3 ciphers that are disabled */
 1619|  7.79k|        if ((sslc->algorithm_enc & disabled_enc) != 0
  ------------------
  |  Branch (1619:13): [True: 84, False: 7.70k]
  ------------------
 1620|  7.70k|            || (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1620:16): [True: 0, False: 7.70k]
  ------------------
 1621|  7.70k|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  208|  7.70k|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1622|  7.70k|                       .mask
 1623|  7.70k|                   & ctx->disabled_mac_mask)
 1624|  7.70k|                != 0) {
 1625|     84|            sk_SSL_CIPHER_delete(tls13_ciphersuites, i);
  ------------------
  |  | 1013|     84|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1626|     84|            i--;
 1627|     84|            continue;
 1628|     84|        }
 1629|       |
 1630|  7.70k|        if (!sk_SSL_CIPHER_push(cipherstack, sslc)) {
  ------------------
  |  | 1015|  7.70k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1630:13): [True: 0, False: 7.70k]
  ------------------
 1631|      0|            OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1632|      0|            sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1633|      0|            return NULL;
 1634|      0|        }
 1635|  7.70k|    }
 1636|       |
 1637|  2.59k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  221|  2.59k|    do {                           \
  |  |  222|  2.59k|        BIO *trc_out = NULL;       \
  |  |  223|  2.59k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 2.59k]
  |  |  ------------------
  ------------------
 1638|      0|    {
 1639|      0|        BIO_printf(trc_out, "cipher selection:\n");
 1640|      0|    }
 1641|       |    /*
 1642|       |     * The cipher selection for the list is done. The ciphers are added
 1643|       |     * to the resulting precedence to the STACK_OF(SSL_CIPHER).
 1644|       |     */
 1645|   200k|    for (curr = head; curr != NULL; curr = curr->next) {
  ------------------
  |  Branch (1645:23): [True: 197k, False: 2.59k]
  ------------------
 1646|   197k|        if (curr->active) {
  ------------------
  |  Branch (1646:13): [True: 128k, False: 69.3k]
  ------------------
 1647|   128k|            if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) {
  ------------------
  |  | 1015|   128k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1647:17): [True: 0, False: 128k]
  ------------------
 1648|      0|                OPENSSL_free(co_list);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1649|      0|                sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1650|      0|                OSSL_TRACE_CANCEL(TLS_CIPHER);
  ------------------
  |  |  230|      0|    ((void)0)
  ------------------
 1651|      0|                return NULL;
 1652|      0|            }
 1653|   128k|            if (trc_out != NULL)
  ------------------
  |  Branch (1653:17): [True: 0, False: 128k]
  ------------------
 1654|      0|                BIO_printf(trc_out, "<%s>\n", curr->cipher->name);
 1655|   128k|        }
 1656|   197k|    }
 1657|  2.59k|    OPENSSL_free(co_list); /* Not needed any longer */
  ------------------
  |  |  131|  2.59k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1658|  2.59k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  226|  2.59k|    }                            \
  |  |  227|  2.59k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 2.59k]
  |  |  ------------------
  ------------------
 1659|       |
 1660|  2.59k|    if (!update_cipher_list_by_id(cipher_list_by_id, cipherstack)) {
  ------------------
  |  Branch (1660:9): [True: 0, False: 2.59k]
  ------------------
 1661|      0|        sk_SSL_CIPHER_free(cipherstack);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1662|      0|        return NULL;
 1663|      0|    }
 1664|  2.59k|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1011|  2.59k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1665|  2.59k|    *cipher_list = cipherstack;
 1666|       |
 1667|  2.59k|    return cipherstack;
 1668|  2.59k|}
SSL_COMP_get_compression_methods:
 1978|  2.06k|{
 1979|  2.06k|    STACK_OF(SSL_COMP) **rv;
  ------------------
  |  |   33|  2.06k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1980|       |
 1981|  2.06k|    rv = (STACK_OF(SSL_COMP) **)OSSL_LIB_CTX_get_data(NULL,
 1982|  2.06k|        OSSL_LIB_CTX_COMP_METHODS);
  ------------------
  |  |  119|  2.06k|#define OSSL_LIB_CTX_COMP_METHODS 21
  ------------------
 1983|  2.06k|    if (rv != NULL)
  ------------------
  |  Branch (1983:9): [True: 2.06k, False: 0]
  ------------------
 1984|  2.06k|        return *rv;
 1985|      0|    else
 1986|      0|        return NULL;
 1987|  2.06k|}
ssl_get_md_idx:
 2135|  6.19k|{
 2136|  6.19k|    int i;
 2137|       |
 2138|  92.9k|    for (i = 0; i < SSL_MD_NUM_IDX; i++) {
  ------------------
  |  |  203|  92.9k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  92.9k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (2138:17): [True: 86.7k, False: 6.19k]
  ------------------
 2139|  86.7k|        if (md_nid == ssl_cipher_table_mac[i].nid)
  ------------------
  |  Branch (2139:13): [True: 0, False: 86.7k]
  ------------------
 2140|      0|            return i;
 2141|  86.7k|    }
 2142|  6.19k|    return -1;
 2143|  6.19k|}
ssl_cert_is_disabled:
 2217|  46.3k|{
 2218|  46.3k|    const SSL_CERT_LOOKUP *cl;
 2219|       |
 2220|       |    /* A provider-loaded key type is always enabled */
 2221|  46.3k|    if (idx >= SSL_PKEY_NUM)
  ------------------
  |  |  328|  46.3k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2221:9): [True: 3.60k, False: 42.7k]
  ------------------
 2222|  3.60k|        return 0;
 2223|       |
 2224|  42.7k|    cl = ssl_cert_lookup_by_idx(idx, ctx);
 2225|  42.7k|    if (cl == NULL || (cl->amask & ctx->disabled_auth_mask) != 0)
  ------------------
  |  Branch (2225:9): [True: 0, False: 42.7k]
  |  Branch (2225:23): [True: 0, False: 42.7k]
  ------------------
 2226|      0|        return 1;
 2227|  42.7k|    return 0;
 2228|  42.7k|}
OSSL_default_cipher_list:
 2236|  2.13k|{
 2237|  2.13k|    return "ALL:!COMPLEMENTOFDEFAULT:!eNULL";
 2238|  2.13k|}
OSSL_default_ciphersuites:
 2246|  2.09k|{
 2247|  2.09k|    return "TLS_AES_256_GCM_SHA384:"
 2248|  2.09k|           "TLS_CHACHA20_POLY1305_SHA256:"
 2249|  2.09k|           "TLS_AES_128_GCM_SHA256";
 2250|  2.09k|}
ssl_ciph.c:get_optional_pkey_id:
  303|  14.6k|{
  304|  14.6k|    const EVP_PKEY_ASN1_METHOD *ameth;
  305|  14.6k|    ENGINE *tmpeng = NULL;
  306|  14.6k|    int pkey_id = 0;
  307|  14.6k|    ameth = EVP_PKEY_asn1_find_str(&tmpeng, pkey_name, -1);
  308|  14.6k|    if (ameth) {
  ------------------
  |  Branch (308:9): [True: 0, False: 14.6k]
  ------------------
  309|      0|        if (EVP_PKEY_asn1_get0_info(&pkey_id, NULL, NULL, NULL, NULL,
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|                ameth)
  311|      0|            <= 0)
  312|      0|            pkey_id = 0;
  313|      0|    }
  314|  14.6k|    tls_engine_finish(tmpeng);
  315|  14.6k|    return pkey_id;
  316|  14.6k|}
ssl_ciph.c:set_ciphersuites:
 1301|  2.25k|{
 1302|  2.25k|    STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  |   33|  2.25k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *newciphers = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1008|  2.25k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_new_null())
  ------------------
 1303|       |
 1304|  2.25k|    if (newciphers == NULL)
  ------------------
  |  Branch (1304:9): [True: 0, False: 2.25k]
  ------------------
 1305|      0|        return 0;
 1306|       |
 1307|       |    /* Parse the list. We explicitly allow an empty list */
 1308|  2.25k|    if (*str != '\0'
  ------------------
  |  Branch (1308:9): [True: 2.22k, False: 33]
  ------------------
 1309|  2.22k|        && (CONF_parse_list(str, ':', 1, ciphersuite_cb, newciphers) <= 0
  ------------------
  |  Branch (1309:13): [True: 0, False: 2.22k]
  ------------------
 1310|  2.22k|            || sk_SSL_CIPHER_num(newciphers) == 0)) {
  ------------------
  |  | 1005|  2.22k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1310:16): [True: 93, False: 2.12k]
  ------------------
 1311|     93|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  404|     93|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     93|    (ERR_new(),                                                  \
  |  |  |  |  407|     93|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     93|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     93|        ERR_set_error)
  |  |  ------------------
  ------------------
 1312|     93|        sk_SSL_CIPHER_free(newciphers);
  ------------------
  |  | 1011|     93|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1313|     93|        return 0;
 1314|     93|    }
 1315|  2.16k|    sk_SSL_CIPHER_free(*currciphers);
  ------------------
  |  | 1011|  2.16k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1316|  2.16k|    *currciphers = newciphers;
 1317|       |
 1318|  2.16k|    return 1;
 1319|  2.25k|}
ssl_ciph.c:ciphersuite_cb:
 1274|  19.4k|{
 1275|  19.4k|    STACK_OF(SSL_CIPHER) *ciphersuites = (STACK_OF(SSL_CIPHER) *)arg;
  ------------------
  |  |   33|  19.4k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1276|  19.4k|    const SSL_CIPHER *cipher;
 1277|       |    /* Arbitrary sized temp buffer for the cipher name. Should be big enough */
 1278|  19.4k|    char name[80];
 1279|       |
 1280|  19.4k|    if (len > (int)(sizeof(name) - 1))
  ------------------
  |  Branch (1280:9): [True: 35, False: 19.4k]
  ------------------
 1281|       |        /* Anyway return 1 so we can parse rest of the list */
 1282|     35|        return 1;
 1283|       |
 1284|  19.4k|    memcpy(name, elem, len);
 1285|  19.4k|    name[len] = '\0';
 1286|       |
 1287|  19.4k|    cipher = ssl3_get_cipher_by_std_name(name);
 1288|  19.4k|    if (cipher == NULL)
  ------------------
  |  Branch (1288:9): [True: 13.0k, False: 6.38k]
  ------------------
 1289|       |        /* Ciphersuite not found but return 1 to parse rest of the list */
 1290|  13.0k|        return 1;
 1291|       |
 1292|  6.38k|    if (!sk_SSL_CIPHER_push(ciphersuites, cipher)) {
  ------------------
  |  | 1015|  6.38k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (1292:9): [True: 0, False: 6.38k]
  ------------------
 1293|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1294|      0|        return 0;
 1295|      0|    }
 1296|       |
 1297|  6.38k|    return 1;
 1298|  6.38k|}
ssl_ciph.c:update_cipher_list:
 1343|     68|{
 1344|     68|    int i;
 1345|     68|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  |   33|     68|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(*cipher_list);
  ------------------
  |  | 1027|     68|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1346|       |
 1347|     68|    if (tmp_cipher_list == NULL)
  ------------------
  |  Branch (1347:9): [True: 0, False: 68]
  ------------------
 1348|      0|        return 0;
 1349|       |
 1350|       |    /*
 1351|       |     * Delete any existing TLSv1.3 ciphersuites. These are always first in the
 1352|       |     * list.
 1353|       |     */
 1354|    272|    while (sk_SSL_CIPHER_num(tmp_cipher_list) > 0
  ------------------
  |  | 1005|    272|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1354:12): [True: 272, False: 0]
  ------------------
 1355|    272|        && sk_SSL_CIPHER_value(tmp_cipher_list, 0)->min_tls
  ------------------
  |  | 1006|    272|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  |  Branch (1355:12): [True: 204, False: 68]
  ------------------
 1356|    272|            == TLS1_3_VERSION)
  ------------------
  |  |   27|    272|#define TLS1_3_VERSION 0x0304
  ------------------
 1357|    204|        (void)sk_SSL_CIPHER_delete(tmp_cipher_list, 0);
  ------------------
  |  | 1013|    272|#define sk_SSL_CIPHER_delete(sk, i) ((const SSL_CIPHER *)OPENSSL_sk_delete(ossl_check_SSL_CIPHER_sk_type(sk), (i)))
  ------------------
 1358|       |
 1359|       |    /* Insert the new TLSv1.3 ciphersuites */
 1360|    176|    for (i = sk_SSL_CIPHER_num(tls13_ciphersuites) - 1; i >= 0; i--) {
  ------------------
  |  | 1005|     68|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (1360:57): [True: 108, False: 68]
  ------------------
 1361|    108|        const SSL_CIPHER *sslc = sk_SSL_CIPHER_value(tls13_ciphersuites, i);
  ------------------
  |  | 1006|    108|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 1362|       |
 1363|       |        /* Don't include any TLSv1.3 ciphersuites that are disabled */
 1364|    108|        if ((sslc->algorithm_enc & ctx->disabled_enc_mask) == 0
  ------------------
  |  Branch (1364:13): [True: 107, False: 1]
  ------------------
 1365|    107|            && (ssl_cipher_table_mac[sslc->algorithm2
  ------------------
  |  Branch (1365:16): [True: 107, False: 0]
  ------------------
 1366|    107|                    & SSL_HANDSHAKE_MAC_MASK]
  ------------------
  |  |  208|    107|#define SSL_HANDSHAKE_MAC_MASK 0xFF
  ------------------
 1367|    107|                       .mask
 1368|    107|                   & ctx->disabled_mac_mask)
 1369|    107|                == 0) {
 1370|    107|            sk_SSL_CIPHER_unshift(tmp_cipher_list, sslc);
  ------------------
  |  | 1016|    107|#define sk_SSL_CIPHER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
 1371|    107|        }
 1372|    108|    }
 1373|       |
 1374|     68|    if (!update_cipher_list_by_id(cipher_list_by_id, tmp_cipher_list)) {
  ------------------
  |  Branch (1374:9): [True: 0, False: 68]
  ------------------
 1375|      0|        sk_SSL_CIPHER_free(tmp_cipher_list);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1376|      0|        return 0;
 1377|      0|    }
 1378|       |
 1379|     68|    sk_SSL_CIPHER_free(*cipher_list);
  ------------------
  |  | 1011|     68|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1380|     68|    *cipher_list = tmp_cipher_list;
 1381|       |
 1382|     68|    return 1;
 1383|     68|}
ssl_ciph.c:check_suiteb_cipher_list:
 1227|  2.93k|{
 1228|  2.93k|    unsigned int suiteb_flags = 0, suiteb_comb2 = 0;
 1229|  2.93k|    if (HAS_PREFIX(*prule_str, "SUITEB128ONLY")) {
  ------------------
  |  |   58|  2.93k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 2.93k]
  |  |  ------------------
  ------------------
 1230|      1|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS_ONLY;
  ------------------
  |  |  558|      1|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
 1231|  2.93k|    } else if (HAS_PREFIX(*prule_str, "SUITEB128C2")) {
  ------------------
  |  |   58|  2.93k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 1, False: 2.93k]
  |  |  ------------------
  ------------------
 1232|      1|        suiteb_comb2 = 1;
 1233|      1|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|      1|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1234|  2.93k|    } else if (HAS_PREFIX(*prule_str, "SUITEB128")) {
  ------------------
  |  |   58|  2.93k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 32, False: 2.89k]
  |  |  ------------------
  ------------------
 1235|     32|        suiteb_flags = SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|     32|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1236|  2.89k|    } else if (HAS_PREFIX(*prule_str, "SUITEB192")) {
  ------------------
  |  |   58|  2.89k|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 2, False: 2.89k]
  |  |  ------------------
  ------------------
 1237|      2|        suiteb_flags = SSL_CERT_FLAG_SUITEB_192_LOS;
  ------------------
  |  |  560|      2|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
 1238|      2|    }
 1239|       |
 1240|  2.93k|    if (suiteb_flags) {
  ------------------
  |  Branch (1240:9): [True: 36, False: 2.89k]
  ------------------
 1241|     36|        c->cert_flags &= ~SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|     36|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1242|     36|        c->cert_flags |= suiteb_flags;
 1243|  2.89k|    } else {
 1244|  2.89k|        suiteb_flags = c->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS;
  ------------------
  |  |  562|  2.89k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
 1245|  2.89k|    }
 1246|       |
 1247|  2.93k|    if (!suiteb_flags)
  ------------------
  |  Branch (1247:9): [True: 2.89k, False: 36]
  ------------------
 1248|  2.89k|        return 1;
 1249|       |    /* Check version: if TLS 1.2 ciphers allowed we can use Suite B */
 1250|       |
 1251|     36|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS)) {
  ------------------
  |  | 2195|     36|#define SSL_ENC_FLAG_TLS1_2_CIPHERS 0x10
  ------------------
  |  Branch (1251:9): [True: 0, False: 36]
  ------------------
 1252|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1253|      0|        return 0;
 1254|      0|    }
 1255|       |
 1256|     36|    switch (suiteb_flags) {
  ------------------
  |  Branch (1256:13): [True: 36, False: 0]
  ------------------
 1257|     33|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  562|     33|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (1257:5): [True: 33, False: 3]
  ------------------
 1258|     33|        if (suiteb_comb2)
  ------------------
  |  Branch (1258:13): [True: 1, False: 32]
  ------------------
 1259|      1|            *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1260|     32|        else
 1261|     32|            *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384";
 1262|     33|        break;
 1263|      1|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  558|      1|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (1263:5): [True: 1, False: 35]
  ------------------
 1264|      1|        *prule_str = "ECDHE-ECDSA-AES128-GCM-SHA256";
 1265|      1|        break;
 1266|      2|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  560|      2|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (1266:5): [True: 2, False: 34]
  ------------------
 1267|      2|        *prule_str = "ECDHE-ECDSA-AES256-GCM-SHA384";
 1268|      2|        break;
 1269|     36|    }
 1270|     36|    return 1;
 1271|     36|}
ssl_ciph.c:ssl_cipher_collect_ciphers:
  659|  2.93k|{
  660|  2.93k|    int i, co_list_num;
  661|  2.93k|    const SSL_CIPHER *c;
  662|       |
  663|       |    /*
  664|       |     * We have num_of_ciphers descriptions compiled in, depending on the
  665|       |     * method selected (SSLv3, TLSv1 etc).
  666|       |     * These will later be sorted in a linked list with at most num
  667|       |     * entries.
  668|       |     */
  669|       |
  670|       |    /* Get the initial list of ciphers */
  671|  2.93k|    co_list_num = 0; /* actual count of ciphers */
  672|   562k|    for (i = 0; i < num_of_ciphers; i++) {
  ------------------
  |  Branch (672:17): [True: 560k, False: 2.93k]
  ------------------
  673|   560k|        c = ssl_method->get_cipher(i);
  674|       |        /* drop those that use any of that is not available */
  675|   560k|        if (c == NULL || !c->valid)
  ------------------
  |  Branch (675:13): [True: 0, False: 560k]
  |  Branch (675:26): [True: 0, False: 560k]
  ------------------
  676|      0|            continue;
  677|   560k|        if ((c->algorithm_mkey & disabled_mkey) || (c->algorithm_auth & disabled_auth) || (c->algorithm_enc & disabled_enc) || (c->algorithm_mac & disabled_mac))
  ------------------
  |  Branch (677:13): [True: 23.7k, False: 536k]
  |  Branch (677:52): [True: 84, False: 536k]
  |  Branch (677:91): [True: 45.1k, False: 491k]
  |  Branch (677:128): [True: 252, False: 490k]
  ------------------
  678|  69.2k|            continue;
  679|   490k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) == 0) && c->min_tls == 0)
  ------------------
  |  | 2190|   490k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (679:13): [True: 490k, False: 0]
  |  Branch (679:77): [True: 0, False: 490k]
  ------------------
  680|      0|            continue;
  681|   490k|        if (((ssl_method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS) != 0) && c->min_dtls == 0)
  ------------------
  |  | 2190|   490k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (681:13): [True: 0, False: 490k]
  |  Branch (681:77): [True: 0, False: 0]
  ------------------
  682|      0|            continue;
  683|       |
  684|   490k|        co_list[co_list_num].cipher = c;
  685|   490k|        co_list[co_list_num].next = NULL;
  686|   490k|        co_list[co_list_num].prev = NULL;
  687|   490k|        co_list[co_list_num].active = 0;
  688|   490k|        co_list_num++;
  689|   490k|    }
  690|       |
  691|       |    /*
  692|       |     * Prepare linked list from list entries
  693|       |     */
  694|  2.93k|    if (co_list_num > 0) {
  ------------------
  |  Branch (694:9): [True: 2.90k, False: 28]
  ------------------
  695|  2.90k|        co_list[0].prev = NULL;
  696|       |
  697|  2.90k|        if (co_list_num > 1) {
  ------------------
  |  Branch (697:13): [True: 2.90k, False: 0]
  ------------------
  698|  2.90k|            co_list[0].next = &co_list[1];
  699|       |
  700|   487k|            for (i = 1; i < co_list_num - 1; i++) {
  ------------------
  |  Branch (700:25): [True: 484k, False: 2.90k]
  ------------------
  701|   484k|                co_list[i].prev = &co_list[i - 1];
  702|   484k|                co_list[i].next = &co_list[i + 1];
  703|   484k|            }
  704|       |
  705|  2.90k|            co_list[co_list_num - 1].prev = &co_list[co_list_num - 2];
  706|  2.90k|        }
  707|       |
  708|  2.90k|        co_list[co_list_num - 1].next = NULL;
  709|       |
  710|  2.90k|        *head_p = &co_list[0];
  711|  2.90k|        *tail_p = &co_list[co_list_num - 1];
  712|  2.90k|    }
  713|  2.93k|}
ssl_ciph.c:ssl_cipher_apply_rule:
  783|  74.1k|{
  784|  74.1k|    CIPHER_ORDER *head, *tail, *curr, *next, *last;
  785|  74.1k|    const SSL_CIPHER *cp;
  786|  74.1k|    int reverse = 0;
  787|       |
  788|  74.1k|    OSSL_TRACE_BEGIN(TLS_CIPHER)
  ------------------
  |  |  221|  74.1k|    do {                           \
  |  |  222|  74.1k|        BIO *trc_out = NULL;       \
  |  |  223|  74.1k|        if (0)
  |  |  ------------------
  |  |  |  Branch (223:13): [Folded, False: 74.1k]
  |  |  ------------------
  ------------------
  789|      0|    {
  790|      0|        BIO_printf(trc_out,
  791|      0|            "Applying rule %d with %08x/%08x/%08x/%08x/%08x %08x (%d)\n",
  792|      0|            rule, (unsigned int)alg_mkey, (unsigned int)alg_auth,
  793|      0|            (unsigned int)alg_enc, (unsigned int)alg_mac, min_tls,
  794|      0|            (unsigned int)algo_strength, (int)strength_bits);
  795|      0|    }
  796|       |
  797|  74.1k|    if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  146|   148k|#define CIPHER_DEL 3
  ------------------
                  if (rule == CIPHER_DEL || rule == CIPHER_BUMP)
  ------------------
  |  |  153|  67.5k|#define CIPHER_BUMP 6
  ------------------
  |  Branch (797:9): [True: 6.56k, False: 67.5k]
  |  Branch (797:31): [True: 11.7k, False: 55.8k]
  ------------------
  798|  18.2k|        reverse = 1; /* needed to maintain sorting between currently
  799|       |                      * deleted ciphers */
  800|       |
  801|  74.1k|    head = *head_p;
  802|  74.1k|    tail = *tail_p;
  803|       |
  804|  74.1k|    if (reverse) {
  ------------------
  |  Branch (804:9): [True: 18.2k, False: 55.8k]
  ------------------
  805|  18.2k|        next = tail;
  806|  18.2k|        last = head;
  807|  55.8k|    } else {
  808|  55.8k|        next = head;
  809|  55.8k|        last = tail;
  810|  55.8k|    }
  811|       |
  812|  74.1k|    curr = NULL;
  813|  12.2M|    for (;;) {
  814|  12.2M|        if (curr == last)
  ------------------
  |  Branch (814:13): [True: 74.1k, False: 12.1M]
  ------------------
  815|  74.1k|            break;
  816|       |
  817|  12.1M|        curr = next;
  818|       |
  819|  12.1M|        if (curr == NULL)
  ------------------
  |  Branch (819:13): [True: 0, False: 12.1M]
  ------------------
  820|      0|            break;
  821|       |
  822|  12.1M|        next = reverse ? curr->prev : curr->next;
  ------------------
  |  Branch (822:16): [True: 3.04M, False: 9.09M]
  ------------------
  823|       |
  824|  12.1M|        cp = curr->cipher;
  825|       |
  826|       |        /*
  827|       |         * Selection criteria is either the value of strength_bits
  828|       |         * or the algorithms used.
  829|       |         */
  830|  12.1M|        if (strength_bits >= 0) {
  ------------------
  |  Branch (830:13): [True: 2.56M, False: 9.58M]
  ------------------
  831|  2.56M|            if (strength_bits != cp->strength_bits)
  ------------------
  |  Branch (831:17): [True: 2.04M, False: 515k]
  ------------------
  832|  2.04M|                continue;
  833|  9.58M|        } else {
  834|  9.58M|            if (trc_out != NULL) {
  ------------------
  |  Branch (834:17): [True: 0, False: 9.58M]
  ------------------
  835|      0|                BIO_printf(trc_out,
  836|      0|                    "\nName: %s:"
  837|      0|                    "\nAlgo = %08x/%08x/%08x/%08x/%08x Algo_strength = %08x\n",
  838|      0|                    cp->name,
  839|      0|                    (unsigned int)cp->algorithm_mkey,
  840|      0|                    (unsigned int)cp->algorithm_auth,
  841|      0|                    (unsigned int)cp->algorithm_enc,
  842|      0|                    (unsigned int)cp->algorithm_mac,
  843|      0|                    cp->min_tls,
  844|      0|                    (unsigned int)cp->algo_strength);
  845|      0|            }
  846|  9.58M|            if (cipher_id != 0 && (cipher_id != cp->id))
  ------------------
  |  Branch (846:17): [True: 36.5k, False: 9.54M]
  |  Branch (846:35): [True: 36.3k, False: 208]
  ------------------
  847|  36.3k|                continue;
  848|  9.54M|            if (alg_mkey && !(alg_mkey & cp->algorithm_mkey))
  ------------------
  |  Branch (848:17): [True: 3.50M, False: 6.03M]
  |  Branch (848:29): [True: 2.64M, False: 863k]
  ------------------
  849|  2.64M|                continue;
  850|  6.90M|            if (alg_auth && !(alg_auth & cp->algorithm_auth))
  ------------------
  |  Branch (850:17): [True: 668k, False: 6.23M]
  |  Branch (850:29): [True: 544k, False: 123k]
  ------------------
  851|   544k|                continue;
  852|  6.35M|            if (alg_enc && !(alg_enc & cp->algorithm_enc))
  ------------------
  |  Branch (852:17): [True: 2.52M, False: 3.83M]
  |  Branch (852:28): [True: 1.87M, False: 653k]
  ------------------
  853|  1.87M|                continue;
  854|  4.48M|            if (alg_mac && !(alg_mac & cp->algorithm_mac))
  ------------------
  |  Branch (854:17): [True: 1.31M, False: 3.17M]
  |  Branch (854:28): [True: 1.02M, False: 289k]
  ------------------
  855|  1.02M|                continue;
  856|  3.46M|            if (min_tls && (min_tls != cp->min_tls))
  ------------------
  |  Branch (856:17): [True: 503k, False: 2.95M]
  |  Branch (856:28): [True: 250k, False: 253k]
  ------------------
  857|   250k|                continue;
  858|  3.21M|            if ((algo_strength & SSL_STRONG_MASK)
  ------------------
  |  |  241|  3.21M|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (858:17): [True: 23.6k, False: 3.18M]
  ------------------
  859|  23.6k|                && !(algo_strength & SSL_STRONG_MASK & cp->algo_strength))
  ------------------
  |  |  241|  23.6k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (859:20): [True: 15.4k, False: 8.18k]
  ------------------
  860|  15.4k|                continue;
  861|  3.19M|            if ((algo_strength & SSL_DEFAULT_MASK)
  ------------------
  |  |  242|  3.19M|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (861:17): [True: 357k, False: 2.83M]
  ------------------
  862|   357k|                && !(algo_strength & SSL_DEFAULT_MASK & cp->algo_strength))
  ------------------
  |  |  242|   357k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (862:20): [True: 158k, False: 198k]
  ------------------
  863|   158k|                continue;
  864|  3.19M|        }
  865|       |
  866|  3.55M|        if (trc_out != NULL)
  ------------------
  |  Branch (866:13): [True: 0, False: 3.55M]
  ------------------
  867|      0|            BIO_printf(trc_out, "Action = %d\n", rule);
  868|       |
  869|       |        /* add the cipher if it has not been added yet. */
  870|  3.55M|        if (rule == CIPHER_ADD) {
  ------------------
  |  |  144|  3.55M|#define CIPHER_ADD 1
  ------------------
  |  Branch (870:13): [True: 1.27M, False: 2.28M]
  ------------------
  871|       |            /* reverse == 0 */
  872|  1.27M|            if (!curr->active) {
  ------------------
  |  Branch (872:17): [True: 939k, False: 333k]
  ------------------
  873|   939k|                ll_append_tail(&head, curr, &tail);
  874|   939k|                curr->active = 1;
  875|   939k|            }
  876|  1.27M|        }
  877|       |        /* Move the added cipher to this location */
  878|  2.28M|        else if (rule == CIPHER_ORD) {
  ------------------
  |  |  147|  2.28M|#define CIPHER_ORD 4
  ------------------
  |  Branch (878:18): [True: 677k, False: 1.60M]
  ------------------
  879|       |            /* reverse == 0 */
  880|   677k|            if (curr->active) {
  ------------------
  |  Branch (880:17): [True: 665k, False: 11.9k]
  ------------------
  881|   665k|                ll_append_tail(&head, curr, &tail);
  882|   665k|            }
  883|  1.60M|        } else if (rule == CIPHER_DEL) {
  ------------------
  |  |  146|  1.60M|#define CIPHER_DEL 3
  ------------------
  |  Branch (883:20): [True: 624k, False: 978k]
  ------------------
  884|       |            /* reverse == 1 */
  885|   624k|            if (curr->active) {
  ------------------
  |  Branch (885:17): [True: 601k, False: 22.4k]
  ------------------
  886|       |                /*
  887|       |                 * most recently deleted ciphersuites get best positions for
  888|       |                 * any future CIPHER_ADD (note that the CIPHER_DEL loop works
  889|       |                 * in reverse to maintain the order)
  890|       |                 */
  891|   601k|                ll_append_head(&head, curr, &tail);
  892|   601k|                curr->active = 0;
  893|   601k|            }
  894|   978k|        } else if (rule == CIPHER_BUMP) {
  ------------------
  |  |  153|   978k|#define CIPHER_BUMP 6
  ------------------
  |  Branch (894:20): [True: 731k, False: 246k]
  ------------------
  895|   731k|            if (curr->active)
  ------------------
  |  Branch (895:17): [True: 731k, False: 0]
  ------------------
  896|   731k|                ll_append_head(&head, curr, &tail);
  897|   731k|        } else if (rule == CIPHER_KILL) {
  ------------------
  |  |  145|   246k|#define CIPHER_KILL 2
  ------------------
  |  Branch (897:20): [True: 246k, False: 0]
  ------------------
  898|       |            /* reverse == 0 */
  899|   246k|            if (head == curr)
  ------------------
  |  Branch (899:17): [True: 41.6k, False: 205k]
  ------------------
  900|  41.6k|                head = curr->next;
  901|   205k|            else
  902|   205k|                curr->prev->next = curr->next;
  903|   246k|            if (tail == curr)
  ------------------
  |  Branch (903:17): [True: 2.16k, False: 244k]
  ------------------
  904|  2.16k|                tail = curr->prev;
  905|   246k|            curr->active = 0;
  906|   246k|            if (curr->next != NULL)
  ------------------
  |  Branch (906:17): [True: 244k, False: 2.16k]
  ------------------
  907|   244k|                curr->next->prev = curr->prev;
  908|   246k|            if (curr->prev != NULL)
  ------------------
  |  Branch (908:17): [True: 205k, False: 41.6k]
  ------------------
  909|   205k|                curr->prev->next = curr->next;
  910|   246k|            curr->next = NULL;
  911|   246k|            curr->prev = NULL;
  912|   246k|        }
  913|  3.55M|    }
  914|       |
  915|  74.1k|    *head_p = head;
  916|  74.1k|    *tail_p = tail;
  917|       |
  918|  74.1k|    OSSL_TRACE_END(TLS_CIPHER);
  ------------------
  |  |  226|  74.1k|    }                            \
  |  |  227|  74.1k|    while (0)
  |  |  ------------------
  |  |  |  Branch (227:12): [Folded, False: 74.1k]
  |  |  ------------------
  ------------------
  919|  74.1k|}
ssl_ciph.c:ll_append_tail:
  618|  1.60M|{
  619|  1.60M|    if (curr == *tail)
  ------------------
  |  Branch (619:9): [True: 2.99k, False: 1.60M]
  ------------------
  620|  2.99k|        return;
  621|  1.60M|    if (curr == *head)
  ------------------
  |  Branch (621:9): [True: 488k, False: 1.11M]
  ------------------
  622|   488k|        *head = curr->next;
  623|  1.60M|    if (curr->prev != NULL)
  ------------------
  |  Branch (623:9): [True: 1.11M, False: 488k]
  ------------------
  624|  1.11M|        curr->prev->next = curr->next;
  625|  1.60M|    if (curr->next != NULL)
  ------------------
  |  Branch (625:9): [True: 1.60M, False: 0]
  ------------------
  626|  1.60M|        curr->next->prev = curr->prev;
  627|  1.60M|    (*tail)->next = curr;
  628|  1.60M|    curr->prev = *tail;
  629|       |    curr->next = NULL;
  630|  1.60M|    *tail = curr;
  631|  1.60M|}
ssl_ciph.c:ll_append_head:
  635|  1.33M|{
  636|  1.33M|    if (curr == *head)
  ------------------
  |  Branch (636:9): [True: 0, False: 1.33M]
  ------------------
  637|      0|        return;
  638|  1.33M|    if (curr == *tail)
  ------------------
  |  Branch (638:9): [True: 600k, False: 733k]
  ------------------
  639|   600k|        *tail = curr->prev;
  640|  1.33M|    if (curr->next != NULL)
  ------------------
  |  Branch (640:9): [True: 733k, False: 600k]
  ------------------
  641|   733k|        curr->next->prev = curr->prev;
  642|  1.33M|    if (curr->prev != NULL)
  ------------------
  |  Branch (642:9): [True: 1.33M, False: 0]
  ------------------
  643|  1.33M|        curr->prev->next = curr->next;
  644|  1.33M|    (*head)->prev = curr;
  645|  1.33M|    curr->next = *head;
  646|       |    curr->prev = NULL;
  647|  1.33M|    *head = curr;
  648|  1.33M|}
ssl_ciph.c:ssl_cipher_strength_sort:
  923|  3.35k|{
  924|  3.35k|    int32_t max_strength_bits;
  925|  3.35k|    int i, *number_uses;
  926|  3.35k|    CIPHER_ORDER *curr;
  927|       |
  928|       |    /*
  929|       |     * This routine sorts the ciphers with descending strength. The sorting
  930|       |     * must keep the pre-sorted sequence, so we apply the normal sorting
  931|       |     * routine as '+' movement to the end of the list.
  932|       |     */
  933|  3.35k|    max_strength_bits = 0;
  934|  3.35k|    curr = *head_p;
  935|   533k|    while (curr != NULL) {
  ------------------
  |  Branch (935:12): [True: 530k, False: 3.35k]
  ------------------
  936|   530k|        if (curr->active && (curr->cipher->strength_bits > max_strength_bits))
  ------------------
  |  Branch (936:13): [True: 504k, False: 25.7k]
  |  Branch (936:29): [True: 3.06k, False: 501k]
  ------------------
  937|  3.06k|            max_strength_bits = curr->cipher->strength_bits;
  938|   530k|        curr = curr->next;
  939|   530k|    }
  940|       |
  941|  3.35k|    number_uses = OPENSSL_calloc(max_strength_bits + 1, sizeof(int));
  ------------------
  |  |  112|  3.35k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  942|  3.35k|    if (number_uses == NULL)
  ------------------
  |  Branch (942:9): [True: 0, False: 3.35k]
  ------------------
  943|      0|        return 0;
  944|       |
  945|       |    /*
  946|       |     * Now find the strength_bits values actually used
  947|       |     */
  948|  3.35k|    curr = *head_p;
  949|   533k|    while (curr != NULL) {
  ------------------
  |  Branch (949:12): [True: 530k, False: 3.35k]
  ------------------
  950|   530k|        if (curr->active)
  ------------------
  |  Branch (950:13): [True: 504k, False: 25.7k]
  ------------------
  951|   504k|            number_uses[curr->cipher->strength_bits]++;
  952|   530k|        curr = curr->next;
  953|   530k|    }
  954|       |    /*
  955|       |     * Go through the list of used strength_bits values in descending
  956|       |     * order.
  957|       |     */
  958|   790k|    for (i = max_strength_bits; i >= 0; i--)
  ------------------
  |  Branch (958:33): [True: 787k, False: 3.35k]
  ------------------
  959|   787k|        if (number_uses[i] > 0)
  ------------------
  |  Branch (959:13): [True: 15.2k, False: 771k]
  ------------------
  960|  15.2k|            ssl_cipher_apply_rule(0, 0, 0, 0, 0, 0, 0, CIPHER_ORD, i, head_p,
  ------------------
  |  |  147|  15.2k|#define CIPHER_ORD 4
  ------------------
  961|  15.2k|                tail_p);
  962|       |
  963|  3.35k|    OPENSSL_free(number_uses);
  ------------------
  |  |  131|  3.35k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  964|  3.35k|    return 1;
  965|  3.35k|}
ssl_ciph.c:ssl_cipher_collect_aliases:
  722|  2.93k|{
  723|  2.93k|    CIPHER_ORDER *ciph_curr;
  724|  2.93k|    const SSL_CIPHER **ca_curr;
  725|  2.93k|    int i;
  726|  2.93k|    uint32_t mask_mkey = ~disabled_mkey;
  727|  2.93k|    uint32_t mask_auth = ~disabled_auth;
  728|  2.93k|    uint32_t mask_enc = ~disabled_enc;
  729|  2.93k|    uint32_t mask_mac = ~disabled_mac;
  730|       |
  731|       |    /*
  732|       |     * First, add the real ciphers as already collected
  733|       |     */
  734|  2.93k|    ciph_curr = head;
  735|  2.93k|    ca_curr = ca_list;
  736|   493k|    while (ciph_curr != NULL) {
  ------------------
  |  Branch (736:12): [True: 490k, False: 2.93k]
  ------------------
  737|   490k|        *ca_curr = ciph_curr->cipher;
  738|   490k|        ca_curr++;
  739|   490k|        ciph_curr = ciph_curr->next;
  740|   490k|    }
  741|       |
  742|       |    /*
  743|       |     * Now we add the available ones from the cipher_aliases[] table.
  744|       |     * They represent either one or more algorithms, some of which
  745|       |     * in any affected category must be supported (set in enabled_mask),
  746|       |     * or represent a cipher strength value (will be added in any case because algorithms=0).
  747|       |     */
  748|   234k|    for (i = 0; i < num_of_group_aliases; i++) {
  ------------------
  |  Branch (748:17): [True: 231k, False: 2.93k]
  ------------------
  749|   231k|        uint32_t algorithm_mkey = cipher_aliases[i].algorithm_mkey;
  750|   231k|        uint32_t algorithm_auth = cipher_aliases[i].algorithm_auth;
  751|   231k|        uint32_t algorithm_enc = cipher_aliases[i].algorithm_enc;
  752|   231k|        uint32_t algorithm_mac = cipher_aliases[i].algorithm_mac;
  753|       |
  754|   231k|        if (algorithm_mkey)
  ------------------
  |  Branch (754:13): [True: 73.3k, False: 158k]
  ------------------
  755|  73.3k|            if ((algorithm_mkey & mask_mkey) == 0)
  ------------------
  |  Branch (755:17): [True: 6.31k, False: 66.9k]
  ------------------
  756|  6.31k|                continue;
  757|       |
  758|   225k|        if (algorithm_auth)
  ------------------
  |  Branch (758:13): [True: 58.4k, False: 166k]
  ------------------
  759|  58.4k|            if ((algorithm_auth & mask_auth) == 0)
  ------------------
  |  Branch (759:17): [True: 8.90k, False: 49.5k]
  ------------------
  760|  8.90k|                continue;
  761|       |
  762|   216k|        if (algorithm_enc)
  ------------------
  |  Branch (762:13): [True: 84.9k, False: 131k]
  ------------------
  763|  84.9k|            if ((algorithm_enc & mask_enc) == 0)
  ------------------
  |  Branch (763:17): [True: 18.0k, False: 66.9k]
  ------------------
  764|  18.0k|                continue;
  765|       |
  766|   198k|        if (algorithm_mac)
  ------------------
  |  Branch (766:13): [True: 29.2k, False: 169k]
  ------------------
  767|  29.2k|            if ((algorithm_mac & mask_mac) == 0)
  ------------------
  |  Branch (767:17): [True: 8.93k, False: 20.3k]
  ------------------
  768|  8.93k|                continue;
  769|       |
  770|   189k|        *ca_curr = (SSL_CIPHER *)(cipher_aliases + i);
  771|   189k|        ca_curr++;
  772|   189k|    }
  773|       |
  774|       |    *ca_curr = NULL; /* end of list */
  775|  2.93k|}
ssl_ciph.c:ssl_cipher_process_rulestr:
  971|  2.97k|{
  972|  2.97k|    uint32_t alg_mkey, alg_auth, alg_enc, alg_mac, algo_strength;
  973|  2.97k|    int min_tls;
  974|  2.97k|    const char *l, *buf;
  975|  2.97k|    int j, multi, found, rule, retval, ok, buflen;
  976|  2.97k|    uint32_t cipher_id = 0;
  977|  2.97k|    char ch;
  978|       |
  979|  2.97k|    retval = 1;
  980|  2.97k|    l = rule_str;
  981|  48.8k|    for (;;) {
  982|  48.8k|        ch = *l;
  983|       |
  984|  48.8k|        if (ch == '\0')
  ------------------
  |  Branch (984:13): [True: 51, False: 48.7k]
  ------------------
  985|     51|            break; /* done */
  986|  48.7k|        if (ch == '-') {
  ------------------
  |  Branch (986:13): [True: 2.09k, False: 46.6k]
  ------------------
  987|  2.09k|            rule = CIPHER_DEL;
  ------------------
  |  |  146|  2.09k|#define CIPHER_DEL 3
  ------------------
  988|  2.09k|            l++;
  989|  46.6k|        } else if (ch == '+') {
  ------------------
  |  Branch (989:20): [True: 254, False: 46.4k]
  ------------------
  990|    254|            rule = CIPHER_ORD;
  ------------------
  |  |  147|    254|#define CIPHER_ORD 4
  ------------------
  991|    254|            l++;
  992|  46.4k|        } else if (ch == '!') {
  ------------------
  |  Branch (992:20): [True: 5.28k, False: 41.1k]
  ------------------
  993|  5.28k|            rule = CIPHER_KILL;
  ------------------
  |  |  145|  5.28k|#define CIPHER_KILL 2
  ------------------
  994|  5.28k|            l++;
  995|  41.1k|        } else if (ch == '@') {
  ------------------
  |  Branch (995:20): [True: 2.99k, False: 38.1k]
  ------------------
  996|  2.99k|            rule = CIPHER_SPECIAL;
  ------------------
  |  |  148|  2.99k|#define CIPHER_SPECIAL 5
  ------------------
  997|  2.99k|            l++;
  998|  38.1k|        } else {
  999|  38.1k|            rule = CIPHER_ADD;
  ------------------
  |  |  144|  38.1k|#define CIPHER_ADD 1
  ------------------
 1000|  38.1k|        }
 1001|       |
 1002|  48.7k|        if (ITEM_SEP(ch)) {
  ------------------
  |  |  614|  48.7k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (614:6): [True: 8.58k, False: 40.1k]
  |  |  |  Branch (614:22): [True: 3.25k, False: 36.9k]
  |  |  |  Branch (614:38): [True: 6.00k, False: 30.9k]
  |  |  |  Branch (614:54): [True: 8.46k, False: 22.4k]
  |  |  ------------------
  ------------------
 1003|  26.3k|            l++;
 1004|  26.3k|            continue;
 1005|  26.3k|        }
 1006|       |
 1007|  22.4k|        alg_mkey = 0;
 1008|  22.4k|        alg_auth = 0;
 1009|  22.4k|        alg_enc = 0;
 1010|  22.4k|        alg_mac = 0;
 1011|  22.4k|        min_tls = 0;
 1012|  22.4k|        algo_strength = 0;
 1013|       |
 1014|  22.9k|        for (;;) {
 1015|  22.9k|            ch = *l;
 1016|  22.9k|            buf = l;
 1017|  22.9k|            buflen = 0;
 1018|  22.9k|#ifndef CHARSET_EBCDIC
 1019|   157k|            while (((ch >= 'A') && (ch <= 'Z')) || ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || (ch == '-') || (ch == '_') || (ch == '.') || (ch == '='))
  ------------------
  |  Branch (1019:21): [True: 120k, False: 37.1k]
  |  Branch (1019:36): [True: 99.8k, False: 20.3k]
  |  Branch (1019:53): [True: 40.7k, False: 16.7k]
  |  Branch (1019:68): [True: 10.0k, False: 30.7k]
  |  Branch (1019:85): [True: 19.0k, False: 28.3k]
  |  Branch (1019:100): [True: 18.8k, False: 216]
  |  Branch (1019:116): [True: 1.48k, False: 27.1k]
  |  Branch (1019:131): [True: 1.14k, False: 25.9k]
  |  Branch (1019:146): [True: 1.97k, False: 23.9k]
  |  Branch (1019:161): [True: 1.03k, False: 22.9k]
  ------------------
 1020|       |#else
 1021|       |            while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '_') || (ch == '.')
 1022|       |                || (ch == '='))
 1023|       |#endif
 1024|   134k|            {
 1025|   134k|                ch = *(++l);
 1026|   134k|                buflen++;
 1027|   134k|            }
 1028|       |
 1029|  22.9k|            if (buflen == 0) {
  ------------------
  |  Branch (1029:17): [True: 215, False: 22.7k]
  ------------------
 1030|       |                /*
 1031|       |                 * We hit something we cannot deal with,
 1032|       |                 * it is no command or separator nor
 1033|       |                 * alphanumeric, so we call this an error.
 1034|       |                 */
 1035|    215|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  404|    215|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    215|    (ERR_new(),                                                  \
  |  |  |  |  407|    215|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    215|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    215|        ERR_set_error)
  |  |  ------------------
  ------------------
 1036|    215|                return 0;
 1037|    215|            }
 1038|       |
 1039|  22.7k|            if (rule == CIPHER_SPECIAL) {
  ------------------
  |  |  148|  22.7k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1039:17): [True: 2.98k, False: 19.7k]
  ------------------
 1040|  2.98k|                found = 0; /* unused -- avoid compiler warning */
 1041|  2.98k|                break; /* special treatment */
 1042|  2.98k|            }
 1043|       |
 1044|       |            /* check for multi-part specification */
 1045|  19.7k|            if (ch == '+') {
  ------------------
  |  Branch (1045:17): [True: 948, False: 18.8k]
  ------------------
 1046|    948|                multi = 1;
 1047|    948|                l++;
 1048|  18.8k|            } else {
 1049|  18.8k|                multi = 0;
 1050|  18.8k|            }
 1051|       |
 1052|       |            /*
 1053|       |             * Now search for the cipher alias in the ca_list. Be careful
 1054|       |             * with the strncmp, because the "buflen" limitation
 1055|       |             * will make the rule "ADH:SOME" and the cipher
 1056|       |             * "ADH-MY-CIPHER" look like a match for buflen=3.
 1057|       |             * So additionally check whether the cipher name found
 1058|       |             * has the correct length. We can save a strlen() call:
 1059|       |             * just checking for the '\0' at the right place is
 1060|       |             * sufficient, we have to strncmp() anyway. (We cannot
 1061|       |             * use strcmp(), because buf is not '\0' terminated.)
 1062|       |             */
 1063|  19.7k|            j = found = 0;
 1064|  19.7k|            cipher_id = 0;
 1065|  4.16M|            while (ca_list[j]) {
  ------------------
  |  Branch (1065:20): [True: 4.15M, False: 10.1k]
  ------------------
 1066|  4.15M|                if (strncmp(buf, ca_list[j]->name, buflen) == 0
  ------------------
  |  Branch (1066:21): [True: 46.6k, False: 4.11M]
  ------------------
 1067|  46.6k|                    && (ca_list[j]->name[buflen] == '\0')) {
  ------------------
  |  Branch (1067:24): [True: 9.57k, False: 37.0k]
  ------------------
 1068|  9.57k|                    found = 1;
 1069|  9.57k|                    break;
 1070|  4.14M|                } else if (ca_list[j]->stdname != NULL
  ------------------
  |  Branch (1070:28): [True: 3.30M, False: 842k]
  ------------------
 1071|  3.30M|                    && strncmp(buf, ca_list[j]->stdname, buflen) == 0
  ------------------
  |  Branch (1071:24): [True: 21.3k, False: 3.28M]
  ------------------
 1072|  21.3k|                    && ca_list[j]->stdname[buflen] == '\0') {
  ------------------
  |  Branch (1072:24): [True: 38, False: 21.3k]
  ------------------
 1073|     38|                    found = 1;
 1074|     38|                    break;
 1075|     38|                } else
 1076|  4.14M|                    j++;
 1077|  4.15M|            }
 1078|       |
 1079|  19.7k|            if (!found)
  ------------------
  |  Branch (1079:17): [True: 10.1k, False: 9.61k]
  ------------------
 1080|  10.1k|                break; /* ignore this entry */
 1081|       |
 1082|  9.61k|            if (ca_list[j]->algorithm_mkey) {
  ------------------
  |  Branch (1082:17): [True: 808, False: 8.80k]
  ------------------
 1083|    808|                if (alg_mkey) {
  ------------------
  |  Branch (1083:21): [True: 46, False: 762]
  ------------------
 1084|     46|                    alg_mkey &= ca_list[j]->algorithm_mkey;
 1085|     46|                    if (!alg_mkey) {
  ------------------
  |  Branch (1085:25): [True: 13, False: 33]
  ------------------
 1086|     13|                        found = 0;
 1087|     13|                        break;
 1088|     13|                    }
 1089|    762|                } else {
 1090|    762|                    alg_mkey = ca_list[j]->algorithm_mkey;
 1091|    762|                }
 1092|    808|            }
 1093|       |
 1094|  9.60k|            if (ca_list[j]->algorithm_auth) {
  ------------------
  |  Branch (1094:17): [True: 1.03k, False: 8.56k]
  ------------------
 1095|  1.03k|                if (alg_auth) {
  ------------------
  |  Branch (1095:21): [True: 38, False: 1.00k]
  ------------------
 1096|     38|                    alg_auth &= ca_list[j]->algorithm_auth;
 1097|     38|                    if (!alg_auth) {
  ------------------
  |  Branch (1097:25): [True: 12, False: 26]
  ------------------
 1098|     12|                        found = 0;
 1099|     12|                        break;
 1100|     12|                    }
 1101|  1.00k|                } else {
 1102|  1.00k|                    alg_auth = ca_list[j]->algorithm_auth;
 1103|  1.00k|                }
 1104|  1.03k|            }
 1105|       |
 1106|  9.59k|            if (ca_list[j]->algorithm_enc) {
  ------------------
  |  Branch (1106:17): [True: 4.93k, False: 4.65k]
  ------------------
 1107|  4.93k|                if (alg_enc) {
  ------------------
  |  Branch (1107:21): [True: 10, False: 4.92k]
  ------------------
 1108|     10|                    alg_enc &= ca_list[j]->algorithm_enc;
 1109|     10|                    if (!alg_enc) {
  ------------------
  |  Branch (1109:25): [True: 3, False: 7]
  ------------------
 1110|      3|                        found = 0;
 1111|      3|                        break;
 1112|      3|                    }
 1113|  4.92k|                } else {
 1114|  4.92k|                    alg_enc = ca_list[j]->algorithm_enc;
 1115|  4.92k|                }
 1116|  4.93k|            }
 1117|       |
 1118|  9.58k|            if (ca_list[j]->algorithm_mac) {
  ------------------
  |  Branch (1118:17): [True: 1.24k, False: 8.34k]
  ------------------
 1119|  1.24k|                if (alg_mac) {
  ------------------
  |  Branch (1119:21): [True: 78, False: 1.17k]
  ------------------
 1120|     78|                    alg_mac &= ca_list[j]->algorithm_mac;
 1121|     78|                    if (!alg_mac) {
  ------------------
  |  Branch (1121:25): [True: 56, False: 22]
  ------------------
 1122|     56|                        found = 0;
 1123|     56|                        break;
 1124|     56|                    }
 1125|  1.17k|                } else {
 1126|  1.17k|                    alg_mac = ca_list[j]->algorithm_mac;
 1127|  1.17k|                }
 1128|  1.24k|            }
 1129|       |
 1130|  9.53k|            if (ca_list[j]->algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  241|  9.53k|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1130:17): [True: 495, False: 9.03k]
  ------------------
 1131|    495|                if (algo_strength & SSL_STRONG_MASK) {
  ------------------
  |  |  241|    495|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1131:21): [True: 29, False: 466]
  ------------------
 1132|     29|                    algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  241|     29|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_STRONG_MASK) | ~SSL_STRONG_MASK;
  ------------------
  |  |  241|     29|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1133|     29|                    if (!(algo_strength & SSL_STRONG_MASK)) {
  ------------------
  |  |  241|     29|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
  |  Branch (1133:25): [True: 10, False: 19]
  ------------------
 1134|     10|                        found = 0;
 1135|     10|                        break;
 1136|     10|                    }
 1137|    466|                } else {
 1138|    466|                    algo_strength = ca_list[j]->algo_strength & SSL_STRONG_MASK;
  ------------------
  |  |  241|    466|#define SSL_STRONG_MASK 0x0000001FU
  ------------------
 1139|    466|                }
 1140|    495|            }
 1141|       |
 1142|  9.52k|            if (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  242|  9.52k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1142:17): [True: 2.19k, False: 7.33k]
  ------------------
 1143|  2.19k|                if (algo_strength & SSL_DEFAULT_MASK) {
  ------------------
  |  |  242|  2.19k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1143:21): [True: 8, False: 2.18k]
  ------------------
 1144|      8|                    algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  242|      8|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
                                  algo_strength &= (ca_list[j]->algo_strength & SSL_DEFAULT_MASK) | ~SSL_DEFAULT_MASK;
  ------------------
  |  |  242|      8|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1145|      8|                    if (!(algo_strength & SSL_DEFAULT_MASK)) {
  ------------------
  |  |  242|      8|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
  |  Branch (1145:25): [True: 0, False: 8]
  ------------------
 1146|      0|                        found = 0;
 1147|      0|                        break;
 1148|      0|                    }
 1149|  2.18k|                } else {
 1150|  2.18k|                    algo_strength |= ca_list[j]->algo_strength & SSL_DEFAULT_MASK;
  ------------------
  |  |  242|  2.18k|#define SSL_DEFAULT_MASK 0X00000020U
  ------------------
 1151|  2.18k|                }
 1152|  2.19k|            }
 1153|       |
 1154|  9.52k|            if (ca_list[j]->valid) {
  ------------------
  |  Branch (1154:17): [True: 227, False: 9.29k]
  ------------------
 1155|       |                /*
 1156|       |                 * explicit ciphersuite found; its protocol version does not
 1157|       |                 * become part of the search pattern!
 1158|       |                 */
 1159|       |
 1160|    227|                cipher_id = ca_list[j]->id;
 1161|  9.29k|            } else {
 1162|       |                /*
 1163|       |                 * not an explicit ciphersuite; only in this case, the
 1164|       |                 * protocol version is considered part of the search pattern
 1165|       |                 */
 1166|       |
 1167|  9.29k|                if (ca_list[j]->min_tls) {
  ------------------
  |  Branch (1167:21): [True: 205, False: 9.09k]
  ------------------
 1168|    205|                    if (min_tls != 0 && min_tls != ca_list[j]->min_tls) {
  ------------------
  |  Branch (1168:25): [True: 24, False: 181]
  |  Branch (1168:41): [True: 13, False: 11]
  ------------------
 1169|     13|                        found = 0;
 1170|     13|                        break;
 1171|    192|                    } else {
 1172|    192|                        min_tls = ca_list[j]->min_tls;
 1173|    192|                    }
 1174|    205|                }
 1175|  9.29k|            }
 1176|       |
 1177|  9.50k|            if (!multi)
  ------------------
  |  Branch (1177:17): [True: 9.02k, False: 486]
  ------------------
 1178|  9.02k|                break;
 1179|  9.50k|        }
 1180|       |
 1181|       |        /*
 1182|       |         * Ok, we have the rule, now apply it
 1183|       |         */
 1184|  22.2k|        if (rule == CIPHER_SPECIAL) { /* special command */
  ------------------
  |  |  148|  22.2k|#define CIPHER_SPECIAL 5
  ------------------
  |  Branch (1184:13): [True: 2.98k, False: 19.2k]
  ------------------
 1185|  2.98k|            ok = 0;
 1186|  2.98k|            if ((buflen == 8) && HAS_PREFIX(buf, "STRENGTH")) {
  ------------------
  |  |   58|    691|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  ------------------
  |  |  |  Branch (58:30): [True: 418, False: 273]
  |  |  ------------------
  ------------------
  |  Branch (1186:17): [True: 691, False: 2.29k]
  ------------------
 1187|    418|                ok = ssl_cipher_strength_sort(head_p, tail_p);
 1188|  2.57k|            } else if (buflen == 10 && CHECK_AND_SKIP_PREFIX(buf, "SECLEVEL=")) {
  ------------------
  |  |   61|    125|    (HAS_PREFIX(str, pre) ? ((str) += sizeof(pre) - 1, 1) : 0)
  |  |  ------------------
  |  |  |  |   58|    125|#define HAS_PREFIX(str, pre) (strncmp(str, pre "", sizeof(pre) - 1) == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (58:30): [True: 57, False: 68]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:5): [True: 57, False: 68]
  |  |  ------------------
  ------------------
  |  Branch (1188:24): [True: 125, False: 2.44k]
  ------------------
 1189|     57|                int level = *buf - '0';
 1190|     57|                if (level < 0 || level > 5) {
  ------------------
  |  Branch (1190:21): [True: 6, False: 51]
  |  Branch (1190:34): [True: 10, False: 41]
  ------------------
 1191|     16|                    ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  404|     16|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     16|    (ERR_new(),                                                  \
  |  |  |  |  407|     16|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     16|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     16|        ERR_set_error)
  |  |  ------------------
  ------------------
 1192|     41|                } else {
 1193|     41|                    c->sec_level = level;
 1194|     41|                    ok = 1;
 1195|     41|                }
 1196|  2.51k|            } else {
 1197|  2.51k|                ERR_raise(ERR_LIB_SSL, SSL_R_INVALID_COMMAND);
  ------------------
  |  |  404|  2.51k|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|  2.51k|    (ERR_new(),                                                  \
  |  |  |  |  407|  2.51k|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|  2.51k|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|  2.51k|        ERR_set_error)
  |  |  ------------------
  ------------------
 1198|  2.51k|            }
 1199|  2.98k|            if (ok == 0)
  ------------------
  |  Branch (1199:17): [True: 2.52k, False: 459]
  ------------------
 1200|  2.52k|                retval = 0;
 1201|       |            /*
 1202|       |             * We do not support any "multi" options
 1203|       |             * together with "@", so throw away the
 1204|       |             * rest of the command, if any left, until
 1205|       |             * end or ':' is found.
 1206|       |             */
 1207|  9.69k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  614|  9.61k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (614:6): [True: 1.62k, False: 7.98k]
  |  |  |  Branch (614:22): [True: 174, False: 7.81k]
  |  |  |  Branch (614:38): [True: 83, False: 7.73k]
  |  |  |  Branch (614:54): [True: 1.01k, False: 6.71k]
  |  |  ------------------
  ------------------
  |  Branch (1207:20): [True: 9.61k, False: 86]
  ------------------
 1208|  6.71k|                l++;
 1209|  19.2k|        } else if (found) {
  ------------------
  |  Branch (1209:20): [True: 9.02k, False: 10.2k]
  ------------------
 1210|  9.02k|            ssl_cipher_apply_rule(cipher_id,
 1211|  9.02k|                alg_mkey, alg_auth, alg_enc, alg_mac,
 1212|  9.02k|                min_tls, algo_strength, rule, -1, head_p,
 1213|  9.02k|                tail_p);
 1214|  10.2k|        } else {
 1215|  41.9k|            while ((*l != '\0') && !ITEM_SEP(*l))
  ------------------
  |  |  614|  41.4k|    (((a) == ':') || ((a) == ' ') || ((a) == ';') || ((a) == ','))
  |  |  ------------------
  |  |  |  Branch (614:6): [True: 1.86k, False: 39.6k]
  |  |  |  Branch (614:22): [True: 1.74k, False: 37.8k]
  |  |  |  Branch (614:38): [True: 2.89k, False: 35.0k]
  |  |  |  Branch (614:54): [True: 3.33k, False: 31.6k]
  |  |  ------------------
  ------------------
  |  Branch (1215:20): [True: 41.4k, False: 412]
  ------------------
 1216|  31.6k|                l++;
 1217|  10.2k|        }
 1218|  22.2k|        if (*l == '\0')
  ------------------
  |  Branch (1218:13): [True: 2.70k, False: 19.5k]
  ------------------
 1219|  2.70k|            break; /* done */
 1220|  22.2k|    }
 1221|       |
 1222|  2.75k|    return retval;
 1223|  2.97k|}
ssl_ciph.c:update_cipher_list_by_id:
 1323|  2.66k|{
 1324|  2.66k|    STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  |   33|  2.66k|#define STACK_OF(type) struct stack_st_##type
  ------------------
                  STACK_OF(SSL_CIPHER) *tmp_cipher_list = sk_SSL_CIPHER_dup(cipherstack);
  ------------------
  |  | 1027|  2.66k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
 1325|       |
 1326|  2.66k|    if (tmp_cipher_list == NULL) {
  ------------------
  |  Branch (1326:9): [True: 0, False: 2.66k]
  ------------------
 1327|      0|        return 0;
 1328|      0|    }
 1329|       |
 1330|  2.66k|    sk_SSL_CIPHER_free(*cipher_list_by_id);
  ------------------
  |  | 1011|  2.66k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1331|  2.66k|    *cipher_list_by_id = tmp_cipher_list;
 1332|       |
 1333|  2.66k|    (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id, ssl_cipher_ptr_id_cmp);
  ------------------
  |  | 1029|  2.66k|#define sk_SSL_CIPHER_set_cmp_func(sk, cmp) ((sk_SSL_CIPHER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_compfunc_type(cmp)))
  ------------------
 1334|  2.66k|    sk_SSL_CIPHER_sort(*cipher_list_by_id);
  ------------------
  |  | 1025|  2.66k|#define sk_SSL_CIPHER_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1335|       |
 1336|  2.66k|    return 1;
 1337|  2.66k|}

SSL_CONF_CTX_free:
 1115|  2.06k|{
 1116|  2.06k|    if (cctx) {
  ------------------
  |  Branch (1116:9): [True: 0, False: 2.06k]
  ------------------
 1117|      0|        free_cert_filename(cctx);
 1118|      0|        OPENSSL_free(cctx->prefix);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1119|      0|        sk_X509_NAME_pop_free(cctx->canames, X509_NAME_free);
  ------------------
  |  |   70|      0|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 1120|      0|        OPENSSL_free(cctx);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1121|      0|    }
 1122|  2.06k|}

OPENSSL_init_ssl:
   47|  3.40k|{
   48|  3.40k|    static int stoperrset = 0;
   49|       |
   50|  3.40k|    if (stopped) {
  ------------------
  |  Branch (50:9): [True: 0, False: 3.40k]
  ------------------
   51|      0|        if (!stoperrset) {
  ------------------
  |  Branch (51:13): [True: 0, False: 0]
  ------------------
   52|       |            /*
   53|       |             * We only ever set this once to avoid getting into an infinite
   54|       |             * loop where the error system keeps trying to init and fails so
   55|       |             * sets an error etc
   56|       |             */
   57|      0|            stoperrset = 1;
   58|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_INIT_FAIL);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   59|      0|        }
   60|      0|        return 0;
   61|      0|    }
   62|       |
   63|  3.40k|    opts |= OPENSSL_INIT_ADD_ALL_CIPHERS
  ------------------
  |  |  506|  3.40k|#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
  ------------------
   64|  3.40k|        | OPENSSL_INIT_ADD_ALL_DIGESTS;
  ------------------
  |  |  507|  3.40k|#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
  ------------------
   65|  3.40k|#ifndef OPENSSL_NO_AUTOLOAD_CONFIG
   66|  3.40k|    if ((opts & OPENSSL_INIT_NO_LOAD_CONFIG) == 0)
  ------------------
  |  |  511|  3.40k|#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
  ------------------
  |  Branch (66:9): [True: 3.40k, False: 0]
  ------------------
   67|  3.40k|        opts |= OPENSSL_INIT_LOAD_CONFIG;
  ------------------
  |  |  510|  3.40k|#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
  ------------------
   68|  3.40k|#endif
   69|       |
   70|  3.40k|    if (!OPENSSL_init_crypto(opts, settings))
  ------------------
  |  Branch (70:9): [True: 0, False: 3.40k]
  ------------------
   71|      0|        return 0;
   72|       |
   73|  3.40k|    if (!RUN_ONCE(&ssl_base, ossl_init_ssl_base))
  ------------------
  |  |  130|  3.40k|    (CRYPTO_THREAD_run_once(once, init##_ossl_) ? init##_ossl_ret_ : 0)
  |  |  ------------------
  |  |  |  Branch (130:6): [True: 3.40k, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (73:9): [True: 0, False: 3.40k]
  ------------------
   74|      0|        return 0;
   75|       |
   76|  3.40k|    return 1;
   77|  3.40k|}
ssl_init.c:ossl_init_ssl_base:
   25|      1|{
   26|      1|#ifndef OPENSSL_NO_COMP
   27|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: "
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   28|      1|                     "SSL_COMP_get_compression_methods()\n");
   29|       |    /*
   30|       |     * This will initialise the built-in compression algorithms. The value
   31|       |     * returned is a STACK_OF(SSL_COMP), but that can be discarded safely
   32|       |     */
   33|      1|    SSL_COMP_get_compression_methods();
   34|      1|#endif
   35|      1|    ssl_sort_cipher_list();
   36|      1|    OSSL_TRACE(INIT, "ossl_init_ssl_base: SSL_add_ssl_module()\n");
  ------------------
  |  |  290|      1|    OSSL_TRACEV(category, (trc_out, "%s", text))
  |  |  ------------------
  |  |  |  |  285|      1|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  ------------------
  ------------------
   37|      1|    ssl_base_inited = 1;
   38|      1|    return 1;
   39|      1|}

SSL_clear:
  568|  1.31k|{
  569|  1.31k|    if (s->method == NULL) {
  ------------------
  |  Branch (569:9): [True: 0, False: 1.31k]
  ------------------
  570|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_METHOD_SPECIFIED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  571|      0|        return 0;
  572|      0|    }
  573|       |
  574|  1.31k|    return s->method->ssl_reset(s);
  575|  1.31k|}
ossl_ssl_connection_reset:
  578|  2.63k|{
  579|  2.63k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.63k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.63k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.63k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.63k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.63k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.63k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.63k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  580|       |
  581|  2.63k|    if (sc == NULL)
  ------------------
  |  Branch (581:9): [True: 0, False: 2.63k]
  ------------------
  582|      0|        return 0;
  583|       |
  584|  2.63k|    if (ssl_clear_bad_session(sc)) {
  ------------------
  |  Branch (584:9): [True: 0, False: 2.63k]
  ------------------
  585|      0|        SSL_SESSION_free(sc->session);
  586|      0|        sc->session = NULL;
  587|      0|    }
  588|  2.63k|    SSL_SESSION_free(sc->psksession);
  589|  2.63k|    sc->psksession = NULL;
  590|  2.63k|    OPENSSL_free(sc->psksession_id);
  ------------------
  |  |  131|  2.63k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  591|  2.63k|    sc->psksession_id = NULL;
  592|  2.63k|    sc->psksession_id_len = 0;
  593|  2.63k|    sc->hello_retry_request = SSL_HRR_NONE;
  594|  2.63k|    sc->sent_tickets = 0;
  595|       |
  596|  2.63k|    sc->error = 0;
  597|  2.63k|    sc->hit = 0;
  598|  2.63k|    sc->shutdown = 0;
  599|       |
  600|  2.63k|    if (sc->renegotiate) {
  ------------------
  |  Branch (600:9): [True: 0, False: 2.63k]
  ------------------
  601|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  602|      0|        return 0;
  603|      0|    }
  604|       |
  605|  2.63k|    ossl_statem_clear(sc);
  606|       |
  607|  2.63k|    sc->version = s->method->version;
  608|  2.63k|    sc->client_version = sc->version;
  609|  2.63k|    sc->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|  2.63k|#define SSL_NOTHING 1
  ------------------
  610|       |
  611|  2.63k|    BUF_MEM_free(sc->init_buf);
  612|  2.63k|    sc->init_buf = NULL;
  613|  2.63k|    sc->first_packet = 0;
  614|       |
  615|  2.63k|    sc->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1048|  2.63k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  616|  2.63k|    memset(sc->ext.compress_certificate_from_peer, 0,
  617|  2.63k|        sizeof(sc->ext.compress_certificate_from_peer));
  618|  2.63k|    sc->ext.compress_certificate_sent = 0;
  619|       |
  620|  2.63k|    EVP_MD_CTX_free(sc->pha_dgst);
  621|  2.63k|    sc->pha_dgst = NULL;
  622|       |
  623|       |    /* Reset DANE verification result state */
  624|  2.63k|    sc->dane.mdpth = -1;
  625|  2.63k|    sc->dane.pdpth = -1;
  626|  2.63k|    X509_free(sc->dane.mcert);
  627|  2.63k|    sc->dane.mcert = NULL;
  628|  2.63k|    sc->dane.mtlsa = NULL;
  629|       |
  630|       |    /* Clear the verification result peername */
  631|  2.63k|    X509_VERIFY_PARAM_move_peername(sc->param, NULL);
  632|       |
  633|       |    /* Clear any shared connection state */
  634|  2.63k|    OPENSSL_free(sc->shared_sigalgs);
  ------------------
  |  |  131|  2.63k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  635|  2.63k|    sc->shared_sigalgs = NULL;
  636|  2.63k|    sc->shared_sigalgslen = 0;
  637|       |
  638|       |    /*
  639|       |     * Check to see if we were changed into a different method, if so, revert
  640|       |     * back.
  641|       |     */
  642|  2.63k|    if (s->method != s->defltmeth) {
  ------------------
  |  Branch (642:9): [True: 0, False: 2.63k]
  ------------------
  643|      0|        s->method->ssl_deinit(s);
  644|      0|        s->method = s->defltmeth;
  645|      0|        if (!s->method->ssl_init(s))
  ------------------
  |  Branch (645:13): [True: 0, False: 0]
  ------------------
  646|      0|            return 0;
  647|  2.63k|    } else {
  648|  2.63k|        if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (648:13): [True: 0, False: 2.63k]
  ------------------
  649|      0|            return 0;
  650|  2.63k|    }
  651|       |
  652|  2.63k|    ossl_quic_tls_clear(sc->qtls);
  653|       |
  654|  2.63k|    if (!RECORD_LAYER_reset(&sc->rlayer))
  ------------------
  |  Branch (654:9): [True: 0, False: 2.63k]
  ------------------
  655|      0|        return 0;
  656|       |
  657|  2.63k|    return 1;
  658|  2.63k|}
SSL_new:
  691|  1.31k|{
  692|  1.31k|    if (ctx == NULL) {
  ------------------
  |  Branch (692:9): [True: 0, False: 1.31k]
  ------------------
  693|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_CTX);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  694|      0|        return NULL;
  695|      0|    }
  696|  1.31k|    if (ctx->method == NULL) {
  ------------------
  |  Branch (696:9): [True: 0, False: 1.31k]
  ------------------
  697|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  698|      0|        return NULL;
  699|      0|    }
  700|  1.31k|    return ctx->method->ssl_new(ctx);
  701|  1.31k|}
ossl_ssl_init:
  704|  1.31k|{
  705|  1.31k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (705:9): [True: 0, False: 1.31k]
  ------------------
  706|      0|        return 0;
  707|       |
  708|  1.31k|    ssl->lock = CRYPTO_THREAD_lock_new();
  709|       |
  710|  1.31k|    if (ssl->lock == NULL || !CRYPTO_NEW_REF(&ssl->references, 1))
  ------------------
  |  Branch (710:9): [True: 0, False: 1.31k]
  |  Branch (710:30): [True: 0, False: 1.31k]
  ------------------
  711|      0|        goto err;
  712|       |
  713|  1.31k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL, ssl, &ssl->ex_data)) {
  ------------------
  |  |  250|  1.31k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
  |  Branch (713:9): [True: 0, False: 1.31k]
  ------------------
  714|      0|        CRYPTO_FREE_REF(&ssl->references);
  715|      0|        goto err;
  716|      0|    }
  717|       |
  718|  1.31k|    ssl->ctx = ctx;
  719|  1.31k|    ssl->type = type;
  720|  1.31k|    ssl->defltmeth = ssl->method = method;
  721|       |
  722|  1.31k|    return 1;
  723|       |
  724|      0|err:
  725|      0|    CRYPTO_THREAD_lock_free(ssl->lock);
  726|       |    ssl->lock = NULL;
  727|      0|    SSL_CTX_free(ctx);
  728|      0|    return 0;
  729|  1.31k|}
ossl_ssl_connection_new_int:
  733|  1.31k|{
  734|  1.31k|    SSL_CONNECTION *s;
  735|  1.31k|    SSL *ssl;
  736|       |
  737|  1.31k|    s = OPENSSL_zalloc(sizeof(*s));
  ------------------
  |  |  108|  1.31k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  738|  1.31k|    if (s == NULL)
  ------------------
  |  Branch (738:9): [True: 0, False: 1.31k]
  ------------------
  739|      0|        return NULL;
  740|       |
  741|  1.31k|    ssl = &s->ssl;
  742|  1.31k|    s->user_ssl = (user_ssl == NULL) ? ssl : user_ssl;
  ------------------
  |  Branch (742:19): [True: 1.31k, False: 0]
  ------------------
  743|       |
  744|  1.31k|    if (!ossl_ssl_init(ssl, ctx, method, SSL_TYPE_SSL_CONNECTION)) {
  ------------------
  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  ------------------
  |  Branch (744:9): [True: 0, False: 1.31k]
  ------------------
  745|      0|        OPENSSL_free(s);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  746|      0|        s = NULL;
  747|      0|        ssl = NULL;
  748|      0|        goto sslerr;
  749|      0|    }
  750|       |
  751|  1.31k|    RECORD_LAYER_init(&s->rlayer, s);
  752|       |
  753|  1.31k|    s->options = ctx->options;
  754|       |
  755|  1.31k|    s->dane.flags = ctx->dane.flags;
  756|  1.31k|    if (method->version == ctx->method->version) {
  ------------------
  |  Branch (756:9): [True: 1.31k, False: 0]
  ------------------
  757|  1.31k|        s->min_proto_version = ctx->min_proto_version;
  758|  1.31k|        s->max_proto_version = ctx->max_proto_version;
  759|  1.31k|    }
  760|       |
  761|  1.31k|    s->mode = ctx->mode;
  762|  1.31k|    s->max_cert_list = ctx->max_cert_list;
  763|  1.31k|    s->max_early_data = ctx->max_early_data;
  764|  1.31k|    s->recv_max_early_data = ctx->recv_max_early_data;
  765|       |
  766|  1.31k|    s->num_tickets = ctx->num_tickets;
  767|  1.31k|    s->pha_enabled = ctx->pha_enabled;
  768|       |
  769|       |    /* Shallow copy of the ciphersuites stack */
  770|  1.31k|    s->tls13_ciphersuites = sk_SSL_CIPHER_dup(ctx->tls13_ciphersuites);
  ------------------
  |  | 1027|  1.31k|#define sk_SSL_CIPHER_dup(sk) ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_dup(ossl_check_const_SSL_CIPHER_sk_type(sk)))
  ------------------
  771|  1.31k|    if (s->tls13_ciphersuites == NULL)
  ------------------
  |  Branch (771:9): [True: 0, False: 1.31k]
  ------------------
  772|      0|        goto cerr;
  773|       |
  774|       |    /*
  775|       |     * Earlier library versions used to copy the pointer to the CERT, not
  776|       |     * its contents; only when setting new parameters for the per-SSL
  777|       |     * copy, ssl_cert_new would be called (and the direct reference to
  778|       |     * the per-SSL_CTX settings would be lost, but those still were
  779|       |     * indirectly accessed for various purposes, and for that reason they
  780|       |     * used to be known as s->ctx->default_cert). Now we don't look at the
  781|       |     * SSL_CTX's CERT after having duplicated it once.
  782|       |     */
  783|  1.31k|    s->cert = ssl_cert_dup(ctx->cert);
  784|  1.31k|    if (s->cert == NULL)
  ------------------
  |  Branch (784:9): [True: 0, False: 1.31k]
  ------------------
  785|      0|        goto sslerr;
  786|       |
  787|  1.31k|    RECORD_LAYER_set_read_ahead(&s->rlayer, ctx->read_ahead);
  ------------------
  |  |  134|  1.31k|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
  788|  1.31k|    s->msg_callback = ctx->msg_callback;
  789|  1.31k|    s->msg_callback_arg = ctx->msg_callback_arg;
  790|  1.31k|    s->verify_mode = ctx->verify_mode;
  791|  1.31k|    s->not_resumable_session_cb = ctx->not_resumable_session_cb;
  792|  1.31k|    s->rlayer.record_padding_cb = ctx->record_padding_cb;
  793|  1.31k|    s->rlayer.record_padding_arg = ctx->record_padding_arg;
  794|  1.31k|    s->rlayer.block_padding = ctx->block_padding;
  795|  1.31k|    s->rlayer.hs_padding = ctx->hs_padding;
  796|  1.31k|    s->sid_ctx_length = ctx->sid_ctx_length;
  797|  1.31k|    if (!ossl_assert(s->sid_ctx_length <= sizeof(s->sid_ctx)))
  ------------------
  |  |   52|  1.31k|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|  1.31k|    __FILE__, __LINE__)
  ------------------
  |  Branch (797:9): [True: 0, False: 1.31k]
  ------------------
  798|      0|        goto err;
  799|  1.31k|    memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
  800|  1.31k|    s->verify_callback = ctx->default_verify_callback;
  801|  1.31k|    s->generate_session_id = ctx->generate_session_id;
  802|       |
  803|  1.31k|    s->param = X509_VERIFY_PARAM_new();
  804|  1.31k|    if (s->param == NULL)
  ------------------
  |  Branch (804:9): [True: 0, False: 1.31k]
  ------------------
  805|      0|        goto asn1err;
  806|  1.31k|    X509_VERIFY_PARAM_inherit(s->param, ctx->param);
  807|  1.31k|    s->quiet_shutdown = IS_QUIC_CTX(ctx) ? 0 : ctx->quiet_shutdown;
  ------------------
  |  |   54|  1.31k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  1.31k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  808|       |
  809|  1.31k|    if (!IS_QUIC_CTX(ctx))
  ------------------
  |  |   54|  1.31k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  1.31k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  810|  1.31k|        s->ext.max_fragment_len_mode = ctx->ext.max_fragment_len_mode;
  811|       |
  812|  1.31k|    s->max_send_fragment = ctx->max_send_fragment;
  813|  1.31k|    s->split_send_fragment = ctx->split_send_fragment;
  814|  1.31k|    s->max_pipelines = ctx->max_pipelines;
  815|  1.31k|    s->rlayer.default_read_buf_len = ctx->default_read_buf_len;
  816|       |
  817|  1.31k|    s->ext.debug_cb = 0;
  818|  1.31k|    s->ext.debug_arg = NULL;
  819|  1.31k|    s->ext.ticket_expected = 0;
  820|  1.31k|    s->ext.status_type = ctx->ext.status_type;
  821|  1.31k|    s->ext.status_expected = 0;
  822|  1.31k|    s->ext.ocsp.ids = NULL;
  823|  1.31k|    s->ext.ocsp.exts = NULL;
  824|  1.31k|    s->ext.ocsp.resp = NULL;
  825|  1.31k|    s->ext.ocsp.resp_len = 0;
  826|  1.31k|    s->ext.ocsp.resp_ex = NULL;
  827|       |
  828|  1.31k|    if (!SSL_CTX_up_ref(ctx))
  ------------------
  |  Branch (828:9): [True: 0, False: 1.31k]
  ------------------
  829|      0|        goto err;
  830|       |
  831|  1.31k|    s->session_ctx = ctx;
  832|  1.31k|    if (ctx->ext.ecpointformats != NULL) {
  ------------------
  |  Branch (832:9): [True: 0, False: 1.31k]
  ------------------
  833|      0|        s->ext.ecpointformats = OPENSSL_memdup(ctx->ext.ecpointformats,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  834|      0|            ctx->ext.ecpointformats_len);
  835|      0|        if (s->ext.ecpointformats == NULL) {
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|            s->ext.ecpointformats_len = 0;
  837|      0|            goto err;
  838|      0|        }
  839|      0|        s->ext.ecpointformats_len = ctx->ext.ecpointformats_len;
  840|      0|    }
  841|  1.31k|    if (ctx->ext.supportedgroups != NULL) {
  ------------------
  |  Branch (841:9): [True: 1.31k, False: 0]
  ------------------
  842|  1.31k|        size_t add = 0;
  843|       |
  844|  1.31k|        if (ctx->ext.supportedgroups_len == 0)
  ------------------
  |  Branch (844:13): [True: 0, False: 1.31k]
  ------------------
  845|       |            /* Add 1 so allocation won't fail */
  846|      0|            add = 1;
  847|  1.31k|        s->ext.supportedgroups = OPENSSL_memdup(ctx->ext.supportedgroups,
  ------------------
  |  |  133|  1.31k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  848|  1.31k|            (ctx->ext.supportedgroups_len + add)
  849|  1.31k|                * sizeof(*ctx->ext.supportedgroups));
  850|  1.31k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (850:13): [True: 0, False: 1.31k]
  ------------------
  851|      0|            s->ext.supportedgroups_len = 0;
  852|      0|            goto err;
  853|      0|        }
  854|  1.31k|        s->ext.supportedgroups_len = ctx->ext.supportedgroups_len;
  855|  1.31k|    }
  856|  1.31k|    if (ctx->ext.keyshares != NULL) {
  ------------------
  |  Branch (856:9): [True: 1.31k, False: 0]
  ------------------
  857|  1.31k|        size_t add = 0;
  858|       |
  859|  1.31k|        if (ctx->ext.keyshares_len == 0)
  ------------------
  |  Branch (859:13): [True: 0, False: 1.31k]
  ------------------
  860|       |            /* Add 1 so allocation won't fail */
  861|      0|            add = 1;
  862|  1.31k|        s->ext.keyshares = OPENSSL_memdup(ctx->ext.keyshares,
  ------------------
  |  |  133|  1.31k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  863|  1.31k|            (ctx->ext.keyshares_len + add)
  864|  1.31k|                * sizeof(*ctx->ext.keyshares));
  865|  1.31k|        if (s->ext.keyshares == NULL) {
  ------------------
  |  Branch (865:13): [True: 0, False: 1.31k]
  ------------------
  866|      0|            s->ext.keyshares_len = 0;
  867|      0|            goto err;
  868|      0|        }
  869|  1.31k|        s->ext.keyshares_len = ctx->ext.keyshares_len;
  870|  1.31k|    }
  871|  1.31k|    if (ctx->ext.tuples != NULL) {
  ------------------
  |  Branch (871:9): [True: 1.31k, False: 0]
  ------------------
  872|  1.31k|        size_t add = 0;
  873|       |
  874|  1.31k|        if (ctx->ext.tuples_len == 0)
  ------------------
  |  Branch (874:13): [True: 0, False: 1.31k]
  ------------------
  875|       |            /* Add 1 so allocation won't fail */
  876|      0|            add = 1;
  877|  1.31k|        s->ext.tuples = OPENSSL_memdup(ctx->ext.tuples,
  ------------------
  |  |  133|  1.31k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  878|  1.31k|            (ctx->ext.tuples_len + add)
  879|  1.31k|                * sizeof(*ctx->ext.tuples));
  880|  1.31k|        if (s->ext.tuples == NULL) {
  ------------------
  |  Branch (880:13): [True: 0, False: 1.31k]
  ------------------
  881|      0|            s->ext.tuples_len = 0;
  882|      0|            goto err;
  883|      0|        }
  884|  1.31k|        s->ext.tuples_len = ctx->ext.tuples_len;
  885|  1.31k|    }
  886|       |
  887|  1.31k|#ifndef OPENSSL_NO_NEXTPROTONEG
  888|  1.31k|    s->ext.npn = NULL;
  889|  1.31k|#endif
  890|       |
  891|  1.31k|    if (ctx->ext.alpn != NULL) {
  ------------------
  |  Branch (891:9): [True: 0, False: 1.31k]
  ------------------
  892|      0|        s->ext.alpn = OPENSSL_malloc(ctx->ext.alpn_len);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  893|      0|        if (s->ext.alpn == NULL) {
  ------------------
  |  Branch (893:13): [True: 0, False: 0]
  ------------------
  894|      0|            s->ext.alpn_len = 0;
  895|      0|            goto err;
  896|      0|        }
  897|      0|        memcpy(s->ext.alpn, ctx->ext.alpn, ctx->ext.alpn_len);
  898|      0|        s->ext.alpn_len = ctx->ext.alpn_len;
  899|      0|    }
  900|       |
  901|  1.31k|    s->verified_chain = NULL;
  902|  1.31k|    s->verify_result = X509_V_OK;
  ------------------
  |  |  312|  1.31k|#define X509_V_OK 0
  ------------------
  903|       |
  904|  1.31k|    s->default_passwd_callback = ctx->default_passwd_callback;
  905|  1.31k|    s->default_passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  906|       |
  907|  1.31k|    s->key_update = SSL_KEY_UPDATE_NONE;
  ------------------
  |  | 1048|  1.31k|#define SSL_KEY_UPDATE_NONE -1
  ------------------
  908|       |
  909|  1.31k|    if (!IS_QUIC_CTX(ctx)) {
  ------------------
  |  |   54|  1.31k|#define IS_QUIC_CTX(ctx) IS_QUIC_METHOD((ctx)->method)
  |  |  ------------------
  |  |  |  |   52|  1.31k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:6): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (52:42): [True: 0, False: 1.31k]
  |  |  |  |  |  Branch (52:85): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  910|  1.31k|        s->allow_early_data_cb = ctx->allow_early_data_cb;
  911|  1.31k|        s->allow_early_data_cb_data = ctx->allow_early_data_cb_data;
  912|  1.31k|    }
  913|       |
  914|  1.31k|    if (!method->ssl_init(ssl))
  ------------------
  |  Branch (914:9): [True: 0, False: 1.31k]
  ------------------
  915|      0|        goto sslerr;
  916|       |
  917|  1.31k|    s->server = (method->ssl_accept == ssl_undefined_function) ? 0 : 1;
  ------------------
  |  Branch (917:17): [True: 1.31k, False: 0]
  ------------------
  918|       |
  919|  1.31k|    if (!method->ssl_reset(ssl))
  ------------------
  |  Branch (919:9): [True: 0, False: 1.31k]
  ------------------
  920|      0|        goto sslerr;
  921|       |
  922|  1.31k|#ifndef OPENSSL_NO_PSK
  923|  1.31k|    s->psk_client_callback = ctx->psk_client_callback;
  924|  1.31k|    s->psk_server_callback = ctx->psk_server_callback;
  925|  1.31k|#endif
  926|  1.31k|    s->psk_find_session_cb = ctx->psk_find_session_cb;
  927|  1.31k|    s->psk_use_session_cb = ctx->psk_use_session_cb;
  928|       |
  929|  1.31k|    s->async_cb = ctx->async_cb;
  930|  1.31k|    s->async_cb_arg = ctx->async_cb_arg;
  931|       |
  932|  1.31k|    s->job = NULL;
  933|       |
  934|       |#ifndef OPENSSL_NO_COMP_ALG
  935|       |    memcpy(s->cert_comp_prefs, ctx->cert_comp_prefs, sizeof(s->cert_comp_prefs));
  936|       |#endif
  937|  1.31k|    if (ctx->client_cert_type != NULL) {
  ------------------
  |  Branch (937:9): [True: 0, False: 1.31k]
  ------------------
  938|      0|        s->client_cert_type = OPENSSL_memdup(ctx->client_cert_type,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  939|      0|            ctx->client_cert_type_len);
  940|      0|        if (s->client_cert_type == NULL)
  ------------------
  |  Branch (940:13): [True: 0, False: 0]
  ------------------
  941|      0|            goto sslerr;
  942|      0|        s->client_cert_type_len = ctx->client_cert_type_len;
  943|      0|    }
  944|  1.31k|    if (ctx->server_cert_type != NULL) {
  ------------------
  |  Branch (944:9): [True: 0, False: 1.31k]
  ------------------
  945|      0|        s->server_cert_type = OPENSSL_memdup(ctx->server_cert_type,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  946|      0|            ctx->server_cert_type_len);
  947|      0|        if (s->server_cert_type == NULL)
  ------------------
  |  Branch (947:13): [True: 0, False: 0]
  ------------------
  948|      0|            goto sslerr;
  949|      0|        s->server_cert_type_len = ctx->server_cert_type_len;
  950|      0|    }
  951|       |
  952|  1.31k|#ifndef OPENSSL_NO_CT
  953|  1.31k|    if (!SSL_set_ct_validation_callback(ssl, ctx->ct_validation_callback,
  ------------------
  |  Branch (953:9): [True: 0, False: 1.31k]
  ------------------
  954|  1.31k|            ctx->ct_validation_callback_arg))
  955|      0|        goto sslerr;
  956|  1.31k|#endif
  957|       |
  958|  1.31k|    s->ssl_pkey_num = SSL_PKEY_NUM + ctx->sigalg_list_len;
  ------------------
  |  |  328|  1.31k|#define SSL_PKEY_NUM 9
  ------------------
  959|  1.31k|    return ssl;
  960|      0|cerr:
  961|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  962|      0|    goto err;
  963|      0|asn1err:
  964|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  965|      0|    goto err;
  966|      0|sslerr:
  967|      0|    ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  968|      0|err:
  969|      0|    SSL_free(ssl);
  970|       |    return NULL;
  971|      0|}
ossl_ssl_connection_new:
  974|  1.31k|{
  975|       |    return ossl_ssl_connection_new_int(ctx, NULL, ctx->method);
  976|  1.31k|}
SSL_free:
 1423|  1.31k|{
 1424|  1.31k|    int i;
 1425|       |
 1426|  1.31k|    if (s == NULL)
  ------------------
  |  Branch (1426:9): [True: 0, False: 1.31k]
  ------------------
 1427|      0|        return;
 1428|  1.31k|    CRYPTO_DOWN_REF(&s->references, &i);
 1429|  1.31k|    REF_PRINT_COUNT("SSL", i, s);
  ------------------
  |  |  301|  1.31k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.31k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  1.31k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  1.31k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1430|  1.31k|    if (i > 0)
  ------------------
  |  Branch (1430:9): [True: 0, False: 1.31k]
  ------------------
 1431|      0|        return;
 1432|  1.31k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  1.31k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.31k]
  |  |  ------------------
  ------------------
 1433|       |
 1434|  1.31k|    if (s->method != NULL)
  ------------------
  |  Branch (1434:9): [True: 1.31k, False: 0]
  ------------------
 1435|  1.31k|        s->method->ssl_free(s);
 1436|       |
 1437|  1.31k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL, s, &s->ex_data);
  ------------------
  |  |  250|  1.31k|#define CRYPTO_EX_INDEX_SSL 0
  ------------------
 1438|  1.31k|    SSL_CTX_free(s->ctx);
 1439|  1.31k|    CRYPTO_THREAD_lock_free(s->lock);
 1440|  1.31k|    CRYPTO_FREE_REF(&s->references);
 1441|       |
 1442|  1.31k|    OPENSSL_free(s);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1443|  1.31k|}
ossl_ssl_connection_free:
 1446|  1.31k|{
 1447|  1.31k|    SSL_CONNECTION *s;
 1448|       |
 1449|  1.31k|    s = SSL_CONNECTION_FROM_SSL_ONLY(ssl);
  ------------------
  |  |   23|  1.31k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.31k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.31k|                             : NULL))
  |  |  ------------------
  ------------------
 1450|  1.31k|    if (s == NULL)
  ------------------
  |  Branch (1450:9): [True: 0, False: 1.31k]
  ------------------
 1451|      0|        return;
 1452|       |
 1453|       |    /*
 1454|       |     * Ignore return values. This could result in user callbacks being called
 1455|       |     * e.g. for the QUIC TLS record layer. So we do this early before we have
 1456|       |     * freed other things.
 1457|       |     */
 1458|  1.31k|    ssl_free_wbio_buffer(s);
 1459|  1.31k|    RECORD_LAYER_clear(&s->rlayer);
 1460|       |
 1461|  1.31k|    X509_VERIFY_PARAM_free(s->param);
 1462|  1.31k|    dane_final(&s->dane);
 1463|       |
 1464|  1.31k|    BUF_MEM_free(s->init_buf);
 1465|       |
 1466|       |    /* add extra stuff */
 1467|  1.31k|    sk_SSL_CIPHER_free(s->cipher_list);
  ------------------
  |  | 1011|  1.31k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1468|  1.31k|    sk_SSL_CIPHER_free(s->cipher_list_by_id);
  ------------------
  |  | 1011|  1.31k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1469|  1.31k|    sk_SSL_CIPHER_free(s->tls13_ciphersuites);
  ------------------
  |  | 1011|  1.31k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1470|  1.31k|    sk_SSL_CIPHER_free(s->peer_ciphers);
  ------------------
  |  | 1011|  1.31k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 1471|       |
 1472|       |    /* Make the next call work :-) */
 1473|  1.31k|    if (s->session != NULL) {
  ------------------
  |  Branch (1473:9): [True: 1.30k, False: 7]
  ------------------
 1474|  1.30k|        ssl_clear_bad_session(s);
 1475|  1.30k|        SSL_SESSION_free(s->session);
 1476|  1.30k|    }
 1477|  1.31k|    SSL_SESSION_free(s->psksession);
 1478|  1.31k|    OPENSSL_free(s->psksession_id);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1479|       |
 1480|  1.31k|    ssl_cert_free(s->cert);
 1481|  1.31k|    OPENSSL_free(s->shared_sigalgs);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1482|       |    /* Free up if allocated */
 1483|       |
 1484|  1.31k|    OPENSSL_free(s->ext.hostname);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1485|  1.31k|    SSL_CTX_free(s->session_ctx);
 1486|  1.31k|    OPENSSL_free(s->ext.ecpointformats);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1487|  1.31k|    OPENSSL_free(s->ext.peer_ecpointformats);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1488|  1.31k|    OPENSSL_free(s->ext.supportedgroups);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1489|  1.31k|    OPENSSL_free(s->ext.keyshares);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1490|  1.31k|    OPENSSL_free(s->ext.tuples);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1491|  1.31k|    OPENSSL_free(s->ext.peer_supportedgroups);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1492|  1.31k|    sk_X509_EXTENSION_pop_free(s->ext.ocsp.exts, X509_EXTENSION_free);
  ------------------
  |  |  256|  1.31k|#define sk_X509_EXTENSION_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_EXTENSION_sk_type(sk), ossl_check_X509_EXTENSION_freefunc_type(freefunc))
  ------------------
 1493|       |
 1494|  1.31k|#ifndef OPENSSL_NO_OCSP
 1495|  1.31k|    OPENSSL_free(s->ext.ocsp.resp);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1496|  1.31k|    s->ext.ocsp.resp = NULL;
 1497|  1.31k|    s->ext.ocsp.resp_len = 0;
 1498|       |
 1499|  1.31k|    sk_OCSP_RESPID_pop_free(s->ext.ocsp.ids, OCSP_RESPID_free);
  ------------------
  |  |  180|  1.31k|#define sk_OCSP_RESPID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_freefunc_type(freefunc))
  ------------------
 1500|  1.31k|    sk_OCSP_RESPONSE_pop_free(s->ext.ocsp.resp_ex, OCSP_RESPONSE_free);
 1501|  1.31k|    s->ext.ocsp.resp_ex = NULL;
 1502|  1.31k|#endif
 1503|  1.31k|#ifndef OPENSSL_NO_CT
 1504|  1.31k|    SCT_LIST_free(s->scts);
 1505|  1.31k|    OPENSSL_free(s->ext.scts);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1506|  1.31k|#endif
 1507|  1.31k|    OPENSSL_free(s->ext.alpn);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1508|  1.31k|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1509|  1.31k|    if (s->clienthello != NULL)
  ------------------
  |  Branch (1509:9): [True: 0, False: 1.31k]
  ------------------
 1510|      0|        OPENSSL_free(s->clienthello->pre_proc_exts);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1511|  1.31k|    OPENSSL_free(s->clienthello);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1512|  1.31k|    OPENSSL_free(s->pha_context);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1513|  1.31k|    EVP_MD_CTX_free(s->pha_dgst);
 1514|       |
 1515|  1.31k|    sk_X509_NAME_pop_free(s->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  1.31k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 1516|  1.31k|    sk_X509_NAME_pop_free(s->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  1.31k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 1517|       |
 1518|  1.31k|    OPENSSL_free(s->client_cert_type);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1519|  1.31k|    OPENSSL_free(s->server_cert_type);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1520|       |
 1521|  1.31k|    OSSL_STACK_OF_X509_free(s->verified_chain);
 1522|       |
 1523|  1.31k|    if (ssl->method != NULL)
  ------------------
  |  Branch (1523:9): [True: 1.31k, False: 0]
  ------------------
 1524|  1.31k|        ssl->method->ssl_deinit(ssl);
 1525|       |
 1526|  1.31k|    ASYNC_WAIT_CTX_free(s->waitctx);
 1527|       |
 1528|  1.31k|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1529|  1.31k|    OPENSSL_free(s->ext.npn);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1530|  1.31k|#endif
 1531|       |
 1532|  1.31k|#ifndef OPENSSL_NO_SRTP
 1533|  1.31k|    sk_SRTP_PROTECTION_PROFILE_free(s->srtp_profiles);
  ------------------
  |  |  256|  1.31k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 1534|  1.31k|#endif
 1535|       |
 1536|       |    /*
 1537|       |     * We do this late. We want to ensure that any other references we held to
 1538|       |     * these BIOs are freed first *before* we call BIO_free_all(), because
 1539|       |     * BIO_free_all() will only free each BIO in the chain if the number of
 1540|       |     * references to the first BIO have dropped to 0
 1541|       |     */
 1542|  1.31k|    BIO_free_all(s->wbio);
 1543|  1.31k|    s->wbio = NULL;
 1544|  1.31k|    BIO_free_all(s->rbio);
 1545|  1.31k|    s->rbio = NULL;
 1546|  1.31k|    OPENSSL_free(s->s3.tmp.valid_flags);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1547|  1.31k|}
SSL_set0_rbio:
 1550|  1.31k|{
 1551|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1552|       |
 1553|  1.31k|#ifndef OPENSSL_NO_QUIC
 1554|  1.31k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.31k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.31k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.31k, False: 0]
  |  |  ------------------
  ------------------
 1555|      0|        ossl_quic_conn_set0_net_rbio(s, rbio);
 1556|      0|        return;
 1557|      0|    }
 1558|  1.31k|#endif
 1559|       |
 1560|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (1560:9): [True: 0, False: 1.31k]
  ------------------
 1561|      0|        return;
 1562|       |
 1563|  1.31k|    BIO_free_all(sc->rbio);
 1564|  1.31k|    sc->rbio = rbio;
 1565|  1.31k|    sc->rlayer.rrlmethod->set1_bio(sc->rlayer.rrl, sc->rbio);
 1566|  1.31k|}
SSL_set0_wbio:
 1569|  1.31k|{
 1570|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1571|       |
 1572|  1.31k|#ifndef OPENSSL_NO_QUIC
 1573|  1.31k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.31k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.31k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.31k, False: 0]
  |  |  ------------------
  ------------------
 1574|      0|        ossl_quic_conn_set0_net_wbio(s, wbio);
 1575|      0|        return;
 1576|      0|    }
 1577|  1.31k|#endif
 1578|       |
 1579|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (1579:9): [True: 0, False: 1.31k]
  ------------------
 1580|      0|        return;
 1581|       |
 1582|       |    /*
 1583|       |     * If the output buffering BIO is still in place, remove it
 1584|       |     */
 1585|  1.31k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1585:9): [True: 0, False: 1.31k]
  ------------------
 1586|      0|        sc->wbio = BIO_pop(sc->wbio);
 1587|       |
 1588|  1.31k|    BIO_free_all(sc->wbio);
 1589|  1.31k|    sc->wbio = wbio;
 1590|       |
 1591|       |    /* Re-attach |bbio| to the new |wbio|. */
 1592|  1.31k|    if (sc->bbio != NULL)
  ------------------
  |  Branch (1592:9): [True: 0, False: 1.31k]
  ------------------
 1593|      0|        sc->wbio = BIO_push(sc->bbio, sc->wbio);
 1594|       |
 1595|  1.31k|    sc->rlayer.wrlmethod->set1_bio(sc->rlayer.wrl, sc->wbio);
 1596|  1.31k|}
SSL_get_rbio:
 1641|    249|{
 1642|    249|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    249|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    249|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 249]
  |  |  |  |  ------------------
  |  |  |  |   33|    249|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|    249|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 249, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    249|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    249|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 1643|       |
 1644|    249|#ifndef OPENSSL_NO_QUIC
 1645|    249|    if (IS_QUIC(s))
  ------------------
  |  |   96|    249|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    249|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 249]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 249, False: 0]
  |  |  ------------------
  ------------------
 1646|      0|        return ossl_quic_conn_get_net_rbio(s);
 1647|    249|#endif
 1648|       |
 1649|    249|    if (sc == NULL)
  ------------------
  |  Branch (1649:9): [True: 0, False: 249]
  ------------------
 1650|      0|        return NULL;
 1651|       |
 1652|    249|    return sc->rbio;
 1653|    249|}
SSL_connect:
 2209|  1.56k|{
 2210|  1.56k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.56k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.56k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.56k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.56k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.56k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.56k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.56k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2211|       |
 2212|  1.56k|#ifndef OPENSSL_NO_QUIC
 2213|  1.56k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  1.56k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.56k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.56k, False: 0]
  |  |  ------------------
  ------------------
 2214|      0|        return s->method->ssl_connect(s);
 2215|  1.56k|#endif
 2216|       |
 2217|  1.56k|    if (sc == NULL)
  ------------------
  |  Branch (2217:9): [True: 0, False: 1.56k]
  ------------------
 2218|      0|        return 0;
 2219|       |
 2220|  1.56k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (2220:9): [True: 0, False: 1.56k]
  ------------------
 2221|       |        /* Not properly initialized yet */
 2222|      0|        SSL_set_connect_state(s);
 2223|      0|    }
 2224|       |
 2225|  1.56k|    return SSL_do_handshake(s);
 2226|  1.56k|}
SSL_ctrl:
 2944|     28|{
 2945|     28|    return ossl_ctrl_internal(s, cmd, larg, parg, /*no_quic=*/0);
 2946|     28|}
ossl_ctrl_internal:
 2949|     28|{
 2950|     28|    long l;
 2951|     28|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|     28|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|     28|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 28]
  |  |  |  |  ------------------
  |  |  |  |   33|     28|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|     28|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 28, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|     28|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|     28|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 2952|       |
 2953|       |    /*
 2954|       |     * Routing of ctrl calls for QUIC is a little counterintuitive:
 2955|       |     *
 2956|       |     *   - Firstly (no_quic=0), we pass the ctrl directly to our QUIC
 2957|       |     *     implementation in case it wants to handle the ctrl specially.
 2958|       |     *
 2959|       |     *   - If our QUIC implementation does not care about the ctrl, it
 2960|       |     *     will reenter this function with no_quic=1 and we will try to handle
 2961|       |     *     it directly using the QCSO SSL object stub (not the handshake layer
 2962|       |     *     SSL object). This is important for e.g. the version configuration
 2963|       |     *     ctrls below, which must use s->defltmeth (and not sc->defltmeth).
 2964|       |     *
 2965|       |     *   - If we don't handle a ctrl here specially, then processing is
 2966|       |     *     redirected to the handshake layer SSL object.
 2967|       |     */
 2968|     28|    if (!no_quic && IS_QUIC(s))
  ------------------
  |  |   96|     28|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|     28|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 28, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2968:9): [True: 28, False: 0]
  ------------------
 2969|      0|        return s->method->ssl_ctrl(s, cmd, larg, parg);
 2970|       |
 2971|     28|    if (sc == NULL)
  ------------------
  |  Branch (2971:9): [True: 0, False: 28]
  ------------------
 2972|      0|        return 0;
 2973|       |
 2974|     28|    switch (cmd) {
 2975|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1303|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (2975:5): [True: 0, False: 28]
  ------------------
 2976|      0|        return RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 2977|      0|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1304|      0|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (2977:5): [True: 0, False: 28]
  ------------------
 2978|      0|        l = RECORD_LAYER_get_read_ahead(&sc->rlayer);
  ------------------
  |  |  135|      0|#define RECORD_LAYER_get_read_ahead(rl) ((rl)->read_ahead)
  ------------------
 2979|      0|        RECORD_LAYER_set_read_ahead(&sc->rlayer, larg);
  ------------------
  |  |  134|      0|#define RECORD_LAYER_set_read_ahead(rl, ra) ((rl)->read_ahead = (ra))
  ------------------
 2980|      0|        return l;
 2981|       |
 2982|      0|    case SSL_CTRL_MODE: {
  ------------------
  |  | 1302|      0|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (2982:5): [True: 0, False: 28]
  ------------------
 2983|      0|        OSSL_PARAM options[2], *opts = options;
 2984|       |
 2985|      0|        sc->mode |= larg;
 2986|       |
 2987|      0|        *opts++ = OSSL_PARAM_construct_uint32(OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE,
  ------------------
  |  |  331|      0|# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
  ------------------
 2988|      0|            &sc->mode);
 2989|      0|        *opts = OSSL_PARAM_construct_end();
 2990|       |
 2991|       |        /* Ignore return value */
 2992|      0|        sc->rlayer.rrlmethod->set_options(sc->rlayer.rrl, options);
 2993|       |
 2994|      0|        return sc->mode;
 2995|      0|    }
 2996|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1345|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (2996:5): [True: 0, False: 28]
  ------------------
 2997|      0|        return (sc->mode &= ~larg);
 2998|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1309|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (2998:5): [True: 0, False: 28]
  ------------------
 2999|      0|        return (long)sc->max_cert_list;
 3000|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1310|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3000:5): [True: 0, False: 28]
  ------------------
 3001|      0|        if (larg < 0)
  ------------------
  |  Branch (3001:13): [True: 0, False: 0]
  ------------------
 3002|      0|            return 0;
 3003|      0|        l = (long)sc->max_cert_list;
 3004|      0|        sc->max_cert_list = (size_t)larg;
 3005|      0|        return l;
 3006|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1311|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3006:5): [True: 0, False: 28]
  ------------------
 3007|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3007:13): [True: 0, False: 0]
  |  Branch (3007:27): [True: 0, False: 0]
  ------------------
 3008|      0|            return 0;
 3009|       |#ifndef OPENSSL_NO_KTLS
 3010|       |        if (sc->wbio != NULL && BIO_get_ktls_send(sc->wbio))
 3011|       |            return 0;
 3012|       |#endif /* OPENSSL_NO_KTLS */
 3013|      0|        sc->max_send_fragment = larg;
 3014|      0|        if (sc->max_send_fragment < sc->split_send_fragment)
  ------------------
  |  Branch (3014:13): [True: 0, False: 0]
  ------------------
 3015|      0|            sc->split_send_fragment = sc->max_send_fragment;
 3016|      0|        sc->rlayer.wrlmethod->set_max_frag_len(sc->rlayer.wrl, larg);
 3017|      0|        return 1;
 3018|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1379|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3018:5): [True: 0, False: 28]
  ------------------
 3019|      0|        if ((size_t)larg > sc->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3019:13): [True: 0, False: 0]
  |  Branch (3019:53): [True: 0, False: 0]
  ------------------
 3020|      0|            return 0;
 3021|      0|        sc->split_send_fragment = larg;
 3022|      0|        return 1;
 3023|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1380|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3023:5): [True: 0, False: 28]
  ------------------
 3024|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   71|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3024:13): [True: 0, False: 0]
  |  Branch (3024:25): [True: 0, False: 0]
  ------------------
 3025|      0|            return 0;
 3026|      0|        sc->max_pipelines = larg;
 3027|      0|        if (sc->rlayer.rrlmethod->set_max_pipelines != NULL)
  ------------------
  |  Branch (3027:13): [True: 0, False: 0]
  ------------------
 3028|      0|            sc->rlayer.rrlmethod->set_max_pipelines(sc->rlayer.rrl, (size_t)larg);
 3029|      0|        return 1;
 3030|      0|    case SSL_CTRL_GET_RI_SUPPORT:
  ------------------
  |  | 1344|      0|#define SSL_CTRL_GET_RI_SUPPORT 76
  ------------------
  |  Branch (3030:5): [True: 0, False: 28]
  ------------------
 3031|      0|        return sc->s3.send_connection_binding;
 3032|      0|    case SSL_CTRL_SET_RETRY_VERIFY:
  ------------------
  |  | 1390|      0|#define SSL_CTRL_SET_RETRY_VERIFY 136
  ------------------
  |  Branch (3032:5): [True: 0, False: 28]
  ------------------
 3033|      0|        sc->rwstate = SSL_RETRY_VERIFY;
  ------------------
  |  |  939|      0|#define SSL_RETRY_VERIFY 8
  ------------------
 3034|      0|        return 1;
 3035|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1357|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3035:5): [True: 0, False: 28]
  ------------------
 3036|      0|        return (sc->cert->cert_flags |= larg);
 3037|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1358|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3037:5): [True: 0, False: 28]
  ------------------
 3038|      0|        return (sc->cert->cert_flags &= ~larg);
 3039|       |
 3040|      0|    case SSL_CTRL_GET_RAW_CIPHERLIST:
  ------------------
  |  | 1368|      0|#define SSL_CTRL_GET_RAW_CIPHERLIST 110
  ------------------
  |  Branch (3040:5): [True: 0, False: 28]
  ------------------
 3041|      0|        if (parg) {
  ------------------
  |  Branch (3041:13): [True: 0, False: 0]
  ------------------
 3042|      0|            if (sc->s3.tmp.ciphers_raw == NULL)
  ------------------
  |  Branch (3042:17): [True: 0, False: 0]
  ------------------
 3043|      0|                return 0;
 3044|      0|            *(unsigned char **)parg = sc->s3.tmp.ciphers_raw;
 3045|      0|            return (int)sc->s3.tmp.ciphers_rawlen;
 3046|      0|        } else {
 3047|      0|            return TLS_CIPHER_LEN;
  ------------------
  |  |  379|      0|#define TLS_CIPHER_LEN 2
  ------------------
 3048|      0|        }
 3049|      0|    case SSL_CTRL_GET_EXTMS_SUPPORT:
  ------------------
  |  | 1376|      0|#define SSL_CTRL_GET_EXTMS_SUPPORT 122
  ------------------
  |  Branch (3049:5): [True: 0, False: 28]
  ------------------
 3050|      0|        if (!sc->session || SSL_in_init(s) || ossl_statem_get_in_handshake(sc))
  ------------------
  |  Branch (3050:13): [True: 0, False: 0]
  |  Branch (3050:29): [True: 0, False: 0]
  |  Branch (3050:47): [True: 0, False: 0]
  ------------------
 3051|      0|            return -1;
 3052|      0|        if (sc->session->flags & SSL_SESS_FLAG_EXTMS)
  ------------------
  |  |  567|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  |  Branch (3052:13): [True: 0, False: 0]
  ------------------
 3053|      0|            return 1;
 3054|      0|        else
 3055|      0|            return 0;
 3056|      0|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1377|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3056:5): [True: 0, False: 28]
  ------------------
 3057|      0|        return ssl_check_allowed_versions(larg, sc->max_proto_version)
  ------------------
  |  Branch (3057:16): [True: 0, False: 0]
  ------------------
 3058|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3058:16): [True: 0, False: 0]
  ------------------
 3059|      0|                &sc->min_proto_version);
 3060|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3060:5): [True: 0, False: 28]
  ------------------
 3061|      0|        return sc->min_proto_version;
 3062|      0|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1378|      0|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3062:5): [True: 0, False: 28]
  ------------------
 3063|      0|        return ssl_check_allowed_versions(sc->min_proto_version, larg)
  ------------------
  |  Branch (3063:16): [True: 0, False: 0]
  ------------------
 3064|      0|            && ssl_set_version_bound(s->defltmeth->version, (int)larg,
  ------------------
  |  Branch (3064:16): [True: 0, False: 0]
  ------------------
 3065|      0|                &sc->max_proto_version);
 3066|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3066:5): [True: 0, False: 28]
  ------------------
 3067|      0|        return sc->max_proto_version;
 3068|     28|    default:
  ------------------
  |  Branch (3068:5): [True: 28, False: 0]
  ------------------
 3069|     28|        if (IS_QUIC(s))
  ------------------
  |  |   96|     28|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|     28|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 28, False: 0]
  |  |  ------------------
  ------------------
 3070|      0|            return SSL_ctrl((SSL *)sc, cmd, larg, parg);
 3071|     28|        else
 3072|     28|            return s->method->ssl_ctrl(s, cmd, larg, parg);
 3073|     28|    }
 3074|     28|}
SSL_CTX_ctrl:
 3098|  11.6k|{
 3099|  11.6k|    long l;
 3100|       |
 3101|       |    /* For some cases with ctx == NULL or larg == 1 perform syntax checks */
 3102|  11.6k|    if (cmd == SSL_CTRL_SET_GROUPS_LIST && larg == 1)
  ------------------
  |  | 1353|  23.3k|#define SSL_CTRL_SET_GROUPS_LIST 92
  ------------------
  |  Branch (3102:9): [True: 2.09k, False: 9.57k]
  |  Branch (3102:44): [True: 0, False: 2.09k]
  ------------------
 3103|      0|        return tls1_set_groups_list(ctx, NULL, NULL, NULL, NULL, NULL, NULL, parg);
 3104|  11.6k|    if (ctx == NULL) {
  ------------------
  |  Branch (3104:9): [True: 0, False: 11.6k]
  ------------------
 3105|      0|        switch (cmd) {
 3106|      0|        case SSL_CTRL_SET_SIGALGS_LIST:
  ------------------
  |  | 1356|      0|#define SSL_CTRL_SET_SIGALGS_LIST 98
  ------------------
  |  Branch (3106:9): [True: 0, False: 0]
  ------------------
 3107|      0|        case SSL_CTRL_SET_CLIENT_SIGALGS_LIST:
  ------------------
  |  | 1360|      0|#define SSL_CTRL_SET_CLIENT_SIGALGS_LIST 102
  ------------------
  |  Branch (3107:9): [True: 0, False: 0]
  ------------------
 3108|      0|            return tls1_set_sigalgs_list(ctx, NULL, parg, 0);
 3109|      0|        default:
  ------------------
  |  Branch (3109:9): [True: 0, False: 0]
  ------------------
 3110|      0|            return 0;
 3111|      0|        }
 3112|      0|    }
 3113|       |
 3114|  11.6k|    switch (cmd) {
 3115|      0|    case SSL_CTRL_GET_READ_AHEAD:
  ------------------
  |  | 1303|      0|#define SSL_CTRL_GET_READ_AHEAD 40
  ------------------
  |  Branch (3115:5): [True: 0, False: 11.6k]
  ------------------
 3116|      0|        return ctx->read_ahead;
 3117|  2.06k|    case SSL_CTRL_SET_READ_AHEAD:
  ------------------
  |  | 1304|  2.06k|#define SSL_CTRL_SET_READ_AHEAD 41
  ------------------
  |  Branch (3117:5): [True: 2.06k, False: 9.60k]
  ------------------
 3118|  2.06k|        l = ctx->read_ahead;
 3119|  2.06k|        ctx->read_ahead = larg;
 3120|  2.06k|        return l;
 3121|       |
 3122|      0|    case SSL_CTRL_SET_MSG_CALLBACK_ARG:
  ------------------
  |  | 1286|      0|#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
  ------------------
  |  Branch (3122:5): [True: 0, False: 11.6k]
  ------------------
 3123|      0|        ctx->msg_callback_arg = parg;
 3124|      0|        return 1;
 3125|       |
 3126|      0|    case SSL_CTRL_GET_MAX_CERT_LIST:
  ------------------
  |  | 1309|      0|#define SSL_CTRL_GET_MAX_CERT_LIST 50
  ------------------
  |  Branch (3126:5): [True: 0, False: 11.6k]
  ------------------
 3127|      0|        return (long)ctx->max_cert_list;
 3128|      0|    case SSL_CTRL_SET_MAX_CERT_LIST:
  ------------------
  |  | 1310|      0|#define SSL_CTRL_SET_MAX_CERT_LIST 51
  ------------------
  |  Branch (3128:5): [True: 0, False: 11.6k]
  ------------------
 3129|      0|        if (larg < 0)
  ------------------
  |  Branch (3129:13): [True: 0, False: 0]
  ------------------
 3130|      0|            return 0;
 3131|      0|        l = (long)ctx->max_cert_list;
 3132|      0|        ctx->max_cert_list = (size_t)larg;
 3133|      0|        return l;
 3134|       |
 3135|      0|    case SSL_CTRL_SET_SESS_CACHE_SIZE:
  ------------------
  |  | 1305|      0|#define SSL_CTRL_SET_SESS_CACHE_SIZE 42
  ------------------
  |  Branch (3135:5): [True: 0, False: 11.6k]
  ------------------
 3136|      0|        if (larg < 0)
  ------------------
  |  Branch (3136:13): [True: 0, False: 0]
  ------------------
 3137|      0|            return 0;
 3138|      0|        l = (long)ctx->session_cache_size;
 3139|      0|        ctx->session_cache_size = (size_t)larg;
 3140|      0|        return l;
 3141|      0|    case SSL_CTRL_GET_SESS_CACHE_SIZE:
  ------------------
  |  | 1306|      0|#define SSL_CTRL_GET_SESS_CACHE_SIZE 43
  ------------------
  |  Branch (3141:5): [True: 0, False: 11.6k]
  ------------------
 3142|      0|        return (long)ctx->session_cache_size;
 3143|  1.31k|    case SSL_CTRL_SET_SESS_CACHE_MODE:
  ------------------
  |  | 1307|  1.31k|#define SSL_CTRL_SET_SESS_CACHE_MODE 44
  ------------------
  |  Branch (3143:5): [True: 1.31k, False: 10.3k]
  ------------------
 3144|  1.31k|        l = ctx->session_cache_mode;
 3145|  1.31k|        ctx->session_cache_mode = larg;
 3146|  1.31k|        return l;
 3147|      0|    case SSL_CTRL_GET_SESS_CACHE_MODE:
  ------------------
  |  | 1308|      0|#define SSL_CTRL_GET_SESS_CACHE_MODE 45
  ------------------
  |  Branch (3147:5): [True: 0, False: 11.6k]
  ------------------
 3148|      0|        return ctx->session_cache_mode;
 3149|       |
 3150|      0|    case SSL_CTRL_SESS_NUMBER:
  ------------------
  |  | 1290|      0|#define SSL_CTRL_SESS_NUMBER 20
  ------------------
  |  Branch (3150:5): [True: 0, False: 11.6k]
  ------------------
 3151|      0|        return lh_SSL_SESSION_num_items(ctx->sessions);
 3152|      0|    case SSL_CTRL_SESS_CONNECT:
  ------------------
  |  | 1291|      0|#define SSL_CTRL_SESS_CONNECT 21
  ------------------
  |  Branch (3152:5): [True: 0, False: 11.6k]
  ------------------
 3153|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect);
 3154|      0|    case SSL_CTRL_SESS_CONNECT_GOOD:
  ------------------
  |  | 1292|      0|#define SSL_CTRL_SESS_CONNECT_GOOD 22
  ------------------
  |  Branch (3154:5): [True: 0, False: 11.6k]
  ------------------
 3155|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_good);
 3156|      0|    case SSL_CTRL_SESS_CONNECT_RENEGOTIATE:
  ------------------
  |  | 1293|      0|#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
  ------------------
  |  Branch (3156:5): [True: 0, False: 11.6k]
  ------------------
 3157|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_connect_renegotiate);
 3158|      0|    case SSL_CTRL_SESS_ACCEPT:
  ------------------
  |  | 1294|      0|#define SSL_CTRL_SESS_ACCEPT 24
  ------------------
  |  Branch (3158:5): [True: 0, False: 11.6k]
  ------------------
 3159|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept);
 3160|      0|    case SSL_CTRL_SESS_ACCEPT_GOOD:
  ------------------
  |  | 1295|      0|#define SSL_CTRL_SESS_ACCEPT_GOOD 25
  ------------------
  |  Branch (3160:5): [True: 0, False: 11.6k]
  ------------------
 3161|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_good);
 3162|      0|    case SSL_CTRL_SESS_ACCEPT_RENEGOTIATE:
  ------------------
  |  | 1296|      0|#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
  ------------------
  |  Branch (3162:5): [True: 0, False: 11.6k]
  ------------------
 3163|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_accept_renegotiate);
 3164|      0|    case SSL_CTRL_SESS_HIT:
  ------------------
  |  | 1297|      0|#define SSL_CTRL_SESS_HIT 27
  ------------------
  |  Branch (3164:5): [True: 0, False: 11.6k]
  ------------------
 3165|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_hit);
 3166|      0|    case SSL_CTRL_SESS_CB_HIT:
  ------------------
  |  | 1298|      0|#define SSL_CTRL_SESS_CB_HIT 28
  ------------------
  |  Branch (3166:5): [True: 0, False: 11.6k]
  ------------------
 3167|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cb_hit);
 3168|      0|    case SSL_CTRL_SESS_MISSES:
  ------------------
  |  | 1299|      0|#define SSL_CTRL_SESS_MISSES 29
  ------------------
  |  Branch (3168:5): [True: 0, False: 11.6k]
  ------------------
 3169|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_miss);
 3170|      0|    case SSL_CTRL_SESS_TIMEOUTS:
  ------------------
  |  | 1300|      0|#define SSL_CTRL_SESS_TIMEOUTS 30
  ------------------
  |  Branch (3170:5): [True: 0, False: 11.6k]
  ------------------
 3171|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_timeout);
 3172|      0|    case SSL_CTRL_SESS_CACHE_FULL:
  ------------------
  |  | 1301|      0|#define SSL_CTRL_SESS_CACHE_FULL 31
  ------------------
  |  Branch (3172:5): [True: 0, False: 11.6k]
  ------------------
 3173|      0|        return ssl_tsan_load(ctx, &ctx->stats.sess_cache_full);
 3174|  2.06k|    case SSL_CTRL_MODE:
  ------------------
  |  | 1302|  2.06k|#define SSL_CTRL_MODE 33
  ------------------
  |  Branch (3174:5): [True: 2.06k, False: 9.60k]
  ------------------
 3175|  2.06k|        return (ctx->mode |= larg);
 3176|      0|    case SSL_CTRL_CLEAR_MODE:
  ------------------
  |  | 1345|      0|#define SSL_CTRL_CLEAR_MODE 78
  ------------------
  |  Branch (3176:5): [True: 0, False: 11.6k]
  ------------------
 3177|      0|        return (ctx->mode &= ~larg);
 3178|      0|    case SSL_CTRL_SET_MAX_SEND_FRAGMENT:
  ------------------
  |  | 1311|      0|#define SSL_CTRL_SET_MAX_SEND_FRAGMENT 52
  ------------------
  |  Branch (3178:5): [True: 0, False: 11.6k]
  ------------------
 3179|      0|        if (larg < 512 || larg > SSL3_RT_MAX_PLAIN_LENGTH)
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (3179:13): [True: 0, False: 0]
  |  Branch (3179:27): [True: 0, False: 0]
  ------------------
 3180|      0|            return 0;
 3181|      0|        ctx->max_send_fragment = larg;
 3182|      0|        if (ctx->max_send_fragment < ctx->split_send_fragment)
  ------------------
  |  Branch (3182:13): [True: 0, False: 0]
  ------------------
 3183|      0|            ctx->split_send_fragment = ctx->max_send_fragment;
 3184|      0|        return 1;
 3185|      0|    case SSL_CTRL_SET_SPLIT_SEND_FRAGMENT:
  ------------------
  |  | 1379|      0|#define SSL_CTRL_SET_SPLIT_SEND_FRAGMENT 125
  ------------------
  |  Branch (3185:5): [True: 0, False: 11.6k]
  ------------------
 3186|      0|        if ((size_t)larg > ctx->max_send_fragment || larg == 0)
  ------------------
  |  Branch (3186:13): [True: 0, False: 0]
  |  Branch (3186:54): [True: 0, False: 0]
  ------------------
 3187|      0|            return 0;
 3188|      0|        ctx->split_send_fragment = larg;
 3189|      0|        return 1;
 3190|      0|    case SSL_CTRL_SET_MAX_PIPELINES:
  ------------------
  |  | 1380|      0|#define SSL_CTRL_SET_MAX_PIPELINES 126
  ------------------
  |  Branch (3190:5): [True: 0, False: 11.6k]
  ------------------
 3191|      0|        if (larg < 1 || larg > SSL_MAX_PIPELINES)
  ------------------
  |  |   71|      0|#define SSL_MAX_PIPELINES 32
  ------------------
  |  Branch (3191:13): [True: 0, False: 0]
  |  Branch (3191:25): [True: 0, False: 0]
  ------------------
 3192|      0|            return 0;
 3193|      0|        ctx->max_pipelines = larg;
 3194|      0|        return 1;
 3195|      0|    case SSL_CTRL_CERT_FLAGS:
  ------------------
  |  | 1357|      0|#define SSL_CTRL_CERT_FLAGS 99
  ------------------
  |  Branch (3195:5): [True: 0, False: 11.6k]
  ------------------
 3196|      0|        return (ctx->cert->cert_flags |= larg);
 3197|      0|    case SSL_CTRL_CLEAR_CERT_FLAGS:
  ------------------
  |  | 1358|      0|#define SSL_CTRL_CLEAR_CERT_FLAGS 100
  ------------------
  |  Branch (3197:5): [True: 0, False: 11.6k]
  ------------------
 3198|      0|        return (ctx->cert->cert_flags &= ~larg);
 3199|  2.06k|    case SSL_CTRL_SET_MIN_PROTO_VERSION:
  ------------------
  |  | 1377|  2.06k|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  ------------------
  |  Branch (3199:5): [True: 2.06k, False: 9.60k]
  ------------------
 3200|  2.06k|        return ssl_check_allowed_versions(larg, ctx->max_proto_version)
  ------------------
  |  Branch (3200:16): [True: 2.06k, False: 0]
  ------------------
 3201|  2.06k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3201:16): [True: 2.06k, False: 0]
  ------------------
 3202|  2.06k|                &ctx->min_proto_version);
 3203|      0|    case SSL_CTRL_GET_MIN_PROTO_VERSION:
  ------------------
  |  | 1384|      0|#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
  ------------------
  |  Branch (3203:5): [True: 0, False: 11.6k]
  ------------------
 3204|      0|        return ctx->min_proto_version;
 3205|  2.06k|    case SSL_CTRL_SET_MAX_PROTO_VERSION:
  ------------------
  |  | 1378|  2.06k|#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
  ------------------
  |  Branch (3205:5): [True: 2.06k, False: 9.60k]
  ------------------
 3206|  2.06k|        return ssl_check_allowed_versions(ctx->min_proto_version, larg)
  ------------------
  |  Branch (3206:16): [True: 2.06k, False: 0]
  ------------------
 3207|  2.06k|            && ssl_set_version_bound(ctx->method->version, (int)larg,
  ------------------
  |  Branch (3207:16): [True: 2.06k, False: 0]
  ------------------
 3208|  2.06k|                &ctx->max_proto_version);
 3209|      0|    case SSL_CTRL_GET_MAX_PROTO_VERSION:
  ------------------
  |  | 1385|      0|#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
  ------------------
  |  Branch (3209:5): [True: 0, False: 11.6k]
  ------------------
 3210|      0|        return ctx->max_proto_version;
 3211|  2.09k|    default:
  ------------------
  |  Branch (3211:5): [True: 2.09k, False: 9.57k]
  ------------------
 3212|  2.09k|        return ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg);
 3213|  11.6k|    }
 3214|  11.6k|}
ssl_cipher_ptr_id_cmp:
 3241|   617k|{
 3242|   617k|    if ((*ap)->id > (*bp)->id)
  ------------------
  |  Branch (3242:9): [True: 347k, False: 270k]
  ------------------
 3243|   347k|        return 1;
 3244|   270k|    if ((*ap)->id < (*bp)->id)
  ------------------
  |  Branch (3244:9): [True: 270k, False: 117]
  ------------------
 3245|   270k|        return -1;
 3246|    117|    return 0;
 3247|   270k|}
SSL_get_ciphers:
 3254|  3.79k|{
 3255|  3.79k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  3.79k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  3.79k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 3.79k]
  |  |  |  |  ------------------
  |  |  |  |   33|  3.79k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  3.79k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 3.79k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  3.79k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  3.79k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3256|       |
 3257|  3.79k|    if (sc != NULL) {
  ------------------
  |  Branch (3257:9): [True: 3.79k, False: 0]
  ------------------
 3258|  3.79k|        if (sc->cipher_list != NULL) {
  ------------------
  |  Branch (3258:13): [True: 0, False: 3.79k]
  ------------------
 3259|      0|            return sc->cipher_list;
 3260|  3.79k|        } else if ((s->ctx != NULL) && (s->ctx->cipher_list != NULL)) {
  ------------------
  |  Branch (3260:20): [True: 3.79k, False: 0]
  |  Branch (3260:40): [True: 3.79k, False: 0]
  ------------------
 3261|  3.79k|            return s->ctx->cipher_list;
 3262|  3.79k|        }
 3263|  3.79k|    }
 3264|      0|    return NULL;
 3265|  3.79k|}
SSL_get1_supported_ciphers:
 3277|  2.48k|{
 3278|  2.48k|    STACK_OF(SSL_CIPHER) *sk = NULL, *ciphers;
  ------------------
  |  |   33|  2.48k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3279|  2.48k|    int i;
 3280|  2.48k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  2.48k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  2.48k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.48k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.48k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.48k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.48k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.48k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3281|       |
 3282|  2.48k|    if (sc == NULL)
  ------------------
  |  Branch (3282:9): [True: 0, False: 2.48k]
  ------------------
 3283|      0|        return NULL;
 3284|       |
 3285|  2.48k|    ciphers = SSL_get_ciphers(s);
 3286|  2.48k|    if (!ciphers)
  ------------------
  |  Branch (3286:9): [True: 0, False: 2.48k]
  ------------------
 3287|      0|        return NULL;
 3288|  2.48k|    if (!ssl_set_client_disabled(sc))
  ------------------
  |  Branch (3288:9): [True: 0, False: 2.48k]
  ------------------
 3289|      0|        return NULL;
 3290|   144k|    for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1005|   144k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3290:17): [True: 142k, False: 2.48k]
  ------------------
 3291|   142k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1006|   142k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3292|   142k|        if (!ssl_cipher_disabled(sc, c, SSL_SECOP_CIPHER_SUPPORTED, 0)) {
  ------------------
  |  | 2752|   142k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|   142k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3292:13): [True: 69.9k, False: 72.4k]
  ------------------
 3293|  69.9k|            if (!sk)
  ------------------
  |  Branch (3293:17): [True: 2.48k, False: 67.4k]
  ------------------
 3294|  2.48k|                sk = sk_SSL_CIPHER_new_null();
  ------------------
  |  | 1008|  2.48k|#define sk_SSL_CIPHER_new_null() ((STACK_OF(SSL_CIPHER) *)OPENSSL_sk_new_null())
  ------------------
 3295|  69.9k|            if (!sk)
  ------------------
  |  Branch (3295:17): [True: 0, False: 69.9k]
  ------------------
 3296|      0|                return NULL;
 3297|  69.9k|            if (!sk_SSL_CIPHER_push(sk, c)) {
  ------------------
  |  | 1015|  69.9k|#define sk_SSL_CIPHER_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_CIPHER_sk_type(sk), ossl_check_SSL_CIPHER_type(ptr))
  ------------------
  |  Branch (3297:17): [True: 0, False: 69.9k]
  ------------------
 3298|      0|                sk_SSL_CIPHER_free(sk);
  ------------------
  |  | 1011|      0|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 3299|      0|                return NULL;
 3300|      0|            }
 3301|  69.9k|        }
 3302|   142k|    }
 3303|  2.48k|    return sk;
 3304|  2.48k|}
SSL_CTX_set_cipher_list:
 3368|    839|{
 3369|    839|    STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|    839|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3370|       |
 3371|    839|    sk = ssl_create_cipher_list(ctx, ctx->tls13_ciphersuites,
 3372|    839|        &ctx->cipher_list, &ctx->cipher_list_by_id, str,
 3373|    839|        ctx->cert);
 3374|       |    /*
 3375|       |     * ssl_create_cipher_list may return an empty stack if it was unable to
 3376|       |     * find a cipher matching the given rule string (for example if the rule
 3377|       |     * string specifies a cipher which has been disabled). This is not an
 3378|       |     * error as far as ssl_create_cipher_list is concerned, and hence
 3379|       |     * ctx->cipher_list and ctx->cipher_list_by_id has been updated.
 3380|       |     */
 3381|    839|    if (sk == NULL)
  ------------------
  |  Branch (3381:9): [True: 335, False: 504]
  ------------------
 3382|    335|        return 0;
 3383|    504|    if (ctx->method->num_ciphers() > 0 && cipher_list_tls12_num(sk) == 0) {
  ------------------
  |  Branch (3383:9): [True: 504, False: 0]
  |  Branch (3383:43): [True: 253, False: 251]
  ------------------
 3384|    253|        ERR_raise(ERR_LIB_SSL, SSL_R_NO_CIPHER_MATCH);
  ------------------
  |  |  404|    253|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|    253|    (ERR_new(),                                                  \
  |  |  |  |  407|    253|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|    253|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|    253|        ERR_set_error)
  |  |  ------------------
  ------------------
 3385|    253|        return 0;
 3386|    253|    }
 3387|    251|    return 1;
 3388|    504|}
SSL_set_alpn_protos:
 3752|  1.31k|{
 3753|  1.31k|    unsigned char *alpn;
 3754|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 3755|       |
 3756|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (3756:9): [True: 0, False: 1.31k]
  ------------------
 3757|      0|        return 1;
 3758|       |
 3759|  1.31k|    if (protos_len == 0 || protos == NULL) {
  ------------------
  |  Branch (3759:9): [True: 0, False: 1.31k]
  |  Branch (3759:28): [True: 0, False: 1.31k]
  ------------------
 3760|      0|        OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3761|      0|        sc->ext.alpn = NULL;
 3762|      0|        sc->ext.alpn_len = 0;
 3763|      0|        return 0;
 3764|      0|    }
 3765|       |    /* Not valid per RFC */
 3766|  1.31k|    if (!alpn_value_ok(protos, protos_len))
  ------------------
  |  Branch (3766:9): [True: 0, False: 1.31k]
  ------------------
 3767|      0|        return 1;
 3768|       |
 3769|  1.31k|    alpn = OPENSSL_memdup(protos, protos_len);
  ------------------
  |  |  133|  1.31k|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3770|  1.31k|    if (alpn == NULL)
  ------------------
  |  Branch (3770:9): [True: 0, False: 1.31k]
  ------------------
 3771|      0|        return 1;
 3772|  1.31k|    OPENSSL_free(sc->ext.alpn);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 3773|  1.31k|    sc->ext.alpn = alpn;
 3774|  1.31k|    sc->ext.alpn_len = protos_len;
 3775|       |
 3776|  1.31k|    return 0;
 3777|  1.31k|}
SSL_CTX_new_ex:
 3991|  2.09k|{
 3992|  2.09k|    SSL_CTX *ret = NULL;
 3993|       |#ifndef OPENSSL_NO_SSLKEYLOG
 3994|       |    const char *keylogfile = ossl_safe_getenv("SSLKEYLOGFILE");
 3995|       |#endif
 3996|       |#ifndef OPENSSL_NO_COMP_ALG
 3997|       |    int i;
 3998|       |#endif
 3999|       |
 4000|  2.09k|    if (meth == NULL) {
  ------------------
  |  Branch (4000:9): [True: 0, False: 2.09k]
  ------------------
 4001|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_NULL_SSL_METHOD_PASSED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4002|      0|        return NULL;
 4003|      0|    }
 4004|       |
 4005|  2.09k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2822|  2.09k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (4005:9): [True: 0, False: 2.09k]
  ------------------
 4006|      0|        return NULL;
 4007|       |
 4008|       |    /* Doing this for the run once effect */
 4009|  2.09k|    if (SSL_get_ex_data_X509_STORE_CTX_idx() < 0) {
  ------------------
  |  Branch (4009:9): [True: 0, False: 2.09k]
  ------------------
 4010|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_X509_VERIFICATION_SETUP_PROBLEMS);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4011|      0|        goto err;
 4012|      0|    }
 4013|       |
 4014|  2.09k|    ret = OPENSSL_zalloc(sizeof(*ret));
  ------------------
  |  |  108|  2.09k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4015|  2.09k|    if (ret == NULL)
  ------------------
  |  Branch (4015:9): [True: 0, False: 2.09k]
  ------------------
 4016|      0|        return NULL;
 4017|       |
 4018|       |    /* Init the reference counting before any call to SSL_CTX_free */
 4019|  2.09k|    if (!CRYPTO_NEW_REF(&ret->references, 1)) {
  ------------------
  |  Branch (4019:9): [True: 0, False: 2.09k]
  ------------------
 4020|      0|        OPENSSL_free(ret);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4021|      0|        return NULL;
 4022|      0|    }
 4023|       |
 4024|  2.09k|    ret->lock = CRYPTO_THREAD_lock_new();
 4025|  2.09k|    if (ret->lock == NULL) {
  ------------------
  |  Branch (4025:9): [True: 0, False: 2.09k]
  ------------------
 4026|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4027|      0|        goto err;
 4028|      0|    }
 4029|       |
 4030|       |#ifdef TSAN_REQUIRES_LOCKING
 4031|       |    ret->tsan_lock = CRYPTO_THREAD_lock_new();
 4032|       |    if (ret->tsan_lock == NULL) {
 4033|       |        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
 4034|       |        goto err;
 4035|       |    }
 4036|       |#endif
 4037|       |
 4038|  2.09k|    ret->libctx = libctx;
 4039|  2.09k|    if (propq != NULL) {
  ------------------
  |  Branch (4039:9): [True: 520, False: 1.57k]
  ------------------
 4040|    520|        ret->propq = OPENSSL_strdup(propq);
  ------------------
  |  |  135|    520|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4041|    520|        if (ret->propq == NULL)
  ------------------
  |  Branch (4041:13): [True: 0, False: 520]
  ------------------
 4042|      0|            goto err;
 4043|    520|    }
 4044|       |
 4045|  2.09k|    ret->method = meth;
 4046|  2.09k|    ret->min_proto_version = 0;
 4047|  2.09k|    ret->max_proto_version = 0;
 4048|  2.09k|    ret->mode = SSL_MODE_AUTO_RETRY;
  ------------------
  |  |  508|  2.09k|#define SSL_MODE_AUTO_RETRY 0x00000004U
  ------------------
 4049|  2.09k|    ret->session_cache_mode = SSL_SESS_CACHE_SERVER;
  ------------------
  |  |  713|  2.09k|#define SSL_SESS_CACHE_SERVER 0x0002
  ------------------
 4050|  2.09k|    ret->session_cache_size = SSL_SESSION_CACHE_MAX_SIZE_DEFAULT;
  ------------------
  |  |  694|  2.09k|#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024 * 20)
  ------------------
 4051|       |    /* We take the system default. */
 4052|  2.09k|    ret->session_timeout = meth->get_timeout();
 4053|  2.09k|    ret->max_cert_list = SSL_MAX_CERT_LIST_DEFAULT;
  ------------------
  |  |  692|  2.09k|#define SSL_MAX_CERT_LIST_DEFAULT (1024 * 100)
  ------------------
 4054|  2.09k|    ret->verify_mode = SSL_VERIFY_NONE;
  ------------------
  |  | 1177|  2.09k|#define SSL_VERIFY_NONE 0x00
  ------------------
 4055|       |
 4056|  2.09k|    ret->sessions = lh_SSL_SESSION_new(ssl_session_hash, ssl_session_cmp);
 4057|  2.09k|    if (ret->sessions == NULL) {
  ------------------
  |  Branch (4057:9): [True: 0, False: 2.09k]
  ------------------
 4058|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4059|      0|        goto err;
 4060|      0|    }
 4061|  2.09k|    ret->cert_store = X509_STORE_new();
 4062|  2.09k|    if (ret->cert_store == NULL) {
  ------------------
  |  Branch (4062:9): [True: 0, False: 2.09k]
  ------------------
 4063|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4064|      0|        goto err;
 4065|      0|    }
 4066|  2.09k|#ifndef OPENSSL_NO_CT
 4067|  2.09k|    ret->ctlog_store = CTLOG_STORE_new_ex(libctx, propq);
 4068|  2.09k|    if (ret->ctlog_store == NULL) {
  ------------------
  |  Branch (4068:9): [True: 0, False: 2.09k]
  ------------------
 4069|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CT_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4070|      0|        goto err;
 4071|      0|    }
 4072|  2.09k|#endif
 4073|       |
 4074|       |    /* initialize cipher/digest methods table */
 4075|  2.09k|    if (!ssl_load_ciphers(ret)) {
  ------------------
  |  Branch (4075:9): [True: 0, False: 2.09k]
  ------------------
 4076|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4077|      0|        goto err;
 4078|      0|    }
 4079|       |
 4080|  2.09k|    if (!ssl_load_groups(ret)) {
  ------------------
  |  Branch (4080:9): [True: 0, False: 2.09k]
  ------------------
 4081|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4082|      0|        goto err;
 4083|      0|    }
 4084|       |
 4085|       |    /* load provider sigalgs */
 4086|  2.09k|    if (!ssl_load_sigalgs(ret)) {
  ------------------
  |  Branch (4086:9): [True: 0, False: 2.09k]
  ------------------
 4087|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4088|      0|        goto err;
 4089|      0|    }
 4090|       |
 4091|       |    /* initialise sig algs */
 4092|  2.09k|    if (!ssl_setup_sigalgs(ret)) {
  ------------------
  |  Branch (4092:9): [True: 0, False: 2.09k]
  ------------------
 4093|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4094|      0|        goto err;
 4095|      0|    }
 4096|       |
 4097|  2.09k|    if (!SSL_CTX_set_ciphersuites(ret, OSSL_default_ciphersuites())) {
  ------------------
  |  Branch (4097:9): [True: 0, False: 2.09k]
  ------------------
 4098|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4099|      0|        goto err;
 4100|      0|    }
 4101|       |
 4102|  2.09k|    if ((ret->cert = ssl_cert_new(SSL_PKEY_NUM + ret->sigalg_list_len)) == NULL) {
  ------------------
  |  |  328|  2.09k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (4102:9): [True: 0, False: 2.09k]
  ------------------
 4103|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4104|      0|        goto err;
 4105|      0|    }
 4106|       |
 4107|  2.09k|    if (!ssl_create_cipher_list(ret,
  ------------------
  |  Branch (4107:9): [True: 0, False: 2.09k]
  ------------------
 4108|  2.09k|            ret->tls13_ciphersuites,
 4109|  2.09k|            &ret->cipher_list, &ret->cipher_list_by_id,
 4110|  2.09k|            OSSL_default_cipher_list(), ret->cert)
 4111|  2.09k|        || sk_SSL_CIPHER_num(ret->cipher_list) <= 0) {
  ------------------
  |  | 1005|  2.09k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4111:12): [True: 28, False: 2.06k]
  ------------------
 4112|     28|        ERR_raise(ERR_LIB_SSL, SSL_R_LIBRARY_HAS_NO_CIPHERS);
  ------------------
  |  |  404|     28|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     28|    (ERR_new(),                                                  \
  |  |  |  |  407|     28|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     28|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     28|        ERR_set_error)
  |  |  ------------------
  ------------------
 4113|     28|        goto err;
 4114|     28|    }
 4115|       |
 4116|  2.06k|    ret->param = X509_VERIFY_PARAM_new();
 4117|  2.06k|    if (ret->param == NULL) {
  ------------------
  |  Branch (4117:9): [True: 0, False: 2.06k]
  ------------------
 4118|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_X509_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4119|      0|        goto err;
 4120|      0|    }
 4121|       |
 4122|       |    /*
 4123|       |     * If these aren't available from the provider we'll get NULL returns.
 4124|       |     * That's fine but will cause errors later if SSLv3 is negotiated
 4125|       |     */
 4126|  2.06k|    ret->md5 = ssl_evp_md_fetch(libctx, NID_md5, propq);
  ------------------
  |  | 1238|  2.06k|#define NID_md5         4
  ------------------
 4127|  2.06k|    ret->sha1 = ssl_evp_md_fetch(libctx, NID_sha1, propq);
  ------------------
  |  | 2344|  2.06k|#define NID_sha1                64
  ------------------
 4128|       |
 4129|  2.06k|    if ((ret->ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  2.06k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (4129:9): [True: 0, False: 2.06k]
  ------------------
 4130|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4131|      0|        goto err;
 4132|      0|    }
 4133|       |
 4134|  2.06k|    if ((ret->client_ca_names = sk_X509_NAME_new_null()) == NULL) {
  ------------------
  |  |   59|  2.06k|#define sk_X509_NAME_new_null() ((STACK_OF(X509_NAME) *)OPENSSL_sk_new_null())
  ------------------
  |  Branch (4134:9): [True: 0, False: 2.06k]
  ------------------
 4135|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4136|      0|        goto err;
 4137|      0|    }
 4138|       |
 4139|  2.06k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ret, &ret->ex_data)) {
  ------------------
  |  |  251|  2.06k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
  |  Branch (4139:9): [True: 0, False: 2.06k]
  ------------------
 4140|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_CRYPTO_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4141|      0|        goto err;
 4142|      0|    }
 4143|       |
 4144|  2.06k|    if ((ret->ext.secure = OPENSSL_secure_zalloc(sizeof(*ret->ext.secure))) == NULL)
  ------------------
  |  |  141|  2.06k|    CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (4144:9): [True: 0, False: 2.06k]
  ------------------
 4145|      0|        goto err;
 4146|       |
 4147|       |    /* No compression for DTLS */
 4148|  2.06k|    if (!(meth->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS))
  ------------------
  |  | 2190|  2.06k|#define SSL_ENC_FLAG_DTLS 0x8
  ------------------
  |  Branch (4148:9): [True: 2.06k, False: 0]
  ------------------
 4149|  2.06k|        ret->comp_methods = SSL_COMP_get_compression_methods();
 4150|       |
 4151|  2.06k|    ret->max_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  2.06k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4152|  2.06k|    ret->split_send_fragment = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  2.06k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4153|       |
 4154|       |    /* Setup RFC5077 ticket keys */
 4155|  2.06k|    if ((RAND_bytes_ex(libctx, ret->ext.tick_key_name,
  ------------------
  |  Branch (4155:9): [True: 0, False: 2.06k]
  ------------------
 4156|  2.06k|             sizeof(ret->ext.tick_key_name), 0)
 4157|  2.06k|            <= 0)
 4158|  2.06k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_hmac_key,
  ------------------
  |  Branch (4158:12): [True: 0, False: 2.06k]
  ------------------
 4159|  2.06k|                sizeof(ret->ext.secure->tick_hmac_key), 0)
 4160|  2.06k|            <= 0)
 4161|  2.06k|        || (RAND_priv_bytes_ex(libctx, ret->ext.secure->tick_aes_key,
  ------------------
  |  Branch (4161:12): [True: 0, False: 2.06k]
  ------------------
 4162|  2.06k|                sizeof(ret->ext.secure->tick_aes_key), 0)
 4163|  2.06k|            <= 0))
 4164|      0|        ret->options |= SSL_OP_NO_TICKET;
  ------------------
  |  |  383|      0|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4165|       |
 4166|  2.06k|    if (RAND_priv_bytes_ex(libctx, ret->ext.cookie_hmac_key,
  ------------------
  |  Branch (4166:9): [True: 0, False: 2.06k]
  ------------------
 4167|  2.06k|            sizeof(ret->ext.cookie_hmac_key), 0)
 4168|  2.06k|        <= 0) {
 4169|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_RAND_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4170|      0|        goto err;
 4171|      0|    }
 4172|       |
 4173|  2.06k|#ifndef OPENSSL_NO_SRP
 4174|  2.06k|    if (!ssl_ctx_srp_ctx_init_intern(ret)) {
  ------------------
  |  Branch (4174:9): [True: 0, False: 2.06k]
  ------------------
 4175|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_SSL_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4176|      0|        goto err;
 4177|      0|    }
 4178|  2.06k|#endif
 4179|  2.06k|#ifndef OPENSSL_NO_ENGINE
 4180|       |#ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO
 4181|       |#define eng_strx(x) #x
 4182|       |#define eng_str(x) eng_strx(x)
 4183|       |    /* Use specific client engine automatically... ignore errors */
 4184|       |    {
 4185|       |        ENGINE *eng;
 4186|       |        eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));
 4187|       |        if (!eng) {
 4188|       |            ERR_clear_error();
 4189|       |            ENGINE_load_builtin_engines();
 4190|       |            eng = ENGINE_by_id(eng_str(OPENSSL_SSL_CLIENT_ENGINE_AUTO));
 4191|       |        }
 4192|       |        if (!eng || !SSL_CTX_set_client_cert_engine(ret, eng))
 4193|       |            ERR_clear_error();
 4194|       |    }
 4195|       |#endif
 4196|  2.06k|#endif
 4197|       |
 4198|       |#ifndef OPENSSL_NO_COMP_ALG
 4199|       |    /*
 4200|       |     * Set the default order: brotli, zlib, zstd
 4201|       |     * Including only those enabled algorithms
 4202|       |     */
 4203|       |    memset(ret->cert_comp_prefs, 0, sizeof(ret->cert_comp_prefs));
 4204|       |    i = 0;
 4205|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_brotli))
 4206|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_brotli;
 4207|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zlib))
 4208|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zlib;
 4209|       |    if (ossl_comp_has_alg(TLSEXT_comp_cert_zstd))
 4210|       |        ret->cert_comp_prefs[i++] = TLSEXT_comp_cert_zstd;
 4211|       |#endif
 4212|       |    /*
 4213|       |     * Disable compression by default to prevent CRIME. Applications can
 4214|       |     * re-enable compression by configuring
 4215|       |     * SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION);
 4216|       |     * or by using the SSL_CONF library. Similarly we also enable TLSv1.3
 4217|       |     * middlebox compatibility by default. This may be disabled by default in
 4218|       |     * a later OpenSSL version.
 4219|       |     */
 4220|  2.06k|    ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  394|  2.06k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  350|  2.06k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
                  ret->options |= SSL_OP_NO_COMPRESSION | SSL_OP_ENABLE_MIDDLEBOX_COMPAT;
  ------------------
  |  |  403|  2.06k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|  2.06k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 4221|       |
 4222|  2.06k|    ret->ext.status_type = TLSEXT_STATUSTYPE_nothing;
  ------------------
  |  | 2207|  2.06k|#define TLSEXT_STATUSTYPE_nothing -1
  ------------------
 4223|       |
 4224|       |    /*
 4225|       |     * We cannot usefully set a default max_early_data here (which gets
 4226|       |     * propagated in SSL_new(), for the following reason: setting the
 4227|       |     * SSL field causes tls_construct_stoc_early_data() to tell the
 4228|       |     * client that early data will be accepted when constructing a TLS 1.3
 4229|       |     * session ticket, and the client will accordingly send us early data
 4230|       |     * when using that ticket (if the client has early data to send).
 4231|       |     * However, in order for the early data to actually be consumed by
 4232|       |     * the application, the application must also have calls to
 4233|       |     * SSL_read_early_data(); otherwise we'll just skip past the early data
 4234|       |     * and ignore it.  So, since the application must add calls to
 4235|       |     * SSL_read_early_data(), we also require them to add
 4236|       |     * calls to SSL_CTX_set_max_early_data() in order to use early data,
 4237|       |     * eliminating the bandwidth-wasting early data in the case described
 4238|       |     * above.
 4239|       |     */
 4240|  2.06k|    ret->max_early_data = 0;
 4241|       |
 4242|       |    /*
 4243|       |     * Default recv_max_early_data is a fully loaded single record. Could be
 4244|       |     * split across multiple records in practice. We set this differently to
 4245|       |     * max_early_data so that, in the default case, we do not advertise any
 4246|       |     * support for early_data, but if a client were to send us some (e.g.
 4247|       |     * because of an old, stale ticket) then we will tolerate it and skip over
 4248|       |     * it.
 4249|       |     */
 4250|  2.06k|    ret->recv_max_early_data = SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|  2.06k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 4251|       |
 4252|       |    /* By default we send two session tickets automatically in TLSv1.3 */
 4253|  2.06k|    ret->num_tickets = 2;
 4254|       |
 4255|  2.06k|#ifndef OPENSSL_NO_QUIC
 4256|       |    /* only create a cache for client CTX-es */
 4257|  2.06k|    if (meth == OSSL_QUIC_client_method())
  ------------------
  |  Branch (4257:9): [True: 0, False: 2.06k]
  ------------------
 4258|      0|        if ((ret->tokencache = ossl_quic_new_token_store()) == NULL)
  ------------------
  |  Branch (4258:13): [True: 0, False: 0]
  ------------------
 4259|      0|            goto err;
 4260|  2.06k|    ret->domain_flags = 0;
 4261|  2.06k|    if (IS_QUIC_METHOD(meth)) {
  ------------------
  |  |   52|  2.06k|    ((m) == OSSL_QUIC_client_method() || (m) == OSSL_QUIC_client_thread_method() || (m) == OSSL_QUIC_server_method())
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 2.06k]
  |  |  |  Branch (52:42): [True: 0, False: 2.06k]
  |  |  |  Branch (52:85): [True: 0, False: 2.06k]
  |  |  ------------------
  ------------------
 4262|      0|#if defined(OPENSSL_THREADS)
 4263|      0|        if (meth == OSSL_QUIC_client_thread_method())
  ------------------
  |  Branch (4263:13): [True: 0, False: 0]
  ------------------
 4264|      0|            ret->domain_flags
 4265|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2386|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4266|      0|                | SSL_DOMAIN_FLAG_THREAD_ASSISTED
  ------------------
  |  | 2387|      0|#define SSL_DOMAIN_FLAG_THREAD_ASSISTED (1U << 2)
  ------------------
 4267|      0|                | SSL_DOMAIN_FLAG_BLOCKING;
  ------------------
  |  | 2388|      0|#define SSL_DOMAIN_FLAG_BLOCKING (1U << 3)
  ------------------
 4268|      0|        else
 4269|      0|            ret->domain_flags
 4270|      0|                = SSL_DOMAIN_FLAG_MULTI_THREAD
  ------------------
  |  | 2386|      0|#define SSL_DOMAIN_FLAG_MULTI_THREAD (1U << 1)
  ------------------
 4271|      0|                | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
  ------------------
  |  | 2389|      0|#define SSL_DOMAIN_FLAG_LEGACY_BLOCKING (1U << 4)
  ------------------
 4272|       |#else
 4273|       |        ret->domain_flags
 4274|       |            = SSL_DOMAIN_FLAG_SINGLE_THREAD
 4275|       |            | SSL_DOMAIN_FLAG_LEGACY_BLOCKING;
 4276|       |#endif
 4277|      0|    }
 4278|  2.06k|#endif
 4279|       |
 4280|  2.06k|    if (!ssl_ctx_system_config(ret)) {
  ------------------
  |  Branch (4280:9): [True: 0, False: 2.06k]
  ------------------
 4281|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4282|      0|        goto err;
 4283|      0|    }
 4284|       |
 4285|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4286|       |    if (keylogfile != NULL && strlen(keylogfile) != 0) {
 4287|       |        /* Make sure we have a global lock allocated */
 4288|       |        if (!RUN_ONCE(&ssl_keylog_once, ssl_keylog_init)) {
 4289|       |            /* use a trace message as a warning */
 4290|       |            OSSL_TRACE(TLS, "Unable to initialize keylog data\n");
 4291|       |            goto out;
 4292|       |        }
 4293|       |
 4294|       |        /* Grab our global lock */
 4295|       |        if (!CRYPTO_THREAD_write_lock(keylog_lock)) {
 4296|       |            OSSL_TRACE(TLS, "Unable to acquire keylog write lock\n");
 4297|       |            goto out;
 4298|       |        } else {
 4299|       |            /*
 4300|       |             * If the bio for the requested keylog file hasn't been
 4301|       |             * created yet, go ahead and create it, and set it to append
 4302|       |             * if its already there.
 4303|       |             */
 4304|       |            if (keylog_bio == NULL) {
 4305|       |                keylog_bio = get_sslkeylog_bio(keylogfile);
 4306|       |                if (keylog_bio == NULL) {
 4307|       |                    OSSL_TRACE(TLS, "Unable to create keylog bio\n");
 4308|       |                    goto out;
 4309|       |                }
 4310|       |                BIO_set_callback_ex(keylog_bio, check_keylog_bio_free);
 4311|       |            } else {
 4312|       |                /* up our refcount for the already-created case */
 4313|       |                BIO_up_ref(keylog_bio);
 4314|       |            }
 4315|       |            /* If we have a bio now, assign the callback handler */
 4316|       |            if (keylog_bio != NULL)
 4317|       |                ret->do_sslkeylog = 1;
 4318|       |            /* unlock, and we're done */
 4319|       |            CRYPTO_THREAD_unlock(keylog_lock);
 4320|       |        }
 4321|       |    }
 4322|       |out:
 4323|       |#endif
 4324|  2.06k|    return ret;
 4325|     28|err:
 4326|     28|    SSL_CTX_free(ret);
 4327|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4328|       |    BIO_free(keylog_bio);
 4329|       |#endif
 4330|       |    return NULL;
 4331|  2.06k|}
SSL_CTX_new:
 4334|  1.56k|{
 4335|  1.56k|    return SSL_CTX_new_ex(NULL, NULL, meth);
 4336|  1.56k|}
SSL_CTX_up_ref:
 4339|  2.63k|{
 4340|  2.63k|    int i;
 4341|       |
 4342|  2.63k|    if (CRYPTO_UP_REF(&ctx->references, &i) <= 0)
  ------------------
  |  Branch (4342:9): [True: 0, False: 2.63k]
  ------------------
 4343|      0|        return 0;
 4344|       |
 4345|  2.63k|    REF_PRINT_COUNT("SSL_CTX", i, ctx);
  ------------------
  |  |  301|  2.63k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  2.63k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  2.63k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  2.63k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4346|  2.63k|    REF_ASSERT_ISNT(i < 2);
  ------------------
  |  |  293|  2.63k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.63k]
  |  |  ------------------
  ------------------
 4347|  2.63k|    return ((i > 1) ? 1 : 0);
  ------------------
  |  Branch (4347:13): [True: 2.63k, False: 0]
  ------------------
 4348|  2.63k|}
SSL_CTX_free:
 4351|  4.72k|{
 4352|  4.72k|    int i;
 4353|  4.72k|    size_t j;
 4354|       |
 4355|  4.72k|    if (a == NULL)
  ------------------
  |  Branch (4355:9): [True: 0, False: 4.72k]
  ------------------
 4356|      0|        return;
 4357|       |
 4358|  4.72k|    CRYPTO_DOWN_REF(&a->references, &i);
 4359|  4.72k|    REF_PRINT_COUNT("SSL_CTX", i, a);
  ------------------
  |  |  301|  4.72k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  4.72k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  4.72k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  4.72k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 4360|  4.72k|    if (i > 0)
  ------------------
  |  Branch (4360:9): [True: 2.63k, False: 2.09k]
  ------------------
 4361|  2.63k|        return;
 4362|  2.09k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  2.09k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 2.09k]
  |  |  ------------------
  ------------------
 4363|       |
 4364|       |#ifndef OPENSSL_NO_SSLKEYLOG
 4365|       |    if (keylog_lock != NULL && CRYPTO_THREAD_write_lock(keylog_lock)) {
 4366|       |        if (a->do_sslkeylog == 1)
 4367|       |            BIO_free(keylog_bio);
 4368|       |        a->do_sslkeylog = 0;
 4369|       |        CRYPTO_THREAD_unlock(keylog_lock);
 4370|       |    }
 4371|       |#endif
 4372|       |
 4373|  2.09k|    X509_VERIFY_PARAM_free(a->param);
 4374|  2.09k|    dane_ctx_final(&a->dane);
 4375|       |
 4376|       |    /*
 4377|       |     * Free internal session cache. However: the remove_cb() may reference
 4378|       |     * the ex_data of SSL_CTX, thus the ex_data store can only be removed
 4379|       |     * after the sessions were flushed.
 4380|       |     * As the ex_data handling routines might also touch the session cache,
 4381|       |     * the most secure solution seems to be: empty (flush) the cache, then
 4382|       |     * free ex_data, then finally free the cache.
 4383|       |     * (See ticket [openssl.org #212].)
 4384|       |     */
 4385|  2.09k|    if (a->sessions != NULL)
  ------------------
  |  Branch (4385:9): [True: 2.09k, False: 0]
  ------------------
 4386|  2.09k|        SSL_CTX_flush_sessions_ex(a, 0);
 4387|       |
 4388|  2.09k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data);
  ------------------
  |  |  251|  2.09k|#define CRYPTO_EX_INDEX_SSL_CTX 1
  ------------------
 4389|  2.09k|    lh_SSL_SESSION_free(a->sessions);
 4390|  2.09k|    X509_STORE_free(a->cert_store);
 4391|  2.09k|#ifndef OPENSSL_NO_CT
 4392|  2.09k|    CTLOG_STORE_free(a->ctlog_store);
 4393|  2.09k|#endif
 4394|  2.09k|    sk_SSL_CIPHER_free(a->cipher_list);
  ------------------
  |  | 1011|  2.09k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4395|  2.09k|    sk_SSL_CIPHER_free(a->cipher_list_by_id);
  ------------------
  |  | 1011|  2.09k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4396|  2.09k|    sk_SSL_CIPHER_free(a->tls13_ciphersuites);
  ------------------
  |  | 1011|  2.09k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
 4397|  2.09k|    ssl_cert_free(a->cert);
 4398|  2.09k|    sk_X509_NAME_pop_free(a->ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.09k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 4399|  2.09k|    sk_X509_NAME_pop_free(a->client_ca_names, X509_NAME_free);
  ------------------
  |  |   70|  2.09k|#define sk_X509_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_NAME_sk_type(sk), ossl_check_X509_NAME_freefunc_type(freefunc))
  ------------------
 4400|  2.09k|    OSSL_STACK_OF_X509_free(a->extra_certs);
 4401|  2.09k|    a->comp_methods = NULL;
 4402|  2.09k|#ifndef OPENSSL_NO_SRTP
 4403|  2.09k|    sk_SRTP_PROTECTION_PROFILE_free(a->srtp_profiles);
  ------------------
  |  |  256|  2.09k|#define sk_SRTP_PROTECTION_PROFILE_free(sk) OPENSSL_sk_free(ossl_check_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
 4404|  2.09k|#endif
 4405|  2.09k|#ifndef OPENSSL_NO_SRP
 4406|  2.09k|    ssl_ctx_srp_ctx_free_intern(a);
 4407|  2.09k|#endif
 4408|  2.09k|#ifndef OPENSSL_NO_ENGINE
 4409|  2.09k|    tls_engine_finish(a->client_cert_engine);
 4410|  2.09k|#endif
 4411|       |
 4412|  2.09k|    OPENSSL_free(a->ext.ecpointformats);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4413|  2.09k|    OPENSSL_free(a->ext.supportedgroups);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4414|  2.09k|    OPENSSL_free(a->ext.keyshares);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4415|  2.09k|    OPENSSL_free(a->ext.tuples);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4416|  2.09k|    OPENSSL_free(a->ext.alpn);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4417|  2.09k|    OPENSSL_secure_free(a->ext.secure);
  ------------------
  |  |  147|  2.09k|    CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4418|       |
 4419|  2.09k|    ssl_evp_md_free(a->md5);
 4420|  2.09k|    ssl_evp_md_free(a->sha1);
 4421|       |
 4422|  52.3k|    for (j = 0; j < SSL_ENC_NUM_IDX; j++)
  ------------------
  |  |  354|  52.3k|#define SSL_ENC_NUM_IDX 24
  ------------------
  |  Branch (4422:17): [True: 50.2k, False: 2.09k]
  ------------------
 4423|  50.2k|        ssl_evp_cipher_free(a->ssl_cipher_methods[j]);
 4424|  31.3k|    for (j = 0; j < SSL_MD_NUM_IDX; j++)
  ------------------
  |  |  203|  31.3k|#define SSL_MD_NUM_IDX SSL_MAX_DIGEST
  |  |  ------------------
  |  |  |  |  201|  31.3k|#define SSL_MAX_DIGEST 14
  |  |  ------------------
  ------------------
  |  Branch (4424:17): [True: 29.3k, False: 2.09k]
  ------------------
 4425|  29.3k|        ssl_evp_md_free(a->ssl_digest_methods[j]);
 4426|   123k|    for (j = 0; j < a->group_list_len; j++) {
  ------------------
  |  Branch (4426:17): [True: 121k, False: 2.09k]
  ------------------
 4427|   121k|        OPENSSL_free(a->group_list[j].tlsname);
  ------------------
  |  |  131|   121k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4428|   121k|        OPENSSL_free(a->group_list[j].realname);
  ------------------
  |  |  131|   121k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4429|   121k|        OPENSSL_free(a->group_list[j].algorithm);
  ------------------
  |  |  131|   121k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4430|   121k|    }
 4431|  2.09k|    OPENSSL_free(a->group_list);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4432|  8.28k|    for (j = 0; j < a->sigalg_list_len; j++) {
  ------------------
  |  Branch (4432:17): [True: 6.19k, False: 2.09k]
  ------------------
 4433|  6.19k|        OPENSSL_free(a->sigalg_list[j].name);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4434|  6.19k|        OPENSSL_free(a->sigalg_list[j].sigalg_name);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4435|  6.19k|        OPENSSL_free(a->sigalg_list[j].sigalg_oid);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4436|  6.19k|        OPENSSL_free(a->sigalg_list[j].sig_name);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4437|  6.19k|        OPENSSL_free(a->sigalg_list[j].sig_oid);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4438|  6.19k|        OPENSSL_free(a->sigalg_list[j].hash_name);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4439|  6.19k|        OPENSSL_free(a->sigalg_list[j].hash_oid);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4440|  6.19k|        OPENSSL_free(a->sigalg_list[j].keytype);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4441|  6.19k|        OPENSSL_free(a->sigalg_list[j].keytype_oid);
  ------------------
  |  |  131|  6.19k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4442|  6.19k|    }
 4443|  2.09k|    OPENSSL_free(a->sigalg_list);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4444|  2.09k|    OPENSSL_free(a->ssl_cert_info);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4445|       |
 4446|  2.09k|    OPENSSL_free(a->sigalg_lookup_cache);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4447|  2.09k|    OPENSSL_free(a->tls12_sigalgs);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4448|       |
 4449|  2.09k|    OPENSSL_free(a->client_cert_type);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4450|  2.09k|    OPENSSL_free(a->server_cert_type);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4451|       |
 4452|  2.09k|    CRYPTO_THREAD_lock_free(a->lock);
 4453|  2.09k|    CRYPTO_FREE_REF(&a->references);
 4454|       |#ifdef TSAN_REQUIRES_LOCKING
 4455|       |    CRYPTO_THREAD_lock_free(a->tsan_lock);
 4456|       |#endif
 4457|       |
 4458|  2.09k|    OPENSSL_free(a->propq);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4459|  2.09k|#ifndef OPENSSL_NO_QLOG
 4460|  2.09k|    OPENSSL_free(a->qlog_title);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4461|  2.09k|#endif
 4462|       |
 4463|  2.09k|#ifndef OPENSSL_NO_QUIC
 4464|  2.09k|    ossl_quic_free_token_store(a->tokencache);
 4465|  2.09k|#endif
 4466|       |
 4467|  2.09k|    OPENSSL_free(a);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 4468|  2.09k|}
SSL_CTX_set_default_passwd_cb:
 4471|      1|{
 4472|      1|    ctx->default_passwd_callback = cb;
 4473|      1|}
SSL_CTX_set_default_passwd_cb_userdata:
 4476|      1|{
 4477|      1|    ctx->default_passwd_callback_userdata = u;
 4478|      1|}
SSL_CTX_set_verify:
 4540|  1.31k|{
 4541|  1.31k|    ctx->verify_mode = mode;
 4542|  1.31k|    ctx->default_verify_callback = cb;
 4543|  1.31k|}
SSL_get_error:
 4827|  1.47k|{
 4828|  1.47k|    return ossl_ssl_get_error(s, i, /*check_err=*/1);
 4829|  1.47k|}
ossl_ssl_get_error:
 4832|  1.47k|{
 4833|  1.47k|    int reason;
 4834|  1.47k|    unsigned long l;
 4835|  1.47k|    BIO *bio;
 4836|  1.47k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  1.47k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  1.47k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.47k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.47k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.47k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.47k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.47k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 4837|       |
 4838|  1.47k|    if (i > 0)
  ------------------
  |  Branch (4838:9): [True: 0, False: 1.47k]
  ------------------
 4839|      0|        return SSL_ERROR_NONE;
  ------------------
  |  | 1258|      0|#define SSL_ERROR_NONE 0
  ------------------
 4840|       |
 4841|  1.47k|#ifndef OPENSSL_NO_QUIC
 4842|  1.47k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.47k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.47k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.47k, False: 0]
  |  |  ------------------
  ------------------
 4843|      0|        reason = ossl_quic_get_error(s, i);
 4844|      0|        if (reason != SSL_ERROR_NONE)
  ------------------
  |  | 1258|      0|#define SSL_ERROR_NONE 0
  ------------------
  |  Branch (4844:13): [True: 0, False: 0]
  ------------------
 4845|      0|            return reason;
 4846|      0|    }
 4847|  1.47k|#endif
 4848|       |
 4849|  1.47k|    if (sc == NULL)
  ------------------
  |  Branch (4849:9): [True: 0, False: 1.47k]
  ------------------
 4850|      0|        return SSL_ERROR_SSL;
  ------------------
  |  | 1259|      0|#define SSL_ERROR_SSL 1
  ------------------
 4851|       |
 4852|       |    /*
 4853|       |     * Make things return SSL_ERROR_SYSCALL when doing SSL_do_handshake etc,
 4854|       |     * where we do encode the error
 4855|       |     */
 4856|  1.47k|    if (check_err && (l = ERR_peek_error()) != 0) {
  ------------------
  |  Branch (4856:9): [True: 1.47k, False: 0]
  |  Branch (4856:22): [True: 1.22k, False: 249]
  ------------------
 4857|  1.22k|        if (ERR_GET_LIB(l) == ERR_LIB_SYS)
  ------------------
  |  |   74|  1.22k|#define ERR_LIB_SYS 2
  ------------------
  |  Branch (4857:13): [True: 0, False: 1.22k]
  ------------------
 4858|      0|            return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4859|  1.22k|        else
 4860|  1.22k|            return SSL_ERROR_SSL;
  ------------------
  |  | 1259|  1.22k|#define SSL_ERROR_SSL 1
  ------------------
 4861|  1.22k|    }
 4862|       |
 4863|    249|#ifndef OPENSSL_NO_QUIC
 4864|    249|    if (!IS_QUIC(s))
  ------------------
  |  |   96|    249|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    249|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 249]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 249, False: 0]
  |  |  ------------------
  ------------------
 4865|    249|#endif
 4866|    249|    {
 4867|    249|        if (SSL_want_read(s)) {
  ------------------
  |  |  943|    249|#define SSL_want_read(s) (SSL_want(s) == SSL_READING)
  |  |  ------------------
  |  |  |  |  934|    249|#define SSL_READING 3
  |  |  ------------------
  |  |  |  Branch (943:26): [True: 249, False: 0]
  |  |  ------------------
  ------------------
 4868|    249|            bio = SSL_get_rbio(s);
 4869|    249|            if (BIO_should_read(bio))
  ------------------
  |  |  268|    249|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|    249|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (268:28): [True: 248, False: 1]
  |  |  ------------------
  ------------------
 4870|    248|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1260|    248|#define SSL_ERROR_WANT_READ 2
  ------------------
 4871|      1|            else if (BIO_should_write(bio))
  ------------------
  |  |  269|      1|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      1|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (269:29): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4872|       |                /*
 4873|       |                 * This one doesn't make too much sense ... We never try to
 4874|       |                 * write to the rbio, and an application program where rbio and
 4875|       |                 * wbio are separate couldn't even know what it should wait for.
 4876|       |                 * However if we ever set s->rwstate incorrectly (so that we
 4877|       |                 * have SSL_want_read(s) instead of SSL_want_write(s)) and rbio
 4878|       |                 * and wbio *are* the same, this test works around that bug; so
 4879|       |                 * it might be safer to keep it.
 4880|       |                 */
 4881|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1261|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 4882|      1|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  270|      1|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      1|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (270:34): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4883|      0|                reason = BIO_get_retry_reason(bio);
 4884|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  286|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (4884:21): [True: 0, False: 0]
  ------------------
 4885|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1266|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 4886|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  288|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (4886:26): [True: 0, False: 0]
  ------------------
 4887|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1267|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 4888|      0|                else
 4889|      0|                    return SSL_ERROR_SYSCALL; /* unknown */
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4890|      0|            }
 4891|    249|        }
 4892|       |
 4893|      1|        if (SSL_want_write(s)) {
  ------------------
  |  |  944|      1|#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING)
  |  |  ------------------
  |  |  |  |  933|      1|#define SSL_WRITING 2
  |  |  ------------------
  |  |  |  Branch (944:27): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4894|       |            /*
 4895|       |             * Access wbio directly - in order to use the buffered bio if
 4896|       |             * present
 4897|       |             */
 4898|      0|            bio = sc->wbio;
 4899|      0|            if (BIO_should_write(bio))
  ------------------
  |  |  269|      0|#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
  |  |  ------------------
  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  ------------------
  |  |  |  Branch (269:29): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4900|      0|                return SSL_ERROR_WANT_WRITE;
  ------------------
  |  | 1261|      0|#define SSL_ERROR_WANT_WRITE 3
  ------------------
 4901|      0|            else if (BIO_should_read(bio))
  ------------------
  |  |  268|      0|#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |  |  Branch (268:28): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4902|       |                /*
 4903|       |                 * See above (SSL_want_read(s) with BIO_should_write(bio))
 4904|       |                 */
 4905|      0|                return SSL_ERROR_WANT_READ;
  ------------------
  |  | 1260|      0|#define SSL_ERROR_WANT_READ 2
  ------------------
 4906|      0|            else if (BIO_should_io_special(bio)) {
  ------------------
  |  |  270|      0|#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
  |  |  ------------------
  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  ------------------
  |  |  |  Branch (270:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4907|      0|                reason = BIO_get_retry_reason(bio);
 4908|      0|                if (reason == BIO_RR_CONNECT)
  ------------------
  |  |  286|      0|#define BIO_RR_CONNECT 0x02
  ------------------
  |  Branch (4908:21): [True: 0, False: 0]
  ------------------
 4909|      0|                    return SSL_ERROR_WANT_CONNECT;
  ------------------
  |  | 1266|      0|#define SSL_ERROR_WANT_CONNECT 7
  ------------------
 4910|      0|                else if (reason == BIO_RR_ACCEPT)
  ------------------
  |  |  288|      0|#define BIO_RR_ACCEPT 0x03
  ------------------
  |  Branch (4910:26): [True: 0, False: 0]
  ------------------
 4911|      0|                    return SSL_ERROR_WANT_ACCEPT;
  ------------------
  |  | 1267|      0|#define SSL_ERROR_WANT_ACCEPT 8
  ------------------
 4912|      0|                else
 4913|      0|                    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4914|      0|            }
 4915|      0|        }
 4916|      1|    }
 4917|       |
 4918|      1|    if (SSL_want_x509_lookup(s))
  ------------------
  |  |  945|      1|#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)
  |  |  ------------------
  |  |  |  |  935|      1|#define SSL_X509_LOOKUP 4
  |  |  ------------------
  |  |  |  Branch (945:33): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4919|      0|        return SSL_ERROR_WANT_X509_LOOKUP;
  ------------------
  |  | 1262|      0|#define SSL_ERROR_WANT_X509_LOOKUP 4
  ------------------
 4920|      1|    if (SSL_want_retry_verify(s))
  ------------------
  |  |  946|      1|#define SSL_want_retry_verify(s) (SSL_want(s) == SSL_RETRY_VERIFY)
  |  |  ------------------
  |  |  |  |  939|      1|#define SSL_RETRY_VERIFY 8
  |  |  ------------------
  |  |  |  Branch (946:34): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4921|      0|        return SSL_ERROR_WANT_RETRY_VERIFY;
  ------------------
  |  | 1271|      0|#define SSL_ERROR_WANT_RETRY_VERIFY 12
  ------------------
 4922|      1|    if (SSL_want_async(s))
  ------------------
  |  |  947|      1|#define SSL_want_async(s) (SSL_want(s) == SSL_ASYNC_PAUSED)
  |  |  ------------------
  |  |  |  |  936|      1|#define SSL_ASYNC_PAUSED 5
  |  |  ------------------
  |  |  |  Branch (947:27): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4923|      0|        return SSL_ERROR_WANT_ASYNC;
  ------------------
  |  | 1268|      0|#define SSL_ERROR_WANT_ASYNC 9
  ------------------
 4924|      1|    if (SSL_want_async_job(s))
  ------------------
  |  |  948|      1|#define SSL_want_async_job(s) (SSL_want(s) == SSL_ASYNC_NO_JOBS)
  |  |  ------------------
  |  |  |  |  937|      1|#define SSL_ASYNC_NO_JOBS 6
  |  |  ------------------
  |  |  |  Branch (948:31): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4925|      0|        return SSL_ERROR_WANT_ASYNC_JOB;
  ------------------
  |  | 1269|      0|#define SSL_ERROR_WANT_ASYNC_JOB 10
  ------------------
 4926|      1|    if (SSL_want_client_hello_cb(s))
  ------------------
  |  |  949|      1|#define SSL_want_client_hello_cb(s) (SSL_want(s) == SSL_CLIENT_HELLO_CB)
  |  |  ------------------
  |  |  |  |  938|      1|#define SSL_CLIENT_HELLO_CB 7
  |  |  ------------------
  |  |  |  Branch (949:37): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 4927|      0|        return SSL_ERROR_WANT_CLIENT_HELLO_CB;
  ------------------
  |  | 1270|      0|#define SSL_ERROR_WANT_CLIENT_HELLO_CB 11
  ------------------
 4928|       |
 4929|      1|    if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  |  216|      1|#define SSL_RECEIVED_SHUTDOWN 2
  ------------------
                  if ((sc->shutdown & SSL_RECEIVED_SHUTDOWN) && (sc->s3.warn_alert == SSL_AD_CLOSE_NOTIFY))
  ------------------
  |  | 1209|      1|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      1|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (4929:9): [True: 1, False: 0]
  |  Branch (4929:51): [True: 1, False: 0]
  ------------------
 4930|      1|        return SSL_ERROR_ZERO_RETURN;
  ------------------
  |  | 1265|      1|#define SSL_ERROR_ZERO_RETURN 6
  ------------------
 4931|       |
 4932|      0|    return SSL_ERROR_SYSCALL;
  ------------------
  |  | 1263|      0|#define SSL_ERROR_SYSCALL 5 /* look at error stack/return \
  ------------------
 4933|      1|}
SSL_do_handshake:
 4948|  1.56k|{
 4949|  1.56k|    int ret = 1;
 4950|  1.56k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.56k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.56k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.56k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.56k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.56k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.56k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.56k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 4951|       |
 4952|  1.56k|#ifndef OPENSSL_NO_QUIC
 4953|  1.56k|    if (IS_QUIC(s))
  ------------------
  |  |   96|  1.56k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.56k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.56k, False: 0]
  |  |  ------------------
  ------------------
 4954|      0|        return ossl_quic_do_handshake(s);
 4955|  1.56k|#endif
 4956|       |
 4957|  1.56k|    if (sc == NULL)
  ------------------
  |  Branch (4957:9): [True: 0, False: 1.56k]
  ------------------
 4958|      0|        return -1;
 4959|       |
 4960|  1.56k|    if (sc->handshake_func == NULL) {
  ------------------
  |  Branch (4960:9): [True: 0, False: 1.56k]
  ------------------
 4961|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CONNECTION_TYPE_NOT_SET);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 4962|      0|        return -1;
 4963|      0|    }
 4964|       |
 4965|  1.56k|    if (!ossl_statem_check_finish_init(sc, -1))
  ------------------
  |  Branch (4965:9): [True: 0, False: 1.56k]
  ------------------
 4966|      0|        return -1;
 4967|       |
 4968|  1.56k|    s->method->ssl_renegotiate_check(s, 0);
 4969|       |
 4970|  1.56k|    if (SSL_in_init(s) || SSL_in_before(s)) {
  ------------------
  |  Branch (4970:9): [True: 1.56k, False: 0]
  |  Branch (4970:27): [True: 0, False: 0]
  ------------------
 4971|  1.56k|        if ((sc->mode & SSL_MODE_ASYNC) && ASYNC_get_current_job() == NULL) {
  ------------------
  |  |  535|  1.56k|#define SSL_MODE_ASYNC 0x00000100U
  ------------------
  |  Branch (4971:13): [True: 0, False: 1.56k]
  |  Branch (4971:44): [True: 0, False: 0]
  ------------------
 4972|      0|            struct ssl_async_args args;
 4973|       |
 4974|      0|            memset(&args, 0, sizeof(args));
 4975|      0|            args.s = s;
 4976|       |
 4977|      0|            ret = ssl_start_async_job(s, &args, ssl_do_handshake_intern);
 4978|  1.56k|        } else {
 4979|  1.56k|            ret = sc->handshake_func(s);
 4980|  1.56k|        }
 4981|  1.56k|    }
 4982|       |
 4983|  1.56k|    return ret;
 4984|  1.56k|}
SSL_set_connect_state:
 5007|  1.31k|{
 5008|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL_ONLY(s);
  ------------------
  |  |   23|  1.31k|    SSL_CONNECTION_FROM_SSL_ONLY_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   17|  1.31k|    ((ssl) == NULL ? NULL                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (17:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   18|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (18:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   19|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)     \
  |  |  |  |   20|  1.31k|                             : NULL))
  |  |  ------------------
  ------------------
 5009|       |
 5010|  1.31k|#ifndef OPENSSL_NO_QUIC
 5011|  1.31k|    if (IS_QUIC(s)) {
  ------------------
  |  |   96|  1.31k|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|  1.31k|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 1.31k, False: 0]
  |  |  ------------------
  ------------------
 5012|       |        /* We suppress errors because this is a void function */
 5013|      0|        (void)ossl_quic_set_connect_state(s, 0 /* suppress errors */);
 5014|      0|        return;
 5015|      0|    }
 5016|  1.31k|#endif
 5017|       |
 5018|  1.31k|    sc->server = 0;
 5019|  1.31k|    sc->shutdown = 0;
 5020|  1.31k|    ossl_statem_clear(sc);
 5021|  1.31k|    sc->handshake_func = s->method->ssl_connect;
 5022|       |    /* Ignore return value. Its a void public API function */
 5023|  1.31k|    RECORD_LAYER_reset(&sc->rlayer);
 5024|  1.31k|}
ssl_init_wbio_buffer:
 5336|  1.31k|{
 5337|  1.31k|    BIO *bbio;
 5338|       |
 5339|  1.31k|    if (s->bbio != NULL) {
  ------------------
  |  Branch (5339:9): [True: 0, False: 1.31k]
  ------------------
 5340|       |        /* Already buffered. */
 5341|      0|        return 1;
 5342|      0|    }
 5343|       |
 5344|  1.31k|    bbio = BIO_new(BIO_f_buffer());
 5345|  1.31k|    if (bbio == NULL || BIO_set_read_buffer_size(bbio, 1) <= 0) {
  ------------------
  |  |  625|  1.31k|#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
  |  |  ------------------
  |  |  |  |  451|  1.31k|#define BIO_C_SET_BUFF_SIZE 117
  |  |  ------------------
  ------------------
  |  Branch (5345:9): [True: 0, False: 1.31k]
  |  Branch (5345:25): [True: 0, False: 1.31k]
  ------------------
 5346|      0|        BIO_free(bbio);
 5347|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 5348|      0|        return 0;
 5349|      0|    }
 5350|  1.31k|    s->bbio = bbio;
 5351|  1.31k|    s->wbio = BIO_push(bbio, s->wbio);
 5352|       |
 5353|  1.31k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5354|       |
 5355|  1.31k|    return 1;
 5356|  1.31k|}
ssl_free_wbio_buffer:
 5359|  6.58k|{
 5360|       |    /* callers ensure s is never null */
 5361|  6.58k|    if (s->bbio == NULL)
  ------------------
  |  Branch (5361:9): [True: 5.26k, False: 1.31k]
  ------------------
 5362|  5.26k|        return 1;
 5363|       |
 5364|  1.31k|    s->wbio = BIO_pop(s->wbio);
 5365|  1.31k|    s->rlayer.wrlmethod->set1_bio(s->rlayer.wrl, s->wbio);
 5366|       |
 5367|  1.31k|    BIO_free(s->bbio);
 5368|  1.31k|    s->bbio = NULL;
 5369|       |
 5370|  1.31k|    return 1;
 5371|  6.58k|}
SSL_version:
 5433|  4.48k|{
 5434|  4.48k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  4.48k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  4.48k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 4.48k]
  |  |  |  |  ------------------
  |  |  |  |   33|  4.48k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  4.48k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 4.48k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  4.48k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  4.48k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5435|       |
 5436|  4.48k|#ifndef OPENSSL_NO_QUIC
 5437|       |    /* We only support QUICv1 - so if its QUIC its QUICv1 */
 5438|  4.48k|    if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1224|  8.97k|#define SSL_TYPE_QUIC_CONNECTION 0x80
  ------------------
                  if (s->type == SSL_TYPE_QUIC_CONNECTION || s->type == SSL_TYPE_QUIC_XSO)
  ------------------
  |  | 1225|  4.48k|#define SSL_TYPE_QUIC_XSO 0x81
  ------------------
  |  Branch (5438:9): [True: 0, False: 4.48k]
  |  Branch (5438:48): [True: 0, False: 4.48k]
  ------------------
 5439|      0|        return OSSL_QUIC1_VERSION;
  ------------------
  |  |   33|      0|#define OSSL_QUIC1_VERSION 0x0000001
  ------------------
 5440|  4.48k|#endif
 5441|  4.48k|    if (sc == NULL)
  ------------------
  |  Branch (5441:9): [True: 0, False: 4.48k]
  ------------------
 5442|      0|        return 0;
 5443|       |
 5444|  4.48k|    return sc->version;
 5445|  4.48k|}
SSL_get_verify_result:
 5648|      1|{
 5649|      1|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|      1|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|      1|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1]
  |  |  |  |  ------------------
  |  |  |  |   33|      1|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|      1|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|      1|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|      1|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5650|       |
 5651|      1|    if (sc == NULL)
  ------------------
  |  Branch (5651:9): [True: 0, False: 1]
  ------------------
 5652|      0|        return 0;
 5653|       |
 5654|      1|    return sc->verify_result;
 5655|      1|}
SSL_set_ex_data:
 5710|  1.31k|{
 5711|  1.31k|    return CRYPTO_set_ex_data(&s->ex_data, idx, arg);
 5712|  1.31k|}
SSL_CTX_get_cert_store:
 5730|  1.38k|{
 5731|  1.38k|    return ctx->cert_store;
 5732|  1.38k|}
SSL_want:
 5749|    255|{
 5750|    255|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|    255|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|    255|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 255]
  |  |  |  |  ------------------
  |  |  |  |   33|    255|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|    255|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 255, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|    255|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|    255|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 5751|       |
 5752|    255|#ifndef OPENSSL_NO_QUIC
 5753|    255|    if (IS_QUIC(s))
  ------------------
  |  |   96|    255|    ((ssl) != NULL && SSL_TYPE_IS_QUIC((ssl)->type))
  |  |  ------------------
  |  |  |  | 1229|    255|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1229:29): [True: 0, False: 255]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (96:6): [True: 255, False: 0]
  |  |  ------------------
  ------------------
 5754|      0|        return ossl_quic_want(s);
 5755|    255|#endif
 5756|       |
 5757|    255|    if (sc == NULL)
  ------------------
  |  Branch (5757:9): [True: 0, False: 255]
  ------------------
 5758|      0|        return SSL_NOTHING;
  ------------------
  |  |  932|      0|#define SSL_NOTHING 1
  ------------------
 5759|       |
 5760|    255|    return sc->rwstate;
 5761|    255|}
SSL_get_security_level:
 6143|   198k|{
 6144|   198k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|   198k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|   198k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 198k]
  |  |  |  |  ------------------
  |  |  |  |   33|   198k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|   198k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 198k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|   198k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|   198k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6145|       |
 6146|   198k|    if (sc == NULL)
  ------------------
  |  Branch (6146:9): [True: 0, False: 198k]
  ------------------
 6147|      0|        return 0;
 6148|       |
 6149|   198k|    return sc->cert->sec_level;
 6150|   198k|}
SSL_CTX_set_options:
 6257|  2.06k|{
 6258|  2.06k|    return ctx->options |= op;
 6259|  2.06k|}
SSL_set_ct_validation_callback:
 6529|  1.31k|{
 6530|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
 6531|       |
 6532|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (6532:9): [True: 0, False: 1.31k]
  ------------------
 6533|      0|        return 0;
 6534|       |
 6535|       |    /*
 6536|       |     * Since code exists that uses the custom extension handler for CT, look
 6537|       |     * for this and throw an error if they have already registered to use CT.
 6538|       |     */
 6539|  1.31k|    if (callback != NULL && SSL_CTX_has_client_custom_ext(s->ctx, TLSEXT_TYPE_signed_certificate_timestamp)) {
  ------------------
  |  |  122|      0|#define TLSEXT_TYPE_signed_certificate_timestamp 18
  ------------------
  |  Branch (6539:9): [True: 0, False: 1.31k]
  |  Branch (6539:29): [True: 0, False: 0]
  ------------------
 6540|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 6541|      0|        return 0;
 6542|      0|    }
 6543|       |
 6544|  1.31k|    if (callback != NULL) {
  ------------------
  |  Branch (6544:9): [True: 0, False: 1.31k]
  ------------------
 6545|       |        /*
 6546|       |         * If we are validating CT, then we MUST accept SCTs served via OCSP
 6547|       |         */
 6548|      0|        if (!SSL_set_tlsext_status_type(s, TLSEXT_STATUSTYPE_ocsp))
  ------------------
  |  |  307|      0|    SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE, type, NULL)
  |  |  ------------------
  |  |  |  | 1325|      0|#define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE 65
  |  |  ------------------
  ------------------
  |  Branch (6548:13): [True: 0, False: 0]
  ------------------
 6549|      0|            return 0;
 6550|      0|    }
 6551|       |
 6552|  1.31k|    sc->ct_validation_callback = callback;
 6553|  1.31k|    sc->ct_validation_callback_arg = arg;
 6554|       |
 6555|  1.31k|    return 1;
 6556|  1.31k|}
ssl_get_max_send_fragment:
 7301|  5.18k|{
 7302|       |    /* Return any active Max Fragment Len extension */
 7303|  5.18k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session))
  ------------------
  |  |  296|  1.24k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  294|  1.24k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  229|  1.24k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  232|  1.24k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:6): [True: 1.24k, False: 0]
  |  |  |  |  |  Branch (294:53): [True: 0, False: 1.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7303:9): [True: 1.24k, False: 3.94k]
  ------------------
 7304|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7305|       |
 7306|       |    /* return current SSL connection setting */
 7307|  5.18k|    return (unsigned int)sc->max_send_fragment;
 7308|  5.18k|}
ssl_get_split_send_fragment:
 7311|  1.24k|{
 7312|       |    /* Return a value regarding an active Max Fragment Len extension */
 7313|  1.24k|    if (sc->session != NULL && USE_MAX_FRAGMENT_LENGTH_EXT(sc->session)
  ------------------
  |  |  296|  1.24k|    IS_MAX_FRAGMENT_LENGTH_EXT_VALID(session->ext.max_fragment_len_mode)
  |  |  ------------------
  |  |  |  |  294|  2.48k|    (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  229|  1.24k|#define TLSEXT_max_fragment_length_512 1
  |  |  |  |  ------------------
  |  |  |  |                   (((value) >= TLSEXT_max_fragment_length_512) && ((value) <= TLSEXT_max_fragment_length_4096))
  |  |  |  |  ------------------
  |  |  |  |  |  |  232|  1.24k|#define TLSEXT_max_fragment_length_4096 4
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (294:6): [True: 1.24k, False: 0]
  |  |  |  |  |  Branch (294:53): [True: 0, False: 1.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (7313:9): [True: 1.24k, False: 0]
  ------------------
 7314|      0|        && sc->split_send_fragment > GET_MAX_FRAGMENT_LENGTH(sc->session))
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
  |  Branch (7314:12): [True: 0, False: 0]
  ------------------
 7315|      0|        return GET_MAX_FRAGMENT_LENGTH(sc->session);
  ------------------
  |  |  298|      0|    (512U << (session->ext.max_fragment_len_mode - 1))
  ------------------
 7316|       |
 7317|       |    /* else limit |split_send_fragment| to current |max_send_fragment| */
 7318|  1.24k|    if (sc->split_send_fragment > sc->max_send_fragment)
  ------------------
  |  Branch (7318:9): [True: 0, False: 1.24k]
  ------------------
 7319|      0|        return (unsigned int)sc->max_send_fragment;
 7320|       |
 7321|       |    /* return current SSL connection setting */
 7322|  1.24k|    return (unsigned int)sc->split_send_fragment;
 7323|  1.24k|}
SSL_CTX_set_post_handshake_auth:
 7353|  1.37k|{
 7354|  1.37k|    ctx->pha_enabled = val;
 7355|  1.37k|}
ssl_evp_cipher_fetch:
 7461|  48.1k|{
 7462|  48.1k|    const EVP_CIPHER *ciph;
 7463|       |
 7464|  48.1k|    ciph = tls_get_cipher_from_engine(nid);
 7465|  48.1k|    if (ciph != NULL)
  ------------------
  |  Branch (7465:9): [True: 0, False: 48.1k]
  ------------------
 7466|      0|        return ciph;
 7467|       |
 7468|       |    /*
 7469|       |     * If there is no engine cipher then we do an explicit fetch. This may fail
 7470|       |     * and that could be ok
 7471|       |     */
 7472|  48.1k|    ERR_set_mark();
 7473|  48.1k|    ciph = EVP_CIPHER_fetch(libctx, OBJ_nid2sn(nid), properties);
 7474|  48.1k|    if (ciph != NULL) {
  ------------------
  |  Branch (7474:9): [True: 28.9k, False: 19.2k]
  ------------------
 7475|  28.9k|        OSSL_PARAM params[2];
 7476|  28.9k|        int decrypt_only = 0;
 7477|       |
 7478|  28.9k|        params[0] = OSSL_PARAM_construct_int(OSSL_CIPHER_PARAM_DECRYPT_ONLY,
  ------------------
  |  |  193|  28.9k|# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
  ------------------
 7479|  28.9k|            &decrypt_only);
 7480|  28.9k|        params[1] = OSSL_PARAM_construct_end();
 7481|  28.9k|        if (EVP_CIPHER_get_params((EVP_CIPHER *)ciph, params)
  ------------------
  |  Branch (7481:13): [True: 28.9k, False: 0]
  ------------------
 7482|  28.9k|            && decrypt_only) {
  ------------------
  |  Branch (7482:16): [True: 0, False: 28.9k]
  ------------------
 7483|       |            /* If a cipher is decrypt-only, it is unusable */
 7484|      0|            EVP_CIPHER_free((EVP_CIPHER *)ciph);
 7485|       |            ciph = NULL;
 7486|      0|        }
 7487|  28.9k|    }
 7488|  48.1k|    ERR_pop_to_mark();
 7489|  48.1k|    return ciph;
 7490|  48.1k|}
ssl_evp_cipher_free:
 7506|  51.5k|{
 7507|  51.5k|    if (cipher == NULL)
  ------------------
  |  Branch (7507:9): [True: 22.6k, False: 28.9k]
  ------------------
 7508|  22.6k|        return;
 7509|       |
 7510|  28.9k|    if (EVP_CIPHER_get0_provider(cipher) != NULL) {
  ------------------
  |  Branch (7510:9): [True: 28.9k, False: 0]
  ------------------
 7511|       |        /*
 7512|       |         * The cipher was explicitly fetched and therefore it is safe to cast
 7513|       |         * away the const
 7514|       |         */
 7515|  28.9k|        EVP_CIPHER_free((EVP_CIPHER *)cipher);
 7516|  28.9k|    }
 7517|  28.9k|}
ssl_evp_md_fetch:
 7522|  33.4k|{
 7523|  33.4k|    const EVP_MD *md;
 7524|       |
 7525|  33.4k|    md = tls_get_digest_from_engine(nid);
 7526|  33.4k|    if (md != NULL)
  ------------------
  |  Branch (7526:9): [True: 0, False: 33.4k]
  ------------------
 7527|      0|        return md;
 7528|       |
 7529|       |    /* Otherwise we do an explicit fetch */
 7530|  33.4k|    ERR_set_mark();
 7531|  33.4k|    md = EVP_MD_fetch(libctx, OBJ_nid2sn(nid), properties);
 7532|  33.4k|    ERR_pop_to_mark();
 7533|  33.4k|    return md;
 7534|  33.4k|}
ssl_evp_md_free:
 7550|  34.8k|{
 7551|  34.8k|    if (md == NULL)
  ------------------
  |  Branch (7551:9): [True: 16.2k, False: 18.5k]
  ------------------
 7552|  16.2k|        return;
 7553|       |
 7554|  18.5k|    if (EVP_MD_get0_provider(md) != NULL) {
  ------------------
  |  Branch (7554:9): [True: 18.5k, False: 0]
  ------------------
 7555|       |        /*
 7556|       |         * The digest was explicitly fetched and therefore it is safe to cast
 7557|       |         * away the const
 7558|       |         */
 7559|  18.5k|        EVP_MD_free((EVP_MD *)md);
 7560|  18.5k|    }
 7561|  18.5k|}
ssl_lib.c:dane_final:
  169|  1.31k|{
  170|  1.31k|    sk_danetls_record_pop_free(dane->trecs, tlsa_free);
  171|  1.31k|    dane->trecs = NULL;
  172|       |
  173|  1.31k|    OSSL_STACK_OF_X509_free(dane->certs);
  174|  1.31k|    dane->certs = NULL;
  175|       |
  176|  1.31k|    X509_free(dane->mcert);
  177|  1.31k|    dane->mcert = NULL;
  178|       |    dane->mtlsa = NULL;
  179|  1.31k|    dane->mdpth = -1;
  180|  1.31k|    dane->pdpth = -1;
  181|  1.31k|}
ssl_lib.c:ssl_check_allowed_versions:
  450|  4.13k|{
  451|  4.13k|    int minisdtls = 0, maxisdtls = 0;
  452|       |
  453|       |    /* Figure out if we're doing DTLS versions or TLS versions */
  454|  4.13k|    if (min_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  8.26k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (454:9): [True: 0, False: 4.13k]
  ------------------
  455|  4.13k|        || min_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  4.13k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (455:12): [True: 0, False: 4.13k]
  ------------------
  456|      0|        minisdtls = 1;
  457|  4.13k|    if (max_version == DTLS1_BAD_VER
  ------------------
  |  |   30|  8.26k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (457:9): [True: 0, False: 4.13k]
  ------------------
  458|  4.13k|        || max_version >> 8 == DTLS1_VERSION_MAJOR)
  ------------------
  |  |   32|  4.13k|#define DTLS1_VERSION_MAJOR 0xFE
  ------------------
  |  Branch (458:12): [True: 0, False: 4.13k]
  ------------------
  459|      0|        maxisdtls = 1;
  460|       |    /* A wildcard version of 0 could be DTLS or TLS. */
  461|  4.13k|    if ((minisdtls && !maxisdtls && max_version != 0)
  ------------------
  |  Branch (461:10): [True: 0, False: 4.13k]
  |  Branch (461:23): [True: 0, False: 0]
  |  Branch (461:37): [True: 0, False: 0]
  ------------------
  462|  4.13k|        || (maxisdtls && !minisdtls && min_version != 0)) {
  ------------------
  |  Branch (462:13): [True: 0, False: 4.13k]
  |  Branch (462:26): [True: 0, False: 0]
  |  Branch (462:40): [True: 0, False: 0]
  ------------------
  463|       |        /* Mixing DTLS and TLS versions will lead to sadness; deny it. */
  464|      0|        return 0;
  465|      0|    }
  466|       |
  467|  4.13k|    if (minisdtls || maxisdtls) {
  ------------------
  |  Branch (467:9): [True: 0, False: 4.13k]
  |  Branch (467:22): [True: 0, False: 4.13k]
  ------------------
  468|       |        /* Do DTLS version checks. */
  469|      0|        if (min_version == 0)
  ------------------
  |  Branch (469:13): [True: 0, False: 0]
  ------------------
  470|       |            /* Ignore DTLS1_BAD_VER */
  471|      0|            min_version = DTLS1_VERSION;
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  472|      0|        if (max_version == 0)
  ------------------
  |  Branch (472:13): [True: 0, False: 0]
  ------------------
  473|      0|            max_version = DTLS1_2_VERSION;
  ------------------
  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  ------------------
  474|       |#ifdef OPENSSL_NO_DTLS1_2
  475|       |        if (max_version == DTLS1_2_VERSION)
  476|       |            max_version = DTLS1_VERSION;
  477|       |#endif
  478|       |#ifdef OPENSSL_NO_DTLS1
  479|       |        if (min_version == DTLS1_VERSION)
  480|       |            min_version = DTLS1_2_VERSION;
  481|       |#endif
  482|       |        /* Done massaging versions; do the check. */
  483|      0|        if (0
  ------------------
  |  Branch (483:13): [Folded, False: 0]
  ------------------
  484|       |#ifdef OPENSSL_NO_DTLS1
  485|       |            || (DTLS_VERSION_GE(min_version, DTLS1_VERSION)
  486|       |                && DTLS_VERSION_GE(DTLS1_VERSION, max_version))
  487|       |#endif
  488|       |#ifdef OPENSSL_NO_DTLS1_2
  489|       |            || (DTLS_VERSION_GE(min_version, DTLS1_2_VERSION)
  490|       |                && DTLS_VERSION_GE(DTLS1_2_VERSION, max_version))
  491|       |#endif
  492|      0|        )
  493|      0|            return 0;
  494|  4.13k|    } else {
  495|       |        /* Regular TLS version checks. */
  496|  4.13k|        if (min_version == 0)
  ------------------
  |  Branch (496:13): [True: 0, False: 4.13k]
  ------------------
  497|      0|            min_version = SSL3_VERSION;
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
  498|  4.13k|        if (max_version == 0)
  ------------------
  |  Branch (498:13): [True: 4.11k, False: 16]
  ------------------
  499|  4.11k|            max_version = TLS1_3_VERSION;
  ------------------
  |  |   27|  4.11k|#define TLS1_3_VERSION 0x0304
  ------------------
  500|       |#ifdef OPENSSL_NO_TLS1_3
  501|       |        if (max_version == TLS1_3_VERSION)
  502|       |            max_version = TLS1_2_VERSION;
  503|       |#endif
  504|       |#ifdef OPENSSL_NO_TLS1_2
  505|       |        if (max_version == TLS1_2_VERSION)
  506|       |            max_version = TLS1_1_VERSION;
  507|       |#endif
  508|       |#ifdef OPENSSL_NO_TLS1_1
  509|       |        if (max_version == TLS1_1_VERSION)
  510|       |            max_version = TLS1_VERSION;
  511|       |#endif
  512|       |#ifdef OPENSSL_NO_TLS1
  513|       |        if (max_version == TLS1_VERSION)
  514|       |            max_version = SSL3_VERSION;
  515|       |#endif
  516|       |#ifdef OPENSSL_NO_SSL3
  517|       |        if (min_version == SSL3_VERSION)
  518|       |            min_version = TLS1_VERSION;
  519|       |#endif
  520|       |#ifdef OPENSSL_NO_TLS1
  521|       |        if (min_version == TLS1_VERSION)
  522|       |            min_version = TLS1_1_VERSION;
  523|       |#endif
  524|       |#ifdef OPENSSL_NO_TLS1_1
  525|       |        if (min_version == TLS1_1_VERSION)
  526|       |            min_version = TLS1_2_VERSION;
  527|       |#endif
  528|       |#ifdef OPENSSL_NO_TLS1_2
  529|       |        if (min_version == TLS1_2_VERSION)
  530|       |            min_version = TLS1_3_VERSION;
  531|       |#endif
  532|       |        /* Done massaging versions; do the check. */
  533|  4.13k|        if (0
  ------------------
  |  Branch (533:13): [Folded, False: 4.13k]
  ------------------
  534|       |#ifdef OPENSSL_NO_SSL3
  535|       |            || (min_version <= SSL3_VERSION && SSL3_VERSION <= max_version)
  536|       |#endif
  537|       |#ifdef OPENSSL_NO_TLS1
  538|       |            || (min_version <= TLS1_VERSION && TLS1_VERSION <= max_version)
  539|       |#endif
  540|       |#ifdef OPENSSL_NO_TLS1_1
  541|       |            || (min_version <= TLS1_1_VERSION && TLS1_1_VERSION <= max_version)
  542|       |#endif
  543|       |#ifdef OPENSSL_NO_TLS1_2
  544|       |            || (min_version <= TLS1_2_VERSION && TLS1_2_VERSION <= max_version)
  545|       |#endif
  546|       |#ifdef OPENSSL_NO_TLS1_3
  547|       |            || (min_version <= TLS1_3_VERSION && TLS1_3_VERSION <= max_version)
  548|       |#endif
  549|  4.13k|        )
  550|      0|            return 0;
  551|  4.13k|    }
  552|  4.13k|    return 1;
  553|  4.13k|}
ssl_lib.c:cipher_list_tls12_num:
 3351|    504|{
 3352|    504|    int i, num = 0;
 3353|    504|    const SSL_CIPHER *c;
 3354|       |
 3355|    504|    if (sk == NULL)
  ------------------
  |  Branch (3355:9): [True: 0, False: 504]
  ------------------
 3356|      0|        return 0;
 3357|  12.3k|    for (i = 0; i < sk_SSL_CIPHER_num(sk); ++i) {
  ------------------
  |  | 1005|  12.3k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3357:17): [True: 11.8k, False: 504]
  ------------------
 3358|  11.8k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1006|  11.8k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3359|  11.8k|        if (c->min_tls >= TLS1_3_VERSION)
  ------------------
  |  |   27|  11.8k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3359:13): [True: 1.51k, False: 10.3k]
  ------------------
 3360|  1.51k|            continue;
 3361|  10.3k|        num++;
 3362|  10.3k|    }
 3363|    504|    return num;
 3364|    504|}
ssl_lib.c:alpn_value_ok:
 3703|  1.31k|{
 3704|  1.31k|    unsigned int idx;
 3705|       |
 3706|  1.31k|    if (protos_len < 2 || protos == NULL)
  ------------------
  |  Branch (3706:9): [True: 0, False: 1.31k]
  |  Branch (3706:27): [True: 0, False: 1.31k]
  ------------------
 3707|      0|        return 0;
 3708|       |
 3709|  3.33k|    for (idx = 0; idx < protos_len; idx += protos[idx] + 1) {
  ------------------
  |  Branch (3709:19): [True: 2.02k, False: 1.31k]
  ------------------
 3710|  2.02k|        if (protos[idx] == 0)
  ------------------
  |  Branch (3710:13): [True: 0, False: 2.02k]
  ------------------
 3711|      0|            return 0;
 3712|  2.02k|    }
 3713|  1.31k|    return idx == protos_len;
 3714|  1.31k|}
ssl_lib.c:dane_ctx_final:
  150|  2.09k|{
  151|  2.09k|    OPENSSL_free(dctx->mdevp);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  152|  2.09k|    dctx->mdevp = NULL;
  153|       |
  154|  2.09k|    OPENSSL_free(dctx->mdord);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  155|       |    dctx->mdord = NULL;
  156|  2.09k|    dctx->mdmax = 0;
  157|  2.09k|}

TLS_client_method:
 2347|  2.09k|    {                                                                      \
 2348|  2.09k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  2.09k|            version,                                                       \
 2350|  2.09k|            flags,                                                         \
 2351|  2.09k|            mask,                                                          \
 2352|  2.09k|            ossl_ssl_connection_new,                                       \
 2353|  2.09k|            ossl_ssl_connection_free,                                      \
 2354|  2.09k|            ossl_ssl_connection_reset,                                     \
 2355|  2.09k|            tls1_new,                                                      \
 2356|  2.09k|            tls1_clear,                                                    \
 2357|  2.09k|            tls1_free,                                                     \
 2358|  2.09k|            s_accept,                                                      \
 2359|  2.09k|            s_connect,                                                     \
 2360|  2.09k|            ssl3_read,                                                     \
 2361|  2.09k|            ssl3_peek,                                                     \
 2362|  2.09k|            ssl3_write,                                                    \
 2363|  2.09k|            ssl3_shutdown,                                                 \
 2364|  2.09k|            ssl3_renegotiate,                                              \
 2365|  2.09k|            ssl3_renegotiate_check,                                        \
 2366|  2.09k|            ssl3_read_bytes,                                               \
 2367|  2.09k|            ssl3_write_bytes,                                              \
 2368|  2.09k|            ssl3_dispatch_alert,                                           \
 2369|  2.09k|            ssl3_ctrl,                                                     \
 2370|  2.09k|            ssl3_ctx_ctrl,                                                 \
 2371|  2.09k|            ssl3_get_cipher_by_char,                                       \
 2372|  2.09k|            ssl3_put_cipher_by_char,                                       \
 2373|  2.09k|            ssl3_pending,                                                  \
 2374|  2.09k|            ssl3_num_ciphers,                                              \
 2375|  2.09k|            ssl3_get_cipher,                                               \
 2376|  2.09k|            tls1_default_timeout,                                          \
 2377|  2.09k|            &enc_data,                                                     \
 2378|  2.09k|            ssl_undefined_void_function,                                   \
 2379|  2.09k|            ssl3_callback_ctrl,                                            \
 2380|  2.09k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  2.09k|        };                                                                 \
 2382|  2.09k|        return &func_name##_data;                                          \
 2383|  2.09k|    }
tlsv1_3_client_method:
 2347|  11.3k|    {                                                                      \
 2348|  11.3k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  11.3k|            version,                                                       \
 2350|  11.3k|            flags,                                                         \
 2351|  11.3k|            mask,                                                          \
 2352|  11.3k|            ossl_ssl_connection_new,                                       \
 2353|  11.3k|            ossl_ssl_connection_free,                                      \
 2354|  11.3k|            ossl_ssl_connection_reset,                                     \
 2355|  11.3k|            tls1_new,                                                      \
 2356|  11.3k|            tls1_clear,                                                    \
 2357|  11.3k|            tls1_free,                                                     \
 2358|  11.3k|            s_accept,                                                      \
 2359|  11.3k|            s_connect,                                                     \
 2360|  11.3k|            ssl3_read,                                                     \
 2361|  11.3k|            ssl3_peek,                                                     \
 2362|  11.3k|            ssl3_write,                                                    \
 2363|  11.3k|            ssl3_shutdown,                                                 \
 2364|  11.3k|            ssl3_renegotiate,                                              \
 2365|  11.3k|            ssl3_renegotiate_check,                                        \
 2366|  11.3k|            ssl3_read_bytes,                                               \
 2367|  11.3k|            ssl3_write_bytes,                                              \
 2368|  11.3k|            ssl3_dispatch_alert,                                           \
 2369|  11.3k|            ssl3_ctrl,                                                     \
 2370|  11.3k|            ssl3_ctx_ctrl,                                                 \
 2371|  11.3k|            ssl3_get_cipher_by_char,                                       \
 2372|  11.3k|            ssl3_put_cipher_by_char,                                       \
 2373|  11.3k|            ssl3_pending,                                                  \
 2374|  11.3k|            ssl3_num_ciphers,                                              \
 2375|  11.3k|            ssl3_get_cipher,                                               \
 2376|  11.3k|            tls1_default_timeout,                                          \
 2377|  11.3k|            &enc_data,                                                     \
 2378|  11.3k|            ssl_undefined_void_function,                                   \
 2379|  11.3k|            ssl3_callback_ctrl,                                            \
 2380|  11.3k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  11.3k|        };                                                                 \
 2382|  11.3k|        return &func_name##_data;                                          \
 2383|  11.3k|    }
tlsv1_2_client_method:
 2347|  11.3k|    {                                                                      \
 2348|  11.3k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  11.3k|            version,                                                       \
 2350|  11.3k|            flags,                                                         \
 2351|  11.3k|            mask,                                                          \
 2352|  11.3k|            ossl_ssl_connection_new,                                       \
 2353|  11.3k|            ossl_ssl_connection_free,                                      \
 2354|  11.3k|            ossl_ssl_connection_reset,                                     \
 2355|  11.3k|            tls1_new,                                                      \
 2356|  11.3k|            tls1_clear,                                                    \
 2357|  11.3k|            tls1_free,                                                     \
 2358|  11.3k|            s_accept,                                                      \
 2359|  11.3k|            s_connect,                                                     \
 2360|  11.3k|            ssl3_read,                                                     \
 2361|  11.3k|            ssl3_peek,                                                     \
 2362|  11.3k|            ssl3_write,                                                    \
 2363|  11.3k|            ssl3_shutdown,                                                 \
 2364|  11.3k|            ssl3_renegotiate,                                              \
 2365|  11.3k|            ssl3_renegotiate_check,                                        \
 2366|  11.3k|            ssl3_read_bytes,                                               \
 2367|  11.3k|            ssl3_write_bytes,                                              \
 2368|  11.3k|            ssl3_dispatch_alert,                                           \
 2369|  11.3k|            ssl3_ctrl,                                                     \
 2370|  11.3k|            ssl3_ctx_ctrl,                                                 \
 2371|  11.3k|            ssl3_get_cipher_by_char,                                       \
 2372|  11.3k|            ssl3_put_cipher_by_char,                                       \
 2373|  11.3k|            ssl3_pending,                                                  \
 2374|  11.3k|            ssl3_num_ciphers,                                              \
 2375|  11.3k|            ssl3_get_cipher,                                               \
 2376|  11.3k|            tls1_default_timeout,                                          \
 2377|  11.3k|            &enc_data,                                                     \
 2378|  11.3k|            ssl_undefined_void_function,                                   \
 2379|  11.3k|            ssl3_callback_ctrl,                                            \
 2380|  11.3k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  11.3k|        };                                                                 \
 2382|  11.3k|        return &func_name##_data;                                          \
 2383|  11.3k|    }
tlsv1_1_client_method:
 2347|  11.3k|    {                                                                      \
 2348|  11.3k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  11.3k|            version,                                                       \
 2350|  11.3k|            flags,                                                         \
 2351|  11.3k|            mask,                                                          \
 2352|  11.3k|            ossl_ssl_connection_new,                                       \
 2353|  11.3k|            ossl_ssl_connection_free,                                      \
 2354|  11.3k|            ossl_ssl_connection_reset,                                     \
 2355|  11.3k|            tls1_new,                                                      \
 2356|  11.3k|            tls1_clear,                                                    \
 2357|  11.3k|            tls1_free,                                                     \
 2358|  11.3k|            s_accept,                                                      \
 2359|  11.3k|            s_connect,                                                     \
 2360|  11.3k|            ssl3_read,                                                     \
 2361|  11.3k|            ssl3_peek,                                                     \
 2362|  11.3k|            ssl3_write,                                                    \
 2363|  11.3k|            ssl3_shutdown,                                                 \
 2364|  11.3k|            ssl3_renegotiate,                                              \
 2365|  11.3k|            ssl3_renegotiate_check,                                        \
 2366|  11.3k|            ssl3_read_bytes,                                               \
 2367|  11.3k|            ssl3_write_bytes,                                              \
 2368|  11.3k|            ssl3_dispatch_alert,                                           \
 2369|  11.3k|            ssl3_ctrl,                                                     \
 2370|  11.3k|            ssl3_ctx_ctrl,                                                 \
 2371|  11.3k|            ssl3_get_cipher_by_char,                                       \
 2372|  11.3k|            ssl3_put_cipher_by_char,                                       \
 2373|  11.3k|            ssl3_pending,                                                  \
 2374|  11.3k|            ssl3_num_ciphers,                                              \
 2375|  11.3k|            ssl3_get_cipher,                                               \
 2376|  11.3k|            tls1_default_timeout,                                          \
 2377|  11.3k|            &enc_data,                                                     \
 2378|  11.3k|            ssl_undefined_void_function,                                   \
 2379|  11.3k|            ssl3_callback_ctrl,                                            \
 2380|  11.3k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  11.3k|        };                                                                 \
 2382|  11.3k|        return &func_name##_data;                                          \
 2383|  11.3k|    }
tlsv1_client_method:
 2347|  11.3k|    {                                                                      \
 2348|  11.3k|        static const SSL_METHOD func_name##_data = {                       \
 2349|  11.3k|            version,                                                       \
 2350|  11.3k|            flags,                                                         \
 2351|  11.3k|            mask,                                                          \
 2352|  11.3k|            ossl_ssl_connection_new,                                       \
 2353|  11.3k|            ossl_ssl_connection_free,                                      \
 2354|  11.3k|            ossl_ssl_connection_reset,                                     \
 2355|  11.3k|            tls1_new,                                                      \
 2356|  11.3k|            tls1_clear,                                                    \
 2357|  11.3k|            tls1_free,                                                     \
 2358|  11.3k|            s_accept,                                                      \
 2359|  11.3k|            s_connect,                                                     \
 2360|  11.3k|            ssl3_read,                                                     \
 2361|  11.3k|            ssl3_peek,                                                     \
 2362|  11.3k|            ssl3_write,                                                    \
 2363|  11.3k|            ssl3_shutdown,                                                 \
 2364|  11.3k|            ssl3_renegotiate,                                              \
 2365|  11.3k|            ssl3_renegotiate_check,                                        \
 2366|  11.3k|            ssl3_read_bytes,                                               \
 2367|  11.3k|            ssl3_write_bytes,                                              \
 2368|  11.3k|            ssl3_dispatch_alert,                                           \
 2369|  11.3k|            ssl3_ctrl,                                                     \
 2370|  11.3k|            ssl3_ctx_ctrl,                                                 \
 2371|  11.3k|            ssl3_get_cipher_by_char,                                       \
 2372|  11.3k|            ssl3_put_cipher_by_char,                                       \
 2373|  11.3k|            ssl3_pending,                                                  \
 2374|  11.3k|            ssl3_num_ciphers,                                              \
 2375|  11.3k|            ssl3_get_cipher,                                               \
 2376|  11.3k|            tls1_default_timeout,                                          \
 2377|  11.3k|            &enc_data,                                                     \
 2378|  11.3k|            ssl_undefined_void_function,                                   \
 2379|  11.3k|            ssl3_callback_ctrl,                                            \
 2380|  11.3k|            ssl3_ctx_callback_ctrl,                                        \
 2381|  11.3k|        };                                                                 \
 2382|  11.3k|        return &func_name##_data;                                          \
 2383|  11.3k|    }
sslv3_client_method:
 2387|  11.3k|    {                                                            \
 2388|  11.3k|        static const SSL_METHOD func_name##_data = {             \
 2389|  11.3k|            SSL3_VERSION,                                        \
  ------------------
  |  |   23|  11.3k|#define SSL3_VERSION 0x0300
  ------------------
 2390|  11.3k|            SSL_METHOD_NO_FIPS | SSL_METHOD_NO_SUITEB,           \
  ------------------
  |  | 2341|  11.3k|#define SSL_METHOD_NO_FIPS (1U << 0)
  ------------------
                          SSL_METHOD_NO_FIPS | SSL_METHOD_NO_SUITEB,           \
  ------------------
  |  | 2342|  11.3k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
 2391|  11.3k|            SSL_OP_NO_SSLv3,                                     \
  ------------------
  |  |  428|  11.3k|#define SSL_OP_NO_SSLv3 SSL_OP_BIT(25)
  |  |  ------------------
  |  |  |  |  350|  11.3k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
 2392|  11.3k|            ossl_ssl_connection_new,                             \
 2393|  11.3k|            ossl_ssl_connection_free,                            \
 2394|  11.3k|            ossl_ssl_connection_reset,                           \
 2395|  11.3k|            ssl3_new,                                            \
 2396|  11.3k|            ssl3_clear,                                          \
 2397|  11.3k|            ssl3_free,                                           \
 2398|  11.3k|            s_accept,                                            \
 2399|  11.3k|            s_connect,                                           \
 2400|  11.3k|            ssl3_read,                                           \
 2401|  11.3k|            ssl3_peek,                                           \
 2402|  11.3k|            ssl3_write,                                          \
 2403|  11.3k|            ssl3_shutdown,                                       \
 2404|  11.3k|            ssl3_renegotiate,                                    \
 2405|  11.3k|            ssl3_renegotiate_check,                              \
 2406|  11.3k|            ssl3_read_bytes,                                     \
 2407|  11.3k|            ssl3_write_bytes,                                    \
 2408|  11.3k|            ssl3_dispatch_alert,                                 \
 2409|  11.3k|            ssl3_ctrl,                                           \
 2410|  11.3k|            ssl3_ctx_ctrl,                                       \
 2411|  11.3k|            ssl3_get_cipher_by_char,                             \
 2412|  11.3k|            ssl3_put_cipher_by_char,                             \
 2413|  11.3k|            ssl3_pending,                                        \
 2414|  11.3k|            ssl3_num_ciphers,                                    \
 2415|  11.3k|            ssl3_get_cipher,                                     \
 2416|  11.3k|            ssl3_default_timeout,                                \
 2417|  11.3k|            &SSLv3_enc_data,                                     \
 2418|  11.3k|            ssl_undefined_void_function,                         \
 2419|  11.3k|            ssl3_callback_ctrl,                                  \
 2420|  11.3k|            ssl3_ctx_callback_ctrl,                              \
 2421|  11.3k|        };                                                       \
 2422|  11.3k|        return &func_name##_data;                                \
 2423|  11.3k|    }
statem_lib.c:ssl_tsan_counter:
 3074|  1.30k|{
 3075|  1.30k|    if (ssl_tsan_lock(ctx)) {
  ------------------
  |  Branch (3075:9): [True: 1.30k, False: 0]
  ------------------
 3076|       |        tsan_counter(stat);
  ------------------
  |  |  149|  1.30k|#define tsan_counter(ptr) tsan_add((ptr), 1)
  |  |  ------------------
  |  |  |  |   63|  1.30k|#define tsan_add(ptr, n) atomic_fetch_add_explicit((ptr), (n), memory_order_relaxed)
  |  |  ------------------
  ------------------
 3077|  1.30k|        ssl_tsan_unlock(ctx);
 3078|  1.30k|    }
 3079|  1.30k|}
statem_lib.c:ssl_tsan_lock:
 3057|  1.30k|{
 3058|       |#ifdef TSAN_REQUIRES_LOCKING
 3059|       |    if (!CRYPTO_THREAD_write_lock(ctx->tsan_lock))
 3060|       |        return 0;
 3061|       |#endif
 3062|  1.30k|    return 1;
 3063|  1.30k|}
statem_lib.c:ssl_tsan_unlock:
 3066|  1.30k|{
 3067|       |#ifdef TSAN_REQUIRES_LOCKING
 3068|       |    CRYPTO_THREAD_unlock(ctx->tsan_lock);
 3069|       |#endif
 3070|  1.30k|}

ssl_ctx_system_config:
  105|  2.06k|{
  106|  2.06k|    return ssl_do_config(NULL, ctx, NULL, 1);
  107|  2.06k|}
ssl_mcnf.c:ssl_do_config:
   24|  2.06k|{
   25|  2.06k|    SSL_CONF_CTX *cctx = NULL;
   26|  2.06k|    size_t i, idx, cmd_count;
   27|  2.06k|    int err = 1;
   28|  2.06k|    unsigned int flags;
   29|  2.06k|    unsigned int conf_diagnostics = 0;
   30|  2.06k|    const SSL_METHOD *meth;
   31|  2.06k|    const SSL_CONF_CMD *cmds;
   32|  2.06k|    OSSL_LIB_CTX *prev_libctx = NULL;
   33|  2.06k|    OSSL_LIB_CTX *libctx = NULL;
   34|       |
   35|  2.06k|    if (s == NULL && ctx == NULL) {
  ------------------
  |  Branch (35:9): [True: 2.06k, False: 0]
  |  Branch (35:22): [True: 0, False: 2.06k]
  ------------------
   36|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
   37|      0|        goto err;
   38|      0|    }
   39|       |
   40|  2.06k|    if (name == NULL && system)
  ------------------
  |  Branch (40:9): [True: 2.06k, False: 0]
  |  Branch (40:25): [True: 2.06k, False: 0]
  ------------------
   41|  2.06k|        name = "system_default";
   42|  2.06k|    if (!conf_ssl_name_find(name, &idx)) {
  ------------------
  |  Branch (42:9): [True: 2.06k, False: 0]
  ------------------
   43|  2.06k|        if (!system)
  ------------------
  |  Branch (43:13): [True: 0, False: 2.06k]
  ------------------
   44|      0|            ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |   89|      0|#define ERR_LIB_SSL 20
  ------------------
                          ERR_raise_data(ERR_LIB_SSL, SSL_R_INVALID_CONFIGURATION_NAME,
  ------------------
  |  |  148|      0|#define SSL_R_INVALID_CONFIGURATION_NAME 113
  ------------------
   45|      0|                "name=%s", name);
   46|  2.06k|        goto err;
   47|  2.06k|    }
   48|      0|    cmds = conf_ssl_get(idx, &name, &cmd_count);
   49|      0|    cctx = SSL_CONF_CTX_new();
   50|      0|    if (cctx == NULL) {
  ------------------
  |  Branch (50:9): [True: 0, False: 0]
  ------------------
   51|       |        /* this is a fatal error, always report */
   52|      0|        system = 0;
   53|      0|        goto err;
   54|      0|    }
   55|      0|    flags = SSL_CONF_FLAG_FILE;
  ------------------
  |  |  604|      0|#define SSL_CONF_FLAG_FILE 0x2
  ------------------
   56|      0|    if (!system)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|        flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  608|      0|#define SSL_CONF_FLAG_CERTIFICATE 0x20
  ------------------
                      flags |= SSL_CONF_FLAG_CERTIFICATE | SSL_CONF_FLAG_REQUIRE_PRIVATE;
  ------------------
  |  |  609|      0|#define SSL_CONF_FLAG_REQUIRE_PRIVATE 0x40
  ------------------
   58|      0|    if (s != NULL) {
  ------------------
  |  Branch (58:9): [True: 0, False: 0]
  ------------------
   59|      0|        meth = s->method;
   60|      0|        SSL_CONF_CTX_set_ssl(cctx, s);
   61|      0|        libctx = s->ctx->libctx;
   62|      0|    } else {
   63|      0|        meth = ctx->method;
   64|      0|        SSL_CONF_CTX_set_ssl_ctx(cctx, ctx);
   65|      0|        libctx = ctx->libctx;
   66|      0|    }
   67|      0|    conf_diagnostics = OSSL_LIB_CTX_get_conf_diagnostics(libctx);
   68|      0|    if (conf_diagnostics)
  ------------------
  |  Branch (68:9): [True: 0, False: 0]
  ------------------
   69|      0|        flags |= SSL_CONF_FLAG_SHOW_ERRORS;
  ------------------
  |  |  607|      0|#define SSL_CONF_FLAG_SHOW_ERRORS 0x10
  ------------------
   70|      0|    if (meth->ssl_accept != ssl_undefined_function)
  ------------------
  |  Branch (70:9): [True: 0, False: 0]
  ------------------
   71|      0|        flags |= SSL_CONF_FLAG_SERVER;
  ------------------
  |  |  606|      0|#define SSL_CONF_FLAG_SERVER 0x8
  ------------------
   72|      0|    if (meth->ssl_connect != ssl_undefined_function)
  ------------------
  |  Branch (72:9): [True: 0, False: 0]
  ------------------
   73|      0|        flags |= SSL_CONF_FLAG_CLIENT;
  ------------------
  |  |  605|      0|#define SSL_CONF_FLAG_CLIENT 0x4
  ------------------
   74|      0|    SSL_CONF_CTX_set_flags(cctx, flags);
   75|      0|    prev_libctx = OSSL_LIB_CTX_set0_default(libctx);
   76|      0|    err = 0;
   77|      0|    for (i = 0; i < cmd_count; i++) {
  ------------------
  |  Branch (77:17): [True: 0, False: 0]
  ------------------
   78|      0|        char *cmdstr, *arg;
   79|      0|        int rv;
   80|       |
   81|      0|        conf_ssl_get_cmd(cmds, i, &cmdstr, &arg);
   82|      0|        rv = SSL_CONF_cmd(cctx, cmdstr, arg);
   83|      0|        if (rv <= 0)
  ------------------
  |  Branch (83:13): [True: 0, False: 0]
  ------------------
   84|      0|            ++err;
   85|      0|    }
   86|      0|    if (!SSL_CONF_CTX_finish(cctx))
  ------------------
  |  Branch (86:9): [True: 0, False: 0]
  ------------------
   87|      0|        ++err;
   88|  2.06k|err:
   89|  2.06k|    OSSL_LIB_CTX_set0_default(prev_libctx);
   90|  2.06k|    SSL_CONF_CTX_free(cctx);
   91|  2.06k|    return err == 0 || (system && !conf_diagnostics);
  ------------------
  |  Branch (91:12): [True: 0, False: 2.06k]
  |  Branch (91:25): [True: 2.06k, False: 0]
  |  Branch (91:35): [True: 2.06k, False: 0]
  ------------------
   92|      0|}

SSL_CTX_use_certificate_chain_file:
  590|     12|{
  591|       |    return use_certificate_chain_file(ctx, NULL, file);
  592|     12|}
ssl_rsa.c:use_certificate_chain_file:
  464|     12|{
  465|     12|    BIO *in = NULL;
  466|     12|    int ret = 0;
  467|     12|    X509 *x = NULL;
  468|     12|    pem_password_cb *passwd_callback;
  469|     12|    void *passwd_callback_userdata;
  470|     12|    SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx;
  ------------------
  |  Branch (470:25): [True: 12, False: 0]
  ------------------
  471|       |
  472|     12|    if (ctx == NULL && ssl == NULL)
  ------------------
  |  Branch (472:9): [True: 0, False: 12]
  |  Branch (472:24): [True: 0, False: 0]
  ------------------
  473|      0|        return 0;
  474|       |
  475|     12|    ERR_clear_error(); /* clear error stack for
  476|       |                        * SSL_CTX_use_certificate() */
  477|       |
  478|     12|    if (ctx != NULL) {
  ------------------
  |  Branch (478:9): [True: 12, False: 0]
  ------------------
  479|     12|        passwd_callback = ctx->default_passwd_callback;
  480|     12|        passwd_callback_userdata = ctx->default_passwd_callback_userdata;
  481|     12|    } else {
  482|      0|        SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(ssl);
  ------------------
  |  |   39|      0|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|      0|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   33|      0|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|      0|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|      0|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|      0|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  483|       |
  484|      0|        if (sc == NULL)
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  ------------------
  485|      0|            return 0;
  486|       |
  487|      0|        passwd_callback = sc->default_passwd_callback;
  488|      0|        passwd_callback_userdata = sc->default_passwd_callback_userdata;
  489|      0|    }
  490|       |
  491|     12|    if (file == NULL) {
  ------------------
  |  Branch (491:9): [True: 0, False: 12]
  ------------------
  492|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  493|      0|        goto end;
  494|      0|    }
  495|       |
  496|     12|    in = BIO_new(BIO_s_file());
  497|     12|    if (in == NULL) {
  ------------------
  |  Branch (497:9): [True: 0, False: 12]
  ------------------
  498|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  499|      0|        goto end;
  500|      0|    }
  501|       |
  502|     12|    if (BIO_read_filename(in, file) <= 0) {
  ------------------
  |  |  586|     12|#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
  |  |  ------------------
  |  |  |  |  442|     12|#define BIO_C_SET_FILENAME 108
  |  |  ------------------
  |  |  587|     12|    BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |   85|     12|#define BIO_CLOSE 0x01
  |  |  ------------------
  |  |                   BIO_CLOSE | BIO_FP_READ, (char *)(name))
  |  |  ------------------
  |  |  |  |  217|     12|#define BIO_FP_READ 0x02
  |  |  ------------------
  ------------------
  |  Branch (502:9): [True: 10, False: 2]
  ------------------
  503|     10|        ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
  ------------------
  |  |  404|     10|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|     10|    (ERR_new(),                                                  \
  |  |  |  |  407|     10|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     10|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|     10|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|     10|        goto end;
  505|     10|    }
  506|       |
  507|      2|    x = X509_new_ex(real_ctx->libctx, real_ctx->propq);
  508|      2|    if (x == NULL) {
  ------------------
  |  Branch (508:9): [True: 0, False: 2]
  ------------------
  509|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  510|      0|        goto end;
  511|      0|    }
  512|      2|    if (PEM_read_bio_X509_AUX(in, &x, passwd_callback,
  ------------------
  |  Branch (512:9): [True: 2, False: 0]
  ------------------
  513|      2|            passwd_callback_userdata)
  514|      2|        == NULL) {
  515|      2|        ERR_raise(ERR_LIB_SSL, ERR_R_PEM_LIB);
  ------------------
  |  |  404|      2|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      2|    (ERR_new(),                                                  \
  |  |  |  |  407|      2|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      2|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      2|        ERR_set_error)
  |  |  ------------------
  ------------------
  516|      2|        goto end;
  517|      2|    }
  518|       |
  519|      0|    if (ctx)
  ------------------
  |  Branch (519:9): [True: 0, False: 0]
  ------------------
  520|      0|        ret = SSL_CTX_use_certificate(ctx, x);
  521|      0|    else
  522|      0|        ret = SSL_use_certificate(ssl, x);
  523|       |
  524|      0|    if (ERR_peek_error() != 0)
  ------------------
  |  Branch (524:9): [True: 0, False: 0]
  ------------------
  525|      0|        ret = 0; /* Key/certificate mismatch doesn't imply
  526|       |                  * ret==0 ... */
  527|      0|    if (ret) {
  ------------------
  |  Branch (527:9): [True: 0, False: 0]
  ------------------
  528|       |        /*
  529|       |         * If we could set up our certificate, now proceed to the CA
  530|       |         * certificates.
  531|       |         */
  532|      0|        X509 *ca;
  533|      0|        int r;
  534|      0|        unsigned long err;
  535|       |
  536|      0|        if (ctx)
  ------------------
  |  Branch (536:13): [True: 0, False: 0]
  ------------------
  537|      0|            r = SSL_CTX_clear_chain_certs(ctx);
  ------------------
  |  | 1448|      0|    SSL_CTX_set0_chain(ctx, NULL)
  |  |  ------------------
  |  |  |  | 1438|      0|    SSL_CTX_ctrl(ctx, SSL_CTRL_CHAIN, 0, (char *)(sk))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|        else
  539|      0|            r = SSL_clear_chain_certs(ssl);
  ------------------
  |  | 1478|      0|    SSL_set0_chain(s, NULL)
  |  |  ------------------
  |  |  |  | 1468|      0|    SSL_ctrl(s, SSL_CTRL_CHAIN, 0, (char *)(sk))
  |  |  |  |  ------------------
  |  |  |  |  |  | 1349|      0|#define SSL_CTRL_CHAIN 88
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  540|       |
  541|      0|        if (r == 0) {
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|      0|            ret = 0;
  543|      0|            goto end;
  544|      0|        }
  545|       |
  546|      0|        while (1) {
  ------------------
  |  Branch (546:16): [True: 0, Folded]
  ------------------
  547|      0|            ca = X509_new_ex(real_ctx->libctx, real_ctx->propq);
  548|      0|            if (ca == NULL) {
  ------------------
  |  Branch (548:17): [True: 0, False: 0]
  ------------------
  549|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_ASN1_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  550|      0|                goto end;
  551|      0|            }
  552|      0|            if (PEM_read_bio_X509(in, &ca, passwd_callback,
  ------------------
  |  Branch (552:17): [True: 0, False: 0]
  ------------------
  553|      0|                    passwd_callback_userdata)
  554|      0|                != NULL) {
  555|      0|                if (ctx)
  ------------------
  |  Branch (555:21): [True: 0, False: 0]
  ------------------
  556|      0|                    r = SSL_CTX_add0_chain_cert(ctx, ca);
  ------------------
  |  | 1442|      0|    SSL_CTX_ctrl(ctx, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
  |  |  ------------------
  |  |  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  |  |  ------------------
  ------------------
  557|      0|                else
  558|      0|                    r = SSL_add0_chain_cert(ssl, ca);
  ------------------
  |  | 1472|      0|    SSL_ctrl(s, SSL_CTRL_CHAIN_CERT, 0, (char *)(x509))
  |  |  ------------------
  |  |  |  | 1350|      0|#define SSL_CTRL_CHAIN_CERT 89
  |  |  ------------------
  ------------------
  559|       |                /*
  560|       |                 * Note that we must not free ca if it was successfully added to
  561|       |                 * the chain (while we must free the main certificate, since its
  562|       |                 * reference count is increased by SSL_CTX_use_certificate).
  563|       |                 */
  564|      0|                if (!r) {
  ------------------
  |  Branch (564:21): [True: 0, False: 0]
  ------------------
  565|      0|                    X509_free(ca);
  566|      0|                    ret = 0;
  567|      0|                    goto end;
  568|      0|                }
  569|      0|            } else {
  570|      0|                X509_free(ca);
  571|      0|                break;
  572|      0|            }
  573|      0|        }
  574|       |        /* When the while loop ends, it's usually just EOF. */
  575|      0|        err = ERR_peek_last_error();
  576|      0|        if (ERR_GET_LIB(err) == ERR_LIB_PEM
  ------------------
  |  |   81|      0|#define ERR_LIB_PEM 9
  ------------------
  |  Branch (576:13): [True: 0, False: 0]
  ------------------
  577|      0|            && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)
  ------------------
  |  |   44|      0|#define PEM_R_NO_START_LINE 108
  ------------------
  |  Branch (577:16): [True: 0, False: 0]
  ------------------
  578|      0|            ERR_clear_error();
  579|      0|        else
  580|      0|            ret = 0; /* some real error */
  581|      0|    }
  582|       |
  583|     12|end:
  584|     12|    X509_free(x);
  585|     12|    BIO_free(in);
  586|     12|    return ret;
  587|      0|}

ssl_session_calculate_timeout:
   49|  2.61k|{
   50|  2.61k|    ss->calc_timeout = ossl_time_add(ss->time, ss->timeout);
   51|  2.61k|}
SSL_SESSION_new:
  103|  1.30k|{
  104|  1.30k|    SSL_SESSION *ss;
  105|       |
  106|  1.30k|    if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL))
  ------------------
  |  | 2822|  1.30k|#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L
  ------------------
  |  Branch (106:9): [True: 0, False: 1.30k]
  ------------------
  107|      0|        return NULL;
  108|       |
  109|  1.30k|    ss = OPENSSL_zalloc(sizeof(*ss));
  ------------------
  |  |  108|  1.30k|    CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  110|  1.30k|    if (ss == NULL)
  ------------------
  |  Branch (110:9): [True: 0, False: 1.30k]
  ------------------
  111|      0|        return NULL;
  112|       |
  113|  1.30k|    ss->ext.max_fragment_len_mode = TLSEXT_max_fragment_length_UNSPECIFIED;
  ------------------
  |  |  234|  1.30k|#define TLSEXT_max_fragment_length_UNSPECIFIED 255
  ------------------
  114|  1.30k|    ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */
  115|       |    /* 5 minute timeout by default */
  116|  1.30k|    ss->timeout = ossl_seconds2time(60 * 5 + 4);
  ------------------
  |  |   42|  1.30k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  1.30k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  117|  1.30k|    ss->time = ossl_time_now();
  118|  1.30k|    ssl_session_calculate_timeout(ss);
  119|  1.30k|    if (!CRYPTO_NEW_REF(&ss->references, 1)) {
  ------------------
  |  Branch (119:9): [True: 0, False: 1.30k]
  ------------------
  120|      0|        OPENSSL_free(ss);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  121|      0|        return NULL;
  122|      0|    }
  123|       |
  124|  1.30k|    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data)) {
  ------------------
  |  |  252|  1.30k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  |  Branch (124:9): [True: 0, False: 1.30k]
  ------------------
  125|      0|        CRYPTO_FREE_REF(&ss->references);
  126|      0|        OPENSSL_free(ss);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  127|      0|        return NULL;
  128|      0|    }
  129|  1.30k|    return ss;
  130|  1.30k|}
ssl_get_new_session:
  436|  1.30k|{
  437|       |    /* This gets used by clients and servers. */
  438|       |
  439|  1.30k|    SSL_SESSION *ss = NULL;
  440|       |
  441|  1.30k|    if ((ss = SSL_SESSION_new()) == NULL) {
  ------------------
  |  Branch (441:9): [True: 0, False: 1.30k]
  ------------------
  442|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_SSL_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  443|      0|        return 0;
  444|      0|    }
  445|       |
  446|       |    /* If the context has a default timeout, use it */
  447|  1.30k|    if (ossl_time_is_zero(s->session_ctx->session_timeout))
  ------------------
  |  Branch (447:9): [True: 0, False: 1.30k]
  ------------------
  448|      0|        ss->timeout = SSL_CONNECTION_GET_SSL(s)->method->get_timeout();
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  449|  1.30k|    else
  450|  1.30k|        ss->timeout = s->session_ctx->session_timeout;
  451|  1.30k|    ssl_session_calculate_timeout(ss);
  452|       |
  453|  1.30k|    SSL_SESSION_free(s->session);
  454|  1.30k|    s->session = NULL;
  455|       |
  456|  1.30k|    if (session) {
  ------------------
  |  Branch (456:9): [True: 0, False: 1.30k]
  ------------------
  457|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  458|       |            /*
  459|       |             * We generate the session id while constructing the
  460|       |             * NewSessionTicket in TLSv1.3.
  461|       |             */
  462|      0|            ss->session_id_length = 0;
  463|      0|        } else if (!ssl_generate_session_id(s, ss)) {
  ------------------
  |  Branch (463:20): [True: 0, False: 0]
  ------------------
  464|       |            /* SSLfatal() already called */
  465|      0|            SSL_SESSION_free(ss);
  466|      0|            return 0;
  467|      0|        }
  468|       |
  469|  1.30k|    } else {
  470|  1.30k|        ss->session_id_length = 0;
  471|  1.30k|    }
  472|       |
  473|  1.30k|    if (s->sid_ctx_length > sizeof(ss->sid_ctx)) {
  ------------------
  |  Branch (473:9): [True: 0, False: 1.30k]
  ------------------
  474|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  475|      0|        SSL_SESSION_free(ss);
  476|      0|        return 0;
  477|      0|    }
  478|  1.30k|    memcpy(ss->sid_ctx, s->sid_ctx, s->sid_ctx_length);
  479|  1.30k|    ss->sid_ctx_length = s->sid_ctx_length;
  480|  1.30k|    s->session = ss;
  481|  1.30k|    ss->ssl_version = s->version;
  482|  1.30k|    ss->verify_result = X509_V_OK;
  ------------------
  |  |  312|  1.30k|#define X509_V_OK 0
  ------------------
  483|       |
  484|       |    /* If client supports extended master secret set it in session */
  485|  1.30k|    if (s->s3.flags & TLS1_FLAGS_RECEIVED_EXTMS)
  ------------------
  |  |  300|  1.30k|#define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
  ------------------
  |  Branch (485:9): [True: 0, False: 1.30k]
  ------------------
  486|      0|        ss->flags |= SSL_SESS_FLAG_EXTMS;
  ------------------
  |  |  567|      0|#define SSL_SESS_FLAG_EXTMS 0x1
  ------------------
  487|       |
  488|  1.30k|    return 1;
  489|  1.30k|}
SSL_CTX_remove_session:
  811|  1.11k|{
  812|  1.11k|    return remove_session_lock(ctx, c, 1);
  813|  1.11k|}
SSL_SESSION_free:
  845|  7.80k|{
  846|  7.80k|    int i;
  847|       |
  848|  7.80k|    if (ss == NULL)
  ------------------
  |  Branch (848:9): [True: 6.49k, False: 1.30k]
  ------------------
  849|  6.49k|        return;
  850|  1.30k|    CRYPTO_DOWN_REF(&ss->references, &i);
  851|  1.30k|    REF_PRINT_COUNT("SSL_SESSION", i, ss);
  ------------------
  |  |  301|  1.30k|    REF_PRINT_EX(text, val, (void *)object)
  |  |  ------------------
  |  |  |  |  299|  1.30k|    OSSL_TRACE3(REF_COUNT, "%p:%4d:%s\n", (object), (count), (text));
  |  |  |  |  ------------------
  |  |  |  |  |  |  297|  1.30k|    OSSL_TRACEV(category, (trc_out, format, arg1, arg2, arg3))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  285|  1.30k|#define OSSL_TRACEV(category, args) ((void)0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  852|  1.30k|    if (i > 0)
  ------------------
  |  Branch (852:9): [True: 0, False: 1.30k]
  ------------------
  853|      0|        return;
  854|  1.30k|    REF_ASSERT_ISNT(i < 0);
  ------------------
  |  |  293|  1.30k|    (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
  |  |  ------------------
  |  |  |  Branch (293:12): [True: 0, False: 1.30k]
  |  |  ------------------
  ------------------
  855|       |
  856|  1.30k|    CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_SESSION, ss, &ss->ex_data);
  ------------------
  |  |  252|  1.30k|#define CRYPTO_EX_INDEX_SSL_SESSION 2
  ------------------
  857|       |
  858|  1.30k|    OPENSSL_cleanse(ss->master_key, sizeof(ss->master_key));
  859|  1.30k|    OPENSSL_cleanse(ss->session_id, sizeof(ss->session_id));
  860|  1.30k|    X509_free(ss->peer);
  861|  1.30k|    EVP_PKEY_free(ss->peer_rpk);
  862|  1.30k|    OSSL_STACK_OF_X509_free(ss->peer_chain);
  863|  1.30k|    OPENSSL_free(ss->ext.hostname);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  864|  1.30k|    OPENSSL_free(ss->ext.tick);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  865|  1.30k|#ifndef OPENSSL_NO_PSK
  866|  1.30k|    OPENSSL_free(ss->psk_identity_hint);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  867|  1.30k|    OPENSSL_free(ss->psk_identity);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  868|  1.30k|#endif
  869|  1.30k|#ifndef OPENSSL_NO_SRP
  870|  1.30k|    OPENSSL_free(ss->srp_username);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  871|  1.30k|#endif
  872|  1.30k|    OPENSSL_free(ss->ext.alpn_selected);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  873|  1.30k|    OPENSSL_free(ss->ticket_appdata);
  ------------------
  |  |  131|  1.30k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  874|  1.30k|    CRYPTO_FREE_REF(&ss->references);
  875|  1.30k|    OPENSSL_clear_free(ss, sizeof(*ss));
  ------------------
  |  |  129|  1.30k|    CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  876|  1.30k|}
SSL_CTX_flush_sessions_ex:
 1211|  2.09k|{
 1212|  2.09k|    STACK_OF(SSL_SESSION) *sk;
  ------------------
  |  |   33|  2.09k|#define STACK_OF(type) struct stack_st_##type
  ------------------
 1213|  2.09k|    SSL_SESSION *current;
 1214|  2.09k|    unsigned long i;
 1215|  2.09k|    const OSSL_TIME timeout = ossl_time_from_time_t(t);
 1216|       |
 1217|  2.09k|    if (!CRYPTO_THREAD_write_lock(s->lock))
  ------------------
  |  Branch (1217:9): [True: 0, False: 2.09k]
  ------------------
 1218|      0|        return;
 1219|       |
 1220|  2.09k|    sk = sk_SSL_SESSION_new_null();
 1221|  2.09k|    i = lh_SSL_SESSION_get_down_load(s->sessions);
 1222|  2.09k|    lh_SSL_SESSION_set_down_load(s->sessions, 0);
 1223|       |
 1224|       |    /*
 1225|       |     * Iterate over the list from the back (oldest), and stop
 1226|       |     * when a session can no longer be removed.
 1227|       |     * Add the session to a temporary list to be freed outside
 1228|       |     * the SSL_CTX lock.
 1229|       |     * But still do the remove_session_cb() within the lock.
 1230|       |     */
 1231|  2.09k|    while (s->session_cache_tail != NULL) {
  ------------------
  |  Branch (1231:12): [True: 0, False: 2.09k]
  ------------------
 1232|      0|        current = s->session_cache_tail;
 1233|      0|        if (t == 0 || sess_timedout(timeout, current)) {
  ------------------
  |  Branch (1233:13): [True: 0, False: 0]
  |  Branch (1233:23): [True: 0, False: 0]
  ------------------
 1234|      0|            lh_SSL_SESSION_delete(s->sessions, current);
 1235|      0|            SSL_SESSION_list_remove(s, current);
 1236|      0|            current->not_resumable = 1;
 1237|      0|            if (s->remove_session_cb != NULL)
  ------------------
  |  Branch (1237:17): [True: 0, False: 0]
  ------------------
 1238|      0|                s->remove_session_cb(s, current);
 1239|       |            /*
 1240|       |             * Throw the session on a stack, it's entirely plausible
 1241|       |             * that while freeing outside the critical section, the
 1242|       |             * session could be re-added, so avoid using the next/prev
 1243|       |             * pointers. If the stack failed to create, or the session
 1244|       |             * couldn't be put on the stack, just free it here
 1245|       |             */
 1246|      0|            if (sk == NULL || !sk_SSL_SESSION_push(sk, current))
  ------------------
  |  Branch (1246:17): [True: 0, False: 0]
  |  Branch (1246:31): [True: 0, False: 0]
  ------------------
 1247|      0|                SSL_SESSION_free(current);
 1248|      0|        } else {
 1249|      0|            break;
 1250|      0|        }
 1251|      0|    }
 1252|       |
 1253|  2.09k|    lh_SSL_SESSION_set_down_load(s->sessions, i);
 1254|  2.09k|    CRYPTO_THREAD_unlock(s->lock);
 1255|       |
 1256|  2.09k|    sk_SSL_SESSION_pop_free(sk, SSL_SESSION_free);
 1257|  2.09k|}
ssl_clear_bad_session:
 1260|  3.94k|{
 1261|  3.94k|    if ((s->session != NULL) && !(s->shutdown & SSL_SENT_SHUTDOWN) && !(SSL_in_init(SSL_CONNECTION_GET_SSL(s)) || SSL_in_before(SSL_CONNECTION_GET_SSL(s)))) {
  ------------------
  |  |  215|  1.30k|#define SSL_SENT_SHUTDOWN 1
  ------------------
                  if ((s->session != NULL) && !(s->shutdown & SSL_SENT_SHUTDOWN) && !(SSL_in_init(SSL_CONNECTION_GET_SSL(s)) || SSL_in_before(SSL_CONNECTION_GET_SSL(s)))) {
  ------------------
  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
                  if ((s->session != NULL) && !(s->shutdown & SSL_SENT_SHUTDOWN) && !(SSL_in_init(SSL_CONNECTION_GET_SSL(s)) || SSL_in_before(SSL_CONNECTION_GET_SSL(s)))) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1261:9): [True: 1.30k, False: 2.63k]
  |  Branch (1261:33): [True: 1.30k, False: 0]
  |  Branch (1261:73): [True: 1.30k, False: 0]
  |  Branch (1261:115): [True: 0, False: 0]
  ------------------
 1262|      0|        SSL_CTX_remove_session(s->session_ctx, s->session);
 1263|      0|        return 1;
 1264|      0|    } else
 1265|  3.94k|        return 0;
 1266|  3.94k|}
SSL_CTX_sess_set_new_cb:
 1350|  1.31k|{
 1351|  1.31k|    ctx->new_session_cb = cb;
 1352|  1.31k|}
ssl_sess.c:remove_session_lock:
  816|  1.11k|{
  817|  1.11k|    SSL_SESSION *r;
  818|  1.11k|    int ret = 0;
  819|       |
  820|  1.11k|    if ((c != NULL) && (c->session_id_length != 0)) {
  ------------------
  |  Branch (820:9): [True: 1.11k, False: 0]
  |  Branch (820:24): [True: 0, False: 1.11k]
  ------------------
  821|      0|        if (lck) {
  ------------------
  |  Branch (821:13): [True: 0, False: 0]
  ------------------
  822|      0|            if (!CRYPTO_THREAD_write_lock(ctx->lock))
  ------------------
  |  Branch (822:17): [True: 0, False: 0]
  ------------------
  823|      0|                return 0;
  824|      0|        }
  825|      0|        if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) != NULL) {
  ------------------
  |  Branch (825:13): [True: 0, False: 0]
  ------------------
  826|      0|            ret = 1;
  827|      0|            r = lh_SSL_SESSION_delete(ctx->sessions, r);
  828|      0|            SSL_SESSION_list_remove(ctx, r);
  829|      0|        }
  830|      0|        c->not_resumable = 1;
  831|       |
  832|      0|        if (lck)
  ------------------
  |  Branch (832:13): [True: 0, False: 0]
  ------------------
  833|      0|            CRYPTO_THREAD_unlock(ctx->lock);
  834|       |
  835|      0|        if (ctx->remove_session_cb != NULL)
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|            ctx->remove_session_cb(ctx, c);
  837|       |
  838|      0|        if (ret)
  ------------------
  |  Branch (838:13): [True: 0, False: 0]
  ------------------
  839|      0|            SSL_SESSION_free(r);
  840|      0|    }
  841|  1.11k|    return ret;
  842|  1.11k|}

extension_is_relevant:
  510|  35.9k|{
  511|  35.9k|    int is_tls13;
  512|       |
  513|       |    /*
  514|       |     * For HRR we haven't selected the version yet but we know it will be
  515|       |     * TLSv1.3
  516|       |     */
  517|  35.9k|    if ((thisctx & SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST) != 0)
  ------------------
  |  |  304|  35.9k|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (517:9): [True: 0, False: 35.9k]
  ------------------
  518|      0|        is_tls13 = 1;
  519|  35.9k|    else
  520|  35.9k|        is_tls13 = SSL_CONNECTION_IS_TLS13(s);
  ------------------
  |  |  265|  35.9k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  71.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  35.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  35.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 35.9k, False: 0]
  |  |  ------------------
  |  |  266|  35.9k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  35.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  71.9k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 35.9k, False: 0]
  |  |  ------------------
  |  |  267|  35.9k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  35.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  35.9k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 35.9k]
  |  |  ------------------
  ------------------
  521|       |
  522|  35.9k|    if ((SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  71.9k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  35.9k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  35.9k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 35.9k]
  |  |  ------------------
  ------------------
  523|      0|            && (extctx & SSL_EXT_TLS_IMPLEMENTATION_ONLY) != 0)
  ------------------
  |  |  290|      0|#define SSL_EXT_TLS_IMPLEMENTATION_ONLY 0x00004
  ------------------
  |  Branch (523:16): [True: 0, False: 0]
  ------------------
  524|  35.9k|        || (s->version == SSL3_VERSION
  ------------------
  |  |   23|  71.9k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (524:13): [True: 0, False: 35.9k]
  ------------------
  525|      0|            && (extctx & SSL_EXT_SSL3_ALLOWED) == 0)
  ------------------
  |  |  292|      0|#define SSL_EXT_SSL3_ALLOWED 0x00008
  ------------------
  |  Branch (525:16): [True: 0, False: 0]
  ------------------
  526|       |        /*
  527|       |         * Note that SSL_IS_TLS13() means "TLS 1.3 has been negotiated",
  528|       |         * which is never true when generating the ClientHello.
  529|       |         * However, version negotiation *has* occurred by the time the
  530|       |         * ClientHello extensions are being parsed.
  531|       |         * Be careful to allow TLS 1.3-only extensions when generating
  532|       |         * the ClientHello.
  533|       |         */
  534|  35.9k|        || (is_tls13 && (extctx & SSL_EXT_TLS1_2_AND_BELOW_ONLY) != 0)
  ------------------
  |  |  294|      0|#define SSL_EXT_TLS1_2_AND_BELOW_ONLY 0x00010
  ------------------
  |  Branch (534:13): [True: 0, False: 35.9k]
  |  Branch (534:25): [True: 0, False: 0]
  ------------------
  535|  35.9k|        || (!is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  296|  35.9k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (535:13): [True: 35.9k, False: 0]
  |  Branch (535:26): [True: 9.92k, False: 26.0k]
  ------------------
  536|  9.92k|            && (thisctx & SSL_EXT_CLIENT_HELLO) == 0)
  ------------------
  |  |  299|  9.92k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (536:16): [True: 0, False: 9.92k]
  ------------------
  537|  35.9k|        || (s->server && !is_tls13 && (extctx & SSL_EXT_TLS1_3_ONLY) != 0)
  ------------------
  |  |  296|      0|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (537:13): [True: 0, False: 35.9k]
  |  Branch (537:26): [True: 0, False: 0]
  |  Branch (537:39): [True: 0, False: 0]
  ------------------
  538|  35.9k|        || (s->hit && (extctx & SSL_EXT_IGNORE_ON_RESUMPTION) != 0))
  ------------------
  |  |  298|      0|#define SSL_EXT_IGNORE_ON_RESUMPTION 0x00040
  ------------------
  |  Branch (538:13): [True: 0, False: 35.9k]
  |  Branch (538:23): [True: 0, False: 0]
  ------------------
  539|      0|        return 0;
  540|  35.9k|    return 1;
  541|  35.9k|}
should_add_extension:
  777|  35.9k|{
  778|       |    /* Skip if not relevant for our context */
  779|  35.9k|    if ((extctx & thisctx) == 0)
  ------------------
  |  Branch (779:9): [True: 0, False: 35.9k]
  ------------------
  780|      0|        return 0;
  781|       |
  782|       |    /* Check if this extension is defined for our protocol. If not, skip */
  783|  35.9k|    if (!extension_is_relevant(s, extctx, thisctx)
  ------------------
  |  Branch (783:9): [True: 0, False: 35.9k]
  ------------------
  784|  35.9k|        || ((extctx & SSL_EXT_TLS1_3_ONLY) != 0
  ------------------
  |  |  296|  35.9k|#define SSL_EXT_TLS1_3_ONLY 0x00020
  ------------------
  |  Branch (784:13): [True: 9.92k, False: 26.0k]
  ------------------
  785|  9.92k|            && (thisctx & SSL_EXT_CLIENT_HELLO) != 0
  ------------------
  |  |  299|  9.92k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (785:16): [True: 9.92k, False: 0]
  ------------------
  786|  9.92k|            && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |  258|  19.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  9.92k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  9.92k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 9.92k]
  |  |  ------------------
  ------------------
                          && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION)))
  ------------------
  |  |   27|  9.92k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (786:46): [True: 40, False: 9.88k]
  ------------------
  787|     40|        return 0;
  788|       |
  789|  35.9k|    return 1;
  790|  35.9k|}
tls_construct_extensions:
  803|  1.24k|{
  804|  1.24k|    size_t i;
  805|  1.24k|    int min_version, max_version = 0, reason;
  806|  1.24k|    const EXTENSION_DEFINITION *thisexd;
  807|  1.24k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  308|  1.24k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  808|       |
  809|  1.24k|    if (!WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (809:9): [True: 0, False: 1.24k]
  ------------------
  810|       |        /*
  811|       |         * If extensions are of zero length then we don't even add the
  812|       |         * extensions length bytes to a ClientHello/ServerHello
  813|       |         * (for non-TLSv1.3).
  814|       |         */
  815|  1.24k|        || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  299|  1.24k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                      || ((context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_2_SERVER_HELLO)) != 0
  ------------------
  |  |  301|  1.24k|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
  |  Branch (815:13): [True: 1.24k, False: 0]
  ------------------
  816|  1.24k|            && !WPACKET_set_flags(pkt,
  ------------------
  |  Branch (816:16): [True: 0, False: 1.24k]
  ------------------
  817|  1.24k|                WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH))) {
  ------------------
  |  |  703|  1.24k|#define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2
  ------------------
  818|      0|        if (!for_comp)
  ------------------
  |  Branch (818:13): [True: 0, False: 0]
  ------------------
  819|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  820|      0|        return 0;
  821|      0|    }
  822|       |
  823|  1.24k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  299|  1.24k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (823:9): [True: 1.24k, False: 0]
  ------------------
  824|  1.24k|        reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  825|  1.24k|        if (reason != 0) {
  ------------------
  |  Branch (825:13): [True: 0, False: 1.24k]
  ------------------
  826|      0|            if (!for_comp)
  ------------------
  |  Branch (826:17): [True: 0, False: 0]
  ------------------
  827|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  828|      0|            return 0;
  829|      0|        }
  830|  1.24k|    }
  831|       |
  832|       |    /* Add custom extensions first */
  833|  1.24k|    if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  299|  1.24k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (833:9): [True: 1.24k, False: 0]
  ------------------
  834|       |        /* On the server side with initialise during ClientHello parsing */
  835|  1.24k|        custom_ext_init(&s->cert->custext);
  836|  1.24k|    }
  837|  1.24k|    if (!custom_ext_add(s, context, pkt, x, chainidx, max_version)) {
  ------------------
  |  Branch (837:9): [True: 0, False: 1.24k]
  ------------------
  838|       |        /* SSLfatal() already called */
  839|      0|        return 0;
  840|      0|    }
  841|       |
  842|  37.2k|    for (i = 0, thisexd = ext_defs; i < OSSL_NELEM(ext_defs); i++, thisexd++) {
  ------------------
  |  |   14|  37.2k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (842:37): [True: 35.9k, False: 1.24k]
  ------------------
  843|  35.9k|        EXT_RETURN (*construct)(SSL_CONNECTION *s, WPACKET *pkt,
  844|  35.9k|            unsigned int context,
  845|  35.9k|            X509 *x, size_t chainidx);
  846|  35.9k|        EXT_RETURN ret;
  847|       |
  848|       |        /* Skip if not relevant for our context */
  849|  35.9k|        if (!should_add_extension(s, thisexd->context, context, max_version))
  ------------------
  |  Branch (849:13): [True: 40, False: 35.9k]
  ------------------
  850|     40|            continue;
  851|       |
  852|  35.9k|        construct = s->server ? thisexd->construct_stoc
  ------------------
  |  Branch (852:21): [True: 0, False: 35.9k]
  ------------------
  853|  35.9k|                              : thisexd->construct_ctos;
  854|       |
  855|  35.9k|        if (construct == NULL)
  ------------------
  |  Branch (855:13): [True: 2.48k, False: 33.4k]
  ------------------
  856|  2.48k|            continue;
  857|       |
  858|  33.4k|        ret = construct(s, pkt, context, x, chainidx);
  859|  33.4k|        if (ret == EXT_RETURN_FAIL) {
  ------------------
  |  Branch (859:13): [True: 1, False: 33.4k]
  ------------------
  860|       |            /* SSLfatal() already called */
  861|      1|            return 0;
  862|      1|        }
  863|  33.4k|        if (ret == EXT_RETURN_SENT
  ------------------
  |  Branch (863:13): [True: 14.8k, False: 18.5k]
  ------------------
  864|  14.8k|            && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  299|  14.8k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
                          && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  307|  14.8k|#define SSL_EXT_TLS1_3_CERTIFICATE_REQUEST 0x04000
  ------------------
                          && (context & (SSL_EXT_CLIENT_HELLO | SSL_EXT_TLS1_3_CERTIFICATE_REQUEST | SSL_EXT_TLS1_3_NEW_SESSION_TICKET)) != 0)
  ------------------
  |  |  306|  14.8k|#define SSL_EXT_TLS1_3_NEW_SESSION_TICKET 0x02000
  ------------------
  |  Branch (864:16): [True: 14.8k, False: 0]
  ------------------
  865|  14.8k|            s->ext.extflags[i] |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2068|  14.8k|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  866|  33.4k|    }
  867|       |
  868|  1.24k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (868:9): [True: 0, False: 1.24k]
  ------------------
  869|      0|        if (!for_comp)
  ------------------
  |  Branch (869:13): [True: 0, False: 0]
  ------------------
  870|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  871|      0|        return 0;
  872|      0|    }
  873|       |
  874|  1.24k|    return 1;
  875|  1.24k|}
extensions.c:tls_construct_compress_certificate:
 1737|  1.23k|{
 1738|       |#ifndef OPENSSL_NO_COMP_ALG
 1739|       |    int i;
 1740|       |
 1741|       |    if (!ossl_comp_has_alg(0))
 1742|       |        return EXT_RETURN_NOT_SENT;
 1743|       |
 1744|       |    /* Server: Don't attempt to compress a non-X509 (i.e. an RPK) */
 1745|       |    if (sc->server && sc->ext.server_cert_type != TLSEXT_cert_type_x509) {
 1746|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 1747|       |        return EXT_RETURN_NOT_SENT;
 1748|       |    }
 1749|       |
 1750|       |    /* Client: If we sent a client cert-type extension, don't indicate compression */
 1751|       |    if (!sc->server && sc->ext.client_cert_type_ctos) {
 1752|       |        sc->cert_comp_prefs[0] = TLSEXT_comp_cert_none;
 1753|       |        return EXT_RETURN_NOT_SENT;
 1754|       |    }
 1755|       |
 1756|       |    /* Do not indicate we support receiving compressed certificates */
 1757|       |    if ((sc->options & SSL_OP_NO_RX_CERTIFICATE_COMPRESSION) != 0)
 1758|       |        return EXT_RETURN_NOT_SENT;
 1759|       |
 1760|       |    if (sc->cert_comp_prefs[0] == TLSEXT_comp_cert_none)
 1761|       |        return EXT_RETURN_NOT_SENT;
 1762|       |
 1763|       |    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_compress_certificate)
 1764|       |        || !WPACKET_start_sub_packet_u16(pkt)
 1765|       |        || !WPACKET_start_sub_packet_u8(pkt))
 1766|       |        goto err;
 1767|       |
 1768|       |    for (i = 0; sc->cert_comp_prefs[i] != TLSEXT_comp_cert_none; i++) {
 1769|       |        if (!WPACKET_put_bytes_u16(pkt, sc->cert_comp_prefs[i]))
 1770|       |            goto err;
 1771|       |    }
 1772|       |    if (!WPACKET_close(pkt) || !WPACKET_close(pkt))
 1773|       |        goto err;
 1774|       |
 1775|       |    sc->ext.compress_certificate_sent = 1;
 1776|       |    return EXT_RETURN_SENT;
 1777|       |err:
 1778|       |    SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1779|       |    return EXT_RETURN_FAIL;
 1780|       |#else
 1781|  1.23k|    return EXT_RETURN_NOT_SENT;
 1782|  1.23k|#endif
 1783|  1.23k|}
extensions.c:tls_construct_certificate_authorities:
 1241|  1.23k|{
 1242|  1.23k|    const STACK_OF(X509_NAME) *ca_sk = get_ca_names(s);
 1243|       |
 1244|  1.23k|    if (ca_sk == NULL || sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|  1.23k|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (1244:9): [True: 0, False: 1.23k]
  |  Branch (1244:26): [True: 1.23k, False: 0]
  ------------------
 1245|  1.23k|        return EXT_RETURN_NOT_SENT;
 1246|       |
 1247|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_certificate_authorities)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1247:9): [True: 0, False: 0]
  ------------------
 1248|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1248:12): [True: 0, False: 0]
  ------------------
 1249|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1250|      0|        return EXT_RETURN_FAIL;
 1251|      0|    }
 1252|       |
 1253|      0|    if (!construct_ca_names(s, ca_sk, pkt)) {
  ------------------
  |  Branch (1253:9): [True: 0, False: 0]
  ------------------
 1254|       |        /* SSLfatal() already called */
 1255|      0|        return EXT_RETURN_FAIL;
 1256|      0|    }
 1257|       |
 1258|      0|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1258:9): [True: 0, False: 0]
  ------------------
 1259|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1260|      0|        return EXT_RETURN_FAIL;
 1261|      0|    }
 1262|       |
 1263|      0|    return EXT_RETURN_SENT;
 1264|      0|}

tls_construct_ctos_renegotiate:
   19|  1.24k|{
   20|  1.24k|    if (!s->renegotiate) {
  ------------------
  |  Branch (20:9): [True: 1.24k, False: 0]
  ------------------
   21|       |        /* If not renegotiating, send an empty RI extension to indicate support */
   22|       |
   23|       |#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
   24|       |#error Internal DTLS version error
   25|       |#endif
   26|       |
   27|  1.24k|        if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  2.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.24k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (27:13): [True: 1.24k, False: 0]
  ------------------
   28|  1.24k|            && (s->min_proto_version >= TLS1_3_VERSION
  ------------------
  |  |   27|  2.48k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (28:17): [True: 3, False: 1.23k]
  ------------------
   29|  1.23k|                || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2766|  1.23k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  1.23k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                              || (ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  1.23k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (29:21): [True: 4, False: 1.23k]
  ------------------
   30|      4|                    && s->min_proto_version <= TLS1_VERSION))) {
  ------------------
  |  |   24|      4|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (30:24): [True: 0, False: 4]
  ------------------
   31|       |            /*
   32|       |             * For TLS <= 1.0 SCSV is used instead, and for TLS 1.3 this
   33|       |             * extension isn't used at all.
   34|       |             */
   35|      3|            return EXT_RETURN_NOT_SENT;
   36|      3|        }
   37|       |
   38|  1.23k|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  891|  2.47k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (38:13): [True: 0, False: 1.23k]
  ------------------
   39|  1.23k|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.47k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (39:16): [True: 0, False: 1.23k]
  ------------------
   40|  1.23k|            || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  889|  2.47k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (40:16): [True: 0, False: 1.23k]
  ------------------
   41|  1.23k|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (41:16): [True: 0, False: 1.23k]
  ------------------
   42|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   43|      0|            return EXT_RETURN_FAIL;
   44|      0|        }
   45|       |
   46|  1.23k|        return EXT_RETURN_SENT;
   47|  1.23k|    }
   48|       |
   49|       |    /* Add a complete RI extension if renegotiating */
   50|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_renegotiate)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (50:9): [True: 0, False: 0]
  ------------------
   51|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (51:12): [True: 0, False: 0]
  ------------------
   52|      0|        || !WPACKET_sub_memcpy_u8(pkt, s->s3.previous_client_finished,
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (52:12): [True: 0, False: 0]
  ------------------
   53|      0|            s->s3.previous_client_finished_len)
   54|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (54:12): [True: 0, False: 0]
  ------------------
   55|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   56|      0|        return EXT_RETURN_FAIL;
   57|      0|    }
   58|       |
   59|      0|    return EXT_RETURN_SENT;
   60|      0|}
tls_construct_ctos_server_name:
   65|  1.24k|{
   66|  1.24k|    if (s->ext.hostname == NULL)
  ------------------
  |  Branch (66:9): [True: 1.21k, False: 22]
  ------------------
   67|  1.21k|        return EXT_RETURN_NOT_SENT;
   68|       |
   69|       |    /* Add TLS extension servername to the Client Hello message */
   70|     22|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_name)
  ------------------
  |  |  891|     44|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (70:9): [True: 0, False: 22]
  ------------------
   71|       |        /* Sub-packet for server_name extension */
   72|     22|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|     44|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (72:12): [True: 0, False: 22]
  ------------------
   73|       |        /* Sub-packet for servername list (always 1 hostname)*/
   74|     22|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|     44|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (74:12): [True: 0, False: 22]
  ------------------
   75|     22|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_NAMETYPE_host_name)
  ------------------
  |  |  889|     44|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (75:12): [True: 0, False: 22]
  ------------------
   76|     22|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.hostname,
  ------------------
  |  |  920|     44|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (76:12): [True: 0, False: 22]
  ------------------
   77|     22|            strlen(s->ext.hostname))
   78|     22|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (78:12): [True: 0, False: 22]
  ------------------
   79|     22|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (79:12): [True: 0, False: 22]
  ------------------
   80|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
   81|      0|        return EXT_RETURN_FAIL;
   82|      0|    }
   83|       |
   84|     22|    return EXT_RETURN_SENT;
   85|     22|}
tls_construct_ctos_maxfragmentlen:
   91|  1.24k|{
   92|  1.24k|    if (s->ext.max_fragment_len_mode == TLSEXT_max_fragment_length_DISABLED)
  ------------------
  |  |  227|  1.24k|#define TLSEXT_max_fragment_length_DISABLED 0
  ------------------
  |  Branch (92:9): [True: 1.24k, False: 0]
  ------------------
   93|  1.24k|        return EXT_RETURN_NOT_SENT;
   94|       |
   95|       |    /* Add Max Fragment Length extension if client enabled it. */
   96|       |    /*-
   97|       |     * 4 bytes for this extension type and extension length
   98|       |     * 1 byte for the Max Fragment Length code value.
   99|       |     */
  100|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_max_fragment_length)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (100:9): [True: 0, False: 0]
  ------------------
  101|       |        /* Sub-packet for Max Fragment Length extension (1 byte) */
  102|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (102:12): [True: 0, False: 0]
  ------------------
  103|      0|        || !WPACKET_put_bytes_u8(pkt, s->ext.max_fragment_len_mode)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (103:12): [True: 0, False: 0]
  ------------------
  104|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (104:12): [True: 0, False: 0]
  ------------------
  105|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  106|      0|        return EXT_RETURN_FAIL;
  107|      0|    }
  108|       |
  109|      0|    return EXT_RETURN_SENT;
  110|      0|}
tls_construct_ctos_srp:
  116|  1.24k|{
  117|       |    /* Add SRP username if there is one */
  118|  1.24k|    if (s->srp_ctx.login == NULL)
  ------------------
  |  Branch (118:9): [True: 1.23k, False: 5]
  ------------------
  119|  1.23k|        return EXT_RETURN_NOT_SENT;
  120|       |
  121|      5|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_srp)
  ------------------
  |  |  891|     10|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (121:9): [True: 0, False: 5]
  ------------------
  122|       |        /* Sub-packet for SRP extension */
  123|      5|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|     10|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (123:12): [True: 0, False: 5]
  ------------------
  124|      5|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  790|     10|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (124:12): [True: 0, False: 5]
  ------------------
  125|       |        /* login must not be zero...internal error if so */
  126|      5|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)
  ------------------
  |  |  697|      5|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (126:12): [True: 0, False: 5]
  ------------------
  127|      5|        || !WPACKET_memcpy(pkt, s->srp_ctx.login,
  ------------------
  |  Branch (127:12): [True: 0, False: 5]
  ------------------
  128|      5|            strlen(s->srp_ctx.login))
  129|      5|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (129:12): [True: 0, False: 5]
  ------------------
  130|      5|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (130:12): [True: 0, False: 5]
  ------------------
  131|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  132|      0|        return EXT_RETURN_FAIL;
  133|      0|    }
  134|       |
  135|      5|    return EXT_RETURN_SENT;
  136|      5|}
tls_construct_ctos_ec_pt_formats:
  186|  1.24k|{
  187|  1.24k|    const unsigned char *pformats;
  188|  1.24k|    size_t num_formats;
  189|  1.24k|    int reason, min_version, max_version;
  190|       |
  191|  1.24k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  192|  1.24k|    if (reason != 0) {
  ------------------
  |  Branch (192:9): [True: 0, False: 1.24k]
  ------------------
  193|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  194|      0|        return EXT_RETURN_FAIL;
  195|      0|    }
  196|  1.24k|    if (!use_ecc(s, min_version, max_version))
  ------------------
  |  Branch (196:9): [True: 0, False: 1.24k]
  ------------------
  197|      0|        return EXT_RETURN_NOT_SENT;
  198|       |
  199|       |    /* Add TLS extension ECPointFormats to the ClientHello message */
  200|  1.24k|    tls1_get_formatlist(s, &pformats, &num_formats);
  201|       |
  202|  1.24k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_ec_point_formats)
  ------------------
  |  |  891|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (202:9): [True: 0, False: 1.24k]
  ------------------
  203|       |        /* Sub-packet for formats extension */
  204|  1.24k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (204:12): [True: 0, False: 1.24k]
  ------------------
  205|  1.24k|        || !WPACKET_sub_memcpy_u8(pkt, pformats, num_formats)
  ------------------
  |  |  918|  2.48k|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (205:12): [True: 0, False: 1.24k]
  ------------------
  206|  1.24k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (206:12): [True: 0, False: 1.24k]
  ------------------
  207|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  208|      0|        return EXT_RETURN_FAIL;
  209|      0|    }
  210|       |
  211|  1.24k|    return EXT_RETURN_SENT;
  212|  1.24k|}
tls_construct_ctos_supported_groups:
  217|  1.24k|{
  218|  1.24k|    const uint16_t *pgroups = NULL;
  219|  1.24k|    size_t num_groups = 0, i, tls13added = 0, added = 0;
  220|  1.24k|    int min_version, max_version, reason;
  221|       |
  222|  1.24k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  223|  1.24k|    if (reason != 0) {
  ------------------
  |  Branch (223:9): [True: 0, False: 1.24k]
  ------------------
  224|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  225|      0|        return EXT_RETURN_FAIL;
  226|      0|    }
  227|       |
  228|       |    /*
  229|       |     * We only support EC groups in TLSv1.2 or below, and in DTLS. Therefore
  230|       |     * if we don't have EC support then we don't send this extension.
  231|       |     */
  232|  1.24k|    if (!use_ecc(s, min_version, max_version)
  ------------------
  |  Branch (232:9): [True: 0, False: 1.24k]
  ------------------
  233|      0|        && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION))
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      && (SSL_CONNECTION_IS_DTLS(s) || max_version < TLS1_3_VERSION))
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (233:42): [True: 0, False: 0]
  ------------------
  234|      0|        return EXT_RETURN_NOT_SENT;
  235|       |
  236|       |    /*
  237|       |     * Add TLS extension supported_groups to the ClientHello message
  238|       |     */
  239|  1.24k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  240|       |
  241|  1.24k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_groups)
  ------------------
  |  |  891|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (241:9): [True: 0, False: 1.24k]
  ------------------
  242|       |        /* Sub-packet for supported_groups extension */
  243|  1.24k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (243:12): [True: 0, False: 1.24k]
  ------------------
  244|  1.24k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (244:12): [True: 0, False: 1.24k]
  ------------------
  245|  1.24k|        || !WPACKET_set_flags(pkt, WPACKET_FLAGS_NON_ZERO_LENGTH)) {
  ------------------
  |  |  697|  1.24k|#define WPACKET_FLAGS_NON_ZERO_LENGTH 1
  ------------------
  |  Branch (245:12): [True: 0, False: 1.24k]
  ------------------
  246|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  247|      0|        return EXT_RETURN_FAIL;
  248|      0|    }
  249|       |    /* Copy group ID if supported */
  250|  10.9k|    for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (250:17): [True: 9.72k, False: 1.24k]
  ------------------
  251|  9.72k|        uint16_t ctmp = pgroups[i];
  252|  9.72k|        int okfortls13;
  253|       |
  254|  9.72k|        if (tls_valid_group(s, ctmp, min_version, max_version, 0, &okfortls13)
  ------------------
  |  Branch (254:13): [True: 9.70k, False: 15]
  ------------------
  255|  9.70k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED)) {
  ------------------
  |  | 2758|  9.70k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2739|  9.70k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (255:16): [True: 9.65k, False: 52]
  ------------------
  256|  9.65k|            if (!WPACKET_put_bytes_u16(pkt, ctmp)) {
  ------------------
  |  |  891|  9.65k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (256:17): [True: 0, False: 9.65k]
  ------------------
  257|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  258|      0|                return EXT_RETURN_FAIL;
  259|      0|            }
  260|  9.65k|            if (okfortls13 && max_version == TLS1_3_VERSION)
  ------------------
  |  |   27|  9.63k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (260:17): [True: 9.63k, False: 25]
  |  Branch (260:31): [True: 9.63k, False: 0]
  ------------------
  261|  9.63k|                tls13added++;
  262|  9.65k|            added++;
  263|  9.65k|        }
  264|  9.72k|    }
  265|  1.24k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (265:9): [True: 0, False: 1.24k]
  |  Branch (265:32): [True: 0, False: 1.24k]
  ------------------
  266|      0|        if (added == 0)
  ------------------
  |  Branch (266:13): [True: 0, False: 0]
  ------------------
  267|      0|            SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1243|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                          SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  214|      0|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  268|      0|                "No groups enabled for max supported SSL/TLS version");
  269|      0|        else
  270|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  271|      0|        return EXT_RETURN_FAIL;
  272|      0|    }
  273|       |
  274|  1.24k|    if (tls13added == 0 && max_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      5|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (274:9): [True: 5, False: 1.23k]
  |  Branch (274:28): [True: 0, False: 5]
  ------------------
  275|      0|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      0|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  | 1243|      0|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|      0|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_GROUPS,
  ------------------
  |  |  214|      0|#define SSL_R_NO_SUITABLE_GROUPS 295
  ------------------
  276|      0|            "No groups enabled for max supported SSL/TLS version");
  277|      0|        return EXT_RETURN_FAIL;
  278|      0|    }
  279|       |
  280|  1.24k|    return EXT_RETURN_SENT;
  281|  1.24k|}
tls_construct_ctos_session_ticket:
  286|  1.24k|{
  287|  1.24k|    size_t ticklen;
  288|       |
  289|  1.24k|    if (!tls_use_ticket(s))
  ------------------
  |  Branch (289:9): [True: 1.24k, False: 0]
  ------------------
  290|  1.24k|        return EXT_RETURN_NOT_SENT;
  291|       |
  292|      0|    if (!s->new_session && s->session != NULL
  ------------------
  |  Branch (292:9): [True: 0, False: 0]
  |  Branch (292:28): [True: 0, False: 0]
  ------------------
  293|      0|        && s->session->ext.tick != NULL
  ------------------
  |  Branch (293:12): [True: 0, False: 0]
  ------------------
  294|      0|        && s->session->ssl_version != TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (294:12): [True: 0, False: 0]
  ------------------
  295|      0|        ticklen = s->session->ext.ticklen;
  296|      0|    } else if (s->session && s->ext.session_ticket != NULL
  ------------------
  |  Branch (296:16): [True: 0, False: 0]
  |  Branch (296:30): [True: 0, False: 0]
  ------------------
  297|      0|        && s->ext.session_ticket->data != NULL) {
  ------------------
  |  Branch (297:12): [True: 0, False: 0]
  ------------------
  298|      0|        ticklen = s->ext.session_ticket->length;
  299|      0|        s->session->ext.tick = OPENSSL_malloc(ticklen);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  300|      0|        if (s->session->ext.tick == NULL) {
  ------------------
  |  Branch (300:13): [True: 0, False: 0]
  ------------------
  301|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  302|      0|            return EXT_RETURN_FAIL;
  303|      0|        }
  304|      0|        memcpy(s->session->ext.tick,
  305|      0|            s->ext.session_ticket->data, ticklen);
  306|      0|        s->session->ext.ticklen = ticklen;
  307|      0|    } else {
  308|      0|        ticklen = 0;
  309|      0|    }
  310|       |
  311|      0|    if (ticklen == 0 && s->ext.session_ticket != NULL && s->ext.session_ticket->data == NULL)
  ------------------
  |  Branch (311:9): [True: 0, False: 0]
  |  Branch (311:25): [True: 0, False: 0]
  |  Branch (311:58): [True: 0, False: 0]
  ------------------
  312|      0|        return EXT_RETURN_NOT_SENT;
  313|       |
  314|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_session_ticket)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (314:9): [True: 0, False: 0]
  ------------------
  315|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick, ticklen)) {
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (315:12): [True: 0, False: 0]
  ------------------
  316|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  317|      0|        return EXT_RETURN_FAIL;
  318|      0|    }
  319|       |
  320|      0|    return EXT_RETURN_SENT;
  321|      0|}
tls_construct_ctos_sig_algs:
  326|  1.24k|{
  327|  1.24k|    size_t salglen;
  328|  1.24k|    const uint16_t *salg;
  329|       |
  330|       |    /*
  331|       |     * This used both in the initial hello and as part of renegotiation,
  332|       |     * in the latter case, the client version may be already set and may
  333|       |     * be lower than that initially offered in `client_version`.
  334|       |     */
  335|  1.24k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.24k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.24k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (335:9): [True: 1.24k, False: 0]
  ------------------
  336|  1.24k|        if (s->client_version < TLS1_2_VERSION
  ------------------
  |  |   26|  2.48k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (336:13): [True: 0, False: 1.24k]
  ------------------
  337|  1.24k|            || (s->ssl.method->version != TLS_ANY_VERSION
  ------------------
  |  |   40|  2.48k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (337:17): [True: 0, False: 1.24k]
  ------------------
  338|      0|                && s->version < TLS1_2_VERSION))
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (338:20): [True: 0, False: 0]
  ------------------
  339|      0|            return EXT_RETURN_NOT_SENT;
  340|  1.24k|    } else {
  341|      0|        if (DTLS_VERSION_LT(s->client_version, DTLS1_2_VERSION)
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  342|      0|            || (s->ssl.method->version != DTLS_ANY_VERSION
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (342:17): [True: 0, False: 0]
  ------------------
  343|      0|                && DTLS_VERSION_LT(s->version, DTLS1_2_VERSION)))
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  344|      0|            return EXT_RETURN_NOT_SENT;
  345|      0|    }
  346|       |
  347|  1.24k|    salglen = tls12_get_psigalgs(s, 1, &salg);
  348|  1.24k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signature_algorithms)
  ------------------
  |  |  891|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (348:9): [True: 0, False: 1.24k]
  ------------------
  349|       |        /* Sub-packet for sig-algs extension */
  350|  1.24k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (350:12): [True: 0, False: 1.24k]
  ------------------
  351|       |        /* Sub-packet for the actual list */
  352|  1.24k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (352:12): [True: 0, False: 1.24k]
  ------------------
  353|  1.24k|        || !tls12_copy_sigalgs(s, pkt, salg, salglen)
  ------------------
  |  Branch (353:12): [True: 0, False: 1.24k]
  ------------------
  354|  1.24k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (354:12): [True: 0, False: 1.24k]
  ------------------
  355|  1.24k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (355:12): [True: 0, False: 1.24k]
  ------------------
  356|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  357|      0|        return EXT_RETURN_FAIL;
  358|      0|    }
  359|       |
  360|  1.24k|    return EXT_RETURN_SENT;
  361|  1.24k|}
tls_construct_ctos_status_request:
  367|  1.24k|{
  368|  1.24k|    int i;
  369|       |
  370|       |    /* This extension isn't defined for client Certificates */
  371|  1.24k|    if (x != NULL)
  ------------------
  |  Branch (371:9): [True: 0, False: 1.24k]
  ------------------
  372|      0|        return EXT_RETURN_NOT_SENT;
  373|       |
  374|  1.24k|    if (s->ext.status_type != TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  173|  1.24k|#define TLSEXT_STATUSTYPE_ocsp 1
  ------------------
  |  Branch (374:9): [True: 1.24k, False: 0]
  ------------------
  375|  1.24k|        return EXT_RETURN_NOT_SENT;
  376|       |
  377|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_status_request)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (377:9): [True: 0, False: 0]
  ------------------
  378|       |        /* Sub-packet for status request extension */
  379|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (379:12): [True: 0, False: 0]
  ------------------
  380|      0|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_STATUSTYPE_ocsp)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (380:12): [True: 0, False: 0]
  ------------------
  381|       |        /* Sub-packet for the ids */
  382|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (382:12): [True: 0, False: 0]
  ------------------
  383|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  384|      0|        return EXT_RETURN_FAIL;
  385|      0|    }
  386|      0|    for (i = 0; i < sk_OCSP_RESPID_num(s->ext.ocsp.ids); i++) {
  ------------------
  |  |  166|      0|#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
  ------------------
  |  Branch (386:17): [True: 0, False: 0]
  ------------------
  387|      0|        unsigned char *idbytes;
  388|      0|        OCSP_RESPID *id = sk_OCSP_RESPID_value(s->ext.ocsp.ids, i);
  ------------------
  |  |  167|      0|#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
  ------------------
  389|      0|        int idlen = i2d_OCSP_RESPID(id, NULL);
  390|       |
  391|      0|        if (idlen <= 0
  ------------------
  |  Branch (391:13): [True: 0, False: 0]
  ------------------
  392|       |            /* Sub-packet for an individual id */
  393|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, idlen, &idbytes)
  ------------------
  |  |  831|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (393:16): [True: 0, False: 0]
  ------------------
  394|      0|            || i2d_OCSP_RESPID(id, &idbytes) != idlen) {
  ------------------
  |  Branch (394:16): [True: 0, False: 0]
  ------------------
  395|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  396|      0|            return EXT_RETURN_FAIL;
  397|      0|        }
  398|      0|    }
  399|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (399:9): [True: 0, False: 0]
  ------------------
  400|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (400:12): [True: 0, False: 0]
  ------------------
  401|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  402|      0|        return EXT_RETURN_FAIL;
  403|      0|    }
  404|      0|    if (s->ext.ocsp.exts) {
  ------------------
  |  Branch (404:9): [True: 0, False: 0]
  ------------------
  405|      0|        unsigned char *extbytes;
  406|      0|        int extlen = i2d_X509_EXTENSIONS(s->ext.ocsp.exts, NULL);
  407|       |
  408|      0|        if (extlen < 0) {
  ------------------
  |  Branch (408:13): [True: 0, False: 0]
  ------------------
  409|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  410|      0|            return EXT_RETURN_FAIL;
  411|      0|        }
  412|      0|        if (!WPACKET_allocate_bytes(pkt, extlen, &extbytes)
  ------------------
  |  Branch (412:13): [True: 0, False: 0]
  ------------------
  413|      0|            || i2d_X509_EXTENSIONS(s->ext.ocsp.exts, &extbytes)
  ------------------
  |  Branch (413:16): [True: 0, False: 0]
  ------------------
  414|      0|                != extlen) {
  415|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  416|      0|            return EXT_RETURN_FAIL;
  417|      0|        }
  418|      0|    }
  419|      0|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (419:9): [True: 0, False: 0]
  |  Branch (419:32): [True: 0, False: 0]
  ------------------
  420|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  421|      0|        return EXT_RETURN_FAIL;
  422|      0|    }
  423|       |
  424|      0|    return EXT_RETURN_SENT;
  425|      0|}
tls_construct_ctos_npn:
  432|  1.24k|{
  433|  1.24k|    if (SSL_CONNECTION_GET_CTX(s)->ext.npn_select_cb == NULL
  ------------------
  |  |   26|  1.24k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (433:9): [True: 1.24k, False: 0]
  ------------------
  434|      0|        || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  278|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  435|  1.24k|        return EXT_RETURN_NOT_SENT;
  436|       |
  437|       |    /*
  438|       |     * The client advertises an empty extension to indicate its support
  439|       |     * for Next Protocol Negotiation
  440|       |     */
  441|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_next_proto_neg)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (441:9): [True: 0, False: 0]
  ------------------
  442|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (442:12): [True: 0, False: 0]
  ------------------
  443|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  444|      0|        return EXT_RETURN_FAIL;
  445|      0|    }
  446|       |
  447|      0|    return EXT_RETURN_SENT;
  448|      0|}
tls_construct_ctos_alpn:
  454|  1.24k|{
  455|  1.24k|    s->s3.alpn_sent = 0;
  456|       |
  457|  1.24k|    if (s->ext.alpn == NULL || !SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|  1.24k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 1.24k, False: 0]
  |  |  ------------------
  |  |  278|  1.24k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (457:9): [True: 1, False: 1.24k]
  ------------------
  458|      1|        return EXT_RETURN_NOT_SENT;
  459|       |
  460|  1.24k|    if (!WPACKET_put_bytes_u16(pkt,
  ------------------
  |  |  891|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (460:9): [True: 0, False: 1.24k]
  ------------------
  461|  1.24k|            TLSEXT_TYPE_application_layer_protocol_negotiation)
  462|       |        /* Sub-packet ALPN extension */
  463|  1.24k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.48k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (463:12): [True: 0, False: 1.24k]
  ------------------
  464|  1.24k|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.alpn, s->ext.alpn_len)
  ------------------
  |  |  920|  2.48k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (464:12): [True: 0, False: 1.24k]
  ------------------
  465|  1.24k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (465:12): [True: 0, False: 1.24k]
  ------------------
  466|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  467|      0|        return EXT_RETURN_FAIL;
  468|      0|    }
  469|  1.24k|    s->s3.alpn_sent = 1;
  470|       |
  471|  1.24k|    return EXT_RETURN_SENT;
  472|  1.24k|}
tls_construct_ctos_use_srtp:
  478|  1.24k|{
  479|  1.24k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  480|  1.24k|    STACK_OF(SRTP_PROTECTION_PROFILE) *clnt = SSL_get_srtp_profiles(ssl);
  ------------------
  |  |   33|  1.24k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  481|  1.24k|    int i, end;
  482|       |
  483|  1.24k|    if (clnt == NULL)
  ------------------
  |  Branch (483:9): [True: 1.24k, False: 0]
  ------------------
  484|  1.24k|        return EXT_RETURN_NOT_SENT;
  485|       |
  486|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_use_srtp)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (486:9): [True: 0, False: 0]
  ------------------
  487|       |        /* Sub-packet for SRTP extension */
  488|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (488:12): [True: 0, False: 0]
  ------------------
  489|       |        /* Sub-packet for the protection profile list */
  490|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (490:12): [True: 0, False: 0]
  ------------------
  491|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  492|      0|        return EXT_RETURN_FAIL;
  493|      0|    }
  494|       |
  495|      0|    end = sk_SRTP_PROTECTION_PROFILE_num(clnt);
  ------------------
  |  |  250|      0|#define sk_SRTP_PROTECTION_PROFILE_num(sk) OPENSSL_sk_num(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk))
  ------------------
  496|      0|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (496:17): [True: 0, False: 0]
  ------------------
  497|      0|        const SRTP_PROTECTION_PROFILE *prof = sk_SRTP_PROTECTION_PROFILE_value(clnt, i);
  ------------------
  |  |  251|      0|#define sk_SRTP_PROTECTION_PROFILE_value(sk, idx) ((SRTP_PROTECTION_PROFILE *)OPENSSL_sk_value(ossl_check_const_SRTP_PROTECTION_PROFILE_sk_type(sk), (idx)))
  ------------------
  498|       |
  499|      0|        if (prof == NULL || !WPACKET_put_bytes_u16(pkt, prof->id)) {
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (499:13): [True: 0, False: 0]
  |  Branch (499:29): [True: 0, False: 0]
  ------------------
  500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  501|      0|            return EXT_RETURN_FAIL;
  502|      0|        }
  503|      0|    }
  504|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (504:9): [True: 0, False: 0]
  ------------------
  505|       |        /* Add an empty use_mki value */
  506|      0|        || !WPACKET_put_bytes_u8(pkt, 0)
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (506:12): [True: 0, False: 0]
  ------------------
  507|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (507:12): [True: 0, False: 0]
  ------------------
  508|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  509|      0|        return EXT_RETURN_FAIL;
  510|      0|    }
  511|       |
  512|      0|    return EXT_RETURN_SENT;
  513|      0|}
tls_construct_ctos_etm:
  519|  1.24k|{
  520|  1.24k|    if (s->options & SSL_OP_NO_ENCRYPT_THEN_MAC)
  ------------------
  |  |  398|  1.24k|#define SSL_OP_NO_ENCRYPT_THEN_MAC SSL_OP_BIT(19)
  |  |  ------------------
  |  |  |  |  350|  1.24k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (520:9): [True: 0, False: 1.24k]
  ------------------
  521|      0|        return EXT_RETURN_NOT_SENT;
  522|       |
  523|  1.24k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_encrypt_then_mac)
  ------------------
  |  |  891|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (523:9): [True: 0, False: 1.24k]
  ------------------
  524|  1.24k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|  1.24k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (524:12): [True: 0, False: 1.24k]
  ------------------
  525|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  526|      0|        return EXT_RETURN_FAIL;
  527|      0|    }
  528|       |
  529|  1.24k|    return EXT_RETURN_SENT;
  530|  1.24k|}
tls_construct_ctos_sct:
  536|  1.24k|{
  537|  1.24k|    if (s->ct_validation_callback == NULL)
  ------------------
  |  Branch (537:9): [True: 1.24k, False: 0]
  ------------------
  538|  1.24k|        return EXT_RETURN_NOT_SENT;
  539|       |
  540|       |    /* Not defined for client Certificates */
  541|      0|    if (x != NULL)
  ------------------
  |  Branch (541:9): [True: 0, False: 0]
  ------------------
  542|      0|        return EXT_RETURN_NOT_SENT;
  543|       |
  544|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_signed_certificate_timestamp)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (544:9): [True: 0, False: 0]
  ------------------
  545|      0|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (545:12): [True: 0, False: 0]
  ------------------
  546|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  547|      0|        return EXT_RETURN_FAIL;
  548|      0|    }
  549|       |
  550|      0|    return EXT_RETURN_SENT;
  551|      0|}
tls_construct_ctos_ems:
  557|  1.24k|{
  558|  1.24k|    if (s->options & SSL_OP_NO_EXTENDED_MASTER_SECRET)
  ------------------
  |  |  356|  1.24k|#define SSL_OP_NO_EXTENDED_MASTER_SECRET SSL_OP_BIT(0)
  |  |  ------------------
  |  |  |  |  350|  1.24k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (558:9): [True: 0, False: 1.24k]
  ------------------
  559|      0|        return EXT_RETURN_NOT_SENT;
  560|       |
  561|  1.24k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_extended_master_secret)
  ------------------
  |  |  891|  2.48k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (561:9): [True: 0, False: 1.24k]
  ------------------
  562|  1.24k|        || !WPACKET_put_bytes_u16(pkt, 0)) {
  ------------------
  |  |  891|  1.24k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (562:12): [True: 0, False: 1.24k]
  ------------------
  563|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  564|      0|        return EXT_RETURN_FAIL;
  565|      0|    }
  566|       |
  567|  1.24k|    return EXT_RETURN_SENT;
  568|  1.24k|}
tls_construct_ctos_supported_versions:
  573|  1.24k|{
  574|  1.24k|    int currv, min_version, max_version, reason;
  575|       |
  576|  1.24k|    reason = ssl_get_min_max_version(s, &min_version, &max_version, NULL);
  577|  1.24k|    if (reason != 0) {
  ------------------
  |  Branch (577:9): [True: 0, False: 1.24k]
  ------------------
  578|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, reason);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  579|      0|        return EXT_RETURN_FAIL;
  580|      0|    }
  581|       |
  582|       |    /*
  583|       |     * Don't include this if we can't negotiate TLSv1.3. We can do a straight
  584|       |     * comparison here because we will never be called in DTLS.
  585|       |     */
  586|  1.24k|    if (max_version < TLS1_3_VERSION)
  ------------------
  |  |   27|  1.24k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (586:9): [True: 5, False: 1.23k]
  ------------------
  587|      5|        return EXT_RETURN_NOT_SENT;
  588|       |
  589|  1.23k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_supported_versions)
  ------------------
  |  |  891|  2.47k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (589:9): [True: 0, False: 1.23k]
  ------------------
  590|  1.23k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.47k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (590:12): [True: 0, False: 1.23k]
  ------------------
  591|  1.23k|        || !WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  790|  1.23k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (591:12): [True: 0, False: 1.23k]
  ------------------
  592|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  593|      0|        return EXT_RETURN_FAIL;
  594|      0|    }
  595|       |
  596|  3.70k|    for (currv = max_version; currv >= min_version; currv--) {
  ------------------
  |  Branch (596:31): [True: 2.46k, False: 1.23k]
  ------------------
  597|  2.46k|        if (!WPACKET_put_bytes_u16(pkt, currv)) {
  ------------------
  |  |  891|  2.46k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (597:13): [True: 0, False: 2.46k]
  ------------------
  598|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  599|      0|            return EXT_RETURN_FAIL;
  600|      0|        }
  601|  2.46k|    }
  602|  1.23k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (602:9): [True: 0, False: 1.23k]
  |  Branch (602:32): [True: 0, False: 1.23k]
  ------------------
  603|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  604|      0|        return EXT_RETURN_FAIL;
  605|      0|    }
  606|       |
  607|  1.23k|    return EXT_RETURN_SENT;
  608|  1.23k|}
tls_construct_ctos_psk_kex_modes:
  616|  1.23k|{
  617|  1.23k|#ifndef OPENSSL_NO_TLS1_3
  618|  1.23k|    int nodhe = s->options & SSL_OP_ALLOW_NO_DHE_KEX;
  ------------------
  |  |  369|  1.23k|#define SSL_OP_ALLOW_NO_DHE_KEX SSL_OP_BIT(10)
  |  |  ------------------
  |  |  |  |  350|  1.23k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  619|       |
  620|  1.23k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk_kex_modes)
  ------------------
  |  |  891|  2.47k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (620:9): [True: 0, False: 1.23k]
  ------------------
  621|  1.23k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.47k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (621:12): [True: 0, False: 1.23k]
  ------------------
  622|  1.23k|        || !WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  790|  2.47k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (622:12): [True: 0, False: 1.23k]
  ------------------
  623|  1.23k|        || !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE_DHE)
  ------------------
  |  |  889|  2.47k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (623:12): [True: 0, False: 1.23k]
  ------------------
  624|  1.23k|        || (nodhe && !WPACKET_put_bytes_u8(pkt, TLSEXT_KEX_MODE_KE))
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (624:13): [True: 0, False: 1.23k]
  |  Branch (624:22): [True: 0, False: 0]
  ------------------
  625|  1.23k|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (625:12): [True: 0, False: 1.23k]
  ------------------
  626|  1.23k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (626:12): [True: 0, False: 1.23k]
  ------------------
  627|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  628|      0|        return EXT_RETURN_FAIL;
  629|      0|    }
  630|       |
  631|  1.23k|    s->ext.psk_kex_mode = TLSEXT_KEX_MODE_FLAG_KE_DHE;
  ------------------
  |  | 2297|  1.23k|#define TLSEXT_KEX_MODE_FLAG_KE_DHE 2
  ------------------
  632|  1.23k|    if (nodhe)
  ------------------
  |  Branch (632:9): [True: 0, False: 1.23k]
  ------------------
  633|      0|        s->ext.psk_kex_mode |= TLSEXT_KEX_MODE_FLAG_KE;
  ------------------
  |  | 2296|      0|#define TLSEXT_KEX_MODE_FLAG_KE 1
  ------------------
  634|  1.23k|#endif
  635|       |
  636|  1.23k|    return EXT_RETURN_SENT;
  637|  1.23k|}
tls_construct_ctos_key_share:
  704|  1.23k|{
  705|  1.23k|#ifndef OPENSSL_NO_TLS1_3
  706|  1.23k|    size_t i, num_groups = 0;
  707|  1.23k|    const uint16_t *pgroups = NULL;
  708|  1.23k|    uint16_t group_id = 0;
  709|  1.23k|    int add_only_one = 0;
  710|  1.23k|    size_t valid_keyshare = 0;
  711|       |
  712|       |    /* key_share extension */
  713|  1.23k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_key_share)
  ------------------
  |  |  891|  2.47k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (713:9): [True: 0, False: 1.23k]
  ------------------
  714|       |        /* Extension data sub-packet */
  715|  1.23k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.47k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (715:12): [True: 0, False: 1.23k]
  ------------------
  716|       |        /* KeyShare list sub-packet */
  717|  1.23k|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|  1.23k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (717:12): [True: 0, False: 1.23k]
  ------------------
  718|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  719|      0|        return EXT_RETURN_FAIL;
  720|      0|    }
  721|       |
  722|  1.23k|    tls1_get_requested_keyshare_groups(s, &pgroups, &num_groups);
  723|  1.23k|    if (num_groups == 1 && pgroups[0] == 0) { /* Indication that no * prefix was used */
  ------------------
  |  Branch (723:9): [True: 0, False: 1.23k]
  |  Branch (723:28): [True: 0, False: 0]
  ------------------
  724|      0|        tls1_get_supported_groups(s, &pgroups, &num_groups);
  725|      0|        add_only_one = 1;
  726|      0|    }
  727|       |
  728|       |    /* If neither the default nor the keyshares have any entry --> fatal */
  729|  1.23k|    if (num_groups == 0) {
  ------------------
  |  Branch (729:9): [True: 0, False: 1.23k]
  ------------------
  730|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  731|      0|        return EXT_RETURN_FAIL;
  732|      0|    }
  733|       |
  734|       |    /* Add key shares */
  735|       |
  736|  1.23k|    if (s->s3.group_id != 0 && s->s3.tmp.pkey == NULL) {
  ------------------
  |  Branch (736:9): [True: 0, False: 1.23k]
  |  Branch (736:32): [True: 0, False: 0]
  ------------------
  737|       |        /* new, single key share */
  738|      0|        group_id = s->s3.group_id;
  739|      0|        s->s3.tmp.num_ks_pkey = 0;
  740|      0|        if (!add_key_share(s, pkt, group_id, 0)) {
  ------------------
  |  Branch (740:13): [True: 0, False: 0]
  ------------------
  741|       |            /* SSLfatal() already called */
  742|      0|            return EXT_RETURN_FAIL;
  743|      0|        }
  744|      0|        valid_keyshare++;
  745|  1.23k|    } else {
  746|  1.23k|        if (s->ext.supportedgroups == NULL) /* use default */
  ------------------
  |  Branch (746:13): [True: 0, False: 1.23k]
  ------------------
  747|      0|            add_only_one = 1;
  748|       |
  749|  3.70k|        for (i = 0; i < num_groups; i++) {
  ------------------
  |  Branch (749:21): [True: 2.47k, False: 1.23k]
  ------------------
  750|  2.47k|            if (!tls_group_allowed(s, pgroups[i], SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2758|  2.47k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2739|  2.47k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (750:17): [True: 12, False: 2.46k]
  ------------------
  751|     12|                continue;
  752|  2.46k|            if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  2.46k|#define TLS1_3_VERSION 0x0304
  ------------------
                          if (!tls_valid_group(s, pgroups[i], TLS1_3_VERSION, TLS1_3_VERSION,
  ------------------
  |  |   27|  2.46k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (752:17): [True: 0, False: 2.46k]
  ------------------
  753|  2.46k|                    0, NULL))
  754|      0|                continue;
  755|       |
  756|  2.46k|            group_id = pgroups[i];
  757|       |
  758|  2.46k|            if (group_id == 0) {
  ------------------
  |  Branch (758:17): [True: 0, False: 2.46k]
  ------------------
  759|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  760|      0|                return EXT_RETURN_FAIL;
  761|      0|            }
  762|  2.46k|            if (!add_key_share(s, pkt, group_id, valid_keyshare)) {
  ------------------
  |  Branch (762:17): [True: 0, False: 2.46k]
  ------------------
  763|       |                /* SSLfatal() already called */
  764|      0|                return EXT_RETURN_FAIL;
  765|      0|            }
  766|  2.46k|            valid_keyshare++;
  767|  2.46k|            if (add_only_one)
  ------------------
  |  Branch (767:17): [True: 0, False: 2.46k]
  ------------------
  768|      0|                break;
  769|  2.46k|        }
  770|  1.23k|    }
  771|       |
  772|  1.23k|    if (valid_keyshare == 0) {
  ------------------
  |  Branch (772:9): [True: 1, False: 1.23k]
  ------------------
  773|       |        /* No key shares were allowed */
  774|      1|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_SUITABLE_KEY_SHARE);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  775|      1|        return EXT_RETURN_FAIL;
  776|      1|    }
  777|       |
  778|  1.23k|    if (!WPACKET_close(pkt) || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (778:9): [True: 0, False: 1.23k]
  |  Branch (778:32): [True: 0, False: 1.23k]
  ------------------
  779|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  780|      0|        return EXT_RETURN_FAIL;
  781|      0|    }
  782|  1.23k|    return EXT_RETURN_SENT;
  783|       |#else
  784|       |    return EXT_RETURN_NOT_SENT;
  785|       |#endif
  786|  1.23k|}
tls_construct_ctos_cookie:
  791|  1.23k|{
  792|  1.23k|    EXT_RETURN ret = EXT_RETURN_FAIL;
  793|       |
  794|       |    /* Should only be set if we've had an HRR */
  795|  1.23k|    if (s->ext.tls13_cookie_len == 0)
  ------------------
  |  Branch (795:9): [True: 1.23k, False: 0]
  ------------------
  796|  1.23k|        return EXT_RETURN_NOT_SENT;
  797|       |
  798|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_cookie)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (798:9): [True: 0, False: 0]
  ------------------
  799|       |        /* Extension data sub-packet */
  800|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (800:12): [True: 0, False: 0]
  ------------------
  801|      0|        || !WPACKET_sub_memcpy_u16(pkt, s->ext.tls13_cookie,
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (801:12): [True: 0, False: 0]
  ------------------
  802|      0|            s->ext.tls13_cookie_len)
  803|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (803:12): [True: 0, False: 0]
  ------------------
  804|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  805|      0|        goto end;
  806|      0|    }
  807|       |
  808|      0|    ret = EXT_RETURN_SENT;
  809|      0|end:
  810|      0|    OPENSSL_free(s->ext.tls13_cookie);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  811|      0|    s->ext.tls13_cookie = NULL;
  812|      0|    s->ext.tls13_cookie_len = 0;
  813|       |
  814|      0|    return ret;
  815|      0|}
tls_construct_ctos_early_data:
  820|  1.23k|{
  821|  1.23k|#ifndef OPENSSL_NO_PSK
  822|  1.23k|    char identity[PSK_MAX_IDENTITY_LEN + 1];
  823|  1.23k|#endif /* OPENSSL_NO_PSK */
  824|  1.23k|    const unsigned char *id = NULL;
  825|  1.23k|    size_t idlen = 0;
  826|  1.23k|    SSL_SESSION *psksess = NULL;
  827|  1.23k|    SSL_SESSION *edsess = NULL;
  828|  1.23k|    const EVP_MD *handmd = NULL;
  829|  1.23k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.23k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  830|       |
  831|  1.23k|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (831:9): [True: 0, False: 1.23k]
  ------------------
  832|      0|        handmd = ssl_handshake_md(s);
  833|       |
  834|  1.23k|    if (s->psk_use_session_cb != NULL
  ------------------
  |  Branch (834:9): [True: 0, False: 1.23k]
  ------------------
  835|      0|        && (!s->psk_use_session_cb(ussl, handmd, &id, &idlen, &psksess)
  ------------------
  |  Branch (835:13): [True: 0, False: 0]
  ------------------
  836|      0|            || (psksess != NULL
  ------------------
  |  Branch (836:17): [True: 0, False: 0]
  ------------------
  837|      0|                && psksess->ssl_version != TLS1_3_VERSION))) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (837:20): [True: 0, False: 0]
  ------------------
  838|      0|        SSL_SESSION_free(psksess);
  839|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  840|      0|        return EXT_RETURN_FAIL;
  841|      0|    }
  842|       |
  843|  1.23k|#ifndef OPENSSL_NO_PSK
  844|  1.23k|    if (psksess == NULL && s->psk_client_callback != NULL) {
  ------------------
  |  Branch (844:9): [True: 1.23k, False: 0]
  |  Branch (844:28): [True: 0, False: 1.23k]
  ------------------
  845|      0|        unsigned char psk[PSK_MAX_PSK_LEN];
  846|      0|        size_t psklen = 0;
  847|       |
  848|      0|        memset(identity, 0, sizeof(identity));
  849|      0|        psklen = s->psk_client_callback(ussl, NULL,
  850|      0|            identity, sizeof(identity) - 1,
  851|      0|            psk, sizeof(psk));
  852|       |
  853|      0|        if (psklen > PSK_MAX_PSK_LEN) {
  ------------------
  |  |  862|      0|#define PSK_MAX_PSK_LEN 512
  ------------------
  |  Branch (853:13): [True: 0, False: 0]
  ------------------
  854|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  855|      0|            return EXT_RETURN_FAIL;
  856|      0|        } else if (psklen > 0) {
  ------------------
  |  Branch (856:20): [True: 0, False: 0]
  ------------------
  857|      0|            const unsigned char tls13_aes128gcmsha256_id[] = { 0x13, 0x01 };
  858|      0|            const SSL_CIPHER *cipher;
  859|       |
  860|      0|            idlen = strlen(identity);
  861|      0|            if (idlen > PSK_MAX_IDENTITY_LEN) {
  ------------------
  |  |  861|      0|#define PSK_MAX_IDENTITY_LEN 256
  ------------------
  |  Branch (861:17): [True: 0, False: 0]
  ------------------
  862|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  863|      0|                return EXT_RETURN_FAIL;
  864|      0|            }
  865|      0|            id = (unsigned char *)identity;
  866|       |
  867|       |            /*
  868|       |             * We found a PSK using an old style callback. We don't know
  869|       |             * the digest so we default to SHA256 as per the TLSv1.3 spec
  870|       |             */
  871|      0|            cipher = SSL_CIPHER_find(SSL_CONNECTION_GET_SSL(s),
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  872|      0|                tls13_aes128gcmsha256_id);
  873|      0|            if (cipher == NULL) {
  ------------------
  |  Branch (873:17): [True: 0, False: 0]
  ------------------
  874|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  875|      0|                return EXT_RETURN_FAIL;
  876|      0|            }
  877|       |
  878|      0|            psksess = SSL_SESSION_new();
  879|      0|            if (psksess == NULL
  ------------------
  |  Branch (879:17): [True: 0, False: 0]
  ------------------
  880|      0|                || !SSL_SESSION_set1_master_key(psksess, psk, psklen)
  ------------------
  |  Branch (880:20): [True: 0, False: 0]
  ------------------
  881|      0|                || !SSL_SESSION_set_cipher(psksess, cipher)
  ------------------
  |  Branch (881:20): [True: 0, False: 0]
  ------------------
  882|      0|                || !SSL_SESSION_set_protocol_version(psksess, TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (882:20): [True: 0, False: 0]
  ------------------
  883|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  884|      0|                OPENSSL_cleanse(psk, psklen);
  885|      0|                return EXT_RETURN_FAIL;
  886|      0|            }
  887|      0|            OPENSSL_cleanse(psk, psklen);
  888|      0|        }
  889|      0|    }
  890|  1.23k|#endif /* OPENSSL_NO_PSK */
  891|       |
  892|  1.23k|    SSL_SESSION_free(s->psksession);
  893|  1.23k|    s->psksession = psksess;
  894|  1.23k|    if (psksess != NULL) {
  ------------------
  |  Branch (894:9): [True: 0, False: 1.23k]
  ------------------
  895|      0|        OPENSSL_free(s->psksession_id);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  896|      0|        s->psksession_id = OPENSSL_memdup(id, idlen);
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  897|      0|        if (s->psksession_id == NULL) {
  ------------------
  |  Branch (897:13): [True: 0, False: 0]
  ------------------
  898|      0|            s->psksession_id_len = 0;
  899|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  900|      0|            return EXT_RETURN_FAIL;
  901|      0|        }
  902|      0|        s->psksession_id_len = idlen;
  903|      0|    }
  904|       |
  905|  1.23k|    if (s->early_data_state != SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (905:9): [True: 1.23k, False: 0]
  ------------------
  906|      0|        || (s->session->ext.max_early_data == 0
  ------------------
  |  Branch (906:13): [True: 0, False: 0]
  ------------------
  907|  1.23k|            && (psksess == NULL || psksess->ext.max_early_data == 0))) {
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  |  Branch (907:36): [True: 0, False: 0]
  ------------------
  908|  1.23k|        s->max_early_data = 0;
  909|  1.23k|        return EXT_RETURN_NOT_SENT;
  910|  1.23k|    }
  911|      0|    edsess = s->session->ext.max_early_data != 0 ? s->session : psksess;
  ------------------
  |  Branch (911:14): [True: 0, False: 0]
  ------------------
  912|      0|    s->max_early_data = edsess->ext.max_early_data;
  913|       |
  914|      0|    if (edsess->ext.hostname != NULL) {
  ------------------
  |  Branch (914:9): [True: 0, False: 0]
  ------------------
  915|      0|        if (s->ext.hostname == NULL
  ------------------
  |  Branch (915:13): [True: 0, False: 0]
  ------------------
  916|      0|            || (s->ext.hostname != NULL
  ------------------
  |  Branch (916:17): [True: 0, False: 0]
  ------------------
  917|      0|                && strcmp(s->ext.hostname, edsess->ext.hostname) != 0)) {
  ------------------
  |  Branch (917:20): [True: 0, False: 0]
  ------------------
  918|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  919|      0|                SSL_R_INCONSISTENT_EARLY_DATA_SNI);
  920|      0|            return EXT_RETURN_FAIL;
  921|      0|        }
  922|      0|    }
  923|       |
  924|      0|    if ((s->ext.alpn == NULL && edsess->ext.alpn_selected != NULL)) {
  ------------------
  |  Branch (924:10): [True: 0, False: 0]
  |  Branch (924:33): [True: 0, False: 0]
  ------------------
  925|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  926|      0|        return EXT_RETURN_FAIL;
  927|      0|    }
  928|       |
  929|       |    /*
  930|       |     * Verify that we are offering an ALPN protocol consistent with the early
  931|       |     * data.
  932|       |     */
  933|      0|    if (edsess->ext.alpn_selected != NULL) {
  ------------------
  |  Branch (933:9): [True: 0, False: 0]
  ------------------
  934|      0|        PACKET prots, alpnpkt;
  935|      0|        int found = 0;
  936|       |
  937|      0|        if (!PACKET_buf_init(&prots, s->ext.alpn, s->ext.alpn_len)) {
  ------------------
  |  Branch (937:13): [True: 0, False: 0]
  ------------------
  938|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  939|      0|            return EXT_RETURN_FAIL;
  940|      0|        }
  941|      0|        while (PACKET_get_length_prefixed_1(&prots, &alpnpkt)) {
  ------------------
  |  Branch (941:16): [True: 0, False: 0]
  ------------------
  942|      0|            if (PACKET_equal(&alpnpkt, edsess->ext.alpn_selected,
  ------------------
  |  Branch (942:17): [True: 0, False: 0]
  ------------------
  943|      0|                    edsess->ext.alpn_selected_len)) {
  944|      0|                found = 1;
  945|      0|                break;
  946|      0|            }
  947|      0|        }
  948|      0|        if (!found) {
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  950|      0|                SSL_R_INCONSISTENT_EARLY_DATA_ALPN);
  951|      0|            return EXT_RETURN_FAIL;
  952|      0|        }
  953|      0|    }
  954|       |
  955|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_early_data)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (955:9): [True: 0, False: 0]
  ------------------
  956|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (956:12): [True: 0, False: 0]
  ------------------
  957|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (957:12): [True: 0, False: 0]
  ------------------
  958|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  959|      0|        return EXT_RETURN_FAIL;
  960|      0|    }
  961|       |
  962|       |    /*
  963|       |     * We set this to rejected here. Later, if the server acknowledges the
  964|       |     * extension, we set it to accepted.
  965|       |     */
  966|      0|    s->ext.early_data = SSL_EARLY_DATA_REJECTED;
  ------------------
  |  | 2036|      0|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  967|      0|    s->ext.early_data_ok = 1;
  968|       |
  969|      0|    return EXT_RETURN_SENT;
  970|      0|}
tls_construct_ctos_padding:
  992|  1.24k|{
  993|  1.24k|    unsigned char *padbytes;
  994|  1.24k|    size_t hlen;
  995|       |
  996|  1.24k|    if ((s->options & SSL_OP_TLSEXT_PADDING) == 0)
  ------------------
  |  |  363|  1.24k|#define SSL_OP_TLSEXT_PADDING SSL_OP_BIT(4)
  |  |  ------------------
  |  |  |  |  350|  1.24k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (996:9): [True: 0, False: 1.24k]
  ------------------
  997|      0|        return EXT_RETURN_NOT_SENT;
  998|       |
  999|       |    /*
 1000|       |     * Add padding to workaround bugs in F5 terminators. See RFC7685.
 1001|       |     * This code calculates the length of all extensions added so far but
 1002|       |     * excludes the PSK extension (because that MUST be written last). Therefore
 1003|       |     * this extension MUST always appear second to last.
 1004|       |     */
 1005|  1.24k|    if (!WPACKET_get_total_written(pkt, &hlen)) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 1.24k]
  ------------------
 1006|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1007|      0|        return EXT_RETURN_FAIL;
 1008|      0|    }
 1009|       |
 1010|       |    /*
 1011|       |     * If we're going to send a PSK then that will be written out after this
 1012|       |     * extension, so we need to calculate how long it is going to be.
 1013|       |     */
 1014|  1.24k|    if (s->session->ssl_version == TLS1_3_VERSION
  ------------------
  |  |   27|  2.48k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1014:9): [True: 1.23k, False: 5]
  ------------------
 1015|  1.23k|        && s->session->ext.ticklen != 0
  ------------------
  |  Branch (1015:12): [True: 0, False: 1.23k]
  ------------------
 1016|      0|        && s->session->cipher != NULL) {
  ------------------
  |  Branch (1016:12): [True: 0, False: 0]
  ------------------
 1017|      0|        const EVP_MD *md = ssl_md(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1018|      0|            s->session->cipher->algorithm2);
 1019|       |
 1020|      0|        if (md != NULL) {
  ------------------
  |  Branch (1020:13): [True: 0, False: 0]
  ------------------
 1021|       |            /*
 1022|       |             * Add the fixed PSK overhead, the identity length and the binder
 1023|       |             * length.
 1024|       |             */
 1025|      0|            int md_size = EVP_MD_get_size(md);
 1026|       |
 1027|      0|            if (md_size <= 0)
  ------------------
  |  Branch (1027:17): [True: 0, False: 0]
  ------------------
 1028|      0|                return EXT_RETURN_FAIL;
 1029|      0|            hlen += PSK_PRE_BINDER_OVERHEAD + s->session->ext.ticklen
  ------------------
  |  |  987|      0|#define PSK_PRE_BINDER_OVERHEAD (2 + 2 + 2 + 2 + 4 + 2 + 1)
  ------------------
 1030|      0|                + md_size;
 1031|      0|        }
 1032|      0|    }
 1033|       |
 1034|  1.24k|    if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  |  972|  2.48k|#define F5_WORKAROUND_MIN_MSG_LEN 0xff
  ------------------
                  if (hlen > F5_WORKAROUND_MIN_MSG_LEN && hlen < F5_WORKAROUND_MAX_MSG_LEN) {
  ------------------
  |  |  973|  1.23k|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
  |  Branch (1034:9): [True: 1.23k, False: 5]
  |  Branch (1034:45): [True: 0, False: 1.23k]
  ------------------
 1035|       |        /* Calculate the amount of padding we need to add */
 1036|      0|        hlen = F5_WORKAROUND_MAX_MSG_LEN - hlen;
  ------------------
  |  |  973|      0|#define F5_WORKAROUND_MAX_MSG_LEN 0x200
  ------------------
 1037|       |
 1038|       |        /*
 1039|       |         * Take off the size of extension header itself (2 bytes for type and
 1040|       |         * 2 bytes for length bytes), but ensure that the extension is at least
 1041|       |         * 1 byte long so as not to have an empty extension last (WebSphere 7.x,
 1042|       |         * 8.x are intolerant of that condition)
 1043|       |         */
 1044|      0|        if (hlen > 4)
  ------------------
  |  Branch (1044:13): [True: 0, False: 0]
  ------------------
 1045|      0|            hlen -= 4;
 1046|      0|        else
 1047|      0|            hlen = 1;
 1048|       |
 1049|      0|        if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_padding)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1049:13): [True: 0, False: 0]
  ------------------
 1050|      0|            || !WPACKET_sub_allocate_bytes_u16(pkt, hlen, &padbytes)) {
  ------------------
  |  |  831|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2)
  ------------------
  |  Branch (1050:16): [True: 0, False: 0]
  ------------------
 1051|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1052|      0|            return EXT_RETURN_FAIL;
 1053|      0|        }
 1054|      0|        memset(padbytes, 0, hlen);
 1055|      0|    }
 1056|       |
 1057|  1.24k|    return EXT_RETURN_SENT;
 1058|  1.24k|}
tls_construct_ctos_psk:
 1066|  1.23k|{
 1067|  1.23k|#ifndef OPENSSL_NO_TLS1_3
 1068|  1.23k|    uint32_t agesec, agems = 0;
 1069|  1.23k|    size_t binderoffset, msglen;
 1070|  1.23k|    int reshashsize = 0, pskhashsize = 0;
 1071|  1.23k|    unsigned char *resbinder = NULL, *pskbinder = NULL, *msgstart = NULL;
 1072|  1.23k|    const EVP_MD *handmd = NULL, *mdres = NULL, *mdpsk = NULL;
 1073|  1.23k|    int dores = 0;
 1074|  1.23k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.23k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1075|  1.23k|    OSSL_TIME t;
 1076|       |
 1077|  1.23k|    s->ext.tick_identity = 0;
 1078|       |
 1079|       |    /*
 1080|       |     * Note: At this stage of the code we only support adding a single
 1081|       |     * resumption PSK. If we add support for multiple PSKs then the length
 1082|       |     * calculations in the padding extension will need to be adjusted.
 1083|       |     */
 1084|       |
 1085|       |    /*
 1086|       |     * If this is an incompatible or new session then we have nothing to resume
 1087|       |     * so don't add this extension.
 1088|       |     */
 1089|  1.23k|    if (s->session->ssl_version != TLS1_3_VERSION
  ------------------
  |  |   27|  2.47k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1089:9): [True: 0, False: 1.23k]
  ------------------
 1090|  1.23k|        || (s->session->ext.ticklen == 0 && s->psksession == NULL))
  ------------------
  |  Branch (1090:13): [True: 1.23k, False: 0]
  |  Branch (1090:45): [True: 1.23k, False: 0]
  ------------------
 1091|  1.23k|        return EXT_RETURN_NOT_SENT;
 1092|       |
 1093|      0|    if (s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (1093:9): [True: 0, False: 0]
  ------------------
 1094|      0|        handmd = ssl_handshake_md(s);
 1095|       |
 1096|      0|    if (s->session->ext.ticklen != 0) {
  ------------------
  |  Branch (1096:9): [True: 0, False: 0]
  ------------------
 1097|       |        /* Get the digest associated with the ciphersuite in the session */
 1098|      0|        if (s->session->cipher == NULL) {
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1100|      0|            return EXT_RETURN_FAIL;
 1101|      0|        }
 1102|      0|        mdres = ssl_md(sctx, s->session->cipher->algorithm2);
 1103|      0|        if (mdres == NULL) {
  ------------------
  |  Branch (1103:13): [True: 0, False: 0]
  ------------------
 1104|       |            /*
 1105|       |             * Don't recognize this cipher so we can't use the session.
 1106|       |             * Ignore it
 1107|       |             */
 1108|      0|            goto dopsksess;
 1109|      0|        }
 1110|       |
 1111|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdres != handmd) {
  ------------------
  |  Branch (1111:13): [True: 0, False: 0]
  |  Branch (1111:58): [True: 0, False: 0]
  ------------------
 1112|       |            /*
 1113|       |             * Selected ciphersuite hash does not match the hash for the session
 1114|       |             * so we can't use it.
 1115|       |             */
 1116|      0|            goto dopsksess;
 1117|      0|        }
 1118|       |
 1119|       |        /*
 1120|       |         * Technically the C standard just says time() returns a time_t and says
 1121|       |         * nothing about the encoding of that type. In practice most
 1122|       |         * implementations follow POSIX which holds it as an integral type in
 1123|       |         * seconds since epoch. We've already made the assumption that we can do
 1124|       |         * this in multiple places in the code, so portability shouldn't be an
 1125|       |         * issue.
 1126|       |         */
 1127|      0|        t = ossl_time_subtract(ossl_time_now(), s->session->time);
 1128|      0|        agesec = (uint32_t)ossl_time2seconds(t);
  ------------------
  |  |   43|      0|#define ossl_time2seconds(t) (ossl_time2ticks(t) / OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|      0|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
 1129|       |        /*
 1130|       |         * We calculate the age in seconds but the server may work in ms. Due to
 1131|       |         * rounding errors we could overestimate the age by up to 1s. It is
 1132|       |         * better to underestimate it. Otherwise, if the RTT is very short, when
 1133|       |         * the server calculates the age reported by the client it could be
 1134|       |         * bigger than the age calculated on the server - which should never
 1135|       |         * happen.
 1136|       |         */
 1137|      0|        if (agesec > 0)
  ------------------
  |  Branch (1137:13): [True: 0, False: 0]
  ------------------
 1138|      0|            agesec--;
 1139|       |
 1140|      0|        if (s->session->ext.tick_lifetime_hint < agesec) {
  ------------------
  |  Branch (1140:13): [True: 0, False: 0]
  ------------------
 1141|       |            /* Ticket is too old. Ignore it. */
 1142|      0|            goto dopsksess;
 1143|      0|        }
 1144|       |
 1145|       |        /*
 1146|       |         * Calculate age in ms. We're just doing it to nearest second. Should be
 1147|       |         * good enough.
 1148|       |         */
 1149|      0|        agems = agesec * (uint32_t)1000;
 1150|       |
 1151|      0|        if (agesec != 0 && agems / (uint32_t)1000 != agesec) {
  ------------------
  |  Branch (1151:13): [True: 0, False: 0]
  |  Branch (1151:28): [True: 0, False: 0]
  ------------------
 1152|       |            /*
 1153|       |             * Overflow. Shouldn't happen unless this is a *really* old session.
 1154|       |             * If so we just ignore it.
 1155|       |             */
 1156|      0|            goto dopsksess;
 1157|      0|        }
 1158|       |
 1159|       |        /*
 1160|       |         * Obfuscate the age. Overflow here is fine, this addition is supposed
 1161|       |         * to be mod 2^32.
 1162|       |         */
 1163|      0|        agems += s->session->ext.tick_age_add;
 1164|       |
 1165|      0|        reshashsize = EVP_MD_get_size(mdres);
 1166|      0|        if (reshashsize <= 0)
  ------------------
  |  Branch (1166:13): [True: 0, False: 0]
  ------------------
 1167|      0|            goto dopsksess;
 1168|      0|        s->ext.tick_identity++;
 1169|      0|        dores = 1;
 1170|      0|    }
 1171|       |
 1172|      0|dopsksess:
 1173|      0|    if (!dores && s->psksession == NULL)
  ------------------
  |  Branch (1173:9): [True: 0, False: 0]
  |  Branch (1173:19): [True: 0, False: 0]
  ------------------
 1174|      0|        return EXT_RETURN_NOT_SENT;
 1175|       |
 1176|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1176:9): [True: 0, False: 0]
  ------------------
 1177|      0|        mdpsk = ssl_md(sctx, s->psksession->cipher->algorithm2);
 1178|      0|        if (mdpsk == NULL) {
  ------------------
  |  Branch (1178:13): [True: 0, False: 0]
  ------------------
 1179|       |            /*
 1180|       |             * Don't recognize this cipher so we can't use the session.
 1181|       |             * If this happens it's an application bug.
 1182|       |             */
 1183|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1184|      0|            return EXT_RETURN_FAIL;
 1185|      0|        }
 1186|       |
 1187|      0|        if (s->hello_retry_request == SSL_HRR_PENDING && mdpsk != handmd) {
  ------------------
  |  Branch (1187:13): [True: 0, False: 0]
  |  Branch (1187:58): [True: 0, False: 0]
  ------------------
 1188|       |            /*
 1189|       |             * Selected ciphersuite hash does not match the hash for the PSK
 1190|       |             * session. This is an application bug.
 1191|       |             */
 1192|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1193|      0|            return EXT_RETURN_FAIL;
 1194|      0|        }
 1195|       |
 1196|      0|        pskhashsize = EVP_MD_get_size(mdpsk);
 1197|      0|        if (pskhashsize <= 0) {
  ------------------
  |  Branch (1197:13): [True: 0, False: 0]
  ------------------
 1198|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_PSK);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1199|      0|            return EXT_RETURN_FAIL;
 1200|      0|        }
 1201|      0|    }
 1202|       |
 1203|       |    /* Create the extension, but skip over the binder for now */
 1204|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_psk)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1204:9): [True: 0, False: 0]
  ------------------
 1205|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1205:12): [True: 0, False: 0]
  ------------------
 1206|      0|        || !WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1206:12): [True: 0, False: 0]
  ------------------
 1207|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1208|      0|        return EXT_RETURN_FAIL;
 1209|      0|    }
 1210|       |
 1211|      0|    if (dores) {
  ------------------
  |  Branch (1211:9): [True: 0, False: 0]
  ------------------
 1212|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->session->ext.tick,
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1212:13): [True: 0, False: 0]
  ------------------
 1213|      0|                s->session->ext.ticklen)
 1214|      0|            || !WPACKET_put_bytes_u32(pkt, agems)) {
  ------------------
  |  |  895|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1214:16): [True: 0, False: 0]
  ------------------
 1215|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1216|      0|            return EXT_RETURN_FAIL;
 1217|      0|        }
 1218|      0|    }
 1219|       |
 1220|      0|    if (s->psksession != NULL) {
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|        if (!WPACKET_sub_memcpy_u16(pkt, s->psksession_id,
  ------------------
  |  |  920|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (1221:13): [True: 0, False: 0]
  ------------------
 1222|      0|                s->psksession_id_len)
 1223|      0|            || !WPACKET_put_bytes_u32(pkt, 0)) {
  ------------------
  |  |  895|      0|    WPACKET_put_bytes__((pkt), (val), 4)
  ------------------
  |  Branch (1223:16): [True: 0, False: 0]
  ------------------
 1224|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1225|      0|            return EXT_RETURN_FAIL;
 1226|      0|        }
 1227|      0|        s->ext.tick_identity++;
 1228|      0|    }
 1229|       |
 1230|      0|    if (!WPACKET_close(pkt)
  ------------------
  |  Branch (1230:9): [True: 0, False: 0]
  ------------------
 1231|      0|        || !WPACKET_get_total_written(pkt, &binderoffset)
  ------------------
  |  Branch (1231:12): [True: 0, False: 0]
  ------------------
 1232|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1232:12): [True: 0, False: 0]
  ------------------
 1233|      0|        || (dores
  ------------------
  |  Branch (1233:13): [True: 0, False: 0]
  ------------------
 1234|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, reshashsize, &resbinder))
  ------------------
  |  |  829|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1234:16): [True: 0, False: 0]
  ------------------
 1235|      0|        || (s->psksession != NULL
  ------------------
  |  Branch (1235:13): [True: 0, False: 0]
  ------------------
 1236|      0|            && !WPACKET_sub_allocate_bytes_u8(pkt, pskhashsize, &pskbinder))
  ------------------
  |  |  829|      0|    WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1)
  ------------------
  |  Branch (1236:16): [True: 0, False: 0]
  ------------------
 1237|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1237:12): [True: 0, False: 0]
  ------------------
 1238|      0|        || !WPACKET_close(pkt)
  ------------------
  |  Branch (1238:12): [True: 0, False: 0]
  ------------------
 1239|      0|        || !WPACKET_get_total_written(pkt, &msglen)
  ------------------
  |  Branch (1239:12): [True: 0, False: 0]
  ------------------
 1240|       |        /*
 1241|       |         * We need to fill in all the sub-packet lengths now so we can
 1242|       |         * calculate the HMAC of the message up to the binders
 1243|       |         */
 1244|      0|        || !WPACKET_fill_lengths(pkt)) {
  ------------------
  |  Branch (1244:12): [True: 0, False: 0]
  ------------------
 1245|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1246|      0|        return EXT_RETURN_FAIL;
 1247|      0|    }
 1248|       |
 1249|      0|    msgstart = WPACKET_get_curr(pkt) - msglen;
 1250|       |
 1251|      0|    if (dores
  ------------------
  |  Branch (1251:9): [True: 0, False: 0]
  ------------------
 1252|      0|        && tls_psk_do_binder(s, mdres, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1252:12): [True: 0, False: 0]
  ------------------
 1253|      0|               resbinder, s->session, 1, 0)
 1254|      0|            != 1) {
 1255|       |        /* SSLfatal() already called */
 1256|      0|        return EXT_RETURN_FAIL;
 1257|      0|    }
 1258|       |
 1259|      0|    if (s->psksession != NULL
  ------------------
  |  Branch (1259:9): [True: 0, False: 0]
  ------------------
 1260|      0|        && tls_psk_do_binder(s, mdpsk, msgstart, binderoffset, NULL,
  ------------------
  |  Branch (1260:12): [True: 0, False: 0]
  ------------------
 1261|      0|               pskbinder, s->psksession, 1, 1)
 1262|      0|            != 1) {
 1263|       |        /* SSLfatal() already called */
 1264|      0|        return EXT_RETURN_FAIL;
 1265|      0|    }
 1266|       |
 1267|      0|    return EXT_RETURN_SENT;
 1268|       |#else
 1269|       |    return EXT_RETURN_NOT_SENT;
 1270|       |#endif
 1271|      0|}
tls_construct_ctos_post_handshake_auth:
 1277|  1.23k|{
 1278|  1.23k|#ifndef OPENSSL_NO_TLS1_3
 1279|  1.23k|    if (!s->pha_enabled)
  ------------------
  |  Branch (1279:9): [True: 0, False: 1.23k]
  ------------------
 1280|      0|        return EXT_RETURN_NOT_SENT;
 1281|       |
 1282|       |    /* construct extension - 0 length, no contents */
 1283|  1.23k|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_post_handshake_auth)
  ------------------
  |  |  891|  2.47k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1283:9): [True: 0, False: 1.23k]
  ------------------
 1284|  1.23k|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|  2.47k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1284:12): [True: 0, False: 1.23k]
  ------------------
 1285|  1.23k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1285:12): [True: 0, False: 1.23k]
  ------------------
 1286|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1287|      0|        return EXT_RETURN_FAIL;
 1288|      0|    }
 1289|       |
 1290|  1.23k|    s->post_handshake_auth = SSL_PHA_EXT_SENT;
 1291|       |
 1292|  1.23k|    return EXT_RETURN_SENT;
 1293|       |#else
 1294|       |    return EXT_RETURN_NOT_SENT;
 1295|       |#endif
 1296|  1.23k|}
tls_construct_ctos_client_cert_type:
 2167|  1.24k|{
 2168|  1.24k|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  365|  1.24k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2169|  1.24k|    if (sc->client_cert_type == NULL)
  ------------------
  |  Branch (2169:9): [True: 1.24k, False: 0]
  ------------------
 2170|  1.24k|        return EXT_RETURN_NOT_SENT;
 2171|       |
 2172|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_client_cert_type)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2172:9): [True: 0, False: 0]
  ------------------
 2173|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2173:12): [True: 0, False: 0]
  ------------------
 2174|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->client_cert_type, sc->client_cert_type_len)
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2174:12): [True: 0, False: 0]
  ------------------
 2175|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2175:12): [True: 0, False: 0]
  ------------------
 2176|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2177|      0|        return EXT_RETURN_FAIL;
 2178|      0|    }
 2179|      0|    sc->ext.client_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  366|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2180|      0|    return EXT_RETURN_SENT;
 2181|      0|}
tls_construct_ctos_server_cert_type:
 2219|  1.24k|{
 2220|  1.24k|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_NONE;
  ------------------
  |  |  365|  1.24k|#define OSSL_CERT_TYPE_CTOS_NONE 0
  ------------------
 2221|  1.24k|    if (sc->server_cert_type == NULL)
  ------------------
  |  Branch (2221:9): [True: 1.24k, False: 0]
  ------------------
 2222|  1.24k|        return EXT_RETURN_NOT_SENT;
 2223|       |
 2224|      0|    if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_server_cert_type)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (2224:9): [True: 0, False: 0]
  ------------------
 2225|      0|        || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (2225:12): [True: 0, False: 0]
  ------------------
 2226|      0|        || !WPACKET_sub_memcpy_u8(pkt, sc->server_cert_type, sc->server_cert_type_len)
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (2226:12): [True: 0, False: 0]
  ------------------
 2227|      0|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (2227:12): [True: 0, False: 0]
  ------------------
 2228|      0|        SSLfatal(sc, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 2229|      0|        return EXT_RETURN_FAIL;
 2230|      0|    }
 2231|      0|    sc->ext.server_cert_type_ctos = OSSL_CERT_TYPE_CTOS_GOOD;
  ------------------
  |  |  366|      0|#define OSSL_CERT_TYPE_CTOS_GOOD 1
  ------------------
 2232|      0|    return EXT_RETURN_SENT;
 2233|      0|}
extensions_clnt.c:use_ecc:
  140|  2.48k|{
  141|  2.48k|    int i, end, ret = 0;
  142|  2.48k|    unsigned long alg_k, alg_a;
  143|  2.48k|    STACK_OF(SSL_CIPHER) *cipher_stack = NULL;
  ------------------
  |  |   33|  2.48k|#define STACK_OF(type) struct stack_st_##type
  ------------------
  144|  2.48k|    const uint16_t *pgroups = NULL;
  145|  2.48k|    size_t num_groups, j;
  146|  2.48k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  2.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  147|       |
  148|       |    /* See if we support any ECC ciphersuites */
  149|  2.48k|    if (s->version == SSL3_VERSION)
  ------------------
  |  |   23|  2.48k|#define SSL3_VERSION 0x0300
  ------------------
  |  Branch (149:9): [True: 0, False: 2.48k]
  ------------------
  150|      0|        return 0;
  151|       |
  152|  2.48k|    cipher_stack = SSL_get1_supported_ciphers(ssl);
  153|  2.48k|    end = sk_SSL_CIPHER_num(cipher_stack);
  ------------------
  |  | 1005|  2.48k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  154|  2.48k|    for (i = 0; i < end; i++) {
  ------------------
  |  Branch (154:17): [True: 2.48k, False: 0]
  ------------------
  155|  2.48k|        const SSL_CIPHER *c = sk_SSL_CIPHER_value(cipher_stack, i);
  ------------------
  |  | 1006|  2.48k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  156|       |
  157|  2.48k|        alg_k = c->algorithm_mkey;
  158|  2.48k|        alg_a = c->algorithm_auth;
  159|  2.48k|        if ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   85|  2.48k|#define SSL_kECDHE 0x00000004U
  ------------------
                      if ((alg_k & (SSL_kECDHE | SSL_kECDHEPSK))
  ------------------
  |  |   94|  2.48k|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (159:13): [True: 10, False: 2.47k]
  ------------------
  160|  2.47k|            || (alg_a & SSL_aECDSA)
  ------------------
  |  |  114|  2.47k|#define SSL_aECDSA 0x00000008U
  ------------------
  |  Branch (160:16): [True: 0, False: 2.47k]
  ------------------
  161|  2.48k|            || c->min_tls >= TLS1_3_VERSION) {
  ------------------
  |  |   27|  2.47k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (161:16): [True: 2.47k, False: 0]
  ------------------
  162|  2.48k|            ret = 1;
  163|  2.48k|            break;
  164|  2.48k|        }
  165|  2.48k|    }
  166|  2.48k|    sk_SSL_CIPHER_free(cipher_stack);
  ------------------
  |  | 1011|  2.48k|#define sk_SSL_CIPHER_free(sk) OPENSSL_sk_free(ossl_check_SSL_CIPHER_sk_type(sk))
  ------------------
  167|  2.48k|    if (!ret)
  ------------------
  |  Branch (167:9): [True: 0, False: 2.48k]
  ------------------
  168|      0|        return 0;
  169|       |
  170|       |    /* Check we have at least one EC supported group */
  171|  2.48k|    tls1_get_supported_groups(s, &pgroups, &num_groups);
  172|  4.94k|    for (j = 0; j < num_groups; j++) {
  ------------------
  |  Branch (172:17): [True: 4.94k, False: 0]
  ------------------
  173|  4.94k|        uint16_t ctmp = pgroups[j];
  174|       |
  175|  4.94k|        if (tls_valid_group(s, ctmp, min_version, max_version, 1, NULL)
  ------------------
  |  Branch (175:13): [True: 2.53k, False: 2.41k]
  ------------------
  176|  2.53k|            && tls_group_allowed(s, ctmp, SSL_SECOP_CURVE_SUPPORTED))
  ------------------
  |  | 2758|  2.53k|#define SSL_SECOP_CURVE_SUPPORTED (4 | SSL_SECOP_OTHER_CURVE)
  |  |  ------------------
  |  |  |  | 2739|  2.53k|#define SSL_SECOP_OTHER_CURVE (2 << 16)
  |  |  ------------------
  ------------------
  |  Branch (176:16): [True: 2.48k, False: 48]
  ------------------
  177|  2.48k|            return 1;
  178|  4.94k|    }
  179|       |
  180|      0|    return 0;
  181|  2.48k|}
extensions_clnt.c:add_key_share:
  641|  2.46k|{
  642|  2.46k|    unsigned char *encoded_pubkey = NULL;
  643|  2.46k|    EVP_PKEY *key_share_key = NULL;
  644|  2.46k|    size_t encodedlen;
  645|       |
  646|  2.46k|    if (loop_num < s->s3.tmp.num_ks_pkey) {
  ------------------
  |  Branch (646:9): [True: 0, False: 2.46k]
  ------------------
  647|      0|        if (!ossl_assert(s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (647:13): [True: 0, False: 0]
  ------------------
  648|      0|            || !ossl_assert(s->s3.tmp.ks_pkey[loop_num] != NULL)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (648:16): [True: 0, False: 0]
  ------------------
  649|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  650|      0|            return 0;
  651|      0|        }
  652|       |        /*
  653|       |         * Could happen if we got an HRR that wasn't requesting a new key_share
  654|       |         */
  655|      0|        key_share_key = s->s3.tmp.ks_pkey[loop_num];
  656|  2.46k|    } else {
  657|  2.46k|        key_share_key = ssl_generate_pkey_group(s, group_id);
  658|  2.46k|        if (key_share_key == NULL) {
  ------------------
  |  Branch (658:13): [True: 0, False: 2.46k]
  ------------------
  659|       |            /* SSLfatal() already called */
  660|      0|            return 0;
  661|      0|        }
  662|  2.46k|    }
  663|       |
  664|       |    /* Encode the public key. */
  665|  2.46k|    encodedlen = EVP_PKEY_get1_encoded_public_key(key_share_key,
  666|  2.46k|        &encoded_pubkey);
  667|  2.46k|    if (encodedlen == 0) {
  ------------------
  |  Branch (667:9): [True: 0, False: 2.46k]
  ------------------
  668|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_EC_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  669|      0|        goto err;
  670|      0|    }
  671|       |
  672|       |    /* Create KeyShareEntry */
  673|  2.46k|    if (!WPACKET_put_bytes_u16(pkt, group_id)
  ------------------
  |  |  891|  4.92k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (673:9): [True: 0, False: 2.46k]
  ------------------
  674|  2.46k|        || !WPACKET_sub_memcpy_u16(pkt, encoded_pubkey, encodedlen)) {
  ------------------
  |  |  920|  2.46k|    WPACKET_sub_memcpy__((pkt), (src), (len), 2)
  ------------------
  |  Branch (674:12): [True: 0, False: 2.46k]
  ------------------
  675|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  676|      0|        goto err;
  677|      0|    }
  678|       |
  679|       |    /* For backward compatibility, we use the first valid group to add a key share */
  680|  2.46k|    if (loop_num == 0) {
  ------------------
  |  Branch (680:9): [True: 1.23k, False: 1.22k]
  ------------------
  681|  1.23k|        s->s3.tmp.pkey = key_share_key;
  682|  1.23k|        s->s3.group_id = group_id;
  683|  1.23k|    }
  684|       |    /* We ensure in t1_lib.c that the loop number does not exceed OPENSSL_CLIENT_MAX_KEY_SHARES */
  685|  2.46k|    s->s3.tmp.ks_pkey[loop_num] = key_share_key;
  686|  2.46k|    s->s3.tmp.ks_group_id[loop_num] = group_id;
  687|  2.46k|    if (loop_num >= s->s3.tmp.num_ks_pkey)
  ------------------
  |  Branch (687:9): [True: 2.46k, False: 0]
  ------------------
  688|  2.46k|        s->s3.tmp.num_ks_pkey++;
  689|       |
  690|  2.46k|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  131|  2.46k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  691|       |
  692|  2.46k|    return 1;
  693|      0|err:
  694|      0|    if (key_share_key != s->s3.tmp.ks_pkey[loop_num])
  ------------------
  |  Branch (694:9): [True: 0, False: 0]
  ------------------
  695|      0|        EVP_PKEY_free(key_share_key);
  696|      0|    OPENSSL_free(encoded_pubkey);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  697|      0|    return 0;
  698|  2.46k|}

custom_ext_init:
  104|  1.24k|{
  105|  1.24k|    size_t i;
  106|  1.24k|    custom_ext_method *meth = exts->meths;
  107|       |
  108|  1.24k|    for (i = 0; i < exts->meths_count; i++, meth++)
  ------------------
  |  Branch (108:17): [True: 0, False: 1.24k]
  ------------------
  109|      0|        meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2068|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
                      meth->ext_flags &= ~(SSL_EXT_FLAG_SENT | SSL_EXT_FLAG_RECEIVED);
  ------------------
  |  | 2063|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  110|  1.24k|}
custom_ext_add:
  175|  1.24k|{
  176|  1.24k|    custom_ext_methods *exts = &s->cert->custext;
  177|  1.24k|    custom_ext_method *meth;
  178|  1.24k|    size_t i;
  179|  1.24k|    int al;
  180|  1.24k|    int for_comp = (context & SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION) != 0;
  ------------------
  |  |  308|  1.24k|#define SSL_EXT_TLS1_3_CERTIFICATE_COMPRESSION 0x08000
  ------------------
  181|       |
  182|  1.24k|    for (i = 0; i < exts->meths_count; i++) {
  ------------------
  |  Branch (182:17): [True: 0, False: 1.24k]
  ------------------
  183|      0|        const unsigned char *out = NULL;
  184|      0|        size_t outlen = 0;
  185|       |
  186|      0|        meth = exts->meths + i;
  187|       |
  188|      0|        if (!should_add_extension(s, meth->context, context, maxversion))
  ------------------
  |  Branch (188:13): [True: 0, False: 0]
  ------------------
  189|      0|            continue;
  190|       |
  191|      0|        if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  301|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  303|      0|#define SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS 0x00400
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  305|      0|#define SSL_EXT_TLS1_3_CERTIFICATE 0x01000
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  310|      0|#define SSL_EXT_TLS1_3_RAW_PUBLIC_KEY 0x10000
  ------------------
                      if ((context & (SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_TLS1_3_SERVER_HELLO | SSL_EXT_TLS1_3_ENCRYPTED_EXTENSIONS | SSL_EXT_TLS1_3_CERTIFICATE | SSL_EXT_TLS1_3_RAW_PUBLIC_KEY | SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST)) != 0) {
  ------------------
  |  |  304|      0|#define SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST 0x00800
  ------------------
  |  Branch (191:13): [True: 0, False: 0]
  ------------------
  192|       |            /* Only send extensions present in ClientHello/CertificateRequest */
  193|      0|            if (!(meth->ext_flags & SSL_EXT_FLAG_RECEIVED))
  ------------------
  |  | 2063|      0|#define SSL_EXT_FLAG_RECEIVED 0x1
  ------------------
  |  Branch (193:17): [True: 0, False: 0]
  ------------------
  194|      0|                continue;
  195|      0|        }
  196|       |        /*
  197|       |         * We skip it if the callback is absent - except for a ClientHello where
  198|       |         * we add an empty extension.
  199|       |         */
  200|      0|        if ((context & SSL_EXT_CLIENT_HELLO) == 0 && meth->add_cb == NULL)
  ------------------
  |  |  299|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (200:13): [True: 0, False: 0]
  |  Branch (200:54): [True: 0, False: 0]
  ------------------
  201|      0|            continue;
  202|       |
  203|      0|        if (meth->add_cb != NULL) {
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  ------------------
  204|      0|            int cb_retval = meth->add_cb(SSL_CONNECTION_GET_USER_SSL(s),
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  205|      0|                meth->ext_type, context, &out,
  206|      0|                &outlen, x, chainidx, &al,
  207|      0|                meth->add_arg);
  208|       |
  209|      0|            if (cb_retval < 0) {
  ------------------
  |  Branch (209:17): [True: 0, False: 0]
  ------------------
  210|      0|                if (!for_comp)
  ------------------
  |  Branch (210:21): [True: 0, False: 0]
  ------------------
  211|      0|                    SSLfatal(s, al, SSL_R_CALLBACK_FAILED);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  212|      0|                return 0; /* error */
  213|      0|            }
  214|      0|            if (cb_retval == 0)
  ------------------
  |  Branch (214:17): [True: 0, False: 0]
  ------------------
  215|      0|                continue; /* skip this extension */
  216|      0|        }
  217|       |
  218|      0|        if (!WPACKET_put_bytes_u16(pkt, meth->ext_type)
  ------------------
  |  |  891|      0|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (218:13): [True: 0, False: 0]
  ------------------
  219|      0|            || !WPACKET_start_sub_packet_u16(pkt)
  ------------------
  |  |  792|      0|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (219:16): [True: 0, False: 0]
  ------------------
  220|      0|            || (outlen > 0 && !WPACKET_memcpy(pkt, out, outlen))
  ------------------
  |  Branch (220:17): [True: 0, False: 0]
  |  Branch (220:31): [True: 0, False: 0]
  ------------------
  221|      0|            || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (221:16): [True: 0, False: 0]
  ------------------
  222|      0|            if (meth->free_cb != NULL)
  ------------------
  |  Branch (222:17): [True: 0, False: 0]
  ------------------
  223|      0|                meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  224|      0|                    context, out, meth->add_arg);
  225|      0|            if (!for_comp)
  ------------------
  |  Branch (225:17): [True: 0, False: 0]
  ------------------
  226|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  227|      0|            return 0;
  228|      0|        }
  229|      0|        if ((context & SSL_EXT_CLIENT_HELLO) != 0) {
  ------------------
  |  |  299|      0|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (229:13): [True: 0, False: 0]
  ------------------
  230|       |            /*
  231|       |             * We can't send duplicates: code logic should prevent this.
  232|       |             */
  233|      0|            if (!ossl_assert((meth->ext_flags & SSL_EXT_FLAG_SENT) == 0)) {
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (233:17): [True: 0, False: 0]
  ------------------
  234|      0|                if (meth->free_cb != NULL)
  ------------------
  |  Branch (234:21): [True: 0, False: 0]
  ------------------
  235|      0|                    meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  236|      0|                        context, out, meth->add_arg);
  237|      0|                if (!for_comp)
  ------------------
  |  Branch (237:21): [True: 0, False: 0]
  ------------------
  238|      0|                    SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  239|      0|                return 0;
  240|      0|            }
  241|       |            /*
  242|       |             * Indicate extension has been sent: this is both a sanity check to
  243|       |             * ensure we don't send duplicate extensions and indicates that it
  244|       |             * is not an error if the extension is present in ServerHello.
  245|       |             */
  246|      0|            meth->ext_flags |= SSL_EXT_FLAG_SENT;
  ------------------
  |  | 2068|      0|#define SSL_EXT_FLAG_SENT 0x2
  ------------------
  247|      0|        }
  248|      0|        if (meth->free_cb != NULL)
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      0|            meth->free_cb(SSL_CONNECTION_GET_USER_SSL(s), meth->ext_type,
  ------------------
  |  |   28|      0|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  250|      0|                context, out, meth->add_arg);
  251|      0|    }
  252|  1.24k|    return 1;
  253|  1.24k|}
custom_exts_copy:
  302|  1.31k|{
  303|  1.31k|    size_t i;
  304|  1.31k|    int err = 0;
  305|       |
  306|  1.31k|    if (src->meths_count > 0) {
  ------------------
  |  Branch (306:9): [True: 0, False: 1.31k]
  ------------------
  307|      0|        dst->meths = OPENSSL_memdup(src->meths,
  ------------------
  |  |  133|      0|    CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  308|      0|            sizeof(*src->meths) * src->meths_count);
  309|      0|        if (dst->meths == NULL)
  ------------------
  |  Branch (309:13): [True: 0, False: 0]
  ------------------
  310|      0|            return 0;
  311|      0|        dst->meths_count = src->meths_count;
  312|       |
  313|      0|        for (i = 0; i < src->meths_count; i++)
  ------------------
  |  Branch (313:21): [True: 0, False: 0]
  ------------------
  314|      0|            custom_ext_copy_old_cb(&dst->meths[i], &src->meths[i], &err);
  315|      0|    }
  316|       |
  317|  1.31k|    if (err) {
  ------------------
  |  Branch (317:9): [True: 0, False: 1.31k]
  ------------------
  318|      0|        custom_exts_free(dst);
  319|      0|        return 0;
  320|      0|    }
  321|       |
  322|  1.31k|    return 1;
  323|  1.31k|}
custom_exts_free:
  376|  3.40k|{
  377|  3.40k|    size_t i;
  378|  3.40k|    custom_ext_method *meth;
  379|       |
  380|  3.40k|    for (i = 0, meth = exts->meths; i < exts->meths_count; i++, meth++) {
  ------------------
  |  Branch (380:37): [True: 0, False: 3.40k]
  ------------------
  381|      0|        if (meth->add_cb != custom_ext_add_old_cb_wrap)
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|            continue;
  383|       |
  384|       |        /* Old style API wrapper. Need to free the arguments too */
  385|      0|        OPENSSL_free(meth->add_arg);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  386|      0|        OPENSSL_free(meth->parse_arg);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  387|      0|    }
  388|  3.40k|    OPENSSL_free(exts->meths);
  ------------------
  |  |  131|  3.40k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  389|       |    exts->meths = NULL;
  390|  3.40k|    exts->meths_count = 0;
  391|  3.40k|}

SSL_get_state:
   75|  2.35k|{
   76|  2.35k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(ssl);
  ------------------
  |  |   41|  2.35k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  2.35k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.35k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.35k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.35k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.35k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.35k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.35k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   77|       |
   78|  2.35k|    if (sc == NULL)
  ------------------
  |  Branch (78:9): [True: 0, False: 2.35k]
  ------------------
   79|      0|        return TLS_ST_BEFORE;
   80|       |
   81|  2.35k|    return sc->statem.hand_state;
   82|  2.35k|}
SSL_in_init:
   85|  5.94k|{
   86|  5.94k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  5.94k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  5.94k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 5.94k]
  |  |  |  |  ------------------
  |  |  |  |   33|  5.94k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  5.94k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 5.94k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  5.94k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  5.94k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
   87|       |
   88|  5.94k|    if (sc == NULL)
  ------------------
  |  Branch (88:9): [True: 0, False: 5.94k]
  ------------------
   89|      0|        return 0;
   90|       |
   91|  5.94k|    return sc->statem.in_init;
   92|  5.94k|}
SSL_in_before:
  105|  2.87k|{
  106|  2.87k|    const SSL_CONNECTION *sc = SSL_CONNECTION_FROM_CONST_SSL(s);
  ------------------
  |  |   41|  2.87k|    SSL_CONNECTION_FROM_SSL_int(ssl, const)
  |  |  ------------------
  |  |  |  |   32|  2.87k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 2.87k]
  |  |  |  |  ------------------
  |  |  |  |   33|  2.87k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  2.87k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 2.87k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  2.87k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  2.87k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  107|       |
  108|  2.87k|    if (sc == NULL)
  ------------------
  |  Branch (108:9): [True: 0, False: 2.87k]
  ------------------
  109|      0|        return 0;
  110|       |
  111|       |    /*
  112|       |     * Historically being "in before" meant before anything had happened. In the
  113|       |     * current code though we remain in the "before" state for a while after we
  114|       |     * have started the handshake process (e.g. as a server waiting for the
  115|       |     * first message to arrive). There "in before" is taken to mean "in before"
  116|       |     * and not started any handshake process yet.
  117|       |     */
  118|  2.87k|    return (sc->statem.hand_state == TLS_ST_BEFORE)
  ------------------
  |  Branch (118:12): [True: 2.63k, False: 246]
  ------------------
  119|  2.63k|        && (sc->statem.state == MSG_FLOW_UNINITED);
  ------------------
  |  Branch (119:12): [True: 2.63k, False: 0]
  ------------------
  120|  2.87k|}
ossl_statem_clear:
  131|  3.94k|{
  132|  3.94k|    s->statem.state = MSG_FLOW_UNINITED;
  133|  3.94k|    s->statem.hand_state = TLS_ST_BEFORE;
  134|  3.94k|    ossl_statem_set_in_init(s, 1);
  135|  3.94k|    s->statem.no_cert_verify = 0;
  136|  3.94k|}
ossl_statem_send_fatal:
  148|  1.12k|{
  149|       |    /* We shouldn't call SSLfatal() twice. Once is enough */
  150|  1.12k|    if (s->statem.in_init && s->statem.state == MSG_FLOW_ERROR)
  ------------------
  |  Branch (150:9): [True: 1.12k, False: 0]
  |  Branch (150:30): [True: 0, False: 1.12k]
  ------------------
  151|      0|        return;
  152|  1.12k|    ossl_statem_set_in_init(s, 1);
  153|  1.12k|    s->statem.state = MSG_FLOW_ERROR;
  154|  1.12k|    if (al != SSL_AD_NO_ALERT)
  ------------------
  |  |   63|  1.12k|#define SSL_AD_NO_ALERT -1
  ------------------
  |  Branch (154:9): [True: 1.11k, False: 4]
  ------------------
  155|  1.11k|        ssl3_send_alert(s, SSL3_AL_FATAL, al);
  ------------------
  |  |  250|  1.11k|#define SSL3_AL_FATAL 2
  ------------------
  156|  1.12k|}
ossl_statem_fatal:
  166|  1.12k|{
  167|  1.12k|    va_list args;
  168|       |
  169|  1.12k|    va_start(args, fmt);
  170|  1.12k|    ERR_vset_error(ERR_LIB_SSL, reason, fmt, args);
  ------------------
  |  |   89|  1.12k|#define ERR_LIB_SSL 20
  ------------------
  171|  1.12k|    va_end(args);
  172|       |
  173|  1.12k|    ossl_statem_send_fatal(s, al);
  174|  1.12k|}
ossl_statem_set_in_init:
  204|  5.06k|{
  205|  5.06k|    s->statem.in_init = init;
  206|  5.06k|    if (s->rlayer.rrlmethod != NULL && s->rlayer.rrlmethod->set_in_init != NULL)
  ------------------
  |  Branch (206:9): [True: 3.75k, False: 1.31k]
  |  Branch (206:40): [True: 0, False: 3.75k]
  ------------------
  207|      0|        s->rlayer.rrlmethod->set_in_init(s->rlayer.rrl, init);
  208|  5.06k|}
ossl_statem_get_in_handshake:
  211|  2.89k|{
  212|  2.89k|    return s->statem.in_handshake;
  213|  2.89k|}
ossl_statem_check_finish_init:
  246|  1.56k|{
  247|  1.56k|    if (sending == -1) {
  ------------------
  |  Branch (247:9): [True: 1.56k, False: 0]
  ------------------
  248|  1.56k|        if (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
  ------------------
  |  Branch (248:13): [True: 0, False: 1.56k]
  ------------------
  249|  1.56k|            || s->statem.hand_state == TLS_ST_EARLY_DATA) {
  ------------------
  |  Branch (249:16): [True: 0, False: 1.56k]
  ------------------
  250|      0|            ossl_statem_set_in_init(s, 1);
  251|      0|            if (s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY) {
  ------------------
  |  Branch (251:17): [True: 0, False: 0]
  ------------------
  252|       |                /*
  253|       |                 * SSL_connect() or SSL_do_handshake() has been called directly.
  254|       |                 * We don't allow any more writing of early data.
  255|       |                 */
  256|      0|                s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
  257|      0|            }
  258|      0|        }
  259|  1.56k|    } else if (!s->server) {
  ------------------
  |  Branch (259:16): [True: 0, False: 0]
  ------------------
  260|      0|        if ((sending && (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END || s->statem.hand_state == TLS_ST_EARLY_DATA)
  ------------------
  |  Branch (260:14): [True: 0, False: 0]
  |  Branch (260:26): [True: 0, False: 0]
  |  Branch (260:83): [True: 0, False: 0]
  ------------------
  261|      0|                && s->early_data_state != SSL_EARLY_DATA_WRITING)
  ------------------
  |  Branch (261:20): [True: 0, False: 0]
  ------------------
  262|      0|            || (!sending && s->statem.hand_state == TLS_ST_EARLY_DATA)) {
  ------------------
  |  Branch (262:17): [True: 0, False: 0]
  |  Branch (262:29): [True: 0, False: 0]
  ------------------
  263|      0|            ossl_statem_set_in_init(s, 1);
  264|       |            /*
  265|       |             * SSL_write() has been called directly. We don't allow any more
  266|       |             * writing of early data.
  267|       |             */
  268|      0|            if (sending && s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY)
  ------------------
  |  Branch (268:17): [True: 0, False: 0]
  |  Branch (268:28): [True: 0, False: 0]
  ------------------
  269|      0|                s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
  270|      0|        }
  271|      0|    } else {
  272|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_READING
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  ------------------
  273|      0|            && s->statem.hand_state == TLS_ST_EARLY_DATA)
  ------------------
  |  Branch (273:16): [True: 0, False: 0]
  ------------------
  274|      0|            ossl_statem_set_in_init(s, 1);
  275|      0|    }
  276|  1.56k|    return 1;
  277|  1.56k|}
ossl_statem_connect:
  294|  1.56k|{
  295|  1.56k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.56k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.56k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.56k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.56k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.56k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.56k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.56k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.56k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  296|       |
  297|  1.56k|    if (sc == NULL)
  ------------------
  |  Branch (297:9): [True: 0, False: 1.56k]
  ------------------
  298|      0|        return -1;
  299|       |
  300|  1.56k|    return state_machine(sc, 0);
  301|  1.56k|}
statem_flush:
  970|  1.24k|{
  971|  1.24k|    s->rwstate = SSL_WRITING;
  ------------------
  |  |  933|  1.24k|#define SSL_WRITING 2
  ------------------
  972|  1.24k|    if (BIO_flush(s->wbio) <= 0) {
  ------------------
  |  |  641|  1.24k|#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
  |  |  ------------------
  |  |  |  |  100|  1.24k|#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
  |  |  ------------------
  ------------------
  |  Branch (972:9): [True: 0, False: 1.24k]
  ------------------
  973|      0|        return 0;
  974|      0|    }
  975|  1.24k|    s->rwstate = SSL_NOTHING;
  ------------------
  |  |  932|  1.24k|#define SSL_NOTHING 1
  ------------------
  976|       |
  977|  1.24k|    return 1;
  978|  1.24k|}
statem.c:state_machine:
  356|  1.56k|{
  357|  1.56k|    BUF_MEM *buf = NULL;
  358|  1.56k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  359|  1.56k|    OSSL_STATEM *st = &s->statem;
  360|  1.56k|    int ret = -1;
  361|  1.56k|    int ssret;
  362|  1.56k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.56k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  363|  1.56k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.56k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  364|       |
  365|  1.56k|    if (st->state == MSG_FLOW_ERROR) {
  ------------------
  |  Branch (365:9): [True: 0, False: 1.56k]
  ------------------
  366|       |        /* Shouldn't have been called if we're already in the error state */
  367|      0|        return -1;
  368|      0|    }
  369|       |
  370|  1.56k|    ERR_clear_error();
  371|  1.56k|    clear_sys_error();
  ------------------
  |  |   31|  1.56k|#define clear_sys_error() errno = 0
  ------------------
  372|       |
  373|  1.56k|    cb = get_callback(s);
  374|       |
  375|  1.56k|    st->in_handshake++;
  376|  1.56k|    if (!SSL_in_init(ssl) || SSL_in_before(ssl)) {
  ------------------
  |  Branch (376:9): [True: 0, False: 1.56k]
  |  Branch (376:30): [True: 1.31k, False: 246]
  ------------------
  377|       |        /*
  378|       |         * If we are stateless then we already called SSL_clear() - don't do
  379|       |         * it again and clear the STATELESS flag itself.
  380|       |         */
  381|  1.31k|        if ((s->s3.flags & TLS1_FLAGS_STATELESS) == 0 && !SSL_clear(ssl))
  ------------------
  |  |  304|  1.31k|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (381:13): [True: 1.31k, False: 0]
  |  Branch (381:58): [True: 0, False: 1.31k]
  ------------------
  382|      0|            return -1;
  383|  1.31k|    }
  384|       |#ifndef OPENSSL_NO_SCTP
  385|       |    if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  386|       |        /*
  387|       |         * Notify SCTP BIO socket to enter handshake mode and prevent stream
  388|       |         * identifier other than 0.
  389|       |         */
  390|       |        BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE,
  391|       |            st->in_handshake, NULL);
  392|       |    }
  393|       |#endif
  394|       |
  395|       |    /* Initialise state machine */
  396|  1.56k|    if (st->state == MSG_FLOW_UNINITED
  ------------------
  |  Branch (396:9): [True: 1.31k, False: 246]
  ------------------
  397|  1.31k|        || st->state == MSG_FLOW_FINISHED) {
  ------------------
  |  Branch (397:12): [True: 0, False: 246]
  ------------------
  398|  1.31k|        if (st->state == MSG_FLOW_UNINITED) {
  ------------------
  |  Branch (398:13): [True: 1.31k, False: 0]
  ------------------
  399|  1.31k|            st->hand_state = TLS_ST_BEFORE;
  400|  1.31k|            st->request_state = TLS_ST_BEFORE;
  401|  1.31k|        }
  402|       |
  403|  1.31k|        s->server = server;
  404|  1.31k|        if (cb != NULL) {
  ------------------
  |  Branch (404:13): [True: 0, False: 1.31k]
  ------------------
  405|      0|            if (SSL_IS_FIRST_HANDSHAKE(s) || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  277|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  278|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                          if (SSL_IS_FIRST_HANDSHAKE(s) || !SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  406|      0|                cb(ussl, SSL_CB_HANDSHAKE_START, 1);
  ------------------
  |  | 1146|      0|#define SSL_CB_HANDSHAKE_START 0x10
  ------------------
  407|      0|        }
  408|       |
  409|       |        /*
  410|       |         * Fatal errors in this block don't send an alert because we have
  411|       |         * failed to even initialise properly. Sending an alert is probably
  412|       |         * doomed to failure.
  413|       |         */
  414|       |
  415|  1.31k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.31k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.31k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.31k]
  |  |  ------------------
  ------------------
  416|      0|            if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00) && (server || (s->version & 0xff00) != (DTLS1_BAD_VER & 0xff00))) {
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
                          if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00) && (server || (s->version & 0xff00) != (DTLS1_BAD_VER & 0xff00))) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (416:17): [True: 0, False: 0]
  |  Branch (416:71): [True: 0, False: 0]
  |  Branch (416:81): [True: 0, False: 0]
  ------------------
  417|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  418|      0|                goto end;
  419|      0|            }
  420|  1.31k|        } else {
  421|  1.31k|            if ((s->version >> 8) != SSL3_VERSION_MAJOR) {
  ------------------
  |  |  216|  1.31k|#define SSL3_VERSION_MAJOR 0x03
  ------------------
  |  Branch (421:17): [True: 0, False: 1.31k]
  ------------------
  422|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  423|      0|                goto end;
  424|      0|            }
  425|  1.31k|        }
  426|       |
  427|  1.31k|        if (!ssl_security(s, SSL_SECOP_VERSION, 0, s->version, NULL)) {
  ------------------
  |  | 2766|  1.31k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  1.31k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (427:13): [True: 0, False: 1.31k]
  ------------------
  428|      0|            SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  429|      0|            goto end;
  430|      0|        }
  431|       |
  432|  1.31k|        if (s->init_buf == NULL) {
  ------------------
  |  Branch (432:13): [True: 1.31k, False: 0]
  ------------------
  433|  1.31k|            if ((buf = BUF_MEM_new()) == NULL) {
  ------------------
  |  Branch (433:17): [True: 0, False: 1.31k]
  ------------------
  434|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  435|      0|                goto end;
  436|      0|            }
  437|  1.31k|            if (!BUF_MEM_grow(buf, SSL3_RT_MAX_PLAIN_LENGTH)) {
  ------------------
  |  |  177|  1.31k|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
  |  Branch (437:17): [True: 0, False: 1.31k]
  ------------------
  438|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  439|      0|                goto end;
  440|      0|            }
  441|  1.31k|            s->init_buf = buf;
  442|  1.31k|            buf = NULL;
  443|  1.31k|        }
  444|       |
  445|  1.31k|        s->init_num = 0;
  446|       |
  447|       |        /*
  448|       |         * Should have been reset by tls_process_finished, too.
  449|       |         */
  450|  1.31k|        s->s3.change_cipher_spec = 0;
  451|       |
  452|       |        /*
  453|       |         * Ok, we now need to push on a buffering BIO ...but not with
  454|       |         * SCTP
  455|       |         */
  456|       |#ifndef OPENSSL_NO_SCTP
  457|       |        if (!SSL_CONNECTION_IS_DTLS(s) || !BIO_dgram_is_sctp(SSL_get_wbio(ssl)))
  458|       |#endif
  459|  1.31k|            if (!ssl_init_wbio_buffer(s)) {
  ------------------
  |  Branch (459:17): [True: 0, False: 1.31k]
  ------------------
  460|      0|                SSLfatal(s, SSL_AD_NO_ALERT, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  461|      0|                goto end;
  462|      0|            }
  463|       |
  464|  1.31k|        if ((SSL_in_before(ssl))
  ------------------
  |  Branch (464:13): [True: 1.31k, False: 0]
  ------------------
  465|  1.31k|            || s->renegotiate) {
  ------------------
  |  Branch (465:16): [True: 0, False: 0]
  ------------------
  466|  1.31k|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (466:17): [True: 7, False: 1.30k]
  ------------------
  467|       |                /* SSLfatal() already called */
  468|      7|                goto end;
  469|      7|            }
  470|       |
  471|  1.30k|            if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|  1.30k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 1.30k, False: 0]
  |  |  ------------------
  |  |  278|  1.30k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  472|  1.30k|                st->read_state_first_init = 1;
  473|  1.30k|        }
  474|       |
  475|  1.30k|        st->state = MSG_FLOW_WRITING;
  476|  1.30k|        init_write_state_machine(s);
  477|  1.30k|    }
  478|       |
  479|  2.79k|    while (st->state != MSG_FLOW_FINISHED) {
  ------------------
  |  Branch (479:12): [True: 2.79k, False: 0]
  ------------------
  480|  2.79k|        if (st->state == MSG_FLOW_READING) {
  ------------------
  |  Branch (480:13): [True: 1.48k, False: 1.30k]
  ------------------
  481|  1.48k|            ssret = read_state_machine(s);
  482|  1.48k|            if (ssret == SUB_STATE_FINISHED) {
  ------------------
  |  Branch (482:17): [True: 0, False: 1.48k]
  ------------------
  483|      0|                st->state = MSG_FLOW_WRITING;
  484|      0|                init_write_state_machine(s);
  485|  1.48k|            } else {
  486|       |                /* NBIO or error */
  487|  1.48k|                goto end;
  488|  1.48k|            }
  489|  1.48k|        } else if (st->state == MSG_FLOW_WRITING) {
  ------------------
  |  Branch (489:20): [True: 1.30k, False: 0]
  ------------------
  490|  1.30k|            ssret = write_state_machine(s);
  491|  1.30k|            if (ssret == SUB_STATE_FINISHED) {
  ------------------
  |  Branch (491:17): [True: 1.24k, False: 69]
  ------------------
  492|  1.24k|                st->state = MSG_FLOW_READING;
  493|  1.24k|                init_read_state_machine(s);
  494|  1.24k|            } else if (ssret == SUB_STATE_END_HANDSHAKE) {
  ------------------
  |  Branch (494:24): [True: 0, False: 69]
  ------------------
  495|      0|                st->state = MSG_FLOW_FINISHED;
  496|     69|            } else {
  497|       |                /* NBIO or error */
  498|     69|                goto end;
  499|     69|            }
  500|  1.30k|        } else {
  501|       |            /* Error */
  502|      0|            check_fatal(s);
  ------------------
  |  |  182|      0|    do {                                                             \
  |  |  183|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  184|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  503|      0|            ERR_raise(ERR_LIB_SSL, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  504|      0|            goto end;
  505|      0|        }
  506|  2.79k|    }
  507|       |
  508|      0|    ret = 1;
  509|       |
  510|  1.56k|end:
  511|  1.56k|    st->in_handshake--;
  512|       |
  513|       |#ifndef OPENSSL_NO_SCTP
  514|       |    if (SSL_CONNECTION_IS_DTLS(s) && BIO_dgram_is_sctp(SSL_get_wbio(ssl))) {
  515|       |        /*
  516|       |         * Notify SCTP BIO socket to leave handshake mode and allow stream
  517|       |         * identifier other than 0.
  518|       |         */
  519|       |        BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE,
  520|       |            st->in_handshake, NULL);
  521|       |    }
  522|       |#endif
  523|       |
  524|  1.56k|    BUF_MEM_free(buf);
  525|  1.56k|    if (cb != NULL) {
  ------------------
  |  Branch (525:9): [True: 0, False: 1.56k]
  ------------------
  526|      0|        if (server)
  ------------------
  |  Branch (526:13): [True: 0, False: 0]
  ------------------
  527|      0|            cb(ussl, SSL_CB_ACCEPT_EXIT, ret);
  ------------------
  |  | 1143|      0|#define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1131|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1136|      0|#define SSL_CB_EXIT 0x02
  |  |  ------------------
  ------------------
  528|      0|        else
  529|      0|            cb(ussl, SSL_CB_CONNECT_EXIT, ret);
  ------------------
  |  | 1145|      0|#define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1130|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT | SSL_CB_EXIT)
  |  |  ------------------
  |  |  |  | 1136|      0|#define SSL_CB_EXIT 0x02
  |  |  ------------------
  ------------------
  530|      0|    }
  531|  1.56k|    return ret;
  532|      0|}
statem.c:get_callback:
  316|  4.35k|{
  317|  4.35k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  4.35k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  318|       |
  319|  4.35k|    if (s->info_callback != NULL)
  ------------------
  |  Branch (319:9): [True: 0, False: 4.35k]
  ------------------
  320|      0|        return s->info_callback;
  321|  4.35k|    else if (sctx->info_callback != NULL)
  ------------------
  |  Branch (321:14): [True: 0, False: 4.35k]
  ------------------
  322|      0|        return sctx->info_callback;
  323|       |
  324|  4.35k|    return NULL;
  325|  4.35k|}
statem.c:init_write_state_machine:
  768|  1.30k|{
  769|  1.30k|    OSSL_STATEM *st = &s->statem;
  770|       |
  771|  1.30k|    st->write_state = WRITE_STATE_TRANSITION;
  772|  1.30k|}
statem.c:read_state_machine:
  587|  1.48k|{
  588|  1.48k|    OSSL_STATEM *st = &s->statem;
  589|  1.48k|    int ret, mt;
  590|  1.48k|    size_t len = 0;
  591|  1.48k|    int (*transition)(SSL_CONNECTION *s, int mt);
  592|  1.48k|    PACKET pkt;
  593|  1.48k|    MSG_PROCESS_RETURN (*process_message)(SSL_CONNECTION *s, PACKET *pkt);
  594|  1.48k|    WORK_STATE (*post_process_message)(SSL_CONNECTION *s, WORK_STATE wst);
  595|  1.48k|    size_t (*max_message_size)(SSL_CONNECTION *s);
  596|  1.48k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  597|  1.48k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.48k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  598|       |
  599|  1.48k|    cb = get_callback(s);
  600|       |
  601|  1.48k|    if (s->server) {
  ------------------
  |  Branch (601:9): [True: 0, False: 1.48k]
  ------------------
  602|      0|        transition = ossl_statem_server_read_transition;
  603|      0|        process_message = ossl_statem_server_process_message;
  604|      0|        max_message_size = ossl_statem_server_max_message_size;
  605|      0|        post_process_message = ossl_statem_server_post_process_message;
  606|  1.48k|    } else {
  607|  1.48k|        transition = ossl_statem_client_read_transition;
  608|  1.48k|        process_message = ossl_statem_client_process_message;
  609|  1.48k|        max_message_size = ossl_statem_client_max_message_size;
  610|  1.48k|        post_process_message = ossl_statem_client_post_process_message;
  611|  1.48k|    }
  612|       |
  613|  1.48k|    if (st->read_state_first_init) {
  ------------------
  |  Branch (613:9): [True: 1.24k, False: 246]
  ------------------
  614|  1.24k|        s->first_packet = 1;
  615|  1.24k|        st->read_state_first_init = 0;
  616|  1.24k|    }
  617|       |
  618|  1.48k|    while (1) {
  ------------------
  |  Branch (618:12): [True: 1.48k, Folded]
  ------------------
  619|  1.48k|        switch (st->read_state) {
  620|  1.48k|        case READ_STATE_HEADER:
  ------------------
  |  Branch (620:9): [True: 1.48k, False: 0]
  ------------------
  621|       |            /* Get the state the peer wants to move to */
  622|  1.48k|            if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.48k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.48k]
  |  |  ------------------
  ------------------
  623|       |                /*
  624|       |                 * In DTLS we get the whole message in one go - header and body
  625|       |                 */
  626|      0|                ret = dtls_get_message(s, &mt);
  627|  1.48k|            } else {
  628|  1.48k|                ret = tls_get_message_header(s, &mt);
  629|  1.48k|            }
  630|       |
  631|  1.48k|            if (ret == 0) {
  ------------------
  |  Branch (631:17): [True: 1.37k, False: 113]
  ------------------
  632|       |                /* Could be non-blocking IO */
  633|  1.37k|                return SUB_STATE_ERROR;
  634|  1.37k|            }
  635|       |
  636|    113|            if (cb != NULL) {
  ------------------
  |  Branch (636:17): [True: 0, False: 113]
  ------------------
  637|       |                /* Notify callback of an impending state change */
  638|      0|                if (s->server)
  ------------------
  |  Branch (638:21): [True: 0, False: 0]
  ------------------
  639|      0|                    cb(ssl, SSL_CB_ACCEPT_LOOP, 1);
  ------------------
  |  | 1142|      0|#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1131|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1135|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  640|      0|                else
  641|      0|                    cb(ssl, SSL_CB_CONNECT_LOOP, 1);
  ------------------
  |  | 1144|      0|#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1130|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1135|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  642|      0|            }
  643|       |            /*
  644|       |             * Validate that we are allowed to move to the new state and move
  645|       |             * to that state if so
  646|       |             */
  647|    113|            if (!transition(s, mt))
  ------------------
  |  Branch (647:17): [True: 8, False: 105]
  ------------------
  648|      8|                return SUB_STATE_ERROR;
  649|       |
  650|    105|            if (s->s3.tmp.message_size > max_message_size(s)) {
  ------------------
  |  Branch (650:17): [True: 20, False: 85]
  ------------------
  651|     20|                SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|     20|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     20|    (ERR_new(),                                                  \
  |  |  |  |  151|     20|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     20|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     20|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  652|     20|                    SSL_R_EXCESSIVE_MESSAGE_SIZE);
  653|     20|                return SUB_STATE_ERROR;
  654|     20|            }
  655|       |
  656|       |            /* dtls_get_message already did this */
  657|     85|            if (!SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|    170|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     85|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|     85|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (657:17): [True: 85, False: 0]
  ------------------
  658|     85|                && s->s3.tmp.message_size > 0
  ------------------
  |  Branch (658:20): [True: 84, False: 1]
  ------------------
  659|     84|                && !grow_init_buf(s, s->s3.tmp.message_size + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|     84|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (659:20): [True: 0, False: 84]
  ------------------
  660|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_BUF_LIB);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  661|      0|                return SUB_STATE_ERROR;
  662|      0|            }
  663|       |
  664|     85|            st->read_state = READ_STATE_BODY;
  665|       |            /* Fall through */
  666|       |
  667|     85|        case READ_STATE_BODY:
  ------------------
  |  Branch (667:9): [True: 0, False: 1.48k]
  ------------------
  668|     85|            if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|     85|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|     85|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|     85|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 85]
  |  |  ------------------
  ------------------
  669|       |                /*
  670|       |                 * Actually we already have the body, but we give DTLS the
  671|       |                 * opportunity to do any further processing.
  672|       |                 */
  673|      0|                ret = dtls_get_message_body(s, &len);
  674|     85|            } else {
  675|     85|                ret = tls_get_message_body(s, &len);
  676|     85|            }
  677|     85|            if (ret == 0) {
  ------------------
  |  Branch (677:17): [True: 35, False: 50]
  ------------------
  678|       |                /* Could be non-blocking IO */
  679|     35|                return SUB_STATE_ERROR;
  680|     35|            }
  681|       |
  682|     50|            s->first_packet = 0;
  683|     50|            if (!PACKET_buf_init(&pkt, s->init_msg, len)) {
  ------------------
  |  Branch (683:17): [True: 0, False: 50]
  ------------------
  684|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  685|      0|                return SUB_STATE_ERROR;
  686|      0|            }
  687|     50|            ret = process_message(s, &pkt);
  688|       |
  689|       |            /* Discard the packet data */
  690|     50|            s->init_num = 0;
  691|       |
  692|     50|            switch (ret) {
  693|     50|            case MSG_PROCESS_ERROR:
  ------------------
  |  Branch (693:13): [True: 50, False: 0]
  ------------------
  694|     50|                check_fatal(s);
  ------------------
  |  |  182|     50|    do {                                                             \
  |  |  183|     50|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|    100|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 50, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 50, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|     50|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 50]
  |  |  ------------------
  |  |  184|     50|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|     50|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     50|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 50]
  |  |  ------------------
  ------------------
  695|     50|                return SUB_STATE_ERROR;
  696|       |
  697|      0|            case MSG_PROCESS_FINISHED_READING:
  ------------------
  |  Branch (697:13): [True: 0, False: 50]
  ------------------
  698|      0|                if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  699|      0|                    dtls1_stop_timer(s);
  700|      0|                }
  701|      0|                return SUB_STATE_FINISHED;
  702|       |
  703|      0|            case MSG_PROCESS_CONTINUE_PROCESSING:
  ------------------
  |  Branch (703:13): [True: 0, False: 50]
  ------------------
  704|      0|                st->read_state = READ_STATE_POST_PROCESS;
  705|      0|                st->read_state_work = WORK_MORE_A;
  706|      0|                break;
  707|       |
  708|      0|            default:
  ------------------
  |  Branch (708:13): [True: 0, False: 50]
  ------------------
  709|      0|                st->read_state = READ_STATE_HEADER;
  710|      0|                break;
  711|     50|            }
  712|      0|            break;
  713|       |
  714|      0|        case READ_STATE_POST_PROCESS:
  ------------------
  |  Branch (714:9): [True: 0, False: 1.48k]
  ------------------
  715|      0|            st->read_state_work = post_process_message(s, st->read_state_work);
  716|      0|            switch (st->read_state_work) {
  ------------------
  |  Branch (716:21): [True: 0, False: 0]
  ------------------
  717|      0|            case WORK_ERROR:
  ------------------
  |  Branch (717:13): [True: 0, False: 0]
  ------------------
  718|      0|                check_fatal(s);
  ------------------
  |  |  182|      0|    do {                                                             \
  |  |  183|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  184|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  719|       |                /* Fall through */
  720|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (720:13): [True: 0, False: 0]
  ------------------
  721|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (721:13): [True: 0, False: 0]
  ------------------
  722|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (722:13): [True: 0, False: 0]
  ------------------
  723|      0|                return SUB_STATE_ERROR;
  724|       |
  725|      0|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (725:13): [True: 0, False: 0]
  ------------------
  726|      0|                st->read_state = READ_STATE_HEADER;
  727|      0|                break;
  728|       |
  729|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (729:13): [True: 0, False: 0]
  ------------------
  730|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (730:13): [True: 0, False: 0]
  ------------------
  731|      0|                if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  732|      0|                    dtls1_stop_timer(s);
  733|      0|                }
  734|      0|                return SUB_STATE_FINISHED;
  735|      0|            }
  736|      0|            break;
  737|       |
  738|      0|        default:
  ------------------
  |  Branch (738:9): [True: 0, False: 1.48k]
  ------------------
  739|       |            /* Shouldn't happen */
  740|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  741|      0|            return SUB_STATE_ERROR;
  742|  1.48k|        }
  743|  1.48k|    }
  744|  1.48k|}
statem.c:grow_init_buf:
  545|     84|{
  546|       |
  547|     84|    size_t msg_offset = (char *)s->init_msg - s->init_buf->data;
  548|       |
  549|     84|    if (!BUF_MEM_grow_clean(s->init_buf, (int)size))
  ------------------
  |  Branch (549:9): [True: 0, False: 84]
  ------------------
  550|      0|        return 0;
  551|       |
  552|     84|    if (size < msg_offset)
  ------------------
  |  Branch (552:9): [True: 0, False: 84]
  ------------------
  553|      0|        return 0;
  554|       |
  555|     84|    s->init_msg = s->init_buf->data + msg_offset;
  556|       |
  557|     84|    return 1;
  558|     84|}
statem.c:write_state_machine:
  806|  1.30k|{
  807|  1.30k|    OSSL_STATEM *st = &s->statem;
  808|  1.30k|    int ret;
  809|  1.30k|    WRITE_TRAN (*transition)(SSL_CONNECTION *s);
  810|  1.30k|    WORK_STATE (*pre_work)(SSL_CONNECTION *s, WORK_STATE wst);
  811|  1.30k|    WORK_STATE (*post_work)(SSL_CONNECTION *s, WORK_STATE wst);
  812|  1.30k|    int (*get_construct_message_f)(SSL_CONNECTION *s,
  813|  1.30k|        CON_FUNC_RETURN (**confunc)(SSL_CONNECTION *s,
  814|  1.30k|            WPACKET *pkt),
  815|  1.30k|        int *mt);
  816|  1.30k|    void (*cb)(const SSL *ssl, int type, int val) = NULL;
  817|  1.30k|    CON_FUNC_RETURN (*confunc)(SSL_CONNECTION *s, WPACKET *pkt);
  818|  1.30k|    int mt;
  819|  1.30k|    WPACKET pkt;
  820|  1.30k|    SSL *ssl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.30k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
  821|       |
  822|  1.30k|    cb = get_callback(s);
  823|       |
  824|  1.30k|    if (s->server) {
  ------------------
  |  Branch (824:9): [True: 0, False: 1.30k]
  ------------------
  825|      0|        transition = ossl_statem_server_write_transition;
  826|      0|        pre_work = ossl_statem_server_pre_work;
  827|      0|        post_work = ossl_statem_server_post_work;
  828|      0|        get_construct_message_f = ossl_statem_server_construct_message;
  829|  1.30k|    } else {
  830|  1.30k|        transition = ossl_statem_client_write_transition;
  831|  1.30k|        pre_work = ossl_statem_client_pre_work;
  832|  1.30k|        post_work = ossl_statem_client_post_work;
  833|  1.30k|        get_construct_message_f = ossl_statem_client_construct_message;
  834|  1.30k|    }
  835|       |
  836|  3.85k|    while (1) {
  ------------------
  |  Branch (836:12): [True: 3.85k, Folded]
  ------------------
  837|  3.85k|        switch (st->write_state) {
  838|  2.54k|        case WRITE_STATE_TRANSITION:
  ------------------
  |  Branch (838:9): [True: 2.54k, False: 1.30k]
  ------------------
  839|  2.54k|            if (cb != NULL) {
  ------------------
  |  Branch (839:17): [True: 0, False: 2.54k]
  ------------------
  840|       |                /* Notify callback of an impending state change */
  841|      0|                if (s->server)
  ------------------
  |  Branch (841:21): [True: 0, False: 0]
  ------------------
  842|      0|                    cb(ssl, SSL_CB_ACCEPT_LOOP, 1);
  ------------------
  |  | 1142|      0|#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1131|      0|#define SSL_ST_ACCEPT 0x2000
  |  |  ------------------
  |  |               #define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1135|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  843|      0|                else
  844|      0|                    cb(ssl, SSL_CB_CONNECT_LOOP, 1);
  ------------------
  |  | 1144|      0|#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1130|      0|#define SSL_ST_CONNECT 0x1000
  |  |  ------------------
  |  |               #define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT | SSL_CB_LOOP)
  |  |  ------------------
  |  |  |  | 1135|      0|#define SSL_CB_LOOP 0x01
  |  |  ------------------
  ------------------
  845|      0|            }
  846|  2.54k|            switch (transition(s)) {
  ------------------
  |  Branch (846:21): [True: 2.54k, False: 0]
  ------------------
  847|  1.30k|            case WRITE_TRAN_CONTINUE:
  ------------------
  |  Branch (847:13): [True: 1.30k, False: 1.24k]
  ------------------
  848|  1.30k|                st->write_state = WRITE_STATE_PRE_WORK;
  849|  1.30k|                st->write_state_work = WORK_MORE_A;
  850|  1.30k|                break;
  851|       |
  852|  1.24k|            case WRITE_TRAN_FINISHED:
  ------------------
  |  Branch (852:13): [True: 1.24k, False: 1.30k]
  ------------------
  853|  1.24k|                return SUB_STATE_FINISHED;
  854|       |
  855|      0|            case WRITE_TRAN_ERROR:
  ------------------
  |  Branch (855:13): [True: 0, False: 2.54k]
  ------------------
  856|      0|                check_fatal(s);
  ------------------
  |  |  182|      0|    do {                                                             \
  |  |  183|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  184|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  857|      0|                return SUB_STATE_ERROR;
  858|  2.54k|            }
  859|  1.30k|            break;
  860|       |
  861|  1.30k|        case WRITE_STATE_PRE_WORK:
  ------------------
  |  Branch (861:9): [True: 1.30k, False: 2.54k]
  ------------------
  862|  1.30k|            switch (st->write_state_work = pre_work(s, st->write_state_work)) {
  ------------------
  |  Branch (862:21): [True: 1.30k, False: 0]
  ------------------
  863|      0|            case WORK_ERROR:
  ------------------
  |  Branch (863:13): [True: 0, False: 1.30k]
  ------------------
  864|      0|                check_fatal(s);
  ------------------
  |  |  182|      0|    do {                                                             \
  |  |  183|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  184|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  865|       |                /* Fall through */
  866|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (866:13): [True: 0, False: 1.30k]
  ------------------
  867|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (867:13): [True: 0, False: 1.30k]
  ------------------
  868|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (868:13): [True: 0, False: 1.30k]
  ------------------
  869|      0|                return SUB_STATE_ERROR;
  870|       |
  871|  1.30k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (871:13): [True: 1.30k, False: 0]
  ------------------
  872|  1.30k|                st->write_state = WRITE_STATE_SEND;
  873|  1.30k|                break;
  874|       |
  875|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (875:13): [True: 0, False: 1.30k]
  ------------------
  876|      0|                return SUB_STATE_FINISHED;
  877|       |
  878|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (878:13): [True: 0, False: 1.30k]
  ------------------
  879|      0|                return SUB_STATE_END_HANDSHAKE;
  880|  1.30k|            }
  881|  1.30k|            if (!get_construct_message_f(s, &confunc, &mt)) {
  ------------------
  |  Branch (881:17): [True: 0, False: 1.30k]
  ------------------
  882|       |                /* SSLfatal() already called */
  883|      0|                return SUB_STATE_ERROR;
  884|      0|            }
  885|  1.30k|            if (mt == SSL3_MT_DUMMY) {
  ------------------
  |  |   41|  1.30k|#define SSL3_MT_DUMMY -1
  ------------------
  |  Branch (885:17): [True: 0, False: 1.30k]
  ------------------
  886|       |                /* Skip construction and sending. This isn't a "real" state */
  887|      0|                st->write_state = WRITE_STATE_POST_WORK;
  888|      0|                st->write_state_work = WORK_MORE_A;
  889|      0|                break;
  890|      0|            }
  891|  1.30k|            if (!WPACKET_init(&pkt, s->init_buf)
  ------------------
  |  Branch (891:17): [True: 0, False: 1.30k]
  ------------------
  892|  1.30k|                || !ssl_set_handshake_header(s, &pkt, mt)) {
  ------------------
  |  | 2178|  1.30k|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->set_handshake_header((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (892:20): [True: 0, False: 1.30k]
  ------------------
  893|      0|                WPACKET_cleanup(&pkt);
  894|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  895|      0|                return SUB_STATE_ERROR;
  896|      0|            }
  897|  1.30k|            if (confunc != NULL) {
  ------------------
  |  Branch (897:17): [True: 1.30k, False: 0]
  ------------------
  898|  1.30k|                CON_FUNC_RETURN tmpret;
  899|       |
  900|  1.30k|                tmpret = confunc(s, &pkt);
  901|  1.30k|                if (tmpret == CON_FUNC_ERROR) {
  ------------------
  |  Branch (901:21): [True: 69, False: 1.24k]
  ------------------
  902|     69|                    WPACKET_cleanup(&pkt);
  903|     69|                    check_fatal(s);
  ------------------
  |  |  182|     69|    do {                                                             \
  |  |  183|     69|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|    138|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 69, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 69, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|     69|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 69]
  |  |  ------------------
  |  |  184|     69|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|     69|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|     69|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 69]
  |  |  ------------------
  ------------------
  904|     69|                    return SUB_STATE_ERROR;
  905|  1.24k|                } else if (tmpret == CON_FUNC_DONT_SEND) {
  ------------------
  |  Branch (905:28): [True: 0, False: 1.24k]
  ------------------
  906|       |                    /*
  907|       |                     * The construction function decided not to construct the
  908|       |                     * message after all and continue. Skip sending.
  909|       |                     */
  910|      0|                    WPACKET_cleanup(&pkt);
  911|      0|                    st->write_state = WRITE_STATE_POST_WORK;
  912|      0|                    st->write_state_work = WORK_MORE_A;
  913|      0|                    break;
  914|      0|                } /* else success */
  915|  1.30k|            }
  916|  1.24k|            if (!ssl_close_construct_packet(s, &pkt, mt)
  ------------------
  |  | 2180|  1.24k|    SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->close_construct_packet((s), (pkt), (htype))
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  |  Branch (916:17): [True: 0, False: 1.24k]
  ------------------
  917|  1.24k|                || !WPACKET_finish(&pkt)) {
  ------------------
  |  Branch (917:20): [True: 0, False: 1.24k]
  ------------------
  918|      0|                WPACKET_cleanup(&pkt);
  919|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  920|      0|                return SUB_STATE_ERROR;
  921|      0|            }
  922|       |
  923|       |            /* Fall through */
  924|       |
  925|  1.24k|        case WRITE_STATE_SEND:
  ------------------
  |  Branch (925:9): [True: 0, False: 3.85k]
  ------------------
  926|  1.24k|            if (SSL_CONNECTION_IS_DTLS(s) && st->use_timer) {
  ------------------
  |  |  258|  2.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.24k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.24k]
  |  |  ------------------
  ------------------
  |  Branch (926:46): [True: 0, False: 0]
  ------------------
  927|      0|                dtls1_start_timer(s);
  928|      0|            }
  929|  1.24k|            ret = statem_do_write(s);
  930|  1.24k|            if (ret <= 0) {
  ------------------
  |  Branch (930:17): [True: 0, False: 1.24k]
  ------------------
  931|      0|                return SUB_STATE_ERROR;
  932|      0|            }
  933|  1.24k|            st->write_state = WRITE_STATE_POST_WORK;
  934|  1.24k|            st->write_state_work = WORK_MORE_A;
  935|       |            /* Fall through */
  936|       |
  937|  1.24k|        case WRITE_STATE_POST_WORK:
  ------------------
  |  Branch (937:9): [True: 0, False: 3.85k]
  ------------------
  938|  1.24k|            switch (st->write_state_work = post_work(s, st->write_state_work)) {
  ------------------
  |  Branch (938:21): [True: 1.24k, False: 0]
  ------------------
  939|      0|            case WORK_ERROR:
  ------------------
  |  Branch (939:13): [True: 0, False: 1.24k]
  ------------------
  940|      0|                check_fatal(s);
  ------------------
  |  |  182|      0|    do {                                                             \
  |  |  183|      0|        if (!ossl_assert((s)->statem.in_init                         \
  |  |  ------------------
  |  |  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  |  Branch (52:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   53|      0|    __FILE__, __LINE__)
  |  |  ------------------
  |  |  |  Branch (183:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  184|      0|                && (s)->statem.state == MSG_FLOW_ERROR))             \
  |  |  185|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_MISSING_FATAL); \
  |  |  ------------------
  |  |  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  186|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (186:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  941|       |                /* Fall through */
  942|      0|            case WORK_MORE_A:
  ------------------
  |  Branch (942:13): [True: 0, False: 1.24k]
  ------------------
  943|      0|            case WORK_MORE_B:
  ------------------
  |  Branch (943:13): [True: 0, False: 1.24k]
  ------------------
  944|      0|            case WORK_MORE_C:
  ------------------
  |  Branch (944:13): [True: 0, False: 1.24k]
  ------------------
  945|      0|                return SUB_STATE_ERROR;
  946|       |
  947|  1.24k|            case WORK_FINISHED_CONTINUE:
  ------------------
  |  Branch (947:13): [True: 1.24k, False: 0]
  ------------------
  948|  1.24k|                st->write_state = WRITE_STATE_TRANSITION;
  949|  1.24k|                break;
  950|       |
  951|      0|            case WORK_FINISHED_SWAP:
  ------------------
  |  Branch (951:13): [True: 0, False: 1.24k]
  ------------------
  952|      0|                return SUB_STATE_FINISHED;
  953|       |
  954|      0|            case WORK_FINISHED_STOP:
  ------------------
  |  Branch (954:13): [True: 0, False: 1.24k]
  ------------------
  955|      0|                return SUB_STATE_END_HANDSHAKE;
  956|  1.24k|            }
  957|  1.24k|            break;
  958|       |
  959|  1.24k|        default:
  ------------------
  |  Branch (959:9): [True: 0, False: 3.85k]
  ------------------
  960|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  961|      0|            return SUB_STATE_ERROR;
  962|  3.85k|        }
  963|  3.85k|    }
  964|  1.30k|}
statem.c:statem_do_write:
  750|  1.24k|{
  751|  1.24k|    OSSL_STATEM *st = &s->statem;
  752|       |
  753|  1.24k|    if (st->hand_state == TLS_ST_CW_CHANGE
  ------------------
  |  Branch (753:9): [True: 0, False: 1.24k]
  ------------------
  754|  1.24k|        || st->hand_state == TLS_ST_SW_CHANGE) {
  ------------------
  |  Branch (754:12): [True: 0, False: 1.24k]
  ------------------
  755|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  756|      0|            return dtls1_do_write(s, SSL3_RT_CHANGE_CIPHER_SPEC);
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  757|      0|        else
  758|      0|            return ssl3_do_write(s, SSL3_RT_CHANGE_CIPHER_SPEC);
  ------------------
  |  |  219|      0|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  759|  1.24k|    } else {
  760|  1.24k|        return ssl_do_write(s);
  ------------------
  |  | 2181|  1.24k|#define ssl_do_write(s) SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->do_write(s)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  ------------------
  761|  1.24k|    }
  762|  1.24k|}
statem.c:init_read_state_machine:
  538|  1.24k|{
  539|  1.24k|    OSSL_STATEM *st = &s->statem;
  540|       |
  541|  1.24k|    st->read_state = READ_STATE_HEADER;
  542|  1.24k|}

ossl_statem_client_read_transition:
  232|    113|{
  233|    113|    OSSL_STATEM *st = &s->statem;
  234|    113|    int ske_expected;
  235|       |
  236|       |    /*
  237|       |     * Note that after writing the first ClientHello we don't know what version
  238|       |     * we are going to negotiate yet, so we don't take this branch until later.
  239|       |     */
  240|    113|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|    113|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|    226|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|    113|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|    113|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 113, False: 0]
  |  |  ------------------
  |  |  266|    113|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    113|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    226|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 113, False: 0]
  |  |  ------------------
  |  |  267|    113|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|    113|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|    113|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 113]
  |  |  ------------------
  ------------------
  241|      0|        if (!ossl_statem_client13_read_transition(s, mt))
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|      0|            goto err;
  243|      0|        return 1;
  244|      0|    }
  245|       |
  246|    113|    switch (st->hand_state) {
  247|      0|    default:
  ------------------
  |  Branch (247:5): [True: 0, False: 113]
  ------------------
  248|      0|        break;
  249|       |
  250|    113|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (250:5): [True: 113, False: 0]
  ------------------
  251|    113|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|    113|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (251:13): [True: 105, False: 8]
  ------------------
  252|    105|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  253|    105|            return 1;
  254|    105|        }
  255|       |
  256|      8|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|      8|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      8|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      8|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 8]
  |  |  ------------------
  ------------------
  257|      0|            if (mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (257:17): [True: 0, False: 0]
  ------------------
  258|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  259|      0|                return 1;
  260|      0|            }
  261|      0|        }
  262|      8|        break;
  263|       |
  264|      8|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (264:5): [True: 0, False: 113]
  ------------------
  265|       |        /*
  266|       |         * We've not actually selected TLSv1.3 yet, but we have sent early
  267|       |         * data. The only thing allowed now is a ServerHello or a
  268|       |         * HelloRetryRequest.
  269|       |         */
  270|      0|        if (mt == SSL3_MT_SERVER_HELLO) {
  ------------------
  |  |  314|      0|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  ------------------
  271|      0|            st->hand_state = TLS_ST_CR_SRVR_HELLO;
  272|      0|            return 1;
  273|      0|        }
  274|      0|        break;
  275|       |
  276|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (276:5): [True: 0, False: 113]
  ------------------
  277|      0|        if (s->hit) {
  ------------------
  |  Branch (277:13): [True: 0, False: 0]
  ------------------
  278|      0|            if (s->ext.ticket_expected) {
  ------------------
  |  Branch (278:17): [True: 0, False: 0]
  ------------------
  279|      0|                if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (279:21): [True: 0, False: 0]
  ------------------
  280|      0|                    st->hand_state = TLS_ST_CR_SESSION_TICKET;
  281|      0|                    return 1;
  282|      0|                }
  283|      0|            } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (283:24): [True: 0, False: 0]
  ------------------
  284|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  285|      0|                return 1;
  286|      0|            }
  287|      0|        } else {
  288|      0|            if (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  289|      0|                && mt == DTLS1_MT_HELLO_VERIFY_REQUEST) {
  ------------------
  |  |  334|      0|#define DTLS1_MT_HELLO_VERIFY_REQUEST 3
  ------------------
  |  Branch (289:20): [True: 0, False: 0]
  ------------------
  290|      0|                st->hand_state = DTLS_ST_CR_HELLO_VERIFY_REQUEST;
  291|      0|                return 1;
  292|      0|            } else if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (292:24): [True: 0, False: 0]
  ------------------
  293|      0|                && s->ext.session_secret_cb != NULL
  ------------------
  |  Branch (293:20): [True: 0, False: 0]
  ------------------
  294|      0|                && s->session->ext.tick != NULL
  ------------------
  |  Branch (294:20): [True: 0, False: 0]
  ------------------
  295|      0|                && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (295:20): [True: 0, False: 0]
  ------------------
  296|       |                /*
  297|       |                 * Normally, we can tell if the server is resuming the session
  298|       |                 * from the session ID. EAP-FAST (RFC 4851), however, relies on
  299|       |                 * the next server message after the ServerHello to determine if
  300|       |                 * the server is resuming.
  301|       |                 */
  302|      0|                s->hit = 1;
  303|      0|                st->hand_state = TLS_ST_CR_CHANGE;
  304|      0|                return 1;
  305|      0|            } else if (!(s->s3.tmp.new_cipher->algorithm_auth
  ------------------
  |  Branch (305:24): [True: 0, False: 0]
  ------------------
  306|      0|                           & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  112|      0|#define SSL_aNULL 0x00000004U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  120|      0|#define SSL_aSRP 0x00000040U
  ------------------
                                         & (SSL_aNULL | SSL_aSRP | SSL_aPSK))) {
  ------------------
  |  |  116|      0|#define SSL_aPSK 0x00000010U
  ------------------
  307|      0|                if (mt == SSL3_MT_CERTIFICATE) {
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  |  Branch (307:21): [True: 0, False: 0]
  ------------------
  308|      0|                    st->hand_state = TLS_ST_CR_CERT;
  309|      0|                    return 1;
  310|      0|                }
  311|      0|            } else {
  312|      0|                ske_expected = key_exchange_expected(s);
  313|       |                /* SKE is optional for some PSK ciphersuites */
  314|      0|                if (ske_expected
  ------------------
  |  Branch (314:21): [True: 0, False: 0]
  ------------------
  315|      0|                    || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK)
  ------------------
  |  |  101|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   87|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   93|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   94|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   95|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
  |  Branch (315:25): [True: 0, False: 0]
  ------------------
  316|      0|                        && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (316:28): [True: 0, False: 0]
  ------------------
  317|      0|                    if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (317:25): [True: 0, False: 0]
  ------------------
  318|      0|                        st->hand_state = TLS_ST_CR_KEY_EXCH;
  319|      0|                        return 1;
  320|      0|                    }
  321|      0|                } else if (mt == SSL3_MT_CERTIFICATE_REQUEST
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (321:28): [True: 0, False: 0]
  ------------------
  322|      0|                    && cert_req_allowed(s)) {
  ------------------
  |  Branch (322:24): [True: 0, False: 0]
  ------------------
  323|      0|                    st->hand_state = TLS_ST_CR_CERT_REQ;
  324|      0|                    return 1;
  325|      0|                } else if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (325:28): [True: 0, False: 0]
  ------------------
  326|      0|                    st->hand_state = TLS_ST_CR_SRVR_DONE;
  327|      0|                    return 1;
  328|      0|                }
  329|      0|            }
  330|      0|        }
  331|      0|        break;
  332|       |
  333|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (333:5): [True: 0, False: 113]
  ------------------
  334|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (334:5): [True: 0, False: 113]
  ------------------
  335|       |        /*
  336|       |         * The CertificateStatus message is optional even if
  337|       |         * |ext.status_expected| is set
  338|       |         */
  339|      0|        if (s->ext.status_expected && mt == SSL3_MT_CERTIFICATE_STATUS) {
  ------------------
  |  |  326|      0|#define SSL3_MT_CERTIFICATE_STATUS 22
  ------------------
  |  Branch (339:13): [True: 0, False: 0]
  |  Branch (339:39): [True: 0, False: 0]
  ------------------
  340|      0|            st->hand_state = TLS_ST_CR_CERT_STATUS;
  341|      0|            return 1;
  342|      0|        }
  343|       |        /* Fall through */
  344|       |
  345|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (345:5): [True: 0, False: 113]
  ------------------
  346|      0|        ske_expected = key_exchange_expected(s);
  347|       |        /* SKE is optional for some PSK ciphersuites */
  348|      0|        if (ske_expected || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  101|      0|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   87|      0|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   93|      0|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   94|      0|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   95|      0|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
                      if (ske_expected || ((s->s3.tmp.new_cipher->algorithm_mkey & SSL_PSK) && mt == SSL3_MT_SERVER_KEY_EXCHANGE)) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (348:13): [True: 0, False: 0]
  |  Branch (348:30): [True: 0, False: 0]
  |  Branch (348:82): [True: 0, False: 0]
  ------------------
  349|      0|            if (mt == SSL3_MT_SERVER_KEY_EXCHANGE) {
  ------------------
  |  |  319|      0|#define SSL3_MT_SERVER_KEY_EXCHANGE 12
  ------------------
  |  Branch (349:17): [True: 0, False: 0]
  ------------------
  350|      0|                st->hand_state = TLS_ST_CR_KEY_EXCH;
  351|      0|                return 1;
  352|      0|            }
  353|      0|            goto err;
  354|      0|        }
  355|       |        /* Fall through */
  356|       |
  357|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (357:5): [True: 0, False: 113]
  ------------------
  358|      0|        if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
  ------------------
  |  |  320|      0|#define SSL3_MT_CERTIFICATE_REQUEST 13
  ------------------
  |  Branch (358:13): [True: 0, False: 0]
  ------------------
  359|      0|            if (cert_req_allowed(s)) {
  ------------------
  |  Branch (359:17): [True: 0, False: 0]
  ------------------
  360|      0|                st->hand_state = TLS_ST_CR_CERT_REQ;
  361|      0|                return 1;
  362|      0|            }
  363|      0|            goto err;
  364|      0|        }
  365|       |        /* Fall through */
  366|       |
  367|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (367:5): [True: 0, False: 113]
  ------------------
  368|      0|        if (mt == SSL3_MT_SERVER_DONE) {
  ------------------
  |  |  321|      0|#define SSL3_MT_SERVER_DONE 14
  ------------------
  |  Branch (368:13): [True: 0, False: 0]
  ------------------
  369|      0|            st->hand_state = TLS_ST_CR_SRVR_DONE;
  370|      0|            return 1;
  371|      0|        }
  372|      0|        break;
  373|       |
  374|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (374:5): [True: 0, False: 113]
  ------------------
  375|      0|        if (s->ext.ticket_expected) {
  ------------------
  |  Branch (375:13): [True: 0, False: 0]
  ------------------
  376|      0|            if (mt == SSL3_MT_NEWSESSION_TICKET) {
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (376:17): [True: 0, False: 0]
  ------------------
  377|      0|                st->hand_state = TLS_ST_CR_SESSION_TICKET;
  378|      0|                return 1;
  379|      0|            }
  380|      0|        } else if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (380:20): [True: 0, False: 0]
  ------------------
  381|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  382|      0|            return 1;
  383|      0|        }
  384|      0|        break;
  385|       |
  386|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (386:5): [True: 0, False: 113]
  ------------------
  387|      0|        if (mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (387:13): [True: 0, False: 0]
  ------------------
  388|      0|            st->hand_state = TLS_ST_CR_CHANGE;
  389|      0|            return 1;
  390|      0|        }
  391|      0|        break;
  392|       |
  393|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (393:5): [True: 0, False: 113]
  ------------------
  394|      0|        if (mt == SSL3_MT_FINISHED) {
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (394:13): [True: 0, False: 0]
  ------------------
  395|      0|            st->hand_state = TLS_ST_CR_FINISHED;
  396|      0|            return 1;
  397|      0|        }
  398|      0|        break;
  399|       |
  400|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (400:5): [True: 0, False: 113]
  ------------------
  401|      0|        if (mt == SSL3_MT_HELLO_REQUEST) {
  ------------------
  |  |  312|      0|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (401:13): [True: 0, False: 0]
  ------------------
  402|      0|            st->hand_state = TLS_ST_CR_HELLO_REQ;
  403|      0|            return 1;
  404|      0|        }
  405|      0|        break;
  406|    113|    }
  407|       |
  408|      8|err:
  409|       |    /* No valid transition found */
  410|      8|    if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  258|     16|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      8|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      8|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 8]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_DTLS(s) && mt == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (410:38): [True: 0, False: 0]
  ------------------
  411|      0|        BIO *rbio;
  412|       |
  413|       |        /*
  414|       |         * CCS messages don't have a message sequence number so this is probably
  415|       |         * because of an out-of-order CCS. We'll just drop it.
  416|       |         */
  417|      0|        s->init_num = 0;
  418|      0|        s->rwstate = SSL_READING;
  ------------------
  |  |  934|      0|#define SSL_READING 3
  ------------------
  419|      0|        rbio = SSL_get_rbio(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  420|      0|        BIO_clear_retry_flags(rbio);
  ------------------
  |  |  263|      0|    BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  225|      0|#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  223|      0|#define BIO_FLAGS_WRITE 0x02
  |  |  |  |  ------------------
  |  |  |  |               #define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  224|      0|#define BIO_FLAGS_IO_SPECIAL 0x04
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                   BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  421|      0|        BIO_set_retry_read(rbio);
  ------------------
  |  |  257|      0|    BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  222|      0|#define BIO_FLAGS_READ 0x01
  |  |  ------------------
  |  |                   BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
  |  |  ------------------
  |  |  |  |  226|      0|#define BIO_FLAGS_SHOULD_RETRY 0x08
  |  |  ------------------
  ------------------
  422|      0|        return 0;
  423|      0|    }
  424|      8|    SSLfatal(s, SSL3_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  148|      8|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      8|    (ERR_new(),                                                  \
  |  |  |  |  151|      8|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      8|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      8|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  425|      8|    return 0;
  426|      8|}
ossl_statem_client_write_transition:
  543|  2.54k|{
  544|  2.54k|    OSSL_STATEM *st = &s->statem;
  545|       |
  546|       |    /*
  547|       |     * Note that immediately before/after a ClientHello we don't know what
  548|       |     * version we are going to negotiate yet, so we don't take this branch until
  549|       |     * later
  550|       |     */
  551|  2.54k|    if (SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  265|  2.54k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  5.09k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  2.54k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  2.54k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 2.54k, False: 0]
  |  |  ------------------
  |  |  266|  2.54k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.54k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  5.09k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 2.54k, False: 0]
  |  |  ------------------
  |  |  267|  2.54k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  2.54k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  2.54k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 2.54k]
  |  |  ------------------
  ------------------
  552|      0|        return ossl_statem_client13_write_transition(s);
  553|       |
  554|  2.54k|    switch (st->hand_state) {
  555|      0|    default:
  ------------------
  |  Branch (555:5): [True: 0, False: 2.54k]
  ------------------
  556|       |        /* Shouldn't happen */
  557|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  558|      0|        return WRITE_TRAN_ERROR;
  559|       |
  560|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (560:5): [True: 0, False: 2.54k]
  ------------------
  561|      0|        if (!s->renegotiate) {
  ------------------
  |  Branch (561:13): [True: 0, False: 0]
  ------------------
  562|       |            /*
  563|       |             * We haven't requested a renegotiation ourselves so we must have
  564|       |             * received a message from the server. Better read it.
  565|       |             */
  566|      0|            return WRITE_TRAN_FINISHED;
  567|      0|        }
  568|       |        /* Renegotiation */
  569|       |        /* fall thru */
  570|  1.30k|    case TLS_ST_BEFORE:
  ------------------
  |  Branch (570:5): [True: 1.30k, False: 1.24k]
  ------------------
  571|  1.30k|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  572|  1.30k|        return WRITE_TRAN_CONTINUE;
  573|       |
  574|  1.24k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (574:5): [True: 1.24k, False: 1.30k]
  ------------------
  575|  1.24k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (575:13): [True: 0, False: 1.24k]
  ------------------
  576|      0|            && !SSL_IS_QUIC_HANDSHAKE(s)) {
  ------------------
  |  |  303|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   29|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  ------------------
  |  Branch (576:16): [True: 0, False: 0]
  ------------------
  577|       |            /*
  578|       |             * We are assuming this is a TLSv1.3 connection, although we haven't
  579|       |             * actually selected a version yet.
  580|       |             */
  581|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0)
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (581:17): [True: 0, False: 0]
  ------------------
  582|      0|                st->hand_state = TLS_ST_CW_CHANGE;
  583|      0|            else
  584|      0|                st->hand_state = TLS_ST_EARLY_DATA;
  585|      0|            return WRITE_TRAN_CONTINUE;
  586|      0|        }
  587|       |        /*
  588|       |         * No transition at the end of writing because we don't know what
  589|       |         * we will be sent
  590|       |         */
  591|  1.24k|        s->ts_msg_write = ossl_time_now();
  592|  1.24k|        return WRITE_TRAN_FINISHED;
  593|       |
  594|      0|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (594:5): [True: 0, False: 2.54k]
  ------------------
  595|       |        /*
  596|       |         * We only get here in TLSv1.3. We just received an HRR, so issue a
  597|       |         * CCS unless middlebox compat mode is off, or we already issued one
  598|       |         * because we did early data.
  599|       |         */
  600|      0|        if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (600:13): [True: 0, False: 0]
  ------------------
  601|      0|            && s->early_data_state != SSL_EARLY_DATA_FINISHED_WRITING)
  ------------------
  |  Branch (601:16): [True: 0, False: 0]
  ------------------
  602|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  603|      0|        else
  604|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  605|      0|        return WRITE_TRAN_CONTINUE;
  606|       |
  607|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (607:5): [True: 0, False: 2.54k]
  ------------------
  608|      0|        s->ts_msg_write = ossl_time_now();
  609|      0|        return WRITE_TRAN_FINISHED;
  610|       |
  611|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (611:5): [True: 0, False: 2.54k]
  ------------------
  612|      0|        st->hand_state = TLS_ST_CW_CLNT_HELLO;
  613|      0|        return WRITE_TRAN_CONTINUE;
  614|       |
  615|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (615:5): [True: 0, False: 2.54k]
  ------------------
  616|      0|        s->ts_msg_read = ossl_time_now();
  617|      0|        if (s->s3.tmp.cert_req)
  ------------------
  |  Branch (617:13): [True: 0, False: 0]
  ------------------
  618|      0|            st->hand_state = TLS_ST_CW_CERT;
  619|      0|        else
  620|      0|            st->hand_state = TLS_ST_CW_KEY_EXCH;
  621|      0|        return WRITE_TRAN_CONTINUE;
  622|       |
  623|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (623:5): [True: 0, False: 2.54k]
  ------------------
  624|      0|        st->hand_state = TLS_ST_CW_KEY_EXCH;
  625|      0|        return WRITE_TRAN_CONTINUE;
  626|       |
  627|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (627:5): [True: 0, False: 2.54k]
  ------------------
  628|       |        /*
  629|       |         * For TLS, cert_req is set to 2, so a cert chain of nothing is
  630|       |         * sent, but no verify packet is sent
  631|       |         */
  632|       |        /*
  633|       |         * XXX: For now, we do not support client authentication in ECDH
  634|       |         * cipher suites with ECDH (rather than ECDSA) certificates. We
  635|       |         * need to skip the certificate verify message when client's
  636|       |         * ECDH public key is sent inside the client certificate.
  637|       |         */
  638|      0|        if (s->s3.tmp.cert_req == 1) {
  ------------------
  |  Branch (638:13): [True: 0, False: 0]
  ------------------
  639|      0|            st->hand_state = TLS_ST_CW_CERT_VRFY;
  640|      0|        } else {
  641|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  642|      0|        }
  643|      0|        if (s->s3.flags & TLS1_FLAGS_SKIP_CERT_VERIFY) {
  ------------------
  |  |  293|      0|#define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
  ------------------
  |  Branch (643:13): [True: 0, False: 0]
  ------------------
  644|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  645|      0|        }
  646|      0|        return WRITE_TRAN_CONTINUE;
  647|       |
  648|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (648:5): [True: 0, False: 2.54k]
  ------------------
  649|      0|        st->hand_state = TLS_ST_CW_CHANGE;
  650|      0|        return WRITE_TRAN_CONTINUE;
  651|       |
  652|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (652:5): [True: 0, False: 2.54k]
  ------------------
  653|      0|        if (s->hello_retry_request == SSL_HRR_PENDING) {
  ------------------
  |  Branch (653:13): [True: 0, False: 0]
  ------------------
  654|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  655|      0|        } else if (s->early_data_state == SSL_EARLY_DATA_CONNECTING) {
  ------------------
  |  Branch (655:20): [True: 0, False: 0]
  ------------------
  656|      0|            st->hand_state = TLS_ST_EARLY_DATA;
  657|      0|        } else {
  658|       |#if defined(OPENSSL_NO_NEXTPROTONEG)
  659|       |            st->hand_state = TLS_ST_CW_FINISHED;
  660|       |#else
  661|      0|            if (!SSL_CONNECTION_IS_DTLS(s) && s->s3.npn_seen)
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (661:17): [True: 0, False: 0]
  |  Branch (661:47): [True: 0, False: 0]
  ------------------
  662|      0|                st->hand_state = TLS_ST_CW_NEXT_PROTO;
  663|      0|            else
  664|      0|                st->hand_state = TLS_ST_CW_FINISHED;
  665|      0|#endif
  666|      0|        }
  667|      0|        return WRITE_TRAN_CONTINUE;
  668|       |
  669|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
  670|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (670:5): [True: 0, False: 2.54k]
  ------------------
  671|      0|        st->hand_state = TLS_ST_CW_FINISHED;
  672|      0|        return WRITE_TRAN_CONTINUE;
  673|      0|#endif
  674|       |
  675|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (675:5): [True: 0, False: 2.54k]
  ------------------
  676|      0|        if (s->hit) {
  ------------------
  |  Branch (676:13): [True: 0, False: 0]
  ------------------
  677|      0|            st->hand_state = TLS_ST_OK;
  678|      0|            return WRITE_TRAN_CONTINUE;
  679|      0|        } else {
  680|      0|            return WRITE_TRAN_FINISHED;
  681|      0|        }
  682|       |
  683|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (683:5): [True: 0, False: 2.54k]
  ------------------
  684|      0|        if (s->hit) {
  ------------------
  |  Branch (684:13): [True: 0, False: 0]
  ------------------
  685|      0|            st->hand_state = TLS_ST_CW_CHANGE;
  686|      0|            return WRITE_TRAN_CONTINUE;
  687|      0|        } else {
  688|      0|            st->hand_state = TLS_ST_OK;
  689|      0|            return WRITE_TRAN_CONTINUE;
  690|      0|        }
  691|       |
  692|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (692:5): [True: 0, False: 2.54k]
  ------------------
  693|       |        /*
  694|       |         * If we can renegotiate now then do so, otherwise wait for a more
  695|       |         * convenient time.
  696|       |         */
  697|      0|        if (ssl3_renegotiate_check(SSL_CONNECTION_GET_SSL(s), 1)) {
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (697:13): [True: 0, False: 0]
  ------------------
  698|      0|            if (!tls_setup_handshake(s)) {
  ------------------
  |  Branch (698:17): [True: 0, False: 0]
  ------------------
  699|       |                /* SSLfatal() already called */
  700|      0|                return WRITE_TRAN_ERROR;
  701|      0|            }
  702|      0|            st->hand_state = TLS_ST_CW_CLNT_HELLO;
  703|      0|            return WRITE_TRAN_CONTINUE;
  704|      0|        }
  705|      0|        st->hand_state = TLS_ST_OK;
  706|      0|        return WRITE_TRAN_CONTINUE;
  707|  2.54k|    }
  708|  2.54k|}
ossl_statem_client_pre_work:
  715|  1.30k|{
  716|  1.30k|    OSSL_STATEM *st = &s->statem;
  717|       |
  718|  1.30k|    switch (st->hand_state) {
  719|      0|    default:
  ------------------
  |  Branch (719:5): [True: 0, False: 1.30k]
  ------------------
  720|       |        /* No pre work to be done */
  721|      0|        break;
  722|       |
  723|  1.30k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (723:5): [True: 1.30k, False: 0]
  ------------------
  724|  1.30k|        s->shutdown = 0;
  725|  1.30k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.30k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.30k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.30k]
  |  |  ------------------
  ------------------
  726|       |            /* every DTLS ClientHello resets Finished MAC */
  727|      0|            if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (727:17): [True: 0, False: 0]
  ------------------
  728|       |                /* SSLfatal() already called */
  729|      0|                return WORK_ERROR;
  730|      0|            }
  731|  1.30k|        } else if (s->ext.early_data == SSL_EARLY_DATA_REJECTED) {
  ------------------
  |  | 2036|  1.30k|#define SSL_EARLY_DATA_REJECTED 1
  ------------------
  |  Branch (731:20): [True: 0, False: 1.30k]
  ------------------
  732|       |            /*
  733|       |             * This must be a second ClientHello after an HRR following an
  734|       |             * earlier rejected attempt to send early data. Since we were
  735|       |             * previously encrypting the early data we now need to reset the
  736|       |             * write record layer in order to write in plaintext again.
  737|       |             */
  738|      0|            if (!ssl_set_new_record_layer(s,
  ------------------
  |  Branch (738:17): [True: 0, False: 0]
  ------------------
  739|      0|                    TLS_ANY_VERSION,
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  740|      0|                    OSSL_RECORD_DIRECTION_WRITE,
  ------------------
  |  |   43|      0|#define OSSL_RECORD_DIRECTION_WRITE 1
  ------------------
  741|      0|                    OSSL_RECORD_PROTECTION_LEVEL_NONE,
  ------------------
  |  | 2932|      0|#define OSSL_RECORD_PROTECTION_LEVEL_NONE 0
  ------------------
  742|      0|                    NULL, 0, NULL, 0, NULL, 0, NULL, 0,
  743|      0|                    NULL, 0, NID_undef, NULL, NULL,
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  744|      0|                    NULL)) {
  745|       |                /* SSLfatal already called */
  746|      0|                return WORK_ERROR;
  747|      0|            }
  748|      0|        }
  749|  1.30k|        break;
  750|       |
  751|  1.30k|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (751:5): [True: 0, False: 1.30k]
  ------------------
  752|      0|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  753|      0|            if (s->hit) {
  ------------------
  |  Branch (753:17): [True: 0, False: 0]
  ------------------
  754|       |                /*
  755|       |                 * We're into the last flight so we don't retransmit these
  756|       |                 * messages unless we need to.
  757|       |                 */
  758|      0|                st->use_timer = 0;
  759|      0|            }
  760|       |#ifndef OPENSSL_NO_SCTP
  761|       |            if (BIO_dgram_is_sctp(SSL_get_wbio(SSL_CONNECTION_GET_SSL(s)))) {
  762|       |                /* Calls SSLfatal() as required */
  763|       |                return dtls_wait_for_dry(s);
  764|       |            }
  765|       |#endif
  766|      0|        }
  767|      0|        break;
  768|       |
  769|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (769:5): [True: 0, False: 1.30k]
  ------------------
  770|       |        /*
  771|       |         * If we've been called by SSL_do_handshake()/SSL_write(), or we did not
  772|       |         * attempt to write early data before calling SSL_read() then we press
  773|       |         * on with the handshake. Otherwise we pause here.
  774|       |         */
  775|      0|        if (s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING
  ------------------
  |  Branch (775:13): [True: 0, False: 0]
  ------------------
  776|      0|            || s->early_data_state == SSL_EARLY_DATA_NONE)
  ------------------
  |  Branch (776:16): [True: 0, False: 0]
  ------------------
  777|      0|            return WORK_FINISHED_CONTINUE;
  778|       |        /* Fall through */
  779|       |
  780|      0|    case TLS_ST_EARLY_DATA:
  ------------------
  |  Branch (780:5): [True: 0, False: 1.30k]
  ------------------
  781|      0|        return tls_finish_handshake(s, wst, 0, 1);
  782|       |
  783|      0|    case TLS_ST_OK:
  ------------------
  |  Branch (783:5): [True: 0, False: 1.30k]
  ------------------
  784|       |        /* Calls SSLfatal() as required */
  785|      0|        return tls_finish_handshake(s, wst, 1, 1);
  786|  1.30k|    }
  787|       |
  788|  1.30k|    return WORK_FINISHED_CONTINUE;
  789|  1.30k|}
ossl_statem_client_post_work:
  796|  1.24k|{
  797|  1.24k|    OSSL_STATEM *st = &s->statem;
  798|  1.24k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  799|       |
  800|  1.24k|    s->init_num = 0;
  801|       |
  802|  1.24k|    switch (st->hand_state) {
  803|      0|    default:
  ------------------
  |  Branch (803:5): [True: 0, False: 1.24k]
  ------------------
  804|       |        /* No post work to be done */
  805|      0|        break;
  806|       |
  807|  1.24k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (807:5): [True: 1.24k, False: 0]
  ------------------
  808|  1.24k|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (808:13): [True: 0, False: 1.24k]
  ------------------
  809|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (809:16): [True: 0, False: 0]
  ------------------
  810|       |            /*
  811|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  812|       |             * cipher state function associated with the SSL_METHOD. Instead
  813|       |             * we call tls13_change_cipher_state() directly.
  814|       |             */
  815|      0|            if ((s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0) {
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (815:17): [True: 0, False: 0]
  ------------------
  816|      0|                if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (816:21): [True: 0, False: 0]
  ------------------
  817|      0|                        SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                                      SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  818|       |                    /* SSLfatal() already called */
  819|      0|                    return WORK_ERROR;
  820|      0|                }
  821|      0|            }
  822|       |            /* else we're in compat mode so we delay flushing until after CCS */
  823|  1.24k|        } else if (!statem_flush(s)) {
  ------------------
  |  Branch (823:20): [True: 0, False: 1.24k]
  ------------------
  824|      0|            return WORK_MORE_A;
  825|      0|        }
  826|       |
  827|  1.24k|        if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.24k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.24k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.24k]
  |  |  ------------------
  ------------------
  828|       |            /* Treat the next message as the first packet */
  829|      0|            s->first_packet = 1;
  830|      0|        }
  831|  1.24k|        break;
  832|       |
  833|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (833:5): [True: 0, False: 1.24k]
  ------------------
  834|      0|        if (tls_client_key_exchange_post_work(s) == 0) {
  ------------------
  |  Branch (834:13): [True: 0, False: 0]
  ------------------
  835|       |            /* SSLfatal() already called */
  836|      0|            return WORK_ERROR;
  837|      0|        }
  838|      0|        break;
  839|       |
  840|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (840:5): [True: 0, False: 1.24k]
  ------------------
  841|      0|        if (SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  842|      0|            || s->hello_retry_request == SSL_HRR_PENDING)
  ------------------
  |  Branch (842:16): [True: 0, False: 0]
  ------------------
  843|      0|            break;
  844|      0|        if (s->early_data_state == SSL_EARLY_DATA_CONNECTING
  ------------------
  |  Branch (844:13): [True: 0, False: 0]
  ------------------
  845|      0|            && s->max_early_data > 0) {
  ------------------
  |  Branch (845:16): [True: 0, False: 0]
  ------------------
  846|       |            /*
  847|       |             * We haven't selected TLSv1.3 yet so we don't call the change
  848|       |             * cipher state function associated with the SSL_METHOD. Instead
  849|       |             * we call tls13_change_cipher_state() directly.
  850|       |             */
  851|      0|            if (!tls13_change_cipher_state(s,
  ------------------
  |  Branch (851:17): [True: 0, False: 0]
  ------------------
  852|      0|                    SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE))
  ------------------
  |  |  346|      0|#define SSL3_CC_EARLY 0x040
  ------------------
                                  SSL3_CC_EARLY | SSL3_CHANGE_CIPHER_CLIENT_WRITE))
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  853|      0|                return WORK_ERROR;
  854|      0|            break;
  855|      0|        }
  856|      0|        s->session->cipher = s->s3.tmp.new_cipher;
  857|       |#ifdef OPENSSL_NO_COMP
  858|       |        s->session->compress_meth = 0;
  859|       |#else
  860|      0|        if (s->s3.tmp.new_compression == NULL)
  ------------------
  |  Branch (860:13): [True: 0, False: 0]
  ------------------
  861|      0|            s->session->compress_meth = 0;
  862|      0|        else
  863|      0|            s->session->compress_meth = s->s3.tmp.new_compression->id;
  864|      0|#endif
  865|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)) {
  ------------------
  |  Branch (865:13): [True: 0, False: 0]
  ------------------
  866|       |            /* SSLfatal() already called */
  867|      0|            return WORK_ERROR;
  868|      0|        }
  869|       |
  870|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (870:13): [True: 0, False: 0]
  ------------------
  871|      0|                SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  872|       |            /* SSLfatal() already called */
  873|      0|            return WORK_ERROR;
  874|      0|        }
  875|       |
  876|       |#ifndef OPENSSL_NO_SCTP
  877|       |        if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
  878|       |            /*
  879|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  880|       |             * no SCTP used.
  881|       |             */
  882|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  883|       |                0, NULL);
  884|       |        }
  885|       |#endif
  886|      0|        break;
  887|       |
  888|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (888:5): [True: 0, False: 1.24k]
  ------------------
  889|       |#ifndef OPENSSL_NO_SCTP
  890|       |        if (wst == WORK_MORE_A && SSL_CONNECTION_IS_DTLS(s) && s->hit == 0) {
  891|       |            /*
  892|       |             * Change to new shared key of SCTP-Auth, will be ignored if
  893|       |             * no SCTP used.
  894|       |             */
  895|       |            BIO_ctrl(SSL_get_wbio(ssl), BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY,
  896|       |                0, NULL);
  897|       |        }
  898|       |#endif
  899|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (899:13): [True: 0, False: 0]
  ------------------
  900|      0|            return WORK_MORE_B;
  901|       |
  902|      0|        if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  903|      0|            if (!tls13_save_handshake_digest_for_pha(s)) {
  ------------------
  |  Branch (903:17): [True: 0, False: 0]
  ------------------
  904|       |                /* SSLfatal() already called */
  905|      0|                return WORK_ERROR;
  906|      0|            }
  907|      0|            if (s->post_handshake_auth != SSL_PHA_REQUESTED) {
  ------------------
  |  Branch (907:17): [True: 0, False: 0]
  ------------------
  908|      0|                if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (908:21): [True: 0, False: 0]
  ------------------
  909|      0|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  348|      0|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
  910|       |                    /* SSLfatal() already called */
  911|      0|                    return WORK_ERROR;
  912|      0|                }
  913|       |                /*
  914|       |                 * For QUIC we deferred setting up these keys until now so
  915|       |                 * that we can ensure write keys are always set up before read
  916|       |                 * keys.
  917|       |                 */
  918|      0|                if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  303|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   29|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (303:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  919|      0|                    && !ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (919:24): [True: 0, False: 0]
  ------------------
  920|      0|                        SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  348|      0|#define SSL3_CC_APPLICATION 0x100
  ------------------
                                      SSL3_CC_APPLICATION | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|      0|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
  921|       |                    /* SSLfatal() already called */
  922|      0|                    return WORK_ERROR;
  923|      0|                }
  924|      0|            }
  925|      0|        }
  926|      0|        break;
  927|       |
  928|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (928:5): [True: 0, False: 1.24k]
  ------------------
  929|      0|        if (statem_flush(s) != 1)
  ------------------
  |  Branch (929:13): [True: 0, False: 0]
  ------------------
  930|      0|            return WORK_MORE_A;
  931|      0|        if (!tls13_update_key(s, 1)) {
  ------------------
  |  Branch (931:13): [True: 0, False: 0]
  ------------------
  932|       |            /* SSLfatal() already called */
  933|      0|            return WORK_ERROR;
  934|      0|        }
  935|      0|        break;
  936|  1.24k|    }
  937|       |
  938|  1.24k|    return WORK_FINISHED_CONTINUE;
  939|  1.24k|}
ossl_statem_client_construct_message:
  951|  1.30k|{
  952|  1.30k|    OSSL_STATEM *st = &s->statem;
  953|       |
  954|  1.30k|    switch (st->hand_state) {
  955|      0|    default:
  ------------------
  |  Branch (955:5): [True: 0, False: 1.30k]
  ------------------
  956|       |        /* Shouldn't happen */
  957|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_BAD_HANDSHAKE_STATE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  958|      0|        return 0;
  959|       |
  960|      0|    case TLS_ST_CW_CHANGE:
  ------------------
  |  Branch (960:5): [True: 0, False: 1.30k]
  ------------------
  961|      0|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  962|      0|            *confunc = dtls_construct_change_cipher_spec;
  963|      0|        else
  964|      0|            *confunc = tls_construct_change_cipher_spec;
  965|      0|        *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      0|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  966|      0|        break;
  967|       |
  968|  1.30k|    case TLS_ST_CW_CLNT_HELLO:
  ------------------
  |  Branch (968:5): [True: 1.30k, False: 0]
  ------------------
  969|  1.30k|        *confunc = tls_construct_client_hello;
  970|  1.30k|        *mt = SSL3_MT_CLIENT_HELLO;
  ------------------
  |  |  313|  1.30k|#define SSL3_MT_CLIENT_HELLO 1
  ------------------
  971|  1.30k|        break;
  972|       |
  973|      0|    case TLS_ST_CW_END_OF_EARLY_DATA:
  ------------------
  |  Branch (973:5): [True: 0, False: 1.30k]
  ------------------
  974|      0|        *confunc = tls_construct_end_of_early_data;
  975|      0|        *mt = SSL3_MT_END_OF_EARLY_DATA;
  ------------------
  |  |  316|      0|#define SSL3_MT_END_OF_EARLY_DATA 5
  ------------------
  976|      0|        break;
  977|       |
  978|      0|    case TLS_ST_PENDING_EARLY_DATA_END:
  ------------------
  |  Branch (978:5): [True: 0, False: 1.30k]
  ------------------
  979|      0|        *confunc = NULL;
  980|      0|        *mt = SSL3_MT_DUMMY;
  ------------------
  |  |   41|      0|#define SSL3_MT_DUMMY -1
  ------------------
  981|      0|        break;
  982|       |
  983|      0|    case TLS_ST_CW_CERT:
  ------------------
  |  Branch (983:5): [True: 0, False: 1.30k]
  ------------------
  984|      0|        *confunc = tls_construct_client_certificate;
  985|      0|        *mt = SSL3_MT_CERTIFICATE;
  ------------------
  |  |  318|      0|#define SSL3_MT_CERTIFICATE 11
  ------------------
  986|      0|        break;
  987|       |
  988|       |#ifndef OPENSSL_NO_COMP_ALG
  989|       |    case TLS_ST_CW_COMP_CERT:
  990|       |        *confunc = tls_construct_client_compressed_certificate;
  991|       |        *mt = SSL3_MT_COMPRESSED_CERTIFICATE;
  992|       |        break;
  993|       |#endif
  994|       |
  995|      0|    case TLS_ST_CW_KEY_EXCH:
  ------------------
  |  Branch (995:5): [True: 0, False: 1.30k]
  ------------------
  996|      0|        *confunc = tls_construct_client_key_exchange;
  997|      0|        *mt = SSL3_MT_CLIENT_KEY_EXCHANGE;
  ------------------
  |  |  323|      0|#define SSL3_MT_CLIENT_KEY_EXCHANGE 16
  ------------------
  998|      0|        break;
  999|       |
 1000|      0|    case TLS_ST_CW_CERT_VRFY:
  ------------------
  |  Branch (1000:5): [True: 0, False: 1.30k]
  ------------------
 1001|      0|        *confunc = tls_construct_cert_verify;
 1002|      0|        *mt = SSL3_MT_CERTIFICATE_VERIFY;
  ------------------
  |  |  322|      0|#define SSL3_MT_CERTIFICATE_VERIFY 15
  ------------------
 1003|      0|        break;
 1004|       |
 1005|      0|#if !defined(OPENSSL_NO_NEXTPROTONEG)
 1006|      0|    case TLS_ST_CW_NEXT_PROTO:
  ------------------
  |  Branch (1006:5): [True: 0, False: 1.30k]
  ------------------
 1007|      0|        *confunc = tls_construct_next_proto;
 1008|      0|        *mt = SSL3_MT_NEXT_PROTO;
  ------------------
  |  |  331|      0|#define SSL3_MT_NEXT_PROTO 67
  ------------------
 1009|      0|        break;
 1010|      0|#endif
 1011|      0|    case TLS_ST_CW_FINISHED:
  ------------------
  |  Branch (1011:5): [True: 0, False: 1.30k]
  ------------------
 1012|      0|        *confunc = tls_construct_finished;
 1013|      0|        *mt = SSL3_MT_FINISHED;
  ------------------
  |  |  324|      0|#define SSL3_MT_FINISHED 20
  ------------------
 1014|      0|        break;
 1015|       |
 1016|      0|    case TLS_ST_CW_KEY_UPDATE:
  ------------------
  |  Branch (1016:5): [True: 0, False: 1.30k]
  ------------------
 1017|      0|        *confunc = tls_construct_key_update;
 1018|      0|        *mt = SSL3_MT_KEY_UPDATE;
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
 1019|      0|        break;
 1020|  1.30k|    }
 1021|       |
 1022|  1.30k|    return 1;
 1023|  1.30k|}
ossl_statem_client_max_message_size:
 1030|    105|{
 1031|    105|    OSSL_STATEM *st = &s->statem;
 1032|       |
 1033|    105|    switch (st->hand_state) {
 1034|      0|    default:
  ------------------
  |  Branch (1034:5): [True: 0, False: 105]
  ------------------
 1035|       |        /* Shouldn't happen */
 1036|      0|        return 0;
 1037|       |
 1038|    105|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1038:5): [True: 105, False: 0]
  ------------------
 1039|    105|        return SERVER_HELLO_MAX_LENGTH;
  ------------------
  |  |   32|    105|#define SERVER_HELLO_MAX_LENGTH 65607
  ------------------
 1040|       |
 1041|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1041:5): [True: 0, False: 105]
  ------------------
 1042|      0|        return HELLO_VERIFY_REQUEST_MAX_LENGTH;
  ------------------
  |  |   20|      0|#define HELLO_VERIFY_REQUEST_MAX_LENGTH 258
  ------------------
 1043|       |
 1044|      0|    case TLS_ST_CR_COMP_CERT:
  ------------------
  |  Branch (1044:5): [True: 0, False: 105]
  ------------------
 1045|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1045:5): [True: 0, False: 105]
  ------------------
 1046|      0|        return s->max_cert_list;
 1047|       |
 1048|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1048:5): [True: 0, False: 105]
  ------------------
 1049|      0|        return CERTIFICATE_VERIFY_MAX_LENGTH;
  ------------------
  |  |   35|      0|#define CERTIFICATE_VERIFY_MAX_LENGTH 65539
  ------------------
 1050|       |
 1051|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1051:5): [True: 0, False: 105]
  ------------------
 1052|      0|        return SSL3_RT_MAX_PLAIN_LENGTH;
  ------------------
  |  |  177|      0|#define SSL3_RT_MAX_PLAIN_LENGTH 16384
  ------------------
 1053|       |
 1054|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1054:5): [True: 0, False: 105]
  ------------------
 1055|      0|        return SERVER_KEY_EXCH_MAX_LENGTH;
  ------------------
  |  |   26|      0|#define SERVER_KEY_EXCH_MAX_LENGTH 102400
  ------------------
 1056|       |
 1057|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1057:5): [True: 0, False: 105]
  ------------------
 1058|       |        /*
 1059|       |         * Set to s->max_cert_list for compatibility with previous releases. In
 1060|       |         * practice these messages can get quite long if servers are configured
 1061|       |         * to provide a long list of acceptable CAs
 1062|       |         */
 1063|      0|        return s->max_cert_list;
 1064|       |
 1065|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1065:5): [True: 0, False: 105]
  ------------------
 1066|      0|        return SERVER_HELLO_DONE_MAX_LENGTH;
  ------------------
  |  |   27|      0|#define SERVER_HELLO_DONE_MAX_LENGTH 0
  ------------------
 1067|       |
 1068|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1068:5): [True: 0, False: 105]
  ------------------
 1069|      0|        if (s->version == DTLS1_BAD_VER)
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (1069:13): [True: 0, False: 0]
  ------------------
 1070|      0|            return 3;
 1071|      0|        return CCS_MAX_LENGTH;
  ------------------
  |  |   29|      0|#define CCS_MAX_LENGTH 1
  ------------------
 1072|       |
 1073|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1073:5): [True: 0, False: 105]
  ------------------
 1074|      0|        return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      return (SSL_CONNECTION_IS_TLS13(s)) ? SESSION_TICKET_MAX_LENGTH_TLS13
  ------------------
  |  |   24|      0|#define SESSION_TICKET_MAX_LENGTH_TLS13 131338
  ------------------
 1075|      0|                                            : SESSION_TICKET_MAX_LENGTH_TLS12;
  ------------------
  |  |   25|      0|#define SESSION_TICKET_MAX_LENGTH_TLS12 65541
  ------------------
 1076|       |
 1077|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1077:5): [True: 0, False: 105]
  ------------------
 1078|      0|        return FINISHED_MAX_LENGTH;
  ------------------
  |  |   38|      0|#define FINISHED_MAX_LENGTH 64
  ------------------
 1079|       |
 1080|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1080:5): [True: 0, False: 105]
  ------------------
 1081|      0|        return ENCRYPTED_EXTENSIONS_MAX_LENGTH;
  ------------------
  |  |   23|      0|#define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000
  ------------------
 1082|       |
 1083|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1083:5): [True: 0, False: 105]
  ------------------
 1084|      0|        return KEY_UPDATE_MAX_LENGTH;
  ------------------
  |  |   28|      0|#define KEY_UPDATE_MAX_LENGTH 1
  ------------------
 1085|    105|    }
 1086|    105|}
ossl_statem_client_process_message:
 1093|     50|{
 1094|     50|    OSSL_STATEM *st = &s->statem;
 1095|       |
 1096|     50|    switch (st->hand_state) {
 1097|      0|    default:
  ------------------
  |  Branch (1097:5): [True: 0, False: 50]
  ------------------
 1098|       |        /* Shouldn't happen */
 1099|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1100|      0|        return MSG_PROCESS_ERROR;
 1101|       |
 1102|     50|    case TLS_ST_CR_SRVR_HELLO:
  ------------------
  |  Branch (1102:5): [True: 50, False: 0]
  ------------------
 1103|     50|        return tls_process_server_hello(s, pkt);
 1104|       |
 1105|      0|    case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
  ------------------
  |  Branch (1105:5): [True: 0, False: 50]
  ------------------
 1106|      0|        return dtls_process_hello_verify(s, pkt);
 1107|       |
 1108|      0|    case TLS_ST_CR_CERT:
  ------------------
  |  Branch (1108:5): [True: 0, False: 50]
  ------------------
 1109|      0|        return tls_process_server_certificate(s, pkt);
 1110|       |
 1111|       |#ifndef OPENSSL_NO_COMP_ALG
 1112|       |    case TLS_ST_CR_COMP_CERT:
 1113|       |        return tls_process_server_compressed_certificate(s, pkt);
 1114|       |#endif
 1115|       |
 1116|      0|    case TLS_ST_CR_CERT_VRFY:
  ------------------
  |  Branch (1116:5): [True: 0, False: 50]
  ------------------
 1117|      0|        return tls_process_cert_verify(s, pkt);
 1118|       |
 1119|      0|    case TLS_ST_CR_CERT_STATUS:
  ------------------
  |  Branch (1119:5): [True: 0, False: 50]
  ------------------
 1120|      0|        return tls_process_cert_status(s, pkt);
 1121|       |
 1122|      0|    case TLS_ST_CR_KEY_EXCH:
  ------------------
  |  Branch (1122:5): [True: 0, False: 50]
  ------------------
 1123|      0|        return tls_process_key_exchange(s, pkt);
 1124|       |
 1125|      0|    case TLS_ST_CR_CERT_REQ:
  ------------------
  |  Branch (1125:5): [True: 0, False: 50]
  ------------------
 1126|      0|        return tls_process_certificate_request(s, pkt);
 1127|       |
 1128|      0|    case TLS_ST_CR_SRVR_DONE:
  ------------------
  |  Branch (1128:5): [True: 0, False: 50]
  ------------------
 1129|      0|        return tls_process_server_done(s, pkt);
 1130|       |
 1131|      0|    case TLS_ST_CR_CHANGE:
  ------------------
  |  Branch (1131:5): [True: 0, False: 50]
  ------------------
 1132|      0|        return tls_process_change_cipher_spec(s, pkt);
 1133|       |
 1134|      0|    case TLS_ST_CR_SESSION_TICKET:
  ------------------
  |  Branch (1134:5): [True: 0, False: 50]
  ------------------
 1135|      0|        return tls_process_new_session_ticket(s, pkt);
 1136|       |
 1137|      0|    case TLS_ST_CR_FINISHED:
  ------------------
  |  Branch (1137:5): [True: 0, False: 50]
  ------------------
 1138|      0|        return tls_process_finished(s, pkt);
 1139|       |
 1140|      0|    case TLS_ST_CR_HELLO_REQ:
  ------------------
  |  Branch (1140:5): [True: 0, False: 50]
  ------------------
 1141|      0|        return tls_process_hello_req(s, pkt);
 1142|       |
 1143|      0|    case TLS_ST_CR_ENCRYPTED_EXTENSIONS:
  ------------------
  |  Branch (1143:5): [True: 0, False: 50]
  ------------------
 1144|      0|        return tls_process_encrypted_extensions(s, pkt);
 1145|       |
 1146|      0|    case TLS_ST_CR_KEY_UPDATE:
  ------------------
  |  Branch (1146:5): [True: 0, False: 50]
  ------------------
 1147|      0|        return tls_process_key_update(s, pkt);
 1148|     50|    }
 1149|     50|}
tls_construct_client_hello:
 1177|  1.30k|{
 1178|  1.30k|    unsigned char *p;
 1179|  1.30k|    size_t sess_id_len;
 1180|  1.30k|    int i, protverr;
 1181|  1.30k|#ifndef OPENSSL_NO_COMP
 1182|  1.30k|    SSL_COMP *comp;
 1183|  1.30k|#endif
 1184|  1.30k|    SSL_SESSION *sess = s->session;
 1185|  1.30k|    unsigned char *session_id;
 1186|  1.30k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.30k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1187|       |
 1188|       |    /* Work out what SSL/TLS/DTLS version to use */
 1189|  1.30k|    protverr = ssl_set_client_hello_version(s);
 1190|  1.30k|    if (protverr != 0) {
  ------------------
  |  Branch (1190:9): [True: 0, False: 1.30k]
  ------------------
 1191|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, protverr);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1192|      0|        return CON_FUNC_ERROR;
 1193|      0|    }
 1194|       |
 1195|  1.30k|    if (sess == NULL
  ------------------
  |  Branch (1195:9): [True: 1.30k, False: 0]
  ------------------
 1196|      0|        || !ssl_version_supported(s, sess->ssl_version, NULL)
  ------------------
  |  Branch (1196:12): [True: 0, False: 0]
  ------------------
 1197|  1.30k|        || !SSL_SESSION_is_resumable(sess)) {
  ------------------
  |  Branch (1197:12): [True: 0, False: 0]
  ------------------
 1198|  1.30k|        if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1198:13): [True: 1.30k, False: 0]
  ------------------
 1199|  1.30k|            && !ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1199:16): [True: 0, False: 1.30k]
  ------------------
 1200|       |            /* SSLfatal() already called */
 1201|      0|            return CON_FUNC_ERROR;
 1202|      0|        }
 1203|  1.30k|    }
 1204|       |    /* else use the pre-loaded session */
 1205|       |
 1206|  1.30k|    p = s->s3.client_random;
 1207|       |
 1208|       |    /*
 1209|       |     * for DTLS if client_random is initialized, reuse it, we are
 1210|       |     * required to use same upon reply to HelloVerify
 1211|       |     */
 1212|  1.30k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.30k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.30k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.30k]
  |  |  ------------------
  ------------------
 1213|      0|        size_t idx;
 1214|      0|        i = 1;
 1215|      0|        for (idx = 0; idx < sizeof(s->s3.client_random); idx++) {
  ------------------
  |  Branch (1215:23): [True: 0, False: 0]
  ------------------
 1216|      0|            if (p[idx]) {
  ------------------
  |  Branch (1216:17): [True: 0, False: 0]
  ------------------
 1217|      0|                i = 0;
 1218|      0|                break;
 1219|      0|            }
 1220|      0|        }
 1221|  1.30k|    } else {
 1222|  1.30k|        i = (s->hello_retry_request == SSL_HRR_NONE);
 1223|  1.30k|    }
 1224|       |
 1225|  1.30k|    if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3.client_random), DOWNGRADE_NONE) <= 0) {
  ------------------
  |  Branch (1225:9): [True: 1.30k, False: 0]
  |  Branch (1225:14): [True: 0, False: 1.30k]
  ------------------
 1226|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1227|      0|        return CON_FUNC_ERROR;
 1228|      0|    }
 1229|       |
 1230|       |    /*-
 1231|       |     * version indicates the negotiated version: for example from
 1232|       |     * an SSLv2/v3 compatible client hello). The client_version
 1233|       |     * field is the maximum version we permit and it is also
 1234|       |     * used in RSA encrypted premaster secrets. Some servers can
 1235|       |     * choke if we initially report a higher version then
 1236|       |     * renegotiate to a lower one in the premaster secret. This
 1237|       |     * didn't happen with TLS 1.0 as most servers supported it
 1238|       |     * but it can with TLS 1.1 or later if the server only supports
 1239|       |     * 1.0.
 1240|       |     *
 1241|       |     * Possible scenario with previous logic:
 1242|       |     *      1. Client hello indicates TLS 1.2
 1243|       |     *      2. Server hello says TLS 1.0
 1244|       |     *      3. RSA encrypted premaster secret uses 1.2.
 1245|       |     *      4. Handshake proceeds using TLS 1.0.
 1246|       |     *      5. Server sends hello request to renegotiate.
 1247|       |     *      6. Client hello indicates TLS v1.0 as we now
 1248|       |     *         know that is maximum server supports.
 1249|       |     *      7. Server chokes on RSA encrypted premaster secret
 1250|       |     *         containing version 1.0.
 1251|       |     *
 1252|       |     * For interoperability it should be OK to always use the
 1253|       |     * maximum version we support in client hello and then rely
 1254|       |     * on the checking of version to ensure the servers isn't
 1255|       |     * being inconsistent: for example initially negotiating with
 1256|       |     * TLS 1.0 and renegotiating with TLS 1.2. We do this by using
 1257|       |     * client_version in client hello and not resetting it to
 1258|       |     * the negotiated version.
 1259|       |     *
 1260|       |     * For TLS 1.3 we always set the ClientHello version to 1.2 and rely on the
 1261|       |     * supported_versions extension for the real supported versions.
 1262|       |     */
 1263|  1.30k|    if (!WPACKET_put_bytes_u16(pkt, s->client_version)
  ------------------
  |  |  891|  2.61k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (1263:9): [True: 0, False: 1.30k]
  ------------------
 1264|  1.30k|        || !WPACKET_memcpy(pkt, s->s3.client_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|  1.30k|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1264:12): [True: 0, False: 1.30k]
  ------------------
 1265|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1266|      0|        return CON_FUNC_ERROR;
 1267|      0|    }
 1268|       |
 1269|       |    /* Session ID */
 1270|  1.30k|    session_id = s->session->session_id;
 1271|  1.30k|    if (s->new_session || s->session->ssl_version == TLS1_3_VERSION) {
  ------------------
  |  |   27|  1.30k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1271:9): [True: 0, False: 1.30k]
  |  Branch (1271:27): [True: 1.30k, False: 5]
  ------------------
 1272|  1.30k|        if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|  2.60k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1272:13): [True: 1.30k, False: 0]
  ------------------
 1273|  1.30k|            && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) != 0) {
  ------------------
  |  |  403|  1.30k|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|  1.30k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1273:16): [True: 1.30k, False: 0]
  ------------------
 1274|  1.30k|            sess_id_len = sizeof(s->tmp_session_id);
 1275|  1.30k|            s->tmp_session_id_len = sess_id_len;
 1276|  1.30k|            session_id = s->tmp_session_id;
 1277|  1.30k|            if (s->hello_retry_request == SSL_HRR_NONE
  ------------------
  |  Branch (1277:17): [True: 1.30k, False: 0]
  ------------------
 1278|  1.30k|                && RAND_bytes_ex(sctx->libctx, s->tmp_session_id,
  ------------------
  |  Branch (1278:20): [True: 0, False: 1.30k]
  ------------------
 1279|  1.30k|                       sess_id_len, 0)
 1280|  1.30k|                    <= 0) {
 1281|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1282|      0|                return CON_FUNC_ERROR;
 1283|      0|            }
 1284|  1.30k|        } else {
 1285|      0|            sess_id_len = 0;
 1286|      0|        }
 1287|  1.30k|    } else {
 1288|      5|        assert(s->session->session_id_length <= sizeof(s->session->session_id));
  ------------------
  |  Branch (1288:9): [True: 0, False: 5]
  |  Branch (1288:9): [True: 5, False: 0]
  ------------------
 1289|      5|        sess_id_len = s->session->session_id_length;
 1290|      5|        if (s->version == TLS1_3_VERSION) {
  ------------------
  |  |   27|      5|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1290:13): [True: 0, False: 5]
  ------------------
 1291|      0|            s->tmp_session_id_len = sess_id_len;
 1292|      0|            memcpy(s->tmp_session_id, s->session->session_id, sess_id_len);
 1293|      0|        }
 1294|      5|    }
 1295|  1.30k|    if (!WPACKET_start_sub_packet_u8(pkt)
  ------------------
  |  |  790|  2.61k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1295:9): [True: 0, False: 1.30k]
  ------------------
 1296|  1.30k|        || (sess_id_len != 0 && !WPACKET_memcpy(pkt, session_id, sess_id_len))
  ------------------
  |  Branch (1296:13): [True: 1.30k, False: 5]
  |  Branch (1296:33): [True: 0, False: 1.30k]
  ------------------
 1297|  1.30k|        || !WPACKET_close(pkt)) {
  ------------------
  |  Branch (1297:12): [True: 0, False: 1.30k]
  ------------------
 1298|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1299|      0|        return CON_FUNC_ERROR;
 1300|      0|    }
 1301|       |
 1302|       |    /* cookie stuff for DTLS */
 1303|  1.30k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.30k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.30k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.30k]
  |  |  ------------------
  ------------------
 1304|      0|        if (s->d1->cookie_len > sizeof(s->d1->cookie)
  ------------------
  |  Branch (1304:13): [True: 0, False: 0]
  ------------------
 1305|      0|            || !WPACKET_sub_memcpy_u8(pkt, s->d1->cookie,
  ------------------
  |  |  918|      0|    WPACKET_sub_memcpy__((pkt), (src), (len), 1)
  ------------------
  |  Branch (1305:16): [True: 0, False: 0]
  ------------------
 1306|      0|                s->d1->cookie_len)) {
 1307|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1308|      0|            return CON_FUNC_ERROR;
 1309|      0|        }
 1310|      0|    }
 1311|       |
 1312|       |    /* Ciphers supported */
 1313|  1.30k|    if (!WPACKET_start_sub_packet_u16(pkt)) {
  ------------------
  |  |  792|  1.30k|    WPACKET_start_sub_packet_len__((pkt), 2)
  ------------------
  |  Branch (1313:9): [True: 0, False: 1.30k]
  ------------------
 1314|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1315|      0|        return CON_FUNC_ERROR;
 1316|      0|    }
 1317|       |
 1318|  1.30k|    if (!ssl_cipher_list_to_bytes(s, SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s)),
  ------------------
  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  |  Branch (1318:9): [True: 68, False: 1.24k]
  ------------------
 1319|  1.30k|            pkt)) {
 1320|       |        /* SSLfatal() already called */
 1321|     68|        return CON_FUNC_ERROR;
 1322|     68|    }
 1323|  1.24k|    if (!WPACKET_close(pkt)) {
  ------------------
  |  Branch (1323:9): [True: 0, False: 1.24k]
  ------------------
 1324|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1325|      0|        return CON_FUNC_ERROR;
 1326|      0|    }
 1327|       |
 1328|       |    /* COMPRESSION */
 1329|  1.24k|    if (!WPACKET_start_sub_packet_u8(pkt)) {
  ------------------
  |  |  790|  1.24k|    WPACKET_start_sub_packet_len__((pkt), 1)
  ------------------
  |  Branch (1329:9): [True: 0, False: 1.24k]
  ------------------
 1330|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1331|      0|        return CON_FUNC_ERROR;
 1332|      0|    }
 1333|  1.24k|#ifndef OPENSSL_NO_COMP
 1334|  1.24k|    if (ssl_allow_compression(s)
  ------------------
  |  Branch (1334:9): [True: 0, False: 1.24k]
  ------------------
 1335|      0|        && sctx->comp_methods
  ------------------
  |  Branch (1335:12): [True: 0, False: 0]
  ------------------
 1336|      0|        && (SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1337|      0|            || s->s3.tmp.max_ver < TLS1_3_VERSION)) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1337:16): [True: 0, False: 0]
  ------------------
 1338|      0|        int compnum = sk_SSL_COMP_num(sctx->comp_methods);
  ------------------
  |  |   70|      0|#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
  ------------------
 1339|      0|        for (i = 0; i < compnum; i++) {
  ------------------
  |  Branch (1339:21): [True: 0, False: 0]
  ------------------
 1340|      0|            comp = sk_SSL_COMP_value(sctx->comp_methods, i);
  ------------------
  |  |   71|      0|#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
  ------------------
 1341|      0|            if (!WPACKET_put_bytes_u8(pkt, comp->id)) {
  ------------------
  |  |  889|      0|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1341:17): [True: 0, False: 0]
  ------------------
 1342|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1343|      0|                return CON_FUNC_ERROR;
 1344|      0|            }
 1345|      0|        }
 1346|      0|    }
 1347|  1.24k|#endif
 1348|       |    /* Add the NULL method */
 1349|  1.24k|    if (!WPACKET_put_bytes_u8(pkt, 0) || !WPACKET_close(pkt)) {
  ------------------
  |  |  889|  2.48k|    WPACKET_put_bytes__((pkt), (val), 1)
  ------------------
  |  Branch (1349:9): [True: 0, False: 1.24k]
  |  Branch (1349:42): [True: 0, False: 1.24k]
  ------------------
 1350|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1351|      0|        return CON_FUNC_ERROR;
 1352|      0|    }
 1353|       |
 1354|       |    /* TLS extensions */
 1355|  1.24k|    if (!tls_construct_extensions(s, pkt, SSL_EXT_CLIENT_HELLO, NULL, 0)) {
  ------------------
  |  |  299|  1.24k|#define SSL_EXT_CLIENT_HELLO 0x00080
  ------------------
  |  Branch (1355:9): [True: 1, False: 1.24k]
  ------------------
 1356|       |        /* SSLfatal() already called */
 1357|      1|        return CON_FUNC_ERROR;
 1358|      1|    }
 1359|       |
 1360|  1.24k|    return CON_FUNC_SUCCESS;
 1361|  1.24k|}
tls_process_server_hello:
 1468|     50|{
 1469|     50|    PACKET session_id, extpkt;
 1470|     50|    size_t session_id_len;
 1471|     50|    const unsigned char *cipherchars;
 1472|     50|    int hrr = 0;
 1473|     50|    unsigned int compression;
 1474|     50|    unsigned int sversion;
 1475|     50|    unsigned int context;
 1476|     50|    RAW_EXTENSION *extensions = NULL;
 1477|     50|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     50|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1478|     50|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|     50|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1479|     50|#ifndef OPENSSL_NO_COMP
 1480|     50|    SSL_COMP *comp;
 1481|     50|#endif
 1482|       |
 1483|     50|    if (!PACKET_get_net_2(pkt, &sversion)) {
  ------------------
  |  Branch (1483:9): [True: 1, False: 49]
  ------------------
 1484|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1485|      1|        goto err;
 1486|      1|    }
 1487|       |
 1488|       |    /* load the server random */
 1489|     49|    if (s->version == TLS1_3_VERSION
  ------------------
  |  |   27|     98|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (1489:9): [True: 49, False: 0]
  ------------------
 1490|     49|        && sversion == TLS1_2_VERSION
  ------------------
  |  |   26|     98|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (1490:12): [True: 42, False: 7]
  ------------------
 1491|     42|        && PACKET_remaining(pkt) >= SSL3_RANDOM_SIZE
  ------------------
  |  |  137|     91|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1491:12): [True: 40, False: 2]
  ------------------
 1492|     40|        && memcmp(hrrrandom, PACKET_data(pkt), SSL3_RANDOM_SIZE) == 0) {
  ------------------
  |  |  137|     40|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1492:12): [True: 1, False: 39]
  ------------------
 1493|      1|        if (s->hello_retry_request != SSL_HRR_NONE) {
  ------------------
  |  Branch (1493:13): [True: 0, False: 1]
  ------------------
 1494|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_UNEXPECTED_MESSAGE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1495|      0|            goto err;
 1496|      0|        }
 1497|      1|        s->hello_retry_request = SSL_HRR_PENDING;
 1498|       |        /* Tell the record layer that we know we're going to get TLSv1.3 */
 1499|      1|        if (!ssl_set_record_protocol_version(s, s->version)) {
  ------------------
  |  Branch (1499:13): [True: 0, False: 1]
  ------------------
 1500|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1501|      0|            goto err;
 1502|      0|        }
 1503|      1|        hrr = 1;
 1504|      1|        if (!PACKET_forward(pkt, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|      1|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1504:13): [True: 0, False: 1]
  ------------------
 1505|      0|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1506|      0|            goto err;
 1507|      0|        }
 1508|     48|    } else {
 1509|     48|        if (!PACKET_copy_bytes(pkt, s->s3.server_random, SSL3_RANDOM_SIZE)) {
  ------------------
  |  |  137|     48|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1509:13): [True: 4, False: 44]
  ------------------
 1510|      4|            SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      4|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      4|    (ERR_new(),                                                  \
  |  |  |  |  151|      4|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      4|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      4|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1511|      4|            goto err;
 1512|      4|        }
 1513|     48|    }
 1514|       |
 1515|       |    /* Get the session-id. */
 1516|     45|    if (!PACKET_get_length_prefixed_1(pkt, &session_id)) {
  ------------------
  |  Branch (1516:9): [True: 16, False: 29]
  ------------------
 1517|     16|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|     16|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     16|    (ERR_new(),                                                  \
  |  |  |  |  151|     16|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     16|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     16|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1518|     16|        goto err;
 1519|     16|    }
 1520|     29|    session_id_len = PACKET_remaining(&session_id);
 1521|     29|    if (session_id_len > sizeof(s->session->session_id)
  ------------------
  |  Branch (1521:9): [True: 0, False: 29]
  ------------------
 1522|     29|        || session_id_len > SSL3_SESSION_ID_SIZE) {
  ------------------
  |  |  138|     29|#define SSL3_SESSION_ID_SIZE 32
  ------------------
  |  Branch (1522:12): [True: 0, False: 29]
  ------------------
 1523|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_SSL3_SESSION_ID_TOO_LONG);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1524|      0|        goto err;
 1525|      0|    }
 1526|       |
 1527|     29|    if (!PACKET_get_bytes(pkt, &cipherchars, TLS_CIPHER_LEN)) {
  ------------------
  |  |  379|     29|#define TLS_CIPHER_LEN 2
  ------------------
  |  Branch (1527:9): [True: 28, False: 1]
  ------------------
 1528|     28|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|     28|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|     28|    (ERR_new(),                                                  \
  |  |  |  |  151|     28|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     28|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|     28|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1529|     28|        goto err;
 1530|     28|    }
 1531|       |
 1532|      1|    if (!PACKET_get_1(pkt, &compression)) {
  ------------------
  |  Branch (1532:9): [True: 1, False: 0]
  ------------------
 1533|      1|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_LENGTH_MISMATCH);
  ------------------
  |  |  148|      1|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      1|    (ERR_new(),                                                  \
  |  |  |  |  151|      1|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      1|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      1|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1534|      1|        goto err;
 1535|      1|    }
 1536|       |
 1537|       |    /* TLS extensions */
 1538|      0|    if (PACKET_remaining(pkt) == 0 && !hrr) {
  ------------------
  |  Branch (1538:9): [True: 0, False: 0]
  |  Branch (1538:39): [True: 0, False: 0]
  ------------------
 1539|      0|        PACKET_null_init(&extpkt);
 1540|      0|    } else if (!PACKET_as_length_prefixed_2(pkt, &extpkt)
  ------------------
  |  Branch (1540:16): [True: 0, False: 0]
  ------------------
 1541|      0|        || PACKET_remaining(pkt) != 0) {
  ------------------
  |  Branch (1541:12): [True: 0, False: 0]
  ------------------
 1542|      0|        SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_R_BAD_LENGTH);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1543|      0|        goto err;
 1544|      0|    }
 1545|       |
 1546|      0|    if (!hrr) {
  ------------------
  |  Branch (1546:9): [True: 0, False: 0]
  ------------------
 1547|      0|        if (!tls_collect_extensions(s, &extpkt,
  ------------------
  |  Branch (1547:13): [True: 0, False: 0]
  ------------------
 1548|      0|                SSL_EXT_TLS1_2_SERVER_HELLO
  ------------------
  |  |  301|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1549|      0|                    | SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1550|      0|                &extensions, NULL, 1)) {
 1551|       |            /* SSLfatal() already called */
 1552|      0|            goto err;
 1553|      0|        }
 1554|       |
 1555|      0|        if (!ssl_choose_client_version(s, sversion, extensions)) {
  ------------------
  |  Branch (1555:13): [True: 0, False: 0]
  ------------------
 1556|       |            /* SSLfatal() already called */
 1557|      0|            goto err;
 1558|      0|        }
 1559|      0|    }
 1560|       |
 1561|      0|    if (SSL_CONNECTION_IS_TLS13(s) || hrr) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1561:39): [True: 0, False: 0]
  ------------------
 1562|      0|        if (compression != 0) {
  ------------------
  |  Branch (1562:13): [True: 0, False: 0]
  ------------------
 1563|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1564|      0|                SSL_R_INVALID_COMPRESSION_ALGORITHM);
 1565|      0|            goto err;
 1566|      0|        }
 1567|       |
 1568|      0|        if (session_id_len != s->tmp_session_id_len
  ------------------
  |  Branch (1568:13): [True: 0, False: 0]
  ------------------
 1569|      0|            || memcmp(PACKET_data(&session_id), s->tmp_session_id,
  ------------------
  |  Branch (1569:16): [True: 0, False: 0]
  ------------------
 1570|      0|                   session_id_len)
 1571|      0|                != 0) {
 1572|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_INVALID_SESSION_ID);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1573|      0|            goto err;
 1574|      0|        }
 1575|      0|    }
 1576|       |
 1577|      0|    if (hrr) {
  ------------------
  |  Branch (1577:9): [True: 0, False: 0]
  ------------------
 1578|      0|        if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1578:13): [True: 0, False: 0]
  ------------------
 1579|       |            /* SSLfatal() already called */
 1580|      0|            goto err;
 1581|      0|        }
 1582|       |
 1583|      0|        return tls_process_as_hello_retry_request(s, &extpkt);
 1584|      0|    }
 1585|       |
 1586|       |    /*
 1587|       |     * Now we have chosen the version we need to check again that the extensions
 1588|       |     * are appropriate for this version.
 1589|       |     */
 1590|      0|    context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                  context = SSL_CONNECTION_IS_TLS13(s) ? SSL_EXT_TLS1_3_SERVER_HELLO
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1591|      0|                                         : SSL_EXT_TLS1_2_SERVER_HELLO;
  ------------------
  |  |  301|      0|#define SSL_EXT_TLS1_2_SERVER_HELLO 0x00100
  ------------------
 1592|      0|    if (!tls_validate_all_contexts(s, context, extensions)) {
  ------------------
  |  Branch (1592:9): [True: 0, False: 0]
  ------------------
 1593|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_BAD_EXTENSION);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1594|      0|        goto err;
 1595|      0|    }
 1596|       |
 1597|      0|    s->hit = 0;
 1598|       |
 1599|      0|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1600|       |        /*
 1601|       |         * In TLSv1.3 a ServerHello message signals a key change so the end of
 1602|       |         * the message must be on a record boundary.
 1603|       |         */
 1604|      0|        if (RECORD_LAYER_processed_read_pending(&s->rlayer)) {
  ------------------
  |  Branch (1604:13): [True: 0, False: 0]
  ------------------
 1605|      0|            SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1606|      0|                SSL_R_NOT_ON_RECORD_BOUNDARY);
 1607|      0|            goto err;
 1608|      0|        }
 1609|       |
 1610|       |        /* This will set s->hit if we are resuming */
 1611|      0|        if (!tls_parse_extension(s, TLSEXT_IDX_psk,
  ------------------
  |  Branch (1611:13): [True: 0, False: 0]
  ------------------
 1612|      0|                SSL_EXT_TLS1_3_SERVER_HELLO,
  ------------------
  |  |  302|      0|#define SSL_EXT_TLS1_3_SERVER_HELLO 0x00200
  ------------------
 1613|      0|                extensions, NULL, 0)) {
 1614|       |            /* SSLfatal() already called */
 1615|      0|            goto err;
 1616|      0|        }
 1617|      0|    } else {
 1618|       |        /*
 1619|       |         * Check if we can resume the session based on external pre-shared
 1620|       |         * secret. EAP-FAST (RFC 4851) supports two types of session resumption.
 1621|       |         * Resumption based on server-side state works with session IDs.
 1622|       |         * Resumption based on pre-shared Protected Access Credentials (PACs)
 1623|       |         * works by overriding the SessionTicket extension at the application
 1624|       |         * layer, and does not send a session ID. (We do not know whether
 1625|       |         * EAP-FAST servers would honour the session ID.) Therefore, the session
 1626|       |         * ID alone is not a reliable indicator of session resumption, so we
 1627|       |         * first check if we can resume, and later peek at the next handshake
 1628|       |         * message to see if the server wants to resume.
 1629|       |         */
 1630|      0|        if (s->version >= TLS1_VERSION
  ------------------
  |  |   24|      0|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (1630:13): [True: 0, False: 0]
  ------------------
 1631|      0|            && s->ext.session_secret_cb != NULL && s->session->ext.tick) {
  ------------------
  |  Branch (1631:16): [True: 0, False: 0]
  |  Branch (1631:52): [True: 0, False: 0]
  ------------------
 1632|      0|            const SSL_CIPHER *pref_cipher = NULL;
 1633|       |            /*
 1634|       |             * s->session->master_key_length is a size_t, but this is an int for
 1635|       |             * backwards compat reasons
 1636|       |             */
 1637|      0|            int master_key_length;
 1638|       |
 1639|      0|            master_key_length = sizeof(s->session->master_key);
 1640|      0|            if (s->ext.session_secret_cb(ussl, s->session->master_key,
  ------------------
  |  Branch (1640:17): [True: 0, False: 0]
  ------------------
 1641|      0|                    &master_key_length,
 1642|      0|                    NULL, &pref_cipher,
 1643|      0|                    s->ext.session_secret_cb_arg)
 1644|      0|                && master_key_length > 0) {
  ------------------
  |  Branch (1644:20): [True: 0, False: 0]
  ------------------
 1645|      0|                s->session->master_key_length = master_key_length;
 1646|      0|                s->session->cipher = pref_cipher ? pref_cipher : ssl_get_cipher_by_char(s, cipherchars, 0);
  ------------------
  |  Branch (1646:38): [True: 0, False: 0]
  ------------------
 1647|      0|            } else {
 1648|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1649|      0|                goto err;
 1650|      0|            }
 1651|      0|        }
 1652|       |
 1653|      0|        if (session_id_len != 0
  ------------------
  |  Branch (1653:13): [True: 0, False: 0]
  ------------------
 1654|      0|            && session_id_len == s->session->session_id_length
  ------------------
  |  Branch (1654:16): [True: 0, False: 0]
  ------------------
 1655|      0|            && memcmp(PACKET_data(&session_id), s->session->session_id,
  ------------------
  |  Branch (1655:16): [True: 0, False: 0]
  ------------------
 1656|      0|                   session_id_len)
 1657|      0|                == 0)
 1658|      0|            s->hit = 1;
 1659|      0|    }
 1660|       |
 1661|      0|    if (s->hit) {
  ------------------
  |  Branch (1661:9): [True: 0, False: 0]
  ------------------
 1662|      0|        if (s->sid_ctx_length != s->session->sid_ctx_length
  ------------------
  |  Branch (1662:13): [True: 0, False: 0]
  ------------------
 1663|      0|            || memcmp(s->session->sid_ctx, s->sid_ctx, s->sid_ctx_length)) {
  ------------------
  |  Branch (1663:16): [True: 0, False: 0]
  ------------------
 1664|       |            /* actually a client application bug */
 1665|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1666|      0|                SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
 1667|      0|            goto err;
 1668|      0|        }
 1669|      0|    } else {
 1670|       |        /*
 1671|       |         * If we were trying for session-id reuse but the server
 1672|       |         * didn't resume, make a new SSL_SESSION.
 1673|       |         * In the case of EAP-FAST and PAC, we do not send a session ID,
 1674|       |         * so the PAC-based session secret is always preserved. It'll be
 1675|       |         * overwritten if the server refuses resumption.
 1676|       |         */
 1677|      0|        if (s->session->session_id_length > 0) {
  ------------------
  |  Branch (1677:13): [True: 0, False: 0]
  ------------------
 1678|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_miss);
 1679|      0|            if (!ssl_get_new_session(s, 0)) {
  ------------------
  |  Branch (1679:17): [True: 0, False: 0]
  ------------------
 1680|       |                /* SSLfatal() already called */
 1681|      0|                goto err;
 1682|      0|            }
 1683|      0|        }
 1684|       |
 1685|      0|        s->session->ssl_version = s->version;
 1686|       |        /*
 1687|       |         * In TLSv1.2 and below we save the session id we were sent so we can
 1688|       |         * resume it later. In TLSv1.3 the session id we were sent is just an
 1689|       |         * echo of what we originally sent in the ClientHello and should not be
 1690|       |         * used for resumption.
 1691|       |         */
 1692|      0|        if (!SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1693|      0|            s->session->session_id_length = session_id_len;
 1694|       |            /* session_id_len could be 0 */
 1695|      0|            if (session_id_len > 0)
  ------------------
  |  Branch (1695:17): [True: 0, False: 0]
  ------------------
 1696|      0|                memcpy(s->session->session_id, PACKET_data(&session_id),
 1697|      0|                    session_id_len);
 1698|      0|        }
 1699|      0|    }
 1700|       |
 1701|       |    /* Session version and negotiated protocol version should match */
 1702|      0|    if (s->version != s->session->ssl_version) {
  ------------------
  |  Branch (1702:9): [True: 0, False: 0]
  ------------------
 1703|      0|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1704|      0|            SSL_R_SSL_SESSION_VERSION_MISMATCH);
 1705|      0|        goto err;
 1706|      0|    }
 1707|       |    /*
 1708|       |     * Now that we know the version, update the check to see if it's an allowed
 1709|       |     * version.
 1710|       |     */
 1711|      0|    s->s3.tmp.min_ver = s->version;
 1712|      0|    s->s3.tmp.max_ver = s->version;
 1713|       |
 1714|      0|    if (!set_client_ciphersuite(s, cipherchars)) {
  ------------------
  |  Branch (1714:9): [True: 0, False: 0]
  ------------------
 1715|       |        /* SSLfatal() already called */
 1716|      0|        goto err;
 1717|      0|    }
 1718|       |
 1719|       |#ifdef OPENSSL_NO_COMP
 1720|       |    if (compression != 0) {
 1721|       |        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
 1722|       |            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 1723|       |        goto err;
 1724|       |    }
 1725|       |    /*
 1726|       |     * If compression is disabled we'd better not try to resume a session
 1727|       |     * using compression.
 1728|       |     */
 1729|       |    if (s->session->compress_meth != 0) {
 1730|       |        SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, SSL_R_INCONSISTENT_COMPRESSION);
 1731|       |        goto err;
 1732|       |    }
 1733|       |#else
 1734|      0|    if (s->hit && compression != s->session->compress_meth) {
  ------------------
  |  Branch (1734:9): [True: 0, False: 0]
  |  Branch (1734:19): [True: 0, False: 0]
  ------------------
 1735|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1736|      0|            SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED);
 1737|      0|        goto err;
 1738|      0|    }
 1739|      0|    if (compression == 0)
  ------------------
  |  Branch (1739:9): [True: 0, False: 0]
  ------------------
 1740|      0|        comp = NULL;
 1741|      0|    else if (!ssl_allow_compression(s)) {
  ------------------
  |  Branch (1741:14): [True: 0, False: 0]
  ------------------
 1742|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_R_COMPRESSION_DISABLED);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1743|      0|        goto err;
 1744|      0|    } else {
 1745|      0|        comp = ssl3_comp_find(SSL_CONNECTION_GET_CTX(s)->comp_methods,
  ------------------
  |  |   26|      0|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 1746|      0|            compression);
 1747|      0|    }
 1748|       |
 1749|      0|    if (compression != 0 && comp == NULL) {
  ------------------
  |  Branch (1749:9): [True: 0, False: 0]
  |  Branch (1749:29): [True: 0, False: 0]
  ------------------
 1750|      0|        SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1751|      0|            SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
 1752|      0|        goto err;
 1753|      0|    } else {
 1754|      0|        s->s3.tmp.new_compression = comp;
 1755|      0|    }
 1756|      0|#endif
 1757|       |
 1758|      0|    if (!tls_parse_all_extensions(s, context, extensions, NULL, 0, 1)) {
  ------------------
  |  Branch (1758:9): [True: 0, False: 0]
  ------------------
 1759|       |        /* SSLfatal() already called */
 1760|      0|        goto err;
 1761|      0|    }
 1762|       |
 1763|       |#ifndef OPENSSL_NO_SCTP
 1764|       |    if (SSL_CONNECTION_IS_DTLS(s) && s->hit) {
 1765|       |        unsigned char sctpauthkey[64];
 1766|       |        char labelbuffer[sizeof(DTLS1_SCTP_AUTH_LABEL)];
 1767|       |        size_t labellen;
 1768|       |
 1769|       |        /*
 1770|       |         * Add new shared key for SCTP-Auth, will be ignored if
 1771|       |         * no SCTP used.
 1772|       |         */
 1773|       |        memcpy(labelbuffer, DTLS1_SCTP_AUTH_LABEL,
 1774|       |            sizeof(DTLS1_SCTP_AUTH_LABEL));
 1775|       |
 1776|       |        /* Don't include the terminating zero. */
 1777|       |        labellen = sizeof(labelbuffer) - 1;
 1778|       |        if (s->mode & SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG)
 1779|       |            labellen += 1;
 1780|       |
 1781|       |        if (SSL_export_keying_material(ssl, sctpauthkey,
 1782|       |                sizeof(sctpauthkey),
 1783|       |                labelbuffer,
 1784|       |                labellen, NULL, 0, 0)
 1785|       |            <= 0) {
 1786|       |            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
 1787|       |            goto err;
 1788|       |        }
 1789|       |
 1790|       |        BIO_ctrl(SSL_get_wbio(ssl),
 1791|       |            BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY,
 1792|       |            sizeof(sctpauthkey), sctpauthkey);
 1793|       |    }
 1794|       |#endif
 1795|       |
 1796|       |    /*
 1797|       |     * In TLSv1.3 we have some post-processing to change cipher state, otherwise
 1798|       |     * we're done with this message
 1799|       |     */
 1800|      0|    if (SSL_CONNECTION_IS_TLS13(s)) {
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1801|      0|        if (!ssl->method->ssl3_enc->setup_key_block(s)
  ------------------
  |  Branch (1801:13): [True: 0, False: 0]
  ------------------
 1802|      0|            || !tls13_store_handshake_traffic_hash(s)) {
  ------------------
  |  Branch (1802:16): [True: 0, False: 0]
  ------------------
 1803|       |            /* SSLfatal() already called */
 1804|      0|            goto err;
 1805|      0|        }
 1806|       |        /*
 1807|       |         * If we're not doing early-data and we're not going to send a dummy CCS
 1808|       |         * (i.e. no middlebox compat mode) then we can change the write keys
 1809|       |         * immediately. Otherwise we have to defer this until after all possible
 1810|       |         * early data is written. We could just always defer until the last
 1811|       |         * moment except QUIC needs it done at the same time as the read keys
 1812|       |         * are changed. Since QUIC doesn't do TLS early data or need middlebox
 1813|       |         * compat this doesn't cause a problem.
 1814|       |         */
 1815|      0|        if (SSL_IS_QUIC_HANDSHAKE(s)
  ------------------
  |  |  303|      0|#define SSL_IS_QUIC_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC) != 0)
  |  |  ------------------
  |  |  |  |   29|      0|#define TLS1_FLAGS_QUIC 0x2000
  |  |  ------------------
  |  |  |  Branch (303:34): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1816|      0|            || (s->early_data_state == SSL_EARLY_DATA_NONE
  ------------------
  |  Branch (1816:17): [True: 0, False: 0]
  ------------------
 1817|      0|                && (s->options & SSL_OP_ENABLE_MIDDLEBOX_COMPAT) == 0)) {
  ------------------
  |  |  403|      0|#define SSL_OP_ENABLE_MIDDLEBOX_COMPAT SSL_OP_BIT(20)
  |  |  ------------------
  |  |  |  |  350|      0|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1817:20): [True: 0, False: 0]
  ------------------
 1818|      0|            if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1818:17): [True: 0, False: 0]
  ------------------
 1819|      0|                    SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                                  SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE)) {
  ------------------
  |  |  349|      0|#define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT | SSL3_CC_WRITE)
  |  |  ------------------
  |  |  |  |  343|      0|#define SSL3_CC_WRITE 0x002
  |  |  ------------------
  ------------------
 1820|       |                /* SSLfatal() already called */
 1821|      0|                goto err;
 1822|      0|            }
 1823|      0|        }
 1824|      0|        if (!ssl->method->ssl3_enc->change_cipher_state(s,
  ------------------
  |  Branch (1824:13): [True: 0, False: 0]
  ------------------
 1825|      0|                SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  347|      0|#define SSL3_CC_HANDSHAKE 0x080
  ------------------
                              SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_READ)) {
  ------------------
  |  |  351|      0|#define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  344|      0|#define SSL3_CC_CLIENT 0x010
  |  |  ------------------
  |  |               #define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT | SSL3_CC_READ)
  |  |  ------------------
  |  |  |  |  342|      0|#define SSL3_CC_READ 0x001
  |  |  ------------------
  ------------------
 1826|       |            /* SSLfatal() already called */
 1827|      0|            goto err;
 1828|      0|        }
 1829|      0|    }
 1830|       |
 1831|      0|    OPENSSL_free(extensions);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1832|      0|    return MSG_PROCESS_CONTINUE_READING;
 1833|     50|err:
 1834|     50|    OPENSSL_free(extensions);
  ------------------
  |  |  131|     50|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1835|     50|    return MSG_PROCESS_ERROR;
 1836|      0|}
statem_clnt.c:ssl_cipher_list_to_bytes:
 4152|  1.30k|{
 4153|  1.30k|    int i;
 4154|  1.30k|    size_t totlen = 0, len, maxlen, maxverok = 0;
 4155|  1.30k|    int empty_reneg_info_scsv = !s->renegotiate
  ------------------
  |  Branch (4155:33): [True: 1.30k, False: 0]
  ------------------
 4156|  1.30k|        && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  2.61k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.30k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (4156:12): [True: 1.30k, False: 0]
  ------------------
 4157|  1.30k|        && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  | 2766|  1.30k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  1.30k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
                      && ssl_security(s, SSL_SECOP_VERSION, 0, TLS1_VERSION, NULL)
  ------------------
  |  |   24|  1.30k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (4157:12): [True: 6, False: 1.30k]
  ------------------
 4158|      6|        && s->min_proto_version <= TLS1_VERSION;
  ------------------
  |  |   24|      6|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (4158:12): [True: 0, False: 6]
  ------------------
 4159|  1.30k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 4160|       |
 4161|       |    /* Set disabled masks for this session */
 4162|  1.30k|    if (!ssl_set_client_disabled(s)) {
  ------------------
  |  Branch (4162:9): [True: 0, False: 1.30k]
  ------------------
 4163|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4164|      0|        return 0;
 4165|      0|    }
 4166|       |
 4167|  1.30k|    if (sk == NULL) {
  ------------------
  |  Branch (4167:9): [True: 0, False: 1.30k]
  ------------------
 4168|      0|        SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4169|      0|        return 0;
 4170|      0|    }
 4171|       |
 4172|       |#ifdef OPENSSL_MAX_TLS1_2_CIPHER_LENGTH
 4173|       |#if OPENSSL_MAX_TLS1_2_CIPHER_LENGTH < 6
 4174|       |#error Max cipher length too short
 4175|       |#endif
 4176|       |    /*
 4177|       |     * Some servers hang if client hello > 256 bytes as hack workaround
 4178|       |     * chop number of supported ciphers to keep it well below this if we
 4179|       |     * use TLS v1.2
 4180|       |     */
 4181|       |    if (TLS1_get_version(ssl) >= TLS1_2_VERSION)
 4182|       |        maxlen = OPENSSL_MAX_TLS1_2_CIPHER_LENGTH & ~1;
 4183|       |    else
 4184|       |#endif
 4185|       |        /* Maximum length that can be stored in 2 bytes. Length must be even */
 4186|  1.30k|        maxlen = 0xfffe;
 4187|       |
 4188|  1.30k|    if (empty_reneg_info_scsv)
  ------------------
  |  Branch (4188:9): [True: 0, False: 1.30k]
  ------------------
 4189|      0|        maxlen -= 2;
 4190|  1.30k|    if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV)
  ------------------
  |  |  531|  1.30k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (4190:9): [True: 0, False: 1.30k]
  ------------------
 4191|      0|        maxlen -= 2;
 4192|       |
 4193|  75.7k|    for (i = 0; i < sk_SSL_CIPHER_num(sk) && totlen < maxlen; i++) {
  ------------------
  |  | 1005|   151k|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (4193:17): [True: 74.4k, False: 1.30k]
  |  Branch (4193:46): [True: 74.4k, False: 0]
  ------------------
 4194|  74.4k|        const SSL_CIPHER *c;
 4195|       |
 4196|  74.4k|        c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1006|  74.4k|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 4197|       |        /* Skip disabled ciphers */
 4198|  74.4k|        if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2752|  74.4k|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|  74.4k|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (4198:13): [True: 38.1k, False: 36.3k]
  ------------------
 4199|  38.1k|            continue;
 4200|       |
 4201|  36.3k|        if (!ssl->method->put_cipher_by_char(c, pkt, &len)) {
  ------------------
  |  Branch (4201:13): [True: 0, False: 36.3k]
  ------------------
 4202|      0|            SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4203|      0|            return 0;
 4204|      0|        }
 4205|       |
 4206|       |        /* Sanity check that the maximum version we offer has ciphers enabled */
 4207|  36.3k|        if (!maxverok) {
  ------------------
  |  Branch (4207:13): [True: 2.62k, False: 33.7k]
  ------------------
 4208|  2.62k|            int minproto = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  258|  2.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  2.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 2.62k]
  |  |  ------------------
  ------------------
 4209|  2.62k|            int maxproto = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  258|  2.62k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  2.62k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  2.62k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 2.62k]
  |  |  ------------------
  ------------------
 4210|       |
 4211|  2.62k|            if (ssl_version_cmp(s, maxproto, s->s3.tmp.max_ver) >= 0
  ------------------
  |  Branch (4211:17): [True: 1.24k, False: 1.38k]
  ------------------
 4212|  1.24k|                && ssl_version_cmp(s, minproto, s->s3.tmp.max_ver) <= 0)
  ------------------
  |  Branch (4212:20): [True: 1.24k, False: 0]
  ------------------
 4213|  1.24k|                maxverok = 1;
 4214|  2.62k|        }
 4215|       |
 4216|  36.3k|        totlen += len;
 4217|  36.3k|    }
 4218|       |
 4219|  1.30k|    if (totlen == 0 || !maxverok) {
  ------------------
  |  Branch (4219:9): [True: 8, False: 1.30k]
  |  Branch (4219:24): [True: 60, False: 1.24k]
  ------------------
 4220|     68|        const char *maxvertext = !maxverok
  ------------------
  |  Branch (4220:34): [True: 68, False: 0]
  ------------------
 4221|     68|            ? "No ciphers enabled for max supported SSL/TLS version"
 4222|     68|            : NULL;
 4223|       |
 4224|     68|        SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  150|     68|    (ERR_new(),                                                  \
  |  |  151|     68|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|     68|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|     68|        ossl_statem_fatal)
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  | 1243|     68|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     68|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
                      SSLfatal_data(s, SSL_AD_INTERNAL_ERROR, SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  195|     68|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
 4225|     68|            maxvertext);
 4226|     68|        return 0;
 4227|     68|    }
 4228|       |
 4229|  1.24k|    if (totlen != 0) {
  ------------------
  |  Branch (4229:9): [True: 1.24k, False: 0]
  ------------------
 4230|  1.24k|        if (empty_reneg_info_scsv) {
  ------------------
  |  Branch (4230:13): [True: 0, False: 1.24k]
  ------------------
 4231|      0|            static const SSL_CIPHER scsv = {
 4232|      0|                0, NULL, NULL, SSL3_CK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   33|      0|#define SSL3_CK_SCSV 0x030000FF
  ------------------
 4233|      0|            };
 4234|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (4234:17): [True: 0, False: 0]
  ------------------
 4235|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4236|      0|                return 0;
 4237|      0|            }
 4238|      0|        }
 4239|  1.24k|        if (s->mode & SSL_MODE_SEND_FALLBACK_SCSV) {
  ------------------
  |  |  531|  1.24k|#define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080U
  ------------------
  |  Branch (4239:13): [True: 0, False: 1.24k]
  ------------------
 4240|      0|            static const SSL_CIPHER scsv = {
 4241|      0|                0, NULL, NULL, SSL3_CK_FALLBACK_SCSV, 0, 0, 0, 0, 0, 0, 0, 0, 0
  ------------------
  |  |   39|      0|#define SSL3_CK_FALLBACK_SCSV 0x03005600
  ------------------
 4242|      0|            };
 4243|      0|            if (!ssl->method->put_cipher_by_char(&scsv, pkt, &len)) {
  ------------------
  |  Branch (4243:17): [True: 0, False: 0]
  ------------------
 4244|      0|                SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 4245|      0|                return 0;
 4246|      0|            }
 4247|      0|        }
 4248|  1.24k|    }
 4249|       |
 4250|  1.24k|    return 1;
 4251|  1.24k|}

ssl3_do_write:
   63|  1.24k|{
   64|  1.24k|    int ret;
   65|  1.24k|    size_t written = 0;
   66|  1.24k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
   67|  1.24k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.24k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
   68|       |
   69|       |    /*
   70|       |     * If we're running the test suite then we may need to mutate the message
   71|       |     * we've been asked to write. Does not happen in normal operation.
   72|       |     */
   73|  1.24k|    if (s->statem.mutate_handshake_cb != NULL
  ------------------
  |  Branch (73:9): [True: 0, False: 1.24k]
  ------------------
   74|      0|        && !s->statem.write_in_progress
  ------------------
  |  Branch (74:12): [True: 0, False: 0]
  ------------------
   75|      0|        && type == SSL3_RT_HANDSHAKE
  ------------------
  |  |  221|  1.24k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (75:12): [True: 0, False: 0]
  ------------------
   76|      0|        && s->init_num >= SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (76:12): [True: 0, False: 0]
  ------------------
   77|      0|        unsigned char *msg;
   78|      0|        size_t msglen;
   79|       |
   80|      0|        if (!s->statem.mutate_handshake_cb((unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (80:13): [True: 0, False: 0]
  ------------------
   81|      0|                s->init_num,
   82|      0|                &msg, &msglen,
   83|      0|                s->statem.mutatearg))
   84|      0|            return -1;
   85|      0|        if (msglen < SSL3_HM_HEADER_LENGTH
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (85:13): [True: 0, False: 0]
  ------------------
   86|      0|            || !BUF_MEM_grow(s->init_buf, msglen))
  ------------------
  |  Branch (86:16): [True: 0, False: 0]
  ------------------
   87|      0|            return -1;
   88|      0|        memcpy(s->init_buf->data, msg, msglen);
   89|      0|        s->init_num = msglen;
   90|      0|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
   91|      0|        s->statem.finish_mutate_handshake_cb(s->statem.mutatearg);
   92|      0|        s->statem.write_in_progress = 1;
   93|      0|    }
   94|       |
   95|  1.24k|    ret = ssl3_write_bytes(ssl, type, &s->init_buf->data[s->init_off],
   96|  1.24k|        s->init_num, &written);
   97|  1.24k|    if (ret <= 0)
  ------------------
  |  Branch (97:9): [True: 0, False: 1.24k]
  ------------------
   98|      0|        return -1;
   99|  1.24k|    if (type == SSL3_RT_HANDSHAKE)
  ------------------
  |  |  221|  1.24k|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (99:9): [True: 1.24k, False: 0]
  ------------------
  100|       |        /*
  101|       |         * should not be done for 'Hello Request's, but in that case we'll
  102|       |         * ignore the result anyway
  103|       |         * TLS1.3 KeyUpdate and NewSessionTicket do not need to be added
  104|       |         */
  105|  1.24k|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  265|  2.48k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  2.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  1.24k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 1.24k, False: 0]
  |  |  ------------------
  |  |  266|  1.24k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 1.24k, False: 0]
  |  |  ------------------
  |  |  267|  2.48k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  1.24k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 1.24k]
  |  |  ------------------
  ------------------
  106|      0|            || (s->statem.hand_state != TLS_ST_SW_SESSION_TICKET
  ------------------
  |  Branch (106:17): [True: 0, False: 0]
  ------------------
  107|      0|                && s->statem.hand_state != TLS_ST_CW_KEY_UPDATE
  ------------------
  |  Branch (107:20): [True: 0, False: 0]
  ------------------
  108|      0|                && s->statem.hand_state != TLS_ST_SW_KEY_UPDATE))
  ------------------
  |  Branch (108:20): [True: 0, False: 0]
  ------------------
  109|  1.24k|            if (!ssl3_finish_mac(s,
  ------------------
  |  Branch (109:17): [True: 0, False: 1.24k]
  ------------------
  110|  1.24k|                    (unsigned char *)&s->init_buf->data[s->init_off],
  111|  1.24k|                    written))
  112|      0|                return -1;
  113|  1.24k|    if (written == s->init_num) {
  ------------------
  |  Branch (113:9): [True: 1.24k, False: 0]
  ------------------
  114|  1.24k|        s->statem.write_in_progress = 0;
  115|  1.24k|        if (s->msg_callback)
  ------------------
  |  Branch (115:13): [True: 0, False: 1.24k]
  ------------------
  116|      0|            s->msg_callback(1, s->version, type, s->init_buf->data,
  117|      0|                (size_t)(s->init_off + s->init_num), ussl,
  118|      0|                s->msg_callback_arg);
  119|  1.24k|        return 1;
  120|  1.24k|    }
  121|      0|    s->init_off += written;
  122|      0|    s->init_num -= written;
  123|      0|    return 0;
  124|  1.24k|}
tls_close_construct_packet:
  127|  1.24k|{
  128|  1.24k|    size_t msglen;
  129|       |
  130|  1.24k|    if ((htype != SSL3_MT_CHANGE_CIPHER_SPEC && !WPACKET_close(pkt))
  ------------------
  |  |  337|  2.48k|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (130:10): [True: 1.24k, False: 0]
  |  Branch (130:49): [True: 0, False: 1.24k]
  ------------------
  131|  1.24k|        || !WPACKET_get_length(pkt, &msglen)
  ------------------
  |  Branch (131:12): [True: 0, False: 1.24k]
  ------------------
  132|  1.24k|        || msglen > INT_MAX)
  ------------------
  |  Branch (132:12): [True: 0, False: 1.24k]
  ------------------
  133|      0|        return 0;
  134|  1.24k|    s->init_num = (int)msglen;
  135|  1.24k|    s->init_off = 0;
  136|       |
  137|  1.24k|    return 1;
  138|  1.24k|}
tls_setup_handshake:
  141|  1.31k|{
  142|  1.31k|    int ver_min, ver_max, ok;
  143|  1.31k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.31k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
  144|  1.31k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.31k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  145|       |
  146|  1.31k|    if (!ssl3_init_finished_mac(s)) {
  ------------------
  |  Branch (146:9): [True: 0, False: 1.31k]
  ------------------
  147|       |        /* SSLfatal() already called */
  148|      0|        return 0;
  149|      0|    }
  150|       |
  151|       |    /* Reset any extension flags */
  152|  1.31k|    memset(s->ext.extflags, 0, sizeof(s->ext.extflags));
  153|       |
  154|  1.31k|    if (ssl_get_min_max_version(s, &ver_min, &ver_max, NULL) != 0) {
  ------------------
  |  Branch (154:9): [True: 7, False: 1.30k]
  ------------------
  155|      7|        SSLfatal(s, SSL_AD_PROTOCOL_VERSION, SSL_R_NO_PROTOCOLS_AVAILABLE);
  ------------------
  |  |  148|      7|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      7|    (ERR_new(),                                                  \
  |  |  |  |  151|      7|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      7|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      7|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  156|      7|        return 0;
  157|      7|    }
  158|       |
  159|       |    /* Sanity check that we have MD5-SHA1 if we need it */
  160|  1.30k|    if (sctx->ssl_digest_methods[SSL_MD_MD5_SHA1_IDX] == NULL) {
  ------------------
  |  |  196|  1.30k|#define SSL_MD_MD5_SHA1_IDX 9
  ------------------
  |  Branch (160:9): [True: 0, False: 1.30k]
  ------------------
  161|      0|        int negotiated_minversion;
  162|      0|        int md5sha1_needed_maxversion = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  163|      0|            ? DTLS1_VERSION
  ------------------
  |  |   28|      0|#define DTLS1_VERSION 0xFEFF
  ------------------
  164|      0|            : TLS1_1_VERSION;
  ------------------
  |  |   25|      0|#define TLS1_1_VERSION 0x0302
  ------------------
  165|       |
  166|       |        /* We don't have MD5-SHA1 - do we need it? */
  167|      0|        if (ssl_version_cmp(s, ver_max, md5sha1_needed_maxversion) <= 0) {
  ------------------
  |  Branch (167:13): [True: 0, False: 0]
  ------------------
  168|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  169|      0|                SSL_R_NO_SUITABLE_DIGEST_ALGORITHM,
  ------------------
  |  |  213|      0|#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297
  ------------------
  170|      0|                "The max supported SSL/TLS version needs the"
  171|      0|                " MD5-SHA1 digest but it is not available"
  172|      0|                " in the loaded providers. Use (D)TLSv1.2 or"
  173|      0|                " above, or load different providers");
  174|      0|            return 0;
  175|      0|        }
  176|       |
  177|      0|        ok = 1;
  178|       |
  179|       |        /* Don't allow TLSv1.1 or below to be negotiated */
  180|      0|        negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                      negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |   29|      0|#define DTLS1_2_VERSION 0xFEFD
  ------------------
                      negotiated_minversion = SSL_CONNECTION_IS_DTLS(s) ? DTLS1_2_VERSION : TLS1_2_VERSION;
  ------------------
  |  |   26|      0|#define TLS1_2_VERSION 0x0303
  ------------------
  181|      0|        if (ssl_version_cmp(s, ver_min, negotiated_minversion) < 0)
  ------------------
  |  Branch (181:13): [True: 0, False: 0]
  ------------------
  182|      0|            ok = SSL_set_min_proto_version(ssl, negotiated_minversion);
  ------------------
  |  | 1565|      0|    SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version, NULL)
  |  |  ------------------
  |  |  |  | 1377|      0|#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
  |  |  ------------------
  ------------------
  183|      0|        if (!ok) {
  ------------------
  |  Branch (183:13): [True: 0, False: 0]
  ------------------
  184|       |            /* Shouldn't happen */
  185|      0|            SSLfatal(s, SSL_AD_HANDSHAKE_FAILURE, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
  186|      0|            return 0;
  187|      0|        }
  188|      0|    }
  189|       |
  190|  1.30k|    ok = 0;
  191|  1.30k|    if (s->server) {
  ------------------
  |  Branch (191:9): [True: 0, False: 1.30k]
  ------------------
  192|      0|        STACK_OF(SSL_CIPHER) *ciphers = SSL_get_ciphers(ssl);
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
  193|      0|        int i;
  194|       |
  195|       |        /*
  196|       |         * Sanity check that the maximum version we accept has ciphers
  197|       |         * enabled. For clients we do this check during construction of the
  198|       |         * ClientHello.
  199|       |         */
  200|      0|        for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
  ------------------
  |  | 1005|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (200:21): [True: 0, False: 0]
  ------------------
  201|      0|            const SSL_CIPHER *c = sk_SSL_CIPHER_value(ciphers, i);
  ------------------
  |  | 1006|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
  202|      0|            int cipher_minprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  203|      0|                ? c->min_dtls
  204|      0|                : c->min_tls;
  205|      0|            int cipher_maxprotover = SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  206|      0|                ? c->max_dtls
  207|      0|                : c->max_tls;
  208|       |
  209|      0|            if (ssl_version_cmp(s, ver_max, cipher_minprotover) >= 0
  ------------------
  |  Branch (209:17): [True: 0, False: 0]
  ------------------
  210|      0|                && ssl_version_cmp(s, ver_max, cipher_maxprotover) <= 0) {
  ------------------
  |  Branch (210:20): [True: 0, False: 0]
  ------------------
  211|      0|                ok = 1;
  212|      0|                break;
  213|      0|            }
  214|      0|        }
  215|      0|        if (!ok) {
  ------------------
  |  Branch (215:13): [True: 0, False: 0]
  ------------------
  216|      0|            SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  152|      0|        ossl_statem_fatal)
  ------------------
                          SSLfatal_data(s, SSL_AD_HANDSHAKE_FAILURE,
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  217|      0|                SSL_R_NO_CIPHERS_AVAILABLE,
  ------------------
  |  |  195|      0|#define SSL_R_NO_CIPHERS_AVAILABLE 181
  ------------------
  218|      0|                "No ciphers enabled for max supported "
  219|      0|                "SSL/TLS version");
  220|      0|            return 0;
  221|      0|        }
  222|      0|        if (SSL_IS_FIRST_HANDSHAKE(s)) {
  ------------------
  |  |  277|      0|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 0, False: 0]
  |  |  ------------------
  |  |  278|      0|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  223|       |            /* N.B. s->session_ctx == s->ctx here */
  224|      0|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_accept);
  225|      0|        } else {
  226|       |            /* N.B. s->ctx may not equal s->session_ctx */
  227|      0|            ssl_tsan_counter(sctx, &sctx->stats.sess_accept_renegotiate);
  228|       |
  229|      0|            s->s3.tmp.cert_request = 0;
  230|      0|        }
  231|  1.30k|    } else {
  232|  1.30k|        if (SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|  1.30k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 1.30k, False: 0]
  |  |  ------------------
  |  |  278|  1.30k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  233|  1.30k|            ssl_tsan_counter(s->session_ctx, &s->session_ctx->stats.sess_connect);
  234|      0|        else
  235|      0|            ssl_tsan_counter(s->session_ctx,
  236|      0|                &s->session_ctx->stats.sess_connect_renegotiate);
  237|       |
  238|       |        /* mark client_random uninitialized */
  239|  1.30k|        memset(s->s3.client_random, 0, sizeof(s->s3.client_random));
  240|  1.30k|        s->hit = 0;
  241|       |
  242|  1.30k|        s->s3.tmp.cert_req = 0;
  243|       |
  244|  1.30k|        if (SSL_CONNECTION_IS_DTLS(s))
  ------------------
  |  |  258|  1.30k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.30k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.30k]
  |  |  ------------------
  ------------------
  245|      0|            s->statem.use_timer = 1;
  246|  1.30k|    }
  247|       |
  248|  1.30k|    return 1;
  249|  1.30k|}
tls_get_message_header:
 1554|  1.48k|{
 1555|       |    /* s->init_num < SSL3_HM_HEADER_LENGTH */
 1556|  1.48k|    int skip_message, i;
 1557|  1.48k|    uint8_t recvd_type;
 1558|  1.48k|    unsigned char *p;
 1559|  1.48k|    size_t l, readbytes;
 1560|  1.48k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.48k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1561|  1.48k|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|  1.48k|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1562|       |
 1563|  1.48k|    p = (unsigned char *)s->init_buf->data;
 1564|       |
 1565|  1.53k|    do {
 1566|  1.70k|        while (s->init_num < SSL3_HM_HEADER_LENGTH) {
  ------------------
  |  |  141|  1.70k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1566:16): [True: 1.53k, False: 162]
  ------------------
 1567|  1.53k|            i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, &recvd_type,
  ------------------
  |  |  221|  1.53k|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1568|  1.53k|                &p[s->init_num],
 1569|  1.53k|                SSL3_HM_HEADER_LENGTH - s->init_num,
  ------------------
  |  |  141|  1.53k|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1570|  1.53k|                0, &readbytes);
 1571|  1.53k|            if (i <= 0) {
  ------------------
  |  Branch (1571:17): [True: 1.37k, False: 169]
  ------------------
 1572|  1.37k|                s->rwstate = SSL_READING;
  ------------------
  |  |  934|  1.37k|#define SSL_READING 3
  ------------------
 1573|  1.37k|                return 0;
 1574|  1.37k|            }
 1575|    169|            if (recvd_type == SSL3_RT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  219|    169|#define SSL3_RT_CHANGE_CIPHER_SPEC 20
  ------------------
  |  Branch (1575:17): [True: 4, False: 165]
  ------------------
 1576|       |                /*
 1577|       |                 * A ChangeCipherSpec must be a single byte and may not occur
 1578|       |                 * in the middle of a handshake message.
 1579|       |                 */
 1580|      4|                if (s->init_num != 0 || readbytes != 1 || p[0] != SSL3_MT_CCS) {
  ------------------
  |  |  339|      2|#define SSL3_MT_CCS 1
  ------------------
  |  Branch (1580:21): [True: 0, False: 4]
  |  Branch (1580:41): [True: 2, False: 2]
  |  Branch (1580:59): [True: 1, False: 1]
  ------------------
 1581|      3|                    SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      3|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      3|    (ERR_new(),                                                  \
  |  |  |  |  151|      3|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      3|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      3|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1582|      3|                        SSL_R_BAD_CHANGE_CIPHER_SPEC);
 1583|      3|                    return 0;
 1584|      3|                }
 1585|      1|                if (s->statem.hand_state == TLS_ST_BEFORE
  ------------------
  |  Branch (1585:21): [True: 0, False: 1]
  ------------------
 1586|      0|                    && (s->s3.flags & TLS1_FLAGS_STATELESS) != 0) {
  ------------------
  |  |  304|      0|#define TLS1_FLAGS_STATELESS 0x0800
  ------------------
  |  Branch (1586:24): [True: 0, False: 0]
  ------------------
 1587|       |                    /*
 1588|       |                     * We are stateless and we received a CCS. Probably this is
 1589|       |                     * from a client between the first and second ClientHellos.
 1590|       |                     * We should ignore this, but return an error because we do
 1591|       |                     * not return success until we see the second ClientHello
 1592|       |                     * with a valid cookie.
 1593|       |                     */
 1594|      0|                    return 0;
 1595|      0|                }
 1596|      1|                s->s3.tmp.message_type = *mt = SSL3_MT_CHANGE_CIPHER_SPEC;
  ------------------
  |  |  337|      1|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
 1597|      1|                s->init_num = readbytes - 1;
 1598|      1|                s->init_msg = s->init_buf->data;
 1599|      1|                s->s3.tmp.message_size = readbytes;
 1600|      1|                return 1;
 1601|    165|            } else if (recvd_type != SSL3_RT_HANDSHAKE) {
  ------------------
  |  |  221|    165|#define SSL3_RT_HANDSHAKE 22
  ------------------
  |  Branch (1601:24): [True: 0, False: 165]
  ------------------
 1602|      0|                SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1603|      0|                    SSL_R_CCS_RECEIVED_EARLY);
 1604|      0|                return 0;
 1605|      0|            }
 1606|    165|            s->init_num += readbytes;
 1607|    165|        }
 1608|       |
 1609|    162|        skip_message = 0;
 1610|    162|        if (!s->server)
  ------------------
  |  Branch (1610:13): [True: 162, False: 0]
  ------------------
 1611|    162|            if (s->statem.hand_state != TLS_ST_OK
  ------------------
  |  Branch (1611:17): [True: 162, False: 0]
  ------------------
 1612|    162|                && p[0] == SSL3_MT_HELLO_REQUEST)
  ------------------
  |  |  312|    162|#define SSL3_MT_HELLO_REQUEST 0
  ------------------
  |  Branch (1612:20): [True: 54, False: 108]
  ------------------
 1613|       |                /*
 1614|       |                 * The server may always send 'Hello Request' messages --
 1615|       |                 * we are doing a handshake anyway now, so ignore them if
 1616|       |                 * their format is correct. Does not count for 'Finished'
 1617|       |                 * MAC.
 1618|       |                 */
 1619|     54|                if (p[1] == 0 && p[2] == 0 && p[3] == 0) {
  ------------------
  |  Branch (1619:21): [True: 53, False: 1]
  |  Branch (1619:34): [True: 52, False: 1]
  |  Branch (1619:47): [True: 50, False: 2]
  ------------------
 1620|     50|                    s->init_num = 0;
 1621|     50|                    skip_message = 1;
 1622|       |
 1623|     50|                    if (s->msg_callback)
  ------------------
  |  Branch (1623:25): [True: 0, False: 50]
  ------------------
 1624|      0|                        s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1625|      0|                            p, SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1626|      0|                            s->msg_callback_arg);
 1627|     50|                }
 1628|    162|    } while (skip_message);
  ------------------
  |  Branch (1628:14): [True: 50, False: 112]
  ------------------
 1629|       |    /* s->init_num == SSL3_HM_HEADER_LENGTH */
 1630|       |
 1631|    112|    *mt = *p;
 1632|    112|    s->s3.tmp.message_type = *(p++);
 1633|       |
 1634|    112|    if (RECORD_LAYER_is_sslv2_record(&s->rlayer)) {
  ------------------
  |  Branch (1634:9): [True: 0, False: 112]
  ------------------
 1635|       |        /*
 1636|       |         * Only happens with SSLv3+ in an SSLv2 backward compatible
 1637|       |         * ClientHello
 1638|       |         *
 1639|       |         * Total message size is the remaining record bytes to read
 1640|       |         * plus the SSL3_HM_HEADER_LENGTH bytes that we already read
 1641|       |         */
 1642|      0|        l = s->rlayer.tlsrecs[0].length + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1643|      0|        s->s3.tmp.message_size = l;
 1644|       |
 1645|      0|        s->init_msg = s->init_buf->data;
 1646|      0|        s->init_num = SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1647|    112|    } else {
 1648|    112|        n2l3(p, l);
  ------------------
  |  |  196|    112|#define n2l3(c, l) ((l = (((unsigned long)((c)[0])) << 16) | (((unsigned long)((c)[1])) << 8) | (((unsigned long)((c)[2])))), (c) += 3)
  ------------------
 1649|       |        /* BUF_MEM_grow takes an 'int' parameter */
 1650|    112|        if (l > (INT_MAX - SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|    112|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
  |  Branch (1650:13): [True: 0, False: 112]
  ------------------
 1651|      0|            SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER,
  ------------------
  |  |  148|      0|#define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL)
  |  |  ------------------
  |  |  |  |  150|      0|    (ERR_new(),                                                  \
  |  |  |  |  151|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  152|      0|        ossl_statem_fatal)
  |  |  ------------------
  ------------------
 1652|      0|                SSL_R_EXCESSIVE_MESSAGE_SIZE);
 1653|      0|            return 0;
 1654|      0|        }
 1655|    112|        s->s3.tmp.message_size = l;
 1656|       |
 1657|    112|        s->init_msg = s->init_buf->data + SSL3_HM_HEADER_LENGTH;
  ------------------
  |  |  141|    112|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1658|    112|        s->init_num = 0;
 1659|    112|    }
 1660|       |
 1661|    112|    return 1;
 1662|    112|}
tls_get_message_body:
 1665|     85|{
 1666|     85|    size_t n, readbytes;
 1667|     85|    unsigned char *p;
 1668|     85|    int i;
 1669|     85|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|     85|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 1670|     85|    SSL *ussl = SSL_CONNECTION_GET_USER_SSL(s);
  ------------------
  |  |   28|     85|#define SSL_CONNECTION_GET_USER_SSL(sc) ((sc)->user_ssl)
  ------------------
 1671|       |
 1672|     85|    if (s->s3.tmp.message_type == SSL3_MT_CHANGE_CIPHER_SPEC) {
  ------------------
  |  |  337|     85|#define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
  ------------------
  |  Branch (1672:9): [True: 0, False: 85]
  ------------------
 1673|       |        /* We've already read everything in */
 1674|      0|        *len = (unsigned long)s->init_num;
 1675|      0|        return 1;
 1676|      0|    }
 1677|       |
 1678|     85|    p = s->init_msg;
 1679|     85|    n = s->s3.tmp.message_size - s->init_num;
 1680|    170|    while (n > 0) {
  ------------------
  |  Branch (1680:12): [True: 120, False: 50]
  ------------------
 1681|    120|        i = ssl->method->ssl_read_bytes(ssl, SSL3_RT_HANDSHAKE, NULL,
  ------------------
  |  |  221|    120|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1682|    120|            &p[s->init_num], n, 0, &readbytes);
 1683|    120|        if (i <= 0) {
  ------------------
  |  Branch (1683:13): [True: 35, False: 85]
  ------------------
 1684|     35|            s->rwstate = SSL_READING;
  ------------------
  |  |  934|     35|#define SSL_READING 3
  ------------------
 1685|     35|            *len = 0;
 1686|     35|            return 0;
 1687|     35|        }
 1688|     85|        s->init_num += readbytes;
 1689|     85|        n -= readbytes;
 1690|     85|    }
 1691|       |
 1692|       |    /*
 1693|       |     * If receiving Finished, record MAC of prior handshake messages for
 1694|       |     * Finished verification.
 1695|       |     */
 1696|     50|    if (*(s->init_buf->data) == SSL3_MT_FINISHED && !ssl3_take_mac(s)) {
  ------------------
  |  |  324|    100|#define SSL3_MT_FINISHED 20
  ------------------
  |  Branch (1696:9): [True: 0, False: 50]
  |  Branch (1696:53): [True: 0, False: 0]
  ------------------
 1697|       |        /* SSLfatal() already called */
 1698|      0|        *len = 0;
 1699|      0|        return 0;
 1700|      0|    }
 1701|       |
 1702|       |    /* Feed this message into MAC computation. */
 1703|     50|    if (RECORD_LAYER_is_sslv2_record(&s->rlayer)) {
  ------------------
  |  Branch (1703:9): [True: 0, False: 50]
  ------------------
 1704|      0|        if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1704:13): [True: 0, False: 0]
  ------------------
 1705|      0|                s->init_num)) {
 1706|       |            /* SSLfatal() already called */
 1707|      0|            *len = 0;
 1708|      0|            return 0;
 1709|      0|        }
 1710|      0|        if (s->msg_callback)
  ------------------
  |  Branch (1710:13): [True: 0, False: 0]
  ------------------
 1711|      0|            s->msg_callback(0, SSL2_VERSION, 0, s->init_buf->data,
  ------------------
  |  |   23|      0|#define SSL2_VERSION 0x0002
  ------------------
 1712|      0|                (size_t)s->init_num, ussl, s->msg_callback_arg);
 1713|     50|    } else {
 1714|       |        /*
 1715|       |         * We defer feeding in the HRR until later. We'll do it as part of
 1716|       |         * processing the message
 1717|       |         * The TLsv1.3 handshake transcript stops at the ClientFinished
 1718|       |         * message.
 1719|       |         */
 1720|     50|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
 1721|       |        /* KeyUpdate and NewSessionTicket do not need to be added */
 1722|     50|        if (!SSL_CONNECTION_IS_TLS13(s)
  ------------------
  |  |  265|    100|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|    100|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|     50|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|     50|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 50, False: 0]
  |  |  ------------------
  |  |  266|     50|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|     50|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|    100|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 50, False: 0]
  |  |  ------------------
  |  |  267|    100|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|     50|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|     50|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 50]
  |  |  ------------------
  ------------------
 1723|      0|            || (s->s3.tmp.message_type != SSL3_MT_NEWSESSION_TICKET
  ------------------
  |  |  315|      0|#define SSL3_MT_NEWSESSION_TICKET 4
  ------------------
  |  Branch (1723:17): [True: 0, False: 0]
  ------------------
 1724|     50|                && s->s3.tmp.message_type != SSL3_MT_KEY_UPDATE)) {
  ------------------
  |  |  328|      0|#define SSL3_MT_KEY_UPDATE 24
  ------------------
  |  Branch (1724:20): [True: 0, False: 0]
  ------------------
 1725|     50|            if (s->s3.tmp.message_type != SSL3_MT_SERVER_HELLO
  ------------------
  |  |  314|    100|#define SSL3_MT_SERVER_HELLO 2
  ------------------
  |  Branch (1725:17): [True: 0, False: 50]
  ------------------
 1726|     50|                || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  | 1720|     50|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|     50|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
                              || s->init_num < SERVER_HELLO_RANDOM_OFFSET + SSL3_RANDOM_SIZE
  ------------------
  |  |  137|    100|#define SSL3_RANDOM_SIZE 32
  ------------------
  |  Branch (1726:20): [True: 50, False: 0]
  ------------------
 1727|      0|                || memcmp(hrrrandom,
  ------------------
  |  Branch (1727:20): [True: 0, False: 0]
  ------------------
 1728|      0|                       s->init_buf->data + SERVER_HELLO_RANDOM_OFFSET,
  ------------------
  |  | 1720|      0|#define SERVER_HELLO_RANDOM_OFFSET (SSL3_HM_HEADER_LENGTH + 2)
  |  |  ------------------
  |  |  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  |  |  ------------------
  ------------------
 1729|      0|                       SSL3_RANDOM_SIZE)
  ------------------
  |  |  137|      0|#define SSL3_RANDOM_SIZE 32
  ------------------
 1730|     50|                    != 0) {
 1731|     50|                if (!ssl3_finish_mac(s, (unsigned char *)s->init_buf->data,
  ------------------
  |  Branch (1731:21): [True: 0, False: 50]
  ------------------
 1732|     50|                        s->init_num + SSL3_HM_HEADER_LENGTH)) {
  ------------------
  |  |  141|     50|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1733|       |                    /* SSLfatal() already called */
 1734|      0|                    *len = 0;
 1735|      0|                    return 0;
 1736|      0|                }
 1737|     50|            }
 1738|     50|        }
 1739|     50|        if (s->msg_callback)
  ------------------
  |  Branch (1739:13): [True: 0, False: 50]
  ------------------
 1740|      0|            s->msg_callback(0, s->version, SSL3_RT_HANDSHAKE, s->init_buf->data,
  ------------------
  |  |  221|      0|#define SSL3_RT_HANDSHAKE 22
  ------------------
 1741|      0|                (size_t)s->init_num + SSL3_HM_HEADER_LENGTH, ussl,
  ------------------
  |  |  141|      0|#define SSL3_HM_HEADER_LENGTH 4
  ------------------
 1742|      0|                s->msg_callback_arg);
 1743|     50|    }
 1744|       |
 1745|     50|    *len = s->init_num;
 1746|     50|    return 1;
 1747|     50|}
ssl_allow_compression:
 1806|  1.24k|{
 1807|  1.24k|    if (s->options & SSL_OP_NO_COMPRESSION)
  ------------------
  |  |  394|  1.24k|#define SSL_OP_NO_COMPRESSION SSL_OP_BIT(17)
  |  |  ------------------
  |  |  |  |  350|  1.24k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1807:9): [True: 1.24k, False: 0]
  ------------------
 1808|  1.24k|        return 0;
 1809|      0|    return ssl_security(s, SSL_SECOP_COMPRESSION, 0, 0, NULL);
  ------------------
  |  | 2778|      0|#define SSL_SECOP_COMPRESSION (15 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 1810|  1.24k|}
ssl_version_cmp:
 1821|   315k|{
 1822|   315k|    int dtls = SSL_CONNECTION_IS_DTLS(s);
  ------------------
  |  |  258|   315k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   315k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|   315k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 1823|       |
 1824|   315k|    if (versiona == versionb)
  ------------------
  |  Branch (1824:9): [True: 143k, False: 172k]
  ------------------
 1825|   143k|        return 0;
 1826|   172k|    if (!dtls)
  ------------------
  |  Branch (1826:9): [True: 172k, False: 0]
  ------------------
 1827|   172k|        return versiona < versionb ? -1 : 1;
  ------------------
  |  Branch (1827:16): [True: 135k, False: 36.1k]
  ------------------
 1828|      0|    return DTLS_VERSION_LT(versiona, versionb) ? -1 : 1;
  ------------------
  |  |   60|      0|#define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (60:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1829|   172k|}
ssl_set_version_bound:
 2080|  4.13k|{
 2081|  4.13k|    int valid_tls;
 2082|  4.13k|    int valid_dtls;
 2083|       |
 2084|  4.13k|    if (version == 0) {
  ------------------
  |  Branch (2084:9): [True: 2.04k, False: 2.08k]
  ------------------
 2085|  2.04k|        *bound = version;
 2086|  2.04k|        return 1;
 2087|  2.04k|    }
 2088|       |
 2089|  2.08k|    valid_tls = version >= SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   23|  4.16k|#define SSL3_VERSION 0x0300
  ------------------
                  valid_tls = version >= SSL3_VERSION && version <= TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   50|  2.08k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  4.16k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  |  Branch (2089:17): [True: 2.08k, False: 0]
  |  Branch (2089:44): [True: 2.08k, False: 0]
  ------------------
 2090|  2.08k|    valid_dtls =
 2091|       |        /* We support client side pre-standardisation version of DTLS */
 2092|  2.08k|        (version == DTLS1_BAD_VER)
  ------------------
  |  |   30|  2.08k|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2092:9): [True: 0, False: 2.08k]
  ------------------
 2093|  2.08k|        || (DTLS_VERSION_LE(version, DTLS_MAX_VERSION_INTERNAL)
  ------------------
  |  |   61|  4.16k|#define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|  2.08k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  2.08k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 2.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|  2.08k|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  2.08k|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 2.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (61:33): [True: 0, False: 2.08k]
  |  |  ------------------
  ------------------
 2094|      0|            && DTLS_VERSION_GE(version, DTLS1_VERSION));
  ------------------
  |  |   59|      0|#define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DTLS_VERSION_GE(v1, v2) (dtls_ver_ordinal(v1) <= dtls_ver_ordinal(v2))
  |  |  ------------------
  |  |  |  |   57|      0|#define dtls_ver_ordinal(v1) (((v1) == DTLS1_BAD_VER) ? 0xff00 : (v1))
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (57:31): [Folded, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (59:33): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|       |
 2096|  2.08k|    if (!valid_tls && !valid_dtls)
  ------------------
  |  Branch (2096:9): [True: 0, False: 2.08k]
  |  Branch (2096:23): [True: 0, False: 0]
  ------------------
 2097|      0|        return 0;
 2098|       |
 2099|       |    /*-
 2100|       |     * Restrict TLS methods to TLS protocol versions.
 2101|       |     * Restrict DTLS methods to DTLS protocol versions.
 2102|       |     * Note, DTLS version numbers are decreasing, use comparison macros.
 2103|       |     *
 2104|       |     * Note that for both lower-bounds we use explicit versions, not
 2105|       |     * (D)TLS_MIN_VERSION.  This is because we don't want to break user
 2106|       |     * configurations.  If the MIN (supported) version ever rises, the user's
 2107|       |     * "floor" remains valid even if no longer available.  We don't expect the
 2108|       |     * MAX ceiling to ever get lower, so making that variable makes sense.
 2109|       |     *
 2110|       |     * We ignore attempts to set bounds on version-inflexible methods,
 2111|       |     * returning success.
 2112|       |     */
 2113|  2.08k|    switch (method_version) {
 2114|      0|    default:
  ------------------
  |  Branch (2114:5): [True: 0, False: 2.08k]
  ------------------
 2115|      0|        break;
 2116|       |
 2117|  2.08k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  2.08k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2117:5): [True: 2.08k, False: 0]
  ------------------
 2118|  2.08k|        if (valid_tls)
  ------------------
  |  Branch (2118:13): [True: 2.08k, False: 0]
  ------------------
 2119|  2.08k|            *bound = version;
 2120|  2.08k|        break;
 2121|       |
 2122|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2122:5): [True: 0, False: 2.08k]
  ------------------
 2123|      0|        if (valid_dtls)
  ------------------
  |  Branch (2123:13): [True: 0, False: 0]
  ------------------
 2124|      0|            *bound = version;
 2125|      0|        break;
 2126|  2.08k|    }
 2127|  2.08k|    return 1;
 2128|  2.08k|}
ssl_get_min_max_version:
 2455|  11.3k|{
 2456|  11.3k|    int version, tmp_real_max;
 2457|  11.3k|    int hole;
 2458|  11.3k|    const SSL_METHOD *method;
 2459|  11.3k|    const version_info *table;
 2460|  11.3k|    const version_info *vent;
 2461|  11.3k|    const SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  11.3k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2462|       |
 2463|  11.3k|    switch (ssl->method->version) {
 2464|      0|    default:
  ------------------
  |  Branch (2464:5): [True: 0, False: 11.3k]
  ------------------
 2465|       |        /*
 2466|       |         * If this SSL handle is not from a version flexible method we don't
 2467|       |         * (and never did) check min/max FIPS or Suite B constraints.  Hope
 2468|       |         * that's OK.  It is up to the caller to not choose fixed protocol
 2469|       |         * versions they don't want.  If not, then easy to fix, just return
 2470|       |         * ssl_method_error(s, s->method)
 2471|       |         */
 2472|      0|        *min_version = *max_version = s->version;
 2473|       |        /*
 2474|       |         * Providing a real_max only makes sense where we're using a version
 2475|       |         * flexible method.
 2476|       |         */
 2477|      0|        if (!ossl_assert(real_max == NULL))
  ------------------
  |  |   52|      0|#define ossl_assert(x) ossl_assert_int((x) != 0, "Assertion failed: " #x, \
  |  |   53|      0|    __FILE__, __LINE__)
  ------------------
  |  Branch (2477:13): [True: 0, False: 0]
  ------------------
 2478|      0|            return ERR_R_INTERNAL_ERROR;
  ------------------
  |  |  355|      0|#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
  |  |  ------------------
  |  |  |  |  351|      0|#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2479|      0|        return 0;
 2480|  11.3k|    case TLS_ANY_VERSION:
  ------------------
  |  |   40|  11.3k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2480:5): [True: 11.3k, False: 0]
  ------------------
 2481|  11.3k|        table = tls_version_table;
 2482|  11.3k|        break;
 2483|      0|    case DTLS_ANY_VERSION:
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2483:5): [True: 0, False: 11.3k]
  ------------------
 2484|      0|        table = dtls_version_table;
 2485|      0|        break;
 2486|  11.3k|    }
 2487|       |
 2488|       |    /*
 2489|       |     * SSL_OP_NO_X disables all protocols above X *if* there are some protocols
 2490|       |     * below X enabled. This is required in order to maintain the "version
 2491|       |     * capability" vector contiguous. Any versions with a NULL client method
 2492|       |     * (protocol version client is disabled at compile-time) is also a "hole".
 2493|       |     *
 2494|       |     * Our initial state is hole == 1, version == 0.  That is, versions above
 2495|       |     * the first version in the method table are disabled (a "hole" above
 2496|       |     * the valid protocol entries) and we don't have a selected version yet.
 2497|       |     *
 2498|       |     * Whenever "hole == 1", and we hit an enabled method, its version becomes
 2499|       |     * the selected version.  We're no longer in a hole, so "hole" becomes 0.
 2500|       |     *
 2501|       |     * If "hole == 0" and we hit an enabled method, we support a contiguous
 2502|       |     * range of at least two methods.  If we hit a disabled method,
 2503|       |     * then hole becomes true again, but nothing else changes yet,
 2504|       |     * because all the remaining methods may be disabled too.
 2505|       |     * If we again hit an enabled method after the new hole, it becomes
 2506|       |     * selected, as we start from scratch.
 2507|       |     */
 2508|  11.3k|    *min_version = version = 0;
 2509|  11.3k|    hole = 1;
 2510|  11.3k|    if (real_max != NULL)
  ------------------
  |  Branch (2510:9): [True: 0, False: 11.3k]
  ------------------
 2511|      0|        *real_max = 0;
 2512|  11.3k|    tmp_real_max = 0;
 2513|  68.2k|    for (vent = table; vent->version != 0; ++vent) {
  ------------------
  |  Branch (2513:24): [True: 56.9k, False: 11.3k]
  ------------------
 2514|       |        /*
 2515|       |         * A table entry with a NULL client method is still a hole in the
 2516|       |         * "version capability" vector.
 2517|       |         */
 2518|  56.9k|        if (vent->cmeth == NULL) {
  ------------------
  |  Branch (2518:13): [True: 0, False: 56.9k]
  ------------------
 2519|      0|            hole = 1;
 2520|      0|            tmp_real_max = 0;
 2521|      0|            continue;
 2522|      0|        }
 2523|  56.9k|        method = vent->cmeth();
 2524|       |
 2525|  56.9k|        if (hole == 1 && tmp_real_max == 0)
  ------------------
  |  Branch (2525:13): [True: 34.2k, False: 22.6k]
  |  Branch (2525:26): [True: 11.3k, False: 22.8k]
  ------------------
 2526|  11.3k|            tmp_real_max = vent->version;
 2527|       |
 2528|  56.9k|        if (ssl_method_error(s, method) != 0) {
  ------------------
  |  Branch (2528:13): [True: 34.2k, False: 22.6k]
  ------------------
 2529|  34.2k|            hole = 1;
 2530|  34.2k|        } else if (!hole) {
  ------------------
  |  Branch (2530:20): [True: 11.2k, False: 11.3k]
  ------------------
 2531|  11.2k|            *min_version = method->version;
 2532|  11.3k|        } else {
 2533|  11.3k|            if (real_max != NULL && tmp_real_max != 0)
  ------------------
  |  Branch (2533:17): [True: 0, False: 11.3k]
  |  Branch (2533:37): [True: 0, False: 0]
  ------------------
 2534|      0|                *real_max = tmp_real_max;
 2535|  11.3k|            version = method->version;
 2536|  11.3k|            *min_version = version;
 2537|  11.3k|            hole = 0;
 2538|  11.3k|        }
 2539|  56.9k|    }
 2540|       |
 2541|  11.3k|    *max_version = version;
 2542|       |
 2543|       |    /* Fail if everything is disabled */
 2544|  11.3k|    if (version == 0)
  ------------------
  |  Branch (2544:9): [True: 7, False: 11.3k]
  ------------------
 2545|      7|        return SSL_R_NO_PROTOCOLS_AVAILABLE;
  ------------------
  |  |  205|      7|#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
  ------------------
 2546|       |
 2547|  11.3k|    return 0;
 2548|  11.3k|}
ssl_set_client_hello_version:
 2559|  1.30k|{
 2560|  1.30k|    int ver_min, ver_max, ret;
 2561|       |
 2562|       |    /*
 2563|       |     * In a renegotiation we always send the same client_version that we sent
 2564|       |     * last time, regardless of which version we eventually negotiated.
 2565|       |     */
 2566|  1.30k|    if (!SSL_IS_FIRST_HANDSHAKE(s))
  ------------------
  |  |  277|  1.30k|#define SSL_IS_FIRST_HANDSHAKE(s) ((s)->s3.tmp.finish_md_len == 0 \
  |  |  ------------------
  |  |  |  Branch (277:36): [True: 1.30k, False: 0]
  |  |  ------------------
  |  |  278|  1.30k|    || (s)->s3.tmp.peer_finish_md_len == 0)
  |  |  ------------------
  |  |  |  Branch (278:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2567|      0|        return 0;
 2568|       |
 2569|  1.30k|    ret = ssl_get_min_max_version(s, &ver_min, &ver_max, NULL);
 2570|       |
 2571|  1.30k|    if (ret != 0)
  ------------------
  |  Branch (2571:9): [True: 0, False: 1.30k]
  ------------------
 2572|      0|        return ret;
 2573|       |
 2574|  1.30k|    s->version = ver_max;
 2575|       |
 2576|  1.30k|    if (SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  1.30k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  1.30k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  1.30k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 1.30k]
  |  |  ------------------
  ------------------
 2577|      0|        if (ver_max == DTLS1_BAD_VER) {
  ------------------
  |  |   30|      0|#define DTLS1_BAD_VER 0x0100
  ------------------
  |  Branch (2577:13): [True: 0, False: 0]
  ------------------
 2578|       |            /*
 2579|       |             * Even though this is technically before version negotiation,
 2580|       |             * because we have asked for DTLS1_BAD_VER we will never negotiate
 2581|       |             * anything else, and this has impacts on the record layer for when
 2582|       |             * we read the ServerHello. So we need to tell the record layer
 2583|       |             * about this immediately.
 2584|       |             */
 2585|      0|            if (!ssl_set_record_protocol_version(s, ver_max))
  ------------------
  |  Branch (2585:17): [True: 0, False: 0]
  ------------------
 2586|      0|                return 0;
 2587|      0|        }
 2588|  1.30k|    } else if (ver_max > TLS1_2_VERSION) {
  ------------------
  |  |   26|  1.30k|#define TLS1_2_VERSION 0x0303
  ------------------
  |  Branch (2588:16): [True: 1.30k, False: 5]
  ------------------
 2589|       |        /* TLS1.3 always uses TLS1.2 in the legacy_version field */
 2590|  1.30k|        ver_max = TLS1_2_VERSION;
  ------------------
  |  |   26|  1.30k|#define TLS1_2_VERSION 0x0303
  ------------------
 2591|  1.30k|    }
 2592|       |
 2593|  1.30k|    s->client_version = ver_max;
 2594|  1.30k|    return 0;
 2595|  1.30k|}
get_ca_names:
 2742|  1.23k|{
 2743|  1.23k|    const STACK_OF(X509_NAME) *ca_sk = NULL;
 2744|  1.23k|    SSL *ssl = SSL_CONNECTION_GET_SSL(s);
  ------------------
  |  |   27|  1.23k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 2745|       |
 2746|  1.23k|    if (s->server) {
  ------------------
  |  Branch (2746:9): [True: 0, False: 1.23k]
  ------------------
 2747|      0|        ca_sk = SSL_get_client_CA_list(ssl);
 2748|      0|        if (ca_sk != NULL && sk_X509_NAME_num(ca_sk) == 0)
  ------------------
  |  |   56|      0|#define sk_X509_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_X509_NAME_sk_type(sk))
  ------------------
  |  Branch (2748:13): [True: 0, False: 0]
  |  Branch (2748:30): [True: 0, False: 0]
  ------------------
 2749|      0|            ca_sk = NULL;
 2750|      0|    }
 2751|       |
 2752|  1.23k|    if (ca_sk == NULL)
  ------------------
  |  Branch (2752:9): [True: 1.23k, False: 0]
  ------------------
 2753|  1.23k|        ca_sk = SSL_get0_CA_list(ssl);
 2754|       |
 2755|  1.23k|    return ca_sk;
 2756|  1.23k|}
statem_lib.c:ssl_method_error:
 1901|  56.9k|{
 1902|  56.9k|    int version = method->version;
 1903|       |
 1904|  56.9k|    if ((s->min_proto_version != 0 && ssl_version_cmp(s, version, s->min_proto_version) < 0) || ssl_security(s, SSL_SECOP_VERSION, 0, version, NULL) == 0)
  ------------------
  |  | 2766|  22.8k|#define SSL_SECOP_VERSION (9 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|  22.8k|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
  |  Branch (1904:10): [True: 56.9k, False: 0]
  |  Branch (1904:39): [True: 34.0k, False: 22.8k]
  |  Branch (1904:97): [True: 94, False: 22.7k]
  ------------------
 1905|  34.1k|        return SSL_R_VERSION_TOO_LOW;
  ------------------
  |  |  367|  34.1k|#define SSL_R_VERSION_TOO_LOW 396
  ------------------
 1906|       |
 1907|  22.7k|    if (s->max_proto_version != 0 && ssl_version_cmp(s, version, s->max_proto_version) > 0)
  ------------------
  |  Branch (1907:9): [True: 137, False: 22.5k]
  |  Branch (1907:38): [True: 56, False: 81]
  ------------------
 1908|     56|        return SSL_R_VERSION_TOO_HIGH;
  ------------------
  |  |  366|     56|#define SSL_R_VERSION_TOO_HIGH 166
  ------------------
 1909|       |
 1910|  22.6k|    if ((s->options & method->mask) != 0)
  ------------------
  |  Branch (1910:9): [True: 0, False: 22.6k]
  ------------------
 1911|      0|        return SSL_R_UNSUPPORTED_PROTOCOL;
  ------------------
  |  |  361|      0|#define SSL_R_UNSUPPORTED_PROTOCOL 258
  ------------------
 1912|  22.6k|    if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2342|  22.6k|#define SSL_METHOD_NO_SUITEB (1U << 1)
  ------------------
                  if ((method->flags & SSL_METHOD_NO_SUITEB) != 0 && tls1_suiteb(s))
  ------------------
  |  | 2029|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2029:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1912:9): [True: 0, False: 22.6k]
  ------------------
 1913|      0|        return SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE;
  ------------------
  |  |   25|      0|#define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE 158
  ------------------
 1914|       |
 1915|  22.6k|    return 0;
 1916|  22.6k|}

tls1_alert_code:
  526|  1.11k|{
  527|  1.11k|    switch (code) {
  528|      0|    case SSL_AD_CLOSE_NOTIFY:
  ------------------
  |  | 1209|      0|#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
  |  |  ------------------
  |  |  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  |  |  ------------------
  ------------------
  |  Branch (528:5): [True: 0, False: 1.11k]
  ------------------
  529|      0|        return SSL3_AD_CLOSE_NOTIFY;
  ------------------
  |  |  252|      0|#define SSL3_AD_CLOSE_NOTIFY 0
  ------------------
  530|     30|    case SSL_AD_UNEXPECTED_MESSAGE:
  ------------------
  |  | 1211|     30|#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE
  |  |  ------------------
  |  |  |  |  253|     30|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (530:5): [True: 30, False: 1.08k]
  ------------------
  531|     30|        return SSL3_AD_UNEXPECTED_MESSAGE;
  ------------------
  |  |  253|     30|#define SSL3_AD_UNEXPECTED_MESSAGE 10 /* fatal */
  ------------------
  532|      0|    case SSL_AD_BAD_RECORD_MAC:
  ------------------
  |  | 1213|      0|#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC
  |  |  ------------------
  |  |  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (532:5): [True: 0, False: 1.11k]
  ------------------
  533|      0|        return SSL3_AD_BAD_RECORD_MAC;
  ------------------
  |  |  254|      0|#define SSL3_AD_BAD_RECORD_MAC 20 /* fatal */
  ------------------
  534|      0|    case SSL_AD_DECRYPTION_FAILED:
  ------------------
  |  | 1214|      0|#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED
  |  |  ------------------
  |  |  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  |  |  ------------------
  ------------------
  |  Branch (534:5): [True: 0, False: 1.11k]
  ------------------
  535|      0|        return TLS1_AD_DECRYPTION_FAILED;
  ------------------
  |  |   57|      0|#define TLS1_AD_DECRYPTION_FAILED 21
  ------------------
  536|      1|    case SSL_AD_RECORD_OVERFLOW:
  ------------------
  |  | 1215|      1|#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW
  |  |  ------------------
  |  |  |  |   58|      1|#define TLS1_AD_RECORD_OVERFLOW 22
  |  |  ------------------
  ------------------
  |  Branch (536:5): [True: 1, False: 1.11k]
  ------------------
  537|      1|        return TLS1_AD_RECORD_OVERFLOW;
  ------------------
  |  |   58|      1|#define TLS1_AD_RECORD_OVERFLOW 22
  ------------------
  538|      0|    case SSL_AD_DECOMPRESSION_FAILURE:
  ------------------
  |  | 1217|      0|#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE
  |  |  ------------------
  |  |  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (538:5): [True: 0, False: 1.11k]
  ------------------
  539|      0|        return SSL3_AD_DECOMPRESSION_FAILURE;
  ------------------
  |  |  255|      0|#define SSL3_AD_DECOMPRESSION_FAILURE 30 /* fatal */
  ------------------
  540|      1|    case SSL_AD_HANDSHAKE_FAILURE:
  ------------------
  |  | 1219|      1|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      1|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (540:5): [True: 1, False: 1.11k]
  ------------------
  541|      1|        return SSL3_AD_HANDSHAKE_FAILURE;
  ------------------
  |  |  256|      1|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  ------------------
  542|      0|    case SSL_AD_NO_CERTIFICATE:
  ------------------
  |  | 1221|      0|#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE
  |  |  ------------------
  |  |  |  |  257|      0|#define SSL3_AD_NO_CERTIFICATE 41
  |  |  ------------------
  ------------------
  |  Branch (542:5): [True: 0, False: 1.11k]
  ------------------
  543|      0|        return -1;
  544|      0|    case SSL_AD_BAD_CERTIFICATE:
  ------------------
  |  | 1222|      0|#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE
  |  |  ------------------
  |  |  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  |  |  ------------------
  ------------------
  |  Branch (544:5): [True: 0, False: 1.11k]
  ------------------
  545|      0|        return SSL3_AD_BAD_CERTIFICATE;
  ------------------
  |  |  258|      0|#define SSL3_AD_BAD_CERTIFICATE 42
  ------------------
  546|      0|    case SSL_AD_UNSUPPORTED_CERTIFICATE:
  ------------------
  |  | 1223|      0|#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
  |  |  ------------------
  |  |  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  |  |  ------------------
  ------------------
  |  Branch (546:5): [True: 0, False: 1.11k]
  ------------------
  547|      0|        return SSL3_AD_UNSUPPORTED_CERTIFICATE;
  ------------------
  |  |  259|      0|#define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
  ------------------
  548|      0|    case SSL_AD_CERTIFICATE_REVOKED:
  ------------------
  |  | 1224|      0|#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED
  |  |  ------------------
  |  |  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  |  |  ------------------
  ------------------
  |  Branch (548:5): [True: 0, False: 1.11k]
  ------------------
  549|      0|        return SSL3_AD_CERTIFICATE_REVOKED;
  ------------------
  |  |  260|      0|#define SSL3_AD_CERTIFICATE_REVOKED 44
  ------------------
  550|      0|    case SSL_AD_CERTIFICATE_EXPIRED:
  ------------------
  |  | 1225|      0|#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED
  |  |  ------------------
  |  |  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  |  |  ------------------
  ------------------
  |  Branch (550:5): [True: 0, False: 1.11k]
  ------------------
  551|      0|        return SSL3_AD_CERTIFICATE_EXPIRED;
  ------------------
  |  |  261|      0|#define SSL3_AD_CERTIFICATE_EXPIRED 45
  ------------------
  552|      0|    case SSL_AD_CERTIFICATE_UNKNOWN:
  ------------------
  |  | 1226|      0|#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN
  |  |  ------------------
  |  |  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  |  |  ------------------
  ------------------
  |  Branch (552:5): [True: 0, False: 1.11k]
  ------------------
  553|      0|        return SSL3_AD_CERTIFICATE_UNKNOWN;
  ------------------
  |  |  262|      0|#define SSL3_AD_CERTIFICATE_UNKNOWN 46
  ------------------
  554|     25|    case SSL_AD_ILLEGAL_PARAMETER:
  ------------------
  |  | 1228|     25|#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER
  |  |  ------------------
  |  |  |  |  263|     25|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (554:5): [True: 25, False: 1.09k]
  ------------------
  555|     25|        return SSL3_AD_ILLEGAL_PARAMETER;
  ------------------
  |  |  263|     25|#define SSL3_AD_ILLEGAL_PARAMETER 47 /* fatal */
  ------------------
  556|      0|    case SSL_AD_UNKNOWN_CA:
  ------------------
  |  | 1230|      0|#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA
  |  |  ------------------
  |  |  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (556:5): [True: 0, False: 1.11k]
  ------------------
  557|      0|        return TLS1_AD_UNKNOWN_CA;
  ------------------
  |  |   59|      0|#define TLS1_AD_UNKNOWN_CA 48 /* fatal */
  ------------------
  558|      0|    case SSL_AD_ACCESS_DENIED:
  ------------------
  |  | 1232|      0|#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED
  |  |  ------------------
  |  |  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (558:5): [True: 0, False: 1.11k]
  ------------------
  559|      0|        return TLS1_AD_ACCESS_DENIED;
  ------------------
  |  |   60|      0|#define TLS1_AD_ACCESS_DENIED 49 /* fatal */
  ------------------
  560|    962|    case SSL_AD_DECODE_ERROR:
  ------------------
  |  | 1234|    962|#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR
  |  |  ------------------
  |  |  |  |   61|    962|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (560:5): [True: 962, False: 154]
  ------------------
  561|    962|        return TLS1_AD_DECODE_ERROR;
  ------------------
  |  |   61|    962|#define TLS1_AD_DECODE_ERROR 50 /* fatal */
  ------------------
  562|      0|    case SSL_AD_DECRYPT_ERROR:
  ------------------
  |  | 1235|      0|#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR
  |  |  ------------------
  |  |  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  |  |  ------------------
  ------------------
  |  Branch (562:5): [True: 0, False: 1.11k]
  ------------------
  563|      0|        return TLS1_AD_DECRYPT_ERROR;
  ------------------
  |  |   62|      0|#define TLS1_AD_DECRYPT_ERROR 51
  ------------------
  564|      0|    case SSL_AD_EXPORT_RESTRICTION:
  ------------------
  |  | 1237|      0|#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION
  |  |  ------------------
  |  |  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (564:5): [True: 0, False: 1.11k]
  ------------------
  565|      0|        return TLS1_AD_EXPORT_RESTRICTION;
  ------------------
  |  |   63|      0|#define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */
  ------------------
  566|     28|    case SSL_AD_PROTOCOL_VERSION:
  ------------------
  |  | 1239|     28|#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION
  |  |  ------------------
  |  |  |  |   64|     28|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (566:5): [True: 28, False: 1.08k]
  ------------------
  567|     28|        return TLS1_AD_PROTOCOL_VERSION;
  ------------------
  |  |   64|     28|#define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */
  ------------------
  568|      0|    case SSL_AD_INSUFFICIENT_SECURITY:
  ------------------
  |  | 1241|      0|#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY
  |  |  ------------------
  |  |  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (568:5): [True: 0, False: 1.11k]
  ------------------
  569|      0|        return TLS1_AD_INSUFFICIENT_SECURITY;
  ------------------
  |  |   65|      0|#define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */
  ------------------
  570|     69|    case SSL_AD_INTERNAL_ERROR:
  ------------------
  |  | 1243|     69|#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR
  |  |  ------------------
  |  |  |  |   66|     69|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (570:5): [True: 69, False: 1.04k]
  ------------------
  571|     69|        return TLS1_AD_INTERNAL_ERROR;
  ------------------
  |  |   66|     69|#define TLS1_AD_INTERNAL_ERROR 80 /* fatal */
  ------------------
  572|      0|    case SSL_AD_USER_CANCELLED:
  ------------------
  |  | 1244|      0|#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
  |  |  ------------------
  |  |  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  |  |  ------------------
  ------------------
  |  Branch (572:5): [True: 0, False: 1.11k]
  ------------------
  573|      0|        return TLS1_AD_USER_CANCELLED;
  ------------------
  |  |   68|      0|#define TLS1_AD_USER_CANCELLED 90
  ------------------
  574|      0|    case SSL_AD_NO_RENEGOTIATION:
  ------------------
  |  | 1245|      0|#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
  |  |  ------------------
  |  |  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  |  |  ------------------
  ------------------
  |  Branch (574:5): [True: 0, False: 1.11k]
  ------------------
  575|      0|        return TLS1_AD_NO_RENEGOTIATION;
  ------------------
  |  |   69|      0|#define TLS1_AD_NO_RENEGOTIATION 100
  ------------------
  576|      0|    case SSL_AD_UNSUPPORTED_EXTENSION:
  ------------------
  |  | 1248|      0|#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION
  |  |  ------------------
  |  |  |  |   74|      0|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  |  |  ------------------
  ------------------
  |  Branch (576:5): [True: 0, False: 1.11k]
  ------------------
  577|      0|        return TLS1_AD_UNSUPPORTED_EXTENSION;
  ------------------
  |  |   74|      0|#define TLS1_AD_UNSUPPORTED_EXTENSION 110
  ------------------
  578|      0|    case SSL_AD_CERTIFICATE_UNOBTAINABLE:
  ------------------
  |  | 1249|      0|#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
  |  |  ------------------
  |  |  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  |  |  ------------------
  ------------------
  |  Branch (578:5): [True: 0, False: 1.11k]
  ------------------
  579|      0|        return TLS1_AD_CERTIFICATE_UNOBTAINABLE;
  ------------------
  |  |   75|      0|#define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  ------------------
  580|      0|    case SSL_AD_UNRECOGNIZED_NAME:
  ------------------
  |  | 1250|      0|#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
  |  |  ------------------
  |  |  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  |  |  ------------------
  ------------------
  |  Branch (580:5): [True: 0, False: 1.11k]
  ------------------
  581|      0|        return TLS1_AD_UNRECOGNIZED_NAME;
  ------------------
  |  |   76|      0|#define TLS1_AD_UNRECOGNIZED_NAME 112
  ------------------
  582|      0|    case SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
  ------------------
  |  | 1251|      0|#define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE
  |  |  ------------------
  |  |  |  |   77|      0|#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  |  |  ------------------
  ------------------
  |  Branch (582:5): [True: 0, False: 1.11k]
  ------------------
  583|      0|        return TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE;
  ------------------
  |  |   77|      0|#define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  ------------------
  584|      0|    case SSL_AD_BAD_CERTIFICATE_HASH_VALUE:
  ------------------
  |  | 1252|      0|#define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE
  |  |  ------------------
  |  |  |  |   78|      0|#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  |  |  ------------------
  ------------------
  |  Branch (584:5): [True: 0, False: 1.11k]
  ------------------
  585|      0|        return TLS1_AD_BAD_CERTIFICATE_HASH_VALUE;
  ------------------
  |  |   78|      0|#define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  ------------------
  586|      0|    case SSL_AD_UNKNOWN_PSK_IDENTITY:
  ------------------
  |  | 1254|      0|#define SSL_AD_UNKNOWN_PSK_IDENTITY TLS1_AD_UNKNOWN_PSK_IDENTITY
  |  |  ------------------
  |  |  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (586:5): [True: 0, False: 1.11k]
  ------------------
  587|      0|        return TLS1_AD_UNKNOWN_PSK_IDENTITY;
  ------------------
  |  |   79|      0|#define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */
  ------------------
  588|      0|    case SSL_AD_INAPPROPRIATE_FALLBACK:
  ------------------
  |  | 1256|      0|#define SSL_AD_INAPPROPRIATE_FALLBACK TLS1_AD_INAPPROPRIATE_FALLBACK
  |  |  ------------------
  |  |  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (588:5): [True: 0, False: 1.11k]
  ------------------
  589|      0|        return TLS1_AD_INAPPROPRIATE_FALLBACK;
  ------------------
  |  |   67|      0|#define TLS1_AD_INAPPROPRIATE_FALLBACK 86 /* fatal */
  ------------------
  590|      0|    case SSL_AD_NO_APPLICATION_PROTOCOL:
  ------------------
  |  | 1257|      0|#define SSL_AD_NO_APPLICATION_PROTOCOL TLS1_AD_NO_APPLICATION_PROTOCOL
  |  |  ------------------
  |  |  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (590:5): [True: 0, False: 1.11k]
  ------------------
  591|      0|        return TLS1_AD_NO_APPLICATION_PROTOCOL;
  ------------------
  |  |   80|      0|#define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  ------------------
  592|      0|    case SSL_AD_CERTIFICATE_REQUIRED:
  ------------------
  |  | 1247|      0|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      0|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (592:5): [True: 0, False: 1.11k]
  ------------------
  593|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  594|      0|    case TLS13_AD_MISSING_EXTENSION:
  ------------------
  |  |   71|      0|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  ------------------
  |  Branch (594:5): [True: 0, False: 1.11k]
  ------------------
  595|      0|        return SSL_AD_HANDSHAKE_FAILURE;
  ------------------
  |  | 1219|      0|#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE
  |  |  ------------------
  |  |  |  |  256|      0|#define SSL3_AD_HANDSHAKE_FAILURE 40 /* fatal */
  |  |  ------------------
  ------------------
  596|      0|    default:
  ------------------
  |  Branch (596:5): [True: 0, False: 1.11k]
  ------------------
  597|      0|        return -1;
  598|  1.11k|    }
  599|  1.11k|}

tls1_default_timeout:
   97|  2.09k|{
   98|       |    /*
   99|       |     * 2 hours, the 24 hours mentioned in the TLSv1 spec is way too long for
  100|       |     * http, the cache would over fill
  101|       |     */
  102|  2.09k|    return ossl_seconds2time(60 * 60 * 2);
  ------------------
  |  |   42|  2.09k|#define ossl_seconds2time(s) ossl_ticks2time((s) * OSSL_TIME_SECOND)
  |  |  ------------------
  |  |  |  |   31|  2.09k|#define OSSL_TIME_SECOND ((uint64_t)1000000000)
  |  |  ------------------
  ------------------
  103|  2.09k|}
tls1_new:
  106|  1.31k|{
  107|  1.31k|    if (!ssl3_new(s))
  ------------------
  |  Branch (107:9): [True: 0, False: 1.31k]
  ------------------
  108|      0|        return 0;
  109|  1.31k|    if (!s->method->ssl_clear(s))
  ------------------
  |  Branch (109:9): [True: 0, False: 1.31k]
  ------------------
  110|      0|        return 0;
  111|       |
  112|  1.31k|    return 1;
  113|  1.31k|}
tls1_free:
  116|  1.31k|{
  117|  1.31k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  1.31k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  1.31k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   33|  1.31k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  1.31k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 1.31k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  1.31k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  1.31k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  118|       |
  119|  1.31k|    if (sc == NULL)
  ------------------
  |  Branch (119:9): [True: 0, False: 1.31k]
  ------------------
  120|      0|        return;
  121|       |
  122|  1.31k|    OPENSSL_free(sc->ext.session_ticket);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  123|  1.31k|    ssl3_free(s);
  124|  1.31k|}
tls1_clear:
  127|  5.26k|{
  128|  5.26k|    SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
  ------------------
  |  |   39|  5.26k|    SSL_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST)
  |  |  ------------------
  |  |  |  |   32|  5.26k|    ((ssl) == NULL ? NULL                                                                                          \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (32:6): [True: 0, False: 5.26k]
  |  |  |  |  ------------------
  |  |  |  |   33|  5.26k|                   : ((ssl)->type == SSL_TYPE_SSL_CONNECTION                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1223|  5.26k|#define SSL_TYPE_SSL_CONNECTION 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (33:23): [True: 5.26k, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   34|  5.26k|                             ? (c SSL_CONNECTION *)(ssl)                                                           \
  |  |  |  |   35|  5.26k|                             : (SSL_TYPE_IS_QUIC((ssl)->type)                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  | 1229|      0|#define SSL_TYPE_IS_QUIC(x) (((x) & 0x80) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (1229:29): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   36|      0|                                       ? (c SSL_CONNECTION *)ossl_quic_obj_get0_handshake_layer((QUIC_OBJ *)(ssl)) \
  |  |  |  |   37|      0|                                       : NULL)))
  |  |  ------------------
  ------------------
  129|       |
  130|  5.26k|    if (sc == NULL)
  ------------------
  |  Branch (130:9): [True: 0, False: 5.26k]
  ------------------
  131|      0|        return 0;
  132|       |
  133|  5.26k|    if (!ssl3_clear(s))
  ------------------
  |  Branch (133:9): [True: 0, False: 5.26k]
  ------------------
  134|      0|        return 0;
  135|       |
  136|  5.26k|    if (s->method->version == TLS_ANY_VERSION)
  ------------------
  |  |   40|  5.26k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (136:9): [True: 5.26k, False: 0]
  ------------------
  137|  5.26k|        sc->version = TLS_MAX_VERSION_INTERNAL;
  ------------------
  |  |   50|  5.26k|#define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
  |  |  ------------------
  |  |  |  |   27|  5.26k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  ------------------
  138|      0|    else
  139|      0|        sc->version = s->method->version;
  140|       |
  141|  5.26k|    return 1;
  142|  5.26k|}
ssl_load_groups:
  367|  2.09k|{
  368|  2.09k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_groups, ctx))
  ------------------
  |  Branch (368:9): [True: 0, False: 2.09k]
  ------------------
  369|      0|        return 0;
  370|       |
  371|  2.09k|    return SSL_CTX_set1_groups_list(ctx, TLS_DEFAULT_GROUP_LIST);
  ------------------
  |  | 1505|  2.09k|    SSL_CTX_ctrl(ctx, SSL_CTRL_SET_GROUPS_LIST, 0, (char *)(s))
  |  |  ------------------
  |  |  |  | 1353|  2.09k|#define SSL_CTRL_SET_GROUPS_LIST 92
  |  |  ------------------
  ------------------
  372|  2.09k|}
ssl_load_sigalgs:
  681|  2.09k|{
  682|  2.09k|    size_t i;
  683|  2.09k|    SSL_CERT_LOOKUP lu;
  684|       |
  685|  2.09k|    if (!OSSL_PROVIDER_do_all(ctx->libctx, discover_provider_sigalgs, ctx))
  ------------------
  |  Branch (685:9): [True: 0, False: 2.09k]
  ------------------
  686|      0|        return 0;
  687|       |
  688|       |    /* now populate ctx->ssl_cert_info */
  689|  2.09k|    if (ctx->sigalg_list_len > 0) {
  ------------------
  |  Branch (689:9): [True: 2.06k, False: 28]
  ------------------
  690|  2.06k|        OPENSSL_free(ctx->ssl_cert_info);
  ------------------
  |  |  131|  2.06k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  691|  2.06k|        ctx->ssl_cert_info = OPENSSL_calloc(ctx->sigalg_list_len, sizeof(lu));
  ------------------
  |  |  112|  2.06k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  692|  2.06k|        if (ctx->ssl_cert_info == NULL)
  ------------------
  |  Branch (692:13): [True: 0, False: 2.06k]
  ------------------
  693|      0|            return 0;
  694|  8.26k|        for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (694:21): [True: 6.19k, False: 2.06k]
  ------------------
  695|  6.19k|            const char *keytype = inferred_keytype(&ctx->sigalg_list[i]);
  696|  6.19k|            ctx->ssl_cert_info[i].pkey_nid = OBJ_txt2nid(keytype);
  697|  6.19k|            ctx->ssl_cert_info[i].amask = SSL_aANY;
  ------------------
  |  |  124|  6.19k|#define SSL_aANY 0x00000000U
  ------------------
  698|  6.19k|        }
  699|  2.06k|    }
  700|       |
  701|       |    /*
  702|       |     * For now, leave it at this: legacy sigalgs stay in their own
  703|       |     * data structures until "legacy cleanup" occurs.
  704|       |     */
  705|       |
  706|  2.09k|    return 1;
  707|  2.09k|}
tls1_group_id_lookup:
  723|  34.2k|{
  724|  34.2k|    size_t i;
  725|       |
  726|   133k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (726:17): [True: 133k, False: 0]
  ------------------
  727|   133k|        if (ctx->group_list[i].group_id == group_id)
  ------------------
  |  Branch (727:13): [True: 34.2k, False: 98.9k]
  ------------------
  728|  34.2k|            return &ctx->group_list[i];
  729|   133k|    }
  730|       |
  731|      0|    return NULL;
  732|  34.2k|}
tls1_group_id2nid:
  745|  14.7k|{
  746|  14.7k|    size_t i;
  747|       |
  748|  14.7k|    if (group_id == 0)
  ------------------
  |  Branch (748:9): [True: 0, False: 14.7k]
  ------------------
  749|      0|        return NID_undef;
  ------------------
  |  |   18|      0|#define NID_undef                       0
  ------------------
  750|       |
  751|       |    /*
  752|       |     * Return well known Group NIDs - for backwards compatibility. This won't
  753|       |     * work for groups we don't know about.
  754|       |     */
  755|   480k|    for (i = 0; i < OSSL_NELEM(nid_to_group); i++) {
  ------------------
  |  |   14|   480k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (755:17): [True: 477k, False: 2.43k]
  ------------------
  756|   477k|        if (nid_to_group[i].group_id == group_id)
  ------------------
  |  Branch (756:13): [True: 12.2k, False: 465k]
  ------------------
  757|  12.2k|            return nid_to_group[i].nid;
  758|   477k|    }
  759|  2.43k|    if (!include_unknown)
  ------------------
  |  Branch (759:9): [True: 2.43k, False: 0]
  ------------------
  760|  2.43k|        return NID_undef;
  ------------------
  |  |   18|  2.43k|#define NID_undef                       0
  ------------------
  761|      0|    return TLSEXT_nid_unknown | (int)group_id;
  ------------------
  |  |  219|      0|#define TLSEXT_nid_unknown 0x1000000
  ------------------
  762|  2.43k|}
tls1_get_supported_groups:
  786|  3.72k|{
  787|  3.72k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  3.72k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  788|       |
  789|       |    /* For Suite B mode only include P-256, P-384 */
  790|  3.72k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2029|  3.72k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|  3.72k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  ------------------
  791|     96|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  562|     96|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (791:5): [True: 96, False: 3.62k]
  ------------------
  792|     96|        *pgroups = suiteb_curves;
  793|     96|        *pgroupslen = OSSL_NELEM(suiteb_curves);
  ------------------
  |  |   14|     96|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  794|     96|        break;
  795|       |
  796|      3|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  558|      3|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (796:5): [True: 3, False: 3.72k]
  ------------------
  797|      3|        *pgroups = suiteb_curves;
  798|      3|        *pgroupslen = 1;
  799|      3|        break;
  800|       |
  801|      3|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  560|      3|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (801:5): [True: 3, False: 3.72k]
  ------------------
  802|      3|        *pgroups = suiteb_curves + 1;
  803|      3|        *pgroupslen = 1;
  804|      3|        break;
  805|       |
  806|  3.62k|    default:
  ------------------
  |  Branch (806:5): [True: 3.62k, False: 102]
  ------------------
  807|  3.62k|        if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (807:13): [True: 0, False: 3.62k]
  ------------------
  808|      0|            *pgroups = sctx->ext.supportedgroups;
  809|      0|            *pgroupslen = sctx->ext.supportedgroups_len;
  810|  3.62k|        } else {
  811|  3.62k|            *pgroups = s->ext.supportedgroups;
  812|  3.62k|            *pgroupslen = s->ext.supportedgroups_len;
  813|  3.62k|        }
  814|  3.62k|        break;
  815|  3.72k|    }
  816|  3.72k|}
tls1_get_requested_keyshare_groups:
  833|  1.23k|{
  834|  1.23k|    SSL_CTX *sctx = SSL_CONNECTION_GET_CTX(s);
  ------------------
  |  |   26|  1.23k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  835|       |
  836|  1.23k|    if (s->ext.supportedgroups == NULL) {
  ------------------
  |  Branch (836:9): [True: 0, False: 1.23k]
  ------------------
  837|      0|        *pgroups = sctx->ext.supportedgroups;
  838|      0|        *pgroupslen = sctx->ext.supportedgroups_len;
  839|  1.23k|    } else {
  840|  1.23k|        *pgroups = s->ext.keyshares;
  841|  1.23k|        *pgroupslen = s->ext.keyshares_len;
  842|  1.23k|    }
  843|  1.23k|}
tls_valid_group:
  862|  17.1k|{
  863|  17.1k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  17.1k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  864|  17.1k|        group_id);
  865|  17.1k|    int ret;
  866|  17.1k|    int group_minversion, group_maxversion;
  867|       |
  868|  17.1k|    if (okfortls13 != NULL)
  ------------------
  |  Branch (868:9): [True: 9.72k, False: 7.40k]
  ------------------
  869|  9.72k|        *okfortls13 = 0;
  870|       |
  871|  17.1k|    if (ginfo == NULL)
  ------------------
  |  Branch (871:9): [True: 0, False: 17.1k]
  ------------------
  872|      0|        return 0;
  873|       |
  874|  17.1k|    group_minversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->mindtls : ginfo->mintls;
  ------------------
  |  |  258|  17.1k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  17.1k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  17.1k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 17.1k]
  |  |  ------------------
  ------------------
  875|  17.1k|    group_maxversion = SSL_CONNECTION_IS_DTLS(s) ? ginfo->maxdtls : ginfo->maxtls;
  ------------------
  |  |  258|  17.1k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  17.1k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  17.1k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 17.1k]
  |  |  ------------------
  ------------------
  876|       |
  877|  17.1k|    if (group_minversion < 0 || group_maxversion < 0)
  ------------------
  |  Branch (877:9): [True: 0, False: 17.1k]
  |  Branch (877:33): [True: 0, False: 17.1k]
  ------------------
  878|      0|        return 0;
  879|  17.1k|    if (group_maxversion == 0)
  ------------------
  |  Branch (879:9): [True: 17.1k, False: 0]
  ------------------
  880|  17.1k|        ret = 1;
  881|      0|    else
  882|      0|        ret = (ssl_version_cmp(s, minversion, group_maxversion) <= 0);
  883|  17.1k|    if (group_minversion > 0)
  ------------------
  |  Branch (883:9): [True: 17.1k, False: 0]
  ------------------
  884|  17.1k|        ret &= (ssl_version_cmp(s, maxversion, group_minversion) >= 0);
  885|       |
  886|  17.1k|    if (!SSL_CONNECTION_IS_DTLS(s)) {
  ------------------
  |  |  258|  17.1k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  17.1k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  17.1k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (886:9): [True: 17.1k, False: 0]
  ------------------
  887|  17.1k|        if (ret && okfortls13 != NULL && maxversion == TLS1_3_VERSION)
  ------------------
  |  |   27|  9.70k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (887:13): [True: 17.1k, False: 25]
  |  Branch (887:20): [True: 9.70k, False: 7.39k]
  |  Branch (887:42): [True: 9.68k, False: 25]
  ------------------
  888|  9.68k|            *okfortls13 = (group_maxversion == 0)
  ------------------
  |  Branch (888:27): [True: 9.68k, False: 0]
  ------------------
  889|      0|                || (group_maxversion >= TLS1_3_VERSION);
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (889:20): [True: 0, False: 0]
  ------------------
  890|  17.1k|    }
  891|  17.1k|    ret &= !isec
  ------------------
  |  Branch (891:12): [True: 12.1k, False: 4.94k]
  ------------------
  892|  4.94k|        || strcmp(ginfo->algorithm, "EC") == 0
  ------------------
  |  Branch (892:12): [True: 94, False: 4.85k]
  ------------------
  893|  4.85k|        || strcmp(ginfo->algorithm, "X25519") == 0
  ------------------
  |  Branch (893:12): [True: 2.41k, False: 2.43k]
  ------------------
  894|  2.43k|        || strcmp(ginfo->algorithm, "X448") == 0;
  ------------------
  |  Branch (894:12): [True: 22, False: 2.41k]
  ------------------
  895|       |
  896|  17.1k|    return ret;
  897|  17.1k|}
tls_group_allowed:
  901|  14.7k|{
  902|  14.7k|    const TLS_GROUP_INFO *ginfo = tls1_group_id_lookup(SSL_CONNECTION_GET_CTX(s),
  ------------------
  |  |   26|  14.7k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  903|  14.7k|        group);
  904|  14.7k|    unsigned char gtmp[2];
  905|       |
  906|  14.7k|    if (ginfo == NULL)
  ------------------
  |  Branch (906:9): [True: 0, False: 14.7k]
  ------------------
  907|      0|        return 0;
  908|       |
  909|  14.7k|    gtmp[0] = group >> 8;
  910|  14.7k|    gtmp[1] = group & 0xff;
  911|  14.7k|    return ssl_security(s, op, ginfo->secbits,
  912|  14.7k|        tls1_group_id2nid(ginfo->group_id, 0), (void *)gtmp);
  913|  14.7k|}
tls1_set_groups_list:
 1610|  2.09k|{
 1611|  2.09k|    size_t i = 0, j;
 1612|  2.09k|    int ret = 0, parse_ret = 0;
 1613|  2.09k|    gid_cb_st gcb;
 1614|       |
 1615|       |    /* Sanity check */
 1616|  2.09k|    if (ctx == NULL) {
  ------------------
  |  Branch (1616:9): [True: 0, False: 2.09k]
  ------------------
 1617|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_NULL_PARAMETER);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1618|      0|        return 0;
 1619|      0|    }
 1620|       |
 1621|  2.09k|    memset(&gcb, 0, sizeof(gcb));
 1622|  2.09k|    gcb.gidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|  2.09k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1623|  2.09k|    gcb.tplmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|  2.09k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1624|  2.09k|    gcb.ksidmax = GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|  2.09k|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1625|  2.09k|    gcb.ctx = ctx;
 1626|       |
 1627|       |    /* Prepare initial chunks of memory for groups, tuples and keyshares groupIDs */
 1628|  2.09k|    gcb.gid_arr = OPENSSL_malloc_array(gcb.gidmax, sizeof(*gcb.gid_arr));
  ------------------
  |  |  110|  2.09k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1629|  2.09k|    if (gcb.gid_arr == NULL)
  ------------------
  |  Branch (1629:9): [True: 0, False: 2.09k]
  ------------------
 1630|      0|        goto end;
 1631|  2.09k|    gcb.tuplcnt_arr = OPENSSL_malloc_array(gcb.tplmax, sizeof(*gcb.tuplcnt_arr));
  ------------------
  |  |  110|  2.09k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1632|  2.09k|    if (gcb.tuplcnt_arr == NULL)
  ------------------
  |  Branch (1632:9): [True: 0, False: 2.09k]
  ------------------
 1633|      0|        goto end;
 1634|  2.09k|    gcb.tuplcnt_arr[0] = 0;
 1635|  2.09k|    gcb.ksid_arr = OPENSSL_malloc_array(gcb.ksidmax, sizeof(*gcb.ksid_arr));
  ------------------
  |  |  110|  2.09k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1636|  2.09k|    if (gcb.ksid_arr == NULL)
  ------------------
  |  Branch (1636:9): [True: 0, False: 2.09k]
  ------------------
 1637|      0|        goto end;
 1638|       |
 1639|  2.09k|    while (str[0] != '\0' && isspace((unsigned char)*str))
  ------------------
  |  Branch (1639:12): [True: 2.09k, False: 0]
  |  Branch (1639:30): [True: 0, False: 2.09k]
  ------------------
 1640|      0|        str++;
 1641|  2.09k|    if (str[0] == '\0')
  ------------------
  |  Branch (1641:9): [True: 0, False: 2.09k]
  ------------------
 1642|      0|        goto empty_list;
 1643|       |
 1644|       |    /*
 1645|       |     * Start the (potentially recursive) tuple processing by calling CONF_parse_list
 1646|       |     * with the TUPLE_DELIMITER_CHARACTER (which will call tuple_cb after cleaning spaces)
 1647|       |     */
 1648|  2.09k|    parse_ret = CONF_parse_list(str, TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, &gcb);
  ------------------
  |  | 1204|  2.09k|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1649|       |
 1650|  2.09k|    if (parse_ret == 0)
  ------------------
  |  Branch (1650:9): [True: 0, False: 2.09k]
  ------------------
 1651|      0|        goto end;
 1652|  2.09k|    if (parse_ret == -1) {
  ------------------
  |  Branch (1652:9): [True: 0, False: 2.09k]
  ------------------
 1653|      0|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   89|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1654|      0|            "Syntax error in '%s'", str);
 1655|      0|        goto end;
 1656|      0|    }
 1657|       |
 1658|       |    /*
 1659|       |     * We check whether a tuple was completely emptied by using "-" prefix
 1660|       |     * excessively, in which case we remove the tuple
 1661|       |     */
 1662|  10.3k|    for (i = j = 0; j < gcb.tplcnt; j++) {
  ------------------
  |  Branch (1662:21): [True: 8.26k, False: 2.09k]
  ------------------
 1663|  8.26k|        if (gcb.tuplcnt_arr[j] == 0)
  ------------------
  |  Branch (1663:13): [True: 0, False: 8.26k]
  ------------------
 1664|      0|            continue;
 1665|       |        /* If there's a gap, move to first unfilled slot */
 1666|  8.26k|        if (j == i)
  ------------------
  |  Branch (1666:13): [True: 8.26k, False: 0]
  ------------------
 1667|  8.26k|            ++i;
 1668|      0|        else
 1669|      0|            gcb.tuplcnt_arr[i++] = gcb.tuplcnt_arr[j];
 1670|  8.26k|    }
 1671|  2.09k|    gcb.tplcnt = i;
 1672|       |
 1673|  2.09k|    if (gcb.ksidcnt > OPENSSL_CLIENT_MAX_KEY_SHARES) {
  ------------------
  |  |  790|  2.09k|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
  |  Branch (1673:9): [True: 0, False: 2.09k]
  ------------------
 1674|      0|        ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  ------------------
  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  ------------------
  |  |  408|      0|        ERR_set_error)
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |   89|      0|#define ERR_LIB_SSL 20
  ------------------
                      ERR_raise_data(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT,
  ------------------
  |  |  358|      0|#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
  |  |  ------------------
  |  |  |  |  239|      0|#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
  |  |  |  |  ------------------
  |  |  |  |  |  |  230|      0|#define ERR_RFLAGS_OFFSET 18L
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|      0|            "To many keyshares requested in '%s' (max = %d)",
 1676|      0|            str, OPENSSL_CLIENT_MAX_KEY_SHARES);
  ------------------
  |  |  790|      0|#define OPENSSL_CLIENT_MAX_KEY_SHARES 4
  ------------------
 1677|      0|        goto end;
 1678|      0|    }
 1679|       |
 1680|       |    /*
 1681|       |     * For backward compatibility we let the rest of the code know that a key share
 1682|       |     * for the first valid group should be added if no "*" prefix was used anywhere
 1683|       |     */
 1684|  2.09k|    if (gcb.gidcnt > 0 && gcb.ksidcnt == 0) {
  ------------------
  |  Branch (1684:9): [True: 2.06k, False: 28]
  |  Branch (1684:27): [True: 0, False: 2.06k]
  ------------------
 1685|       |        /*
 1686|       |         * No key share group prefix character was used, hence we indicate that a single
 1687|       |         * key share should be sent and flag that it should come from the supported_groups list
 1688|       |         */
 1689|      0|        gcb.ksidcnt = 1;
 1690|      0|        gcb.ksid_arr[0] = 0;
 1691|      0|    }
 1692|       |
 1693|  2.09k|empty_list:
 1694|       |    /*
 1695|       |     * A call to tls1_set_groups_list with any of the args (other than ctx) set
 1696|       |     * to NULL only does a syntax check, hence we're done here and report success
 1697|       |     */
 1698|  2.09k|    if (grpext == NULL || ksext == NULL || tplext == NULL || grpextlen == NULL || ksextlen == NULL || tplextlen == NULL) {
  ------------------
  |  Branch (1698:9): [True: 0, False: 2.09k]
  |  Branch (1698:27): [True: 0, False: 2.09k]
  |  Branch (1698:44): [True: 0, False: 2.09k]
  |  Branch (1698:62): [True: 0, False: 2.09k]
  |  Branch (1698:83): [True: 0, False: 2.09k]
  |  Branch (1698:103): [True: 0, False: 2.09k]
  ------------------
 1699|      0|        ret = 1;
 1700|      0|        goto end;
 1701|      0|    }
 1702|       |
 1703|       |    /*
 1704|       |     * tuple_cb and gid_cb combo ensures there are no duplicates or unknown groups so we
 1705|       |     * can just go ahead and set the results (after disposing the existing)
 1706|       |     */
 1707|  2.09k|    OPENSSL_free(*grpext);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1708|  2.09k|    *grpext = gcb.gid_arr;
 1709|  2.09k|    *grpextlen = gcb.gidcnt;
 1710|  2.09k|    OPENSSL_free(*ksext);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1711|  2.09k|    *ksext = gcb.ksid_arr;
 1712|  2.09k|    *ksextlen = gcb.ksidcnt;
 1713|  2.09k|    OPENSSL_free(*tplext);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1714|  2.09k|    *tplext = gcb.tuplcnt_arr;
 1715|  2.09k|    *tplextlen = gcb.tplcnt;
 1716|       |
 1717|  2.09k|    return 1;
 1718|       |
 1719|      0|end:
 1720|      0|    OPENSSL_free(gcb.gid_arr);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1721|      0|    OPENSSL_free(gcb.tuplcnt_arr);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1722|      0|    OPENSSL_free(gcb.ksid_arr);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1723|      0|    return ret;
 1724|  2.09k|}
tls1_get_formatlist:
 1782|  1.24k|{
 1783|       |    /*
 1784|       |     * If we have a custom point format list use it otherwise use default
 1785|       |     */
 1786|  1.24k|    if (s->ext.ecpointformats) {
  ------------------
  |  Branch (1786:9): [True: 0, False: 1.24k]
  ------------------
 1787|      0|        *pformats = s->ext.ecpointformats;
 1788|      0|        *num_formats = s->ext.ecpointformats_len;
 1789|  1.24k|    } else if ((s->options & SSL_OP_LEGACY_EC_POINT_FORMATS) != 0) {
  ------------------
  |  |  455|  1.24k|#define SSL_OP_LEGACY_EC_POINT_FORMATS SSL_OP_BIT(36)
  |  |  ------------------
  |  |  |  |  350|  1.24k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (1789:16): [True: 0, False: 1.24k]
  ------------------
 1790|      0|        *pformats = ecformats_all;
 1791|       |        /* For Suite B we don't support char2 fields */
 1792|      0|        if (tls1_suiteb(s))
  ------------------
  |  | 2029|      0|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|      0|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2029:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1793|      0|            *num_formats = sizeof(ecformats_all) - 1;
 1794|      0|        else
 1795|      0|            *num_formats = sizeof(ecformats_all);
 1796|  1.24k|    } else {
 1797|  1.24k|        *pformats = ecformats_default;
 1798|  1.24k|        *num_formats = sizeof(ecformats_default);
 1799|  1.24k|    }
 1800|  1.24k|}
ssl_setup_sigalgs:
 2191|  2.09k|{
 2192|  2.09k|    size_t i, cache_idx, sigalgs_len, enabled;
 2193|  2.09k|    const SIGALG_LOOKUP *lu;
 2194|  2.09k|    SIGALG_LOOKUP *cache = NULL;
 2195|  2.09k|    uint16_t *tls12_sigalgs_list = NULL;
 2196|  2.09k|    EVP_PKEY *tmpkey = EVP_PKEY_new();
 2197|  2.09k|    int istls;
 2198|  2.09k|    int ret = 0;
 2199|       |
 2200|  2.09k|    if (ctx == NULL)
  ------------------
  |  Branch (2200:9): [True: 0, False: 2.09k]
  ------------------
 2201|      0|        goto err;
 2202|       |
 2203|  2.09k|    istls = !SSL_CTX_IS_DTLS(ctx);
  ------------------
  |  |  262|  2.09k|    (ctx->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  2.09k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
 2204|       |
 2205|  2.09k|    sigalgs_len = OSSL_NELEM(sigalg_lookup_tbl) + ctx->sigalg_list_len;
  ------------------
  |  |   14|  2.09k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2206|       |
 2207|  2.09k|    cache = OPENSSL_calloc(sigalgs_len, sizeof(const SIGALG_LOOKUP));
  ------------------
  |  |  112|  2.09k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2208|  2.09k|    if (cache == NULL || tmpkey == NULL)
  ------------------
  |  Branch (2208:9): [True: 0, False: 2.09k]
  |  Branch (2208:26): [True: 0, False: 2.09k]
  ------------------
 2209|      0|        goto err;
 2210|       |
 2211|  2.09k|    tls12_sigalgs_list = OPENSSL_calloc(sigalgs_len, sizeof(uint16_t));
  ------------------
  |  |  112|  2.09k|    CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2212|  2.09k|    if (tls12_sigalgs_list == NULL)
  ------------------
  |  Branch (2212:9): [True: 0, False: 2.09k]
  ------------------
 2213|      0|        goto err;
 2214|       |
 2215|  2.09k|    ERR_set_mark();
 2216|       |    /* First fill cache and tls12_sigalgs list from legacy algorithm list */
 2217|  2.09k|    for (i = 0, lu = sigalg_lookup_tbl;
 2218|  66.9k|        i < OSSL_NELEM(sigalg_lookup_tbl); lu++, i++) {
  ------------------
  |  |   14|  66.9k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2218:9): [True: 64.8k, False: 2.09k]
  ------------------
 2219|  64.8k|        EVP_PKEY_CTX *pctx;
 2220|       |
 2221|  64.8k|        cache[i] = *lu;
 2222|       |
 2223|       |        /*
 2224|       |         * Check hash is available.
 2225|       |         * This test is not perfect. A provider could have support
 2226|       |         * for a signature scheme, but not a particular hash. However the hash
 2227|       |         * could be available from some other loaded provider. In that case it
 2228|       |         * could be that the signature is available, and the hash is available
 2229|       |         * independently - but not as a combination. We ignore this for now.
 2230|       |         */
 2231|  64.8k|        if (lu->hash != NID_undef
  ------------------
  |  |   18|   129k|#define NID_undef                       0
  ------------------
  |  Branch (2231:13): [True: 60.6k, False: 4.18k]
  ------------------
 2232|  60.6k|            && ctx->ssl_digest_methods[lu->hash_idx] == NULL) {
  ------------------
  |  Branch (2232:16): [True: 11.1k, False: 49.5k]
  ------------------
 2233|  11.1k|            cache[i].available = 0;
 2234|  11.1k|            continue;
 2235|  11.1k|        }
 2236|       |
 2237|  53.7k|        if (!EVP_PKEY_set_type(tmpkey, lu->sig)) {
  ------------------
  |  Branch (2237:13): [True: 0, False: 53.7k]
  ------------------
 2238|      0|            cache[i].available = 0;
 2239|      0|            continue;
 2240|      0|        }
 2241|  53.7k|        pctx = EVP_PKEY_CTX_new_from_pkey(ctx->libctx, tmpkey, ctx->propq);
 2242|       |        /* If unable to create pctx we assume the sig algorithm is unavailable */
 2243|  53.7k|        if (pctx == NULL)
  ------------------
  |  Branch (2243:13): [True: 56, False: 53.6k]
  ------------------
 2244|     56|            cache[i].available = 0;
 2245|  53.7k|        EVP_PKEY_CTX_free(pctx);
 2246|  53.7k|    }
 2247|       |
 2248|       |    /* Now complete cache and tls12_sigalgs list with provider sig information */
 2249|  2.09k|    cache_idx = OSSL_NELEM(sigalg_lookup_tbl);
  ------------------
  |  |   14|  2.09k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2250|  8.28k|    for (i = 0; i < ctx->sigalg_list_len; i++) {
  ------------------
  |  Branch (2250:17): [True: 6.19k, False: 2.09k]
  ------------------
 2251|  6.19k|        TLS_SIGALG_INFO si = ctx->sigalg_list[i];
 2252|  6.19k|        cache[cache_idx].name = si.name;
 2253|  6.19k|        cache[cache_idx].name12 = si.sigalg_name;
 2254|  6.19k|        cache[cache_idx].sigalg = si.code_point;
 2255|  6.19k|        tls12_sigalgs_list[cache_idx] = si.code_point;
 2256|  6.19k|        cache[cache_idx].hash = si.hash_name ? OBJ_txt2nid(si.hash_name) : NID_undef;
  ------------------
  |  |   18|  12.3k|#define NID_undef                       0
  ------------------
  |  Branch (2256:33): [True: 0, False: 6.19k]
  ------------------
 2257|  6.19k|        cache[cache_idx].hash_idx = ssl_get_md_idx(cache[cache_idx].hash);
 2258|  6.19k|        cache[cache_idx].sig = OBJ_txt2nid(si.sigalg_name);
 2259|  6.19k|        cache[cache_idx].sig_idx = (int)(i + SSL_PKEY_NUM);
  ------------------
  |  |  328|  6.19k|#define SSL_PKEY_NUM 9
  ------------------
 2260|  6.19k|        cache[cache_idx].sigandhash = OBJ_txt2nid(si.sigalg_name);
 2261|  6.19k|        cache[cache_idx].curve = NID_undef;
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
 2262|  6.19k|        cache[cache_idx].mintls = TLS1_3_VERSION;
  ------------------
  |  |   27|  6.19k|#define TLS1_3_VERSION 0x0304
  ------------------
 2263|  6.19k|        cache[cache_idx].maxtls = TLS1_3_VERSION;
  ------------------
  |  |   27|  6.19k|#define TLS1_3_VERSION 0x0304
  ------------------
 2264|  6.19k|        cache[cache_idx].mindtls = -1;
 2265|  6.19k|        cache[cache_idx].maxdtls = -1;
 2266|       |        /* Compatibility with TLS 1.3 is checked on load */
 2267|  6.19k|        cache[cache_idx].available = istls;
 2268|  6.19k|        cache[cache_idx].advertise = 0;
 2269|  6.19k|        cache_idx++;
 2270|  6.19k|    }
 2271|  2.09k|    ERR_pop_to_mark();
 2272|       |
 2273|  2.09k|    enabled = 0;
 2274|  73.2k|    for (i = 0; i < OSSL_NELEM(tls12_sigalgs); ++i) {
  ------------------
  |  |   14|  73.2k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2274:17): [True: 71.1k, False: 2.09k]
  ------------------
 2275|  71.1k|        SIGALG_LOOKUP *ent = cache;
 2276|  71.1k|        size_t j;
 2277|       |
 2278|  1.24M|        for (j = 0; j < sigalgs_len; ent++, j++) {
  ------------------
  |  Branch (2278:21): [True: 1.24M, False: 84]
  ------------------
 2279|  1.24M|            if (ent->sigalg != tls12_sigalgs[i])
  ------------------
  |  Branch (2279:17): [True: 1.17M, False: 71.0k]
  ------------------
 2280|  1.17M|                continue;
 2281|       |            /* Dedup by marking cache entry as default enabled. */
 2282|  71.0k|            if (ent->available && !ent->advertise) {
  ------------------
  |  Branch (2282:17): [True: 59.8k, False: 11.1k]
  |  Branch (2282:35): [True: 59.8k, False: 0]
  ------------------
 2283|  59.8k|                ent->advertise = 1;
 2284|  59.8k|                tls12_sigalgs_list[enabled++] = tls12_sigalgs[i];
 2285|  59.8k|            }
 2286|  71.0k|            break;
 2287|  1.24M|        }
 2288|  71.1k|    }
 2289|       |
 2290|       |    /* Append any provider sigalgs not yet handled */
 2291|  8.28k|    for (i = OSSL_NELEM(sigalg_lookup_tbl); i < sigalgs_len; ++i) {
  ------------------
  |  |   14|  2.09k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (2291:45): [True: 6.19k, False: 2.09k]
  ------------------
 2292|  6.19k|        SIGALG_LOOKUP *ent = &cache[i];
 2293|       |
 2294|  6.19k|        if (ent->available && !ent->advertise)
  ------------------
  |  Branch (2294:13): [True: 6.19k, False: 0]
  |  Branch (2294:31): [True: 0, False: 6.19k]
  ------------------
 2295|      0|            tls12_sigalgs_list[enabled++] = ent->sigalg;
 2296|  6.19k|    }
 2297|       |
 2298|  2.09k|    ctx->sigalg_lookup_cache = cache;
 2299|  2.09k|    ctx->sigalg_lookup_cache_len = sigalgs_len;
 2300|  2.09k|    ctx->tls12_sigalgs = tls12_sigalgs_list;
 2301|  2.09k|    ctx->tls12_sigalgs_len = enabled;
 2302|  2.09k|    cache = NULL;
 2303|  2.09k|    tls12_sigalgs_list = NULL;
 2304|       |
 2305|  2.09k|    ret = 1;
 2306|  2.09k|err:
 2307|  2.09k|    OPENSSL_free(cache);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2308|  2.09k|    OPENSSL_free(tls12_sigalgs_list);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 2309|  2.09k|    EVP_PKEY_free(tmpkey);
 2310|  2.09k|    return ret;
 2311|  2.09k|}
tls1_lookup_md:
 2407|  46.3k|{
 2408|  46.3k|    const EVP_MD *md;
 2409|       |
 2410|  46.3k|    if (lu == NULL)
  ------------------
  |  Branch (2410:9): [True: 0, False: 46.3k]
  ------------------
 2411|      0|        return 0;
 2412|       |    /* lu->hash == NID_undef means no associated digest */
 2413|  46.3k|    if (lu->hash == NID_undef) {
  ------------------
  |  |   18|  46.3k|#define NID_undef                       0
  ------------------
  |  Branch (2413:9): [True: 6.02k, False: 40.3k]
  ------------------
 2414|  6.02k|        md = NULL;
 2415|  40.3k|    } else {
 2416|  40.3k|        md = ssl_md(ctx, lu->hash_idx);
 2417|  40.3k|        if (md == NULL)
  ------------------
  |  Branch (2417:13): [True: 0, False: 40.3k]
  ------------------
 2418|      0|            return 0;
 2419|  40.3k|    }
 2420|  46.3k|    if (pmd)
  ------------------
  |  Branch (2420:9): [True: 46.3k, False: 0]
  ------------------
 2421|  46.3k|        *pmd = md;
 2422|  46.3k|    return 1;
 2423|  46.3k|}
tls12_get_psigalgs:
 2544|  5.03k|{
 2545|       |    /*
 2546|       |     * If Suite B mode use Suite B sigalgs only, ignore any other
 2547|       |     * preferences.
 2548|       |     */
 2549|  5.03k|    switch (tls1_suiteb(s)) {
  ------------------
  |  | 2029|  5.03k|#define tls1_suiteb(s) (s->cert->cert_flags & SSL_CERT_FLAG_SUITEB_128_LOS)
  |  |  ------------------
  |  |  |  |  562|  5.03k|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  |  |  ------------------
  |  |  |  Branch (2029:24): [True: 138, False: 4.89k]
  |  |  ------------------
  ------------------
 2550|    129|    case SSL_CERT_FLAG_SUITEB_128_LOS:
  ------------------
  |  |  562|    129|#define SSL_CERT_FLAG_SUITEB_128_LOS 0x30000
  ------------------
  |  Branch (2550:5): [True: 129, False: 4.90k]
  ------------------
 2551|    129|        *psigs = suiteb_sigalgs;
 2552|    129|        return OSSL_NELEM(suiteb_sigalgs);
  ------------------
  |  |   14|    129|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
 2553|       |
 2554|      4|    case SSL_CERT_FLAG_SUITEB_128_LOS_ONLY:
  ------------------
  |  |  558|      4|#define SSL_CERT_FLAG_SUITEB_128_LOS_ONLY 0x10000
  ------------------
  |  Branch (2554:5): [True: 4, False: 5.02k]
  ------------------
 2555|      4|        *psigs = suiteb_sigalgs;
 2556|      4|        return 1;
 2557|       |
 2558|      5|    case SSL_CERT_FLAG_SUITEB_192_LOS:
  ------------------
  |  |  560|      5|#define SSL_CERT_FLAG_SUITEB_192_LOS 0x20000
  ------------------
  |  Branch (2558:5): [True: 5, False: 5.02k]
  ------------------
 2559|      5|        *psigs = suiteb_sigalgs + 1;
 2560|      5|        return 1;
 2561|  5.03k|    }
 2562|       |    /*
 2563|       |     *  We use client_sigalgs (if not NULL) if we're a server
 2564|       |     *  and sending a certificate request or if we're a client and
 2565|       |     *  determining which shared algorithm to use.
 2566|       |     */
 2567|  4.89k|    if ((s->server == sent) && s->cert->client_sigalgs != NULL) {
  ------------------
  |  Branch (2567:9): [True: 0, False: 4.89k]
  |  Branch (2567:32): [True: 0, False: 0]
  ------------------
 2568|      0|        *psigs = s->cert->client_sigalgs;
 2569|      0|        return s->cert->client_sigalgslen;
 2570|  4.89k|    } else if (s->cert->conf_sigalgs) {
  ------------------
  |  Branch (2570:16): [True: 0, False: 4.89k]
  ------------------
 2571|      0|        *psigs = s->cert->conf_sigalgs;
 2572|      0|        return s->cert->conf_sigalgslen;
 2573|  4.89k|    } else {
 2574|  4.89k|        *psigs = SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs;
  ------------------
  |  |   26|  4.89k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2575|  4.89k|        return SSL_CONNECTION_GET_CTX(s)->tls12_sigalgs_len;
  ------------------
  |  |   26|  4.89k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 2576|  4.89k|    }
 2577|  4.89k|}
ssl_set_client_disabled:
 2878|  3.79k|{
 2879|  3.79k|    s->s3.tmp.mask_a = 0;
 2880|  3.79k|    s->s3.tmp.mask_k = 0;
 2881|  3.79k|    ssl_set_sig_mask(&s->s3.tmp.mask_a, s, SSL_SECOP_SIGALG_MASK);
  ------------------
  |  | 2776|  3.79k|#define SSL_SECOP_SIGALG_MASK (14 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2742|  3.79k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
 2882|  3.79k|    if (ssl_get_min_max_version(s, &s->s3.tmp.min_ver,
  ------------------
  |  Branch (2882:9): [True: 0, False: 3.79k]
  ------------------
 2883|  3.79k|            &s->s3.tmp.max_ver, NULL)
 2884|  3.79k|        != 0)
 2885|      0|        return 0;
 2886|  3.79k|#ifndef OPENSSL_NO_PSK
 2887|       |    /* with PSK there must be client callback set */
 2888|  3.79k|    if (!s->psk_client_callback) {
  ------------------
  |  Branch (2888:9): [True: 3.79k, False: 0]
  ------------------
 2889|  3.79k|        s->s3.tmp.mask_a |= SSL_aPSK;
  ------------------
  |  |  116|  3.79k|#define SSL_aPSK 0x00000010U
  ------------------
 2890|  3.79k|        s->s3.tmp.mask_k |= SSL_PSK;
  ------------------
  |  |  101|  3.79k|#define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   87|  3.79k|#define SSL_kPSK 0x00000008U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   93|  3.79k|#define SSL_kRSAPSK 0x00000040U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   94|  3.79k|#define SSL_kECDHEPSK 0x00000080U
  |  |  ------------------
  |  |               #define SSL_PSK (SSL_kPSK | SSL_kRSAPSK | SSL_kECDHEPSK | SSL_kDHEPSK)
  |  |  ------------------
  |  |  |  |   95|  3.79k|#define SSL_kDHEPSK 0x00000100U
  |  |  ------------------
  ------------------
 2891|  3.79k|    }
 2892|  3.79k|#endif /* OPENSSL_NO_PSK */
 2893|  3.79k|#ifndef OPENSSL_NO_SRP
 2894|  3.79k|    if (!(s->srp_ctx.srp_Mask & SSL_kSRP)) {
  ------------------
  |  |   91|  3.79k|#define SSL_kSRP 0x00000020U
  ------------------
  |  Branch (2894:9): [True: 3.77k, False: 15]
  ------------------
 2895|  3.77k|        s->s3.tmp.mask_a |= SSL_aSRP;
  ------------------
  |  |  120|  3.77k|#define SSL_aSRP 0x00000040U
  ------------------
 2896|  3.77k|        s->s3.tmp.mask_k |= SSL_kSRP;
  ------------------
  |  |   91|  3.77k|#define SSL_kSRP 0x00000020U
  ------------------
 2897|  3.77k|    }
 2898|  3.79k|#endif
 2899|  3.79k|    return 1;
 2900|  3.79k|}
ssl_cipher_disabled:
 2913|   216k|{
 2914|   216k|    int minversion = SSL_CONNECTION_IS_DTLS(s) ? c->min_dtls : c->min_tls;
  ------------------
  |  |  258|   216k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   216k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|   216k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 216k]
  |  |  ------------------
  ------------------
 2915|   216k|    int maxversion = SSL_CONNECTION_IS_DTLS(s) ? c->max_dtls : c->max_tls;
  ------------------
  |  |  258|   216k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|   216k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|   216k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 216k]
  |  |  ------------------
  ------------------
 2916|       |
 2917|   216k|    if (c->algorithm_mkey & s->s3.tmp.mask_k
  ------------------
  |  Branch (2917:9): [True: 105k, False: 111k]
  ------------------
 2918|   111k|        || c->algorithm_auth & s->s3.tmp.mask_a)
  ------------------
  |  Branch (2918:12): [True: 6, False: 111k]
  ------------------
 2919|   105k|        return 1;
 2920|   111k|    if (s->s3.tmp.max_ver == 0)
  ------------------
  |  Branch (2920:9): [True: 0, False: 111k]
  ------------------
 2921|      0|        return 1;
 2922|       |
 2923|   111k|    if (SSL_IS_QUIC_INT_HANDSHAKE(s))
  ------------------
  |  |  304|   111k|#define SSL_IS_QUIC_INT_HANDSHAKE(s) (((s)->s3.flags & TLS1_FLAGS_QUIC_INTERNAL) != 0)
  |  |  ------------------
  |  |  |  |   31|   111k|#define TLS1_FLAGS_QUIC_INTERNAL 0x4000
  |  |  ------------------
  |  |  |  Branch (304:38): [True: 0, False: 111k]
  |  |  ------------------
  ------------------
 2924|       |        /* For QUIC, only allow these ciphersuites. */
 2925|      0|        switch (SSL_CIPHER_get_id(c)) {
 2926|      0|        case TLS1_3_CK_AES_128_GCM_SHA256:
  ------------------
  |  |  626|      0|#define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301
  ------------------
  |  Branch (2926:9): [True: 0, False: 0]
  ------------------
 2927|      0|        case TLS1_3_CK_AES_256_GCM_SHA384:
  ------------------
  |  |  627|      0|#define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302
  ------------------
  |  Branch (2927:9): [True: 0, False: 0]
  ------------------
 2928|      0|        case TLS1_3_CK_CHACHA20_POLY1305_SHA256:
  ------------------
  |  |  628|      0|#define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303
  ------------------
  |  Branch (2928:9): [True: 0, False: 0]
  ------------------
 2929|      0|            break;
 2930|      0|        default:
  ------------------
  |  Branch (2930:9): [True: 0, False: 0]
  ------------------
 2931|      0|            return 1;
 2932|      0|        }
 2933|       |
 2934|       |    /*
 2935|       |     * For historical reasons we will allow ECHDE to be selected by a server
 2936|       |     * in SSLv3 if we are a client
 2937|       |     */
 2938|   111k|    if (minversion == TLS1_VERSION
  ------------------
  |  |   24|   223k|#define TLS1_VERSION 0x0301
  ------------------
  |  Branch (2938:9): [True: 14.7k, False: 96.7k]
  ------------------
 2939|  14.7k|        && ecdhe
  ------------------
  |  Branch (2939:12): [True: 0, False: 14.7k]
  ------------------
 2940|      0|        && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   85|      0|#define SSL_kECDHE 0x00000004U
  ------------------
                      && (c->algorithm_mkey & (SSL_kECDHE | SSL_kECDHEPSK)) != 0)
  ------------------
  |  |   94|      0|#define SSL_kECDHEPSK 0x00000080U
  ------------------
  |  Branch (2940:12): [True: 0, False: 0]
  ------------------
 2941|      0|        minversion = SSL3_VERSION;
  ------------------
  |  |   23|      0|#define SSL3_VERSION 0x0300
  ------------------
 2942|       |
 2943|   111k|    if (ssl_version_cmp(s, minversion, s->s3.tmp.max_ver) > 0
  ------------------
  |  Branch (2943:9): [True: 45, False: 111k]
  ------------------
 2944|   111k|        || ssl_version_cmp(s, maxversion, s->s3.tmp.min_ver) < 0)
  ------------------
  |  Branch (2944:12): [True: 281, False: 111k]
  ------------------
 2945|    326|        return 1;
 2946|       |
 2947|   111k|    return !ssl_security(s, op, c->strength_bits, 0, (void *)c);
 2948|   111k|}
tls_use_ticket:
 2951|  1.24k|{
 2952|  1.24k|    if ((s->options & SSL_OP_NO_TICKET))
  ------------------
  |  |  383|  1.24k|#define SSL_OP_NO_TICKET SSL_OP_BIT(14)
  |  |  ------------------
  |  |  |  |  350|  1.24k|#define SSL_OP_BIT(n) ((uint64_t)1 << (uint64_t)n)
  |  |  ------------------
  ------------------
  |  Branch (2952:9): [True: 1.24k, False: 0]
  ------------------
 2953|  1.24k|        return 0;
 2954|      0|    return ssl_security(s, SSL_SECOP_TICKET, 0, 0, NULL);
  ------------------
  |  | 2768|      0|#define SSL_SECOP_TICKET (10 | SSL_SECOP_OTHER_NONE)
  |  |  ------------------
  |  |  |  | 2737|      0|#define SSL_SECOP_OTHER_NONE 0
  |  |  ------------------
  ------------------
 2955|  1.24k|}
ssl_set_sig_mask:
 3425|  3.79k|{
 3426|  3.79k|    const uint16_t *sigalgs;
 3427|  3.79k|    size_t i, sigalgslen;
 3428|  3.79k|    uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  108|  3.79k|#define SSL_aRSA 0x00000001U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  110|  3.79k|#define SSL_aDSS 0x00000002U
  ------------------
                  uint32_t disabled_mask = SSL_aRSA | SSL_aDSS | SSL_aECDSA;
  ------------------
  |  |  114|  3.79k|#define SSL_aECDSA 0x00000008U
  ------------------
 3429|       |    /*
 3430|       |     * Go through all signature algorithms seeing if we support any
 3431|       |     * in disabled_mask.
 3432|       |     */
 3433|  3.79k|    sigalgslen = tls12_get_psigalgs(s, 1, &sigalgs);
 3434|   110k|    for (i = 0; i < sigalgslen; i++, sigalgs++) {
  ------------------
  |  Branch (3434:17): [True: 107k, False: 3.79k]
  ------------------
 3435|   107k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *sigalgs);
  ------------------
  |  |   26|   107k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3436|   107k|        const SSL_CERT_LOOKUP *clu;
 3437|       |
 3438|   107k|        if (lu == NULL)
  ------------------
  |  Branch (3438:13): [True: 0, False: 107k]
  ------------------
 3439|      0|            continue;
 3440|       |
 3441|   107k|        clu = ssl_cert_lookup_by_idx(lu->sig_idx,
 3442|   107k|            SSL_CONNECTION_GET_CTX(s));
  ------------------
  |  |   26|   107k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3443|   107k|        if (clu == NULL)
  ------------------
  |  Branch (3443:13): [True: 0, False: 107k]
  ------------------
 3444|      0|            continue;
 3445|       |
 3446|       |        /* If algorithm is disabled see if we can enable it */
 3447|   107k|        if ((clu->amask & disabled_mask) != 0
  ------------------
  |  Branch (3447:13): [True: 11.4k, False: 95.7k]
  ------------------
 3448|  11.4k|            && tls12_sigalg_allowed(s, op, lu))
  ------------------
  |  Branch (3448:16): [True: 11.1k, False: 253]
  ------------------
 3449|  11.1k|            disabled_mask &= ~clu->amask;
 3450|   107k|    }
 3451|  3.79k|    *pmask_a |= disabled_mask;
 3452|  3.79k|}
tls12_copy_sigalgs:
 3456|  1.24k|{
 3457|  1.24k|    size_t i;
 3458|  1.24k|    int rv = 0;
 3459|       |
 3460|  36.3k|    for (i = 0; i < psiglen; i++, psig++) {
  ------------------
  |  Branch (3460:17): [True: 35.0k, False: 1.24k]
  ------------------
 3461|  35.0k|        const SIGALG_LOOKUP *lu = tls1_lookup_sigalg(SSL_CONNECTION_GET_CTX(s), *psig);
  ------------------
  |  |   26|  35.0k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3462|       |
 3463|  35.0k|        if (lu == NULL || !tls_sigalg_compat(s, lu))
  ------------------
  |  Branch (3463:13): [True: 0, False: 35.0k]
  |  Branch (3463:27): [True: 3.80k, False: 31.2k]
  ------------------
 3464|  3.80k|            continue;
 3465|  31.2k|        if (!WPACKET_put_bytes_u16(pkt, *psig))
  ------------------
  |  |  891|  31.2k|    WPACKET_put_bytes__((pkt), (val), 2)
  ------------------
  |  Branch (3465:13): [True: 0, False: 31.2k]
  ------------------
 3466|      0|            return 0;
 3467|       |        /*
 3468|       |         * If TLS 1.3 must have at least one valid TLS 1.3 message
 3469|       |         * signing algorithm: i.e. neither RSA nor SHA1/SHA224
 3470|       |         */
 3471|  31.2k|        if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |  265|  2.48k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  2.48k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  1.24k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 1.24k, False: 0]
  |  |  ------------------
  |  |  266|  1.24k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  2.48k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 1.24k, False: 0]
  |  |  ------------------
  |  |  267|  2.48k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  1.24k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  1.24k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 1.24k]
  |  |  ------------------
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  |   63|      0|#define EVP_PKEY_RSA NID_rsaEncryption
  |  |  ------------------
  |  |  |  |  543|      0|#define NID_rsaEncryption               6
  |  |  ------------------
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  | 2344|      0|#define NID_sha1                64
  ------------------
                      if (rv == 0 && (!SSL_CONNECTION_IS_TLS13(s) || (lu->sig != EVP_PKEY_RSA && lu->hash != NID_sha1 && lu->hash != NID_sha224)))
  ------------------
  |  | 3302|      0|#define NID_sha224              675
  ------------------
  |  Branch (3471:13): [True: 1.24k, False: 30.0k]
  |  Branch (3471:57): [True: 0, False: 0]
  |  Branch (3471:84): [True: 0, False: 0]
  |  Branch (3471:108): [True: 0, False: 0]
  ------------------
 3472|  1.24k|            rv = 1;
 3473|  31.2k|    }
 3474|  1.24k|    if (rv == 0)
  ------------------
  |  Branch (3474:9): [True: 0, False: 1.24k]
  ------------------
 3475|       |        ERR_raise(ERR_LIB_SSL, SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 3476|  1.24k|    return rv;
 3477|  1.24k|}
t1_lib.c:discover_provider_groups:
  357|  2.16k|{
  358|  2.16k|    struct provider_ctx_data_st pgd;
  359|       |
  360|  2.16k|    pgd.ctx = vctx;
  361|  2.16k|    pgd.provider = provider;
  362|  2.16k|    return OSSL_PROVIDER_get_capabilities(provider, "TLS-GROUP",
  363|  2.16k|        add_provider_groups, &pgd);
  364|  2.16k|}
t1_lib.c:add_provider_groups:
  228|   123k|{
  229|   123k|    struct provider_ctx_data_st *pgd = data;
  230|   123k|    SSL_CTX *ctx = pgd->ctx;
  231|   123k|    const OSSL_PARAM *p;
  232|   123k|    TLS_GROUP_INFO *ginf = NULL;
  233|   123k|    EVP_KEYMGMT *keymgmt;
  234|   123k|    unsigned int gid;
  235|   123k|    unsigned int is_kem = 0;
  236|   123k|    int ret = 0;
  237|       |
  238|   123k|    if (ctx->group_list_max_len == ctx->group_list_len) {
  ------------------
  |  Branch (238:9): [True: 12.4k, False: 111k]
  ------------------
  239|  12.4k|        TLS_GROUP_INFO *tmp = NULL;
  240|       |
  241|  12.4k|        if (ctx->group_list_max_len == 0)
  ------------------
  |  Branch (241:13): [True: 2.09k, False: 10.3k]
  ------------------
  242|  2.09k|            tmp = OPENSSL_malloc_array(TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  110|  2.09k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  243|  12.4k|                sizeof(TLS_GROUP_INFO));
  244|  10.3k|        else
  245|  10.3k|            tmp = OPENSSL_realloc_array(ctx->group_list,
  ------------------
  |  |  124|  10.3k|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  246|  12.4k|                ctx->group_list_max_len
  247|  12.4k|                    + TLS_GROUP_LIST_MALLOC_BLOCK_SIZE,
  248|  12.4k|                sizeof(TLS_GROUP_INFO));
  249|  12.4k|        if (tmp == NULL)
  ------------------
  |  Branch (249:13): [True: 0, False: 12.4k]
  ------------------
  250|      0|            return 0;
  251|  12.4k|        ctx->group_list = tmp;
  252|  12.4k|        memset(tmp + ctx->group_list_max_len,
  253|  12.4k|            0,
  254|  12.4k|            sizeof(TLS_GROUP_INFO) * TLS_GROUP_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  225|  12.4k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  255|  12.4k|        ctx->group_list_max_len += TLS_GROUP_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  225|  12.4k|#define TLS_GROUP_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  256|  12.4k|    }
  257|       |
  258|   123k|    ginf = &ctx->group_list[ctx->group_list_len];
  259|       |
  260|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME);
  ------------------
  |  |  156|   123k|# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
  ------------------
  261|   123k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   123k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (261:9): [True: 0, False: 123k]
  |  Branch (261:22): [True: 0, False: 123k]
  ------------------
  262|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  263|      0|        goto err;
  264|      0|    }
  265|   123k|    ginf->tlsname = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|   123k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  266|   123k|    if (ginf->tlsname == NULL)
  ------------------
  |  Branch (266:9): [True: 0, False: 123k]
  ------------------
  267|      0|        goto err;
  268|       |
  269|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL);
  ------------------
  |  |  157|   123k|# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
  ------------------
  270|   123k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   123k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (270:9): [True: 0, False: 123k]
  |  Branch (270:22): [True: 0, False: 123k]
  ------------------
  271|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  272|      0|        goto err;
  273|      0|    }
  274|   123k|    ginf->realname = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|   123k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  275|   123k|    if (ginf->realname == NULL)
  ------------------
  |  Branch (275:9): [True: 0, False: 123k]
  ------------------
  276|      0|        goto err;
  277|       |
  278|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ID);
  ------------------
  |  |  150|   123k|# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
  ------------------
  279|   123k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &gid) || gid > UINT16_MAX) {
  ------------------
  |  Branch (279:9): [True: 0, False: 123k]
  |  Branch (279:22): [True: 0, False: 123k]
  |  Branch (279:55): [True: 0, False: 123k]
  ------------------
  280|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  281|      0|        goto err;
  282|      0|    }
  283|   123k|    ginf->group_id = (uint16_t)gid;
  284|       |
  285|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_ALG);
  ------------------
  |  |  149|   123k|# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
  ------------------
  286|   123k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|   123k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (286:9): [True: 0, False: 123k]
  |  Branch (286:22): [True: 0, False: 123k]
  ------------------
  287|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  288|      0|        goto err;
  289|      0|    }
  290|   123k|    ginf->algorithm = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|   123k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  291|   123k|    if (ginf->algorithm == NULL)
  ------------------
  |  Branch (291:9): [True: 0, False: 123k]
  ------------------
  292|      0|        goto err;
  293|       |
  294|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS);
  ------------------
  |  |  158|   123k|# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
  ------------------
  295|   123k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &ginf->secbits)) {
  ------------------
  |  Branch (295:9): [True: 0, False: 123k]
  |  Branch (295:22): [True: 0, False: 123k]
  ------------------
  296|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  297|      0|        goto err;
  298|      0|    }
  299|       |
  300|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_IS_KEM);
  ------------------
  |  |  151|   123k|# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
  ------------------
  301|   123k|    if (p != NULL && (!OSSL_PARAM_get_uint(p, &is_kem) || is_kem > 1)) {
  ------------------
  |  Branch (301:9): [True: 123k, False: 0]
  |  Branch (301:23): [True: 0, False: 123k]
  |  Branch (301:59): [True: 0, False: 123k]
  ------------------
  302|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  303|      0|        goto err;
  304|      0|    }
  305|   123k|    ginf->is_kem = 1 & is_kem;
  306|       |
  307|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_TLS);
  ------------------
  |  |  155|   123k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
  ------------------
  308|   123k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mintls)) {
  ------------------
  |  Branch (308:9): [True: 0, False: 123k]
  |  Branch (308:22): [True: 0, False: 123k]
  ------------------
  309|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  310|      0|        goto err;
  311|      0|    }
  312|       |
  313|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_TLS);
  ------------------
  |  |  153|   123k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
  ------------------
  314|   123k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxtls)) {
  ------------------
  |  Branch (314:9): [True: 0, False: 123k]
  |  Branch (314:22): [True: 0, False: 123k]
  ------------------
  315|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  316|      0|        goto err;
  317|      0|    }
  318|       |
  319|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS);
  ------------------
  |  |  154|   123k|# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
  ------------------
  320|   123k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->mindtls)) {
  ------------------
  |  Branch (320:9): [True: 0, False: 123k]
  |  Branch (320:22): [True: 0, False: 123k]
  ------------------
  321|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  322|      0|        goto err;
  323|      0|    }
  324|       |
  325|   123k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS);
  ------------------
  |  |  152|   123k|# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
  ------------------
  326|   123k|    if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxdtls)) {
  ------------------
  |  Branch (326:9): [True: 0, False: 123k]
  |  Branch (326:22): [True: 0, False: 123k]
  ------------------
  327|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  328|      0|        goto err;
  329|      0|    }
  330|       |    /*
  331|       |     * Now check that the algorithm is actually usable for our property query
  332|       |     * string. Regardless of the result we still return success because we have
  333|       |     * successfully processed this group, even though we may decide not to use
  334|       |     * it.
  335|       |     */
  336|   123k|    ret = 1;
  337|   123k|    ERR_set_mark();
  338|   123k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, ginf->algorithm, ctx->propq);
  339|   123k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (339:9): [True: 121k, False: 1.65k]
  ------------------
  340|       |        /* We have successfully fetched the algorithm, we can use the group. */
  341|   121k|        ctx->group_list_len++;
  342|   121k|        ginf = NULL;
  343|   121k|        EVP_KEYMGMT_free(keymgmt);
  344|   121k|    }
  345|   123k|    ERR_pop_to_mark();
  346|   123k|err:
  347|   123k|    if (ginf != NULL) {
  ------------------
  |  Branch (347:9): [True: 1.65k, False: 121k]
  ------------------
  348|  1.65k|        OPENSSL_free(ginf->tlsname);
  ------------------
  |  |  131|  1.65k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  349|  1.65k|        OPENSSL_free(ginf->realname);
  ------------------
  |  |  131|  1.65k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  350|  1.65k|        OPENSSL_free(ginf->algorithm);
  ------------------
  |  |  131|  1.65k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  351|       |        ginf->algorithm = ginf->tlsname = ginf->realname = NULL;
  352|  1.65k|    }
  353|   123k|    return ret;
  354|   123k|}
t1_lib.c:discover_provider_sigalgs:
  666|  2.16k|{
  667|  2.16k|    struct provider_ctx_data_st pgd;
  668|       |
  669|  2.16k|    pgd.ctx = vctx;
  670|  2.16k|    pgd.provider = provider;
  671|  2.16k|    OSSL_PROVIDER_get_capabilities(provider, "TLS-SIGALG",
  672|  2.16k|        add_provider_sigalgs, &pgd);
  673|       |    /*
  674|       |     * Always OK, even if provider doesn't support the capability:
  675|       |     * Reconsider testing retval when legacy sigalgs are also loaded this way.
  676|       |     */
  677|  2.16k|    return 1;
  678|  2.16k|}
t1_lib.c:add_provider_sigalgs:
  386|  6.27k|{
  387|  6.27k|    struct provider_ctx_data_st *pgd = data;
  388|  6.27k|    SSL_CTX *ctx = pgd->ctx;
  389|  6.27k|    OSSL_PROVIDER *provider = pgd->provider;
  390|  6.27k|    const OSSL_PARAM *p;
  391|  6.27k|    TLS_SIGALG_INFO *sinf = NULL;
  392|  6.27k|    EVP_KEYMGMT *keymgmt;
  393|  6.27k|    const char *keytype;
  394|  6.27k|    unsigned int code_point = 0;
  395|  6.27k|    int ret = 0;
  396|       |
  397|  6.27k|    if (ctx->sigalg_list_max_len == ctx->sigalg_list_len) {
  ------------------
  |  Branch (397:9): [True: 2.09k, False: 4.18k]
  ------------------
  398|  2.09k|        TLS_SIGALG_INFO *tmp = NULL;
  399|       |
  400|  2.09k|        if (ctx->sigalg_list_max_len == 0)
  ------------------
  |  Branch (400:13): [True: 2.09k, False: 0]
  ------------------
  401|  2.09k|            tmp = OPENSSL_malloc_array(TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  ------------------
  |  |  110|  2.09k|    CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  402|  2.09k|                sizeof(TLS_SIGALG_INFO));
  403|      0|        else
  404|      0|            tmp = OPENSSL_realloc_array(ctx->sigalg_list,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  405|  2.09k|                ctx->sigalg_list_max_len
  406|  2.09k|                    + TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE,
  407|  2.09k|                sizeof(TLS_SIGALG_INFO));
  408|  2.09k|        if (tmp == NULL)
  ------------------
  |  Branch (408:13): [True: 0, False: 2.09k]
  ------------------
  409|      0|            return 0;
  410|  2.09k|        ctx->sigalg_list = tmp;
  411|  2.09k|        memset(tmp + ctx->sigalg_list_max_len, 0,
  412|  2.09k|            sizeof(TLS_SIGALG_INFO) * TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE);
  ------------------
  |  |  383|  2.09k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  413|  2.09k|        ctx->sigalg_list_max_len += TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE;
  ------------------
  |  |  383|  2.09k|#define TLS_SIGALG_LIST_MALLOC_BLOCK_SIZE 10
  ------------------
  414|  2.09k|    }
  415|       |
  416|  6.27k|    sinf = &ctx->sigalg_list[ctx->sigalg_list_len];
  417|       |
  418|       |    /* First, mandatory parameters */
  419|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_NAME);
  ------------------
  |  |  169|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
  ------------------
  420|  6.27k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  6.27k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (420:9): [True: 0, False: 6.27k]
  |  Branch (420:22): [True: 0, False: 6.27k]
  ------------------
  421|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  422|      0|        goto err;
  423|      0|    }
  424|  6.27k|    OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  131|  6.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  425|  6.27k|    sinf->sigalg_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|  6.27k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  426|  6.27k|    if (sinf->sigalg_name == NULL)
  ------------------
  |  Branch (426:9): [True: 0, False: 6.27k]
  ------------------
  427|      0|        goto err;
  428|       |
  429|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME);
  ------------------
  |  |  162|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
  ------------------
  430|  6.27k|    if (p == NULL || p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  6.27k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (430:9): [True: 0, False: 6.27k]
  |  Branch (430:22): [True: 0, False: 6.27k]
  ------------------
  431|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  432|      0|        goto err;
  433|      0|    }
  434|  6.27k|    OPENSSL_free(sinf->name);
  ------------------
  |  |  131|  6.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  435|  6.27k|    sinf->name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|  6.27k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  436|  6.27k|    if (sinf->name == NULL)
  ------------------
  |  Branch (436:9): [True: 0, False: 6.27k]
  ------------------
  437|      0|        goto err;
  438|       |
  439|  6.27k|    p = OSSL_PARAM_locate_const(params,
  440|  6.27k|        OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT);
  ------------------
  |  |  159|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
  ------------------
  441|  6.27k|    if (p == NULL
  ------------------
  |  Branch (441:9): [True: 0, False: 6.27k]
  ------------------
  442|  6.27k|        || !OSSL_PARAM_get_uint(p, &code_point)
  ------------------
  |  Branch (442:12): [True: 0, False: 6.27k]
  ------------------
  443|  6.27k|        || code_point > UINT16_MAX) {
  ------------------
  |  Branch (443:12): [True: 0, False: 6.27k]
  ------------------
  444|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  445|      0|        goto err;
  446|      0|    }
  447|  6.27k|    sinf->code_point = (uint16_t)code_point;
  448|       |
  449|  6.27k|    p = OSSL_PARAM_locate_const(params,
  450|  6.27k|        OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS);
  ------------------
  |  |  171|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
  ------------------
  451|  6.27k|    if (p == NULL || !OSSL_PARAM_get_uint(p, &sinf->secbits)) {
  ------------------
  |  Branch (451:9): [True: 0, False: 6.27k]
  |  Branch (451:22): [True: 0, False: 6.27k]
  ------------------
  452|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  453|      0|        goto err;
  454|      0|    }
  455|       |
  456|       |    /* Now, optional parameters */
  457|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_OID);
  ------------------
  |  |  170|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
  ------------------
  458|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (458:9): [True: 0, False: 6.27k]
  ------------------
  459|      0|        sinf->sigalg_oid = NULL;
  460|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|  6.27k|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (460:16): [True: 0, False: 6.27k]
  ------------------
  461|      0|        goto err;
  462|  6.27k|    } else {
  463|  6.27k|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  131|  6.27k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  464|  6.27k|        sinf->sigalg_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|  6.27k|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  465|  6.27k|        if (sinf->sigalg_oid == NULL)
  ------------------
  |  Branch (465:13): [True: 0, False: 6.27k]
  ------------------
  466|      0|            goto err;
  467|  6.27k|    }
  468|       |
  469|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME);
  ------------------
  |  |  172|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
  ------------------
  470|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (470:9): [True: 6.27k, False: 0]
  ------------------
  471|  6.27k|        sinf->sig_name = NULL;
  472|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (472:16): [True: 0, False: 0]
  ------------------
  473|      0|        goto err;
  474|      0|    } else {
  475|      0|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  476|      0|        sinf->sig_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  477|      0|        if (sinf->sig_name == NULL)
  ------------------
  |  Branch (477:13): [True: 0, False: 0]
  ------------------
  478|      0|            goto err;
  479|      0|    }
  480|       |
  481|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_SIG_OID);
  ------------------
  |  |  173|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
  ------------------
  482|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (482:9): [True: 6.27k, False: 0]
  ------------------
  483|  6.27k|        sinf->sig_oid = NULL;
  484|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (484:16): [True: 0, False: 0]
  ------------------
  485|      0|        goto err;
  486|      0|    } else {
  487|      0|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  488|      0|        sinf->sig_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  489|      0|        if (sinf->sig_oid == NULL)
  ------------------
  |  Branch (489:13): [True: 0, False: 0]
  ------------------
  490|      0|            goto err;
  491|      0|    }
  492|       |
  493|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME);
  ------------------
  |  |  160|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
  ------------------
  494|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (494:9): [True: 6.27k, False: 0]
  ------------------
  495|  6.27k|        sinf->hash_name = NULL;
  496|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (496:16): [True: 0, False: 0]
  ------------------
  497|      0|        goto err;
  498|      0|    } else {
  499|      0|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  500|      0|        sinf->hash_name = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  501|      0|        if (sinf->hash_name == NULL)
  ------------------
  |  Branch (501:13): [True: 0, False: 0]
  ------------------
  502|      0|            goto err;
  503|      0|    }
  504|       |
  505|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_HASH_OID);
  ------------------
  |  |  161|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
  ------------------
  506|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (506:9): [True: 6.27k, False: 0]
  ------------------
  507|  6.27k|        sinf->hash_oid = NULL;
  508|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (508:16): [True: 0, False: 0]
  ------------------
  509|      0|        goto err;
  510|      0|    } else {
  511|      0|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  512|      0|        sinf->hash_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  513|      0|        if (sinf->hash_oid == NULL)
  ------------------
  |  Branch (513:13): [True: 0, False: 0]
  ------------------
  514|      0|            goto err;
  515|      0|    }
  516|       |
  517|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE);
  ------------------
  |  |  163|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
  ------------------
  518|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (518:9): [True: 6.27k, False: 0]
  ------------------
  519|  6.27k|        sinf->keytype = NULL;
  520|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (520:16): [True: 0, False: 0]
  ------------------
  521|      0|        goto err;
  522|      0|    } else {
  523|      0|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  524|      0|        sinf->keytype = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  525|      0|        if (sinf->keytype == NULL)
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  ------------------
  526|      0|            goto err;
  527|      0|    }
  528|       |
  529|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID);
  ------------------
  |  |  164|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
  ------------------
  530|  6.27k|    if (p == NULL) {
  ------------------
  |  Branch (530:9): [True: 6.27k, False: 0]
  ------------------
  531|  6.27k|        sinf->keytype_oid = NULL;
  532|  6.27k|    } else if (p->data_type != OSSL_PARAM_UTF8_STRING) {
  ------------------
  |  |  117|      0|#define OSSL_PARAM_UTF8_STRING 4
  ------------------
  |  Branch (532:16): [True: 0, False: 0]
  ------------------
  533|      0|        goto err;
  534|      0|    } else {
  535|      0|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  536|      0|        sinf->keytype_oid = OPENSSL_strdup(p->data);
  ------------------
  |  |  135|      0|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  537|      0|        if (sinf->keytype_oid == NULL)
  ------------------
  |  Branch (537:13): [True: 0, False: 0]
  ------------------
  538|      0|            goto err;
  539|      0|    }
  540|       |
  541|       |    /* Optional, not documented prior to 3.5 */
  542|  6.27k|    sinf->mindtls = sinf->maxdtls = -1;
  543|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS);
  ------------------
  |  |  167|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
  ------------------
  544|  6.27k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->mindtls)) {
  ------------------
  |  Branch (544:9): [True: 6.27k, False: 0]
  |  Branch (544:22): [True: 0, False: 6.27k]
  ------------------
  545|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  546|      0|        goto err;
  547|      0|    }
  548|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS);
  ------------------
  |  |  165|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
  ------------------
  549|  6.27k|    if (p != NULL && !OSSL_PARAM_get_int(p, &sinf->maxdtls)) {
  ------------------
  |  Branch (549:9): [True: 6.27k, False: 0]
  |  Branch (549:22): [True: 0, False: 6.27k]
  ------------------
  550|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  551|      0|        goto err;
  552|      0|    }
  553|       |    /* DTLS version numbers grow downward */
  554|  6.27k|    if ((sinf->maxdtls != 0) && (sinf->maxdtls != -1) && ((sinf->maxdtls > sinf->mindtls))) {
  ------------------
  |  Branch (554:9): [True: 6.27k, False: 0]
  |  Branch (554:33): [True: 0, False: 6.27k]
  |  Branch (554:58): [True: 0, False: 0]
  ------------------
  555|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  556|      0|        goto err;
  557|      0|    }
  558|       |    /* No provider sigalgs are supported in DTLS, reset after checking. */
  559|  6.27k|    sinf->mindtls = sinf->maxdtls = -1;
  560|       |
  561|       |    /* The remaining parameters below are mandatory again */
  562|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS);
  ------------------
  |  |  168|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
  ------------------
  563|  6.27k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->mintls)) {
  ------------------
  |  Branch (563:9): [True: 0, False: 6.27k]
  |  Branch (563:22): [True: 0, False: 6.27k]
  ------------------
  564|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  565|      0|        goto err;
  566|      0|    }
  567|  6.27k|    p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS);
  ------------------
  |  |  166|  6.27k|# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
  ------------------
  568|  6.27k|    if (p == NULL || !OSSL_PARAM_get_int(p, &sinf->maxtls)) {
  ------------------
  |  Branch (568:9): [True: 0, False: 6.27k]
  |  Branch (568:22): [True: 0, False: 6.27k]
  ------------------
  569|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  570|      0|        goto err;
  571|      0|    }
  572|  6.27k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < sinf->mintls))) {
  ------------------
  |  Branch (572:9): [True: 0, False: 6.27k]
  |  Branch (572:32): [True: 0, False: 0]
  |  Branch (572:56): [True: 0, False: 0]
  ------------------
  573|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  574|      0|        goto err;
  575|      0|    }
  576|  6.27k|    if ((sinf->mintls != 0) && (sinf->mintls != -1) && ((sinf->mintls > TLS1_3_VERSION)))
  ------------------
  |  |   27|  6.27k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (576:9): [True: 6.27k, False: 0]
  |  Branch (576:32): [True: 6.27k, False: 0]
  |  Branch (576:56): [True: 0, False: 6.27k]
  ------------------
  577|      0|        sinf->mintls = sinf->maxtls = -1;
  578|  6.27k|    if ((sinf->maxtls != 0) && (sinf->maxtls != -1) && ((sinf->maxtls < TLS1_3_VERSION)))
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (578:9): [True: 0, False: 6.27k]
  |  Branch (578:32): [True: 0, False: 0]
  |  Branch (578:56): [True: 0, False: 0]
  ------------------
  579|      0|        sinf->mintls = sinf->maxtls = -1;
  580|       |
  581|       |    /* Ignore unusable sigalgs */
  582|  6.27k|    if (sinf->mintls == -1 && sinf->mindtls == -1) {
  ------------------
  |  Branch (582:9): [True: 0, False: 6.27k]
  |  Branch (582:31): [True: 0, False: 0]
  ------------------
  583|      0|        ret = 1;
  584|      0|        goto err;
  585|      0|    }
  586|       |
  587|       |    /*
  588|       |     * Now check that the algorithm is actually usable for our property query
  589|       |     * string. Regardless of the result we still return success because we have
  590|       |     * successfully processed this signature, even though we may decide not to
  591|       |     * use it.
  592|       |     */
  593|  6.27k|    ret = 1;
  594|  6.27k|    ERR_set_mark();
  595|  6.27k|    keytype = inferred_keytype(sinf);
  596|  6.27k|    keymgmt = EVP_KEYMGMT_fetch(ctx->libctx, keytype, ctx->propq);
  597|  6.27k|    if (keymgmt != NULL) {
  ------------------
  |  Branch (597:9): [True: 6.19k, False: 84]
  ------------------
  598|       |        /*
  599|       |         * We have successfully fetched the algorithm - however if the provider
  600|       |         * doesn't match this one then we ignore it.
  601|       |         *
  602|       |         * Note: We're cheating a little here. Technically if the same algorithm
  603|       |         * is available from more than one provider then it is undefined which
  604|       |         * implementation you will get back. Theoretically this could be
  605|       |         * different every time...we assume here that you'll always get the
  606|       |         * same one back if you repeat the exact same fetch. Is this a reasonable
  607|       |         * assumption to make (in which case perhaps we should document this
  608|       |         * behaviour)?
  609|       |         */
  610|  6.19k|        if (EVP_KEYMGMT_get0_provider(keymgmt) == provider) {
  ------------------
  |  Branch (610:13): [True: 6.19k, False: 0]
  ------------------
  611|       |            /*
  612|       |             * We have a match - so we could use this signature;
  613|       |             * Check proper object registration first, though.
  614|       |             * Don't care about return value as this may have been
  615|       |             * done within providers or previous calls to
  616|       |             * add_provider_sigalgs.
  617|       |             */
  618|  6.19k|            OBJ_create(sinf->sigalg_oid, sinf->sigalg_name, NULL);
  619|       |            /* sanity check: Without successful registration don't use alg */
  620|  6.19k|            if ((OBJ_txt2nid(sinf->sigalg_name) == NID_undef) || (OBJ_nid2obj(OBJ_txt2nid(sinf->sigalg_name)) == NULL)) {
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  |  Branch (620:17): [True: 0, False: 6.19k]
  |  Branch (620:66): [True: 0, False: 6.19k]
  ------------------
  621|      0|                ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  622|      0|                goto err;
  623|      0|            }
  624|  6.19k|            if (sinf->sig_name != NULL)
  ------------------
  |  Branch (624:17): [True: 0, False: 6.19k]
  ------------------
  625|      0|                OBJ_create(sinf->sig_oid, sinf->sig_name, NULL);
  626|  6.19k|            if (sinf->keytype != NULL)
  ------------------
  |  Branch (626:17): [True: 0, False: 6.19k]
  ------------------
  627|      0|                OBJ_create(sinf->keytype_oid, sinf->keytype, NULL);
  628|  6.19k|            if (sinf->hash_name != NULL)
  ------------------
  |  Branch (628:17): [True: 0, False: 6.19k]
  ------------------
  629|      0|                OBJ_create(sinf->hash_oid, sinf->hash_name, NULL);
  630|  6.19k|            OBJ_add_sigid(OBJ_txt2nid(sinf->sigalg_name),
  631|  6.19k|                (sinf->hash_name != NULL
  ------------------
  |  Branch (631:18): [True: 0, False: 6.19k]
  ------------------
  632|  6.19k|                        ? OBJ_txt2nid(sinf->hash_name)
  633|  6.19k|                        : NID_undef),
  ------------------
  |  |   18|  6.19k|#define NID_undef                       0
  ------------------
  634|  6.19k|                OBJ_txt2nid(keytype));
  635|  6.19k|            ctx->sigalg_list_len++;
  636|  6.19k|            sinf = NULL;
  637|  6.19k|        }
  638|  6.19k|        EVP_KEYMGMT_free(keymgmt);
  639|  6.19k|    }
  640|  6.27k|    ERR_pop_to_mark();
  641|  6.27k|err:
  642|  6.27k|    if (sinf != NULL) {
  ------------------
  |  Branch (642:9): [True: 84, False: 6.19k]
  ------------------
  643|     84|        OPENSSL_free(sinf->name);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  644|     84|        sinf->name = NULL;
  645|     84|        OPENSSL_free(sinf->sigalg_name);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  646|     84|        sinf->sigalg_name = NULL;
  647|     84|        OPENSSL_free(sinf->sigalg_oid);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  648|     84|        sinf->sigalg_oid = NULL;
  649|     84|        OPENSSL_free(sinf->sig_name);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  650|     84|        sinf->sig_name = NULL;
  651|     84|        OPENSSL_free(sinf->sig_oid);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  652|     84|        sinf->sig_oid = NULL;
  653|     84|        OPENSSL_free(sinf->hash_name);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  654|     84|        sinf->hash_name = NULL;
  655|     84|        OPENSSL_free(sinf->hash_oid);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  656|     84|        sinf->hash_oid = NULL;
  657|     84|        OPENSSL_free(sinf->keytype);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  658|     84|        sinf->keytype = NULL;
  659|     84|        OPENSSL_free(sinf->keytype_oid);
  ------------------
  |  |  131|     84|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  660|       |        sinf->keytype_oid = NULL;
  661|     84|    }
  662|  6.27k|    return ret;
  663|  6.27k|}
t1_lib.c:inferred_keytype:
  375|  12.4k|{
  376|  12.4k|    return (sinf->keytype != NULL
  ------------------
  |  Branch (376:13): [True: 0, False: 12.4k]
  ------------------
  377|  12.4k|            ? sinf->keytype
  378|  12.4k|            : (sinf->sig_name != NULL
  ------------------
  |  Branch (378:16): [True: 0, False: 12.4k]
  ------------------
  379|  12.4k|                      ? sinf->sig_name
  380|  12.4k|                      : sinf->sigalg_name));
  381|  12.4k|}
t1_lib.c:tuple_cb:
 1562|  8.37k|{
 1563|  8.37k|    gid_cb_st *garg = arg;
 1564|  8.37k|    int retval = 1; /* We assume success */
 1565|  8.37k|    char *restored_tuple_string;
 1566|       |
 1567|       |    /* Sanity checks */
 1568|  8.37k|    if (garg == NULL || tuple == NULL || len <= 0) {
  ------------------
  |  Branch (1568:9): [True: 0, False: 8.37k]
  |  Branch (1568:25): [True: 0, False: 8.37k]
  |  Branch (1568:42): [True: 0, False: 8.37k]
  ------------------
 1569|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1570|      0|        return 0;
 1571|      0|    }
 1572|       |
 1573|  8.37k|    if (garg->inner && !garg->first && !close_tuple(garg))
  ------------------
  |  Branch (1573:9): [True: 0, False: 8.37k]
  |  Branch (1573:24): [True: 0, False: 0]
  |  Branch (1573:40): [True: 0, False: 0]
  ------------------
 1574|      0|        return 0;
 1575|  8.37k|    garg->first = 0;
 1576|       |
 1577|       |    /* Convert to \0-terminated string */
 1578|  8.37k|    restored_tuple_string = OPENSSL_malloc(len + 1 /* \0 */);
  ------------------
  |  |  106|  8.37k|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1579|  8.37k|    if (restored_tuple_string == NULL)
  ------------------
  |  Branch (1579:9): [True: 0, False: 8.37k]
  ------------------
 1580|      0|        return 0;
 1581|  8.37k|    memcpy(restored_tuple_string, tuple, len);
 1582|  8.37k|    restored_tuple_string[len] = '\0';
 1583|       |
 1584|       |    /* Analyze group list of this tuple */
 1585|  8.37k|    retval = CONF_parse_list(restored_tuple_string, GROUP_DELIMITER_CHARACTER, 1, gid_cb, arg);
  ------------------
  |  | 1208|  8.37k|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
 1586|       |
 1587|       |    /* We don't need the \o-terminated string anymore */
 1588|  8.37k|    OPENSSL_free(restored_tuple_string);
  ------------------
  |  |  131|  8.37k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1589|       |
 1590|  8.37k|    if (!garg->inner && !close_tuple(garg))
  ------------------
  |  Branch (1590:9): [True: 8.37k, False: 0]
  |  Branch (1590:25): [True: 0, False: 8.37k]
  ------------------
 1591|      0|        return 0;
 1592|  8.37k|    return retval;
 1593|  8.37k|}
t1_lib.c:close_tuple:
 1548|  8.37k|{
 1549|  8.37k|    size_t gidcnt = garg->tuplcnt_arr[garg->tplcnt];
 1550|       |
 1551|  8.37k|    if (gidcnt == 0)
  ------------------
  |  Branch (1551:9): [True: 112, False: 8.26k]
  ------------------
 1552|    112|        return 1;
 1553|  8.26k|    if (!grow_tuples(garg))
  ------------------
  |  Branch (1553:9): [True: 0, False: 8.26k]
  ------------------
 1554|      0|        return 0;
 1555|       |
 1556|  8.26k|    garg->tuplcnt_arr[++garg->tplcnt] = 0;
 1557|  8.26k|    return 1;
 1558|  8.26k|}
t1_lib.c:grow_tuples:
 1532|  8.26k|{
 1533|  8.26k|    if (garg->tplcnt == garg->tplmax) {
  ------------------
  |  Branch (1533:9): [True: 0, False: 8.26k]
  ------------------
 1534|      0|        size_t newcnt = garg->tplmax + GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1535|      0|        size_t *tmp = OPENSSL_realloc_array(garg->tuplcnt_arr,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1536|      0|            newcnt, sizeof(*garg->tuplcnt_arr));
 1537|       |
 1538|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1538:13): [True: 0, False: 0]
  ------------------
 1539|      0|            return 0;
 1540|       |
 1541|      0|        garg->tplmax = newcnt;
 1542|      0|        garg->tuplcnt_arr = tmp;
 1543|      0|    }
 1544|  8.26k|    return 1;
 1545|  8.26k|}
t1_lib.c:gid_cb:
 1264|  16.7k|{
 1265|  16.7k|    gid_cb_st *garg = arg;
 1266|  16.7k|    size_t i, j, k;
 1267|  16.7k|    uint16_t gid = 0;
 1268|  16.7k|    int found_group = 0;
 1269|  16.7k|    char etmp[GROUP_NAME_BUFFER_LENGTH];
 1270|  16.7k|    int retval = 1; /* We assume success */
 1271|  16.7k|    const char *current_prefix;
 1272|  16.7k|    int ignore_unknown = 0;
 1273|  16.7k|    int add_keyshare = 0;
 1274|  16.7k|    int remove_group = 0;
 1275|  16.7k|    size_t restored_prefix_index = 0;
 1276|  16.7k|    char *restored_default_group_string;
 1277|  16.7k|    int continue_while_loop = 1;
 1278|       |
 1279|       |    /* Sanity checks */
 1280|  16.7k|    if (garg == NULL || elem == NULL || len <= 0) {
  ------------------
  |  Branch (1280:9): [True: 0, False: 16.7k]
  |  Branch (1280:25): [True: 0, False: 16.7k]
  |  Branch (1280:41): [True: 0, False: 16.7k]
  ------------------
 1281|      0|        ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_CONFIG_VALUE);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
 1282|      0|        return 0;
 1283|      0|    }
 1284|       |
 1285|       |    /* Check the possible prefixes (remark: Leading and trailing spaces already cleared) */
 1286|  37.6k|    while (continue_while_loop && len > 0
  ------------------
  |  Branch (1286:12): [True: 37.6k, False: 0]
  |  Branch (1286:35): [True: 37.6k, False: 0]
  ------------------
 1287|  37.6k|        && ((current_prefix = strchr(prefixes, elem[0])) != NULL
  ------------------
  |  Branch (1287:13): [True: 20.9k, False: 16.7k]
  ------------------
 1288|  20.9k|            || OPENSSL_strncasecmp(current_prefix = (char *)DEFAULT_GROUPNAME_FIRST_CHARACTER, elem, 1) == 0)) {
  ------------------
  |  Branch (1288:16): [True: 0, False: 16.7k]
  ------------------
 1289|       |
 1290|  20.9k|        switch (*current_prefix) {
 1291|      0|        case TUPLE_DELIMITER_CHARACTER:
  ------------------
  |  | 1204|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
  |  Branch (1291:9): [True: 0, False: 20.9k]
  ------------------
 1292|       |            /* tuple delimiter not allowed here -> syntax error */
 1293|      0|            return -1;
 1294|      0|            break;
 1295|      0|        case GROUP_DELIMITER_CHARACTER:
  ------------------
  |  | 1208|      0|#define GROUP_DELIMITER_CHARACTER ':'
  ------------------
  |  Branch (1295:9): [True: 0, False: 20.9k]
  ------------------
 1296|      0|            return -1; /* Not a valid prefix for a single group name-> syntax error */
 1297|      0|            break;
 1298|  4.18k|        case KEY_SHARE_INDICATOR_CHARACTER:
  ------------------
  |  | 1216|  4.18k|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
  |  Branch (1298:9): [True: 4.18k, False: 16.7k]
  ------------------
 1299|  4.18k|            if (add_keyshare)
  ------------------
  |  Branch (1299:17): [True: 0, False: 4.18k]
  ------------------
 1300|      0|                return -1; /* Only single key share prefix allowed -> syntax error */
 1301|  4.18k|            add_keyshare = 1;
 1302|  4.18k|            ++elem;
 1303|  4.18k|            --len;
 1304|  4.18k|            break;
 1305|      0|        case REMOVE_GROUP_INDICATOR_CHARACTER:
  ------------------
  |  | 1220|      0|#define REMOVE_GROUP_INDICATOR_CHARACTER '-'
  ------------------
  |  Branch (1305:9): [True: 0, False: 20.9k]
  ------------------
 1306|      0|            if (remove_group)
  ------------------
  |  Branch (1306:17): [True: 0, False: 0]
  ------------------
 1307|      0|                return -1; /* Only single remove group prefix allowed -> syntax error */
 1308|      0|            remove_group = 1;
 1309|      0|            ++elem;
 1310|      0|            --len;
 1311|      0|            break;
 1312|  16.7k|        case IGNORE_UNKNOWN_GROUP_CHARACTER:
  ------------------
  |  | 1212|  16.7k|#define IGNORE_UNKNOWN_GROUP_CHARACTER '?'
  ------------------
  |  Branch (1312:9): [True: 16.7k, False: 4.18k]
  ------------------
 1313|  16.7k|            if (ignore_unknown)
  ------------------
  |  Branch (1313:17): [True: 0, False: 16.7k]
  ------------------
 1314|      0|                return -1; /* Only single ? allowed -> syntax error */
 1315|  16.7k|            ignore_unknown = 1;
 1316|  16.7k|            ++elem;
 1317|  16.7k|            --len;
 1318|  16.7k|            break;
 1319|      0|        default:
  ------------------
  |  Branch (1319:9): [True: 0, False: 20.9k]
  ------------------
 1320|       |            /*
 1321|       |             * Check whether a DEFAULT[_XYZ] 'pseudo group' (= a built-in
 1322|       |             * list of groups) should be added
 1323|       |             */
 1324|      0|            for (i = 0; i < OSSL_NELEM(default_group_strings); i++) {
  ------------------
  |  |   14|      0|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1324:25): [True: 0, False: 0]
  ------------------
 1325|      0|                if ((size_t)len == (strlen(default_group_strings[i].list_name))
  ------------------
  |  Branch (1325:21): [True: 0, False: 0]
  ------------------
 1326|      0|                    && OPENSSL_strncasecmp(default_group_strings[i].list_name, elem, len) == 0) {
  ------------------
  |  Branch (1326:24): [True: 0, False: 0]
  ------------------
 1327|      0|                    int saved_first;
 1328|       |
 1329|       |                    /*
 1330|       |                     * We're asked to insert an entire list of groups from a
 1331|       |                     * DEFAULT[_XYZ] 'pseudo group' which we do by
 1332|       |                     * recursively calling this function (indirectly via
 1333|       |                     * CONF_parse_list and tuple_cb); essentially, we treat a DEFAULT
 1334|       |                     * group string like a tuple which is appended to the current tuple
 1335|       |                     * rather then starting a new tuple.
 1336|       |                     */
 1337|      0|                    if (ignore_unknown || remove_group)
  ------------------
  |  Branch (1337:25): [True: 0, False: 0]
  |  Branch (1337:43): [True: 0, False: 0]
  ------------------
 1338|      0|                        return -1; /* removal or ignore not allowed here -> syntax error */
 1339|       |
 1340|       |                    /*
 1341|       |                     * First, we restore any keyshare prefix in a new zero-terminated string
 1342|       |                     * (if not already present)
 1343|       |                     */
 1344|      0|                    restored_default_group_string = OPENSSL_malloc(1 /* max prefix length */ + strlen(default_group_strings[i].group_string) + 1 /* \0 */);
  ------------------
  |  |  106|      0|    CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1345|      0|                    if (restored_default_group_string == NULL)
  ------------------
  |  Branch (1345:25): [True: 0, False: 0]
  ------------------
 1346|      0|                        return 0;
 1347|      0|                    if (add_keyshare
  ------------------
  |  Branch (1347:25): [True: 0, False: 0]
  ------------------
 1348|       |                        /* Remark: we tolerate a duplicated keyshare indicator here */
 1349|      0|                        && default_group_strings[i].group_string[0]
  ------------------
  |  Branch (1349:28): [True: 0, False: 0]
  ------------------
 1350|      0|                            != KEY_SHARE_INDICATOR_CHARACTER)
  ------------------
  |  | 1216|      0|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1351|      0|                        restored_default_group_string[restored_prefix_index++] = KEY_SHARE_INDICATOR_CHARACTER;
  ------------------
  |  | 1216|      0|#define KEY_SHARE_INDICATOR_CHARACTER '*'
  ------------------
 1352|       |
 1353|      0|                    memcpy(restored_default_group_string + restored_prefix_index,
 1354|      0|                        default_group_strings[i].group_string,
 1355|      0|                        strlen(default_group_strings[i].group_string));
 1356|      0|                    restored_default_group_string[strlen(default_group_strings[i].group_string) + restored_prefix_index] = '\0';
 1357|       |                    /*
 1358|       |                     * Append first tuple of result to current tuple, and don't
 1359|       |                     * terminate the last tuple until we return to a top-level
 1360|       |                     * tuple_cb.
 1361|       |                     */
 1362|      0|                    saved_first = garg->first;
 1363|      0|                    garg->inner = garg->first = 1;
 1364|      0|                    retval = CONF_parse_list(restored_default_group_string,
 1365|      0|                        TUPLE_DELIMITER_CHARACTER, 1, tuple_cb, garg);
  ------------------
  |  | 1204|      0|#define TUPLE_DELIMITER_CHARACTER '/'
  ------------------
 1366|      0|                    garg->inner = 0;
 1367|      0|                    garg->first = saved_first;
 1368|       |                    /* We don't need the \0-terminated string anymore */
 1369|      0|                    OPENSSL_free(restored_default_group_string);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1370|       |
 1371|      0|                    return retval;
 1372|      0|                }
 1373|      0|            }
 1374|       |            /*
 1375|       |             * If we reached this point, a group name started with a 'd' or 'D', but no request
 1376|       |             * for a DEFAULT[_XYZ] 'pseudo group' was detected, hence processing of the group
 1377|       |             * name can continue as usual (= the while loop checking prefixes can end)
 1378|       |             */
 1379|      0|            continue_while_loop = 0;
 1380|      0|            break;
 1381|  20.9k|        }
 1382|  20.9k|    }
 1383|       |
 1384|  16.7k|    if (len == 0)
  ------------------
  |  Branch (1384:9): [True: 0, False: 16.7k]
  ------------------
 1385|      0|        return -1; /* Seems we have prefxes without a group name -> syntax error */
 1386|       |
 1387|       |    /* Memory management in case more groups are present compared to initial allocation */
 1388|  16.7k|    if (garg->gidcnt == garg->gidmax) {
  ------------------
  |  Branch (1388:9): [True: 0, False: 16.7k]
  ------------------
 1389|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->gid_arr,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1390|      0|            garg->gidmax + GROUPLIST_INCREMENT,
 1391|      0|            sizeof(*garg->gid_arr));
 1392|       |
 1393|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1393:13): [True: 0, False: 0]
  ------------------
 1394|      0|            return 0;
 1395|       |
 1396|      0|        garg->gidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1397|      0|        garg->gid_arr = tmp;
 1398|      0|    }
 1399|       |    /* Memory management for key share groups */
 1400|  16.7k|    if (garg->ksidcnt == garg->ksidmax) {
  ------------------
  |  Branch (1400:9): [True: 0, False: 16.7k]
  ------------------
 1401|      0|        uint16_t *tmp = OPENSSL_realloc_array(garg->ksid_arr,
  ------------------
  |  |  124|      0|    CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
 1402|      0|            garg->ksidmax + GROUPLIST_INCREMENT,
 1403|      0|            sizeof(*garg->ksid_arr));
 1404|       |
 1405|      0|        if (tmp == NULL)
  ------------------
  |  Branch (1405:13): [True: 0, False: 0]
  ------------------
 1406|      0|            return 0;
 1407|      0|        garg->ksidmax += GROUPLIST_INCREMENT;
  ------------------
  |  | 1193|      0|#define GROUPLIST_INCREMENT 32 /* Memory allocation chunk size (64 Bytes chunks ~= cache line) */
  ------------------
 1408|      0|        garg->ksid_arr = tmp;
 1409|      0|    }
 1410|       |
 1411|  16.7k|    if (len > (int)(sizeof(etmp) - 1))
  ------------------
  |  Branch (1411:9): [True: 0, False: 16.7k]
  ------------------
 1412|      0|        return -1; /* group name to long  -> syntax error */
 1413|       |
 1414|       |    /*
 1415|       |     * Prepare addition or removal of a single group by converting
 1416|       |     * a group name into its groupID equivalent
 1417|       |     */
 1418|       |
 1419|       |    /* Create a \0-terminated string and get the gid for this group if possible */
 1420|  16.7k|    memcpy(etmp, elem, len);
 1421|  16.7k|    etmp[len] = 0;
 1422|       |
 1423|       |    /* Get the groupID */
 1424|  16.7k|    gid = tls1_group_name2id(garg->ctx, etmp);
 1425|       |    /*
 1426|       |     * Handle the case where no valid groupID was returned
 1427|       |     * e.g. for an unknown group, which we'd ignore (only) if relevant prefix was set
 1428|       |     */
 1429|  16.7k|    if (gid == 0) {
  ------------------
  |  Branch (1429:9): [True: 224, False: 16.5k]
  ------------------
 1430|       |        /* Is it one of the GOST groups ? */
 1431|  1.79k|        for (i = 0; i < OSSL_NELEM(name2id_arr); i++) {
  ------------------
  |  |   14|  1.79k|#define OSSL_NELEM(x) (sizeof(x) / sizeof((x)[0]))
  ------------------
  |  Branch (1431:21): [True: 1.56k, False: 224]
  ------------------
 1432|  1.56k|            if (OPENSSL_strcasecmp(etmp, name2id_arr[i].group_name) == 0) {
  ------------------
  |  Branch (1432:17): [True: 0, False: 1.56k]
  ------------------
 1433|      0|                gid = name2id_arr[i].groupID;
 1434|      0|                break;
 1435|      0|            }
 1436|  1.56k|        }
 1437|    224|        if (gid == 0) { /* still not found */
  ------------------
  |  Branch (1437:13): [True: 224, False: 0]
  ------------------
 1438|       |            /* Unknown group - ignore if ignore_unknown; trigger error otherwise */
 1439|    224|            retval = ignore_unknown;
 1440|    224|            goto done;
 1441|    224|        }
 1442|    224|    }
 1443|       |
 1444|       |    /* Make sure that at least one provider is supporting this groupID */
 1445|  16.5k|    found_group = 0;
 1446|  92.9k|    for (j = 0; j < garg->ctx->group_list_len; j++)
  ------------------
  |  Branch (1446:17): [True: 92.9k, False: 0]
  ------------------
 1447|  92.9k|        if (garg->ctx->group_list[j].group_id == gid) {
  ------------------
  |  Branch (1447:13): [True: 16.5k, False: 76.4k]
  ------------------
 1448|  16.5k|            found_group = 1;
 1449|  16.5k|            break;
 1450|  16.5k|        }
 1451|       |
 1452|       |    /*
 1453|       |     * No provider supports this group - ignore if
 1454|       |     * ignore_unknown; trigger error otherwise
 1455|       |     */
 1456|  16.5k|    if (found_group == 0) {
  ------------------
  |  Branch (1456:9): [True: 0, False: 16.5k]
  ------------------
 1457|      0|        retval = ignore_unknown;
 1458|      0|        goto done;
 1459|      0|    }
 1460|       |    /* Remove group (and keyshare) from anywhere in the list if present, ignore if not present */
 1461|  16.5k|    if (remove_group) {
  ------------------
  |  Branch (1461:9): [True: 0, False: 16.5k]
  ------------------
 1462|       |        /* Is the current group specified anywhere in the entire list so far? */
 1463|      0|        found_group = 0;
 1464|      0|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1464:21): [True: 0, False: 0]
  ------------------
 1465|      0|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1465:17): [True: 0, False: 0]
  ------------------
 1466|      0|                found_group = 1;
 1467|      0|                break;
 1468|      0|            }
 1469|       |        /* The group to remove is at position i in the list of (zero indexed) groups */
 1470|      0|        if (found_group) {
  ------------------
  |  Branch (1470:13): [True: 0, False: 0]
  ------------------
 1471|       |            /* We remove that group from its position (which is at i)... */
 1472|      0|            for (j = i; j < (garg->gidcnt - 1); j++)
  ------------------
  |  Branch (1472:25): [True: 0, False: 0]
  ------------------
 1473|      0|                garg->gid_arr[j] = garg->gid_arr[j + 1]; /* ...shift remaining groups left ... */
 1474|      0|            garg->gidcnt--; /* ..and update the book keeping for the number of groups */
 1475|       |
 1476|       |            /*
 1477|       |             * We also must update the number of groups either in a previous tuple (which we
 1478|       |             * must identify and check whether it becomes empty due to the deletion) or in
 1479|       |             * the current tuple, pending where the deleted group resides
 1480|       |             */
 1481|      0|            k = 0;
 1482|      0|            for (j = 0; j < garg->tplcnt; j++) {
  ------------------
  |  Branch (1482:25): [True: 0, False: 0]
  ------------------
 1483|      0|                k += garg->tuplcnt_arr[j];
 1484|       |                /* Remark: i is zero-indexed, k is one-indexed */
 1485|      0|                if (k > i) { /* remove from one of the previous tuples */
  ------------------
  |  Branch (1485:21): [True: 0, False: 0]
  ------------------
 1486|      0|                    garg->tuplcnt_arr[j]--;
 1487|      0|                    break; /* We took care not to have group duplicates, hence we can stop here */
 1488|      0|                }
 1489|      0|            }
 1490|      0|            if (k <= i) /* remove from current tuple */
  ------------------
  |  Branch (1490:17): [True: 0, False: 0]
  ------------------
 1491|      0|                garg->tuplcnt_arr[j]--;
 1492|       |
 1493|       |            /* We also remove the group from the list of keyshares (if present) */
 1494|      0|            found_group = 0;
 1495|      0|            for (i = 0; i < garg->ksidcnt; i++)
  ------------------
  |  Branch (1495:25): [True: 0, False: 0]
  ------------------
 1496|      0|                if (garg->ksid_arr[i] == gid) {
  ------------------
  |  Branch (1496:21): [True: 0, False: 0]
  ------------------
 1497|      0|                    found_group = 1;
 1498|      0|                    break;
 1499|      0|                }
 1500|      0|            if (found_group) {
  ------------------
  |  Branch (1500:17): [True: 0, False: 0]
  ------------------
 1501|       |                /* Found, hence we remove that keyshare from its position (which is at i)... */
 1502|      0|                for (j = i; j < (garg->ksidcnt - 1); j++)
  ------------------
  |  Branch (1502:29): [True: 0, False: 0]
  ------------------
 1503|      0|                    garg->ksid_arr[j] = garg->ksid_arr[j + 1]; /* shift remaining key shares */
 1504|       |                /* ... and update the book keeping */
 1505|      0|                garg->ksidcnt--;
 1506|      0|            }
 1507|      0|        }
 1508|  16.5k|    } else { /* Processing addition of a single new group */
 1509|       |
 1510|       |        /* Check for duplicates */
 1511|  74.3k|        for (i = 0; i < garg->gidcnt; i++)
  ------------------
  |  Branch (1511:21): [True: 57.8k, False: 16.5k]
  ------------------
 1512|  57.8k|            if (garg->gid_arr[i] == gid) {
  ------------------
  |  Branch (1512:17): [True: 0, False: 57.8k]
  ------------------
 1513|       |                /* Duplicate group anywhere in the list of groups - ignore */
 1514|      0|                goto done;
 1515|      0|            }
 1516|       |
 1517|       |        /* Add the current group to the 'flat' list of groups */
 1518|  16.5k|        garg->gid_arr[garg->gidcnt++] = gid;
 1519|       |        /* and update the book keeping for the number of groups in current tuple */
 1520|  16.5k|        garg->tuplcnt_arr[garg->tplcnt]++;
 1521|       |
 1522|       |        /* We want to add a key share for the current group */
 1523|  16.5k|        if (add_keyshare)
  ------------------
  |  Branch (1523:13): [True: 4.13k, False: 12.3k]
  ------------------
 1524|  4.13k|            garg->ksid_arr[garg->ksidcnt++] = gid;
 1525|  16.5k|    }
 1526|       |
 1527|  16.7k|done:
 1528|  16.7k|    return retval;
 1529|  16.5k|}
t1_lib.c:tls1_group_name2id:
  710|  16.7k|{
  711|  16.7k|    size_t i;
  712|       |
  713|  93.1k|    for (i = 0; i < ctx->group_list_len; i++) {
  ------------------
  |  Branch (713:17): [True: 92.9k, False: 224]
  ------------------
  714|  92.9k|        if (OPENSSL_strcasecmp(ctx->group_list[i].tlsname, name) == 0
  ------------------
  |  Branch (714:13): [True: 16.5k, False: 76.4k]
  ------------------
  715|  76.4k|            || OPENSSL_strcasecmp(ctx->group_list[i].realname, name) == 0)
  ------------------
  |  Branch (715:16): [True: 0, False: 76.4k]
  ------------------
  716|  16.5k|            return ctx->group_list[i].group_id;
  717|  92.9k|    }
  718|       |
  719|    224|    return 0;
  720|  16.7k|}
t1_lib.c:tls1_lookup_sigalg:
 2391|   142k|{
 2392|   142k|    size_t i;
 2393|   142k|    const SIGALG_LOOKUP *lu = ctx->sigalg_lookup_cache;
 2394|       |
 2395|  2.20M|    for (i = 0; i < ctx->sigalg_lookup_cache_len; lu++, i++) {
  ------------------
  |  Branch (2395:17): [True: 2.20M, False: 0]
  ------------------
 2396|  2.20M|        if (lu->sigalg == sigalg) {
  ------------------
  |  Branch (2396:13): [True: 142k, False: 2.06M]
  ------------------
 2397|   142k|            if (!lu->available)
  ------------------
  |  Branch (2397:17): [True: 0, False: 142k]
  ------------------
 2398|      0|                return NULL;
 2399|   142k|            return lu;
 2400|   142k|        }
 2401|  2.20M|    }
 2402|      0|    return NULL;
 2403|   142k|}
t1_lib.c:tls_sigalg_compat:
 2663|  35.0k|{
 2664|  35.0k|    int minversion, maxversion;
 2665|  35.0k|    int minproto, maxproto;
 2666|       |
 2667|  35.0k|    if (!lu->available)
  ------------------
  |  Branch (2667:9): [True: 0, False: 35.0k]
  ------------------
 2668|      0|        return 0;
 2669|       |
 2670|  35.0k|    if (SSL_CONNECTION_IS_DTLS(sc)) {
  ------------------
  |  |  258|  35.0k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  35.0k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  35.0k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  |  |  |  Branch (258:5): [True: 0, False: 35.0k]
  |  |  ------------------
  ------------------
 2671|      0|        if (sc->ssl.method->version == DTLS_ANY_VERSION) {
  ------------------
  |  |   35|      0|#define DTLS_ANY_VERSION 0x1FFFF
  ------------------
  |  Branch (2671:13): [True: 0, False: 0]
  ------------------
 2672|      0|            minproto = sc->min_proto_version;
 2673|      0|            maxproto = sc->max_proto_version;
 2674|      0|        } else {
 2675|      0|            maxproto = minproto = sc->version;
 2676|      0|        }
 2677|      0|        minversion = lu->mindtls;
 2678|      0|        maxversion = lu->maxdtls;
 2679|  35.0k|    } else {
 2680|  35.0k|        if (sc->ssl.method->version == TLS_ANY_VERSION) {
  ------------------
  |  |   40|  35.0k|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (2680:13): [True: 35.0k, False: 0]
  ------------------
 2681|  35.0k|            minproto = sc->min_proto_version;
 2682|  35.0k|            maxproto = sc->max_proto_version;
 2683|  35.0k|        } else {
 2684|      0|            maxproto = minproto = sc->version;
 2685|      0|        }
 2686|  35.0k|        minversion = lu->mintls;
 2687|  35.0k|        maxversion = lu->maxtls;
 2688|  35.0k|    }
 2689|  35.0k|    if (minversion == -1 || maxversion == -1
  ------------------
  |  Branch (2689:9): [True: 0, False: 35.0k]
  |  Branch (2689:29): [True: 0, False: 35.0k]
  ------------------
 2690|  35.0k|        || (minversion != 0 && maxproto != 0
  ------------------
  |  Branch (2690:13): [True: 35.0k, False: 0]
  |  Branch (2690:32): [True: 203, False: 34.8k]
  ------------------
 2691|    203|            && ssl_version_cmp(sc, minversion, maxproto) > 0)
  ------------------
  |  Branch (2691:16): [True: 30, False: 173]
  ------------------
 2692|  35.0k|        || (maxversion != 0 && minproto != 0
  ------------------
  |  Branch (2692:13): [True: 14.4k, False: 20.5k]
  |  Branch (2692:32): [True: 14.4k, False: 0]
  ------------------
 2693|  14.4k|            && ssl_version_cmp(sc, maxversion, minproto) < 0)
  ------------------
  |  Branch (2693:16): [True: 27, False: 14.4k]
  ------------------
 2694|  35.0k|        || !tls12_sigalg_allowed(sc, SSL_SECOP_SIGALG_SUPPORTED, lu))
  ------------------
  |  | 2770|  35.0k|#define SSL_SECOP_SIGALG_SUPPORTED (11 | SSL_SECOP_OTHER_SIGALG)
  |  |  ------------------
  |  |  |  | 2742|  35.0k|#define SSL_SECOP_OTHER_SIGALG (5 << 16)
  |  |  ------------------
  ------------------
  |  Branch (2694:12): [True: 3.74k, False: 31.2k]
  ------------------
 2695|  3.80k|        return 0;
 2696|  31.2k|    return 1;
 2697|  35.0k|}
t1_lib.c:sigalg_security_bits:
 2615|  46.3k|{
 2616|  46.3k|    const EVP_MD *md = NULL;
 2617|  46.3k|    int secbits = 0;
 2618|       |
 2619|  46.3k|    if (!tls1_lookup_md(ctx, lu, &md))
  ------------------
  |  Branch (2619:9): [True: 0, False: 46.3k]
  ------------------
 2620|      0|        return 0;
 2621|  46.3k|    if (md != NULL) {
  ------------------
  |  Branch (2621:9): [True: 40.3k, False: 6.02k]
  ------------------
 2622|  40.3k|        int md_type = EVP_MD_get_type(md);
 2623|       |
 2624|       |        /* Security bits: half digest bits */
 2625|  40.3k|        secbits = EVP_MD_get_size(md) * 4;
 2626|  40.3k|        if (secbits <= 0)
  ------------------
  |  Branch (2626:13): [True: 0, False: 40.3k]
  ------------------
 2627|      0|            return 0;
 2628|       |        /*
 2629|       |         * SHA1 and MD5 are known to be broken. Reduce security bits so that
 2630|       |         * they're no longer accepted at security level 1. The real values don't
 2631|       |         * really matter as long as they're lower than 80, which is our
 2632|       |         * security level 1.
 2633|       |         * https://eprint.iacr.org/2020/014 puts a chosen-prefix attack for
 2634|       |         * SHA1 at 2^63.4 and MD5+SHA1 at 2^67.2
 2635|       |         * https://documents.epfl.ch/users/l/le/lenstra/public/papers/lat.pdf
 2636|       |         * puts a chosen-prefix attack for MD5 at 2^39.
 2637|       |         */
 2638|  40.3k|        if (md_type == NID_sha1)
  ------------------
  |  | 2344|  40.3k|#define NID_sha1                64
  ------------------
  |  Branch (2638:13): [True: 3.66k, False: 36.7k]
  ------------------
 2639|  3.66k|            secbits = 64;
 2640|  36.7k|        else if (md_type == NID_md5_sha1)
  ------------------
  |  | 1243|  36.7k|#define NID_md5_sha1            114
  ------------------
  |  Branch (2640:18): [True: 0, False: 36.7k]
  ------------------
 2641|      0|            secbits = 67;
 2642|  36.7k|        else if (md_type == NID_md5)
  ------------------
  |  | 1238|  36.7k|#define NID_md5         4
  ------------------
  |  Branch (2642:18): [True: 0, False: 36.7k]
  ------------------
 2643|      0|            secbits = 39;
 2644|  40.3k|    } else {
 2645|       |        /* Values from https://tools.ietf.org/html/rfc8032#section-8.5 */
 2646|  6.02k|        if (lu->sigalg == TLSEXT_SIGALG_ed25519)
  ------------------
  |  | 2237|  6.02k|#define TLSEXT_SIGALG_ed25519 0x0807
  ------------------
  |  Branch (2646:13): [True: 1.20k, False: 4.81k]
  ------------------
 2647|  1.20k|            secbits = 128;
 2648|  4.81k|        else if (lu->sigalg == TLSEXT_SIGALG_ed448)
  ------------------
  |  | 2238|  4.81k|#define TLSEXT_SIGALG_ed448 0x0808
  ------------------
  |  Branch (2648:18): [True: 1.20k, False: 3.60k]
  ------------------
 2649|  1.20k|            secbits = 224;
 2650|  6.02k|    }
 2651|       |    /*
 2652|       |     * For provider-based sigalgs we have secbits information available
 2653|       |     * in the (provider-loaded) sigalg_list structure
 2654|       |     */
 2655|  46.3k|    if ((secbits == 0) && (lu->sig_idx >= SSL_PKEY_NUM)
  ------------------
  |  |  328|  3.60k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2655:9): [True: 3.60k, False: 42.7k]
  |  Branch (2655:27): [True: 3.60k, False: 0]
  ------------------
 2656|  3.60k|        && ((lu->sig_idx - SSL_PKEY_NUM) < (int)ctx->sigalg_list_len)) {
  ------------------
  |  |  328|  3.60k|#define SSL_PKEY_NUM 9
  ------------------
  |  Branch (2656:12): [True: 3.60k, False: 0]
  ------------------
 2657|  3.60k|        secbits = ctx->sigalg_list[lu->sig_idx - SSL_PKEY_NUM].secbits;
  ------------------
  |  |  328|  3.60k|#define SSL_PKEY_NUM 9
  ------------------
 2658|  3.60k|    }
 2659|  46.3k|    return secbits;
 2660|  46.3k|}
t1_lib.c:tls12_sigalg_allowed:
 3348|  46.4k|{
 3349|  46.4k|    unsigned char sigalgstr[2];
 3350|  46.4k|    int secbits;
 3351|       |
 3352|  46.4k|    if (lu == NULL || !lu->available)
  ------------------
  |  Branch (3352:9): [True: 0, False: 46.4k]
  |  Branch (3352:23): [True: 0, False: 46.4k]
  ------------------
 3353|      0|        return 0;
 3354|       |    /* DSA is not allowed in TLS 1.3 */
 3355|  46.4k|    if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |  265|  92.8k|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|  92.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  46.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|  46.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 46.4k, False: 0]
  |  |  ------------------
  |  |  266|  46.4k|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  46.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|  92.8k|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 46.4k, False: 0]
  |  |  ------------------
  |  |  267|  92.8k|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|  46.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|  46.4k|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 46.4k]
  |  |  ------------------
  ------------------
                  if (SSL_CONNECTION_IS_TLS13(s) && lu->sig == EVP_PKEY_DSA)
  ------------------
  |  |   66|      0|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|      0|#define NID_dsa         116
  |  |  ------------------
  ------------------
  |  Branch (3355:39): [True: 0, False: 0]
  ------------------
 3356|      0|        return 0;
 3357|       |    /*
 3358|       |     * At some point we should fully axe DSA/etc. in ClientHello as per TLS 1.3
 3359|       |     * spec
 3360|       |     */
 3361|  46.4k|    if (!s->server && !SSL_CONNECTION_IS_DTLS(s)
  ------------------
  |  |  258|  92.8k|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  |   27|  46.4k|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  ------------------
  |  |  |  | 2190|  46.4k|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  ------------------
  ------------------
  |  Branch (3361:9): [True: 46.4k, False: 0]
  |  Branch (3361:23): [True: 46.4k, False: 0]
  ------------------
 3362|  46.4k|        && s->s3.tmp.min_ver >= TLS1_3_VERSION
  ------------------
  |  |   27|  92.8k|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3362:12): [True: 102, False: 46.3k]
  ------------------
 3363|    102|        && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |   66|    102|#define EVP_PKEY_DSA NID_dsa
  |  |  ------------------
  |  |  |  |  136|    204|#define NID_dsa         116
  |  |  ------------------
  ------------------
                      && (lu->sig == EVP_PKEY_DSA || lu->hash_idx == SSL_MD_SHA1_IDX
  ------------------
  |  |  188|    174|#define SSL_MD_SHA1_IDX 1
  ------------------
  |  Branch (3363:13): [True: 30, False: 72]
  |  Branch (3363:40): [True: 0, False: 72]
  ------------------
 3364|     72|            || lu->hash_idx == SSL_MD_MD5_IDX
  ------------------
  |  |  187|    174|#define SSL_MD_MD5_IDX 0
  ------------------
  |  Branch (3364:16): [True: 0, False: 72]
  ------------------
 3365|     72|            || lu->hash_idx == SSL_MD_SHA224_IDX))
  ------------------
  |  |  197|     72|#define SSL_MD_SHA224_IDX 10
  ------------------
  |  Branch (3365:16): [True: 0, False: 72]
  ------------------
 3366|     30|        return 0;
 3367|       |
 3368|       |    /* See if public key algorithm allowed */
 3369|  46.3k|    if (ssl_cert_is_disabled(SSL_CONNECTION_GET_CTX(s), lu->sig_idx))
  ------------------
  |  |   26|  46.3k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (3369:9): [True: 0, False: 46.3k]
  ------------------
 3370|      0|        return 0;
 3371|       |
 3372|  46.3k|    if (lu->sig == NID_id_GostR3410_2012_256
  ------------------
  |  | 4790|  92.7k|#define NID_id_GostR3410_2012_256               979
  ------------------
  |  Branch (3372:9): [True: 0, False: 46.3k]
  ------------------
 3373|  46.3k|        || lu->sig == NID_id_GostR3410_2012_512
  ------------------
  |  | 4795|  92.7k|#define NID_id_GostR3410_2012_512               980
  ------------------
  |  Branch (3373:12): [True: 0, False: 46.3k]
  ------------------
 3374|  46.3k|        || lu->sig == NID_id_GostR3410_2001) {
  ------------------
  |  | 4579|  46.3k|#define NID_id_GostR3410_2001           811
  ------------------
  |  Branch (3374:12): [True: 0, False: 46.3k]
  ------------------
 3375|       |        /* We never allow GOST sig algs on the server with TLSv1.3 */
 3376|      0|        if (s->server && SSL_CONNECTION_IS_TLS13(s))
  ------------------
  |  |  265|      0|#define SSL_CONNECTION_IS_TLS13(s) (!SSL_CONNECTION_IS_DTLS(s)      \
  |  |  ------------------
  |  |  |  |  258|      0|    (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  |  |  ------------------
  |  |  |  |                   (SSL_CONNECTION_GET_SSL(s)->method->ssl3_enc->enc_flags & SSL_ENC_FLAG_DTLS)
  |  |  |  |  ------------------
  |  |  |  |  |  | 2190|      0|#define SSL_ENC_FLAG_DTLS 0x8
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (265:37): [True: 0, False: 0]
  |  |  ------------------
  |  |  266|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version >= TLS1_3_VERSION \
  |  |  ------------------
  |  |  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  |  |  ------------------
  |  |  |  Branch (266:8): [True: 0, False: 0]
  |  |  ------------------
  |  |  267|      0|    && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  |  |  ------------------
  |  |                   && SSL_CONNECTION_GET_SSL(s)->method->version != TLS_ANY_VERSION)
  |  |  ------------------
  |  |  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  |  |  ------------------
  |  |  |  Branch (267:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3376:13): [True: 0, False: 0]
  ------------------
 3377|      0|            return 0;
 3378|      0|        if (!s->server
  ------------------
  |  Branch (3378:13): [True: 0, False: 0]
  ------------------
 3379|      0|            && SSL_CONNECTION_GET_SSL(s)->method->version == TLS_ANY_VERSION
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
                          && SSL_CONNECTION_GET_SSL(s)->method->version == TLS_ANY_VERSION
  ------------------
  |  |   40|      0|#define TLS_ANY_VERSION 0x10000
  ------------------
  |  Branch (3379:16): [True: 0, False: 0]
  ------------------
 3380|      0|            && s->s3.tmp.max_ver >= TLS1_3_VERSION) {
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3380:16): [True: 0, False: 0]
  ------------------
 3381|      0|            int i, num;
 3382|      0|            STACK_OF(SSL_CIPHER) *sk;
  ------------------
  |  |   33|      0|#define STACK_OF(type) struct stack_st_##type
  ------------------
 3383|       |
 3384|       |            /*
 3385|       |             * We're a client that could negotiate TLSv1.3. We only allow GOST
 3386|       |             * sig algs if we could negotiate TLSv1.2 or below and we have GOST
 3387|       |             * ciphersuites enabled.
 3388|       |             */
 3389|       |
 3390|      0|            if (s->s3.tmp.min_ver >= TLS1_3_VERSION)
  ------------------
  |  |   27|      0|#define TLS1_3_VERSION 0x0304
  ------------------
  |  Branch (3390:17): [True: 0, False: 0]
  ------------------
 3391|      0|                return 0;
 3392|       |
 3393|      0|            sk = SSL_get_ciphers(SSL_CONNECTION_GET_SSL(s));
  ------------------
  |  |   27|      0|#define SSL_CONNECTION_GET_SSL(sc) (&(sc)->ssl)
  ------------------
 3394|      0|            num = sk != NULL ? sk_SSL_CIPHER_num(sk) : 0;
  ------------------
  |  | 1005|      0|#define sk_SSL_CIPHER_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_CIPHER_sk_type(sk))
  ------------------
  |  Branch (3394:19): [True: 0, False: 0]
  ------------------
 3395|      0|            for (i = 0; i < num; i++) {
  ------------------
  |  Branch (3395:25): [True: 0, False: 0]
  ------------------
 3396|      0|                const SSL_CIPHER *c;
 3397|       |
 3398|      0|                c = sk_SSL_CIPHER_value(sk, i);
  ------------------
  |  | 1006|      0|#define sk_SSL_CIPHER_value(sk, idx) ((const SSL_CIPHER *)OPENSSL_sk_value(ossl_check_const_SSL_CIPHER_sk_type(sk), (idx)))
  ------------------
 3399|       |                /* Skip disabled ciphers */
 3400|      0|                if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0))
  ------------------
  |  | 2752|      0|#define SSL_SECOP_CIPHER_SUPPORTED (1 | SSL_SECOP_OTHER_CIPHER)
  |  |  ------------------
  |  |  |  | 2738|      0|#define SSL_SECOP_OTHER_CIPHER (1 << 16)
  |  |  ------------------
  ------------------
  |  Branch (3400:21): [True: 0, False: 0]
  ------------------
 3401|      0|                    continue;
 3402|       |
 3403|      0|                if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |   89|      0|#define SSL_kGOST 0x00000010U
  ------------------
                              if ((c->algorithm_mkey & (SSL_kGOST | SSL_kGOST18)) != 0)
  ------------------
  |  |   97|      0|#define SSL_kGOST18 0x00000200U
  ------------------
  |  Branch (3403:21): [True: 0, False: 0]
  ------------------
 3404|      0|                    break;
 3405|      0|            }
 3406|      0|            if (i == num)
  ------------------
  |  Branch (3406:17): [True: 0, False: 0]
  ------------------
 3407|      0|                return 0;
 3408|      0|        }
 3409|      0|    }
 3410|       |
 3411|       |    /* Finally see if security callback allows it */
 3412|  46.3k|    secbits = sigalg_security_bits(SSL_CONNECTION_GET_CTX(s), lu);
  ------------------
  |  |   26|  46.3k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
 3413|  46.3k|    sigalgstr[0] = (lu->sigalg >> 8) & 0xff;
 3414|  46.3k|    sigalgstr[1] = lu->sigalg & 0xff;
 3415|  46.3k|    return ssl_security(s, op, secbits, lu->hash, (void *)sigalgstr);
 3416|  46.3k|}

tls13_alert_code:
  838|      1|{
  839|       |    /* There are 2 additional alerts in TLSv1.3 compared to TLSv1.2 */
  840|      1|    if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1246|      1|#define SSL_AD_MISSING_EXTENSION TLS13_AD_MISSING_EXTENSION
  |  |  ------------------
  |  |  |  |   71|      2|#define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
  |  |  ------------------
  ------------------
                  if (code == SSL_AD_MISSING_EXTENSION || code == SSL_AD_CERTIFICATE_REQUIRED)
  ------------------
  |  | 1247|      1|#define SSL_AD_CERTIFICATE_REQUIRED TLS13_AD_CERTIFICATE_REQUIRED
  |  |  ------------------
  |  |  |  |   72|      1|#define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
  |  |  ------------------
  ------------------
  |  Branch (840:9): [True: 0, False: 1]
  |  Branch (840:45): [True: 0, False: 1]
  ------------------
  841|      0|        return code;
  842|       |
  843|      1|    return tls1_alert_code(code);
  844|      1|}

tls_engine_finish:
   24|  16.7k|{
   25|  16.7k|    ENGINE_finish(e);
   26|  16.7k|}
tls_get_cipher_from_engine:
   30|  48.1k|{
   31|  48.1k|    const EVP_CIPHER *ret = NULL;
   32|  48.1k|#ifndef OPENSSL_NO_ENGINE
   33|  48.1k|    ENGINE *eng;
   34|       |
   35|       |    /*
   36|       |     * If there is an Engine available for this cipher we use the "implicit"
   37|       |     * form to ensure we use that engine later.
   38|       |     */
   39|  48.1k|    eng = ENGINE_get_cipher_engine(nid);
   40|  48.1k|    if (eng != NULL) {
  ------------------
  |  Branch (40:9): [True: 0, False: 48.1k]
  ------------------
   41|      0|        ret = ENGINE_get_cipher(eng, nid);
   42|      0|        ENGINE_finish(eng);
   43|      0|    }
   44|  48.1k|#endif
   45|  48.1k|    return ret;
   46|  48.1k|}
tls_get_digest_from_engine:
   49|  33.4k|{
   50|  33.4k|    const EVP_MD *ret = NULL;
   51|  33.4k|#ifndef OPENSSL_NO_ENGINE
   52|  33.4k|    ENGINE *eng;
   53|       |
   54|       |    /*
   55|       |     * If there is an Engine available for this digest we use the "implicit"
   56|       |     * form to ensure we use that engine later.
   57|       |     */
   58|  33.4k|    eng = ENGINE_get_digest_engine(nid);
   59|  33.4k|    if (eng != NULL) {
  ------------------
  |  Branch (59:9): [True: 0, False: 33.4k]
  ------------------
   60|      0|        ret = ENGINE_get_digest(eng, nid);
   61|      0|        ENGINE_finish(eng);
   62|      0|    }
   63|  33.4k|#endif
   64|  33.4k|    return ret;
   65|  33.4k|}

ssl_ctx_srp_ctx_free_intern:
   34|  2.09k|{
   35|  2.09k|    if (ctx == NULL)
  ------------------
  |  Branch (35:9): [True: 0, False: 2.09k]
  ------------------
   36|      0|        return 0;
   37|  2.09k|    OPENSSL_free(ctx->srp_ctx.login);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   38|  2.09k|    OPENSSL_free(ctx->srp_ctx.info);
  ------------------
  |  |  131|  2.09k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   39|  2.09k|    BN_free(ctx->srp_ctx.N);
   40|  2.09k|    BN_free(ctx->srp_ctx.g);
   41|  2.09k|    BN_free(ctx->srp_ctx.s);
   42|  2.09k|    BN_free(ctx->srp_ctx.B);
   43|  2.09k|    BN_free(ctx->srp_ctx.A);
   44|  2.09k|    BN_free(ctx->srp_ctx.a);
   45|  2.09k|    BN_free(ctx->srp_ctx.b);
   46|  2.09k|    BN_free(ctx->srp_ctx.v);
   47|  2.09k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
   48|  2.09k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  2.09k|#define SRP_MINIMAL_N 1024
  ------------------
   49|  2.09k|    return 1;
   50|  2.09k|}
ssl_srp_ctx_free_intern:
   62|  1.31k|{
   63|  1.31k|    if (s == NULL)
  ------------------
  |  Branch (63:9): [True: 0, False: 1.31k]
  ------------------
   64|      0|        return 0;
   65|  1.31k|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   66|  1.31k|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  131|  1.31k|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
   67|  1.31k|    BN_free(s->srp_ctx.N);
   68|  1.31k|    BN_free(s->srp_ctx.g);
   69|  1.31k|    BN_free(s->srp_ctx.s);
   70|  1.31k|    BN_free(s->srp_ctx.B);
   71|  1.31k|    BN_free(s->srp_ctx.A);
   72|  1.31k|    BN_free(s->srp_ctx.a);
   73|  1.31k|    BN_free(s->srp_ctx.b);
   74|  1.31k|    BN_free(s->srp_ctx.v);
   75|  1.31k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
   76|  1.31k|    s->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  1.31k|#define SRP_MINIMAL_N 1024
  ------------------
   77|  1.31k|    return 1;
   78|  1.31k|}
ssl_srp_ctx_init_intern:
   93|  1.31k|{
   94|  1.31k|    SSL_CTX *ctx;
   95|       |
   96|  1.31k|    if (s == NULL || (ctx = SSL_CONNECTION_GET_CTX(s)) == NULL)
  ------------------
  |  |   26|  1.31k|#define SSL_CONNECTION_GET_CTX(sc) ((sc)->ssl.ctx)
  ------------------
  |  Branch (96:9): [True: 0, False: 1.31k]
  |  Branch (96:22): [True: 0, False: 1.31k]
  ------------------
   97|      0|        return 0;
   98|       |
   99|  1.31k|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
  100|       |
  101|  1.31k|    s->srp_ctx.SRP_cb_arg = ctx->srp_ctx.SRP_cb_arg;
  102|       |    /* set client Hello login callback */
  103|  1.31k|    s->srp_ctx.TLS_ext_srp_username_callback = ctx->srp_ctx.TLS_ext_srp_username_callback;
  104|       |    /* set SRP N/g param callback for verification */
  105|  1.31k|    s->srp_ctx.SRP_verify_param_callback = ctx->srp_ctx.SRP_verify_param_callback;
  106|       |    /* set SRP client passwd callback */
  107|  1.31k|    s->srp_ctx.SRP_give_srp_client_pwd_callback = ctx->srp_ctx.SRP_give_srp_client_pwd_callback;
  108|       |
  109|  1.31k|    s->srp_ctx.strength = ctx->srp_ctx.strength;
  110|       |
  111|  1.31k|    if (((ctx->srp_ctx.N != NULL) && ((s->srp_ctx.N = BN_dup(ctx->srp_ctx.N)) == NULL)) || ((ctx->srp_ctx.g != NULL) && ((s->srp_ctx.g = BN_dup(ctx->srp_ctx.g)) == NULL)) || ((ctx->srp_ctx.s != NULL) && ((s->srp_ctx.s = BN_dup(ctx->srp_ctx.s)) == NULL)) || ((ctx->srp_ctx.B != NULL) && ((s->srp_ctx.B = BN_dup(ctx->srp_ctx.B)) == NULL)) || ((ctx->srp_ctx.A != NULL) && ((s->srp_ctx.A = BN_dup(ctx->srp_ctx.A)) == NULL)) || ((ctx->srp_ctx.a != NULL) && ((s->srp_ctx.a = BN_dup(ctx->srp_ctx.a)) == NULL)) || ((ctx->srp_ctx.v != NULL) && ((s->srp_ctx.v = BN_dup(ctx->srp_ctx.v)) == NULL)) || ((ctx->srp_ctx.b != NULL) && ((s->srp_ctx.b = BN_dup(ctx->srp_ctx.b)) == NULL))) {
  ------------------
  |  Branch (111:10): [True: 0, False: 1.31k]
  |  Branch (111:38): [True: 0, False: 0]
  |  Branch (111:93): [True: 0, False: 1.31k]
  |  Branch (111:121): [True: 0, False: 0]
  |  Branch (111:176): [True: 0, False: 1.31k]
  |  Branch (111:204): [True: 0, False: 0]
  |  Branch (111:259): [True: 0, False: 1.31k]
  |  Branch (111:287): [True: 0, False: 0]
  |  Branch (111:342): [True: 0, False: 1.31k]
  |  Branch (111:370): [True: 0, False: 0]
  |  Branch (111:425): [True: 0, False: 1.31k]
  |  Branch (111:453): [True: 0, False: 0]
  |  Branch (111:508): [True: 0, False: 1.31k]
  |  Branch (111:536): [True: 0, False: 0]
  |  Branch (111:591): [True: 0, False: 1.31k]
  |  Branch (111:619): [True: 0, False: 0]
  ------------------
  112|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_BN_LIB);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  113|      0|        goto err;
  114|      0|    }
  115|  1.31k|    if ((ctx->srp_ctx.login != NULL) && ((s->srp_ctx.login = OPENSSL_strdup(ctx->srp_ctx.login)) == NULL)) {
  ------------------
  |  |  135|      5|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (115:9): [True: 5, False: 1.31k]
  |  Branch (115:41): [True: 0, False: 5]
  ------------------
  116|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  117|      0|        goto err;
  118|      0|    }
  119|  1.31k|    if ((ctx->srp_ctx.info != NULL) && ((s->srp_ctx.info = OPENSSL_strdup(ctx->srp_ctx.info)) == NULL)) {
  ------------------
  |  |  135|      5|    CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  |  Branch (119:9): [True: 5, False: 1.31k]
  |  Branch (119:40): [True: 0, False: 5]
  ------------------
  120|      0|        ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
  ------------------
  |  |  404|      0|#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
  |  |  ------------------
  |  |  |  |  406|      0|    (ERR_new(),                                                  \
  |  |  |  |  407|      0|        ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  |  |  ------------------
  |  |  |  |                       ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|      0|#define OPENSSL_FUNC __func__
  |  |  |  |  ------------------
  |  |  |  |  408|      0|        ERR_set_error)
  |  |  ------------------
  ------------------
  121|      0|        goto err;
  122|      0|    }
  123|  1.31k|    s->srp_ctx.srp_Mask = ctx->srp_ctx.srp_Mask;
  124|       |
  125|  1.31k|    return 1;
  126|      0|err:
  127|      0|    OPENSSL_free(s->srp_ctx.login);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  128|      0|    OPENSSL_free(s->srp_ctx.info);
  ------------------
  |  |  131|      0|    CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  314|       |#define OPENSSL_FILE __FILE__
  |  |  ------------------
  |  |                   CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
  |  |  ------------------
  |  |  |  |  315|       |#define OPENSSL_LINE __LINE__
  |  |  ------------------
  ------------------
  129|      0|    BN_free(s->srp_ctx.N);
  130|      0|    BN_free(s->srp_ctx.g);
  131|      0|    BN_free(s->srp_ctx.s);
  132|      0|    BN_free(s->srp_ctx.B);
  133|      0|    BN_free(s->srp_ctx.A);
  134|      0|    BN_free(s->srp_ctx.a);
  135|      0|    BN_free(s->srp_ctx.b);
  136|      0|    BN_free(s->srp_ctx.v);
  137|      0|    memset(&s->srp_ctx, 0, sizeof(s->srp_ctx));
  138|      0|    return 0;
  139|  1.31k|}
ssl_ctx_srp_ctx_init_intern:
  154|  2.06k|{
  155|  2.06k|    if (ctx == NULL)
  ------------------
  |  Branch (155:9): [True: 0, False: 2.06k]
  ------------------
  156|      0|        return 0;
  157|       |
  158|  2.06k|    memset(&ctx->srp_ctx, 0, sizeof(ctx->srp_ctx));
  159|  2.06k|    ctx->srp_ctx.strength = SRP_MINIMAL_N;
  ------------------
  |  |  276|  2.06k|#define SRP_MINIMAL_N 1024
  ------------------
  160|       |
  161|  2.06k|    return 1;
  162|  2.06k|}
SSL_CTX_set_srp_username:
  506|     60|{
  507|     60|    return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_USERNAME, 0, name);
  ------------------
  |  |  502|     60|#define tls1_ctx_ctrl ssl3_ctx_ctrl
  ------------------
                  return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_USERNAME, 0, name);
  ------------------
  |  | 1339|     60|#define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME 79
  ------------------
  508|     60|}
SSL_CTX_set_srp_password:
  511|     58|{
  512|     58|    return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD, 0, password);
  ------------------
  |  |  502|     58|#define tls1_ctx_ctrl ssl3_ctx_ctrl
  ------------------
                  return tls1_ctx_ctrl(ctx, SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD, 0, password);
  ------------------
  |  | 1341|     58|#define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD 81
  ------------------
  513|     58|}

adler32_z:
   61|   110k|uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
   62|   110k|    unsigned long sum2;
   63|   110k|    unsigned n;
   64|       |
   65|       |    /* split Adler-32 into component sums */
   66|   110k|    sum2 = (adler >> 16) & 0xffff;
   67|   110k|    adler &= 0xffff;
   68|       |
   69|       |    /* in case user likes doing a byte at a time, keep it fast */
   70|   110k|    if (len == 1) {
  ------------------
  |  Branch (70:9): [True: 93.4k, False: 17.3k]
  ------------------
   71|  93.4k|        adler += buf[0];
   72|  93.4k|        if (adler >= BASE)
  ------------------
  |  |   10|  93.4k|#define BASE 65521U     /* largest prime smaller than 65536 */
  ------------------
  |  Branch (72:13): [True: 71, False: 93.4k]
  ------------------
   73|     71|            adler -= BASE;
  ------------------
  |  |   10|     71|#define BASE 65521U     /* largest prime smaller than 65536 */
  ------------------
   74|  93.4k|        sum2 += adler;
   75|  93.4k|        if (sum2 >= BASE)
  ------------------
  |  |   10|  93.4k|#define BASE 65521U     /* largest prime smaller than 65536 */
  ------------------
  |  Branch (75:13): [True: 47.0k, False: 46.4k]
  ------------------
   76|  47.0k|            sum2 -= BASE;
  ------------------
  |  |   10|  47.0k|#define BASE 65521U     /* largest prime smaller than 65536 */
  ------------------
   77|  93.4k|        return adler | (sum2 << 16);
   78|  93.4k|    }
   79|       |
   80|       |    /* initial Adler-32 value (deferred check for len == 1 speed) */
   81|  17.3k|    if (buf == Z_NULL)
  ------------------
  |  |  212|  17.3k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (81:9): [True: 647, False: 16.7k]
  ------------------
   82|    647|        return 1L;
   83|       |
   84|       |    /* in case short lengths are provided, keep it somewhat fast */
   85|  16.7k|    if (len < 16) {
  ------------------
  |  Branch (85:9): [True: 4.84k, False: 11.9k]
  ------------------
   86|  44.7k|        while (len--) {
  ------------------
  |  Branch (86:16): [True: 39.8k, False: 4.84k]
  ------------------
   87|  39.8k|            adler += *buf++;
   88|  39.8k|            sum2 += adler;
   89|  39.8k|        }
   90|  4.84k|        if (adler >= BASE)
  ------------------
  |  |   10|  4.84k|#define BASE 65521U     /* largest prime smaller than 65536 */
  ------------------
  |  Branch (90:13): [True: 113, False: 4.73k]
  ------------------
   91|    113|            adler -= BASE;
  ------------------
  |  |   10|    113|#define BASE 65521U     /* largest prime smaller than 65536 */
  ------------------
   92|  4.84k|        MOD28(sum2);            /* only added so many BASE's */
  ------------------
  |  |   56|  4.84k|#  define MOD28(a) a %= BASE
  |  |  ------------------
  |  |  |  |   10|  4.84k|#define BASE 65521U     /* largest prime smaller than 65536 */
  |  |  ------------------
  ------------------
   93|  4.84k|        return adler | (sum2 << 16);
   94|  4.84k|    }
   95|       |
   96|       |    /* do length NMAX blocks -- requires just one modulo operation */
   97|  15.5k|    while (len >= NMAX) {
  ------------------
  |  |   11|  15.5k|#define NMAX 5552
  ------------------
  |  Branch (97:12): [True: 3.59k, False: 11.9k]
  ------------------
   98|  3.59k|        len -= NMAX;
  ------------------
  |  |   11|  3.59k|#define NMAX 5552
  ------------------
   99|  3.59k|        n = NMAX / 16;          /* NMAX is divisible by 16 */
  ------------------
  |  |   11|  3.59k|#define NMAX 5552
  ------------------
  100|  1.24M|        do {
  101|  1.24M|            DO16(buf);          /* 16 sums unrolled */
  ------------------
  |  |   18|  1.24M|#define DO16(buf)   DO8(buf,0); DO8(buf,8);
  |  |  ------------------
  |  |  |  |   17|  1.24M|#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|  1.24M|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|  1.24M|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DO16(buf)   DO8(buf,0); DO8(buf,8);
  |  |  ------------------
  |  |  |  |   17|  1.24M|#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|  1.24M|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|  1.24M|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|  1.24M|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|  1.24M|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|  1.24M|            buf += 16;
  103|  1.24M|        } while (--n);
  ------------------
  |  Branch (103:18): [True: 1.24M, False: 3.59k]
  ------------------
  104|  3.59k|        MOD(adler);
  ------------------
  |  |   55|  3.59k|#  define MOD(a) a %= BASE
  |  |  ------------------
  |  |  |  |   10|  3.59k|#define BASE 65521U     /* largest prime smaller than 65536 */
  |  |  ------------------
  ------------------
  105|  3.59k|        MOD(sum2);
  ------------------
  |  |   55|  3.59k|#  define MOD(a) a %= BASE
  |  |  ------------------
  |  |  |  |   10|  3.59k|#define BASE 65521U     /* largest prime smaller than 65536 */
  |  |  ------------------
  ------------------
  106|  3.59k|    }
  107|       |
  108|       |    /* do remaining bytes (less than NMAX, still just one modulo) */
  109|  11.9k|    if (len) {                  /* avoid modulos if none remaining */
  ------------------
  |  Branch (109:9): [True: 11.8k, False: 45]
  ------------------
  110|   780k|        while (len >= 16) {
  ------------------
  |  Branch (110:16): [True: 768k, False: 11.8k]
  ------------------
  111|   768k|            len -= 16;
  112|   768k|            DO16(buf);
  ------------------
  |  |   18|   768k|#define DO16(buf)   DO8(buf,0); DO8(buf,8);
  |  |  ------------------
  |  |  |  |   17|   768k|#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|   768k|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|   768k|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define DO16(buf)   DO8(buf,0); DO8(buf,8);
  |  |  ------------------
  |  |  |  |   17|   768k|#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|   768k|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
  |  |  |  |  ------------------
  |  |  |  |  |  |   16|   768k|#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   15|   768k|#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |               #define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   14|   768k|#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|   768k|            buf += 16;
  114|   768k|        }
  115|  67.1k|        while (len--) {
  ------------------
  |  Branch (115:16): [True: 55.3k, False: 11.8k]
  ------------------
  116|  55.3k|            adler += *buf++;
  117|  55.3k|            sum2 += adler;
  118|  55.3k|        }
  119|  11.8k|        MOD(adler);
  ------------------
  |  |   55|  11.8k|#  define MOD(a) a %= BASE
  |  |  ------------------
  |  |  |  |   10|  11.8k|#define BASE 65521U     /* largest prime smaller than 65536 */
  |  |  ------------------
  ------------------
  120|  11.8k|        MOD(sum2);
  ------------------
  |  |   55|  11.8k|#  define MOD(a) a %= BASE
  |  |  ------------------
  |  |  |  |   10|  11.8k|#define BASE 65521U     /* largest prime smaller than 65536 */
  |  |  ------------------
  ------------------
  121|  11.8k|    }
  122|       |
  123|       |    /* return recombined sums */
  124|  11.9k|    return adler | (sum2 << 16);
  125|  16.7k|}
adler32:
  128|   110k|uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
  129|   110k|    return adler32_z(adler, buf, len);
  130|   110k|}

crc32_z:
  695|  1.84k|                              z_size_t len) {
  696|       |    /* Return initial CRC, if requested. */
  697|  1.84k|    if (buf == Z_NULL) return 0;
  ------------------
  |  |  212|  1.84k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (697:9): [True: 225, False: 1.62k]
  ------------------
  698|       |
  699|       |#ifdef DYNAMIC_CRC_TABLE
  700|       |    once(&made, make_crc_table);
  701|       |#endif /* DYNAMIC_CRC_TABLE */
  702|       |
  703|       |    /* Pre-condition the CRC */
  704|  1.62k|    crc = (~crc) & 0xffffffff;
  705|       |
  706|  1.62k|#ifdef W
  707|       |
  708|       |    /* If provided enough bytes, do a braided CRC calculation. */
  709|  1.62k|    if (len >= N * W + W - 1) {
  ------------------
  |  |   57|  1.62k|#  define N 5
  ------------------
                  if (len >= N * W + W - 1) {
  ------------------
  |  |   83|  1.62k|#      define W 8
  ------------------
                  if (len >= N * W + W - 1) {
  ------------------
  |  |   83|  1.62k|#      define W 8
  ------------------
  |  Branch (709:9): [True: 110, False: 1.51k]
  ------------------
  710|    110|        z_size_t blks;
  711|    110|        z_word_t const *words;
  712|    110|        unsigned endian;
  713|    110|        int k;
  714|       |
  715|       |        /* Compute the CRC up to a z_word_t boundary. */
  716|    538|        while (len && ((z_size_t)buf & (W - 1)) != 0) {
  ------------------
  |  |   83|    538|#      define W 8
  ------------------
  |  Branch (716:16): [True: 538, False: 0]
  |  Branch (716:23): [True: 428, False: 110]
  ------------------
  717|    428|            len--;
  718|    428|            crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
  719|    428|        }
  720|       |
  721|       |        /* Compute the CRC on as many N z_word_t blocks as are available. */
  722|    110|        blks = len / (N * W);
  ------------------
  |  |   57|    110|#  define N 5
  ------------------
                      blks = len / (N * W);
  ------------------
  |  |   83|    110|#      define W 8
  ------------------
  723|    110|        len -= blks * N * W;
  ------------------
  |  |   57|    110|#  define N 5
  ------------------
                      len -= blks * N * W;
  ------------------
  |  |   83|    110|#      define W 8
  ------------------
  724|    110|        words = (z_word_t const *)buf;
  725|       |
  726|       |        /* Do endian check at execution time instead of compile time, since ARM
  727|       |           processors can change the endianness at execution time. If the
  728|       |           compiler knows what the endianness will be, it can optimize out the
  729|       |           check and the unused branch. */
  730|    110|        endian = 1;
  731|    110|        if (*(unsigned char *)&endian) {
  ------------------
  |  Branch (731:13): [True: 110, False: 0]
  ------------------
  732|       |            /* Little endian. */
  733|       |
  734|    110|            z_crc_t crc0;
  735|    110|            z_word_t word0;
  736|    110|#if N > 1
  737|    110|            z_crc_t crc1;
  738|    110|            z_word_t word1;
  739|    110|#if N > 2
  740|    110|            z_crc_t crc2;
  741|    110|            z_word_t word2;
  742|    110|#if N > 3
  743|    110|            z_crc_t crc3;
  744|    110|            z_word_t word3;
  745|    110|#if N > 4
  746|    110|            z_crc_t crc4;
  747|    110|            z_word_t word4;
  748|       |#if N > 5
  749|       |            z_crc_t crc5;
  750|       |            z_word_t word5;
  751|       |#endif
  752|    110|#endif
  753|    110|#endif
  754|    110|#endif
  755|    110|#endif
  756|       |
  757|       |            /* Initialize the CRC for each braid. */
  758|    110|            crc0 = crc;
  759|    110|#if N > 1
  760|    110|            crc1 = 0;
  761|    110|#if N > 2
  762|    110|            crc2 = 0;
  763|    110|#if N > 3
  764|    110|            crc3 = 0;
  765|    110|#if N > 4
  766|    110|            crc4 = 0;
  767|       |#if N > 5
  768|       |            crc5 = 0;
  769|       |#endif
  770|    110|#endif
  771|    110|#endif
  772|    110|#endif
  773|    110|#endif
  774|       |
  775|       |            /*
  776|       |              Process the first blks-1 blocks, computing the CRCs on each braid
  777|       |              independently.
  778|       |             */
  779|    476|            while (--blks) {
  ------------------
  |  Branch (779:20): [True: 366, False: 110]
  ------------------
  780|       |                /* Load the word for each braid into registers. */
  781|    366|                word0 = crc0 ^ words[0];
  782|    366|#if N > 1
  783|    366|                word1 = crc1 ^ words[1];
  784|    366|#if N > 2
  785|    366|                word2 = crc2 ^ words[2];
  786|    366|#if N > 3
  787|    366|                word3 = crc3 ^ words[3];
  788|    366|#if N > 4
  789|    366|                word4 = crc4 ^ words[4];
  790|       |#if N > 5
  791|       |                word5 = crc5 ^ words[5];
  792|       |#endif
  793|    366|#endif
  794|    366|#endif
  795|    366|#endif
  796|    366|#endif
  797|    366|                words += N;
  ------------------
  |  |   57|    366|#  define N 5
  ------------------
  798|       |
  799|       |                /* Compute and update the CRC for each word. The loop should
  800|       |                   get unrolled. */
  801|    366|                crc0 = crc_braid_table[0][word0 & 0xff];
  802|    366|#if N > 1
  803|    366|                crc1 = crc_braid_table[0][word1 & 0xff];
  804|    366|#if N > 2
  805|    366|                crc2 = crc_braid_table[0][word2 & 0xff];
  806|    366|#if N > 3
  807|    366|                crc3 = crc_braid_table[0][word3 & 0xff];
  808|    366|#if N > 4
  809|    366|                crc4 = crc_braid_table[0][word4 & 0xff];
  810|       |#if N > 5
  811|       |                crc5 = crc_braid_table[0][word5 & 0xff];
  812|       |#endif
  813|    366|#endif
  814|    366|#endif
  815|    366|#endif
  816|    366|#endif
  817|  2.92k|                for (k = 1; k < W; k++) {
  ------------------
  |  |   83|  2.92k|#      define W 8
  ------------------
  |  Branch (817:29): [True: 2.56k, False: 366]
  ------------------
  818|  2.56k|                    crc0 ^= crc_braid_table[k][(word0 >> (k << 3)) & 0xff];
  819|  2.56k|#if N > 1
  820|  2.56k|                    crc1 ^= crc_braid_table[k][(word1 >> (k << 3)) & 0xff];
  821|  2.56k|#if N > 2
  822|  2.56k|                    crc2 ^= crc_braid_table[k][(word2 >> (k << 3)) & 0xff];
  823|  2.56k|#if N > 3
  824|  2.56k|                    crc3 ^= crc_braid_table[k][(word3 >> (k << 3)) & 0xff];
  825|  2.56k|#if N > 4
  826|  2.56k|                    crc4 ^= crc_braid_table[k][(word4 >> (k << 3)) & 0xff];
  827|       |#if N > 5
  828|       |                    crc5 ^= crc_braid_table[k][(word5 >> (k << 3)) & 0xff];
  829|       |#endif
  830|  2.56k|#endif
  831|  2.56k|#endif
  832|  2.56k|#endif
  833|  2.56k|#endif
  834|  2.56k|                }
  835|    366|            }
  836|       |
  837|       |            /*
  838|       |              Process the last block, combining the CRCs of the N braids at the
  839|       |              same time.
  840|       |             */
  841|    110|            crc = crc_word(crc0 ^ words[0]);
  842|    110|#if N > 1
  843|    110|            crc = crc_word(crc1 ^ words[1] ^ crc);
  844|    110|#if N > 2
  845|    110|            crc = crc_word(crc2 ^ words[2] ^ crc);
  846|    110|#if N > 3
  847|    110|            crc = crc_word(crc3 ^ words[3] ^ crc);
  848|    110|#if N > 4
  849|    110|            crc = crc_word(crc4 ^ words[4] ^ crc);
  850|       |#if N > 5
  851|       |            crc = crc_word(crc5 ^ words[5] ^ crc);
  852|       |#endif
  853|    110|#endif
  854|    110|#endif
  855|    110|#endif
  856|    110|#endif
  857|    110|            words += N;
  ------------------
  |  |   57|    110|#  define N 5
  ------------------
  858|    110|        }
  859|      0|        else {
  860|       |            /* Big endian. */
  861|       |
  862|      0|            z_word_t crc0, word0, comb;
  863|      0|#if N > 1
  864|      0|            z_word_t crc1, word1;
  865|      0|#if N > 2
  866|      0|            z_word_t crc2, word2;
  867|      0|#if N > 3
  868|      0|            z_word_t crc3, word3;
  869|      0|#if N > 4
  870|      0|            z_word_t crc4, word4;
  871|       |#if N > 5
  872|       |            z_word_t crc5, word5;
  873|       |#endif
  874|      0|#endif
  875|      0|#endif
  876|      0|#endif
  877|      0|#endif
  878|       |
  879|       |            /* Initialize the CRC for each braid. */
  880|      0|            crc0 = byte_swap(crc);
  881|      0|#if N > 1
  882|      0|            crc1 = 0;
  883|      0|#if N > 2
  884|      0|            crc2 = 0;
  885|      0|#if N > 3
  886|      0|            crc3 = 0;
  887|      0|#if N > 4
  888|      0|            crc4 = 0;
  889|       |#if N > 5
  890|       |            crc5 = 0;
  891|       |#endif
  892|      0|#endif
  893|      0|#endif
  894|      0|#endif
  895|      0|#endif
  896|       |
  897|       |            /*
  898|       |              Process the first blks-1 blocks, computing the CRCs on each braid
  899|       |              independently.
  900|       |             */
  901|      0|            while (--blks) {
  ------------------
  |  Branch (901:20): [True: 0, False: 0]
  ------------------
  902|       |                /* Load the word for each braid into registers. */
  903|      0|                word0 = crc0 ^ words[0];
  904|      0|#if N > 1
  905|      0|                word1 = crc1 ^ words[1];
  906|      0|#if N > 2
  907|      0|                word2 = crc2 ^ words[2];
  908|      0|#if N > 3
  909|      0|                word3 = crc3 ^ words[3];
  910|      0|#if N > 4
  911|      0|                word4 = crc4 ^ words[4];
  912|       |#if N > 5
  913|       |                word5 = crc5 ^ words[5];
  914|       |#endif
  915|      0|#endif
  916|      0|#endif
  917|      0|#endif
  918|      0|#endif
  919|      0|                words += N;
  ------------------
  |  |   57|      0|#  define N 5
  ------------------
  920|       |
  921|       |                /* Compute and update the CRC for each word. The loop should
  922|       |                   get unrolled. */
  923|      0|                crc0 = crc_braid_big_table[0][word0 & 0xff];
  924|      0|#if N > 1
  925|      0|                crc1 = crc_braid_big_table[0][word1 & 0xff];
  926|      0|#if N > 2
  927|      0|                crc2 = crc_braid_big_table[0][word2 & 0xff];
  928|      0|#if N > 3
  929|      0|                crc3 = crc_braid_big_table[0][word3 & 0xff];
  930|      0|#if N > 4
  931|      0|                crc4 = crc_braid_big_table[0][word4 & 0xff];
  932|       |#if N > 5
  933|       |                crc5 = crc_braid_big_table[0][word5 & 0xff];
  934|       |#endif
  935|      0|#endif
  936|      0|#endif
  937|      0|#endif
  938|      0|#endif
  939|      0|                for (k = 1; k < W; k++) {
  ------------------
  |  |   83|      0|#      define W 8
  ------------------
  |  Branch (939:29): [True: 0, False: 0]
  ------------------
  940|      0|                    crc0 ^= crc_braid_big_table[k][(word0 >> (k << 3)) & 0xff];
  941|      0|#if N > 1
  942|      0|                    crc1 ^= crc_braid_big_table[k][(word1 >> (k << 3)) & 0xff];
  943|      0|#if N > 2
  944|      0|                    crc2 ^= crc_braid_big_table[k][(word2 >> (k << 3)) & 0xff];
  945|      0|#if N > 3
  946|      0|                    crc3 ^= crc_braid_big_table[k][(word3 >> (k << 3)) & 0xff];
  947|      0|#if N > 4
  948|      0|                    crc4 ^= crc_braid_big_table[k][(word4 >> (k << 3)) & 0xff];
  949|       |#if N > 5
  950|       |                    crc5 ^= crc_braid_big_table[k][(word5 >> (k << 3)) & 0xff];
  951|       |#endif
  952|      0|#endif
  953|      0|#endif
  954|      0|#endif
  955|      0|#endif
  956|      0|                }
  957|      0|            }
  958|       |
  959|       |            /*
  960|       |              Process the last block, combining the CRCs of the N braids at the
  961|       |              same time.
  962|       |             */
  963|      0|            comb = crc_word_big(crc0 ^ words[0]);
  964|      0|#if N > 1
  965|      0|            comb = crc_word_big(crc1 ^ words[1] ^ comb);
  966|      0|#if N > 2
  967|      0|            comb = crc_word_big(crc2 ^ words[2] ^ comb);
  968|      0|#if N > 3
  969|      0|            comb = crc_word_big(crc3 ^ words[3] ^ comb);
  970|      0|#if N > 4
  971|      0|            comb = crc_word_big(crc4 ^ words[4] ^ comb);
  972|       |#if N > 5
  973|       |            comb = crc_word_big(crc5 ^ words[5] ^ comb);
  974|       |#endif
  975|      0|#endif
  976|      0|#endif
  977|      0|#endif
  978|      0|#endif
  979|      0|            words += N;
  ------------------
  |  |   57|      0|#  define N 5
  ------------------
  980|      0|            crc = byte_swap(comb);
  981|      0|        }
  982|       |
  983|       |        /*
  984|       |          Update the pointer to the remaining bytes to process.
  985|       |         */
  986|    110|        buf = (unsigned char const *)words;
  987|    110|    }
  988|       |
  989|  1.62k|#endif /* W */
  990|       |
  991|       |    /* Complete the computation of the CRC on any remaining bytes. */
  992|  2.12k|    while (len >= 8) {
  ------------------
  |  Branch (992:12): [True: 500, False: 1.62k]
  ------------------
  993|    500|        len -= 8;
  994|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
  995|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
  996|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
  997|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
  998|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
  999|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
 1000|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
 1001|    500|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
 1002|    500|    }
 1003|  4.61k|    while (len) {
  ------------------
  |  Branch (1003:12): [True: 2.99k, False: 1.62k]
  ------------------
 1004|  2.99k|        len--;
 1005|  2.99k|        crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff];
 1006|  2.99k|    }
 1007|       |
 1008|       |    /* Return the CRC, post-conditioned. */
 1009|  1.62k|    return crc ^ 0xffffffff;
 1010|  1.84k|}
crc32:
 1016|  1.84k|                            uInt len) {
 1017|  1.84k|    return crc32_z(crc, buf, len);
 1018|  1.84k|}
crc32.c:crc_word:
  676|    550|local z_crc_t crc_word(z_word_t data) {
  677|    550|    int k;
  678|  4.95k|    for (k = 0; k < W; k++)
  ------------------
  |  |   83|  4.95k|#      define W 8
  ------------------
  |  Branch (678:17): [True: 4.40k, False: 550]
  ------------------
  679|  4.40k|        data = (data >> 8) ^ crc_table[data & 0xff];
  680|    550|    return (z_crc_t)data;
  681|    550|}

inflate_fast:
   50|  18.7k|void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
   51|  18.7k|    struct inflate_state FAR *state;
   52|  18.7k|    z_const unsigned char FAR *in;      /* local strm->next_in */
   53|  18.7k|    z_const unsigned char FAR *last;    /* have enough input while in < last */
   54|  18.7k|    unsigned char FAR *out;     /* local strm->next_out */
   55|  18.7k|    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
   56|  18.7k|    unsigned char FAR *end;     /* while out < end, enough space available */
   57|       |#ifdef INFLATE_STRICT
   58|       |    unsigned dmax;              /* maximum distance from zlib header */
   59|       |#endif
   60|  18.7k|    unsigned wsize;             /* window size or zero if not using window */
   61|  18.7k|    unsigned whave;             /* valid bytes in the window */
   62|  18.7k|    unsigned wnext;             /* window write index */
   63|  18.7k|    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
   64|  18.7k|    unsigned long hold;         /* local strm->hold */
   65|  18.7k|    unsigned bits;              /* local strm->bits */
   66|  18.7k|    code const FAR *lcode;      /* local strm->lencode */
   67|  18.7k|    code const FAR *dcode;      /* local strm->distcode */
   68|  18.7k|    unsigned lmask;             /* mask for first level of length codes */
   69|  18.7k|    unsigned dmask;             /* mask for first level of distance codes */
   70|  18.7k|    code const *here;           /* retrieved table entry */
   71|  18.7k|    unsigned op;                /* code bits, operation, extra bits, or */
   72|       |                                /*  window position, window bytes to copy */
   73|  18.7k|    unsigned len;               /* match length, unused bytes */
   74|  18.7k|    unsigned dist;              /* match distance */
   75|  18.7k|    unsigned char FAR *from;    /* where to copy match from */
   76|       |
   77|       |    /* copy state to local variables */
   78|  18.7k|    state = (struct inflate_state FAR *)strm->state;
   79|  18.7k|    in = strm->next_in;
   80|  18.7k|    last = in + (strm->avail_in - 5);
   81|  18.7k|    out = strm->next_out;
   82|  18.7k|    beg = out - (start - strm->avail_out);
   83|  18.7k|    end = out + (strm->avail_out - 257);
   84|       |#ifdef INFLATE_STRICT
   85|       |    dmax = state->dmax;
   86|       |#endif
   87|  18.7k|    wsize = state->wsize;
   88|  18.7k|    whave = state->whave;
   89|  18.7k|    wnext = state->wnext;
   90|  18.7k|    window = state->window;
   91|  18.7k|    hold = state->hold;
   92|  18.7k|    bits = state->bits;
   93|  18.7k|    lcode = state->lencode;
   94|  18.7k|    dcode = state->distcode;
   95|  18.7k|    lmask = (1U << state->lenbits) - 1;
   96|  18.7k|    dmask = (1U << state->distbits) - 1;
   97|       |
   98|       |    /* decode literals and length/distances until end-of-block or not enough
   99|       |       input data or output space */
  100|   422k|    do {
  101|   422k|        if (bits < 15) {
  ------------------
  |  Branch (101:13): [True: 249k, False: 173k]
  ------------------
  102|   249k|            hold += (unsigned long)(*in++) << bits;
  103|   249k|            bits += 8;
  104|   249k|            hold += (unsigned long)(*in++) << bits;
  105|   249k|            bits += 8;
  106|   249k|        }
  107|   422k|        here = lcode + (hold & lmask);
  108|   423k|      dolen:
  109|   423k|        op = (unsigned)(here->bits);
  110|   423k|        hold >>= op;
  111|   423k|        bits -= op;
  112|   423k|        op = (unsigned)(here->op);
  113|   423k|        if (op == 0) {                          /* literal */
  ------------------
  |  Branch (113:13): [True: 199k, False: 224k]
  ------------------
  114|   199k|            Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ?
  115|   199k|                    "inflate:         literal '%c'\n" :
  116|   199k|                    "inflate:         literal 0x%02x\n", here->val));
  117|   199k|            *out++ = (unsigned char)(here->val);
  118|   199k|        }
  119|   224k|        else if (op & 16) {                     /* length base */
  ------------------
  |  Branch (119:18): [True: 209k, False: 14.8k]
  ------------------
  120|   209k|            len = (unsigned)(here->val);
  121|   209k|            op &= 15;                           /* number of extra bits */
  122|   209k|            if (op) {
  ------------------
  |  Branch (122:17): [True: 149k, False: 59.3k]
  ------------------
  123|   149k|                if (bits < op) {
  ------------------
  |  Branch (123:21): [True: 0, False: 149k]
  ------------------
  124|      0|                    hold += (unsigned long)(*in++) << bits;
  125|      0|                    bits += 8;
  126|      0|                }
  127|   149k|                len += (unsigned)hold & ((1U << op) - 1);
  128|   149k|                hold >>= op;
  129|   149k|                bits -= op;
  130|   149k|            }
  131|   209k|            Tracevv((stderr, "inflate:         length %u\n", len));
  132|   209k|            if (bits < 15) {
  ------------------
  |  Branch (132:17): [True: 131k, False: 77.4k]
  ------------------
  133|   131k|                hold += (unsigned long)(*in++) << bits;
  134|   131k|                bits += 8;
  135|   131k|                hold += (unsigned long)(*in++) << bits;
  136|   131k|                bits += 8;
  137|   131k|            }
  138|   209k|            here = dcode + (hold & dmask);
  139|   209k|          dodist:
  140|   209k|            op = (unsigned)(here->bits);
  141|   209k|            hold >>= op;
  142|   209k|            bits -= op;
  143|   209k|            op = (unsigned)(here->op);
  144|   209k|            if (op & 16) {                      /* distance base */
  ------------------
  |  Branch (144:17): [True: 209k, False: 15]
  ------------------
  145|   209k|                dist = (unsigned)(here->val);
  146|   209k|                op &= 15;                       /* number of extra bits */
  147|   209k|                if (bits < op) {
  ------------------
  |  Branch (147:21): [True: 12.1k, False: 197k]
  ------------------
  148|  12.1k|                    hold += (unsigned long)(*in++) << bits;
  149|  12.1k|                    bits += 8;
  150|  12.1k|                    if (bits < op) {
  ------------------
  |  Branch (150:25): [True: 0, False: 12.1k]
  ------------------
  151|      0|                        hold += (unsigned long)(*in++) << bits;
  152|      0|                        bits += 8;
  153|      0|                    }
  154|  12.1k|                }
  155|   209k|                dist += (unsigned)hold & ((1U << op) - 1);
  156|       |#ifdef INFLATE_STRICT
  157|       |                if (dist > dmax) {
  158|       |                    strm->msg = (char *)"invalid distance too far back";
  159|       |                    state->mode = BAD;
  160|       |                    break;
  161|       |                }
  162|       |#endif
  163|   209k|                hold >>= op;
  164|   209k|                bits -= op;
  165|   209k|                Tracevv((stderr, "inflate:         distance %u\n", dist));
  166|   209k|                op = (unsigned)(out - beg);     /* max distance in output */
  167|   209k|                if (dist > op) {                /* see if copy from window */
  ------------------
  |  Branch (167:21): [True: 27.7k, False: 181k]
  ------------------
  168|  27.7k|                    op = dist - op;             /* distance back in window */
  169|  27.7k|                    if (op > whave) {
  ------------------
  |  Branch (169:25): [True: 42, False: 27.7k]
  ------------------
  170|     42|                        if (state->sane) {
  ------------------
  |  Branch (170:29): [True: 42, False: 0]
  ------------------
  171|     42|                            strm->msg =
  172|     42|                                (char *)"invalid distance too far back";
  173|     42|                            state->mode = BAD;
  174|     42|                            break;
  175|     42|                        }
  176|       |#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
  177|       |                        if (len <= op - whave) {
  178|       |                            do {
  179|       |                                *out++ = 0;
  180|       |                            } while (--len);
  181|       |                            continue;
  182|       |                        }
  183|       |                        len -= op - whave;
  184|       |                        do {
  185|       |                            *out++ = 0;
  186|       |                        } while (--op > whave);
  187|       |                        if (op == 0) {
  188|       |                            from = out - dist;
  189|       |                            do {
  190|       |                                *out++ = *from++;
  191|       |                            } while (--len);
  192|       |                            continue;
  193|       |                        }
  194|       |#endif
  195|     42|                    }
  196|  27.7k|                    from = window;
  197|  27.7k|                    if (wnext == 0) {           /* very common case */
  ------------------
  |  Branch (197:25): [True: 1.75k, False: 25.9k]
  ------------------
  198|  1.75k|                        from += wsize - op;
  199|  1.75k|                        if (op < len) {         /* some from window */
  ------------------
  |  Branch (199:29): [True: 134, False: 1.62k]
  ------------------
  200|    134|                            len -= op;
  201|  10.8k|                            do {
  202|  10.8k|                                *out++ = *from++;
  203|  10.8k|                            } while (--op);
  ------------------
  |  Branch (203:38): [True: 10.7k, False: 134]
  ------------------
  204|    134|                            from = out - dist;  /* rest from output */
  205|    134|                        }
  206|  1.75k|                    }
  207|  25.9k|                    else if (wnext < op) {      /* wrap around window */
  ------------------
  |  Branch (207:30): [True: 4.49k, False: 21.4k]
  ------------------
  208|  4.49k|                        from += wsize + wnext - op;
  209|  4.49k|                        op -= wnext;
  210|  4.49k|                        if (op < len) {         /* some from end of window */
  ------------------
  |  Branch (210:29): [True: 200, False: 4.29k]
  ------------------
  211|    200|                            len -= op;
  212|  23.4k|                            do {
  213|  23.4k|                                *out++ = *from++;
  214|  23.4k|                            } while (--op);
  ------------------
  |  Branch (214:38): [True: 23.2k, False: 200]
  ------------------
  215|    200|                            from = window;
  216|    200|                            if (wnext < len) {  /* some from start of window */
  ------------------
  |  Branch (216:33): [True: 102, False: 98]
  ------------------
  217|    102|                                op = wnext;
  218|    102|                                len -= op;
  219|  6.04k|                                do {
  220|  6.04k|                                    *out++ = *from++;
  221|  6.04k|                                } while (--op);
  ------------------
  |  Branch (221:42): [True: 5.94k, False: 102]
  ------------------
  222|    102|                                from = out - dist;      /* rest from output */
  223|    102|                            }
  224|    200|                        }
  225|  4.49k|                    }
  226|  21.4k|                    else {                      /* contiguous in window */
  227|  21.4k|                        from += wnext - op;
  228|  21.4k|                        if (op < len) {         /* some from window */
  ------------------
  |  Branch (228:29): [True: 11.4k, False: 9.99k]
  ------------------
  229|  11.4k|                            len -= op;
  230|   635k|                            do {
  231|   635k|                                *out++ = *from++;
  232|   635k|                            } while (--op);
  ------------------
  |  Branch (232:38): [True: 623k, False: 11.4k]
  ------------------
  233|  11.4k|                            from = out - dist;  /* rest from output */
  234|  11.4k|                        }
  235|  21.4k|                    }
  236|  1.47M|                    while (len > 2) {
  ------------------
  |  Branch (236:28): [True: 1.44M, False: 27.7k]
  ------------------
  237|  1.44M|                        *out++ = *from++;
  238|  1.44M|                        *out++ = *from++;
  239|  1.44M|                        *out++ = *from++;
  240|  1.44M|                        len -= 3;
  241|  1.44M|                    }
  242|  27.7k|                    if (len) {
  ------------------
  |  Branch (242:25): [True: 16.5k, False: 11.1k]
  ------------------
  243|  16.5k|                        *out++ = *from++;
  244|  16.5k|                        if (len > 1)
  ------------------
  |  Branch (244:29): [True: 9.51k, False: 7.06k]
  ------------------
  245|  9.51k|                            *out++ = *from++;
  246|  16.5k|                    }
  247|  27.7k|                }
  248|   181k|                else {
  249|   181k|                    from = out - dist;          /* copy direct from output */
  250|  9.34M|                    do {                        /* minimum length is three */
  251|  9.34M|                        *out++ = *from++;
  252|  9.34M|                        *out++ = *from++;
  253|  9.34M|                        *out++ = *from++;
  254|  9.34M|                        len -= 3;
  255|  9.34M|                    } while (len > 2);
  ------------------
  |  Branch (255:30): [True: 9.16M, False: 181k]
  ------------------
  256|   181k|                    if (len) {
  ------------------
  |  Branch (256:25): [True: 48.6k, False: 132k]
  ------------------
  257|  48.6k|                        *out++ = *from++;
  258|  48.6k|                        if (len > 1)
  ------------------
  |  Branch (258:29): [True: 27.5k, False: 21.1k]
  ------------------
  259|  27.5k|                            *out++ = *from++;
  260|  48.6k|                    }
  261|   181k|                }
  262|   209k|            }
  263|     15|            else if ((op & 64) == 0) {          /* 2nd level distance code */
  ------------------
  |  Branch (263:22): [True: 0, False: 15]
  ------------------
  264|      0|                here = dcode + here->val + (hold & ((1U << op) - 1));
  265|      0|                goto dodist;
  266|      0|            }
  267|     15|            else {
  268|     15|                strm->msg = (char *)"invalid distance code";
  269|     15|                state->mode = BAD;
  270|     15|                break;
  271|     15|            }
  272|   209k|        }
  273|  14.8k|        else if ((op & 64) == 0) {              /* 2nd level length code */
  ------------------
  |  Branch (273:18): [True: 264, False: 14.5k]
  ------------------
  274|    264|            here = lcode + here->val + (hold & ((1U << op) - 1));
  275|    264|            goto dolen;
  276|    264|        }
  277|  14.5k|        else if (op & 32) {                     /* end-of-block */
  ------------------
  |  Branch (277:18): [True: 14.5k, False: 13]
  ------------------
  278|  14.5k|            Tracevv((stderr, "inflate:         end of block\n"));
  279|  14.5k|            state->mode = TYPE;
  280|  14.5k|            break;
  281|  14.5k|        }
  282|     13|        else {
  283|     13|            strm->msg = (char *)"invalid literal/length code";
  284|     13|            state->mode = BAD;
  285|     13|            break;
  286|     13|        }
  287|   423k|    } while (in < last && out < end);
  ------------------
  |  Branch (287:14): [True: 405k, False: 2.82k]
  |  Branch (287:27): [True: 404k, False: 1.34k]
  ------------------
  288|       |
  289|       |    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
  290|  18.7k|    len = bits >> 3;
  291|  18.7k|    in -= len;
  292|  18.7k|    bits -= len << 3;
  293|  18.7k|    hold &= (1U << bits) - 1;
  294|       |
  295|       |    /* update state and return */
  296|  18.7k|    strm->next_in = in;
  297|  18.7k|    strm->next_out = out;
  298|  18.7k|    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
  ------------------
  |  Branch (298:33): [True: 17.3k, False: 1.46k]
  ------------------
  299|  18.7k|    strm->avail_out = (unsigned)(out < end ?
  ------------------
  |  Branch (299:34): [True: 17.4k, False: 1.35k]
  ------------------
  300|  17.4k|                                 257 + (end - out) : 257 - (out - end));
  301|  18.7k|    state->hold = hold;
  302|  18.7k|    state->bits = bits;
  303|  18.7k|    return;
  304|  18.7k|}

inflateResetKeep:
  106|  1.37k|int ZEXPORT inflateResetKeep(z_streamp strm) {
  107|  1.37k|    struct inflate_state FAR *state;
  108|       |
  109|  1.37k|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (109:9): [True: 0, False: 1.37k]
  ------------------
  110|  1.37k|    state = (struct inflate_state FAR *)strm->state;
  111|  1.37k|    strm->total_in = strm->total_out = state->total = 0;
  112|  1.37k|    strm->msg = Z_NULL;
  ------------------
  |  |  212|  1.37k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  113|  1.37k|    if (state->wrap)        /* to support ill-conceived Java test suite */
  ------------------
  |  Branch (113:9): [True: 1.17k, False: 201]
  ------------------
  114|  1.17k|        strm->adler = state->wrap & 1;
  115|  1.37k|    state->mode = HEAD;
  116|  1.37k|    state->last = 0;
  117|  1.37k|    state->havedict = 0;
  118|  1.37k|    state->flags = -1;
  119|  1.37k|    state->dmax = 32768U;
  120|  1.37k|    state->head = Z_NULL;
  ------------------
  |  |  212|  1.37k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  121|  1.37k|    state->hold = 0;
  122|  1.37k|    state->bits = 0;
  123|  1.37k|    state->lencode = state->distcode = state->next = state->codes;
  124|  1.37k|    state->sane = 1;
  125|  1.37k|    state->back = -1;
  126|  1.37k|    Tracev((stderr, "inflate: reset\n"));
  127|  1.37k|    return Z_OK;
  ------------------
  |  |  177|  1.37k|#define Z_OK            0
  ------------------
  128|  1.37k|}
inflateReset:
  130|  1.37k|int ZEXPORT inflateReset(z_streamp strm) {
  131|  1.37k|    struct inflate_state FAR *state;
  132|       |
  133|  1.37k|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (133:9): [True: 0, False: 1.37k]
  ------------------
  134|  1.37k|    state = (struct inflate_state FAR *)strm->state;
  135|  1.37k|    state->wsize = 0;
  136|  1.37k|    state->whave = 0;
  137|  1.37k|    state->wnext = 0;
  138|  1.37k|    return inflateResetKeep(strm);
  139|  1.37k|}
inflateReset2:
  141|  1.37k|int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
  142|  1.37k|    int wrap;
  143|  1.37k|    struct inflate_state FAR *state;
  144|       |
  145|       |    /* get the state */
  146|  1.37k|    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (146:9): [True: 0, False: 1.37k]
  ------------------
  147|  1.37k|    state = (struct inflate_state FAR *)strm->state;
  148|       |
  149|       |    /* extract wrap request from windowBits parameter */
  150|  1.37k|    if (windowBits < 0) {
  ------------------
  |  Branch (150:9): [True: 201, False: 1.17k]
  ------------------
  151|    201|        if (windowBits < -15)
  ------------------
  |  Branch (151:13): [True: 0, False: 201]
  ------------------
  152|      0|            return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  153|    201|        wrap = 0;
  154|    201|        windowBits = -windowBits;
  155|    201|    }
  156|  1.17k|    else {
  157|  1.17k|        wrap = (windowBits >> 4) + 5;
  158|  1.17k|#ifdef GUNZIP
  159|  1.17k|        if (windowBits < 48)
  ------------------
  |  Branch (159:13): [True: 1.17k, False: 0]
  ------------------
  160|  1.17k|            windowBits &= 15;
  161|  1.17k|#endif
  162|  1.17k|    }
  163|       |
  164|       |    /* set number of window bits, free window if different */
  165|  1.37k|    if (windowBits && (windowBits < 8 || windowBits > 15))
  ------------------
  |  Branch (165:9): [True: 1.37k, False: 0]
  |  Branch (165:24): [True: 0, False: 1.37k]
  |  Branch (165:42): [True: 0, False: 1.37k]
  ------------------
  166|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  167|  1.37k|    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
  ------------------
  |  |  212|  2.74k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (167:9): [True: 0, False: 1.37k]
  |  Branch (167:36): [True: 0, False: 0]
  ------------------
  168|      0|        ZFREE(strm, state->window);
  ------------------
  |  |  247|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  169|      0|        state->window = Z_NULL;
  ------------------
  |  |  212|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  170|      0|    }
  171|       |
  172|       |    /* update state and reset the rest of it */
  173|  1.37k|    state->wrap = wrap;
  174|  1.37k|    state->wbits = (unsigned)windowBits;
  175|  1.37k|    return inflateReset(strm);
  176|  1.37k|}
inflateInit2_:
  179|  1.17k|                          const char *version, int stream_size) {
  180|  1.17k|    int ret;
  181|  1.17k|    struct inflate_state FAR *state;
  182|       |
  183|  1.17k|    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
  ------------------
  |  |  212|  2.34k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
  ------------------
  |  |   40|  1.17k|#define ZLIB_VERSION "1.3.1"
  ------------------
  |  Branch (183:9): [True: 0, False: 1.17k]
  |  Branch (183:30): [True: 0, False: 1.17k]
  ------------------
  184|  1.17k|        stream_size != (int)(sizeof(z_stream)))
  ------------------
  |  Branch (184:9): [True: 0, False: 1.17k]
  ------------------
  185|      0|        return Z_VERSION_ERROR;
  ------------------
  |  |  185|      0|#define Z_VERSION_ERROR (-6)
  ------------------
  186|  1.17k|    if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  212|  1.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (strm == Z_NULL) return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  |  Branch (186:9): [True: 0, False: 1.17k]
  ------------------
  187|  1.17k|    strm->msg = Z_NULL;                 /* in case we return an error */
  ------------------
  |  |  212|  1.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  188|  1.17k|    if (strm->zalloc == (alloc_func)0) {
  ------------------
  |  Branch (188:9): [True: 0, False: 1.17k]
  ------------------
  189|       |#ifdef Z_SOLO
  190|       |        return Z_STREAM_ERROR;
  191|       |#else
  192|      0|        strm->zalloc = zcalloc;
  193|      0|        strm->opaque = (voidpf)0;
  194|      0|#endif
  195|      0|    }
  196|  1.17k|    if (strm->zfree == (free_func)0)
  ------------------
  |  Branch (196:9): [True: 0, False: 1.17k]
  ------------------
  197|       |#ifdef Z_SOLO
  198|       |        return Z_STREAM_ERROR;
  199|       |#else
  200|      0|        strm->zfree = zcfree;
  201|  1.17k|#endif
  202|  1.17k|    state = (struct inflate_state FAR *)
  203|  1.17k|            ZALLOC(strm, 1, sizeof(struct inflate_state));
  ------------------
  |  |  246|  1.17k|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  204|  1.17k|    if (state == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  212|  1.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (state == Z_NULL) return Z_MEM_ERROR;
  ------------------
  |  |  183|      0|#define Z_MEM_ERROR    (-4)
  ------------------
  |  Branch (204:9): [True: 0, False: 1.17k]
  ------------------
  205|  1.17k|    Tracev((stderr, "inflate: allocated\n"));
  206|  1.17k|    strm->state = (struct internal_state FAR *)state;
  207|  1.17k|    state->strm = strm;
  208|  1.17k|    state->window = Z_NULL;
  ------------------
  |  |  212|  1.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  209|  1.17k|    state->mode = HEAD;     /* to pass state test in inflateReset2() */
  210|  1.17k|    ret = inflateReset2(strm, windowBits);
  211|  1.17k|    if (ret != Z_OK) {
  ------------------
  |  |  177|  1.17k|#define Z_OK            0
  ------------------
  |  Branch (211:9): [True: 0, False: 1.17k]
  ------------------
  212|      0|        ZFREE(strm, state);
  ------------------
  |  |  247|      0|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  213|      0|        strm->state = Z_NULL;
  ------------------
  |  |  212|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  214|      0|    }
  215|  1.17k|    return ret;
  216|  1.17k|}
inflateInit_:
  219|    984|                         int stream_size) {
  220|    984|    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
  ------------------
  |  |   68|    984|#  define DEF_WBITS MAX_WBITS
  |  |  ------------------
  |  |  |  |  277|    984|#  define MAX_WBITS   15 /* 32K LZ77 window */
  |  |  ------------------
  ------------------
  221|    984|}
inflate:
  590|   243k|int ZEXPORT inflate(z_streamp strm, int flush) {
  591|   243k|    struct inflate_state FAR *state;
  592|   243k|    z_const unsigned char FAR *next;    /* next input */
  593|   243k|    unsigned char FAR *put;     /* next output */
  594|   243k|    unsigned have, left;        /* available input and output */
  595|   243k|    unsigned long hold;         /* bit buffer */
  596|   243k|    unsigned bits;              /* bits in bit buffer */
  597|   243k|    unsigned in, out;           /* save starting available input and output */
  598|   243k|    unsigned copy;              /* number of stored or match bytes to copy */
  599|   243k|    unsigned char FAR *from;    /* where to copy match bytes from */
  600|   243k|    code here;                  /* current decoding table entry */
  601|   243k|    code last;                  /* parent table entry */
  602|   243k|    unsigned len;               /* length to copy for repeats, bits to drop */
  603|   243k|    int ret;                    /* return code */
  604|   243k|#ifdef GUNZIP
  605|   243k|    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
  606|   243k|#endif
  607|   243k|    static const unsigned short order[19] = /* permutation of code lengths */
  608|   243k|        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
  609|       |
  610|   243k|    if (inflateStateCheck(strm) || strm->next_out == Z_NULL ||
  ------------------
  |  |  212|   487k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (610:9): [True: 0, False: 243k]
  |  Branch (610:36): [True: 0, False: 243k]
  ------------------
  611|   243k|        (strm->next_in == Z_NULL && strm->avail_in != 0))
  ------------------
  |  |  212|   487k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (611:10): [True: 0, False: 243k]
  |  Branch (611:37): [True: 0, False: 0]
  ------------------
  612|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
  613|       |
  614|   243k|    state = (struct inflate_state FAR *)strm->state;
  615|   243k|    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
  ------------------
  |  Branch (615:9): [True: 15.6k, False: 228k]
  ------------------
  616|   243k|    LOAD();
  ------------------
  |  |  445|   243k|    do { \
  |  |  446|   243k|        put = strm->next_out; \
  |  |  447|   243k|        left = strm->avail_out; \
  |  |  448|   243k|        next = strm->next_in; \
  |  |  449|   243k|        have = strm->avail_in; \
  |  |  450|   243k|        hold = state->hold; \
  |  |  451|   243k|        bits = state->bits; \
  |  |  452|   243k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (452:14): [Folded, False: 243k]
  |  |  ------------------
  ------------------
  617|   243k|    in = have;
  618|   243k|    out = left;
  619|   243k|    ret = Z_OK;
  ------------------
  |  |  177|   243k|#define Z_OK            0
  ------------------
  620|   243k|    for (;;)
  621|   506k|        switch (state->mode) {
  622|  1.19k|        case HEAD:
  ------------------
  |  Branch (622:9): [True: 1.19k, False: 505k]
  ------------------
  623|  1.19k|            if (state->wrap == 0) {
  ------------------
  |  Branch (623:17): [True: 201, False: 995]
  ------------------
  624|    201|                state->mode = TYPEDO;
  625|    201|                break;
  626|    201|            }
  627|    995|            NEEDBITS(16);
  ------------------
  |  |  485|    995|    do { \
  |  |  486|  2.97k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 1.98k, False: 987]
  |  |  ------------------
  |  |  487|  1.98k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|  1.98k|    do { \
  |  |  |  |  476|  1.98k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 8, False: 1.97k]
  |  |  |  |  ------------------
  |  |  |  |  477|  1.98k|        have--; \
  |  |  |  |  478|  1.97k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|  1.97k|        bits += 8; \
  |  |  |  |  480|  1.97k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 1.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    995|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 987]
  |  |  ------------------
  ------------------
  628|    987|#ifdef GUNZIP
  629|    987|            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
  ------------------
  |  Branch (629:17): [True: 165, False: 822]
  |  Branch (629:38): [True: 152, False: 13]
  ------------------
  630|    152|                if (state->wbits == 0)
  ------------------
  |  Branch (630:21): [True: 0, False: 152]
  ------------------
  631|      0|                    state->wbits = 15;
  632|    152|                state->check = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  212|    152|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  633|    152|                CRC2(state->check, hold);
  ------------------
  |  |  427|    152|    do { \
  |  |  428|    152|        hbuf[0] = (unsigned char)(word); \
  |  |  429|    152|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  430|    152|        check = crc32(check, hbuf, 2); \
  |  |  431|    152|    } while (0)
  |  |  ------------------
  |  |  |  Branch (431:14): [Folded, False: 152]
  |  |  ------------------
  ------------------
  634|    152|                INITBITS();
  ------------------
  |  |  467|    152|    do { \
  |  |  468|    152|        hold = 0; \
  |  |  469|    152|        bits = 0; \
  |  |  470|    152|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 152]
  |  |  ------------------
  ------------------
  635|    152|                state->mode = FLAGS;
  636|    152|                break;
  637|    152|            }
  638|    835|            if (state->head != Z_NULL)
  ------------------
  |  |  212|    835|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (638:17): [True: 0, False: 835]
  ------------------
  639|      0|                state->head->done = -1;
  640|    835|            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
  ------------------
  |  Branch (640:17): [True: 0, False: 835]
  ------------------
  641|       |#else
  642|       |            if (
  643|       |#endif
  644|    835|                ((BITS(8) << 8) + (hold >> 8)) % 31) {
  ------------------
  |  |  492|    835|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  |  Branch (644:17): [True: 177, False: 658]
  ------------------
  645|    177|                strm->msg = (char *)"incorrect header check";
  646|    177|                state->mode = BAD;
  647|    177|                break;
  648|    177|            }
  649|    658|            if (BITS(4) != Z_DEFLATED) {
  ------------------
  |  |  492|    658|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
                          if (BITS(4) != Z_DEFLATED) {
  ------------------
  |  |  209|    658|#define Z_DEFLATED   8
  ------------------
  |  Branch (649:17): [True: 10, False: 648]
  ------------------
  650|     10|                strm->msg = (char *)"unknown compression method";
  651|     10|                state->mode = BAD;
  652|     10|                break;
  653|     10|            }
  654|    648|            DROPBITS(4);
  ------------------
  |  |  496|    648|    do { \
  |  |  497|    648|        hold >>= (n); \
  |  |  498|    648|        bits -= (unsigned)(n); \
  |  |  499|    648|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 648]
  |  |  ------------------
  ------------------
  655|    648|            len = BITS(4) + 8;
  ------------------
  |  |  492|    648|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  656|    648|            if (state->wbits == 0)
  ------------------
  |  Branch (656:17): [True: 0, False: 648]
  ------------------
  657|      0|                state->wbits = len;
  658|    648|            if (len > 15 || len > state->wbits) {
  ------------------
  |  Branch (658:17): [True: 1, False: 647]
  |  Branch (658:29): [True: 0, False: 647]
  ------------------
  659|      1|                strm->msg = (char *)"invalid window size";
  660|      1|                state->mode = BAD;
  661|      1|                break;
  662|      1|            }
  663|    647|            state->dmax = 1U << len;
  664|    647|            state->flags = 0;               /* indicate zlib header */
  665|    647|            Tracev((stderr, "inflate:   zlib header ok\n"));
  666|    647|            strm->adler = state->check = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  212|    647|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  667|    647|            state->mode = hold & 0x200 ? DICTID : TYPE;
  ------------------
  |  Branch (667:27): [True: 6, False: 641]
  ------------------
  668|    647|            INITBITS();
  ------------------
  |  |  467|    647|    do { \
  |  |  468|    647|        hold = 0; \
  |  |  469|    647|        bits = 0; \
  |  |  470|    647|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 647]
  |  |  ------------------
  ------------------
  669|    647|            break;
  670|      0|#ifdef GUNZIP
  671|    157|        case FLAGS:
  ------------------
  |  Branch (671:9): [True: 157, False: 506k]
  ------------------
  672|    157|            NEEDBITS(16);
  ------------------
  |  |  485|    157|    do { \
  |  |  486|    460|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 309, False: 151]
  |  |  ------------------
  |  |  487|    309|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    309|    do { \
  |  |  |  |  476|    309|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 6, False: 303]
  |  |  |  |  ------------------
  |  |  |  |  477|    309|        have--; \
  |  |  |  |  478|    303|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    303|        bits += 8; \
  |  |  |  |  480|    303|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 303]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    157|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 151]
  |  |  ------------------
  ------------------
  673|    151|            state->flags = (int)(hold);
  674|    151|            if ((state->flags & 0xff) != Z_DEFLATED) {
  ------------------
  |  |  209|    151|#define Z_DEFLATED   8
  ------------------
  |  Branch (674:17): [True: 2, False: 149]
  ------------------
  675|      2|                strm->msg = (char *)"unknown compression method";
  676|      2|                state->mode = BAD;
  677|      2|                break;
  678|      2|            }
  679|    149|            if (state->flags & 0xe000) {
  ------------------
  |  Branch (679:17): [True: 1, False: 148]
  ------------------
  680|      1|                strm->msg = (char *)"unknown header flags set";
  681|      1|                state->mode = BAD;
  682|      1|                break;
  683|      1|            }
  684|    148|            if (state->head != Z_NULL)
  ------------------
  |  |  212|    148|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (684:17): [True: 0, False: 148]
  ------------------
  685|      0|                state->head->text = (int)((hold >> 8) & 1);
  686|    148|            if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (686:17): [True: 53, False: 95]
  |  Branch (686:44): [True: 53, False: 0]
  ------------------
  687|     53|                CRC2(state->check, hold);
  ------------------
  |  |  427|     53|    do { \
  |  |  428|     53|        hbuf[0] = (unsigned char)(word); \
  |  |  429|     53|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  430|     53|        check = crc32(check, hbuf, 2); \
  |  |  431|     53|    } while (0)
  |  |  ------------------
  |  |  |  Branch (431:14): [Folded, False: 53]
  |  |  ------------------
  ------------------
  688|    148|            INITBITS();
  ------------------
  |  |  467|    148|    do { \
  |  |  468|    148|        hold = 0; \
  |  |  469|    148|        bits = 0; \
  |  |  470|    148|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 148]
  |  |  ------------------
  ------------------
  689|    148|            state->mode = TIME;
  690|       |                /* fallthrough */
  691|    305|        case TIME:
  ------------------
  |  Branch (691:9): [True: 157, False: 506k]
  ------------------
  692|    305|            NEEDBITS(32);
  ------------------
  |  |  485|    305|    do { \
  |  |  486|    891|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 746, False: 145]
  |  |  ------------------
  |  |  487|    746|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    746|    do { \
  |  |  |  |  476|    746|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 160, False: 586]
  |  |  |  |  ------------------
  |  |  |  |  477|    746|        have--; \
  |  |  |  |  478|    586|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    586|        bits += 8; \
  |  |  |  |  480|    586|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 586]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    305|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 145]
  |  |  ------------------
  ------------------
  693|    145|            if (state->head != Z_NULL)
  ------------------
  |  |  212|    145|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (693:17): [True: 0, False: 145]
  ------------------
  694|      0|                state->head->time = hold;
  695|    145|            if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (695:17): [True: 52, False: 93]
  |  Branch (695:44): [True: 52, False: 0]
  ------------------
  696|     52|                CRC4(state->check, hold);
  ------------------
  |  |  434|     52|    do { \
  |  |  435|     52|        hbuf[0] = (unsigned char)(word); \
  |  |  436|     52|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  437|     52|        hbuf[2] = (unsigned char)((word) >> 16); \
  |  |  438|     52|        hbuf[3] = (unsigned char)((word) >> 24); \
  |  |  439|     52|        check = crc32(check, hbuf, 4); \
  |  |  440|     52|    } while (0)
  |  |  ------------------
  |  |  |  Branch (440:14): [Folded, False: 52]
  |  |  ------------------
  ------------------
  697|    145|            INITBITS();
  ------------------
  |  |  467|    145|    do { \
  |  |  468|    145|        hold = 0; \
  |  |  469|    145|        bits = 0; \
  |  |  470|    145|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 145]
  |  |  ------------------
  ------------------
  698|    145|            state->mode = OS;
  699|       |                /* fallthrough */
  700|    205|        case OS:
  ------------------
  |  Branch (700:9): [True: 60, False: 506k]
  ------------------
  701|    205|            NEEDBITS(16);
  ------------------
  |  |  485|    205|    do { \
  |  |  486|    493|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 350, False: 143]
  |  |  ------------------
  |  |  487|    350|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    350|    do { \
  |  |  |  |  476|    350|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 62, False: 288]
  |  |  |  |  ------------------
  |  |  |  |  477|    350|        have--; \
  |  |  |  |  478|    288|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    288|        bits += 8; \
  |  |  |  |  480|    288|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 288]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    205|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 143]
  |  |  ------------------
  ------------------
  702|    143|            if (state->head != Z_NULL) {
  ------------------
  |  |  212|    143|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (702:17): [True: 0, False: 143]
  ------------------
  703|      0|                state->head->xflags = (int)(hold & 0xff);
  704|      0|                state->head->os = (int)(hold >> 8);
  705|      0|            }
  706|    143|            if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (706:17): [True: 50, False: 93]
  |  Branch (706:44): [True: 50, False: 0]
  ------------------
  707|     50|                CRC2(state->check, hold);
  ------------------
  |  |  427|     50|    do { \
  |  |  428|     50|        hbuf[0] = (unsigned char)(word); \
  |  |  429|     50|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  430|     50|        check = crc32(check, hbuf, 2); \
  |  |  431|     50|    } while (0)
  |  |  ------------------
  |  |  |  Branch (431:14): [Folded, False: 50]
  |  |  ------------------
  ------------------
  708|    143|            INITBITS();
  ------------------
  |  |  467|    143|    do { \
  |  |  468|    143|        hold = 0; \
  |  |  469|    143|        bits = 0; \
  |  |  470|    143|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 143]
  |  |  ------------------
  ------------------
  709|    143|            state->mode = EXLEN;
  710|       |                /* fallthrough */
  711|    197|        case EXLEN:
  ------------------
  |  Branch (711:9): [True: 54, False: 506k]
  ------------------
  712|    197|            if (state->flags & 0x0400) {
  ------------------
  |  Branch (712:17): [True: 135, False: 62]
  ------------------
  713|    135|                NEEDBITS(16);
  ------------------
  |  |  485|    135|    do { \
  |  |  486|    295|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 216, False: 79]
  |  |  ------------------
  |  |  487|    216|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    216|    do { \
  |  |  |  |  476|    216|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 56, False: 160]
  |  |  |  |  ------------------
  |  |  |  |  477|    216|        have--; \
  |  |  |  |  478|    160|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    160|        bits += 8; \
  |  |  |  |  480|    160|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 160]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    135|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 79]
  |  |  ------------------
  ------------------
  714|     79|                state->length = (unsigned)(hold);
  715|     79|                if (state->head != Z_NULL)
  ------------------
  |  |  212|     79|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (715:21): [True: 0, False: 79]
  ------------------
  716|      0|                    state->head->extra_len = (unsigned)hold;
  717|     79|                if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (717:21): [True: 12, False: 67]
  |  Branch (717:48): [True: 12, False: 0]
  ------------------
  718|     12|                    CRC2(state->check, hold);
  ------------------
  |  |  427|     12|    do { \
  |  |  428|     12|        hbuf[0] = (unsigned char)(word); \
  |  |  429|     12|        hbuf[1] = (unsigned char)((word) >> 8); \
  |  |  430|     12|        check = crc32(check, hbuf, 2); \
  |  |  431|     12|    } while (0)
  |  |  ------------------
  |  |  |  Branch (431:14): [Folded, False: 12]
  |  |  ------------------
  ------------------
  719|     79|                INITBITS();
  ------------------
  |  |  467|     79|    do { \
  |  |  468|     79|        hold = 0; \
  |  |  469|     79|        bits = 0; \
  |  |  470|     79|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 79]
  |  |  ------------------
  ------------------
  720|     79|            }
  721|     62|            else if (state->head != Z_NULL)
  ------------------
  |  |  212|     62|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (721:22): [True: 0, False: 62]
  ------------------
  722|      0|                state->head->extra = Z_NULL;
  ------------------
  |  |  212|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  723|    141|            state->mode = EXTRA;
  724|       |                /* fallthrough */
  725|  1.62k|        case EXTRA:
  ------------------
  |  Branch (725:9): [True: 1.48k, False: 504k]
  ------------------
  726|  1.62k|            if (state->flags & 0x0400) {
  ------------------
  |  Branch (726:17): [True: 1.56k, False: 62]
  ------------------
  727|  1.56k|                copy = state->length;
  728|  1.56k|                if (copy > have) copy = have;
  ------------------
  |  Branch (728:21): [True: 1.50k, False: 59]
  ------------------
  729|  1.56k|                if (copy) {
  ------------------
  |  Branch (729:21): [True: 792, False: 775]
  ------------------
  730|    792|                    if (state->head != Z_NULL &&
  ------------------
  |  |  212|  1.58k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (730:25): [True: 0, False: 792]
  ------------------
  731|      0|                        state->head->extra != Z_NULL &&
  ------------------
  |  |  212|    792|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (731:25): [True: 0, False: 0]
  ------------------
  732|      0|                        (len = state->head->extra_len - state->length) <
  ------------------
  |  Branch (732:25): [True: 0, False: 0]
  ------------------
  733|      0|                            state->head->extra_max) {
  734|      0|                        zmemcpy(state->head->extra + len, next,
  ------------------
  |  |  209|      0|#    define zmemcpy memcpy
  ------------------
  735|      0|                                len + copy > state->head->extra_max ?
  ------------------
  |  Branch (735:33): [True: 0, False: 0]
  ------------------
  736|      0|                                state->head->extra_max - len : copy);
  737|      0|                    }
  738|    792|                    if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (738:25): [True: 271, False: 521]
  |  Branch (738:52): [True: 271, False: 0]
  ------------------
  739|    271|                        state->check = crc32(state->check, next, copy);
  740|    792|                    have -= copy;
  741|    792|                    next += copy;
  742|    792|                    state->length -= copy;
  743|    792|                }
  744|  1.56k|                if (state->length) goto inf_leave;
  ------------------
  |  Branch (744:21): [True: 1.50k, False: 59]
  ------------------
  745|  1.56k|            }
  746|    121|            state->length = 0;
  747|    121|            state->mode = NAME;
  748|       |                /* fallthrough */
  749|  1.17k|        case NAME:
  ------------------
  |  Branch (749:9): [True: 1.05k, False: 505k]
  ------------------
  750|  1.17k|            if (state->flags & 0x0800) {
  ------------------
  |  Branch (750:17): [True: 1.14k, False: 30]
  ------------------
  751|  1.14k|                if (have == 0) goto inf_leave;
  ------------------
  |  Branch (751:21): [True: 545, False: 604]
  ------------------
  752|    604|                copy = 0;
  753|  1.97k|                do {
  754|  1.97k|                    len = (unsigned)(next[copy++]);
  755|  1.97k|                    if (state->head != Z_NULL &&
  ------------------
  |  |  212|  3.94k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (755:25): [True: 0, False: 1.97k]
  ------------------
  756|      0|                            state->head->name != Z_NULL &&
  ------------------
  |  |  212|  1.97k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (756:29): [True: 0, False: 0]
  ------------------
  757|      0|                            state->length < state->head->name_max)
  ------------------
  |  Branch (757:29): [True: 0, False: 0]
  ------------------
  758|      0|                        state->head->name[state->length++] = (Bytef)len;
  759|  1.97k|                } while (len && copy < have);
  ------------------
  |  Branch (759:26): [True: 1.89k, False: 79]
  |  Branch (759:33): [True: 1.36k, False: 525]
  ------------------
  760|    604|                if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (760:21): [True: 330, False: 274]
  |  Branch (760:48): [True: 330, False: 0]
  ------------------
  761|    330|                    state->check = crc32(state->check, next, copy);
  762|    604|                have -= copy;
  763|    604|                next += copy;
  764|    604|                if (len) goto inf_leave;
  ------------------
  |  Branch (764:21): [True: 525, False: 79]
  ------------------
  765|    604|            }
  766|     30|            else if (state->head != Z_NULL)
  ------------------
  |  |  212|     30|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (766:22): [True: 0, False: 30]
  ------------------
  767|      0|                state->head->name = Z_NULL;
  ------------------
  |  |  212|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  768|    109|            state->length = 0;
  769|    109|            state->mode = COMMENT;
  770|       |                /* fallthrough */
  771|  1.87k|        case COMMENT:
  ------------------
  |  Branch (771:9): [True: 1.76k, False: 504k]
  ------------------
  772|  1.87k|            if (state->flags & 0x1000) {
  ------------------
  |  Branch (772:17): [True: 1.86k, False: 8]
  ------------------
  773|  1.86k|                if (have == 0) goto inf_leave;
  ------------------
  |  Branch (773:21): [True: 899, False: 966]
  ------------------
  774|    966|                copy = 0;
  775|  2.16k|                do {
  776|  2.16k|                    len = (unsigned)(next[copy++]);
  777|  2.16k|                    if (state->head != Z_NULL &&
  ------------------
  |  |  212|  4.32k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (777:25): [True: 0, False: 2.16k]
  ------------------
  778|      0|                            state->head->comment != Z_NULL &&
  ------------------
  |  |  212|  2.16k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (778:29): [True: 0, False: 0]
  ------------------
  779|      0|                            state->length < state->head->comm_max)
  ------------------
  |  Branch (779:29): [True: 0, False: 0]
  ------------------
  780|      0|                        state->head->comment[state->length++] = (Bytef)len;
  781|  2.16k|                } while (len && copy < have);
  ------------------
  |  Branch (781:26): [True: 2.07k, False: 91]
  |  Branch (781:33): [True: 1.19k, False: 875]
  ------------------
  782|    966|                if ((state->flags & 0x0200) && (state->wrap & 4))
  ------------------
  |  Branch (782:21): [True: 269, False: 697]
  |  Branch (782:48): [True: 269, False: 0]
  ------------------
  783|    269|                    state->check = crc32(state->check, next, copy);
  784|    966|                have -= copy;
  785|    966|                next += copy;
  786|    966|                if (len) goto inf_leave;
  ------------------
  |  Branch (786:21): [True: 875, False: 91]
  ------------------
  787|    966|            }
  788|      8|            else if (state->head != Z_NULL)
  ------------------
  |  |  212|      8|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (788:22): [True: 0, False: 8]
  ------------------
  789|      0|                state->head->comment = Z_NULL;
  ------------------
  |  |  212|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  790|     99|            state->mode = HCRC;
  791|       |                /* fallthrough */
  792|    111|        case HCRC:
  ------------------
  |  Branch (792:9): [True: 12, False: 506k]
  ------------------
  793|    111|            if (state->flags & 0x0200) {
  ------------------
  |  Branch (793:17): [True: 39, False: 72]
  ------------------
  794|     39|                NEEDBITS(16);
  ------------------
  |  |  485|     39|    do { \
  |  |  486|     87|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 64, False: 23]
  |  |  ------------------
  |  |  487|     64|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|     64|    do { \
  |  |  |  |  476|     64|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 16, False: 48]
  |  |  |  |  ------------------
  |  |  |  |  477|     64|        have--; \
  |  |  |  |  478|     48|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|     48|        bits += 8; \
  |  |  |  |  480|     48|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 48]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|     39|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 23]
  |  |  ------------------
  ------------------
  795|     23|                if ((state->wrap & 4) && hold != (state->check & 0xffff)) {
  ------------------
  |  Branch (795:21): [True: 23, False: 0]
  |  Branch (795:42): [True: 22, False: 1]
  ------------------
  796|     22|                    strm->msg = (char *)"header crc mismatch";
  797|     22|                    state->mode = BAD;
  798|     22|                    break;
  799|     22|                }
  800|      1|                INITBITS();
  ------------------
  |  |  467|      1|    do { \
  |  |  468|      1|        hold = 0; \
  |  |  469|      1|        bits = 0; \
  |  |  470|      1|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 1]
  |  |  ------------------
  ------------------
  801|      1|            }
  802|     73|            if (state->head != Z_NULL) {
  ------------------
  |  |  212|     73|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (802:17): [True: 0, False: 73]
  ------------------
  803|      0|                state->head->hcrc = (int)((state->flags >> 9) & 1);
  804|      0|                state->head->done = 1;
  805|      0|            }
  806|     73|            strm->adler = state->check = crc32(0L, Z_NULL, 0);
  ------------------
  |  |  212|     73|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  807|     73|            state->mode = TYPE;
  808|     73|            break;
  809|      0|#endif
  810|     24|        case DICTID:
  ------------------
  |  Branch (810:9): [True: 24, False: 506k]
  ------------------
  811|     24|            NEEDBITS(32);
  ------------------
  |  |  485|     24|    do { \
  |  |  486|     43|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 39, False: 4]
  |  |  ------------------
  |  |  487|     39|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|     39|    do { \
  |  |  |  |  476|     39|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 20, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  477|     39|        have--; \
  |  |  |  |  478|     19|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|     19|        bits += 8; \
  |  |  |  |  480|     19|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|     24|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 4]
  |  |  ------------------
  ------------------
  812|      4|            strm->adler = state->check = ZSWAP32(hold);
  ------------------
  |  |  251|      4|#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
  |  |  252|      4|                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
  ------------------
  813|      4|            INITBITS();
  ------------------
  |  |  467|      4|    do { \
  |  |  468|      4|        hold = 0; \
  |  |  469|      4|        bits = 0; \
  |  |  470|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 4]
  |  |  ------------------
  ------------------
  814|      4|            state->mode = DICT;
  815|       |                /* fallthrough */
  816|      4|        case DICT:
  ------------------
  |  Branch (816:9): [True: 0, False: 506k]
  ------------------
  817|      4|            if (state->havedict == 0) {
  ------------------
  |  Branch (817:17): [True: 4, False: 0]
  ------------------
  818|      4|                RESTORE();
  ------------------
  |  |  456|      4|    do { \
  |  |  457|      4|        strm->next_out = put; \
  |  |  458|      4|        strm->avail_out = left; \
  |  |  459|      4|        strm->next_in = next; \
  |  |  460|      4|        strm->avail_in = have; \
  |  |  461|      4|        state->hold = hold; \
  |  |  462|      4|        state->bits = bits; \
  |  |  463|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (463:14): [Folded, False: 4]
  |  |  ------------------
  ------------------
  819|      4|                return Z_NEED_DICT;
  ------------------
  |  |  179|      4|#define Z_NEED_DICT     2
  ------------------
  820|      4|            }
  821|      0|            strm->adler = state->check = adler32(0L, Z_NULL, 0);
  ------------------
  |  |  212|      0|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  822|      0|            state->mode = TYPE;
  823|       |                /* fallthrough */
  824|  15.6k|        case TYPE:
  ------------------
  |  Branch (824:9): [True: 15.6k, False: 490k]
  ------------------
  825|  15.6k|            if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  173|  31.2k|#define Z_BLOCK         5
  ------------------
                          if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  174|      0|#define Z_TREES         6
  ------------------
  |  Branch (825:17): [True: 15.6k, False: 0]
  |  Branch (825:37): [True: 0, False: 0]
  ------------------
  826|       |                /* fallthrough */
  827|  15.8k|        case TYPEDO:
  ------------------
  |  Branch (827:9): [True: 15.8k, False: 490k]
  ------------------
  828|  15.8k|            if (state->last) {
  ------------------
  |  Branch (828:17): [True: 146, False: 15.6k]
  ------------------
  829|    146|                BYTEBITS();
  ------------------
  |  |  503|    146|    do { \
  |  |  504|    146|        hold >>= bits & 7; \
  |  |  505|    146|        bits -= bits & 7; \
  |  |  506|    146|    } while (0)
  |  |  ------------------
  |  |  |  Branch (506:14): [Folded, False: 146]
  |  |  ------------------
  ------------------
  830|    146|                state->mode = CHECK;
  831|    146|                break;
  832|    146|            }
  833|  15.6k|            NEEDBITS(3);
  ------------------
  |  |  485|  15.6k|    do { \
  |  |  486|  17.4k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 1.81k, False: 15.6k]
  |  |  ------------------
  |  |  487|  15.6k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|  1.81k|    do { \
  |  |  |  |  476|  1.81k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 20, False: 1.79k]
  |  |  |  |  ------------------
  |  |  |  |  477|  1.81k|        have--; \
  |  |  |  |  478|  1.79k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|  1.79k|        bits += 8; \
  |  |  |  |  480|  1.79k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 1.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  834|  15.6k|            state->last = BITS(1);
  ------------------
  |  |  492|  15.6k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  835|  15.6k|            DROPBITS(1);
  ------------------
  |  |  496|  15.6k|    do { \
  |  |  497|  15.6k|        hold >>= (n); \
  |  |  498|  15.6k|        bits -= (unsigned)(n); \
  |  |  499|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  836|  15.6k|            switch (BITS(2)) {
  ------------------
  |  |  492|  15.6k|    ((unsigned)hold & ((1U << (n)) - 1))
  |  |  ------------------
  |  |  |  Branch (492:5): [True: 15.6k, False: 0]
  |  |  ------------------
  ------------------
  837|    121|            case 0:                             /* stored block */
  ------------------
  |  Branch (837:13): [True: 121, False: 15.5k]
  ------------------
  838|    121|                Tracev((stderr, "inflate:     stored block%s\n",
  839|    121|                        state->last ? " (last)" : ""));
  840|    121|                state->mode = STORED;
  841|    121|                break;
  842|  15.3k|            case 1:                             /* fixed block */
  ------------------
  |  Branch (842:13): [True: 15.3k, False: 280]
  ------------------
  843|  15.3k|                fixedtables(state);
  844|  15.3k|                Tracev((stderr, "inflate:     fixed codes block%s\n",
  845|  15.3k|                        state->last ? " (last)" : ""));
  846|  15.3k|                state->mode = LEN_;             /* decode codes */
  847|  15.3k|                if (flush == Z_TREES) {
  ------------------
  |  |  174|  15.3k|#define Z_TREES         6
  ------------------
  |  Branch (847:21): [True: 0, False: 15.3k]
  ------------------
  848|      0|                    DROPBITS(2);
  ------------------
  |  |  496|      0|    do { \
  |  |  497|      0|        hold >>= (n); \
  |  |  498|      0|        bits -= (unsigned)(n); \
  |  |  499|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
  849|      0|                    goto inf_leave;
  850|      0|                }
  851|  15.3k|                break;
  852|  15.3k|            case 2:                             /* dynamic block */
  ------------------
  |  Branch (852:13): [True: 150, False: 15.5k]
  ------------------
  853|    150|                Tracev((stderr, "inflate:     dynamic codes block%s\n",
  854|    150|                        state->last ? " (last)" : ""));
  855|    150|                state->mode = TABLE;
  856|    150|                break;
  857|      9|            case 3:
  ------------------
  |  Branch (857:13): [True: 9, False: 15.6k]
  ------------------
  858|      9|                strm->msg = (char *)"invalid block type";
  859|      9|                state->mode = BAD;
  860|  15.6k|            }
  861|  15.6k|            DROPBITS(2);
  ------------------
  |  |  496|  15.6k|    do { \
  |  |  497|  15.6k|        hold >>= (n); \
  |  |  498|  15.6k|        bits -= (unsigned)(n); \
  |  |  499|  15.6k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 15.6k]
  |  |  ------------------
  ------------------
  862|  15.6k|            break;
  863|    167|        case STORED:
  ------------------
  |  Branch (863:9): [True: 167, False: 506k]
  ------------------
  864|    167|            BYTEBITS();                         /* go to byte boundary */
  ------------------
  |  |  503|    167|    do { \
  |  |  504|    167|        hold >>= bits & 7; \
  |  |  505|    167|        bits -= bits & 7; \
  |  |  506|    167|    } while (0)
  |  |  ------------------
  |  |  |  Branch (506:14): [Folded, False: 167]
  |  |  ------------------
  ------------------
  865|    167|            NEEDBITS(32);
  ------------------
  |  |  485|    167|    do { \
  |  |  486|    620|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 510, False: 110]
  |  |  ------------------
  |  |  487|    510|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    510|    do { \
  |  |  |  |  476|    510|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 57, False: 453]
  |  |  |  |  ------------------
  |  |  |  |  477|    510|        have--; \
  |  |  |  |  478|    453|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    453|        bits += 8; \
  |  |  |  |  480|    453|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 453]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    167|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 110]
  |  |  ------------------
  ------------------
  866|    110|            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
  ------------------
  |  Branch (866:17): [True: 70, False: 40]
  ------------------
  867|     70|                strm->msg = (char *)"invalid stored block lengths";
  868|     70|                state->mode = BAD;
  869|     70|                break;
  870|     70|            }
  871|     40|            state->length = (unsigned)hold & 0xffff;
  872|     40|            Tracev((stderr, "inflate:       stored length %u\n",
  873|     40|                    state->length));
  874|     40|            INITBITS();
  ------------------
  |  |  467|     40|    do { \
  |  |  468|     40|        hold = 0; \
  |  |  469|     40|        bits = 0; \
  |  |  470|     40|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 40]
  |  |  ------------------
  ------------------
  875|     40|            state->mode = COPY_;
  876|     40|            if (flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  174|     40|#define Z_TREES         6
  ------------------
  |  Branch (876:17): [True: 0, False: 40]
  ------------------
  877|       |                /* fallthrough */
  878|     40|        case COPY_:
  ------------------
  |  Branch (878:9): [True: 0, False: 506k]
  ------------------
  879|     40|            state->mode = COPY;
  880|       |                /* fallthrough */
  881|  30.5k|        case COPY:
  ------------------
  |  Branch (881:9): [True: 30.5k, False: 475k]
  ------------------
  882|  30.5k|            copy = state->length;
  883|  30.5k|            if (copy) {
  ------------------
  |  Branch (883:17): [True: 30.5k, False: 17]
  ------------------
  884|  30.5k|                if (copy > have) copy = have;
  ------------------
  |  Branch (884:21): [True: 30.5k, False: 15]
  ------------------
  885|  30.5k|                if (copy > left) copy = left;
  ------------------
  |  Branch (885:21): [True: 0, False: 30.5k]
  ------------------
  886|  30.5k|                if (copy == 0) goto inf_leave;
  ------------------
  |  Branch (886:21): [True: 20.3k, False: 10.1k]
  ------------------
  887|  10.1k|                zmemcpy(put, next, copy);
  ------------------
  |  |  209|  10.1k|#    define zmemcpy memcpy
  ------------------
  888|  10.1k|                have -= copy;
  889|  10.1k|                next += copy;
  890|  10.1k|                left -= copy;
  891|  10.1k|                put += copy;
  892|  10.1k|                state->length -= copy;
  893|  10.1k|                break;
  894|  30.5k|            }
  895|     17|            Tracev((stderr, "inflate:       stored end\n"));
  896|     17|            state->mode = TYPE;
  897|     17|            break;
  898|    209|        case TABLE:
  ------------------
  |  Branch (898:9): [True: 209, False: 506k]
  ------------------
  899|    209|            NEEDBITS(14);
  ------------------
  |  |  485|    209|    do { \
  |  |  486|    478|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 329, False: 149]
  |  |  ------------------
  |  |  487|    329|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    329|    do { \
  |  |  |  |  476|    329|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 60, False: 269]
  |  |  |  |  ------------------
  |  |  |  |  477|    329|        have--; \
  |  |  |  |  478|    269|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    269|        bits += 8; \
  |  |  |  |  480|    269|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 269]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    209|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 149]
  |  |  ------------------
  ------------------
  900|    149|            state->nlen = BITS(5) + 257;
  ------------------
  |  |  492|    149|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  901|    149|            DROPBITS(5);
  ------------------
  |  |  496|    149|    do { \
  |  |  497|    149|        hold >>= (n); \
  |  |  498|    149|        bits -= (unsigned)(n); \
  |  |  499|    149|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 149]
  |  |  ------------------
  ------------------
  902|    149|            state->ndist = BITS(5) + 1;
  ------------------
  |  |  492|    149|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  903|    149|            DROPBITS(5);
  ------------------
  |  |  496|    149|    do { \
  |  |  497|    149|        hold >>= (n); \
  |  |  498|    149|        bits -= (unsigned)(n); \
  |  |  499|    149|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 149]
  |  |  ------------------
  ------------------
  904|    149|            state->ncode = BITS(4) + 4;
  ------------------
  |  |  492|    149|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  905|    149|            DROPBITS(4);
  ------------------
  |  |  496|    149|    do { \
  |  |  497|    149|        hold >>= (n); \
  |  |  498|    149|        bits -= (unsigned)(n); \
  |  |  499|    149|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 149]
  |  |  ------------------
  ------------------
  906|    149|#ifndef PKZIP_BUG_WORKAROUND
  907|    149|            if (state->nlen > 286 || state->ndist > 30) {
  ------------------
  |  Branch (907:17): [True: 1, False: 148]
  |  Branch (907:38): [True: 1, False: 147]
  ------------------
  908|      2|                strm->msg = (char *)"too many length or distance symbols";
  909|      2|                state->mode = BAD;
  910|      2|                break;
  911|      2|            }
  912|    147|#endif
  913|    147|            Tracev((stderr, "inflate:       table sizes ok\n"));
  914|    147|            state->have = 0;
  915|    147|            state->mode = LENLENS;
  916|       |                /* fallthrough */
  917|    201|        case LENLENS:
  ------------------
  |  Branch (917:9): [True: 54, False: 506k]
  ------------------
  918|  1.47k|            while (state->have < state->ncode) {
  ------------------
  |  Branch (918:20): [True: 1.33k, False: 141]
  ------------------
  919|  1.33k|                NEEDBITS(3);
  ------------------
  |  |  485|  1.33k|    do { \
  |  |  486|  1.76k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 495, False: 1.27k]
  |  |  ------------------
  |  |  487|  1.33k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    495|    do { \
  |  |  |  |  476|    495|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 60, False: 435]
  |  |  |  |  ------------------
  |  |  |  |  477|    495|        have--; \
  |  |  |  |  478|    435|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    435|        bits += 8; \
  |  |  |  |  480|    435|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 435]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|  1.33k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 1.27k]
  |  |  ------------------
  ------------------
  920|  1.27k|                state->lens[order[state->have++]] = (unsigned short)BITS(3);
  ------------------
  |  |  492|  1.27k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  921|  1.27k|                DROPBITS(3);
  ------------------
  |  |  496|  1.27k|    do { \
  |  |  497|  1.27k|        hold >>= (n); \
  |  |  498|  1.27k|        bits -= (unsigned)(n); \
  |  |  499|  1.27k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 1.27k]
  |  |  ------------------
  ------------------
  922|  1.27k|            }
  923|  1.57k|            while (state->have < 19)
  ------------------
  |  Branch (923:20): [True: 1.43k, False: 141]
  ------------------
  924|  1.43k|                state->lens[order[state->have++]] = 0;
  925|    141|            state->next = state->codes;
  926|    141|            state->lencode = (const code FAR *)(state->next);
  927|    141|            state->lenbits = 7;
  928|    141|            ret = inflate_table(CODES, state->lens, 19, &(state->next),
  929|    141|                                &(state->lenbits), state->work);
  930|    141|            if (ret) {
  ------------------
  |  Branch (930:17): [True: 40, False: 101]
  ------------------
  931|     40|                strm->msg = (char *)"invalid code lengths set";
  932|     40|                state->mode = BAD;
  933|     40|                break;
  934|     40|            }
  935|    101|            Tracev((stderr, "inflate:       code lengths ok\n"));
  936|    101|            state->have = 0;
  937|    101|            state->mode = CODELENS;
  938|       |                /* fallthrough */
  939|    572|        case CODELENS:
  ------------------
  |  Branch (939:9): [True: 471, False: 505k]
  ------------------
  940|  12.7k|            while (state->have < state->nlen + state->ndist) {
  ------------------
  |  Branch (940:20): [True: 12.6k, False: 47]
  ------------------
  941|  14.9k|                for (;;) {
  942|  14.9k|                    here = state->lencode[BITS(state->lenbits)];
  ------------------
  |  |  492|  14.9k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  943|  14.9k|                    if ((unsigned)(here.bits) <= bits) break;
  ------------------
  |  Branch (943:25): [True: 12.3k, False: 2.54k]
  ------------------
  944|  2.54k|                    PULLBYTE();
  ------------------
  |  |  475|  2.54k|    do { \
  |  |  476|  2.54k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 316, False: 2.22k]
  |  |  ------------------
  |  |  477|  2.54k|        have--; \
  |  |  478|  2.22k|        hold += (unsigned long)(*next++) << bits; \
  |  |  479|  2.22k|        bits += 8; \
  |  |  480|  2.22k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (480:14): [Folded, False: 2.22k]
  |  |  ------------------
  ------------------
  945|  2.54k|                }
  946|  12.3k|                if (here.val < 16) {
  ------------------
  |  Branch (946:21): [True: 11.1k, False: 1.26k]
  ------------------
  947|  11.1k|                    DROPBITS(here.bits);
  ------------------
  |  |  496|  11.1k|    do { \
  |  |  497|  11.1k|        hold >>= (n); \
  |  |  498|  11.1k|        bits -= (unsigned)(n); \
  |  |  499|  11.1k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 11.1k]
  |  |  ------------------
  ------------------
  948|  11.1k|                    state->lens[state->have++] = here.val;
  949|  11.1k|                }
  950|  1.26k|                else {
  951|  1.26k|                    if (here.val == 16) {
  ------------------
  |  Branch (951:25): [True: 512, False: 749]
  ------------------
  952|    512|                        NEEDBITS(here.bits + 2);
  ------------------
  |  |  485|    512|    do { \
  |  |  486|    681|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 203, False: 478]
  |  |  ------------------
  |  |  487|    512|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    203|    do { \
  |  |  |  |  476|    203|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 34, False: 169]
  |  |  |  |  ------------------
  |  |  |  |  477|    203|        have--; \
  |  |  |  |  478|    169|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    169|        bits += 8; \
  |  |  |  |  480|    169|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 169]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    512|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 478]
  |  |  ------------------
  ------------------
  953|    478|                        DROPBITS(here.bits);
  ------------------
  |  |  496|    478|    do { \
  |  |  497|    478|        hold >>= (n); \
  |  |  498|    478|        bits -= (unsigned)(n); \
  |  |  499|    478|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 478]
  |  |  ------------------
  ------------------
  954|    478|                        if (state->have == 0) {
  ------------------
  |  Branch (954:29): [True: 3, False: 475]
  ------------------
  955|      3|                            strm->msg = (char *)"invalid bit length repeat";
  956|      3|                            state->mode = BAD;
  957|      3|                            break;
  958|      3|                        }
  959|    475|                        len = state->lens[state->have - 1];
  960|    475|                        copy = 3 + BITS(2);
  ------------------
  |  |  492|    475|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  961|    475|                        DROPBITS(2);
  ------------------
  |  |  496|    475|    do { \
  |  |  497|    475|        hold >>= (n); \
  |  |  498|    475|        bits -= (unsigned)(n); \
  |  |  499|    475|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 475]
  |  |  ------------------
  ------------------
  962|    475|                    }
  963|    749|                    else if (here.val == 17) {
  ------------------
  |  Branch (963:30): [True: 504, False: 245]
  ------------------
  964|    504|                        NEEDBITS(here.bits + 3);
  ------------------
  |  |  485|    504|    do { \
  |  |  486|    698|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 286, False: 412]
  |  |  ------------------
  |  |  487|    504|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    286|    do { \
  |  |  |  |  476|    286|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 92, False: 194]
  |  |  |  |  ------------------
  |  |  |  |  477|    286|        have--; \
  |  |  |  |  478|    194|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    194|        bits += 8; \
  |  |  |  |  480|    194|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 194]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    504|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 412]
  |  |  ------------------
  ------------------
  965|    412|                        DROPBITS(here.bits);
  ------------------
  |  |  496|    412|    do { \
  |  |  497|    412|        hold >>= (n); \
  |  |  498|    412|        bits -= (unsigned)(n); \
  |  |  499|    412|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 412]
  |  |  ------------------
  ------------------
  966|    412|                        len = 0;
  967|    412|                        copy = 3 + BITS(3);
  ------------------
  |  |  492|    412|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  968|    412|                        DROPBITS(3);
  ------------------
  |  |  496|    412|    do { \
  |  |  497|    412|        hold >>= (n); \
  |  |  498|    412|        bits -= (unsigned)(n); \
  |  |  499|    412|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 412]
  |  |  ------------------
  ------------------
  969|    412|                    }
  970|    245|                    else {
  971|    245|                        NEEDBITS(here.bits + 7);
  ------------------
  |  |  485|    245|    do { \
  |  |  486|    405|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 206, False: 199]
  |  |  ------------------
  |  |  487|    245|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    206|    do { \
  |  |  |  |  476|    206|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 46, False: 160]
  |  |  |  |  ------------------
  |  |  |  |  477|    206|        have--; \
  |  |  |  |  478|    160|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    160|        bits += 8; \
  |  |  |  |  480|    160|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 160]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    245|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 199]
  |  |  ------------------
  ------------------
  972|    199|                        DROPBITS(here.bits);
  ------------------
  |  |  496|    199|    do { \
  |  |  497|    199|        hold >>= (n); \
  |  |  498|    199|        bits -= (unsigned)(n); \
  |  |  499|    199|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 199]
  |  |  ------------------
  ------------------
  973|    199|                        len = 0;
  974|    199|                        copy = 11 + BITS(7);
  ------------------
  |  |  492|    199|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
  975|    199|                        DROPBITS(7);
  ------------------
  |  |  496|    199|    do { \
  |  |  497|    199|        hold >>= (n); \
  |  |  498|    199|        bits -= (unsigned)(n); \
  |  |  499|    199|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 199]
  |  |  ------------------
  ------------------
  976|    199|                    }
  977|  1.08k|                    if (state->have + copy > state->nlen + state->ndist) {
  ------------------
  |  Branch (977:25): [True: 34, False: 1.05k]
  ------------------
  978|     34|                        strm->msg = (char *)"invalid bit length repeat";
  979|     34|                        state->mode = BAD;
  980|     34|                        break;
  981|     34|                    }
  982|  13.5k|                    while (copy--)
  ------------------
  |  Branch (982:28): [True: 12.4k, False: 1.05k]
  ------------------
  983|  12.4k|                        state->lens[state->have++] = (unsigned short)len;
  984|  1.05k|                }
  985|  12.3k|            }
  986|       |
  987|       |            /* handle error breaks in while */
  988|     84|            if (state->mode == BAD) break;
  ------------------
  |  Branch (988:17): [True: 37, False: 47]
  ------------------
  989|       |
  990|       |            /* check for end-of-block code (better have one) */
  991|     47|            if (state->lens[256] == 0) {
  ------------------
  |  Branch (991:17): [True: 13, False: 34]
  ------------------
  992|     13|                strm->msg = (char *)"invalid code -- missing end-of-block";
  993|     13|                state->mode = BAD;
  994|     13|                break;
  995|     13|            }
  996|       |
  997|       |            /* build code tables -- note: do not change the lenbits or distbits
  998|       |               values here (9 and 6) without reading the comments in inftrees.h
  999|       |               concerning the ENOUGH constants, which depend on those values */
 1000|     34|            state->next = state->codes;
 1001|     34|            state->lencode = (const code FAR *)(state->next);
 1002|     34|            state->lenbits = 9;
 1003|     34|            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
 1004|     34|                                &(state->lenbits), state->work);
 1005|     34|            if (ret) {
  ------------------
  |  Branch (1005:17): [True: 8, False: 26]
  ------------------
 1006|      8|                strm->msg = (char *)"invalid literal/lengths set";
 1007|      8|                state->mode = BAD;
 1008|      8|                break;
 1009|      8|            }
 1010|     26|            state->distcode = (const code FAR *)(state->next);
 1011|     26|            state->distbits = 6;
 1012|     26|            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
 1013|     26|                            &(state->next), &(state->distbits), state->work);
 1014|     26|            if (ret) {
  ------------------
  |  Branch (1014:17): [True: 6, False: 20]
  ------------------
 1015|      6|                strm->msg = (char *)"invalid distances set";
 1016|      6|                state->mode = BAD;
 1017|      6|                break;
 1018|      6|            }
 1019|     20|            Tracev((stderr, "inflate:       codes ok\n"));
 1020|     20|            state->mode = LEN_;
 1021|     20|            if (flush == Z_TREES) goto inf_leave;
  ------------------
  |  |  174|     20|#define Z_TREES         6
  ------------------
  |  Branch (1021:17): [True: 0, False: 20]
  ------------------
 1022|       |                /* fallthrough */
 1023|  15.3k|        case LEN_:
  ------------------
  |  Branch (1023:9): [True: 15.3k, False: 491k]
  ------------------
 1024|  15.3k|            state->mode = LEN;
 1025|       |                /* fallthrough */
 1026|   324k|        case LEN:
  ------------------
  |  Branch (1026:9): [True: 309k, False: 197k]
  ------------------
 1027|   324k|            if (have >= 6 && left >= 258) {
  ------------------
  |  Branch (1027:17): [True: 24.8k, False: 299k]
  |  Branch (1027:30): [True: 18.7k, False: 6.06k]
  ------------------
 1028|  18.7k|                RESTORE();
  ------------------
  |  |  456|  18.7k|    do { \
  |  |  457|  18.7k|        strm->next_out = put; \
  |  |  458|  18.7k|        strm->avail_out = left; \
  |  |  459|  18.7k|        strm->next_in = next; \
  |  |  460|  18.7k|        strm->avail_in = have; \
  |  |  461|  18.7k|        state->hold = hold; \
  |  |  462|  18.7k|        state->bits = bits; \
  |  |  463|  18.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (463:14): [Folded, False: 18.7k]
  |  |  ------------------
  ------------------
 1029|  18.7k|                inflate_fast(strm, out);
 1030|  18.7k|                LOAD();
  ------------------
  |  |  445|  18.7k|    do { \
  |  |  446|  18.7k|        put = strm->next_out; \
  |  |  447|  18.7k|        left = strm->avail_out; \
  |  |  448|  18.7k|        next = strm->next_in; \
  |  |  449|  18.7k|        have = strm->avail_in; \
  |  |  450|  18.7k|        hold = state->hold; \
  |  |  451|  18.7k|        bits = state->bits; \
  |  |  452|  18.7k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (452:14): [Folded, False: 18.7k]
  |  |  ------------------
  ------------------
 1031|  18.7k|                if (state->mode == TYPE)
  ------------------
  |  Branch (1031:21): [True: 14.5k, False: 4.24k]
  ------------------
 1032|  14.5k|                    state->back = -1;
 1033|  18.7k|                break;
 1034|  18.7k|            }
 1035|   305k|            state->back = 0;
 1036|   415k|            for (;;) {
 1037|   415k|                here = state->lencode[BITS(state->lenbits)];
  ------------------
  |  |  492|   415k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1038|   415k|                if ((unsigned)(here.bits) <= bits) break;
  ------------------
  |  Branch (1038:21): [True: 110k, False: 305k]
  ------------------
 1039|   305k|                PULLBYTE();
  ------------------
  |  |  475|   305k|    do { \
  |  |  476|   305k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 195k, False: 109k]
  |  |  ------------------
  |  |  477|   305k|        have--; \
  |  |  478|   109k|        hold += (unsigned long)(*next++) << bits; \
  |  |  479|   109k|        bits += 8; \
  |  |  480|   109k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (480:14): [Folded, False: 109k]
  |  |  ------------------
  ------------------
 1040|   305k|            }
 1041|   110k|            if (here.op && (here.op & 0xf0) == 0) {
  ------------------
  |  Branch (1041:17): [True: 7.56k, False: 102k]
  |  Branch (1041:28): [True: 149, False: 7.41k]
  ------------------
 1042|    149|                last = here;
 1043|    202|                for (;;) {
 1044|    202|                    here = state->lencode[last.val +
 1045|    202|                            (BITS(last.bits + last.op) >> last.bits)];
  ------------------
  |  |  492|    202|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1046|    202|                    if ((unsigned)(last.bits + here.bits) <= bits) break;
  ------------------
  |  Branch (1046:25): [True: 117, False: 85]
  ------------------
 1047|     85|                    PULLBYTE();
  ------------------
  |  |  475|     85|    do { \
  |  |  476|     85|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 32, False: 53]
  |  |  ------------------
  |  |  477|     85|        have--; \
  |  |  478|     53|        hold += (unsigned long)(*next++) << bits; \
  |  |  479|     53|        bits += 8; \
  |  |  480|     53|    } while (0)
  |  |  ------------------
  |  |  |  Branch (480:14): [Folded, False: 53]
  |  |  ------------------
  ------------------
 1048|     85|                }
 1049|    117|                DROPBITS(last.bits);
  ------------------
  |  |  496|    117|    do { \
  |  |  497|    117|        hold >>= (n); \
  |  |  498|    117|        bits -= (unsigned)(n); \
  |  |  499|    117|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 117]
  |  |  ------------------
  ------------------
 1050|    117|                state->back += last.bits;
 1051|    117|            }
 1052|   110k|            DROPBITS(here.bits);
  ------------------
  |  |  496|   110k|    do { \
  |  |  497|   110k|        hold >>= (n); \
  |  |  498|   110k|        bits -= (unsigned)(n); \
  |  |  499|   110k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 110k]
  |  |  ------------------
  ------------------
 1053|   110k|            state->back += here.bits;
 1054|   110k|            state->length = (unsigned)here.val;
 1055|   110k|            if ((int)(here.op) == 0) {
  ------------------
  |  Branch (1055:17): [True: 102k, False: 7.41k]
  ------------------
 1056|   102k|                Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
 1057|   102k|                        "inflate:         literal '%c'\n" :
 1058|   102k|                        "inflate:         literal 0x%02x\n", here.val));
 1059|   102k|                state->mode = LIT;
 1060|   102k|                break;
 1061|   102k|            }
 1062|  7.41k|            if (here.op & 32) {
  ------------------
  |  Branch (1062:17): [True: 342, False: 7.07k]
  ------------------
 1063|    342|                Tracevv((stderr, "inflate:         end of block\n"));
 1064|    342|                state->back = -1;
 1065|    342|                state->mode = TYPE;
 1066|    342|                break;
 1067|    342|            }
 1068|  7.07k|            if (here.op & 64) {
  ------------------
  |  Branch (1068:17): [True: 15, False: 7.05k]
  ------------------
 1069|     15|                strm->msg = (char *)"invalid literal/length code";
 1070|     15|                state->mode = BAD;
 1071|     15|                break;
 1072|     15|            }
 1073|  7.05k|            state->extra = (unsigned)(here.op) & 15;
 1074|  7.05k|            state->mode = LENEXT;
 1075|       |                /* fallthrough */
 1076|  7.50k|        case LENEXT:
  ------------------
  |  Branch (1076:9): [True: 443, False: 505k]
  ------------------
 1077|  7.50k|            if (state->extra) {
  ------------------
  |  Branch (1077:17): [True: 4.11k, False: 3.38k]
  ------------------
 1078|  4.11k|                NEEDBITS(state->extra);
  ------------------
  |  |  485|  4.11k|    do { \
  |  |  486|  5.20k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 1.56k, False: 3.64k]
  |  |  ------------------
  |  |  487|  4.11k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|  1.56k|    do { \
  |  |  |  |  476|  1.56k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 474, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |  477|  1.56k|        have--; \
  |  |  |  |  478|  1.08k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|  1.08k|        bits += 8; \
  |  |  |  |  480|  1.08k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|  4.11k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
 1079|  3.64k|                state->length += BITS(state->extra);
  ------------------
  |  |  492|  3.64k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1080|  3.64k|                DROPBITS(state->extra);
  ------------------
  |  |  496|  3.64k|    do { \
  |  |  497|  3.64k|        hold >>= (n); \
  |  |  498|  3.64k|        bits -= (unsigned)(n); \
  |  |  499|  3.64k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 3.64k]
  |  |  ------------------
  ------------------
 1081|  3.64k|                state->back += state->extra;
 1082|  3.64k|            }
 1083|  7.02k|            Tracevv((stderr, "inflate:         length %u\n", state->length));
 1084|  7.02k|            state->was = state->length;
 1085|  7.02k|            state->mode = DIST;
 1086|       |                /* fallthrough */
 1087|  9.91k|        case DIST:
  ------------------
  |  Branch (1087:9): [True: 2.89k, False: 503k]
  ------------------
 1088|  14.4k|            for (;;) {
 1089|  14.4k|                here = state->distcode[BITS(state->distbits)];
  ------------------
  |  |  492|  14.4k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1090|  14.4k|                if ((unsigned)(here.bits) <= bits) break;
  ------------------
  |  Branch (1090:21): [True: 6.98k, False: 7.49k]
  ------------------
 1091|  7.49k|                PULLBYTE();
  ------------------
  |  |  475|  7.49k|    do { \
  |  |  476|  7.49k|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 2.93k, False: 4.56k]
  |  |  ------------------
  |  |  477|  7.49k|        have--; \
  |  |  478|  4.56k|        hold += (unsigned long)(*next++) << bits; \
  |  |  479|  4.56k|        bits += 8; \
  |  |  480|  4.56k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (480:14): [Folded, False: 4.56k]
  |  |  ------------------
  ------------------
 1092|  7.49k|            }
 1093|  6.98k|            if ((here.op & 0xf0) == 0) {
  ------------------
  |  Branch (1093:17): [True: 0, False: 6.98k]
  ------------------
 1094|      0|                last = here;
 1095|      0|                for (;;) {
 1096|      0|                    here = state->distcode[last.val +
 1097|      0|                            (BITS(last.bits + last.op) >> last.bits)];
  ------------------
  |  |  492|      0|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1098|      0|                    if ((unsigned)(last.bits + here.bits) <= bits) break;
  ------------------
  |  Branch (1098:25): [True: 0, False: 0]
  ------------------
 1099|      0|                    PULLBYTE();
  ------------------
  |  |  475|      0|    do { \
  |  |  476|      0|        if (have == 0) goto inf_leave; \
  |  |  ------------------
  |  |  |  Branch (476:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  477|      0|        have--; \
  |  |  478|      0|        hold += (unsigned long)(*next++) << bits; \
  |  |  479|      0|        bits += 8; \
  |  |  480|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (480:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1100|      0|                }
 1101|      0|                DROPBITS(last.bits);
  ------------------
  |  |  496|      0|    do { \
  |  |  497|      0|        hold >>= (n); \
  |  |  498|      0|        bits -= (unsigned)(n); \
  |  |  499|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 0]
  |  |  ------------------
  ------------------
 1102|      0|                state->back += last.bits;
 1103|      0|            }
 1104|  6.98k|            DROPBITS(here.bits);
  ------------------
  |  |  496|  6.98k|    do { \
  |  |  497|  6.98k|        hold >>= (n); \
  |  |  498|  6.98k|        bits -= (unsigned)(n); \
  |  |  499|  6.98k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 6.98k]
  |  |  ------------------
  ------------------
 1105|  6.98k|            state->back += here.bits;
 1106|  6.98k|            if (here.op & 64) {
  ------------------
  |  Branch (1106:17): [True: 6, False: 6.97k]
  ------------------
 1107|      6|                strm->msg = (char *)"invalid distance code";
 1108|      6|                state->mode = BAD;
 1109|      6|                break;
 1110|      6|            }
 1111|  6.97k|            state->offset = (unsigned)here.val;
 1112|  6.97k|            state->extra = (unsigned)(here.op) & 15;
 1113|  6.97k|            state->mode = DISTEXT;
 1114|       |                /* fallthrough */
 1115|  8.82k|        case DISTEXT:
  ------------------
  |  Branch (1115:9): [True: 1.84k, False: 504k]
  ------------------
 1116|  8.82k|            if (state->extra) {
  ------------------
  |  Branch (1116:17): [True: 7.03k, False: 1.78k]
  ------------------
 1117|  7.03k|                NEEDBITS(state->extra);
  ------------------
  |  |  485|  7.03k|    do { \
  |  |  486|  11.0k|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 5.90k, False: 5.12k]
  |  |  ------------------
  |  |  487|  7.03k|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|  5.90k|    do { \
  |  |  |  |  476|  5.90k|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 1.90k, False: 3.99k]
  |  |  |  |  ------------------
  |  |  |  |  477|  5.90k|        have--; \
  |  |  |  |  478|  3.99k|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|  3.99k|        bits += 8; \
  |  |  |  |  480|  3.99k|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 3.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|  7.03k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 5.12k]
  |  |  ------------------
  ------------------
 1118|  5.12k|                state->offset += BITS(state->extra);
  ------------------
  |  |  492|  5.12k|    ((unsigned)hold & ((1U << (n)) - 1))
  ------------------
 1119|  5.12k|                DROPBITS(state->extra);
  ------------------
  |  |  496|  5.12k|    do { \
  |  |  497|  5.12k|        hold >>= (n); \
  |  |  498|  5.12k|        bits -= (unsigned)(n); \
  |  |  499|  5.12k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (499:14): [Folded, False: 5.12k]
  |  |  ------------------
  ------------------
 1120|  5.12k|                state->back += state->extra;
 1121|  5.12k|            }
 1122|       |#ifdef INFLATE_STRICT
 1123|       |            if (state->offset > state->dmax) {
 1124|       |                strm->msg = (char *)"invalid distance too far back";
 1125|       |                state->mode = BAD;
 1126|       |                break;
 1127|       |            }
 1128|       |#endif
 1129|  6.91k|            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
 1130|  6.91k|            state->mode = MATCH;
 1131|       |                /* fallthrough */
 1132|  11.0k|        case MATCH:
  ------------------
  |  Branch (1132:9): [True: 4.11k, False: 502k]
  ------------------
 1133|  11.0k|            if (left == 0) goto inf_leave;
  ------------------
  |  Branch (1133:17): [True: 1.11k, False: 9.91k]
  ------------------
 1134|  9.91k|            copy = out - left;
 1135|  9.91k|            if (state->offset > copy) {         /* copy from window */
  ------------------
  |  Branch (1135:17): [True: 3.94k, False: 5.96k]
  ------------------
 1136|  3.94k|                copy = state->offset - copy;
 1137|  3.94k|                if (copy > state->whave) {
  ------------------
  |  Branch (1137:21): [True: 34, False: 3.91k]
  ------------------
 1138|     34|                    if (state->sane) {
  ------------------
  |  Branch (1138:25): [True: 34, False: 0]
  ------------------
 1139|     34|                        strm->msg = (char *)"invalid distance too far back";
 1140|     34|                        state->mode = BAD;
 1141|     34|                        break;
 1142|     34|                    }
 1143|       |#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
 1144|       |                    Trace((stderr, "inflate.c too far\n"));
 1145|       |                    copy -= state->whave;
 1146|       |                    if (copy > state->length) copy = state->length;
 1147|       |                    if (copy > left) copy = left;
 1148|       |                    left -= copy;
 1149|       |                    state->length -= copy;
 1150|       |                    do {
 1151|       |                        *put++ = 0;
 1152|       |                    } while (--copy);
 1153|       |                    if (state->length == 0) state->mode = LEN;
 1154|       |                    break;
 1155|       |#endif
 1156|     34|                }
 1157|  3.91k|                if (copy > state->wnext) {
  ------------------
  |  Branch (1157:21): [True: 544, False: 3.37k]
  ------------------
 1158|    544|                    copy -= state->wnext;
 1159|    544|                    from = state->window + (state->wsize - copy);
 1160|    544|                }
 1161|  3.37k|                else
 1162|  3.37k|                    from = state->window + (state->wnext - copy);
 1163|  3.91k|                if (copy > state->length) copy = state->length;
  ------------------
  |  Branch (1163:21): [True: 1.97k, False: 1.94k]
  ------------------
 1164|  3.91k|            }
 1165|  5.96k|            else {                              /* copy from output */
 1166|  5.96k|                from = put - state->offset;
 1167|  5.96k|                copy = state->length;
 1168|  5.96k|            }
 1169|  9.87k|            if (copy > left) copy = left;
  ------------------
  |  Branch (1169:17): [True: 1.10k, False: 8.77k]
  ------------------
 1170|  9.87k|            left -= copy;
 1171|  9.87k|            state->length -= copy;
 1172|   474k|            do {
 1173|   474k|                *put++ = *from++;
 1174|   474k|            } while (--copy);
  ------------------
  |  Branch (1174:22): [True: 465k, False: 9.87k]
  ------------------
 1175|  9.87k|            if (state->length == 0) state->mode = LEN;
  ------------------
  |  Branch (1175:17): [True: 6.87k, False: 3.00k]
  ------------------
 1176|  9.87k|            break;
 1177|   103k|        case LIT:
  ------------------
  |  Branch (1177:9): [True: 103k, False: 403k]
  ------------------
 1178|   103k|            if (left == 0) goto inf_leave;
  ------------------
  |  Branch (1178:17): [True: 66, False: 102k]
  ------------------
 1179|   102k|            *put++ = (unsigned char)(state->length);
 1180|   102k|            left--;
 1181|   102k|            state->mode = LEN;
 1182|   102k|            break;
 1183|    207|        case CHECK:
  ------------------
  |  Branch (1183:9): [True: 207, False: 506k]
  ------------------
 1184|    207|            if (state->wrap) {
  ------------------
  |  Branch (1184:17): [True: 183, False: 24]
  ------------------
 1185|    183|                NEEDBITS(32);
  ------------------
  |  |  485|    183|    do { \
  |  |  486|    599|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 500, False: 99]
  |  |  ------------------
  |  |  487|    500|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    500|    do { \
  |  |  |  |  476|    500|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 84, False: 416]
  |  |  |  |  ------------------
  |  |  |  |  477|    500|        have--; \
  |  |  |  |  478|    416|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|    416|        bits += 8; \
  |  |  |  |  480|    416|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 416]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|    183|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 99]
  |  |  ------------------
  ------------------
 1186|     99|                out -= left;
 1187|     99|                strm->total_out += out;
 1188|     99|                state->total += out;
 1189|     99|                if ((state->wrap & 4) && out)
  ------------------
  |  Branch (1189:21): [True: 99, False: 0]
  |  Branch (1189:42): [True: 0, False: 99]
  ------------------
 1190|      0|                    strm->adler = state->check =
 1191|      0|                        UPDATE_CHECK(state->check, put - out, out);
  ------------------
  |  |  419|      0|    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
  |  |  ------------------
  |  |  |  Branch (419:6): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1192|     99|                out = left;
 1193|     99|                if ((state->wrap & 4) && (
  ------------------
  |  Branch (1193:21): [True: 99, False: 0]
  |  Branch (1193:42): [True: 76, False: 23]
  ------------------
 1194|     99|#ifdef GUNZIP
 1195|     99|                     state->flags ? hold :
  ------------------
  |  Branch (1195:22): [True: 33, False: 66]
  ------------------
 1196|     99|#endif
 1197|     99|                     ZSWAP32(hold)) != state->check) {
  ------------------
  |  |  251|     66|#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
  |  |  252|     66|                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
  ------------------
 1198|     76|                    strm->msg = (char *)"incorrect data check";
 1199|     76|                    state->mode = BAD;
 1200|     76|                    break;
 1201|     76|                }
 1202|     23|                INITBITS();
  ------------------
  |  |  467|     23|    do { \
  |  |  468|     23|        hold = 0; \
  |  |  469|     23|        bits = 0; \
  |  |  470|     23|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 23]
  |  |  ------------------
  ------------------
 1203|     23|                Tracev((stderr, "inflate:   check matches trailer\n"));
 1204|     23|            }
 1205|     47|#ifdef GUNZIP
 1206|     47|            state->mode = LENGTH;
 1207|       |                /* fallthrough */
 1208|     58|        case LENGTH:
  ------------------
  |  Branch (1208:9): [True: 11, False: 506k]
  ------------------
 1209|     58|            if (state->wrap && state->flags) {
  ------------------
  |  Branch (1209:17): [True: 34, False: 24]
  |  Branch (1209:32): [True: 34, False: 0]
  ------------------
 1210|     34|                NEEDBITS(32);
  ------------------
  |  |  485|     34|    do { \
  |  |  486|    120|        while (bits < (unsigned)(n)) \
  |  |  ------------------
  |  |  |  Branch (486:16): [True: 100, False: 20]
  |  |  ------------------
  |  |  487|    100|            PULLBYTE(); \
  |  |  ------------------
  |  |  |  |  475|    100|    do { \
  |  |  |  |  476|    100|        if (have == 0) goto inf_leave; \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (476:13): [True: 14, False: 86]
  |  |  |  |  ------------------
  |  |  |  |  477|    100|        have--; \
  |  |  |  |  478|     86|        hold += (unsigned long)(*next++) << bits; \
  |  |  |  |  479|     86|        bits += 8; \
  |  |  |  |  480|     86|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (480:14): [Folded, False: 86]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  488|     34|    } while (0)
  |  |  ------------------
  |  |  |  Branch (488:14): [Folded, False: 20]
  |  |  ------------------
  ------------------
 1211|     20|                if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) {
  ------------------
  |  Branch (1211:21): [True: 20, False: 0]
  |  Branch (1211:42): [True: 18, False: 2]
  ------------------
 1212|     18|                    strm->msg = (char *)"incorrect length check";
 1213|     18|                    state->mode = BAD;
 1214|     18|                    break;
 1215|     18|                }
 1216|      2|                INITBITS();
  ------------------
  |  |  467|      2|    do { \
  |  |  468|      2|        hold = 0; \
  |  |  469|      2|        bits = 0; \
  |  |  470|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (470:14): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1217|      2|                Tracev((stderr, "inflate:   length matches trailer\n"));
 1218|      2|            }
 1219|     26|#endif
 1220|     26|            state->mode = DONE;
 1221|       |                /* fallthrough */
 1222|     26|        case DONE:
  ------------------
  |  Branch (1222:9): [True: 0, False: 506k]
  ------------------
 1223|     26|            ret = Z_STREAM_END;
  ------------------
  |  |  178|     26|#define Z_STREAM_END    1
  ------------------
 1224|     26|            goto inf_leave;
 1225|    617|        case BAD:
  ------------------
  |  Branch (1225:9): [True: 617, False: 505k]
  ------------------
 1226|    617|            ret = Z_DATA_ERROR;
  ------------------
  |  |  182|    617|#define Z_DATA_ERROR   (-3)
  ------------------
 1227|    617|            goto inf_leave;
 1228|      0|        case MEM:
  ------------------
  |  Branch (1228:9): [True: 0, False: 506k]
  ------------------
 1229|      0|            return Z_MEM_ERROR;
  ------------------
  |  |  183|      0|#define Z_MEM_ERROR    (-4)
  ------------------
 1230|      0|        case SYNC:
  ------------------
  |  Branch (1230:9): [True: 0, False: 506k]
  ------------------
 1231|       |                /* fallthrough */
 1232|      0|        default:
  ------------------
  |  Branch (1232:9): [True: 0, False: 506k]
  ------------------
 1233|      0|            return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1234|   506k|        }
 1235|       |
 1236|       |    /*
 1237|       |       Return from inflate(), updating the total counts and the check value.
 1238|       |       If there was no progress during the inflate() call, return a buffer
 1239|       |       error.  Call updatewindow() to create and/or update the window state.
 1240|       |       Note: a memory error from inflate() is non-recoverable.
 1241|       |     */
 1242|   243k|  inf_leave:
 1243|   243k|    RESTORE();
  ------------------
  |  |  456|   243k|    do { \
  |  |  457|   243k|        strm->next_out = put; \
  |  |  458|   243k|        strm->avail_out = left; \
  |  |  459|   243k|        strm->next_in = next; \
  |  |  460|   243k|        strm->avail_in = have; \
  |  |  461|   243k|        state->hold = hold; \
  |  |  462|   243k|        state->bits = bits; \
  |  |  463|   243k|    } while (0)
  |  |  ------------------
  |  |  |  Branch (463:14): [Folded, False: 243k]
  |  |  ------------------
  ------------------
 1244|   243k|    if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
  ------------------
  |  Branch (1244:9): [True: 236k, False: 7.22k]
  |  Branch (1244:26): [True: 772, False: 6.44k]
  |  Branch (1244:52): [True: 737, False: 35]
  ------------------
 1245|    737|            (state->mode < CHECK || flush != Z_FINISH)))
  ------------------
  |  |  172|      0|#define Z_FINISH        4
  ------------------
  |  Branch (1245:14): [True: 737, False: 0]
  |  Branch (1245:37): [True: 0, False: 0]
  ------------------
 1246|   237k|        if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
  ------------------
  |  Branch (1246:13): [True: 0, False: 237k]
  ------------------
 1247|      0|            state->mode = MEM;
 1248|      0|            return Z_MEM_ERROR;
  ------------------
  |  |  183|      0|#define Z_MEM_ERROR    (-4)
  ------------------
 1249|      0|        }
 1250|   243k|    in -= strm->avail_in;
 1251|   243k|    out -= strm->avail_out;
 1252|   243k|    strm->total_in += in;
 1253|   243k|    strm->total_out += out;
 1254|   243k|    state->total += out;
 1255|   243k|    if ((state->wrap & 4) && out)
  ------------------
  |  Branch (1255:9): [True: 218k, False: 25.0k]
  |  Branch (1255:30): [True: 110k, False: 108k]
  ------------------
 1256|   110k|        strm->adler = state->check =
 1257|   110k|            UPDATE_CHECK(state->check, strm->next_out - out, out);
  ------------------
  |  |  419|   110k|    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
  |  |  ------------------
  |  |  |  Branch (419:6): [True: 434, False: 110k]
  |  |  ------------------
  ------------------
 1258|   243k|    strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
  ------------------
  |  Branch (1258:43): [True: 195k, False: 48.5k]
  ------------------
 1259|   243k|                      (state->mode == TYPE ? 128 : 0) +
  ------------------
  |  Branch (1259:24): [True: 15.6k, False: 228k]
  ------------------
 1260|   243k|                      (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
  ------------------
  |  Branch (1260:24): [True: 0, False: 243k]
  |  Branch (1260:47): [True: 0, False: 243k]
  ------------------
 1261|   243k|    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
  ------------------
  |  |  172|   130k|#define Z_FINISH        4
  ------------------
                  if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
  ------------------
  |  |  177|   113k|#define Z_OK            0
  ------------------
  |  Branch (1261:11): [True: 113k, False: 130k]
  |  Branch (1261:22): [True: 113k, False: 7]
  |  Branch (1261:35): [True: 0, False: 130k]
  |  Branch (1261:57): [True: 113k, False: 25]
  ------------------
 1262|   113k|        ret = Z_BUF_ERROR;
  ------------------
  |  |  184|   113k|#define Z_BUF_ERROR    (-5)
  ------------------
 1263|   243k|    return ret;
 1264|   243k|}
inflateEnd:
 1266|  1.17k|int ZEXPORT inflateEnd(z_streamp strm) {
 1267|  1.17k|    struct inflate_state FAR *state;
 1268|  1.17k|    if (inflateStateCheck(strm))
  ------------------
  |  Branch (1268:9): [True: 0, False: 1.17k]
  ------------------
 1269|      0|        return Z_STREAM_ERROR;
  ------------------
  |  |  181|      0|#define Z_STREAM_ERROR (-2)
  ------------------
 1270|  1.17k|    state = (struct inflate_state FAR *)strm->state;
 1271|  1.17k|    if (state->window != Z_NULL) ZFREE(strm, state->window);
  ------------------
  |  |  212|  1.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
                  if (state->window != Z_NULL) ZFREE(strm, state->window);
  ------------------
  |  |  247|    737|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
  |  Branch (1271:9): [True: 737, False: 434]
  ------------------
 1272|  1.17k|    ZFREE(strm, strm->state);
  ------------------
  |  |  247|  1.17k|#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
  ------------------
 1273|  1.17k|    strm->state = Z_NULL;
  ------------------
  |  |  212|  1.17k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
 1274|  1.17k|    Tracev((stderr, "inflate: end\n"));
 1275|  1.17k|    return Z_OK;
  ------------------
  |  |  177|  1.17k|#define Z_OK            0
  ------------------
 1276|  1.17k|}
inflate.c:inflateStateCheck:
   94|   249k|local int inflateStateCheck(z_streamp strm) {
   95|   249k|    struct inflate_state FAR *state;
   96|   249k|    if (strm == Z_NULL ||
  ------------------
  |  |  212|   498k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (96:9): [True: 0, False: 249k]
  ------------------
   97|   249k|        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
  ------------------
  |  Branch (97:9): [True: 0, False: 249k]
  |  Branch (97:42): [True: 0, False: 249k]
  ------------------
   98|      0|        return 1;
   99|   249k|    state = (struct inflate_state FAR *)strm->state;
  100|   249k|    if (state == Z_NULL || state->strm != strm ||
  ------------------
  |  |  212|   498k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (100:9): [True: 0, False: 249k]
  |  Branch (100:28): [True: 0, False: 249k]
  ------------------
  101|   249k|        state->mode < HEAD || state->mode > SYNC)
  ------------------
  |  Branch (101:9): [True: 0, False: 249k]
  |  Branch (101:31): [True: 0, False: 249k]
  ------------------
  102|      0|        return 1;
  103|   249k|    return 0;
  104|   249k|}
inflate.c:fixedtables:
  252|  15.3k|local void fixedtables(struct inflate_state FAR *state) {
  253|       |#ifdef BUILDFIXED
  254|       |    static int virgin = 1;
  255|       |    static code *lenfix, *distfix;
  256|       |    static code fixed[544];
  257|       |
  258|       |    /* build fixed huffman tables if first call (may not be thread safe) */
  259|       |    if (virgin) {
  260|       |        unsigned sym, bits;
  261|       |        static code *next;
  262|       |
  263|       |        /* literal/length table */
  264|       |        sym = 0;
  265|       |        while (sym < 144) state->lens[sym++] = 8;
  266|       |        while (sym < 256) state->lens[sym++] = 9;
  267|       |        while (sym < 280) state->lens[sym++] = 7;
  268|       |        while (sym < 288) state->lens[sym++] = 8;
  269|       |        next = fixed;
  270|       |        lenfix = next;
  271|       |        bits = 9;
  272|       |        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
  273|       |
  274|       |        /* distance table */
  275|       |        sym = 0;
  276|       |        while (sym < 32) state->lens[sym++] = 5;
  277|       |        distfix = next;
  278|       |        bits = 5;
  279|       |        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
  280|       |
  281|       |        /* do this just once */
  282|       |        virgin = 0;
  283|       |    }
  284|       |#else /* !BUILDFIXED */
  285|  15.3k|#   include "inffixed.h"
  ------------------
  |  |    1|       |    /* inffixed.h -- table for decoding fixed codes
  |  |    2|       |     * Generated automatically by makefixed().
  |  |    3|       |     */
  |  |    4|       |
  |  |    5|       |    /* WARNING: this file should *not* be used by applications.
  |  |    6|       |       It is part of the implementation of this library and is
  |  |    7|       |       subject to change. Applications should only use zlib.h.
  |  |    8|       |     */
  |  |    9|       |
  |  |   10|  15.3k|    static const code lenfix[512] = {
  |  |   11|  15.3k|        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
  |  |   12|  15.3k|        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
  |  |   13|  15.3k|        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
  |  |   14|  15.3k|        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
  |  |   15|  15.3k|        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
  |  |   16|  15.3k|        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
  |  |   17|  15.3k|        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
  |  |   18|  15.3k|        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
  |  |   19|  15.3k|        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
  |  |   20|  15.3k|        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
  |  |   21|  15.3k|        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
  |  |   22|  15.3k|        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
  |  |   23|  15.3k|        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
  |  |   24|  15.3k|        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
  |  |   25|  15.3k|        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
  |  |   26|  15.3k|        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
  |  |   27|  15.3k|        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
  |  |   28|  15.3k|        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
  |  |   29|  15.3k|        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
  |  |   30|  15.3k|        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
  |  |   31|  15.3k|        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
  |  |   32|  15.3k|        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
  |  |   33|  15.3k|        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
  |  |   34|  15.3k|        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
  |  |   35|  15.3k|        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
  |  |   36|  15.3k|        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
  |  |   37|  15.3k|        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
  |  |   38|  15.3k|        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
  |  |   39|  15.3k|        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
  |  |   40|  15.3k|        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
  |  |   41|  15.3k|        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
  |  |   42|  15.3k|        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
  |  |   43|  15.3k|        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
  |  |   44|  15.3k|        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
  |  |   45|  15.3k|        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
  |  |   46|  15.3k|        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
  |  |   47|  15.3k|        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
  |  |   48|  15.3k|        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
  |  |   49|  15.3k|        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
  |  |   50|  15.3k|        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
  |  |   51|  15.3k|        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
  |  |   52|  15.3k|        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
  |  |   53|  15.3k|        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
  |  |   54|  15.3k|        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
  |  |   55|  15.3k|        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
  |  |   56|  15.3k|        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
  |  |   57|  15.3k|        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
  |  |   58|  15.3k|        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
  |  |   59|  15.3k|        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
  |  |   60|  15.3k|        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
  |  |   61|  15.3k|        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
  |  |   62|  15.3k|        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
  |  |   63|  15.3k|        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
  |  |   64|  15.3k|        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
  |  |   65|  15.3k|        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
  |  |   66|  15.3k|        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
  |  |   67|  15.3k|        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
  |  |   68|  15.3k|        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
  |  |   69|  15.3k|        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
  |  |   70|  15.3k|        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
  |  |   71|  15.3k|        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
  |  |   72|  15.3k|        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
  |  |   73|  15.3k|        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
  |  |   74|  15.3k|        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
  |  |   75|  15.3k|        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
  |  |   76|  15.3k|        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
  |  |   77|  15.3k|        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
  |  |   78|  15.3k|        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
  |  |   79|  15.3k|        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
  |  |   80|  15.3k|        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
  |  |   81|  15.3k|        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
  |  |   82|  15.3k|        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
  |  |   83|  15.3k|        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
  |  |   84|  15.3k|        {0,9,255}
  |  |   85|  15.3k|    };
  |  |   86|       |
  |  |   87|  15.3k|    static const code distfix[32] = {
  |  |   88|  15.3k|        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
  |  |   89|  15.3k|        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
  |  |   90|  15.3k|        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
  |  |   91|  15.3k|        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
  |  |   92|  15.3k|        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
  |  |   93|  15.3k|        {22,5,193},{64,5,0}
  |  |   94|  15.3k|    };
  ------------------
  286|  15.3k|#endif /* BUILDFIXED */
  287|  15.3k|    state->lencode = lenfix;
  288|  15.3k|    state->lenbits = 9;
  289|  15.3k|    state->distcode = distfix;
  290|  15.3k|    state->distbits = 5;
  291|  15.3k|}
inflate.c:updatewindow:
  368|   237k|local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
  369|   237k|    struct inflate_state FAR *state;
  370|   237k|    unsigned dist;
  371|       |
  372|   237k|    state = (struct inflate_state FAR *)strm->state;
  373|       |
  374|       |    /* if it hasn't been done already, allocate space for the window */
  375|   237k|    if (state->window == Z_NULL) {
  ------------------
  |  |  212|   237k|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (375:9): [True: 737, False: 236k]
  ------------------
  376|    737|        state->window = (unsigned char FAR *)
  377|    737|                        ZALLOC(strm, 1U << state->wbits,
  ------------------
  |  |  246|    737|           (*((strm)->zalloc))((strm)->opaque, (items), (size))
  ------------------
  378|    737|                               sizeof(unsigned char));
  379|    737|        if (state->window == Z_NULL) return 1;
  ------------------
  |  |  212|    737|#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
  ------------------
  |  Branch (379:13): [True: 0, False: 737]
  ------------------
  380|    737|    }
  381|       |
  382|       |    /* if window not in use yet, initialize */
  383|   237k|    if (state->wsize == 0) {
  ------------------
  |  Branch (383:9): [True: 737, False: 236k]
  ------------------
  384|    737|        state->wsize = 1U << state->wbits;
  385|    737|        state->wnext = 0;
  386|    737|        state->whave = 0;
  387|    737|    }
  388|       |
  389|       |    /* copy state->wsize or less output bytes into the circular window */
  390|   237k|    if (copy >= state->wsize) {
  ------------------
  |  Branch (390:9): [True: 0, False: 237k]
  ------------------
  391|      0|        zmemcpy(state->window, end - state->wsize, state->wsize);
  ------------------
  |  |  209|      0|#    define zmemcpy memcpy
  ------------------
  392|      0|        state->wnext = 0;
  393|      0|        state->whave = state->wsize;
  394|      0|    }
  395|   237k|    else {
  396|   237k|        dist = state->wsize - state->wnext;
  397|   237k|        if (dist > copy) dist = copy;
  ------------------
  |  Branch (397:13): [True: 236k, False: 939]
  ------------------
  398|   237k|        zmemcpy(state->window + state->wnext, end - copy, dist);
  ------------------
  |  |  209|   237k|#    define zmemcpy memcpy
  ------------------
  399|   237k|        copy -= dist;
  400|   237k|        if (copy) {
  ------------------
  |  Branch (400:13): [True: 650, False: 236k]
  ------------------
  401|    650|            zmemcpy(state->window, end - copy, copy);
  ------------------
  |  |  209|    650|#    define zmemcpy memcpy
  ------------------
  402|    650|            state->wnext = copy;
  403|    650|            state->whave = state->wsize;
  404|    650|        }
  405|   236k|        else {
  406|   236k|            state->wnext += dist;
  407|   236k|            if (state->wnext == state->wsize) state->wnext = 0;
  ------------------
  |  Branch (407:17): [True: 289, False: 236k]
  ------------------
  408|   236k|            if (state->whave < state->wsize) state->whave += dist;
  ------------------
  |  Branch (408:17): [True: 111k, False: 125k]
  ------------------
  409|   236k|        }
  410|   237k|    }
  411|   237k|    return 0;
  412|   237k|}

inflate_table:
   34|    201|                                unsigned FAR *bits, unsigned short FAR *work) {
   35|    201|    unsigned len;               /* a code's length in bits */
   36|    201|    unsigned sym;               /* index of code symbols */
   37|    201|    unsigned min, max;          /* minimum and maximum code lengths */
   38|    201|    unsigned root;              /* number of index bits for root table */
   39|    201|    unsigned curr;              /* number of index bits for current table */
   40|    201|    unsigned drop;              /* code bits to drop for sub-table */
   41|    201|    int left;                   /* number of prefix codes available */
   42|    201|    unsigned used;              /* code entries in table used */
   43|    201|    unsigned huff;              /* Huffman code */
   44|    201|    unsigned incr;              /* for incrementing code, index */
   45|    201|    unsigned fill;              /* index for replicating entries */
   46|    201|    unsigned low;               /* low bits for current root entry */
   47|    201|    unsigned mask;              /* mask for low root bits */
   48|    201|    code here;                  /* table entry for duplication */
   49|    201|    code FAR *next;             /* next available space in table */
   50|    201|    const unsigned short FAR *base;     /* base value table to use */
   51|    201|    const unsigned short FAR *extra;    /* extra bits table to use */
   52|    201|    unsigned match;             /* use base and extra for symbol >= match */
   53|    201|    unsigned short count[MAXBITS+1];    /* number of codes of each length */
   54|    201|    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
   55|    201|    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
   56|    201|        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
   57|    201|        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
   58|    201|    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
   59|    201|        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
   60|    201|        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77};
   61|    201|    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
   62|    201|        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
   63|    201|        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
   64|    201|        8193, 12289, 16385, 24577, 0, 0};
   65|    201|    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
   66|    201|        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
   67|    201|        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
   68|    201|        28, 28, 29, 29, 64, 64};
   69|       |
   70|       |    /*
   71|       |       Process a set of code lengths to create a canonical Huffman code.  The
   72|       |       code lengths are lens[0..codes-1].  Each length corresponds to the
   73|       |       symbols 0..codes-1.  The Huffman code is generated by first sorting the
   74|       |       symbols by length from short to long, and retaining the symbol order
   75|       |       for codes with equal lengths.  Then the code starts with all zero bits
   76|       |       for the first code of the shortest length, and the codes are integer
   77|       |       increments for the same length, and zeros are appended as the length
   78|       |       increases.  For the deflate format, these bits are stored backwards
   79|       |       from their more natural integer increment ordering, and so when the
   80|       |       decoding tables are built in the large loop below, the integer codes
   81|       |       are incremented backwards.
   82|       |
   83|       |       This routine assumes, but does not check, that all of the entries in
   84|       |       lens[] are in the range 0..MAXBITS.  The caller must assure this.
   85|       |       1..MAXBITS is interpreted as that code length.  zero means that that
   86|       |       symbol does not occur in this code.
   87|       |
   88|       |       The codes are sorted by computing a count of codes for each length,
   89|       |       creating from that a table of starting indices for each length in the
   90|       |       sorted table, and then entering the symbols in order in the sorted
   91|       |       table.  The sorted table is work[], with that space being provided by
   92|       |       the caller.
   93|       |
   94|       |       The length counts are used for other purposes as well, i.e. finding
   95|       |       the minimum and maximum length codes, determining if there are any
   96|       |       codes at all, checking for a valid set of lengths, and looking ahead
   97|       |       at length counts to determine sub-table sizes when building the
   98|       |       decoding tables.
   99|       |     */
  100|       |
  101|       |    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
  102|  3.41k|    for (len = 0; len <= MAXBITS; len++)
  ------------------
  |  |    9|  3.41k|#define MAXBITS 15
  ------------------
  |  Branch (102:19): [True: 3.21k, False: 201]
  ------------------
  103|  3.21k|        count[len] = 0;
  104|  11.8k|    for (sym = 0; sym < codes; sym++)
  ------------------
  |  Branch (104:19): [True: 11.6k, False: 201]
  ------------------
  105|  11.6k|        count[lens[sym]]++;
  106|       |
  107|       |    /* bound code lengths, force root to be within code lengths */
  108|    201|    root = *bits;
  109|  2.24k|    for (max = MAXBITS; max >= 1; max--)
  ------------------
  |  |    9|    201|#define MAXBITS 15
  ------------------
  |  Branch (109:25): [True: 2.20k, False: 36]
  ------------------
  110|  2.20k|        if (count[max] != 0) break;
  ------------------
  |  Branch (110:13): [True: 165, False: 2.04k]
  ------------------
  111|    201|    if (root > max) root = max;
  ------------------
  |  Branch (111:9): [True: 135, False: 66]
  ------------------
  112|    201|    if (max == 0) {                     /* no symbols to code at all */
  ------------------
  |  Branch (112:9): [True: 36, False: 165]
  ------------------
  113|     36|        here.op = (unsigned char)64;    /* invalid code marker */
  114|     36|        here.bits = (unsigned char)1;
  115|     36|        here.val = (unsigned short)0;
  116|     36|        *(*table)++ = here;             /* make a table to force an error */
  117|     36|        *(*table)++ = here;
  118|     36|        *bits = 1;
  119|     36|        return 0;     /* no symbols, but wait for decoding to report error */
  120|     36|    }
  121|    380|    for (min = 1; min < max; min++)
  ------------------
  |  Branch (121:19): [True: 365, False: 15]
  ------------------
  122|    365|        if (count[min] != 0) break;
  ------------------
  |  Branch (122:13): [True: 150, False: 215]
  ------------------
  123|    165|    if (root < min) root = min;
  ------------------
  |  Branch (123:9): [True: 2, False: 163]
  ------------------
  124|       |
  125|       |    /* check for an over-subscribed or incomplete set of lengths */
  126|    165|    left = 1;
  127|  2.27k|    for (len = 1; len <= MAXBITS; len++) {
  ------------------
  |  |    9|  2.27k|#define MAXBITS 15
  ------------------
  |  Branch (127:19): [True: 2.14k, False: 136]
  ------------------
  128|  2.14k|        left <<= 1;
  129|  2.14k|        left -= count[len];
  130|  2.14k|        if (left < 0) return -1;        /* over-subscribed */
  ------------------
  |  Branch (130:13): [True: 29, False: 2.11k]
  ------------------
  131|  2.14k|    }
  132|    136|    if (left > 0 && (type == CODES || max != 1))
  ------------------
  |  Branch (132:9): [True: 25, False: 111]
  |  Branch (132:22): [True: 15, False: 10]
  |  Branch (132:39): [True: 10, False: 0]
  ------------------
  133|     25|        return -1;                      /* incomplete set */
  134|       |
  135|       |    /* generate offsets into symbol table for each length for sorting */
  136|    111|    offs[1] = 0;
  137|  1.66k|    for (len = 1; len < MAXBITS; len++)
  ------------------
  |  |    9|  1.66k|#define MAXBITS 15
  ------------------
  |  Branch (137:19): [True: 1.55k, False: 111]
  ------------------
  138|  1.55k|        offs[len + 1] = offs[len] + count[len];
  139|       |
  140|       |    /* sort symbols by length, by symbol order within each length */
  141|  8.44k|    for (sym = 0; sym < codes; sym++)
  ------------------
  |  Branch (141:19): [True: 8.33k, False: 111]
  ------------------
  142|  8.33k|        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
  ------------------
  |  Branch (142:13): [True: 2.65k, False: 5.68k]
  ------------------
  143|       |
  144|       |    /*
  145|       |       Create and fill in decoding tables.  In this loop, the table being
  146|       |       filled is at next and has curr index bits.  The code being used is huff
  147|       |       with length len.  That code is converted to an index by dropping drop
  148|       |       bits off of the bottom.  For codes where len is less than drop + curr,
  149|       |       those top drop + curr - len bits are incremented through all values to
  150|       |       fill the table with replicated entries.
  151|       |
  152|       |       root is the number of index bits for the root table.  When len exceeds
  153|       |       root, sub-tables are created pointed to by the root entry with an index
  154|       |       of the low root bits of huff.  This is saved in low to check for when a
  155|       |       new sub-table should be started.  drop is zero when the root table is
  156|       |       being filled, and drop is root when sub-tables are being filled.
  157|       |
  158|       |       When a new sub-table is needed, it is necessary to look ahead in the
  159|       |       code lengths to determine what size sub-table is needed.  The length
  160|       |       counts are used for this, and so count[] is decremented as codes are
  161|       |       entered in the tables.
  162|       |
  163|       |       used keeps track of how many table entries have been allocated from the
  164|       |       provided *table space.  It is checked for LENS and DIST tables against
  165|       |       the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
  166|       |       the initial root table size constants.  See the comments in inftrees.h
  167|       |       for more information.
  168|       |
  169|       |       sym increments through all symbols, and the loop terminates when
  170|       |       all codes of length max, i.e. all codes, have been processed.  This
  171|       |       routine permits incomplete codes, so another loop after this one fills
  172|       |       in the rest of the decoding tables with invalid code markers.
  173|       |     */
  174|       |
  175|       |    /* set up for code type */
  176|    111|    switch (type) {
  177|     85|    case CODES:
  ------------------
  |  Branch (177:5): [True: 85, False: 26]
  ------------------
  178|     85|        base = extra = work;    /* dummy value--not used */
  179|     85|        match = 20;
  180|     85|        break;
  181|     26|    case LENS:
  ------------------
  |  Branch (181:5): [True: 26, False: 85]
  ------------------
  182|     26|        base = lbase;
  183|     26|        extra = lext;
  184|     26|        match = 257;
  185|     26|        break;
  186|      0|    default:    /* DISTS */
  ------------------
  |  Branch (186:5): [True: 0, False: 111]
  ------------------
  187|      0|        base = dbase;
  188|      0|        extra = dext;
  189|      0|        match = 0;
  190|    111|    }
  191|       |
  192|       |    /* initialize state for loop */
  193|    111|    huff = 0;                   /* starting code */
  194|    111|    sym = 0;                    /* starting code symbol */
  195|    111|    len = min;                  /* starting code length */
  196|    111|    next = *table;              /* current table to fill in */
  197|    111|    curr = root;                /* current table index bits */
  198|    111|    drop = 0;                   /* current bits to drop from code for index */
  199|    111|    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
  200|    111|    used = 1U << root;          /* use root table entries */
  201|    111|    mask = used - 1;            /* mask for comparing low */
  202|       |
  203|       |    /* check available table space */
  204|    111|    if ((type == LENS && used > ENOUGH_LENS) ||
  ------------------
  |  |   49|     26|#define ENOUGH_LENS 852
  ------------------
  |  Branch (204:10): [True: 26, False: 85]
  |  Branch (204:26): [True: 0, False: 26]
  ------------------
  205|    111|        (type == DISTS && used > ENOUGH_DISTS))
  ------------------
  |  |   50|      0|#define ENOUGH_DISTS 592
  ------------------
  |  Branch (205:10): [True: 0, False: 111]
  |  Branch (205:27): [True: 0, False: 0]
  ------------------
  206|      0|        return 1;
  207|       |
  208|       |    /* process all codes and make table entries */
  209|  2.65k|    for (;;) {
  210|       |        /* create table entry */
  211|  2.65k|        here.bits = (unsigned char)(len - drop);
  212|  2.65k|        if (work[sym] + 1U < match) {
  ------------------
  |  Branch (212:13): [True: 2.60k, False: 50]
  ------------------
  213|  2.60k|            here.op = (unsigned char)0;
  214|  2.60k|            here.val = work[sym];
  215|  2.60k|        }
  216|     50|        else if (work[sym] >= match) {
  ------------------
  |  Branch (216:18): [True: 24, False: 26]
  ------------------
  217|     24|            here.op = (unsigned char)(extra[work[sym] - match]);
  218|     24|            here.val = base[work[sym] - match];
  219|     24|        }
  220|     26|        else {
  221|     26|            here.op = (unsigned char)(32 + 64);         /* end of block */
  222|     26|            here.val = 0;
  223|     26|        }
  224|       |
  225|       |        /* replicate for those indices with low len bits equal to huff */
  226|  2.65k|        incr = 1U << (len - drop);
  227|  2.65k|        fill = 1U << curr;
  228|  2.65k|        min = fill;                 /* save offset to next table */
  229|  17.0k|        do {
  230|  17.0k|            fill -= incr;
  231|  17.0k|            next[(huff >> drop) + fill] = here;
  232|  17.0k|        } while (fill != 0);
  ------------------
  |  Branch (232:18): [True: 14.3k, False: 2.65k]
  ------------------
  233|       |
  234|       |        /* backwards increment the len-bit code huff */
  235|  2.65k|        incr = 1U << (len - 1);
  236|  5.18k|        while (huff & incr)
  ------------------
  |  Branch (236:16): [True: 2.53k, False: 2.65k]
  ------------------
  237|  2.53k|            incr >>= 1;
  238|  2.65k|        if (incr != 0) {
  ------------------
  |  Branch (238:13): [True: 2.53k, False: 111]
  ------------------
  239|  2.53k|            huff &= incr - 1;
  240|  2.53k|            huff += incr;
  241|  2.53k|        }
  242|    111|        else
  243|    111|            huff = 0;
  244|       |
  245|       |        /* go to next symbol, update count, len */
  246|  2.65k|        sym++;
  247|  2.65k|        if (--(count[len]) == 0) {
  ------------------
  |  Branch (247:13): [True: 437, False: 2.21k]
  ------------------
  248|    437|            if (len == max) break;
  ------------------
  |  Branch (248:17): [True: 111, False: 326]
  ------------------
  249|    326|            len = lens[work[sym]];
  250|    326|        }
  251|       |
  252|       |        /* create new sub-table if needed */
  253|  2.53k|        if (len > root && (huff & mask) != low) {
  ------------------
  |  Branch (253:13): [True: 154, False: 2.38k]
  |  Branch (253:27): [True: 74, False: 80]
  ------------------
  254|       |            /* if first time, transition to sub-tables */
  255|     74|            if (drop == 0)
  ------------------
  |  Branch (255:17): [True: 25, False: 49]
  ------------------
  256|     25|                drop = root;
  257|       |
  258|       |            /* increment past last table */
  259|     74|            next += min;            /* here min is 1 << curr */
  260|       |
  261|       |            /* determine length of next table */
  262|     74|            curr = len - drop;
  263|     74|            left = (int)(1 << curr);
  264|     74|            while (curr + drop < max) {
  ------------------
  |  Branch (264:20): [True: 1, False: 73]
  ------------------
  265|      1|                left -= count[curr + drop];
  266|      1|                if (left <= 0) break;
  ------------------
  |  Branch (266:21): [True: 1, False: 0]
  ------------------
  267|      0|                curr++;
  268|      0|                left <<= 1;
  269|      0|            }
  270|       |
  271|       |            /* check for enough space */
  272|     74|            used += 1U << curr;
  273|     74|            if ((type == LENS && used > ENOUGH_LENS) ||
  ------------------
  |  |   49|     74|#define ENOUGH_LENS 852
  ------------------
  |  Branch (273:18): [True: 74, False: 0]
  |  Branch (273:34): [True: 0, False: 74]
  ------------------
  274|     74|                (type == DISTS && used > ENOUGH_DISTS))
  ------------------
  |  |   50|      0|#define ENOUGH_DISTS 592
  ------------------
  |  Branch (274:18): [True: 0, False: 74]
  |  Branch (274:35): [True: 0, False: 0]
  ------------------
  275|      0|                return 1;
  276|       |
  277|       |            /* point entry in root table to sub-table */
  278|     74|            low = huff & mask;
  279|     74|            (*table)[low].op = (unsigned char)curr;
  280|     74|            (*table)[low].bits = (unsigned char)root;
  281|     74|            (*table)[low].val = (unsigned short)(next - *table);
  282|     74|        }
  283|  2.53k|    }
  284|       |
  285|       |    /* fill in remaining table entry if code is incomplete (guaranteed to have
  286|       |       at most one remaining entry, since if the code is incomplete, the
  287|       |       maximum code length that was allowed to get this far is one bit) */
  288|    111|    if (huff != 0) {
  ------------------
  |  Branch (288:9): [True: 0, False: 111]
  ------------------
  289|      0|        here.op = (unsigned char)64;            /* invalid code marker */
  290|      0|        here.bits = (unsigned char)(len - drop);
  291|      0|        here.val = (unsigned short)0;
  292|      0|        next[huff] = here;
  293|      0|    }
  294|       |
  295|       |    /* set return parameters */
  296|    111|    *table += used;
  297|    111|    *bits = root;
  298|    111|    return 0;
  299|    111|}

LLVMFuzzerTestOneInput:
   35|  17.1k|{
   36|  17.1k|  int rc = 0;
   37|  17.1k|  int tlv_rc;
   38|  17.1k|  FUZZ_DATA fuzz;
   39|  17.1k|  TLV tlv;
   40|       |
   41|       |  /* Ignore SIGPIPE errors. We'll handle the errors ourselves. */
   42|  17.1k|  signal(SIGPIPE, SIG_IGN);
   43|       |
   44|       |  /* Have to set all fields to zero before getting to the terminate function */
   45|  17.1k|  memset(&fuzz, 0, sizeof(FUZZ_DATA));
   46|       |
   47|  17.1k|  if(size < sizeof(TLV_RAW)) {
  ------------------
  |  Branch (47:6): [True: 4, False: 17.1k]
  ------------------
   48|       |    /* Not enough data for a single TLV - don't continue */
   49|      4|    goto EXIT_LABEL;
   50|      4|  }
   51|       |
   52|       |  /* Try to initialize the fuzz data */
   53|  17.1k|  FTRY(fuzz_initialize_fuzz_data(&fuzz, data, size));
  ------------------
  |  |  480|  17.1k|        {                                                                     \
  |  |  481|  17.1k|          int _func_rc = (FUNC);                                              \
  |  |  482|  17.1k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 17.1k]
  |  |  ------------------
  |  |  483|  17.1k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  17.1k|        }
  ------------------
   54|       |
   55|  17.1k|  for(tlv_rc = fuzz_get_first_tlv(&fuzz, &tlv);
   56|  96.6k|      tlv_rc == 0;
  ------------------
  |  Branch (56:7): [True: 81.1k, False: 15.5k]
  ------------------
   57|  81.1k|      tlv_rc = fuzz_get_next_tlv(&fuzz, &tlv)) {
   58|       |
   59|       |    /* Have the TLV in hand. Parse the TLV. */
   60|  81.1k|    rc = fuzz_parse_tlv(&fuzz, &tlv);
   61|       |
   62|  81.1k|    if(rc != 0) {
  ------------------
  |  Branch (62:8): [True: 1.59k, False: 79.5k]
  ------------------
   63|       |      /* Failed to parse the TLV. Can't continue. */
   64|  1.59k|      goto EXIT_LABEL;
   65|  1.59k|    }
   66|  81.1k|  }
   67|       |
   68|  15.5k|  if(tlv_rc != TLV_RC_NO_MORE_TLVS) {
  ------------------
  |  |  267|  15.5k|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
  |  Branch (68:6): [True: 174, False: 15.3k]
  ------------------
   69|       |    /* A TLV call failed. Can't continue. */
   70|    174|    goto EXIT_LABEL;
   71|    174|  }
   72|       |
   73|       |  /* Set up the standard easy options. */
   74|  15.3k|  FTRY(fuzz_set_easy_options(&fuzz));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
   75|       |
   76|       |  /**
   77|       |   * Add in more curl options that have been accumulated over possibly
   78|       |   * multiple TLVs.
   79|       |   */
   80|  15.3k|  if(fuzz.header_list != NULL) {
  ------------------
  |  Branch (80:6): [True: 964, False: 14.3k]
  ------------------
   81|    964|    curl_easy_setopt(fuzz.easy, CURLOPT_HTTPHEADER, fuzz.header_list);
  ------------------
  |  | 3337|    964|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3335|    964|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   82|    964|  }
   83|       |
   84|  15.3k|  if(fuzz.mail_recipients_list != NULL) {
  ------------------
  |  Branch (84:6): [True: 46, False: 15.3k]
  ------------------
   85|     46|    curl_easy_setopt(fuzz.easy, CURLOPT_MAIL_RCPT, fuzz.mail_recipients_list);
  ------------------
  |  | 3337|     46|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3335|     46|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   86|     46|  }
   87|       |
   88|  15.3k|  if(fuzz.mime != NULL) {
  ------------------
  |  Branch (88:6): [True: 334, False: 15.0k]
  ------------------
   89|    334|    curl_easy_setopt(fuzz.easy, CURLOPT_MIMEPOST, fuzz.mime);
  ------------------
  |  | 3337|    334|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3335|    334|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   90|    334|  }
   91|       |
   92|  15.3k|  if (fuzz.httppost != NULL) {
  ------------------
  |  Branch (92:7): [True: 118, False: 15.2k]
  ------------------
   93|    118|    curl_easy_setopt(fuzz.easy, CURLOPT_HTTPPOST, fuzz.httppost);
  ------------------
  |  | 3337|    118|  curl_easy_setopt curl_exactly_three_arguments(handle, opt, param)
  |  |  ------------------
  |  |  |  | 3335|    118|#define curl_exactly_three_arguments(a, b, c) (a, b, c)
  |  |  ------------------
  ------------------
   94|    118|  }
   95|       |
   96|       |  /* Run the transfer. */
   97|  15.3k|  fuzz_handle_transfer(&fuzz);
   98|       |
   99|  17.1k|EXIT_LABEL:
  100|       |
  101|  17.1k|  fuzz_terminate_fuzz_data(&fuzz);
  102|       |
  103|       |  /* This function must always return 0. Non-zero codes are reserved. */
  104|  17.1k|  return 0;
  105|  15.3k|}
_Z6to_u32PKh:
  111|   100k|{
  112|   100k|  uint32_t u;
  113|   100k|  u = (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3];
  114|   100k|  return u;
  115|   100k|}
_Z6to_u16PKh:
  121|  82.7k|{
  122|  82.7k|  uint16_t u;
  123|  82.7k|  u = (b[0] << 8) + b[1];
  124|  82.7k|  return u;
  125|  82.7k|}
_Z25fuzz_initialize_fuzz_dataP9fuzz_dataPKhm:
  133|  17.1k|{
  134|  17.1k|  int rc = 0;
  135|  17.1k|  int ii;
  136|       |
  137|       |  /* Initialize the fuzz data. */
  138|  17.1k|  memset(fuzz, 0, sizeof(FUZZ_DATA));
  139|       |
  140|       |  /* Create an easy handle. This will have all of the settings configured on
  141|       |     it. */
  142|  17.1k|  fuzz->easy = curl_easy_init();
  143|  17.1k|  FCHECK(fuzz->easy != NULL);
  ------------------
  |  |  490|  17.1k|        {                                                                     \
  |  |  491|  17.1k|          if (!(COND))                                                        \
  |  |  ------------------
  |  |  |  Branch (491:15): [True: 0, False: 17.1k]
  |  |  ------------------
  |  |  492|  17.1k|          {                                                                   \
  |  |  493|      0|            rc = 255;                                                         \
  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  495|      0|          }                                                                   \
  |  |  496|  17.1k|        }
  ------------------
  144|       |
  145|       |  /* Set up the state parser */
  146|  17.1k|  fuzz->state.data = data;
  147|  17.1k|  fuzz->state.data_len = data_len;
  148|       |
  149|       |  /* Set up the state of the server sockets. */
  150|  51.3k|  for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  51.3k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (150:15): [True: 34.2k, False: 17.1k]
  ------------------
  151|  34.2k|    fuzz->sockman[ii].index = ii;
  152|  34.2k|    fuzz->sockman[ii].fd_state = FUZZ_SOCK_CLOSED;
  153|  34.2k|  }
  154|       |
  155|       |  /* Check for verbose mode. */
  156|  17.1k|  fuzz->verbose = (getenv("FUZZ_VERBOSE") != NULL);
  157|       |
  158|  17.1k|  FCHECK(setenv("CURL_HSTS_HTTP", "1", 0) == 0);
  ------------------
  |  |  490|  17.1k|        {                                                                     \
  |  |  491|  17.1k|          if (!(COND))                                                        \
  |  |  ------------------
  |  |  |  Branch (491:15): [True: 0, False: 17.1k]
  |  |  ------------------
  |  |  492|  17.1k|          {                                                                   \
  |  |  493|      0|            rc = 255;                                                         \
  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  495|      0|          }                                                                   \
  |  |  496|  17.1k|        }
  ------------------
  159|  17.1k|  FCHECK(setenv("CURL_ALTSVC_HTTP", "1", 0) == 0);
  ------------------
  |  |  490|  17.1k|        {                                                                     \
  |  |  491|  17.1k|          if (!(COND))                                                        \
  |  |  ------------------
  |  |  |  Branch (491:15): [True: 0, False: 17.1k]
  |  |  ------------------
  |  |  492|  17.1k|          {                                                                   \
  |  |  493|      0|            rc = 255;                                                         \
  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  495|      0|          }                                                                   \
  |  |  496|  17.1k|        }
  ------------------
  160|       |
  161|  17.1k|EXIT_LABEL:
  162|       |
  163|  17.1k|  return rc;
  164|  17.1k|}
_Z21fuzz_set_easy_optionsP9fuzz_data:
  170|  15.3k|{
  171|  15.3k|  int rc = 0;
  172|  15.3k|  unsigned long allowed_protocols;
  173|       |
  174|       |  /* Set some standard options on the CURL easy handle. We need to override the
  175|       |     socket function so that we create our own sockets to present to CURL. */
  176|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  177|  15.3k|                        CURLOPT_OPENSOCKETFUNCTION,
  178|  15.3k|                        fuzz_open_socket));
  179|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_OPENSOCKETDATA, fuzz));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  180|       |
  181|       |  /* In case something tries to set a socket option, intercept this. */
  182|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  183|  15.3k|                        CURLOPT_SOCKOPTFUNCTION,
  184|  15.3k|                        fuzz_sockopt_callback));
  185|       |
  186|       |  /* Set the standard read function callback. */
  187|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  188|  15.3k|                        CURLOPT_READFUNCTION,
  189|  15.3k|                        fuzz_read_callback));
  190|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_READDATA, fuzz));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  191|       |
  192|       |  /* Set the standard write function callback. */
  193|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy,
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  194|  15.3k|                        CURLOPT_WRITEFUNCTION,
  195|  15.3k|                        fuzz_write_callback));
  196|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_WRITEDATA, fuzz));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  197|       |
  198|       |  /* Set the writable cookie jar path so cookies are tested. */
  199|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_COOKIEJAR, FUZZ_COOKIE_JAR_PATH));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  200|       |
  201|       |  /* Set the RO cookie file path so cookies are tested. */
  202|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_COOKIEFILE, FUZZ_RO_COOKIE_FILE_PATH));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  203|       |
  204|       |  /* Set altsvc header cache filepath so that it can be fuzzed. */
  205|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_ALTSVC, FUZZ_ALT_SVC_HEADER_CACHE_PATH));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  206|       |
  207|       |  /* Set the hsts header cache filepath so that it can be fuzzed. */
  208|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_HSTS, FUZZ_HSTS_HEADER_CACHE_PATH));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  209|       |
  210|       |  /* Set the Certificate Revocation List file path so it can be fuzzed */
  211|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CRLFILE, FUZZ_CRL_FILE_PATH));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  212|       |
  213|       |  /* Set the .netrc file path so it can be fuzzed */
  214|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_NETRC_FILE, FUZZ_NETRC_FILE_PATH));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  215|       |
  216|       |  /* Time out requests quickly. */
  217|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_TIMEOUT_MS, 200L));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  218|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_SERVER_RESPONSE_TIMEOUT, 1L));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  219|       |
  220|       |  /* Can enable verbose mode by having the environment variable FUZZ_VERBOSE. */
  221|  15.3k|  if(fuzz->verbose) {
  ------------------
  |  Branch (221:6): [True: 0, False: 15.3k]
  ------------------
  222|      0|    FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_VERBOSE, 1L));
  ------------------
  |  |  480|      0|        {                                                                     \
  |  |  481|      0|          int _func_rc = (FUNC);                                              \
  |  |  482|      0|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 0]
  |  |  ------------------
  |  |  483|      0|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|      0|        }
  ------------------
  223|      0|  }
  224|       |
  225|       |  /* Force resolution of all addresses to a specific IP address. */
  226|  15.3k|  fuzz->connect_to_list = curl_slist_append(NULL, "::127.0.1.127:");
  227|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CONNECT_TO, fuzz->connect_to_list));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  228|       |
  229|       |  /* Limit the protocols in use by this fuzzer. */
  230|  15.3k|  FTRY(fuzz_set_allowed_protocols(fuzz));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  231|       |
  232|  15.3k|EXIT_LABEL:
  233|       |
  234|  15.3k|  return rc;
  235|  15.3k|}
_Z24fuzz_terminate_fuzz_dataP9fuzz_data:
  241|  17.1k|{
  242|  17.1k|  int ii;
  243|       |
  244|  17.1k|  fuzz_free((void **)&fuzz->postfields);
  245|       |
  246|  51.3k|  for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  51.3k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (246:15): [True: 34.2k, False: 17.1k]
  ------------------
  247|  34.2k|    if(fuzz->sockman[ii].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (247:8): [True: 10.1k, False: 24.0k]
  ------------------
  248|  10.1k|      close(fuzz->sockman[ii].fd);
  249|  10.1k|      fuzz->sockman[ii].fd_state = FUZZ_SOCK_CLOSED;
  250|  10.1k|    }
  251|  34.2k|  }
  252|       |
  253|  17.1k|  if(fuzz->connect_to_list != NULL) {
  ------------------
  |  Branch (253:6): [True: 15.3k, False: 1.77k]
  ------------------
  254|  15.3k|    curl_slist_free_all(fuzz->connect_to_list);
  255|  15.3k|    fuzz->connect_to_list = NULL;
  256|  15.3k|  }
  257|       |
  258|  17.1k|  if(fuzz->header_list != NULL) {
  ------------------
  |  Branch (258:6): [True: 976, False: 16.1k]
  ------------------
  259|    976|    curl_slist_free_all(fuzz->header_list);
  260|    976|    fuzz->header_list = NULL;
  261|    976|  }
  262|       |
  263|  17.1k|  if(fuzz->mail_recipients_list != NULL) {
  ------------------
  |  Branch (263:6): [True: 54, False: 17.0k]
  ------------------
  264|     54|    curl_slist_free_all(fuzz->mail_recipients_list);
  265|     54|    fuzz->mail_recipients_list = NULL;
  266|     54|  }
  267|       |
  268|  17.1k|  if(fuzz->mime != NULL) {
  ------------------
  |  Branch (268:6): [True: 353, False: 16.7k]
  ------------------
  269|    353|    curl_mime_free(fuzz->mime);
  270|    353|    fuzz->mime = NULL;
  271|    353|  }
  272|       |
  273|  17.1k|  if(fuzz->easy != NULL) {
  ------------------
  |  Branch (273:6): [True: 17.1k, False: 4]
  ------------------
  274|  17.1k|    curl_easy_cleanup(fuzz->easy);
  275|  17.1k|    fuzz->easy = NULL;
  276|  17.1k|  }
  277|       |
  278|       |  /* When you have passed the struct curl_httppost pointer to curl_easy_setopt
  279|       |   * (using the CURLOPT_HTTPPOST option), you must not free the list until after
  280|       |   *  you have called curl_easy_cleanup for the curl handle.
  281|       |   *  https://curl.se/libcurl/c/curl_formadd.html */
  282|  17.1k|  if (fuzz->httppost != NULL) {
  ------------------
  |  Branch (282:7): [True: 123, False: 17.0k]
  ------------------
  283|    123|    curl_formfree(fuzz->httppost);
  284|    123|    fuzz->httppost = NULL;
  285|    123|  }
  286|       |
  287|       |  // free after httppost and last_post_part.
  288|  17.1k|  if (fuzz->post_body != NULL) {
  ------------------
  |  Branch (288:7): [True: 123, False: 17.0k]
  ------------------
  289|    123|    fuzz_free((void **)&fuzz->post_body);
  290|    123|  }
  291|  17.1k|}
_Z9fuzz_freePPv:
  297|  98.6k|{
  298|  98.6k|  if(*ptr != NULL) {
  ------------------
  |  Branch (298:6): [True: 49.4k, False: 49.2k]
  ------------------
  299|  49.4k|    free(*ptr);
  300|       |    *ptr = NULL;
  301|  49.4k|  }
  302|  98.6k|}
_Z20fuzz_handle_transferP9fuzz_data:
  309|  15.3k|{
  310|  15.3k|  int rc = 0;
  311|  15.3k|  CURLM *multi_handle;
  312|  15.3k|  int still_running; /* keep number of running handles */
  313|  15.3k|  CURLMsg *msg; /* for picking up messages with the transfer status */
  314|  15.3k|  int msgs_left; /* how many messages are left */
  315|  15.3k|  int double_timeout = 0;
  316|  15.3k|  fd_set fdread;
  317|  15.3k|  fd_set fdwrite;
  318|  15.3k|  fd_set fdexcep;
  319|  15.3k|  struct timeval timeout;
  320|  15.3k|  int select_rc;
  321|  15.3k|  CURLMcode mc;
  322|  15.3k|  int maxfd = -1;
  323|  15.3k|  long curl_timeo = -1;
  324|  15.3k|  int ii;
  325|  15.3k|  FUZZ_SOCKET_MANAGER *sman[FUZZ_NUM_CONNECTIONS];
  326|       |
  327|  46.0k|  for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  46.0k|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (327:15): [True: 30.6k, False: 15.3k]
  ------------------
  328|  30.6k|    sman[ii] = &fuzz->sockman[ii];
  329|       |
  330|       |    /* Set up the starting index for responses. */
  331|  30.6k|    sman[ii]->response_index = 1;
  332|  30.6k|  }
  333|       |
  334|       |  /* init a multi stack */
  335|  15.3k|  multi_handle = curl_multi_init();
  336|       |
  337|       |  /* add the individual transfers */
  338|  15.3k|  curl_multi_add_handle(multi_handle, fuzz->easy);
  339|       |
  340|       |  /* Do an initial process. This might end the transfer immediately. */
  341|  15.3k|  curl_multi_perform(multi_handle, &still_running);
  342|  15.3k|  FV_PRINTF(fuzz,
  ------------------
  |  |  530|  15.3k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  343|  15.3k|            "FUZZ: Initial perform; still running? %d \n",
  344|  15.3k|            still_running);
  345|       |
  346|   699k|  while(still_running) {
  ------------------
  |  Branch (346:9): [True: 684k, False: 15.0k]
  ------------------
  347|       |    /* Reset the sets of file descriptors. */
  348|   684k|    FD_ZERO(&fdread);
  ------------------
  |  Branch (348:5): [True: 10.9M, False: 684k]
  |  Branch (348:5): [Folded, False: 684k]
  ------------------
  349|   684k|    FD_ZERO(&fdwrite);
  ------------------
  |  Branch (349:5): [True: 10.9M, False: 684k]
  |  Branch (349:5): [Folded, False: 684k]
  ------------------
  350|   684k|    FD_ZERO(&fdexcep);
  ------------------
  |  Branch (350:5): [True: 10.9M, False: 684k]
  |  Branch (350:5): [Folded, False: 684k]
  ------------------
  351|       |
  352|       |    /* Set a timeout of 10ms. This is lower than recommended by the multi guide
  353|       |       but we're not going to any remote servers, so everything should complete
  354|       |       very quickly. */
  355|   684k|    timeout.tv_sec = 0;
  356|   684k|    timeout.tv_usec = 10000;
  357|       |
  358|       |    /* get file descriptors from the transfers */
  359|   684k|    mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
  360|   684k|    if(mc != CURLM_OK) {
  ------------------
  |  Branch (360:8): [True: 0, False: 684k]
  ------------------
  361|      0|      fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
  362|      0|      rc = -1;
  363|      0|      break;
  364|      0|    }
  365|       |
  366|  2.05M|    for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  2.05M|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (366:17): [True: 1.36M, False: 684k]
  ------------------
  367|       |      /* Add the socket FD into the readable set if connected. */
  368|  1.36M|      if(sman[ii]->fd_state == FUZZ_SOCK_OPEN) {
  ------------------
  |  Branch (368:10): [True: 60.0k, False: 1.30M]
  ------------------
  369|  60.0k|        FD_SET(sman[ii]->fd, &fdread);
  370|       |
  371|       |        /* Work out the maximum FD between the cURL file descriptors and the
  372|       |           server FD. */
  373|  60.0k|        maxfd = FUZZ_MAX(sman[ii]->fd, maxfd);
  ------------------
  |  |  534|  60.0k|#define FUZZ_MAX(A, B) ((A) > (B) ? (A) : (B))
  |  |  ------------------
  |  |  |  Branch (534:25): [True: 20, False: 60.0k]
  |  |  ------------------
  ------------------
  374|  60.0k|      }
  375|  1.36M|    }
  376|       |
  377|       |    /* Work out what file descriptors need work. */
  378|   684k|    rc = fuzz_select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
  379|       |
  380|   684k|    if(rc == -1) {
  ------------------
  |  Branch (380:8): [True: 0, False: 684k]
  ------------------
  381|       |      /* Had an issue while selecting a file descriptor. Let's just exit. */
  382|      0|      FV_PRINTF(fuzz, "FUZZ: select failed, exiting \n");
  ------------------
  |  |  530|      0|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  383|      0|      break;
  384|      0|    }
  385|   684k|    else if(rc == 0) {
  ------------------
  |  Branch (385:13): [True: 863, False: 683k]
  ------------------
  386|    863|      FV_PRINTF(fuzz,
  ------------------
  |  |  530|    863|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 863]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  387|    863|                "FUZZ: Timed out; double timeout? %d \n",
  388|    863|                double_timeout);
  389|       |
  390|       |      /* Timed out. */
  391|    863|      if(double_timeout == 1) {
  ------------------
  |  Branch (391:10): [True: 291, False: 572]
  ------------------
  392|       |        /* We don't expect multiple timeouts in a row. If there are double
  393|       |           timeouts then exit. */
  394|    291|        break;
  395|    291|      }
  396|    572|      else {
  397|       |        /* Set the timeout flag for the next time we select(). */
  398|    572|        double_timeout = 1;
  399|    572|      }
  400|    863|    }
  401|   683k|    else {
  402|       |      /* There's an active file descriptor. Reset the timeout flag. */
  403|   683k|      double_timeout = 0;
  404|   683k|    }
  405|       |
  406|       |    /* Check to see if a server file descriptor is readable. If it is,
  407|       |       then send the next response from the fuzzing data. */
  408|  2.05M|    for(ii = 0; ii < FUZZ_NUM_CONNECTIONS; ii++) {
  ------------------
  |  |  307|  2.05M|#define FUZZ_NUM_CONNECTIONS            2
  ------------------
  |  Branch (408:17): [True: 1.36M, False: 684k]
  ------------------
  409|  1.36M|      if(sman[ii]->fd_state == FUZZ_SOCK_OPEN &&
  ------------------
  |  Branch (409:10): [True: 59.9k, False: 1.30M]
  ------------------
  410|  1.36M|         FD_ISSET(sman[ii]->fd, &fdread)) {
  ------------------
  |  Branch (410:10): [True: 4.15k, False: 55.8k]
  ------------------
  411|  4.15k|        rc = fuzz_send_next_response(fuzz, sman[ii]);
  412|  4.15k|        if(rc != 0) {
  ------------------
  |  Branch (412:12): [True: 85, False: 4.07k]
  ------------------
  413|       |          /* Failed to send a response. Break out here. */
  414|     85|          break;
  415|     85|        }
  416|  4.15k|      }
  417|  1.36M|    }
  418|       |
  419|   684k|    curl_multi_perform(multi_handle, &still_running);
  420|   684k|  }
  421|       |
  422|       |  /* Remove the easy handle from the multi stack. */
  423|  15.3k|  curl_multi_remove_handle(multi_handle, fuzz->easy);
  424|       |
  425|       |  /* Clean up the multi handle - the top level function will handle the easy
  426|       |     handle. */
  427|  15.3k|  curl_multi_cleanup(multi_handle);
  428|       |
  429|  15.3k|  return(rc);
  430|  15.3k|}
_Z23fuzz_send_next_responseP9fuzz_dataP19fuzz_socket_manager:
  436|  4.15k|{
  437|  4.15k|  int rc = 0;
  438|  4.15k|  ssize_t ret_in;
  439|  4.15k|  ssize_t ret_out;
  440|  4.15k|  char buffer[8192];
  441|  4.15k|  const uint8_t *data;
  442|  4.15k|  size_t data_len;
  443|       |
  444|       |  /* Need to read all data sent by the client so the file descriptor becomes
  445|       |     unreadable. Because the file descriptor is non-blocking we won't just
  446|       |     hang here. */
  447|  8.57k|  do {
  448|  8.57k|    ret_in = read(sman->fd, buffer, sizeof(buffer));
  449|  8.57k|    if(fuzz->verbose && ret_in > 0) {
  ------------------
  |  Branch (449:8): [True: 0, False: 8.57k]
  |  Branch (449:25): [True: 0, False: 0]
  ------------------
  450|      0|      printf("FUZZ[%d]: Received %zu bytes \n==>\n", sman->index, ret_in);
  451|      0|      fwrite(buffer, ret_in, 1, stdout);
  452|      0|      printf("\n<==\n");
  453|      0|    }
  454|  8.57k|  } while (ret_in > 0);
  ------------------
  |  Branch (454:12): [True: 4.42k, False: 4.15k]
  ------------------
  455|       |
  456|       |  /* Now send a response to the request that the client just made. */
  457|  4.15k|  FV_PRINTF(fuzz,
  ------------------
  |  |  530|  4.15k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 4.15k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  458|  4.15k|            "FUZZ[%d]: Sending next response: %d \n",
  459|  4.15k|            sman->index,
  460|  4.15k|            sman->response_index);
  461|  4.15k|  data = sman->responses[sman->response_index].data;
  462|  4.15k|  data_len = sman->responses[sman->response_index].data_len;
  463|       |
  464|  4.15k|  if(data != NULL) {
  ------------------
  |  Branch (464:6): [True: 4.15k, False: 0]
  ------------------
  465|  4.15k|    if(write(sman->fd, data, data_len) != (ssize_t)data_len) {
  ------------------
  |  Branch (465:8): [True: 85, False: 4.07k]
  ------------------
  466|       |      /* Failed to write the data back to the client. Prevent any further
  467|       |         testing. */
  468|     85|      rc = -1;
  469|     85|    }
  470|  4.15k|  }
  471|       |
  472|       |  /* Work out if there are any more responses. If not, then shut down the
  473|       |     server. */
  474|  4.15k|  sman->response_index++;
  475|       |
  476|  4.15k|  if(sman->response_index >= TLV_MAX_NUM_RESPONSES ||
  ------------------
  |  |  298|  8.31k|#define TLV_MAX_NUM_RESPONSES           11
  ------------------
  |  Branch (476:6): [True: 0, False: 4.15k]
  ------------------
  477|  4.15k|     sman->responses[sman->response_index].data == NULL) {
  ------------------
  |  Branch (477:6): [True: 3.51k, False: 638]
  ------------------
  478|  3.51k|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|  3.51k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 3.51k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  479|  3.51k|              "FUZZ[%d]: Shutting down server socket: %d \n",
  480|  3.51k|              sman->index,
  481|  3.51k|              sman->fd);
  482|  3.51k|    shutdown(sman->fd, SHUT_WR);
  483|  3.51k|    sman->fd_state = FUZZ_SOCK_SHUTDOWN;
  484|  3.51k|  }
  485|       |
  486|  4.15k|  return(rc);
  487|  4.15k|}
_Z11fuzz_selectiP6fd_setS0_S0_P7timeval:
  496|   684k|                struct timeval *timeout) {
  497|   684k|  return select(nfds, readfds, writefds, exceptfds, timeout);
  498|   684k|}
_Z26fuzz_set_allowed_protocolsP9fuzz_data:
  506|  15.3k|{
  507|  15.3k|  int rc = 0;
  508|  15.3k|  const char *allowed_protocols = "";
  509|       |
  510|       |#ifdef FUZZ_PROTOCOLS_ALL
  511|       |  /* Do not allow telnet currently as it accepts input from stdin. */
  512|       |  allowed_protocols =
  513|       |    "dict,file,ftp,ftps,gopher,gophers,http,https,imap,imaps,"
  514|       |    "mqtt,pop3,pop3s,"
  515|       |    "ldap,ldaps,"
  516|       |    "rtmp,rtmpe,rtmps,rtmpt,rtmpte,rtmpts,"
  517|       |    "scp,"
  518|       |    "sftp,"
  519|       |    "rtsp,smb,smbs,smtp,smtps,tftp,"
  520|       |    "ws,wss";
  521|       |#endif
  522|       |#ifdef FUZZ_PROTOCOLS_DICT
  523|       |  allowed_protocols = "dict";
  524|       |#endif
  525|       |#ifdef FUZZ_PROTOCOLS_FILE
  526|       |  allowed_protocols = "file";
  527|       |#endif
  528|       |#ifdef FUZZ_PROTOCOLS_FTP
  529|       |  allowed_protocols = "ftp,ftps";
  530|       |#endif
  531|       |#ifdef FUZZ_PROTOCOLS_GOPHER
  532|       |  allowed_protocols = "gopher,gophers";
  533|       |#endif
  534|       |#ifdef FUZZ_PROTOCOLS_HTTP
  535|       |  allowed_protocols = "http";
  536|       |#endif
  537|       |#ifdef FUZZ_PROTOCOLS_HTTPS
  538|       |  allowed_protocols = "https";
  539|       |#endif
  540|       |#ifdef FUZZ_PROTOCOLS_IMAP
  541|       |  allowed_protocols = "imap,imaps";
  542|       |#endif
  543|       |#ifdef FUZZ_PROTOCOLS_LDAP
  544|       |  allowed_protocols = "ldap,ldaps";
  545|       |#endif
  546|       |#ifdef FUZZ_PROTOCOLS_MQTT
  547|       |  allowed_protocols = "mqtt";
  548|       |#endif
  549|       |#ifdef FUZZ_PROTOCOLS_POP3
  550|       |  allowed_protocols = "pop3,pop3s";
  551|       |#endif
  552|       |#ifdef FUZZ_PROTOCOLS_RTMP
  553|       |  allowed_protocols = "rtmp,rtmpe,rtmps,rtmpt,rtmpte,rtmpts";
  554|       |#endif
  555|  15.3k|#ifdef FUZZ_PROTOCOLS_RTSP
  556|  15.3k|  allowed_protocols = "rtsp";
  557|  15.3k|#endif
  558|       |#ifdef FUZZ_PROTOCOLS_SCP
  559|       |  allowed_protocols = "scp";
  560|       |#endif
  561|       |#ifdef FUZZ_PROTOCOLS_SFTP
  562|       |  allowed_protocols = "sftp";
  563|       |#endif
  564|       |#ifdef FUZZ_PROTOCOLS_SMB
  565|       |  allowed_protocols = "smb,smbs";
  566|       |#endif
  567|       |#ifdef FUZZ_PROTOCOLS_SMTP
  568|       |  allowed_protocols = "smtp,smtps";
  569|       |#endif
  570|       |#ifdef FUZZ_PROTOCOLS_TFTP
  571|       |  allowed_protocols = "tftp";
  572|       |#endif
  573|       |#ifdef FUZZ_PROTOCOLS_WS
  574|       |  // http is required by websockets
  575|       |  allowed_protocols = "http,ws,wss";
  576|       |  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_CONNECT_ONLY, 2L));
  577|       |#endif
  578|       |
  579|  15.3k|  FTRY(curl_easy_setopt(fuzz->easy, CURLOPT_PROTOCOLS_STR, allowed_protocols));
  ------------------
  |  |  480|  15.3k|        {                                                                     \
  |  |  481|  15.3k|          int _func_rc = (FUNC);                                              \
  |  |  482|  15.3k|          if (_func_rc)                                                       \
  |  |  ------------------
  |  |  |  Branch (482:15): [True: 0, False: 15.3k]
  |  |  ------------------
  |  |  483|  15.3k|          {                                                                   \
  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  486|      0|          }                                                                   \
  |  |  487|  15.3k|        }
  ------------------
  580|       |
  581|  15.3k|EXIT_LABEL:
  582|       |
  583|  15.3k|  return rc;
  584|  15.3k|}

_Z16fuzz_open_socketPv12curlsocktypeP13curl_sockaddr:
   42|  10.2k|{
   43|  10.2k|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
   44|  10.2k|  int fds[2];
   45|  10.2k|  int flags;
   46|  10.2k|  int status;
   47|  10.2k|  const uint8_t *data;
   48|  10.2k|  size_t data_len;
   49|  10.2k|  struct sockaddr_un client_addr;
   50|  10.2k|  FUZZ_SOCKET_MANAGER *sman;
   51|       |
   52|       |  /* Handle unused parameters */
   53|  10.2k|  (void)purpose;
   54|  10.2k|  (void)address;
   55|       |
   56|  10.2k|  if(fuzz->sockman[0].fd_state != FUZZ_SOCK_CLOSED &&
  ------------------
  |  Branch (56:6): [True: 238, False: 9.97k]
  ------------------
   57|    238|     fuzz->sockman[1].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (57:6): [True: 29, False: 209]
  ------------------
   58|       |    /* Both sockets have already been opened. */
   59|     29|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|     29|#define CURL_SOCKET_BAD (-1)
  ------------------
   60|     29|  }
   61|  10.1k|  else if(fuzz->sockman[0].fd_state != FUZZ_SOCK_CLOSED) {
  ------------------
  |  Branch (61:11): [True: 209, False: 9.97k]
  ------------------
   62|    209|    sman = &fuzz->sockman[1];
   63|    209|  }
   64|  9.97k|  else {
   65|  9.97k|    FV_PRINTF(fuzz, "FUZZ: Using socket manager 0 \n");
  ------------------
  |  |  530|  9.97k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 9.97k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   66|  9.97k|    sman = &fuzz->sockman[0];
   67|  9.97k|  }
   68|  10.1k|  FV_PRINTF(fuzz, "FUZZ[%d]: Using socket manager %d \n",
  ------------------
  |  |  530|  10.1k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 10.1k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   69|  10.1k|            sman->index,
   70|  10.1k|            sman->index);
   71|       |
   72|  10.1k|  if(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) {
  ------------------
  |  Branch (72:6): [True: 0, False: 10.1k]
  ------------------
   73|       |    /* Failed to create a pair of sockets. */
   74|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   75|      0|  }
   76|       |
   77|  10.1k|  if(!FUZZ_VALID_SOCK(fds[0]) || !FUZZ_VALID_SOCK(fds[1])) {
  ------------------
  |  |   34|  20.3k|#define FUZZ_VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
  |  |  ------------------
  |  |  |  Branch (34:29): [True: 10.1k, False: 0]
  |  |  |  Branch (34:43): [True: 10.1k, False: 0]
  |  |  ------------------
  ------------------
                if(!FUZZ_VALID_SOCK(fds[0]) || !FUZZ_VALID_SOCK(fds[1])) {
  ------------------
  |  |   34|  10.1k|#define FUZZ_VALID_SOCK(s) (((s) >= 0) && ((s) < FD_SETSIZE))
  |  |  ------------------
  |  |  |  Branch (34:29): [True: 10.1k, False: 0]
  |  |  |  Branch (34:43): [True: 10.1k, False: 0]
  |  |  ------------------
  ------------------
   78|       |    /* One or more of the file descriptors is too large to fit in an fd_set,
   79|       |       so reject it here. Print out a message because this ought to be quite
   80|       |       rare. */
   81|      0|    printf("FUZZ[%d]: Not using file descriptors %d,%d as FD_SETSIZE is %d\n",
   82|      0|           sman->index,
   83|      0|           fds[0],
   84|      0|           fds[1],
   85|      0|           FD_SETSIZE);
   86|       |
   87|       |    /* Close the file descriptors so they don't leak. */
   88|      0|    close(fds[0]);
   89|      0|    close(fds[1]);
   90|       |
   91|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
   92|      0|  }
   93|       |
   94|       |  /* Make the server non-blocking. */
   95|  10.1k|  flags = fcntl(fds[0], F_GETFL, 0);
   96|  10.1k|  status = fcntl(fds[0], F_SETFL, flags | O_NONBLOCK);
   97|       |
   98|  10.1k|  if(status == -1) {
  ------------------
  |  Branch (98:6): [True: 0, False: 10.1k]
  ------------------
   99|       |    /* Close the file descriptors so they don't leak. */
  100|      0|    close(fds[0]);
  101|      0|    close(fds[1]);
  102|       |
  103|       |    /* Setting non-blocking failed. Return a negative response code. */
  104|      0|    return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      0|#define CURL_SOCKET_BAD (-1)
  ------------------
  105|      0|  }
  106|       |
  107|       |  /* At this point, the file descriptors in hand should be good enough to
  108|       |     work with. */
  109|  10.1k|  sman->fd = fds[0];
  110|  10.1k|  sman->fd_state = FUZZ_SOCK_OPEN;
  111|       |
  112|       |  /* If the server should be sending data immediately, send it here. */
  113|  10.1k|  data = sman->responses[0].data;
  114|  10.1k|  data_len = sman->responses[0].data_len;
  115|       |
  116|  10.1k|  if(data != NULL) {
  ------------------
  |  Branch (116:6): [True: 2.62k, False: 7.56k]
  ------------------
  117|  2.62k|    FV_PRINTF(fuzz, "FUZZ[%d]: Sending initial response \n", sman->index);
  ------------------
  |  |  530|  2.62k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 2.62k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  118|       |
  119|  2.62k|    if(write(sman->fd, data, data_len) != (ssize_t)data_len) {
  ------------------
  |  Branch (119:8): [True: 1, False: 2.62k]
  ------------------
  120|       |      /* Close the file descriptors so they don't leak. */
  121|      1|      close(sman->fd);
  122|      1|      sman->fd = -1;
  123|       |
  124|      1|      close(fds[1]);
  125|       |
  126|       |      /* Failed to write all of the response data. */
  127|      1|      return CURL_SOCKET_BAD;
  ------------------
  |  |  145|      1|#define CURL_SOCKET_BAD (-1)
  ------------------
  128|      1|    }
  129|  2.62k|  }
  130|       |
  131|       |  /* Check to see if the socket should be shut down immediately. */
  132|  10.1k|  if(sman->responses[1].data == NULL) {
  ------------------
  |  Branch (132:6): [True: 6.26k, False: 3.91k]
  ------------------
  133|  6.26k|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|  6.26k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 6.26k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  134|  6.26k|              "FUZZ[%d]: Shutting down server socket: %d \n",
  135|  6.26k|              sman->index,
  136|  6.26k|              sman->fd);
  137|  6.26k|    shutdown(sman->fd, SHUT_WR);
  138|  6.26k|    sman->fd_state = FUZZ_SOCK_SHUTDOWN;
  139|  6.26k|  }
  140|       |
  141|       |  /* Return the other half of the socket pair. */
  142|  10.1k|  return fds[1];
  143|  10.1k|}
_Z21fuzz_sockopt_callbackPvi12curlsocktype:
  152|  10.1k|{
  153|  10.1k|  (void)ptr;
  154|  10.1k|  (void)curlfd;
  155|  10.1k|  (void)purpose;
  156|       |
  157|  10.1k|  return CURL_SOCKOPT_ALREADY_CONNECTED;
  ------------------
  |  |  421|  10.1k|#define CURL_SOCKOPT_ALREADY_CONNECTED 2
  ------------------
  158|  10.1k|}
_Z18fuzz_read_callbackPcmmPv:
  167|    158|{
  168|    158|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
  169|    158|  size_t remaining_data;
  170|    158|  size_t buffer_size = size * nitems;
  171|       |
  172|       |  /* If no upload data has been specified, then return an error code. */
  173|    158|  if(fuzz->upload1_data_len == 0) {
  ------------------
  |  Branch (173:6): [True: 0, False: 158]
  ------------------
  174|       |    /* No data to upload */
  175|      0|    return CURL_READFUNC_ABORT;
  ------------------
  |  |  390|      0|#define CURL_READFUNC_ABORT 0x10000000
  ------------------
  176|      0|  }
  177|       |
  178|       |  /* Work out how much data is remaining to upload. */
  179|    158|  remaining_data = fuzz->upload1_data_len - fuzz->upload1_data_written;
  180|       |
  181|       |  /* Respect the buffer size that libcurl is giving us! */
  182|    158|  if(remaining_data > buffer_size) {
  ------------------
  |  Branch (182:6): [True: 20, False: 138]
  ------------------
  183|     20|    remaining_data = buffer_size;
  184|     20|  }
  185|       |
  186|    158|  if(remaining_data > 0) {
  ------------------
  |  Branch (186:6): [True: 156, False: 2]
  ------------------
  187|    156|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|    156|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 156]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  188|    156|              "FUZZ: Uploading %zu bytes from position %zu \n",
  189|    156|              remaining_data,
  190|    156|              fuzz->upload1_data_written);
  191|       |
  192|       |    /* Send the upload data. */
  193|    156|    memcpy(buffer,
  194|    156|           &fuzz->upload1_data[fuzz->upload1_data_written],
  195|    156|           remaining_data);
  196|       |
  197|       |    /* Increase the count of written data */
  198|    156|    fuzz->upload1_data_written += remaining_data;
  199|    156|  }
  200|       |
  201|    158|  return(remaining_data);
  202|    158|}
_Z19fuzz_write_callbackPvmmS_:
  211|  1.50M|{
  212|  1.50M|  size_t total = size * nmemb;
  213|  1.50M|  FUZZ_DATA *fuzz = (FUZZ_DATA *)ptr;
  214|  1.50M|  size_t copy_len = total;
  215|       |
  216|       |  /* Restrict copy_len to at most TEMP_WRITE_ARRAY_SIZE. */
  217|  1.50M|  if(copy_len > TEMP_WRITE_ARRAY_SIZE) {
  ------------------
  |  |  271|  1.50M|#define TEMP_WRITE_ARRAY_SIZE           10
  ------------------
  |  Branch (217:6): [True: 24.1k, False: 1.48M]
  ------------------
  218|  24.1k|    copy_len = TEMP_WRITE_ARRAY_SIZE;
  ------------------
  |  |  271|  24.1k|#define TEMP_WRITE_ARRAY_SIZE           10
  ------------------
  219|  24.1k|  }
  220|       |
  221|       |  /* Copy bytes to the temp store just to ensure the parameters are
  222|       |     exercised. */
  223|  1.50M|  memcpy(fuzz->write_array, contents, copy_len);
  224|       |
  225|       |  /* Add on the total to the count. If it exceeds the maximum then return
  226|       |     zero to the caller so that the transfer is terminated early. */
  227|  1.50M|  fuzz->written_data += total;
  228|       |
  229|  1.50M|  if(fuzz->written_data > MAXIMUM_WRITE_LENGTH) {
  ------------------
  |  |  274|  1.50M|#define MAXIMUM_WRITE_LENGTH            52428800
  ------------------
  |  Branch (229:6): [True: 0, False: 1.50M]
  ------------------
  230|      0|    FV_PRINTF(fuzz,
  ------------------
  |  |  530|      0|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 0]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
  231|      0|              "FUZZ: Exceeded maximum write length (%zu) \n",
  232|      0|              fuzz->written_data);
  233|      0|    total = 0;
  234|      0|  }
  235|       |
  236|  1.50M|  return total;
  237|  1.50M|}

_Z18fuzz_get_first_tlvP9fuzz_dataP3tlv:
   32|  17.9k|{
   33|       |  /* Reset the cursor. */
   34|  17.9k|  fuzz->state.data_pos = 0;
   35|  17.9k|  return fuzz_get_tlv_comn(fuzz, tlv);
   36|  17.9k|}
_Z17fuzz_get_next_tlvP9fuzz_dataP3tlv:
   43|  80.4k|{
   44|       |  /* Advance the cursor by the full length of the previous TLV. */
   45|  80.4k|  fuzz->state.data_pos += sizeof(TLV_RAW) + tlv->length;
   46|       |
   47|       |  /* Work out if there's a TLV's worth of data to read */
   48|  80.4k|  if(fuzz->state.data_pos + sizeof(TLV_RAW) > fuzz->state.data_len) {
  ------------------
  |  Branch (48:6): [True: 15.6k, False: 64.7k]
  ------------------
   49|       |    /* No more TLVs to parse */
   50|  15.6k|    return TLV_RC_NO_MORE_TLVS;
  ------------------
  |  |  267|  15.6k|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
   51|  15.6k|  }
   52|       |
   53|  64.7k|  return fuzz_get_tlv_comn(fuzz, tlv);
   54|  80.4k|}
_Z17fuzz_get_tlv_comnP9fuzz_dataP3tlv:
   61|  82.7k|{
   62|  82.7k|  int rc = 0;
   63|  82.7k|  size_t data_offset;
   64|  82.7k|  TLV_RAW *raw;
   65|       |
   66|       |  /* Start by casting the data stream to a TLV. */
   67|  82.7k|  raw = (TLV_RAW *)&fuzz->state.data[fuzz->state.data_pos];
   68|  82.7k|  data_offset = fuzz->state.data_pos + sizeof(TLV_RAW);
   69|       |
   70|       |  /* Set the TLV values. */
   71|  82.7k|  tlv->type = to_u16(raw->raw_type);
   72|  82.7k|  tlv->length = to_u32(raw->raw_length);
   73|  82.7k|  tlv->value = &fuzz->state.data[data_offset];
   74|       |
   75|  82.7k|  FV_PRINTF(fuzz, "TLV: type %x length %u\n", tlv->type, tlv->length);
  ------------------
  |  |  530|  82.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 82.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   76|       |
   77|       |  /* Use uint64s to verify lengths of TLVs so that overflow problems don't
   78|       |     matter. */
   79|  82.7k|  uint64_t check_length = data_offset;
   80|  82.7k|  check_length += tlv->length;
   81|       |
   82|  82.7k|  uint64_t remaining_len = fuzz->state.data_len;
   83|  82.7k|  FV_PRINTF(fuzz, "Check length of data: %" PRIu64 " \n", check_length);
  ------------------
  |  |  530|  82.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 82.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   84|  82.7k|  FV_PRINTF(fuzz, "Remaining length of data: %" PRIu64 " \n", remaining_len);
  ------------------
  |  |  530|  82.7k|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 82.7k]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   85|       |
   86|       |  /* Sanity check that the TLV length is ok. */
   87|  82.7k|  if(check_length > remaining_len) {
  ------------------
  |  Branch (87:6): [True: 476, False: 82.2k]
  ------------------
   88|    476|    FV_PRINTF(fuzz, "Returning TLV_RC_SIZE_ERROR\n");
  ------------------
  |  |  530|    476|        if((FUZZP)->verbose) {                                                \
  |  |  ------------------
  |  |  |  Branch (530:12): [True: 0, False: 476]
  |  |  ------------------
  |  |  531|      0|          printf(__VA_ARGS__);                                                \
  |  |  532|      0|        }
  ------------------
   89|    476|    rc = TLV_RC_SIZE_ERROR;
  ------------------
  |  |  268|    476|#define TLV_RC_SIZE_ERROR               2
  ------------------
   90|    476|  }
   91|       |
   92|  82.7k|  return rc;
   93|  82.7k|}
_Z14fuzz_parse_tlvP9fuzz_dataP3tlv:
   99|  81.1k|{
  100|  81.1k|  int rc;
  101|  81.1k|  char *tmp = NULL;
  102|  81.1k|  uint32_t tmp_u32;
  103|  81.1k|  curl_slist *new_list;
  104|       |
  105|  81.1k|  switch(tlv->type) {
  106|       |    /* The pointers in response TLVs will always be valid as long as the fuzz
  107|       |       data is in scope, which is the entirety of this file. */
  108|  2.83k|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE0, 0);
  ------------------
  |  |  513|  2.83k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 2.83k, False: 78.3k]
  |  |  ------------------
  |  |  514|  2.83k|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|  2.83k|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|  2.83k|          break
  ------------------
  109|  4.16k|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE1, 1);
  ------------------
  |  |  513|  4.16k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 4.16k, False: 76.9k]
  |  |  ------------------
  |  |  514|  4.16k|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|  4.16k|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|  4.16k|          break
  ------------------
  110|  1.01k|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE2, 2);
  ------------------
  |  |  513|  1.01k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 1.01k, False: 80.1k]
  |  |  ------------------
  |  |  514|  1.01k|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|  1.01k|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|  1.01k|          break
  ------------------
  111|    257|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE3, 3);
  ------------------
  |  |  513|    257|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 257, False: 80.8k]
  |  |  ------------------
  |  |  514|    257|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    257|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    257|          break
  ------------------
  112|    212|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE4, 4);
  ------------------
  |  |  513|    212|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 212, False: 80.9k]
  |  |  ------------------
  |  |  514|    212|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    212|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    212|          break
  ------------------
  113|    239|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE5, 5);
  ------------------
  |  |  513|    239|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 239, False: 80.9k]
  |  |  ------------------
  |  |  514|    239|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    239|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    239|          break
  ------------------
  114|    225|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE6, 6);
  ------------------
  |  |  513|    225|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 225, False: 80.9k]
  |  |  ------------------
  |  |  514|    225|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    225|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    225|          break
  ------------------
  115|    216|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE7, 7);
  ------------------
  |  |  513|    216|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 216, False: 80.9k]
  |  |  ------------------
  |  |  514|    216|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    216|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    216|          break
  ------------------
  116|    200|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE8, 8);
  ------------------
  |  |  513|    200|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 200, False: 80.9k]
  |  |  ------------------
  |  |  514|    200|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    200|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    200|          break
  ------------------
  117|    291|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE9, 9);
  ------------------
  |  |  513|    291|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 291, False: 80.8k]
  |  |  ------------------
  |  |  514|    291|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    291|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    291|          break
  ------------------
  118|    194|    FRESPONSETLV(&fuzz->sockman[0], TLV_TYPE_RESPONSE10, 10);
  ------------------
  |  |  513|    194|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 194, False: 80.9k]
  |  |  ------------------
  |  |  514|    194|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    194|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    194|          break
  ------------------
  119|       |
  120|    236|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE0, 0);
  ------------------
  |  |  513|    236|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 236, False: 80.9k]
  |  |  ------------------
  |  |  514|    236|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    236|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    236|          break
  ------------------
  121|    496|    FRESPONSETLV(&fuzz->sockman[1], TLV_TYPE_SECOND_RESPONSE1, 1);
  ------------------
  |  |  513|    496|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (513:9): [True: 496, False: 80.6k]
  |  |  ------------------
  |  |  514|    496|          (SMAN)->responses[(INDEX)].data = tlv->value;                       \
  |  |  515|    496|          (SMAN)->responses[(INDEX)].data_len = tlv->length;                  \
  |  |  516|    496|          break
  ------------------
  122|       |
  123|    277|    case TLV_TYPE_UPLOAD1:
  ------------------
  |  |   36|    277|#define TLV_TYPE_UPLOAD1                        8
  ------------------
  |  Branch (123:5): [True: 277, False: 80.8k]
  ------------------
  124|       |      /* The pointers in the TLV will always be valid as long as the fuzz data
  125|       |         is in scope, which is the entirety of this file. */
  126|       |
  127|    277|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_UPLOAD);
  ------------------
  |  |  503|    277|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|    277|        {                                                                     \
  |  |  |  |  491|    277|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 2, False: 275]
  |  |  |  |  ------------------
  |  |  |  |  492|    277|          {                                                                   \
  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  496|    277|        }
  |  |  ------------------
  ------------------
  128|       |
  129|    275|      fuzz->upload1_data = tlv->value;
  130|    275|      fuzz->upload1_data_len = tlv->length;
  131|       |
  132|    275|      FSET_OPTION(fuzz, CURLOPT_UPLOAD, 1L);
  ------------------
  |  |  499|    275|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|    275|        {                                                                     \
  |  |  |  |  481|    275|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|    275|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 275]
  |  |  |  |  ------------------
  |  |  |  |  483|    275|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|    275|        }
  |  |  ------------------
  |  |  500|    275|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  133|    275|      FSET_OPTION(fuzz,
  ------------------
  |  |  499|    275|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|    275|        {                                                                     \
  |  |  |  |  481|    275|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|    275|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 275]
  |  |  |  |  ------------------
  |  |  |  |  483|    275|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|    275|        }
  |  |  ------------------
  |  |  500|    275|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  134|    275|                  CURLOPT_INFILESIZE_LARGE,
  135|    275|                  (curl_off_t)fuzz->upload1_data_len);
  136|    275|      break;
  137|       |
  138|  18.9k|    case TLV_TYPE_HEADER:
  ------------------
  |  |   34|  18.9k|#define TLV_TYPE_HEADER                         6
  ------------------
  |  Branch (138:5): [True: 18.9k, False: 62.2k]
  ------------------
  139|       |      /* Limit the number of headers that can be added to a message to prevent
  140|       |         timeouts. */
  141|  18.9k|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|  18.9k|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (141:10): [True: 1, False: 18.9k]
  ------------------
  142|      1|        rc = 255;
  143|      1|        goto EXIT_LABEL;
  144|      1|      }
  145|       |
  146|  18.9k|      tmp = fuzz_tlv_to_string(tlv);
  147|  18.9k|      if (tmp == NULL) {
  ------------------
  |  Branch (147:11): [True: 0, False: 18.9k]
  ------------------
  148|       |        // keep on despite allocation failure
  149|      0|        break;
  150|      0|      }
  151|  18.9k|      new_list = curl_slist_append(fuzz->header_list, tmp);
  152|  18.9k|      if (new_list == NULL) {
  ------------------
  |  Branch (152:11): [True: 0, False: 18.9k]
  ------------------
  153|      0|        break;
  154|      0|      }
  155|  18.9k|      fuzz->header_list = new_list;
  156|  18.9k|      fuzz->header_list_count++;
  157|  18.9k|      break;
  158|       |
  159|    974|    case TLV_TYPE_MAIL_RECIPIENT:
  ------------------
  |  |   39|    974|#define TLV_TYPE_MAIL_RECIPIENT                 11
  ------------------
  |  Branch (159:5): [True: 974, False: 80.1k]
  ------------------
  160|       |      /* Limit the number of headers that can be added to a message to prevent
  161|       |         timeouts. */
  162|    974|      if(fuzz->header_list_count >= TLV_MAX_NUM_CURLOPT_HEADER) {
  ------------------
  |  |  301|    974|#define TLV_MAX_NUM_CURLOPT_HEADER      2000
  ------------------
  |  Branch (162:10): [True: 1, False: 973]
  ------------------
  163|      1|        rc = 255;
  164|      1|        goto EXIT_LABEL;
  165|      1|      }
  166|    973|      tmp = fuzz_tlv_to_string(tlv);
  167|    973|      if (tmp == NULL) {
  ------------------
  |  Branch (167:11): [True: 0, False: 973]
  ------------------
  168|       |        // keep on despite allocation failure
  169|      0|        break;
  170|      0|      }
  171|    973|      new_list = curl_slist_append(fuzz->mail_recipients_list, tmp);
  172|    973|      if (new_list != NULL) {
  ------------------
  |  Branch (172:11): [True: 973, False: 0]
  ------------------
  173|    973|        fuzz->mail_recipients_list = new_list;
  174|    973|        fuzz->header_list_count++;
  175|    973|      }
  176|    973|      break;
  177|       |
  178|  2.89k|    case TLV_TYPE_MIME_PART:
  ------------------
  |  |   41|  2.89k|#define TLV_TYPE_MIME_PART                      13
  ------------------
  |  Branch (178:5): [True: 2.89k, False: 78.2k]
  ------------------
  179|  2.89k|      if(fuzz->mime == NULL) {
  ------------------
  |  Branch (179:10): [True: 353, False: 2.54k]
  ------------------
  180|    353|        fuzz->mime = curl_mime_init(fuzz->easy);
  181|    353|      }
  182|       |
  183|  2.89k|      fuzz->part = curl_mime_addpart(fuzz->mime);
  184|       |
  185|       |      /* This TLV may have sub TLVs. */
  186|  2.89k|      fuzz_add_mime_part(tlv, fuzz->part);
  187|       |
  188|  2.89k|      break;
  189|       |
  190|    312|    case TLV_TYPE_POSTFIELDS:
  ------------------
  |  |   33|    312|#define TLV_TYPE_POSTFIELDS                     5
  ------------------
  |  Branch (190:5): [True: 312, False: 80.8k]
  ------------------
  191|    312|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_POSTFIELDS);
  ------------------
  |  |  503|    312|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|    312|        {                                                                     \
  |  |  |  |  491|    312|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 311]
  |  |  |  |  ------------------
  |  |  |  |  492|    312|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|    312|        }
  |  |  ------------------
  ------------------
  192|    311|      fuzz->postfields = fuzz_tlv_to_string(tlv);
  193|    311|      FSET_OPTION(fuzz, CURLOPT_POSTFIELDS, fuzz->postfields);
  ------------------
  |  |  499|    311|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|    311|        {                                                                     \
  |  |  |  |  481|    311|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|    311|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 311]
  |  |  |  |  ------------------
  |  |  |  |  483|    311|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|    311|        }
  |  |  ------------------
  |  |  500|    311|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  194|    311|      break;
  195|       |
  196|    124|    case TLV_TYPE_HTTPPOSTBODY:
  ------------------
  |  |   80|    124|#define TLV_TYPE_HTTPPOSTBODY                   52
  ------------------
  |  Branch (196:5): [True: 124, False: 81.0k]
  ------------------
  197|    124|      FCHECK_OPTION_UNSET(fuzz, CURLOPT_HTTPPOST);
  ------------------
  |  |  503|    124|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  ------------------
  |  |  |  |  490|    124|        {                                                                     \
  |  |  |  |  491|    124|          if (!(COND))                                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (491:15): [True: 1, False: 123]
  |  |  |  |  ------------------
  |  |  |  |  492|    124|          {                                                                   \
  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  496|    124|        }
  |  |  ------------------
  ------------------
  198|    123|      fuzz_setup_http_post(fuzz, tlv);
  199|    123|      FSET_OPTION(fuzz, CURLOPT_HTTPPOST, fuzz->httppost);
  ------------------
  |  |  499|    123|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  ------------------
  |  |  |  |  480|    123|        {                                                                     \
  |  |  |  |  481|    123|          int _func_rc = (FUNC);                                              \
  |  |  |  |  482|    123|          if (_func_rc)                                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (482:15): [True: 0, False: 123]
  |  |  |  |  ------------------
  |  |  |  |  483|    123|          {                                                                   \
  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  487|    123|        }
  |  |  ------------------
  |  |  500|    123|        (FUZZP)->options[OPTNAME % 1000] = 1
  ------------------
  200|    123|      break;
  201|       |
  202|       |    /* Define a set of u32 options. */
  203|  3.36k|    FU32TLV(fuzz, TLV_TYPE_HTTPAUTH, CURLOPT_HTTPAUTH);
  ------------------
  |  |  519|  1.12k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 1.12k, False: 80.0k]
  |  |  ------------------
  |  |  520|  1.12k|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 1.12k]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|  1.12k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.12k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.12k|        {                                                                     \
  |  |  |  |  |  |  491|  1.12k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.12k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.12k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.12k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|  1.12k|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|  1.12k|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|  1.12k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.12k|        {                                                                     \
  |  |  |  |  |  |  481|  1.12k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.12k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 1.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.12k|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|  1.12k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.11k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|  1.11k|          break
  ------------------
  204|    108|    FU32TLV(fuzz, TLV_TYPE_OPTHEADER, CURLOPT_HEADER);
  ------------------
  |  |  519|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 39, False: 81.1k]
  |  |  ------------------
  |  |  520|     39|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 35]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     39|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     35|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     35|        {                                                                     \
  |  |  |  |  |  |  491|     35|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     35|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     35|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     34|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     34|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     34|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     34|        {                                                                     \
  |  |  |  |  |  |  481|     34|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     34|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     34|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     34|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     34|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     34|          break
  ------------------
  205|    561|    FU32TLV(fuzz, TLV_TYPE_NOBODY, CURLOPT_NOBODY);
  ------------------
  |  |  519|    188|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 188, False: 80.9k]
  |  |  ------------------
  |  |  520|    188|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 187]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    188|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    187|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    187|        {                                                                     \
  |  |  |  |  |  |  491|    187|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 186]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    187|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    187|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    186|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    186|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    186|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    186|        {                                                                     \
  |  |  |  |  |  |  481|    186|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    186|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 186]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    186|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    186|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    186|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    186|          break
  ------------------
  206|  5.22k|    FU32TLV(fuzz, TLV_TYPE_FOLLOWLOCATION, CURLOPT_FOLLOWLOCATION);
  ------------------
  |  |  519|  1.74k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 1.74k, False: 79.4k]
  |  |  ------------------
  |  |  520|  1.74k|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 1.73k]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|  1.74k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.73k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.73k|        {                                                                     \
  |  |  |  |  |  |  491|  1.73k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.73k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.73k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.73k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|  1.73k|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|  1.73k|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|  1.73k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.73k|        {                                                                     \
  |  |  |  |  |  |  481|  1.73k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.73k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 12, False: 1.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.73k|          {                                                                   \
  |  |  |  |  |  |  484|     12|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     12|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     12|          }                                                                   \
  |  |  |  |  |  |  487|  1.73k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.72k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|  1.72k|          break
  ------------------
  207|     28|    FU32TLV(fuzz, TLV_TYPE_WILDCARDMATCH, CURLOPT_WILDCARDMATCH);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 8]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      7|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      7|          break
  ------------------
  208|  6.84k|    FU32TLV(fuzz, TLV_TYPE_RTSP_REQUEST, CURLOPT_RTSP_REQUEST);
  ------------------
  |  |  519|  2.28k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 2.28k, False: 78.8k]
  |  |  ------------------
  |  |  520|  2.28k|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 2.28k]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|  2.28k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  2.28k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  2.28k|        {                                                                     \
  |  |  |  |  |  |  491|  2.28k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  2.28k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  2.28k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|  2.27k|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|  2.27k|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|  2.27k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  2.27k|        {                                                                     \
  |  |  |  |  |  |  481|  2.27k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  2.27k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 28, False: 2.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  2.27k|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|  2.27k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  2.25k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|  2.25k|          break
  ------------------
  209|    328|    FU32TLV(fuzz, TLV_TYPE_RTSP_CLIENT_CSEQ, CURLOPT_RTSP_CLIENT_CSEQ);
  ------------------
  |  |  519|    115|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 115, False: 81.0k]
  |  |  ------------------
  |  |  520|    115|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 107]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|    115|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    107|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    107|        {                                                                     \
  |  |  |  |  |  |  491|    107|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 106]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    107|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    107|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    106|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    106|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    106|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    106|        {                                                                     \
  |  |  |  |  |  |  481|    106|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    106|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 106]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    106|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    106|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    106|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    106|          break
  ------------------
  210|    148|    FU32TLV(fuzz, TLV_TYPE_HTTP_VERSION, CURLOPT_HTTP_VERSION);
  ------------------
  |  |  519|     51|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 51, False: 81.1k]
  |  |  ------------------
  |  |  520|     51|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 49]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     51|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     49|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     49|        {                                                                     \
  |  |  |  |  |  |  491|     49|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 48]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     49|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     49|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     48|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     48|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     48|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     48|        {                                                                     \
  |  |  |  |  |  |  481|     48|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     48|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 38, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     48|          {                                                                   \
  |  |  |  |  |  |  484|     38|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     38|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     38|          }                                                                   \
  |  |  |  |  |  |  487|     48|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     10|          break
  ------------------
  211|    664|    FU32TLV(fuzz, TLV_TYPE_NETRC, CURLOPT_NETRC);
  ------------------
  |  |  519|    223|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 223, False: 80.9k]
  |  |  ------------------
  |  |  520|    223|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 221]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    223|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    221|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    221|        {                                                                     \
  |  |  |  |  |  |  491|    221|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 220]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    221|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    221|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    220|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    220|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    220|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    220|        {                                                                     \
  |  |  |  |  |  |  481|    220|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    220|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 34, False: 186]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    220|          {                                                                   \
  |  |  |  |  |  |  484|     34|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     34|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     34|          }                                                                   \
  |  |  |  |  |  |  487|    220|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    186|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    186|          break
  ------------------
  212|     30|    FU32TLV(fuzz, TLV_TYPE_WS_OPTIONS, CURLOPT_WS_OPTIONS);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 9]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      8|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  213|    259|    FU32TLV(fuzz, TLV_TYPE_CONNECT_ONLY, CURLOPT_CONNECT_ONLY);
  ------------------
  |  |  519|     88|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 88, False: 81.0k]
  |  |  ------------------
  |  |  520|     88|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 86]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     88|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     86|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     86|        {                                                                     \
  |  |  |  |  |  |  491|     86|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 85]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     86|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     86|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     85|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     85|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     85|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     85|        {                                                                     \
  |  |  |  |  |  |  481|     85|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     85|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 27, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     85|          {                                                                   \
  |  |  |  |  |  |  484|     27|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     27|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     27|          }                                                                   \
  |  |  |  |  |  |  487|     85|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     58|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     58|          break
  ------------------
  214|     88|    FU32TLV(fuzz, TLV_TYPE_POST, CURLOPT_POST);
  ------------------
  |  |  519|     31|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 31, False: 81.1k]
  |  |  ------------------
  |  |  520|     31|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 29]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     31|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     29|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     29|        {                                                                     \
  |  |  |  |  |  |  491|     29|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     29|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     29|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     28|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     28|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     28|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     28|        {                                                                     \
  |  |  |  |  |  |  481|     28|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     28|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 28]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     28|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     28|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     28|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     28|          break
  ------------------
  215|  6.72k|    FU32TLV(fuzz, TLV_TYPE_PROXYTYPE, CURLOPT_PROXYTYPE);
  ------------------
  |  |  519|  2.24k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 2.24k, False: 78.9k]
  |  |  ------------------
  |  |  520|  2.24k|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 2.24k]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|  2.24k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  2.24k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  2.24k|        {                                                                     \
  |  |  |  |  |  |  491|  2.24k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  2.24k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  2.24k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|  2.24k|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|  2.24k|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|  2.24k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  2.24k|        {                                                                     \
  |  |  |  |  |  |  481|  2.24k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  2.24k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 2.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  2.24k|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|  2.24k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  2.21k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|  2.21k|          break
  ------------------
  216|    323|    FU32TLV(fuzz, TLV_TYPE_PORT, CURLOPT_PORT);
  ------------------
  |  |  519|    110|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 110, False: 81.0k]
  |  |  ------------------
  |  |  520|    110|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 107]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|    110|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    107|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    107|        {                                                                     \
  |  |  |  |  |  |  491|    107|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 106]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    107|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    107|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    106|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    106|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    106|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    106|        {                                                                     \
  |  |  |  |  |  |  481|    106|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    106|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 29, False: 77]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    106|          {                                                                   \
  |  |  |  |  |  |  484|     29|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     29|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     29|          }                                                                   \
  |  |  |  |  |  |  487|    106|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     77|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     77|          break
  ------------------
  217|    199|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_LIMIT, CURLOPT_LOW_SPEED_LIMIT);
  ------------------
  |  |  519|     68|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 68, False: 81.0k]
  |  |  ------------------
  |  |  520|     68|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 66]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     68|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     66|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     66|        {                                                                     \
  |  |  |  |  |  |  491|     66|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     66|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     66|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     65|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     65|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     65|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     65|        {                                                                     \
  |  |  |  |  |  |  481|     65|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     65|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     65|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     65|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     65|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     65|          break
  ------------------
  218|    321|    FU32TLV(fuzz, TLV_TYPE_LOW_SPEED_TIME, CURLOPT_LOW_SPEED_TIME);
  ------------------
  |  |  519|    112|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 112, False: 81.0k]
  |  |  ------------------
  |  |  520|    112|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 105]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|    112|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    105|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    105|        {                                                                     \
  |  |  |  |  |  |  491|    105|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 104]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    105|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    105|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    104|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    104|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    104|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    104|        {                                                                     \
  |  |  |  |  |  |  481|    104|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    104|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 104]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    104|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    104|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    104|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    104|          break
  ------------------
  219|    298|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM, CURLOPT_RESUME_FROM);
  ------------------
  |  |  519|    101|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 101, False: 81.0k]
  |  |  ------------------
  |  |  520|    101|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 99]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    101|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     99|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     99|        {                                                                     \
  |  |  |  |  |  |  491|     99|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 98]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     99|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     99|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     98|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     98|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     98|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     98|        {                                                                     \
  |  |  |  |  |  |  481|     98|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     98|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 98]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     98|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     98|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     98|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     98|          break
  ------------------
  220|     18|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE, CURLOPT_TIMEVALUE);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 6]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  221|  1.16k|    FU32TLV(fuzz, TLV_TYPE_NOPROGRESS, CURLOPT_NOPROGRESS);
  ------------------
  |  |  519|    392|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 392, False: 80.7k]
  |  |  ------------------
  |  |  520|    392|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 389]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|    392|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    389|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    389|        {                                                                     \
  |  |  |  |  |  |  491|    389|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 388]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    389|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    389|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    388|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    388|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    388|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    388|        {                                                                     \
  |  |  |  |  |  |  481|    388|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    388|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 388]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    388|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    388|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    388|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    388|          break
  ------------------
  222|    179|    FU32TLV(fuzz, TLV_TYPE_FAILONERROR, CURLOPT_FAILONERROR);
  ------------------
  |  |  519|     62|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 62, False: 81.0k]
  |  |  ------------------
  |  |  520|     62|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 59]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     62|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     59|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     59|        {                                                                     \
  |  |  |  |  |  |  491|     59|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     59|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     59|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     58|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     58|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     58|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     58|        {                                                                     \
  |  |  |  |  |  |  481|     58|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     58|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 58]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     58|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     58|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     58|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     58|          break
  ------------------
  223|     16|    FU32TLV(fuzz, TLV_TYPE_DIRLISTONLY, CURLOPT_DIRLISTONLY);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 81.1k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 4]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  224|     13|    FU32TLV(fuzz, TLV_TYPE_APPEND, CURLOPT_APPEND);
  ------------------
  |  |  519|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 6, False: 81.1k]
  |  |  ------------------
  |  |  520|      6|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 4]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  225|  1.26k|    FU32TLV(fuzz, TLV_TYPE_TRANSFERTEXT, CURLOPT_TRANSFERTEXT);
  ------------------
  |  |  519|    421|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 421, False: 80.7k]
  |  |  ------------------
  |  |  520|    421|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 420]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    421|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    420|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    420|        {                                                                     \
  |  |  |  |  |  |  491|    420|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 419]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    420|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    420|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    419|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    419|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    419|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    419|        {                                                                     \
  |  |  |  |  |  |  481|    419|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    419|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 419]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    419|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    419|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    419|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    419|          break
  ------------------
  226|    805|    FU32TLV(fuzz, TLV_TYPE_AUTOREFERER, CURLOPT_AUTOREFERER);
  ------------------
  |  |  519|    274|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 274, False: 80.8k]
  |  |  ------------------
  |  |  520|    274|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 266]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|    274|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    266|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    266|        {                                                                     \
  |  |  |  |  |  |  491|    266|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 265]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    266|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    266|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    265|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    265|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    265|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    265|        {                                                                     \
  |  |  |  |  |  |  481|    265|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    265|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 265]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    265|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    265|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    265|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    265|          break
  ------------------
  227|    185|    FU32TLV(fuzz, TLV_TYPE_PROXYPORT, CURLOPT_PROXYPORT);
  ------------------
  |  |  519|     64|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 64, False: 81.0k]
  |  |  ------------------
  |  |  520|     64|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 61]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     64|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     61|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     61|        {                                                                     \
  |  |  |  |  |  |  491|     61|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     61|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     61|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     60|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     60|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     60|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     60|        {                                                                     \
  |  |  |  |  |  |  481|     60|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     60|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 25, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     60|          {                                                                   \
  |  |  |  |  |  |  484|     25|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     25|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     25|          }                                                                   \
  |  |  |  |  |  |  487|     60|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     35|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     35|          break
  ------------------
  228|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE, CURLOPT_POSTFIELDSIZE);
  229|     23|    FU32TLV(fuzz, TLV_TYPE_HTTPPROXYTUNNEL, CURLOPT_HTTPPROXYTUNNEL);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 81.1k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 7]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  230|     20|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYPEER, CURLOPT_SSL_VERIFYPEER);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 81.1k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 6]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  231|    641|    FU32TLV(fuzz, TLV_TYPE_MAXREDIRS, CURLOPT_MAXREDIRS);
  ------------------
  |  |  519|    216|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 216, False: 80.9k]
  |  |  ------------------
  |  |  520|    216|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 213]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|    216|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    213|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    213|        {                                                                     \
  |  |  |  |  |  |  491|    213|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 212]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    213|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    213|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    212|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    212|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    212|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    212|        {                                                                     \
  |  |  |  |  |  |  481|    212|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    212|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 212]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    212|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    212|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    212|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    212|          break
  ------------------
  232|     82|    FU32TLV(fuzz, TLV_TYPE_FILETIME, CURLOPT_FILETIME);
  ------------------
  |  |  519|     35|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 35, False: 81.1k]
  |  |  ------------------
  |  |  520|     35|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 24]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     35|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     23|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     23|          break
  ------------------
  233|    186|    FU32TLV(fuzz, TLV_TYPE_MAXCONNECTS, CURLOPT_MAXCONNECTS);
  ------------------
  |  |  519|     65|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 65, False: 81.0k]
  |  |  ------------------
  |  |  520|     65|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 61]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     65|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     61|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     61|        {                                                                     \
  |  |  |  |  |  |  491|     61|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     61|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     61|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     60|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     60|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     60|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     60|        {                                                                     \
  |  |  |  |  |  |  481|     60|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     60|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     60|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     60|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     59|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     59|          break
  ------------------
  234|     43|    FU32TLV(fuzz, TLV_TYPE_FRESH_CONNECT, CURLOPT_FRESH_CONNECT);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 81.1k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 14]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     13|          break
  ------------------
  235|    134|    FU32TLV(fuzz, TLV_TYPE_FORBID_REUSE, CURLOPT_FORBID_REUSE);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 81.1k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 44]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     44|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     44|        {                                                                     \
  |  |  |  |  |  |  491|     44|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     44|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     44|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     43|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     43|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     43|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     43|        {                                                                     \
  |  |  |  |  |  |  481|     43|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     43|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 43]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     43|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     43|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     43|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     43|          break
  ------------------
  236|    472|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT, CURLOPT_CONNECTTIMEOUT);
  ------------------
  |  |  519|    167|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 167, False: 80.9k]
  |  |  ------------------
  |  |  520|    167|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 14, False: 153]
  |  |  ------------------
  |  |  521|     14|            rc = 255;                                                         \
  |  |  522|     14|            goto EXIT_LABEL;                                                  \
  |  |  523|     14|          }                                                                   \
  |  |  524|    167|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    153|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    153|        {                                                                     \
  |  |  |  |  |  |  491|    153|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 152]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    153|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    153|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    152|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    152|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    152|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    152|        {                                                                     \
  |  |  |  |  |  |  481|    152|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    152|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 152]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    152|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    152|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    152|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    152|          break
  ------------------
  237|     19|    FU32TLV(fuzz, TLV_TYPE_HTTPGET, CURLOPT_HTTPGET);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 81.1k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 5]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  238|     22|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYHOST, CURLOPT_SSL_VERIFYHOST);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 81.1k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 7]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  239|     17|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPSV, CURLOPT_FTP_USE_EPSV);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 81.1k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 4]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  240|     27|    FU32TLV(fuzz, TLV_TYPE_SSLENGINE_DEFAULT, CURLOPT_SSLENGINE_DEFAULT);
  ------------------
  |  |  519|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 14, False: 81.1k]
  |  |  ------------------
  |  |  520|     14|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 7]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  241|    402|    FU32TLV(fuzz, TLV_TYPE_DNS_CACHE_TIMEOUT, CURLOPT_DNS_CACHE_TIMEOUT);
  ------------------
  |  |  519|    137|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 137, False: 81.0k]
  |  |  ------------------
  |  |  520|    137|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 133]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    137|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    133|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    133|        {                                                                     \
  |  |  |  |  |  |  491|    133|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 132]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    133|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    133|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    132|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    132|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    132|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    132|        {                                                                     \
  |  |  |  |  |  |  481|    132|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    132|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 132]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    132|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    132|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    132|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    132|          break
  ------------------
  242|     20|    FU32TLV(fuzz, TLV_TYPE_COOKIESESSION, CURLOPT_COOKIESESSION);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 4]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  243|  1.46k|    FU32TLV(fuzz, TLV_TYPE_BUFFERSIZE, CURLOPT_BUFFERSIZE);
  ------------------
  |  |  519|    490|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 490, False: 80.6k]
  |  |  ------------------
  |  |  520|    490|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 489]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    490|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    489|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    489|        {                                                                     \
  |  |  |  |  |  |  491|    489|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 488]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    489|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    489|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    488|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    488|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    488|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    488|        {                                                                     \
  |  |  |  |  |  |  481|    488|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    488|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 488]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    488|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    488|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    488|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    488|          break
  ------------------
  244|     51|    FU32TLV(fuzz, TLV_TYPE_NOSIGNAL, CURLOPT_NOSIGNAL);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 81.1k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 16]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     16|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     16|        {                                                                     \
  |  |  |  |  |  |  491|     16|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     16|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     16|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     15|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     15|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     15|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     15|        {                                                                     \
  |  |  |  |  |  |  481|     15|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     15|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     15|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     15|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     15|          break
  ------------------
  245|    802|    FU32TLV(fuzz, TLV_TYPE_UNRESTRICTED_AUTH, CURLOPT_UNRESTRICTED_AUTH);
  ------------------
  |  |  519|    271|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 271, False: 80.8k]
  |  |  ------------------
  |  |  520|    271|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 266]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|    271|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    266|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    266|        {                                                                     \
  |  |  |  |  |  |  491|    266|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 265]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    266|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    266|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    265|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    265|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    265|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    265|        {                                                                     \
  |  |  |  |  |  |  481|    265|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    265|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 265]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    265|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    265|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    265|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    265|          break
  ------------------
  246|     19|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_EPRT, CURLOPT_FTP_USE_EPRT);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 81.1k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  247|    121|    FU32TLV(fuzz, TLV_TYPE_FTP_CREATE_MISSING_DIRS, CURLOPT_FTP_CREATE_MISSING_DIRS);
  ------------------
  |  |  519|     46|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 46, False: 81.1k]
  |  |  ------------------
  |  |  520|     46|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 38]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     46|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     38|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     38|        {                                                                     \
  |  |  |  |  |  |  491|     38|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     38|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     38|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     37|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     37|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     37|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     37|        {                                                                     \
  |  |  |  |  |  |  481|     37|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     37|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 35, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     37|          {                                                                   \
  |  |  |  |  |  |  484|     35|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     35|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     35|          }                                                                   \
  |  |  |  |  |  |  487|     37|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  248|    360|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE, CURLOPT_MAXFILESIZE);
  ------------------
  |  |  519|    123|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 123, False: 81.0k]
  |  |  ------------------
  |  |  520|    123|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 119]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    123|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    119|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    119|        {                                                                     \
  |  |  |  |  |  |  491|    119|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    119|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    119|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    118|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    118|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    118|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    118|        {                                                                     \
  |  |  |  |  |  |  481|    118|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    118|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 118]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    118|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    118|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    118|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    118|          break
  ------------------
  249|     23|    FU32TLV(fuzz, TLV_TYPE_TCP_NODELAY, CURLOPT_TCP_NODELAY);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 81.1k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 7]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  250|     47|    FU32TLV(fuzz, TLV_TYPE_IGNORE_CONTENT_LENGTH, CURLOPT_IGNORE_CONTENT_LENGTH);
  ------------------
  |  |  519|     24|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 24, False: 81.1k]
  |  |  ------------------
  |  |  520|     24|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 12]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|     24|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     12|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     12|        {                                                                     \
  |  |  |  |  |  |  491|     12|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     12|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     12|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     11|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     11|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     11|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     11|        {                                                                     \
  |  |  |  |  |  |  481|     11|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     11|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     11|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     11|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     11|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     11|          break
  ------------------
  251|     12|    FU32TLV(fuzz, TLV_TYPE_FTP_SKIP_PASV_IP, CURLOPT_FTP_SKIP_PASV_IP);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 81.1k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 4]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  252|    374|    FU32TLV(fuzz, TLV_TYPE_LOCALPORT, CURLOPT_LOCALPORT);
  ------------------
  |  |  519|    131|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 131, False: 81.0k]
  |  |  ------------------
  |  |  520|    131|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 9, False: 122]
  |  |  ------------------
  |  |  521|      9|            rc = 255;                                                         \
  |  |  522|      9|            goto EXIT_LABEL;                                                  \
  |  |  523|      9|          }                                                                   \
  |  |  524|    131|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    122|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    122|        {                                                                     \
  |  |  |  |  |  |  491|    122|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 121]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    122|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    122|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    121|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    121|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    121|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    121|        {                                                                     \
  |  |  |  |  |  |  481|    121|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    121|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    121|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|    121|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     91|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     91|          break
  ------------------
  253|    181|    FU32TLV(fuzz, TLV_TYPE_LOCALPORTRANGE, CURLOPT_LOCALPORTRANGE);
  ------------------
  |  |  519|     62|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 62, False: 81.0k]
  |  |  ------------------
  |  |  520|     62|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 60]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     62|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     60|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     60|        {                                                                     \
  |  |  |  |  |  |  491|     60|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     60|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     60|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     59|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     59|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     59|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     59|        {                                                                     \
  |  |  |  |  |  |  481|     59|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     59|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     59|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|     59|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     29|          break
  ------------------
  254|     16|    FU32TLV(fuzz, TLV_TYPE_SSL_SESSIONID_CACHE, CURLOPT_SSL_SESSIONID_CACHE);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 5]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  255|    115|    FU32TLV(fuzz, TLV_TYPE_FTP_SSL_CCC, CURLOPT_FTP_SSL_CCC);
  ------------------
  |  |  519|     48|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 48, False: 81.1k]
  |  |  ------------------
  |  |  520|     48|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 14, False: 34]
  |  |  ------------------
  |  |  521|     14|            rc = 255;                                                         \
  |  |  522|     14|            goto EXIT_LABEL;                                                  \
  |  |  523|     14|          }                                                                   \
  |  |  524|     48|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     33|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 31, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|     31|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     31|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     31|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  256|    441|    FU32TLV(fuzz, TLV_TYPE_CONNECTTIMEOUT_MS, CURLOPT_CONNECTTIMEOUT_MS);
  ------------------
  |  |  519|    148|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 148, False: 81.0k]
  |  |  ------------------
  |  |  520|    148|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 147]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    148|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    147|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    147|        {                                                                     \
  |  |  |  |  |  |  491|    147|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    147|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    147|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    146|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    146|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    146|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    146|        {                                                                     \
  |  |  |  |  |  |  481|    146|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    146|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 146]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    146|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    146|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    146|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    146|          break
  ------------------
  257|     46|    FU32TLV(fuzz, TLV_TYPE_HTTP_TRANSFER_DECODING, CURLOPT_HTTP_TRANSFER_DECODING);
  ------------------
  |  |  519|     19|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 19, False: 81.1k]
  |  |  ------------------
  |  |  520|     19|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 14]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     19|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     13|          break
  ------------------
  258|     28|    FU32TLV(fuzz, TLV_TYPE_HTTP_CONTENT_DECODING, CURLOPT_HTTP_CONTENT_DECODING);
  ------------------
  |  |  519|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 11, False: 81.1k]
  |  |  ------------------
  |  |  520|     11|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 9]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      8|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      8|          break
  ------------------
  259|    159|    FU32TLV(fuzz, TLV_TYPE_NEW_FILE_PERMS, CURLOPT_NEW_FILE_PERMS);
  ------------------
  |  |  519|     56|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 56, False: 81.0k]
  |  |  ------------------
  |  |  520|     56|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 52]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     56|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     52|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     52|        {                                                                     \
  |  |  |  |  |  |  491|     52|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 51]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     52|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     52|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     51|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     51|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     51|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     51|        {                                                                     \
  |  |  |  |  |  |  481|     51|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     51|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 35, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     51|          {                                                                   \
  |  |  |  |  |  |  484|     35|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     35|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     35|          }                                                                   \
  |  |  |  |  |  |  487|     51|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     16|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     16|          break
  ------------------
  260|      8|    FU32TLV(fuzz, TLV_TYPE_NEW_DIRECTORY_PERMS, CURLOPT_NEW_DIRECTORY_PERMS);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 81.1k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 2]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      2|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      2|        {                                                                     \
  |  |  |  |  |  |  491|      2|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      2|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      2|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      2|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  261|     22|    FU32TLV(fuzz, TLV_TYPE_PROXY_TRANSFER_MODE, CURLOPT_PROXY_TRANSFER_MODE);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 8, False: 5]
  |  |  ------------------
  |  |  521|      8|            rc = 255;                                                         \
  |  |  522|      8|            goto EXIT_LABEL;                                                  \
  |  |  523|      8|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  262|    589|    FU32TLV(fuzz, TLV_TYPE_ADDRESS_SCOPE, CURLOPT_ADDRESS_SCOPE);
  ------------------
  |  |  519|    198|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 198, False: 80.9k]
  |  |  ------------------
  |  |  520|    198|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 196]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    198|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    196|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    196|        {                                                                     \
  |  |  |  |  |  |  491|    196|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 195]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    196|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    196|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    195|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    195|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    195|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    195|        {                                                                     \
  |  |  |  |  |  |  481|    195|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    195|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 195]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    195|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    195|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    195|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    195|          break
  ------------------
  263|     21|    FU32TLV(fuzz, TLV_TYPE_CERTINFO, CURLOPT_CERTINFO);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 81.1k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 5]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  264|    191|    FU32TLV(fuzz, TLV_TYPE_TFTP_BLKSIZE, CURLOPT_TFTP_BLKSIZE);
  ------------------
  |  |  519|     72|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 72, False: 81.0k]
  |  |  ------------------
  |  |  520|     72|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 60]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|     72|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     60|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     60|        {                                                                     \
  |  |  |  |  |  |  491|     60|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     60|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     60|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     59|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     59|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     59|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     59|        {                                                                     \
  |  |  |  |  |  |  481|     59|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     59|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 59]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     59|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     59|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     59|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     59|          break
  ------------------
  265|     11|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_GSSAPI_NEC, CURLOPT_SOCKS5_GSSAPI_NEC);
  ------------------
  |  |  519|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 5, False: 81.1k]
  |  |  ------------------
  |  |  520|      5|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 3]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      3|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      3|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      3|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  266|     73|    FU32TLV(fuzz, TLV_TYPE_FTP_USE_PRET, CURLOPT_FTP_USE_PRET);
  ------------------
  |  |  519|     26|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 26, False: 81.1k]
  |  |  ------------------
  |  |  520|     26|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 24]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     26|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     23|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     23|          break
  ------------------
  267|    253|    FU32TLV(fuzz, TLV_TYPE_RTSP_SERVER_CSEQ, CURLOPT_RTSP_SERVER_CSEQ);
  ------------------
  |  |  519|     86|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 86, False: 81.0k]
  |  |  ------------------
  |  |  520|     86|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 84]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     86|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     84|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     84|        {                                                                     \
  |  |  |  |  |  |  491|     84|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 83]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     84|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     84|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     83|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     83|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     83|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     83|        {                                                                     \
  |  |  |  |  |  |  481|     83|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     83|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 83]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     83|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     83|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     83|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     83|          break
  ------------------
  268|     73|    FU32TLV(fuzz, TLV_TYPE_TRANSFER_ENCODING, CURLOPT_TRANSFER_ENCODING);
  ------------------
  |  |  519|     26|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 26, False: 81.1k]
  |  |  ------------------
  |  |  520|     26|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 24]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     26|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     24|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     24|        {                                                                     \
  |  |  |  |  |  |  491|     24|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     24|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     24|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     23|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     23|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     23|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     23|        {                                                                     \
  |  |  |  |  |  |  481|     23|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     23|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     23|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     23|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     23|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     23|          break
  ------------------
  269|     71|    FU32TLV(fuzz, TLV_TYPE_ACCEPTTIMEOUT_MS, CURLOPT_ACCEPTTIMEOUT_MS);
  ------------------
  |  |  519|     26|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 26, False: 81.1k]
  |  |  ------------------
  |  |  520|     26|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 23]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     26|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     23|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     23|        {                                                                     \
  |  |  |  |  |  |  491|     23|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     23|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     23|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     22|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     22|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     22|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     22|        {                                                                     \
  |  |  |  |  |  |  481|     22|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     22|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     22|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     22|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     22|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     22|          break
  ------------------
  270|    151|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPALIVE, CURLOPT_TCP_KEEPALIVE);
  ------------------
  |  |  519|     52|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 52, False: 81.1k]
  |  |  ------------------
  |  |  520|     52|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 50]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     52|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     50|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     50|        {                                                                     \
  |  |  |  |  |  |  491|     50|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     50|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     50|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     49|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     49|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     49|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     49|        {                                                                     \
  |  |  |  |  |  |  481|     49|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     49|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     49|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     49|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     49|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     49|          break
  ------------------
  271|    285|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPIDLE, CURLOPT_TCP_KEEPIDLE);
  ------------------
  |  |  519|     96|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 96, False: 81.0k]
  |  |  ------------------
  |  |  520|     96|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 95]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     96|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     95|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     95|        {                                                                     \
  |  |  |  |  |  |  491|     95|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 94]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     95|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     95|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     94|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     94|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     94|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     94|        {                                                                     \
  |  |  |  |  |  |  481|     94|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     94|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 94]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     94|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     94|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     94|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     94|          break
  ------------------
  272|    280|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPINTVL, CURLOPT_TCP_KEEPINTVL);
  ------------------
  |  |  519|     95|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 95, False: 81.0k]
  |  |  ------------------
  |  |  520|     95|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 93]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     95|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     93|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     93|        {                                                                     \
  |  |  |  |  |  |  491|     93|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 92]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     93|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     93|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     92|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     92|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     92|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     92|        {                                                                     \
  |  |  |  |  |  |  481|     92|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     92|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 92]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     92|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     92|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     92|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     92|          break
  ------------------
  273|    290|    FU32TLV(fuzz, TLV_TYPE_SASL_IR, CURLOPT_SASL_IR);
  ------------------
  |  |  519|    107|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 107, False: 81.0k]
  |  |  ------------------
  |  |  520|    107|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 15, False: 92]
  |  |  ------------------
  |  |  521|     15|            rc = 255;                                                         \
  |  |  522|     15|            goto EXIT_LABEL;                                                  \
  |  |  523|     15|          }                                                                   \
  |  |  524|    107|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     92|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     92|        {                                                                     \
  |  |  |  |  |  |  491|     92|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     92|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     92|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     91|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     91|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     91|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     91|        {                                                                     \
  |  |  |  |  |  |  481|     91|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     91|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 91]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     91|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     91|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     91|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     91|          break
  ------------------
  274|     30|    FU32TLV(fuzz, TLV_TYPE_SSL_ENABLE_ALPN, CURLOPT_SSL_ENABLE_ALPN);
  ------------------
  |  |  519|     21|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 21, False: 81.1k]
  |  |  ------------------
  |  |  520|     21|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 16, False: 5]
  |  |  ------------------
  |  |  521|     16|            rc = 255;                                                         \
  |  |  522|     16|            goto EXIT_LABEL;                                                  \
  |  |  523|     16|          }                                                                   \
  |  |  524|     21|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  275|    328|    FU32TLV(fuzz, TLV_TYPE_EXPECT_100_TIMEOUT_MS, CURLOPT_EXPECT_100_TIMEOUT_MS);
  ------------------
  |  |  519|    111|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 111, False: 81.0k]
  |  |  ------------------
  |  |  520|    111|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 109]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    111|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    109|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    109|        {                                                                     \
  |  |  |  |  |  |  491|    109|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    109|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    109|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    108|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    108|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    108|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    108|        {                                                                     \
  |  |  |  |  |  |  481|    108|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    108|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 108]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    108|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    108|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    108|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    108|          break
  ------------------
  276|     45|    FU32TLV(fuzz, TLV_TYPE_SSL_VERIFYSTATUS, CURLOPT_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|     20|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 20, False: 81.1k]
  |  |  ------------------
  |  |  520|     20|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 13]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|     20|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     12|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  277|      5|    FU32TLV(fuzz, TLV_TYPE_SSL_FALSESTART, CURLOPT_SSL_FALSESTART);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  520|      3|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 1]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  278|  1.03k|    FU32TLV(fuzz, TLV_TYPE_PATH_AS_IS, CURLOPT_PATH_AS_IS);
  ------------------
  |  |  519|    350|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 350, False: 80.8k]
  |  |  ------------------
  |  |  520|    350|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 345]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|    350|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    345|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    345|        {                                                                     \
  |  |  |  |  |  |  491|    345|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 344]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    345|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    345|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    344|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    344|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    344|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    344|        {                                                                     \
  |  |  |  |  |  |  481|    344|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    344|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 344]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    344|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    344|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    344|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    344|          break
  ------------------
  279|     17|    FU32TLV(fuzz, TLV_TYPE_PIPEWAIT, CURLOPT_PIPEWAIT);
  ------------------
  |  |  519|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 10, False: 81.1k]
  |  |  ------------------
  |  |  520|     10|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 4]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  280|  1.06k|    FU32TLV(fuzz, TLV_TYPE_STREAM_WEIGHT, CURLOPT_STREAM_WEIGHT);
  ------------------
  |  |  519|    358|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 358, False: 80.7k]
  |  |  ------------------
  |  |  520|    358|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 354]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|    358|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    354|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    354|        {                                                                     \
  |  |  |  |  |  |  491|    354|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 353]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    354|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    354|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    353|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    353|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    353|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    353|        {                                                                     \
  |  |  |  |  |  |  481|    353|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    353|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 353]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    353|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    353|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    353|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    353|          break
  ------------------
  281|     26|    FU32TLV(fuzz, TLV_TYPE_TFTP_NO_OPTIONS, CURLOPT_TFTP_NO_OPTIONS);
  ------------------
  |  |  519|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  520|     13|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 7]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  282|     21|    FU32TLV(fuzz, TLV_TYPE_TCP_FASTOPEN, CURLOPT_TCP_FASTOPEN);
  ------------------
  |  |  519|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 14, False: 81.1k]
  |  |  ------------------
  |  |  520|     14|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 4]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  283|     51|    FU32TLV(fuzz, TLV_TYPE_KEEP_SENDING_ON_ERROR, CURLOPT_KEEP_SENDING_ON_ERROR);
  ------------------
  |  |  519|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 18, False: 81.1k]
  |  |  ------------------
  |  |  520|     18|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 17]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     18|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     17|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     17|        {                                                                     \
  |  |  |  |  |  |  491|     17|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     17|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     17|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     16|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     16|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     16|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     16|        {                                                                     \
  |  |  |  |  |  |  481|     16|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     16|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 16]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     16|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     16|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     16|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     16|          break
  ------------------
  284|     33|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYPEER, CURLOPT_PROXY_SSL_VERIFYPEER);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 81.1k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 11]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     10|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     10|          break
  ------------------
  285|    793|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_VERIFYHOST, CURLOPT_PROXY_SSL_VERIFYHOST);
  ------------------
  |  |  519|    266|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 266, False: 80.8k]
  |  |  ------------------
  |  |  520|    266|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 264]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|    266|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    264|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    264|        {                                                                     \
  |  |  |  |  |  |  491|    264|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    264|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    264|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    263|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    263|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    263|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    263|        {                                                                     \
  |  |  |  |  |  |  481|    263|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    263|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    263|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    263|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    263|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    263|          break
  ------------------
  286|     22|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSL_OPTIONS, CURLOPT_PROXY_SSL_OPTIONS);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 81.1k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 7]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  287|     41|    FU32TLV(fuzz, TLV_TYPE_SUPPRESS_CONNECT_HEADERS, CURLOPT_SUPPRESS_CONNECT_HEADERS);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 81.1k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 13]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     12|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     12|          break
  ------------------
  288|     44|    FU32TLV(fuzz, TLV_TYPE_SOCKS5_AUTH, CURLOPT_SOCKS5_AUTH);
  ------------------
  |  |  519|     17|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 17, False: 81.1k]
  |  |  ------------------
  |  |  520|     17|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 14]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     17|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 11, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|     11|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     11|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     11|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  289|      5|    FU32TLV(fuzz, TLV_TYPE_SSH_COMPRESSION, CURLOPT_SSH_COMPRESSION);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  520|      3|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 1]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  290|    104|    FU32TLV(fuzz, TLV_TYPE_HAPPY_EYEBALLS_TIMEOUT_MS, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS);
  ------------------
  |  |  519|     39|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 39, False: 81.1k]
  |  |  ------------------
  |  |  520|     39|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 33]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     39|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     33|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     33|        {                                                                     \
  |  |  |  |  |  |  491|     33|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     33|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     33|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     32|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     32|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     32|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     32|        {                                                                     \
  |  |  |  |  |  |  481|     32|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     32|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 32]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     32|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     32|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     32|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     32|          break
  ------------------
  291|     79|    FU32TLV(fuzz, TLV_TYPE_HAPROXYPROTOCOL, CURLOPT_HAPROXYPROTOCOL);
  ------------------
  |  |  519|     30|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 30, False: 81.1k]
  |  |  ------------------
  |  |  520|     30|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 25]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     30|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     25|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     25|        {                                                                     \
  |  |  |  |  |  |  491|     25|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     25|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     25|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     24|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     24|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     24|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     24|        {                                                                     \
  |  |  |  |  |  |  481|     24|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     24|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 24]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     24|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     24|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     24|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     24|          break
  ------------------
  292|     43|    FU32TLV(fuzz, TLV_TYPE_DNS_SHUFFLE_ADDRESSES, CURLOPT_DNS_SHUFFLE_ADDRESSES);
  ------------------
  |  |  519|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 16, False: 81.1k]
  |  |  ------------------
  |  |  520|     16|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 14]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     13|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     13|          break
  ------------------
  293|     24|    FU32TLV(fuzz, TLV_TYPE_DISALLOW_USERNAME_IN_URL, CURLOPT_DISALLOW_USERNAME_IN_URL);
  ------------------
  |  |  519|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 15, False: 81.1k]
  |  |  ------------------
  |  |  520|     15|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 5]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  294|    612|    FU32TLV(fuzz, TLV_TYPE_UPLOAD_BUFFERSIZE, CURLOPT_UPLOAD_BUFFERSIZE);
  ------------------
  |  |  519|    209|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 209, False: 80.9k]
  |  |  ------------------
  |  |  520|    209|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 7, False: 202]
  |  |  ------------------
  |  |  521|      7|            rc = 255;                                                         \
  |  |  522|      7|            goto EXIT_LABEL;                                                  \
  |  |  523|      7|          }                                                                   \
  |  |  524|    209|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    202|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    202|        {                                                                     \
  |  |  |  |  |  |  491|    202|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 201]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    202|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    202|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    201|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    201|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    201|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    201|        {                                                                     \
  |  |  |  |  |  |  481|    201|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    201|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 201]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    201|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    201|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    201|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    201|          break
  ------------------
  295|     96|    FU32TLV(fuzz, TLV_TYPE_UPKEEP_INTERVAL_MS, CURLOPT_UPKEEP_INTERVAL_MS);
  ------------------
  |  |  519|     35|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 35, False: 81.1k]
  |  |  ------------------
  |  |  520|     35|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 31]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     35|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     30|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     30|          break
  ------------------
  296|     27|    FU32TLV(fuzz, TLV_TYPE_HTTP09_ALLOWED, CURLOPT_HTTP09_ALLOWED);
  ------------------
  |  |  519|     12|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 12, False: 81.1k]
  |  |  ------------------
  |  |  520|     12|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 8]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     12|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      8|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      8|        {                                                                     \
  |  |  |  |  |  |  491|      8|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      8|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      8|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      7|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      7|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      7|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      7|        {                                                                     \
  |  |  |  |  |  |  481|      7|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      7|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      7|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      7|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      7|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      7|          break
  ------------------
  297|    122|    FU32TLV(fuzz, TLV_TYPE_ALTSVC_CTRL, CURLOPT_ALTSVC_CTRL);
  ------------------
  |  |  519|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 45, False: 81.1k]
  |  |  ------------------
  |  |  520|     45|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 6, False: 39]
  |  |  ------------------
  |  |  521|      6|            rc = 255;                                                         \
  |  |  522|      6|            goto EXIT_LABEL;                                                  \
  |  |  523|      6|          }                                                                   \
  |  |  524|     45|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     39|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     39|        {                                                                     \
  |  |  |  |  |  |  491|     39|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     39|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     39|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     38|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     38|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     38|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     38|        {                                                                     \
  |  |  |  |  |  |  481|     38|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     38|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     38|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|     38|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     37|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     37|          break
  ------------------
  298|    160|    FU32TLV(fuzz, TLV_TYPE_MAXAGE_CONN, CURLOPT_MAXAGE_CONN);
  ------------------
  |  |  519|     55|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 55, False: 81.0k]
  |  |  ------------------
  |  |  520|     55|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 53]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     55|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     53|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     53|        {                                                                     \
  |  |  |  |  |  |  491|     53|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     53|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     53|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     52|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     52|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     52|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     52|        {                                                                     \
  |  |  |  |  |  |  481|     52|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     52|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     52|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     52|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     52|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     52|          break
  ------------------
  299|     14|    FU32TLV(fuzz, TLV_TYPE_MAIL_RCPT_ALLOWFAILS, CURLOPT_MAIL_RCPT_ALLOWFAILS);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 4]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  300|     21|    FU32TLV(fuzz, TLV_TYPE_HSTS_CTRL, CURLOPT_HSTS_CTRL);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 81.1k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 7]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      6|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      6|          break
  ------------------
  301|     59|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYPEER, CURLOPT_DOH_SSL_VERIFYPEER);
  ------------------
  |  |  519|     22|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 22, False: 81.1k]
  |  |  ------------------
  |  |  520|     22|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 19]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     22|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     19|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     19|        {                                                                     \
  |  |  |  |  |  |  491|     19|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     19|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     19|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     18|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     18|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     18|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     18|        {                                                                     \
  |  |  |  |  |  |  481|     18|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     18|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 18]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     18|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     18|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     18|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     18|          break
  ------------------
  302|     14|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYHOST, CURLOPT_DOH_SSL_VERIFYHOST);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 4]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      3|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      3|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      3|          break
  ------------------
  303|     19|    FU32TLV(fuzz, TLV_TYPE_DOH_SSL_VERIFYSTATUS, CURLOPT_DOH_SSL_VERIFYSTATUS);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 81.1k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  304|    204|    FU32TLV(fuzz, TLV_TYPE_MAXLIFETIME_CONN, CURLOPT_MAXLIFETIME_CONN);
  ------------------
  |  |  519|     75|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 75, False: 81.0k]
  |  |  ------------------
  |  |  520|     75|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 10, False: 65]
  |  |  ------------------
  |  |  521|     10|            rc = 255;                                                         \
  |  |  522|     10|            goto EXIT_LABEL;                                                  \
  |  |  523|     10|          }                                                                   \
  |  |  524|     75|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     65|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     65|        {                                                                     \
  |  |  |  |  |  |  491|     65|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 64]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     65|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     65|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     64|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     64|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     64|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     64|        {                                                                     \
  |  |  |  |  |  |  481|     64|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     64|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 64]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     64|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     64|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     64|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     64|          break
  ------------------
  305|     19|    FU32TLV(fuzz, TLV_TYPE_MIME_OPTIONS, CURLOPT_MIME_OPTIONS);
  ------------------
  |  |  519|      8|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 8, False: 81.1k]
  |  |  ------------------
  |  |  520|      8|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 6]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      8|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  306|    283|    FU32TLV(fuzz, TLV_TYPE_CA_CACHE_TIMEOUT, CURLOPT_CA_CACHE_TIMEOUT);
  ------------------
  |  |  519|     96|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 96, False: 81.0k]
  |  |  ------------------
  |  |  520|     96|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 94]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     96|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     94|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     94|        {                                                                     \
  |  |  |  |  |  |  491|     94|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 93]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     94|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     94|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     93|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     93|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     93|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     93|        {                                                                     \
  |  |  |  |  |  |  481|     93|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     93|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 93]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     93|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     93|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     93|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     93|          break
  ------------------
  307|     16|    FU32TLV(fuzz, TLV_TYPE_QUICK_EXIT, CURLOPT_QUICK_EXIT);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 5]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  308|     94|    FU32TLV(fuzz, TLV_TYPE_SERVER_RESPONSE_TIMEOUT_MS, CURLOPT_SERVER_RESPONSE_TIMEOUT_MS);
  ------------------
  |  |  519|     33|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 33, False: 81.1k]
  |  |  ------------------
  |  |  520|     33|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 31]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     33|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     30|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     30|          break
  ------------------
  309|    161|    FU32TLV(fuzz, TLV_TYPE_TCP_KEEPCNT, CURLOPT_TCP_KEEPCNT);
  ------------------
  |  |  519|     56|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 56, False: 81.0k]
  |  |  ------------------
  |  |  520|     56|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 53]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     56|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     53|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     53|        {                                                                     \
  |  |  |  |  |  |  491|     53|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     53|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     53|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     52|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     52|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     52|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     52|        {                                                                     \
  |  |  |  |  |  |  481|     52|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     52|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 52]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     52|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     52|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     52|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     52|          break
  ------------------
  310|     85|    FU32TLV(fuzz, TLV_TYPE_SSLVERSION, CURLOPT_SSLVERSION);
  ------------------
  |  |  519|     30|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 30, False: 81.1k]
  |  |  ------------------
  |  |  520|     30|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 28]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|     30|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     28|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     28|        {                                                                     \
  |  |  |  |  |  |  491|     28|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     28|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     28|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     27|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     27|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     27|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     27|        {                                                                     \
  |  |  |  |  |  |  481|     27|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     27|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 18, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     27|          {                                                                   \
  |  |  |  |  |  |  484|     18|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     18|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     18|          }                                                                   \
  |  |  |  |  |  |  487|     27|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      9|          break
  ------------------
  311|    267|    FU32TLV(fuzz, TLV_TYPE_TIMECONDITION, CURLOPT_TIMECONDITION);
  ------------------
  |  |  519|     92|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 92, False: 81.0k]
  |  |  ------------------
  |  |  520|     92|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 88]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|     92|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     88|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     88|        {                                                                     \
  |  |  |  |  |  |  491|     88|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 87]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     88|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     88|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     87|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     87|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     87|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     87|        {                                                                     \
  |  |  |  |  |  |  481|     87|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     87|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 37, False: 50]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     87|          {                                                                   \
  |  |  |  |  |  |  484|     37|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     37|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     37|          }                                                                   \
  |  |  |  |  |  |  487|     87|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     50|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     50|          break
  ------------------
  312|    404|    FU32TLV(fuzz, TLV_TYPE_PROXYAUTH, CURLOPT_PROXYAUTH);
  ------------------
  |  |  519|    137|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 137, False: 81.0k]
  |  |  ------------------
  |  |  520|    137|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 134]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|    137|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    134|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    134|        {                                                                     \
  |  |  |  |  |  |  491|    134|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 133]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    134|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    134|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    133|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    133|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    133|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    133|        {                                                                     \
  |  |  |  |  |  |  481|    133|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    133|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 132]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    133|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|    133|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    132|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    132|          break
  ------------------
  313|    171|    FU32TLV(fuzz, TLV_TYPE_IPRESOLVE, CURLOPT_IPRESOLVE);
  ------------------
  |  |  519|     58|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 58, False: 81.0k]
  |  |  ------------------
  |  |  520|     58|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 57]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     58|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     57|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     57|        {                                                                     \
  |  |  |  |  |  |  491|     57|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 56]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     57|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     57|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     56|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     56|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     56|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     56|        {                                                                     \
  |  |  |  |  |  |  481|     56|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     56|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 26, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     56|          {                                                                   \
  |  |  |  |  |  |  484|     26|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     26|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     26|          }                                                                   \
  |  |  |  |  |  |  487|     56|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     30|          break
  ------------------
  314|    144|    FU32TLV(fuzz, TLV_TYPE_USE_SSL, CURLOPT_USE_SSL);
  ------------------
  |  |  519|     49|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 49, False: 81.1k]
  |  |  ------------------
  |  |  520|     49|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 48]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     49|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     48|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     48|        {                                                                     \
  |  |  |  |  |  |  491|     48|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 47]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     48|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     48|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     47|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     47|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     47|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     47|        {                                                                     \
  |  |  |  |  |  |  481|     47|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     47|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 30, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     47|          {                                                                   \
  |  |  |  |  |  |  484|     30|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     30|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     30|          }                                                                   \
  |  |  |  |  |  |  487|     47|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     17|          break
  ------------------
  315|    123|    FU32TLV(fuzz, TLV_TYPE_FTPSSLAUTH, CURLOPT_FTPSSLAUTH);
  ------------------
  |  |  519|     42|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 42, False: 81.1k]
  |  |  ------------------
  |  |  520|     42|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 41]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|     42|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     41|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     41|        {                                                                     \
  |  |  |  |  |  |  491|     41|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 40]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     41|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     41|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     40|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     40|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     40|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     40|        {                                                                     \
  |  |  |  |  |  |  481|     40|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     40|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 36, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     40|          {                                                                   \
  |  |  |  |  |  |  484|     36|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     36|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     36|          }                                                                   \
  |  |  |  |  |  |  487|     40|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  316|    116|    FU32TLV(fuzz, TLV_TYPE_FTP_FILEMETHOD, CURLOPT_FTP_FILEMETHOD);
  ------------------
  |  |  519|     47|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 47, False: 81.1k]
  |  |  ------------------
  |  |  520|     47|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 12, False: 35]
  |  |  ------------------
  |  |  521|     12|            rc = 255;                                                         \
  |  |  522|     12|            goto EXIT_LABEL;                                                  \
  |  |  523|     12|          }                                                                   \
  |  |  524|     47|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     35|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     35|        {                                                                     \
  |  |  |  |  |  |  491|     35|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     35|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     35|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     34|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     34|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     34|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     34|        {                                                                     \
  |  |  |  |  |  |  481|     34|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     34|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 32, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     34|          {                                                                   \
  |  |  |  |  |  |  484|     32|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     32|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     32|          }                                                                   \
  |  |  |  |  |  |  487|     34|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      2|          break
  ------------------
  317|      6|    FU32TLV(fuzz, TLV_TYPE_SSH_AUTH_TYPES, CURLOPT_SSH_AUTH_TYPES);
  ------------------
  |  |  519|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 4, False: 81.1k]
  |  |  ------------------
  |  |  520|      4|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 1]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  318|    178|    FU32TLV(fuzz, TLV_TYPE_POSTREDIR, CURLOPT_POSTREDIR);
  ------------------
  |  |  519|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 67, False: 81.0k]
  |  |  ------------------
  |  |  520|     67|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 11, False: 56]
  |  |  ------------------
  |  |  521|     11|            rc = 255;                                                         \
  |  |  522|     11|            goto EXIT_LABEL;                                                  \
  |  |  523|     11|          }                                                                   \
  |  |  524|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     56|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     56|        {                                                                     \
  |  |  |  |  |  |  491|     56|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     56|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     56|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     55|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     55|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     55|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     55|        {                                                                     \
  |  |  |  |  |  |  481|     55|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     55|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 55]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     55|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     55|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     55|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     55|          break
  ------------------
  319|      5|    FU32TLV(fuzz, TLV_TYPE_GSSAPI_DELEGATION, CURLOPT_GSSAPI_DELEGATION);
  ------------------
  |  |  519|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  520|      3|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 1]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      1|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      0|          break
  ------------------
  320|     16|    FU32TLV(fuzz, TLV_TYPE_SSL_OPTIONS, CURLOPT_SSL_OPTIONS);
  ------------------
  |  |  519|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  520|      7|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 2, False: 5]
  |  |  ------------------
  |  |  521|      2|            rc = 255;                                                         \
  |  |  522|      2|            goto EXIT_LABEL;                                                  \
  |  |  523|      2|          }                                                                   \
  |  |  524|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      4|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      4|          break
  ------------------
  321|    498|    FU32TLV(fuzz, TLV_TYPE_HEADEROPT, CURLOPT_HEADEROPT);
  ------------------
  |  |  519|    167|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 167, False: 80.9k]
  |  |  ------------------
  |  |  520|    167|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 166]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    167|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    166|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    166|        {                                                                     \
  |  |  |  |  |  |  491|    166|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 165]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    166|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    166|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    165|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    165|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    165|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    165|        {                                                                     \
  |  |  |  |  |  |  481|    165|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    165|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 165]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    165|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    165|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    165|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    165|          break
  ------------------
  322|    107|    FU32TLV(fuzz, TLV_TYPE_PROXY_SSLVERSION, CURLOPT_PROXY_SSLVERSION);
  ------------------
  |  |  519|     38|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 38, False: 81.1k]
  |  |  ------------------
  |  |  520|     38|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 35]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|     38|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     35|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     35|        {                                                                     \
  |  |  |  |  |  |  491|     35|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     35|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     35|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     34|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     34|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     34|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     34|        {                                                                     \
  |  |  |  |  |  |  481|     34|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     34|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 9, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     34|          {                                                                   \
  |  |  |  |  |  |  484|      9|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      9|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      9|          }                                                                   \
  |  |  |  |  |  |  487|     34|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     25|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     25|          break
  ------------------
  323|    938|    FU32TLV(fuzz, TLV_TYPE_RESUME_FROM_LARGE, CURLOPT_RESUME_FROM_LARGE);
  ------------------
  |  |  519|    315|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 315, False: 80.8k]
  |  |  ------------------
  |  |  520|    315|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 312]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|    315|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    312|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    312|        {                                                                     \
  |  |  |  |  |  |  491|    312|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 311]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    312|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    312|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    311|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    311|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    311|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    311|        {                                                                     \
  |  |  |  |  |  |  481|    311|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    311|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 311]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    311|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    311|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    311|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    311|          break
  ------------------
  324|    268|    FU32TLV(fuzz, TLV_TYPE_MAXFILESIZE_LARGE, CURLOPT_MAXFILESIZE_LARGE);
  ------------------
  |  |  519|     93|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 93, False: 81.0k]
  |  |  ------------------
  |  |  520|     93|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 5, False: 88]
  |  |  ------------------
  |  |  521|      5|            rc = 255;                                                         \
  |  |  522|      5|            goto EXIT_LABEL;                                                  \
  |  |  523|      5|          }                                                                   \
  |  |  524|     93|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     88|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     88|        {                                                                     \
  |  |  |  |  |  |  491|     88|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 87]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     88|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     88|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|     87|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|     87|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|     87|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     87|        {                                                                     \
  |  |  |  |  |  |  481|     87|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     87|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 87]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     87|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     87|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     87|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|     87|          break
  ------------------
  325|       |    // too easy for API misuse FU32TLV(fuzz, TLV_TYPE_POSTFIELDSIZE_LARGE, CURLOPT_POSTFIELDSIZE_LARGE);
  326|    978|    FU32TLV(fuzz, TLV_TYPE_MAX_SEND_SPEED_LARGE, CURLOPT_MAX_SEND_SPEED_LARGE);
  ------------------
  |  |  519|    327|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 327, False: 80.8k]
  |  |  ------------------
  |  |  520|    327|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 1, False: 326]
  |  |  ------------------
  |  |  521|      1|            rc = 255;                                                         \
  |  |  522|      1|            goto EXIT_LABEL;                                                  \
  |  |  523|      1|          }                                                                   \
  |  |  524|    327|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    326|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    326|        {                                                                     \
  |  |  |  |  |  |  491|    326|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 325]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    326|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    326|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|    325|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|    325|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|    325|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    325|        {                                                                     \
  |  |  |  |  |  |  481|    325|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    325|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 325]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    325|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    325|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    325|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|    325|          break
  ------------------
  327|  5.15k|    FU32TLV(fuzz, TLV_TYPE_MAX_RECV_SPEED_LARGE, CURLOPT_MAX_RECV_SPEED_LARGE);
  ------------------
  |  |  519|  1.72k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 1.72k, False: 79.4k]
  |  |  ------------------
  |  |  520|  1.72k|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 4, False: 1.71k]
  |  |  ------------------
  |  |  521|      4|            rc = 255;                                                         \
  |  |  522|      4|            goto EXIT_LABEL;                                                  \
  |  |  523|      4|          }                                                                   \
  |  |  524|  1.72k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.71k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.71k|        {                                                                     \
  |  |  |  |  |  |  491|  1.71k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.71k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.71k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|  1.71k|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|  1.71k|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|  1.71k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.71k|        {                                                                     \
  |  |  |  |  |  |  481|  1.71k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.71k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.71k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.71k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.71k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|  1.71k|          break
  ------------------
  328|     20|    FU32TLV(fuzz, TLV_TYPE_TIMEVALUE_LARGE, CURLOPT_TIMEVALUE_LARGE);
  ------------------
  |  |  519|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (519:9): [True: 9, False: 81.1k]
  |  |  ------------------
  |  |  520|      9|          if(tlv->length != 4) {                                              \
  |  |  ------------------
  |  |  |  Branch (520:14): [True: 3, False: 6]
  |  |  ------------------
  |  |  521|      3|            rc = 255;                                                         \
  |  |  522|      3|            goto EXIT_LABEL;                                                  \
  |  |  523|      3|          }                                                                   \
  |  |  524|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  525|      5|          tmp_u32 = to_u32(tlv->value);                                       \
  |  |  526|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp_u32);                               \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  527|      5|          break
  ------------------
  329|       |
  330|       |    /* Define a set of singleton TLVs - they can only have their value set once
  331|       |       and all follow the same pattern. */
  332|  23.4k|    FSINGLETONTLV(fuzz, TLV_TYPE_URL, CURLOPT_URL);
  ------------------
  |  |  506|  11.7k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11.7k, False: 69.4k]
  |  |  ------------------
  |  |  507|  11.7k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  11.7k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  11.7k|        {                                                                     \
  |  |  |  |  |  |  491|  11.7k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 11.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  11.7k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  11.7k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  11.7k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  11.7k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  11.7k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  11.7k|        {                                                                     \
  |  |  |  |  |  |  481|  11.7k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  11.7k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 11.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  11.7k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  11.7k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  11.7k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  11.7k|          break
  ------------------
  333|    965|    FSINGLETONTLV(fuzz, TLV_TYPE_DOH_URL, CURLOPT_DOH_URL);
  ------------------
  |  |  506|    483|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 483, False: 80.6k]
  |  |  ------------------
  |  |  507|    483|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    483|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    483|        {                                                                     \
  |  |  |  |  |  |  491|    483|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 482]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    483|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    483|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    482|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    482|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    482|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    482|        {                                                                     \
  |  |  |  |  |  |  481|    482|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    482|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 482]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    482|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    482|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    482|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    482|          break
  ------------------
  334|    385|    FSINGLETONTLV(fuzz, TLV_TYPE_USERNAME, CURLOPT_USERNAME);
  ------------------
  |  |  506|    193|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 193, False: 80.9k]
  |  |  ------------------
  |  |  507|    193|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    193|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    193|        {                                                                     \
  |  |  |  |  |  |  491|    193|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 192]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    193|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    193|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    192|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    192|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    192|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    192|        {                                                                     \
  |  |  |  |  |  |  481|    192|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    192|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 192]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    192|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    192|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    192|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    192|          break
  ------------------
  335|  1.30k|    FSINGLETONTLV(fuzz, TLV_TYPE_PASSWORD, CURLOPT_PASSWORD);
  ------------------
  |  |  506|    651|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 651, False: 80.5k]
  |  |  ------------------
  |  |  507|    651|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    651|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    651|        {                                                                     \
  |  |  |  |  |  |  491|    651|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 2, False: 649]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    651|          {                                                                   \
  |  |  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  |  |  496|    651|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    649|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    649|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    649|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    649|        {                                                                     \
  |  |  |  |  |  |  481|    649|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    649|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 649]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    649|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    649|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    649|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    649|          break
  ------------------
  336|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIE, CURLOPT_COOKIE);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  507|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     12|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     12|          break
  ------------------
  337|    219|    FSINGLETONTLV(fuzz, TLV_TYPE_RANGE, CURLOPT_RANGE);
  ------------------
  |  |  506|    110|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 110, False: 81.0k]
  |  |  ------------------
  |  |  507|    110|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    110|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    110|        {                                                                     \
  |  |  |  |  |  |  491|    110|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    110|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    110|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    109|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    109|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    109|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    109|        {                                                                     \
  |  |  |  |  |  |  481|    109|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    109|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 109]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    109|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    109|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    109|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    109|          break
  ------------------
  338|    189|    FSINGLETONTLV(fuzz, TLV_TYPE_CUSTOMREQUEST, CURLOPT_CUSTOMREQUEST);
  ------------------
  |  |  506|     95|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 95, False: 81.0k]
  |  |  ------------------
  |  |  507|     95|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     95|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     95|        {                                                                     \
  |  |  |  |  |  |  491|     95|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 94]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     95|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     95|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     94|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     94|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     94|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     94|        {                                                                     \
  |  |  |  |  |  |  481|     94|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     94|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 94]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     94|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     94|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     94|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     94|          break
  ------------------
  339|     25|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_FROM, CURLOPT_MAIL_FROM);
  ------------------
  |  |  506|     13|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 13, False: 81.1k]
  |  |  ------------------
  |  |  507|     13|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     13|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     13|        {                                                                     \
  |  |  |  |  |  |  491|     13|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     13|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     13|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     12|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     12|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     12|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     12|        {                                                                     \
  |  |  |  |  |  |  481|     12|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     12|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     12|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     12|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     12|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     12|          break
  ------------------
  340|  2.96k|    FSINGLETONTLV(fuzz, TLV_TYPE_ACCEPTENCODING, CURLOPT_ACCEPT_ENCODING);
  ------------------
  |  |  506|  1.48k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.48k, False: 79.6k]
  |  |  ------------------
  |  |  507|  1.48k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.48k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.48k|        {                                                                     \
  |  |  |  |  |  |  491|  1.48k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.48k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.48k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.48k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.48k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.48k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.48k|        {                                                                     \
  |  |  |  |  |  |  481|  1.48k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.48k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.48k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.48k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.48k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.48k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.48k|          break
  ------------------
  341|    407|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_SESSION_ID, CURLOPT_RTSP_SESSION_ID);
  ------------------
  |  |  506|    204|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 204, False: 80.9k]
  |  |  ------------------
  |  |  507|    204|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    204|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    204|        {                                                                     \
  |  |  |  |  |  |  491|    204|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 203]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    204|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    204|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    203|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    203|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    203|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    203|        {                                                                     \
  |  |  |  |  |  |  481|    203|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    203|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 203]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    203|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    203|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    203|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    203|          break
  ------------------
  342|    177|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_STREAM_URI, CURLOPT_RTSP_STREAM_URI);
  ------------------
  |  |  506|     89|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 89, False: 81.0k]
  |  |  ------------------
  |  |  507|     89|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     89|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     89|        {                                                                     \
  |  |  |  |  |  |  491|     89|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 88]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     89|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     89|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     88|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     88|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     88|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     88|        {                                                                     \
  |  |  |  |  |  |  481|     88|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     88|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 88]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     88|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     88|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     88|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     88|          break
  ------------------
  343|     71|    FSINGLETONTLV(fuzz, TLV_TYPE_RTSP_TRANSPORT, CURLOPT_RTSP_TRANSPORT);
  ------------------
  |  |  506|     36|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 36, False: 81.1k]
  |  |  ------------------
  |  |  507|     36|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     36|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     36|        {                                                                     \
  |  |  |  |  |  |  491|     36|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     36|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     36|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     35|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     35|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     35|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     35|        {                                                                     \
  |  |  |  |  |  |  481|     35|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     35|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     35|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     35|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     35|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     35|          break
  ------------------
  344|     19|    FSINGLETONTLV(fuzz, TLV_TYPE_MAIL_AUTH, CURLOPT_MAIL_AUTH);
  ------------------
  |  |  506|     10|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 10, False: 81.1k]
  |  |  ------------------
  |  |  507|     10|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     10|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     10|        {                                                                     \
  |  |  |  |  |  |  491|     10|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     10|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     10|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      9|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      9|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      9|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      9|        {                                                                     \
  |  |  |  |  |  |  481|      9|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      9|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      9|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      9|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      9|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      9|          break
  ------------------
  345|    267|    FSINGLETONTLV(fuzz, TLV_TYPE_LOGIN_OPTIONS, CURLOPT_LOGIN_OPTIONS);
  ------------------
  |  |  506|    134|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 134, False: 81.0k]
  |  |  ------------------
  |  |  507|    134|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    134|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    134|        {                                                                     \
  |  |  |  |  |  |  491|    134|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 133]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    134|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    134|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    133|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    133|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    133|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    133|        {                                                                     \
  |  |  |  |  |  |  481|    133|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    133|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 133]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    133|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    133|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    133|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    133|          break
  ------------------
  346|  1.06k|    FSINGLETONTLV(fuzz, TLV_TYPE_XOAUTH2_BEARER, CURLOPT_XOAUTH2_BEARER);
  ------------------
  |  |  506|    532|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 532, False: 80.6k]
  |  |  ------------------
  |  |  507|    532|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    532|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    532|        {                                                                     \
  |  |  |  |  |  |  491|    532|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 531]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    532|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    532|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    531|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    531|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    531|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    531|        {                                                                     \
  |  |  |  |  |  |  481|    531|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    531|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 531]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    531|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    531|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    531|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    531|          break
  ------------------
  347|    421|    FSINGLETONTLV(fuzz, TLV_TYPE_USERPWD, CURLOPT_USERPWD);
  ------------------
  |  |  506|    211|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 211, False: 80.9k]
  |  |  ------------------
  |  |  507|    211|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    211|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    211|        {                                                                     \
  |  |  |  |  |  |  491|    211|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    211|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    211|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    210|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    210|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    210|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    210|        {                                                                     \
  |  |  |  |  |  |  481|    210|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    210|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    210|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    210|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    210|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    210|          break
  ------------------
  348|    262|    FSINGLETONTLV(fuzz, TLV_TYPE_USERAGENT, CURLOPT_USERAGENT);
  ------------------
  |  |  506|    132|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 132, False: 81.0k]
  |  |  ------------------
  |  |  507|    132|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    132|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    132|        {                                                                     \
  |  |  |  |  |  |  491|    132|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 2, False: 130]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    132|          {                                                                   \
  |  |  |  |  |  |  493|      2|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      2|          }                                                                   \
  |  |  |  |  |  |  496|    132|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    130|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    130|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    130|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    130|        {                                                                     \
  |  |  |  |  |  |  481|    130|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    130|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 130]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    130|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    130|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    130|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    130|          break
  ------------------
  349|      8|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 81.1k]
  |  |  ------------------
  |  |  507|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 4, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      4|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      4|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      4|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  350|  6.39k|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY, CURLOPT_PROXY);
  ------------------
  |  |  506|  3.19k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3.19k, False: 77.9k]
  |  |  ------------------
  |  |  507|  3.19k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  3.19k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  3.19k|        {                                                                     \
  |  |  |  |  |  |  491|  3.19k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  3.19k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  3.19k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  3.19k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  3.19k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  3.19k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  3.19k|        {                                                                     \
  |  |  |  |  |  |  481|  3.19k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  3.19k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 3.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  3.19k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  3.19k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  3.19k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  3.19k|          break
  ------------------
  351|    363|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERPWD, CURLOPT_PROXYUSERPWD);
  ------------------
  |  |  506|    182|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 182, False: 80.9k]
  |  |  ------------------
  |  |  507|    182|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    182|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    182|        {                                                                     \
  |  |  |  |  |  |  491|    182|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 181]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    182|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    182|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    181|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    181|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    181|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    181|        {                                                                     \
  |  |  |  |  |  |  481|    181|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    181|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 3, False: 178]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    181|          {                                                                   \
  |  |  |  |  |  |  484|      3|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      3|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      3|          }                                                                   \
  |  |  |  |  |  |  487|    181|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    178|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    178|          break
  ------------------
  352|     59|    FSINGLETONTLV(fuzz, TLV_TYPE_REFERER, CURLOPT_REFERER);
  ------------------
  |  |  506|     30|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 30, False: 81.1k]
  |  |  ------------------
  |  |  507|     30|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     30|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     30|        {                                                                     \
  |  |  |  |  |  |  491|     30|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     30|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     30|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     29|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     29|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     29|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     29|        {                                                                     \
  |  |  |  |  |  |  481|     29|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     29|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     29|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     29|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     29|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     29|          break
  ------------------
  353|      5|    FSINGLETONTLV(fuzz, TLV_TYPE_FTPPORT, CURLOPT_FTPPORT);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      2|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  354|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERT, CURLOPT_SSLCERT);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 81.1k]
  |  |  ------------------
  |  |  507|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  355|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_KEYPASSWD, CURLOPT_KEYPASSWD);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 81.1k]
  |  |  ------------------
  |  |  507|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  356|    525|    FSINGLETONTLV(fuzz, TLV_TYPE_INTERFACE, CURLOPT_INTERFACE);
  ------------------
  |  |  506|    263|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 263, False: 80.8k]
  |  |  ------------------
  |  |  507|    263|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    263|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    263|        {                                                                     \
  |  |  |  |  |  |  491|    263|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 262]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    263|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    263|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    262|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    262|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    262|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    262|        {                                                                     \
  |  |  |  |  |  |  481|    262|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    262|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 6, False: 256]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    262|          {                                                                   \
  |  |  |  |  |  |  484|      6|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      6|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      6|          }                                                                   \
  |  |  |  |  |  |  487|    262|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    256|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    256|          break
  ------------------
  357|      6|    FSINGLETONTLV(fuzz, TLV_TYPE_KRBLEVEL, CURLOPT_KRBLEVEL);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      3|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 3, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      3|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      3|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      3|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  358|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_CAINFO, CURLOPT_CAINFO);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 81.1k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  359|     61|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_CIPHER_LIST, CURLOPT_SSL_CIPHER_LIST);
  ------------------
  |  |  506|     31|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 31, False: 81.1k]
  |  |  ------------------
  |  |  507|     31|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     30|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     30|          break
  ------------------
  360|     13|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLCERTTYPE, CURLOPT_SSLCERTTYPE);
  ------------------
  |  |  506|      7|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 7, False: 81.1k]
  |  |  ------------------
  |  |  507|      7|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      7|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      7|        {                                                                     \
  |  |  |  |  |  |  491|      7|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      7|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      7|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      6|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      6|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      6|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      6|        {                                                                     \
  |  |  |  |  |  |  481|      6|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      6|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      6|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      6|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      6|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      6|          break
  ------------------
  361|     55|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEY, CURLOPT_SSLKEY);
  ------------------
  |  |  506|     28|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 28, False: 81.1k]
  |  |  ------------------
  |  |  507|     28|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     28|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     28|        {                                                                     \
  |  |  |  |  |  |  491|     28|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     28|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     28|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     27|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     27|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     27|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     27|        {                                                                     \
  |  |  |  |  |  |  481|     27|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     27|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     27|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     27|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     27|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     27|          break
  ------------------
  362|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLKEYTYPE, CURLOPT_SSLKEYTYPE);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 81.1k]
  |  |  ------------------
  |  |  507|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      4|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      4|          break
  ------------------
  363|  1.47k|    FSINGLETONTLV(fuzz, TLV_TYPE_SSLENGINE, CURLOPT_SSLENGINE);
  ------------------
  |  |  506|    739|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 739, False: 80.4k]
  |  |  ------------------
  |  |  507|    739|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    739|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    739|        {                                                                     \
  |  |  |  |  |  |  491|    739|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 738]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    739|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    739|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    738|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    738|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    738|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    738|        {                                                                     \
  |  |  |  |  |  |  481|    738|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    738|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 190, False: 548]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    738|          {                                                                   \
  |  |  |  |  |  |  484|    190|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|    190|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|    190|          }                                                                   \
  |  |  |  |  |  |  487|    738|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    548|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    548|          break
  ------------------
  364|     27|    FSINGLETONTLV(fuzz, TLV_TYPE_CAPATH, CURLOPT_CAPATH);
  ------------------
  |  |  506|     14|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 14, False: 81.1k]
  |  |  ------------------
  |  |  507|     14|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     14|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     14|        {                                                                     \
  |  |  |  |  |  |  491|     14|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     14|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     14|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     13|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     13|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     13|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     13|        {                                                                     \
  |  |  |  |  |  |  481|     13|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     13|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     13|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     13|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     13|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     13|          break
  ------------------
  365|      5|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ACCOUNT, CURLOPT_FTP_ACCOUNT);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      2|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  366|  3.36k|    FSINGLETONTLV(fuzz, TLV_TYPE_COOKIELIST, CURLOPT_COOKIELIST);
  ------------------
  |  |  506|  1.68k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.68k, False: 79.4k]
  |  |  ------------------
  |  |  507|  1.68k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.68k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.68k|        {                                                                     \
  |  |  |  |  |  |  491|  1.68k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.68k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.68k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.68k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.68k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.68k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.68k|        {                                                                     \
  |  |  |  |  |  |  481|  1.68k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.68k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 1.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.68k|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|  1.68k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.68k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.68k|          break
  ------------------
  367|     21|    FSINGLETONTLV(fuzz, TLV_TYPE_FTP_ALTERNATIVE_TO_USER, CURLOPT_FTP_ALTERNATIVE_TO_USER);
  ------------------
  |  |  506|     11|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 11, False: 81.1k]
  |  |  ------------------
  |  |  507|     11|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     11|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     11|        {                                                                     \
  |  |  |  |  |  |  491|     11|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     11|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     11|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     10|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     10|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     10|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     10|        {                                                                     \
  |  |  |  |  |  |  481|     10|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     10|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     10|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     10|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     10|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     10|          break
  ------------------
  368|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PUBLIC_KEYFILE, CURLOPT_SSH_PUBLIC_KEYFILE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  369|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_PRIVATE_KEYFILE, CURLOPT_SSH_PRIVATE_KEYFILE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  370|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_HOST_PUBLIC_KEY_MD5, CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  371|     11|    FSINGLETONTLV(fuzz, TLV_TYPE_ISSUERCERT, CURLOPT_ISSUERCERT);
  ------------------
  |  |  506|      6|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 6, False: 81.1k]
  |  |  ------------------
  |  |  507|      6|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      6|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      6|        {                                                                     \
  |  |  |  |  |  |  491|      6|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      6|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      6|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      5|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      5|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      5|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      5|        {                                                                     \
  |  |  |  |  |  |  481|      5|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      5|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      5|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      5|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      5|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      5|          break
  ------------------
  372|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYUSERNAME, CURLOPT_PROXYUSERNAME);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 81.1k]
  |  |  ------------------
  |  |  507|     18|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     18|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     18|        {                                                                     \
  |  |  |  |  |  |  491|     18|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     18|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     18|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     17|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     17|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     17|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     17|        {                                                                     \
  |  |  |  |  |  |  481|     17|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     17|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     17|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     17|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     17|          break
  ------------------
  373|     43|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXYPASSWORD, CURLOPT_PROXYPASSWORD);
  ------------------
  |  |  506|     22|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 22, False: 81.1k]
  |  |  ------------------
  |  |  507|     22|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     22|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     22|        {                                                                     \
  |  |  |  |  |  |  491|     22|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     22|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     22|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     21|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     21|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     21|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     21|        {                                                                     \
  |  |  |  |  |  |  481|     21|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     21|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     21|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     21|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     21|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     21|          break
  ------------------
  374|    555|    FSINGLETONTLV(fuzz, TLV_TYPE_NOPROXY, CURLOPT_NOPROXY);
  ------------------
  |  |  506|    278|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 278, False: 80.8k]
  |  |  ------------------
  |  |  507|    278|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    278|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    278|        {                                                                     \
  |  |  |  |  |  |  491|    278|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 277]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    278|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    278|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    277|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    277|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    277|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    277|        {                                                                     \
  |  |  |  |  |  |  481|    277|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    277|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 277]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    277|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    277|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    277|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    277|          break
  ------------------
  375|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_SSH_KNOWNHOSTS, CURLOPT_SSH_KNOWNHOSTS);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  376|     31|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_USERNAME, CURLOPT_TLSAUTH_USERNAME);
  ------------------
  |  |  506|     16|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 16, False: 81.1k]
  |  |  ------------------
  |  |  507|     16|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     16|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     16|        {                                                                     \
  |  |  |  |  |  |  491|     16|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     16|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     16|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     15|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     15|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     15|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     15|        {                                                                     \
  |  |  |  |  |  |  481|     15|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     15|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     15|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     15|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     15|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     15|          break
  ------------------
  377|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_PASSWORD, CURLOPT_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 81.1k]
  |  |  ------------------
  |  |  507|     18|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     18|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     18|        {                                                                     \
  |  |  |  |  |  |  491|     18|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     18|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     18|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     17|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     17|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     17|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     17|        {                                                                     \
  |  |  |  |  |  |  481|     17|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     17|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     17|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     17|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     17|          break
  ------------------
  378|      7|    FSINGLETONTLV(fuzz, TLV_TYPE_TLSAUTH_TYPE, CURLOPT_TLSAUTH_TYPE);
  ------------------
  |  |  506|      4|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 4, False: 81.1k]
  |  |  ------------------
  |  |  507|      4|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      4|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      4|        {                                                                     \
  |  |  |  |  |  |  491|      4|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      4|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      4|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      3|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      3|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      3|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      3|        {                                                                     \
  |  |  |  |  |  |  481|      3|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      3|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      3|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      3|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  379|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_SERVERS, CURLOPT_DNS_SERVERS);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  380|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_INTERFACE, CURLOPT_DNS_INTERFACE);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  381|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_LOCAL_IP4, CURLOPT_DNS_LOCAL_IP4);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  382|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_DNS_LOCAL_IP6, CURLOPT_DNS_LOCAL_IP6);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  383|     17|    FSINGLETONTLV(fuzz, TLV_TYPE_PINNEDPUBLICKEY, CURLOPT_PINNEDPUBLICKEY);
  ------------------
  |  |  506|      9|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 9, False: 81.1k]
  |  |  ------------------
  |  |  507|      9|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      9|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      9|        {                                                                     \
  |  |  |  |  |  |  491|      9|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      9|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      9|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      8|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      8|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      8|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      8|        {                                                                     \
  |  |  |  |  |  |  481|      8|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      8|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      8|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      8|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      8|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      8|          break
  ------------------
  384|     67|    FSINGLETONTLV(fuzz, TLV_TYPE_UNIX_SOCKET_PATH, CURLOPT_UNIX_SOCKET_PATH);
  ------------------
  |  |  506|     34|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 34, False: 81.1k]
  |  |  ------------------
  |  |  507|     34|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     34|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     34|        {                                                                     \
  |  |  |  |  |  |  491|     34|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     34|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     34|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     33|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     33|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     33|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     33|        {                                                                     \
  |  |  |  |  |  |  481|     33|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     33|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     33|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     33|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     33|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     33|          break
  ------------------
  385|    185|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SERVICE_NAME, CURLOPT_PROXY_SERVICE_NAME);
  ------------------
  |  |  506|     93|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 93, False: 81.0k]
  |  |  ------------------
  |  |  507|     93|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     93|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     93|        {                                                                     \
  |  |  |  |  |  |  491|     93|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 92]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     93|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     93|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     92|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     92|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     92|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     92|        {                                                                     \
  |  |  |  |  |  |  481|     92|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     92|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 92]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     92|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     92|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     92|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     92|          break
  ------------------
  386|     61|    FSINGLETONTLV(fuzz, TLV_TYPE_SERVICE_NAME, CURLOPT_SERVICE_NAME);
  ------------------
  |  |  506|     31|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 31, False: 81.1k]
  |  |  ------------------
  |  |  507|     31|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     31|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     31|        {                                                                     \
  |  |  |  |  |  |  491|     31|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     31|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     31|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     30|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     30|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     30|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     30|        {                                                                     \
  |  |  |  |  |  |  481|     30|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     30|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 30]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     30|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     30|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     30|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     30|          break
  ------------------
  387|  1.20k|    FSINGLETONTLV(fuzz, TLV_TYPE_DEFAULT_PROTOCOL, CURLOPT_DEFAULT_PROTOCOL);
  ------------------
  |  |  506|    601|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 601, False: 80.5k]
  |  |  ------------------
  |  |  507|    601|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    601|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    601|        {                                                                     \
  |  |  |  |  |  |  491|    601|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 600]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    601|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    601|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    600|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    600|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    600|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    600|        {                                                                     \
  |  |  |  |  |  |  481|    600|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    600|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 600]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    600|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    600|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    600|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    600|          break
  ------------------
  388|    299|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAINFO, CURLOPT_PROXY_CAINFO);
  ------------------
  |  |  506|    150|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 150, False: 81.0k]
  |  |  ------------------
  |  |  507|    150|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    150|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    150|        {                                                                     \
  |  |  |  |  |  |  491|    150|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 149]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    150|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    150|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    149|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    149|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    149|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    149|        {                                                                     \
  |  |  |  |  |  |  481|    149|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    149|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 149]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    149|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    149|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    149|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    149|          break
  ------------------
  389|    377|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CAPATH, CURLOPT_PROXY_CAPATH);
  ------------------
  |  |  506|    189|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 189, False: 80.9k]
  |  |  ------------------
  |  |  507|    189|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    189|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    189|        {                                                                     \
  |  |  |  |  |  |  491|    189|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 188]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    189|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    189|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    188|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    188|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    188|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    188|        {                                                                     \
  |  |  |  |  |  |  481|    188|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    188|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 188]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    188|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    188|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    188|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    188|          break
  ------------------
  390|    161|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_USERNAME, CURLOPT_PROXY_TLSAUTH_USERNAME);
  ------------------
  |  |  506|     81|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 81, False: 81.0k]
  |  |  ------------------
  |  |  507|     81|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     81|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     81|        {                                                                     \
  |  |  |  |  |  |  491|     81|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     81|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     81|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     80|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     80|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     80|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     80|        {                                                                     \
  |  |  |  |  |  |  481|     80|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     80|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     80|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     80|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     80|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     80|          break
  ------------------
  391|     35|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_PASSWORD, CURLOPT_PROXY_TLSAUTH_PASSWORD);
  ------------------
  |  |  506|     18|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 18, False: 81.1k]
  |  |  ------------------
  |  |  507|     18|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     18|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     18|        {                                                                     \
  |  |  |  |  |  |  491|     18|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     18|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     18|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     17|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     17|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     17|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     17|        {                                                                     \
  |  |  |  |  |  |  481|     17|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     17|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 17]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     17|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     17|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     17|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     17|          break
  ------------------
  392|      9|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLSAUTH_TYPE, CURLOPT_PROXY_TLSAUTH_TYPE);
  ------------------
  |  |  506|      5|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 5, False: 81.1k]
  |  |  ------------------
  |  |  507|      5|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      5|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      5|        {                                                                     \
  |  |  |  |  |  |  491|      5|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      5|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      5|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      4|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      4|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      4|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      4|        {                                                                     \
  |  |  |  |  |  |  481|      4|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      4|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 2, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      4|          {                                                                   \
  |  |  |  |  |  |  484|      2|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      2|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      2|          }                                                                   \
  |  |  |  |  |  |  487|      4|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  393|     89|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERT, CURLOPT_PROXY_SSLCERT);
  ------------------
  |  |  506|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 45, False: 81.1k]
  |  |  ------------------
  |  |  507|     45|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     45|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     45|        {                                                                     \
  |  |  |  |  |  |  491|     45|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     45|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     45|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     44|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     44|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     44|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     44|        {                                                                     \
  |  |  |  |  |  |  481|     44|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     44|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     44|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     44|          break
  ------------------
  394|    121|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLCERTTYPE, CURLOPT_PROXY_SSLCERTTYPE);
  ------------------
  |  |  506|     61|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 61, False: 81.0k]
  |  |  ------------------
  |  |  507|     61|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     61|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     61|        {                                                                     \
  |  |  |  |  |  |  491|     61|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     61|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     61|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     60|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     60|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     60|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     60|        {                                                                     \
  |  |  |  |  |  |  481|     60|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     60|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     60|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     60|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     60|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     60|          break
  ------------------
  395|     55|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEY, CURLOPT_PROXY_SSLKEY);
  ------------------
  |  |  506|     28|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 28, False: 81.1k]
  |  |  ------------------
  |  |  507|     28|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     28|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     28|        {                                                                     \
  |  |  |  |  |  |  491|     28|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     28|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     28|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     27|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     27|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     27|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     27|        {                                                                     \
  |  |  |  |  |  |  481|     27|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     27|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     27|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     27|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     27|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     27|          break
  ------------------
  396|     45|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSLKEYTYPE, CURLOPT_PROXY_SSLKEYTYPE);
  ------------------
  |  |  506|     23|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 23, False: 81.1k]
  |  |  ------------------
  |  |  507|     23|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     23|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     23|        {                                                                     \
  |  |  |  |  |  |  491|     23|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     23|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     23|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     22|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     22|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     22|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     22|        {                                                                     \
  |  |  |  |  |  |  481|     22|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     22|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     22|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     22|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     22|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     22|          break
  ------------------
  397|     89|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_KEYPASSWD, CURLOPT_PROXY_KEYPASSWD);
  ------------------
  |  |  506|     45|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 45, False: 81.1k]
  |  |  ------------------
  |  |  507|     45|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     45|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     45|        {                                                                     \
  |  |  |  |  |  |  491|     45|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     45|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     45|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     44|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     44|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     44|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     44|        {                                                                     \
  |  |  |  |  |  |  481|     44|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     44|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     44|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     44|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     44|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     44|          break
  ------------------
  398|  1.70k|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_SSL_CIPHER_LIST, CURLOPT_PROXY_SSL_CIPHER_LIST);
  ------------------
  |  |  506|    851|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 851, False: 80.3k]
  |  |  ------------------
  |  |  507|    851|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    851|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    851|        {                                                                     \
  |  |  |  |  |  |  491|    851|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 850]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    851|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    851|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    850|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    850|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    850|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    850|        {                                                                     \
  |  |  |  |  |  |  481|    850|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    850|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 850]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    850|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    850|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    850|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    850|          break
  ------------------
  399|    115|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_CRLFILE, CURLOPT_PROXY_CRLFILE);
  ------------------
  |  |  506|     58|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 58, False: 81.0k]
  |  |  ------------------
  |  |  507|     58|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     58|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     58|        {                                                                     \
  |  |  |  |  |  |  491|     58|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 57]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     58|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     58|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     57|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     57|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     57|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     57|        {                                                                     \
  |  |  |  |  |  |  481|     57|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     57|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 57]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     57|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     57|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     57|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     57|          break
  ------------------
  400|  1.00k|    FSINGLETONTLV(fuzz, TLV_TYPE_PRE_PROXY, CURLOPT_PRE_PROXY);
  ------------------
  |  |  506|    501|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 501, False: 80.6k]
  |  |  ------------------
  |  |  507|    501|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    501|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    501|        {                                                                     \
  |  |  |  |  |  |  491|    501|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 500]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    501|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    501|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    500|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    500|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    500|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    500|        {                                                                     \
  |  |  |  |  |  |  481|    500|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    500|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 500]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    500|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    500|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    500|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    500|          break
  ------------------
  401|    161|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_PINNEDPUBLICKEY, CURLOPT_PROXY_PINNEDPUBLICKEY);
  ------------------
  |  |  506|     81|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 81, False: 81.0k]
  |  |  ------------------
  |  |  507|     81|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     81|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     81|        {                                                                     \
  |  |  |  |  |  |  491|     81|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     81|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     81|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     80|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     80|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     80|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     80|        {                                                                     \
  |  |  |  |  |  |  481|     80|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     80|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 80]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     80|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     80|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     80|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     80|          break
  ------------------
  402|    863|    FSINGLETONTLV(fuzz, TLV_TYPE_ABSTRACT_UNIX_SOCKET, CURLOPT_ABSTRACT_UNIX_SOCKET);
  ------------------
  |  |  506|    432|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 432, False: 80.7k]
  |  |  ------------------
  |  |  507|    432|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    432|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    432|        {                                                                     \
  |  |  |  |  |  |  491|    432|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 431]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    432|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    432|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    431|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    431|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    431|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    431|        {                                                                     \
  |  |  |  |  |  |  481|    431|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    431|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 431]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    431|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    431|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    431|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    431|          break
  ------------------
  403|      5|    FSINGLETONTLV(fuzz, TLV_TYPE_REQUEST_TARGET, CURLOPT_REQUEST_TARGET);
  ------------------
  |  |  506|      3|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 3, False: 81.1k]
  |  |  ------------------
  |  |  507|      3|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      3|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      3|        {                                                                     \
  |  |  |  |  |  |  491|      3|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      3|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|      3|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      2|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      2|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      2|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      2|        {                                                                     \
  |  |  |  |  |  |  481|      2|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      2|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      2|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|      2|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      2|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      2|          break
  ------------------
  404|     29|    FSINGLETONTLV(fuzz, TLV_TYPE_TLS13_CIPHERS, CURLOPT_TLS13_CIPHERS);
  ------------------
  |  |  506|     15|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 15, False: 81.1k]
  |  |  ------------------
  |  |  507|     15|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     15|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     15|        {                                                                     \
  |  |  |  |  |  |  491|     15|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     15|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     15|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     14|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     14|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     14|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     14|        {                                                                     \
  |  |  |  |  |  |  481|     14|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     14|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     14|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     14|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     14|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     14|          break
  ------------------
  405|    367|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_TLS13_CIPHERS, CURLOPT_PROXY_TLS13_CIPHERS);
  ------------------
  |  |  506|    184|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 184, False: 80.9k]
  |  |  ------------------
  |  |  507|    184|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    184|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    184|        {                                                                     \
  |  |  |  |  |  |  491|    184|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 183]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    184|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    184|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    183|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    183|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    183|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    183|        {                                                                     \
  |  |  |  |  |  |  481|    183|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    183|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 183]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    183|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    183|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    183|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    183|          break
  ------------------
  406|    173|    FSINGLETONTLV(fuzz, TLV_TYPE_SASL_AUTHZID, CURLOPT_SASL_AUTHZID);
  ------------------
  |  |  506|     87|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 87, False: 81.0k]
  |  |  ------------------
  |  |  507|     87|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     87|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     87|        {                                                                     \
  |  |  |  |  |  |  491|     87|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 86]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     87|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     87|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     86|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     86|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     86|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     86|        {                                                                     \
  |  |  |  |  |  |  481|     86|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     86|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 86]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     86|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     86|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     86|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     86|          break
  ------------------
  407|    133|    FSINGLETONTLV(fuzz, TLV_TYPE_PROXY_ISSUERCERT, CURLOPT_PROXY_ISSUERCERT);
  ------------------
  |  |  506|     67|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 67, False: 81.0k]
  |  |  ------------------
  |  |  507|     67|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     67|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     67|        {                                                                     \
  |  |  |  |  |  |  491|     67|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 66]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     67|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     67|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     66|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     66|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     66|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     66|        {                                                                     \
  |  |  |  |  |  |  481|     66|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     66|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 66]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     66|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     66|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     66|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     66|          break
  ------------------
  408|     99|    FSINGLETONTLV(fuzz, TLV_TYPE_SSL_EC_CURVES, CURLOPT_SSL_EC_CURVES);
  ------------------
  |  |  506|     50|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 50, False: 81.1k]
  |  |  ------------------
  |  |  507|     50|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|     50|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|     50|        {                                                                     \
  |  |  |  |  |  |  491|     50|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|     50|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|     50|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|     49|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|     49|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|     49|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|     49|        {                                                                     \
  |  |  |  |  |  |  481|     49|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|     49|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 49]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|     49|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|     49|        }
  |  |  |  |  ------------------
  |  |  |  |  500|     49|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|     49|          break
  ------------------
  409|  1.34k|    FSINGLETONTLV(fuzz, TLV_TYPE_AWS_SIGV4, CURLOPT_AWS_SIGV4);
  ------------------
  |  |  506|    671|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 671, False: 80.4k]
  |  |  ------------------
  |  |  507|    671|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    671|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    671|        {                                                                     \
  |  |  |  |  |  |  491|    671|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 670]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    671|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    671|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    670|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    670|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    670|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    670|        {                                                                     \
  |  |  |  |  |  |  481|    670|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    670|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 670]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    670|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    670|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    670|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    670|          break
  ------------------
  410|  2.95k|    FSINGLETONTLV(fuzz, TLV_TYPE_REDIR_PROTOCOLS_STR, CURLOPT_REDIR_PROTOCOLS_STR);
  ------------------
  |  |  506|  1.48k|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1.48k, False: 79.6k]
  |  |  ------------------
  |  |  507|  1.48k|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|  1.48k|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|  1.48k|        {                                                                     \
  |  |  |  |  |  |  491|  1.48k|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 1.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|  1.48k|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|  1.48k|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|  1.47k|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|  1.47k|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|  1.47k|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|  1.47k|        {                                                                     \
  |  |  |  |  |  |  481|  1.47k|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|  1.47k|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 28, False: 1.45k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|  1.47k|          {                                                                   \
  |  |  |  |  |  |  484|     28|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|     28|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|     28|          }                                                                   \
  |  |  |  |  |  |  487|  1.47k|        }
  |  |  |  |  ------------------
  |  |  |  |  500|  1.45k|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|  1.45k|          break
  ------------------
  411|    593|    FSINGLETONTLV(fuzz, TLV_TYPE_HAPROXY_CLIENT_IP, CURLOPT_HAPROXY_CLIENT_IP);
  ------------------
  |  |  506|    297|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 297, False: 80.8k]
  |  |  ------------------
  |  |  507|    297|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|    297|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|    297|        {                                                                     \
  |  |  |  |  |  |  491|    297|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 1, False: 296]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|    297|          {                                                                   \
  |  |  |  |  |  |  493|      1|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      1|          }                                                                   \
  |  |  |  |  |  |  496|    297|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|    296|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|    296|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|    296|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|    296|        {                                                                     \
  |  |  |  |  |  |  481|    296|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|    296|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 0, False: 296]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|    296|          {                                                                   \
  |  |  |  |  |  |  484|      0|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      0|          }                                                                   \
  |  |  |  |  |  |  487|    296|        }
  |  |  |  |  ------------------
  |  |  |  |  500|    296|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|    296|          break
  ------------------
  412|      2|    FSINGLETONTLV(fuzz, TLV_TYPE_ECH, CURLOPT_ECH);
  ------------------
  |  |  506|      1|        case TLVNAME:                                                         \
  |  |  ------------------
  |  |  |  Branch (506:9): [True: 1, False: 81.1k]
  |  |  ------------------
  |  |  507|      1|          FCHECK_OPTION_UNSET(FUZZP, OPTNAME);                                \
  |  |  ------------------
  |  |  |  |  503|      1|        FCHECK((FUZZP)->options[OPTNAME % 1000] == 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |  490|      1|        {                                                                     \
  |  |  |  |  |  |  491|      1|          if (!(COND))                                                        \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (491:15): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  492|      1|          {                                                                   \
  |  |  |  |  |  |  493|      0|            rc = 255;                                                         \
  |  |  |  |  |  |  494|      0|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  495|      0|          }                                                                   \
  |  |  |  |  |  |  496|      1|        }
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  508|      1|          tmp = fuzz_tlv_to_string(tlv);                                      \
  |  |  509|      1|          FSET_OPTION(FUZZP, OPTNAME, tmp);                                   \
  |  |  ------------------
  |  |  |  |  499|      1|        FTRY(curl_easy_setopt((FUZZP)->easy, OPTNAME, OPTVALUE));             \
  |  |  |  |  ------------------
  |  |  |  |  |  |  480|      1|        {                                                                     \
  |  |  |  |  |  |  481|      1|          int _func_rc = (FUNC);                                              \
  |  |  |  |  |  |  482|      1|          if (_func_rc)                                                       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (482:15): [True: 1, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  483|      1|          {                                                                   \
  |  |  |  |  |  |  484|      1|            rc = _func_rc;                                                    \
  |  |  |  |  |  |  485|      1|            goto EXIT_LABEL;                                                  \
  |  |  |  |  |  |  486|      1|          }                                                                   \
  |  |  |  |  |  |  487|      1|        }
  |  |  |  |  ------------------
  |  |  |  |  500|      0|        (FUZZP)->options[OPTNAME % 1000] = 1
  |  |  ------------------
  |  |  510|      0|          break
  ------------------
  413|     44|    default:
  ------------------
  |  Branch (413:5): [True: 44, False: 81.1k]
  ------------------
  414|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  415|       |         corpus so we reject any unknown TLVs. */
  416|     44|      rc = 127;
  417|     44|      goto EXIT_LABEL;
  418|      0|      break;
  419|  81.1k|  }
  420|       |
  421|  79.5k|  rc = 0;
  422|       |
  423|  81.1k|EXIT_LABEL:
  424|       |
  425|  81.1k|  fuzz_free((void **)&tmp);
  426|       |
  427|  81.1k|  return rc;
  428|  79.5k|}
_Z18fuzz_tlv_to_stringP3tlv:
  434|  49.4k|{
  435|  49.4k|  char *tlvstr;
  436|       |
  437|       |  /* Allocate enough space, plus a null terminator */
  438|  49.4k|  tlvstr = (char *)malloc(tlv->length + 1);
  439|       |
  440|  49.4k|  if(tlvstr != NULL) {
  ------------------
  |  Branch (440:6): [True: 49.4k, False: 0]
  ------------------
  441|  49.4k|    memcpy(tlvstr, tlv->value, tlv->length);
  442|  49.4k|    tlvstr[tlv->length] = 0;
  443|  49.4k|  }
  444|       |
  445|  49.4k|  return tlvstr;
  446|  49.4k|}
_Z20fuzz_setup_http_postP9fuzz_dataP3tlv:
  450|    123|{
  451|    123|  if (fuzz->httppost == NULL) {
  ------------------
  |  Branch (451:7): [True: 123, False: 0]
  ------------------
  452|    123|    struct curl_httppost *post = NULL;
  453|    123|    struct curl_httppost *last = NULL;
  454|       |
  455|    123|    fuzz->post_body = fuzz_tlv_to_string(tlv);
  456|    123|    if (fuzz->post_body == NULL) {
  ------------------
  |  Branch (456:9): [True: 0, False: 123]
  ------------------
  457|      0|      return;
  458|      0|    }
  459|       |
  460|       |    /* This is just one of several possible entrypoints to
  461|       |     * the HTTPPOST API. see https://curl.se/libcurl/c/curl_formadd.html
  462|       |     * for lots of others which could be added here.
  463|       |     */
  464|    123|    curl_formadd(&post, &last,
  465|    123|                 CURLFORM_COPYNAME, FUZZ_HTTPPOST_NAME,
  ------------------
  |  |  277|    123|#define FUZZ_HTTPPOST_NAME              "test"
  ------------------
  466|    123|                 CURLFORM_PTRCONTENTS, fuzz->post_body,
  467|    123|                 CURLFORM_CONTENTLEN, (curl_off_t) strlen(fuzz->post_body),
  468|    123|                 CURLFORM_END);
  469|       |
  470|    123|    fuzz->last_post_part = last;
  471|    123|    fuzz->httppost = post;
  472|    123|  }
  473|       |
  474|    123|  return;
  475|    123|}
_Z18fuzz_add_mime_partP3tlvP13curl_mimepart:
  481|  2.89k|{
  482|  2.89k|  FUZZ_DATA part_fuzz;
  483|  2.89k|  TLV tlv;
  484|  2.89k|  int rc = 0;
  485|  2.89k|  int tlv_rc;
  486|       |
  487|  2.89k|  memset(&part_fuzz, 0, sizeof(FUZZ_DATA));
  488|       |
  489|  2.89k|  if(src_tlv->length < sizeof(TLV_RAW)) {
  ------------------
  |  Branch (489:6): [True: 2.08k, False: 812]
  ------------------
  490|       |    /* Not enough data for a single TLV - don't continue */
  491|  2.08k|    goto EXIT_LABEL;
  492|  2.08k|  }
  493|       |
  494|       |  /* Set up the state parser */
  495|    812|  part_fuzz.state.data = src_tlv->value;
  496|    812|  part_fuzz.state.data_len = src_tlv->length;
  497|       |
  498|    812|  for(tlv_rc = fuzz_get_first_tlv(&part_fuzz, &tlv);
  499|  1.69k|      tlv_rc == 0;
  ------------------
  |  Branch (499:7): [True: 1.10k, False: 589]
  ------------------
  500|  1.10k|      tlv_rc = fuzz_get_next_tlv(&part_fuzz, &tlv)) {
  501|       |
  502|       |    /* Have the TLV in hand. Parse the TLV. */
  503|  1.10k|    rc = fuzz_parse_mime_tlv(part, &tlv);
  504|       |
  505|  1.10k|    if(rc != 0) {
  ------------------
  |  Branch (505:8): [True: 223, False: 881]
  ------------------
  506|       |      /* Failed to parse the TLV. Can't continue. */
  507|    223|      goto EXIT_LABEL;
  508|    223|    }
  509|  1.10k|  }
  510|       |
  511|    589|  if(tlv_rc != TLV_RC_NO_MORE_TLVS) {
  ------------------
  |  |  267|    589|#define TLV_RC_NO_MORE_TLVS             1
  ------------------
  |  Branch (511:6): [True: 302, False: 287]
  ------------------
  512|       |    /* A TLV call failed. Can't continue. */
  513|    302|    goto EXIT_LABEL;
  514|    302|  }
  515|       |
  516|  2.89k|EXIT_LABEL:
  517|       |
  518|  2.89k|  return(rc);
  519|    589|}
_Z19fuzz_parse_mime_tlvP13curl_mimepartP3tlv:
  525|  1.10k|{
  526|  1.10k|  int rc;
  527|  1.10k|  char *tmp;
  528|       |
  529|  1.10k|  switch(tlv->type) {
  530|    211|    case TLV_TYPE_MIME_PART_NAME:
  ------------------
  |  |   42|    211|#define TLV_TYPE_MIME_PART_NAME                 14
  ------------------
  |  Branch (530:5): [True: 211, False: 893]
  ------------------
  531|    211|      tmp = fuzz_tlv_to_string(tlv);
  532|    211|      curl_mime_name(part, tmp);
  533|    211|      fuzz_free((void **)&tmp);
  534|    211|      break;
  535|       |
  536|    670|    case TLV_TYPE_MIME_PART_DATA:
  ------------------
  |  |   43|    670|#define TLV_TYPE_MIME_PART_DATA                 15
  ------------------
  |  Branch (536:5): [True: 670, False: 434]
  ------------------
  537|    670|      curl_mime_data(part, (const char *)tlv->value, tlv->length);
  538|    670|      break;
  539|       |
  540|    223|    default:
  ------------------
  |  Branch (540:5): [True: 223, False: 881]
  ------------------
  541|       |      /* The fuzzer generates lots of unknown TLVs - we don't want these in the
  542|       |         corpus so we reject any unknown TLVs. */
  543|    223|      rc = 255;
  544|    223|      goto EXIT_LABEL;
  545|      0|      break;
  546|  1.10k|  }
  547|       |
  548|    881|  rc = 0;
  549|       |
  550|  1.10k|EXIT_LABEL:
  551|       |
  552|  1.10k|  return rc;
  553|    881|}

